(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendor"],{

/***/ "./node_modules/@angular/common/fesm5/common.js":
/*!******************************************************!*\
  !*** ./node_modules/@angular/common/fesm5/common.js ***!
  \******************************************************/
/*! exports provided: ɵangular_packages_common_common_e, ɵangular_packages_common_common_d, ɵangular_packages_common_common_a, ɵangular_packages_common_common_b, ɵangular_packages_common_common_g, ɵangular_packages_common_common_f, ɵregisterLocaleData, formatDate, formatCurrency, formatNumber, formatPercent, NgLocaleLocalization, NgLocalization, registerLocaleData, 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, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, 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, PlatformLocation, LOCATION_INITIALIZED, LocationStrategy, APP_BASE_HREF, HashLocationStrategy, PathLocationStrategy, Location */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_e", function() { return COMMON_DIRECTIVES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_d", function() { return findLocaleData; });
/* 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_g", function() { return COMMON_DEPRECATED_I18N_PIPES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_f", function() { return COMMON_PIPES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ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__, "registerLocaleData", function() { return registerLocaleData; });
/* 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__, "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__, "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__, "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/fesm5/core.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/**
 * @license Angular v7.0.4
 * (c) 2010-2018 Google, Inc. 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
 */
/**
 * 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
 */
var PlatformLocation = /** @class */ (function () {
    function PlatformLocation() {
    }
    return PlatformLocation;
}());
/**
 * @description
 * Indicates when a location is initialized.
 *
 * @publicApi
 */
var LOCATION_INITIALIZED = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('Location Initialized');

/**
 * @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
 */
/**
 * `LocationStrategy` is responsible for representing and reading route state
 * from the browser's URL. Angular provides two strategies:
 * {@link HashLocationStrategy} and {@link PathLocationStrategy}.
 *
 * This is used under the hood of the {@link Location} service.
 *
 * Applications should use the {@link Router} or {@link Location} services to
 * interact with application route state.
 *
 * For instance, {@link HashLocationStrategy} produces URLs like
 * `http://example.com#/foo`, and {@link PathLocationStrategy} produces
 * `http://example.com/foo` as an equivalent URL.
 *
 * See these two classes for more.
 *
 * @publicApi
 */
var LocationStrategy = /** @class */ (function () {
    function LocationStrategy() {
    }
    return LocationStrategy;
}());
/**
 * The `APP_BASE_HREF` token represents the base href to be used with the
 * {@link PathLocationStrategy}.
 *
 * If you're using {@link PathLocationStrategy}, you must provide a provider to a string
 * representing the URL prefix that should be preserved when generating and recognizing
 * URLs.
 *
 * @usageNotes
 *
 * ### Example
 *
 * ```typescript
 * import {Component, NgModule} from '@angular/core';
 * import {APP_BASE_HREF} from '@angular/common';
 *
 * @NgModule({
 *   providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]
 * })
 * class AppModule {}
 * ```
 *
 * @publicApi
 */
var APP_BASE_HREF = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('appBaseHref');

/**
 * @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
 *
 * A service that applications can use to interact with a browser's URL.
 *
 * Depending on which {@link LocationStrategy} is used, `Location` will either persist
 * to the URL's path or the URL's hash segment.
 *
 * @usageNotes
 *
 * It's better to use {@link 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
 *
 * {@example common/location/ts/path_location_component.ts region='LocationComponent'}
 *
 * @publicApi
 */
var Location = /** @class */ (function () {
    function Location(platformStrategy) {
        var _this = this;
        /** @internal */
        this._subject = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this._platformStrategy = platformStrategy;
        var browserBaseHref = this._platformStrategy.getBaseHref();
        this._baseHref = Location_1.stripTrailingSlash(_stripIndexHtml(browserBaseHref));
        this._platformStrategy.onPopState(function (ev) {
            _this._subject.emit({
                'url': _this.path(true),
                'pop': true,
                'state': ev.state,
                'type': ev.type,
            });
        });
    }
    Location_1 = Location;
    /**
     * Returns the normalized URL path.
     */
    // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is
    // removed.
    Location.prototype.path = function (includeHash) {
        if (includeHash === void 0) { includeHash = false; }
        return this.normalize(this._platformStrategy.path(includeHash));
    };
    /**
     * Normalizes the given path and compares to the current normalized path.
     */
    Location.prototype.isCurrentPathEqualTo = function (path, query) {
        if (query === void 0) { query = ''; }
        return this.path() == this.normalize(path + Location_1.normalizeQueryParams(query));
    };
    /**
     * Given a string representing a URL, returns the normalized URL path without leading or
     * trailing slashes.
     */
    Location.prototype.normalize = function (url) {
        return Location_1.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));
    };
    /**
     * Given a string representing a URL, returns the platform-specific external URL path.
     * If the given URL doesn't begin with a leading slash (`'/'`), this method adds one
     * before normalizing. This method will also add a hash if `HashLocationStrategy` is
     * used, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.
     */
    Location.prototype.prepareExternalUrl = function (url) {
        if (url && url[0] !== '/') {
            url = '/' + url;
        }
        return this._platformStrategy.prepareExternalUrl(url);
    };
    // TODO: rename this method to pushState
    /**
     * Changes the browsers URL to the normalized version of the given URL, and pushes a
     * new item onto the platform's history.
     */
    Location.prototype.go = function (path, query, state) {
        if (query === void 0) { query = ''; }
        if (state === void 0) { state = null; }
        this._platformStrategy.pushState(state, '', path, query);
    };
    /**
     * Changes the browsers URL to the normalized version of the given URL, and replaces
     * the top item on the platform's history stack.
     */
    Location.prototype.replaceState = function (path, query, state) {
        if (query === void 0) { query = ''; }
        if (state === void 0) { state = null; }
        this._platformStrategy.replaceState(state, '', path, query);
    };
    /**
     * Navigates forward in the platform's history.
     */
    Location.prototype.forward = function () { this._platformStrategy.forward(); };
    /**
     * Navigates back in the platform's history.
     */
    Location.prototype.back = function () { this._platformStrategy.back(); };
    /**
     * Subscribe to the platform's `popState` events.
     */
    Location.prototype.subscribe = function (onNext, onThrow, onReturn) {
        return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });
    };
    /**
     * Given a string of url parameters, prepend with '?' if needed, otherwise return parameters as
     * is.
     */
    Location.normalizeQueryParams = function (params) {
        return params && params[0] !== '?' ? '?' + params : params;
    };
    /**
     * Given 2 parts of a url, join them with a slash if needed.
     */
    Location.joinWithSlash = function (start, end) {
        if (start.length == 0) {
            return end;
        }
        if (end.length == 0) {
            return start;
        }
        var slashes = 0;
        if (start.endsWith('/')) {
            slashes++;
        }
        if (end.startsWith('/')) {
            slashes++;
        }
        if (slashes == 2) {
            return start + end.substring(1);
        }
        if (slashes == 1) {
            return start + end;
        }
        return start + '/' + end;
    };
    /**
     * If url has a trailing slash, remove it, otherwise return url as is. This
     * method looks for the first occurrence of either #, ?, or the end of the
     * line as `/` characters after any of these should not be replaced.
     */
    Location.stripTrailingSlash = function (url) {
        var match = url.match(/#|\?|$/);
        var pathEndIdx = match && match.index || url.length;
        var droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);
        return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);
    };
    var Location_1;
    Location = Location_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [LocationStrategy])
    ], Location);
    return Location;
}());
function _stripBaseHref(baseHref, url) {
    return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;
}
function _stripIndexHtml(url) {
    return url.replace(/\/index.html$/, '');
}

/**
 * @license
 * Copyright Google 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
 * 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(HashLocationStrategy, _super);
    function HashLocationStrategy(_platformLocation, _baseHref) {
        var _this = _super.call(this) || this;
        _this._platformLocation = _platformLocation;
        _this._baseHref = '';
        if (_baseHref != null) {
            _this._baseHref = _baseHref;
        }
        return _this;
    }
    HashLocationStrategy.prototype.onPopState = function (fn) {
        this._platformLocation.onPopState(fn);
        this._platformLocation.onHashChange(fn);
    };
    HashLocationStrategy.prototype.getBaseHref = function () { return this._baseHref; };
    HashLocationStrategy.prototype.path = function (includeHash) {
        if (includeHash === void 0) { includeHash = false; }
        // the hash value is always prefixed with a `#`
        // and if it is empty then it will stay empty
        var path = this._platformLocation.hash;
        if (path == null)
            path = '#';
        return path.length > 0 ? path.substring(1) : path;
    };
    HashLocationStrategy.prototype.prepareExternalUrl = function (internal) {
        var url = Location.joinWithSlash(this._baseHref, internal);
        return url.length > 0 ? ('#' + url) : url;
    };
    HashLocationStrategy.prototype.pushState = function (state, title, path, queryParams) {
        var url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));
        if (url.length == 0) {
            url = this._platformLocation.pathname;
        }
        this._platformLocation.pushState(state, title, url);
    };
    HashLocationStrategy.prototype.replaceState = function (state, title, path, queryParams) {
        var url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));
        if (url.length == 0) {
            url = this._platformLocation.pathname;
        }
        this._platformLocation.replaceState(state, title, url);
    };
    HashLocationStrategy.prototype.forward = function () { this._platformLocation.forward(); };
    HashLocationStrategy.prototype.back = function () { this._platformLocation.back(); };
    HashLocationStrategy = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(APP_BASE_HREF)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [PlatformLocation, String])
    ], HashLocationStrategy);
    return HashLocationStrategy;
}(LocationStrategy));

/**
 * @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
 * 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(PathLocationStrategy, _super);
    function PathLocationStrategy(_platformLocation, href) {
        var _this = _super.call(this) || this;
        _this._platformLocation = _platformLocation;
        if (href == null) {
            href = _this._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.");
        }
        _this._baseHref = href;
        return _this;
    }
    PathLocationStrategy.prototype.onPopState = function (fn) {
        this._platformLocation.onPopState(fn);
        this._platformLocation.onHashChange(fn);
    };
    PathLocationStrategy.prototype.getBaseHref = function () { return this._baseHref; };
    PathLocationStrategy.prototype.prepareExternalUrl = function (internal) {
        return Location.joinWithSlash(this._baseHref, internal);
    };
    PathLocationStrategy.prototype.path = function (includeHash) {
        if (includeHash === void 0) { includeHash = false; }
        var pathname = this._platformLocation.pathname +
            Location.normalizeQueryParams(this._platformLocation.search);
        var hash = this._platformLocation.hash;
        return hash && includeHash ? "" + pathname + hash : pathname;
    };
    PathLocationStrategy.prototype.pushState = function (state, title, url, queryParams) {
        var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));
        this._platformLocation.pushState(state, title, externalUrl);
    };
    PathLocationStrategy.prototype.replaceState = function (state, title, url, queryParams) {
        var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));
        this._platformLocation.replaceState(state, title, externalUrl);
    };
    PathLocationStrategy.prototype.forward = function () { this._platformLocation.forward(); };
    PathLocationStrategy.prototype.back = function () { this._platformLocation.back(); };
    PathLocationStrategy = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(APP_BASE_HREF)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [PlatformLocation, String])
    ], PathLocationStrategy);
    return PathLocationStrategy;
}(LocationStrategy));

/**
 * @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
 */
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
var u = undefined;
function plural(n) {
    var i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length;
    if (i === 1 && v === 0)
        return 1;
    return 5;
}
var localeEn = [
    'en', [['a', 'p'], ['AM', 'PM'], u], [['AM', 'PM'], u, u],
    [
        ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
        ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
        ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
    ],
    u,
    [
        ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
        ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
        [
            'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',
            'October', 'November', 'December'
        ]
    ],
    u, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [6, 0],
    ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'],
    ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'], ['{1}, {0}', u, '{1} \'at\' {0}', u],
    ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],
    ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'], '$', 'US Dollar', {}, plural
];

/**
 * @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
 */
/**
 * @publicApi
 */
var LOCALE_DATA = {};
/**
 * 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
 */
// 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[0 /* LocaleId */];
    }
    localeId = localeId.toLowerCase().replace(/_/g, '-');
    LOCALE_DATA[localeId] = data;
    if (extraData) {
        LOCALE_DATA[localeId][19 /* ExtraData */] = extraData;
    }
}

/**
 * @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
 */
/** @internal */
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]
};

/**
 * @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 different format styles that can be used to represent numbers.
 * Used by the function {@link getLocaleNumberFormat}.
 *
 * @publicApi
 */
var NumberFormatStyle;
(function (NumberFormatStyle) {
    NumberFormatStyle[NumberFormatStyle["Decimal"] = 0] = "Decimal";
    NumberFormatStyle[NumberFormatStyle["Percent"] = 1] = "Percent";
    NumberFormatStyle[NumberFormatStyle["Currency"] = 2] = "Currency";
    NumberFormatStyle[NumberFormatStyle["Scientific"] = 3] = "Scientific";
})(NumberFormatStyle || (NumberFormatStyle = {}));
/** @publicApi */
var Plural;
(function (Plural) {
    Plural[Plural["Zero"] = 0] = "Zero";
    Plural[Plural["One"] = 1] = "One";
    Plural[Plural["Two"] = 2] = "Two";
    Plural[Plural["Few"] = 3] = "Few";
    Plural[Plural["Many"] = 4] = "Many";
    Plural[Plural["Other"] = 5] = "Other";
})(Plural || (Plural = {}));
/**
 * Some languages use two different forms of strings (standalone and format) depending on the
 * context.
 * Typically the standalone version is the nominative form of the word, and the format version is in
 * the genitive.
 * See [the CLDR website](http://cldr.unicode.org/translation/date-time) for more information.
 *
 * @publicApi
 */
var FormStyle;
(function (FormStyle) {
    FormStyle[FormStyle["Format"] = 0] = "Format";
    FormStyle[FormStyle["Standalone"] = 1] = "Standalone";
})(FormStyle || (FormStyle = {}));
/**
 * Multiple widths are available for translations: narrow (1 character), abbreviated (3 characters),
 * wide (full length), and short (2 characters, only for days).
 *
 * For example the day `Sunday` will be:
 * - Narrow: `S`
 * - Short: `Su`
 * - Abbreviated: `Sun`
 * - Wide: `Sunday`
 *
 * @publicApi
 */
var TranslationWidth;
(function (TranslationWidth) {
    TranslationWidth[TranslationWidth["Narrow"] = 0] = "Narrow";
    TranslationWidth[TranslationWidth["Abbreviated"] = 1] = "Abbreviated";
    TranslationWidth[TranslationWidth["Wide"] = 2] = "Wide";
    TranslationWidth[TranslationWidth["Short"] = 3] = "Short";
})(TranslationWidth || (TranslationWidth = {}));
/**
 * Multiple widths are available for formats: short (minimal amount of data), medium (small amount
 * of data), long (complete amount of data), full (complete amount of data and extra information).
 *
 * For example the date-time formats for the english locale will be:
 *  - `'short'`: `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`)
 *  - `'medium'`: `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`)
 *  - `'long'`: `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM GMT+1`)
 *  - `'full'`: `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at
 * 9:03:01 AM GMT+01:00`)
 *
 * @publicApi
 */
var FormatWidth;
(function (FormatWidth) {
    FormatWidth[FormatWidth["Short"] = 0] = "Short";
    FormatWidth[FormatWidth["Medium"] = 1] = "Medium";
    FormatWidth[FormatWidth["Long"] = 2] = "Long";
    FormatWidth[FormatWidth["Full"] = 3] = "Full";
})(FormatWidth || (FormatWidth = {}));
/**
 * Number symbol that can be used to replace placeholders in number patterns.
 * The placeholders are based on english values:
 *
 * | Name                   | Example for en-US | Meaning                                     |
 * |------------------------|-------------------|---------------------------------------------|
 * | decimal                | 2,345`.`67        | decimal separator                           |
 * | group                  | 2`,`345.67        | grouping separator, typically for thousands |
 * | plusSign               | `+`23             | the plus sign used with numbers             |
 * | minusSign              | `-`23             | the minus sign used with numbers            |
 * | percentSign            | 23.4`%`           | the percent sign (out of 100)               |
 * | perMille               | 234`‰`            | the permille sign (out of 1000)             |
 * | exponential            | 1.2`E`3           | used in computers for 1.2×10³.              |
 * | superscriptingExponent | 1.2`×`103         | human-readable format of exponential        |
 * | infinity               | `∞`               | used in +∞ and -∞.                          |
 * | nan                    | `NaN`             | "not a number".                             |
 * | timeSeparator          | 10`:`52           | symbol used between time units              |
 * | currencyDecimal        | $2,345`.`67       | decimal separator, fallback to "decimal"    |
 * | currencyGroup          | $2`,`345.67       | grouping separator, fallback to "group"     |
 *
 * @publicApi
 */
var NumberSymbol;
(function (NumberSymbol) {
    NumberSymbol[NumberSymbol["Decimal"] = 0] = "Decimal";
    NumberSymbol[NumberSymbol["Group"] = 1] = "Group";
    NumberSymbol[NumberSymbol["List"] = 2] = "List";
    NumberSymbol[NumberSymbol["PercentSign"] = 3] = "PercentSign";
    NumberSymbol[NumberSymbol["PlusSign"] = 4] = "PlusSign";
    NumberSymbol[NumberSymbol["MinusSign"] = 5] = "MinusSign";
    NumberSymbol[NumberSymbol["Exponential"] = 6] = "Exponential";
    NumberSymbol[NumberSymbol["SuperscriptingExponent"] = 7] = "SuperscriptingExponent";
    NumberSymbol[NumberSymbol["PerMille"] = 8] = "PerMille";
    NumberSymbol[NumberSymbol["Infinity"] = 9] = "Infinity";
    NumberSymbol[NumberSymbol["NaN"] = 10] = "NaN";
    NumberSymbol[NumberSymbol["TimeSeparator"] = 11] = "TimeSeparator";
    NumberSymbol[NumberSymbol["CurrencyDecimal"] = 12] = "CurrencyDecimal";
    NumberSymbol[NumberSymbol["CurrencyGroup"] = 13] = "CurrencyGroup";
})(NumberSymbol || (NumberSymbol = {}));
/**
 * The value for each day of the week, based on the en-US locale
 *
 * @publicApi
 */
var WeekDay;
(function (WeekDay) {
    WeekDay[WeekDay["Sunday"] = 0] = "Sunday";
    WeekDay[WeekDay["Monday"] = 1] = "Monday";
    WeekDay[WeekDay["Tuesday"] = 2] = "Tuesday";
    WeekDay[WeekDay["Wednesday"] = 3] = "Wednesday";
    WeekDay[WeekDay["Thursday"] = 4] = "Thursday";
    WeekDay[WeekDay["Friday"] = 5] = "Friday";
    WeekDay[WeekDay["Saturday"] = 6] = "Saturday";
})(WeekDay || (WeekDay = {}));
/**
 * The locale id for the chosen locale (e.g `en-GB`).
 *
 * @publicApi
 */
function getLocaleId(locale) {
    return findLocaleData(locale)[0 /* LocaleId */];
}
/**
 * Periods of the day (e.g. `[AM, PM]` for en-US).
 *
 * @publicApi
 */
function getLocaleDayPeriods(locale, formStyle, width) {
    var data = findLocaleData(locale);
    var amPmData = [data[1 /* DayPeriodsFormat */], data[2 /* DayPeriodsStandalone */]];
    var amPm = getLastDefinedValue(amPmData, formStyle);
    return getLastDefinedValue(amPm, width);
}
/**
 * Days of the week for the Gregorian calendar (e.g. `[Sunday, Monday, ... Saturday]` for en-US).
 *
 * @publicApi
 */
function getLocaleDayNames(locale, formStyle, width) {
    var data = findLocaleData(locale);
    var daysData = [data[3 /* DaysFormat */], data[4 /* DaysStandalone */]];
    var days = getLastDefinedValue(daysData, formStyle);
    return getLastDefinedValue(days, width);
}
/**
 * Months of the year for the Gregorian calendar (e.g. `[January, February, ...]` for en-US).
 *
 * @publicApi
 */
function getLocaleMonthNames(locale, formStyle, width) {
    var data = findLocaleData(locale);
    var monthsData = [data[5 /* MonthsFormat */], data[6 /* MonthsStandalone */]];
    var months = getLastDefinedValue(monthsData, formStyle);
    return getLastDefinedValue(months, width);
}
/**
 * Eras for the Gregorian calendar (e.g. AD/BC).
 *
 * @publicApi
 */
function getLocaleEraNames(locale, width) {
    var data = findLocaleData(locale);
    var erasData = data[7 /* Eras */];
    return getLastDefinedValue(erasData, width);
}
/**
 * First day of the week for this locale, based on english days (Sunday = 0, Monday = 1, ...).
 * For example in french the value would be 1 because the first day of the week is Monday.
 *
 * @publicApi
 */
function getLocaleFirstDayOfWeek(locale) {
    var data = findLocaleData(locale);
    return data[8 /* FirstDayOfWeek */];
}
/**
 * Range of days in the week that represent the week-end for this locale, based on english days
 * (Sunday = 0, Monday = 1, ...).
 * For example in english the value would be [6,0] for Saturday to Sunday.
 *
 * @publicApi
 */
function getLocaleWeekEndRange(locale) {
    var data = findLocaleData(locale);
    return data[9 /* WeekendRange */];
}
/**
 * Date format that depends on the locale.
 *
 * There are four basic date formats:
 * - `full` should contain long-weekday (EEEE), year (y), long-month (MMMM), day (d).
 *
 *  For example, English uses `EEEE, MMMM d, y`, corresponding to a date like
 *  "Tuesday, September 14, 1999".
 *
 * - `long` should contain year, long-month, day.
 *
 *  For example, `MMMM d, y`, corresponding to a date like "September 14, 1999".
 *
 * - `medium` should contain year, abbreviated-month (MMM), day.
 *
 *  For example, `MMM d, y`, corresponding to a date like "Sep 14, 1999".
 *  For languages that do not use abbreviated months, use the numeric month (MM/M). For example,
 *  `y/MM/dd`, corresponding to a date like "1999/09/14".
 *
 * - `short` should contain year, numeric-month (MM/M), and day.
 *
 *  For example, `M/d/yy`, corresponding to a date like "9/14/99".
 *
 * @publicApi
 */
function getLocaleDateFormat(locale, width) {
    var data = findLocaleData(locale);
    return getLastDefinedValue(data[10 /* DateFormat */], width);
}
/**
 * Time format that depends on the locale.
 *
 * The standard formats include four basic time formats:
 * - `full` should contain hour (h/H), minute (mm), second (ss), and zone (zzzz).
 * - `long` should contain hour, minute, second, and zone (z)
 * - `medium` should contain hour, minute, second.
 * - `short` should contain hour, minute.
 *
 * Note: The patterns depend on whether the main country using your language uses 12-hour time or
 * not:
 * - For 12-hour time, use a pattern like `hh:mm a` using h to mean a 12-hour clock cycle running
 * 1 through 12 (midnight plus 1 minute is 12:01), or using K to mean a 12-hour clock cycle
 * running 0 through 11 (midnight plus 1 minute is 0:01).
 * - For 24-hour time, use a pattern like `HH:mm` using H to mean a 24-hour clock cycle running 0
 * through 23 (midnight plus 1 minute is 0:01), or using k to mean a 24-hour clock cycle running
 * 1 through 24 (midnight plus 1 minute is 24:01).
 *
 * @publicApi
 */
function getLocaleTimeFormat(locale, width) {
    var data = findLocaleData(locale);
    return getLastDefinedValue(data[11 /* TimeFormat */], width);
}
/**
 * Date-time format that depends on the locale.
 *
 * The date-time pattern shows how to combine separate patterns for date (represented by {1})
 * and time (represented by {0}) into a single pattern. It usually doesn't need to be changed.
 * What you want to pay attention to are:
 * - possibly removing a space for languages that don't use it, such as many East Asian languages
 * - possibly adding a comma, other punctuation, or a combining word
 *
 * For example:
 * - English uses `{1} 'at' {0}` or `{1}, {0}` (depending on date style), while Japanese uses
 *  `{1}{0}`.
 * - An English formatted date-time using the combining pattern `{1}, {0}` could be
 *  `Dec 10, 2010, 3:59:49 PM`. Notice the comma and space between the date portion and the time
 *  portion.
 *
 * There are four formats (`full`, `long`, `medium`, `short`); the determination of which to use
 * is normally based on the date style. For example, if the date has a full month and weekday
 * name, the full combining pattern will be used to combine that with a time. If the date has
 * numeric month, the short version of the combining pattern will be used to combine that with a
 * time. English uses `{1} 'at' {0}` for full and long styles, and `{1}, {0}` for medium and short
 * styles.
 *
 * @publicApi
 */
function getLocaleDateTimeFormat(locale, width) {
    var data = findLocaleData(locale);
    var dateTimeFormatData = data[12 /* DateTimeFormat */];
    return getLastDefinedValue(dateTimeFormatData, width);
}
/**
 * Number symbol that can be used to replace placeholders in number formats.
 * See {@link NumberSymbol} for more information.
 *
 * @publicApi
 */
function getLocaleNumberSymbol(locale, symbol) {
    var data = findLocaleData(locale);
    var res = data[13 /* NumberSymbols */][symbol];
    if (typeof res === 'undefined') {
        if (symbol === NumberSymbol.CurrencyDecimal) {
            return data[13 /* NumberSymbols */][NumberSymbol.Decimal];
        }
        else if (symbol === NumberSymbol.CurrencyGroup) {
            return data[13 /* NumberSymbols */][NumberSymbol.Group];
        }
    }
    return res;
}
/**
 * Number format that depends on the 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,67". 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;
 * they 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 Number Symbols 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). |
 * | ¤ | This will be replaced by a currency symbol, such as $ or USD. |
 * | % | This marks a percent format. The % symbol may change position, but must be retained. |
 * | E | This 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. |
 *
 * You can find more information
 * [on the CLDR website](http://cldr.unicode.org/translation/number-patterns)
 *
 * @publicApi
 */
function getLocaleNumberFormat(locale, type) {
    var data = findLocaleData(locale);
    return data[14 /* NumberFormats */][type];
}
/**
 * The symbol used to represent the currency for the main country using this locale (e.g. $ for
 * the locale en-US).
 * The symbol will be `null` if the main country cannot be determined.
 *
 * @publicApi
 */
function getLocaleCurrencySymbol(locale) {
    var data = findLocaleData(locale);
    return data[15 /* CurrencySymbol */] || null;
}
/**
 * The name of the currency for the main country using this locale (e.g. USD for the locale
 * en-US).
 * The name will be `null` if the main country cannot be determined.
 *
 * @publicApi
 */
function getLocaleCurrencyName(locale) {
    var data = findLocaleData(locale);
    return data[16 /* CurrencyName */] || null;
}
/**
 * Returns the currency values for the locale
 */
function getLocaleCurrencies(locale) {
    var data = findLocaleData(locale);
    return data[17 /* Currencies */];
}
/**
 * The locale plural function used by ICU expressions to determine the plural case to use.
 * See {@link NgPlural} for more information.
 *
 * @publicApi
 */
function getLocalePluralCase(locale) {
    var data = findLocaleData(locale);
    return data[18 /* PluralCase */];
}
function checkFullData(data) {
    if (!data[19 /* ExtraData */]) {
        throw new Error("Missing extra locale data for the locale \"" + data[0 /* LocaleId */] + "\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more.");
    }
}
/**
 * Rules used to determine which day period to use (See `dayPeriods` below).
 * The rules can either be an array or a single value. If it's an array, consider it as "from"
 * and "to". If it's a single value then it means that the period is only valid at this exact
 * value.
 * There is always the same number of rules as the number of day periods, which means that the
 * first rule is applied to the first day period and so on.
 * You should fallback to AM/PM when there are no rules available.
 *
 * Note: this is only available if you load the full locale data.
 * See the ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale
 * data.
 *
 * @publicApi
 */
function getLocaleExtraDayPeriodRules(locale) {
    var data = findLocaleData(locale);
    checkFullData(data);
    var rules = data[19 /* ExtraData */][2 /* ExtraDayPeriodsRules */] || [];
    return rules.map(function (rule) {
        if (typeof rule === 'string') {
            return extractTime(rule);
        }
        return [extractTime(rule[0]), extractTime(rule[1])];
    });
}
/**
 * Day Periods indicate roughly how the day is broken up in different languages (e.g. morning,
 * noon, afternoon, midnight, ...).
 * You should use the function {@link getLocaleExtraDayPeriodRules} to determine which period to
 * use.
 * You should fallback to AM/PM when there are no day periods available.
 *
 * Note: this is only available if you load the full locale data.
 * See the ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale
 * data.
 *
 * @publicApi
 */
function getLocaleExtraDayPeriods(locale, formStyle, width) {
    var data = findLocaleData(locale);
    checkFullData(data);
    var dayPeriodsData = [
        data[19 /* ExtraData */][0 /* ExtraDayPeriodFormats */],
        data[19 /* ExtraData */][1 /* ExtraDayPeriodStandalone */]
    ];
    var dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
    return getLastDefinedValue(dayPeriods, width) || [];
}
/**
 * Returns the first value that is defined in an array, going backwards.
 *
 * To avoid repeating the same data (e.g. when "format" and "standalone" are the same) we only
 * add the first one to the locale data arrays, the other ones are only defined when different.
 * We use this function to retrieve the first defined value.
 *
 * @publicApi
 */
function getLastDefinedValue(data, index) {
    for (var i = index; i > -1; i--) {
        if (typeof data[i] !== 'undefined') {
            return data[i];
        }
    }
    throw new Error('Locale data API: locale data undefined');
}
/**
 * Extract the hours and minutes from a string like "15:45"
 */
function extractTime(time) {
    var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(time.split(':'), 2), h = _a[0], m = _a[1];
    return { hours: +h, minutes: +m };
}
/**
 * Finds the locale data for a locale id
 *
 * @publicApi
 */
function findLocaleData(locale) {
    var normalizedLocale = locale.toLowerCase().replace(/_/g, '-');
    var match = LOCALE_DATA[normalizedLocale];
    if (match) {
        return match;
    }
    // let's try to find a parent locale
    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 \"" + locale + "\".");
}
/**
 * Returns the currency symbol for a given currency code, or the code if no symbol available
 * (e.g.: format narrow = $, format wide = US$, code = USD)
 * If no locale is provided, it uses the locale "en" by default
 *
 * @publicApi
 */
function getCurrencySymbol(code, format, locale) {
    if (locale === void 0) { locale = 'en'; }
    var currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];
    var symbolNarrow = currency[1 /* SymbolNarrow */];
    if (format === 'narrow' && typeof symbolNarrow === 'string') {
        return symbolNarrow;
    }
    return currency[0 /* Symbol */] || code;
}
// Most currencies have cents, that's why the default is 2
var DEFAULT_NB_OF_CURRENCY_DIGITS = 2;
/**
 * Returns the number of decimal digits for the given currency.
 * Its value depends upon the presence of cents in that particular currency.
 *
 * @publicApi
 */
function getNumberOfCurrencyDigits(code) {
    var digits;
    var currency = CURRENCIES_EN[code];
    if (currency) {
        digits = currency[2 /* NbOfDigits */];
    }
    return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;
}

/**
 * @license
 * Copyright Google 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 ISO8601_DATE_REGEX = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
//    1        2       3         4          5          6          7          8  9     10      11
var NAMED_FORMATS = {};
var DATE_FORMATS_SPLIT = /((?:[^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]*)/;
var ZoneWidth;
(function (ZoneWidth) {
    ZoneWidth[ZoneWidth["Short"] = 0] = "Short";
    ZoneWidth[ZoneWidth["ShortGMT"] = 1] = "ShortGMT";
    ZoneWidth[ZoneWidth["Long"] = 2] = "Long";
    ZoneWidth[ZoneWidth["Extended"] = 3] = "Extended";
})(ZoneWidth || (ZoneWidth = {}));
var DateType;
(function (DateType) {
    DateType[DateType["FullYear"] = 0] = "FullYear";
    DateType[DateType["Month"] = 1] = "Month";
    DateType[DateType["Date"] = 2] = "Date";
    DateType[DateType["Hours"] = 3] = "Hours";
    DateType[DateType["Minutes"] = 4] = "Minutes";
    DateType[DateType["Seconds"] = 5] = "Seconds";
    DateType[DateType["FractionalSeconds"] = 6] = "FractionalSeconds";
    DateType[DateType["Day"] = 7] = "Day";
})(DateType || (DateType = {}));
var TranslationType;
(function (TranslationType) {
    TranslationType[TranslationType["DayPeriods"] = 0] = "DayPeriods";
    TranslationType[TranslationType["Days"] = 1] = "Days";
    TranslationType[TranslationType["Months"] = 2] = "Months";
    TranslationType[TranslationType["Eras"] = 3] = "Eras";
})(TranslationType || (TranslationType = {}));
/**
 * @ngModule CommonModule
 * @description
 *
 * Formats a date according to locale rules.
 *
 * Where:
 * - `value` is a Date, 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. See {@link DatePipe} for more
 *   details.
 * - `locale` is a `string` defining the locale to use.
 * - `timezone` to be used for formatting. It understands UTC/GMT and the continental US time zone
 *   abbreviations, but for general use, use a time zone offset (e.g. `'+0430'`).
 *   If not specified, host system settings are used.
 *
 * See {@link DatePipe} for more details.
 *
 * @publicApi
 */
function formatDate(value, format, locale, timezone) {
    var date = toDate(value);
    var namedFormat = getNamedFormat(locale, format);
    format = namedFormat || format;
    var parts = [];
    var match;
    while (format) {
        match = DATE_FORMATS_SPLIT.exec(format);
        if (match) {
            parts = parts.concat(match.slice(1));
            var part = parts.pop();
            if (!part) {
                break;
            }
            format = part;
        }
        else {
            parts.push(format);
            break;
        }
    }
    var dateTimezoneOffset = date.getTimezoneOffset();
    if (timezone) {
        dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
        date = convertTimezoneToLocal(date, timezone, true);
    }
    var text = '';
    parts.forEach(function (value) {
        var dateFormatter = getDateFormatter(value);
        text += dateFormatter ?
            dateFormatter(date, locale, dateTimezoneOffset) :
            value === '\'\'' ? '\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
    });
    return text;
}
function getNamedFormat(locale, format) {
    var localeId = getLocaleId(locale);
    NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};
    if (NAMED_FORMATS[localeId][format]) {
        return NAMED_FORMATS[localeId][format];
    }
    var formatValue = '';
    switch (format) {
        case 'shortDate':
            formatValue = getLocaleDateFormat(locale, FormatWidth.Short);
            break;
        case 'mediumDate':
            formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);
            break;
        case 'longDate':
            formatValue = getLocaleDateFormat(locale, FormatWidth.Long);
            break;
        case 'fullDate':
            formatValue = getLocaleDateFormat(locale, FormatWidth.Full);
            break;
        case 'shortTime':
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);
            break;
        case 'mediumTime':
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);
            break;
        case 'longTime':
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);
            break;
        case 'fullTime':
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);
            break;
        case 'short':
            var shortTime = getNamedFormat(locale, 'shortTime');
            var shortDate = getNamedFormat(locale, 'shortDate');
            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);
            break;
        case 'medium':
            var mediumTime = getNamedFormat(locale, 'mediumTime');
            var mediumDate = getNamedFormat(locale, 'mediumDate');
            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);
            break;
        case 'long':
            var longTime = getNamedFormat(locale, 'longTime');
            var longDate = getNamedFormat(locale, 'longDate');
            formatValue =
                formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);
            break;
        case 'full':
            var fullTime = getNamedFormat(locale, 'fullTime');
            var fullDate = getNamedFormat(locale, 'fullDate');
            formatValue =
                formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);
            break;
    }
    if (formatValue) {
        NAMED_FORMATS[localeId][format] = formatValue;
    }
    return formatValue;
}
function formatDateTime(str, opt_values) {
    if (opt_values) {
        str = str.replace(/\{([^}]+)}/g, function (match, key) {
            return (opt_values != null && key in opt_values) ? opt_values[key] : match;
        });
    }
    return str;
}
function padNumber(num, digits, minusSign, trim, negWrap) {
    if (minusSign === void 0) { minusSign = '-'; }
    var neg = '';
    if (num < 0 || (negWrap && num <= 0)) {
        if (negWrap) {
            num = -num + 1;
        }
        else {
            num = -num;
            neg = minusSign;
        }
    }
    var strNum = String(num);
    while (strNum.length < digits) {
        strNum = '0' + strNum;
    }
    if (trim) {
        strNum = strNum.substr(strNum.length - digits);
    }
    return neg + strNum;
}
function formatFractionalSeconds(milliseconds, digits) {
    var strMs = padNumber(milliseconds, 3);
    return strMs.substr(0, digits);
}
/**
 * Returns a date formatter that transforms a date into its locale digit representation
 */
function dateGetter(name, size, offset, trim, negWrap) {
    if (offset === void 0) { offset = 0; }
    if (trim === void 0) { trim = false; }
    if (negWrap === void 0) { negWrap = false; }
    return function (date, locale) {
        var part = getDatePart(name, date);
        if (offset > 0 || part > -offset) {
            part += offset;
        }
        if (name === DateType.Hours) {
            if (part === 0 && offset === -12) {
                part = 12;
            }
        }
        else if (name === DateType.FractionalSeconds) {
            return formatFractionalSeconds(part, size);
        }
        var localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
        return padNumber(part, size, localeMinus, trim, negWrap);
    };
}
function getDatePart(part, date) {
    switch (part) {
        case DateType.FullYear:
            return date.getFullYear();
        case DateType.Month:
            return date.getMonth();
        case DateType.Date:
            return date.getDate();
        case DateType.Hours:
            return date.getHours();
        case DateType.Minutes:
            return date.getMinutes();
        case DateType.Seconds:
            return date.getSeconds();
        case DateType.FractionalSeconds:
            return date.getMilliseconds();
        case DateType.Day:
            return date.getDay();
        default:
            throw new Error("Unknown DateType value \"" + part + "\".");
    }
}
/**
 * Returns a date formatter that transforms a date into its locale string representation
 */
function dateStrGetter(name, width, form, extended) {
    if (form === void 0) { form = FormStyle.Format; }
    if (extended === void 0) { extended = false; }
    return function (date, locale) {
        return getDateTranslation(date, locale, name, width, form, extended);
    };
}
/**
 * Returns the locale translation of a date for a given form, type and width
 */
function getDateTranslation(date, locale, name, width, form, extended) {
    switch (name) {
        case TranslationType.Months:
            return getLocaleMonthNames(locale, form, width)[date.getMonth()];
        case TranslationType.Days:
            return getLocaleDayNames(locale, form, width)[date.getDay()];
        case TranslationType.DayPeriods:
            var currentHours_1 = date.getHours();
            var currentMinutes_1 = date.getMinutes();
            if (extended) {
                var rules = getLocaleExtraDayPeriodRules(locale);
                var dayPeriods_1 = getLocaleExtraDayPeriods(locale, form, width);
                var result_1;
                rules.forEach(function (rule, index) {
                    if (Array.isArray(rule)) {
                        // morning, afternoon, evening, night
                        var _a = rule[0], hoursFrom = _a.hours, minutesFrom = _a.minutes;
                        var _b = rule[1], hoursTo = _b.hours, minutesTo = _b.minutes;
                        if (currentHours_1 >= hoursFrom && currentMinutes_1 >= minutesFrom &&
                            (currentHours_1 < hoursTo ||
                                (currentHours_1 === hoursTo && currentMinutes_1 < minutesTo))) {
                            result_1 = dayPeriods_1[index];
                        }
                    }
                    else { // noon or midnight
                        var hours = rule.hours, minutes = rule.minutes;
                        if (hours === currentHours_1 && minutes === currentMinutes_1) {
                            result_1 = dayPeriods_1[index];
                        }
                    }
                });
                if (result_1) {
                    return result_1;
                }
            }
            // if no rules for the day periods, we use am/pm by default
            return getLocaleDayPeriods(locale, form, width)[currentHours_1 < 12 ? 0 : 1];
        case TranslationType.Eras:
            return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];
        default:
            // This default case is not needed by TypeScript compiler, as the switch is exhaustive.
            // However Closure Compiler does not understand that and reports an error in typed mode.
            // The `throw new Error` below works around the problem, and the unexpected: never variable
            // makes sure tsc still checks this code is unreachable.
            var unexpected = name;
            throw new Error("unexpected translation type " + unexpected);
    }
}
/**
 * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or
 * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,
 * extended = +04:30)
 */
function timeZoneGetter(width) {
    return function (date, locale, offset) {
        var zone = -1 * offset;
        var minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
        var hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);
        switch (width) {
            case ZoneWidth.Short:
                return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +
                    padNumber(Math.abs(zone % 60), 2, minusSign);
            case ZoneWidth.ShortGMT:
                return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);
            case ZoneWidth.Long:
                return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +
                    padNumber(Math.abs(zone % 60), 2, minusSign);
            case ZoneWidth.Extended:
                if (offset === 0) {
                    return 'Z';
                }
                else {
                    return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +
                        padNumber(Math.abs(zone % 60), 2, minusSign);
                }
            default:
                throw new Error("Unknown zone width \"" + width + "\"");
        }
    };
}
var JANUARY = 0;
var THURSDAY = 4;
function getFirstThursdayOfYear(year) {
    var firstDayOfYear = (new Date(year, JANUARY, 1)).getDay();
    return new Date(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
}
function getThursdayThisWeek(datetime) {
    return new Date(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));
}
function weekGetter(size, monthBased) {
    if (monthBased === void 0) { monthBased = false; }
    return function (date, locale) {
        var result;
        if (monthBased) {
            var nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;
            var today = date.getDate();
            result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);
        }
        else {
            var firstThurs = getFirstThursdayOfYear(date.getFullYear());
            var thisThurs = getThursdayThisWeek(date);
            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));
    };
}
var DATE_FORMATS = {};
// Based on CLDR formats:
// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
// See also explanations: http://cldr.unicode.org/translation/date-time
// TODO(ocombe): support all missing cldr formats: Y, U, Q, D, F, e, c, j, J, C, A, v, V, X, x
function getDateFormatter(format) {
    if (DATE_FORMATS[format]) {
        return DATE_FORMATS[format];
    }
    var formatter;
    switch (format) {
        // Era name (AD/BC)
        case 'G':
        case 'GG':
        case 'GGG':
            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);
            break;
        case 'GGGG':
            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);
            break;
        case 'GGGGG':
            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);
            break;
        // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)
        case 'y':
            formatter = dateGetter(DateType.FullYear, 1, 0, false, true);
            break;
        // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
        case 'yy':
            formatter = dateGetter(DateType.FullYear, 2, 0, true, true);
            break;
        // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)
        case 'yyy':
            formatter = dateGetter(DateType.FullYear, 3, 0, false, true);
            break;
        // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)
        case 'yyyy':
            formatter = dateGetter(DateType.FullYear, 4, 0, false, true);
            break;
        // Month of the year (1-12), numeric
        case 'M':
        case 'L':
            formatter = dateGetter(DateType.Month, 1, 1);
            break;
        case 'MM':
        case 'LL':
            formatter = dateGetter(DateType.Month, 2, 1);
            break;
        // Month of the year (January, ...), string, format
        case 'MMM':
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);
            break;
        case 'MMMM':
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);
            break;
        case 'MMMMM':
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);
            break;
        // Month of the year (January, ...), string, standalone
        case 'LLL':
            formatter =
                dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
            break;
        case 'LLLL':
            formatter =
                dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
            break;
        case 'LLLLL':
            formatter =
                dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
            break;
        // Week of the year (1, ... 52)
        case 'w':
            formatter = weekGetter(1);
            break;
        case 'ww':
            formatter = weekGetter(2);
            break;
        // Week of the month (1, ...)
        case 'W':
            formatter = weekGetter(1, true);
            break;
        // Day of the month (1-31)
        case 'd':
            formatter = dateGetter(DateType.Date, 1);
            break;
        case 'dd':
            formatter = dateGetter(DateType.Date, 2);
            break;
        // Day of the Week
        case 'E':
        case 'EE':
        case 'EEE':
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);
            break;
        case 'EEEE':
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);
            break;
        case 'EEEEE':
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);
            break;
        case 'EEEEEE':
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);
            break;
        // Generic period of the day (am-pm)
        case 'a':
        case 'aa':
        case 'aaa':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);
            break;
        case 'aaaa':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);
            break;
        case 'aaaaa':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);
            break;
        // Extended period of the day (midnight, at night, ...), standalone
        case 'b':
        case 'bb':
        case 'bbb':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);
            break;
        case 'bbbb':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);
            break;
        case 'bbbbb':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);
            break;
        // Extended period of the day (midnight, night, ...), standalone
        case 'B':
        case 'BB':
        case 'BBB':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);
            break;
        case 'BBBB':
            formatter =
                dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
            break;
        case 'BBBBB':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);
            break;
        // Hour in AM/PM, (1-12)
        case 'h':
            formatter = dateGetter(DateType.Hours, 1, -12);
            break;
        case 'hh':
            formatter = dateGetter(DateType.Hours, 2, -12);
            break;
        // Hour of the day (0-23)
        case 'H':
            formatter = dateGetter(DateType.Hours, 1);
            break;
        // Hour in day, padded (00-23)
        case 'HH':
            formatter = dateGetter(DateType.Hours, 2);
            break;
        // Minute of the hour (0-59)
        case 'm':
            formatter = dateGetter(DateType.Minutes, 1);
            break;
        case 'mm':
            formatter = dateGetter(DateType.Minutes, 2);
            break;
        // Second of the minute (0-59)
        case 's':
            formatter = dateGetter(DateType.Seconds, 1);
            break;
        case 'ss':
            formatter = dateGetter(DateType.Seconds, 2);
            break;
        // Fractional second
        case 'S':
            formatter = dateGetter(DateType.FractionalSeconds, 1);
            break;
        case 'SS':
            formatter = dateGetter(DateType.FractionalSeconds, 2);
            break;
        case 'SSS':
            formatter = dateGetter(DateType.FractionalSeconds, 3);
            break;
        // Timezone ISO8601 short format (-0430)
        case 'Z':
        case 'ZZ':
        case 'ZZZ':
            formatter = timeZoneGetter(ZoneWidth.Short);
            break;
        // Timezone ISO8601 extended format (-04:30)
        case 'ZZZZZ':
            formatter = timeZoneGetter(ZoneWidth.Extended);
            break;
        // Timezone GMT short format (GMT+4)
        case 'O':
        case 'OO':
        case 'OOO':
        // Should be location, but fallback to format O instead because we don't have the data yet
        case 'z':
        case 'zz':
        case 'zzz':
            formatter = timeZoneGetter(ZoneWidth.ShortGMT);
            break;
        // Timezone GMT long format (GMT+0430)
        case 'OOOO':
        case 'ZZZZ':
        // Should be location, but fallback to format O instead because we don't have the data yet
        case 'zzzz':
            formatter = timeZoneGetter(ZoneWidth.Long);
            break;
        default:
            return null;
    }
    DATE_FORMATS[format] = formatter;
    return formatter;
}
function timezoneToOffset(timezone, fallback) {
    // Support: IE 9-11 only, Edge 13-15+
    // IE/Edge do not "understand" colon (`:`) in timezone
    timezone = timezone.replace(/:/g, '');
    var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
    return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
}
function addDateMinutes(date, minutes) {
    date = new Date(date.getTime());
    date.setMinutes(date.getMinutes() + minutes);
    return date;
}
function convertTimezoneToLocal(date, timezone, reverse) {
    var reverseValue = reverse ? -1 : 1;
    var dateTimezoneOffset = date.getTimezoneOffset();
    var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
    return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));
}
/**
 * Converts a value to date.
 *
 * Supported input formats:
 * - `Date`
 * - number: timestamp
 * - string: numeric (e.g. "1234"), ISO and date strings in a format supported by
 *   [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
 *   Note: ISO strings without time return a date without timeoffset.
 *
 * Throws if unable to convert to a date.
 */
function toDate(value) {
    if (isDate(value)) {
        return value;
    }
    if (typeof value === 'number' && !isNaN(value)) {
        return new Date(value);
    }
    if (typeof value === 'string') {
        value = value.trim();
        var parsedNb = parseFloat(value);
        // any string that only contains numbers, like "1234" but not like "1234hello"
        if (!isNaN(value - parsedNb)) {
            return new Date(parsedNb);
        }
        if (/^(\d{4}-\d{1,2}-\d{1,2})$/.test(value)) {
            /* For ISO Strings without time the day, month and year must be extracted from the ISO String
            before Date creation to avoid time offset and errors in the new Date.
            If we only replace '-' with ',' in the ISO String ("2015,01,01"), and try to create a new
            date, some browsers (e.g. IE 9) will throw an invalid Date error.
            If we leave the '-' ("2015-01-01") and try to create a new Date("2015-01-01") the timeoffset
            is applied.
            Note: ISO months are 0 for January, 1 for February, ... */
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(value.split('-').map(function (val) { return +val; }), 3), y = _a[0], m = _a[1], d = _a[2];
            return new Date(y, m - 1, d);
        }
        var match = void 0;
        if (match = value.match(ISO8601_DATE_REGEX)) {
            return isoStringToDate(match);
        }
    }
    var date = new Date(value);
    if (!isDate(date)) {
        throw new Error("Unable to convert \"" + value + "\" into a date");
    }
    return date;
}
/**
 * Converts a date in ISO8601 to a Date.
 * Used instead of `Date.parse` because of browser discrepancies.
 */
function isoStringToDate(match) {
    var date = new Date(0);
    var tzHour = 0;
    var tzMin = 0;
    // match[8] means that the string contains "Z" (UTC) or a timezone like "+01:00" or "+0100"
    var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;
    var timeSetter = match[8] ? date.setUTCHours : date.setHours;
    // if there is a timezone defined like "+01:00" or "+0100"
    if (match[9]) {
        tzHour = Number(match[9] + match[10]);
        tzMin = Number(match[9] + match[11]);
    }
    dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));
    var h = Number(match[4] || 0) - tzHour;
    var m = Number(match[5] || 0) - tzMin;
    var s = Number(match[6] || 0);
    var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);
    timeSetter.call(date, h, m, s, ms);
    return date;
}
function isDate(value) {
    return value instanceof Date && !isNaN(value.valueOf());
}

/**
 * @license
 * Copyright Google 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 NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;
var MAX_DIGITS = 22;
var DECIMAL_SEP = '.';
var ZERO_CHAR = '0';
var PATTERN_SEP = ';';
var GROUP_SEP = ',';
var DIGIT_CHAR = '#';
var CURRENCY_CHAR = '¤';
var PERCENT_CHAR = '%';
/**
 * Transforms a number to a locale string based on a style and a format
 */
function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent) {
    if (isPercent === void 0) { isPercent = false; }
    var formattedText = '';
    var isZero = false;
    if (!isFinite(value)) {
        formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);
    }
    else {
        var parsedNumber = parseNumber(value);
        if (isPercent) {
            parsedNumber = toPercent(parsedNumber);
        }
        var minInt = pattern.minInt;
        var minFraction = pattern.minFrac;
        var maxFraction = pattern.maxFrac;
        if (digitsInfo) {
            var parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);
            if (parts === null) {
                throw new Error(digitsInfo + " is not a valid digit info");
            }
            var minIntPart = parts[1];
            var minFractionPart = parts[3];
            var maxFractionPart = parts[5];
            if (minIntPart != null) {
                minInt = parseIntAutoRadix(minIntPart);
            }
            if (minFractionPart != null) {
                minFraction = parseIntAutoRadix(minFractionPart);
            }
            if (maxFractionPart != null) {
                maxFraction = parseIntAutoRadix(maxFractionPart);
            }
            else if (minFractionPart != null && minFraction > maxFraction) {
                maxFraction = minFraction;
            }
        }
        roundNumber(parsedNumber, minFraction, maxFraction);
        var digits = parsedNumber.digits;
        var integerLen = parsedNumber.integerLen;
        var exponent = parsedNumber.exponent;
        var decimals = [];
        isZero = digits.every(function (d) { return !d; });
        // pad zeros for small numbers
        for (; integerLen < minInt; integerLen++) {
            digits.unshift(0);
        }
        // pad zeros for small numbers
        for (; integerLen < 0; integerLen++) {
            digits.unshift(0);
        }
        // extract decimals digits
        if (integerLen > 0) {
            decimals = digits.splice(integerLen, digits.length);
        }
        else {
            decimals = digits;
            digits = [0];
        }
        // format the integer digits with grouping separators
        var groups = [];
        if (digits.length >= pattern.lgSize) {
            groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));
        }
        while (digits.length > pattern.gSize) {
            groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));
        }
        if (digits.length) {
            groups.unshift(digits.join(''));
        }
        formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));
        // append the decimal digits
        if (decimals.length) {
            formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');
        }
        if (exponent) {
            formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;
        }
    }
    if (value < 0 && !isZero) {
        formattedText = pattern.negPre + formattedText + pattern.negSuf;
    }
    else {
        formattedText = pattern.posPre + formattedText + pattern.posSuf;
    }
    return formattedText;
}
/**
 * @ngModule CommonModule
 * @description
 *
 * Formats a number as currency using locale rules.
 *
 * Use `currency` to format a number as currency.
 *
 * Where:
 * - `value` is a number.
 * - `locale` is a `string` defining the locale to use.
 * - `currency` is the string that represents the currency, it can be its symbol or its name.
 * - `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.
 * - `digitInfo` See {@link DecimalPipe} for more details.
 *
 * @publicApi
 */
function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
    var format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);
    var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
    pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);
    pattern.maxFrac = pattern.minFrac;
    var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);
    return res
        .replace(CURRENCY_CHAR, currency)
        // if we have 2 time the currency character, the second one is ignored
        .replace(CURRENCY_CHAR, '');
}
/**
 * @ngModule CommonModule
 * @description
 *
 * Formats a number as a percentage according to locale rules.
 *
 * Where:
 * - `value` is a number.
 * - `locale` is a `string` defining the locale to use.
 * - `digitInfo` See {@link DecimalPipe} for more details.
 *
 * @publicApi
 */
function formatPercent(value, locale, digitsInfo) {
    var format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);
    var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
    var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);
    return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));
}
/**
 * @ngModule CommonModule
 * @description
 *
 * Formats a number as text. Group sizing and separator and other locale-specific
 * configurations are based on the locale.
 *
 * Where:
 * - `value` is a number.
 * - `locale` is a `string` defining the locale to use.
 * - `digitInfo` See {@link DecimalPipe} for more details.
 *
 * @publicApi
 */
function formatNumber(value, locale, digitsInfo) {
    var format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);
    var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
    return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);
}
function parseNumberFormat(format, minusSign) {
    if (minusSign === void 0) { minusSign = '-'; }
    var p = {
        minInt: 1,
        minFrac: 0,
        maxFrac: 0,
        posPre: '',
        posSuf: '',
        negPre: '',
        negSuf: '',
        gSize: 0,
        lgSize: 0
    };
    var patternParts = format.split(PATTERN_SEP);
    var positive = patternParts[0];
    var negative = patternParts[1];
    var positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?
        positive.split(DECIMAL_SEP) :
        [
            positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),
            positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)
        ], integer = positiveParts[0], fraction = positiveParts[1] || '';
    p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR));
    for (var i = 0; i < fraction.length; i++) {
        var ch = fraction.charAt(i);
        if (ch === ZERO_CHAR) {
            p.minFrac = p.maxFrac = i + 1;
        }
        else if (ch === DIGIT_CHAR) {
            p.maxFrac = i + 1;
        }
        else {
            p.posSuf += ch;
        }
    }
    var groups = integer.split(GROUP_SEP);
    p.gSize = groups[1] ? groups[1].length : 0;
    p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;
    if (negative) {
        var trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);
        p.negPre = negative.substr(0, pos).replace(/'/g, '');
        p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, '');
    }
    else {
        p.negPre = minusSign + p.posPre;
        p.negSuf = p.posSuf;
    }
    return p;
}
// Transforms a parsed number into a percentage by multiplying it by 100
function toPercent(parsedNumber) {
    // if the number is 0, don't do anything
    if (parsedNumber.digits[0] === 0) {
        return parsedNumber;
    }
    // Getting the current number of decimals
    var fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;
    if (parsedNumber.exponent) {
        parsedNumber.exponent += 2;
    }
    else {
        if (fractionLen === 0) {
            parsedNumber.digits.push(0, 0);
        }
        else if (fractionLen === 1) {
            parsedNumber.digits.push(0);
        }
        parsedNumber.integerLen += 2;
    }
    return parsedNumber;
}
/**
 * Parses a number.
 * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/
 */
function parseNumber(num) {
    var numStr = Math.abs(num) + '';
    var exponent = 0, digits, integerLen;
    var i, j, zeros;
    // Decimal point?
    if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {
        numStr = numStr.replace(DECIMAL_SEP, '');
    }
    // Exponential form?
    if ((i = numStr.search(/e/i)) > 0) {
        // Work out the exponent.
        if (integerLen < 0)
            integerLen = i;
        integerLen += +numStr.slice(i + 1);
        numStr = numStr.substring(0, i);
    }
    else if (integerLen < 0) {
        // There was no decimal point or exponent so it is an integer.
        integerLen = numStr.length;
    }
    // Count the number of leading zeros.
    for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */
    }
    if (i === (zeros = numStr.length)) {
        // The digits are all zero.
        digits = [0];
        integerLen = 1;
    }
    else {
        // Count the number of trailing zeros
        zeros--;
        while (numStr.charAt(zeros) === ZERO_CHAR)
            zeros--;
        // Trailing zeros are insignificant so ignore them
        integerLen -= i;
        digits = [];
        // Convert string to array of digits without leading/trailing zeros.
        for (j = 0; i <= zeros; i++, j++) {
            digits[j] = Number(numStr.charAt(i));
        }
    }
    // If the number overflows the maximum allowed digits then use an exponent.
    if (integerLen > MAX_DIGITS) {
        digits = digits.splice(0, MAX_DIGITS - 1);
        exponent = integerLen - 1;
        integerLen = 1;
    }
    return { digits: digits, exponent: exponent, integerLen: integerLen };
}
/**
 * Round the parsed number to the specified number of decimal places
 * This function changes the parsedNumber in-place
 */
function roundNumber(parsedNumber, minFrac, maxFrac) {
    if (minFrac > maxFrac) {
        throw new Error("The minimum number of digits after fraction (" + minFrac + ") is higher than the maximum (" + maxFrac + ").");
    }
    var digits = parsedNumber.digits;
    var fractionLen = digits.length - parsedNumber.integerLen;
    var fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);
    // The index of the digit to where rounding is to occur
    var roundAt = fractionSize + parsedNumber.integerLen;
    var digit = digits[roundAt];
    if (roundAt > 0) {
        // Drop fractional digits beyond `roundAt`
        digits.splice(Math.max(parsedNumber.integerLen, roundAt));
        // Set non-fractional digits beyond `roundAt` to 0
        for (var j = roundAt; j < digits.length; j++) {
            digits[j] = 0;
        }
    }
    else {
        // We rounded to zero so reset the parsedNumber
        fractionLen = Math.max(0, fractionLen);
        parsedNumber.integerLen = 1;
        digits.length = Math.max(1, roundAt = fractionSize + 1);
        digits[0] = 0;
        for (var i = 1; i < roundAt; i++)
            digits[i] = 0;
    }
    if (digit >= 5) {
        if (roundAt - 1 < 0) {
            for (var k = 0; k > roundAt; k--) {
                digits.unshift(0);
                parsedNumber.integerLen++;
            }
            digits.unshift(1);
            parsedNumber.integerLen++;
        }
        else {
            digits[roundAt - 1]++;
        }
    }
    // Pad out with zeros to get the required fraction length
    for (; fractionLen < Math.max(0, fractionSize); fractionLen++)
        digits.push(0);
    var dropTrailingZeros = fractionSize !== 0;
    // Minimal length = nb of decimals required + current nb of integers
    // Any number besides that is optional and can be removed if it's a trailing 0
    var minLen = minFrac + parsedNumber.integerLen;
    // Do any carrying, e.g. a digit was rounded up to 10
    var carry = digits.reduceRight(function (carry, d, i, digits) {
        d = d + carry;
        digits[i] = d < 10 ? d : d - 10; // d % 10
        if (dropTrailingZeros) {
            // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)
            if (digits[i] === 0 && i >= minLen) {
                digits.pop();
            }
            else {
                dropTrailingZeros = false;
            }
        }
        return d >= 10 ? 1 : 0; // Math.floor(d / 10);
    }, 0);
    if (carry) {
        digits.unshift(carry);
        parsedNumber.integerLen++;
    }
}
function parseIntAutoRadix(text) {
    var result = parseInt(text);
    if (isNaN(result)) {
        throw new Error('Invalid integer literal when parsing ' + text);
    }
    return result;
}

/**
 * @license
 * Copyright Google 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
 */
/**
 * @deprecated from v5
 */
var DEPRECATED_PLURAL_FN = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('UseV4Plurals');
/**
 * @publicApi
 */
var NgLocalization = /** @class */ (function () {
    function NgLocalization() {
    }
    return NgLocalization;
}());
/**
 * Returns the plural category for a given value.
 * - "=value" when the case exists,
 * - the plural category otherwise
 */
function getPluralCategory(value, cases, ngLocalization, locale) {
    var key = "=" + 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 \"" + value + "\"");
}
/**
 * Returns the plural case based on the locale
 *
 * @publicApi
 */
var NgLocaleLocalization = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(NgLocaleLocalization, _super);
    function NgLocaleLocalization(locale, 
    /** @deprecated from v5 */
    deprecatedPluralFn) {
        var _this = _super.call(this) || this;
        _this.locale = locale;
        _this.deprecatedPluralFn = deprecatedPluralFn;
        return _this;
    }
    NgLocaleLocalization.prototype.getPluralCategory = function (value, locale) {
        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';
        }
    };
    NgLocaleLocalization = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(DEPRECATED_PLURAL_FN)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String, Object])
    ], NgLocaleLocalization);
    return NgLocaleLocalization;
}(NgLocalization));
/**
 * Returns the plural case based on the locale
 *
 * @deprecated from v5 the plural case function is in locale data files common/locales/*.ts
 * @publicApi
 */
function getPluralCase(locale, nLike) {
    // TODO(vicb): lazy compute
    if (typeof nLike === 'string') {
        nLike = parseInt(nLike, 10);
    }
    var n = nLike;
    var nDecimal = n.toString().replace(/^[^.]*\.?/, '');
    var i = Math.floor(Math.abs(n));
    var v = nDecimal.length;
    var f = parseInt(nDecimal, 10);
    var t = parseInt(n.toString().replace(/^[^.]*\.?|0+$/g, ''), 10) || 0;
    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;
    }
}

/**
 * @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 parseCookieValue(cookieStr, name) {
    var e_1, _a;
    name = encodeURIComponent(name);
    try {
        for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__values"])(cookieStr.split(';')), _c = _b.next(); !_c.done; _c = _b.next()) {
            var cookie = _c.value;
            var eqIndex = cookie.indexOf('=');
            var _d = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)], 2), cookieName = _d[0], cookieValue = _d[1];
            if (cookieName.trim() === name) {
                return decodeURIComponent(cookieValue);
            }
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
        }
        finally { if (e_1) throw e_1.error; }
    }
    return 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
 */
/**
 * @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 = /** @class */ (function () {
    function NgClass(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {
        this._iterableDiffers = _iterableDiffers;
        this._keyValueDiffers = _keyValueDiffers;
        this._ngEl = _ngEl;
        this._renderer = _renderer;
        this._initialClasses = [];
    }
    Object.defineProperty(NgClass.prototype, "klass", {
        set: function (value) {
            this._removeClasses(this._initialClasses);
            this._initialClasses = typeof value === 'string' ? value.split(/\s+/) : [];
            this._applyClasses(this._initialClasses);
            this._applyClasses(this._rawClass);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgClass.prototype, "ngClass", {
        set: function (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();
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    NgClass.prototype.ngDoCheck = function () {
        if (this._iterableDiffer) {
            var iterableChanges = this._iterableDiffer.diff(this._rawClass);
            if (iterableChanges) {
                this._applyIterableChanges(iterableChanges);
            }
        }
        else if (this._keyValueDiffer) {
            var keyValueChanges = this._keyValueDiffer.diff(this._rawClass);
            if (keyValueChanges) {
                this._applyKeyValueChanges(keyValueChanges);
            }
        }
    };
    NgClass.prototype._applyKeyValueChanges = function (changes) {
        var _this = this;
        changes.forEachAddedItem(function (record) { return _this._toggleClass(record.key, record.currentValue); });
        changes.forEachChangedItem(function (record) { return _this._toggleClass(record.key, record.currentValue); });
        changes.forEachRemovedItem(function (record) {
            if (record.previousValue) {
                _this._toggleClass(record.key, false);
            }
        });
    };
    NgClass.prototype._applyIterableChanges = function (changes) {
        var _this = this;
        changes.forEachAddedItem(function (record) {
            if (typeof record.item === 'string') {
                _this._toggleClass(record.item, true);
            }
            else {
                throw new Error("NgClass can only toggle CSS classes expressed as strings, got " + Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(record.item));
            }
        });
        changes.forEachRemovedItem(function (record) { return _this._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).
     */
    NgClass.prototype._applyClasses = function (rawClassVal) {
        var _this = this;
        if (rawClassVal) {
            if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
                rawClassVal.forEach(function (klass) { return _this._toggleClass(klass, true); });
            }
            else {
                Object.keys(rawClassVal).forEach(function (klass) { return _this._toggleClass(klass, !!rawClassVal[klass]); });
            }
        }
    };
    /**
     * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup
     * purposes.
     */
    NgClass.prototype._removeClasses = function (rawClassVal) {
        var _this = this;
        if (rawClassVal) {
            if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
                rawClassVal.forEach(function (klass) { return _this._toggleClass(klass, false); });
            }
            else {
                Object.keys(rawClassVal).forEach(function (klass) { return _this._toggleClass(klass, false); });
            }
        }
    };
    NgClass.prototype._toggleClass = function (klass, enabled) {
        var _this = this;
        klass = klass.trim();
        if (klass) {
            klass.split(/\s+/g).forEach(function (klass) {
                if (enabled) {
                    _this._renderer.addClass(_this._ngEl.nativeElement, klass);
                }
                else {
                    _this._renderer.removeClass(_this._ngEl.nativeElement, klass);
                }
            });
        }
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])('class'),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", String),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String])
    ], NgClass.prototype, "klass", null);
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [Object])
    ], NgClass.prototype, "ngClass", null);
    NgClass = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngClass]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"],
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]])
    ], NgClass);
    return NgClass;
}());

/**
 * @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
 */
/**
 * 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'}

 * A more complete example with ngModuleFactory:
 *
 * {@example common/ngComponentOutlet/ts/module.ts region='NgModuleFactoryExample'}
 *
 * @publicApi
 * @ngModule CommonModule
 */
var NgComponentOutlet = /** @class */ (function () {
    function NgComponentOutlet(_viewContainerRef) {
        this._viewContainerRef = _viewContainerRef;
        this._componentRef = null;
        this._moduleRef = null;
    }
    NgComponentOutlet.prototype.ngOnChanges = function (changes) {
        this._viewContainerRef.clear();
        this._componentRef = null;
        if (this.ngComponentOutlet) {
            var elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;
            if (changes['ngComponentOutletNgModuleFactory']) {
                if (this._moduleRef)
                    this._moduleRef.destroy();
                if (this.ngComponentOutletNgModuleFactory) {
                    var parentModule = elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModuleRef"]);
                    this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector);
                }
                else {
                    this._moduleRef = null;
                }
            }
            var componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver :
                elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"]);
            var componentFactory = componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);
            this._componentRef = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, elInjector, this.ngComponentOutletContent);
        }
    };
    NgComponentOutlet.prototype.ngOnDestroy = function () {
        if (this._moduleRef)
            this._moduleRef.destroy();
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["Type"])
    ], NgComponentOutlet.prototype, "ngComponentOutlet", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"])
    ], NgComponentOutlet.prototype, "ngComponentOutletInjector", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Array)
    ], NgComponentOutlet.prototype, "ngComponentOutletContent", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModuleFactory"])
    ], NgComponentOutlet.prototype, "ngComponentOutletNgModuleFactory", void 0);
    NgComponentOutlet = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngComponentOutlet]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]])
    ], NgComponentOutlet);
    return NgComponentOutlet;
}());

/**
 * @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
 */
/**
 * @publicApi
 */
var NgForOfContext = /** @class */ (function () {
    function NgForOfContext($implicit, ngForOf, index, count) {
        this.$implicit = $implicit;
        this.ngForOf = ngForOf;
        this.index = index;
        this.count = count;
    }
    Object.defineProperty(NgForOfContext.prototype, "first", {
        get: function () { return this.index === 0; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgForOfContext.prototype, "last", {
        get: function () { return this.index === this.count - 1; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgForOfContext.prototype, "even", {
        get: function () { return this.index % 2 === 0; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgForOfContext.prototype, "odd", {
        get: function () { return !this.even; },
        enumerable: true,
        configurable: true
    });
    return NgForOfContext;
}());
/**
 * The `NgForOf` directive instantiates a template once per item from an iterable. The context
 * for each instantiated template inherits from the outer context with the given loop variable
 * set to the current item from the iterable.
 *
 * @usageNotes
 *
 * ### Local Variables
 *
 * `NgForOf` provides several exported values that 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.
 *
 * ```
 * <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>
 * ```
 *
 * ### 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.
 * * Otherwise, the DOM element for that item will remain the same.
 *
 * 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 (such as `<input>` elements which accept user input) that are present. Inserted rows can
 * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state
 * such as user input.
 *
 * It is possible for the identities of elements in the iterator to change while the data does not.
 * This can happen, for example, if the iterator 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, and Angular will tear down the entire DOM and rebuild it (as if all old
 * elements were deleted and all new elements inserted). This is an expensive operation and should
 * be avoided if possible.
 *
 * To customize the default tracking algorithm, `NgForOf` supports `trackBy` option.
 * `trackBy` takes a function which has two arguments: `index` and `item`.
 * If `trackBy` is given, Angular tracks changes by the return value of the function.
 *
 * ### Syntax
 *
 * - `<li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li>`
 *
 * With `<ng-template>` element:
 *
 * ```
 * <ng-template ngFor let-item [ngForOf]="items" let-i="index" [ngForTrackBy]="trackByFn">
 *   <li>...</li>
 * </ng-template>
 * ```
 *
 * ### Example
 *
 * See a [live demo](http://plnkr.co/edit/KVuXxDp0qinGDyo307QW?p=preview) for a more detailed
 * example.
 *
 * @ngModule CommonModule
 * @publicApi
 */
var NgForOf = /** @class */ (function () {
    function NgForOf(_viewContainer, _template, _differs) {
        this._viewContainer = _viewContainer;
        this._template = _template;
        this._differs = _differs;
        this._ngForOfDirty = true;
        this._differ = null;
    }
    Object.defineProperty(NgForOf.prototype, "ngForOf", {
        set: function (ngForOf) {
            this._ngForOf = ngForOf;
            this._ngForOfDirty = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgForOf.prototype, "ngForTrackBy", {
        get: function () { return this._trackByFn; },
        set: function (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 (console && console.warn) {
                    console.warn("trackBy must be a function, but received " + JSON.stringify(fn) + ". " +
                        "See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information.");
                }
            }
            this._trackByFn = fn;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgForOf.prototype, "ngForTemplate", {
        set: function (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;
            }
        },
        enumerable: true,
        configurable: true
    });
    NgForOf.prototype.ngDoCheck = function () {
        if (this._ngForOfDirty) {
            this._ngForOfDirty = false;
            // React on ngForOf changes only once all inputs have been initialized
            var value = this._ngForOf;
            if (!this._differ && value) {
                try {
                    this._differ = this._differs.find(value).create(this.ngForTrackBy);
                }
                catch (e) {
                    throw new Error("Cannot find a differ supporting object '" + value + "' of type '" + getTypeNameForDebugging(value) + "'. NgFor only supports binding to Iterables such as Arrays.");
                }
            }
        }
        if (this._differ) {
            var changes = this._differ.diff(this._ngForOf);
            if (changes)
                this._applyChanges(changes);
        }
    };
    NgForOf.prototype._applyChanges = function (changes) {
        var _this = this;
        var insertTuples = [];
        changes.forEachOperation(function (item, adjustedPreviousIndex, currentIndex) {
            if (item.previousIndex == null) {
                var view = _this._viewContainer.createEmbeddedView(_this._template, new NgForOfContext(null, _this._ngForOf, -1, -1), currentIndex);
                var tuple = new RecordViewTuple(item, view);
                insertTuples.push(tuple);
            }
            else if (currentIndex == null) {
                _this._viewContainer.remove(adjustedPreviousIndex);
            }
            else {
                var view = _this._viewContainer.get(adjustedPreviousIndex);
                _this._viewContainer.move(view, currentIndex);
                var tuple = new RecordViewTuple(item, view);
                insertTuples.push(tuple);
            }
        });
        for (var i = 0; i < insertTuples.length; i++) {
            this._perViewChange(insertTuples[i].view, insertTuples[i].record);
        }
        for (var i = 0, ilen = this._viewContainer.length; i < ilen; i++) {
            var viewRef = this._viewContainer.get(i);
            viewRef.context.index = i;
            viewRef.context.count = ilen;
            viewRef.context.ngForOf = this._ngForOf;
        }
        changes.forEachIdentityChange(function (record) {
            var viewRef = _this._viewContainer.get(record.currentIndex);
            viewRef.context.$implicit = record.item;
        });
    };
    NgForOf.prototype._perViewChange = function (view, record) {
        view.context.$implicit = record.item;
    };
    /**
     * Assert 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.
     */
    NgForOf.ngTemplateContextGuard = function (dir, ctx) {
        return true;
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [Object])
    ], NgForOf.prototype, "ngForOf", null);
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Function),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [Function])
    ], NgForOf.prototype, "ngForTrackBy", null);
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]])
    ], NgForOf.prototype, "ngForTemplate", null);
    NgForOf = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngFor][ngForOf]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"],
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"]])
    ], NgForOf);
    return NgForOf;
}());
var RecordViewTuple = /** @class */ (function () {
    function RecordViewTuple(record, view) {
        this.record = record;
        this.view = view;
    }
    return RecordViewTuple;
}());
function getTypeNameForDebugging(type) {
    return type['name'] || typeof 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
 */
/**
 * Conditionally includes a template based on the value of an `expression`.
 *
 * `ngIf` evaluates the `expression` and then renders the `then` or `else` template in its place
 * when expression is truthy or falsy respectively. Typically the:
 *  - `then` template is the inline template of `ngIf` unless bound to a different value.
 *  - `else` template is blank unless it is bound.
 *
 *
 * @usageNotes
 *
 * ### Most common usage
 *
 * The most common usage of the `ngIf` directive is to conditionally show the inline template as
 * seen in this example:
 * {@example common/ngIf/ts/module.ts region='NgIfSimple'}
 *
 * ### Showing an alternative template using `else`
 *
 * If it is necessary to display a template when the `expression` is falsy use the `else` template
 * binding as shown. Note that the `else` binding points to a `<ng-template>` 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 non-inlined `then` template
 *
 * Usually the `then` template is the inlined template of the `ngIf`, but it can be changed using
 * a binding (just like `else`). Because `then` and `else` are bindings, the template references can
 * change at runtime as shown in this example.
 *
 * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}
 *
 * ### Storing conditional result in a variable
 *
 * A common pattern is that we need to show a set of properties from the same object. If the
 * object is undefined, then we have to use the safe-traversal-operator `?.` to guard against
 * dereferencing a `null` value. This is especially the case when waiting on async data such as
 * when using the `async` pipe as shown in following example:
 *
 * ```
 * Hello {{ (userStream|async)?.last }}, {{ (userStream|async)?.first }}!
 * ```
 *
 * There are several inefficiencies in the above example:
 *  - We create multiple subscriptions on `userStream`. One for each `async` pipe, or two in the
 *    example above.
 *  - We cannot display an alternative screen while waiting for the data to arrive asynchronously.
 *  - We have to use the safe-traversal-operator `?.` to access properties, which is cumbersome.
 *  - We have to place the `async` pipe in parenthesis.
 *
 * A better way to do this is to use `ngIf` and store the result of the condition in a local
 * variable as shown in the the example below:
 *
 * {@example common/ngIf/ts/module.ts region='NgIfAs'}
 *
 * Notice that:
 *  - We use only one `async` pipe and hence only one subscription gets created.
 *  - `ngIf` stores the result of the `userStream|async` in the local variable `user`.
 *  - The local `user` can then be bound repeatedly in a more efficient way.
 *  - No need to use the safe-traversal-operator `?.` to access properties as `ngIf` will only
 *    display the data if `userStream` returns a value.
 *  - We can display an alternative template while waiting for the data.
 *
 * ### Syntax
 *
 * Simple form:
 * - `<div *ngIf="condition">...</div>`
 * - `<ng-template [ngIf]="condition"><div>...</div></ng-template>`
 *
 * Form with an else block:
 * ```
 * <div *ngIf="condition; else elseBlock">...</div>
 * <ng-template #elseBlock>...</ng-template>
 * ```
 *
 * Form with a `then` and `else` block:
 * ```
 * <div *ngIf="condition; then thenBlock else elseBlock"></div>
 * <ng-template #thenBlock>...</ng-template>
 * <ng-template #elseBlock>...</ng-template>
 * ```
 *
 * Form with storing the value locally:
 * ```
 * <div *ngIf="condition as value; else elseBlock">{{value}}</div>
 * <ng-template #elseBlock>...</ng-template>
 * ```
 *
 * @ngModule CommonModule
 * @publicApi
 */
var NgIf = /** @class */ (function () {
    function NgIf(_viewContainer, templateRef) {
        this._viewContainer = _viewContainer;
        this._context = new NgIfContext();
        this._thenTemplateRef = null;
        this._elseTemplateRef = null;
        this._thenViewRef = null;
        this._elseViewRef = null;
        this._thenTemplateRef = templateRef;
    }
    Object.defineProperty(NgIf.prototype, "ngIf", {
        set: function (condition) {
            this._context.$implicit = this._context.ngIf = condition;
            this._updateView();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgIf.prototype, "ngIfThen", {
        set: function (templateRef) {
            assertTemplate('ngIfThen', templateRef);
            this._thenTemplateRef = templateRef;
            this._thenViewRef = null; // clear previous view if any.
            this._updateView();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgIf.prototype, "ngIfElse", {
        set: function (templateRef) {
            assertTemplate('ngIfElse', templateRef);
            this._elseTemplateRef = templateRef;
            this._elseViewRef = null; // clear previous view if any.
            this._updateView();
        },
        enumerable: true,
        configurable: true
    });
    NgIf.prototype._updateView = function () {
        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);
                }
            }
        }
    };
    /**
     * Assert the correct type of the expression bound to the `ngIf` input within the template.
     *
     * The presence of this method is a signal to the Ivy template type check compiler that when the
     * `NgIf` structural directive renders its template, the type of the expression bound to `ngIf`
     * should be narrowed in some way. For `NgIf`, it is narrowed to be non-null, which allows the
     * strictNullChecks feature of TypeScript to work with `NgIf`.
     */
    NgIf.ngTemplateGuard_ngIf = function (dir, expr) { return true; };
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [Object])
    ], NgIf.prototype, "ngIf", null);
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [Object])
    ], NgIf.prototype, "ngIfThen", null);
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [Object])
    ], NgIf.prototype, "ngIfElse", null);
    NgIf = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngIf]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]])
    ], NgIf);
    return NgIf;
}());
/**
 * @publicApi
 */
var NgIfContext = /** @class */ (function () {
    function NgIfContext() {
        this.$implicit = null;
        this.ngIf = null;
    }
    return NgIfContext;
}());
function assertTemplate(property, templateRef) {
    var isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);
    if (!isTemplateRefOrNull) {
        throw new Error(property + " must be a TemplateRef, but received '" + Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(templateRef) + "'.");
    }
}

/**
 * @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 SwitchView = /** @class */ (function () {
    function SwitchView(_viewContainerRef, _templateRef) {
        this._viewContainerRef = _viewContainerRef;
        this._templateRef = _templateRef;
        this._created = false;
    }
    SwitchView.prototype.create = function () {
        this._created = true;
        this._viewContainerRef.createEmbeddedView(this._templateRef);
    };
    SwitchView.prototype.destroy = function () {
        this._created = false;
        this._viewContainerRef.clear();
    };
    SwitchView.prototype.enforceState = function (created) {
        if (created && !this._created) {
            this.create();
        }
        else if (!created && this._created) {
            this.destroy();
        }
    };
    return SwitchView;
}());
/**
 * @ngModule CommonModule
 *
 * @usageNotes
 * ```
 *     <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>
 * ```
 * @description
 *
 * Adds / removes DOM sub-trees when the nest match expressions matches the switch expression.
 *
 * `NgSwitch` stamps out nested views when their match expression value matches the value of the
 * switch expression.
 *
 * In other words:
 * - you define a container element (where you place the directive with a switch expression on the
 * `[ngSwitch]="..."` attribute)
 * - you define inner views inside the `NgSwitch` and place a `*ngSwitchCase` attribute on the view
 * root elements.
 *
 * Elements within `NgSwitch` but outside of a `NgSwitchCase` or `NgSwitchDefault` directives will
 * be preserved at the location.
 *
 * The `ngSwitchCase` directive informs the parent `NgSwitch` of which view to display when the
 * expression is evaluated.
 * When no matching expression is found on a `ngSwitchCase` view, the `ngSwitchDefault` view is
 * stamped out.
 *
 * @publicApi
 */
var NgSwitch = /** @class */ (function () {
    function NgSwitch() {
        this._defaultUsed = false;
        this._caseCount = 0;
        this._lastCaseCheckIndex = 0;
        this._lastCasesMatched = false;
    }
    Object.defineProperty(NgSwitch.prototype, "ngSwitch", {
        set: function (newValue) {
            this._ngSwitch = newValue;
            if (this._caseCount === 0) {
                this._updateDefaultCases(true);
            }
        },
        enumerable: true,
        configurable: true
    });
    /** @internal */
    NgSwitch.prototype._addCase = function () { return this._caseCount++; };
    /** @internal */
    NgSwitch.prototype._addDefault = function (view) {
        if (!this._defaultViews) {
            this._defaultViews = [];
        }
        this._defaultViews.push(view);
    };
    /** @internal */
    NgSwitch.prototype._matchCase = function (value) {
        var matched = value == this._ngSwitch;
        this._lastCasesMatched = this._lastCasesMatched || matched;
        this._lastCaseCheckIndex++;
        if (this._lastCaseCheckIndex === this._caseCount) {
            this._updateDefaultCases(!this._lastCasesMatched);
            this._lastCaseCheckIndex = 0;
            this._lastCasesMatched = false;
        }
        return matched;
    };
    NgSwitch.prototype._updateDefaultCases = function (useDefault) {
        if (this._defaultViews && useDefault !== this._defaultUsed) {
            this._defaultUsed = useDefault;
            for (var i = 0; i < this._defaultViews.length; i++) {
                var defaultView = this._defaultViews[i];
                defaultView.enforceState(useDefault);
            }
        }
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [Object])
    ], NgSwitch.prototype, "ngSwitch", null);
    NgSwitch = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngSwitch]' })
    ], NgSwitch);
    return NgSwitch;
}());
/**
 * @ngModule CommonModule
 *
 * @usageNotes
 * ```
 * <container-element [ngSwitch]="switch_expression">
 *   <some-element *ngSwitchCase="match_expression_1">...</some-element>
 * </container-element>
 *```
 * @description
 *
 * Creates a view that will be added/removed from the parent {@link NgSwitch} when the
 * given expression evaluate to respectively the same/different value as the switch
 * expression.
 *
 * Insert the sub-tree when the expression evaluates to the same value as the enclosing switch
 * expression.
 *
 * If multiple match expressions match the switch expression value, all of them are displayed.
 *
 * See {@link NgSwitch} for more details and example.
 *
 * @publicApi
 */
var NgSwitchCase = /** @class */ (function () {
    function NgSwitchCase(viewContainer, templateRef, ngSwitch) {
        this.ngSwitch = ngSwitch;
        ngSwitch._addCase();
        this._view = new SwitchView(viewContainer, templateRef);
    }
    NgSwitchCase.prototype.ngDoCheck = function () { this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase)); };
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Object)
    ], NgSwitchCase.prototype, "ngSwitchCase", void 0);
    NgSwitchCase = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngSwitchCase]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(2, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"])()),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"],
            NgSwitch])
    ], NgSwitchCase);
    return NgSwitchCase;
}());
/**
 * @ngModule CommonModule
 * @usageNotes
 * ```
 * <container-element [ngSwitch]="switch_expression">
 *   <some-element *ngSwitchCase="match_expression_1">...</some-element>
 *   <some-other-element *ngSwitchDefault>...</some-other-element>
 * </container-element>
 * ```
 *
 * @description
 *
 * Creates a view that is added to the parent {@link NgSwitch} when no case expressions
 * match the switch expression.
 *
 * Insert the sub-tree when no case expressions evaluate to the same value as the enclosing switch
 * expression.
 *
 * See {@link NgSwitch} for more details and example.
 *
 * @publicApi
 */
var NgSwitchDefault = /** @class */ (function () {
    function NgSwitchDefault(viewContainer, templateRef, ngSwitch) {
        ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
    }
    NgSwitchDefault = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngSwitchDefault]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(2, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"])()),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"],
            NgSwitch])
    ], NgSwitchDefault);
    return NgSwitchDefault;
}());

/**
 * @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
 */
/**
 * @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 = /** @class */ (function () {
    function NgPlural(_localization) {
        this._localization = _localization;
        this._caseViews = {};
    }
    Object.defineProperty(NgPlural.prototype, "ngPlural", {
        set: function (value) {
            this._switchValue = value;
            this._updateView();
        },
        enumerable: true,
        configurable: true
    });
    NgPlural.prototype.addCase = function (value, switchView) { this._caseViews[value] = switchView; };
    NgPlural.prototype._updateView = function () {
        this._clearViews();
        var cases = Object.keys(this._caseViews);
        var key = getPluralCategory(this._switchValue, cases, this._localization);
        this._activateView(this._caseViews[key]);
    };
    NgPlural.prototype._clearViews = function () {
        if (this._activeView)
            this._activeView.destroy();
    };
    NgPlural.prototype._activateView = function (view) {
        if (view) {
            this._activeView = view;
            this._activeView.create();
        }
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Number),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [Number])
    ], NgPlural.prototype, "ngPlural", null);
    NgPlural = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngPlural]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [NgLocalization])
    ], NgPlural);
    return NgPlural;
}());
/**
 * @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 = /** @class */ (function () {
    function NgPluralCase(value, template, viewContainer, ngPlural) {
        this.value = value;
        var isANumber = !isNaN(Number(value));
        ngPlural.addCase(isANumber ? "=" + value : value, new SwitchView(viewContainer, template));
    }
    NgPluralCase = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngPluralCase]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"])('ngPluralCase')),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(3, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"])()),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"],
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], NgPlural])
    ], NgPluralCase);
    return NgPluralCase;
}());

/**
 * @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
 */
/**
 * @ngModule CommonModule
 *
 * @usageNotes
 * ```
 * <some-element [ngStyle]="{'font-style': styleExp}">...</some-element>
 *
 * <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
 *
 * <some-element [ngStyle]="objExp">...</some-element>
 * ```
 *
 * @description
 *
 * Update an HTML element styles.
 *
 * The styles are updated according to the value of the expression evaluation:
 * - keys are style names with an optional `.<unit>` suffix (ie 'top.px', 'font-style.em'),
 * - values are the values assigned to those properties (expressed in the given unit).
 *
 * @publicApi
 */
var NgStyle = /** @class */ (function () {
    function NgStyle(_differs, _ngEl, _renderer) {
        this._differs = _differs;
        this._ngEl = _ngEl;
        this._renderer = _renderer;
    }
    Object.defineProperty(NgStyle.prototype, "ngStyle", {
        set: function (values) {
            this._ngStyle = values;
            if (!this._differ && values) {
                this._differ = this._differs.find(values).create();
            }
        },
        enumerable: true,
        configurable: true
    });
    NgStyle.prototype.ngDoCheck = function () {
        if (this._differ) {
            var changes = this._differ.diff(this._ngStyle);
            if (changes) {
                this._applyChanges(changes);
            }
        }
    };
    NgStyle.prototype._applyChanges = function (changes) {
        var _this = this;
        changes.forEachRemovedItem(function (record) { return _this._setStyle(record.key, null); });
        changes.forEachAddedItem(function (record) { return _this._setStyle(record.key, record.currentValue); });
        changes.forEachChangedItem(function (record) { return _this._setStyle(record.key, record.currentValue); });
    };
    NgStyle.prototype._setStyle = function (nameAndUnit, value) {
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(nameAndUnit.split('.'), 2), name = _a[0], unit = _a[1];
        value = value != null && unit ? "" + value + unit : value;
        if (value != null) {
            this._renderer.setStyle(this._ngEl.nativeElement, name, value);
        }
        else {
            this._renderer.removeStyle(this._ngEl.nativeElement, name);
        }
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [Object])
    ], NgStyle.prototype, "ngStyle", null);
    NgStyle = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngStyle]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]])
    ], NgStyle);
    return NgStyle;
}());

/**
 * @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
 */
/**
 * @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 = /** @class */ (function () {
    function NgTemplateOutlet(_viewContainerRef) {
        this._viewContainerRef = _viewContainerRef;
    }
    NgTemplateOutlet.prototype.ngOnChanges = function (changes) {
        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).
     */
    NgTemplateOutlet.prototype._shouldRecreateView = function (changes) {
        var ctxChange = changes['ngTemplateOutletContext'];
        return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));
    };
    NgTemplateOutlet.prototype._hasContextShapeChanged = function (ctxChange) {
        var e_1, _a;
        var prevCtxKeys = Object.keys(ctxChange.previousValue || {});
        var currCtxKeys = Object.keys(ctxChange.currentValue || {});
        if (prevCtxKeys.length === currCtxKeys.length) {
            try {
                for (var currCtxKeys_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__values"])(currCtxKeys), currCtxKeys_1_1 = currCtxKeys_1.next(); !currCtxKeys_1_1.done; currCtxKeys_1_1 = currCtxKeys_1.next()) {
                    var propName = currCtxKeys_1_1.value;
                    if (prevCtxKeys.indexOf(propName) === -1) {
                        return true;
                    }
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (currCtxKeys_1_1 && !currCtxKeys_1_1.done && (_a = currCtxKeys_1.return)) _a.call(currCtxKeys_1);
                }
                finally { if (e_1) throw e_1.error; }
            }
            return false;
        }
        else {
            return true;
        }
    };
    NgTemplateOutlet.prototype._updateExistingContext = function (ctx) {
        var e_2, _a;
        try {
            for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__values"])(Object.keys(ctx)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var propName = _c.value;
                this._viewRef.context[propName] = this.ngTemplateOutletContext[propName];
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            }
            finally { if (e_2) throw e_2.error; }
        }
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", Object)
    ], NgTemplateOutlet.prototype, "ngTemplateOutletContext", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"])
    ], NgTemplateOutlet.prototype, "ngTemplateOutlet", void 0);
    NgTemplateOutlet = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"])({ selector: '[ngTemplateOutlet]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]])
    ], NgTemplateOutlet);
    return NgTemplateOutlet;
}());

/**
 * @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 collection of Angular directives that are likely to be used in each and every Angular
 * application.
 */
var COMMON_DIRECTIVES = [
    NgClass,
    NgComponentOutlet,
    NgForOf,
    NgIf,
    NgTemplateOutlet,
    NgStyle,
    NgSwitch,
    NgSwitchCase,
    NgSwitchDefault,
    NgPlural,
    NgPluralCase,
];

/**
 * @license
 * Copyright Google 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 invalidPipeArgumentError(type, value) {
    return Error("InvalidPipeArgument: '" + value + "' for pipe '" + Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(type) + "'");
}

var NumberFormatter = /** @class */ (function () {
    function NumberFormatter() {
    }
    NumberFormatter.format = function (num, locale, style, opts) {
        if (opts === void 0) { opts = {}; }
        var minimumIntegerDigits = opts.minimumIntegerDigits, minimumFractionDigits = opts.minimumFractionDigits, maximumFractionDigits = opts.maximumFractionDigits, currency = opts.currency, _a = opts.currencyAsSymbol, currencyAsSymbol = _a === void 0 ? false : _a;
        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;
}());
var DATE_FORMATS_SPLIT$1 = /((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/;
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)]))
};
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({}),
    // first Thursday of the year. not support ?
    'w': datePartGetterFactory({}),
    // 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))
};
function digitModifier(inner) {
    return function (date, locale) {
        var result = inner(date, locale);
        return result.length == 1 ? '0' + result : result;
    };
}
function hourClockExtractor(inner) {
    return function (date, locale) { return inner(date, locale).split(' ')[1]; };
}
function hourExtractor(inner) {
    return function (date, locale) { return inner(date, locale).split(' ')[0]; };
}
function intlDateFormat(date, locale, options) {
    return new Intl.DateTimeFormat(locale, options).format(date).replace(/[\u200e\u200f]/g, '');
}
function timeZoneGetter$1(timezone) {
    // To workaround `Intl` API restriction for single timezone let format with 24 hours
    var options = { hour: '2-digit', hour12: false, timeZoneName: timezone };
    return function (date, locale) {
        var result = intlDateFormat(date, locale, options);
        // Then extract first 3 letters that related to hours
        return result ? result.substring(3) : '';
    };
}
function hour12Modify(options, value) {
    options.hour12 = value;
    return options;
}
function digitCondition(prop, len) {
    var result = {};
    result[prop] = len === 2 ? '2-digit' : 'numeric';
    return result;
}
function nameCondition(prop, len) {
    var result = {};
    if (len < 4) {
        result[prop] = len > 1 ? 'short' : 'narrow';
    }
    else {
        result[prop] = 'long';
    }
    return result;
}
function combine(options) {
    return options.reduce(function (merged, opt) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__assign"])({}, merged, opt)); }, {});
}
function datePartGetterFactory(ret) {
    return function (date, locale) { return intlDateFormat(date, locale, ret); };
}
var DATE_FORMATTER_CACHE = new Map();
function dateFormatter(format, date, locale) {
    var fn = PATTERN_ALIASES[format];
    if (fn)
        return fn(date, locale);
    var cacheKey = format;
    var parts = DATE_FORMATTER_CACHE.get(cacheKey);
    if (!parts) {
        parts = [];
        var match = void 0;
        DATE_FORMATS_SPLIT$1.exec(format);
        var _format = format;
        while (_format) {
            match = DATE_FORMATS_SPLIT$1.exec(_format);
            if (match) {
                parts = parts.concat(match.slice(1));
                _format = parts.pop();
            }
            else {
                parts.push(_format);
                _format = null;
            }
        }
        DATE_FORMATTER_CACHE.set(cacheKey, parts);
    }
    return parts.reduce(function (text, part) {
        var fn = DATE_FORMATS$1[part];
        return text + (fn ? fn(date, locale) : partToTime(part));
    }, '');
}
function partToTime(part) {
    return part === '\'\'' ? '\'' : part.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
}
var DateFormatter = /** @class */ (function () {
    function DateFormatter() {
    }
    DateFormatter.format = function (date, locale, pattern) {
        return dateFormatter(pattern, date, locale);
    };
    return DateFormatter;
}());

/**
* @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
  */
/**
 * @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 = /** @class */ (function () {
    function DeprecatedDatePipe(_locale) {
        this._locale = _locale;
    }
    DeprecatedDatePipe_1 = DeprecatedDatePipe;
    DeprecatedDatePipe.prototype.transform = function (value, pattern) {
        if (pattern === void 0) { pattern = 'mediumDate'; }
        if (value == null || value === '' || value !== value)
            return null;
        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 _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(value.split('-').map(function (val) { return parseInt(val, 10); }), 3), y = _a[0], m = _a[1], d = _a[2];
            date = new Date(y, m - 1, d);
        }
        else {
            date = new Date(value);
        }
        if (!isDate$1(date)) {
            var match = void 0;
            if ((typeof value === 'string') && (match = value.match(ISO8601_DATE_REGEX))) {
                date = isoStringToDate(match);
            }
            else {
                throw invalidPipeArgumentError(DeprecatedDatePipe_1, value);
            }
        }
        return DateFormatter.format(date, this._locale, DeprecatedDatePipe_1._ALIASES[pattern] || pattern);
    };
    var DeprecatedDatePipe_1;
    /** @internal */
    DeprecatedDatePipe._ALIASES = {
        'medium': 'yMMMdjms',
        'short': 'yMdjm',
        'fullDate': 'yMMMMEEEEd',
        'longDate': 'yMMMMd',
        'mediumDate': 'yMMMd',
        'shortDate': 'yMd',
        'mediumTime': 'jms',
        'shortTime': 'jm'
    };
    DeprecatedDatePipe = DeprecatedDatePipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'date', pure: true }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String])
    ], DeprecatedDatePipe);
    return DeprecatedDatePipe;
}());
function isDate$1(value) {
    return value instanceof Date && !isNaN(value.valueOf());
}

/**
 * @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 formatNumber$1(pipe, locale, value, style, digits, currency, currencyAsSymbol) {
    if (currency === void 0) { currency = null; }
    if (currencyAsSymbol === void 0) { currencyAsSymbol = 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);
    }
    var minInt;
    var minFraction;
    var maxFraction;
    if (style !== NumberFormatStyle.Currency) {
        // rely on Intl default for currency
        minInt = 1;
        minFraction = 0;
        maxFraction = 3;
    }
    if (digits) {
        var parts = digits.match(NUMBER_FORMAT_REGEXP);
        if (parts === null) {
            throw new Error(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(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 = /** @class */ (function () {
    function DeprecatedDecimalPipe(_locale) {
        this._locale = _locale;
    }
    DeprecatedDecimalPipe_1 = DeprecatedDecimalPipe;
    DeprecatedDecimalPipe.prototype.transform = function (value, digits) {
        return formatNumber$1(DeprecatedDecimalPipe_1, this._locale, value, NumberFormatStyle.Decimal, digits);
    };
    var DeprecatedDecimalPipe_1;
    DeprecatedDecimalPipe = DeprecatedDecimalPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'number' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String])
    ], DeprecatedDecimalPipe);
    return DeprecatedDecimalPipe;
}());
/**
 * @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 = /** @class */ (function () {
    function DeprecatedPercentPipe(_locale) {
        this._locale = _locale;
    }
    DeprecatedPercentPipe_1 = DeprecatedPercentPipe;
    DeprecatedPercentPipe.prototype.transform = function (value, digits) {
        return formatNumber$1(DeprecatedPercentPipe_1, this._locale, value, NumberFormatStyle.Percent, digits);
    };
    var DeprecatedPercentPipe_1;
    DeprecatedPercentPipe = DeprecatedPercentPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'percent' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String])
    ], DeprecatedPercentPipe);
    return DeprecatedPercentPipe;
}());
/**
 * @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 = /** @class */ (function () {
    function DeprecatedCurrencyPipe(_locale) {
        this._locale = _locale;
    }
    DeprecatedCurrencyPipe_1 = DeprecatedCurrencyPipe;
    DeprecatedCurrencyPipe.prototype.transform = function (value, currencyCode, symbolDisplay, digits) {
        if (currencyCode === void 0) { currencyCode = 'USD'; }
        if (symbolDisplay === void 0) { symbolDisplay = false; }
        return formatNumber$1(DeprecatedCurrencyPipe_1, this._locale, value, NumberFormatStyle.Currency, digits, currencyCode, symbolDisplay);
    };
    var DeprecatedCurrencyPipe_1;
    DeprecatedCurrencyPipe = DeprecatedCurrencyPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'currency' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String])
    ], DeprecatedCurrencyPipe);
    return DeprecatedCurrencyPipe;
}());

/**
 * @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 collection of deprecated i18n pipes that require intl api
 *
 * @deprecated from v5
 */
var COMMON_DEPRECATED_I18N_PIPES = [DeprecatedDecimalPipe, DeprecatedPercentPipe, DeprecatedCurrencyPipe, DeprecatedDatePipe];

/**
 * @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 ObservableStrategy = /** @class */ (function () {
    function ObservableStrategy() {
    }
    ObservableStrategy.prototype.createSubscription = function (async, updateLatestValue) {
        return async.subscribe({ next: updateLatestValue, error: function (e) { throw e; } });
    };
    ObservableStrategy.prototype.dispose = function (subscription) { subscription.unsubscribe(); };
    ObservableStrategy.prototype.onDestroy = function (subscription) { subscription.unsubscribe(); };
    return ObservableStrategy;
}());
var PromiseStrategy = /** @class */ (function () {
    function PromiseStrategy() {
    }
    PromiseStrategy.prototype.createSubscription = function (async, updateLatestValue) {
        return async.then(updateLatestValue, function (e) { throw e; });
    };
    PromiseStrategy.prototype.dispose = function (subscription) { };
    PromiseStrategy.prototype.onDestroy = function (subscription) { };
    return PromiseStrategy;
}());
var _promiseStrategy = new PromiseStrategy();
var _observableStrategy = new ObservableStrategy();
/**
 * @ngModule CommonModule
 * @description
 *
 * Unwraps a value from an asynchronous primitive.
 *
 * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has
 * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for
 * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid
 * potential memory leaks.
 *
 * @usageNotes
 *
 * ### Examples
 *
 * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the
 * promise.
 *
 * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}
 *
 * It's also possible to use `async` with Observables. The example below binds the `time` Observable
 * to the view. The Observable continuously updates the view with the current time.
 *
 * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}
 *
 * @publicApi
 */
var AsyncPipe = /** @class */ (function () {
    function AsyncPipe(_ref) {
        this._ref = _ref;
        this._latestValue = null;
        this._latestReturnedValue = null;
        this._subscription = null;
        this._obj = null;
        this._strategy = null;
    }
    AsyncPipe_1 = AsyncPipe;
    AsyncPipe.prototype.ngOnDestroy = function () {
        if (this._subscription) {
            this._dispose();
        }
    };
    AsyncPipe.prototype.transform = function (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(obj);
        }
        if (this._latestValue === this._latestReturnedValue) {
            return this._latestReturnedValue;
        }
        this._latestReturnedValue = this._latestValue;
        return _angular_core__WEBPACK_IMPORTED_MODULE_0__["WrappedValue"].wrap(this._latestValue);
    };
    AsyncPipe.prototype._subscribe = function (obj) {
        var _this = this;
        this._obj = obj;
        this._strategy = this._selectStrategy(obj);
        this._subscription = this._strategy.createSubscription(obj, function (value) { return _this._updateLatestValue(obj, value); });
    };
    AsyncPipe.prototype._selectStrategy = function (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_1, obj);
    };
    AsyncPipe.prototype._dispose = function () {
        this._strategy.dispose(this._subscription);
        this._latestValue = null;
        this._latestReturnedValue = null;
        this._subscription = null;
        this._obj = null;
    };
    AsyncPipe.prototype._updateLatestValue = function (async, value) {
        if (async === this._obj) {
            this._latestValue = value;
            this._ref.markForCheck();
        }
    };
    var AsyncPipe_1;
    AsyncPipe = AsyncPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'async', pure: false }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]])
    ], AsyncPipe);
    return AsyncPipe;
}());

/**
 * @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
 */
/**
 * 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 = /** @class */ (function () {
    function LowerCasePipe() {
    }
    LowerCasePipe_1 = LowerCasePipe;
    /**
     * @param value The string to transform to lower case.
     */
    LowerCasePipe.prototype.transform = function (value) {
        if (!value)
            return value;
        if (typeof value !== 'string') {
            throw invalidPipeArgumentError(LowerCasePipe_1, value);
        }
        return value.toLowerCase();
    };
    var LowerCasePipe_1;
    LowerCasePipe = LowerCasePipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'lowercase' })
    ], LowerCasePipe);
    return LowerCasePipe;
}());
//
// 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
//
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 = /** @class */ (function () {
    function TitleCasePipe() {
    }
    TitleCasePipe_1 = TitleCasePipe;
    /**
     * @param value The string to transform to title case.
     */
    TitleCasePipe.prototype.transform = function (value) {
        if (!value)
            return value;
        if (typeof value !== 'string') {
            throw invalidPipeArgumentError(TitleCasePipe_1, value);
        }
        return value.replace(unicodeWordMatch, (function (txt) { return txt[0].toUpperCase() + txt.substr(1).toLowerCase(); }));
    };
    var TitleCasePipe_1;
    TitleCasePipe = TitleCasePipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'titlecase' })
    ], TitleCasePipe);
    return TitleCasePipe;
}());
/**
 * Transforms text to all upper case.
 * @see `LowerCasePipe`
 * @see `TitleCasePipe`
 *
 * @ngModule CommonModule
 * @publicApi
 */
var UpperCasePipe = /** @class */ (function () {
    function UpperCasePipe() {
    }
    UpperCasePipe_1 = UpperCasePipe;
    /**
     * @param value The string to transform to upper case.
     */
    UpperCasePipe.prototype.transform = function (value) {
        if (!value)
            return value;
        if (typeof value !== 'string') {
            throw invalidPipeArgumentError(UpperCasePipe_1, value);
        }
        return value.toUpperCase();
    };
    var UpperCasePipe_1;
    UpperCasePipe = UpperCasePipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'uppercase' })
    ], UpperCasePipe);
    return UpperCasePipe;
}());

/**
 * @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
 */
// 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:'mmss' }}        // 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 = /** @class */ (function () {
    function DatePipe(locale) {
        this.locale = locale;
    }
    DatePipe_1 = DatePipe;
    /**
     * @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. Default is
     * the local system timezone of the end-user's machine.
     * @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).
     * @returns A date string in the desired format.
     */
    DatePipe.prototype.transform = function (value, format, timezone, locale) {
        if (format === void 0) { format = 'mediumDate'; }
        if (value == null || value === '' || value !== value)
            return null;
        try {
            return formatDate(value, format, locale || this.locale, timezone);
        }
        catch (error) {
            throw invalidPipeArgumentError(DatePipe_1, error.message);
        }
    };
    var DatePipe_1;
    DatePipe = DatePipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'date', pure: true }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String])
    ], DatePipe);
    return DatePipe;
}());

/**
 * @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 _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 = /** @class */ (function () {
    function I18nPluralPipe(_localization) {
        this._localization = _localization;
    }
    I18nPluralPipe_1 = I18nPluralPipe;
    /**
     * @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).
     */
    I18nPluralPipe.prototype.transform = function (value, pluralMap, locale) {
        if (value == null)
            return '';
        if (typeof pluralMap !== 'object' || pluralMap === null) {
            throw invalidPipeArgumentError(I18nPluralPipe_1, pluralMap);
        }
        var key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
        return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
    };
    var I18nPluralPipe_1;
    I18nPluralPipe = I18nPluralPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'i18nPlural', pure: true }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [NgLocalization])
    ], I18nPluralPipe);
    return I18nPluralPipe;
}());

/**
 * @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
 */
/**
 * @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 = /** @class */ (function () {
    function I18nSelectPipe() {
    }
    I18nSelectPipe_1 = I18nSelectPipe;
    /**
     * @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`.
     */
    I18nSelectPipe.prototype.transform = function (value, mapping) {
        if (value == null)
            return '';
        if (typeof mapping !== 'object' || typeof value !== 'string') {
            throw invalidPipeArgumentError(I18nSelectPipe_1, mapping);
        }
        if (mapping.hasOwnProperty(value)) {
            return mapping[value];
        }
        if (mapping.hasOwnProperty('other')) {
            return mapping['other'];
        }
        return '';
    };
    var I18nSelectPipe_1;
    I18nSelectPipe = I18nSelectPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'i18nSelect', pure: true })
    ], I18nSelectPipe);
    return I18nSelectPipe;
}());

/**
 * @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
 */
/**
 * @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 = /** @class */ (function () {
    function JsonPipe() {
    }
    /**
     * @param value A value of any type to convert into a JSON-format string.
     */
    JsonPipe.prototype.transform = function (value) { return JSON.stringify(value, null, 2); };
    JsonPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'json', pure: false })
    ], JsonPipe);
    return JsonPipe;
}());

/**
 * @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 makeKeyValuePair(key, value) {
    return { key: key, value: value };
}
/**
 * @ngModule CommonModule
 * @description
 *
 * Transforms Object or Map into an array of key value pairs.
 *
 * The output array will be ordered by keys.
 * By default the comparator will be by Unicode point value.
 * You can optionally pass a compareFn if your keys are complex types.
 *
 * @usageNotes
 * ### Examples
 *
 * This examples show how an Object or a Map and be iterated by ngFor with the use of this keyvalue
 * pipe.
 *
 * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}
 *
 * @publicApi
 */
var KeyValuePipe = /** @class */ (function () {
    function KeyValuePipe(differs) {
        this.differs = differs;
    }
    KeyValuePipe.prototype.transform = function (input, compareFn) {
        var _this = this;
        if (compareFn === void 0) { compareFn = defaultComparator; }
        if (!input || (!(input instanceof Map) && typeof input !== 'object')) {
            return null;
        }
        if (!this.differ) {
            // make a differ for whatever type we've been passed in
            this.differ = this.differs.find(input).create();
        }
        var differChanges = this.differ.diff(input);
        if (differChanges) {
            this.keyValues = [];
            differChanges.forEachItem(function (r) {
                _this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));
            });
            this.keyValues.sort(compareFn);
        }
        return this.keyValues;
    };
    KeyValuePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'keyvalue', pure: false }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]])
    ], KeyValuePipe);
    return KeyValuePipe;
}());
function defaultComparator(keyValueA, keyValueB) {
    var a = keyValueA.key;
    var b = keyValueB.key;
    // if same exit with 0;
    if (a === b)
        return 0;
    // make sure that undefined are at the end of the sort.
    if (a === undefined)
        return 1;
    if (b === undefined)
        return -1;
    // make sure that nulls are at the end of the sort.
    if (a === null)
        return 1;
    if (b === null)
        return -1;
    if (typeof a == 'string' && typeof b == 'string') {
        return a < b ? -1 : 1;
    }
    if (typeof a == 'number' && typeof b == 'number') {
        return a - b;
    }
    if (typeof a == 'boolean' && typeof b == 'boolean') {
        return a < b ? -1 : 1;
    }
    // `a` and `b` are of different types. Compare their string values.
    var aString = String(a);
    var bString = String(b);
    return aString == bString ? 0 : aString < bString ? -1 : 1;
}

/**
 * @license
 * Copyright Google 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
 */
/**
 * @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 = /** @class */ (function () {
    function DecimalPipe(_locale) {
        this._locale = _locale;
    }
    DecimalPipe_1 = DecimalPipe;
    /**
     * @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).
     */
    DecimalPipe.prototype.transform = function (value, digitsInfo, locale) {
        if (isEmpty(value))
            return null;
        locale = locale || this._locale;
        try {
            var num = strToNumber(value);
            return formatNumber(num, locale, digitsInfo);
        }
        catch (error) {
            throw invalidPipeArgumentError(DecimalPipe_1, error.message);
        }
    };
    var DecimalPipe_1;
    DecimalPipe = DecimalPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'number' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String])
    ], DecimalPipe);
    return DecimalPipe;
}());
/**
 * @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 = /** @class */ (function () {
    function PercentPipe(_locale) {
        this._locale = _locale;
    }
    PercentPipe_1 = PercentPipe;
    /**
     *
     * @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 `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).
     */
    PercentPipe.prototype.transform = function (value, digitsInfo, locale) {
        if (isEmpty(value))
            return null;
        locale = locale || this._locale;
        try {
            var num = strToNumber(value);
            return formatPercent(num, locale, digitsInfo);
        }
        catch (error) {
            throw invalidPipeArgumentError(PercentPipe_1, error.message);
        }
    };
    var PercentPipe_1;
    PercentPipe = PercentPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'percent' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String])
    ], PercentPipe);
    return PercentPipe;
}());
/**
 * @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 = /** @class */ (function () {
    function CurrencyPipe(_locale) {
        this._locale = _locale;
    }
    CurrencyPipe_1 = CurrencyPipe;
    /**
     *
     * @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 `0`.
     *   - `maxFractionDigits`: The maximum number of digits after the decimal point.
     * Default is `3`.
     * 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).
     */
    CurrencyPipe.prototype.transform = function (value, currencyCode, display, digitsInfo, locale) {
        if (display === void 0) { display = 'symbol'; }
        if (isEmpty(value))
            return null;
        locale = locale || this._locale;
        if (typeof display === 'boolean') {
            if (console && console.warn) {
                console.warn("Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".");
            }
            display = display ? 'symbol' : 'code';
        }
        var currency = currencyCode || 'USD';
        if (display !== 'code') {
            if (display === 'symbol' || display === 'symbol-narrow') {
                currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);
            }
            else {
                currency = display;
            }
        }
        try {
            var num = strToNumber(value);
            return formatCurrency(num, locale, currency, currencyCode, digitsInfo);
        }
        catch (error) {
            throw invalidPipeArgumentError(CurrencyPipe_1, error.message);
        }
    };
    var CurrencyPipe_1;
    CurrencyPipe = CurrencyPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'currency' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__metadata"])("design:paramtypes", [String])
    ], CurrencyPipe);
    return CurrencyPipe;
}());
function isEmpty(value) {
    return value == null || value === '' || value !== value;
}
/**
 * Transforms a string into a number (if needed).
 */
function strToNumber(value) {
    // Convert strings to numbers
    if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {
        return Number(value);
    }
    if (typeof value !== 'number') {
        throw new Error(value + " is not a number");
    }
    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
 */
/**
 * @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 = /** @class */ (function () {
    function SlicePipe() {
    }
    SlicePipe_1 = SlicePipe;
    /**
     * @param value a list or a string to be sliced.
     * @param start the starting index of the subset to return:
     *   - **a positive integer**: return the item at `start` index and all items after
     *     in the list or string expression.
     *   - **a negative integer**: return the item at `start` index from the end and all items after
     *     in the list or string expression.
     *   - **if positive and greater than the size of the expression**: return an empty list or
     * string.
     *   - **if negative and greater than the size of the expression**: return entire list or string.
     * @param end the ending index of the subset to return:
     *   - **omitted**: return all items until the end.
     *   - **if positive**: return all items before `end` index of the list or string.
     *   - **if negative**: return all items before `end` index from the end of the list or string.
     */
    SlicePipe.prototype.transform = function (value, start, end) {
        if (value == null)
            return value;
        if (!this.supports(value)) {
            throw invalidPipeArgumentError(SlicePipe_1, value);
        }
        return value.slice(start, end);
    };
    SlicePipe.prototype.supports = function (obj) { return typeof obj === 'string' || Array.isArray(obj); };
    var SlicePipe_1;
    SlicePipe = SlicePipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"])({ name: 'slice', pure: false })
    ], SlicePipe);
    return SlicePipe;
}());

/**
 * @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 collection of Angular pipes that are likely to be used in each and every application.
 */
var COMMON_PIPES = [
    AsyncPipe,
    UpperCasePipe,
    LowerCasePipe,
    JsonPipe,
    SlicePipe,
    DecimalPipe,
    PercentPipe,
    TitleCasePipe,
    CurrencyPipe,
    DatePipe,
    I18nPluralPipe,
    I18nSelectPipe,
    KeyValuePipe,
];

/**
 * @license
 * Copyright Google 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: 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 = /** @class */ (function () {
    function CommonModule() {
    }
    CommonModule = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [COMMON_DIRECTIVES, COMMON_PIPES],
            exports: [COMMON_DIRECTIVES, COMMON_PIPES],
            providers: [
                { provide: NgLocalization, useClass: NgLocaleLocalization },
            ],
        })
    ], CommonModule);
    return CommonModule;
}());
var ɵ0 = getPluralCase;
/**
 * A module that contains the deprecated i18n pipes.
 *
 * @deprecated from v5
 * @publicApi
 */
var DeprecatedI18NPipesModule = /** @class */ (function () {
    function DeprecatedI18NPipesModule() {
    }
    DeprecatedI18NPipesModule = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [COMMON_DEPRECATED_I18N_PIPES],
            exports: [COMMON_DEPRECATED_I18N_PIPES],
            providers: [{ provide: DEPRECATED_PLURAL_FN, useValue: ɵ0 }],
        })
    ], DeprecatedI18NPipesModule);
    return DeprecatedI18NPipesModule;
}());

/**
 * @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 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 into a Web Worker).
 *
 * @publicApi
 */
var DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('DocumentToken');

/**
 * @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 PLATFORM_BROWSER_ID = 'browser';
var PLATFORM_SERVER_ID = 'server';
var PLATFORM_WORKER_APP_ID = 'browserWorkerApp';
var PLATFORM_WORKER_UI_ID = 'browserWorkerUi';
/**
 * Returns whether a platform id represents a browser platform.
 * @publicApi
 */
function isPlatformBrowser(platformId) {
    return platformId === PLATFORM_BROWSER_ID;
}
/**
 * Returns whether a platform id represents a server platform.
 * @publicApi
 */
function isPlatformServer(platformId) {
    return platformId === PLATFORM_SERVER_ID;
}
/**
 * Returns whether a platform id represents a web worker app platform.
 * @publicApi
 */
function isPlatformWorkerApp(platformId) {
    return platformId === PLATFORM_WORKER_APP_ID;
}
/**
 * Returns whether a platform id represents a web worker UI platform.
 * @publicApi
 */
function isPlatformWorkerUi(platformId) {
    return platformId === PLATFORM_WORKER_UI_ID;
}

/**
 * @license
 * Copyright Google 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
 */
/**
 * @publicApi
 */
var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Version"]('7.0.4');

/**
 * @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
 */
/**
 * Manages the scroll position.
 *
 * @publicApi
 */
var ViewportScroller = /** @class */ (function () {
    function ViewportScroller() {
    }
    // De-sugared tree-shakable injection
    // See #23917
    /** @nocollapse */
    ViewportScroller.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ providedIn: 'root', factory: function () { return new BrowserViewportScroller(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(DOCUMENT), window); } });
    return ViewportScroller;
}());
/**
 * Manages the scroll position.
 */
var BrowserViewportScroller = /** @class */ (function () {
    function BrowserViewportScroller(document, window) {
        this.document = document;
        this.window = window;
        this.offset = function () { return [0, 0]; };
    }
    /**
     * Configures the top offset used when scrolling to an anchor.
     *
     * * When given a number, the service will always use the number.
     * * When given a function, the service will invoke the function every time it restores scroll
     * position.
     */
    BrowserViewportScroller.prototype.setOffset = function (offset) {
        if (Array.isArray(offset)) {
            this.offset = function () { return offset; };
        }
        else {
            this.offset = offset;
        }
    };
    /**
     * Returns the current scroll position.
     */
    BrowserViewportScroller.prototype.getScrollPosition = function () {
        if (this.supportScrollRestoration()) {
            return [this.window.scrollX, this.window.scrollY];
        }
        else {
            return [0, 0];
        }
    };
    /**
     * Sets the scroll position.
     */
    BrowserViewportScroller.prototype.scrollToPosition = function (position) {
        if (this.supportScrollRestoration()) {
            this.window.scrollTo(position[0], position[1]);
        }
    };
    /**
     * Scrolls to the provided anchor.
     */
    BrowserViewportScroller.prototype.scrollToAnchor = function (anchor) {
        if (this.supportScrollRestoration()) {
            var elSelectedById = this.document.querySelector("#" + anchor);
            if (elSelectedById) {
                this.scrollToElement(elSelectedById);
                return;
            }
            var elSelectedByName = this.document.querySelector("[name='" + anchor + "']");
            if (elSelectedByName) {
                this.scrollToElement(elSelectedByName);
                return;
            }
        }
    };
    /**
     * Disables automatic scroll restoration provided by the browser.
     */
    BrowserViewportScroller.prototype.setHistoryScrollRestoration = function (scrollRestoration) {
        if (this.supportScrollRestoration()) {
            var history_1 = this.window.history;
            if (history_1 && history_1.scrollRestoration) {
                history_1.scrollRestoration = scrollRestoration;
            }
        }
    };
    BrowserViewportScroller.prototype.scrollToElement = function (el) {
        var rect = el.getBoundingClientRect();
        var left = rect.left + this.window.pageXOffset;
        var top = rect.top + this.window.pageYOffset;
        var offset = this.offset();
        this.window.scrollTo(left - offset[0], top - offset[1]);
    };
    /**
     * 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.
     */
    BrowserViewportScroller.prototype.supportScrollRestoration = function () {
        try {
            return !!this.window && !!this.window.scrollTo;
        }
        catch (e) {
            return false;
        }
    };
    return BrowserViewportScroller;
}());
/**
 * 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 = /** @class */ (function () {
    function NullViewportScroller() {
    }
    /**
     * Empty implementation
     */
    NullViewportScroller.prototype.setOffset = function (offset) { };
    /**
     * Empty implementation
     */
    NullViewportScroller.prototype.getScrollPosition = function () { return [0, 0]; };
    /**
     * Empty implementation
     */
    NullViewportScroller.prototype.scrollToPosition = function (position) { };
    /**
     * Empty implementation
     */
    NullViewportScroller.prototype.scrollToAnchor = function (anchor) { };
    /**
     * Empty implementation
     */
    NullViewportScroller.prototype.setHistoryScrollRestoration = function (scrollRestoration) { };
    return NullViewportScroller;
}());

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

/**
 * Generated bundle index. Do not edit.
 */


//# sourceMappingURL=common.js.map


/***/ }),

/***/ "./node_modules/@angular/compiler/fesm5/compiler.js":
/*!**********************************************************!*\
  !*** ./node_modules/@angular/compiler/fesm5/compiler.js ***!
  \**********************************************************/
/*! exports provided: core, CompilerConfig, preserveWhitespacesDefault, isLoweredSymbol, createLoweredSymbol, Identifiers, JitCompiler, ConstantPool, DirectiveResolver, PipeResolver, NgModuleResolver, DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, NgModuleCompiler, ArrayType, AssertNotNull, BinaryOperator, BinaryOperatorExpr, BuiltinMethod, BuiltinType, BuiltinTypeName, BuiltinVar, CastExpr, ClassField, ClassMethod, ClassStmt, CommaExpr, CommentStmt, ConditionalExpr, DeclareFunctionStmt, DeclareVarStmt, Expression, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FunctionExpr, IfStmt, InstantiateExpr, InvokeFunctionExpr, InvokeMethodExpr, JSDocCommentStmt, LiteralArrayExpr, LiteralExpr, LiteralMapExpr, MapType, NotExpr, ReadKeyExpr, ReadPropExpr, ReadVarExpr, ReturnStatement, ThrowStmt, TryCatchStmt, Type, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, StmtModifier, Statement, TypeofExpr, collectExternalReferences, EmitterVisitorContext, ViewCompiler, getParseErrors, isSyntaxError, syntaxError, Version, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstBoundText, TmplAstContent, TmplAstElement, TmplAstReference, TmplAstTemplate, TmplAstText, TmplAstTextAttribute, TmplAstVariable, jitExpression, R3ResolvedDependencyType, compileInjector, compileNgModule, compilePipeFromMetadata, makeBindingParser, parseTemplate, compileBaseDefFromMetadata, compileComponentFromMetadata, compileDirectiveFromMetadata, parseHostBindings, 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, 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, ParseErrorLevel, ParseError, typeSourceSpan, DomElementSchemaRegistry, CssSelector, SelectorMatcher, SelectorListContext, SelectorContext, HOST_ATTR, CONTENT_ATTR, StylesCompileDependency, CompiledStylesheet, StyleCompiler, TemplateParseError, TemplateParseResult, TemplateParser, splitClasses, createElementCssSelector, removeSummaryDuplicates, compileInjectable, R3TargetBinder, R3BoundTarget */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__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__, "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__, "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__, "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__, "ViewCompiler", function() { return ViewCompiler; });
/* 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$1; });
/* 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$1; });
/* 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__, "jitExpression", function() { return jitExpression; });
/* 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__, "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__, "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; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lexer", function() { return Lexer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Token", function() { return Token; });
/* 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; });
/* 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; });
/* 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; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Comment", function() { return Comment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "visitAll", function() { return visitAll; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RecursiveVisitor", function() { return RecursiveVisitor; });
/* 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__, "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__, "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__, "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; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/**
 * @license Angular v7.0.4
 * (c) 2010-2018 Google, Inc. 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 \"" + 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 ? ":" + prefix + ":" + 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': '\u00C1',
    'aacute': '\u00E1',
    'Acirc': '\u00C2',
    'acirc': '\u00E2',
    'acute': '\u00B4',
    'AElig': '\u00C6',
    'aelig': '\u00E6',
    'Agrave': '\u00C0',
    'agrave': '\u00E0',
    'alefsym': '\u2135',
    'Alpha': '\u0391',
    'alpha': '\u03B1',
    'amp': '&',
    'and': '\u2227',
    'ang': '\u2220',
    'apos': '\u0027',
    'Aring': '\u00C5',
    'aring': '\u00E5',
    'asymp': '\u2248',
    'Atilde': '\u00C3',
    'atilde': '\u00E3',
    'Auml': '\u00C4',
    'auml': '\u00E4',
    'bdquo': '\u201E',
    'Beta': '\u0392',
    'beta': '\u03B2',
    'brvbar': '\u00A6',
    'bull': '\u2022',
    'cap': '\u2229',
    'Ccedil': '\u00C7',
    'ccedil': '\u00E7',
    'cedil': '\u00B8',
    'cent': '\u00A2',
    'Chi': '\u03A7',
    'chi': '\u03C7',
    'circ': '\u02C6',
    'clubs': '\u2663',
    'cong': '\u2245',
    'copy': '\u00A9',
    'crarr': '\u21B5',
    'cup': '\u222A',
    'curren': '\u00A4',
    'dagger': '\u2020',
    'Dagger': '\u2021',
    'darr': '\u2193',
    'dArr': '\u21D3',
    'deg': '\u00B0',
    'Delta': '\u0394',
    'delta': '\u03B4',
    'diams': '\u2666',
    'divide': '\u00F7',
    'Eacute': '\u00C9',
    'eacute': '\u00E9',
    'Ecirc': '\u00CA',
    'ecirc': '\u00EA',
    'Egrave': '\u00C8',
    'egrave': '\u00E8',
    'empty': '\u2205',
    'emsp': '\u2003',
    'ensp': '\u2002',
    'Epsilon': '\u0395',
    'epsilon': '\u03B5',
    'equiv': '\u2261',
    'Eta': '\u0397',
    'eta': '\u03B7',
    'ETH': '\u00D0',
    'eth': '\u00F0',
    'Euml': '\u00CB',
    'euml': '\u00EB',
    'euro': '\u20AC',
    'exist': '\u2203',
    'fnof': '\u0192',
    'forall': '\u2200',
    'frac12': '\u00BD',
    'frac14': '\u00BC',
    'frac34': '\u00BE',
    'frasl': '\u2044',
    'Gamma': '\u0393',
    'gamma': '\u03B3',
    'ge': '\u2265',
    'gt': '>',
    'harr': '\u2194',
    'hArr': '\u21D4',
    'hearts': '\u2665',
    'hellip': '\u2026',
    'Iacute': '\u00CD',
    'iacute': '\u00ED',
    'Icirc': '\u00CE',
    'icirc': '\u00EE',
    'iexcl': '\u00A1',
    'Igrave': '\u00CC',
    'igrave': '\u00EC',
    'image': '\u2111',
    'infin': '\u221E',
    'int': '\u222B',
    'Iota': '\u0399',
    'iota': '\u03B9',
    'iquest': '\u00BF',
    'isin': '\u2208',
    'Iuml': '\u00CF',
    'iuml': '\u00EF',
    'Kappa': '\u039A',
    'kappa': '\u03BA',
    'Lambda': '\u039B',
    'lambda': '\u03BB',
    'lang': '\u27E8',
    'laquo': '\u00AB',
    'larr': '\u2190',
    'lArr': '\u21D0',
    'lceil': '\u2308',
    'ldquo': '\u201C',
    'le': '\u2264',
    'lfloor': '\u230A',
    'lowast': '\u2217',
    'loz': '\u25CA',
    'lrm': '\u200E',
    'lsaquo': '\u2039',
    'lsquo': '\u2018',
    'lt': '<',
    'macr': '\u00AF',
    'mdash': '\u2014',
    'micro': '\u00B5',
    'middot': '\u00B7',
    'minus': '\u2212',
    'Mu': '\u039C',
    'mu': '\u03BC',
    'nabla': '\u2207',
    'nbsp': '\u00A0',
    'ndash': '\u2013',
    'ne': '\u2260',
    'ni': '\u220B',
    'not': '\u00AC',
    'notin': '\u2209',
    'nsub': '\u2284',
    'Ntilde': '\u00D1',
    'ntilde': '\u00F1',
    'Nu': '\u039D',
    'nu': '\u03BD',
    'Oacute': '\u00D3',
    'oacute': '\u00F3',
    'Ocirc': '\u00D4',
    'ocirc': '\u00F4',
    'OElig': '\u0152',
    'oelig': '\u0153',
    'Ograve': '\u00D2',
    'ograve': '\u00F2',
    'oline': '\u203E',
    'Omega': '\u03A9',
    'omega': '\u03C9',
    'Omicron': '\u039F',
    'omicron': '\u03BF',
    'oplus': '\u2295',
    'or': '\u2228',
    'ordf': '\u00AA',
    'ordm': '\u00BA',
    'Oslash': '\u00D8',
    'oslash': '\u00F8',
    'Otilde': '\u00D5',
    'otilde': '\u00F5',
    'otimes': '\u2297',
    'Ouml': '\u00D6',
    'ouml': '\u00F6',
    'para': '\u00B6',
    'permil': '\u2030',
    'perp': '\u22A5',
    'Phi': '\u03A6',
    'phi': '\u03C6',
    'Pi': '\u03A0',
    'pi': '\u03C0',
    'piv': '\u03D6',
    'plusmn': '\u00B1',
    'pound': '\u00A3',
    'prime': '\u2032',
    'Prime': '\u2033',
    'prod': '\u220F',
    'prop': '\u221D',
    'Psi': '\u03A8',
    'psi': '\u03C8',
    'quot': '\u0022',
    'radic': '\u221A',
    'rang': '\u27E9',
    'raquo': '\u00BB',
    'rarr': '\u2192',
    'rArr': '\u21D2',
    'rceil': '\u2309',
    'rdquo': '\u201D',
    'real': '\u211C',
    'reg': '\u00AE',
    'rfloor': '\u230B',
    'Rho': '\u03A1',
    'rho': '\u03C1',
    'rlm': '\u200F',
    'rsaquo': '\u203A',
    'rsquo': '\u2019',
    'sbquo': '\u201A',
    'Scaron': '\u0160',
    'scaron': '\u0161',
    'sdot': '\u22C5',
    'sect': '\u00A7',
    'shy': '\u00AD',
    'Sigma': '\u03A3',
    'sigma': '\u03C3',
    'sigmaf': '\u03C2',
    'sim': '\u223C',
    'spades': '\u2660',
    'sub': '\u2282',
    'sube': '\u2286',
    'sum': '\u2211',
    'sup': '\u2283',
    'sup1': '\u00B9',
    'sup2': '\u00B2',
    'sup3': '\u00B3',
    'supe': '\u2287',
    'szlig': '\u00DF',
    'Tau': '\u03A4',
    'tau': '\u03C4',
    'there4': '\u2234',
    'Theta': '\u0398',
    'theta': '\u03B8',
    'thetasym': '\u03D1',
    'thinsp': '\u2009',
    'THORN': '\u00DE',
    'thorn': '\u00FE',
    'tilde': '\u02DC',
    'times': '\u00D7',
    'trade': '\u2122',
    'Uacute': '\u00DA',
    'uacute': '\u00FA',
    'uarr': '\u2191',
    'uArr': '\u21D1',
    'Ucirc': '\u00DB',
    'ucirc': '\u00FB',
    'Ugrave': '\u00D9',
    'ugrave': '\u00F9',
    'uml': '\u00A8',
    'upsih': '\u03D2',
    'Upsilon': '\u03A5',
    'upsilon': '\u03C5',
    'Uuml': '\u00DC',
    'uuml': '\u00FC',
    'weierp': '\u2118',
    'Xi': '\u039E',
    'xi': '\u03BE',
    'Yacute': '\u00DD',
    'yacute': '\u00FD',
    'yen': '\u00A5',
    'yuml': '\u00FF',
    '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 = /** @class */ (function () {
    function HtmlTagDefinition(_a) {
        var _b = _a === void 0 ? {} : _a, closedByChildren = _b.closedByChildren, requiredParents = _b.requiredParents, implicitNamespacePrefix = _b.implicitNamespacePrefix, _c = _b.contentType, contentType = _c === void 0 ? TagContentType.PARSABLE_DATA : _c, _d = _b.closedByParent, closedByParent = _d === void 0 ? false : _d, _e = _b.isVoid, isVoid = _e === void 0 ? false : _e, _f = _b.ignoreFirstLf, ignoreFirstLf = _f === void 0 ? false : _f;
        var _this = this;
        this.closedByChildren = {};
        this.closedByParent = false;
        this.canSelfClose = false;
        if (closedByChildren && closedByChildren.length > 0) {
            closedByChildren.forEach(function (tagName) { return _this.closedByChildren[tagName] = true; });
        }
        this.isVoid = isVoid;
        this.closedByParent = closedByParent || isVoid;
        if (requiredParents && requiredParents.length > 0) {
            this.requiredParents = {};
            // The first parent is the list is automatically when none of the listed parents are present
            this.parentToAdd = requiredParents[0];
            requiredParents.forEach(function (tagName) { return _this.requiredParents[tagName] = true; });
        }
        this.implicitNamespacePrefix = implicitNamespacePrefix || null;
        this.contentType = contentType;
        this.ignoreFirstLf = ignoreFirstLf;
    }
    HtmlTagDefinition.prototype.requireExtraParent = function (currentParent) {
        if (!this.requiredParents) {
            return false;
        }
        if (!currentParent) {
            return true;
        }
        var lcParent = currentParent.toLowerCase();
        var isParentTemplate = lcParent === 'template' || currentParent === 'ng-template';
        return !isParentTemplate && this.requiredParents[lcParent] != true;
    };
    HtmlTagDefinition.prototype.isClosedByChild = function (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'],
                requiredParents: ['tbody', 'tfoot', 'thead'],
                closedByParent: true
            }),
            'td': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),
            'th': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),
            'col': new HtmlTagDefinition({ requiredParents: ['colgroup'], 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 = /** @class */ (function () {
    function 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 = [];
    }
    CssSelector.parse = function (selector) {
        var results = [];
        var _addResult = function (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;
    };
    CssSelector.prototype.isElementSelector = function () {
        return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 &&
            this.notSelectors.length === 0;
    };
    CssSelector.prototype.hasElementSelector = function () { return !!this.element; };
    CssSelector.prototype.setElement = function (element) {
        if (element === void 0) { element = null; }
        this.element = element;
    };
    /** Gets a template string for an element that matches the selector. */
    CssSelector.prototype.getMatchingElementTemplate = function () {
        var tagName = this.element || 'div';
        var classAttr = this.classNames.length > 0 ? " class=\"" + 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] !== '' ? "=\"" + this.attrs[i + 1] + "\"" : '';
            attrs += " " + attrName + attrValue;
        }
        return getHtmlTagDefinition(tagName).isVoid ? "<" + tagName + classAttr + attrs + "/>" :
            "<" + tagName + classAttr + attrs + "></" + tagName + ">";
    };
    CssSelector.prototype.getAttrs = function () {
        var result = [];
        if (this.classNames.length > 0) {
            result.push('class', this.classNames.join(' '));
        }
        return result.concat(this.attrs);
    };
    CssSelector.prototype.addAttribute = function (name, value) {
        if (value === void 0) { value = ''; }
        this.attrs.push(name, value && value.toLowerCase() || '');
    };
    CssSelector.prototype.addClassName = function (name) { this.classNames.push(name.toLowerCase()); };
    CssSelector.prototype.toString = function () {
        var res = this.element || '';
        if (this.classNames) {
            this.classNames.forEach(function (klass) { return res += "." + klass; });
        }
        if (this.attrs) {
            for (var i = 0; i < this.attrs.length; i += 2) {
                var name_1 = this.attrs[i];
                var value = this.attrs[i + 1];
                res += "[" + name_1 + (value ? '=' + value : '') + "]";
            }
        }
        this.notSelectors.forEach(function (notSelector) { return res += ":not(" + notSelector + ")"; });
        return res;
    };
    return CssSelector;
}());
/**
 * Reads a list of CssSelectors and allows to calculate which ones
 * are contained in a given CssSelector.
 */
var SelectorMatcher = /** @class */ (function () {
    function 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 = [];
    }
    SelectorMatcher.createNotMatcher = function (notSelectors) {
        var notMatcher = new SelectorMatcher();
        notMatcher.addSelectables(notSelectors, null);
        return notMatcher;
    };
    SelectorMatcher.prototype.addSelectables = function (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
     */
    SelectorMatcher.prototype._addSelectable = function (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 i = 0; i < attrs.length; i += 2) {
                var isTerminal = i === attrs.length - 2;
                var name_2 = attrs[i];
                var value = attrs[i + 1];
                if (isTerminal) {
                    var terminalMap = matcher._attrValueMap;
                    var terminalValuesMap = terminalMap.get(name_2);
                    if (!terminalValuesMap) {
                        terminalValuesMap = new Map();
                        terminalMap.set(name_2, terminalValuesMap);
                    }
                    this._addTerminal(terminalValuesMap, value, selectable);
                }
                else {
                    var partialMap = matcher._attrValuePartialMap;
                    var partialValuesMap = partialMap.get(name_2);
                    if (!partialValuesMap) {
                        partialValuesMap = new Map();
                        partialMap.set(name_2, partialValuesMap);
                    }
                    matcher = this._addPartial(partialValuesMap, value);
                }
            }
        }
    };
    SelectorMatcher.prototype._addTerminal = function (map, name, selectable) {
        var terminalList = map.get(name);
        if (!terminalList) {
            terminalList = [];
            map.set(name, terminalList);
        }
        terminalList.push(selectable);
    };
    SelectorMatcher.prototype._addPartial = function (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
    */
    SelectorMatcher.prototype.match = function (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 i = 0; i < classNames.length; i++) {
                var className = classNames[i];
                result =
                    this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;
                result =
                    this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) ||
                        result;
            }
        }
        if (attrs) {
            for (var i = 0; i < attrs.length; i += 2) {
                var name_3 = attrs[i];
                var value = attrs[i + 1];
                var terminalValuesMap = this._attrValueMap.get(name_3);
                if (value) {
                    result =
                        this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;
                }
                result =
                    this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;
                var partialValuesMap = this._attrValuePartialMap.get(name_3);
                if (value) {
                    result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;
                }
                result =
                    this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;
            }
        }
        return result;
    };
    /** @internal */
    SelectorMatcher.prototype._matchTerminal = function (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 */
    SelectorMatcher.prototype._matchPartial = function (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);
    };
    return SelectorMatcher;
}());
var SelectorListContext = /** @class */ (function () {
    function SelectorListContext(selectors) {
        this.selectors = selectors;
        this.alreadyMatched = false;
    }
    return SelectorListContext;
}());
// Store context to pass back selector and context when a selector is matched
var SelectorContext = /** @class */ (function () {
    function SelectorContext(selector, cbContext, listContext) {
        this.selector = selector;
        this.cbContext = cbContext;
        this.listContext = listContext;
        this.notSelectors = selector.notSelectors;
    }
    SelectorContext.prototype.finalize = function (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, data) {
    if (data === void 0) { data = {}; }
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));
});
var createContentChild = makeMetadataFactory('ContentChild', function (selector, data) {
    if (data === void 0) { data = {}; }
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));
});
var createViewChildren = makeMetadataFactory('ViewChildren', function (selector, data) {
    if (data === void 0) { data = {}; }
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));
});
var createViewChild = makeMetadataFactory('ViewChild', function (selector, data) {
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));
});
var createDirective = makeMetadataFactory('Directive', function (dir) {
    if (dir === void 0) { dir = {}; }
    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 (c) {
    if (c === void 0) { c = {}; }
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ changeDetection: ChangeDetectionStrategy.Default }, c));
});
var createPipe = makeMetadataFactory('Pipe', function (p) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__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 (injectable) {
    if (injectable === void 0) { injectable = {}; }
    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) {
    var factory = function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var values = props ? props.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args)) : {};
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__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 ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([8 /* CLASS */], selector.classNames) :
        [];
    var elementName = selector.element && selector.element !== '*' ? selector.element : '';
    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([elementName], selector.attrs, classes);
}
function parserSelectorToNegativeSelector(selector) {
    var classes = selector.classNames && selector.classNames.length ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([8 /* CLASS */], selector.classNames) :
        [];
    if (selector.element) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([
            1 /* NOT */ | 4 /* ELEMENT */, selector.element
        ], selector.attrs, classes);
    }
    else if (selector.attrs.length) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([1 /* NOT */ | 2 /* ATTRIBUTE */], selector.attrs, classes);
    }
    else {
        return selector.classNames && selector.classNames.length ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([1 /* NOT */ | 8 /* CLASS */], 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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(negative));
}
function parseSelectorToR3Selector(selector) {
    var selectors = CssSelector.parse(selector);
    return selectors.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 = /** @class */ (function () {
    function Type(modifiers) {
        if (modifiers === void 0) { modifiers = null; }
        this.modifiers = modifiers;
        if (!modifiers) {
            this.modifiers = [];
        }
    }
    Type.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };
    return Type;
}());
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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BuiltinType, _super);
    function BuiltinType(name, modifiers) {
        if (modifiers === void 0) { modifiers = null; }
        var _this = _super.call(this, modifiers) || this;
        _this.name = name;
        return _this;
    }
    BuiltinType.prototype.visitType = function (visitor, context) {
        return visitor.visitBuiltinType(this, context);
    };
    return BuiltinType;
}(Type$1));
var ExpressionType = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ExpressionType, _super);
    function ExpressionType(value, modifiers, typeParams) {
        if (modifiers === void 0) { modifiers = null; }
        if (typeParams === void 0) { typeParams = null; }
        var _this = _super.call(this, modifiers) || this;
        _this.value = value;
        _this.typeParams = typeParams;
        return _this;
    }
    ExpressionType.prototype.visitType = function (visitor, context) {
        return visitor.visitExpressionType(this, context);
    };
    return ExpressionType;
}(Type$1));
var ArrayType = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ArrayType, _super);
    function ArrayType(of, modifiers) {
        if (modifiers === void 0) { modifiers = null; }
        var _this = _super.call(this, modifiers) || this;
        _this.of = of;
        return _this;
    }
    ArrayType.prototype.visitType = function (visitor, context) {
        return visitor.visitArrayType(this, context);
    };
    return ArrayType;
}(Type$1));
var MapType = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MapType, _super);
    function MapType(valueType, modifiers) {
        if (modifiers === void 0) { modifiers = null; }
        var _this = _super.call(this, modifiers) || this;
        _this.valueType = valueType || null;
        return _this;
    }
    MapType.prototype.visitType = function (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 = /** @class */ (function () {
    function Expression(type, sourceSpan) {
        this.type = type || null;
        this.sourceSpan = sourceSpan || null;
    }
    Expression.prototype.prop = function (name, sourceSpan) {
        return new ReadPropExpr(this, name, null, sourceSpan);
    };
    Expression.prototype.key = function (index, type, sourceSpan) {
        return new ReadKeyExpr(this, index, type, sourceSpan);
    };
    Expression.prototype.callMethod = function (name, params, sourceSpan) {
        return new InvokeMethodExpr(this, name, params, null, sourceSpan);
    };
    Expression.prototype.callFn = function (params, sourceSpan) {
        return new InvokeFunctionExpr(this, params, null, sourceSpan);
    };
    Expression.prototype.instantiate = function (params, type, sourceSpan) {
        return new InstantiateExpr(this, params, type, sourceSpan);
    };
    Expression.prototype.conditional = function (trueCase, falseCase, sourceSpan) {
        if (falseCase === void 0) { falseCase = null; }
        return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);
    };
    Expression.prototype.equals = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);
    };
    Expression.prototype.notEquals = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);
    };
    Expression.prototype.identical = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);
    };
    Expression.prototype.notIdentical = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);
    };
    Expression.prototype.minus = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);
    };
    Expression.prototype.plus = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);
    };
    Expression.prototype.divide = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);
    };
    Expression.prototype.multiply = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);
    };
    Expression.prototype.modulo = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);
    };
    Expression.prototype.and = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);
    };
    Expression.prototype.bitwiseAnd = function (rhs, sourceSpan, parens) {
        if (parens === void 0) { parens = true; }
        return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);
    };
    Expression.prototype.or = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);
    };
    Expression.prototype.lower = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);
    };
    Expression.prototype.lowerEquals = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);
    };
    Expression.prototype.bigger = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);
    };
    Expression.prototype.biggerEquals = function (rhs, sourceSpan) {
        return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);
    };
    Expression.prototype.isBlank = function (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);
    };
    Expression.prototype.cast = function (type, sourceSpan) {
        return new CastExpr(this, type, sourceSpan);
    };
    Expression.prototype.toStmt = function () { 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReadVarExpr, _super);
    function ReadVarExpr(name, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        if (typeof name === 'string') {
            _this.name = name;
            _this.builtin = null;
        }
        else {
            _this.name = null;
            _this.builtin = name;
        }
        return _this;
    }
    ReadVarExpr.prototype.isEquivalent = function (e) {
        return e instanceof ReadVarExpr && this.name === e.name && this.builtin === e.builtin;
    };
    ReadVarExpr.prototype.isConstant = function () { return false; };
    ReadVarExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitReadVarExpr(this, context);
    };
    ReadVarExpr.prototype.set = function (value) {
        if (!this.name) {
            throw new Error("Built in variable " + this.builtin + " can not be assigned to.");
        }
        return new WriteVarExpr(this.name, value, null, this.sourceSpan);
    };
    return ReadVarExpr;
}(Expression));
var TypeofExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TypeofExpr, _super);
    function TypeofExpr(expr, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.expr = expr;
        return _this;
    }
    TypeofExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitTypeofExpr(this, context);
    };
    TypeofExpr.prototype.isEquivalent = function (e) {
        return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);
    };
    TypeofExpr.prototype.isConstant = function () { return this.expr.isConstant(); };
    return TypeofExpr;
}(Expression));
var WrappedNodeExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WrappedNodeExpr, _super);
    function WrappedNodeExpr(node, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.node = node;
        return _this;
    }
    WrappedNodeExpr.prototype.isEquivalent = function (e) {
        return e instanceof WrappedNodeExpr && this.node === e.node;
    };
    WrappedNodeExpr.prototype.isConstant = function () { return false; };
    WrappedNodeExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitWrappedNodeExpr(this, context);
    };
    return WrappedNodeExpr;
}(Expression));
var WriteVarExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WriteVarExpr, _super);
    function WriteVarExpr(name, value, type, sourceSpan) {
        var _this = _super.call(this, type || value.type, sourceSpan) || this;
        _this.name = name;
        _this.value = value;
        return _this;
    }
    WriteVarExpr.prototype.isEquivalent = function (e) {
        return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);
    };
    WriteVarExpr.prototype.isConstant = function () { return false; };
    WriteVarExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitWriteVarExpr(this, context);
    };
    WriteVarExpr.prototype.toDeclStmt = function (type, modifiers) {
        return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);
    };
    WriteVarExpr.prototype.toConstDecl = function () { return this.toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]); };
    return WriteVarExpr;
}(Expression));
var WriteKeyExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WriteKeyExpr, _super);
    function WriteKeyExpr(receiver, index, value, type, sourceSpan) {
        var _this = _super.call(this, type || value.type, sourceSpan) || this;
        _this.receiver = receiver;
        _this.index = index;
        _this.value = value;
        return _this;
    }
    WriteKeyExpr.prototype.isEquivalent = function (e) {
        return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) &&
            this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);
    };
    WriteKeyExpr.prototype.isConstant = function () { return false; };
    WriteKeyExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitWriteKeyExpr(this, context);
    };
    return WriteKeyExpr;
}(Expression));
var WritePropExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WritePropExpr, _super);
    function WritePropExpr(receiver, name, value, type, sourceSpan) {
        var _this = _super.call(this, type || value.type, sourceSpan) || this;
        _this.receiver = receiver;
        _this.name = name;
        _this.value = value;
        return _this;
    }
    WritePropExpr.prototype.isEquivalent = function (e) {
        return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) &&
            this.name === e.name && this.value.isEquivalent(e.value);
    };
    WritePropExpr.prototype.isConstant = function () { return false; };
    WritePropExpr.prototype.visitExpression = function (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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(InvokeMethodExpr, _super);
    function InvokeMethodExpr(receiver, method, args, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.receiver = receiver;
        _this.args = args;
        if (typeof method === 'string') {
            _this.name = method;
            _this.builtin = null;
        }
        else {
            _this.name = null;
            _this.builtin = method;
        }
        return _this;
    }
    InvokeMethodExpr.prototype.isEquivalent = function (e) {
        return e instanceof InvokeMethodExpr && this.receiver.isEquivalent(e.receiver) &&
            this.name === e.name && this.builtin === e.builtin && areAllEquivalent(this.args, e.args);
    };
    InvokeMethodExpr.prototype.isConstant = function () { return false; };
    InvokeMethodExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitInvokeMethodExpr(this, context);
    };
    return InvokeMethodExpr;
}(Expression));
var InvokeFunctionExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(InvokeFunctionExpr, _super);
    function InvokeFunctionExpr(fn, args, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.fn = fn;
        _this.args = args;
        return _this;
    }
    InvokeFunctionExpr.prototype.isEquivalent = function (e) {
        return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) &&
            areAllEquivalent(this.args, e.args);
    };
    InvokeFunctionExpr.prototype.isConstant = function () { return false; };
    InvokeFunctionExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitInvokeFunctionExpr(this, context);
    };
    return InvokeFunctionExpr;
}(Expression));
var InstantiateExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(InstantiateExpr, _super);
    function InstantiateExpr(classExpr, args, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.classExpr = classExpr;
        _this.args = args;
        return _this;
    }
    InstantiateExpr.prototype.isEquivalent = function (e) {
        return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) &&
            areAllEquivalent(this.args, e.args);
    };
    InstantiateExpr.prototype.isConstant = function () { return false; };
    InstantiateExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitInstantiateExpr(this, context);
    };
    return InstantiateExpr;
}(Expression));
var LiteralExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralExpr, _super);
    function LiteralExpr(value, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.value = value;
        return _this;
    }
    LiteralExpr.prototype.isEquivalent = function (e) {
        return e instanceof LiteralExpr && this.value === e.value;
    };
    LiteralExpr.prototype.isConstant = function () { return true; };
    LiteralExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitLiteralExpr(this, context);
    };
    return LiteralExpr;
}(Expression));
var ExternalExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ExternalExpr, _super);
    function ExternalExpr(value, type, typeParams, sourceSpan) {
        if (typeParams === void 0) { typeParams = null; }
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.value = value;
        _this.typeParams = typeParams;
        return _this;
    }
    ExternalExpr.prototype.isEquivalent = function (e) {
        return e instanceof ExternalExpr && this.value.name === e.value.name &&
            this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;
    };
    ExternalExpr.prototype.isConstant = function () { return false; };
    ExternalExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitExternalExpr(this, context);
    };
    return ExternalExpr;
}(Expression));
var ExternalReference = /** @class */ (function () {
    function ExternalReference(moduleName, name, runtime) {
        this.moduleName = moduleName;
        this.name = name;
        this.runtime = runtime;
    }
    return ExternalReference;
}());
var ConditionalExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ConditionalExpr, _super);
    function ConditionalExpr(condition, trueCase, falseCase, type, sourceSpan) {
        if (falseCase === void 0) { falseCase = null; }
        var _this = _super.call(this, type || trueCase.type, sourceSpan) || this;
        _this.condition = condition;
        _this.falseCase = falseCase;
        _this.trueCase = trueCase;
        return _this;
    }
    ConditionalExpr.prototype.isEquivalent = function (e) {
        return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) &&
            this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);
    };
    ConditionalExpr.prototype.isConstant = function () { return false; };
    ConditionalExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitConditionalExpr(this, context);
    };
    return ConditionalExpr;
}(Expression));
var NotExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NotExpr, _super);
    function NotExpr(condition, sourceSpan) {
        var _this = _super.call(this, BOOL_TYPE, sourceSpan) || this;
        _this.condition = condition;
        return _this;
    }
    NotExpr.prototype.isEquivalent = function (e) {
        return e instanceof NotExpr && this.condition.isEquivalent(e.condition);
    };
    NotExpr.prototype.isConstant = function () { return false; };
    NotExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitNotExpr(this, context);
    };
    return NotExpr;
}(Expression));
var AssertNotNull = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AssertNotNull, _super);
    function AssertNotNull(condition, sourceSpan) {
        var _this = _super.call(this, condition.type, sourceSpan) || this;
        _this.condition = condition;
        return _this;
    }
    AssertNotNull.prototype.isEquivalent = function (e) {
        return e instanceof AssertNotNull && this.condition.isEquivalent(e.condition);
    };
    AssertNotNull.prototype.isConstant = function () { return false; };
    AssertNotNull.prototype.visitExpression = function (visitor, context) {
        return visitor.visitAssertNotNullExpr(this, context);
    };
    return AssertNotNull;
}(Expression));
var CastExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CastExpr, _super);
    function CastExpr(value, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.value = value;
        return _this;
    }
    CastExpr.prototype.isEquivalent = function (e) {
        return e instanceof CastExpr && this.value.isEquivalent(e.value);
    };
    CastExpr.prototype.isConstant = function () { return false; };
    CastExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitCastExpr(this, context);
    };
    return CastExpr;
}(Expression));
var FnParam = /** @class */ (function () {
    function FnParam(name, type) {
        if (type === void 0) { type = null; }
        this.name = name;
        this.type = type;
    }
    FnParam.prototype.isEquivalent = function (param) { return this.name === param.name; };
    return FnParam;
}());
var FunctionExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FunctionExpr, _super);
    function FunctionExpr(params, statements, type, sourceSpan, name) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.params = params;
        _this.statements = statements;
        _this.name = name;
        return _this;
    }
    FunctionExpr.prototype.isEquivalent = function (e) {
        return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) &&
            areAllEquivalent(this.statements, e.statements);
    };
    FunctionExpr.prototype.isConstant = function () { return false; };
    FunctionExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitFunctionExpr(this, context);
    };
    FunctionExpr.prototype.toDeclStmt = function (name, modifiers) {
        if (modifiers === void 0) { modifiers = null; }
        return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);
    };
    return FunctionExpr;
}(Expression));
var BinaryOperatorExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BinaryOperatorExpr, _super);
    function BinaryOperatorExpr(operator, lhs, rhs, type, sourceSpan, parens) {
        if (parens === void 0) { parens = true; }
        var _this = _super.call(this, type || lhs.type, sourceSpan) || this;
        _this.operator = operator;
        _this.rhs = rhs;
        _this.parens = parens;
        _this.lhs = lhs;
        return _this;
    }
    BinaryOperatorExpr.prototype.isEquivalent = function (e) {
        return e instanceof BinaryOperatorExpr && this.operator === e.operator &&
            this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);
    };
    BinaryOperatorExpr.prototype.isConstant = function () { return false; };
    BinaryOperatorExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitBinaryOperatorExpr(this, context);
    };
    return BinaryOperatorExpr;
}(Expression));
var ReadPropExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReadPropExpr, _super);
    function ReadPropExpr(receiver, name, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.receiver = receiver;
        _this.name = name;
        return _this;
    }
    ReadPropExpr.prototype.isEquivalent = function (e) {
        return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) &&
            this.name === e.name;
    };
    ReadPropExpr.prototype.isConstant = function () { return false; };
    ReadPropExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitReadPropExpr(this, context);
    };
    ReadPropExpr.prototype.set = function (value) {
        return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);
    };
    return ReadPropExpr;
}(Expression));
var ReadKeyExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReadKeyExpr, _super);
    function ReadKeyExpr(receiver, index, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.receiver = receiver;
        _this.index = index;
        return _this;
    }
    ReadKeyExpr.prototype.isEquivalent = function (e) {
        return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) &&
            this.index.isEquivalent(e.index);
    };
    ReadKeyExpr.prototype.isConstant = function () { return false; };
    ReadKeyExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitReadKeyExpr(this, context);
    };
    ReadKeyExpr.prototype.set = function (value) {
        return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);
    };
    return ReadKeyExpr;
}(Expression));
var LiteralArrayExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralArrayExpr, _super);
    function LiteralArrayExpr(entries, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.entries = entries;
        return _this;
    }
    LiteralArrayExpr.prototype.isConstant = function () { return this.entries.every(function (e) { return e.isConstant(); }); };
    LiteralArrayExpr.prototype.isEquivalent = function (e) {
        return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);
    };
    LiteralArrayExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitLiteralArrayExpr(this, context);
    };
    return LiteralArrayExpr;
}(Expression));
var LiteralMapEntry = /** @class */ (function () {
    function LiteralMapEntry(key, value, quoted) {
        this.key = key;
        this.value = value;
        this.quoted = quoted;
    }
    LiteralMapEntry.prototype.isEquivalent = function (e) {
        return this.key === e.key && this.value.isEquivalent(e.value);
    };
    return LiteralMapEntry;
}());
var LiteralMapExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralMapExpr, _super);
    function LiteralMapExpr(entries, type, sourceSpan) {
        var _this = _super.call(this, type, sourceSpan) || this;
        _this.entries = entries;
        _this.valueType = null;
        if (type) {
            _this.valueType = type.valueType;
        }
        return _this;
    }
    LiteralMapExpr.prototype.isEquivalent = function (e) {
        return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);
    };
    LiteralMapExpr.prototype.isConstant = function () { return this.entries.every(function (e) { return e.value.isConstant(); }); };
    LiteralMapExpr.prototype.visitExpression = function (visitor, context) {
        return visitor.visitLiteralMapExpr(this, context);
    };
    return LiteralMapExpr;
}(Expression));
var CommaExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CommaExpr, _super);
    function CommaExpr(parts, sourceSpan) {
        var _this = _super.call(this, parts[parts.length - 1].type, sourceSpan) || this;
        _this.parts = parts;
        return _this;
    }
    CommaExpr.prototype.isEquivalent = function (e) {
        return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);
    };
    CommaExpr.prototype.isConstant = function () { return false; };
    CommaExpr.prototype.visitExpression = function (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 = /** @class */ (function () {
    function Statement(modifiers, sourceSpan) {
        this.modifiers = modifiers || [];
        this.sourceSpan = sourceSpan || null;
    }
    Statement.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };
    return Statement;
}());
var DeclareVarStmt = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DeclareVarStmt, _super);
    function DeclareVarStmt(name, value, type, modifiers, sourceSpan) {
        if (modifiers === void 0) { modifiers = null; }
        var _this = _super.call(this, modifiers, sourceSpan) || this;
        _this.name = name;
        _this.value = value;
        _this.type = type || (value && value.type) || null;
        return _this;
    }
    DeclareVarStmt.prototype.isEquivalent = function (stmt) {
        return stmt instanceof DeclareVarStmt && this.name === stmt.name &&
            (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);
    };
    DeclareVarStmt.prototype.visitStatement = function (visitor, context) {
        return visitor.visitDeclareVarStmt(this, context);
    };
    return DeclareVarStmt;
}(Statement));
var DeclareFunctionStmt = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DeclareFunctionStmt, _super);
    function DeclareFunctionStmt(name, params, statements, type, modifiers, sourceSpan) {
        if (modifiers === void 0) { modifiers = null; }
        var _this = _super.call(this, modifiers, sourceSpan) || this;
        _this.name = name;
        _this.params = params;
        _this.statements = statements;
        _this.type = type || null;
        return _this;
    }
    DeclareFunctionStmt.prototype.isEquivalent = function (stmt) {
        return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) &&
            areAllEquivalent(this.statements, stmt.statements);
    };
    DeclareFunctionStmt.prototype.visitStatement = function (visitor, context) {
        return visitor.visitDeclareFunctionStmt(this, context);
    };
    return DeclareFunctionStmt;
}(Statement));
var ExpressionStatement = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ExpressionStatement, _super);
    function ExpressionStatement(expr, sourceSpan) {
        var _this = _super.call(this, null, sourceSpan) || this;
        _this.expr = expr;
        return _this;
    }
    ExpressionStatement.prototype.isEquivalent = function (stmt) {
        return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);
    };
    ExpressionStatement.prototype.visitStatement = function (visitor, context) {
        return visitor.visitExpressionStmt(this, context);
    };
    return ExpressionStatement;
}(Statement));
var ReturnStatement = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReturnStatement, _super);
    function ReturnStatement(value, sourceSpan) {
        var _this = _super.call(this, null, sourceSpan) || this;
        _this.value = value;
        return _this;
    }
    ReturnStatement.prototype.isEquivalent = function (stmt) {
        return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);
    };
    ReturnStatement.prototype.visitStatement = function (visitor, context) {
        return visitor.visitReturnStmt(this, context);
    };
    return ReturnStatement;
}(Statement));
var AbstractClassPart = /** @class */ (function () {
    function AbstractClassPart(type, modifiers) {
        this.modifiers = modifiers;
        if (!modifiers) {
            this.modifiers = [];
        }
        this.type = type || null;
    }
    AbstractClassPart.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };
    return AbstractClassPart;
}());
var ClassField = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClassField, _super);
    function ClassField(name, type, modifiers, initializer) {
        if (modifiers === void 0) { modifiers = null; }
        var _this = _super.call(this, type, modifiers) || this;
        _this.name = name;
        _this.initializer = initializer;
        return _this;
    }
    ClassField.prototype.isEquivalent = function (f) { return this.name === f.name; };
    return ClassField;
}(AbstractClassPart));
var ClassMethod = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClassMethod, _super);
    function ClassMethod(name, params, body, type, modifiers) {
        if (modifiers === void 0) { modifiers = null; }
        var _this = _super.call(this, type, modifiers) || this;
        _this.name = name;
        _this.params = params;
        _this.body = body;
        return _this;
    }
    ClassMethod.prototype.isEquivalent = function (m) {
        return this.name === m.name && areAllEquivalent(this.body, m.body);
    };
    return ClassMethod;
}(AbstractClassPart));
var ClassGetter = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClassGetter, _super);
    function ClassGetter(name, body, type, modifiers) {
        if (modifiers === void 0) { modifiers = null; }
        var _this = _super.call(this, type, modifiers) || this;
        _this.name = name;
        _this.body = body;
        return _this;
    }
    ClassGetter.prototype.isEquivalent = function (m) {
        return this.name === m.name && areAllEquivalent(this.body, m.body);
    };
    return ClassGetter;
}(AbstractClassPart));
var ClassStmt = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClassStmt, _super);
    function ClassStmt(name, parent, fields, getters, constructorMethod, methods, modifiers, sourceSpan) {
        if (modifiers === void 0) { modifiers = null; }
        var _this = _super.call(this, modifiers, sourceSpan) || this;
        _this.name = name;
        _this.parent = parent;
        _this.fields = fields;
        _this.getters = getters;
        _this.constructorMethod = constructorMethod;
        _this.methods = methods;
        return _this;
    }
    ClassStmt.prototype.isEquivalent = function (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);
    };
    ClassStmt.prototype.visitStatement = function (visitor, context) {
        return visitor.visitDeclareClassStmt(this, context);
    };
    return ClassStmt;
}(Statement));
var IfStmt = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(IfStmt, _super);
    function IfStmt(condition, trueCase, falseCase, sourceSpan) {
        if (falseCase === void 0) { falseCase = []; }
        var _this = _super.call(this, null, sourceSpan) || this;
        _this.condition = condition;
        _this.trueCase = trueCase;
        _this.falseCase = falseCase;
        return _this;
    }
    IfStmt.prototype.isEquivalent = function (stmt) {
        return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) &&
            areAllEquivalent(this.trueCase, stmt.trueCase) &&
            areAllEquivalent(this.falseCase, stmt.falseCase);
    };
    IfStmt.prototype.visitStatement = function (visitor, context) {
        return visitor.visitIfStmt(this, context);
    };
    return IfStmt;
}(Statement));
var CommentStmt = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CommentStmt, _super);
    function CommentStmt(comment, multiline, sourceSpan) {
        if (multiline === void 0) { multiline = false; }
        var _this = _super.call(this, null, sourceSpan) || this;
        _this.comment = comment;
        _this.multiline = multiline;
        return _this;
    }
    CommentStmt.prototype.isEquivalent = function (stmt) { return stmt instanceof CommentStmt; };
    CommentStmt.prototype.visitStatement = function (visitor, context) {
        return visitor.visitCommentStmt(this, context);
    };
    return CommentStmt;
}(Statement));
var JSDocCommentStmt = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(JSDocCommentStmt, _super);
    function JSDocCommentStmt(tags, sourceSpan) {
        if (tags === void 0) { tags = []; }
        var _this = _super.call(this, null, sourceSpan) || this;
        _this.tags = tags;
        return _this;
    }
    JSDocCommentStmt.prototype.isEquivalent = function (stmt) {
        return stmt instanceof JSDocCommentStmt && this.toString() === stmt.toString();
    };
    JSDocCommentStmt.prototype.visitStatement = function (visitor, context) {
        return visitor.visitJSDocCommentStmt(this, context);
    };
    JSDocCommentStmt.prototype.toString = function () { return serializeTags(this.tags); };
    return JSDocCommentStmt;
}(Statement));
var TryCatchStmt = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TryCatchStmt, _super);
    function TryCatchStmt(bodyStmts, catchStmts, sourceSpan) {
        var _this = _super.call(this, null, sourceSpan) || this;
        _this.bodyStmts = bodyStmts;
        _this.catchStmts = catchStmts;
        return _this;
    }
    TryCatchStmt.prototype.isEquivalent = function (stmt) {
        return stmt instanceof TryCatchStmt && areAllEquivalent(this.bodyStmts, stmt.bodyStmts) &&
            areAllEquivalent(this.catchStmts, stmt.catchStmts);
    };
    TryCatchStmt.prototype.visitStatement = function (visitor, context) {
        return visitor.visitTryCatchStmt(this, context);
    };
    return TryCatchStmt;
}(Statement));
var ThrowStmt = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ThrowStmt, _super);
    function ThrowStmt(error, sourceSpan) {
        var _this = _super.call(this, null, sourceSpan) || this;
        _this.error = error;
        return _this;
    }
    ThrowStmt.prototype.isEquivalent = function (stmt) {
        return stmt instanceof TryCatchStmt && this.error.isEquivalent(stmt.error);
    };
    ThrowStmt.prototype.visitStatement = function (visitor, context) {
        return visitor.visitThrowStmt(this, context);
    };
    return ThrowStmt;
}(Statement));
var AstTransformer = /** @class */ (function () {
    function AstTransformer() {
    }
    AstTransformer.prototype.transformExpr = function (expr, context) { return expr; };
    AstTransformer.prototype.transformStmt = function (stmt, context) { return stmt; };
    AstTransformer.prototype.visitReadVarExpr = function (ast, context) { return this.transformExpr(ast, context); };
    AstTransformer.prototype.visitWrappedNodeExpr = function (ast, context) {
        return this.transformExpr(ast, context);
    };
    AstTransformer.prototype.visitTypeofExpr = function (expr, context) {
        return this.transformExpr(new TypeofExpr(expr.expr.visitExpression(this, context), expr.type, expr.sourceSpan), context);
    };
    AstTransformer.prototype.visitWriteVarExpr = function (expr, context) {
        return this.transformExpr(new WriteVarExpr(expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
    };
    AstTransformer.prototype.visitWriteKeyExpr = function (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);
    };
    AstTransformer.prototype.visitWritePropExpr = function (expr, context) {
        return this.transformExpr(new WritePropExpr(expr.receiver.visitExpression(this, context), expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
    };
    AstTransformer.prototype.visitInvokeMethodExpr = function (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);
    };
    AstTransformer.prototype.visitInvokeFunctionExpr = function (ast, context) {
        return this.transformExpr(new InvokeFunctionExpr(ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitInstantiateExpr = function (ast, context) {
        return this.transformExpr(new InstantiateExpr(ast.classExpr.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitLiteralExpr = function (ast, context) { return this.transformExpr(ast, context); };
    AstTransformer.prototype.visitExternalExpr = function (ast, context) {
        return this.transformExpr(ast, context);
    };
    AstTransformer.prototype.visitConditionalExpr = function (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);
    };
    AstTransformer.prototype.visitNotExpr = function (ast, context) {
        return this.transformExpr(new NotExpr(ast.condition.visitExpression(this, context), ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitAssertNotNullExpr = function (ast, context) {
        return this.transformExpr(new AssertNotNull(ast.condition.visitExpression(this, context), ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitCastExpr = function (ast, context) {
        return this.transformExpr(new CastExpr(ast.value.visitExpression(this, context), ast.type, ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitFunctionExpr = function (ast, context) {
        return this.transformExpr(new FunctionExpr(ast.params, this.visitAllStatements(ast.statements, context), ast.type, ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitBinaryOperatorExpr = function (ast, context) {
        return this.transformExpr(new BinaryOperatorExpr(ast.operator, ast.lhs.visitExpression(this, context), ast.rhs.visitExpression(this, context), ast.type, ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitReadPropExpr = function (ast, context) {
        return this.transformExpr(new ReadPropExpr(ast.receiver.visitExpression(this, context), ast.name, ast.type, ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitReadKeyExpr = function (ast, context) {
        return this.transformExpr(new ReadKeyExpr(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context), ast.type, ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitLiteralArrayExpr = function (ast, context) {
        return this.transformExpr(new LiteralArrayExpr(this.visitAllExpressions(ast.entries, context), ast.type, ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitLiteralMapExpr = function (ast, context) {
        var _this = this;
        var entries = ast.entries.map(function (entry) { return new LiteralMapEntry(entry.key, entry.value.visitExpression(_this, context), entry.quoted); });
        var mapType = new MapType(ast.valueType, null);
        return this.transformExpr(new LiteralMapExpr(entries, mapType, ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitCommaExpr = function (ast, context) {
        return this.transformExpr(new CommaExpr(this.visitAllExpressions(ast.parts, context), ast.sourceSpan), context);
    };
    AstTransformer.prototype.visitAllExpressions = function (exprs, context) {
        var _this = this;
        return exprs.map(function (expr) { return expr.visitExpression(_this, context); });
    };
    AstTransformer.prototype.visitDeclareVarStmt = function (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);
    };
    AstTransformer.prototype.visitDeclareFunctionStmt = function (stmt, context) {
        return this.transformStmt(new DeclareFunctionStmt(stmt.name, stmt.params, this.visitAllStatements(stmt.statements, context), stmt.type, stmt.modifiers, stmt.sourceSpan), context);
    };
    AstTransformer.prototype.visitExpressionStmt = function (stmt, context) {
        return this.transformStmt(new ExpressionStatement(stmt.expr.visitExpression(this, context), stmt.sourceSpan), context);
    };
    AstTransformer.prototype.visitReturnStmt = function (stmt, context) {
        return this.transformStmt(new ReturnStatement(stmt.value.visitExpression(this, context), stmt.sourceSpan), context);
    };
    AstTransformer.prototype.visitDeclareClassStmt = function (stmt, context) {
        var _this = this;
        var parent = stmt.parent.visitExpression(this, context);
        var getters = stmt.getters.map(function (getter) { return new ClassGetter(getter.name, _this.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, _this.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);
    };
    AstTransformer.prototype.visitIfStmt = function (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);
    };
    AstTransformer.prototype.visitTryCatchStmt = function (stmt, context) {
        return this.transformStmt(new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts, context), this.visitAllStatements(stmt.catchStmts, context), stmt.sourceSpan), context);
    };
    AstTransformer.prototype.visitThrowStmt = function (stmt, context) {
        return this.transformStmt(new ThrowStmt(stmt.error.visitExpression(this, context), stmt.sourceSpan), context);
    };
    AstTransformer.prototype.visitCommentStmt = function (stmt, context) {
        return this.transformStmt(stmt, context);
    };
    AstTransformer.prototype.visitJSDocCommentStmt = function (stmt, context) {
        return this.transformStmt(stmt, context);
    };
    AstTransformer.prototype.visitAllStatements = function (stmts, context) {
        var _this = this;
        return stmts.map(function (stmt) { return stmt.visitStatement(_this, context); });
    };
    return AstTransformer;
}());
var RecursiveAstVisitor = /** @class */ (function () {
    function RecursiveAstVisitor() {
    }
    RecursiveAstVisitor.prototype.visitType = function (ast, context) { return ast; };
    RecursiveAstVisitor.prototype.visitExpression = function (ast, context) {
        if (ast.type) {
            ast.type.visitType(this, context);
        }
        return ast;
    };
    RecursiveAstVisitor.prototype.visitBuiltinType = function (type, context) { return this.visitType(type, context); };
    RecursiveAstVisitor.prototype.visitExpressionType = function (type, context) {
        var _this = this;
        type.value.visitExpression(this, context);
        if (type.typeParams !== null) {
            type.typeParams.forEach(function (param) { return _this.visitType(param, context); });
        }
        return this.visitType(type, context);
    };
    RecursiveAstVisitor.prototype.visitArrayType = function (type, context) { return this.visitType(type, context); };
    RecursiveAstVisitor.prototype.visitMapType = function (type, context) { return this.visitType(type, context); };
    RecursiveAstVisitor.prototype.visitWrappedNodeExpr = function (ast, context) { return ast; };
    RecursiveAstVisitor.prototype.visitTypeofExpr = function (ast, context) { return this.visitExpression(ast, context); };
    RecursiveAstVisitor.prototype.visitReadVarExpr = function (ast, context) {
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitWriteVarExpr = function (ast, context) {
        ast.value.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitWriteKeyExpr = function (ast, context) {
        ast.receiver.visitExpression(this, context);
        ast.index.visitExpression(this, context);
        ast.value.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitWritePropExpr = function (ast, context) {
        ast.receiver.visitExpression(this, context);
        ast.value.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitInvokeMethodExpr = function (ast, context) {
        ast.receiver.visitExpression(this, context);
        this.visitAllExpressions(ast.args, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitInvokeFunctionExpr = function (ast, context) {
        ast.fn.visitExpression(this, context);
        this.visitAllExpressions(ast.args, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitInstantiateExpr = function (ast, context) {
        ast.classExpr.visitExpression(this, context);
        this.visitAllExpressions(ast.args, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitLiteralExpr = function (ast, context) {
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitExternalExpr = function (ast, context) {
        var _this = this;
        if (ast.typeParams) {
            ast.typeParams.forEach(function (type) { return type.visitType(_this, context); });
        }
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitConditionalExpr = function (ast, context) {
        ast.condition.visitExpression(this, context);
        ast.trueCase.visitExpression(this, context);
        ast.falseCase.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitNotExpr = function (ast, context) {
        ast.condition.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitAssertNotNullExpr = function (ast, context) {
        ast.condition.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitCastExpr = function (ast, context) {
        ast.value.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitFunctionExpr = function (ast, context) {
        this.visitAllStatements(ast.statements, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitBinaryOperatorExpr = function (ast, context) {
        ast.lhs.visitExpression(this, context);
        ast.rhs.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitReadPropExpr = function (ast, context) {
        ast.receiver.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitReadKeyExpr = function (ast, context) {
        ast.receiver.visitExpression(this, context);
        ast.index.visitExpression(this, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitLiteralArrayExpr = function (ast, context) {
        this.visitAllExpressions(ast.entries, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitLiteralMapExpr = function (ast, context) {
        var _this = this;
        ast.entries.forEach(function (entry) { return entry.value.visitExpression(_this, context); });
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitCommaExpr = function (ast, context) {
        this.visitAllExpressions(ast.parts, context);
        return this.visitExpression(ast, context);
    };
    RecursiveAstVisitor.prototype.visitAllExpressions = function (exprs, context) {
        var _this = this;
        exprs.forEach(function (expr) { return expr.visitExpression(_this, context); });
    };
    RecursiveAstVisitor.prototype.visitDeclareVarStmt = function (stmt, context) {
        if (stmt.value) {
            stmt.value.visitExpression(this, context);
        }
        if (stmt.type) {
            stmt.type.visitType(this, context);
        }
        return stmt;
    };
    RecursiveAstVisitor.prototype.visitDeclareFunctionStmt = function (stmt, context) {
        this.visitAllStatements(stmt.statements, context);
        if (stmt.type) {
            stmt.type.visitType(this, context);
        }
        return stmt;
    };
    RecursiveAstVisitor.prototype.visitExpressionStmt = function (stmt, context) {
        stmt.expr.visitExpression(this, context);
        return stmt;
    };
    RecursiveAstVisitor.prototype.visitReturnStmt = function (stmt, context) {
        stmt.value.visitExpression(this, context);
        return stmt;
    };
    RecursiveAstVisitor.prototype.visitDeclareClassStmt = function (stmt, context) {
        var _this = this;
        stmt.parent.visitExpression(this, context);
        stmt.getters.forEach(function (getter) { return _this.visitAllStatements(getter.body, context); });
        if (stmt.constructorMethod) {
            this.visitAllStatements(stmt.constructorMethod.body, context);
        }
        stmt.methods.forEach(function (method) { return _this.visitAllStatements(method.body, context); });
        return stmt;
    };
    RecursiveAstVisitor.prototype.visitIfStmt = function (stmt, context) {
        stmt.condition.visitExpression(this, context);
        this.visitAllStatements(stmt.trueCase, context);
        this.visitAllStatements(stmt.falseCase, context);
        return stmt;
    };
    RecursiveAstVisitor.prototype.visitTryCatchStmt = function (stmt, context) {
        this.visitAllStatements(stmt.bodyStmts, context);
        this.visitAllStatements(stmt.catchStmts, context);
        return stmt;
    };
    RecursiveAstVisitor.prototype.visitThrowStmt = function (stmt, context) {
        stmt.error.visitExpression(this, context);
        return stmt;
    };
    RecursiveAstVisitor.prototype.visitCommentStmt = function (stmt, context) { return stmt; };
    RecursiveAstVisitor.prototype.visitJSDocCommentStmt = function (stmt, context) { return stmt; };
    RecursiveAstVisitor.prototype.visitAllStatements = function (stmts, context) {
        var _this = this;
        stmts.forEach(function (stmt) { return stmt.visitStatement(_this, context); });
    };
    return RecursiveAstVisitor;
}());
function findReadVarNames(stmts) {
    var visitor = new _ReadVarVisitor();
    visitor.visitAllStatements(stmts, null);
    return visitor.varNames;
}
var _ReadVarVisitor = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_ReadVarVisitor, _super);
    function _ReadVarVisitor() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.varNames = new Set();
        return _this;
    }
    _ReadVarVisitor.prototype.visitDeclareFunctionStmt = function (stmt, context) {
        // Don't descend into nested functions
        return stmt;
    };
    _ReadVarVisitor.prototype.visitDeclareClassStmt = function (stmt, context) {
        // Don't descend into nested classes
        return stmt;
    };
    _ReadVarVisitor.prototype.visitReadVarExpr = function (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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_FindExternalReferencesVisitor, _super);
    function _FindExternalReferencesVisitor() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.externalReferences = [];
        return _this;
    }
    _FindExternalReferencesVisitor.prototype.visitExternalExpr = function (e, context) {
        this.externalReferences.push(e.value);
        return _super.prototype.visitExternalExpr.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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_ApplySourceSpanTransformer, _super);
    function _ApplySourceSpanTransformer(sourceSpan) {
        var _this = _super.call(this) || this;
        _this.sourceSpan = sourceSpan;
        return _this;
    }
    _ApplySourceSpanTransformer.prototype._clone = function (obj) {
        var clone = Object.create(obj.constructor.prototype);
        for (var prop in obj) {
            clone[prop] = obj[prop];
        }
        return clone;
    };
    _ApplySourceSpanTransformer.prototype.transformExpr = function (expr, context) {
        if (!expr.sourceSpan) {
            expr = this._clone(expr);
            expr.sourceSpan = this.sourceSpan;
        }
        return expr;
    };
    _ApplySourceSpanTransformer.prototype.transformStmt = function (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, typeParams, sourceSpan) {
    if (typeParams === void 0) { typeParams = null; }
    return new ExternalExpr(id, null, typeParams, sourceSpan);
}
function importType(id, typeParams, typeModifiers) {
    if (typeParams === void 0) { typeParams = null; }
    if (typeModifiers === void 0) { typeModifiers = null; }
    return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;
}
function expressionType(expr, typeModifiers, typeParams) {
    if (typeModifiers === void 0) { typeModifiers = null; }
    if (typeParams === void 0) { typeParams = 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, type) {
    if (type === void 0) { type = 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 += " @" + 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) {
    var e_1, _a;
    if (tags.length === 0)
        return '';
    var out = '*\n';
    try {
        for (var tags_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(tags), tags_1_1 = tags_1.next(); !tags_1_1.done; tags_1_1 = tags_1.next()) {
            var tag = tags_1_1.value;
            out += ' *';
            // If the tagToString is multi-line, insert " * " prefixes on subsequent lines.
            out += tagToString(tag).replace(/\n/g, '\n * ');
            out += '\n';
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (tags_1_1 && !tags_1_1.done && (_a = tags_1.return)) _a.call(tags_1);
        }
        finally { if (e_1) throw e_1.error; }
    }
    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
 */
/** 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-';
/** Placeholder wrapper for i18n expressions **/
var I18N_PLACEHOLDER_SYMBOL = '�';
// Parse i18n metas like:
// - "@@id",
// - "description[@@id]",
// - "meaning|description[@@id]"
function parseI18nMeta(meta) {
    var _a, _b;
    var id;
    var meaning;
    var description;
    if (meta) {
        var idIndex = meta.indexOf(I18N_ID_SEPARATOR);
        var descIndex = meta.indexOf(I18N_MEANING_SEPARATOR);
        var meaningAndDesc = void 0;
        _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])((idIndex > -1) ? [meta.slice(0, idIndex), meta.slice(idIndex + 2)] : [meta, ''], 2), meaningAndDesc = _a[0], id = _a[1];
        _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])((descIndex > -1) ?
            [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :
            ['', meaningAndDesc], 2), meaning = _b[0], description = _b[1];
    }
    return { id: id, meaning: meaning, description: description };
}
function isI18NAttribute(name) {
    return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);
}
function wrapI18nPlaceholder(content, contextId) {
    if (contextId === void 0) { contextId = 0; }
    var blockId = contextId > 0 ? ":" + contextId : '';
    return "" + I18N_PLACEHOLDER_SYMBOL + content + blockId + I18N_PLACEHOLDER_SYMBOL;
}
function assembleI18nBoundString(strings, bindingStartIndex, contextId) {
    if (bindingStartIndex === void 0) { bindingStartIndex = 0; }
    if (contextId === void 0) { contextId = 0; }
    if (!strings.length)
        return '';
    var acc = '';
    var lastIdx = strings.length - 1;
    for (var i = 0; i < lastIdx; i++) {
        acc += "" + strings[i] + wrapI18nPlaceholder(bindingStartIndex + i, contextId);
    }
    acc += strings[lastIdx];
    return acc;
}
function getSeqNumberGenerator(startsAt) {
    if (startsAt === void 0) { startsAt = 0; }
    var current = startsAt;
    return function () { return current++; };
}
/**
 * I18nContext is a helper class which keeps track of all i18n-related aspects
 * (accumulates content, 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.
 */
var I18nContext = /** @class */ (function () {
    function I18nContext(index, templateIndex, ref, level, uniqueIdGen) {
        if (level === void 0) { level = 0; }
        this.index = index;
        this.templateIndex = templateIndex;
        this.ref = ref;
        this.level = level;
        this.uniqueIdGen = uniqueIdGen;
        this.content = '';
        this.bindings = new Set();
        this.uniqueIdGen = uniqueIdGen || getSeqNumberGenerator();
        this.id = this.uniqueIdGen();
    }
    I18nContext.prototype.wrap = function (symbol, elementIndex, contextId, closed) {
        var state = closed ? '/' : '';
        return wrapI18nPlaceholder("" + state + symbol + elementIndex, contextId);
    };
    I18nContext.prototype.append = function (content) { this.content += content; };
    I18nContext.prototype.genTemplatePattern = function (contextId, templateId) {
        return wrapI18nPlaceholder("tmpl:" + contextId + ":" + templateId);
    };
    I18nContext.prototype.getId = function () { return this.id; };
    I18nContext.prototype.getRef = function () { return this.ref; };
    I18nContext.prototype.getIndex = function () { return this.index; };
    I18nContext.prototype.getContent = function () { return this.content; };
    I18nContext.prototype.getTemplateIndex = function () { return this.templateIndex; };
    I18nContext.prototype.getBindings = function () { return this.bindings; };
    I18nContext.prototype.appendBinding = function (binding) { this.bindings.add(binding); };
    I18nContext.prototype.isRoot = function () { return this.level === 0; };
    I18nContext.prototype.isResolved = function () {
        var regex = new RegExp(this.genTemplatePattern('\\d+', '\\d+'));
        return !regex.test(this.content);
    };
    I18nContext.prototype.appendText = function (content) { this.append(content.trim()); };
    I18nContext.prototype.appendTemplate = function (index) { this.append(this.genTemplatePattern(this.id, index)); };
    I18nContext.prototype.appendElement = function (elementIndex, closed) {
        this.append(this.wrap('#', elementIndex, this.id, closed));
    };
    I18nContext.prototype.forkChildContext = function (index, templateIndex) {
        return new I18nContext(index, templateIndex, this.ref, this.level + 1, this.uniqueIdGen);
    };
    I18nContext.prototype.reconcileChildContext = function (context) {
        var id = context.getId();
        var content = context.getContent();
        var templateIndex = context.getTemplateIndex();
        var pattern = new RegExp(this.genTemplatePattern(this.id, templateIndex));
        var replacement = "" + this.wrap('*', templateIndex, id) + content + this.wrap('*', templateIndex, id, true);
        this.content = this.content.replace(pattern, replacement);
    };
    return I18nContext;
}());

/**
 * @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 () {
        var m = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            m[_i] = arguments[_i];
        }
        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 = /** @class */ (function () {
    function ValueTransformer() {
    }
    ValueTransformer.prototype.visitArray = function (arr, context) {
        var _this = this;
        return arr.map(function (value) { return visitValue(value, _this, context); });
    };
    ValueTransformer.prototype.visitStringMap = function (map, context) {
        var _this = this;
        var result = {};
        Object.keys(map).forEach(function (key) { result[key] = visitValue(map[key], _this, context); });
        return result;
    };
    ValueTransformer.prototype.visitPrimitive = function (value, context) { return value; };
    ValueTransformer.prototype.visitOther = function (value, context) { return value; };
    return ValueTransformer;
}());
var SyncAsync = {
    assertSync: function (value) {
        if (isPromise(value)) {
            throw new Error("Illegal state: value cannot be a promise");
        }
        return value;
    },
    then: function (value, cb) { return isPromise(value) ? value.then(cb) : cb(value); },
    all: function (syncAsyncValues) {
        return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : syncAsyncValues;
    }
};
function error(msg) {
    throw new Error("Internal Error: " + 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 "" + token.overriddenName;
    }
    if (token.name) {
        return "" + token.name;
    }
    // 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 = /** @class */ (function () {
    function Version(full) {
        this.full = full;
        var splits = full.split('.');
        this.major = splits[0];
        this.minor = splits[1];
        this.patch = splits.slice(2).join('.');
    }
    return Version;
}());
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';
// Closure variables holding messages must be named `MSG_[A-Z0-9]+`
var TRANSLATION_PREFIX = 'MSG_';
/**
 * Closure uses `goog.getMsg(message)` to lookup translations
 */
var GOOG_GET_MSG = 'goog.getMsg';
/**
 * 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FixupExpression, _super);
    function FixupExpression(resolved) {
        var _this = _super.call(this, resolved.type) || this;
        _this.resolved = resolved;
        _this.original = resolved;
        return _this;
    }
    FixupExpression.prototype.visitExpression = function (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);
        }
    };
    FixupExpression.prototype.isEquivalent = function (e) {
        return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);
    };
    FixupExpression.prototype.isConstant = function () { return true; };
    FixupExpression.prototype.fixup = function (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 = /** @class */ (function () {
    function ConstantPool() {
        this.statements = [];
        this.translations = new Map();
        this.deferredTranslations = new Map();
        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;
    }
    ConstantPool.prototype.getConstLiteral = function (literal$$1, forceShared) {
        if (literal$$1 instanceof LiteralExpr || literal$$1 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$$1;
        }
        var key = this.keyOf(literal$$1);
        var fixup = this.literals.get(key);
        var newValue = false;
        if (!fixup) {
            fixup = new FixupExpression(literal$$1);
            this.literals.set(key, fixup);
            newValue = true;
        }
        if ((!newValue && !fixup.shared) || (newValue && forceShared)) {
            // Replace the expression with a variable
            var name_1 = this.freshName();
            this.statements.push(variable(name_1).set(literal$$1).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
            fixup.fixup(variable(name_1));
        }
        return fixup;
    };
    ConstantPool.prototype.getDeferredTranslationConst = function (suffix) {
        var index = this.statements.push(new ExpressionStatement(NULL_EXPR)) - 1;
        var variable$$1 = variable(this.freshTranslationName(suffix));
        this.deferredTranslations.set(variable$$1, index);
        return variable$$1;
    };
    ConstantPool.prototype.setDeferredTranslationConst = function (variable$$1, message) {
        var index = this.deferredTranslations.get(variable$$1);
        this.statements[index] = this.getTranslationDeclStmt(variable$$1, message);
    };
    ConstantPool.prototype.getTranslationDeclStmt = function (variable$$1, message) {
        var fnCall = variable(GOOG_GET_MSG).callFn([literal(message)]);
        return variable$$1.set(fnCall).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]);
    };
    ConstantPool.prototype.appendTranslationMeta = function (meta) {
        var parsedMeta = typeof meta === 'string' ? parseI18nMeta(meta) : meta;
        var docStmt = i18nMetaToDocStmt(parsedMeta);
        if (docStmt) {
            this.statements.push(docStmt);
        }
    };
    // Generates closure specific code for translation.
    //
    // ```
    // /**
    //  * @desc description?
    //  * @meaning meaning?
    //  */
    // const MSG_XYZ = goog.getMsg('message');
    // ```
    ConstantPool.prototype.getTranslation = function (message, meta, suffix) {
        var parsedMeta = parseI18nMeta(meta);
        // The identity of an i18n message depends on the message and its meaning
        var key = parsedMeta.meaning ? message + "\0\0" + parsedMeta.meaning : message;
        var exp = this.translations.get(key);
        if (exp) {
            return exp;
        }
        var variable$$1 = variable(this.freshTranslationName(suffix));
        this.appendTranslationMeta(parsedMeta);
        this.statements.push(this.getTranslationDeclStmt(variable$$1, message));
        this.translations.set(key, variable$$1);
        return variable$$1;
    };
    ConstantPool.prototype.getDefinition = function (type, kind, ctx, forceShared) {
        if (forceShared === void 0) { forceShared = 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_2 = this.freshName();
            this.statements.push(variable(name_2).set(fixup.resolved).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
            fixup.fixup(variable(name_2));
        }
        return fixup;
    };
    ConstantPool.prototype.getLiteralFactory = function (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 key = this.keyOf(expressionForKey);
            return this._getLiteralFactory(key, 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
            }); })); });
        }
    };
    ConstantPool.prototype._getLiteralFactory = function (key, values, resultMap) {
        var _this = 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() ? _this.getConstLiteral(e, true) : variable("a" + 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_3 = this.freshName();
            this.statements.push(variable(name_3).set(pureFunctionDeclaration).toDeclStmt(INFERRED_TYPE, [
                StmtModifier.Final
            ]));
            literalFactory = variable(name_3);
            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.
     */
    ConstantPool.prototype.uniqueName = function (prefix) { return "" + prefix + this.nextNameIndex++; };
    ConstantPool.prototype.definitionsOf = function (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 " + kind);
        return this.componentDefinitions;
    };
    ConstantPool.prototype.propertyNameOf = function (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 " + kind);
        return '<unknown>';
    };
    ConstantPool.prototype.freshName = function () { return this.uniqueName(CONSTANT_PREFIX); };
    ConstantPool.prototype.freshTranslationName = function (suffix) {
        return this.uniqueName(TRANSLATION_PREFIX + suffix).toUpperCase();
    };
    ConstantPool.prototype.keyOf = function (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 = /** @class */ (function () {
    function 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;
    }
    KeyVisitor.prototype.visitLiteralExpr = function (ast) {
        return "" + (typeof ast.value === 'string' ? '"' + ast.value + '"' : ast.value);
    };
    KeyVisitor.prototype.visitLiteralArrayExpr = function (ast, context) {
        var _this = this;
        return "[" + ast.entries.map(function (entry) { return entry.visitExpression(_this, context); }).join(',') + "]";
    };
    KeyVisitor.prototype.visitLiteralMapExpr = function (ast, context) {
        var _this = this;
        var mapKey = function (entry) {
            var quote = entry.quoted ? '"' : '';
            return "" + quote + entry.key + quote;
        };
        var mapEntry = function (entry) {
            return mapKey(entry) + ":" + entry.value.visitExpression(_this, context);
        };
        return "{" + ast.entries.map(mapEntry).join(',');
    };
    KeyVisitor.prototype.visitExternalExpr = function (ast) {
        return ast.value.moduleName ? "EX:" + ast.value.moduleName + ":" + ast.value.name :
            "EX:" + ast.value.runtime.name;
    };
    KeyVisitor.prototype.visitReadVarExpr = function (node) { return "VAR:" + node.name; };
    KeyVisitor.prototype.visitTypeofExpr = function (node, context) {
        return "TYPEOF:" + node.expr.visitExpression(this, context);
    };
    return KeyVisitor;
}());
function invalid(arg) {
    throw new Error("Invalid state: Visitor " + this.constructor.name + " doesn't handle " + arg.constructor.name);
}
function isVariable(e) {
    return e instanceof ReadVarExpr;
}
// Converts i18n meta informations for a message (id, description, meaning)
// to a JsDoc statement formatted as expected by the Closure compiler.
function i18nMetaToDocStmt(meta) {
    var tags = [];
    if (meta.id || meta.description) {
        var text = meta.id ? "[BACKUP_MESSAGE_ID:" + meta.id + "] " + meta.description : meta.description;
        tags.push({ tagName: "desc" /* Desc */, text: text.trim() });
    }
    if (meta.meaning) {
        tags.push({ tagName: "meaning" /* Meaning */, text: meta.meaning });
    }
    return tags.length == 0 ? null : new JSDocCommentStmt(tags);
}

/**
 * @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 = /** @class */ (function () {
    function 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 };
    return Identifiers;
}());
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 = /** @class */ (function () {
    function StaticSymbol(filePath, name, members) {
        this.filePath = filePath;
        this.name = name;
        this.members = members;
    }
    StaticSymbol.prototype.assertNoMembers = function () {
        if (this.members.length) {
            throw new Error("Illegal state: symbol without members expected, but got " + 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 = /** @class */ (function () {
    function StaticSymbolCache() {
        this.cache = new Map();
    }
    StaticSymbolCache.prototype.get = function (declarationFile, name, members) {
        members = members || [];
        var memberSuffix = members.length ? "." + members.join('.') : '';
        var key = "\"" + declarationFile + "\"." + name + 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_" + _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 "./" + stringify(ref);
}
function viewClassName(compType, embeddedTemplateIndex) {
    return "View_" + identifierName({ reference: compType }) + "_" + embeddedTemplateIndex;
}
function rendererTypeName(compType) {
    return "RenderType_" + identifierName({ reference: compType });
}
function hostViewClassName(compType) {
    return "HostView_" + identifierName({ reference: compType });
}
function componentFactoryName(compType) {
    return 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 = /** @class */ (function () {
    function CompileStylesheetMetadata(_a) {
        var _b = _a === void 0 ? {} : _a, moduleUrl = _b.moduleUrl, styles = _b.styles, styleUrls = _b.styleUrls;
        this.moduleUrl = moduleUrl || null;
        this.styles = _normalizeArray(styles);
        this.styleUrls = _normalizeArray(styleUrls);
    }
    return CompileStylesheetMetadata;
}());
/**
 * Metadata regarding compilation of a template.
 */
var CompileTemplateMetadata = /** @class */ (function () {
    function CompileTemplateMetadata(_a) {
        var encapsulation = _a.encapsulation, template = _a.template, templateUrl = _a.templateUrl, htmlAst = _a.htmlAst, styles = _a.styles, styleUrls = _a.styleUrls, externalStylesheets = _a.externalStylesheets, animations = _a.animations, ngContentSelectors = _a.ngContentSelectors, interpolation = _a.interpolation, isInline = _a.isInline, preserveWhitespaces = _a.preserveWhitespaces;
        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;
    }
    CompileTemplateMetadata.prototype.toSummary = function () {
        return {
            ngContentSelectors: this.ngContentSelectors,
            encapsulation: this.encapsulation,
            styles: this.styles,
            animations: this.animations
        };
    };
    return CompileTemplateMetadata;
}());
/**
 * Metadata regarding compilation of a directive.
 */
var CompileDirectiveMetadata = /** @class */ (function () {
    function CompileDirectiveMetadata(_a) {
        var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, hostListeners = _a.hostListeners, hostProperties = _a.hostProperties, hostAttributes = _a.hostAttributes, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;
        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;
    }
    CompileDirectiveMetadata.create = function (_a) {
        var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, host = _a.host, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.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,
        });
    };
    CompileDirectiveMetadata.prototype.toSummary = function () {
        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 = /** @class */ (function () {
    function CompilePipeMetadata(_a) {
        var type = _a.type, name = _a.name, pure = _a.pure;
        this.type = type;
        this.name = name;
        this.pure = !!pure;
    }
    CompilePipeMetadata.prototype.toSummary = function () {
        return {
            summaryKind: CompileSummaryKind.Pipe,
            type: this.type,
            name: this.name,
            pure: this.pure
        };
    };
    return CompilePipeMetadata;
}());
var CompileShallowModuleMetadata = /** @class */ (function () {
    function CompileShallowModuleMetadata() {
    }
    return CompileShallowModuleMetadata;
}());
/**
 * Metadata regarding compilation of a module.
 */
var CompileNgModuleMetadata = /** @class */ (function () {
    function CompileNgModuleMetadata(_a) {
        var type = _a.type, providers = _a.providers, declaredDirectives = _a.declaredDirectives, exportedDirectives = _a.exportedDirectives, declaredPipes = _a.declaredPipes, exportedPipes = _a.exportedPipes, entryComponents = _a.entryComponents, bootstrapComponents = _a.bootstrapComponents, importedModules = _a.importedModules, exportedModules = _a.exportedModules, schemas = _a.schemas, transitiveModule = _a.transitiveModule, id = _a.id;
        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;
    }
    CompileNgModuleMetadata.prototype.toSummary = function () {
        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 = /** @class */ (function () {
    function 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 = [];
    }
    TransitiveCompileNgModuleMetadata.prototype.addProvider = function (provider, module) {
        this.providers.push({ provider: provider, module: module });
    };
    TransitiveCompileNgModuleMetadata.prototype.addDirective = function (id) {
        if (!this.directivesSet.has(id.reference)) {
            this.directivesSet.add(id.reference);
            this.directives.push(id);
        }
    };
    TransitiveCompileNgModuleMetadata.prototype.addExportedDirective = function (id) {
        if (!this.exportedDirectivesSet.has(id.reference)) {
            this.exportedDirectivesSet.add(id.reference);
            this.exportedDirectives.push(id);
        }
    };
    TransitiveCompileNgModuleMetadata.prototype.addPipe = function (id) {
        if (!this.pipesSet.has(id.reference)) {
            this.pipesSet.add(id.reference);
            this.pipes.push(id);
        }
    };
    TransitiveCompileNgModuleMetadata.prototype.addExportedPipe = function (id) {
        if (!this.exportedPipesSet.has(id.reference)) {
            this.exportedPipesSet.add(id.reference);
            this.exportedPipes.push(id);
        }
    };
    TransitiveCompileNgModuleMetadata.prototype.addModule = function (id) {
        if (!this.modulesSet.has(id.reference)) {
            this.modulesSet.add(id.reference);
            this.modules.push(id);
        }
    };
    TransitiveCompileNgModuleMetadata.prototype.addEntryComponent = function (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 = /** @class */ (function () {
    function ProviderMeta(token, _a) {
        var useClass = _a.useClass, useValue = _a.useValue, useExisting = _a.useExisting, useFactory = _a.useFactory, deps = _a.deps, multi = _a.multi;
        this.token = token;
        this.useClass = useClass || null;
        this.useValue = useValue;
        this.useExisting = useExisting;
        this.useFactory = useFactory || null;
        this.dependencies = deps || null;
        this.multi = !!multi;
    }
    return ProviderMeta;
}());
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 = compMeta.type.reference.filePath + "." + compMeta.type.reference.name + ".html";
        }
        else {
            url = identifierName(ngModuleType) + "/" + 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/" + id + baseName + ".ngstyle.js");
}
function ngModuleJitUrl(moduleMeta) {
    return jitSourceUrl(identifierName(moduleMeta.type) + "/module.ngfactory.js");
}
function templateJitUrl(ngModuleType, compMeta) {
    return jitSourceUrl(identifierName(ngModuleType) + "/" + 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 = /** @class */ (function () {
    function Identifiers() {
    }
    /* Methods */
    Identifiers.NEW_METHOD = 'factory';
    Identifiers.TRANSFORM_METHOD = 'transform';
    Identifiers.PATCH_DEPS = 'patchedDeps';
    /* Instructions */
    Identifiers.namespaceHTML = { name: 'ɵnamespaceHTML', moduleName: CORE$1 };
    Identifiers.namespaceMathML = { name: 'ɵnamespaceMathML', moduleName: CORE$1 };
    Identifiers.namespaceSVG = { name: 'ɵnamespaceSVG', moduleName: CORE$1 };
    Identifiers.element = { name: 'ɵelement', moduleName: CORE$1 };
    Identifiers.elementStart = { name: 'ɵelementStart', moduleName: CORE$1 };
    Identifiers.elementEnd = { name: 'ɵelementEnd', moduleName: CORE$1 };
    Identifiers.elementProperty = { name: 'ɵelementProperty', moduleName: CORE$1 };
    Identifiers.elementAttribute = { name: 'ɵelementAttribute', moduleName: CORE$1 };
    Identifiers.elementClassProp = { name: 'ɵelementClassProp', moduleName: CORE$1 };
    Identifiers.elementContainerStart = { name: 'ɵEC', moduleName: CORE$1 };
    Identifiers.elementContainerEnd = { name: 'ɵeC', moduleName: CORE$1 };
    Identifiers.elementStyling = { name: 'ɵelementStyling', moduleName: CORE$1 };
    Identifiers.elementStylingMap = { name: 'ɵelementStylingMap', moduleName: CORE$1 };
    Identifiers.elementStyleProp = { name: 'ɵelementStyleProp', moduleName: CORE$1 };
    Identifiers.elementStylingApply = { name: 'ɵelementStylingApply', moduleName: CORE$1 };
    Identifiers.containerCreate = { name: 'ɵcontainer', moduleName: CORE$1 };
    Identifiers.nextContext = { name: 'ɵnextContext', moduleName: CORE$1 };
    Identifiers.templateCreate = { name: 'ɵtemplate', moduleName: CORE$1 };
    Identifiers.text = { name: 'ɵtext', moduleName: CORE$1 };
    Identifiers.textBinding = { name: 'ɵtextBinding', moduleName: CORE$1 };
    Identifiers.bind = { name: 'ɵbind', moduleName: CORE$1 };
    Identifiers.enableBindings = { name: 'ɵenableBindings', moduleName: CORE$1 };
    Identifiers.disableBindings = { name: 'ɵdisableBindings', moduleName: CORE$1 };
    Identifiers.getCurrentView = { name: 'ɵgetCurrentView', moduleName: CORE$1 };
    Identifiers.restoreView = { name: 'ɵrestoreView', moduleName: CORE$1 };
    Identifiers.interpolation1 = { name: 'ɵinterpolation1', moduleName: CORE$1 };
    Identifiers.interpolation2 = { name: 'ɵinterpolation2', moduleName: CORE$1 };
    Identifiers.interpolation3 = { name: 'ɵinterpolation3', moduleName: CORE$1 };
    Identifiers.interpolation4 = { name: 'ɵinterpolation4', moduleName: CORE$1 };
    Identifiers.interpolation5 = { name: 'ɵinterpolation5', moduleName: CORE$1 };
    Identifiers.interpolation6 = { name: 'ɵinterpolation6', moduleName: CORE$1 };
    Identifiers.interpolation7 = { name: 'ɵinterpolation7', moduleName: CORE$1 };
    Identifiers.interpolation8 = { name: 'ɵinterpolation8', moduleName: CORE$1 };
    Identifiers.interpolationV = { name: 'ɵinterpolationV', moduleName: CORE$1 };
    Identifiers.pureFunction0 = { name: 'ɵpureFunction0', moduleName: CORE$1 };
    Identifiers.pureFunction1 = { name: 'ɵpureFunction1', moduleName: CORE$1 };
    Identifiers.pureFunction2 = { name: 'ɵpureFunction2', moduleName: CORE$1 };
    Identifiers.pureFunction3 = { name: 'ɵpureFunction3', moduleName: CORE$1 };
    Identifiers.pureFunction4 = { name: 'ɵpureFunction4', moduleName: CORE$1 };
    Identifiers.pureFunction5 = { name: 'ɵpureFunction5', moduleName: CORE$1 };
    Identifiers.pureFunction6 = { name: 'ɵpureFunction6', moduleName: CORE$1 };
    Identifiers.pureFunction7 = { name: 'ɵpureFunction7', moduleName: CORE$1 };
    Identifiers.pureFunction8 = { name: 'ɵpureFunction8', moduleName: CORE$1 };
    Identifiers.pureFunctionV = { name: 'ɵpureFunctionV', moduleName: CORE$1 };
    Identifiers.pipeBind1 = { name: 'ɵpipeBind1', moduleName: CORE$1 };
    Identifiers.pipeBind2 = { name: 'ɵpipeBind2', moduleName: CORE$1 };
    Identifiers.pipeBind3 = { name: 'ɵpipeBind3', moduleName: CORE$1 };
    Identifiers.pipeBind4 = { name: 'ɵpipeBind4', moduleName: CORE$1 };
    Identifiers.pipeBindV = { name: 'ɵpipeBindV', moduleName: CORE$1 };
    Identifiers.i18nAttribute = { name: 'ɵi18nAttribute', moduleName: CORE$1 };
    Identifiers.i18nExp = { name: 'ɵi18nExp', moduleName: CORE$1 };
    Identifiers.i18nStart = { name: 'ɵi18nStart', moduleName: CORE$1 };
    Identifiers.i18nEnd = { name: 'ɵi18nEnd', moduleName: CORE$1 };
    Identifiers.i18nApply = { name: 'ɵi18nApply', moduleName: CORE$1 };
    Identifiers.load = { name: 'ɵload', moduleName: CORE$1 };
    Identifiers.loadQueryList = { name: 'ɵloadQueryList', moduleName: CORE$1 };
    Identifiers.pipe = { name: 'ɵpipe', moduleName: CORE$1 };
    Identifiers.projection = { name: 'ɵprojection', moduleName: CORE$1 };
    Identifiers.projectionDef = { name: 'ɵprojectionDef', moduleName: CORE$1 };
    Identifiers.reference = { name: 'ɵreference', moduleName: CORE$1 };
    Identifiers.inject = { name: 'inject', moduleName: CORE$1 };
    Identifiers.injectAttribute = { name: 'ɵinjectAttribute', moduleName: CORE$1 };
    Identifiers.directiveInject = { name: 'ɵdirectiveInject', moduleName: CORE$1 };
    Identifiers.templateRefExtractor = { name: 'ɵtemplateRefExtractor', moduleName: CORE$1 };
    Identifiers.defineBase = { name: 'ɵdefineBase', moduleName: CORE$1 };
    Identifiers.BaseDef = {
        name: 'ɵBaseDef',
        moduleName: CORE$1,
    };
    Identifiers.defineComponent = { name: 'ɵdefineComponent', moduleName: CORE$1 };
    Identifiers.ComponentDefWithMeta = {
        name: 'ɵComponentDefWithMeta',
        moduleName: CORE$1,
    };
    Identifiers.defineDirective = {
        name: 'ɵdefineDirective',
        moduleName: CORE$1,
    };
    Identifiers.DirectiveDefWithMeta = {
        name: 'ɵDirectiveDefWithMeta',
        moduleName: CORE$1,
    };
    Identifiers.InjectorDef = {
        name: 'ɵInjectorDef',
        moduleName: CORE$1,
    };
    Identifiers.defineInjector = {
        name: 'defineInjector',
        moduleName: CORE$1,
    };
    Identifiers.NgModuleDefWithMeta = {
        name: 'ɵNgModuleDefWithMeta',
        moduleName: CORE$1,
    };
    Identifiers.defineNgModule = { name: 'ɵdefineNgModule', moduleName: CORE$1 };
    Identifiers.PipeDefWithMeta = { name: 'ɵPipeDefWithMeta', moduleName: CORE$1 };
    Identifiers.definePipe = { name: 'ɵdefinePipe', moduleName: CORE$1 };
    Identifiers.query = { name: 'ɵquery', moduleName: CORE$1 };
    Identifiers.queryRefresh = { name: 'ɵqueryRefresh', moduleName: CORE$1 };
    Identifiers.registerContentQuery = { name: 'ɵregisterContentQuery', moduleName: CORE$1 };
    Identifiers.NgOnChangesFeature = { name: 'ɵNgOnChangesFeature', moduleName: CORE$1 };
    Identifiers.InheritDefinitionFeature = { name: 'ɵInheritDefinitionFeature', moduleName: CORE$1 };
    Identifiers.PublicFeature = { name: 'ɵPublicFeature', moduleName: CORE$1 };
    Identifiers.listener = { name: 'ɵlistener', moduleName: CORE$1 };
    Identifiers.getFactoryOf = {
        name: 'ɵgetFactoryOf',
        moduleName: CORE$1,
    };
    Identifiers.getInheritedFactory = {
        name: 'ɵgetInheritedFactory',
        moduleName: CORE$1,
    };
    // sanitization-related functions
    Identifiers.sanitizeHtml = { name: 'ɵsanitizeHtml', moduleName: CORE$1 };
    Identifiers.sanitizeStyle = { name: 'ɵsanitizeStyle', moduleName: CORE$1 };
    Identifiers.defaultStyleSanitizer = { name: 'ɵdefaultStyleSanitizer', moduleName: CORE$1 };
    Identifiers.sanitizeResourceUrl = { name: 'ɵsanitizeResourceUrl', moduleName: CORE$1 };
    Identifiers.sanitizeScript = { name: 'ɵsanitizeScript', moduleName: CORE$1 };
    Identifiers.sanitizeUrl = { name: 'ɵsanitizeUrl', moduleName: CORE$1 };
    return Identifiers;
}());

/**
 * @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
 */
/** 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 " + this.constructor.name + " doesn't support " + feature + " yet");
    }
    throw new Error("Feature " + feature + " is not supported yet");
}
function invalid$1(arg) {
    throw new Error("Invalid state: Visitor " + this.constructor.name + " doesn't handle " + undefined);
}
function asLiteral(value) {
    if (Array.isArray(value)) {
        return literalArr(value.map(asLiteral));
    }
    return literal(value, INFERRED_TYPE);
}
function conditionallyCreateMapObjectLiteral(keys) {
    if (Object.getOwnPropertyNames(keys).length > 0) {
        return mapToExpression(keys);
    }
    return null;
}
function mapToExpression(map, quoted) {
    if (quoted === void 0) { quoted = false; }
    return literalMap(Object.getOwnPropertyNames(map).map(function (key) { return ({ key: key, quoted: quoted, value: asLiteral(map[key]) }); }));
}
/**
 *  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_1 = [];
        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_1.push.apply(predicate_1, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(selectors));
        });
        return constantPool.getConstLiteral(literalArr(predicate_1), true);
    }
    else {
        return query.predicate;
    }
}
var DefinitionMap = /** @class */ (function () {
    function DefinitionMap() {
        this.values = [];
    }
    DefinitionMap.prototype.set = function (key, value) {
        if (value) {
            this.values.push({ key: key, value: value, quoted: false });
        }
    };
    DefinitionMap.prototype.toLiteralMap = function () { 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 = {};
    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;
}

/**
 * @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";
    /**
     * The dependency is for the `Injector` type itself.
     */
    R3ResolvedDependencyType[R3ResolvedDependencyType["Injector"] = 2] = "Injector";
})(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));
/**
 * Construct a factory function expression for the given `R3FactoryMetadata`.
 */
function compileFactoryFunction(meta) {
    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).
        ctorExpr = new InstantiateExpr(typeForCtor, injectDependencies(meta.deps, meta.injectFn));
    }
    else {
        var baseFactory = variable("\u0275" + 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());
        body.push(ifStmt(t, [r.set(ctorExprFinal).toStmt()], [r.set(nonCtorExpr).toStmt()]));
        return r;
    }
    if (isDelegatedMetadata(meta) && meta.delegateType === R3FactoryDelegateType.Factory) {
        var delegateFactory = variable("\u0275" + 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);
        var r = makeConditionalFactory(delegateFactory.callFn([]));
        retExpr = r;
    }
    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);
        // 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;
    }
    return {
        factory: fn([new FnParam('t', DYNAMIC_TYPE)], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(body, [new ReturnStatement(retExpr)]), INFERRED_TYPE, undefined, meta.name + "_Factory"),
        statements: statements,
    };
}
function injectDependencies(deps, injectFn) {
    return deps.map(function (dep) { return compileInjectDependency(dep, injectFn); });
}
function compileInjectDependency(dep, injectFn) {
    // Interpret the dependency according to its resolved type.
    switch (dep.resolved) {
        case R3ResolvedDependencyType.Token:
        case R3ResolvedDependencyType.Injector: {
            // 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);
            // Determine the token used for injection. In almost all cases this is the given token, but
            // if the dependency is resolved to the `Injector` then the special `INJECTOR` token is used
            // instead.
            var token = dep.token;
            if (dep.resolved === R3ResolvedDependencyType.Injector) {
                token = importExpr(Identifiers.INJECTOR);
            }
            // Build up the arguments to the injectFn call.
            var injectArgs = [token];
            // 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.
            if (flags !== 0 /* Default */ || dep.optional) {
                injectArgs.push(literal(flags));
            }
            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: " + R3ResolvedDependencyType[dep.resolved]);
    }
}
/**
 * A helper function useful for extracting `R3DependencyMetadata` from a Render2
 * `CompileTypeMetadata` instance.
 */
function dependenciesFromGlobalMetadata(type, outputCtx, reflector) {
    var e_1, _a;
    // 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 = [];
    try {
        for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(type.diDeps), _c = _b.next(); !_c.done; _c = _b.next()) {
            var dependency = _c.value;
            if (dependency.token) {
                var tokenRef = tokenReference(dependency.token);
                var resolved = R3ResolvedDependencyType.Token;
                if (tokenRef === injectorRef) {
                    resolved = R3ResolvedDependencyType.Injector;
                }
                else if (dependency.isAttribute) {
                    resolved = R3ResolvedDependencyType.Attribute;
                }
                // 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 (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
        }
        finally { if (e_1) throw e_1.error; }
    }
    return deps;
}
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: " + 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);
}

/**
 * @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, in which
        // case omitting deps just uses the constructor dependencies instead.
        var useClassOnSelf = meta.useClass.isEquivalent(meta.type);
        var deps = meta.userDeps || (useClassOnSelf && meta.ctorDeps) || undefined;
        if (deps !== undefined) {
            // factory: () => new meta.useClass(...deps)
            result = compileFactoryFunction(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, factoryMeta, { delegate: meta.useClass, delegateDeps: deps, delegateType: R3FactoryDelegateType.Class }));
        }
        else {
            result = compileFactoryFunction(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, factoryMeta, { delegate: meta.useClass, delegateType: R3FactoryDelegateType.Factory }));
        }
    }
    else if (meta.useFactory !== undefined) {
        result = compileFactoryFunction(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__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(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, factoryMeta, { expression: meta.useValue }));
    }
    else if (meta.useExisting !== undefined) {
        // useExisting is an `inject` call on the existing token.
        result = compileFactoryFunction(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__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, [new ExpressionType(meta.type)]));
    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
 */
// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
var VERSION = 3;
var JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';
var SourceMapGenerator = /** @class */ (function () {
    function SourceMapGenerator(file) {
        if (file === void 0) { file = null; }
        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
    SourceMapGenerator.prototype.addSource = function (url, content) {
        if (content === void 0) { content = null; }
        if (!this.sourcesContent.has(url)) {
            this.sourcesContent.set(url, content);
        }
        return this;
    };
    SourceMapGenerator.prototype.addLine = function () {
        this.lines.push([]);
        this.lastCol0 = 0;
        return this;
    };
    SourceMapGenerator.prototype.addMapping = function (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 \"" + 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;
    };
    Object.defineProperty(SourceMapGenerator.prototype, "currentLine", {
        get: function () { return this.lines.slice(-1)[0]; },
        enumerable: true,
        configurable: true
    });
    SourceMapGenerator.prototype.toJSON = function () {
        var _this = 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(_this.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,
        };
    };
    SourceMapGenerator.prototype.toJsComment = function () {
        return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 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 = /** @class */ (function () {
    function _EmittedLine(indent) {
        this.indent = indent;
        this.partsLength = 0;
        this.parts = [];
        this.srcSpans = [];
    }
    return _EmittedLine;
}());
var EmitterVisitorContext = /** @class */ (function () {
    function EmitterVisitorContext(_indent) {
        this._indent = _indent;
        this._classes = [];
        this._preambleLineCount = 0;
        this._lines = [new _EmittedLine(_indent)];
    }
    EmitterVisitorContext.createRoot = function () { return new EmitterVisitorContext(0); };
    Object.defineProperty(EmitterVisitorContext.prototype, "_currentLine", {
        get: function () { return this._lines[this._lines.length - 1]; },
        enumerable: true,
        configurable: true
    });
    EmitterVisitorContext.prototype.println = function (from, lastPart) {
        if (lastPart === void 0) { lastPart = ''; }
        this.print(from || null, lastPart, true);
    };
    EmitterVisitorContext.prototype.lineIsEmpty = function () { return this._currentLine.parts.length === 0; };
    EmitterVisitorContext.prototype.lineLength = function () {
        return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;
    };
    EmitterVisitorContext.prototype.print = function (from, part, newLine) {
        if (newLine === void 0) { newLine = 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));
        }
    };
    EmitterVisitorContext.prototype.removeEmptyLastLine = function () {
        if (this.lineIsEmpty()) {
            this._lines.pop();
        }
    };
    EmitterVisitorContext.prototype.incIndent = function () {
        this._indent++;
        if (this.lineIsEmpty()) {
            this._currentLine.indent = this._indent;
        }
    };
    EmitterVisitorContext.prototype.decIndent = function () {
        this._indent--;
        if (this.lineIsEmpty()) {
            this._currentLine.indent = this._indent;
        }
    };
    EmitterVisitorContext.prototype.pushClass = function (clazz) { this._classes.push(clazz); };
    EmitterVisitorContext.prototype.popClass = function () { return this._classes.pop(); };
    Object.defineProperty(EmitterVisitorContext.prototype, "currentClass", {
        get: function () {
            return this._classes.length > 0 ? this._classes[this._classes.length - 1] : null;
        },
        enumerable: true,
        configurable: true
    });
    EmitterVisitorContext.prototype.toSource = function () {
        return this.sourceLines
            .map(function (l) { return l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : ''; })
            .join('\n');
    };
    EmitterVisitorContext.prototype.toSourceMapGenerator = function (genFilePath, startsAtLine) {
        if (startsAtLine === void 0) { startsAtLine = 0; }
        var map = new SourceMapGenerator(genFilePath);
        var firstOffsetMapped = false;
        var mapFirstOffsetIfNeeded = function () {
            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;
    };
    EmitterVisitorContext.prototype.setPreambleLineCount = function (count) { return this._preambleLineCount = count; };
    EmitterVisitorContext.prototype.spanOf = function (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;
    };
    Object.defineProperty(EmitterVisitorContext.prototype, "sourceLines", {
        get: function () {
            if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {
                return this._lines.slice(0, -1);
            }
            return this._lines;
        },
        enumerable: true,
        configurable: true
    });
    return EmitterVisitorContext;
}());
var AbstractEmitterVisitor = /** @class */ (function () {
    function AbstractEmitterVisitor(_escapeDollarInStrings) {
        this._escapeDollarInStrings = _escapeDollarInStrings;
    }
    AbstractEmitterVisitor.prototype.visitExpressionStmt = function (stmt, ctx) {
        stmt.expr.visitExpression(this, ctx);
        ctx.println(stmt, ';');
        return null;
    };
    AbstractEmitterVisitor.prototype.visitReturnStmt = function (stmt, ctx) {
        ctx.print(stmt, "return ");
        stmt.value.visitExpression(this, ctx);
        ctx.println(stmt, ';');
        return null;
    };
    AbstractEmitterVisitor.prototype.visitIfStmt = function (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;
    };
    AbstractEmitterVisitor.prototype.visitThrowStmt = function (stmt, ctx) {
        ctx.print(stmt, "throw ");
        stmt.error.visitExpression(this, ctx);
        ctx.println(stmt, ";");
        return null;
    };
    AbstractEmitterVisitor.prototype.visitCommentStmt = function (stmt, ctx) {
        if (stmt.multiline) {
            ctx.println(stmt, "/* " + stmt.comment + " */");
        }
        else {
            stmt.comment.split('\n').forEach(function (line) { ctx.println(stmt, "// " + line); });
        }
        return null;
    };
    AbstractEmitterVisitor.prototype.visitJSDocCommentStmt = function (stmt, ctx) {
        ctx.println(stmt, "/*" + stmt.toString() + "*/");
        return null;
    };
    AbstractEmitterVisitor.prototype.visitWriteVarExpr = function (expr, ctx) {
        var lineWasEmpty = ctx.lineIsEmpty();
        if (!lineWasEmpty) {
            ctx.print(expr, '(');
        }
        ctx.print(expr, expr.name + " = ");
        expr.value.visitExpression(this, ctx);
        if (!lineWasEmpty) {
            ctx.print(expr, ')');
        }
        return null;
    };
    AbstractEmitterVisitor.prototype.visitWriteKeyExpr = function (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;
    };
    AbstractEmitterVisitor.prototype.visitWritePropExpr = function (expr, ctx) {
        var lineWasEmpty = ctx.lineIsEmpty();
        if (!lineWasEmpty) {
            ctx.print(expr, '(');
        }
        expr.receiver.visitExpression(this, ctx);
        ctx.print(expr, "." + expr.name + " = ");
        expr.value.visitExpression(this, ctx);
        if (!lineWasEmpty) {
            ctx.print(expr, ')');
        }
        return null;
    };
    AbstractEmitterVisitor.prototype.visitInvokeMethodExpr = function (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, "." + name + "(");
        this.visitAllExpressions(expr.args, ctx, ",");
        ctx.print(expr, ")");
        return null;
    };
    AbstractEmitterVisitor.prototype.visitInvokeFunctionExpr = function (expr, ctx) {
        expr.fn.visitExpression(this, ctx);
        ctx.print(expr, "(");
        this.visitAllExpressions(expr.args, ctx, ',');
        ctx.print(expr, ")");
        return null;
    };
    AbstractEmitterVisitor.prototype.visitWrappedNodeExpr = function (ast, ctx) {
        throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');
    };
    AbstractEmitterVisitor.prototype.visitTypeofExpr = function (expr, ctx) {
        ctx.print(expr, 'typeof ');
        expr.expr.visitExpression(this, ctx);
    };
    AbstractEmitterVisitor.prototype.visitReadVarExpr = function (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 " + ast.builtin);
            }
        }
        ctx.print(ast, varName);
        return null;
    };
    AbstractEmitterVisitor.prototype.visitInstantiateExpr = function (ast, ctx) {
        ctx.print(ast, "new ");
        ast.classExpr.visitExpression(this, ctx);
        ctx.print(ast, "(");
        this.visitAllExpressions(ast.args, ctx, ',');
        ctx.print(ast, ")");
        return null;
    };
    AbstractEmitterVisitor.prototype.visitLiteralExpr = function (ast, ctx) {
        var value = ast.value;
        if (typeof value === 'string') {
            ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));
        }
        else {
            ctx.print(ast, "" + value);
        }
        return null;
    };
    AbstractEmitterVisitor.prototype.visitConditionalExpr = function (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;
    };
    AbstractEmitterVisitor.prototype.visitNotExpr = function (ast, ctx) {
        ctx.print(ast, '!');
        ast.condition.visitExpression(this, ctx);
        return null;
    };
    AbstractEmitterVisitor.prototype.visitAssertNotNullExpr = function (ast, ctx) {
        ast.condition.visitExpression(this, ctx);
        return null;
    };
    AbstractEmitterVisitor.prototype.visitBinaryOperatorExpr = function (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 " + ast.operator);
        }
        if (ast.parens)
            ctx.print(ast, "(");
        ast.lhs.visitExpression(this, ctx);
        ctx.print(ast, " " + opStr + " ");
        ast.rhs.visitExpression(this, ctx);
        if (ast.parens)
            ctx.print(ast, ")");
        return null;
    };
    AbstractEmitterVisitor.prototype.visitReadPropExpr = function (ast, ctx) {
        ast.receiver.visitExpression(this, ctx);
        ctx.print(ast, ".");
        ctx.print(ast, ast.name);
        return null;
    };
    AbstractEmitterVisitor.prototype.visitReadKeyExpr = function (ast, ctx) {
        ast.receiver.visitExpression(this, ctx);
        ctx.print(ast, "[");
        ast.index.visitExpression(this, ctx);
        ctx.print(ast, "]");
        return null;
    };
    AbstractEmitterVisitor.prototype.visitLiteralArrayExpr = function (ast, ctx) {
        ctx.print(ast, "[");
        this.visitAllExpressions(ast.entries, ctx, ',');
        ctx.print(ast, "]");
        return null;
    };
    AbstractEmitterVisitor.prototype.visitLiteralMapExpr = function (ast, ctx) {
        var _this = this;
        ctx.print(ast, "{");
        this.visitAllObjects(function (entry) {
            ctx.print(ast, escapeIdentifier(entry.key, _this._escapeDollarInStrings, entry.quoted) + ":");
            entry.value.visitExpression(_this, ctx);
        }, ast.entries, ctx, ',');
        ctx.print(ast, "}");
        return null;
    };
    AbstractEmitterVisitor.prototype.visitCommaExpr = function (ast, ctx) {
        ctx.print(ast, '(');
        this.visitAllExpressions(ast.parts, ctx, ',');
        ctx.print(ast, ')');
        return null;
    };
    AbstractEmitterVisitor.prototype.visitAllExpressions = function (expressions, ctx, separator) {
        var _this = this;
        this.visitAllObjects(function (expr) { return expr.visitExpression(_this, ctx); }, expressions, ctx, separator);
    };
    AbstractEmitterVisitor.prototype.visitAllObjects = function (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();
        }
    };
    AbstractEmitterVisitor.prototype.visitAllStatements = function (statements, ctx) {
        var _this = this;
        statements.forEach(function (stmt) { return stmt.visitStatement(_this, ctx); });
    };
    return AbstractEmitterVisitor;
}());
function escapeIdentifier(input, escapeDollar, alwaysQuote) {
    if (alwaysQuote === void 0) { alwaysQuote = true; }
    if (input == null) {
        return null;
    }
    var body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, function () {
        var match = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            match[_i] = arguments[_i];
        }
        if (match[0] == '$') {
            return escapeDollar ? '\\$' : '$';
        }
        else if (match[0] == '\n') {
            return '\\n';
        }
        else if (match[0] == '\r') {
            return '\\r';
        }
        else {
            return "\\" + match[0];
        }
    });
    var requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);
    return requiresQuotes ? "'" + 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AbstractJsEmitterVisitor, _super);
    function AbstractJsEmitterVisitor() {
        return _super.call(this, false) || this;
    }
    AbstractJsEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {
        var _this = this;
        ctx.pushClass(stmt);
        this._visitClassConstructor(stmt, ctx);
        if (stmt.parent != null) {
            ctx.print(stmt, stmt.name + ".prototype = Object.create(");
            stmt.parent.visitExpression(this, ctx);
            ctx.println(stmt, ".prototype);");
        }
        stmt.getters.forEach(function (getter) { return _this._visitClassGetter(stmt, getter, ctx); });
        stmt.methods.forEach(function (method) { return _this._visitClassMethod(stmt, method, ctx); });
        ctx.popClass();
        return null;
    };
    AbstractJsEmitterVisitor.prototype._visitClassConstructor = function (stmt, ctx) {
        ctx.print(stmt, "function " + 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, "}");
    };
    AbstractJsEmitterVisitor.prototype._visitClassGetter = function (stmt, getter, ctx) {
        ctx.println(stmt, "Object.defineProperty(" + stmt.name + ".prototype, '" + 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, "}});");
    };
    AbstractJsEmitterVisitor.prototype._visitClassMethod = function (stmt, method, ctx) {
        ctx.print(stmt, stmt.name + ".prototype." + 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, "};");
    };
    AbstractJsEmitterVisitor.prototype.visitWrappedNodeExpr = function (ast, ctx) {
        throw new Error('Cannot emit a WrappedNodeExpr in Javascript.');
    };
    AbstractJsEmitterVisitor.prototype.visitReadVarExpr = function (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 {
            _super.prototype.visitReadVarExpr.call(this, ast, ctx);
        }
        return null;
    };
    AbstractJsEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {
        ctx.print(stmt, "var " + stmt.name);
        if (stmt.value) {
            ctx.print(stmt, ' = ');
            stmt.value.visitExpression(this, ctx);
        }
        ctx.println(stmt, ";");
        return null;
    };
    AbstractJsEmitterVisitor.prototype.visitCastExpr = function (ast, ctx) {
        ast.value.visitExpression(this, ctx);
        return null;
    };
    AbstractJsEmitterVisitor.prototype.visitInvokeFunctionExpr = function (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 {
            _super.prototype.visitInvokeFunctionExpr.call(this, expr, ctx);
        }
        return null;
    };
    AbstractJsEmitterVisitor.prototype.visitFunctionExpr = function (ast, ctx) {
        ctx.print(ast, "function" + (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;
    };
    AbstractJsEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {
        ctx.print(stmt, "function " + stmt.name + "(");
        this._visitParams(stmt.params, ctx);
        ctx.println(stmt, ") {");
        ctx.incIndent();
        this.visitAllStatements(stmt.statements, ctx);
        ctx.decIndent();
        ctx.println(stmt, "}");
        return null;
    };
    AbstractJsEmitterVisitor.prototype.visitTryCatchStmt = function (stmt, ctx) {
        ctx.println(stmt, "try {");
        ctx.incIndent();
        this.visitAllStatements(stmt.bodyStmts, ctx);
        ctx.decIndent();
        ctx.println(stmt, "} catch (" + 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;
    };
    AbstractJsEmitterVisitor.prototype._visitParams = function (params, ctx) {
        this.visitAllObjects(function (param) { return ctx.print(null, param.name); }, params, ctx, ',');
    };
    AbstractJsEmitterVisitor.prototype.getBuiltinMethodName = function (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: " + 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
 */
function evalExpression(sourceUrl, ctx, vars, createSourceMap) {
    var fnBody = ctx.toSource() + "\n//# sourceURL=" + sourceUrl;
    var fnArgNames = [];
    var fnArgValues = [];
    for (var argName in vars) {
        fnArgNames.push(argName);
        fnArgValues.push(vars[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 = new (Function.bind.apply(Function, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], fnArgNames.concat('return null;'))))().toString();
        var headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\n').length - 1;
        fnBody += "\n" + ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment();
    }
    return new (Function.bind.apply(Function, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], fnArgNames.concat(fnBody))))().apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(fnArgValues));
}
function jitStatements(sourceUrl, statements, reflector, createSourceMaps) {
    var converter = new JitEmitterVisitor(reflector);
    var ctx = EmitterVisitorContext.createRoot();
    converter.visitAllStatements(statements, ctx);
    converter.createReturnStmt(ctx);
    return evalExpression(sourceUrl, ctx, converter.getArgs(), createSourceMaps);
}
var JitEmitterVisitor = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(JitEmitterVisitor, _super);
    function JitEmitterVisitor(reflector) {
        var _this = _super.call(this) || this;
        _this.reflector = reflector;
        _this._evalArgNames = [];
        _this._evalArgValues = [];
        _this._evalExportedVars = [];
        return _this;
    }
    JitEmitterVisitor.prototype.createReturnStmt = function (ctx) {
        var stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(function (resultVar) { return new LiteralMapEntry(resultVar, variable(resultVar), false); })));
        stmt.visitStatement(this, ctx);
    };
    JitEmitterVisitor.prototype.getArgs = function () {
        var result = {};
        for (var i = 0; i < this._evalArgNames.length; i++) {
            result[this._evalArgNames[i]] = this._evalArgValues[i];
        }
        return result;
    };
    JitEmitterVisitor.prototype.visitExternalExpr = function (ast, ctx) {
        this._emitReferenceToExternal(ast, this.reflector.resolveExternalReference(ast.value), ctx);
        return null;
    };
    JitEmitterVisitor.prototype.visitWrappedNodeExpr = function (ast, ctx) {
        this._emitReferenceToExternal(ast, ast.node, ctx);
        return null;
    };
    JitEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {
        if (stmt.hasModifier(StmtModifier.Exported)) {
            this._evalExportedVars.push(stmt.name);
        }
        return _super.prototype.visitDeclareVarStmt.call(this, stmt, ctx);
    };
    JitEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {
        if (stmt.hasModifier(StmtModifier.Exported)) {
            this._evalExportedVars.push(stmt.name);
        }
        return _super.prototype.visitDeclareFunctionStmt.call(this, stmt, ctx);
    };
    JitEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {
        if (stmt.hasModifier(StmtModifier.Exported)) {
            this._evalExportedVars.push(stmt.name);
        }
        return _super.prototype.visitDeclareClassStmt.call(this, stmt, ctx);
    };
    JitEmitterVisitor.prototype._emitReferenceToExternal = function (ast, value, ctx) {
        var id = this._evalArgValues.indexOf(value);
        if (id === -1) {
            id = this._evalArgValues.length;
            this._evalArgValues.push(value);
            var name_1 = identifierName({ reference: value }) || 'val';
            this._evalArgNames.push("jit_" + name_1 + "_" + id);
        }
        ctx.print(ast, this._evalArgNames[id]);
    };
    return JitEmitterVisitor;
}(AbstractJsEmitterVisitor));

/**
 * @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 = /** @class */ (function () {
    function R3JitReflector(context) {
        this.context = context;
    }
    R3JitReflector.prototype.resolveExternalReference = function (ref) {
        // This reflector only handles @angular/core imports.
        if (ref.moduleName !== '@angular/core') {
            throw new Error("Cannot resolve external reference to " + 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 '" + ref.name + "'.");
        }
        return this.context[ref.name];
    };
    R3JitReflector.prototype.parameters = function (typeOrFunc) { throw new Error('Not implemented.'); };
    R3JitReflector.prototype.annotations = function (typeOrFunc) { throw new Error('Not implemented.'); };
    R3JitReflector.prototype.shallowAnnotations = function (typeOrFunc) { throw new Error('Not implemented.'); };
    R3JitReflector.prototype.tryAnnotations = function (typeOrFunc) { throw new Error('Not implemented.'); };
    R3JitReflector.prototype.propMetadata = function (typeOrFunc) { throw new Error('Not implemented.'); };
    R3JitReflector.prototype.hasLifecycleHook = function (type, lcProperty) { throw new Error('Not implemented.'); };
    R3JitReflector.prototype.guards = function (typeOrFunc) { throw new Error('Not implemented.'); };
    R3JitReflector.prototype.componentModuleUrl = function (type, cmpMetadata) { throw new Error('Not implemented.'); };
    return R3JitReflector;
}());
/**
 * 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 constantPool an optional `ConstantPool` which contains constants used in the expression
 */
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 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(preStatements, [
        new DeclareVarStmt('$def', def, undefined, [StmtModifier.Exported]),
    ]);
    var res = jitStatements(sourceUrl, statements, new R3JitReflector(context), false);
    return res['$def'];
}

/**
 * @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 mapLiteral(obj) {
    return literalMap(Object.keys(obj).map(function (key) { return ({
        key: key,
        quoted: false,
        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
 */
/**
 * 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;
    var expression = importExpr(Identifiers$1.defineNgModule).callFn([mapToMapExpression({
            type: moduleType,
            bootstrap: literalArr(bootstrap.map(function (ref) { return ref.value; })),
            declarations: literalArr(declarations.map(function (ref) { return ref.value; })),
            imports: literalArr(imports.map(function (ref) { return ref.value; })),
            exports: literalArr(exports.map(function (ref) { return ref.value; })),
        })]);
    var type = new ExpressionType(importExpr(Identifiers$1.NgModuleDefWithMeta, [
        new ExpressionType(moduleType), tupleTypeOf(declarations), tupleTypeOf(imports),
        tupleTypeOf(exports)
    ]));
    var additionalStatements = [];
    return { expression: expression, type: type, additionalStatements: additionalStatements };
}
function compileInjector(meta) {
    var result = compileFactoryFunction({
        name: meta.name,
        type: meta.type,
        deps: meta.deps,
        injectFn: Identifiers$1.inject,
    });
    var expression = importExpr(Identifiers$1.defineInjector).callFn([mapToMapExpression({
            factory: result.factory,
            providers: meta.providers,
            imports: meta.imports,
        })]);
    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(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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 tupleTypeOf(exp) {
    var types = exp.map(function (ref) { return typeofExpr(ref.type); });
    return exp.length > 0 ? expressionType(literalArr(types)) : NONE_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
 */
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,
    });
    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, [
        new ExpressionType(metadata.type),
        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 name = identifierName(pipe.type);
    if (!name) {
        return error("Cannot resolve the name of " + pipe.type);
    }
    var metadata = {
        name: name,
        pipeName: pipe.name,
        type: outputCtx.importExpr(pipe.type.reference),
        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 = /** @class */ (function () {
    function ParserError(message, input, errLocation, ctxLocation) {
        this.input = input;
        this.errLocation = errLocation;
        this.ctxLocation = ctxLocation;
        this.message = "Parser Error: " + message + " " + errLocation + " [" + input + "] in " + ctxLocation;
    }
    return ParserError;
}());
var ParseSpan = /** @class */ (function () {
    function ParseSpan(start, end) {
        this.start = start;
        this.end = end;
    }
    return ParseSpan;
}());
var AST = /** @class */ (function () {
    function AST(span) {
        this.span = span;
    }
    AST.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return null;
    };
    AST.prototype.toString = function () { 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Quote, _super);
    function Quote(span, prefix, uninterpretedExpression, location) {
        var _this = _super.call(this, span) || this;
        _this.prefix = prefix;
        _this.uninterpretedExpression = uninterpretedExpression;
        _this.location = location;
        return _this;
    }
    Quote.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitQuote(this, context);
    };
    Quote.prototype.toString = function () { return 'Quote'; };
    return Quote;
}(AST));
var EmptyExpr = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(EmptyExpr, _super);
    function EmptyExpr() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    EmptyExpr.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        // do nothing
    };
    return EmptyExpr;
}(AST));
var ImplicitReceiver = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ImplicitReceiver, _super);
    function ImplicitReceiver() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ImplicitReceiver.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitImplicitReceiver(this, context);
    };
    return ImplicitReceiver;
}(AST));
/**
 * Multiple expressions separated by a semicolon.
 */
var Chain = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Chain, _super);
    function Chain(span, expressions) {
        var _this = _super.call(this, span) || this;
        _this.expressions = expressions;
        return _this;
    }
    Chain.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitChain(this, context);
    };
    return Chain;
}(AST));
var Conditional = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Conditional, _super);
    function Conditional(span, condition, trueExp, falseExp) {
        var _this = _super.call(this, span) || this;
        _this.condition = condition;
        _this.trueExp = trueExp;
        _this.falseExp = falseExp;
        return _this;
    }
    Conditional.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitConditional(this, context);
    };
    return Conditional;
}(AST));
var PropertyRead = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PropertyRead, _super);
    function PropertyRead(span, receiver, name) {
        var _this = _super.call(this, span) || this;
        _this.receiver = receiver;
        _this.name = name;
        return _this;
    }
    PropertyRead.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitPropertyRead(this, context);
    };
    return PropertyRead;
}(AST));
var PropertyWrite = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PropertyWrite, _super);
    function PropertyWrite(span, receiver, name, value) {
        var _this = _super.call(this, span) || this;
        _this.receiver = receiver;
        _this.name = name;
        _this.value = value;
        return _this;
    }
    PropertyWrite.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitPropertyWrite(this, context);
    };
    return PropertyWrite;
}(AST));
var SafePropertyRead = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SafePropertyRead, _super);
    function SafePropertyRead(span, receiver, name) {
        var _this = _super.call(this, span) || this;
        _this.receiver = receiver;
        _this.name = name;
        return _this;
    }
    SafePropertyRead.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitSafePropertyRead(this, context);
    };
    return SafePropertyRead;
}(AST));
var KeyedRead = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(KeyedRead, _super);
    function KeyedRead(span, obj, key) {
        var _this = _super.call(this, span) || this;
        _this.obj = obj;
        _this.key = key;
        return _this;
    }
    KeyedRead.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitKeyedRead(this, context);
    };
    return KeyedRead;
}(AST));
var KeyedWrite = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(KeyedWrite, _super);
    function KeyedWrite(span, obj, key, value) {
        var _this = _super.call(this, span) || this;
        _this.obj = obj;
        _this.key = key;
        _this.value = value;
        return _this;
    }
    KeyedWrite.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitKeyedWrite(this, context);
    };
    return KeyedWrite;
}(AST));
var BindingPipe = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BindingPipe, _super);
    function BindingPipe(span, exp, name, args) {
        var _this = _super.call(this, span) || this;
        _this.exp = exp;
        _this.name = name;
        _this.args = args;
        return _this;
    }
    BindingPipe.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitPipe(this, context);
    };
    return BindingPipe;
}(AST));
var LiteralPrimitive = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralPrimitive, _super);
    function LiteralPrimitive(span, value) {
        var _this = _super.call(this, span) || this;
        _this.value = value;
        return _this;
    }
    LiteralPrimitive.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitLiteralPrimitive(this, context);
    };
    return LiteralPrimitive;
}(AST));
var LiteralArray = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralArray, _super);
    function LiteralArray(span, expressions) {
        var _this = _super.call(this, span) || this;
        _this.expressions = expressions;
        return _this;
    }
    LiteralArray.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitLiteralArray(this, context);
    };
    return LiteralArray;
}(AST));
var LiteralMap = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralMap, _super);
    function LiteralMap(span, keys, values) {
        var _this = _super.call(this, span) || this;
        _this.keys = keys;
        _this.values = values;
        return _this;
    }
    LiteralMap.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitLiteralMap(this, context);
    };
    return LiteralMap;
}(AST));
var Interpolation = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Interpolation, _super);
    function Interpolation(span, strings, expressions) {
        var _this = _super.call(this, span) || this;
        _this.strings = strings;
        _this.expressions = expressions;
        return _this;
    }
    Interpolation.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitInterpolation(this, context);
    };
    return Interpolation;
}(AST));
var Binary = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Binary, _super);
    function Binary(span, operation, left, right) {
        var _this = _super.call(this, span) || this;
        _this.operation = operation;
        _this.left = left;
        _this.right = right;
        return _this;
    }
    Binary.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitBinary(this, context);
    };
    return Binary;
}(AST));
var PrefixNot = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PrefixNot, _super);
    function PrefixNot(span, expression) {
        var _this = _super.call(this, span) || this;
        _this.expression = expression;
        return _this;
    }
    PrefixNot.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitPrefixNot(this, context);
    };
    return PrefixNot;
}(AST));
var NonNullAssert = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NonNullAssert, _super);
    function NonNullAssert(span, expression) {
        var _this = _super.call(this, span) || this;
        _this.expression = expression;
        return _this;
    }
    NonNullAssert.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitNonNullAssert(this, context);
    };
    return NonNullAssert;
}(AST));
var MethodCall = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MethodCall, _super);
    function MethodCall(span, receiver, name, args) {
        var _this = _super.call(this, span) || this;
        _this.receiver = receiver;
        _this.name = name;
        _this.args = args;
        return _this;
    }
    MethodCall.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitMethodCall(this, context);
    };
    return MethodCall;
}(AST));
var SafeMethodCall = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SafeMethodCall, _super);
    function SafeMethodCall(span, receiver, name, args) {
        var _this = _super.call(this, span) || this;
        _this.receiver = receiver;
        _this.name = name;
        _this.args = args;
        return _this;
    }
    SafeMethodCall.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitSafeMethodCall(this, context);
    };
    return SafeMethodCall;
}(AST));
var FunctionCall = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FunctionCall, _super);
    function FunctionCall(span, target, args) {
        var _this = _super.call(this, span) || this;
        _this.target = target;
        _this.args = args;
        return _this;
    }
    FunctionCall.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return visitor.visitFunctionCall(this, context);
    };
    return FunctionCall;
}(AST));
var ASTWithSource = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ASTWithSource, _super);
    function ASTWithSource(ast, source, location, errors) {
        var _this = _super.call(this, new ParseSpan(0, source == null ? 0 : source.length)) || this;
        _this.ast = ast;
        _this.source = source;
        _this.location = location;
        _this.errors = errors;
        return _this;
    }
    ASTWithSource.prototype.visit = function (visitor, context) {
        if (context === void 0) { context = null; }
        return this.ast.visit(visitor, context);
    };
    ASTWithSource.prototype.toString = function () { return this.source + " in " + this.location; };
    return ASTWithSource;
}(AST));
var TemplateBinding = /** @class */ (function () {
    function TemplateBinding(span, key, keyIsVar, name, expression) {
        this.span = span;
        this.key = key;
        this.keyIsVar = keyIsVar;
        this.name = name;
        this.expression = expression;
    }
    return TemplateBinding;
}());
var NullAstVisitor = /** @class */ (function () {
    function NullAstVisitor() {
    }
    NullAstVisitor.prototype.visitBinary = function (ast, context) { };
    NullAstVisitor.prototype.visitChain = function (ast, context) { };
    NullAstVisitor.prototype.visitConditional = function (ast, context) { };
    NullAstVisitor.prototype.visitFunctionCall = function (ast, context) { };
    NullAstVisitor.prototype.visitImplicitReceiver = function (ast, context) { };
    NullAstVisitor.prototype.visitInterpolation = function (ast, context) { };
    NullAstVisitor.prototype.visitKeyedRead = function (ast, context) { };
    NullAstVisitor.prototype.visitKeyedWrite = function (ast, context) { };
    NullAstVisitor.prototype.visitLiteralArray = function (ast, context) { };
    NullAstVisitor.prototype.visitLiteralMap = function (ast, context) { };
    NullAstVisitor.prototype.visitLiteralPrimitive = function (ast, context) { };
    NullAstVisitor.prototype.visitMethodCall = function (ast, context) { };
    NullAstVisitor.prototype.visitPipe = function (ast, context) { };
    NullAstVisitor.prototype.visitPrefixNot = function (ast, context) { };
    NullAstVisitor.prototype.visitNonNullAssert = function (ast, context) { };
    NullAstVisitor.prototype.visitPropertyRead = function (ast, context) { };
    NullAstVisitor.prototype.visitPropertyWrite = function (ast, context) { };
    NullAstVisitor.prototype.visitQuote = function (ast, context) { };
    NullAstVisitor.prototype.visitSafeMethodCall = function (ast, context) { };
    NullAstVisitor.prototype.visitSafePropertyRead = function (ast, context) { };
    return NullAstVisitor;
}());
var RecursiveAstVisitor$1 = /** @class */ (function () {
    function RecursiveAstVisitor() {
    }
    RecursiveAstVisitor.prototype.visitBinary = function (ast, context) {
        ast.left.visit(this);
        ast.right.visit(this);
        return null;
    };
    RecursiveAstVisitor.prototype.visitChain = function (ast, context) { return this.visitAll(ast.expressions, context); };
    RecursiveAstVisitor.prototype.visitConditional = function (ast, context) {
        ast.condition.visit(this);
        ast.trueExp.visit(this);
        ast.falseExp.visit(this);
        return null;
    };
    RecursiveAstVisitor.prototype.visitPipe = function (ast, context) {
        ast.exp.visit(this);
        this.visitAll(ast.args, context);
        return null;
    };
    RecursiveAstVisitor.prototype.visitFunctionCall = function (ast, context) {
        ast.target.visit(this);
        this.visitAll(ast.args, context);
        return null;
    };
    RecursiveAstVisitor.prototype.visitImplicitReceiver = function (ast, context) { return null; };
    RecursiveAstVisitor.prototype.visitInterpolation = function (ast, context) {
        return this.visitAll(ast.expressions, context);
    };
    RecursiveAstVisitor.prototype.visitKeyedRead = function (ast, context) {
        ast.obj.visit(this);
        ast.key.visit(this);
        return null;
    };
    RecursiveAstVisitor.prototype.visitKeyedWrite = function (ast, context) {
        ast.obj.visit(this);
        ast.key.visit(this);
        ast.value.visit(this);
        return null;
    };
    RecursiveAstVisitor.prototype.visitLiteralArray = function (ast, context) {
        return this.visitAll(ast.expressions, context);
    };
    RecursiveAstVisitor.prototype.visitLiteralMap = function (ast, context) { return this.visitAll(ast.values, context); };
    RecursiveAstVisitor.prototype.visitLiteralPrimitive = function (ast, context) { return null; };
    RecursiveAstVisitor.prototype.visitMethodCall = function (ast, context) {
        ast.receiver.visit(this);
        return this.visitAll(ast.args, context);
    };
    RecursiveAstVisitor.prototype.visitPrefixNot = function (ast, context) {
        ast.expression.visit(this);
        return null;
    };
    RecursiveAstVisitor.prototype.visitNonNullAssert = function (ast, context) {
        ast.expression.visit(this);
        return null;
    };
    RecursiveAstVisitor.prototype.visitPropertyRead = function (ast, context) {
        ast.receiver.visit(this);
        return null;
    };
    RecursiveAstVisitor.prototype.visitPropertyWrite = function (ast, context) {
        ast.receiver.visit(this);
        ast.value.visit(this);
        return null;
    };
    RecursiveAstVisitor.prototype.visitSafePropertyRead = function (ast, context) {
        ast.receiver.visit(this);
        return null;
    };
    RecursiveAstVisitor.prototype.visitSafeMethodCall = function (ast, context) {
        ast.receiver.visit(this);
        return this.visitAll(ast.args, context);
    };
    RecursiveAstVisitor.prototype.visitAll = function (asts, context) {
        var _this = this;
        asts.forEach(function (ast) { return ast.visit(_this, context); });
        return null;
    };
    RecursiveAstVisitor.prototype.visitQuote = function (ast, context) { return null; };
    return RecursiveAstVisitor;
}());
var AstTransformer$1 = /** @class */ (function () {
    function AstTransformer() {
    }
    AstTransformer.prototype.visitImplicitReceiver = function (ast, context) { return ast; };
    AstTransformer.prototype.visitInterpolation = function (ast, context) {
        return new Interpolation(ast.span, ast.strings, this.visitAll(ast.expressions));
    };
    AstTransformer.prototype.visitLiteralPrimitive = function (ast, context) {
        return new LiteralPrimitive(ast.span, ast.value);
    };
    AstTransformer.prototype.visitPropertyRead = function (ast, context) {
        return new PropertyRead(ast.span, ast.receiver.visit(this), ast.name);
    };
    AstTransformer.prototype.visitPropertyWrite = function (ast, context) {
        return new PropertyWrite(ast.span, ast.receiver.visit(this), ast.name, ast.value.visit(this));
    };
    AstTransformer.prototype.visitSafePropertyRead = function (ast, context) {
        return new SafePropertyRead(ast.span, ast.receiver.visit(this), ast.name);
    };
    AstTransformer.prototype.visitMethodCall = function (ast, context) {
        return new MethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));
    };
    AstTransformer.prototype.visitSafeMethodCall = function (ast, context) {
        return new SafeMethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));
    };
    AstTransformer.prototype.visitFunctionCall = function (ast, context) {
        return new FunctionCall(ast.span, ast.target.visit(this), this.visitAll(ast.args));
    };
    AstTransformer.prototype.visitLiteralArray = function (ast, context) {
        return new LiteralArray(ast.span, this.visitAll(ast.expressions));
    };
    AstTransformer.prototype.visitLiteralMap = function (ast, context) {
        return new LiteralMap(ast.span, ast.keys, this.visitAll(ast.values));
    };
    AstTransformer.prototype.visitBinary = function (ast, context) {
        return new Binary(ast.span, ast.operation, ast.left.visit(this), ast.right.visit(this));
    };
    AstTransformer.prototype.visitPrefixNot = function (ast, context) {
        return new PrefixNot(ast.span, ast.expression.visit(this));
    };
    AstTransformer.prototype.visitNonNullAssert = function (ast, context) {
        return new NonNullAssert(ast.span, ast.expression.visit(this));
    };
    AstTransformer.prototype.visitConditional = function (ast, context) {
        return new Conditional(ast.span, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));
    };
    AstTransformer.prototype.visitPipe = function (ast, context) {
        return new BindingPipe(ast.span, ast.exp.visit(this), ast.name, this.visitAll(ast.args));
    };
    AstTransformer.prototype.visitKeyedRead = function (ast, context) {
        return new KeyedRead(ast.span, ast.obj.visit(this), ast.key.visit(this));
    };
    AstTransformer.prototype.visitKeyedWrite = function (ast, context) {
        return new KeyedWrite(ast.span, ast.obj.visit(this), ast.key.visit(this), ast.value.visit(this));
    };
    AstTransformer.prototype.visitAll = function (asts) {
        var res = new Array(asts.length);
        for (var i = 0; i < asts.length; ++i) {
            res[i] = asts[i].visit(this);
        }
        return res;
    };
    AstTransformer.prototype.visitChain = function (ast, context) {
        return new Chain(ast.span, this.visitAll(ast.expressions));
    };
    AstTransformer.prototype.visitQuote = function (ast, context) {
        return new Quote(ast.span, ast.prefix, ast.uninterpretedExpression, ast.location);
    };
    return AstTransformer;
}());
// A transformer that only creates new nodes if the transformer makes a change or
// a change is made a child node.
var AstMemoryEfficientTransformer = /** @class */ (function () {
    function AstMemoryEfficientTransformer() {
    }
    AstMemoryEfficientTransformer.prototype.visitImplicitReceiver = function (ast, context) { return ast; };
    AstMemoryEfficientTransformer.prototype.visitInterpolation = function (ast, context) {
        var expressions = this.visitAll(ast.expressions);
        if (expressions !== ast.expressions)
            return new Interpolation(ast.span, ast.strings, expressions);
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitLiteralPrimitive = function (ast, context) { return ast; };
    AstMemoryEfficientTransformer.prototype.visitPropertyRead = function (ast, context) {
        var receiver = ast.receiver.visit(this);
        if (receiver !== ast.receiver) {
            return new PropertyRead(ast.span, receiver, ast.name);
        }
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitPropertyWrite = function (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;
    };
    AstMemoryEfficientTransformer.prototype.visitSafePropertyRead = function (ast, context) {
        var receiver = ast.receiver.visit(this);
        if (receiver !== ast.receiver) {
            return new SafePropertyRead(ast.span, receiver, ast.name);
        }
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitMethodCall = function (ast, context) {
        var receiver = ast.receiver.visit(this);
        if (receiver !== ast.receiver) {
            return new MethodCall(ast.span, receiver, ast.name, this.visitAll(ast.args));
        }
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitSafeMethodCall = function (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;
    };
    AstMemoryEfficientTransformer.prototype.visitFunctionCall = function (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;
    };
    AstMemoryEfficientTransformer.prototype.visitLiteralArray = function (ast, context) {
        var expressions = this.visitAll(ast.expressions);
        if (expressions !== ast.expressions) {
            return new LiteralArray(ast.span, expressions);
        }
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitLiteralMap = function (ast, context) {
        var values = this.visitAll(ast.values);
        if (values !== ast.values) {
            return new LiteralMap(ast.span, ast.keys, values);
        }
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitBinary = function (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;
    };
    AstMemoryEfficientTransformer.prototype.visitPrefixNot = function (ast, context) {
        var expression = ast.expression.visit(this);
        if (expression !== ast.expression) {
            return new PrefixNot(ast.span, expression);
        }
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitNonNullAssert = function (ast, context) {
        var expression = ast.expression.visit(this);
        if (expression !== ast.expression) {
            return new NonNullAssert(ast.span, expression);
        }
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitConditional = function (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 !== falseExp) {
            return new Conditional(ast.span, condition, trueExp, falseExp);
        }
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitPipe = function (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;
    };
    AstMemoryEfficientTransformer.prototype.visitKeyedRead = function (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;
    };
    AstMemoryEfficientTransformer.prototype.visitKeyedWrite = function (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;
    };
    AstMemoryEfficientTransformer.prototype.visitAll = function (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;
    };
    AstMemoryEfficientTransformer.prototype.visitChain = function (ast, context) {
        var expressions = this.visitAll(ast.expressions);
        if (expressions !== ast.expressions) {
            return new Chain(ast.span, expressions);
        }
        return ast;
    };
    AstMemoryEfficientTransformer.prototype.visitQuote = function (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 (ast) {
            visit(ast.left);
            visit(ast.right);
        },
        visitChain: function (ast) { visitAll(ast.expressions); },
        visitConditional: function (ast) {
            visit(ast.condition);
            visit(ast.trueExp);
            visit(ast.falseExp);
        },
        visitFunctionCall: function (ast) {
            if (ast.target) {
                visit(ast.target);
            }
            visitAll(ast.args);
        },
        visitImplicitReceiver: function (ast) { },
        visitInterpolation: function (ast) { visitAll(ast.expressions); },
        visitKeyedRead: function (ast) {
            visit(ast.obj);
            visit(ast.key);
        },
        visitKeyedWrite: function (ast) {
            visit(ast.obj);
            visit(ast.key);
            visit(ast.obj);
        },
        visitLiteralArray: function (ast) { visitAll(ast.expressions); },
        visitLiteralMap: function (ast) { },
        visitLiteralPrimitive: function (ast) { },
        visitMethodCall: function (ast) {
            visit(ast.receiver);
            visitAll(ast.args);
        },
        visitPipe: function (ast) {
            visit(ast.exp);
            visitAll(ast.args);
        },
        visitPrefixNot: function (ast) { visit(ast.expression); },
        visitNonNullAssert: function (ast) { visit(ast.expression); },
        visitPropertyRead: function (ast) { visit(ast.receiver); },
        visitPropertyWrite: function (ast) {
            visit(ast.receiver);
            visit(ast.value);
        },
        visitQuote: function (ast) { },
        visitSafeMethodCall: function (ast) {
            visit(ast.receiver);
            visitAll(ast.args);
        },
        visitSafePropertyRead: function (ast) { visit(ast.receiver); },
    });
}
// Bindings
var ParsedProperty = /** @class */ (function () {
    function ParsedProperty(name, expression, type, sourceSpan) {
        this.name = name;
        this.expression = expression;
        this.type = type;
        this.sourceSpan = sourceSpan;
        this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;
        this.isAnimation = this.type === ParsedPropertyType.ANIMATION;
    }
    return ParsedProperty;
}());
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 = /** @class */ (function () {
    // Regular events have a target
    // Animation events have a phase
    function ParsedEvent(name, targetOrPhase, type, handler, sourceSpan) {
        this.name = name;
        this.targetOrPhase = targetOrPhase;
        this.type = type;
        this.handler = handler;
        this.sourceSpan = sourceSpan;
    }
    return ParsedEvent;
}());
var ParsedVariable = /** @class */ (function () {
    function ParsedVariable(name, value, sourceSpan) {
        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    return ParsedVariable;
}());
var BoundElementProperty = /** @class */ (function () {
    function BoundElementProperty(name, type, securityContext, value, unit, sourceSpan) {
        this.name = name;
        this.type = type;
        this.securityContext = securityContext;
        this.value = value;
        this.unit = unit;
        this.sourceSpan = sourceSpan;
    }
    return BoundElementProperty;
}());

/**
 * @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 = /** @class */ (function () {
    function EventHandlerVars() {
    }
    EventHandlerVars.event = variable('$event');
    return EventHandlerVars;
}());
var ConvertActionBindingResult = /** @class */ (function () {
    function ConvertActionBindingResult(
    /**
     * Render2 compatible statements,
     */
    stmts, 
    /**
     * Variable name used with render2 compatible statements.
     */
    allowDefault) {
        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;
        });
    }
    return ConvertActionBindingResult;
}());
/**
 * 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) {
    if (!localResolver) {
        localResolver = new DefaultLocalResolver();
    }
    var actionWithoutBuiltins = convertPropertyBindingBuiltins({
        createLiteralArrayConverter: function (argCount) {
            // Note: no caching for literal arrays in actions.
            return function (args) { return literalArr(args); };
        },
        createLiteralMapConverter: function (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 (name) {
            throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: " + name);
        }
    }, action);
    var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);
    var actionStmts = [];
    flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);
    prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
    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 = /** @class */ (function () {
    function ConvertPropertyBindingResult(stmts, currValExpr) {
        this.stmts = stmts;
        this.currValExpr = currValExpr;
    }
    return ConvertPropertyBindingResult;
}());
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 stmts = [];
    var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);
    var outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);
    if (visitor.temporaryCount) {
        for (var i = 0; i < visitor.temporaryCount; i++) {
            stmts.push(temporaryDeclaration(bindingId, i));
        }
    }
    else if (form == BindingForm.TrySimple) {
        return new ConvertPropertyBindingResult([], outputExpr);
    }
    stmts.push(currValExpr.set(outputExpr).toDeclStmt(DYNAMIC_TYPE, [StmtModifier.Final]));
    return new ConvertPropertyBindingResult(stmts, currValExpr);
}
function convertBuiltins(converterFactory, ast) {
    var visitor = new _BuiltinAstConverter(converterFactory);
    return ast.visit(visitor);
}
function temporaryName(bindingId, temporaryNumber) {
    return "tmp_" + bindingId + "_" + 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 " + ast);
    }
}
function ensureExpressionMode(mode, ast) {
    if (mode !== _Mode.Expression) {
        throw new Error("Expected an expression, but saw " + ast);
    }
}
function convertToStatementIfNeeded(mode, expr) {
    if (mode === _Mode.Statement) {
        return expr.toStmt();
    }
    else {
        return expr;
    }
}
var _BuiltinAstConverter = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_BuiltinAstConverter, _super);
    function _BuiltinAstConverter(_converterFactory) {
        var _this = _super.call(this) || this;
        _this._converterFactory = _converterFactory;
        return _this;
    }
    _BuiltinAstConverter.prototype.visitPipe = function (ast, context) {
        var _this = this;
        var args = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([ast.exp], ast.args).map(function (ast) { return ast.visit(_this, context); });
        return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createPipeConverter(ast.name, args.length));
    };
    _BuiltinAstConverter.prototype.visitLiteralArray = function (ast, context) {
        var _this = this;
        var args = ast.expressions.map(function (ast) { return ast.visit(_this, context); });
        return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));
    };
    _BuiltinAstConverter.prototype.visitLiteralMap = function (ast, context) {
        var _this = this;
        var args = ast.values.map(function (ast) { return ast.visit(_this, context); });
        return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createLiteralMapConverter(ast.keys));
    };
    return _BuiltinAstConverter;
}(AstTransformer$1));
var _AstToIrVisitor = /** @class */ (function () {
    function _AstToIrVisitor(_localResolver, _implicitReceiver, bindingId, interpolationFunction) {
        this._localResolver = _localResolver;
        this._implicitReceiver = _implicitReceiver;
        this.bindingId = bindingId;
        this.interpolationFunction = interpolationFunction;
        this._nodeMap = new Map();
        this._resultMap = new Map();
        this._currentTemporary = 0;
        this.temporaryCount = 0;
    }
    _AstToIrVisitor.prototype.visitBinary = function (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 " + ast.operation);
        }
        return convertToStatementIfNeeded(mode, new BinaryOperatorExpr(op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression)));
    };
    _AstToIrVisitor.prototype.visitChain = function (ast, mode) {
        ensureStatementMode(mode, ast);
        return this.visitAll(ast.expressions, mode);
    };
    _AstToIrVisitor.prototype.visitConditional = function (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)));
    };
    _AstToIrVisitor.prototype.visitPipe = function (ast, mode) {
        throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: " + ast.name);
    };
    _AstToIrVisitor.prototype.visitFunctionCall = function (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);
        }
        return convertToStatementIfNeeded(mode, fnResult);
    };
    _AstToIrVisitor.prototype.visitImplicitReceiver = function (ast, mode) {
        ensureExpressionMode(mode, ast);
        return this._implicitReceiver;
    };
    _AstToIrVisitor.prototype.visitInterpolation = function (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))]);
    };
    _AstToIrVisitor.prototype.visitKeyedRead = function (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)));
        }
    };
    _AstToIrVisitor.prototype.visitKeyedWrite = function (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));
    };
    _AstToIrVisitor.prototype.visitLiteralArray = function (ast, mode) {
        throw new Error("Illegal State: literal arrays should have been converted into functions");
    };
    _AstToIrVisitor.prototype.visitLiteralMap = function (ast, mode) {
        throw new Error("Illegal State: literal maps should have been converted into functions");
    };
    _AstToIrVisitor.prototype.visitLiteralPrimitive = function (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));
    };
    _AstToIrVisitor.prototype._getLocal = function (name) { return this._localResolver.getLocal(name); };
    _AstToIrVisitor.prototype.visitMethodCall = function (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 " + (args.length || 'none'));
            }
            return args[0].cast(DYNAMIC_TYPE);
        }
        var leftMostSafe = this.leftMostSafeNode(ast);
        if (leftMostSafe) {
            return this.convertSafeAccess(ast, leftMostSafe, mode);
        }
        else {
            var args = this.visitAll(ast.args, _Mode.Expression);
            var result = null;
            var receiver = this._visit(ast.receiver, _Mode.Expression);
            if (receiver === this._implicitReceiver) {
                var varExpr = this._getLocal(ast.name);
                if (varExpr) {
                    result = varExpr.callFn(args);
                }
            }
            if (result == null) {
                result = receiver.callMethod(ast.name, args);
            }
            return convertToStatementIfNeeded(mode, result);
        }
    };
    _AstToIrVisitor.prototype.visitPrefixNot = function (ast, mode) {
        return convertToStatementIfNeeded(mode, not(this._visit(ast.expression, _Mode.Expression)));
    };
    _AstToIrVisitor.prototype.visitNonNullAssert = function (ast, mode) {
        return convertToStatementIfNeeded(mode, assertNotNull(this._visit(ast.expression, _Mode.Expression)));
    };
    _AstToIrVisitor.prototype.visitPropertyRead = function (ast, mode) {
        var leftMostSafe = this.leftMostSafeNode(ast);
        if (leftMostSafe) {
            return this.convertSafeAccess(ast, leftMostSafe, mode);
        }
        else {
            var result = null;
            var receiver = this._visit(ast.receiver, _Mode.Expression);
            if (receiver === this._implicitReceiver) {
                result = this._getLocal(ast.name);
            }
            if (result == null) {
                result = receiver.prop(ast.name);
            }
            return convertToStatementIfNeeded(mode, result);
        }
    };
    _AstToIrVisitor.prototype.visitPropertyWrite = function (ast, mode) {
        var receiver = this._visit(ast.receiver, _Mode.Expression);
        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;
                }
                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)));
    };
    _AstToIrVisitor.prototype.visitSafePropertyRead = function (ast, mode) {
        return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);
    };
    _AstToIrVisitor.prototype.visitSafeMethodCall = function (ast, mode) {
        return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);
    };
    _AstToIrVisitor.prototype.visitAll = function (asts, mode) {
        var _this = this;
        return asts.map(function (ast) { return _this._visit(ast, mode); });
    };
    _AstToIrVisitor.prototype.visitQuote = function (ast, mode) {
        throw new Error("Quotes are not supported for evaluation!\n        Statement: " + ast.uninterpretedExpression + " located at " + ast.location);
    };
    _AstToIrVisitor.prototype._visit = function (ast, mode) {
        var result = this._resultMap.get(ast);
        if (result)
            return result;
        return (this._nodeMap.get(ast) || ast).visit(this, mode);
    };
    _AstToIrVisitor.prototype.convertSafeAccess = function (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
    _AstToIrVisitor.prototype.leftMostSafeNode = function (ast) {
        var _this = this;
        var visit = function (visitor, ast) {
            return (_this._nodeMap.get(ast) || ast).visit(visitor);
        };
        return ast.visit({
            visitBinary: function (ast) { return null; },
            visitChain: function (ast) { return null; },
            visitConditional: function (ast) { return null; },
            visitFunctionCall: function (ast) { return null; },
            visitImplicitReceiver: function (ast) { return null; },
            visitInterpolation: function (ast) { return null; },
            visitKeyedRead: function (ast) { return visit(this, ast.obj); },
            visitKeyedWrite: function (ast) { return null; },
            visitLiteralArray: function (ast) { return null; },
            visitLiteralMap: function (ast) { return null; },
            visitLiteralPrimitive: function (ast) { return null; },
            visitMethodCall: function (ast) { return visit(this, ast.receiver); },
            visitPipe: function (ast) { return null; },
            visitPrefixNot: function (ast) { return null; },
            visitNonNullAssert: function (ast) { return null; },
            visitPropertyRead: function (ast) { return visit(this, ast.receiver); },
            visitPropertyWrite: function (ast) { return null; },
            visitQuote: function (ast) { return null; },
            visitSafeMethodCall: function (ast) { return visit(this, ast.receiver) || ast; },
            visitSafePropertyRead: function (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.
    _AstToIrVisitor.prototype.needsTemporary = function (ast) {
        var _this = this;
        var visit = function (visitor, ast) {
            return ast && (_this._nodeMap.get(ast) || ast).visit(visitor);
        };
        var visitSome = function (visitor, ast) {
            return ast.some(function (ast) { return visit(visitor, ast); });
        };
        return ast.visit({
            visitBinary: function (ast) { return visit(this, ast.left) || visit(this, ast.right); },
            visitChain: function (ast) { return false; },
            visitConditional: function (ast) {
                return visit(this, ast.condition) || visit(this, ast.trueExp) ||
                    visit(this, ast.falseExp);
            },
            visitFunctionCall: function (ast) { return true; },
            visitImplicitReceiver: function (ast) { return false; },
            visitInterpolation: function (ast) { return visitSome(this, ast.expressions); },
            visitKeyedRead: function (ast) { return false; },
            visitKeyedWrite: function (ast) { return false; },
            visitLiteralArray: function (ast) { return true; },
            visitLiteralMap: function (ast) { return true; },
            visitLiteralPrimitive: function (ast) { return false; },
            visitMethodCall: function (ast) { return true; },
            visitPipe: function (ast) { return true; },
            visitPrefixNot: function (ast) { return visit(this, ast.expression); },
            visitNonNullAssert: function (ast) { return visit(this, ast.expression); },
            visitPropertyRead: function (ast) { return false; },
            visitPropertyWrite: function (ast) { return false; },
            visitQuote: function (ast) { return false; },
            visitSafeMethodCall: function (ast) { return true; },
            visitSafePropertyRead: function (ast) { return false; }
        });
    };
    _AstToIrVisitor.prototype.allocateTemporary = function () {
        var tempNumber = this._currentTemporary++;
        this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);
        return new ReadVarExpr(temporaryName(this.bindingId, tempNumber));
    };
    _AstToIrVisitor.prototype.releaseTemporary = function (temporary) {
        this._currentTemporary--;
        if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {
            throw new Error("Temporary " + temporary.name + " released out of order");
        }
    };
    return _AstToIrVisitor;
}());
function flattenStatements(arg, output) {
    if (Array.isArray(arg)) {
        arg.forEach(function (entry) { return flattenStatements(entry, output); });
    }
    else {
        output.push(arg);
    }
}
var DefaultLocalResolver = /** @class */ (function () {
    function DefaultLocalResolver() {
    }
    DefaultLocalResolver.prototype.getLocal = function (name) {
        if (name === EventHandlerVars.event.name) {
            return EventHandlerVars.event;
        }
        return null;
    };
    return DefaultLocalResolver;
}());
function createCurrValueExpr(bindingId) {
    return variable("currVal_" + bindingId); // fix syntax highlighting: `
}
function createPreventDefaultVar(bindingId) {
    return variable("pd_" + bindingId);
}
function convertStmtIntoExpression(stmt) {
    if (stmt instanceof ExpressionStatement) {
        return stmt.expr;
    }
    else if (stmt instanceof ReturnStatement) {
        return stmt.value;
    }
    return null;
}
var BuiltinFunctionCall = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BuiltinFunctionCall, _super);
    function BuiltinFunctionCall(span, args, converter) {
        var _this = _super.call(this, span, null, args) || this;
        _this.args = args;
        _this.converter = converter;
        return _this;
    }
    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
 */
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 " + 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 $EOF = 0;
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 $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 $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 $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);
}

/**
 * @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 = /** @class */ (function () {
    function ParseLocation(file, offset, line, col) {
        this.file = file;
        this.offset = offset;
        this.line = line;
        this.col = col;
    }
    ParseLocation.prototype.toString = function () {
        return this.offset != null ? this.file.url + "@" + this.line + ":" + this.col : this.file.url;
    };
    ParseLocation.prototype.moveBy = function (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
    ParseLocation.prototype.getContext = function (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 = /** @class */ (function () {
    function ParseSourceFile(content, url) {
        this.content = content;
        this.url = url;
    }
    return ParseSourceFile;
}());
var ParseSourceSpan = /** @class */ (function () {
    function ParseSourceSpan(start, end, details) {
        if (details === void 0) { details = null; }
        this.start = start;
        this.end = end;
        this.details = details;
    }
    ParseSourceSpan.prototype.toString = function () {
        return this.start.file.content.substring(this.start.offset, this.end.offset);
    };
    return ParseSourceSpan;
}());
var ParseErrorLevel;
(function (ParseErrorLevel) {
    ParseErrorLevel[ParseErrorLevel["WARNING"] = 0] = "WARNING";
    ParseErrorLevel[ParseErrorLevel["ERROR"] = 1] = "ERROR";
})(ParseErrorLevel || (ParseErrorLevel = {}));
var ParseError = /** @class */ (function () {
    function ParseError(span, msg, level) {
        if (level === void 0) { level = ParseErrorLevel.ERROR; }
        this.span = span;
        this.msg = msg;
        this.level = level;
    }
    ParseError.prototype.contextualMessage = function () {
        var ctx = this.span.start.getContext(100, 3);
        return ctx ? this.msg + " (\"" + ctx.before + "[" + ParseErrorLevel[this.level] + " ->]" + ctx.after + "\")" :
            this.msg;
    };
    ParseError.prototype.toString = function () {
        var details = this.span.details ? ", " + this.span.details : '';
        return this.contextualMessage() + ": " + this.span.start + details;
    };
    return ParseError;
}());
function typeSourceSpan(kind, type) {
    var moduleUrl = identifierModuleUrl(type);
    var sourceFileName = moduleUrl != null ? "in " + kind + " " + identifierName(type) + " in " + moduleUrl :
        "in " + kind + " " + identifierName(type);
    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
 */
/**
 * 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 = /** @class */ (function () {
    function 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.
    */
    ShadowCss.prototype.shimCssText = function (cssText, selector, hostSelector) {
        if (hostSelector === void 0) { hostSelector = ''; }
        var commentsWithHash = extractCommentsWithHash(cssText);
        cssText = stripComments(cssText);
        cssText = this._insertDirectives(cssText);
        var scopedCssText = this._scopeCssText(cssText, selector, hostSelector);
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([scopedCssText], commentsWithHash).join('\n');
    };
    ShadowCss.prototype._insertDirectives = function (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 {
     *
    **/
    ShadowCss.prototype._insertPolyfillDirectivesInCssText = function (cssText) {
        // Difference with webcomponents.js: does not handle comments
        return cssText.replace(_cssContentNextSelectorRe, function () {
            var m = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                m[_i] = arguments[_i];
            }
            return m[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 {...}
     *
    **/
    ShadowCss.prototype._insertPolyfillRulesInCssText = function (cssText) {
        // Difference with webcomponents.js: does not handle comments
        return cssText.replace(_cssContentRuleRe, function () {
            var m = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                m[_i] = arguments[_i];
            }
            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 { ... }
    */
    ShadowCss.prototype._scopeCssText = function (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 {...}
     *
    **/
    ShadowCss.prototype._extractUnscopedRulesFromCssText = function (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
    */
    ShadowCss.prototype._convertColonHost = function (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 { ... }
    */
    ShadowCss.prototype._convertColonHostContext = function (cssText) {
        return this._convertColonRule(cssText, _cssColonHostContextRe, this._colonHostContextPartReplacer);
    };
    ShadowCss.prototype._convertColonRule = function (cssText, regExp, partReplacer) {
        // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
        return cssText.replace(regExp, function () {
            var m = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                m[_i] = arguments[_i];
            }
            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];
            }
        });
    };
    ShadowCss.prototype._colonHostContextPartReplacer = function (host, part, suffix) {
        if (part.indexOf(_polyfillHost) > -1) {
            return this._colonHostPartReplacer(host, part, suffix);
        }
        else {
            return host + part + suffix + ', ' + part + ' ' + host + suffix;
        }
    };
    ShadowCss.prototype._colonHostPartReplacer = function (host, part, suffix) {
        return host + part.replace(_polyfillHost, '') + suffix;
    };
    /*
     * Convert combinators like ::shadow and pseudo-elements like ::content
     * by replacing with space.
    */
    ShadowCss.prototype._convertShadowDOMSelectors = function (cssText) {
        return _shadowDOMSelectorsRe.reduce(function (result, pattern) { return result.replace(pattern, ' '); }, cssText);
    };
    // change a selector like 'div' to 'name div'
    ShadowCss.prototype._scopeSelectors = function (cssText, scopeSelector, hostSelector) {
        var _this = this;
        return processRules(cssText, function (rule) {
            var selector = rule.selector;
            var content = rule.content;
            if (rule.selector[0] != '@') {
                selector =
                    _this._scopeSelector(rule.selector, scopeSelector, hostSelector, _this.strictStyling);
            }
            else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||
                rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {
                content = _this._scopeSelectors(rule.content, scopeSelector, hostSelector);
            }
            return new CssRule(selector, content);
        });
    };
    ShadowCss.prototype._scopeSelector = function (selector, scopeSelector, hostSelector, strict) {
        var _this = this;
        return selector.split(',')
            .map(function (part) { return part.trim().split(_shadowDeepSelectors); })
            .map(function (deepParts) {
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(deepParts), shallowPart = _a[0], otherParts = _a.slice(1);
            var applyScope = function (shallowPart) {
                if (_this._selectorNeedsScoping(shallowPart, scopeSelector)) {
                    return strict ?
                        _this._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) :
                        _this._applySelectorScope(shallowPart, scopeSelector, hostSelector);
                }
                else {
                    return shallowPart;
                }
            };
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([applyScope(shallowPart)], otherParts).join(' ');
        })
            .join(', ');
    };
    ShadowCss.prototype._selectorNeedsScoping = function (selector, scopeSelector) {
        var re = this._makeScopeMatcher(scopeSelector);
        return !re.test(selector);
    };
    ShadowCss.prototype._makeScopeMatcher = function (scopeSelector) {
        var lre = /\[/g;
        var rre = /\]/g;
        scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
        return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
    };
    ShadowCss.prototype._applySelectorScope = function (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]
    ShadowCss.prototype._applySimpleSelectorScope = function (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_1 = this.strictStyling ? "[" + hostSelector + "]" : scopeSelector;
            return selector
                .replace(_polyfillHostNoCombinatorRe, function (hnc, selector) {
                return selector.replace(/([^:]*)(:*)(.*)/, function (_, before, colon, after) {
                    return before + replaceBy_1 + colon + after;
                });
            })
                .replace(_polyfillHostRe, replaceBy_1 + ' ');
        }
        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 */
    ShadowCss.prototype._applyStrictSelectorScope = function (selector, scopeSelector, hostSelector) {
        var _this = this;
        var isRe = /\[is=([^\]]*)\]/g;
        scopeSelector = scopeSelector.replace(isRe, function (_) {
            var parts = [];
            for (var _i = 1; _i < arguments.length; _i++) {
                parts[_i - 1] = arguments[_i];
            }
            return parts[0];
        });
        var attrName = '[' + scopeSelector + ']';
        var _scopeSelectorPart = function (p) {
            var scopedP = p.trim();
            if (!scopedP) {
                return '';
            }
            if (p.indexOf(_polyfillHostNoCombinator) > -1) {
                scopedP = _this._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_1 = selector.slice(startIndex, res.index).trim();
            shouldScope = shouldScope || part_1.indexOf(_polyfillHostNoCombinator) > -1;
            var scopedPart = shouldScope ? _scopeSelectorPart(part_1) : part_1;
            scopedSelector += scopedPart + " " + 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);
    };
    ShadowCss.prototype._insertPolyfillHostInCssText = function (selector) {
        return selector.replace(_colonHostContextRe, _polyfillHostContext)
            .replace(_colonHostRe, _polyfillHost);
    };
    return ShadowCss;
}());
var SafeSelector = /** @class */ (function () {
    function SafeSelector(selector) {
        var _this = this;
        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-" + _this.index + "__";
            _this.placeholders.push(keep);
            _this.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-" + _this.index + "__";
            _this.placeholders.push(exp);
            _this.index++;
            return pseudo + replaceBy;
        });
    }
    SafeSelector.prototype.restore = function (content) {
        var _this = this;
        return content.replace(/__ph-(\d+)__/g, function (ph, index) { return _this.placeholders[+index]; });
    };
    SafeSelector.prototype.content = function () { 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 = /** @class */ (function () {
    function CssRule(selector, content) {
        this.selector = selector;
        this.content = content;
    }
    return CssRule;
}());
function processRules(input, ruleCallback) {
    var inputWithEscapedBlocks = escapeBlocks(input);
    var nextBlockIndex = 0;
    return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function () {
        var m = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            m[_i] = arguments[_i];
        }
        var selector = m[2];
        var content = '';
        var suffix = m[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 "" + m[1] + rule.selector + m[3] + contentPrefix + rule.content + suffix;
    });
}
var StringWithEscapedBlocks = /** @class */ (function () {
    function StringWithEscapedBlocks(escapedString, blocks) {
        this.escapedString = escapedString;
        this.blocks = blocks;
    }
    return StringWithEscapedBlocks;
}());
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-" + COMPONENT_VARIABLE;
var CONTENT_ATTR = "_ngcontent-" + COMPONENT_VARIABLE;
var StylesCompileDependency = /** @class */ (function () {
    function StylesCompileDependency(name, moduleUrl, setValue) {
        this.name = name;
        this.moduleUrl = moduleUrl;
        this.setValue = setValue;
    }
    return StylesCompileDependency;
}());
var CompiledStylesheet = /** @class */ (function () {
    function CompiledStylesheet(outputCtx, stylesVar, dependencies, isShimmed, meta) {
        this.outputCtx = outputCtx;
        this.stylesVar = stylesVar;
        this.dependencies = dependencies;
        this.isShimmed = isShimmed;
        this.meta = meta;
    }
    return CompiledStylesheet;
}());
var StyleCompiler = /** @class */ (function () {
    function StyleCompiler(_urlResolver) {
        this._urlResolver = _urlResolver;
        this._shadowCss = new ShadowCss();
    }
    StyleCompiler.prototype.compileComponent = function (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);
    };
    StyleCompiler.prototype.compileStyles = function (outputCtx, comp, stylesheet, shim) {
        if (shim === void 0) { shim = this.needsStyleShim(comp); }
        return this._compileStyles(outputCtx, comp, stylesheet, shim, false);
    };
    StyleCompiler.prototype.needsStyleShim = function (comp) {
        return comp.template.encapsulation === ViewEncapsulation.Emulated;
    };
    StyleCompiler.prototype._compileStyles = function (outputCtx, comp, stylesheet, shim, isComponentStylesheet) {
        var _this = this;
        var styleExpressions = stylesheet.styles.map(function (plainStyle) { return literal(_this._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);
    };
    StyleCompiler.prototype._shimIfNeeded = function (style, shim) {
        return shim ? this._shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR) : style;
    };
    return StyleCompiler;
}());
function getStylesVarName(component) {
    var result = "styles";
    if (component) {
        result += "_" + 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
 */
var TokenType;
(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 || (TokenType = {}));
var KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];
var Lexer = /** @class */ (function () {
    function Lexer() {
    }
    Lexer.prototype.tokenize = function (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 = /** @class */ (function () {
    function Token(index, type, numValue, strValue) {
        this.index = index;
        this.type = type;
        this.numValue = numValue;
        this.strValue = strValue;
    }
    Token.prototype.isCharacter = function (code) {
        return this.type == TokenType.Character && this.numValue == code;
    };
    Token.prototype.isNumber = function () { return this.type == TokenType.Number; };
    Token.prototype.isString = function () { return this.type == TokenType.String; };
    Token.prototype.isOperator = function (operator) {
        return this.type == TokenType.Operator && this.strValue == operator;
    };
    Token.prototype.isIdentifier = function () { return this.type == TokenType.Identifier; };
    Token.prototype.isKeyword = function () { return this.type == TokenType.Keyword; };
    Token.prototype.isKeywordLet = function () { return this.type == TokenType.Keyword && this.strValue == 'let'; };
    Token.prototype.isKeywordAs = function () { return this.type == TokenType.Keyword && this.strValue == 'as'; };
    Token.prototype.isKeywordNull = function () { return this.type == TokenType.Keyword && this.strValue == 'null'; };
    Token.prototype.isKeywordUndefined = function () {
        return this.type == TokenType.Keyword && this.strValue == 'undefined';
    };
    Token.prototype.isKeywordTrue = function () { return this.type == TokenType.Keyword && this.strValue == 'true'; };
    Token.prototype.isKeywordFalse = function () { return this.type == TokenType.Keyword && this.strValue == 'false'; };
    Token.prototype.isKeywordThis = function () { return this.type == TokenType.Keyword && this.strValue == 'this'; };
    Token.prototype.isError = function () { return this.type == TokenType.Error; };
    Token.prototype.toNumber = function () { return this.type == TokenType.Number ? this.numValue : -1; };
    Token.prototype.toString = function () {
        switch (this.type) {
            case TokenType.Character:
            case TokenType.Identifier:
            case TokenType.Keyword:
            case TokenType.Operator:
            case TokenType.String:
            case TokenType.Error:
                return this.strValue;
            case TokenType.Number:
                return this.numValue.toString();
            default:
                return null;
        }
    };
    return Token;
}());
function newCharacterToken(index, code) {
    return new Token(index, TokenType.Character, code, String.fromCharCode(code));
}
function newIdentifierToken(index, text) {
    return new Token(index, TokenType.Identifier, 0, text);
}
function newKeywordToken(index, text) {
    return new Token(index, TokenType.Keyword, 0, text);
}
function newOperatorToken(index, text) {
    return new Token(index, TokenType.Operator, 0, text);
}
function newStringToken(index, text) {
    return new Token(index, TokenType.String, 0, text);
}
function newNumberToken(index, n) {
    return new Token(index, TokenType.Number, n, '');
}
function newErrorToken(index, message) {
    return new Token(index, TokenType.Error, 0, message);
}
var EOF = new Token(-1, TokenType.Character, 0, '');
var _Scanner = /** @class */ (function () {
    function _Scanner(input) {
        this.input = input;
        this.peek = 0;
        this.index = -1;
        this.length = input.length;
        this.advance();
    }
    _Scanner.prototype.advance = function () {
        this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);
    };
    _Scanner.prototype.scanToken = function () {
        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 [" + String.fromCharCode(peek) + "]", 0);
    };
    _Scanner.prototype.scanCharacter = function (start, code) {
        this.advance();
        return newCharacterToken(start, code);
    };
    _Scanner.prototype.scanOperator = function (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)
     */
    _Scanner.prototype.scanComplexOperator = function (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);
    };
    _Scanner.prototype.scanIdentifier = function () {
        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);
    };
    _Scanner.prototype.scanNumber = function (start) {
        var simple = (this.index === start);
        this.advance(); // Skip initial digit.
        while (true) {
            if (isDigit(this.peek)) ;
            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);
    };
    _Scanner.prototype.scanString = function () {
        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" + 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);
    };
    _Scanner.prototype.error = function (message, offset) {
        var position = this.index + offset;
        return newErrorToken(position, "Lexer Error: " + message + " at column " + position + " in expression [" + 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
 */
function assertArrayOfStrings(identifier, value) {
    if (value == null) {
        return;
    }
    if (!Array.isArray(value)) {
        throw new Error("Expected '" + 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 '" + identifier + "' to be an array of strings.");
        }
    }
}
var INTERPOLATION_BLACKLIST_REGEXPS = [
    /^\s*$/,
    /[<>]/,
    /^[{}]$/,
    /&(#|[a-z])/i,
    /^\/\//,
];
function assertInterpolationSymbols(identifier, value) {
    if (value != null && !(Array.isArray(value) && value.length == 2)) {
        throw new Error("Expected '" + identifier + "' to be an array, [start, end].");
    }
    else if (value != null) {
        var start_1 = value[0];
        var end_1 = value[1];
        // black list checking
        INTERPOLATION_BLACKLIST_REGEXPS.forEach(function (regexp) {
            if (regexp.test(start_1) || regexp.test(end_1)) {
                throw new Error("['" + start_1 + "', '" + end_1 + "'] 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 = /** @class */ (function () {
    function InterpolationConfig(start, end) {
        this.start = start;
        this.end = end;
    }
    InterpolationConfig.fromArray = function (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
 */
var SplitInterpolation = /** @class */ (function () {
    function SplitInterpolation(strings, expressions, offsets) {
        this.strings = strings;
        this.expressions = expressions;
        this.offsets = offsets;
    }
    return SplitInterpolation;
}());
var TemplateBindingParseResult = /** @class */ (function () {
    function TemplateBindingParseResult(templateBindings, warnings, errors) {
        this.templateBindings = templateBindings;
        this.warnings = warnings;
        this.errors = errors;
    }
    return TemplateBindingParseResult;
}());
function _createInterpolateRegExp(config) {
    var pattern = escapeRegExp(config.start) + '([\\s\\S]*?)' + escapeRegExp(config.end);
    return new RegExp(pattern, 'g');
}
var Parser = /** @class */ (function () {
    function Parser(_lexer) {
        this._lexer = _lexer;
        this.errors = [];
    }
    Parser.prototype.parseAction = function (input, location, interpolationConfig) {
        if (interpolationConfig === void 0) { interpolationConfig = 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, tokens, sourceToLex.length, true, this.errors, input.length - sourceToLex.length)
            .parseChain();
        return new ASTWithSource(ast, input, location, this.errors);
    };
    Parser.prototype.parseBinding = function (input, location, interpolationConfig) {
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
        var ast = this._parseBindingAst(input, location, interpolationConfig);
        return new ASTWithSource(ast, input, location, this.errors);
    };
    Parser.prototype.parseSimpleBinding = function (input, location, interpolationConfig) {
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
        var ast = this._parseBindingAst(input, location, interpolationConfig);
        var errors = SimpleExpressionChecker.check(ast);
        if (errors.length > 0) {
            this._reportError("Host binding expression cannot contain " + errors.join(' '), input, location);
        }
        return new ASTWithSource(ast, input, location, this.errors);
    };
    Parser.prototype._reportError = function (message, input, errLocation, ctxLocation) {
        this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
    };
    Parser.prototype._parseBindingAst = function (input, location, 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, tokens, sourceToLex.length, false, this.errors, input.length - sourceToLex.length)
            .parseChain();
    };
    Parser.prototype._parseQuote = function (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);
    };
    Parser.prototype.parseTemplateBindings = function (tplKey, tplValue, location) {
        var tokens = this._lexer.tokenize(tplValue);
        return new _ParseAST(tplValue, location, tokens, tplValue.length, false, this.errors, 0)
            .parseTemplateBindings(tplKey);
    };
    Parser.prototype.parseInterpolation = function (input, location, interpolationConfig) {
        if (interpolationConfig === void 0) { interpolationConfig = 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, 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, this.errors);
    };
    Parser.prototype.splitInterpolation = function (input, location, interpolationConfig) {
        if (interpolationConfig === void 0) { interpolationConfig = 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 " + this._findInterpolationErrorColumn(parts, i, interpolationConfig) + " in", location);
                expressions.push('$implict');
                offsets.push(offset);
            }
        }
        return new SplitInterpolation(strings, expressions, offsets);
    };
    Parser.prototype.wrapLiteralPrimitive = function (input, location) {
        return new ASTWithSource(new LiteralPrimitive(new ParseSpan(0, input == null ? 0 : input.length), input), input, location, this.errors);
    };
    Parser.prototype._stripComments = function (input) {
        var i = this._commentStart(input);
        return i != null ? input.substring(0, i).trim() : input;
    };
    Parser.prototype._commentStart = function (input) {
        var outerQuote = null;
        for (var i = 0; i < input.length - 1; i++) {
            var char = input.charCodeAt(i);
            var nextChar = input.charCodeAt(i + 1);
            if (char === $SLASH && nextChar == $SLASH && outerQuote == null)
                return i;
            if (outerQuote === char) {
                outerQuote = null;
            }
            else if (outerQuote == null && isQuote(char)) {
                outerQuote = char;
            }
        }
        return null;
    };
    Parser.prototype._checkNoInterpolation = function (input, location, interpolationConfig) {
        var regexp = _createInterpolateRegExp(interpolationConfig);
        var parts = input.split(regexp);
        if (parts.length > 1) {
            this._reportError("Got interpolation (" + interpolationConfig.start + interpolationConfig.end + ") where expression was expected", input, "at column " + this._findInterpolationErrorColumn(parts, 1, interpolationConfig) + " in", location);
        }
    };
    Parser.prototype._findInterpolationErrorColumn = function (parts, partInErrIdx, interpolationConfig) {
        var errLocation = '';
        for (var j = 0; j < partInErrIdx; j++) {
            errLocation += j % 2 === 0 ?
                parts[j] :
                "" + interpolationConfig.start + parts[j] + interpolationConfig.end;
        }
        return errLocation.length;
    };
    return Parser;
}());
var _ParseAST = /** @class */ (function () {
    function _ParseAST(input, location, tokens, inputLength, parseAction, errors, offset) {
        this.input = input;
        this.location = location;
        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;
    }
    _ParseAST.prototype.peek = function (offset) {
        var i = this.index + offset;
        return i < this.tokens.length ? this.tokens[i] : EOF;
    };
    Object.defineProperty(_ParseAST.prototype, "next", {
        get: function () { return this.peek(0); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(_ParseAST.prototype, "inputIndex", {
        get: function () {
            return (this.index < this.tokens.length) ? this.next.index + this.offset :
                this.inputLength + this.offset;
        },
        enumerable: true,
        configurable: true
    });
    _ParseAST.prototype.span = function (start) { return new ParseSpan(start, this.inputIndex); };
    _ParseAST.prototype.advance = function () { this.index++; };
    _ParseAST.prototype.optionalCharacter = function (code) {
        if (this.next.isCharacter(code)) {
            this.advance();
            return true;
        }
        else {
            return false;
        }
    };
    _ParseAST.prototype.peekKeywordLet = function () { return this.next.isKeywordLet(); };
    _ParseAST.prototype.peekKeywordAs = function () { return this.next.isKeywordAs(); };
    _ParseAST.prototype.expectCharacter = function (code) {
        if (this.optionalCharacter(code))
            return;
        this.error("Missing expected " + String.fromCharCode(code));
    };
    _ParseAST.prototype.optionalOperator = function (op) {
        if (this.next.isOperator(op)) {
            this.advance();
            return true;
        }
        else {
            return false;
        }
    };
    _ParseAST.prototype.expectOperator = function (operator) {
        if (this.optionalOperator(operator))
            return;
        this.error("Missing expected operator " + operator);
    };
    _ParseAST.prototype.expectIdentifierOrKeyword = function () {
        var n = this.next;
        if (!n.isIdentifier() && !n.isKeyword()) {
            this.error("Unexpected token " + n + ", expected identifier or keyword");
            return '';
        }
        this.advance();
        return n.toString();
    };
    _ParseAST.prototype.expectIdentifierOrKeywordOrString = function () {
        var n = this.next;
        if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {
            this.error("Unexpected token " + n + ", expected identifier, keyword, or string");
            return '';
        }
        this.advance();
        return n.toString();
    };
    _ParseAST.prototype.parseChain = function () {
        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 '" + 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);
    };
    _ParseAST.prototype.parsePipe = function () {
        var result = this.parseExpression();
        if (this.optionalOperator('|')) {
            if (this.parseAction) {
                this.error('Cannot have a pipe in an action expression');
            }
            do {
                var name_1 = this.expectIdentifierOrKeyword();
                var args = [];
                while (this.optionalCharacter($COLON)) {
                    args.push(this.parseExpression());
                }
                result = new BindingPipe(this.span(result.span.start), result, name_1, args);
            } while (this.optionalOperator('|'));
        }
        return result;
    };
    _ParseAST.prototype.parseExpression = function () { return this.parseConditional(); };
    _ParseAST.prototype.parseConditional = function () {
        var start = this.inputIndex;
        var result = this.parseLogicalOr();
        if (this.optionalOperator('?')) {
            var yes = this.parsePipe();
            var no = void 0;
            if (!this.optionalCharacter($COLON)) {
                var end = this.inputIndex;
                var expression = this.input.substring(start, end);
                this.error("Conditional expression " + 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;
        }
    };
    _ParseAST.prototype.parseLogicalOr = function () {
        // '||'
        var result = this.parseLogicalAnd();
        while (this.optionalOperator('||')) {
            var right = this.parseLogicalAnd();
            result = new Binary(this.span(result.span.start), '||', result, right);
        }
        return result;
    };
    _ParseAST.prototype.parseLogicalAnd = function () {
        // '&&'
        var result = this.parseEquality();
        while (this.optionalOperator('&&')) {
            var right = this.parseEquality();
            result = new Binary(this.span(result.span.start), '&&', result, right);
        }
        return result;
    };
    _ParseAST.prototype.parseEquality = function () {
        // '==','!=','===','!=='
        var result = this.parseRelational();
        while (this.next.type == TokenType.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;
    };
    _ParseAST.prototype.parseRelational = function () {
        // '<', '>', '<=', '>='
        var result = this.parseAdditive();
        while (this.next.type == TokenType.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;
    };
    _ParseAST.prototype.parseAdditive = function () {
        // '+', '-'
        var result = this.parseMultiplicative();
        while (this.next.type == TokenType.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;
    };
    _ParseAST.prototype.parseMultiplicative = function () {
        // '*', '%', '/'
        var result = this.parsePrefix();
        while (this.next.type == TokenType.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;
    };
    _ParseAST.prototype.parsePrefix = function () {
        if (this.next.type == TokenType.Operator) {
            var start = this.inputIndex;
            var operator = this.next.strValue;
            var result = void 0;
            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();
    };
    _ParseAST.prototype.parseCallChain = function () {
        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;
            }
        }
    };
    _ParseAST.prototype.parsePrimary = function () {
        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: " + this.input);
            return new EmptyExpr(this.span(start));
        }
        else {
            this.error("Unexpected token " + this.next);
            return new EmptyExpr(this.span(start));
        }
    };
    _ParseAST.prototype.parseExpressionList = function (terminator) {
        var result = [];
        if (!this.next.isCharacter(terminator)) {
            do {
                result.push(this.parsePipe());
            } while (this.optionalCharacter($COMMA));
        }
        return result;
    };
    _ParseAST.prototype.parseLiteralMap = function () {
        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);
    };
    _ParseAST.prototype.parseAccessMemberOrMethodCall = function (receiver, isSafe) {
        if (isSafe === void 0) { isSafe = 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);
                }
            }
        }
    };
    _ParseAST.prototype.parseCallArguments = function () {
        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.
     */
    _ParseAST.prototype.expectTemplateBindingKey = function () {
        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>`
    _ParseAST.prototype.parseTemplateBindings = function (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_2 = null;
            var expression = null;
            if (isVar) {
                if (this.optionalOperator('=')) {
                    name_2 = this.expectTemplateBindingKey();
                }
                else {
                    name_2 = '\$implicit';
                }
            }
            else if (this.peekKeywordAs()) {
                this.advance(); // consume `as`
                name_2 = rawKey;
                key = this.expectTemplateBindingKey(); // read local var name
                isVar = true;
            }
            else if (this.next !== EOF && !this.peekKeywordLet()) {
                var start_1 = this.inputIndex;
                var ast = this.parsePipe();
                var source = this.input.substring(start_1 - this.offset, this.inputIndex - this.offset);
                expression = new ASTWithSource(ast, source, this.location, this.errors);
            }
            bindings.push(new TemplateBinding(this.span(start), key, isVar, name_2, 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);
    };
    _ParseAST.prototype.error = function (message, index) {
        if (index === void 0) { index = null; }
        this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));
        this.skip();
    };
    _ParseAST.prototype.locationText = function (index) {
        if (index === void 0) { index = null; }
        if (index == null)
            index = this.index;
        return (index < this.tokens.length) ? "at column " + (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.
    _ParseAST.prototype.skip = function () {
        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;
        }
    };
    return _ParseAST;
}());
var SimpleExpressionChecker = /** @class */ (function () {
    function SimpleExpressionChecker() {
        this.errors = [];
    }
    SimpleExpressionChecker.check = function (ast) {
        var s = new SimpleExpressionChecker();
        ast.visit(s);
        return s.errors;
    };
    SimpleExpressionChecker.prototype.visitImplicitReceiver = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitInterpolation = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitLiteralPrimitive = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitPropertyRead = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitPropertyWrite = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitSafePropertyRead = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitMethodCall = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitSafeMethodCall = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitFunctionCall = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitLiteralArray = function (ast, context) { this.visitAll(ast.expressions); };
    SimpleExpressionChecker.prototype.visitLiteralMap = function (ast, context) { this.visitAll(ast.values); };
    SimpleExpressionChecker.prototype.visitBinary = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitPrefixNot = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitNonNullAssert = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitConditional = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitPipe = function (ast, context) { this.errors.push('pipes'); };
    SimpleExpressionChecker.prototype.visitKeyedRead = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitKeyedWrite = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitAll = function (asts) {
        var _this = this;
        return asts.map(function (node) { return node.visit(_this); });
    };
    SimpleExpressionChecker.prototype.visitChain = function (ast, context) { };
    SimpleExpressionChecker.prototype.visitQuote = function (ast, context) { };
    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
 */
/**
 * 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 = /** @class */ (function () {
    function AstPath(path, position) {
        if (position === void 0) { position = -1; }
        this.path = path;
        this.position = position;
    }
    Object.defineProperty(AstPath.prototype, "empty", {
        get: function () { return !this.path || !this.path.length; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AstPath.prototype, "head", {
        get: function () { return this.path[0]; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AstPath.prototype, "tail", {
        get: function () { return this.path[this.path.length - 1]; },
        enumerable: true,
        configurable: true
    });
    AstPath.prototype.parentOf = function (node) {
        return node && this.path[this.path.indexOf(node) - 1];
    };
    AstPath.prototype.childOf = function (node) { return this.path[this.path.indexOf(node) + 1]; };
    AstPath.prototype.first = function (ctor) {
        for (var i = this.path.length - 1; i >= 0; i--) {
            var item = this.path[i];
            if (item instanceof ctor)
                return item;
        }
    };
    AstPath.prototype.push = function (node) { this.path.push(node); };
    AstPath.prototype.pop = function () { return this.path.pop(); };
    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 = /** @class */ (function () {
    function Text(value, sourceSpan) {
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    Text.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };
    return Text;
}());
var Expansion = /** @class */ (function () {
    function Expansion(switchValue, type, cases, sourceSpan, switchValueSourceSpan) {
        this.switchValue = switchValue;
        this.type = type;
        this.cases = cases;
        this.sourceSpan = sourceSpan;
        this.switchValueSourceSpan = switchValueSourceSpan;
    }
    Expansion.prototype.visit = function (visitor, context) { return visitor.visitExpansion(this, context); };
    return Expansion;
}());
var ExpansionCase = /** @class */ (function () {
    function ExpansionCase(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {
        this.value = value;
        this.expression = expression;
        this.sourceSpan = sourceSpan;
        this.valueSourceSpan = valueSourceSpan;
        this.expSourceSpan = expSourceSpan;
    }
    ExpansionCase.prototype.visit = function (visitor, context) { return visitor.visitExpansionCase(this, context); };
    return ExpansionCase;
}());
var Attribute = /** @class */ (function () {
    function Attribute(name, value, sourceSpan, valueSpan) {
        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
        this.valueSpan = valueSpan;
    }
    Attribute.prototype.visit = function (visitor, context) { return visitor.visitAttribute(this, context); };
    return Attribute;
}());
var Element = /** @class */ (function () {
    function Element(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan) {
        if (startSourceSpan === void 0) { startSourceSpan = null; }
        if (endSourceSpan === void 0) { endSourceSpan = null; }
        this.name = name;
        this.attrs = attrs;
        this.children = children;
        this.sourceSpan = sourceSpan;
        this.startSourceSpan = startSourceSpan;
        this.endSourceSpan = endSourceSpan;
    }
    Element.prototype.visit = function (visitor, context) { return visitor.visitElement(this, context); };
    return Element;
}());
var Comment = /** @class */ (function () {
    function Comment(value, sourceSpan) {
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    Comment.prototype.visit = function (visitor, context) { return visitor.visitComment(this, context); };
    return Comment;
}());
function visitAll(visitor, nodes, context) {
    if (context === void 0) { context = 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 = /** @class */ (function () {
    function RecursiveVisitor() {
    }
    RecursiveVisitor.prototype.visitElement = function (ast, context) {
        this.visitChildren(context, function (visit) {
            visit(ast.attrs);
            visit(ast.children);
        });
    };
    RecursiveVisitor.prototype.visitAttribute = function (ast, context) { };
    RecursiveVisitor.prototype.visitText = function (ast, context) { };
    RecursiveVisitor.prototype.visitComment = function (ast, context) { };
    RecursiveVisitor.prototype.visitExpansion = function (ast, context) {
        return this.visitChildren(context, function (visit) { visit(ast.cases); });
    };
    RecursiveVisitor.prototype.visitExpansionCase = function (ast, context) { };
    RecursiveVisitor.prototype.visitChildren = function (context, cb) {
        var results = [];
        var t = this;
        function visit(children) {
            if (children)
                results.push(visitAll(t, children, context));
        }
        cb(visit);
        return [].concat.apply([], results);
    };
    return RecursiveVisitor;
}());
function spanOf(ast) {
    var start = ast.sourceSpan.start.offset;
    var end = ast.sourceSpan.end.offset;
    if (ast instanceof Element) {
        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 /** @class */ (function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(class_1, _super);
        function class_1() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        class_1.prototype.visit = function (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_1;
    }(RecursiveVisitor));
    visitAll(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$1;
(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_VALUE"] = 12] = "ATTR_VALUE";
    TokenType[TokenType["DOC_TYPE"] = 13] = "DOC_TYPE";
    TokenType[TokenType["EXPANSION_FORM_START"] = 14] = "EXPANSION_FORM_START";
    TokenType[TokenType["EXPANSION_CASE_VALUE"] = 15] = "EXPANSION_CASE_VALUE";
    TokenType[TokenType["EXPANSION_CASE_EXP_START"] = 16] = "EXPANSION_CASE_EXP_START";
    TokenType[TokenType["EXPANSION_CASE_EXP_END"] = 17] = "EXPANSION_CASE_EXP_END";
    TokenType[TokenType["EXPANSION_FORM_END"] = 18] = "EXPANSION_FORM_END";
    TokenType[TokenType["EOF"] = 19] = "EOF";
})(TokenType$1 || (TokenType$1 = {}));
var Token$1 = /** @class */ (function () {
    function Token(type, parts, sourceSpan) {
        this.type = type;
        this.parts = parts;
        this.sourceSpan = sourceSpan;
    }
    return Token;
}());
var TokenError = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TokenError, _super);
    function TokenError(errorMsg, tokenType, span) {
        var _this = _super.call(this, span, errorMsg) || this;
        _this.tokenType = tokenType;
        return _this;
    }
    return TokenError;
}(ParseError));
var TokenizeResult = /** @class */ (function () {
    function TokenizeResult(tokens, errors) {
        this.tokens = tokens;
        this.errors = errors;
    }
    return TokenizeResult;
}());
function tokenize(source, url, getTagDefinition, tokenizeExpansionForms, interpolationConfig) {
    if (tokenizeExpansionForms === void 0) { tokenizeExpansionForms = false; }
    if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
    return new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, tokenizeExpansionForms, interpolationConfig)
        .tokenize();
}
var _CR_OR_CRLF_REGEXP = /\r\n?/g;
function _unexpectedCharacterErrorMsg(charCode) {
    var char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);
    return "Unexpected character \"" + char + "\"";
}
function _unknownEntityErrorMsg(entitySrc) {
    return "Unknown entity \"" + entitySrc + "\" - use the \"&#<decimal>;\" or  \"&#x<hex>;\" syntax";
}
var _ControlFlowError = /** @class */ (function () {
    function _ControlFlowError(error) {
        this.error = error;
    }
    return _ControlFlowError;
}());
// See http://www.w3.org/TR/html51/syntax.html#writing
var _Tokenizer = /** @class */ (function () {
    /**
     * @param _file The html source
     * @param _getTagDefinition
     * @param _tokenizeIcu Whether to tokenize ICU messages (considered as text nodes when false)
     * @param _interpolationConfig
     */
    function _Tokenizer(_file, _getTagDefinition, _tokenizeIcu, _interpolationConfig) {
        if (_interpolationConfig === void 0) { _interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
        this._file = _file;
        this._getTagDefinition = _getTagDefinition;
        this._tokenizeIcu = _tokenizeIcu;
        this._interpolationConfig = _interpolationConfig;
        // Note: this is always lowercase!
        this._peek = -1;
        this._nextPeek = -1;
        this._index = -1;
        this._line = 0;
        this._column = -1;
        this._expansionCaseStack = [];
        this._inInterpolation = false;
        this.tokens = [];
        this.errors = [];
        this._input = _file.content;
        this._length = _file.content.length;
        this._advance();
    }
    _Tokenizer.prototype._processCarriageReturns = function (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');
    };
    _Tokenizer.prototype.tokenize = function () {
        while (this._peek !== $EOF) {
            var start = this._getLocation();
            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) {
                if (e instanceof _ControlFlowError) {
                    this.errors.push(e.error);
                }
                else {
                    throw e;
                }
            }
        }
        this._beginToken(TokenType$1.EOF);
        this._endToken([]);
        return new TokenizeResult(mergeTextTokens(this.tokens), this.errors);
    };
    /**
     * @returns whether an ICU token has been created
     * @internal
     */
    _Tokenizer.prototype._tokenizeExpansionForm = function () {
        if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {
            this._consumeExpansionFormStart();
            return true;
        }
        if (isExpansionCaseStart(this._peek) && this._isInExpansionForm()) {
            this._consumeExpansionCaseStart();
            return true;
        }
        if (this._peek === $RBRACE) {
            if (this._isInExpansionCase()) {
                this._consumeExpansionCaseEnd();
                return true;
            }
            if (this._isInExpansionForm()) {
                this._consumeExpansionFormEnd();
                return true;
            }
        }
        return false;
    };
    _Tokenizer.prototype._getLocation = function () {
        return new ParseLocation(this._file, this._index, this._line, this._column);
    };
    _Tokenizer.prototype._getSpan = function (start, end) {
        if (start === void 0) { start = this._getLocation(); }
        if (end === void 0) { end = this._getLocation(); }
        return new ParseSourceSpan(start, end);
    };
    _Tokenizer.prototype._beginToken = function (type, start) {
        if (start === void 0) { start = this._getLocation(); }
        this._currentTokenStart = start;
        this._currentTokenType = type;
    };
    _Tokenizer.prototype._endToken = function (parts, end) {
        if (end === void 0) { end = this._getLocation(); }
        var token = new Token$1(this._currentTokenType, parts, new ParseSourceSpan(this._currentTokenStart, end));
        this.tokens.push(token);
        this._currentTokenStart = null;
        this._currentTokenType = null;
        return token;
    };
    _Tokenizer.prototype._createError = function (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);
    };
    _Tokenizer.prototype._advance = function () {
        if (this._index >= this._length) {
            throw this._createError(_unexpectedCharacterErrorMsg($EOF), this._getSpan());
        }
        if (this._peek === $LF) {
            this._line++;
            this._column = 0;
        }
        else if (this._peek !== $LF && this._peek !== $CR) {
            this._column++;
        }
        this._index++;
        this._peek = this._index >= this._length ? $EOF : this._input.charCodeAt(this._index);
        this._nextPeek =
            this._index + 1 >= this._length ? $EOF : this._input.charCodeAt(this._index + 1);
    };
    _Tokenizer.prototype._attemptCharCode = function (charCode) {
        if (this._peek === charCode) {
            this._advance();
            return true;
        }
        return false;
    };
    _Tokenizer.prototype._attemptCharCodeCaseInsensitive = function (charCode) {
        if (compareCharCodeCaseInsensitive(this._peek, charCode)) {
            this._advance();
            return true;
        }
        return false;
    };
    _Tokenizer.prototype._requireCharCode = function (charCode) {
        var location = this._getLocation();
        if (!this._attemptCharCode(charCode)) {
            throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location, location));
        }
    };
    _Tokenizer.prototype._attemptStr = function (chars) {
        var len = chars.length;
        if (this._index + len > this._length) {
            return false;
        }
        var initialPosition = this._savePosition();
        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._restorePosition(initialPosition);
                return false;
            }
        }
        return true;
    };
    _Tokenizer.prototype._attemptStrCaseInsensitive = function (chars) {
        for (var i = 0; i < chars.length; i++) {
            if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {
                return false;
            }
        }
        return true;
    };
    _Tokenizer.prototype._requireStr = function (chars) {
        var location = this._getLocation();
        if (!this._attemptStr(chars)) {
            throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location));
        }
    };
    _Tokenizer.prototype._attemptCharCodeUntilFn = function (predicate) {
        while (!predicate(this._peek)) {
            this._advance();
        }
    };
    _Tokenizer.prototype._requireCharCodeUntilFn = function (predicate, len) {
        var start = this._getLocation();
        this._attemptCharCodeUntilFn(predicate);
        if (this._index - start.offset < len) {
            throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(start, start));
        }
    };
    _Tokenizer.prototype._attemptUntilChar = function (char) {
        while (this._peek !== char) {
            this._advance();
        }
    };
    _Tokenizer.prototype._readChar = function (decodeEntities) {
        if (decodeEntities && this._peek === $AMPERSAND) {
            return this._decodeEntity();
        }
        else {
            var index = this._index;
            this._advance();
            return this._input[index];
        }
    };
    _Tokenizer.prototype._decodeEntity = function () {
        var start = this._getLocation();
        this._advance();
        if (this._attemptCharCode($HASH)) {
            var isHex = this._attemptCharCode($x) || this._attemptCharCode($X);
            var numberStart = this._getLocation().offset;
            this._attemptCharCodeUntilFn(isDigitEntityEnd);
            if (this._peek != $SEMICOLON) {
                throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());
            }
            this._advance();
            var strNum = this._input.substring(numberStart, this._index - 1);
            try {
                var charCode = parseInt(strNum, isHex ? 16 : 10);
                return String.fromCharCode(charCode);
            }
            catch (e) {
                var entity = this._input.substring(start.offset + 1, this._index - 1);
                throw this._createError(_unknownEntityErrorMsg(entity), this._getSpan(start));
            }
        }
        else {
            var startPosition = this._savePosition();
            this._attemptCharCodeUntilFn(isNamedEntityEnd);
            if (this._peek != $SEMICOLON) {
                this._restorePosition(startPosition);
                return '&';
            }
            this._advance();
            var name_1 = this._input.substring(start.offset + 1, this._index - 1);
            var char = NAMED_ENTITIES[name_1];
            if (!char) {
                throw this._createError(_unknownEntityErrorMsg(name_1), this._getSpan(start));
            }
            return char;
        }
    };
    _Tokenizer.prototype._consumeRawText = function (decodeEntities, firstCharOfEnd, attemptEndRest) {
        var tagCloseStart;
        var textStart = this._getLocation();
        this._beginToken(decodeEntities ? TokenType$1.ESCAPABLE_RAW_TEXT : TokenType$1.RAW_TEXT, textStart);
        var parts = [];
        while (true) {
            tagCloseStart = this._getLocation();
            if (this._attemptCharCode(firstCharOfEnd) && attemptEndRest()) {
                break;
            }
            if (this._index > tagCloseStart.offset) {
                // add the characters consumed by the previous if statement to the output
                parts.push(this._input.substring(tagCloseStart.offset, this._index));
            }
            while (this._peek !== firstCharOfEnd) {
                parts.push(this._readChar(decodeEntities));
            }
        }
        return this._endToken([this._processCarriageReturns(parts.join(''))], tagCloseStart);
    };
    _Tokenizer.prototype._consumeComment = function (start) {
        var _this = this;
        this._beginToken(TokenType$1.COMMENT_START, start);
        this._requireCharCode($MINUS);
        this._endToken([]);
        var textToken = this._consumeRawText(false, $MINUS, function () { return _this._attemptStr('->'); });
        this._beginToken(TokenType$1.COMMENT_END, textToken.sourceSpan.end);
        this._endToken([]);
    };
    _Tokenizer.prototype._consumeCdata = function (start) {
        var _this = this;
        this._beginToken(TokenType$1.CDATA_START, start);
        this._requireStr('CDATA[');
        this._endToken([]);
        var textToken = this._consumeRawText(false, $RBRACKET, function () { return _this._attemptStr(']>'); });
        this._beginToken(TokenType$1.CDATA_END, textToken.sourceSpan.end);
        this._endToken([]);
    };
    _Tokenizer.prototype._consumeDocType = function (start) {
        this._beginToken(TokenType$1.DOC_TYPE, start);
        this._attemptUntilChar($GT);
        this._advance();
        this._endToken([this._input.substring(start.offset + 2, this._index - 1)]);
    };
    _Tokenizer.prototype._consumePrefixAndName = function () {
        var nameOrPrefixStart = this._index;
        var prefix = null;
        while (this._peek !== $COLON && !isPrefixEnd(this._peek)) {
            this._advance();
        }
        var nameStart;
        if (this._peek === $COLON) {
            this._advance();
            prefix = this._input.substring(nameOrPrefixStart, this._index - 1);
            nameStart = this._index;
        }
        else {
            nameStart = nameOrPrefixStart;
        }
        this._requireCharCodeUntilFn(isNameEnd, this._index === nameStart ? 1 : 0);
        var name = this._input.substring(nameStart, this._index);
        return [prefix, name];
    };
    _Tokenizer.prototype._consumeTagOpen = function (start) {
        var savedPos = this._savePosition();
        var tagName;
        var lowercaseTagName;
        try {
            if (!isAsciiLetter(this._peek)) {
                throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());
            }
            var nameStart = this._index;
            this._consumeTagOpenStart(start);
            tagName = this._input.substring(nameStart, this._index);
            lowercaseTagName = tagName.toLowerCase();
            this._attemptCharCodeUntilFn(isNotWhitespace);
            while (this._peek !== $SLASH && this._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, assume we want a "<"
                this._restorePosition(savedPos);
                // Back to back text tokens are merged at the end
                this._beginToken(TokenType$1.TEXT, start);
                this._endToken(['<']);
                return;
            }
            throw e;
        }
        var contentTokenType = this._getTagDefinition(tagName).contentType;
        if (contentTokenType === TagContentType.RAW_TEXT) {
            this._consumeRawTextWithTagClose(lowercaseTagName, false);
        }
        else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {
            this._consumeRawTextWithTagClose(lowercaseTagName, true);
        }
    };
    _Tokenizer.prototype._consumeRawTextWithTagClose = function (lowercaseTagName, decodeEntities) {
        var _this = this;
        var textToken = this._consumeRawText(decodeEntities, $LT, function () {
            if (!_this._attemptCharCode($SLASH))
                return false;
            _this._attemptCharCodeUntilFn(isNotWhitespace);
            if (!_this._attemptStrCaseInsensitive(lowercaseTagName))
                return false;
            _this._attemptCharCodeUntilFn(isNotWhitespace);
            return _this._attemptCharCode($GT);
        });
        this._beginToken(TokenType$1.TAG_CLOSE, textToken.sourceSpan.end);
        this._endToken([null, lowercaseTagName]);
    };
    _Tokenizer.prototype._consumeTagOpenStart = function (start) {
        this._beginToken(TokenType$1.TAG_OPEN_START, start);
        var parts = this._consumePrefixAndName();
        this._endToken(parts);
    };
    _Tokenizer.prototype._consumeAttributeName = function () {
        this._beginToken(TokenType$1.ATTR_NAME);
        var prefixAndName = this._consumePrefixAndName();
        this._endToken(prefixAndName);
    };
    _Tokenizer.prototype._consumeAttributeValue = function () {
        this._beginToken(TokenType$1.ATTR_VALUE);
        var value;
        if (this._peek === $SQ || this._peek === $DQ) {
            var quoteChar = this._peek;
            this._advance();
            var parts = [];
            while (this._peek !== quoteChar) {
                parts.push(this._readChar(true));
            }
            value = parts.join('');
            this._advance();
        }
        else {
            var valueStart = this._index;
            this._requireCharCodeUntilFn(isNameEnd, 1);
            value = this._input.substring(valueStart, this._index);
        }
        this._endToken([this._processCarriageReturns(value)]);
    };
    _Tokenizer.prototype._consumeTagOpenEnd = function () {
        var tokenType = this._attemptCharCode($SLASH) ? TokenType$1.TAG_OPEN_END_VOID : TokenType$1.TAG_OPEN_END;
        this._beginToken(tokenType);
        this._requireCharCode($GT);
        this._endToken([]);
    };
    _Tokenizer.prototype._consumeTagClose = function (start) {
        this._beginToken(TokenType$1.TAG_CLOSE, start);
        this._attemptCharCodeUntilFn(isNotWhitespace);
        var prefixAndName = this._consumePrefixAndName();
        this._attemptCharCodeUntilFn(isNotWhitespace);
        this._requireCharCode($GT);
        this._endToken(prefixAndName);
    };
    _Tokenizer.prototype._consumeExpansionFormStart = function () {
        this._beginToken(TokenType$1.EXPANSION_FORM_START, this._getLocation());
        this._requireCharCode($LBRACE);
        this._endToken([]);
        this._expansionCaseStack.push(TokenType$1.EXPANSION_FORM_START);
        this._beginToken(TokenType$1.RAW_TEXT, this._getLocation());
        var condition = this._readUntil($COMMA);
        this._endToken([condition], this._getLocation());
        this._requireCharCode($COMMA);
        this._attemptCharCodeUntilFn(isNotWhitespace);
        this._beginToken(TokenType$1.RAW_TEXT, this._getLocation());
        var type = this._readUntil($COMMA);
        this._endToken([type], this._getLocation());
        this._requireCharCode($COMMA);
        this._attemptCharCodeUntilFn(isNotWhitespace);
    };
    _Tokenizer.prototype._consumeExpansionCaseStart = function () {
        this._beginToken(TokenType$1.EXPANSION_CASE_VALUE, this._getLocation());
        var value = this._readUntil($LBRACE).trim();
        this._endToken([value], this._getLocation());
        this._attemptCharCodeUntilFn(isNotWhitespace);
        this._beginToken(TokenType$1.EXPANSION_CASE_EXP_START, this._getLocation());
        this._requireCharCode($LBRACE);
        this._endToken([], this._getLocation());
        this._attemptCharCodeUntilFn(isNotWhitespace);
        this._expansionCaseStack.push(TokenType$1.EXPANSION_CASE_EXP_START);
    };
    _Tokenizer.prototype._consumeExpansionCaseEnd = function () {
        this._beginToken(TokenType$1.EXPANSION_CASE_EXP_END, this._getLocation());
        this._requireCharCode($RBRACE);
        this._endToken([], this._getLocation());
        this._attemptCharCodeUntilFn(isNotWhitespace);
        this._expansionCaseStack.pop();
    };
    _Tokenizer.prototype._consumeExpansionFormEnd = function () {
        this._beginToken(TokenType$1.EXPANSION_FORM_END, this._getLocation());
        this._requireCharCode($RBRACE);
        this._endToken([]);
        this._expansionCaseStack.pop();
    };
    _Tokenizer.prototype._consumeText = function () {
        var start = this._getLocation();
        this._beginToken(TokenType$1.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(''))]);
    };
    _Tokenizer.prototype._isTextEnd = function () {
        if (this._peek === $LT || this._peek === $EOF) {
            return true;
        }
        if (this._tokenizeIcu && !this._inInterpolation) {
            if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {
                // start of an expansion form
                return true;
            }
            if (this._peek === $RBRACE && this._isInExpansionCase()) {
                // end of and expansion case
                return true;
            }
        }
        return false;
    };
    _Tokenizer.prototype._savePosition = function () {
        return [this._peek, this._index, this._column, this._line, this.tokens.length];
    };
    _Tokenizer.prototype._readUntil = function (char) {
        var start = this._index;
        this._attemptUntilChar(char);
        return this._input.substring(start, this._index);
    };
    _Tokenizer.prototype._restorePosition = function (position) {
        this._peek = position[0];
        this._index = position[1];
        this._column = position[2];
        this._line = position[3];
        var nbTokens = position[4];
        if (nbTokens < this.tokens.length) {
            // remove any extra tokens
            this.tokens = this.tokens.slice(0, nbTokens);
        }
    };
    _Tokenizer.prototype._isInExpansionCase = function () {
        return this._expansionCaseStack.length > 0 &&
            this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
                TokenType$1.EXPANSION_CASE_EXP_START;
    };
    _Tokenizer.prototype._isInExpansionForm = function () {
        return this._expansionCaseStack.length > 0 &&
            this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
                TokenType$1.EXPANSION_FORM_START;
    };
    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 isExpansionFormStart(input, offset, interpolationConfig) {
    var isInterpolationStart = interpolationConfig ? input.indexOf(interpolationConfig.start, offset) == offset : false;
    return input.charCodeAt(offset) == $LBRACE && !isInterpolationStart;
}
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$1.TEXT && token.type == TokenType$1.TEXT) {
            lastDstToken.parts[0] += token.parts[0];
            lastDstToken.sourceSpan.end = token.sourceSpan.end;
        }
        else {
            lastDstToken = token;
            dstTokens.push(lastDstToken);
        }
    }
    return dstTokens;
}

/**
 * @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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TreeError, _super);
    function TreeError(elementName, span, msg) {
        var _this = _super.call(this, span, msg) || this;
        _this.elementName = elementName;
        return _this;
    }
    TreeError.create = function (elementName, span, msg) {
        return new TreeError(elementName, span, msg);
    };
    return TreeError;
}(ParseError));
var ParseTreeResult = /** @class */ (function () {
    function ParseTreeResult(rootNodes, errors) {
        this.rootNodes = rootNodes;
        this.errors = errors;
    }
    return ParseTreeResult;
}());
var Parser$1 = /** @class */ (function () {
    function Parser(getTagDefinition) {
        this.getTagDefinition = getTagDefinition;
    }
    Parser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
        if (parseExpansionForms === void 0) { parseExpansionForms = false; }
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
        var tokensAndErrors = tokenize(source, url, this.getTagDefinition, parseExpansionForms, interpolationConfig);
        var treeAndErrors = new _TreeBuilder(tokensAndErrors.tokens, this.getTagDefinition).build();
        return new ParseTreeResult(treeAndErrors.rootNodes, tokensAndErrors.errors.concat(treeAndErrors.errors));
    };
    return Parser;
}());
var _TreeBuilder = /** @class */ (function () {
    function _TreeBuilder(tokens, getTagDefinition) {
        this.tokens = tokens;
        this.getTagDefinition = getTagDefinition;
        this._index = -1;
        this._rootNodes = [];
        this._errors = [];
        this._elementStack = [];
        this._advance();
    }
    _TreeBuilder.prototype.build = function () {
        while (this._peek.type !== TokenType$1.EOF) {
            if (this._peek.type === TokenType$1.TAG_OPEN_START) {
                this._consumeStartTag(this._advance());
            }
            else if (this._peek.type === TokenType$1.TAG_CLOSE) {
                this._consumeEndTag(this._advance());
            }
            else if (this._peek.type === TokenType$1.CDATA_START) {
                this._closeVoidElement();
                this._consumeCdata(this._advance());
            }
            else if (this._peek.type === TokenType$1.COMMENT_START) {
                this._closeVoidElement();
                this._consumeComment(this._advance());
            }
            else if (this._peek.type === TokenType$1.TEXT || this._peek.type === TokenType$1.RAW_TEXT ||
                this._peek.type === TokenType$1.ESCAPABLE_RAW_TEXT) {
                this._closeVoidElement();
                this._consumeText(this._advance());
            }
            else if (this._peek.type === TokenType$1.EXPANSION_FORM_START) {
                this._consumeExpansion(this._advance());
            }
            else {
                // Skip all other tokens...
                this._advance();
            }
        }
        return new ParseTreeResult(this._rootNodes, this._errors);
    };
    _TreeBuilder.prototype._advance = function () {
        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;
    };
    _TreeBuilder.prototype._advanceIf = function (type) {
        if (this._peek.type === type) {
            return this._advance();
        }
        return null;
    };
    _TreeBuilder.prototype._consumeCdata = function (startToken) {
        this._consumeText(this._advance());
        this._advanceIf(TokenType$1.CDATA_END);
    };
    _TreeBuilder.prototype._consumeComment = function (token) {
        var text = this._advanceIf(TokenType$1.RAW_TEXT);
        this._advanceIf(TokenType$1.COMMENT_END);
        var value = text != null ? text.parts[0].trim() : null;
        this._addToParent(new Comment(value, token.sourceSpan));
    };
    _TreeBuilder.prototype._consumeExpansion = function (token) {
        var switchValue = this._advance();
        var type = this._advance();
        var cases = [];
        // read =
        while (this._peek.type === TokenType$1.EXPANSION_CASE_VALUE) {
            var expCase = this._parseExpansionCase();
            if (!expCase)
                return; // error
            cases.push(expCase);
        }
        // read the final }
        if (this._peek.type !== TokenType$1.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();
    };
    _TreeBuilder.prototype._parseExpansionCase = function () {
        var value = this._advance();
        // read {
        if (this._peek.type !== TokenType$1.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$1(TokenType$1.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);
    };
    _TreeBuilder.prototype._collectExpansionExpTokens = function (start) {
        var exp = [];
        var expansionFormStack = [TokenType$1.EXPANSION_CASE_EXP_START];
        while (true) {
            if (this._peek.type === TokenType$1.EXPANSION_FORM_START ||
                this._peek.type === TokenType$1.EXPANSION_CASE_EXP_START) {
                expansionFormStack.push(this._peek.type);
            }
            if (this._peek.type === TokenType$1.EXPANSION_CASE_EXP_END) {
                if (lastOnStack(expansionFormStack, TokenType$1.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$1.EXPANSION_FORM_END) {
                if (lastOnStack(expansionFormStack, TokenType$1.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$1.EOF) {
                this._errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
                return null;
            }
            exp.push(this._advance());
        }
    };
    _TreeBuilder.prototype._consumeText = function (token) {
        var text = token.parts[0];
        if (text.length > 0 && text[0] == '\n') {
            var parent_1 = this._getParentElement();
            if (parent_1 != null && parent_1.children.length == 0 &&
                this.getTagDefinition(parent_1.name).ignoreFirstLf) {
                text = text.substring(1);
            }
        }
        if (text.length > 0) {
            this._addToParent(new Text(text, token.sourceSpan));
        }
    };
    _TreeBuilder.prototype._closeVoidElement = function () {
        var el = this._getParentElement();
        if (el && this.getTagDefinition(el.name).isVoid) {
            this._elementStack.pop();
        }
    };
    _TreeBuilder.prototype._consumeStartTag = function (startTagToken) {
        var prefix = startTagToken.parts[0];
        var name = startTagToken.parts[1];
        var attrs = [];
        while (this._peek.type === TokenType$1.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$1.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 \"" + startTagToken.parts[1] + "\""));
            }
        }
        else if (this._peek.type === TokenType$1.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(fullName, attrs, [], span, span, undefined);
        this._pushElement(el);
        if (selfClosing) {
            this._popElement(fullName);
            el.endSourceSpan = span;
        }
    };
    _TreeBuilder.prototype._pushElement = function (el) {
        var parentEl = this._getParentElement();
        if (parentEl && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {
            this._elementStack.pop();
        }
        var tagDef = this.getTagDefinition(el.name);
        var _a = this._getParentElementSkippingContainers(), parent = _a.parent, container = _a.container;
        if (parent && tagDef.requireExtraParent(parent.name)) {
            var newParent = new Element(tagDef.parentToAdd, [], [], el.sourceSpan, el.startSourceSpan, el.endSourceSpan);
            this._insertBeforeContainer(parent, container, newParent);
        }
        this._addToParent(el);
        this._elementStack.push(el);
    };
    _TreeBuilder.prototype._consumeEndTag = function (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 \"" + endTagToken.parts[1] + "\""));
        }
        else if (!this._popElement(fullName)) {
            var errMsg = "Unexpected closing tag \"" + 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));
        }
    };
    _TreeBuilder.prototype._popElement = function (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;
    };
    _TreeBuilder.prototype._consumeAttr = function (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$1.ATTR_VALUE) {
            var valueToken = this._advance();
            value = valueToken.parts[0];
            end = valueToken.sourceSpan.end;
            valueSpan = valueToken.sourceSpan;
        }
        return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, end), valueSpan);
    };
    _TreeBuilder.prototype._getParentElement = function () {
        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.
     */
    _TreeBuilder.prototype._getParentElementSkippingContainers = function () {
        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 };
    };
    _TreeBuilder.prototype._addToParent = function (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
     */
    _TreeBuilder.prototype._insertBeforeContainer = function (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);
        }
    };
    _TreeBuilder.prototype._getElementFullName = function (prefix, localName, parentElement) {
        if (prefix == null) {
            prefix = this.getTagDefinition(localName).implicitNamespacePrefix;
            if (prefix == null && 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(HtmlParser, _super);
    function HtmlParser() {
        return _super.call(this, getHtmlTagDefinition) || this;
    }
    HtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
        if (parseExpansionForms === void 0) { parseExpansionForms = false; }
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
        return _super.prototype.parse.call(this, source, url, parseExpansionForms, interpolationConfig);
    };
    return HtmlParser;
}(Parser$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 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\v\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff';
var NO_WS_REGEXP = new RegExp("[^" + WS_CHARS + "]");
var WS_REPLACE_REGEXP = new RegExp("[" + 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 = /** @class */ (function () {
    function WhitespaceVisitor() {
    }
    WhitespaceVisitor.prototype.visitElement = function (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(element.name, visitAll(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
        }
        return new Element(element.name, element.attrs, visitAll(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
    };
    WhitespaceVisitor.prototype.visitAttribute = function (attribute, context) {
        return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;
    };
    WhitespaceVisitor.prototype.visitText = function (text, context) {
        var isNotBlank = text.value.match(NO_WS_REGEXP);
        if (isNotBlank) {
            return new Text(replaceNgsp(text.value).replace(WS_REPLACE_REGEXP, ' '), text.sourceSpan);
        }
        return null;
    };
    WhitespaceVisitor.prototype.visitComment = function (comment, context) { return comment; };
    WhitespaceVisitor.prototype.visitExpansion = function (expansion, context) { return expansion; };
    WhitespaceVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return expansionCase; };
    return WhitespaceVisitor;
}());
function removeWhitespaces(htmlAstWithErrors) {
    return new ParseTreeResult(visitAll(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
 */
// =================================================================================================
// =================================================================================================
// =========== 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 e_1, _a;
    try {
        for (var specs_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(specs), specs_1_1 = specs_1.next(); !specs_1_1.done; specs_1_1 = specs_1.next()) {
            var spec = specs_1_1.value;
            _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (specs_1_1 && !specs_1_1.done && (_a = specs_1.return)) _a.call(specs_1);
        }
        finally { if (e_1) throw e_1.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
 */
var ElementSchemaRegistry = /** @class */ (function () {
    function ElementSchemaRegistry() {
    }
    return 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DomElementSchemaRegistry, _super);
    function DomElementSchemaRegistry() {
        var _this = _super.call(this) || this;
        _this._schema = {};
        SCHEMA.forEach(function (encodedType) {
            var type = {};
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(encodedType.split('|'), 2), strType = _a[0], strProperties = _a[1];
            var properties = strProperties.split(',');
            var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(strType.split('^'), 2), typeNames = _b[0], superName = _b[1];
            typeNames.split(',').forEach(function (tag) { return _this._schema[tag.toLowerCase()] = type; });
            var superType = superName && _this._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 _this;
    }
    DomElementSchemaRegistry.prototype.hasProperty = function (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];
    };
    DomElementSchemaRegistry.prototype.hasElement = function (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 white list based. 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.
     */
    DomElementSchemaRegistry.prototype.securityContext = function (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;
    };
    DomElementSchemaRegistry.prototype.getMappedPropName = function (propName) { return _ATTR_TO_PROP[propName] || propName; };
    DomElementSchemaRegistry.prototype.getDefaultComponentElementName = function () { return 'ng-component'; };
    DomElementSchemaRegistry.prototype.validateProperty = function (name) {
        if (name.toLowerCase().startsWith('on')) {
            var msg = "Binding to event property '" + name + "' is disallowed for security reasons, " +
                ("please use (" + name.slice(2) + ")=...") +
                ("\nIf '" + name + "' is a directive input, make sure the directive is imported by the") +
                " current module.";
            return { error: true, msg: msg };
        }
        else {
            return { error: false };
        }
    };
    DomElementSchemaRegistry.prototype.validateAttribute = function (name) {
        if (name.toLowerCase().startsWith('on')) {
            var msg = "Binding to event attribute '" + name + "' is disallowed for security reasons, " +
                ("please use (" + name.slice(2) + ")=...");
            return { error: true, msg: msg };
        }
        else {
            return { error: false };
        }
    };
    DomElementSchemaRegistry.prototype.allKnownElementNames = function () { return Object.keys(this._schema); };
    DomElementSchemaRegistry.prototype.normalizeAnimationStyleProperty = function (propName) {
        return dashCaseToCamelCase(propName);
    };
    DomElementSchemaRegistry.prototype.normalizeAnimationStyleValue = function (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 " + userProvidedProp + ":" + 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 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 = /** @class */ (function () {
    function BindingParser(_exprParser, _interpolationConfig, _schemaRegistry, pipes, errors) {
        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_1 = new Map();
            pipes.forEach(function (pipe) { return pipesByName_1.set(pipe.name, pipe); });
            this.pipesByName = pipesByName_1;
        }
    }
    BindingParser.prototype.getUsedPipes = function () { return Array.from(this._usedPipes.values()); };
    BindingParser.prototype.createBoundHostProperties = function (dirMeta, sourceSpan) {
        var _this = this;
        if (dirMeta.hostProperties) {
            var boundProps_1 = [];
            Object.keys(dirMeta.hostProperties).forEach(function (propName) {
                var expression = dirMeta.hostProperties[propName];
                if (typeof expression === 'string') {
                    _this.parsePropertyBinding(propName, expression, true, sourceSpan, [], boundProps_1);
                }
                else {
                    _this._reportError("Value of the host property binding \"" + propName + "\" needs to be a string representing an expression but got \"" + expression + "\" (" + typeof expression + ")", sourceSpan);
                }
            });
            return boundProps_1;
        }
        return null;
    };
    BindingParser.prototype.createDirectiveHostPropertyAsts = function (dirMeta, elementSelector, sourceSpan) {
        var _this = this;
        var boundProps = this.createBoundHostProperties(dirMeta, sourceSpan);
        return boundProps &&
            boundProps.map(function (prop) { return _this.createBoundElementProperty(elementSelector, prop); });
    };
    BindingParser.prototype.createDirectiveHostEventAsts = function (dirMeta, sourceSpan) {
        var _this = this;
        if (dirMeta.hostListeners) {
            var targetEvents_1 = [];
            Object.keys(dirMeta.hostListeners).forEach(function (propName) {
                var expression = dirMeta.hostListeners[propName];
                if (typeof expression === 'string') {
                    _this.parseEvent(propName, expression, sourceSpan, [], targetEvents_1);
                }
                else {
                    _this._reportError("Value of the host listener \"" + propName + "\" needs to be a string representing an expression but got \"" + expression + "\" (" + typeof expression + ")", sourceSpan);
                }
            });
            return targetEvents_1;
        }
        return null;
    };
    BindingParser.prototype.parseInterpolation = function (value, sourceSpan) {
        var sourceInfo = sourceSpan.start.toString();
        try {
            var ast = this._exprParser.parseInterpolation(value, sourceInfo, this._interpolationConfig);
            if (ast)
                this._reportExpressionParserErrors(ast.errors, sourceSpan);
            this._checkPipes(ast, sourceSpan);
            return ast;
        }
        catch (e) {
            this._reportError("" + e, sourceSpan);
            return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);
        }
    };
    // Parse an inline template binding. ie `<tag *tplKey="<tplValue>">`
    BindingParser.prototype.parseInlineTemplateBinding = function (tplKey, tplValue, sourceSpan, 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, targetMatchableAttrs, targetProps);
            }
            else {
                targetMatchableAttrs.push([binding.key, '']);
                this.parseLiteralAttr(binding.key, null, sourceSpan, targetMatchableAttrs, targetProps);
            }
        }
    };
    BindingParser.prototype._parseTemplateBindings = function (tplKey, tplValue, sourceSpan) {
        var _this = this;
        var sourceInfo = sourceSpan.start.toString();
        try {
            var bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo);
            this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);
            bindingsResult.templateBindings.forEach(function (binding) {
                if (binding.expression) {
                    _this._checkPipes(binding.expression, sourceSpan);
                }
            });
            bindingsResult.warnings.forEach(function (warning) { _this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING); });
            return bindingsResult.templateBindings;
        }
        catch (e) {
            this._reportError("" + e, sourceSpan);
            return [];
        }
    };
    BindingParser.prototype.parseLiteralAttr = function (name, value, sourceSpan, 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, targetMatchableAttrs, targetProps);
        }
        else {
            targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, ''), ParsedPropertyType.LITERAL_ATTR, sourceSpan));
        }
    };
    BindingParser.prototype.parsePropertyBinding = function (name, expression, isHost, sourceSpan, 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, targetMatchableAttrs, targetProps);
        }
        else {
            this._parsePropertyAst(name, this._parseBinding(expression, isHost, sourceSpan), sourceSpan, targetMatchableAttrs, targetProps);
        }
    };
    BindingParser.prototype.parsePropertyInterpolation = function (name, value, sourceSpan, targetMatchableAttrs, targetProps) {
        var expr = this.parseInterpolation(value, sourceSpan);
        if (expr) {
            this._parsePropertyAst(name, expr, sourceSpan, targetMatchableAttrs, targetProps);
            return true;
        }
        return false;
    };
    BindingParser.prototype._parsePropertyAst = function (name, ast, sourceSpan, targetMatchableAttrs, targetProps) {
        targetMatchableAttrs.push([name, ast.source]);
        targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan));
    };
    BindingParser.prototype._parseAnimation = function (name, expression, sourceSpan, 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, sourceSpan);
        targetMatchableAttrs.push([name, ast.source]);
        targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan));
    };
    BindingParser.prototype._parseBinding = function (value, isHostBinding, sourceSpan) {
        var sourceInfo = (sourceSpan && sourceSpan.start || '(unknown)').toString();
        try {
            var ast = isHostBinding ?
                this._exprParser.parseSimpleBinding(value, sourceInfo, this._interpolationConfig) :
                this._exprParser.parseBinding(value, sourceInfo, this._interpolationConfig);
            if (ast)
                this._reportExpressionParserErrors(ast.errors, sourceSpan);
            this._checkPipes(ast, sourceSpan);
            return ast;
        }
        catch (e) {
            this._reportError("" + e, sourceSpan);
            return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);
        }
    };
    BindingParser.prototype.createBoundElementProperty = function (elementSelector, boundProp) {
        if (boundProp.isAnimation) {
            return new BoundElementProperty(boundProp.name, 4 /* Animation */, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan);
        }
        var unit = null;
        var bindingType = undefined;
        var boundPropertyName = null;
        var parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);
        var securityContexts = undefined;
        // Check check for special cases (prefix style, attr, class)
        if (parts.length > 1) {
            if (parts[0] == ATTRIBUTE_PREFIX) {
                boundPropertyName = parts[1];
                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_1 = boundPropertyName.substring(nsSeparatorIdx + 1);
                    boundPropertyName = mergeNsAndName(ns, name_1);
                }
                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) {
            boundPropertyName = this._schemaRegistry.getMappedPropName(boundProp.name);
            securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, false);
            bindingType = 0 /* Property */;
            this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, false);
        }
        return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan);
    };
    BindingParser.prototype.parseEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {
        if (isAnimationLabel(name)) {
            name = name.substr(1);
            this._parseAnimationEvent(name, expression, sourceSpan, targetEvents);
        }
        else {
            this._parseRegularEvent(name, expression, sourceSpan, targetMatchableAttrs, targetEvents);
        }
    };
    BindingParser.prototype._parseAnimationEvent = function (name, expression, sourceSpan, 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, sourceSpan);
                    targetEvents.push(new ParsedEvent(eventName, phase, 1 /* Animation */, ast, sourceSpan));
                    break;
                default:
                    this._reportError("The provided animation output phase value \"" + phase + "\" for \"@" + eventName + "\" is not supported (use start or done)", sourceSpan);
                    break;
            }
        }
        else {
            this._reportError("The animation trigger output event (@" + eventName + ") is missing its phase value name (start or done are currently supported)", sourceSpan);
        }
    };
    BindingParser.prototype._parseRegularEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {
        // long format: 'target: eventName'
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitAtColon(name, [null, name]), 2), target = _a[0], eventName = _a[1];
        var ast = this._parseAction(expression, sourceSpan);
        targetMatchableAttrs.push([name, ast.source]);
        targetEvents.push(new ParsedEvent(eventName, target, 0 /* Regular */, ast, sourceSpan));
        // Don't detect directives for event names for now,
        // so don't add the event name to the matchableAttrs
    };
    BindingParser.prototype._parseAction = function (value, sourceSpan) {
        var sourceInfo = (sourceSpan && sourceSpan.start || '(unknown').toString();
        try {
            var ast = this._exprParser.parseAction(value, sourceInfo, 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);
            }
            this._checkPipes(ast, sourceSpan);
            return ast;
        }
        catch (e) {
            this._reportError("" + e, sourceSpan);
            return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);
        }
    };
    BindingParser.prototype._reportError = function (message, sourceSpan, level) {
        if (level === void 0) { level = ParseErrorLevel.ERROR; }
        this.errors.push(new ParseError(sourceSpan, message, level));
    };
    BindingParser.prototype._reportExpressionParserErrors = function (errors, sourceSpan) {
        var e_1, _a;
        try {
            for (var errors_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(errors), errors_1_1 = errors_1.next(); !errors_1_1.done; errors_1_1 = errors_1.next()) {
                var error$$1 = errors_1_1.value;
                this._reportError(error$$1.message, sourceSpan);
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (errors_1_1 && !errors_1_1.done && (_a = errors_1.return)) _a.call(errors_1);
            }
            finally { if (e_1) throw e_1.error; }
        }
    };
    // Make sure all the used pipes are known in `this.pipesByName`
    BindingParser.prototype._checkPipes = function (ast, sourceSpan) {
        var _this = this;
        if (ast && this.pipesByName) {
            var collector = new PipeCollector();
            ast.visit(collector);
            collector.pipes.forEach(function (ast, pipeName) {
                var pipeMeta = _this.pipesByName.get(pipeName);
                if (!pipeMeta) {
                    _this._reportError("The pipe '" + pipeName + "' could not be found", new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start), sourceSpan.start.moveBy(ast.span.end)));
                }
                else {
                    _this._usedPipes.set(pipeName, pipeMeta);
                }
            });
        }
    };
    /**
     * @param propName the name of the property / attribute
     * @param sourceSpan
     * @param isAttr true when binding to an attribute
     */
    BindingParser.prototype._validatePropertyOrAttributeName = function (propName, sourceSpan, isAttr) {
        var report = isAttr ? this._schemaRegistry.validateAttribute(propName) :
            this._schemaRegistry.validateProperty(propName);
        if (report.error) {
            this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);
        }
    };
    return BindingParser;
}());
var PipeCollector = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PipeCollector, _super);
    function PipeCollector() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.pipes = new Map();
        return _this;
    }
    PipeCollector.prototype.visitPipe = function (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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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 Text$1 = /** @class */ (function () {
    function Text(value, sourceSpan) {
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    Text.prototype.visit = function (visitor) { return visitor.visitText(this); };
    return Text;
}());
var BoundText = /** @class */ (function () {
    function BoundText(value, sourceSpan) {
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    BoundText.prototype.visit = function (visitor) { return visitor.visitBoundText(this); };
    return BoundText;
}());
var TextAttribute = /** @class */ (function () {
    function TextAttribute(name, value, sourceSpan, valueSpan) {
        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
        this.valueSpan = valueSpan;
    }
    TextAttribute.prototype.visit = function (visitor) { return visitor.visitTextAttribute(this); };
    return TextAttribute;
}());
var BoundAttribute = /** @class */ (function () {
    function BoundAttribute(name, type, securityContext, value, unit, sourceSpan) {
        this.name = name;
        this.type = type;
        this.securityContext = securityContext;
        this.value = value;
        this.unit = unit;
        this.sourceSpan = sourceSpan;
    }
    BoundAttribute.fromBoundElementProperty = function (prop) {
        return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan);
    };
    BoundAttribute.prototype.visit = function (visitor) { return visitor.visitBoundAttribute(this); };
    return BoundAttribute;
}());
var BoundEvent = /** @class */ (function () {
    function BoundEvent(name, handler, target, phase, sourceSpan) {
        this.name = name;
        this.handler = handler;
        this.target = target;
        this.phase = phase;
        this.sourceSpan = sourceSpan;
    }
    BoundEvent.fromParsedEvent = function (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.handler, target, phase, event.sourceSpan);
    };
    BoundEvent.prototype.visit = function (visitor) { return visitor.visitBoundEvent(this); };
    return BoundEvent;
}());
var Element$1 = /** @class */ (function () {
    function Element(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan) {
        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;
    }
    Element.prototype.visit = function (visitor) { return visitor.visitElement(this); };
    return Element;
}());
var Template = /** @class */ (function () {
    function Template(attributes, inputs, outputs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan) {
        this.attributes = attributes;
        this.inputs = inputs;
        this.outputs = outputs;
        this.children = children;
        this.references = references;
        this.variables = variables;
        this.sourceSpan = sourceSpan;
        this.startSourceSpan = startSourceSpan;
        this.endSourceSpan = endSourceSpan;
    }
    Template.prototype.visit = function (visitor) { return visitor.visitTemplate(this); };
    return Template;
}());
var Content = /** @class */ (function () {
    function Content(selectorIndex, attributes, sourceSpan) {
        this.selectorIndex = selectorIndex;
        this.attributes = attributes;
        this.sourceSpan = sourceSpan;
    }
    Content.prototype.visit = function (visitor) { return visitor.visitContent(this); };
    return Content;
}());
var Variable = /** @class */ (function () {
    function Variable(name, value, sourceSpan) {
        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    Variable.prototype.visit = function (visitor) { return visitor.visitVariable(this); };
    return Variable;
}());
var Reference = /** @class */ (function () {
    function Reference(name, value, sourceSpan) {
        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    Reference.prototype.visit = function (visitor) { return visitor.visitReference(this); };
    return Reference;
}());
function visitAll$1(visitor, nodes) {
    var e_1, _a, e_2, _b;
    var result = [];
    if (visitor.visit) {
        try {
            for (var nodes_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(nodes), nodes_1_1 = nodes_1.next(); !nodes_1_1.done; nodes_1_1 = nodes_1.next()) {
                var node = nodes_1_1.value;
                var newNode = visitor.visit(node) || node.visit(visitor);
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (nodes_1_1 && !nodes_1_1.done && (_a = nodes_1.return)) _a.call(nodes_1);
            }
            finally { if (e_1) throw e_1.error; }
        }
    }
    else {
        try {
            for (var nodes_2 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(nodes), nodes_2_1 = nodes_2.next(); !nodes_2_1.done; nodes_2_1 = nodes_2.next()) {
                var node = nodes_2_1.value;
                var newNode = node.visit(visitor);
                if (newNode) {
                    result.push(newNode);
                }
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (nodes_2_1 && !nodes_2_1.done && (_b = nodes_2.return)) _b.call(nodes_2);
            }
            finally { if (e_2) throw e_2.error; }
        }
    }
    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 StyleWithImports = /** @class */ (function () {
    function StyleWithImports(style, styleUrls) {
        this.style = style;
        this.styleUrls = styleUrls;
    }
    return StyleWithImports;
}());
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 m = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            m[_i] = arguments[_i];
        }
        var url = m[1] || m[2];
        if (!isStyleUrlResolvable(url)) {
            // Do not attempt to resolve non-package absolute URLs with URI
            // scheme
            return m[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 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 = /** @class */ (function () {
    function PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs) {
        this.type = type;
        this.selectAttr = selectAttr;
        this.hrefAttr = hrefAttr;
        this.nonBindable = nonBindable;
        this.projectAs = projectAs;
    }
    return PreparsedElement;
}());
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 = '*';
// Default selector used by `<ng-content>` if none specified
var DEFAULT_CONTENT_SELECTOR = '*';
function htmlAstToRender3Ast(htmlNodes, bindingParser) {
    var transformer = new HtmlAstToIvyAst(bindingParser);
    var ivyNodes = visitAll(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" + errorString, errors);
    }
    return {
        nodes: ivyNodes,
        errors: allErrors,
        ngContentSelectors: transformer.ngContentSelectors,
        hasNgContent: transformer.hasNgContent,
    };
}
var HtmlAstToIvyAst = /** @class */ (function () {
    function HtmlAstToIvyAst(bindingParser) {
        this.bindingParser = bindingParser;
        this.errors = [];
        // Selectors for the `ng-content` tags. Only non `*` selectors are recorded here
        this.ngContentSelectors = [];
        // Any `<ng-content>` in the template ?
        this.hasNgContent = false;
    }
    // HTML visitor
    HtmlAstToIvyAst.prototype.visitElement = function (element) {
        var _this = this;
        var e_1, _a;
        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;
        }
        // Whether the element is a `<ng-template>`
        var isTemplateElement = isNgTemplate(element.name);
        var parsedProperties = [];
        var boundEvents = [];
        var variables = [];
        var references = [];
        var attributes = [];
        var templateParsedProperties = [];
        var templateVariables = [];
        // Whether the element has any *-attribute
        var elementHasInlineTemplate = false;
        try {
            for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(element.attrs), _c = _b.next(); !_c.done; _c = _b.next()) {
                var attribute = _c.value;
                var hasBinding = false;
                var normalizedName = normalizeAttributeName(attribute.name);
                // `*attr` defines template bindings
                var isTemplateBinding = false;
                if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {
                    // *-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.length);
                    var parsedVariables = [];
                    this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, [], templateParsedProperties, parsedVariables);
                    templateVariables.push.apply(templateVariables, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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 (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            }
            finally { if (e_1) throw e_1.error; }
        }
        var children = visitAll(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR : this, element.children);
        var parsedElement;
        if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
            // `<ng-content>`
            this.hasNgContent = true;
            if (element.children && !element.children.every(isEmptyTextNode)) {
                this.reportError("<ng-content> element cannot have content.", element.sourceSpan);
            }
            var selector = preparsedElement.selectAttr;
            var attributes_1 = element.attrs.map(function (attribute) { return _this.visitAttribute(attribute); });
            var selectorIndex = selector === DEFAULT_CONTENT_SELECTOR ? 0 : this.ngContentSelectors.push(selector);
            parsedElement = new Content(selectorIndex, attributes_1, element.sourceSpan);
        }
        else if (isTemplateElement) {
            // `<ng-template>`
            var attrs = this.extractAttributes(element.name, parsedProperties);
            parsedElement = new Template(attributes, attrs.bound, boundEvents, children, references, variables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
        }
        else {
            var attrs = this.extractAttributes(element.name, parsedProperties);
            parsedElement = new Element$1(element.name, attributes, attrs.bound, boundEvents, children, references, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
        }
        if (elementHasInlineTemplate) {
            var attrs = this.extractAttributes('ng-template', templateParsedProperties);
            // TODO(pk): test for this case
            parsedElement = new Template(attrs.literal, attrs.bound, [], [parsedElement], [], templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
        }
        return parsedElement;
    };
    HtmlAstToIvyAst.prototype.visitAttribute = function (attribute) {
        return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.valueSpan);
    };
    HtmlAstToIvyAst.prototype.visitText = function (text) {
        var valueNoNgsp = replaceNgsp(text.value);
        var expr = this.bindingParser.parseInterpolation(valueNoNgsp, text.sourceSpan);
        return expr ? new BoundText(expr, text.sourceSpan) : new Text$1(valueNoNgsp, text.sourceSpan);
    };
    HtmlAstToIvyAst.prototype.visitComment = function (comment) { return null; };
    HtmlAstToIvyAst.prototype.visitExpansion = function (expansion) { return null; };
    HtmlAstToIvyAst.prototype.visitExpansionCase = function (expansionCase) { return null; };
    // convert view engine `ParsedProperty` to a format suitable for IVY
    HtmlAstToIvyAst.prototype.extractAttributes = function (elementName, properties) {
        var _this = this;
        var bound = [];
        var literal = [];
        properties.forEach(function (prop) {
            if (prop.isLiteral) {
                literal.push(new TextAttribute(prop.name, prop.expression.source || '', prop.sourceSpan));
            }
            else {
                var bep = _this.bindingParser.createBoundElementProperty(elementName, prop);
                bound.push(BoundAttribute.fromBoundElementProperty(bep));
            }
        });
        return { bound: bound, literal: literal };
    };
    HtmlAstToIvyAst.prototype.parseAttribute = function (isTemplateElement, attribute, matchableAttributes, parsedProperties, boundEvents, variables, references) {
        var name = normalizeAttributeName(attribute.name);
        var value = attribute.value;
        var srcSpan = attribute.sourceSpan;
        var bindParts = name.match(BIND_NAME_REGEXP);
        var hasBinding = false;
        if (bindParts) {
            hasBinding = true;
            if (bindParts[KW_BIND_IDX] != null) {
                this.bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, matchableAttributes, parsedProperties);
            }
            else if (bindParts[KW_LET_IDX]) {
                if (isTemplateElement) {
                    var identifier = bindParts[IDENT_KW_IDX];
                    this.parseVariable(identifier, value, srcSpan, variables);
                }
                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, references);
            }
            else if (bindParts[KW_ON_IDX]) {
                var events = [];
                this.bindingParser.parseEvent(bindParts[IDENT_KW_IDX], value, srcSpan, matchableAttributes, events);
                addEvents(events, boundEvents);
            }
            else if (bindParts[KW_BINDON_IDX]) {
                this.bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, matchableAttributes, parsedProperties);
                this.parseAssignmentEvent(bindParts[IDENT_KW_IDX], value, srcSpan, matchableAttributes, boundEvents);
            }
            else if (bindParts[KW_AT_IDX]) {
                this.bindingParser.parseLiteralAttr(name, value, srcSpan, matchableAttributes, parsedProperties);
            }
            else if (bindParts[IDENT_BANANA_BOX_IDX]) {
                this.bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX], value, false, srcSpan, matchableAttributes, parsedProperties);
                this.parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX], value, srcSpan, matchableAttributes, boundEvents);
            }
            else if (bindParts[IDENT_PROPERTY_IDX]) {
                this.bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX], value, false, srcSpan, matchableAttributes, parsedProperties);
            }
            else if (bindParts[IDENT_EVENT_IDX]) {
                var events = [];
                this.bindingParser.parseEvent(bindParts[IDENT_EVENT_IDX], value, srcSpan, matchableAttributes, events);
                addEvents(events, boundEvents);
            }
        }
        else {
            hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, matchableAttributes, parsedProperties);
        }
        return hasBinding;
    };
    HtmlAstToIvyAst.prototype.parseVariable = function (identifier, value, sourceSpan, variables) {
        if (identifier.indexOf('-') > -1) {
            this.reportError("\"-\" is not allowed in variable names", sourceSpan);
        }
        variables.push(new Variable(identifier, value, sourceSpan));
    };
    HtmlAstToIvyAst.prototype.parseReference = function (identifier, value, sourceSpan, references) {
        if (identifier.indexOf('-') > -1) {
            this.reportError("\"-\" is not allowed in reference names", sourceSpan);
        }
        references.push(new Reference(identifier, value, sourceSpan));
    };
    HtmlAstToIvyAst.prototype.parseAssignmentEvent = function (name, expression, sourceSpan, targetMatchableAttrs, boundEvents) {
        var events = [];
        this.bindingParser.parseEvent(name + "Change", expression + "=$event", sourceSpan, targetMatchableAttrs, events);
        addEvents(events, boundEvents);
    };
    HtmlAstToIvyAst.prototype.reportError = function (message, sourceSpan, level) {
        if (level === void 0) { level = ParseErrorLevel.ERROR; }
        this.errors.push(new ParseError(sourceSpan, message, level));
    };
    return HtmlAstToIvyAst;
}());
var NonBindableVisitor = /** @class */ (function () {
    function NonBindableVisitor() {
    }
    NonBindableVisitor.prototype.visitElement = function (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(this, ast.children, null);
        return new Element$1(ast.name, visitAll(this, ast.attrs), 
        /* inputs */ [], /* outputs */ [], children, /* references */ [], ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
    };
    NonBindableVisitor.prototype.visitComment = function (comment) { return null; };
    NonBindableVisitor.prototype.visitAttribute = function (attribute) {
        return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan);
    };
    NonBindableVisitor.prototype.visitText = function (text) { return new Text$1(text.value, text.sourceSpan); };
    NonBindableVisitor.prototype.visitExpansion = function (expansion) { return null; };
    NonBindableVisitor.prototype.visitExpansionCase = function (expansionCase) { return null; };
    return NonBindableVisitor;
}());
var NON_BINDABLE_VISITOR = new NonBindableVisitor();
function normalizeAttributeName(attrName) {
    return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;
}
function addEvents(events, boundEvents) {
    boundEvents.push.apply(boundEvents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(events.map(function (e) { return BoundEvent.fromParsedEvent(e); })));
}
function isEmptyTextNode(node) {
    return node instanceof Text && node.value.trim().length == 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
 */
/**
 * 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 object literal. `{ color: 'red', height: 'auto'}`.
 */
function parseStyle(value) {
    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[currentProp] = valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal;
                    propStart = i;
                    valueStart = 0;
                    currentProp = null;
                    valueHasQuotes = false;
                }
                break;
        }
    }
    if (currentProp && valueStart) {
        var styleVal = value.substr(valueStart).trim();
        styles[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();
}

/**
 * @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 mapBindingToInstruction(type) {
    switch (type) {
        case 0 /* Property */:
            return Identifiers$1.elementProperty;
        case 2 /* Class */:
            return Identifiers$1.elementClassProp;
        case 1 /* Attribute */:
        case 4 /* Animation */:
            return Identifiers$1.elementAttribute;
        default:
            return undefined;
    }
}
//  if (rf & flags) { .. }
function renderFlagCheckIfStmt(flags, statements) {
    return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);
}
var TemplateDefinitionBuilder = /** @class */ (function () {
    function TemplateDefinitionBuilder(constantPool, parentBindingScope, level, contextName, i18nContext, templateIndex, templateName, viewQueries, directiveMatcher, directives, pipeTypeByName, pipes, _namespace, relativeContextFilePath) {
        if (level === void 0) { level = 0; }
        var _this = this;
        this.constantPool = constantPool;
        this.level = level;
        this.contextName = contextName;
        this.i18nContext = i18nContext;
        this.templateIndex = templateIndex;
        this.templateName = templateName;
        this.viewQueries = viewQueries;
        this.directiveMatcher = directiveMatcher;
        this.directives = directives;
        this.pipeTypeByName = pipeTypeByName;
        this.pipes = pipes;
        this._namespace = _namespace;
        this.relativeContextFilePath = relativeContextFilePath;
        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 = [];
        /** 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;
        // 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;
        // view queries can take up space in data and allocation happens earlier (in the "viewQuery"
        // function)
        this._dataIndex = viewQueries.length;
        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 _this.allocateDataSlot(); }, function (numSlots) { return _this.allocatePureFunctionSlots(numSlots); }, function (name, localName, slot, value) {
            var pipeType = pipeTypeByName.get(name);
            if (pipeType) {
                _this.pipes.add(pipeType);
            }
            _this._bindingScope.set(_this.level, localName, value);
            _this.creationInstruction(null, Identifiers$1.pipe, [literal(slot), literal(name)]);
        });
    }
    TemplateDefinitionBuilder.prototype.registerContextVariables = function (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()];
        });
    };
    TemplateDefinitionBuilder.prototype.buildTemplateFunction = function (nodes, variables, hasNgContent, ngContentSelectors) {
        var _this = this;
        if (hasNgContent === void 0) { hasNgContent = false; }
        if (ngContentSelectors === void 0) { ngContentSelectors = []; }
        if (this._namespace !== Identifiers$1.namespaceHTML) {
            this.creationInstruction(null, this._namespace);
        }
        // Create variable bindings
        variables.forEach(function (v) { return _this.registerContextVariables(v); });
        // Output a `ProjectionDef` instruction when some `<ng-content>` are present
        if (hasNgContent) {
            var parameters = [];
            // Only selectors with a non-default value are generated
            if (ngContentSelectors.length > 1) {
                var r3Selectors = ngContentSelectors.map(function (s) { return parseSelectorToR3Selector(s); });
                // `projectionDef` needs both the parsed and raw value of the selectors
                var parsed = this.constantPool.getConstLiteral(asLiteral(r3Selectors), true);
                var unParsed = this.constantPool.getConstLiteral(asLiteral(ngContentSelectors), true);
                parameters.push(parsed, unParsed);
            }
            this.creationInstruction(null, Identifiers$1.projectionDef, parameters);
        }
        if (this.i18nContext) {
            this.i18nStart();
        }
        // 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$1(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(); });
        if (this.i18nContext) {
            this.i18nEnd();
        }
        // Generate all the creation mode instructions (e.g. resolve bindings in listeners)
        var creationStatements = this._creationCodeFns.map(function (fn$$1) { return fn$$1(); });
        // Generate all the update mode instructions (e.g. resolve property or text bindings)
        var updateStatements = this._updateCodeFns.map(function (fn$$1) { return fn$$1(); });
        //  Variable declaration must occur after binding resolution so we can generate context
        //  instructions that build on each other. e.g. const b = x().$implicit(); const b = x();
        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)], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._prefixCode, creationBlock, updateBlock), INFERRED_TYPE, null, this.templateName);
    };
    // LocalResolver
    TemplateDefinitionBuilder.prototype.getLocal = function (name) { return this._bindingScope.get(name); };
    TemplateDefinitionBuilder.prototype.i18nTranslate = function (label, meta) {
        if (meta === void 0) { meta = ''; }
        return this.constantPool.getTranslation(label, meta, this.fileBasedI18nSuffix);
    };
    TemplateDefinitionBuilder.prototype.i18nAppendTranslationMeta = function (meta) {
        if (meta === void 0) { meta = ''; }
        this.constantPool.appendTranslationMeta(meta);
    };
    TemplateDefinitionBuilder.prototype.i18nAllocateRef = function () {
        return this.constantPool.getDeferredTranslationConst(this.fileBasedI18nSuffix);
    };
    TemplateDefinitionBuilder.prototype.i18nUpdateRef = function (context) {
        if (context.isRoot() && context.isResolved()) {
            this.constantPool.setDeferredTranslationConst(context.getRef(), context.getContent());
        }
    };
    TemplateDefinitionBuilder.prototype.i18nStart = function (span, meta) {
        if (span === void 0) { span = null; }
        var index = this.allocateDataSlot();
        if (this.i18nContext) {
            this.i18n = this.i18nContext.forkChildContext(index, this.templateIndex);
        }
        else {
            this.i18nAppendTranslationMeta(meta);
            var ref = this.i18nAllocateRef();
            this.i18n = new I18nContext(index, this.templateIndex, ref);
        }
        // generate i18nStart instruction
        var params = [literal(index), this.i18n.getRef()];
        if (this.i18n.getId() > 0) {
            // do not push 3rd argument (sub-block id)
            // into i18nStart call for top level i18n context
            params.push(literal(this.i18n.getId()));
        }
        this.creationInstruction(span, Identifiers$1.i18nStart, params);
    };
    TemplateDefinitionBuilder.prototype.i18nEnd = function (span) {
        var _this = this;
        if (span === void 0) { span = null; }
        if (this.i18nContext) {
            this.i18nContext.reconcileChildContext(this.i18n);
            this.i18nUpdateRef(this.i18nContext);
        }
        else {
            this.i18nUpdateRef(this.i18n);
        }
        // setup accumulated bindings
        var bindings = this.i18n.getBindings();
        if (bindings.size) {
            bindings.forEach(function (binding) { _this.updateInstruction(span, Identifiers$1.i18nExp, [binding]); });
            var index = literal(this.i18n.getIndex());
            this.updateInstruction(span, Identifiers$1.i18nApply, [index]);
        }
        this.creationInstruction(span, Identifiers$1.i18nEnd);
        this.i18n = null; // reset local i18n context
    };
    TemplateDefinitionBuilder.prototype.visitContent = function (ngContent) {
        var slot = this.allocateDataSlot();
        var selectorIndex = ngContent.selectorIndex;
        var parameters = [literal(slot)];
        var attributeAsList = [];
        ngContent.attributes.forEach(function (attribute) {
            var name = attribute.name;
            if (name !== 'select') {
                attributeAsList.push(name, attribute.value);
            }
        });
        if (attributeAsList.length > 0) {
            parameters.push(literal(selectorIndex), asLiteral(attributeAsList));
        }
        else if (selectorIndex !== 0) {
            parameters.push(literal(selectorIndex));
        }
        this.creationInstruction(ngContent.sourceSpan, Identifiers$1.projection, parameters);
    };
    TemplateDefinitionBuilder.prototype.getNamespaceInstruction = function (namespaceKey) {
        switch (namespaceKey) {
            case 'math':
                return Identifiers$1.namespaceMathML;
            case 'svg':
                return Identifiers$1.namespaceSVG;
            default:
                return Identifiers$1.namespaceHTML;
        }
    };
    TemplateDefinitionBuilder.prototype.addNamespaceInstruction = function (nsInstruction, element) {
        this._namespace = nsInstruction;
        this.creationInstruction(element.sourceSpan, nsInstruction);
    };
    TemplateDefinitionBuilder.prototype.visitElement = function (element) {
        var _this = this;
        var e_1, _a;
        var elementIndex = this.allocateDataSlot();
        var isNonBindableMode = false;
        var isI18nRootElement = false;
        var outputAttrs = {};
        var attrI18nMetas = {};
        var i18nMeta = '';
        var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNsName(element.name), 2), namespaceKey = _b[0], elementName = _b[1];
        var isNgContainer$$1 = isNgContainer(element.name);
        try {
            // Handle i18n and ngNonBindable attributes
            for (var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(element.attributes), _d = _c.next(); !_d.done; _d = _c.next()) {
                var attr = _d.value;
                var name_1 = attr.name;
                var value = attr.value;
                if (name_1 === NON_BINDABLE_ATTR) {
                    isNonBindableMode = true;
                }
                else if (name_1 === I18N_ATTR) {
                    if (this.i18n) {
                        throw new Error("Could not mark an element as translatable inside of a translatable section");
                    }
                    isI18nRootElement = true;
                    i18nMeta = value;
                }
                else if (name_1.startsWith(I18N_ATTR_PREFIX)) {
                    attrI18nMetas[name_1.slice(I18N_ATTR_PREFIX.length)] = value;
                }
                else {
                    outputAttrs[name_1] = value;
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
            }
            finally { if (e_1) throw e_1.error; }
        }
        // Match directives on non i18n attributes
        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 initialStyleDeclarations = [];
        var initialClassDeclarations = [];
        var styleInputs = [];
        var classInputs = [];
        var allOtherInputs = [];
        var i18nAttrs = [];
        element.inputs.forEach(function (input) {
            switch (input.type) {
                // [attr.style] or [attr.class] should not be treated as styling-based
                // bindings since they are intended to be written directly to the attr
                // and therefore will skip all style/class resolution that is present
                // with style="", [style]="" and [style.prop]="", class="",
                // [class.prop]="". [class]="" assignments
                case 0 /* Property */:
                    if (input.name == 'style') {
                        // this should always go first in the compilation (for [style])
                        styleInputs.splice(0, 0, input);
                    }
                    else if (isClassBinding(input)) {
                        // this should always go first in the compilation (for [class])
                        classInputs.splice(0, 0, input);
                    }
                    else if (attrI18nMetas.hasOwnProperty(input.name)) {
                        i18nAttrs.push({ name: input.name, value: input.value });
                    }
                    else {
                        allOtherInputs.push(input);
                    }
                    break;
                case 3 /* Style */:
                    styleInputs.push(input);
                    break;
                case 2 /* Class */:
                    classInputs.push(input);
                    break;
                default:
                    allOtherInputs.push(input);
                    break;
            }
        });
        var currStyleIndex = 0;
        var currClassIndex = 0;
        var staticStylesMap = null;
        var staticClassesMap = null;
        var stylesIndexMap = {};
        var classesIndexMap = {};
        Object.getOwnPropertyNames(outputAttrs).forEach(function (name) {
            var value = outputAttrs[name];
            if (name == 'style') {
                staticStylesMap = parseStyle(value);
                Object.keys(staticStylesMap).forEach(function (prop) { stylesIndexMap[prop] = currStyleIndex++; });
            }
            else if (name == 'class') {
                staticClassesMap = {};
                value.split(/\s+/g).forEach(function (className) {
                    classesIndexMap[className] = currClassIndex++;
                    staticClassesMap[className] = true;
                });
            }
            else {
                if (attrI18nMetas.hasOwnProperty(name)) {
                    i18nAttrs.push({ name: name, value: value });
                }
                else {
                    attributes.push(literal(name), literal(value));
                }
            }
        });
        var hasMapBasedStyling = false;
        for (var i = 0; i < styleInputs.length; i++) {
            var input = styleInputs[i];
            var isMapBasedStyleBinding = i === 0 && input.name === 'style';
            if (isMapBasedStyleBinding) {
                hasMapBasedStyling = true;
            }
            else if (!stylesIndexMap.hasOwnProperty(input.name)) {
                stylesIndexMap[input.name] = currStyleIndex++;
            }
        }
        for (var i = 0; i < classInputs.length; i++) {
            var input = classInputs[i];
            var isMapBasedClassBinding = i === 0 && isClassBinding(input);
            if (!isMapBasedClassBinding && !stylesIndexMap.hasOwnProperty(input.name)) {
                classesIndexMap[input.name] = currClassIndex++;
            }
        }
        // in the event that a [style] binding is used then sanitization will
        // always be imported because it is not possible to know ahead of time
        // whether style bindings will use or not use any sanitizable properties
        // that isStyleSanitizable() will detect
        var useDefaultStyleSanitizer = hasMapBasedStyling;
        // this will build the instructions so that they fall into the following syntax
        // => [prop1, prop2, prop3, 0, prop1, value1, prop2, value2]
        Object.keys(stylesIndexMap).forEach(function (prop) {
            useDefaultStyleSanitizer = useDefaultStyleSanitizer || isStyleSanitizable(prop);
            initialStyleDeclarations.push(literal(prop));
        });
        if (staticStylesMap) {
            initialStyleDeclarations.push(literal(1 /* VALUES_MODE */));
            Object.keys(staticStylesMap).forEach(function (prop) {
                initialStyleDeclarations.push(literal(prop));
                var value = staticStylesMap[prop];
                initialStyleDeclarations.push(literal(value));
            });
        }
        Object.keys(classesIndexMap).forEach(function (prop) {
            initialClassDeclarations.push(literal(prop));
        });
        if (staticClassesMap) {
            initialClassDeclarations.push(literal(1 /* VALUES_MODE */));
            Object.keys(staticClassesMap).forEach(function (className) {
                initialClassDeclarations.push(literal(className));
                initialClassDeclarations.push(literal(true));
            });
        }
        var hasStylingInstructions = initialStyleDeclarations.length || styleInputs.length ||
            initialClassDeclarations.length || classInputs.length;
        // add attributes for directive matching purposes
        attributes.push.apply(attributes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this.prepareSyntheticAndSelectOnlyAttrs(allOtherInputs, element.outputs)));
        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);
        }
        var implicit = variable(CONTEXT_NAME);
        if (this.i18n) {
            this.i18n.appendElement(elementIndex);
        }
        var hasChildren = function () {
            if (!isI18nRootElement && _this.i18n) {
                // we do not append text node instructions inside i18n section, so we
                // exclude them while calculating whether current element has children
                return element.children.find(function (child) { return !(child instanceof Text$1 || child instanceof BoundText); });
            }
            return element.children.length > 0;
        };
        var createSelfClosingInstruction = !hasStylingInstructions && !isNgContainer$$1 &&
            element.outputs.length === 0 && i18nAttrs.length === 0 && !hasChildren();
        if (createSelfClosingInstruction) {
            this.creationInstruction(element.sourceSpan, 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);
            }
            if (isI18nRootElement) {
                this.i18nStart(element.sourceSpan, i18nMeta);
            }
            // process i18n element attributes
            if (i18nAttrs.length) {
                var hasBindings_1 = false;
                var i18nAttrArgs_1 = [];
                i18nAttrs.forEach(function (_a) {
                    var name = _a.name, value = _a.value;
                    var meta = attrI18nMetas[name];
                    if (typeof value === 'string') {
                        // in case of static string value, 3rd argument is 0 declares
                        // that there are no expressions defined in this translation
                        i18nAttrArgs_1.push(literal(name), _this.i18nTranslate(value, meta), literal(0));
                    }
                    else {
                        var converted = value.visit(_this._valueConverter);
                        if (converted instanceof Interpolation) {
                            var strings = converted.strings, expressions = converted.expressions;
                            var label = assembleI18nBoundString(strings);
                            i18nAttrArgs_1.push(literal(name), _this.i18nTranslate(label, meta), literal(expressions.length));
                            expressions.forEach(function (expression) {
                                hasBindings_1 = true;
                                var binding = _this.convertExpressionBinding(implicit, expression);
                                _this.updateInstruction(element.sourceSpan, Identifiers$1.i18nExp, [binding]);
                            });
                        }
                    }
                });
                if (i18nAttrArgs_1.length) {
                    var index = literal(this.allocateDataSlot());
                    var args = this.constantPool.getConstLiteral(literalArr(i18nAttrArgs_1), true);
                    this.creationInstruction(element.sourceSpan, Identifiers$1.i18nAttribute, [index, args]);
                    if (hasBindings_1) {
                        this.updateInstruction(element.sourceSpan, Identifiers$1.i18nApply, [index]);
                    }
                }
            }
            // initial styling for static style="..." attributes
            if (hasStylingInstructions) {
                var paramsList = [];
                if (initialClassDeclarations.length) {
                    // the template compiler handles initial class styling (e.g. class="foo") values
                    // in a special command called `elementClass` so that the initial class
                    // can be processed during runtime. These initial class values are bound to
                    // a constant because the inital class values do not change (since they're static).
                    paramsList.push(this.constantPool.getConstLiteral(literalArr(initialClassDeclarations), true));
                }
                else if (initialStyleDeclarations.length || useDefaultStyleSanitizer) {
                    // no point in having an extra `null` value unless there are follow-up params
                    paramsList.push(NULL_EXPR);
                }
                if (initialStyleDeclarations.length) {
                    // the template compiler handles initial style (e.g. style="foo") values
                    // in a special command called `elementStyle` so that the initial styles
                    // can be processed during runtime. These initial styles values are bound to
                    // a constant because the inital style values do not change (since they're static).
                    paramsList.push(this.constantPool.getConstLiteral(literalArr(initialStyleDeclarations), true));
                }
                else if (useDefaultStyleSanitizer) {
                    // no point in having an extra `null` value unless there are follow-up params
                    paramsList.push(NULL_EXPR);
                }
                if (useDefaultStyleSanitizer) {
                    paramsList.push(importExpr(Identifiers$1.defaultStyleSanitizer));
                }
                this.creationInstruction(null, Identifiers$1.elementStyling, paramsList);
            }
            // Generate Listeners (outputs)
            element.outputs.forEach(function (outputAst) {
                _this.creationInstruction(outputAst.sourceSpan, Identifiers$1.listener, _this.prepareListenerParameter(element.name, outputAst));
            });
        }
        if ((styleInputs.length || classInputs.length) && hasStylingInstructions) {
            var indexLiteral_1 = literal(elementIndex);
            var firstStyle = styleInputs[0];
            var mapBasedStyleInput_1 = firstStyle && firstStyle.name == 'style' ? firstStyle : null;
            var firstClass = classInputs[0];
            var mapBasedClassInput_1 = firstClass && isClassBinding(firstClass) ? firstClass : null;
            var stylingInput = mapBasedStyleInput_1 || mapBasedClassInput_1;
            if (stylingInput) {
                this.updateInstruction(stylingInput.sourceSpan, Identifiers$1.elementStylingMap, function () {
                    var params = [indexLiteral_1];
                    if (mapBasedClassInput_1) {
                        var mapBasedClassValue = mapBasedClassInput_1.value.visit(_this._valueConverter);
                        params.push(_this.convertPropertyBinding(implicit, mapBasedClassValue, true));
                    }
                    else if (mapBasedStyleInput_1) {
                        params.push(NULL_EXPR);
                    }
                    if (mapBasedStyleInput_1) {
                        var mapBasedStyleValue = mapBasedStyleInput_1.value.visit(_this._valueConverter);
                        params.push(_this.convertPropertyBinding(implicit, mapBasedStyleValue, true));
                    }
                    return params;
                });
            }
            var lastInputCommand = null;
            if (styleInputs.length) {
                var i = mapBasedStyleInput_1 ? 1 : 0;
                for (i; i < styleInputs.length; i++) {
                    var input = styleInputs[i];
                    var key = input.name;
                    var styleIndex = stylesIndexMap[key];
                    var value = input.value.visit(this._valueConverter);
                    var params = [
                        indexLiteral_1, literal(styleIndex), this.convertPropertyBinding(implicit, value, true)
                    ];
                    if (input.unit != null) {
                        params.push(literal(input.unit));
                    }
                    this.updateInstruction(input.sourceSpan, Identifiers$1.elementStyleProp, params);
                }
                lastInputCommand = styleInputs[styleInputs.length - 1];
            }
            if (classInputs.length) {
                var i = mapBasedClassInput_1 ? 1 : 0;
                var _loop_1 = function () {
                    var input = classInputs[i];
                    var params = [];
                    var sanitizationRef = resolveSanitizationFn(input, input.securityContext);
                    if (sanitizationRef)
                        params.push(sanitizationRef);
                    var key = input.name;
                    var classIndex = classesIndexMap[key];
                    var value = input.value.visit(this_1._valueConverter);
                    this_1.updateInstruction(input.sourceSpan, Identifiers$1.elementClassProp, function () {
                        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([
                            indexLiteral_1, literal(classIndex),
                            _this.convertPropertyBinding(implicit, value, true)
                        ], params);
                    });
                };
                var this_1 = this;
                for (i; i < classInputs.length; i++) {
                    _loop_1();
                }
                lastInputCommand = classInputs[classInputs.length - 1];
            }
            this.updateInstruction(lastInputCommand.sourceSpan, Identifiers$1.elementStylingApply, [indexLiteral_1]);
        }
        // Generate element input bindings
        allOtherInputs.forEach(function (input) {
            var instruction = mapBindingToInstruction(input.type);
            if (input.type === 4 /* Animation */) {
                var value_1 = input.value.visit(_this._valueConverter);
                // setAttribute without a value doesn't make any sense
                if (value_1.name || value_1.value) {
                    var name_2 = prepareSyntheticAttributeName(input.name);
                    _this.updateInstruction(input.sourceSpan, Identifiers$1.elementAttribute, function () {
                        return [
                            literal(elementIndex), literal(name_2), _this.convertPropertyBinding(implicit, value_1)
                        ];
                    });
                }
            }
            else if (instruction) {
                var params_1 = [];
                var sanitizationRef = resolveSanitizationFn(input, input.securityContext);
                if (sanitizationRef)
                    params_1.push(sanitizationRef);
                // TODO(chuckj): runtime: security context
                var value_2 = input.value.visit(_this._valueConverter);
                _this.allocateBindingSlots(value_2);
                _this.updateInstruction(input.sourceSpan, instruction, function () {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([
                        literal(elementIndex), literal(input.name),
                        _this.convertPropertyBinding(implicit, value_2)
                    ], params_1);
                });
            }
            else {
                _this._unsupported("binding type " + input.type);
            }
        });
        // Traverse element child nodes
        visitAll$1(this, element.children);
        if (!isI18nRootElement && this.i18n) {
            this.i18n.appendElement(elementIndex, true);
        }
        if (!createSelfClosingInstruction) {
            // Finish element construction mode.
            var span = element.endSourceSpan || element.sourceSpan;
            if (isI18nRootElement) {
                this.i18nEnd(span);
            }
            if (isNonBindableMode) {
                this.creationInstruction(span, Identifiers$1.enableBindings);
            }
            this.creationInstruction(span, isNgContainer$$1 ? Identifiers$1.elementContainerEnd : Identifiers$1.elementEnd);
        }
    };
    TemplateDefinitionBuilder.prototype.visitTemplate = function (template) {
        var _this = this;
        var templateIndex = this.allocateDataSlot();
        if (this.i18n) {
            this.i18n.appendTemplate(templateIndex);
        }
        var elName = '';
        if (template.children.length === 1 && template.children[0] instanceof Element$1) {
            // When the template as a single child, derive the context name from the tag
            elName = sanitizeIdentifier(template.children[0].name);
        }
        var contextName = elName ? this.contextName + "_" + elName : '';
        var templateName = contextName ? contextName + "_Template_" + templateIndex : "Template_" + templateIndex;
        var parameters = [
            literal(templateIndex),
            variable(templateName),
            TYPED_NULL_EXPR,
        ];
        // find directives matching on a given <ng-template> node
        this.matchDirectives('ng-template', 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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this.prepareSyntheticAndSelectOnlyAttrs(template.inputs, template.outputs)));
        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));
        }
        // handle property bindings e.g. p(1, 'forOf', ɵbind(ctx.items));
        var context = variable(CONTEXT_NAME);
        template.inputs.forEach(function (input) {
            var value = input.value.visit(_this._valueConverter);
            _this.allocateBindingSlots(value);
            _this.updateInstruction(template.sourceSpan, Identifiers$1.elementProperty, function () {
                return [
                    literal(templateIndex), literal(input.name),
                    _this.convertPropertyBinding(context, value)
                ];
            });
        });
        // 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);
        // 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);
            _this.constantPool.statements.push(templateFunctionExpr.toDeclStmt(templateName, null));
        });
        // 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);
        });
        // Generate listeners for directive output
        template.outputs.forEach(function (outputAst) {
            _this.creationInstruction(outputAst.sourceSpan, Identifiers$1.listener, _this.prepareListenerParameter('ng_template', outputAst));
        });
    };
    TemplateDefinitionBuilder.prototype.visitBoundText = function (text) {
        var _this = this;
        if (this.i18n) {
            var value_3 = text.value.visit(this._valueConverter);
            if (value_3 instanceof Interpolation) {
                var strings = value_3.strings, expressions = value_3.expressions;
                var label = assembleI18nBoundString(strings, this.i18n.getBindings().size, this.i18n.getId());
                var implicit_1 = variable(CONTEXT_NAME);
                expressions.forEach(function (expression) {
                    var binding = _this.convertExpressionBinding(implicit_1, expression);
                    _this.i18n.appendBinding(binding);
                });
                this.i18n.appendText(label);
            }
            return;
        }
        var nodeIndex = this.allocateDataSlot();
        this.creationInstruction(text.sourceSpan, Identifiers$1.text, [literal(nodeIndex)]);
        var value = text.value.visit(this._valueConverter);
        this.allocateBindingSlots(value);
        this.updateInstruction(text.sourceSpan, Identifiers$1.textBinding, function () { return [literal(nodeIndex), _this.convertPropertyBinding(variable(CONTEXT_NAME), value)]; });
    };
    TemplateDefinitionBuilder.prototype.visitText = function (text) {
        if (this.i18n) {
            this.i18n.appendText(text.value);
            return;
        }
        this.creationInstruction(text.sourceSpan, Identifiers$1.text, [literal(this.allocateDataSlot()), literal(text.value)]);
    };
    TemplateDefinitionBuilder.prototype.allocateDataSlot = function () { return this._dataIndex++; };
    TemplateDefinitionBuilder.prototype.getConstCount = function () { return this._dataIndex; };
    TemplateDefinitionBuilder.prototype.getVarCount = function () { return this._pureFunctionSlots; };
    TemplateDefinitionBuilder.prototype.bindingContext = function () { return "" + this._bindingContext++; };
    // 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>
    TemplateDefinitionBuilder.prototype.instructionFn = function (fns, span, reference, paramsOrFn) {
        fns.push(function () {
            var params = Array.isArray(paramsOrFn) ? paramsOrFn : paramsOrFn();
            return instruction(span, reference, params).toStmt();
        });
    };
    TemplateDefinitionBuilder.prototype.creationInstruction = function (span, reference, paramsOrFn) {
        this.instructionFn(this._creationCodeFns, span, reference, paramsOrFn || []);
    };
    TemplateDefinitionBuilder.prototype.updateInstruction = function (span, reference, paramsOrFn) {
        this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);
    };
    TemplateDefinitionBuilder.prototype.allocatePureFunctionSlots = function (numSlots) {
        var originalSlots = this._pureFunctionSlots;
        this._pureFunctionSlots += numSlots;
        return originalSlots;
    };
    TemplateDefinitionBuilder.prototype.allocateBindingSlots = function (value) {
        this._bindingSlots += value instanceof Interpolation ? value.expressions.length : 1;
    };
    TemplateDefinitionBuilder.prototype.convertExpressionBinding = function (implicit, value) {
        var convertedPropertyBinding = convertPropertyBinding(this, implicit, value, this.bindingContext(), BindingForm.TrySimple);
        var valExpr = convertedPropertyBinding.currValExpr;
        return importExpr(Identifiers$1.bind).callFn([valExpr]);
    };
    TemplateDefinitionBuilder.prototype.convertPropertyBinding = function (implicit, value, skipBindFn) {
        var _a;
        var interpolationFn = value instanceof Interpolation ? interpolate : function () { return error('Unexpected interpolation'); };
        var convertedPropertyBinding = convertPropertyBinding(this, implicit, value, this.bindingContext(), BindingForm.TrySimple, interpolationFn);
        (_a = this._tempVariables).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(convertedPropertyBinding.stmts));
        var valExpr = convertedPropertyBinding.currValExpr;
        return value instanceof Interpolation || skipBindFn ? valExpr :
            importExpr(Identifiers$1.bind).callFn([valExpr]);
    };
    TemplateDefinitionBuilder.prototype.matchDirectives = function (tagName, elOrTpl) {
        var _this = this;
        if (this.directiveMatcher) {
            var selector = createCssSelector(tagName, getAttrsForDirectiveMatching(elOrTpl));
            this.directiveMatcher.match(selector, function (cssSelector, staticType) { _this.directives.add(staticType); });
        }
    };
    TemplateDefinitionBuilder.prototype.prepareSyntheticAndSelectOnlyAttrs = function (inputs, outputs) {
        var attrExprs = [];
        var nonSyntheticInputs = [];
        if (inputs.length) {
            var EMPTY_STRING_EXPR_1 = asLiteral('');
            inputs.forEach(function (input) {
                if (input.type === 4 /* Animation */) {
                    // @attributes are for Renderer2 animation @triggers, but this feature
                    // may be supported differently in future versions of angular. However,
                    // @triggers should always just be treated as regular attributes (it's up
                    // to the renderer to detect and use them in a special way).
                    attrExprs.push(asLiteral(prepareSyntheticAttributeName(input.name)), EMPTY_STRING_EXPR_1);
                }
                else {
                    nonSyntheticInputs.push(input);
                }
            });
        }
        if (nonSyntheticInputs.length || outputs.length) {
            attrExprs.push(literal(1 /* SelectOnly */));
            nonSyntheticInputs.forEach(function (i) { return attrExprs.push(asLiteral(i.name)); });
            outputs.forEach(function (o) { return attrExprs.push(asLiteral(o.name)); });
        }
        return attrExprs;
    };
    TemplateDefinitionBuilder.prototype.toAttrsParam = function (attrsExprs) {
        return attrsExprs.length > 0 ?
            this.constantPool.getConstLiteral(literalArr(attrsExprs), true) :
            TYPED_NULL_EXPR;
    };
    TemplateDefinitionBuilder.prototype.prepareRefsParameter = function (references) {
        var _this = this;
        if (!references || references.length === 0) {
            return TYPED_NULL_EXPR;
        }
        var refsParam = flatten(references.map(function (reference) {
            var slot = _this.allocateDataSlot();
            // Generate the update temporary.
            var variableName = _this._bindingScope.freshReferenceName();
            var retrievalLevel = _this.level;
            var lhs = variable(variableName);
            _this._bindingScope.set(retrievalLevel, reference.name, lhs, 0 /* DEFAULT */, function (scope, relativeLevel) {
                // e.g. x(2);
                var nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];
                // e.g. const $foo$ = r(1);
                var refExpr = lhs.set(importExpr(Identifiers$1.reference).callFn([literal(slot)]));
                return nextContextStmt.concat(refExpr.toConstDecl());
            });
            return [reference.name, reference.value];
        }));
        return this.constantPool.getConstLiteral(asLiteral(refsParam), true);
    };
    TemplateDefinitionBuilder.prototype.prepareListenerParameter = function (tagName, outputAst) {
        var _this = this;
        var evNameSanitized = sanitizeIdentifier(outputAst.name);
        var tagNameSanitized = sanitizeIdentifier(tagName);
        var functionName = this.templateName + "_" + tagNameSanitized + "_" + evNameSanitized + "_listener";
        return function () {
            var listenerScope = _this._bindingScope.nestedScope(_this._bindingScope.bindingLevel);
            var bindingExpr = convertActionBinding(listenerScope, variable(CONTEXT_NAME), outputAst.handler, 'b', function () { return error('Unexpected interpolation'); });
            var statements = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(listenerScope.restoreViewStatement(), listenerScope.variableDeclarations(), bindingExpr.render3Stmts);
            var handler = fn([new FnParam('$event', DYNAMIC_TYPE)], statements, INFERRED_TYPE, null, functionName);
            return [literal(outputAst.name), handler];
        };
    };
    return TemplateDefinitionBuilder;
}());
var ValueConverter = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ValueConverter, _super);
    function ValueConverter(constantPool, allocateSlot, allocatePureFunctionSlots, definePipe) {
        var _this = _super.call(this) || this;
        _this.constantPool = constantPool;
        _this.allocateSlot = allocateSlot;
        _this.allocatePureFunctionSlots = allocatePureFunctionSlots;
        _this.definePipe = definePipe;
        _this._pipeBindExprs = [];
        return _this;
    }
    // AstMemoryEfficientTransformer
    ValueConverter.prototype.visitPipe = function (pipe, context) {
        // Allocate a slot to create the pipe
        var slot = this.allocateSlot();
        var slotPseudoLocal = "PIPE:" + 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 _a = pipeBindingCallInfo(pipe.args), identifier = _a.identifier, isVarLength = _a.isVarLength;
        this.definePipe(pipe.name, slotPseudoLocal, slot, importExpr(identifier));
        var args = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([pipe.exp], pipe.args);
        var convertedArgs = isVarLength ? this.visitAll([new LiteralArray(pipe.span, args)]) : this.visitAll(args);
        var pipeBindExpr = new FunctionCall(pipe.span, target, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([
            new LiteralPrimitive(pipe.span, slot),
            new LiteralPrimitive(pipe.span, pureFunctionSlot)
        ], convertedArgs));
        this._pipeBindExprs.push(pipeBindExpr);
        return pipeBindExpr;
    };
    ValueConverter.prototype.updatePipeSlotOffsets = function (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;
        });
    };
    ValueConverter.prototype.visitLiteralArray = function (array, context) {
        var _this = 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$$1 = literalArr(values);
            return values.every(function (a) { return a.isConstant(); }) ?
                _this.constantPool.getConstLiteral(literal$$1, true) :
                getLiteralFactory(_this.constantPool, literal$$1, _this.allocatePureFunctionSlots);
        });
    };
    ValueConverter.prototype.visitLiteralMap = function (map, context) {
        var _this = 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$$1 = 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(); }) ?
                _this.constantPool.getConstLiteral(literal$$1, true) :
                getLiteralFactory(_this.constantPool, literal$$1, _this.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 _a = constantPool.getLiteralFactory(literal$$1), literalFactory = _a.literalFactory, literalFactoryArguments = _a.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 _b = pureFunctionCallInfo(literalFactoryArguments), identifier = _b.identifier, isVarLength = _b.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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(literalFactoryArguments));
    }
    return importExpr(identifier).callFn(args);
}
/** The prefix used to get a shared context in BindingScope's map. */
var SHARED_CONTEXT_KEY = '$$shared_ctx$$';
var BindingScope = /** @class */ (function () {
    function BindingScope(bindingLevel, parent) {
        if (bindingLevel === void 0) { bindingLevel = 0; }
        if (parent === void 0) { parent = null; }
        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;
    }
    Object.defineProperty(BindingScope, "ROOT_SCOPE", {
        get: function () {
            if (!BindingScope._ROOT_SCOPE) {
                BindingScope._ROOT_SCOPE = new BindingScope().set(0, '$event', variable('$event'));
            }
            return BindingScope._ROOT_SCOPE;
        },
        enumerable: true,
        configurable: true
    });
    BindingScope.prototype.get = function (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
                    };
                    // Cache the value locally.
                    this.map.set(name, value);
                    // Possibly generate a shared context var
                    this.maybeGenerateSharedContextVar(value);
                    this.maybeRestoreView(value.retrievalLevel);
                }
                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
     */
    BindingScope.prototype.set = function (retrievalLevel, name, lhs, priority, declareLocalCallback) {
        if (priority === void 0) { priority = 0 /* DEFAULT */; }
        !this.map.has(name) ||
            error("The name " + name + " is already defined in scope to be " + this.map.get(name));
        this.map.set(name, {
            retrievalLevel: retrievalLevel,
            lhs: lhs,
            declare: false,
            declareLocalCallback: declareLocalCallback,
            priority: priority
        });
        return this;
    };
    BindingScope.prototype.getLocal = function (name) { return this.get(name); };
    BindingScope.prototype.nestedScope = function (level) {
        var newScope = new BindingScope(level, this);
        if (level > 0)
            newScope.generateSharedContextVar(0);
        return newScope;
    };
    BindingScope.prototype.getSharedContextName = function (retrievalLevel) {
        var sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + retrievalLevel);
        return sharedCtxObj && sharedCtxObj.declare ? sharedCtxObj.lhs : null;
    };
    BindingScope.prototype.maybeGenerateSharedContextVar = function (value) {
        if (value.priority === 1 /* CONTEXT */) {
            var sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + value.retrievalLevel);
            if (sharedCtxObj) {
                sharedCtxObj.declare = true;
            }
            else {
                this.generateSharedContextVar(value.retrievalLevel);
            }
        }
    };
    BindingScope.prototype.generateSharedContextVar = function (retrievalLevel) {
        var lhs = variable(CONTEXT_NAME + this.freshReferenceName());
        this.map.set(SHARED_CONTEXT_KEY + retrievalLevel, {
            retrievalLevel: retrievalLevel,
            lhs: lhs,
            declareLocalCallback: function (scope, relativeLevel) {
                // const ctx_r0 = x(2);
                return [lhs.set(generateNextContextExpr(relativeLevel)).toConstDecl()];
            },
            declare: false,
            priority: 2 /* SHARED_CONTEXT */
        });
    };
    BindingScope.prototype.getComponentProperty = function (name) {
        var componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);
        componentValue.declare = true;
        this.maybeRestoreView(0);
        return componentValue.lhs.prop(name);
    };
    BindingScope.prototype.maybeRestoreView = function (retrievalLevel) {
        if (this.isListenerScope() && retrievalLevel < this.bindingLevel) {
            if (!this.parent.restoreViewVariable) {
                // parent saves variable to generate a shared `const $s$ = gV();` instruction
                this.parent.restoreViewVariable = variable(this.parent.freshReferenceName());
            }
            this.restoreViewVariable = this.parent.restoreViewVariable;
        }
    };
    BindingScope.prototype.restoreViewStatement = function () {
        // rV($state$);
        return this.restoreViewVariable ?
            [instruction(null, Identifiers$1.restoreView, [this.restoreViewVariable]).toStmt()] :
            [];
    };
    BindingScope.prototype.viewSnapshotStatements = function () {
        // const $state$ = gV();
        var getCurrentViewInstruction = instruction(null, Identifiers$1.getCurrentView, []);
        return this.restoreViewVariable ?
            [this.restoreViewVariable.set(getCurrentViewInstruction).toConstDecl()] :
            [];
    };
    BindingScope.prototype.isListenerScope = function () { return this.parent && this.parent.bindingLevel === this.bindingLevel; };
    BindingScope.prototype.variableDeclarations = function () {
        var _this = 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 = _this.bindingLevel - value.retrievalLevel;
            var currStmts = value.declareLocalCallback(_this, levelDiff - currentContextLevel);
            currentContextLevel = levelDiff;
            return stmts.concat(currStmts);
        }, []);
    };
    BindingScope.prototype.freshReferenceName = function () {
        var current = this;
        // Find the top scope as it maintains the global reference count
        while (current.parent)
            current = current.parent;
        var ref = "" + REFERENCE_PREFIX + current.referenceNameIndex++;
        return ref;
    };
    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+/g);
            classes.forEach(function (className) { return cssSelector.addClassName(className); });
        }
    });
    return cssSelector;
}
function interpolate(args) {
    args = args.slice(1); // Ignore the length prefix added for render2
    switch (args.length) {
        case 3:
            return importExpr(Identifiers$1.interpolation1).callFn(args);
        case 5:
            return importExpr(Identifiers$1.interpolation2).callFn(args);
        case 7:
            return importExpr(Identifiers$1.interpolation3).callFn(args);
        case 9:
            return importExpr(Identifiers$1.interpolation4).callFn(args);
        case 11:
            return importExpr(Identifiers$1.interpolation5).callFn(args);
        case 13:
            return importExpr(Identifiers$1.interpolation6).callFn(args);
        case 15:
            return importExpr(Identifiers$1.interpolation7).callFn(args);
        case 17:
            return importExpr(Identifiers$1.interpolation8).callFn(args);
    }
    (args.length >= 19 && args.length % 2 == 1) ||
        error("Invalid interpolation argument length " + args.length);
    return importExpr(Identifiers$1.interpolationV).callFn([literalArr(args)]);
}
/**
 * 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
 */
function parseTemplate(template, templateUrl, options, relativeContextFilePath) {
    if (options === void 0) { options = {}; }
    var bindingParser = makeBindingParser();
    var htmlParser = new HtmlParser();
    var parseResult = htmlParser.parse(template, templateUrl);
    if (parseResult.errors && parseResult.errors.length > 0) {
        return {
            errors: parseResult.errors,
            nodes: [],
            hasNgContent: false,
            ngContentSelectors: [], relativeContextFilePath: relativeContextFilePath
        };
    }
    var rootNodes = parseResult.rootNodes;
    if (!options.preserveWhitespaces) {
        rootNodes = visitAll(new WhitespaceVisitor(), rootNodes);
    }
    var _a = htmlAstToRender3Ast(rootNodes, bindingParser), nodes = _a.nodes, hasNgContent = _a.hasNgContent, ngContentSelectors = _a.ngContentSelectors, errors = _a.errors;
    if (errors && errors.length > 0) {
        return {
            errors: errors,
            nodes: [],
            hasNgContent: false,
            ngContentSelectors: [], relativeContextFilePath: relativeContextFilePath
        };
    }
    return { nodes: nodes, hasNgContent: hasNgContent, ngContentSelectors: ngContentSelectors, relativeContextFilePath: relativeContextFilePath };
}
/**
 * Construct a `BindingParser` with a default configuration.
 */
function makeBindingParser() {
    return new BindingParser(new Parser(new Lexer()), DEFAULT_INTERPOLATION_CONFIG, new DomElementSchemaRegistry(), null, []);
}
function isClassBinding(input) {
    return input.name == 'className' || input.name == 'class';
}
function resolveSanitizationFn(input, context) {
    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 input.type === 1 /* Attribute */ ? 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 isStyleSanitizable(prop) {
    switch (prop) {
        case 'background-image':
        case 'background':
        case 'border-image':
        case 'filter':
        case 'list-style':
        case 'list-style-image':
            return true;
    }
    return false;
}
function prepareSyntheticAttributeName(name) {
    return '@' + 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
 */
var EMPTY_ARRAY = [];
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);
    definitionMap.set('contentQueries', createContentQueriesFunction(meta, constantPool));
    definitionMap.set('contentQueriesRefresh', createContentQueriesRefreshFunction(meta));
    // Initialize hostVars to number of bound host properties (interpolations illegal)
    var hostVars = Object.keys(meta.host.properties).length;
    // e.g. `hostBindings: (dirIndex, elIndex) => { ... }
    definitionMap.set('hostBindings', createHostBindingsFunction(meta, bindingParser, constantPool, function (slots) {
        var originalSlots = hostVars;
        hostVars += slots;
        return originalSlots;
    }));
    if (hostVars) {
        // e.g. `hostVars: 2
        definitionMap.set('hostVars', literal(hostVars));
    }
    // e.g. `attributes: ['role', 'listbox']`
    definitionMap.set('attributes', createHostAttributesArray(meta));
    // e.g 'inputs: {a: 'a'}`
    definitionMap.set('inputs', conditionallyCreateMapObjectLiteral(meta.inputs));
    // e.g 'outputs: {a: 'a'}`
    definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));
    // e.g. `features: [NgOnChangesFeature]`
    var features = [];
    // TODO: add `PublicFeature` so that directives get registered to the DI - make this configurable
    features.push(importExpr(Identifiers$1.PublicFeature));
    if (meta.usesInheritance) {
        features.push(importExpr(Identifiers$1.InheritDefinitionFeature));
    }
    if (meta.lifecycle.usesOnChanges) {
        features.push(importExpr(Identifiers$1.NgOnChangesFeature));
    }
    if (features.length) {
        definitionMap.set('features', literalArr(features));
    }
    if (meta.exportAs !== null) {
        definitionMap.set('exportAs', literal(meta.exportAs));
    }
    return { definitionMap: definitionMap, statements: result.statements };
}
/**
 * Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.
 */
function compileDirectiveFromMetadata(meta, constantPool, bindingParser) {
    var _a = baseDirectiveFields(meta, constantPool, bindingParser), definitionMap = _a.definitionMap, statements = _a.statements;
    var expression = importExpr(Identifiers$1.defineDirective).callFn([definitionMap.toLiteralMap()]);
    // 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 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) {
    var definitionMap = new DefinitionMap();
    if (meta.inputs) {
        var inputs_1 = meta.inputs;
        var inputsMap = Object.keys(inputs_1).map(function (key) {
            var v = inputs_1[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_1 = meta.outputs;
        var outputsMap = Object.keys(outputs_1).map(function (key) {
            var value = literal(outputs_1[key]);
            return { key: key, value: value, quoted: false };
        });
        definitionMap.set('outputs', literalMap(outputsMap));
    }
    var expression = importExpr(Identifiers$1.defineBase).callFn([definitionMap.toLiteralMap()]);
    var type = new ExpressionType(importExpr(Identifiers$1.BaseDef));
    return { expression: expression, type: type };
}
/**
 * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.
 */
function compileComponentFromMetadata(meta, constantPool, bindingParser) {
    var _a = baseDirectiveFields(meta, constantPool, bindingParser), definitionMap = _a.definitionMap, statements = _a.statements;
    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.size) {
        var matcher_1 = new SelectorMatcher();
        meta.directives.forEach(function (expression, selector) {
            matcher_1.addSelectables(CssSelector.parse(selector), expression);
        });
        directiveMatcher = matcher_1;
    }
    if (meta.viewQueries.length) {
        definitionMap.set('viewQuery', createViewQueriesFunction(meta, constantPool));
    }
    // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`
    var templateTypeName = meta.name;
    var templateName = templateTypeName ? templateTypeName + "_Template" : null;
    var directivesUsed = new Set();
    var pipesUsed = new Set();
    var template = meta.template;
    var templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.ROOT_SCOPE, 0, templateTypeName, null, null, templateName, meta.viewQueries, directiveMatcher, directivesUsed, meta.pipes, pipesUsed, Identifiers$1.namespaceHTML, meta.template.relativeContextFilePath);
    var templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, [], template.hasNgContent, template.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.wrapDirectivesInClosure) {
            directivesExpr = fn([], [new ReturnStatement(directivesExpr)]);
        }
        definitionMap.set('directives', directivesExpr);
    }
    // e.g. `pipes: [MyPipe]`
    if (pipesUsed.size) {
        definitionMap.set('pipes', literalArr(Array.from(pipesUsed)));
    }
    // 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));
    }
    // e.g. `animations: [trigger('123', [])]`
    if (meta.animations !== null) {
        definitionMap.set('data', literalMap([{ key: 'animations', value: meta.animations, quoted: false }]));
    }
    // 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 " + 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 " + component.type);
    var definitionField = outputCtx.constantPool.propertyNameOf(2 /* Component */);
    var summary = component.toSummary();
    // Compute the R3ComponentMetadata from the CompileDirectiveMetadata
    var meta = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, directiveMetadataFromGlobalMetadata(component, outputCtx, reflector), { selector: component.selector, template: {
            nodes: render3Ast.nodes,
            hasNgContent: render3Ast.hasNgContent,
            ngContentSelectors: render3Ast.ngContentSelectors,
            relativeContextFilePath: '',
        }, directives: typeMapToExpressionMap(directiveTypeBySel, outputCtx), pipes: typeMapToExpressionMap(pipeTypeByName, outputCtx), viewQueries: queriesFromGlobalMetadata(component.viewQueries, outputCtx), wrapDirectivesInClosure: false, styles: (summary.template && summary.template.styles) || EMPTY_ARRAY, encapsulation: (summary.template && summary.template.encapsulation) || ViewEncapsulation.Emulated, animations: null, viewProviders: null });
    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) {
    var summary = directive.toSummary();
    var name = identifierName(directive.type);
    name || error("Cannot resolver the name of " + directive.type);
    return {
        name: name,
        type: outputCtx.importExpr(directive.type.reference),
        typeArgumentCount: 0,
        typeSourceSpan: typeSourceSpan(directive.isComponent ? 'Component' : 'Directive', directive.type),
        selector: directive.selector,
        deps: dependenciesFromGlobalMetadata(directive.type, outputCtx, reflector),
        queries: queriesFromGlobalMetadata(directive.queries, outputCtx),
        lifecycle: {
            usesOnChanges: directive.type.lifecycleHooks.some(function (lifecycle) { return lifecycle == LifecycleHooks.OnChanges; }),
        },
        host: {
            attributes: directive.hostAttributes,
            listeners: summary.hostListeners,
            properties: summary.hostProperties,
        },
        inputs: directive.inputs,
        outputs: directive.outputs,
        usesInheritance: false,
        exportAs: null,
        providers: null,
    };
}
/**
 * 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,
        };
    });
}
/**
 * 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 createQueryDefinition(query, constantPool, idx) {
    var predicate = getQueryPredicate(query, constantPool);
    // e.g. r3.Q(null, somePredicate, false) or r3.Q(0, ['div'], false)
    var parameters = [
        literal(idx, INFERRED_TYPE),
        predicate,
        literal(query.descendants),
    ];
    if (query.read) {
        parameters.push(query.read);
    }
    return importExpr(Identifiers$1.query).callFn(parameters);
}
// Turn a directive selector into an R3-compatible selector for directive def
function createDirectiveSelector(selector) {
    return asLiteral(parseSelectorToR3Selector(selector));
}
function createHostAttributesArray(meta) {
    var e_1, _a;
    var values = [];
    var attributes = meta.host.attributes;
    try {
        for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(Object.getOwnPropertyNames(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {
            var key = _c.value;
            var value = attributes[key];
            values.push(literal(key), literal(value));
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
        }
        finally { if (e_1) throw e_1.error; }
    }
    if (values.length > 0) {
        return literalArr(values);
    }
    return null;
}
// Return a contentQueries function or null if one is not necessary.
function createContentQueriesFunction(meta, constantPool) {
    if (meta.queries.length) {
        var statements = meta.queries.map(function (query) {
            var queryDefinition = createQueryDefinition(query, constantPool, null);
            return importExpr(Identifiers$1.registerContentQuery).callFn([queryDefinition]).toStmt();
        });
        var typeName = meta.name;
        return fn([], statements, INFERRED_TYPE, null, typeName ? typeName + "_ContentQueries" : null);
    }
    return null;
}
// Return a contentQueriesRefresh function or null if one is not necessary.
function createContentQueriesRefreshFunction(meta) {
    if (meta.queries.length > 0) {
        var statements_1 = [];
        var typeName = meta.name;
        var parameters = [
            new FnParam('dirIndex', NUMBER_TYPE),
            new FnParam('queryStartIndex', NUMBER_TYPE),
        ];
        var directiveInstanceVar_1 = variable('instance');
        // var $tmp$: any;
        var temporary_1 = temporaryAllocator(statements_1, TEMPORARY_NAME);
        // const $instance$ = $r3$.ɵload(dirIndex);
        statements_1.push(directiveInstanceVar_1.set(importExpr(Identifiers$1.load).callFn([variable('dirIndex')]))
            .toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
        meta.queries.forEach(function (query, idx) {
            var loadQLArg = variable('queryStartIndex');
            var getQueryList = importExpr(Identifiers$1.loadQueryList).callFn([
                idx > 0 ? loadQLArg.plus(literal(idx)) : loadQLArg
            ]);
            var assignToTemporary = temporary_1().set(getQueryList);
            var callQueryRefresh = importExpr(Identifiers$1.queryRefresh).callFn([assignToTemporary]);
            var updateDirective = directiveInstanceVar_1.prop(query.propertyName)
                .set(query.first ? temporary_1().prop('first') : temporary_1());
            var refreshQueryAndUpdateDirective = callQueryRefresh.and(updateDirective);
            statements_1.push(refreshQueryAndUpdateDirective.toStmt());
        });
        return fn(parameters, statements_1, INFERRED_TYPE, null, typeName ? typeName + "_ContentQueriesRefresh" : null);
    }
    return null;
}
function stringAsType(str) {
    return expressionType(literal(str));
}
function stringMapAsType(map) {
    var mapValues = Object.keys(map).map(function (key) { return ({
        key: key,
        value: literal(map[key]),
        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 ? stringAsType(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(meta, constantPool) {
    var createStatements = [];
    var updateStatements = [];
    var tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
    for (var i = 0; i < meta.viewQueries.length; i++) {
        var query = meta.viewQueries[i];
        // creation, e.g. r3.Q(0, somePredicate, true);
        var queryDefinition = createQueryDefinition(query, constantPool, i);
        createStatements.push(queryDefinition.toStmt());
        // update, e.g. (r3.qR(tmp = r3.ɵload(0)) && (ctx.someDir = tmp));
        var temporary = tempAllocator();
        var getQueryList = importExpr(Identifiers$1.load).callFn([literal(i)]);
        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 = meta.name ? meta.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(meta, bindingParser, constantPool, allocatePureFunctionSlots) {
    var e_2, _a, e_3, _b;
    var statements = [];
    var hostBindingSourceSpan = meta.typeSourceSpan;
    var directiveSummary = metadataAsSummary(meta);
    // Calculate the host property bindings
    var bindings = bindingParser.createBoundHostProperties(directiveSummary, hostBindingSourceSpan);
    var bindingContext = importExpr(Identifiers$1.load).callFn([variable('dirIndex')]);
    if (bindings) {
        var valueConverter = new ValueConverter(constantPool, 
        /* new nodes are illegal here */ function () { return error('Unexpected node'); }, allocatePureFunctionSlots, 
        /* pipes are illegal here */ function () { return error('Unexpected pipe'); });
        try {
            for (var bindings_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(bindings), bindings_1_1 = bindings_1.next(); !bindings_1_1.done; bindings_1_1 = bindings_1.next()) {
                var binding = bindings_1_1.value;
                // resolve literal arrays and literal objects
                var value = binding.expression.visit(valueConverter);
                var bindingExpr = convertPropertyBinding(null, bindingContext, value, 'b', BindingForm.TrySimple, function () { return error('Unexpected interpolation'); });
                statements.push.apply(statements, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(bindingExpr.stmts));
                statements.push(importExpr(Identifiers$1.elementProperty)
                    .callFn([
                    variable('elIndex'),
                    literal(binding.name),
                    importExpr(Identifiers$1.bind).callFn([bindingExpr.currValExpr]),
                ])
                    .toStmt());
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (bindings_1_1 && !bindings_1_1.done && (_a = bindings_1.return)) _a.call(bindings_1);
            }
            finally { if (e_2) throw e_2.error; }
        }
    }
    // Calculate host event bindings
    var eventBindings = bindingParser.createDirectiveHostEventAsts(directiveSummary, hostBindingSourceSpan);
    if (eventBindings) {
        try {
            for (var eventBindings_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(eventBindings), eventBindings_1_1 = eventBindings_1.next(); !eventBindings_1_1.done; eventBindings_1_1 = eventBindings_1.next()) {
                var binding = eventBindings_1_1.value;
                var bindingExpr = convertActionBinding(null, bindingContext, binding.handler, 'b', function () { return error('Unexpected interpolation'); });
                var bindingName = binding.name && sanitizeIdentifier(binding.name);
                var typeName = meta.name;
                var functionName = typeName && bindingName ? typeName + "_" + bindingName + "_HostBindingHandler" : null;
                var handler = fn([new FnParam('$event', DYNAMIC_TYPE)], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(bindingExpr.stmts, [new ReturnStatement(bindingExpr.allowDefault)]), INFERRED_TYPE, null, functionName);
                statements.push(importExpr(Identifiers$1.listener).callFn([literal(binding.name), handler]).toStmt());
            }
        }
        catch (e_3_1) { e_3 = { error: e_3_1 }; }
        finally {
            try {
                if (eventBindings_1_1 && !eventBindings_1_1.done && (_b = eventBindings_1.return)) _b.call(eventBindings_1);
            }
            finally { if (e_3) throw e_3.error; }
        }
    }
    if (statements.length > 0) {
        var typeName = meta.name;
        return fn([
            new FnParam('dirIndex', NUMBER_TYPE),
            new FnParam('elIndex', NUMBER_TYPE),
        ], statements, INFERRED_TYPE, null, typeName ? typeName + "_HostBindings" : null);
    }
    return null;
}
function metadataAsSummary(meta) {
    // clang-format off
    return {
        hostAttributes: meta.host.attributes,
        hostListeners: meta.host.listeners,
        hostProperties: meta.host.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 (_a) {
        var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), key = _b[0], type = _b[1];
        return [key, outputCtx.importExpr(type)];
    });
    return new Map(entries);
}
var HOST_REG_EXP$1 = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;
function parseHostBindings(host) {
    var attributes = {};
    var listeners = {};
    var properties = {};
    var animations = {};
    Object.keys(host).forEach(function (key) {
        var value = host[key];
        var matches = key.match(HOST_REG_EXP$1);
        if (matches === null) {
            attributes[key] = value;
        }
        else if (matches[1 /* Property */] != null) {
            properties[matches[1 /* Property */]] = value;
        }
        else if (matches[2 /* Event */] != null) {
            listeners[matches[2 /* Event */]] = value;
        }
        else if (matches[3 /* Animation */] != null) {
            animations[matches[3 /* Animation */]] = value;
        }
    });
    return { attributes: attributes, listeners: listeners, properties: properties, animations: animations };
}
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
 */
var CompilerFacadeImpl = /** @class */ (function () {
    function CompilerFacadeImpl() {
        this.R3ResolvedDependencyType = R3ResolvedDependencyType;
    }
    CompilerFacadeImpl.prototype.compilePipe = function (angularCoreEnv, sourceMapUrl, facade) {
        var res = compilePipeFromMetadata({
            name: facade.name,
            type: new WrappedNodeExpr(facade.type),
            deps: convertR3DependencyMetadataArray(facade.deps),
            pipeName: facade.pipeName,
            pure: facade.pure,
        });
        return jitExpression(res.expression, angularCoreEnv, sourceMapUrl, res.statements);
    };
    CompilerFacadeImpl.prototype.compileInjectable = function (angularCoreEnv, sourceMapUrl, facade) {
        var _a = compileInjectable({
            name: facade.name,
            type: new WrappedNodeExpr(facade.type),
            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 = _a.expression, statements = _a.statements;
        return jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);
    };
    CompilerFacadeImpl.prototype.compileInjector = function (angularCoreEnv, sourceMapUrl, facade) {
        var meta = {
            name: facade.name,
            type: new WrappedNodeExpr(facade.type),
            deps: convertR3DependencyMetadataArray(facade.deps),
            providers: new WrappedNodeExpr(facade.providers),
            imports: new WrappedNodeExpr(facade.imports),
        };
        var res = compileInjector(meta);
        return jitExpression(res.expression, angularCoreEnv, sourceMapUrl, res.statements);
    };
    CompilerFacadeImpl.prototype.compileNgModule = function (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,
        };
        var res = compileNgModule(meta);
        return jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
    };
    CompilerFacadeImpl.prototype.compileDirective = function (angularCoreEnv, sourceMapUrl, facade) {
        var constantPool = new ConstantPool();
        var bindingParser = makeBindingParser();
        var meta = convertDirectiveFacadeToMetadata(facade);
        var res = compileDirectiveFromMetadata(meta, constantPool, bindingParser);
        var preStatements = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(constantPool.statements, res.statements);
        return jitExpression(res.expression, angularCoreEnv, sourceMapUrl, preStatements);
    };
    CompilerFacadeImpl.prototype.compileComponent = function (angularCoreEnv, sourceMapUrl, facade) {
        // The ConstantPool is a requirement of the JIT'er.
        var constantPool = new ConstantPool();
        // Parse the template and check for errors.
        var template = parseTemplate(facade.template, sourceMapUrl, {
            preserveWhitespaces: facade.preserveWhitespaces || false,
        }, '');
        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 " + facade.name + ": " + errors);
        }
        // Compile the component metadata, including template, into an expression.
        // TODO(alxhub): implement inputs, outputs, queries, etc.
        var res = compileComponentFromMetadata(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, facade, convertDirectiveFacadeToMetadata(facade), { template: template, viewQueries: facade.viewQueries.map(convertToR3QueryMetadata), wrapDirectivesInClosure: false, styles: facade.styles || [], encapsulation: facade.encapsulation, animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null, viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) :
                null }), constantPool, makeBindingParser());
        var preStatements = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(constantPool.statements, res.statements);
        return jitExpression(res.expression, angularCoreEnv, sourceMapUrl, preStatements);
    };
    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 (value) {
    var wrapped = new WrappedNodeExpr(value);
    return { value: wrapped, type: wrapped };
};
function convertToR3QueryMetadata(facade) {
    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, facade, { predicate: Array.isArray(facade.predicate) ? facade.predicate :
            new WrappedNodeExpr(facade.predicate), read: facade.read ? new WrappedNodeExpr(facade.read) : null });
}
function convertDirectiveFacadeToMetadata(facade) {
    var inputsFromMetadata = parseInputOutputs(facade.inputs || []);
    var outputsFromMetadata = parseInputOutputs(facade.outputs || []);
    var propMetadata = facade.propMetadata;
    var inputsFromType = {};
    var outputsFromType = {};
    var _loop_1 = function (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_1(field);
    }
    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, facade, { typeSourceSpan: null, type: new WrappedNodeExpr(facade.type), deps: convertR3DependencyMetadataArray(facade.deps), host: extractHostBindings(facade.host, facade.propMetadata), inputs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, inputsFromMetadata, inputsFromType), outputs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, outputsFromMetadata, outputsFromType), providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null });
}
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(host, propMetadata) {
    // First parse the declarations from the metadata.
    var _a = parseHostBindings(host || {}), attributes = _a.attributes, listeners = _a.listeners, properties = _a.properties, animations = _a.animations;
    if (Object.keys(animations).length > 0) {
        throw new Error("Animation bindings are as-of-yet unsupported in Ivy");
    }
    var _loop_2 = function (field) {
        if (propMetadata.hasOwnProperty(field)) {
            propMetadata[field].forEach(function (ann) {
                if (isHostBinding(ann)) {
                    properties[ann.hostPropertyName || field] = field;
                }
                else if (isHostListener(ann)) {
                    listeners[ann.eventName || field] = field + "(" + (ann.args || []).join(',') + ")";
                }
            });
        }
    };
    // Next, loop over the properties of the object, looking for @HostBinding and @HostListener.
    for (var field in propMetadata) {
        _loop_2(field);
    }
    return { attributes: attributes, listeners: listeners, properties: properties };
}
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 _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(value.split(',').map(function (piece) { return piece.trim(); }), 2), field = _a[0], property = _a[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('7.0.4');

/**
 * @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 _a;
/**
 * A segment of text within the template.
 */
var TextAst = /** @class */ (function () {
    function TextAst(value, ngContentIndex, sourceSpan) {
        this.value = value;
        this.ngContentIndex = ngContentIndex;
        this.sourceSpan = sourceSpan;
    }
    TextAst.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };
    return TextAst;
}());
/**
 * A bound expression within the text of a template.
 */
var BoundTextAst = /** @class */ (function () {
    function BoundTextAst(value, ngContentIndex, sourceSpan) {
        this.value = value;
        this.ngContentIndex = ngContentIndex;
        this.sourceSpan = sourceSpan;
    }
    BoundTextAst.prototype.visit = function (visitor, context) {
        return visitor.visitBoundText(this, context);
    };
    return BoundTextAst;
}());
/**
 * A plain attribute on an element.
 */
var AttrAst = /** @class */ (function () {
    function AttrAst(name, value, sourceSpan) {
        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    AttrAst.prototype.visit = function (visitor, context) { return visitor.visitAttr(this, context); };
    return AttrAst;
}());
var BoundPropertyMapping = (_a = {},
    _a[4 /* Animation */] = 4 /* Animation */,
    _a[1 /* Attribute */] = 1 /* Attribute */,
    _a[2 /* Class */] = 2 /* Class */,
    _a[0 /* Property */] = 0 /* Property */,
    _a[3 /* Style */] = 3 /* Style */,
    _a);
/**
 * A binding for an element property (e.g. `[property]="expression"`) or an animation trigger (e.g.
 * `[@trigger]="stateExp"`)
 */
var BoundElementPropertyAst = /** @class */ (function () {
    function BoundElementPropertyAst(name, type, securityContext, value, unit, sourceSpan) {
        this.name = name;
        this.type = type;
        this.securityContext = securityContext;
        this.value = value;
        this.unit = unit;
        this.sourceSpan = sourceSpan;
        this.isAnimation = this.type === 4 /* Animation */;
    }
    BoundElementPropertyAst.fromBoundProperty = function (prop) {
        var type = BoundPropertyMapping[prop.type];
        return new BoundElementPropertyAst(prop.name, type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan);
    };
    BoundElementPropertyAst.prototype.visit = function (visitor, context) {
        return visitor.visitElementProperty(this, context);
    };
    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 = /** @class */ (function () {
    function BoundEventAst(name, target, phase, handler, sourceSpan) {
        this.name = name;
        this.target = target;
        this.phase = phase;
        this.handler = handler;
        this.sourceSpan = sourceSpan;
        this.fullName = BoundEventAst.calcFullName(this.name, this.target, this.phase);
        this.isAnimation = !!this.phase;
    }
    BoundEventAst.calcFullName = function (name, target, phase) {
        if (target) {
            return target + ":" + name;
        }
        if (phase) {
            return "@" + name + "." + phase;
        }
        return name;
    };
    BoundEventAst.fromParsedEvent = function (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);
    };
    BoundEventAst.prototype.visit = function (visitor, context) {
        return visitor.visitEvent(this, context);
    };
    return BoundEventAst;
}());
/**
 * A reference declaration on an element (e.g. `let someName="expression"`).
 */
var ReferenceAst = /** @class */ (function () {
    function ReferenceAst(name, value, originalValue, sourceSpan) {
        this.name = name;
        this.value = value;
        this.originalValue = originalValue;
        this.sourceSpan = sourceSpan;
    }
    ReferenceAst.prototype.visit = function (visitor, context) {
        return visitor.visitReference(this, context);
    };
    return ReferenceAst;
}());
/**
 * A variable declaration on a <ng-template> (e.g. `var-someName="someLocalName"`).
 */
var VariableAst = /** @class */ (function () {
    function VariableAst(name, value, sourceSpan) {
        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    VariableAst.fromParsedVariable = function (v) {
        return new VariableAst(v.name, v.value, v.sourceSpan);
    };
    VariableAst.prototype.visit = function (visitor, context) {
        return visitor.visitVariable(this, context);
    };
    return VariableAst;
}());
/**
 * An element declaration in a template.
 */
var ElementAst = /** @class */ (function () {
    function ElementAst(name, attrs, inputs, outputs, references, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan, endSourceSpan) {
        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;
    }
    ElementAst.prototype.visit = function (visitor, context) {
        return visitor.visitElement(this, context);
    };
    return ElementAst;
}());
/**
 * A `<ng-template>` element included in an Angular template.
 */
var EmbeddedTemplateAst = /** @class */ (function () {
    function EmbeddedTemplateAst(attrs, outputs, references, variables, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan) {
        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;
    }
    EmbeddedTemplateAst.prototype.visit = function (visitor, context) {
        return visitor.visitEmbeddedTemplate(this, context);
    };
    return EmbeddedTemplateAst;
}());
/**
 * A directive property with a bound value (e.g. `*ngIf="condition").
 */
var BoundDirectivePropertyAst = /** @class */ (function () {
    function BoundDirectivePropertyAst(directiveName, templateName, value, sourceSpan) {
        this.directiveName = directiveName;
        this.templateName = templateName;
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    BoundDirectivePropertyAst.prototype.visit = function (visitor, context) {
        return visitor.visitDirectiveProperty(this, context);
    };
    return BoundDirectivePropertyAst;
}());
/**
 * A directive declared on an element.
 */
var DirectiveAst = /** @class */ (function () {
    function DirectiveAst(directive, inputs, hostProperties, hostEvents, contentQueryStartId, sourceSpan) {
        this.directive = directive;
        this.inputs = inputs;
        this.hostProperties = hostProperties;
        this.hostEvents = hostEvents;
        this.contentQueryStartId = contentQueryStartId;
        this.sourceSpan = sourceSpan;
    }
    DirectiveAst.prototype.visit = function (visitor, context) {
        return visitor.visitDirective(this, context);
    };
    return DirectiveAst;
}());
/**
 * A provider declared on an element
 */
var ProviderAst = /** @class */ (function () {
    function ProviderAst(token, multiProvider, eager, providers, providerType, lifecycleHooks, sourceSpan, isModule) {
        this.token = token;
        this.multiProvider = multiProvider;
        this.eager = eager;
        this.providers = providers;
        this.providerType = providerType;
        this.lifecycleHooks = lifecycleHooks;
        this.sourceSpan = sourceSpan;
        this.isModule = isModule;
    }
    ProviderAst.prototype.visit = function (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 = /** @class */ (function () {
    function NgContentAst(index, ngContentIndex, sourceSpan) {
        this.index = index;
        this.ngContentIndex = ngContentIndex;
        this.sourceSpan = sourceSpan;
    }
    NgContentAst.prototype.visit = function (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 = /** @class */ (function () {
    function NullTemplateVisitor() {
    }
    NullTemplateVisitor.prototype.visitNgContent = function (ast, context) { };
    NullTemplateVisitor.prototype.visitEmbeddedTemplate = function (ast, context) { };
    NullTemplateVisitor.prototype.visitElement = function (ast, context) { };
    NullTemplateVisitor.prototype.visitReference = function (ast, context) { };
    NullTemplateVisitor.prototype.visitVariable = function (ast, context) { };
    NullTemplateVisitor.prototype.visitEvent = function (ast, context) { };
    NullTemplateVisitor.prototype.visitElementProperty = function (ast, context) { };
    NullTemplateVisitor.prototype.visitAttr = function (ast, context) { };
    NullTemplateVisitor.prototype.visitBoundText = function (ast, context) { };
    NullTemplateVisitor.prototype.visitText = function (ast, context) { };
    NullTemplateVisitor.prototype.visitDirective = function (ast, context) { };
    NullTemplateVisitor.prototype.visitDirectiveProperty = function (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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RecursiveTemplateAstVisitor, _super);
    function RecursiveTemplateAstVisitor() {
        return _super.call(this) || this;
    }
    // Nodes with children
    RecursiveTemplateAstVisitor.prototype.visitEmbeddedTemplate = function (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);
        });
    };
    RecursiveTemplateAstVisitor.prototype.visitElement = function (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);
        });
    };
    RecursiveTemplateAstVisitor.prototype.visitDirective = function (ast, context) {
        return this.visitChildren(context, function (visit) {
            visit(ast.inputs);
            visit(ast.hostProperties);
            visit(ast.hostEvents);
        });
    };
    RecursiveTemplateAstVisitor.prototype.visitChildren = function (context, cb) {
        var results = [];
        var t = this;
        function visit(children) {
            if (children && children.length)
                results.push(templateVisitAll(t, children, context));
        }
        cb(visit);
        return [].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, context) {
    if (context === void 0) { context = 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 CompilerConfig = /** @class */ (function () {
    function CompilerConfig(_a) {
        var _b = _a === void 0 ? {} : _a, _c = _b.defaultEncapsulation, defaultEncapsulation = _c === void 0 ? ViewEncapsulation.Emulated : _c, _d = _b.useJit, useJit = _d === void 0 ? true : _d, _e = _b.jitDevMode, jitDevMode = _e === void 0 ? false : _e, _f = _b.missingTranslation, missingTranslation = _f === void 0 ? null : _f, preserveWhitespaces = _b.preserveWhitespaces, strictInjectionParameters = _b.strictInjectionParameters;
        this.defaultEncapsulation = defaultEncapsulation;
        this.useJit = !!useJit;
        this.jitDevMode = !!jitDevMode;
        this.missingTranslation = missingTranslation;
        this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));
        this.strictInjectionParameters = strictInjectionParameters === true;
    }
    return CompilerConfig;
}());
function preserveWhitespacesDefault(preserveWhitespacesOption, defaultSetting) {
    if (defaultSetting === void 0) { defaultSetting = 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 = /** @class */ (function () {
    function DirectiveNormalizer(_resourceLoader, _urlResolver, _htmlParser, _config) {
        this._resourceLoader = _resourceLoader;
        this._urlResolver = _urlResolver;
        this._htmlParser = _htmlParser;
        this._config = _config;
        this._resourceLoaderCache = new Map();
    }
    DirectiveNormalizer.prototype.clearCache = function () { this._resourceLoaderCache.clear(); };
    DirectiveNormalizer.prototype.clearCacheFor = function (normalizedDirective) {
        var _this = this;
        if (!normalizedDirective.isComponent) {
            return;
        }
        var template = normalizedDirective.template;
        this._resourceLoaderCache.delete(template.templateUrl);
        template.externalStylesheets.forEach(function (stylesheet) { _this._resourceLoaderCache.delete(stylesheet.moduleUrl); });
    };
    DirectiveNormalizer.prototype._fetch = function (url) {
        var result = this._resourceLoaderCache.get(url);
        if (!result) {
            result = this._resourceLoader.get(url);
            this._resourceLoaderCache.set(url, result);
        }
        return result;
    };
    DirectiveNormalizer.prototype.normalizeTemplate = function (prenormData) {
        var _this = this;
        if (isDefined(prenormData.template)) {
            if (isDefined(prenormData.templateUrl)) {
                throw syntaxError("'" + stringify(prenormData.componentType) + "' component cannot define both template and templateUrl");
            }
            if (typeof prenormData.template !== 'string') {
                throw syntaxError("The template specified for component " + stringify(prenormData.componentType) + " is not a string");
            }
        }
        else if (isDefined(prenormData.templateUrl)) {
            if (typeof prenormData.templateUrl !== 'string') {
                throw syntaxError("The templateUrl specified for component " + stringify(prenormData.componentType) + " is not a string");
            }
        }
        else {
            throw syntaxError("No template specified for component " + stringify(prenormData.componentType));
        }
        if (isDefined(prenormData.preserveWhitespaces) &&
            typeof prenormData.preserveWhitespaces !== 'boolean') {
            throw syntaxError("The preserveWhitespaces option for component " + stringify(prenormData.componentType) + " must be a boolean");
        }
        return SyncAsync.then(this._preParseTemplate(prenormData), function (preparsedTemplate) { return _this._normalizeTemplateMetadata(prenormData, preparsedTemplate); });
    };
    DirectiveNormalizer.prototype._preParseTemplate = function (prenomData) {
        var _this = 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 _this._preparseLoadedTemplate(prenomData, template, templateUrl); });
    };
    DirectiveNormalizer.prototype._preparseLoadedTemplate = function (prenormData, template, templateAbsUrl) {
        var isInline = !!prenormData.template;
        var interpolationConfig = InterpolationConfig.fromArray(prenormData.interpolation);
        var rootNodesAndErrors = this._htmlParser.parse(template, templateSourceUrl({ reference: prenormData.ngModuleType }, { type: { reference: prenormData.componentType } }, { isInline: isInline, templateUrl: templateAbsUrl }), true, interpolationConfig);
        if (rootNodesAndErrors.errors.length > 0) {
            var errorString = rootNodesAndErrors.errors.join('\n');
            throw syntaxError("Template parse errors:\n" + errorString);
        }
        var templateMetadataStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: prenormData.styles, moduleUrl: prenormData.moduleUrl }));
        var visitor = new TemplatePreparseVisitor();
        visitAll(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,
        };
    };
    DirectiveNormalizer.prototype._normalizeTemplateMetadata = function (prenormData, preparsedTemplate) {
        var _this = this;
        return SyncAsync.then(this._loadMissingExternalStylesheets(preparsedTemplate.styleUrls.concat(preparsedTemplate.inlineStyleUrls)), function (externalStylesheets) { return _this._normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, externalStylesheets); });
    };
    DirectiveNormalizer.prototype._normalizeLoadedTemplateMetadata = function (prenormData, preparsedTemplate, stylesheets) {
        // 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 _this = this;
        var styles = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(stylesheet.styles);
            _this._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),
        });
    };
    DirectiveNormalizer.prototype._inlineStyles = function (styleUrls, stylesheets, targetStyles) {
        var _this = this;
        styleUrls.forEach(function (styleUrl) {
            var stylesheet = stylesheets.get(styleUrl);
            stylesheet.styles.forEach(function (style) { return targetStyles.push(style); });
            _this._inlineStyles(stylesheet.styleUrls, stylesheets, targetStyles);
        });
    };
    DirectiveNormalizer.prototype._loadMissingExternalStylesheets = function (styleUrls, loadedStylesheets) {
        var _this = this;
        if (loadedStylesheets === void 0) { loadedStylesheets = new Map(); }
        return SyncAsync.then(SyncAsync.all(styleUrls.filter(function (styleUrl) { return !loadedStylesheets.has(styleUrl); })
            .map(function (styleUrl) { return SyncAsync.then(_this._fetch(styleUrl), function (loadedStyle) {
            var stylesheet = _this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: [loadedStyle], moduleUrl: styleUrl }));
            loadedStylesheets.set(styleUrl, stylesheet);
            return _this._loadMissingExternalStylesheets(stylesheet.styleUrls, loadedStylesheets);
        }); })), function (_) { return loadedStylesheets; });
    };
    DirectiveNormalizer.prototype._normalizeStylesheet = function (stylesheet) {
        var _this = this;
        var moduleUrl = stylesheet.moduleUrl;
        var allStyleUrls = stylesheet.styleUrls.filter(isStyleUrlResolvable)
            .map(function (url) { return _this._urlResolver.resolve(moduleUrl, url); });
        var allStyles = stylesheet.styles.map(function (style) {
            var styleWithImports = extractStyleUrls(_this._urlResolver, moduleUrl, style);
            allStyleUrls.push.apply(allStyleUrls, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(styleWithImports.styleUrls));
            return styleWithImports.style;
        });
        return new CompileStylesheetMetadata({ styles: allStyles, styleUrls: allStyleUrls, moduleUrl: moduleUrl });
    };
    return DirectiveNormalizer;
}());
var TemplatePreparseVisitor = /** @class */ (function () {
    function TemplatePreparseVisitor() {
        this.ngContentSelectors = [];
        this.styles = [];
        this.styleUrls = [];
        this.ngNonBindableStackCount = 0;
    }
    TemplatePreparseVisitor.prototype.visitElement = function (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_1 = '';
                ast.children.forEach(function (child) {
                    if (child instanceof Text) {
                        textContent_1 += child.value;
                    }
                });
                this.styles.push(textContent_1);
                break;
            case PreparsedElementType.STYLESHEET:
                this.styleUrls.push(preparsedElement.hrefAttr);
                break;
            default:
                break;
        }
        if (preparsedElement.nonBindable) {
            this.ngNonBindableStackCount++;
        }
        visitAll(this, ast.children);
        if (preparsedElement.nonBindable) {
            this.ngNonBindableStackCount--;
        }
        return null;
    };
    TemplatePreparseVisitor.prototype.visitExpansion = function (ast, context) { visitAll(this, ast.cases); };
    TemplatePreparseVisitor.prototype.visitExpansionCase = function (ast, context) {
        visitAll(this, ast.expression);
    };
    TemplatePreparseVisitor.prototype.visitComment = function (ast, context) { return null; };
    TemplatePreparseVisitor.prototype.visitAttribute = function (ast, context) { return null; };
    TemplatePreparseVisitor.prototype.visitText = function (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 = /** @class */ (function () {
    function DirectiveResolver(_reflector) {
        this._reflector = _reflector;
    }
    DirectiveResolver.prototype.isDirective = function (type) {
        var typeMetadata = this._reflector.annotations(resolveForwardRef(type));
        return typeMetadata && typeMetadata.some(isDirectiveMetadata);
    };
    DirectiveResolver.prototype.resolve = function (type, throwIfNotFound) {
        if (throwIfNotFound === void 0) { throwIfNotFound = 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 " + stringify(type));
        }
        return null;
    };
    DirectiveResolver.prototype._mergeWithPropertyMetadata = function (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(propName + ": " + input.bindingPropertyName);
                }
                else {
                    inputs.push(propName);
                }
            }
            var output = findLast(propertyMetadata[propName], function (a) { return createOutput.isTypeOf(a); });
            if (output) {
                if (output.bindingPropertyName) {
                    outputs.push(propName + ": " + 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["[" + hostBinding.hostPropertyName + "]"] = propName;
                }
                else {
                    host["[" + propName + "]"] = propName;
                }
            });
            var hostListeners = propertyMetadata[propName].filter(function (a) { return createHostListener.isTypeOf(a); });
            hostListeners.forEach(function (hostListener) {
                var args = hostListener.args || [];
                host["(" + hostListener.eventName + ")"] = propName + "(" + 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);
    };
    DirectiveResolver.prototype._extractPublicName = function (def) { return splitAtColon(def, [null, def])[1].trim(); };
    DirectiveResolver.prototype._dedupeBindings = function (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_1 = this._extractPublicName(binding);
            publicNames.add(name_1);
            if (!names.has(name_1)) {
                names.add(name_1);
                reversedResult.push(binding);
            }
        }
        return reversedResult.reverse();
    };
    DirectiveResolver.prototype._merge = function (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(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, directive.host, host) : host;
        var mergedQueries = directive.queries ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__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
 */
function digest(message) {
    return message.id || sha1(serializeNodes(message.nodes).join('') + ("[" + 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 = /** @class */ (function () {
    function _SerializerVisitor() {
    }
    _SerializerVisitor.prototype.visitText = function (text, context) { return text.value; };
    _SerializerVisitor.prototype.visitContainer = function (container, context) {
        var _this = this;
        return "[" + container.children.map(function (child) { return child.visit(_this); }).join(', ') + "]";
    };
    _SerializerVisitor.prototype.visitIcu = function (icu, context) {
        var _this = this;
        var strCases = Object.keys(icu.cases).map(function (k) { return k + " {" + icu.cases[k].visit(_this) + "}"; });
        return "{" + icu.expression + ", " + icu.type + ", " + strCases.join(', ') + "}";
    };
    _SerializerVisitor.prototype.visitTagPlaceholder = function (ph, context) {
        var _this = this;
        return ph.isVoid ?
            "<ph tag name=\"" + ph.startName + "\"/>" :
            "<ph tag name=\"" + ph.startName + "\">" + ph.children.map(function (child) { return child.visit(_this); }).join(', ') + "</ph name=\"" + ph.closeName + "\">";
    };
    _SerializerVisitor.prototype.visitPlaceholder = function (ph, context) {
        return ph.value ? "<ph name=\"" + ph.name + "\">" + ph.value + "</ph>" : "<ph name=\"" + ph.name + "\"/>";
    };
    _SerializerVisitor.prototype.visitIcuPlaceholder = function (ph, context) {
        return "<ph icu name=\"" + ph.name + "\">" + 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_SerializerIgnoreIcuExpVisitor, _super);
    function _SerializerIgnoreIcuExpVisitor() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    _SerializerIgnoreIcuExpVisitor.prototype.visitIcu = function (icu, context) {
        var _this = this;
        var strCases = Object.keys(icu.cases).map(function (k) { return k + " {" + icu.cases[k].visit(_this) + "}"; });
        // Do not take the expression into account
        return "{" + icu.type + ", " + 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 _a, _b;
    var utf8 = utf8Encode(str);
    var words32 = stringToWords32(utf8, Endian.Big);
    var len = utf8.length * 8;
    var w = new Array(80);
    var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0], 5), a = _c[0], b = _c[1], c = _c[2], d = _c[3], e = _c[4];
    words32[len >> 5] |= 0x80 << (24 - len % 32);
    words32[((len + 64 >> 9) << 4) + 15] = len;
    for (var i = 0; i < words32.length; i += 16) {
        var _d = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([a, b, c, d, e], 5), h0 = _d[0], h1 = _d[1], h2 = _d[2], h3 = _d[3], h4 = _d[4];
        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 _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(fk(j, b, c, d), 2), f = _e[0], k = _e[1];
            var temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);
            _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([d, c, rol32(b, 30), a, temp], 5), e = _a[0], d = _a[1], c = _a[2], b = _a[3], a = _a[4];
        }
        _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([add32(a, h0), add32(b, h1), add32(c, h2), add32(d, h3), add32(e, h4)], 5), a = _b[0], b = _b[1], c = _b[2], d = _b[3], e = _b[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 _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([hash32(utf8, 0), hash32(utf8, 102072)], 2), hi = _a[0], lo = _a[1];
    if (hi == 0 && (lo == 0 || lo == 1)) {
        hi = hi ^ 0x130f9bef;
        lo = lo ^ -0x6b5f56d8;
    }
    return [hi, lo];
}
function computeMsgId(msg, meaning) {
    var _a;
    var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(fingerprint(msg), 2), hi = _b[0], lo = _b[1];
    if (meaning) {
        var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(fingerprint(meaning), 2), him = _c[0], lom = _c[1];
        _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(add64(rol64([hi, lo], 1), [him, lom]), 2), hi = _a[0], lo = _a[1];
    }
    return byteStringToDecString(words32ToByteString([hi & 0x7fffffff, lo]));
}
function hash32(str, c) {
    var _a;
    var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([0x9e3779b9, 0x9e3779b9], 2), a = _b[0], b = _b[1];
    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));
        _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(mix([a, b, c]), 3), a = _a[0], b = _a[1], c = _a[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(_a) {
    var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 3), a = _b[0], b = _b[1], c = _b[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(_a, _b) {
    var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), ah = _c[0], al = _c[1];
    var _d = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_b, 2), bh = _d[0], bl = _d[1];
    var _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(add32to64(al, bl), 2), carry = _e[0], l = _e[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(_a, count) {
    var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), hi = _b[0], lo = _b[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 i = 0; i < 4; i++) {
            word += byteAt(str, index + i) << 8 * i;
        }
    }
    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 Message = /** @class */ (function () {
    /**
     * @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) {
        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 = [];
        }
    }
    return Message;
}());
var Text$2 = /** @class */ (function () {
    function Text(value, sourceSpan) {
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    Text.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };
    return Text;
}());
// TODO(vicb): do we really need this node (vs an array) ?
var Container = /** @class */ (function () {
    function Container(children, sourceSpan) {
        this.children = children;
        this.sourceSpan = sourceSpan;
    }
    Container.prototype.visit = function (visitor, context) { return visitor.visitContainer(this, context); };
    return Container;
}());
var Icu = /** @class */ (function () {
    function Icu(expression, type, cases, sourceSpan) {
        this.expression = expression;
        this.type = type;
        this.cases = cases;
        this.sourceSpan = sourceSpan;
    }
    Icu.prototype.visit = function (visitor, context) { return visitor.visitIcu(this, context); };
    return Icu;
}());
var TagPlaceholder = /** @class */ (function () {
    function TagPlaceholder(tag, attrs, startName, closeName, children, isVoid, sourceSpan) {
        this.tag = tag;
        this.attrs = attrs;
        this.startName = startName;
        this.closeName = closeName;
        this.children = children;
        this.isVoid = isVoid;
        this.sourceSpan = sourceSpan;
    }
    TagPlaceholder.prototype.visit = function (visitor, context) { return visitor.visitTagPlaceholder(this, context); };
    return TagPlaceholder;
}());
var Placeholder = /** @class */ (function () {
    function Placeholder(value, name, sourceSpan) {
        this.value = value;
        this.name = name;
        this.sourceSpan = sourceSpan;
    }
    Placeholder.prototype.visit = function (visitor, context) { return visitor.visitPlaceholder(this, context); };
    return Placeholder;
}());
var IcuPlaceholder = /** @class */ (function () {
    function IcuPlaceholder(value, name, sourceSpan) {
        this.value = value;
        this.name = name;
        this.sourceSpan = sourceSpan;
    }
    IcuPlaceholder.prototype.visit = function (visitor, context) { return visitor.visitIcuPlaceholder(this, context); };
    return IcuPlaceholder;
}());
// Clone the AST
var CloneVisitor = /** @class */ (function () {
    function CloneVisitor() {
    }
    CloneVisitor.prototype.visitText = function (text, context) { return new Text$2(text.value, text.sourceSpan); };
    CloneVisitor.prototype.visitContainer = function (container, context) {
        var _this = this;
        var children = container.children.map(function (n) { return n.visit(_this, context); });
        return new Container(children, container.sourceSpan);
    };
    CloneVisitor.prototype.visitIcu = function (icu, context) {
        var _this = this;
        var cases = {};
        Object.keys(icu.cases).forEach(function (key) { return cases[key] = icu.cases[key].visit(_this, context); });
        var msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan);
        msg.expressionPlaceholder = icu.expressionPlaceholder;
        return msg;
    };
    CloneVisitor.prototype.visitTagPlaceholder = function (ph, context) {
        var _this = this;
        var children = ph.children.map(function (n) { return n.visit(_this, context); });
        return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan);
    };
    CloneVisitor.prototype.visitPlaceholder = function (ph, context) {
        return new Placeholder(ph.value, ph.name, ph.sourceSpan);
    };
    CloneVisitor.prototype.visitIcuPlaceholder = function (ph, context) {
        return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);
    };
    return CloneVisitor;
}());
// Visit all the nodes recursively
var RecurseVisitor = /** @class */ (function () {
    function RecurseVisitor() {
    }
    RecurseVisitor.prototype.visitText = function (text, context) { };
    RecurseVisitor.prototype.visitContainer = function (container, context) {
        var _this = this;
        container.children.forEach(function (child) { return child.visit(_this); });
    };
    RecurseVisitor.prototype.visitIcu = function (icu, context) {
        var _this = this;
        Object.keys(icu.cases).forEach(function (k) { icu.cases[k].visit(_this); });
    };
    RecurseVisitor.prototype.visitTagPlaceholder = function (ph, context) {
        var _this = this;
        ph.children.forEach(function (child) { return child.visit(_this); });
    };
    RecurseVisitor.prototype.visitPlaceholder = function (ph, context) { };
    RecurseVisitor.prototype.visitIcuPlaceholder = function (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
 */
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 = /** @class */ (function () {
    function PlaceholderRegistry() {
        // Count the occurrence of the base name top generate a unique name
        this._placeHolderNameCounts = {};
        // Maps signature to placeholder names
        this._signatureToName = {};
    }
    PlaceholderRegistry.prototype.getStartTagPlaceholderName = function (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_" + upperTag;
        var name = this._generateUniqueName(isVoid ? baseName : "START_" + baseName);
        this._signatureToName[signature] = name;
        return name;
    };
    PlaceholderRegistry.prototype.getCloseTagPlaceholderName = function (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_" + upperTag;
        var name = this._generateUniqueName("CLOSE_" + baseName);
        this._signatureToName[signature] = name;
        return name;
    };
    PlaceholderRegistry.prototype.getPlaceholderName = function (name, content) {
        var upperName = name.toUpperCase();
        var signature = "PH: " + upperName + "=" + content;
        if (this._signatureToName[signature]) {
            return this._signatureToName[signature];
        }
        var uniqueName = this._generateUniqueName(upperName);
        this._signatureToName[signature] = uniqueName;
        return uniqueName;
    };
    PlaceholderRegistry.prototype.getUniquePlaceholder = function (name) {
        return this._generateUniqueName(name.toUpperCase());
    };
    // Generate a hash for a tag - does not take attribute order into account
    PlaceholderRegistry.prototype._hashTag = function (tag, attrs, isVoid) {
        var start = "<" + tag;
        var strAttrs = Object.keys(attrs).sort().map(function (name) { return " " + name + "=" + attrs[name]; }).join('');
        var end = isVoid ? '/>' : "></" + tag + ">";
        return start + strAttrs + end;
    };
    PlaceholderRegistry.prototype._hashClosingTag = function (tag) { return this._hashTag("/" + tag, {}, false); };
    PlaceholderRegistry.prototype._generateUniqueName = function (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 base + "_" + 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(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) {
        return visitor.toI18nMessage(nodes, meaning, description, id);
    };
}
var _I18nVisitor = /** @class */ (function () {
    function _I18nVisitor(_expressionParser, _interpolationConfig) {
        this._expressionParser = _expressionParser;
        this._interpolationConfig = _interpolationConfig;
    }
    _I18nVisitor.prototype.toI18nMessage = function (nodes, meaning, description, id) {
        this._isIcu = nodes.length == 1 && nodes[0] instanceof Expansion;
        this._icuDepth = 0;
        this._placeholderRegistry = new PlaceholderRegistry();
        this._placeholderToContent = {};
        this._placeholderToMessage = {};
        var i18nodes = visitAll(this, nodes, {});
        return new Message(i18nodes, this._placeholderToContent, this._placeholderToMessage, meaning, description, id);
    };
    _I18nVisitor.prototype.visitElement = function (el, context) {
        var children = visitAll(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] = "</" + el.name + ">";
        }
        return new TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan);
    };
    _I18nVisitor.prototype.visitAttribute = function (attribute, context) {
        return this._visitTextWithInterpolation(attribute.value, attribute.sourceSpan);
    };
    _I18nVisitor.prototype.visitText = function (text, context) {
        return this._visitTextWithInterpolation(text.value, text.sourceSpan);
    };
    _I18nVisitor.prototype.visitComment = function (comment, context) { return null; };
    _I18nVisitor.prototype.visitExpansion = function (icu, context) {
        var _this = this;
        this._icuDepth++;
        var i18nIcuCases = {};
        var i18nIcu = new Icu(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(_this, {}); }), 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_" + icu.type);
            i18nIcu.expressionPlaceholder = expPh;
            this._placeholderToContent[expPh] = icu.switchValue;
            return 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], '', '', '');
        return new IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);
    };
    _I18nVisitor.prototype.visitExpansionCase = function (icuCase, context) {
        throw new Error('Unreachable code');
    };
    _I18nVisitor.prototype._visitTextWithInterpolation = function (text, sourceSpan) {
        var splitInterpolation = this._expressionParser.splitInterpolation(text, sourceSpan.start.toString(), this._interpolationConfig);
        if (!splitInterpolation) {
            // No expression, return a single text
            return new Text$2(text, sourceSpan);
        }
        // Return a group of text + expressions
        var nodes = [];
        var container = new Container(nodes, sourceSpan);
        var _a = this._interpolationConfig, sDelimiter = _a.start, eDelimiter = _a.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$2(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$2(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
 */
/**
 * An i18n error.
 */
var I18nError = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(I18nError, _super);
    function I18nError(span, msg) {
        return _super.call(this, span, msg) || this;
    }
    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(implicitTags, implicitAttrs);
    return visitor.extract(nodes, interpolationConfig);
}
function mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {
    var visitor = new _Visitor(implicitTags, implicitAttrs);
    return visitor.merge(nodes, translations, interpolationConfig);
}
var ExtractionResult = /** @class */ (function () {
    function ExtractionResult(messages, errors) {
        this.messages = messages;
        this.errors = errors;
    }
    return ExtractionResult;
}());
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 = /** @class */ (function () {
    function _Visitor(_implicitTags, _implicitAttrs) {
        this._implicitTags = _implicitTags;
        this._implicitAttrs = _implicitAttrs;
    }
    /**
     * Extracts the messages from the tree
     */
    _Visitor.prototype.extract = function (nodes, interpolationConfig) {
        var _this = this;
        this._init(_VisitorMode.Extract, interpolationConfig);
        nodes.forEach(function (node) { return node.visit(_this, 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
     */
    _Visitor.prototype.merge = function (nodes, translations, interpolationConfig) {
        this._init(_VisitorMode.Merge, interpolationConfig);
        this._translations = translations;
        // Construct a single fake root element
        var wrapper = new Element('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);
    };
    _Visitor.prototype.visitExpansionCase = function (icuCase, context) {
        // Parse cases for translatable html attributes
        var expression = visitAll(this, icuCase.expression, context);
        if (this._mode === _VisitorMode.Merge) {
            return new ExpansionCase(icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan, icuCase.expSourceSpan);
        }
    };
    _Visitor.prototype.visitExpansion = function (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(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;
    };
    _Visitor.prototype.visitComment = function (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 ? ", " + 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 (" + comment.sourceSpan.start + 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(this, nodes);
                    }
                    else {
                        this._reportError(comment, 'I18N blocks should not cross element boundaries');
                        return;
                    }
                }
            }
        }
    };
    _Visitor.prototype.visitText = function (text, context) {
        if (this._isInTranslatableSection) {
            this._mayBeAddBlockChildren(text);
        }
        return text;
    };
    _Visitor.prototype.visitElement = function (el, context) {
        var _this = 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(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(this, el.children);
            }
        }
        if (this._mode === _VisitorMode.Merge) {
            var visitNodes = translatedChildNodes || el.children;
            visitNodes.forEach(function (child) {
                var visited = child.visit(_this, context);
                if (visited && !_this._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(el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);
        }
        return null;
    };
    _Visitor.prototype.visitAttribute = function (attribute, context) {
        throw new Error('unreachable code');
    };
    _Visitor.prototype._init = function (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
    _Visitor.prototype._visitAttributesOf = function (el) {
        var _this = 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) {
                _this._addMessage([attr], explicitAttrNameToValue[attr.name]);
            }
            else if (implicitAttrNames.some(function (name) { return attr.name === name; })) {
                _this._addMessage([attr]);
            }
        });
    };
    // add a translatable message
    _Visitor.prototype._addMessage = function (ast, msgMeta) {
        if (ast.length == 0 ||
            ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {
            // Do not create empty messages
            return null;
        }
        var _a = _parseMessageMeta(msgMeta), meaning = _a.meaning, description = _a.description, id = _a.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 [])
    _Visitor.prototype._translateMessage = function (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=\"" + this._translations.digest(message) + "\"");
        }
        return [];
    };
    // translate the attributes of an element and remove i18n specific attributes
    _Visitor.prototype._translateAttributes = function (el) {
        var _this = 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 _a = i18nParsedMessageMeta[attr.name], meaning = _a.meaning, description = _a.description, id = _a.id;
                var message = _this._createI18nMessage([attr], meaning, description, id);
                var nodes = _this._translations.get(message);
                if (nodes) {
                    if (nodes.length == 0) {
                        translatedAttributes.push(new Attribute(attr.name, '', attr.sourceSpan));
                    }
                    else if (nodes[0] instanceof Text) {
                        var value = nodes[0].value;
                        translatedAttributes.push(new Attribute(attr.name, value, attr.sourceSpan));
                    }
                    else {
                        _this._reportError(el, "Unexpected translation for attribute \"" + attr.name + "\" (id=\"" + (id || _this._translations.digest(message)) + "\")");
                    }
                }
                else {
                    _this._reportError(el, "Translation unavailable for attribute \"" + attr.name + "\" (id=\"" + (id || _this._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
     */
    _Visitor.prototype._mayBeAddBlockChildren = function (node) {
        if (this._inI18nBlock && !this._inIcu && this._depth == this._blockStartDepth) {
            this._blockChildren.push(node);
        }
    };
    /**
     * Marks the start of a section, see `_closeTranslatableSection`
     */
    _Visitor.prototype._openTranslatableSection = function (node) {
        if (this._isInTranslatableSection) {
            this._reportError(node, 'Unexpected section start');
        }
        else {
            this._msgCountAtSectionStart = this._messages.length;
        }
    };
    Object.defineProperty(_Visitor.prototype, "_isInTranslatableSection", {
        /**
         * A translatable section could be:
         * - the content of translatable element,
         * - nodes between `<!-- i18n -->` and `<!-- /i18n -->` comments
         */
        get: function () {
            return this._msgCountAtSectionStart !== void 0;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * 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)
     */
    _Visitor.prototype._closeTranslatableSection = function (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$2)) {
                    this._messages.splice(i, 1);
                    break;
                }
            }
        }
        this._msgCountAtSectionStart = undefined;
    };
    _Visitor.prototype._reportError = function (node, msg) {
        this._errors.push(new I18nError(node.sourceSpan, msg));
    };
    return _Visitor;
}());
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 _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])((idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''], 2), meaningAndDesc = _a[0], id = _a[1];
    var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])((descIndex > -1) ?
        [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :
        ['', meaningAndDesc], 2), meaning = _b[0], description = _b[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 = /** @class */ (function () {
    function XmlTagDefinition() {
        this.closedByParent = false;
        this.contentType = TagContentType.PARSABLE_DATA;
        this.isVoid = false;
        this.ignoreFirstLf = false;
        this.canSelfClose = true;
    }
    XmlTagDefinition.prototype.requireExtraParent = function (currentParent) { return false; };
    XmlTagDefinition.prototype.isClosedByChild = function (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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(XmlParser, _super);
    function XmlParser() {
        return _super.call(this, getXmlTagDefinition) || this;
    }
    XmlParser.prototype.parse = function (source, url, parseExpansionForms) {
        if (parseExpansionForms === void 0) { parseExpansionForms = false; }
        return _super.prototype.parse.call(this, source, url, parseExpansionForms);
    };
    return XmlParser;
}(Parser$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 Serializer = /** @class */ (function () {
    function Serializer() {
    }
    // Creates a name mapper, see `PlaceholderMapper`
    // Returning `null` means that no name mapping is used.
    Serializer.prototype.createNameMapper = function (message) { return null; };
    return Serializer;
}());
/**
 * A simple mapper that take a function to transform an internal name to a public name
 */
var SimplePlaceholderMapper = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SimplePlaceholderMapper, _super);
    // create a mapping from the message
    function SimplePlaceholderMapper(message, mapName) {
        var _this = _super.call(this) || this;
        _this.mapName = mapName;
        _this.internalToPublic = {};
        _this.publicToNextId = {};
        _this.publicToInternal = {};
        message.nodes.forEach(function (node) { return node.visit(_this); });
        return _this;
    }
    SimplePlaceholderMapper.prototype.toPublicName = function (internalName) {
        return this.internalToPublic.hasOwnProperty(internalName) ?
            this.internalToPublic[internalName] :
            null;
    };
    SimplePlaceholderMapper.prototype.toInternalName = function (publicName) {
        return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] :
            null;
    };
    SimplePlaceholderMapper.prototype.visitText = function (text, context) { return null; };
    SimplePlaceholderMapper.prototype.visitTagPlaceholder = function (ph, context) {
        this.visitPlaceholderName(ph.startName);
        _super.prototype.visitTagPlaceholder.call(this, ph, context);
        this.visitPlaceholderName(ph.closeName);
    };
    SimplePlaceholderMapper.prototype.visitPlaceholder = function (ph, context) { this.visitPlaceholderName(ph.name); };
    SimplePlaceholderMapper.prototype.visitIcuPlaceholder = function (ph, context) {
        this.visitPlaceholderName(ph.name);
    };
    // XMB placeholders could only contains A-Z, 0-9 and _
    SimplePlaceholderMapper.prototype.visitPlaceholderName = function (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 = publicName + "_" + 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$1 = /** @class */ (function () {
    function _Visitor() {
    }
    _Visitor.prototype.visitTag = function (tag) {
        var _this = this;
        var strAttrs = this._serializeAttributes(tag.attrs);
        if (tag.children.length == 0) {
            return "<" + tag.name + strAttrs + "/>";
        }
        var strChildren = tag.children.map(function (node) { return node.visit(_this); });
        return "<" + tag.name + strAttrs + ">" + strChildren.join('') + "</" + tag.name + ">";
    };
    _Visitor.prototype.visitText = function (text) { return text.value; };
    _Visitor.prototype.visitDeclaration = function (decl) {
        return "<?xml" + this._serializeAttributes(decl.attrs) + " ?>";
    };
    _Visitor.prototype._serializeAttributes = function (attrs) {
        var strAttrs = Object.keys(attrs).map(function (name) { return name + "=\"" + attrs[name] + "\""; }).join(' ');
        return strAttrs.length > 0 ? ' ' + strAttrs : '';
    };
    _Visitor.prototype.visitDoctype = function (doctype) {
        return "<!DOCTYPE " + doctype.rootTag + " [\n" + doctype.dtd + "\n]>";
    };
    return _Visitor;
}());
var _visitor = new _Visitor$1();
function serialize(nodes) {
    return nodes.map(function (node) { return node.visit(_visitor); }).join('');
}
var Declaration = /** @class */ (function () {
    function Declaration(unescapedAttrs) {
        var _this = this;
        this.attrs = {};
        Object.keys(unescapedAttrs).forEach(function (k) {
            _this.attrs[k] = escapeXml(unescapedAttrs[k]);
        });
    }
    Declaration.prototype.visit = function (visitor) { return visitor.visitDeclaration(this); };
    return Declaration;
}());
var Doctype = /** @class */ (function () {
    function Doctype(rootTag, dtd) {
        this.rootTag = rootTag;
        this.dtd = dtd;
    }
    Doctype.prototype.visit = function (visitor) { return visitor.visitDoctype(this); };
    return Doctype;
}());
var Tag = /** @class */ (function () {
    function Tag(name, unescapedAttrs, children) {
        if (unescapedAttrs === void 0) { unescapedAttrs = {}; }
        if (children === void 0) { children = []; }
        var _this = this;
        this.name = name;
        this.children = children;
        this.attrs = {};
        Object.keys(unescapedAttrs).forEach(function (k) {
            _this.attrs[k] = escapeXml(unescapedAttrs[k]);
        });
    }
    Tag.prototype.visit = function (visitor) { return visitor.visitTag(this); };
    return Tag;
}());
var Text$3 = /** @class */ (function () {
    function Text(unescapedValue) {
        this.value = escapeXml(unescapedValue);
    }
    Text.prototype.visit = function (visitor) { return visitor.visitText(this); };
    return Text;
}());
var CR = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CR, _super);
    function CR(ws) {
        if (ws === void 0) { ws = 0; }
        return _super.call(this, "\n" + new Array(ws + 1).join(' ')) || this;
    }
    return CR;
}(Text$3));
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 _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 = 'x';
var _MARKER_TAG = 'mrk';
var _FILE_TAG = 'file';
var _SOURCE_TAG = 'source';
var _SEGMENT_SOURCE_TAG = 'seg-source';
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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Xliff, _super);
    function Xliff() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Xliff.prototype.write = function (messages, locale) {
        var visitor = new _WriteVisitor();
        var transUnits = [];
        messages.forEach(function (message) {
            var _a;
            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$3(source.filePath)]), new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'linenumber' }, [new Text$3("" + source.startLine)]), new CR(8));
                contextTags.push(new CR(8), contextGroupTag);
            });
            var transUnit = new Tag(_UNIT_TAG, { id: message.id, datatype: 'html' });
            (_a = transUnit.children).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new CR(8), new Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes))], contextTags));
            if (message.description) {
                transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'description' }, [new Text$3(message.description)]));
            }
            if (message.meaning) {
                transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'meaning' }, [new Text$3(message.meaning)]));
            }
            transUnit.children.push(new CR(6));
            transUnits.push(new CR(6), transUnit);
        });
        var body = new Tag('body', {}, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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()
        ]);
    };
    Xliff.prototype.load = function (content, url) {
        // xliff to xml nodes
        var xliffParser = new XliffParser();
        var _a = xliffParser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;
        // xml nodes to i18n nodes
        var i18nNodesByMsgId = {};
        var converter = new XmlToI18n();
        Object.keys(msgIdToHtml).forEach(function (msgId) {
            var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, e = _a.errors;
            errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(e));
            i18nNodesByMsgId[msgId] = i18nNodes;
        });
        if (errors.length) {
            throw new Error("xliff parse errors:\n" + errors.join('\n'));
        }
        return { locale: locale, i18nNodesByMsgId: i18nNodesByMsgId };
    };
    Xliff.prototype.digest = function (message) { return digest(message); };
    return Xliff;
}(Serializer));
var _WriteVisitor = /** @class */ (function () {
    function _WriteVisitor() {
    }
    _WriteVisitor.prototype.visitText = function (text, context) { return [new Text$3(text.value)]; };
    _WriteVisitor.prototype.visitContainer = function (container, context) {
        var _this = this;
        var nodes = [];
        container.children.forEach(function (node) { return nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(node.visit(_this))); });
        return nodes;
    };
    _WriteVisitor.prototype.visitIcu = function (icu, context) {
        var _this = this;
        var nodes = [new Text$3("{" + icu.expressionPlaceholder + ", " + icu.type + ", ")];
        Object.keys(icu.cases).forEach(function (c) {
            nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new Text$3(c + " {")], icu.cases[c].visit(_this), [new Text$3("} ")]));
        });
        nodes.push(new Text$3("}"));
        return nodes;
    };
    _WriteVisitor.prototype.visitTagPlaceholder = function (ph, context) {
        var ctype = getCtypeForTag(ph.tag);
        if (ph.isVoid) {
            // void tags have no children nor closing tags
            return [new Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype, 'equiv-text': "<" + ph.tag + "/>" })];
        }
        var startTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype, 'equiv-text': "<" + ph.tag + ">" });
        var closeTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.closeName, ctype: ctype, 'equiv-text': "</" + ph.tag + ">" });
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([startTagPh], this.serialize(ph.children), [closeTagPh]);
    };
    _WriteVisitor.prototype.visitPlaceholder = function (ph, context) {
        return [new Tag(_PLACEHOLDER_TAG, { id: ph.name, 'equiv-text': "{{" + ph.value + "}}" })];
    };
    _WriteVisitor.prototype.visitIcuPlaceholder = function (ph, context) {
        var equivText = "{" + ph.value.expression + ", " + ph.value.type + ", " + Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ') + "}";
        return [new Tag(_PLACEHOLDER_TAG, { id: ph.name, 'equiv-text': equivText })];
    };
    _WriteVisitor.prototype.serialize = function (nodes) {
        var _this = this;
        return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(nodes.map(function (node) { return node.visit(_this); })));
    };
    return _WriteVisitor;
}());
// TODO(vicb): add error management (structure)
// Extract messages as xml nodes from the xliff file
var XliffParser = /** @class */ (function () {
    function XliffParser() {
        this._locale = null;
    }
    XliffParser.prototype.parse = function (xliff, url) {
        this._unitMlString = null;
        this._msgIdToHtml = {};
        var xml = new XmlParser().parse(xliff, url, false);
        this._errors = xml.errors;
        visitAll(this, xml.rootNodes, null);
        return {
            msgIdToHtml: this._msgIdToHtml,
            errors: this._errors,
            locale: this._locale,
        };
    };
    XliffParser.prototype.visitElement = function (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, "<" + _UNIT_TAG + "> misses the \"id\" attribute");
                }
                else {
                    var id = idAttr.value;
                    if (this._msgIdToHtml.hasOwnProperty(id)) {
                        this._addError(element, "Duplicated translations for msg " + id);
                    }
                    else {
                        visitAll(this, element.children, null);
                        if (typeof this._unitMlString === 'string') {
                            this._msgIdToHtml[id] = this._unitMlString;
                        }
                        else {
                            this._addError(element, "Message " + id + " misses a translation");
                        }
                    }
                }
                break;
            // ignore those tags
            case _SOURCE_TAG:
            case _SEGMENT_SOURCE_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(this, element.children, null);
                break;
            default:
                // TODO(vicb): assert file structure, xliff version
                // For now only recurse on unhandled nodes
                visitAll(this, element.children, null);
        }
    };
    XliffParser.prototype.visitAttribute = function (attribute, context) { };
    XliffParser.prototype.visitText = function (text, context) { };
    XliffParser.prototype.visitComment = function (comment, context) { };
    XliffParser.prototype.visitExpansion = function (expansion, context) { };
    XliffParser.prototype.visitExpansionCase = function (expansionCase, context) { };
    XliffParser.prototype._addError = function (node, message) {
        this._errors.push(new I18nError(node.sourceSpan, message));
    };
    return XliffParser;
}());
// Convert ml nodes (xliff syntax) to i18n nodes
var XmlToI18n = /** @class */ (function () {
    function XmlToI18n() {
    }
    XmlToI18n.prototype.convert = function (message, url) {
        var xmlIcu = new XmlParser().parse(message, url, true);
        this._errors = xmlIcu.errors;
        var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?
            [] : [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, xmlIcu.rootNodes)));
        return {
            i18nNodes: i18nNodes,
            errors: this._errors,
        };
    };
    XmlToI18n.prototype.visitText = function (text, context) { return new Text$2(text.value, text.sourceSpan); };
    XmlToI18n.prototype.visitElement = function (el, context) {
        if (el.name === _PLACEHOLDER_TAG) {
            var nameAttr = el.attrs.find(function (attr) { return attr.name === 'id'; });
            if (nameAttr) {
                return new Placeholder('', nameAttr.value, el.sourceSpan);
            }
            this._addError(el, "<" + _PLACEHOLDER_TAG + "> misses the \"id\" attribute");
            return null;
        }
        if (el.name === _MARKER_TAG) {
            return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, el.children)));
        }
        this._addError(el, "Unexpected tag");
        return null;
    };
    XmlToI18n.prototype.visitExpansion = function (icu, context) {
        var caseMap = {};
        visitAll(this, icu.cases).forEach(function (c) {
            caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);
        });
        return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);
    };
    XmlToI18n.prototype.visitExpansionCase = function (icuCase, context) {
        return {
            value: icuCase.value,
            nodes: visitAll(this, icuCase.expression),
        };
    };
    XmlToI18n.prototype.visitComment = function (comment, context) { };
    XmlToI18n.prototype.visitAttribute = function (attribute, context) { };
    XmlToI18n.prototype._addError = function (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-" + 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$1 = 'ph';
var _PLACEHOLDER_SPANNING_TAG = 'pc';
var _MARKER_TAG$1 = 'mrk';
var _XLIFF_TAG = 'xliff';
var _SOURCE_TAG$1 = '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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Xliff2, _super);
    function Xliff2() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Xliff2.prototype.write = function (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$3(message.description)]));
                }
                if (message.meaning) {
                    notes.children.push(new CR(8), new Tag('note', { category: 'meaning' }, [new Text$3(message.meaning)]));
                }
            }
            message.sources.forEach(function (source) {
                notes.children.push(new CR(8), new Tag('note', { category: 'location' }, [
                    new Text$3(source.filePath + ":" + source.startLine + (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$1, {}, 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' }, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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()
        ]);
    };
    Xliff2.prototype.load = function (content, url) {
        // xliff to xml nodes
        var xliff2Parser = new Xliff2Parser();
        var _a = xliff2Parser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;
        // xml nodes to i18n nodes
        var i18nNodesByMsgId = {};
        var converter = new XmlToI18n$1();
        Object.keys(msgIdToHtml).forEach(function (msgId) {
            var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, e = _a.errors;
            errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(e));
            i18nNodesByMsgId[msgId] = i18nNodes;
        });
        if (errors.length) {
            throw new Error("xliff2 parse errors:\n" + errors.join('\n'));
        }
        return { locale: locale, i18nNodesByMsgId: i18nNodesByMsgId };
    };
    Xliff2.prototype.digest = function (message) { return decimalDigest(message); };
    return Xliff2;
}(Serializer));
var _WriteVisitor$1 = /** @class */ (function () {
    function _WriteVisitor() {
    }
    _WriteVisitor.prototype.visitText = function (text, context) { return [new Text$3(text.value)]; };
    _WriteVisitor.prototype.visitContainer = function (container, context) {
        var _this = this;
        var nodes = [];
        container.children.forEach(function (node) { return nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(node.visit(_this))); });
        return nodes;
    };
    _WriteVisitor.prototype.visitIcu = function (icu, context) {
        var _this = this;
        var nodes = [new Text$3("{" + icu.expressionPlaceholder + ", " + icu.type + ", ")];
        Object.keys(icu.cases).forEach(function (c) {
            nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new Text$3(c + " {")], icu.cases[c].visit(_this), [new Text$3("} ")]));
        });
        nodes.push(new Text$3("}"));
        return nodes;
    };
    _WriteVisitor.prototype.visitTagPlaceholder = function (ph, context) {
        var _this = this;
        var type = getTypeForTag(ph.tag);
        if (ph.isVoid) {
            var tagPh = new Tag(_PLACEHOLDER_TAG$1, {
                id: (this._nextPlaceholderId++).toString(),
                equiv: ph.startName,
                type: type,
                disp: "<" + ph.tag + "/>",
            });
            return [tagPh];
        }
        var tagPc = new Tag(_PLACEHOLDER_SPANNING_TAG, {
            id: (this._nextPlaceholderId++).toString(),
            equivStart: ph.startName,
            equivEnd: ph.closeName,
            type: type,
            dispStart: "<" + ph.tag + ">",
            dispEnd: "</" + ph.tag + ">",
        });
        var nodes = [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ph.children.map(function (node) { return node.visit(_this); })));
        if (nodes.length) {
            nodes.forEach(function (node) { return tagPc.children.push(node); });
        }
        else {
            tagPc.children.push(new Text$3(''));
        }
        return [tagPc];
    };
    _WriteVisitor.prototype.visitPlaceholder = function (ph, context) {
        var idStr = (this._nextPlaceholderId++).toString();
        return [new Tag(_PLACEHOLDER_TAG$1, {
                id: idStr,
                equiv: ph.name,
                disp: "{{" + ph.value + "}}",
            })];
    };
    _WriteVisitor.prototype.visitIcuPlaceholder = function (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$1, { id: idStr, equiv: ph.name, disp: "{" + ph.value.expression + ", " + ph.value.type + ", " + cases + "}" })];
    };
    _WriteVisitor.prototype.serialize = function (nodes) {
        var _this = this;
        this._nextPlaceholderId = 0;
        return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(nodes.map(function (node) { return node.visit(_this); })));
    };
    return _WriteVisitor;
}());
// Extract messages as xml nodes from the xliff file
var Xliff2Parser = /** @class */ (function () {
    function Xliff2Parser() {
        this._locale = null;
    }
    Xliff2Parser.prototype.parse = function (xliff, url) {
        this._unitMlString = null;
        this._msgIdToHtml = {};
        var xml = new XmlParser().parse(xliff, url, false);
        this._errors = xml.errors;
        visitAll(this, xml.rootNodes, null);
        return {
            msgIdToHtml: this._msgIdToHtml,
            errors: this._errors,
            locale: this._locale,
        };
    };
    Xliff2Parser.prototype.visitElement = function (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, "<" + _UNIT_TAG$1 + "> misses the \"id\" attribute");
                }
                else {
                    var id = idAttr.value;
                    if (this._msgIdToHtml.hasOwnProperty(id)) {
                        this._addError(element, "Duplicated translations for msg " + id);
                    }
                    else {
                        visitAll(this, element.children, null);
                        if (typeof this._unitMlString === 'string') {
                            this._msgIdToHtml[id] = this._unitMlString;
                        }
                        else {
                            this._addError(element, "Message " + id + " misses a translation");
                        }
                    }
                }
                break;
            case _SOURCE_TAG$1:
                // 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 " + version + " is not compatible with XLIFF 2.0 serializer");
                    }
                    else {
                        visitAll(this, element.children, null);
                    }
                }
                break;
            default:
                visitAll(this, element.children, null);
        }
    };
    Xliff2Parser.prototype.visitAttribute = function (attribute, context) { };
    Xliff2Parser.prototype.visitText = function (text, context) { };
    Xliff2Parser.prototype.visitComment = function (comment, context) { };
    Xliff2Parser.prototype.visitExpansion = function (expansion, context) { };
    Xliff2Parser.prototype.visitExpansionCase = function (expansionCase, context) { };
    Xliff2Parser.prototype._addError = function (node, message) {
        this._errors.push(new I18nError(node.sourceSpan, message));
    };
    return Xliff2Parser;
}());
// Convert ml nodes (xliff syntax) to i18n nodes
var XmlToI18n$1 = /** @class */ (function () {
    function XmlToI18n() {
    }
    XmlToI18n.prototype.convert = function (message, url) {
        var xmlIcu = new XmlParser().parse(message, url, true);
        this._errors = xmlIcu.errors;
        var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?
            [] : [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, xmlIcu.rootNodes)));
        return {
            i18nNodes: i18nNodes,
            errors: this._errors,
        };
    };
    XmlToI18n.prototype.visitText = function (text, context) { return new Text$2(text.value, text.sourceSpan); };
    XmlToI18n.prototype.visitElement = function (el, context) {
        var _this = this;
        switch (el.name) {
            case _PLACEHOLDER_TAG$1:
                var nameAttr = el.attrs.find(function (attr) { return attr.name === 'equiv'; });
                if (nameAttr) {
                    return [new Placeholder('', nameAttr.value, el.sourceSpan)];
                }
                this._addError(el, "<" + _PLACEHOLDER_TAG$1 + "> 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, "<" + _PLACEHOLDER_TAG$1 + "> misses the \"equivStart\" attribute");
                }
                else if (!endAttr) {
                    this._addError(el, "<" + _PLACEHOLDER_TAG$1 + "> misses the \"equivEnd\" attribute");
                }
                else {
                    var startId = startAttr.value;
                    var endId = endAttr.value;
                    var nodes = [];
                    return nodes.concat.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new Placeholder('', startId, el.sourceSpan)], el.children.map(function (node) { return node.visit(_this, null); }), [new Placeholder('', endId, el.sourceSpan)]));
                }
                break;
            case _MARKER_TAG$1:
                return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, el.children)));
            default:
                this._addError(el, "Unexpected tag");
        }
        return null;
    };
    XmlToI18n.prototype.visitExpansion = function (icu, context) {
        var caseMap = {};
        visitAll(this, icu.cases).forEach(function (c) {
            caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);
        });
        return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);
    };
    XmlToI18n.prototype.visitExpansionCase = function (icuCase, context) {
        return {
            value: icuCase.value,
            nodes: [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, icuCase.expression))),
        };
    };
    XmlToI18n.prototype.visitComment = function (comment, context) { };
    XmlToI18n.prototype.visitAttribute = function (attribute, context) { };
    XmlToI18n.prototype._addError = function (node, message) {
        this._errors.push(new I18nError(node.sourceSpan, message));
    };
    return XmlToI18n;
}());
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 _MESSAGES_TAG = 'messagebundle';
var _MESSAGE_TAG = 'msg';
var _PLACEHOLDER_TAG$2 = 'ph';
var _EXAMPLE_TAG = 'ex';
var _SOURCE_TAG$2 = '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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Xmb, _super);
    function Xmb() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Xmb.prototype.write = function (messages, locale) {
        var exampleVisitor = new ExampleVisitor();
        var visitor = new _Visitor$2();
        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$2, {}, [
                    new Text$3(source.filePath + ":" + source.startLine + (source.endLine !== source.startLine ? ',' + source.endLine : ''))
                ]));
            });
            rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(sourceTags, 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(),
        ]);
    };
    Xmb.prototype.load = function (content, url) {
        throw new Error('Unsupported');
    };
    Xmb.prototype.digest = function (message) { return digest$1(message); };
    Xmb.prototype.createNameMapper = function (message) {
        return new SimplePlaceholderMapper(message, toPublicName);
    };
    return Xmb;
}(Serializer));
var _Visitor$2 = /** @class */ (function () {
    function _Visitor() {
    }
    _Visitor.prototype.visitText = function (text, context) { return [new Text$3(text.value)]; };
    _Visitor.prototype.visitContainer = function (container, context) {
        var _this = this;
        var nodes = [];
        container.children.forEach(function (node) { return nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(node.visit(_this))); });
        return nodes;
    };
    _Visitor.prototype.visitIcu = function (icu, context) {
        var _this = this;
        var nodes = [new Text$3("{" + icu.expressionPlaceholder + ", " + icu.type + ", ")];
        Object.keys(icu.cases).forEach(function (c) {
            nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new Text$3(c + " {")], icu.cases[c].visit(_this), [new Text$3("} ")]));
        });
        nodes.push(new Text$3("}"));
        return nodes;
    };
    _Visitor.prototype.visitTagPlaceholder = function (ph, context) {
        var startTagAsText = new Text$3("<" + 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$2, { name: ph.startName }, [startEx, startTagAsText]);
        if (ph.isVoid) {
            // void tags have no children nor closing tags
            return [startTagPh];
        }
        var closeTagAsText = new Text$3("</" + 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$2, { name: ph.closeName }, [closeEx, closeTagAsText]);
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([startTagPh], this.serialize(ph.children), [closeTagPh]);
    };
    _Visitor.prototype.visitPlaceholder = function (ph, context) {
        var interpolationAsText = new Text$3("{{" + 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$2, { name: ph.name }, [exTag, interpolationAsText])
        ];
    };
    _Visitor.prototype.visitIcuPlaceholder = function (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$3("{" + icuExpression + ", " + icuType + ", " + 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$2, { name: ph.name }, [exTag, icuAsText])
        ];
    };
    _Visitor.prototype.serialize = function (nodes) {
        var _this = this;
        return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(nodes.map(function (node) { return node.visit(_this); })));
    };
    return _Visitor;
}());
function digest$1(message) {
    return decimalDigest(message);
}
// TC requires at least one non-empty example on placeholders
var ExampleVisitor = /** @class */ (function () {
    function ExampleVisitor() {
    }
    ExampleVisitor.prototype.addDefaultExamples = function (node) {
        node.visit(this);
        return node;
    };
    ExampleVisitor.prototype.visitTag = function (tag) {
        var _this = this;
        if (tag.name === _PLACEHOLDER_TAG$2) {
            if (!tag.children || tag.children.length == 0) {
                var exText = new Text$3(tag.attrs['name'] || '...');
                tag.children = [new Tag(_EXAMPLE_TAG, {}, [exText])];
            }
        }
        else if (tag.children) {
            tag.children.forEach(function (node) { return node.visit(_this); });
        }
    };
    ExampleVisitor.prototype.visitText = function (text) { };
    ExampleVisitor.prototype.visitDeclaration = function (decl) { };
    ExampleVisitor.prototype.visitDoctype = function (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
 */
var _TRANSLATIONS_TAG = 'translationbundle';
var _TRANSLATION_TAG = 'translation';
var _PLACEHOLDER_TAG$3 = 'ph';
var Xtb = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Xtb, _super);
    function Xtb() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Xtb.prototype.write = function (messages, locale) { throw new Error('Unsupported'); };
    Xtb.prototype.load = function (content, url) {
        // xtb to xml nodes
        var xtbParser = new XtbParser();
        var _a = xtbParser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.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 () {
                var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, errors = _a.errors;
                if (errors.length) {
                    throw new Error("xtb parse errors:\n" + errors.join('\n'));
                }
                return i18nNodes;
            };
            createLazyProperty(i18nNodesByMsgId, msgId, valueFn);
        });
        if (errors.length) {
            throw new Error("xtb parse errors:\n" + errors.join('\n'));
        }
        return { locale: locale, i18nNodesByMsgId: i18nNodesByMsgId };
    };
    Xtb.prototype.digest = function (message) { return digest$1(message); };
    Xtb.prototype.createNameMapper = function (message) {
        return new SimplePlaceholderMapper(message, toPublicName);
    };
    return Xtb;
}(Serializer));
function createLazyProperty(messages, id, valueFn) {
    Object.defineProperty(messages, id, {
        configurable: true,
        enumerable: true,
        get: function () {
            var value = valueFn();
            Object.defineProperty(messages, id, { enumerable: true, value: value });
            return value;
        },
        set: function (_) { throw new Error('Could not overwrite an XTB translation'); },
    });
}
// Extract messages as xml nodes from the xtb file
var XtbParser = /** @class */ (function () {
    function XtbParser() {
        this._locale = null;
    }
    XtbParser.prototype.parse = function (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, false);
        this._errors = xml.errors;
        visitAll(this, xml.rootNodes);
        return {
            msgIdToHtml: this._msgIdToHtml,
            errors: this._errors,
            locale: this._locale,
        };
    };
    XtbParser.prototype.visitElement = function (element, context) {
        switch (element.name) {
            case _TRANSLATIONS_TAG:
                this._bundleDepth++;
                if (this._bundleDepth > 1) {
                    this._addError(element, "<" + _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(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, "<" + _TRANSLATION_TAG + "> misses the \"id\" attribute");
                }
                else {
                    var id = idAttr.value;
                    if (this._msgIdToHtml.hasOwnProperty(id)) {
                        this._addError(element, "Duplicated translations for msg " + 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');
        }
    };
    XtbParser.prototype.visitAttribute = function (attribute, context) { };
    XtbParser.prototype.visitText = function (text, context) { };
    XtbParser.prototype.visitComment = function (comment, context) { };
    XtbParser.prototype.visitExpansion = function (expansion, context) { };
    XtbParser.prototype.visitExpansionCase = function (expansionCase, context) { };
    XtbParser.prototype._addError = function (node, message) {
        this._errors.push(new I18nError(node.sourceSpan, message));
    };
    return XtbParser;
}());
// Convert ml nodes (xtb syntax) to i18n nodes
var XmlToI18n$2 = /** @class */ (function () {
    function XmlToI18n() {
    }
    XmlToI18n.prototype.convert = function (message, url) {
        var xmlIcu = new XmlParser().parse(message, url, true);
        this._errors = xmlIcu.errors;
        var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?
            [] :
            visitAll(this, xmlIcu.rootNodes);
        return {
            i18nNodes: i18nNodes,
            errors: this._errors,
        };
    };
    XmlToI18n.prototype.visitText = function (text, context) { return new Text$2(text.value, text.sourceSpan); };
    XmlToI18n.prototype.visitExpansion = function (icu, context) {
        var caseMap = {};
        visitAll(this, icu.cases).forEach(function (c) {
            caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);
        });
        return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);
    };
    XmlToI18n.prototype.visitExpansionCase = function (icuCase, context) {
        return {
            value: icuCase.value,
            nodes: visitAll(this, icuCase.expression),
        };
    };
    XmlToI18n.prototype.visitElement = function (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, "<" + _PLACEHOLDER_TAG$3 + "> misses the \"name\" attribute");
        }
        else {
            this._addError(el, "Unexpected tag");
        }
        return null;
    };
    XmlToI18n.prototype.visitComment = function (comment, context) { };
    XmlToI18n.prototype.visitAttribute = function (attribute, context) { };
    XmlToI18n.prototype._addError = function (node, message) {
        this._errors.push(new I18nError(node.sourceSpan, message));
    };
    return XmlToI18n;
}());

/**
 * @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 = /** @class */ (function () {
    function TranslationBundle(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console) {
        if (_i18nNodesByMsgId === void 0) { _i18nNodesByMsgId = {}; }
        if (missingTranslationStrategy === void 0) { missingTranslationStrategy = MissingTranslationStrategy.Warning; }
        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`.
    TranslationBundle.load = function (content, url, serializer, missingTranslationStrategy, console) {
        var _a = serializer.load(content, url), locale = _a.locale, i18nNodesByMsgId = _a.i18nNodesByMsgId;
        var digestFn = function (m) { return serializer.digest(m); };
        var mapperFactory = function (m) { return serializer.createNameMapper(m); };
        return new TranslationBundle(i18nNodesByMsgId, locale, digestFn, mapperFactory, missingTranslationStrategy, console);
    };
    // Returns the translation as HTML nodes from the given source message.
    TranslationBundle.prototype.get = function (srcMsg) {
        var html = this._i18nToHtml.convert(srcMsg);
        if (html.errors.length) {
            throw new Error(html.errors.join('\n'));
        }
        return html.nodes;
    };
    TranslationBundle.prototype.has = function (srcMsg) { return this.digest(srcMsg) in this._i18nNodesByMsgId; };
    return TranslationBundle;
}());
var I18nToHtmlVisitor = /** @class */ (function () {
    function I18nToHtmlVisitor(_i18nNodesByMsgId, _locale, _digest, _mapperFactory, _missingTranslationStrategy, _console) {
        if (_i18nNodesByMsgId === void 0) { _i18nNodesByMsgId = {}; }
        this._i18nNodesByMsgId = _i18nNodesByMsgId;
        this._locale = _locale;
        this._digest = _digest;
        this._mapperFactory = _mapperFactory;
        this._missingTranslationStrategy = _missingTranslationStrategy;
        this._console = _console;
        this._contextStack = [];
        this._errors = [];
    }
    I18nToHtmlVisitor.prototype.convert = function (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, true);
        return {
            nodes: html.rootNodes,
            errors: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._errors, html.errors),
        };
    };
    I18nToHtmlVisitor.prototype.visitText = function (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);
    };
    I18nToHtmlVisitor.prototype.visitContainer = function (container, context) {
        var _this = this;
        return container.children.map(function (n) { return n.visit(_this); }).join('');
    };
    I18nToHtmlVisitor.prototype.visitIcu = function (icu, context) {
        var _this = this;
        var cases = Object.keys(icu.cases).map(function (k) { return k + " {" + icu.cases[k].visit(_this) + "}"; });
        // 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 "{" + exp + ", " + icu.type + ", " + cases.join(' ') + "}";
    };
    I18nToHtmlVisitor.prototype.visitPlaceholder = function (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 \"" + 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
    I18nToHtmlVisitor.prototype.visitTagPlaceholder = function (ph, context) {
        var _this = this;
        var tag = "" + ph.tag;
        var attrs = Object.keys(ph.attrs).map(function (name) { return name + "=\"" + ph.attrs[name] + "\""; }).join(' ');
        if (ph.isVoid) {
            return "<" + tag + " " + attrs + "/>";
        }
        var children = ph.children.map(function (c) { return c.visit(_this); }).join('');
        return "<" + tag + " " + attrs + ">" + children + "</" + 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
    I18nToHtmlVisitor.prototype.visitIcuPlaceholder = function (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.
     */
    I18nToHtmlVisitor.prototype._convertToText = function (srcMsg) {
        var _this = 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 \"" + this._locale + "\"" : '';
                this._addError(srcMsg.nodes[0], "Missing translation for message \"" + id + "\"" + ctx);
            }
            else if (this._console &&
                this._missingTranslationStrategy === MissingTranslationStrategy.Warning) {
                var ctx = this._locale ? " for locale \"" + this._locale + "\"" : '';
                this._console.warn("Missing translation for message \"" + id + "\"" + ctx);
            }
            nodes = srcMsg.nodes;
            this._mapper = function (name) { return name; };
        }
        var text = nodes.map(function (node) { return node.visit(_this); }).join('');
        var context = this._contextStack.pop();
        this._srcMsg = context.msg;
        this._mapper = context.mapper;
        return text;
    };
    I18nToHtmlVisitor.prototype._addError = function (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 = /** @class */ (function () {
    function I18NHtmlParser(_htmlParser, translations, translationsFormat, missingTranslation, console) {
        if (missingTranslation === void 0) { missingTranslation = MissingTranslationStrategy.Warning; }
        this._htmlParser = _htmlParser;
        if (translations) {
            var serializer = createSerializer(translationsFormat);
            this._translationBundle =
                TranslationBundle.load(translations, 'i18n', serializer, missingTranslation, console);
        }
        else {
            this._translationBundle =
                new TranslationBundle({}, null, digest, undefined, missingTranslation, console);
        }
    }
    I18NHtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
        if (parseExpansionForms === void 0) { parseExpansionForms = false; }
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
        var parseResult = this._htmlParser.parse(source, url, parseExpansionForms, interpolationConfig);
        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, type) {
    if (type === void 0) { type = null; }
    return visitValue(value, new _ValueOutputAstTransformer(ctx), type);
}
var _ValueOutputAstTransformer = /** @class */ (function () {
    function _ValueOutputAstTransformer(ctx) {
        this.ctx = ctx;
    }
    _ValueOutputAstTransformer.prototype.visitArray = function (arr, type) {
        var _this = this;
        return literalArr(arr.map(function (value) { return visitValue(value, _this, null); }), type);
    };
    _ValueOutputAstTransformer.prototype.visitStringMap = function (map, type) {
        var _this = 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], _this, null), quotedSet.has(key)));
        });
        return new LiteralMapExpr(entries, type);
    };
    _ValueOutputAstTransformer.prototype.visitPrimitive = function (value, type) { return literal(value, type); };
    _ValueOutputAstTransformer.prototype.visitOther = function (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 = /** @class */ (function () {
    function InjectableCompiler(reflector, alwaysGenerateDef) {
        this.reflector = reflector;
        this.alwaysGenerateDef = alwaysGenerateDef;
        this.tokenInjector = reflector.resolveExternalReference(Identifiers.Injector);
    }
    InjectableCompiler.prototype.depsArray = function (deps, ctx) {
        var _this = 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 === _this.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);
        });
    };
    InjectableCompiler.prototype.factoryFor = function (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');
    };
    InjectableCompiler.prototype.injectableDef = function (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)]);
    };
    InjectableCompiler.prototype.compile = function (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, forceSourceFile) {
    if (forceSourceFile === void 0) { forceSourceFile = false; }
    var urlWithSuffix = splitTypescriptSuffix(filePath, forceSourceFile);
    return urlWithSuffix[0] + ".ngfactory" + normalizeGenFileSuffix(urlWithSuffix[1]);
}
function stripGeneratedFileSuffix(filePath) {
    return filePath.replace(GENERATED_FILE, '.');
}
function isGeneratedFile(filePath) {
    return GENERATED_FILE.test(filePath);
}
function splitTypescriptSuffix(path, forceSourceFile) {
    if (forceSourceFile === void 0) { forceSourceFile = 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 fileNameWithoutSuffix + ".ngsummary.json";
}
function summaryForJitFileName(fileName, forceSourceFile) {
    if (forceSourceFile === void 0) { forceSourceFile = false; }
    var urlWithSuffix = splitTypescriptSuffix(stripGeneratedFileSuffix(fileName), forceSourceFile);
    return urlWithSuffix[0] + ".ngsummary" + urlWithSuffix[1];
}
function stripSummaryForJitFileSuffix(filePath) {
    return filePath.replace(JIT_SUMMARY_FILE, '.');
}
function summaryForJitName(symbolName) {
    return 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" + 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 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 = /** @class */ (function () {
    function CompileMetadataResolver(_config, _htmlParser, _ngModuleResolver, _directiveResolver, _pipeResolver, _summaryResolver, _schemaRegistry, _directiveNormalizer, _console, _staticSymbolCache, _reflector, _errorCollector) {
        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();
    }
    CompileMetadataResolver.prototype.getReflector = function () { return this._reflector; };
    CompileMetadataResolver.prototype.clearCacheFor = function (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);
        }
    };
    CompileMetadataResolver.prototype.clearCache = function () {
        this._directiveCache.clear();
        this._nonNormalizedDirectiveCache.clear();
        this._summaryCache.clear();
        this._pipeCache.clear();
        this._ngModuleCache.clear();
        this._ngModuleOfTypes.clear();
        this._directiveNormalizer.clearCache();
    };
    CompileMetadataResolver.prototype._createProxyClass = function (baseType, name) {
        var delegate = null;
        var proxyClass = function () {
            if (!delegate) {
                throw new Error("Illegal state: Class " + name + " for type " + 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;
    };
    CompileMetadataResolver.prototype.getGeneratedClass = function (dirType, name) {
        if (dirType instanceof StaticSymbol) {
            return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), name);
        }
        else {
            return this._createProxyClass(dirType, name);
        }
    };
    CompileMetadataResolver.prototype.getComponentViewClass = function (dirType) {
        return this.getGeneratedClass(dirType, viewClassName(dirType, 0));
    };
    CompileMetadataResolver.prototype.getHostComponentViewClass = function (dirType) {
        return this.getGeneratedClass(dirType, hostViewClassName(dirType));
    };
    CompileMetadataResolver.prototype.getHostComponentType = function (dirType) {
        var name = identifierName({ reference: dirType }) + "_Host";
        if (dirType instanceof StaticSymbol) {
            return this._staticSymbolCache.get(dirType.filePath, name);
        }
        return this._createProxyClass(dirType, name);
    };
    CompileMetadataResolver.prototype.getRendererType = function (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 {};
        }
    };
    CompileMetadataResolver.prototype.getComponentFactory = function (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, []);
        }
    };
    CompileMetadataResolver.prototype.initComponentFactory = function (factory, ngContentSelectors) {
        var _a;
        if (!(factory instanceof StaticSymbol)) {
            (_a = factory.ngContentSelectors).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ngContentSelectors));
        }
    };
    CompileMetadataResolver.prototype._loadSummary = function (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;
    };
    CompileMetadataResolver.prototype.getHostComponentMetadata = function (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
        });
    };
    CompileMetadataResolver.prototype.loadDirectiveMetadata = function (ngModuleType, directiveType, isSync) {
        var _this = this;
        if (this._directiveCache.has(directiveType)) {
            return null;
        }
        directiveType = resolveForwardRef(directiveType);
        var _a = this.getNonNormalizedDirectiveMetadata(directiveType), annotation = _a.annotation, metadata = _a.metadata;
        var createDirectiveMetadata = function (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) {
                _this.initComponentFactory(metadata.componentFactory, templateMetadata.ngContentSelectors);
            }
            _this._directiveCache.set(directiveType, normalizedDirMeta);
            _this._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;
        }
    };
    CompileMetadataResolver.prototype.getNonNormalizedDirectiveMetadata = function (directiveType) {
        var _this = 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 \"" + stringifyType(directiveType) + "\"", [], directiveType);
            }
            if (compMeta.entryComponents) {
                entryComponentMetadata = flattenAndDedupeArray(compMeta.entryComponents)
                    .map(function (type) { return _this._getEntryComponentMetadata(type); })
                    .concat(entryComponentMetadata);
            }
            if (!selector) {
                selector = this._schemaRegistry.getDefaultComponentElementName();
            }
        }
        else {
            // Directive
            if (!selector) {
                this._reportError(syntaxError("Directive " + 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 \"" + 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.
     */
    CompileMetadataResolver.prototype.getDirectiveMetadata = function (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 " + stringifyType(directiveType) + "."), directiveType);
        }
        return dirMeta;
    };
    CompileMetadataResolver.prototype.getDirectiveSummary = function (dirType) {
        var dirSummary = this._loadSummary(dirType, CompileSummaryKind.Directive);
        if (!dirSummary) {
            this._reportError(syntaxError("Illegal state: Could not load the summary for directive " + stringifyType(dirType) + "."), dirType);
        }
        return dirSummary;
    };
    CompileMetadataResolver.prototype.isDirective = function (type) {
        return !!this._loadSummary(type, CompileSummaryKind.Directive) ||
            this._directiveResolver.isDirective(type);
    };
    CompileMetadataResolver.prototype.isPipe = function (type) {
        return !!this._loadSummary(type, CompileSummaryKind.Pipe) ||
            this._pipeResolver.isPipe(type);
    };
    CompileMetadataResolver.prototype.isNgModule = function (type) {
        return !!this._loadSummary(type, CompileSummaryKind.NgModule) ||
            this._ngModuleResolver.isNgModule(type);
    };
    CompileMetadataResolver.prototype.getNgModuleSummary = function (moduleType, alreadyCollecting) {
        if (alreadyCollecting === void 0) { alreadyCollecting = 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.
     */
    CompileMetadataResolver.prototype.loadNgModuleDirectiveAndPipeMetadata = function (moduleType, isSync, throwIfNotFound) {
        var _this = this;
        if (throwIfNotFound === void 0) { throwIfNotFound = true; }
        var ngModule = this.getNgModuleMetadata(moduleType, throwIfNotFound);
        var loading = [];
        if (ngModule) {
            ngModule.declaredDirectives.forEach(function (id) {
                var promise = _this.loadDirectiveMetadata(moduleType, id.reference, isSync);
                if (promise) {
                    loading.push(promise);
                }
            });
            ngModule.declaredPipes.forEach(function (id) { return _this._loadPipeMetadata(id.reference); });
        }
        return Promise.all(loading);
    };
    CompileMetadataResolver.prototype.getShallowModuleMetadata = function (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;
    };
    CompileMetadataResolver.prototype.getNgModuleMetadata = function (moduleType, throwIfNotFound, alreadyCollecting) {
        var _this = this;
        if (throwIfNotFound === void 0) { throwIfNotFound = true; }
        if (alreadyCollecting === void 0) { alreadyCollecting = 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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this._getProvidersMetadata(moduleWithProviders.providers, entryComponents, "provider for the NgModule '" + stringifyType(importedModuleType) + "'", [], importedType)));
                    }
                }
                if (importedModuleType) {
                    if (_this._checkSelfImport(moduleType, importedModuleType))
                        return;
                    if (!alreadyCollecting)
                        alreadyCollecting = new Set();
                    if (alreadyCollecting.has(importedModuleType)) {
                        _this._reportError(syntaxError(_this._getTypeDescriptor(importedModuleType) + " '" + stringifyType(importedType) + "' is imported recursively by the module '" + stringifyType(moduleType) + "'."), moduleType);
                        return;
                    }
                    alreadyCollecting.add(importedModuleType);
                    var importedModuleSummary = _this.getNgModuleSummary(importedModuleType, alreadyCollecting);
                    alreadyCollecting.delete(importedModuleType);
                    if (!importedModuleSummary) {
                        _this._reportError(syntaxError("Unexpected " + _this._getTypeDescriptor(importedType) + " '" + stringifyType(importedType) + "' imported by the module '" + stringifyType(moduleType) + "'. Please add a @NgModule annotation."), moduleType);
                        return;
                    }
                    importedModules.push(importedModuleSummary);
                }
                else {
                    _this._reportError(syntaxError("Unexpected value '" + stringifyType(importedType) + "' imported by the module '" + stringifyType(moduleType) + "'"), moduleType);
                    return;
                }
            });
        }
        if (meta.exports) {
            flattenAndDedupeArray(meta.exports).forEach(function (exportedType) {
                if (!isValidType(exportedType)) {
                    _this._reportError(syntaxError("Unexpected value '" + stringifyType(exportedType) + "' exported by the module '" + stringifyType(moduleType) + "'"), moduleType);
                    return;
                }
                if (!alreadyCollecting)
                    alreadyCollecting = new Set();
                if (alreadyCollecting.has(exportedType)) {
                    _this._reportError(syntaxError(_this._getTypeDescriptor(exportedType) + " '" + stringify(exportedType) + "' is exported recursively by the module '" + stringifyType(moduleType) + "'"), moduleType);
                    return;
                }
                alreadyCollecting.add(exportedType);
                var exportedModuleSummary = _this.getNgModuleSummary(exportedType, alreadyCollecting);
                alreadyCollecting.delete(exportedType);
                if (exportedModuleSummary) {
                    exportedModules.push(exportedModuleSummary);
                }
                else {
                    exportedNonModuleIdentifiers.push(_this._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)) {
                    _this._reportError(syntaxError("Unexpected value '" + stringifyType(declaredType) + "' declared by the module '" + stringifyType(moduleType) + "'"), moduleType);
                    return;
                }
                var declaredIdentifier = _this._getIdentifierMetadata(declaredType);
                if (_this.isDirective(declaredType)) {
                    transitiveModule.addDirective(declaredIdentifier);
                    declaredDirectives.push(declaredIdentifier);
                    _this._addTypeToModule(declaredType, moduleType);
                }
                else if (_this.isPipe(declaredType)) {
                    transitiveModule.addPipe(declaredIdentifier);
                    transitiveModule.pipes.push(declaredIdentifier);
                    declaredPipes.push(declaredIdentifier);
                    _this._addTypeToModule(declaredType, moduleType);
                }
                else {
                    _this._reportError(syntaxError("Unexpected " + _this._getTypeDescriptor(declaredType) + " '" + stringifyType(declaredType) + "' declared by the module '" + 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 {
                _this._reportError(syntaxError("Can't export " + _this._getTypeDescriptor(exportedId.reference) + " " + stringifyType(exportedId.reference) + " from " + 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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._getProvidersMetadata(meta.providers, entryComponents, "provider for the NgModule '" + stringifyType(moduleType) + "'", [], moduleType)));
        }
        if (meta.entryComponents) {
            entryComponents.push.apply(entryComponents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(flattenAndDedupeArray(meta.entryComponents)
                .map(function (type) { return _this._getEntryComponentMetadata(type); })));
        }
        if (meta.bootstrap) {
            flattenAndDedupeArray(meta.bootstrap).forEach(function (type) {
                if (!isValidType(type)) {
                    _this._reportError(syntaxError("Unexpected value '" + stringifyType(type) + "' used in the bootstrap property of module '" + stringifyType(moduleType) + "'"), moduleType);
                    return;
                }
                bootstrapComponents.push(_this._getIdentifierMetadata(type));
            });
        }
        entryComponents.push.apply(entryComponents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(bootstrapComponents.map(function (type) { return _this._getEntryComponentMetadata(type.reference); })));
        if (meta.schemas) {
            schemas.push.apply(schemas, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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;
    };
    CompileMetadataResolver.prototype._checkSelfImport = function (moduleType, importedModuleType) {
        if (moduleType === importedModuleType) {
            this._reportError(syntaxError("'" + stringifyType(moduleType) + "' module can't import itself"), moduleType);
            return true;
        }
        return false;
    };
    CompileMetadataResolver.prototype._getTypeDescriptor = function (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';
    };
    CompileMetadataResolver.prototype._addTypeToModule = function (type, moduleType) {
        var oldModule = this._ngModuleOfTypes.get(type);
        if (oldModule && oldModule !== moduleType) {
            this._reportError(syntaxError("Type " + stringifyType(type) + " is part of the declarations of 2 modules: " + stringifyType(oldModule) + " and " + stringifyType(moduleType) + "! " +
                ("Please consider moving " + stringifyType(type) + " to a higher module that imports " + stringifyType(oldModule) + " and " + stringifyType(moduleType) + ". ") +
                ("You can also create a new NgModule that exports and includes " + stringifyType(type) + " then import that NgModule in " + stringifyType(oldModule) + " and " + stringifyType(moduleType) + ".")), moduleType);
            return;
        }
        this._ngModuleOfTypes.set(type, moduleType);
    };
    CompileMetadataResolver.prototype._getTransitiveNgModuleMetadata = function (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;
    };
    CompileMetadataResolver.prototype._getIdentifierMetadata = function (type) {
        type = resolveForwardRef(type);
        return { reference: type };
    };
    CompileMetadataResolver.prototype.isInjectable = function (type) {
        var annotations = this._reflector.tryAnnotations(type);
        return annotations.some(function (ann) { return createInjectable.isTypeOf(ann); });
    };
    CompileMetadataResolver.prototype.getInjectableSummary = function (type) {
        return {
            summaryKind: CompileSummaryKind.Injectable,
            type: this._getTypeMetadata(type, null, false)
        };
    };
    CompileMetadataResolver.prototype.getInjectableMetadata = function (type, dependencies, throwOnUnknownDeps) {
        if (dependencies === void 0) { dependencies = null; }
        if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = 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,
        };
    };
    CompileMetadataResolver.prototype._getTypeMetadata = function (type, dependencies, throwOnUnknownDeps) {
        if (dependencies === void 0) { dependencies = null; }
        if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }
        var identifier = this._getIdentifierMetadata(type);
        return {
            reference: identifier.reference,
            diDeps: this._getDependenciesMetadata(identifier.reference, dependencies, throwOnUnknownDeps),
            lifecycleHooks: getAllLifecycleHooks(this._reflector, identifier.reference),
        };
    };
    CompileMetadataResolver.prototype._getFactoryMetadata = function (factory, dependencies) {
        if (dependencies === void 0) { dependencies = 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.
     */
    CompileMetadataResolver.prototype.getPipeMetadata = function (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 " + stringifyType(pipeType) + "."), pipeType);
        }
        return pipeMeta || null;
    };
    CompileMetadataResolver.prototype.getPipeSummary = function (pipeType) {
        var pipeSummary = this._loadSummary(pipeType, CompileSummaryKind.Pipe);
        if (!pipeSummary) {
            this._reportError(syntaxError("Illegal state: Could not load the summary for pipe " + stringifyType(pipeType) + "."), pipeType);
        }
        return pipeSummary;
    };
    CompileMetadataResolver.prototype.getOrLoadPipeMetadata = function (pipeType) {
        var pipeMeta = this._pipeCache.get(pipeType);
        if (!pipeMeta) {
            pipeMeta = this._loadPipeMetadata(pipeType);
        }
        return pipeMeta;
    };
    CompileMetadataResolver.prototype._loadPipeMetadata = function (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;
    };
    CompileMetadataResolver.prototype._getDependenciesMetadata = function (typeOrFunc, dependencies, throwOnUnknownDeps) {
        var _this = this;
        if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = 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 null;
            }
            return {
                isAttribute: isAttribute,
                isHost: isHost,
                isSelf: isSelf,
                isSkipSelf: isSkipSelf,
                isOptional: isOptional,
                token: _this._getTokenMetadata(token)
            };
        });
        if (hasUnknownDeps) {
            var depsTokens = dependenciesMetadata.map(function (dep) { return dep ? stringifyType(dep.token) : '?'; }).join(', ');
            var message = "Can't resolve all parameters for " + stringifyType(typeOrFunc) + ": (" + depsTokens + ").";
            if (throwOnUnknownDeps || this._config.strictInjectionParameters) {
                this._reportError(syntaxError(message), typeOrFunc);
            }
            else {
                this._console.warn("Warning: " + message + " This will become an error in Angular v6.x");
            }
        }
        return dependenciesMetadata;
    };
    CompileMetadataResolver.prototype._getTokenMetadata = function (token) {
        token = resolveForwardRef(token);
        var compileToken;
        if (typeof token === 'string') {
            compileToken = { value: token };
        }
        else {
            compileToken = { identifier: { reference: token } };
        }
        return compileToken;
    };
    CompileMetadataResolver.prototype._getProvidersMetadata = function (providers, targetEntryComponents, debugInfo, compileProviders, type) {
        var _this = this;
        if (compileProviders === void 0) { compileProviders = []; }
        providers.forEach(function (provider, providerIdx) {
            if (Array.isArray(provider)) {
                _this._getProvidersMetadata(provider, targetEntryComponents, debugInfo, compileProviders);
            }
            else {
                provider = resolveForwardRef(provider);
                var providerMeta = undefined;
                if (provider && typeof provider === 'object' && provider.hasOwnProperty('provide')) {
                    _this._validateProvider(provider);
                    providerMeta = new ProviderMeta(provider.provide, provider);
                }
                else if (isValidType(provider)) {
                    providerMeta = new ProviderMeta(provider, { useClass: provider });
                }
                else if (provider === void 0) {
                    _this._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("" + stringifyType(seenProvider));
                        }
                        else if (seenProviderIdx == providerIdx) {
                            soFar.push("?" + stringifyType(seenProvider) + "?");
                        }
                        else if (seenProviderIdx == providerIdx + 1) {
                            soFar.push('...');
                        }
                        return soFar;
                    }, [])
                        .join(', ');
                    _this._reportError(syntaxError("Invalid " + (debugInfo ? debugInfo : 'provider') + " - only instances of Provider and Type are allowed, got: [" + providersInfo + "]"), type);
                    return;
                }
                if (providerMeta.token ===
                    _this._reflector.resolveExternalReference(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS)) {
                    targetEntryComponents.push.apply(targetEntryComponents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this._getEntryComponentsFromProvider(providerMeta, type)));
                }
                else {
                    compileProviders.push(_this.getProviderMetadata(providerMeta));
                }
            }
        });
        return compileProviders;
    };
    CompileMetadataResolver.prototype._validateProvider = function (provider) {
        if (provider.hasOwnProperty('useClass') && provider.useClass == null) {
            this._reportError(syntaxError("Invalid provider for " + stringifyType(provider.provide) + ". useClass cannot be " + 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."));
        }
    };
    CompileMetadataResolver.prototype._getEntryComponentsFromProvider = function (provider, type) {
        var _this = 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 = _this._getEntryComponentMetadata(identifier.reference, false);
            if (entry) {
                components.push(entry);
            }
        });
        return components;
    };
    CompileMetadataResolver.prototype._getEntryComponentMetadata = function (dirType, throwIfNotFound) {
        if (throwIfNotFound === void 0) { throwIfNotFound = 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(dirType.name + " cannot be used as an entry component.");
        }
        return null;
    };
    CompileMetadataResolver.prototype._getInjectableTypeMetadata = function (type, dependencies) {
        if (dependencies === void 0) { dependencies = null; }
        var typeSummary = this._loadSummary(type, CompileSummaryKind.Injectable);
        if (typeSummary) {
            return typeSummary.type;
        }
        return this._getTypeMetadata(type, dependencies);
    };
    CompileMetadataResolver.prototype.getProviderMetadata = function (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
        };
    };
    CompileMetadataResolver.prototype._getQueriesMetadata = function (queries, isViewQuery, directiveType) {
        var _this = this;
        var res = [];
        Object.keys(queries).forEach(function (propertyName) {
            var query = queries[propertyName];
            if (query.isViewQuery === isViewQuery) {
                res.push(_this._getQueryMetadata(query, propertyName, directiveType));
            }
        });
        return res;
    };
    CompileMetadataResolver.prototype._queryVarBindings = function (selector) { return selector.split(/\s*,\s*/); };
    CompileMetadataResolver.prototype._getQueryMetadata = function (q, propertyName, typeOrFunc) {
        var _this = this;
        var selectors;
        if (typeof q.selector === 'string') {
            selectors =
                this._queryVarBindings(q.selector).map(function (varName) { return _this._getTokenMetadata(varName); });
        }
        else {
            if (!q.selector) {
                this._reportError(syntaxError("Can't construct a query for the property \"" + propertyName + "\" of \"" + 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
        };
    };
    CompileMetadataResolver.prototype._reportError = function (error$$1, type, otherType) {
        if (this._errorCollector) {
            this._errorCollector(error$$1, type);
            if (otherType) {
                this._errorCollector(error$$1, otherType);
            }
        }
        else {
            throw error$$1;
        }
    };
    return CompileMetadataResolver;
}());
function flattenArray(tree, out) {
    if (out === void 0) { out = []; }
    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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_CompileValueConverter, _super);
    function _CompileValueConverter() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    _CompileValueConverter.prototype.visitOther = function (value, targetIdentifiers) {
        targetIdentifiers.push({ reference: value });
    };
    return _CompileValueConverter;
}(ValueTransformer));
function stringifyType(type) {
    if (type instanceof StaticSymbol) {
        return type.name + " in " + type.filePath;
    }
    else {
        return stringify(type);
    }
}
/**
 * Indicates that a component is still being loaded in a synchronous compile.
 */
function componentStillLoadingError(compType) {
    var error$$1 = Error("Can't compile synchronously as " + stringify(compType) + " is still being loaded!");
    error$$1[ERROR_COMPONENT_TYPE] = compType;
    return error$$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 ProviderError = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ProviderError, _super);
    function ProviderError(message, span) {
        return _super.call(this, span, message) || this;
    }
    return ProviderError;
}(ParseError));
var ProviderViewContext = /** @class */ (function () {
    function ProviderViewContext(reflector, component) {
        var _this = this;
        this.reflector = reflector;
        this.component = component;
        this.errors = [];
        this.viewQueries = _getViewQueries(component);
        this.viewProviders = new Map();
        component.viewProviders.forEach(function (provider) {
            if (_this.viewProviders.get(tokenReference(provider.token)) == null) {
                _this.viewProviders.set(tokenReference(provider.token), true);
            }
        });
    }
    return ProviderViewContext;
}());
var ProviderElementContext = /** @class */ (function () {
    function ProviderElementContext(viewContext, _parent, _isViewRoot, _directiveAsts, attrs, refs, isTemplate, contentQueryStartId, _sourceSpan) {
        var _this = this;
        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 _this._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) {
            _this._addQueryReadsTo(provider.token, provider.token, _this._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(_this.viewContext.reflector, Identifiers.ElementRef);
            _this._addQueryReadsTo({ value: refAst.name }, defaultQueryValue, _this._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 || _this._queriedTokens.get(tokenReference(provider.token));
            if (eager) {
                _this._getOrCreateLocalProvider(provider.providerType, provider.token, true);
            }
        });
    }
    ProviderElementContext.prototype.afterElement = function () {
        var _this = this;
        // collect lazy providers
        Array.from(this._allProviders.values()).forEach(function (provider) {
            _this._getOrCreateLocalProvider(provider.providerType, provider.token, false);
        });
    };
    Object.defineProperty(ProviderElementContext.prototype, "transformProviders", {
        get: function () {
            // 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);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProviderElementContext.prototype, "transformedDirectiveAsts", {
        get: function () {
            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;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProviderElementContext.prototype, "queryMatches", {
        get: function () {
            var allMatches = [];
            this._queriedTokens.forEach(function (matches) { allMatches.push.apply(allMatches, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(matches)); });
            return allMatches;
        },
        enumerable: true,
        configurable: true
    });
    ProviderElementContext.prototype._addQueryReadsTo = function (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 });
        });
    };
    ProviderElementContext.prototype._getQueriesFor = function (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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(queries));
        }
        return result;
    };
    ProviderElementContext.prototype._getOrCreateLocalProvider = function (requestingProviderType, token, eager) {
        var _this = 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! " + 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 = _this._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 _this._getDependency(resolvedProvider.providerType, dep, eager); });
            }
            else if (provider.useClass) {
                var deps = provider.deps || provider.useClass.diDeps;
                transformedDeps =
                    deps.map(function (dep) { return _this._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;
    };
    ProviderElementContext.prototype._getLocalDependency = function (requestingProviderType, dep, eager) {
        if (eager === void 0) { eager = 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;
    };
    ProviderElementContext.prototype._getDependency = function (requestingProviderType, dep, eager) {
        if (eager === void 0) { eager = 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 " + tokenName(dep.token), this._sourceSpan));
        }
        return result;
    };
    return ProviderElementContext;
}());
var NgModuleProviderAnalyzer = /** @class */ (function () {
    function NgModuleProviderAnalyzer(reflector, ngModule, extraProviders, sourceSpan) {
        var _this = this;
        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, _this._errors, _this._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);
    }
    NgModuleProviderAnalyzer.prototype.parse = function () {
        var _this = this;
        Array.from(this._allProviders.values()).forEach(function (provider) {
            _this._getOrCreateLocalProvider(provider.token, provider.eager);
        });
        if (this._errors.length > 0) {
            var errorString = this._errors.join('\n');
            throw new Error("Provider parse errors:\n" + 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);
    };
    NgModuleProviderAnalyzer.prototype._getOrCreateLocalProvider = function (token, eager) {
        var _this = 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! " + 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 = _this._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 _this._getDependency(dep, eager, resolvedProvider.sourceSpan); });
            }
            else if (provider.useClass) {
                var deps = provider.deps || provider.useClass.diDeps;
                transformedDeps =
                    deps.map(function (dep) { return _this._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;
    };
    NgModuleProviderAnalyzer.prototype._getDependency = function (dep, eager, requestorSourceSpan) {
        if (eager === void 0) { eager = 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)) ;
            else if (this._getOrCreateLocalProvider(dep.token, eager) != null) ;
        }
        return dep;
    };
    return NgModuleProviderAnalyzer;
}());
function _transformProvider(provider, _a) {
    var useExisting = _a.useExisting, useValue = _a.useValue, deps = _a.deps;
    return {
        token: provider.token,
        useClass: provider.useClass,
        useExisting: useExisting,
        useFactory: provider.useFactory,
        useValue: useValue,
        deps: deps,
        multi: provider.multi
    };
}
function _transformProviderAst(provider, _a) {
    var eager = _a.eager, providers = _a.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 " + 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
 */
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 _a = providerAst.multiProvider ?
        multiProviderDef(ctx, flags, providerAst.providers) :
        singleProviderDef(ctx, flags, providerAst.providerType, providerAst.providers[0]), providerExpr = _a.providerExpr, providerFlags = _a.flags, depsExpr = _a.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 depExprs = convertDeps(providerIndex, [{ token: provider.useExisting }]);
            expr = depExprs[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" + providerIndex + "_" + 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 _a = singleProviderDef(ctx, flags, ProviderAstType.PrivateService, {
        token: token,
        multi: false,
        useClass: classMeta,
    }), providerExpr = _a.providerExpr, providerFlags = _a.flags, depsExpr = _a.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 = /** @class */ (function () {
    function NgModuleCompileResult(ngModuleFactoryVar) {
        this.ngModuleFactoryVar = ngModuleFactoryVar;
    }
    return NgModuleCompileResult;
}());
var LOG_VAR = variable('_l');
var NgModuleCompiler = /** @class */ (function () {
    function NgModuleCompiler(reflector) {
        this.reflector = reflector;
    }
    NgModuleCompiler.prototype.compile = function (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 (_a) {
            var providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, flags = _a.flags, tokenExpr = _a.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 = 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);
    };
    NgModuleCompiler.prototype.createStub = function (ctx, ngModuleReference) {
        this._createNgModuleFactory(ctx, ngModuleReference, NULL_EXPR);
    };
    NgModuleCompiler.prototype._createNgModuleFactory = function (ctx, reference, value) {
        var ngModuleFactoryVar = 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 = /** @class */ (function () {
    function NgModuleResolver(_reflector) {
        this._reflector = _reflector;
    }
    NgModuleResolver.prototype.isNgModule = function (type) { return this._reflector.annotations(type).some(createNgModule.isTypeOf); };
    NgModuleResolver.prototype.resolve = function (type, throwIfNotFound) {
        if (throwIfNotFound === void 0) { throwIfNotFound = 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 '" + 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
 */
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 " + ast);
        }
    });
    return ctx.toSource();
}
var TypeScriptEmitter = /** @class */ (function () {
    function TypeScriptEmitter() {
    }
    TypeScriptEmitter.prototype.emitStatementsAndContext = function (genFilePath, stmts, preamble, emitSourceMaps, referenceFilter, importFilter) {
        if (preamble === void 0) { preamble = ''; }
        if (emitSourceMaps === void 0) { emitSourceMaps = true; }
        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 reexport.name + " as " + reexport.as; }).join(',');
            preambleLines.push("export {" + reexportsCode + "} from '" + 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 " + prefix + " from '" + importedModuleName + "';"));
        });
        var sm = emitSourceMaps ?
            ctx.toSourceMapGenerator(genFilePath, preambleLines.length).toJsComment() :
            '';
        var lines = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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 };
    };
    TypeScriptEmitter.prototype.emitStatements = function (genFilePath, stmts, preamble) {
        if (preamble === void 0) { preamble = ''; }
        return this.emitStatementsAndContext(genFilePath, stmts, preamble).sourceText;
    };
    return TypeScriptEmitter;
}());
var _TsEmitterVisitor = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_TsEmitterVisitor, _super);
    function _TsEmitterVisitor(referenceFilter, importFilter) {
        var _this = _super.call(this, false) || this;
        _this.referenceFilter = referenceFilter;
        _this.importFilter = importFilter;
        _this.typeExpression = 0;
        _this.importsWithPrefixes = new Map();
        _this.reexports = new Map();
        return _this;
    }
    _TsEmitterVisitor.prototype.visitType = function (t, ctx, defaultType) {
        if (defaultType === void 0) { defaultType = 'any'; }
        if (t) {
            this.typeExpression++;
            t.visitType(this, ctx);
            this.typeExpression--;
        }
        else {
            ctx.print(null, defaultType);
        }
    };
    _TsEmitterVisitor.prototype.visitLiteralExpr = function (ast, ctx) {
        var value = ast.value;
        if (value == null && ast.type != INFERRED_TYPE) {
            ctx.print(ast, "(" + value + " as any)");
            return null;
        }
        return _super.prototype.visitLiteralExpr.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
    _TsEmitterVisitor.prototype.visitLiteralArrayExpr = function (ast, ctx) {
        if (ast.entries.length === 0) {
            ctx.print(ast, '(');
        }
        var result = _super.prototype.visitLiteralArrayExpr.call(this, ast, ctx);
        if (ast.entries.length === 0) {
            ctx.print(ast, ' as any[])');
        }
        return result;
    };
    _TsEmitterVisitor.prototype.visitExternalExpr = function (ast, ctx) {
        this._visitIdentifier(ast.value, ast.typeParams, ctx);
        return null;
    };
    _TsEmitterVisitor.prototype.visitAssertNotNullExpr = function (ast, ctx) {
        var result = _super.prototype.visitAssertNotNullExpr.call(this, ast, ctx);
        ctx.print(ast, '!');
        return result;
    };
    _TsEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {
        if (stmt.hasModifier(StmtModifier.Exported) && stmt.value instanceof ExternalExpr &&
            !stmt.type) {
            // check for a reexport
            var _a = stmt.value.value, name_1 = _a.name, moduleName = _a.moduleName;
            if (moduleName) {
                var reexports = this.reexports.get(moduleName);
                if (!reexports) {
                    reexports = [];
                    this.reexports.set(moduleName, reexports);
                }
                reexports.push({ name: name_1, 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, " " + stmt.name);
        this._printColonType(stmt.type, ctx);
        if (stmt.value) {
            ctx.print(stmt, " = ");
            stmt.value.visitExpression(this, ctx);
        }
        ctx.println(stmt, ";");
        return null;
    };
    _TsEmitterVisitor.prototype.visitWrappedNodeExpr = function (ast, ctx) {
        throw new Error('Cannot visit a WrappedNodeExpr when outputting Typescript.');
    };
    _TsEmitterVisitor.prototype.visitCastExpr = function (ast, ctx) {
        ctx.print(ast, "(<");
        ast.type.visitType(this, ctx);
        ctx.print(ast, ">");
        ast.value.visitExpression(this, ctx);
        ctx.print(ast, ")");
        return null;
    };
    _TsEmitterVisitor.prototype.visitInstantiateExpr = function (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;
    };
    _TsEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {
        var _this = this;
        ctx.pushClass(stmt);
        if (stmt.hasModifier(StmtModifier.Exported)) {
            ctx.print(stmt, "export ");
        }
        ctx.print(stmt, "class " + 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 _this._visitClassField(field, ctx); });
        if (stmt.constructorMethod != null) {
            this._visitClassConstructor(stmt, ctx);
        }
        stmt.getters.forEach(function (getter) { return _this._visitClassGetter(getter, ctx); });
        stmt.methods.forEach(function (method) { return _this._visitClassMethod(method, ctx); });
        ctx.decIndent();
        ctx.println(stmt, "}");
        ctx.popClass();
        return null;
    };
    _TsEmitterVisitor.prototype._visitClassField = function (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, ";");
    };
    _TsEmitterVisitor.prototype._visitClassGetter = function (getter, ctx) {
        if (getter.hasModifier(StmtModifier.Private)) {
            ctx.print(null, "private ");
        }
        ctx.print(null, "get " + getter.name + "()");
        this._printColonType(getter.type, ctx);
        ctx.println(null, " {");
        ctx.incIndent();
        this.visitAllStatements(getter.body, ctx);
        ctx.decIndent();
        ctx.println(null, "}");
    };
    _TsEmitterVisitor.prototype._visitClassConstructor = function (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, "}");
    };
    _TsEmitterVisitor.prototype._visitClassMethod = function (method, ctx) {
        if (method.hasModifier(StmtModifier.Private)) {
            ctx.print(null, "private ");
        }
        ctx.print(null, 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, "}");
    };
    _TsEmitterVisitor.prototype.visitFunctionExpr = function (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;
    };
    _TsEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {
        if (stmt.hasModifier(StmtModifier.Exported)) {
            ctx.print(stmt, "export ");
        }
        ctx.print(stmt, "function " + 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;
    };
    _TsEmitterVisitor.prototype.visitTryCatchStmt = function (stmt, ctx) {
        ctx.println(stmt, "try {");
        ctx.incIndent();
        this.visitAllStatements(stmt.bodyStmts, ctx);
        ctx.decIndent();
        ctx.println(stmt, "} catch (" + 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;
    };
    _TsEmitterVisitor.prototype.visitBuiltinType = function (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 " + type.name);
        }
        ctx.print(null, typeStr);
        return null;
    };
    _TsEmitterVisitor.prototype.visitExpressionType = function (ast, ctx) {
        var _this = this;
        ast.value.visitExpression(this, ctx);
        if (ast.typeParams !== null) {
            ctx.print(null, '<');
            this.visitAllObjects(function (type) { return _this.visitType(type, ctx); }, ast.typeParams, ctx, ',');
            ctx.print(null, '>');
        }
        return null;
    };
    _TsEmitterVisitor.prototype.visitArrayType = function (type, ctx) {
        this.visitType(type.of, ctx);
        ctx.print(null, "[]");
        return null;
    };
    _TsEmitterVisitor.prototype.visitMapType = function (type, ctx) {
        ctx.print(null, "{[key: string]:");
        this.visitType(type.valueType, ctx);
        ctx.print(null, "}");
        return null;
    };
    _TsEmitterVisitor.prototype.getBuiltinMethodName = function (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: " + method);
        }
        return name;
    };
    _TsEmitterVisitor.prototype._visitParams = function (params, ctx) {
        var _this = this;
        this.visitAllObjects(function (param) {
            ctx.print(null, param.name);
            _this._printColonType(param.type, ctx);
        }, params, ctx, ',');
    };
    _TsEmitterVisitor.prototype._visitIdentifier = function (value, typeParams, ctx) {
        var _this = 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" + this.importsWithPrefixes.size;
                this.importsWithPrefixes.set(moduleName, prefix);
            }
            ctx.print(null, 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(_this, ctx); }, typeParams, ctx, ',');
                ctx.print(null, ">");
            }
        }
    };
    _TsEmitterVisitor.prototype._printColonType = function (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 = /** @class */ (function () {
    function PipeResolver(_reflector) {
        this._reflector = _reflector;
    }
    PipeResolver.prototype.isPipe = function (type) {
        var typeMetadata = this._reflector.annotations(resolveForwardRef(type));
        return typeMetadata && typeMetadata.some(createPipe.isTypeOf);
    };
    /**
     * Return {@link Pipe} for a given `Type`.
     */
    PipeResolver.prototype.resolve = function (type, throwIfNotFound) {
        if (throwIfNotFound === void 0) { throwIfNotFound = 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 " + 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
 */
// 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(expander, nodes), expander.isExpanded, expander.errors);
}
var ExpansionResult = /** @class */ (function () {
    function ExpansionResult(nodes, expanded, errors) {
        this.nodes = nodes;
        this.expanded = expanded;
        this.errors = errors;
    }
    return ExpansionResult;
}());
var ExpansionError = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ExpansionError, _super);
    function ExpansionError(span, errorMsg) {
        return _super.call(this, span, errorMsg) || this;
    }
    return ExpansionError;
}(ParseError));
/**
 * Expand expansion forms (plural, select) to directives
 *
 * @internal
 */
var _Expander = /** @class */ (function () {
    function _Expander() {
        this.isExpanded = false;
        this.errors = [];
    }
    _Expander.prototype.visitElement = function (element, context) {
        return new Element(element.name, element.attrs, visitAll(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
    };
    _Expander.prototype.visitAttribute = function (attribute, context) { return attribute; };
    _Expander.prototype.visitText = function (text, context) { return text; };
    _Expander.prototype.visitComment = function (comment, context) { return comment; };
    _Expander.prototype.visitExpansion = function (icu, context) {
        this.isExpanded = true;
        return icu.type == 'plural' ? _expandPluralForm(icu, this.errors) :
            _expandDefaultForm(icu, this.errors);
    };
    _Expander.prototype.visitExpansionCase = function (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 " + PLURAL_CASES.join(", ")));
        }
        var expansionResult = expandNodes(c.expression);
        errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(expansionResult.errors));
        return new Element("ng-template", [new Attribute('ngPluralCase', "" + c.value, c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);
    });
    var switchAttr = new Attribute('[ngPlural]', ast.switchValue, ast.switchValueSourceSpan);
    return new Element('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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(expansionResult.errors));
        if (c.value === 'other') {
            // other is the default case when no values match
            return new Element("ng-template", [new Attribute('ngSwitchDefault', '', c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);
        }
        return new Element("ng-template", [new Attribute('ngSwitchCase', "" + c.value, c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);
    });
    var switchAttr = new Attribute('[ngSwitch]', ast.switchValue, ast.switchValueSourceSpan);
    return new Element('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
 */
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 = '*';
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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TemplateParseError, _super);
    function TemplateParseError(message, span, level) {
        return _super.call(this, span, message, level) || this;
    }
    return TemplateParseError;
}(ParseError));
var TemplateParseResult = /** @class */ (function () {
    function TemplateParseResult(templateAst, usedPipes, errors) {
        this.templateAst = templateAst;
        this.usedPipes = usedPipes;
        this.errors = errors;
    }
    return TemplateParseResult;
}());
var TemplateParser = /** @class */ (function () {
    function TemplateParser(_config, _reflector, _exprParser, _schemaRegistry, _htmlParser, _console, transforms) {
        this._config = _config;
        this._reflector = _reflector;
        this._exprParser = _exprParser;
        this._schemaRegistry = _schemaRegistry;
        this._htmlParser = _htmlParser;
        this._console = _console;
        this.transforms = transforms;
    }
    Object.defineProperty(TemplateParser.prototype, "expressionParser", {
        get: function () { return this._exprParser; },
        enumerable: true,
        configurable: true
    });
    TemplateParser.prototype.parse = function (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$$1) { return error$$1.level === ParseErrorLevel.WARNING; });
        var errors = result.errors.filter(function (error$$1) { return error$$1.level === ParseErrorLevel.ERROR; });
        if (warnings.length > 0) {
            this._console.warn("Template parse warnings:\n" + warnings.join('\n'));
        }
        if (errors.length > 0) {
            var errorString = errors.join('\n');
            throw syntaxError("Template parse errors:\n" + errorString, errors);
        }
        return { template: result.templateAst, pipes: result.usedPipes };
    };
    TemplateParser.prototype.tryParse = function (component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {
        var htmlParseResult = typeof template === 'string' ?
            this._htmlParser.parse(template, templateUrl, true, this.getInterpolationConfig(component)) :
            template;
        if (!preserveWhitespaces) {
            htmlParseResult = removeWhitespaces(htmlParseResult);
        }
        return this.tryParseHtml(this.expandHtml(htmlParseResult), component, directives, pipes, schemas);
    };
    TemplateParser.prototype.tryParseHtml = function (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(parseVisitor, htmlAstWithErrors.rootNodes, EMPTY_ELEMENT_CONTEXT);
            errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(providerViewContext.errors));
            usedPipes.push.apply(usedPipes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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);
    };
    TemplateParser.prototype.expandHtml = function (htmlAstWithErrors, forced) {
        if (forced === void 0) { forced = 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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(expandedHtmlAst.errors));
            htmlAstWithErrors = new ParseTreeResult(expandedHtmlAst.nodes, errors);
        }
        return htmlAstWithErrors;
    };
    TemplateParser.prototype.getInterpolationConfig = function (component) {
        if (component.template) {
            return InterpolationConfig.fromArray(component.template.interpolation);
        }
        return undefined;
    };
    /** @internal */
    TemplateParser.prototype._assertNoReferenceDuplicationOnTemplate = function (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 error$$1 = new TemplateParseError("Reference \"#" + name + "\" is defined several times", reference.sourceSpan, ParseErrorLevel.ERROR);
                errors.push(error$$1);
            }
        }); });
    };
    return TemplateParser;
}());
var TemplateParseVisitor = /** @class */ (function () {
    function TemplateParseVisitor(reflector, config, providerViewContext, directives, _bindingParser, _schemaRegistry, _schemas, _targetErrors) {
        var _this = this;
        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);
            _this.selectorMatcher.addSelectables(selector, directive);
            _this.directivesIndex.set(directive, index);
        });
    }
    TemplateParseVisitor.prototype.visitExpansion = function (expansion, context) { return null; };
    TemplateParseVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return null; };
    TemplateParseVisitor.prototype.visitText = function (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);
    };
    TemplateParseVisitor.prototype.visitAttribute = function (attribute, context) {
        return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);
    };
    TemplateParseVisitor.prototype.visitComment = function (comment, context) { return null; };
    TemplateParseVisitor.prototype.visitElement = function (element, parent) {
        var _this = 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 = _this._parseAttr(isTemplateElement, attr, matchableAttrs, elementOrDirectiveProps, events, elementOrDirectiveRefs, elementVars);
            elementVars.push.apply(elementVars, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(parsedVariables.map(function (v) { return VariableAst.fromParsedVariable(v); })));
            var templateValue;
            var templateKey;
            var normalizedName = _this._normalizeAttributeName(attr.name);
            if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX$1)) {
                templateValue = attr.value;
                templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX$1.length);
            }
            var hasTemplateBinding = templateValue != null;
            if (hasTemplateBinding) {
                if (hasInlineTemplates) {
                    _this._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *", attr.sourceSpan);
                }
                hasInlineTemplates = true;
                var parsedVariables_1 = [];
                _this._bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attr.sourceSpan, templateMatchableAttrs, templateElementOrDirectiveProps, parsedVariables_1);
                templateElementVars.push.apply(templateElementVars, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(parsedVariables_1.map(function (v) { return VariableAst.fromParsedVariable(v); })));
            }
            if (!hasBinding && !hasTemplateBinding) {
                // don't include the bindings as attributes as well in the AST
                attrs.push(_this.visitAttribute(attr, null));
                matchableAttrs.push([attr.name, attr.value]);
            }
        });
        var elementCssSelector = createElementCssSelector(elName, matchableAttrs);
        var _a = this._parseDirectives(this.selectorMatcher, elementCssSelector), directiveMetas = _a.directives, matchElement = _a.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(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR$1 : 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_1 = 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_1, element.sourceSpan, element.endSourceSpan || null);
        }
        if (hasInlineTemplates) {
            // The element as a *-attribute
            var templateQueryStartIndex = this.contentQueryStartId;
            var templateSelector = createElementCssSelector('ng-template', templateMatchableAttrs);
            var directives = this._parseDirectives(this.selectorMatcher, templateSelector).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;
    };
    TemplateParseVisitor.prototype._parseAttr = function (isTemplateElement, attr, targetMatchableAttrs, targetProps, targetEvents, targetRefs, targetVars) {
        var name = this._normalizeAttributeName(attr.name);
        var value = attr.value;
        var srcSpan = attr.sourceSpan;
        var boundEvents = [];
        var bindParts = name.match(BIND_NAME_REGEXP$1);
        var hasBinding = false;
        if (bindParts !== null) {
            hasBinding = true;
            if (bindParts[KW_BIND_IDX$1] != null) {
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX$1], value, false, srcSpan, targetMatchableAttrs, targetProps);
            }
            else if (bindParts[KW_LET_IDX$1]) {
                if (isTemplateElement) {
                    var identifier = bindParts[IDENT_KW_IDX$1];
                    this._parseVariable(identifier, value, srcSpan, targetVars);
                }
                else {
                    this._reportError("\"let-\" is only supported on ng-template elements.", srcSpan);
                }
            }
            else if (bindParts[KW_REF_IDX$1]) {
                var identifier = bindParts[IDENT_KW_IDX$1];
                this._parseReference(identifier, value, srcSpan, targetRefs);
            }
            else if (bindParts[KW_ON_IDX$1]) {
                this._bindingParser.parseEvent(bindParts[IDENT_KW_IDX$1], value, srcSpan, targetMatchableAttrs, boundEvents);
            }
            else if (bindParts[KW_BINDON_IDX$1]) {
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX$1], value, false, srcSpan, targetMatchableAttrs, targetProps);
                this._parseAssignmentEvent(bindParts[IDENT_KW_IDX$1], value, srcSpan, targetMatchableAttrs, boundEvents);
            }
            else if (bindParts[KW_AT_IDX$1]) {
                this._bindingParser.parseLiteralAttr(name, value, srcSpan, targetMatchableAttrs, targetProps);
            }
            else if (bindParts[IDENT_BANANA_BOX_IDX$1]) {
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX$1], value, false, srcSpan, targetMatchableAttrs, targetProps);
                this._parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX$1], value, srcSpan, targetMatchableAttrs, boundEvents);
            }
            else if (bindParts[IDENT_PROPERTY_IDX$1]) {
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX$1], value, false, srcSpan, targetMatchableAttrs, targetProps);
            }
            else if (bindParts[IDENT_EVENT_IDX$1]) {
                this._bindingParser.parseEvent(bindParts[IDENT_EVENT_IDX$1], value, srcSpan, targetMatchableAttrs, boundEvents);
            }
        }
        else {
            hasBinding = this._bindingParser.parsePropertyInterpolation(name, value, srcSpan, targetMatchableAttrs, targetProps);
        }
        if (!hasBinding) {
            this._bindingParser.parseLiteralAttr(name, value, srcSpan, targetMatchableAttrs, targetProps);
        }
        targetEvents.push.apply(targetEvents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(boundEvents.map(function (e) { return BoundEventAst.fromParsedEvent(e); })));
        return hasBinding;
    };
    TemplateParseVisitor.prototype._normalizeAttributeName = function (attrName) {
        return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;
    };
    TemplateParseVisitor.prototype._parseVariable = function (identifier, value, sourceSpan, targetVars) {
        if (identifier.indexOf('-') > -1) {
            this._reportError("\"-\" is not allowed in variable names", sourceSpan);
        }
        targetVars.push(new VariableAst(identifier, value, sourceSpan));
    };
    TemplateParseVisitor.prototype._parseReference = function (identifier, value, sourceSpan, targetRefs) {
        if (identifier.indexOf('-') > -1) {
            this._reportError("\"-\" is not allowed in reference names", sourceSpan);
        }
        targetRefs.push(new ElementOrDirectiveRef(identifier, value, sourceSpan));
    };
    TemplateParseVisitor.prototype._parseAssignmentEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {
        this._bindingParser.parseEvent(name + "Change", expression + "=$event", sourceSpan, targetMatchableAttrs, targetEvents);
    };
    TemplateParseVisitor.prototype._parseDirectives = function (selectorMatcher, elementCssSelector) {
        var _this = 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[_this.directivesIndex.get(directive)] = directive;
            matchElement = matchElement || selector.hasElementSelector();
        });
        return {
            directives: directives.filter(function (dir) { return !!dir; }),
            matchElement: matchElement,
        };
    };
    TemplateParseVisitor.prototype._createDirectiveAsts = function (isTemplateElement, elementName, directives, props, elementOrDirectiveRefs, elementSourceSpan, targetReferences, targetBoundDirectivePropNames) {
        var _this = this;
        var matchedReferences = new Set();
        var component = null;
        var directiveAsts = directives.map(function (directive) {
            var sourceSpan = new ParseSourceSpan(elementSourceSpan.start, elementSourceSpan.end, "Directive " + identifierName(directive.type));
            if (directive.isComponent) {
                component = directive;
            }
            var directiveProperties = [];
            var boundProperties = _this._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 = _this._checkPropertiesInSchema(elementName, hostProperties);
            var parsedEvents = _this._bindingParser.createDirectiveHostEventAsts(directive, sourceSpan);
            _this._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 = _this.contentQueryStartId;
            _this.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)) {
                    _this._reportError("There is no directive with \"exportAs\" set to \"" + elOrDirRef.value + "\"", elOrDirRef.sourceSpan);
                }
            }
            else if (!component) {
                var refToken = null;
                if (isTemplateElement) {
                    refToken = createTokenForExternalReference(_this.reflector, Identifiers.TemplateRef);
                }
                targetReferences.push(new ReferenceAst(elOrDirRef.name, refToken, elOrDirRef.value, elOrDirRef.sourceSpan));
            }
        });
        return directiveAsts;
    };
    TemplateParseVisitor.prototype._createDirectivePropertyAsts = function (directiveProperties, boundProps, targetBoundDirectiveProps, targetBoundDirectivePropNames) {
        if (directiveProperties) {
            var boundPropsByName_1 = new Map();
            boundProps.forEach(function (boundProp) {
                var prevValue = boundPropsByName_1.get(boundProp.name);
                if (!prevValue || prevValue.isLiteral) {
                    // give [a]="b" a higher precedence than a="b" on the same element
                    boundPropsByName_1.set(boundProp.name, boundProp);
                }
            });
            Object.keys(directiveProperties).forEach(function (dirProp) {
                var elProp = directiveProperties[dirProp];
                var boundProp = boundPropsByName_1.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));
                    }
                }
            });
        }
    };
    TemplateParseVisitor.prototype._createElementPropertyAsts = function (elementName, props, boundDirectivePropNames) {
        var _this = this;
        var boundElementProps = [];
        props.forEach(function (prop) {
            if (!prop.isLiteral && !boundDirectivePropNames.has(prop.name)) {
                var boundProp = _this._bindingParser.createBoundElementProperty(elementName, prop);
                boundElementProps.push(BoundElementPropertyAst.fromBoundProperty(boundProp));
            }
        });
        return this._checkPropertiesInSchema(elementName, boundElementProps);
    };
    TemplateParseVisitor.prototype._findComponentDirectives = function (directives) {
        return directives.filter(function (directive) { return directive.directive.isComponent; });
    };
    TemplateParseVisitor.prototype._findComponentDirectiveNames = function (directives) {
        return this._findComponentDirectives(directives)
            .map(function (directive) { return identifierName(directive.directive.type); });
    };
    TemplateParseVisitor.prototype._assertOnlyOneComponent = function (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: " + 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
     */
    TemplateParseVisitor.prototype._assertElementExists = function (matchElement, element) {
        var elName = element.name.replace(/^:xhtml:/, '');
        if (!matchElement && !this._schemaRegistry.hasElement(elName, this._schemas)) {
            var errorMsg = "'" + elName + "' is not a known element:\n";
            errorMsg +=
                "1. If '" + elName + "' is an Angular component, then verify that it is part of this module.\n";
            if (elName.indexOf('-') > -1) {
                errorMsg +=
                    "2. If '" + 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);
        }
    };
    TemplateParseVisitor.prototype._assertNoComponentsNorElementBindingsOnTemplate = function (directives, elementProps, sourceSpan) {
        var _this = this;
        var componentTypeNames = this._findComponentDirectiveNames(directives);
        if (componentTypeNames.length > 0) {
            this._reportError("Components on an embedded template: " + componentTypeNames.join(','), sourceSpan);
        }
        elementProps.forEach(function (prop) {
            _this._reportError("Property binding " + 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);
        });
    };
    TemplateParseVisitor.prototype._assertAllEventsPublishedByDirectives = function (directives, events) {
        var _this = 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)) {
                _this._reportError("Event binding " + 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);
            }
        });
    };
    TemplateParseVisitor.prototype._checkPropertiesInSchema = function (elementName, boundProps) {
        var _this = 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 */ &&
                !_this._schemaRegistry.hasProperty(elementName, boundProp.name, _this._schemas)) {
                var errorMsg = "Can't bind to '" + boundProp.name + "' since it isn't a known property of '" + elementName + "'.";
                if (elementName.startsWith('ng-')) {
                    errorMsg +=
                        "\n1. If '" + 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 '" + elementName + "' is an Angular component and it has '" + boundProp.name + "' input, then verify that it is part of this module." +
                            ("\n2. If '" + 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.";
                }
                _this._reportError(errorMsg, boundProp.sourceSpan);
            }
            return !isEmptyExpression(boundProp.value);
        });
    };
    TemplateParseVisitor.prototype._reportError = function (message, sourceSpan, level) {
        if (level === void 0) { level = ParseErrorLevel.ERROR; }
        this._targetErrors.push(new ParseError(sourceSpan, message, level));
    };
    return TemplateParseVisitor;
}());
var NonBindableVisitor$1 = /** @class */ (function () {
    function NonBindableVisitor() {
    }
    NonBindableVisitor.prototype.visitElement = function (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(this, ast.children, EMPTY_ELEMENT_CONTEXT);
        return new ElementAst(ast.name, visitAll(this, ast.attrs), [], [], [], [], [], false, [], children, ngContentIndex, ast.sourceSpan, ast.endSourceSpan);
    };
    NonBindableVisitor.prototype.visitComment = function (comment, context) { return null; };
    NonBindableVisitor.prototype.visitAttribute = function (attribute, context) {
        return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);
    };
    NonBindableVisitor.prototype.visitText = function (text, parent) {
        var ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR());
        return new TextAst(text.value, ngContentIndex, text.sourceSpan);
    };
    NonBindableVisitor.prototype.visitExpansion = function (expansion, context) { return expansion; };
    NonBindableVisitor.prototype.visitExpansionCase = function (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 = /** @class */ (function () {
    function ElementOrDirectiveRef(name, value, sourceSpan) {
        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
    }
    /** Gets whether this is a reference to the given directive. */
    ElementOrDirectiveRef.prototype.isReferenceToDirective = function (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 = /** @class */ (function () {
    function ElementContext(isTemplateElement, _ngContentIndexMatcher, _wildcardNgContentIndex, providerContext) {
        this.isTemplateElement = isTemplateElement;
        this._ngContentIndexMatcher = _ngContentIndexMatcher;
        this._wildcardNgContentIndex = _wildcardNgContentIndex;
        this.providerContext = providerContext;
    }
    ElementContext.create = function (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);
    };
    ElementContext.prototype.findNgContentIndex = function (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;
    };
    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$1 = new NonBindableVisitor$1();
function _isEmptyTextNode(node) {
    return node instanceof Text && 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
 */
/**
 * Generates code that is used to type check templates.
 */
var TypeCheckCompiler = /** @class */ (function () {
    function TypeCheckCompiler(options, reflector) {
        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.
     */
    TypeCheckCompiler.prototype.compileComponent = function (componentId, component, template, usedPipes, externalReferenceVars, ctx) {
        var _this = this;
        var pipes = new Map();
        usedPipes.forEach(function (p) { return pipes.set(p.name, p.type.reference); });
        var embeddedViewCount = 0;
        var viewBuilderFactory = function (parent, guards) {
            var embeddedViewIndex = embeddedViewCount++;
            return new ViewBuilder(_this.options, _this.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 = /** @class */ (function () {
    function TypeCheckLocalResolver() {
    }
    TypeCheckLocalResolver.prototype.getLocal = function (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 = /** @class */ (function () {
    function ViewBuilder(options, reflector, externalReferenceVars, parent, component, isHostComponent, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory) {
        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 = [];
    }
    ViewBuilder.prototype.getOutputVar = function (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 " + JSON.stringify(type));
        }
        return varName;
    };
    ViewBuilder.prototype.getTypeGuardExpressions = function (ast) {
        var e_1, _a, e_2, _b;
        var result = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this.guards);
        try {
            for (var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(ast.directives), _d = _c.next(); !_d.done; _d = _c.next()) {
                var directive = _d.value;
                try {
                    for (var _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(directive.inputs), _f = _e.next(); !_f.done; _f = _e.next()) {
                        var input = _f.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 (e_2_1) { e_2 = { error: e_2_1 }; }
                finally {
                    try {
                        if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
                    }
                    finally { if (e_2) throw e_2.error; }
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
            }
            finally { if (e_1) throw e_1.error; }
        }
        return result;
    };
    ViewBuilder.prototype.visitAll = function (variables, astNodes) {
        this.variables = variables;
        templateVisitAll(this, astNodes);
    };
    ViewBuilder.prototype.build = function (componentId, targetStatements) {
        var _this = this;
        if (targetStatements === void 0) { targetStatements = []; }
        var e_3, _a;
        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 _a = _this.preprocessUpdateExpression(expression), sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;
            var bindingId = "" + bindingCount++;
            var nameResolver = context === _this.component ? _this : defaultResolver;
            var _b = convertPropertyBinding(nameResolver, variable(_this.getOutputVar(context)), value, bindingId, BindingForm.General), stmts = _b.stmts, currValExpr = _b.currValExpr;
            stmts.push(new ExpressionStatement(currValExpr));
            viewStmts.push.apply(viewStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); })));
        });
        this.actions.forEach(function (_a) {
            var sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;
            var bindingId = "" + bindingCount++;
            var nameResolver = context === _this.component ? _this : defaultResolver;
            var stmts = convertActionBinding(nameResolver, variable(_this.getOutputVar(context)), value, bindingId).stmts;
            viewStmts.push.apply(viewStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); })));
        });
        if (this.guards.length) {
            var guardExpression = undefined;
            try {
                for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this.guards), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var guard = _c.value;
                    var _d = this.preprocessUpdateExpression(guard.expression), context = _d.context, value = _d.value;
                    var bindingId = "" + 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 _e = convertPropertyBinding(nameResolver, variable(this.getOutputVar(context)), value, bindingId, BindingForm.TrySimple), stmts = _e.stmts, currValExpr = _e.currValExpr;
                    if (stmts.length == 0) {
                        var guardClause = guard.useIf ? currValExpr : this.ctx.importExpr(guard.guard).callFn([currValExpr]);
                        guardExpression = guardExpression ? guardExpression.and(guardClause) : guardClause;
                    }
                }
            }
            catch (e_3_1) { e_3 = { error: e_3_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
                }
                finally { if (e_3) throw e_3.error; }
            }
            if (guardExpression) {
                viewStmts = [new IfStmt(guardExpression, viewStmts)];
            }
        }
        var viewName = "_View_" + componentId + "_" + this.embeddedViewIndex;
        var viewFactory = new DeclareFunctionStmt(viewName, [], viewStmts);
        targetStatements.push(viewFactory);
        return targetStatements;
    };
    ViewBuilder.prototype.visitBoundText = function (ast, context) {
        var _this = this;
        var astWithSource = ast.value;
        var inter = astWithSource.ast;
        inter.expressions.forEach(function (expr) {
            return _this.updates.push({ context: _this.component, value: expr, sourceSpan: ast.sourceSpan });
        });
    };
    ViewBuilder.prototype.visitEmbeddedTemplate = function (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);
        }
    };
    ViewBuilder.prototype.visitElement = function (ast, context) {
        var _this = this;
        this.visitElementOrTemplate(ast);
        ast.inputs.forEach(function (inputAst) {
            _this.updates.push({ context: _this.component, value: inputAst.value, sourceSpan: inputAst.sourceSpan });
        });
        templateVisitAll(this, ast.children);
    };
    ViewBuilder.prototype.visitElementOrTemplate = function (ast) {
        var _this = this;
        ast.directives.forEach(function (dirAst) { _this.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 && _this.options.fullTemplateTypeCheck) {
                outputVarType = ref.value.identifier.reference;
            }
            else {
                outputVarType = BuiltinTypeName.Dynamic;
            }
            _this.refOutputVars.set(ref.name, outputVarType);
        });
        ast.outputs.forEach(function (outputAst) {
            _this.actions.push({ context: _this.component, value: outputAst.handler, sourceSpan: outputAst.sourceSpan });
        });
    };
    ViewBuilder.prototype.visitDirective = function (dirAst) {
        var _this = this;
        var dirType = dirAst.directive.type.reference;
        dirAst.inputs.forEach(function (input) { return _this.updates.push({ context: _this.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 _this.updates.push({ context: dirType, value: inputAst.value, sourceSpan: inputAst.sourceSpan }); });
            dirAst.hostEvents.forEach(function (hostEventAst) { return _this.actions.push({
                context: dirType,
                value: hostEventAst.handler,
                sourceSpan: hostEventAst.sourceSpan
            }); });
        }
    };
    ViewBuilder.prototype.getLocal = function (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;
    };
    ViewBuilder.prototype.pipeOutputVar = function (name) {
        var pipe = this.pipes.get(name);
        if (!pipe) {
            throw new Error("Illegal State: Could not find pipe " + name + " in template of " + this.component);
        }
        return this.getOutputVar(pipe);
    };
    ViewBuilder.prototype.preprocessUpdateExpression = function (expression) {
        var _this = this;
        return {
            sourceSpan: expression.sourceSpan,
            context: expression.context,
            value: convertPropertyBindingBuiltins({
                createLiteralArrayConverter: function (argCount) { return function (args) {
                    var arr = literalArr(args);
                    // Note: The old view compiler used to use an `any` type
                    // for arrays.
                    return _this.options.fullTemplateTypeCheck ? arr : arr.cast(DYNAMIC_TYPE);
                }; },
                createLiteralMapConverter: function (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 _this.options.fullTemplateTypeCheck ? map : map.cast(DYNAMIC_TYPE);
                }; },
                createPipeConverter: function (name, argCount) { return function (args) {
                    // Note: The old view compiler used to use an `any` type
                    // for pipes.
                    var pipeExpr = _this.options.fullTemplateTypeCheck ?
                        variable(_this.pipeOutputVar(name)) :
                        variable(_this.getOutputVar(BuiltinTypeName.Dynamic));
                    return pipeExpr.callMethod('transform', args);
                }; },
            }, expression.value)
        };
    };
    ViewBuilder.prototype.visitNgContent = function (ast, context) { };
    ViewBuilder.prototype.visitText = function (ast, context) { };
    ViewBuilder.prototype.visitDirectiveProperty = function (ast, context) { };
    ViewBuilder.prototype.visitReference = function (ast, context) { };
    ViewBuilder.prototype.visitVariable = function (ast, context) { };
    ViewBuilder.prototype.visitEvent = function (ast, context) { };
    ViewBuilder.prototype.visitElementProperty = function (ast, context) { };
    ViewBuilder.prototype.visitAttr = function (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 = /** @class */ (function () {
    function ViewCompileResult(viewClassVar, rendererTypeVar) {
        this.viewClassVar = viewClassVar;
        this.rendererTypeVar = rendererTypeVar;
    }
    return ViewCompileResult;
}());
var ViewCompiler = /** @class */ (function () {
    function ViewCompiler(_reflector) {
        this._reflector = _reflector;
    }
    ViewCompiler.prototype.compileComponent = function (outputCtx, component, template, styles, usedPipes) {
        var _this = this;
        var _a;
        var embeddedViewCount = 0;
        var staticQueryIds = findStaticQueryIds(template);
        var renderComponentVarName = undefined;
        if (!component.isHost) {
            var template_1 = component.template;
            var customRenderData = [];
            if (template_1.animations && template_1.animations.length) {
                customRenderData.push(new LiteralMapEntry('animation', convertValueToOutputAst(outputCtx, template_1.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(template_1.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 (parent) {
            var embeddedViewIndex = embeddedViewCount++;
            return new ViewBuilder$1(_this._reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, staticQueryIds, viewBuilderFactory);
        };
        var visitor = viewBuilderFactory(null);
        visitor.visitAll([], template);
        (_a = outputCtx.statements).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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 = /** @class */ (function () {
    function ViewBuilder(reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, staticQueryIds, viewBuilderFactory) {
        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);
    }
    ViewBuilder.prototype.visitAll = function (variables, astNodes) {
        var _this = 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) {
                    _this.purePipeNodeIndices[pipe.name] = _this._createPipe(null, pipe);
                }
            });
        }
        if (!this.parent) {
            var queryIds_1 = 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_1, queryId, query.first);
                _this.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)
                ])
            }); });
        }
    };
    ViewBuilder.prototype.build = function (targetStatements) {
        if (targetStatements === void 0) { targetStatements = []; }
        this.children.forEach(function (child) { return child.build(targetStatements); });
        var _a = this._createNodeExpressions(), updateRendererStmts = _a.updateRendererStmts, updateDirectivesStmts = _a.updateDirectivesStmts, nodeDefExprs = _a.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;
    };
    ViewBuilder.prototype._createUpdateFn = function (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)
            ], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(preStmts, updateStmts), INFERRED_TYPE);
        }
        else {
            updateFn = NULL_EXPR;
        }
        return updateFn;
    };
    ViewBuilder.prototype.visitNgContent = function (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)
            ])
        }); });
    };
    ViewBuilder.prototype.visitText = function (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)]),
            ])
        }); });
    };
    ViewBuilder.prototype.visitBoundText = function (ast, context) {
        var _this = 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 _this._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
        }); };
    };
    ViewBuilder.prototype.visitEmbeddedTemplate = function (ast, context) {
        var _this = this;
        var nodeIndex = this.nodes.length;
        // reserve the space in the nodeDefs array
        this.nodes.push(null);
        var _a = this._visitElementOrTemplate(nodeIndex, ast), flags = _a.flags, queryMatchesExpr = _a.queryMatchesExpr, hostEvents = _a.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),
                _this._createElementHandleEventFn(nodeIndex, hostEvents),
                variable(childVisitor.viewName),
            ])
        }); };
    };
    ViewBuilder.prototype.visitElement = function (ast, context) {
        var _this = 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 _a = this._visitElementOrTemplate(nodeIndex, ast), flags = _a.flags, usedEvents = _a.usedEvents, queryMatchesExpr = _a.queryMatchesExpr, dirHostBindings = _a.hostBindings, hostEvents = _a.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 _this._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 (_a) {
                var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), target = _b[0], eventName = _b[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,
                _this._createElementHandleEventFn(nodeIndex, hostEvents),
                compView,
                compRendererType,
            ]),
            updateRenderer: updateRendererExpressions
        }); };
    };
    ViewBuilder.prototype._visitElementOrTemplate = function (nodeIndex, ast) {
        var _this = this;
        var flags = 0 /* None */;
        if (ast.hasViewContainer) {
            flags |= 16777216 /* EmbeddedViews */;
        }
        var usedEvents = new Map();
        ast.outputs.forEach(function (event) {
            var _a = elementEventNameAndTarget(event, null), name = _a.name, target = _a.target;
            usedEvents.set(elementEventFullName(target, name), [target, name]);
        });
        ast.directives.forEach(function (dirAst) {
            dirAst.hostEvents.forEach(function (event) {
                var _a = elementEventNameAndTarget(event, dirAst), name = _a.name, target = _a.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 _a = _this._visitDirective(providerAst, dirAst, dirIndex, nodeIndex, ast.references, ast.queryMatches, usedEvents, _this.staticQueryIds.get(ast)), dirHostBindings = _a.hostBindings, dirHostEvents = _a.hostEvents;
                hostBindings.push.apply(hostBindings, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(dirHostBindings));
                hostEvents.push.apply(hostEvents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(dirHostEvents));
            }
            else {
                _this._visitProvider(providerAst, ast.queryMatches);
            }
        });
        var queryMatchExprs = [];
        ast.queryMatches.forEach(function (match) {
            var valueType = undefined;
            if (tokenReference(match.value) ===
                _this.reflector.resolveExternalReference(Identifiers.ElementRef)) {
                valueType = 0 /* ElementRef */;
            }
            else if (tokenReference(match.value) ===
                _this.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {
                valueType = 3 /* ViewContainerRef */;
            }
            else if (tokenReference(match.value) ===
                _this.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) ===
                _this.reflector.resolveExternalReference(Identifiers.TemplateRef)) {
                valueType = 2 /* TemplateRef */;
            }
            if (valueType != null) {
                _this.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
        };
    };
    ViewBuilder.prototype._visitDirective = function (providerAst, dirAst, directiveIndex, elementNodeIndex, refs, queryMatches, usedEvents, queryIds) {
        var _this = 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.first);
            var bindingType = query.first ? 0 /* First */ : 1 /* All */;
            _this.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 _a = this._visitProviderOrDirective(providerAst, queryMatches), flags = _a.flags, queryMatchExprs = _a.queryMatchExprs, providerExpr = _a.providerExpr, depsExpr = _a.depsExpr;
        refs.forEach(function (ref) {
            if (ref.value && tokenReference(ref.value) === tokenReference(providerAst.token)) {
                _this.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 _this._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 };
    };
    ViewBuilder.prototype._visitProvider = function (providerAst, queryMatches) {
        this._addProviderNode(this._visitProviderOrDirective(providerAst, queryMatches));
    };
    ViewBuilder.prototype._visitComponentFactoryResolverProvider = function (directives) {
        var componentDirMeta = directives.find(function (dirAst) { return dirAst.directive.isComponent; });
        if (componentDirMeta && componentDirMeta.directive.entryComponents.length) {
            var _a = componentFactoryResolverProviderDef(this.reflector, this.outputCtx, 8192 /* PrivateProvider */, componentDirMeta.directive.entryComponents), providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, flags = _a.flags, tokenExpr = _a.tokenExpr;
            this._addProviderNode({
                providerExpr: providerExpr,
                depsExpr: depsExpr,
                flags: flags,
                tokenExpr: tokenExpr,
                queryMatchExprs: [],
                sourceSpan: componentDirMeta.sourceSpan
            });
        }
    };
    ViewBuilder.prototype._addProviderNode = function (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
            ])
        }); });
    };
    ViewBuilder.prototype._visitProviderOrDirective = function (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 _a = providerDef(this.outputCtx, providerAst), providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, providerFlags = _a.flags, tokenExpr = _a.tokenExpr;
        return {
            flags: flags | providerFlags,
            queryMatchExprs: queryMatchExprs,
            providerExpr: providerExpr,
            depsExpr: depsExpr,
            tokenExpr: tokenExpr,
            sourceSpan: providerAst.sourceSpan
        };
    };
    ViewBuilder.prototype.getLocal = function (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;
    };
    ViewBuilder.prototype._createLiteralArrayConverter = function (sourceSpan, argCount) {
        if (argCount === 0) {
            var valueExpr_1 = importExpr(Identifiers.EMPTY_ARRAY);
            return function () { return valueExpr_1; };
        }
        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); };
    };
    ViewBuilder.prototype._createLiteralMapConverter = function (sourceSpan, keys) {
        if (keys.length === 0) {
            var valueExpr_2 = importExpr(Identifiers.EMPTY_MAP);
            return function () { return valueExpr_2; };
        }
        var map = literalMap(keys.map(function (e, i) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__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); };
    };
    ViewBuilder.prototype._createPipeConverter = function (expression, name, argCount) {
        var pipe = this.usedPipes.find(function (pipeSummary) { return pipeSummary.name === name; });
        if (pipe.pure) {
            var checkIndex_1 = this.nodes.length;
            this.nodes.push(function () { return ({
                sourceSpan: expression.sourceSpan,
                nodeFlags: 128 /* TypePurePipe */,
                nodeDef: importExpr(Identifiers.purePipeDef).callFn([
                    literal(checkIndex_1),
                    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_1 = importExpr(Identifiers.nodeValue).callFn([compViewExpr, literal(pipeNodeIndex)]);
            return function (args) { return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, callCheckStmt(checkIndex_1, [pipeValueExpr_1].concat(args))); };
        }
        else {
            var nodeIndex = this._createPipe(expression.sourceSpan, pipe);
            var nodeValueExpr_1 = importExpr(Identifiers.nodeValue).callFn([VIEW_VAR, literal(nodeIndex)]);
            return function (args) { return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, nodeValueExpr_1.callMethod('transform', args)); };
        }
    };
    ViewBuilder.prototype._createPipe = function (sourceSpan, pipe) {
        var _this = 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(_this.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), _this.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)!
     */
    ViewBuilder.prototype._preprocessUpdateExpression = function (expression) {
        var _this = this;
        return {
            nodeIndex: expression.nodeIndex,
            bindingIndex: expression.bindingIndex,
            sourceSpan: expression.sourceSpan,
            context: expression.context,
            value: convertPropertyBindingBuiltins({
                createLiteralArrayConverter: function (argCount) { return _this._createLiteralArrayConverter(expression.sourceSpan, argCount); },
                createLiteralMapConverter: function (keys) {
                    return _this._createLiteralMapConverter(expression.sourceSpan, keys);
                },
                createPipeConverter: function (name, argCount) {
                    return _this._createPipeConverter(expression, name, argCount);
                }
            }, expression.value)
        };
    };
    ViewBuilder.prototype._createNodeExpressions = function () {
        var self = this;
        var updateBindingCount = 0;
        var updateRendererStmts = [];
        var updateDirectivesStmts = [];
        var nodeDefExprs = this.nodes.map(function (factory, nodeIndex) {
            var _a = factory(), nodeDef = _a.nodeDef, nodeFlags = _a.nodeFlags, updateDirectives = _a.updateDirectives, updateRenderer = _a.updateRenderer, sourceSpan = _a.sourceSpan;
            if (updateRenderer) {
                updateRendererStmts.push.apply(updateRendererStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(createUpdateStatements(nodeIndex, sourceSpan, updateRenderer, false)));
            }
            if (updateDirectives) {
                updateDirectivesStmts.push.apply(updateDirectivesStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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 (_a) {
                var sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;
                var bindingId = "" + updateBindingCount++;
                var nameResolver = context === COMP_VAR ? self : null;
                var _b = convertPropertyBinding(nameResolver, context, value, bindingId, BindingForm.General), stmts = _b.stmts, currValExpr = _b.currValExpr;
                updateStmts.push.apply(updateStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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;
        }
    };
    ViewBuilder.prototype._createElementHandleEventFn = function (nodeIndex, handlers) {
        var _this = this;
        var handleEventStmts = [];
        var handleEventBindingCount = 0;
        handlers.forEach(function (_a) {
            var context = _a.context, eventAst = _a.eventAst, dirAst = _a.dirAst;
            var bindingId = "" + handleEventBindingCount++;
            var nameResolver = context === COMP_VAR ? _this : null;
            var _b = convertActionBinding(nameResolver, context, eventAst.handler, bindingId), stmts = _b.stmts, allowDefault = _b.allowDefault;
            var trueStmts = stmts;
            if (allowDefault) {
                trueStmts.push(ALLOW_DEFAULT_VAR.set(allowDefault.and(ALLOW_DEFAULT_VAR)).toStmt());
            }
            var _c = elementEventNameAndTarget(eventAst, dirAst), eventTarget = _c.target, eventName = _c.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)
            ], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(preStmts, handleEventStmts, [new ReturnStatement(ALLOW_DEFAULT_VAR)]), INFERRED_TYPE);
        }
        else {
            handleEventFn = NULL_EXPR;
        }
        return handleEventFn;
    };
    ViewBuilder.prototype.visitDirective = function (ast, context) { };
    ViewBuilder.prototype.visitDirectiveProperty = function (ast, context) { };
    ViewBuilder.prototype.visitReference = function (ast, context) { };
    ViewBuilder.prototype.visitVariable = function (ast, context) { };
    ViewBuilder.prototype.visitEvent = function (ast, context) { };
    ViewBuilder.prototype.visitElementProperty = function (ast, context) { };
    ViewBuilder.prototype.visitAttr = function (ast, context) { };
    return ViewBuilder;
}());
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 " + 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 attrValue1 + " " + 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(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([VIEW_VAR, literal(nodeIndex), literal(0 /* Inline */)], exprs));
    }
}
function callUnwrapValue(nodeIndex, bindingIdx, expr) {
    return importExpr(Identifiers.unwrapValue).callFn([
        VIEW_VAR, literal(nodeIndex), literal(bindingIdx), expr
    ]);
}
function findStaticQueryIds(nodes, result) {
    if (result === void 0) { result = 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: "@" + eventAst.name + "." + eventAst.phase,
            target: dirAst && dirAst.directive.isComponent ? 'component' : null
        };
    }
    else {
        return eventAst;
    }
}
function calcStaticDynamicQueryFlags(queryIds, queryId, isFirst) {
    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 (isFirst && (queryIds.staticQueryIds.has(queryId) || !queryIds.dynamicQueryIds.has(queryId))) {
        flags |= 268435456 /* StaticQuery */;
    }
    else {
        flags |= 536870912 /* DynamicQuery */;
    }
    return flags;
}
function elementEventFullName(target, name) {
    return target ? target + ":" + 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 = /** @class */ (function () {
    function MessageBundle(_htmlParser, _implicitTags, _implicitAttrs, _locale) {
        if (_locale === void 0) { _locale = null; }
        this._htmlParser = _htmlParser;
        this._implicitTags = _implicitTags;
        this._implicitAttrs = _implicitAttrs;
        this._locale = _locale;
        this._messages = [];
    }
    MessageBundle.prototype.updateFromTemplate = function (html, url, interpolationConfig) {
        var _a;
        var htmlParserResult = this._htmlParser.parse(html, url, true, 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;
        }
        (_a = this._messages).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(i18nParserResult.messages));
        return [];
    };
    // Return the message in the internal format
    // The public (serialized) format might be different, see the `write` method.
    MessageBundle.prototype.getMessages = function () { return this._messages; };
    MessageBundle.prototype.write = function (serializer, filterSources) {
        var messages = {};
        var mapperVisitor = new MapPlaceholderNames();
        // Deduplicate messages based on their ID
        this._messages.forEach(function (message) {
            var _a;
            var id = serializer.digest(message);
            if (!messages.hasOwnProperty(id)) {
                messages[id] = message;
            }
            else {
                (_a = messages[id].sources).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MapPlaceholderNames, _super);
    function MapPlaceholderNames() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    MapPlaceholderNames.prototype.convert = function (nodes, mapper) {
        var _this = this;
        return mapper ? nodes.map(function (n) { return n.visit(_this, mapper); }) : nodes;
    };
    MapPlaceholderNames.prototype.visitTagPlaceholder = function (ph, mapper) {
        var _this = 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(_this, mapper); });
        return new TagPlaceholder(ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan);
    };
    MapPlaceholderNames.prototype.visitPlaceholder = function (ph, mapper) {
        return new Placeholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);
    };
    MapPlaceholderNames.prototype.visitIcuPlaceholder = function (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 = /** @class */ (function () {
    function GeneratedFile(srcFileUrl, genFileUrl, sourceOrStmts) {
        this.srcFileUrl = srcFileUrl;
        this.genFileUrl = genFileUrl;
        if (typeof sourceOrStmts === 'string') {
            this.source = sourceOrStmts;
            this.stmts = null;
        }
        else {
            this.source = null;
            this.stmts = sourceOrStmts;
        }
    }
    GeneratedFile.prototype.isEquivalent = function (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, preamble) {
    if (preamble === void 0) { preamble = ''; }
    if (!file.stmts) {
        throw new Error("Illegal state: No stmts present on GeneratedFile " + 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 e_1, _a, e_2, _b;
    var allLazyRoutes = [];
    try {
        for (var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(moduleMeta.transitiveModule.providers), _d = _c.next(); !_d.done; _d = _c.next()) {
            var _e = _d.value, provider = _e.provider, module = _e.module;
            if (tokenReference(provider.token) === reflector.ROUTES) {
                var loadChildren = _collectLoadChildren(provider.useValue);
                try {
                    for (var loadChildren_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(loadChildren), loadChildren_1_1 = loadChildren_1.next(); !loadChildren_1_1.done; loadChildren_1_1 = loadChildren_1.next()) {
                        var route = loadChildren_1_1.value;
                        allLazyRoutes.push(parseLazyRoute(route, reflector, module.reference));
                    }
                }
                catch (e_2_1) { e_2 = { error: e_2_1 }; }
                finally {
                    try {
                        if (loadChildren_1_1 && !loadChildren_1_1.done && (_b = loadChildren_1.return)) _b.call(loadChildren_1);
                    }
                    finally { if (e_2) throw e_2.error; }
                }
            }
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
        }
        finally { if (e_1) throw e_1.error; }
    }
    return allLazyRoutes;
}
function _collectLoadChildren(routes, target) {
    if (target === void 0) { target = []; }
    var e_3, _a;
    if (typeof routes === 'string') {
        target.push(routes);
    }
    else if (Array.isArray(routes)) {
        try {
            for (var routes_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {
                var route = routes_1_1.value;
                _collectLoadChildren(route, target);
            }
        }
        catch (e_3_1) { e_3 = { error: e_3_1 }; }
        finally {
            try {
                if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);
            }
            finally { if (e_3) throw e_3.error; }
        }
    }
    else if (routes.loadChildren) {
        _collectLoadChildren(routes.loadChildren, target);
    }
    else if (routes.children) {
        _collectLoadChildren(routes.children, target);
    }
    return target;
}
function parseLazyRoute(route, reflector, module) {
    var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(route.split('#'), 2), routePath = _a[0], routeName = _a[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 = /** @class */ (function () {
    function ResolvedStaticSymbol(symbol, metadata) {
        this.symbol = symbol;
        this.metadata = metadata;
    }
    return ResolvedStaticSymbol;
}());
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 = /** @class */ (function () {
    function StaticSymbolResolver(host, staticSymbolCache, summaryResolver, errorRecorder) {
        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();
    }
    StaticSymbolResolver.prototype.resolveSymbol = function (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
     */
    StaticSymbolResolver.prototype.getImportAs = function (staticSymbol, useSummaries) {
        if (useSummaries === void 0) { useSummaries = 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.
     */
    StaticSymbolResolver.prototype.getResourcePath = function (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.
     */
    StaticSymbolResolver.prototype.getTypeArity = function (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;
    };
    StaticSymbolResolver.prototype.getKnownModuleName = function (filePath) {
        return this.knownFileNameToModuleNames.get(filePath) || null;
    };
    StaticSymbolResolver.prototype.recordImportAs = function (sourceSymbol, targetSymbol) {
        sourceSymbol.assertNoMembers();
        targetSymbol.assertNoMembers();
        this.importAs.set(sourceSymbol, targetSymbol);
    };
    StaticSymbolResolver.prototype.recordModuleNameForFileName = function (fileName, moduleName) {
        this.knownFileNameToModuleNames.set(fileName, moduleName);
    };
    /**
     * Invalidate all information derived from the given file.
     *
     * @param fileName the file to invalidate
     */
    StaticSymbolResolver.prototype.invalidateFile = function (fileName) {
        var e_1, _a;
        this.metadataCache.delete(fileName);
        this.resolvedFilePaths.delete(fileName);
        var symbols = this.symbolFromFile.get(fileName);
        if (symbols) {
            this.symbolFromFile.delete(fileName);
            try {
                for (var symbols_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(symbols), symbols_1_1 = symbols_1.next(); !symbols_1_1.done; symbols_1_1 = symbols_1.next()) {
                    var symbol = symbols_1_1.value;
                    this.resolvedSymbols.delete(symbol);
                    this.importAs.delete(symbol);
                    this.symbolResourcePaths.delete(symbol);
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (symbols_1_1 && !symbols_1_1.done && (_a = symbols_1.return)) _a.call(symbols_1);
                }
                finally { if (e_1) throw e_1.error; }
            }
        }
    };
    /** @internal */
    StaticSymbolResolver.prototype.ignoreErrorsFor = function (cb) {
        var recorder = this.errorRecorder;
        this.errorRecorder = function () { };
        try {
            return cb();
        }
        finally {
            this.errorRecorder = recorder;
        }
    };
    StaticSymbolResolver.prototype._resolveSymbolMembers = function (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;
    };
    StaticSymbolResolver.prototype._resolveSymbolFromSummary = function (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
     */
    StaticSymbolResolver.prototype.getStaticSymbol = function (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.
     */
    StaticSymbolResolver.prototype.hasDecorators = function (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;
    };
    StaticSymbolResolver.prototype.getSymbolsOf = function (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;
    };
    StaticSymbolResolver.prototype._createSymbolsOf = function (filePath) {
        var _this = this;
        var e_2, _a;
        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 _loop_1 = function (moduleExport) {
                // 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 = _this.resolveModule(moduleExport.from, filePath);
                        if (resolvedModule) {
                            var targetSymbol = _this.getStaticSymbol(resolvedModule, symName);
                            var sourceSymbol = _this.getStaticSymbol(filePath, symbolName);
                            resolvedSymbols.push(_this.createExport(sourceSymbol, targetSymbol));
                        }
                    });
                }
                else {
                    // handle the symbols via export * directives.
                    var resolvedModule = this_1.resolveModule(moduleExport.from, filePath);
                    if (resolvedModule) {
                        var nestedExports = this_1.getSymbolsOf(resolvedModule);
                        nestedExports.forEach(function (targetSymbol) {
                            var sourceSymbol = _this.getStaticSymbol(filePath, targetSymbol.name);
                            resolvedSymbols.push(_this.createExport(sourceSymbol, targetSymbol));
                        });
                    }
                }
            };
            var this_1 = this;
            try {
                for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(metadata['exports']), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var moduleExport = _c.value;
                    _loop_1(moduleExport);
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
                }
                finally { if (e_2) throw e_2.error; }
            }
        }
        // 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_1 = new Set(Object.keys(metadata['metadata']).map(unescapeIdentifier));
            var origins_1 = metadata['origins'] || {};
            Object.keys(metadata['metadata']).forEach(function (metadataKey) {
                var symbolMeta = metadata['metadata'][metadataKey];
                var name = unescapeIdentifier(metadataKey);
                var symbol = _this.getStaticSymbol(filePath, name);
                var origin = origins_1.hasOwnProperty(metadataKey) && origins_1[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 = _this.resolveModule(origin, filePath);
                    if (!originFilePath) {
                        _this.reportError(new Error("Couldn't resolve original symbol for " + origin + " from " + _this.host.getOutputName(filePath)));
                    }
                    else {
                        _this.symbolResourcePaths.set(symbol, originFilePath);
                    }
                }
                resolvedSymbols.push(_this.createResolvedSymbol(symbol, filePath, topLevelSymbolNames_1, symbolMeta));
            });
        }
        resolvedSymbols.forEach(function (resolvedSymbol) { return _this.resolvedSymbols.set(resolvedSymbol.symbol, resolvedSymbol); });
        this.symbolFromFile.set(filePath, resolvedSymbols.map(function (resolvedSymbol) { return resolvedSymbol.symbol; }));
    };
    StaticSymbolResolver.prototype.createResolvedSymbol = function (sourceSymbol, topLevelPath, topLevelSymbolNames, metadata) {
        var _this = 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_1 = { __symbolic: 'class', arity: metadata.arity };
            return new ResolvedStaticSymbol(sourceSymbol, transformedMeta_1);
        }
        var _originalFileMemo;
        var getOriginalName = function () {
            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 =
                    _this.host.getOutputName(topLevelPath.replace(/((\.ts)|(\.d\.ts)|)$/, '.ts')
                        .replace(/^.*node_modules[/\\]/, ''));
            }
            return _originalFileMemo;
        };
        var self = this;
        var ReferenceTransformer = /** @class */ (function (_super) {
            Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReferenceTransformer, _super);
            function ReferenceTransformer() {
                return _super !== null && _super.apply(this, arguments) || this;
            }
            ReferenceTransformer.prototype.visitStringMap = function (map, functionParams) {
                var symbolic = map['__symbolic'];
                if (symbolic === 'function') {
                    var oldLen = functionParams.length;
                    functionParams.push.apply(functionParams, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])((map['parameters'] || [])));
                    var result = _super.prototype.visitStringMap.call(this, map, functionParams);
                    functionParams.length = oldLen;
                    return result;
                }
                else if (symbolic === 'reference') {
                    var module = map['module'];
                    var name_1 = map['name'] ? unescapeIdentifier(map['name']) : map['name'];
                    if (!name_1) {
                        return null;
                    }
                    var filePath = void 0;
                    if (module) {
                        filePath = self.resolveModule(module, sourceSymbol.filePath);
                        if (!filePath) {
                            return {
                                __symbolic: 'error',
                                message: "Could not resolve " + module + " relative to " + self.host.getMetadataFor(sourceSymbol.filePath) + ".",
                                line: map.line,
                                character: map.character,
                                fileName: getOriginalName()
                            };
                        }
                        return {
                            __symbolic: 'resolved',
                            symbol: self.getStaticSymbol(filePath, name_1),
                            line: map.line,
                            character: map.character,
                            fileName: getOriginalName()
                        };
                    }
                    else if (functionParams.indexOf(name_1) >= 0) {
                        // reference to a function parameter
                        return { __symbolic: 'reference', name: name_1 };
                    }
                    else {
                        if (topLevelSymbolNames.has(name_1)) {
                            return self.getStaticSymbol(topLevelPath, name_1);
                        }
                    }
                }
                else if (symbolic === 'error') {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, map, { fileName: getOriginalName() });
                }
                else {
                    return _super.prototype.visitStringMap.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);
    };
    StaticSymbolResolver.prototype.createExport = function (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);
    };
    StaticSymbolResolver.prototype.reportError = function (error$$1, context, path) {
        if (this.errorRecorder) {
            this.errorRecorder(error$$1, (context && context.filePath) || path);
        }
        else {
            throw error$$1;
        }
    };
    /**
     * @param module an absolute path to a module file.
     */
    StaticSymbolResolver.prototype.getModuleMetadata = function (module) {
        var moduleMetadata = this.metadataCache.get(module);
        if (!moduleMetadata) {
            var moduleMetadatas = this.host.getMetadataFor(module);
            if (moduleMetadatas) {
                var maxVersion_1 = -1;
                moduleMetadatas.forEach(function (md) {
                    if (md && md['version'] > maxVersion_1) {
                        maxVersion_1 = 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 " + moduleMetadata['version'] + " for module " + module + ". This module should be compiled with a newer version of ngc" :
                    "Metadata version mismatch for module " + this.host.getOutputName(module) + ", found version " + moduleMetadata['version'] + ", expected " + SUPPORTED_SCHEMA_VERSION;
                this.reportError(new Error(errorMessage));
            }
            this.metadataCache.set(module, moduleMetadata);
        }
        return moduleMetadata;
    };
    StaticSymbolResolver.prototype.getSymbolByModule = function (module, symbolName, containingFile) {
        var filePath = this.resolveModule(module, containingFile);
        if (!filePath) {
            this.reportError(new Error("Could not resolve module " + module + (containingFile ? ' relative to ' +
                this.host.getOutputName(containingFile) : '')));
            return this.getStaticSymbol("ERROR:" + module, symbolName);
        }
        return this.getStaticSymbol(filePath, symbolName);
    };
    StaticSymbolResolver.prototype.resolveModule = function (module, containingFile) {
        try {
            return this.host.moduleNameToFileName(module, containingFile);
        }
        catch (e) {
            console.error("Could not resolve module '" + module + "' relative to file " + 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;
}

function serializeSummaries(srcFileName, forJitCtx, summaryResolver, symbolResolver, symbols, types) {
    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 (_a) {
        var summary = _a.summary, metadata = _a.metadata;
        toJsonSerializer.addSummary({ symbol: summary.type.reference, metadata: undefined, type: summary });
    });
    var _a = toJsonSerializer.serialize(), json = _a.json, exportAs = _a.exportAs;
    if (forJitCtx) {
        var forJitSerializer_1 = new ForJitSerializer(forJitCtx, symbolResolver, summaryResolver);
        types.forEach(function (_a) {
            var summary = _a.summary, metadata = _a.metadata;
            forJitSerializer_1.addSourceType(summary, metadata);
        });
        toJsonSerializer.unprocessedSymbolSummariesBySymbol.forEach(function (summary) {
            if (summaryResolver.isLibraryFile(summary.symbol.filePath) && summary.type) {
                forJitSerializer_1.addLibType(summary.type);
            }
        });
        forJitSerializer_1.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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ToJsonSerializer, _super);
    function ToJsonSerializer(symbolResolver, summaryResolver, srcFileName) {
        var _this = _super.call(this) || this;
        _this.symbolResolver = symbolResolver;
        _this.summaryResolver = summaryResolver;
        _this.srcFileName = srcFileName;
        // Note: This only contains symbols without members.
        _this.symbols = [];
        _this.indexBySymbol = new Map();
        _this.reexportedBy = new Map();
        // This now contains a `__symbol: number` in the place of
        // StaticSymbols, but otherwise has the same shape as the original objects.
        _this.processedSummaryBySymbol = new Map();
        _this.processedSummaries = [];
        _this.unprocessedSymbolSummariesBySymbol = new Map();
        _this.moduleName = symbolResolver.getKnownModuleName(srcFileName);
        return _this;
    }
    ToJsonSerializer.prototype.addSummary = function (summary) {
        var _this = 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_1 = summary.metadata || {};
            if (metadata_1.__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_1 = {};
                Object.keys(metadata_1).forEach(function (propName) {
                    if (propName !== 'decorators') {
                        clone_1[propName] = metadata_1[propName];
                    }
                });
                metadata_1 = clone_1;
            }
            else if (isCall(metadata_1)) {
                if (!isFunctionCall(metadata_1) && !isMethodCallOnVariable(metadata_1)) {
                    // Don't store complex calls as we won't be able to simplify them anyways later on.
                    metadata_1 = {
                        __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_1;
            processedSummary.metadata = this.processValue(metadata_1, 1 /* ResolveValue */);
            if (metadata_1 instanceof StaticSymbol &&
                this.summaryResolver.isLibraryFile(metadata_1.filePath)) {
                var declarationSymbol = this.symbols[this.indexBySymbol.get(metadata_1)];
                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 (_this.summaryResolver.isLibraryFile(symbol.filePath) &&
                        !_this.unprocessedSymbolSummariesBySymbol.has(symbol)) {
                        var summary_1 = _this.summaryResolver.resolveSummary(symbol);
                        if (summary_1) {
                            _this.addSummary(summary_1);
                        }
                    }
                });
            }
        }
    };
    ToJsonSerializer.prototype.serialize = function () {
        var _this = 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 (_this.summaryResolver.isLibraryFile(symbol.filePath)) {
                    var reexportSymbol = _this.reexportedBy.get(symbol);
                    if (reexportSymbol) {
                        importAs = _this.indexBySymbol.get(reexportSymbol);
                    }
                    else {
                        var summary = _this.unprocessedSymbolSummariesBySymbol.get(symbol);
                        if (!summary || !summary.metadata || summary.metadata.__symbolic !== 'interface') {
                            importAs = symbol.name + "_" + index;
                            exportAs.push({ symbol: symbol, exportAs: importAs });
                        }
                    }
                }
                return {
                    __symbol: index,
                    name: symbol.name,
                    filePath: _this.summaryResolver.toSummaryFileName(symbol.filePath, _this.srcFileName),
                    importAs: importAs
                };
            })
        });
        return { json: json, exportAs: exportAs };
    };
    ToJsonSerializer.prototype.processValue = function (value, flags) {
        return visitValue(value, this, flags);
    };
    ToJsonSerializer.prototype.visitOther = function (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.
     */
    ToJsonSerializer.prototype.visitStringMap = function (map, context) {
        if (map['__symbolic'] === 'resolved') {
            return visitValue(map.symbol, this, context);
        }
        if (map['__symbolic'] === 'error') {
            delete map['line'];
            delete map['character'];
        }
        return _super.prototype.visitStringMap.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.
     */
    ToJsonSerializer.prototype.visitStaticSymbol = function (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;
    };
    ToJsonSerializer.prototype.loadSummary = function (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 = /** @class */ (function () {
    function ForJitSerializer(outputCtx, symbolResolver, summaryResolver) {
        this.outputCtx = outputCtx;
        this.symbolResolver = symbolResolver;
        this.summaryResolver = summaryResolver;
        this.data = [];
    }
    ForJitSerializer.prototype.addSourceType = function (summary, metadata) {
        this.data.push({ summary: summary, metadata: metadata, isLibrary: false });
    };
    ForJitSerializer.prototype.addLibType = function (summary) {
        this.data.push({ summary: summary, metadata: null, isLibrary: true });
    };
    ForJitSerializer.prototype.serialize = function (exportAsArr) {
        var _this = this;
        var e_1, _a, e_2, _b, e_3, _c;
        var exportAsBySymbol = new Map();
        try {
            for (var exportAsArr_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(exportAsArr), exportAsArr_1_1 = exportAsArr_1.next(); !exportAsArr_1_1.done; exportAsArr_1_1 = exportAsArr_1.next()) {
                var _d = exportAsArr_1_1.value, symbol = _d.symbol, exportAs = _d.exportAs;
                exportAsBySymbol.set(symbol, exportAs);
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (exportAsArr_1_1 && !exportAsArr_1_1.done && (_a = exportAsArr_1.return)) _a.call(exportAsArr_1);
            }
            finally { if (e_1) throw e_1.error; }
        }
        var ngModuleSymbols = new Set();
        try {
            for (var _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this.data), _f = _e.next(); !_f.done; _f = _e.next()) {
                var _g = _f.value, summary = _g.summary, metadata = _g.metadata, isLibrary = _g.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;
                    try {
                        for (var _h = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(modSummary.modules), _j = _h.next(); !_j.done; _j = _h.next()) {
                            var mod = _j.value;
                            ngModuleSymbols.add(mod.reference);
                        }
                    }
                    catch (e_3_1) { e_3 = { error: e_3_1 }; }
                    finally {
                        try {
                            if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
                        }
                        finally { if (e_3) throw e_3.error; }
                    }
                }
                if (!isLibrary) {
                    var fnName = summaryForJitName(summary.type.reference.name);
                    createSummaryForJitFunction(this.outputCtx, summary.type.reference, this.serializeSummaryWithDeps(summary, metadata));
                }
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
            }
            finally { if (e_2) throw e_2.error; }
        }
        ngModuleSymbols.forEach(function (ngModuleSymbol) {
            if (_this.summaryResolver.isLibraryFile(ngModuleSymbol.filePath)) {
                var exportAs = exportAsBySymbol.get(ngModuleSymbol) || ngModuleSymbol.name;
                var jitExportAsName = summaryForJitName(exportAs);
                _this.outputCtx.statements.push(variable(jitExportAsName)
                    .set(_this.serializeSummaryRef(ngModuleSymbol))
                    .toDeclStmt(null, [StmtModifier.Exported]));
            }
        });
    };
    ForJitSerializer.prototype.serializeSummaryWithDeps = function (summary, metadata) {
        var _this = this;
        var expressions = [this.serializeSummary(summary)];
        var providers = [];
        if (metadata instanceof CompileNgModuleMetadata) {
            expressions.push.apply(expressions, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(
            // 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 _this.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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(providers.filter(function (provider) { return !!provider.useClass; }).map(function (provider) { return _this.serializeSummary({
            summaryKind: CompileSummaryKind.Injectable, type: provider.useClass
        }); })));
        return literalArr(expressions);
    };
    ForJitSerializer.prototype.serializeSummaryRef = function (typeSymbol) {
        var jitImportedSymbol = this.symbolResolver.getStaticSymbol(summaryForJitFileName(typeSymbol.filePath), summaryForJitName(typeSymbol.name));
        return this.outputCtx.importExpr(jitImportedSymbol);
    };
    ForJitSerializer.prototype.serializeSummary = function (data) {
        var outputCtx = this.outputCtx;
        var Transformer = /** @class */ (function () {
            function Transformer() {
            }
            Transformer.prototype.visitArray = function (arr, context) {
                var _this = this;
                return literalArr(arr.map(function (entry) { return visitValue(entry, _this, context); }));
            };
            Transformer.prototype.visitStringMap = function (map, context) {
                var _this = this;
                return new LiteralMapExpr(Object.keys(map).map(function (key) { return new LiteralMapEntry(key, visitValue(map[key], _this, context), false); }));
            };
            Transformer.prototype.visitPrimitive = function (value, context) { return literal(value); };
            Transformer.prototype.visitOther = function (value, context) {
                if (value instanceof StaticSymbol) {
                    return outputCtx.importExpr(value);
                }
                else {
                    throw new Error("Illegal State: Encountered value " + value);
                }
            };
            return Transformer;
        }());
        return visitValue(data, new Transformer(), null);
    };
    return ForJitSerializer;
}());
var FromJsonDeserializer = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FromJsonDeserializer, _super);
    function FromJsonDeserializer(symbolCache, summaryResolver) {
        var _this = _super.call(this) || this;
        _this.symbolCache = symbolCache;
        _this.summaryResolver = summaryResolver;
        return _this;
    }
    FromJsonDeserializer.prototype.deserialize = function (libraryFileName, json) {
        var _this = this;
        var data = JSON.parse(json);
        var allImportAs = [];
        this.symbols = data.symbols.map(function (serializedSymbol) { return _this.symbolCache.get(_this.summaryResolver.fromSummaryFileName(serializedSymbol.filePath, libraryFileName), serializedSymbol.name); });
        data.symbols.forEach(function (serializedSymbol, index) {
            var symbol = _this.symbols[index];
            var importAs = serializedSymbol.importAs;
            if (typeof importAs === 'number') {
                allImportAs.push({ symbol: symbol, importAs: _this.symbols[importAs] });
            }
            else if (typeof importAs === 'string') {
                allImportAs.push({ symbol: symbol, importAs: _this.symbolCache.get(ngfactoryFilePath(libraryFileName), importAs) });
            }
        });
        var summaries = visitValue(data.summaries, this, null);
        return { moduleName: data.moduleName, summaries: summaries, importAs: allImportAs };
    };
    FromJsonDeserializer.prototype.visitStringMap = function (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 _super.prototype.visitStringMap.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 = /** @class */ (function () {
    function AotCompiler(_config, _options, _host, reflector, _metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _typeCheckCompiler, _ngModuleCompiler, _injectableCompiler, _outputEmitter, _summaryResolver, _symbolResolver) {
        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();
    }
    AotCompiler.prototype.clearCache = function () { this._metadataResolver.clearCache(); };
    AotCompiler.prototype.analyzeModulesSync = function (rootFiles) {
        var _this = this;
        var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
        analyzeResult.ngModules.forEach(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true); });
        return analyzeResult;
    };
    AotCompiler.prototype.analyzeModulesAsync = function (rootFiles) {
        var _this = this;
        var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
        return Promise
            .all(analyzeResult.ngModules.map(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false); }))
            .then(function () { return analyzeResult; });
    };
    AotCompiler.prototype._analyzeFile = function (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;
    };
    AotCompiler.prototype._analyzeFileForInjectables = function (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;
    };
    AotCompiler.prototype.findGeneratedFileNames = function (fileName) {
        var _this = 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 = _this._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 = _this._host.resourceNameToFileName(styleUrl, file.fileName);
                if (!normalizedUrl) {
                    throw syntaxError("Couldn't resolve resource " + styleUrl + " relative to " + file.fileName);
                }
                var needsShim = (compMeta.template.encapsulation ||
                    _this._config.defaultEncapsulation) === ViewEncapsulation.Emulated;
                genFileNames.push(_stylesModuleUrl(normalizedUrl, needsShim, fileSuffix));
                if (_this._options.allowEmptyCodegenFiles) {
                    genFileNames.push(_stylesModuleUrl(normalizedUrl, !needsShim, fileSuffix));
                }
            });
        });
        return genFileNames;
    };
    AotCompiler.prototype.emitBasicStub = function (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: " + 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: " + 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);
    };
    AotCompiler.prototype.emitTypeCheckStub = function (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;
    };
    AotCompiler.prototype.loadFilesAsync = function (fileNames, tsFiles) {
        var _this = this;
        var files = fileNames.map(function (fileName) { return _this._analyzeFile(fileName); });
        var loadingPromises = [];
        files.forEach(function (file) { return file.ngModules.forEach(function (ngModule) {
            return loadingPromises.push(_this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false));
        }); });
        var analyzedInjectables = tsFiles.map(function (tsFile) { return _this._analyzeFileForInjectables(tsFile); });
        return Promise.all(loadingPromises).then(function (_) { return ({
            analyzedModules: mergeAndValidateNgFiles(files),
            analyzedInjectables: analyzedInjectables,
        }); });
    };
    AotCompiler.prototype.loadFilesSync = function (fileNames, tsFiles) {
        var _this = this;
        var files = fileNames.map(function (fileName) { return _this._analyzeFile(fileName); });
        files.forEach(function (file) { return file.ngModules.forEach(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true); }); });
        var analyzedInjectables = tsFiles.map(function (tsFile) { return _this._analyzeFileForInjectables(tsFile); });
        return {
            analyzedModules: mergeAndValidateNgFiles(files),
            analyzedInjectables: analyzedInjectables,
        };
    };
    AotCompiler.prototype._createNgFactoryStub = function (outputCtx, file, emitFlags) {
        var _this = 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
            _this._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 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ngModuleMeta.transitiveModule.directives.map(function (d) { return d.reference; }), ngModuleMeta.transitiveModule.pipes.map(function (d) { return d.reference; }), ngModuleMeta.importedModules.map(function (m) { return m.type.reference; }), ngModuleMeta.exportedModules.map(function (m) { return m.type.reference; }), _this._externalIdentifierReferences([Identifiers.TemplateRef, Identifiers.ElementRef]));
            var externalReferenceVars = new Map();
            externalReferences.forEach(function (ref, typeIndex) {
                externalReferenceVars.set(ref, "_decl" + ngModuleIndex + "_" + 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 = _this._metadataResolver.getDirectiveMetadata(dirId.reference);
                    if (!compMeta.isComponent) {
                        return;
                    }
                    componentId++;
                    _this._createTypeCheckBlock(outputCtx, compMeta.type.reference.name + "_Host_" + componentId, ngModuleMeta, _this._metadataResolver.getHostComponentMetadata(compMeta), [compMeta.type], externalReferenceVars);
                    _this._createTypeCheckBlock(outputCtx, compMeta.type.reference.name + "_" + componentId, ngModuleMeta, compMeta, ngModuleMeta.transitiveModule.directives, externalReferenceVars);
                });
            }
        });
        if (outputCtx.statements.length === 0) {
            _createEmptyStub(outputCtx);
        }
    };
    AotCompiler.prototype._externalIdentifierReferences = function (references) {
        var e_1, _a;
        var result = [];
        try {
            for (var references_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(references), references_1_1 = references_1.next(); !references_1_1.done; references_1_1 = references_1.next()) {
                var reference = references_1_1.value;
                var token = createTokenForExternalReference(this.reflector, reference);
                if (token.identifier) {
                    result.push(token.identifier.reference);
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (references_1_1 && !references_1_1.done && (_a = references_1.return)) _a.call(references_1);
            }
            finally { if (e_1) throw e_1.error; }
        }
        return result;
    };
    AotCompiler.prototype._createTypeCheckBlock = function (ctx, componentId, moduleMeta, compMeta, directives, externalReferenceVars) {
        var _a;
        var _b = this._parseTemplate(compMeta, moduleMeta, directives), parsedTemplate = _b.template, usedPipes = _b.pipes;
        (_a = ctx.statements).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._typeCheckCompiler.compileComponent(componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars, ctx)));
    };
    AotCompiler.prototype.emitMessageBundle = function (analyzeResult, locale) {
        var _this = 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 = _this._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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(messageBundle.updateFromTemplate(html, templateUrl, interpolationConfig)));
            });
        });
        if (errors.length) {
            throw new Error(errors.map(function (e) { return e.toString(); }).join('\n'));
        }
        return messageBundle;
    };
    AotCompiler.prototype.emitAllPartialModules = function (_a, r3Files) {
        var _this = this;
        var ngModuleByPipeOrDirective = _a.ngModuleByPipeOrDirective, files = _a.files;
        var contextMap = new Map();
        var getContext = function (fileName) {
            if (!contextMap.has(fileName)) {
                contextMap.set(fileName, _this._createOutputContext(fileName));
            }
            return contextMap.get(fileName);
        };
        files.forEach(function (file) { return _this._compilePartialModule(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables, getContext(file.fileName)); });
        r3Files.forEach(function (file) { return _this._compileShallowModules(file.fileName, file.shallowModules, getContext(file.fileName)); });
        return Array.from(contextMap.values())
            .map(function (context) { return ({
            fileName: context.genFilePath,
            statements: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(context.constantPool.statements, context.statements),
        }); });
    };
    AotCompiler.prototype._compileShallowModules = function (fileName, shallowModules, context) {
        var _this = this;
        shallowModules.forEach(function (module) { return compileNgModuleFromRender2(context, module, _this._injectableCompiler); });
    };
    AotCompiler.prototype._compilePartialModule = function (fileName, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables, context) {
        var _this = 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 = _this._metadataResolver.getDirectiveMetadata(directiveType);
            if (directiveMetadata.isComponent) {
                var module = ngModuleByPipeOrDirective.get(directiveType);
                module ||
                    error("Cannot determine the module for component '" + 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_1 = new Map();
                var directives_1 = module.transitiveModule.directives.map(function (dir) { return _this._metadataResolver.getDirectiveSummary(dir.reference); });
                directives_1.forEach(function (directive) {
                    if (directive.selector) {
                        directiveTypeBySel_1.set(directive.selector, directive.type.reference);
                    }
                });
                // Map of StaticType by pipe names
                var pipeTypeByName_1 = new Map();
                var pipes_1 = module.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });
                pipes_1.forEach(function (pipe) { pipeTypeByName_1.set(pipe.name, pipe.type.reference); });
                compileComponentFromRender2(context, directiveMetadata, render3Ast, _this.reflector, hostBindingParser, directiveTypeBySel_1, pipeTypeByName_1);
            }
            else {
                compileDirectiveFromRender2(context, directiveMetadata, _this.reflector, hostBindingParser);
            }
        });
        pipes.forEach(function (pipeType) {
            var pipeMetadata = _this._metadataResolver.getPipeMetadata(pipeType);
            if (pipeMetadata) {
                compilePipeFromRender2(context, pipeMetadata, _this.reflector);
            }
        });
        injectables.forEach(function (injectable) { return _this._injectableCompiler.compile(injectable, context); });
    };
    AotCompiler.prototype.emitAllPartialModules2 = function (files) {
        var _this = 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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this._emitPartialModule2(file.fileName, file.injectables)));
            return r;
        }, []);
    };
    AotCompiler.prototype._emitPartialModule2 = function (fileName, injectables) {
        var _this = this;
        var context = this._createOutputContext(fileName);
        injectables.forEach(function (injectable) { return _this._injectableCompiler.compile(injectable, context); });
        if (context.statements && context.statements.length > 0) {
            return [{ fileName: fileName, statements: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(context.constantPool.statements, context.statements) }];
        }
        return [];
    };
    AotCompiler.prototype.emitAllImpls = function (analyzeResult) {
        var _this = this;
        var ngModuleByPipeOrDirective = analyzeResult.ngModuleByPipeOrDirective, files = analyzeResult.files;
        var sourceModules = files.map(function (file) { return _this._compileImplFile(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables); });
        return flatten(sourceModules);
    };
    AotCompiler.prototype._compileImplFile = function (srcFileUrl, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables) {
        var _this = this;
        var fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(srcFileUrl, true)[1]);
        var generatedFiles = [];
        var outputCtx = this._createOutputContext(ngfactoryFilePath(srcFileUrl, true));
        generatedFiles.push.apply(generatedFiles, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._createSummary(srcFileUrl, directives, pipes, ngModules, injectables, outputCtx)));
        // compile all ng modules
        ngModules.forEach(function (ngModuleMeta) { return _this._compileModule(outputCtx, ngModuleMeta); });
        // compile components
        directives.forEach(function (dirType) {
            var compMeta = _this._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 " + identifierName(compMeta.type) + "!");
            }
            // compile styles
            var componentStylesheet = _this._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 = _this._styleCompiler.needsStyleShim(compMeta);
                generatedFiles.push(_this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, shim, fileSuffix));
                if (_this._options.allowEmptyCodegenFiles) {
                    generatedFiles.push(_this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, !shim, fileSuffix));
                }
            });
            // compile components
            var compViewVars = _this._compileComponent(outputCtx, compMeta, ngModule, ngModule.transitiveModule.directives, componentStylesheet, fileSuffix);
            _this._compileComponentFactory(outputCtx, compMeta, ngModule, fileSuffix);
        });
        if (outputCtx.statements.length > 0 || this._options.allowEmptyCodegenFiles) {
            var srcModule = this._codegenSourceModule(srcFileUrl, outputCtx);
            generatedFiles.unshift(srcModule);
        }
        return generatedFiles;
    };
    AotCompiler.prototype._createSummary = function (srcFileName, directives, pipes, ngModules, injectables, ngFactoryCtx) {
        var _this = this;
        var symbolSummaries = this._symbolResolver.getSymbolsOf(srcFileName)
            .map(function (symbol) { return _this._symbolResolver.resolveSymbol(symbol); });
        var typeData = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ngModules.map(function (meta) { return ({
            summary: _this._metadataResolver.getNgModuleSummary(meta.type.reference),
            metadata: _this._metadataResolver.getNgModuleMetadata(meta.type.reference)
        }); }), directives.map(function (ref) { return ({
            summary: _this._metadataResolver.getDirectiveSummary(ref),
            metadata: _this._metadataResolver.getDirectiveMetadata(ref)
        }); }), pipes.map(function (ref) { return ({
            summary: _this._metadataResolver.getPipeSummary(ref),
            metadata: _this._metadataResolver.getPipeMetadata(ref)
        }); }), injectables.map(function (ref) { return ({
            summary: _this._metadataResolver.getInjectableSummary(ref.symbol),
            metadata: _this._metadataResolver.getInjectableSummary(ref.symbol).type
        }); }));
        var forJitOutputCtx = this._options.enableSummariesForJit ?
            this._createOutputContext(summaryForJitFileName(srcFileName, true)) :
            null;
        var _a = serializeSummaries(srcFileName, forJitOutputCtx, this._summaryResolver, this._symbolResolver, symbolSummaries, typeData), json = _a.json, exportAs = _a.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;
    };
    AotCompiler.prototype._compileModule = function (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);
    };
    AotCompiler.prototype._compileComponentFactory = function (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]));
    };
    AotCompiler.prototype._compileComponent = function (outputCtx, compMeta, ngModule, directiveIdentifiers, componentStyles, fileSuffix) {
        var _a = this._parseTemplate(compMeta, ngModule, directiveIdentifiers), parsedTemplate = _a.template, usedPipes = _a.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;
    };
    AotCompiler.prototype._parseTemplate = function (compMeta, ngModule, directiveIdentifiers) {
        var _this = 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 _this._metadataResolver.getDirectiveSummary(dir.reference); });
        var pipes = ngModule.transitiveModule.pipes.map(function (pipe) { return _this._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;
    };
    AotCompiler.prototype._createOutputContext = function (genFilePath) {
        var _this = this;
        var importExpr$$1 = function (symbol, typeParams, useSummaries) {
            if (typeParams === void 0) { typeParams = null; }
            if (useSummaries === void 0) { useSummaries = true; }
            if (!(symbol instanceof StaticSymbol)) {
                throw new Error("Internal error: unknown identifier " + JSON.stringify(symbol));
            }
            var arity = _this._symbolResolver.getTypeArity(symbol) || 0;
            var _a = _this._symbolResolver.getImportAs(symbol, useSummaries) || symbol, filePath = _a.filePath, name = _a.name, members = _a.members;
            var importModule = _this._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 = _this._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() };
    };
    AotCompiler.prototype._fileNameToModuleName = function (importedFilePath, containingFilePath) {
        return this._summaryResolver.getKnownModuleName(importedFilePath) ||
            this._symbolResolver.getKnownModuleName(importedFilePath) ||
            this._host.fileNameToModuleName(importedFilePath, containingFilePath);
    };
    AotCompiler.prototype._codegenStyles = function (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);
    };
    AotCompiler.prototype._codegenSourceModule = function (srcFileUrl, ctx) {
        return new GeneratedFile(srcFileUrl, ctx.genFilePath, ctx.statements);
    };
    AotCompiler.prototype.listLazyRoutes = function (entryRoute, analyzedModules) {
        var e_2, _a, e_3, _b;
        var self = this;
        if (entryRoute) {
            var symbol = parseLazyRoute(entryRoute, this.reflector).referencedModule;
            return visitLazyRoute(symbol);
        }
        else if (analyzedModules) {
            var allLazyRoutes = [];
            try {
                for (var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(analyzedModules.ngModules), _d = _c.next(); !_d.done; _d = _c.next()) {
                    var ngModule = _d.value;
                    var lazyRoutes = listLazyRoutes(ngModule, this.reflector);
                    try {
                        for (var lazyRoutes_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(lazyRoutes), lazyRoutes_1_1 = lazyRoutes_1.next(); !lazyRoutes_1_1.done; lazyRoutes_1_1 = lazyRoutes_1.next()) {
                            var lazyRoute = lazyRoutes_1_1.value;
                            allLazyRoutes.push(lazyRoute);
                        }
                    }
                    catch (e_3_1) { e_3 = { error: e_3_1 }; }
                    finally {
                        try {
                            if (lazyRoutes_1_1 && !lazyRoutes_1_1.done && (_b = lazyRoutes_1.return)) _b.call(lazyRoutes_1);
                        }
                        finally { if (e_3) throw e_3.error; }
                    }
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
                }
                finally { if (e_2) throw e_2.error; }
            }
            return allLazyRoutes;
        }
        else {
            throw new Error("Either route or analyzedModules has to be specified!");
        }
        function visitLazyRoute(symbol, seenRoutes, allLazyRoutes) {
            if (seenRoutes === void 0) { seenRoutes = new Set(); }
            if (allLazyRoutes === void 0) { allLazyRoutes = []; }
            var e_4, _a;
            // 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);
            try {
                for (var lazyRoutes_2 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(lazyRoutes), lazyRoutes_2_1 = lazyRoutes_2.next(); !lazyRoutes_2_1.done; lazyRoutes_2_1 = lazyRoutes_2.next()) {
                    var lazyRoute = lazyRoutes_2_1.value;
                    allLazyRoutes.push(lazyRoute);
                    visitLazyRoute(lazyRoute.referencedModule, seenRoutes, allLazyRoutes);
                }
            }
            catch (e_4_1) { e_4 = { error: e_4_1 }; }
            finally {
                try {
                    if (lazyRoutes_2_1 && !lazyRoutes_2_1.done && (_a = lazyRoutes_2.return)) _a.call(lazyRoutes_2);
                }
                finally { if (e_4) throw e_4.error; }
            }
            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 "" + stylesheetUrl + (shim ? '.shim' : '') + ".ngstyle" + 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 " + s.name + " in " + s.filePath + "! Add " + 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 (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 module = metadataResolver.getShallowModuleMetadata(symbol);
                    if (module) {
                        shallowModules.push(module);
                    }
                }
            }
        });
    }
    return { fileName: fileName, injectables: injectables, shallowModules: shallowModules };
}
function isValueExportingNonSourceFile(host, metadata) {
    var exportsNonSourceFiles = false;
    var Visitor = /** @class */ (function () {
        function Visitor() {
        }
        Visitor.prototype.visitArray = function (arr, context) {
            var _this = this;
            arr.forEach(function (v) { return visitValue(v, _this, context); });
        };
        Visitor.prototype.visitStringMap = function (map, context) {
            var _this = this;
            Object.keys(map).forEach(function (key) { return visitValue(map[key], _this, context); });
        };
        Visitor.prototype.visitPrimitive = function (value, context) { };
        Visitor.prototype.visitOther = function (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, indent) {
    if (indent === void 0) { indent = 0; }
    if (!chain)
        return '';
    var position = chain.position ?
        chain.position.fileName + "(" + (chain.position.line + 1) + "," + (chain.position.column + 1) + ")" :
        '';
    var prefix = position && indent === 0 ? position + ": " : '';
    var postfix = position && indent !== 0 ? " at " + position : '';
    var message = "" + prefix + chain.message + postfix;
    return "" + indentStr(indent) + message + ((chain.next && ('\n' + formatChain(chain.next, indent + 2))) || '');
}
function formattedError(chain) {
    var message = formatChain(chain) + '.';
    var error$$1 = syntaxError(message);
    error$$1[FORMATTED_MESSAGE] = true;
    error$$1.chain = chain;
    error$$1.position = chain.position;
    return error$$1;
}
function isFormattedError(error$$1) {
    return !!error$$1[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 = /** @class */ (function () {
    function StaticReflector(summaryResolver, symbolResolver, knownMetadataClasses, knownMetadataFunctions, errorRecorder) {
        if (knownMetadataClasses === void 0) { knownMetadataClasses = []; }
        if (knownMetadataFunctions === void 0) { knownMetadataFunctions = []; }
        var _this = this;
        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 _this._registerDecoratorOrConstructor(_this.getStaticSymbol(kc.filePath, kc.name), kc.ctor); });
        knownMetadataFunctions.forEach(function (kf) { return _this._registerFunction(_this.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]);
    }
    StaticReflector.prototype.componentModuleUrl = function (typeOrFunc) {
        var staticSymbol = this.findSymbolDeclaration(typeOrFunc);
        return this.symbolResolver.getResourcePath(staticSymbol);
    };
    StaticReflector.prototype.resolveExternalReference = function (ref, containingFile) {
        var key = undefined;
        if (!containingFile) {
            key = ref.moduleName + ":" + ref.name;
            var declarationSymbol_1 = this.resolvedExternalReferences.get(key);
            if (declarationSymbol_1)
                return declarationSymbol_1;
        }
        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;
    };
    StaticReflector.prototype.findDeclaration = function (moduleUrl, name, containingFile) {
        return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(moduleUrl, name, containingFile));
    };
    StaticReflector.prototype.tryFindDeclaration = function (moduleUrl, name, containingFile) {
        var _this = this;
        return this.symbolResolver.ignoreErrorsFor(function () { return _this.findDeclaration(moduleUrl, name, containingFile); });
    };
    StaticReflector.prototype.findSymbolDeclaration = function (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;
    };
    StaticReflector.prototype.tryAnnotations = function (type) {
        var originalRecorder = this.errorRecorder;
        this.errorRecorder = function (error$$1, fileName) { };
        try {
            return this.annotations(type);
        }
        finally {
            this.errorRecorder = originalRecorder;
        }
    };
    StaticReflector.prototype.annotations = function (type) {
        var _this = this;
        return this._annotations(type, function (type, decorators) { return _this.simplify(type, decorators); }, this.annotationCache);
    };
    StaticReflector.prototype.shallowAnnotations = function (type) {
        var _this = this;
        return this._annotations(type, function (type, decorators) { return _this.simplify(type, decorators, true); }, this.shallowAnnotationCache);
    };
    StaticReflector.prototype._annotations = function (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 parentAnnotations = this.annotations(parentType);
                annotations.push.apply(annotations, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(parentAnnotations));
            }
            var ownAnnotations_1 = [];
            if (classMetadata['decorators']) {
                ownAnnotations_1 = simplify(type, classMetadata['decorators']);
                if (ownAnnotations_1) {
                    annotations.push.apply(annotations, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ownAnnotations_1));
                }
            }
            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_1.some(function (ann) { return requiredType.isTypeOf(ann); }); });
                    if (!typeHasRequiredAnnotation) {
                        this.reportError(formatMetadataError(metadataError("Class " + type.name + " in " + type.filePath + " extends from a " + CompileSummaryKind[summary.type.summaryKind] + " in another compilation unit without duplicating the decorator", 
                        /* summary */ undefined, "Please add a " + 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;
    };
    StaticReflector.prototype.propMetadata = function (type) {
        var _this = 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_1 = this.propMetadata(parentType);
                Object.keys(parentPropMetadata_1).forEach(function (parentProp) {
                    propMetadata[parentProp] = parentPropMetadata_1[parentProp];
                });
            }
            var members_1 = classMetadata['members'] || {};
            Object.keys(members_1).forEach(function (propName) {
                var propData = members_1[propName];
                var prop = propData
                    .find(function (a) { return a['__symbolic'] == 'property' || a['__symbolic'] == 'method'; });
                var decorators = [];
                if (propMetadata[propName]) {
                    decorators.push.apply(decorators, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(propMetadata[propName]));
                }
                propMetadata[propName] = decorators;
                if (prop && prop['decorators']) {
                    decorators.push.apply(decorators, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this.simplify(type, prop['decorators'])));
                }
            });
            this.propertyCache.set(type, propMetadata);
        }
        return propMetadata;
    };
    StaticReflector.prototype.parameters = function (type) {
        var _this = this;
        if (!(type instanceof StaticSymbol)) {
            this.reportError(new Error("parameters received " + JSON.stringify(type) + " which is not a StaticSymbol"), type);
            return [];
        }
        try {
            var parameters_1 = this.parameterCache.get(type);
            if (!parameters_1) {
                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_1 = this.simplify(type, ctor['parameterDecorators'] || []);
                    parameters_1 = [];
                    rawParameterTypes.forEach(function (rawParamType, index) {
                        var nestedResult = [];
                        var paramType = _this.trySimplify(type, rawParamType);
                        if (paramType)
                            nestedResult.push(paramType);
                        var decorators = parameterDecorators_1 ? parameterDecorators_1[index] : null;
                        if (decorators) {
                            nestedResult.push.apply(nestedResult, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(decorators));
                        }
                        parameters_1.push(nestedResult);
                    });
                }
                else if (parentType) {
                    parameters_1 = this.parameters(parentType);
                }
                if (!parameters_1) {
                    parameters_1 = [];
                }
                this.parameterCache.set(type, parameters_1);
            }
            return parameters_1;
        }
        catch (e) {
            console.error("Failed on type " + JSON.stringify(type) + " with error " + e);
            throw e;
        }
    };
    StaticReflector.prototype._methodNames = function (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_1 = this._methodNames(parentType);
                Object.keys(parentMethodNames_1).forEach(function (parentProp) {
                    methodNames[parentProp] = parentMethodNames_1[parentProp];
                });
            }
            var members_2 = classMetadata['members'] || {};
            Object.keys(members_2).forEach(function (propName) {
                var propData = members_2[propName];
                var isMethod = propData.some(function (a) { return a['__symbolic'] == 'method'; });
                methodNames[propName] = methodNames[propName] || isMethod;
            });
            this.methodCache.set(type, methodNames);
        }
        return methodNames;
    };
    StaticReflector.prototype._staticMembers = function (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;
    };
    StaticReflector.prototype.findParentType = function (type, classMetadata) {
        var parentType = this.trySimplify(type, classMetadata['extends']);
        if (parentType instanceof StaticSymbol) {
            return parentType;
        }
    };
    StaticReflector.prototype.hasLifecycleHook = function (type, lcProperty) {
        if (!(type instanceof StaticSymbol)) {
            this.reportError(new Error("hasLifecycleHook received " + JSON.stringify(type) + " which is not a StaticSymbol"), type);
        }
        try {
            return !!this._methodNames(type)[lcProperty];
        }
        catch (e) {
            console.error("Failed on type " + JSON.stringify(type) + " with error " + e);
            throw e;
        }
    };
    StaticReflector.prototype.guards = function (type) {
        var e_1, _a;
        if (!(type instanceof StaticSymbol)) {
            this.reportError(new Error("guards received " + JSON.stringify(type) + " which is not a StaticSymbol"), type);
            return {};
        }
        var staticMembers = this._staticMembers(type);
        var result = {};
        try {
            for (var staticMembers_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(staticMembers), staticMembers_1_1 = staticMembers_1.next(); !staticMembers_1_1.done; staticMembers_1_1 = staticMembers_1.next()) {
                var name_1 = staticMembers_1_1.value;
                if (name_1.endsWith(TYPEGUARD_POSTFIX)) {
                    var property = name_1.substr(0, name_1.length - TYPEGUARD_POSTFIX.length);
                    var value = void 0;
                    if (property.endsWith(USE_IF)) {
                        property = name_1.substr(0, property.length - USE_IF.length);
                        value = USE_IF;
                    }
                    else {
                        value = this.getStaticSymbol(type.filePath, type.name, [name_1]);
                    }
                    result[property] = value;
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (staticMembers_1_1 && !staticMembers_1_1.done && (_a = staticMembers_1.return)) _a.call(staticMembers_1);
            }
            finally { if (e_1) throw e_1.error; }
        }
        return result;
    };
    StaticReflector.prototype._registerDecoratorOrConstructor = function (type, ctor) {
        this.conversionMap.set(type, function (context, args) { return new (ctor.bind.apply(ctor, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))(); });
    };
    StaticReflector.prototype._registerFunction = function (type, fn) {
        this.conversionMap.set(type, function (context, args) { return fn.apply(undefined, args); });
    };
    StaticReflector.prototype.initializeConversionMap = function () {
        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.
     */
    StaticReflector.prototype.getStaticSymbol = function (declarationFile, name, members) {
        return this.symbolResolver.getStaticSymbol(declarationFile, name, members);
    };
    /**
     * Simplify but discard any errors
     */
    StaticReflector.prototype.trySimplify = function (context, value) {
        var originalRecorder = this.errorRecorder;
        this.errorRecorder = function (error$$1, fileName) { };
        var result = this.simplify(context, value);
        this.errorRecorder = originalRecorder;
        return result;
    };
    /** @internal */
    StaticReflector.prototype.simplify = function (context, value, lazy) {
        if (lazy === void 0) { lazy = false; }
        var self = this;
        var scope = BindingScope$1.empty;
        var calling = new Map();
        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 = "'" + nestedContext.name + "' " + 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 '" + functionSymbol.name + "' recursively",
                            value: targetFunction
                        }, functionSymbol);
                    }
                    try {
                        var value_1 = targetFunction['value'];
                        if (value_1 && (depth != 0 || value_1.__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) {
                                args.push.apply(args, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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_1;
                            try {
                                scope = functionScope.done();
                                result_1 = simplifyNested(functionSymbol, value_1);
                            }
                            finally {
                                scope = oldScope;
                            }
                            return result_1;
                        }
                    }
                    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) {
                var e_2, _a, e_3, _b;
                if (isPrimitive(expression)) {
                    return expression;
                }
                if (expression instanceof Array) {
                    var result_2 = [];
                    try {
                        for (var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(expression), _d = _c.next(); !_d.done; _d = _c.next()) {
                            var item = _d.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)) {
                                    try {
                                        for (var spreadArray_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(spreadArray), spreadArray_1_1 = spreadArray_1.next(); !spreadArray_1_1.done; spreadArray_1_1 = spreadArray_1.next()) {
                                            var spreadItem = spreadArray_1_1.value;
                                            result_2.push(spreadItem);
                                        }
                                    }
                                    catch (e_3_1) { e_3 = { error: e_3_1 }; }
                                    finally {
                                        try {
                                            if (spreadArray_1_1 && !spreadArray_1_1.done && (_b = spreadArray_1.return)) _b.call(spreadArray_1);
                                        }
                                        finally { if (e_3) throw e_3.error; }
                                    }
                                    continue;
                                }
                            }
                            var value_2 = simplify(item);
                            if (shouldIgnore(value_2)) {
                                continue;
                            }
                            result_2.push(value_2);
                        }
                    }
                    catch (e_2_1) { e_2 = { error: e_2_1 }; }
                    finally {
                        try {
                            if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
                        }
                        finally { if (e_2) throw e_2.error; }
                    }
                    return result_2;
                }
                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 = void 0;
                        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_2 = expression['name'];
                                var localValue = scope.resolve(name_2);
                                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;
    };
    StaticReflector.prototype.getTypeMetadata = function (type) {
        var resolvedSymbol = this.symbolResolver.resolveSymbol(type);
        return resolvedSymbol && resolvedSymbol.metadata ? resolvedSymbol.metadata :
            { __symbolic: 'class' };
    };
    StaticReflector.prototype.reportError = function (error$$1, context, path) {
        if (this.errorRecorder) {
            this.errorRecorder(formatMetadataError(error$$1, context), (context && context.filePath) || path);
        }
        else {
            throw error$$1;
        }
    };
    StaticReflector.prototype.error = function (_a, reportingContext) {
        var message = _a.message, summary = _a.summary, advise = _a.advise, position = _a.position, context = _a.context, value = _a.value, symbol = _a.symbol, chain = _a.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$$1 = syntaxError(message);
    error$$1[METADATA_ERROR] = true;
    if (advise)
        error$$1.advise = advise;
    if (position)
        error$$1.position = position;
    if (summary)
        error$$1.summary = summary;
    if (context)
        error$$1.context = context;
    if (chain)
        error$$1.chain = chain;
    if (symbol)
        error$$1.symbol = symbol;
    return error$$1;
}
function isMetadataError(error$$1) {
    return !!error$$1[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 " + 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 " + context.typeName;
            }
            break;
        case FUNCTION_CALL_NOT_SUPPORTED:
            if (context && context.name) {
                return "Function calls are not supported in decorators but '" + 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 '" + 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 '" + 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 '" + context.name + "'";
            }
            break;
        case LAMBDA_NOT_SUPPORTED:
            return "Consider changing the function expression into an exported function";
    }
    return undefined;
}
function errorSummary(error$$1) {
    if (error$$1.summary) {
        return error$$1.summary;
    }
    switch (error$$1.message) {
        case REFERENCE_TO_NONEXPORTED_CLASS:
            if (error$$1.context && error$$1.context.className) {
                return "references non-exported class " + error$$1.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$$1.context && error$$1.context.name) {
                return "calls '" + error$$1.context.name + "'";
            }
            return "calls a function";
        case REFERENCE_TO_LOCAL_SYMBOL:
            if (error$$1.context && error$$1.context.name) {
                return "references local variable " + error$$1.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 = /** @class */ (function () {
    function BindingScope() {
    }
    BindingScope.build = function () {
        var current = new Map();
        return {
            define: function (name, value) {
                current.set(name, value);
                return this;
            },
            done: function () {
                return current.size > 0 ? new PopulatedScope(current) : BindingScope.empty;
            }
        };
    };
    BindingScope.missing = {};
    BindingScope.empty = { resolve: function (name) { return BindingScope.missing; } };
    return BindingScope;
}());
var PopulatedScope = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PopulatedScope, _super);
    function PopulatedScope(bindings) {
        var _this = _super.call(this) || this;
        _this.bindings = bindings;
        return _this;
    }
    PopulatedScope.prototype.resolve = function (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 '" + chain.symbol.name + "'" : '';
    var message = "" + expanded + 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 '" + 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 = /** @class */ (function () {
    function AotSummaryResolver(host, staticSymbolCache) {
        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();
    }
    AotSummaryResolver.prototype.isLibraryFile = function (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));
    };
    AotSummaryResolver.prototype.toSummaryFileName = function (filePath, referringSrcFileName) {
        return this.host.toSummaryFileName(filePath, referringSrcFileName);
    };
    AotSummaryResolver.prototype.fromSummaryFileName = function (fileName, referringLibFileName) {
        return this.host.fromSummaryFileName(fileName, referringLibFileName);
    };
    AotSummaryResolver.prototype.resolveSummary = function (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;
    };
    AotSummaryResolver.prototype.getSymbolsOf = function (filePath) {
        if (this._loadSummaryFile(filePath)) {
            return Array.from(this.summaryCache.keys()).filter(function (symbol) { return symbol.filePath === filePath; });
        }
        return null;
    };
    AotSummaryResolver.prototype.getImportAs = function (staticSymbol) {
        staticSymbol.assertNoMembers();
        return this.importAs.get(staticSymbol);
    };
    /**
     * Converts a file path to a module name that can be used as an `import`.
     */
    AotSummaryResolver.prototype.getKnownModuleName = function (importedFilePath) {
        return this.knownFileNameToModuleNames.get(importedFilePath) || null;
    };
    AotSummaryResolver.prototype.addSummary = function (summary) { this.summaryCache.set(summary.symbol, summary); };
    AotSummaryResolver.prototype._loadSummaryFile = function (filePath) {
        var _this = 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 " + summaryFilePath);
                throw e;
            }
        }
        hasSummary = json != null;
        this.loadedFilePaths.set(filePath, hasSummary);
        if (json) {
            var _a = deserializeSummaries(this.staticSymbolCache, this, filePath, json), moduleName = _a.moduleName, summaries = _a.summaries, importAs = _a.importAs;
            summaries.forEach(function (summary) { return _this.summaryCache.set(summary.symbol, summary); });
            if (moduleName) {
                this.knownFileNameToModuleNames.set(filePath, moduleName);
            }
            importAs.forEach(function (importAs) { _this.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 (basePath, url) {
            var filePath = host.resourceNameToFileName(url, basePath);
            if (!filePath) {
                throw syntaxError("Couldn't resolve resource " + url + " from " + 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 (url) { return compilerHost.loadResource(url); } }, urlResolver, htmlParser, config);
    var expressionParser = new Parser(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 = /** @class */ (function () {
    function SummaryResolver() {
    }
    return SummaryResolver;
}());
var JitSummaryResolver = /** @class */ (function () {
    function JitSummaryResolver() {
        this._summaries = new Map();
    }
    JitSummaryResolver.prototype.isLibraryFile = function () { return false; };
    JitSummaryResolver.prototype.toSummaryFileName = function (fileName) { return fileName; };
    JitSummaryResolver.prototype.fromSummaryFileName = function (fileName) { return fileName; };
    JitSummaryResolver.prototype.resolveSummary = function (reference) {
        return this._summaries.get(reference) || null;
    };
    JitSummaryResolver.prototype.getSymbolsOf = function () { return []; };
    JitSummaryResolver.prototype.getImportAs = function (reference) { return reference; };
    JitSummaryResolver.prototype.getKnownModuleName = function (fileName) { return null; };
    JitSummaryResolver.prototype.addSummary = function (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 = /** @class */ (function () {
    function _ExecutionContext(parent, instance, className, vars) {
        this.parent = parent;
        this.instance = instance;
        this.className = className;
        this.vars = vars;
        this.exports = [];
    }
    _ExecutionContext.prototype.createChildWihtLocalVars = function () {
        return new _ExecutionContext(this, this.instance, this.className, new Map());
    };
    return _ExecutionContext;
}());
var ReturnValue = /** @class */ (function () {
    function ReturnValue(value) {
        this.value = value;
    }
    return ReturnValue;
}());
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 () {
                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 () {
                var args = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                }
                var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);
                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 () {
        var _this = this;
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);
        _classStmt.fields.forEach(function (field) { _this[field.name] = undefined; });
        _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 = /** @class */ (function () {
    function StatementInterpreter(reflector) {
        this.reflector = reflector;
    }
    StatementInterpreter.prototype.debugAst = function (ast) { return debugOutputAstAsTypeScript(ast); };
    StatementInterpreter.prototype.visitDeclareVarStmt = function (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;
    };
    StatementInterpreter.prototype.visitWriteVarExpr = function (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 " + expr.name);
    };
    StatementInterpreter.prototype.visitWrappedNodeExpr = function (ast, ctx) {
        throw new Error('Cannot interpret a WrappedNodeExpr.');
    };
    StatementInterpreter.prototype.visitTypeofExpr = function (ast, ctx) {
        throw new Error('Cannot interpret a TypeofExpr');
    };
    StatementInterpreter.prototype.visitReadVarExpr = function (ast, ctx) {
        var varName = ast.name;
        if (ast.builtin != null) {
            switch (ast.builtin) {
                case BuiltinVar.Super:
                    return ctx.instance.__proto__;
                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 " + 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 " + varName);
    };
    StatementInterpreter.prototype.visitWriteKeyExpr = function (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;
    };
    StatementInterpreter.prototype.visitWritePropExpr = function (expr, ctx) {
        var receiver = expr.receiver.visitExpression(this, ctx);
        var value = expr.value.visitExpression(this, ctx);
        receiver[expr.name] = value;
        return value;
    };
    StatementInterpreter.prototype.visitInvokeMethodExpr = function (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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
                    break;
                case BuiltinMethod.SubscribeObservable:
                    result = receiver.subscribe({ next: args[0] });
                    break;
                case BuiltinMethod.Bind:
                    result = receiver.bind.apply(receiver, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
                    break;
                default:
                    throw new Error("Unknown builtin method " + expr.builtin);
            }
        }
        else {
            result = receiver[expr.name].apply(receiver, args);
        }
        return result;
    };
    StatementInterpreter.prototype.visitInvokeFunctionExpr = function (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$$1 = stmt.fn.visitExpression(this, ctx);
            return fn$$1.apply(null, args);
        }
    };
    StatementInterpreter.prototype.visitReturnStmt = function (stmt, ctx) {
        return new ReturnValue(stmt.value.visitExpression(this, ctx));
    };
    StatementInterpreter.prototype.visitDeclareClassStmt = function (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;
    };
    StatementInterpreter.prototype.visitExpressionStmt = function (stmt, ctx) {
        return stmt.expr.visitExpression(this, ctx);
    };
    StatementInterpreter.prototype.visitIfStmt = function (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;
    };
    StatementInterpreter.prototype.visitTryCatchStmt = function (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);
        }
    };
    StatementInterpreter.prototype.visitThrowStmt = function (stmt, ctx) {
        throw stmt.error.visitExpression(this, ctx);
    };
    StatementInterpreter.prototype.visitCommentStmt = function (stmt, context) { return null; };
    StatementInterpreter.prototype.visitJSDocCommentStmt = function (stmt, context) { return null; };
    StatementInterpreter.prototype.visitInstantiateExpr = function (ast, ctx) {
        var args = this.visitAllExpressions(ast.args, ctx);
        var clazz = ast.classExpr.visitExpression(this, ctx);
        return new (clazz.bind.apply(clazz, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))();
    };
    StatementInterpreter.prototype.visitLiteralExpr = function (ast, ctx) { return ast.value; };
    StatementInterpreter.prototype.visitExternalExpr = function (ast, ctx) {
        return this.reflector.resolveExternalReference(ast.value);
    };
    StatementInterpreter.prototype.visitConditionalExpr = function (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;
    };
    StatementInterpreter.prototype.visitNotExpr = function (ast, ctx) {
        return !ast.condition.visitExpression(this, ctx);
    };
    StatementInterpreter.prototype.visitAssertNotNullExpr = function (ast, ctx) {
        return ast.condition.visitExpression(this, ctx);
    };
    StatementInterpreter.prototype.visitCastExpr = function (ast, ctx) {
        return ast.value.visitExpression(this, ctx);
    };
    StatementInterpreter.prototype.visitFunctionExpr = function (ast, ctx) {
        var paramNames = ast.params.map(function (param) { return param.name; });
        return _declareFn(paramNames, ast.statements, ctx, this);
    };
    StatementInterpreter.prototype.visitDeclareFunctionStmt = function (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;
    };
    StatementInterpreter.prototype.visitBinaryOperatorExpr = function (ast, ctx) {
        var _this = this;
        var lhs = function () { return ast.lhs.visitExpression(_this, ctx); };
        var rhs = function () { return ast.rhs.visitExpression(_this, 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 " + ast.operator);
        }
    };
    StatementInterpreter.prototype.visitReadPropExpr = function (ast, ctx) {
        var result;
        var receiver = ast.receiver.visitExpression(this, ctx);
        result = receiver[ast.name];
        return result;
    };
    StatementInterpreter.prototype.visitReadKeyExpr = function (ast, ctx) {
        var receiver = ast.receiver.visitExpression(this, ctx);
        var prop = ast.index.visitExpression(this, ctx);
        return receiver[prop];
    };
    StatementInterpreter.prototype.visitLiteralArrayExpr = function (ast, ctx) {
        return this.visitAllExpressions(ast.entries, ctx);
    };
    StatementInterpreter.prototype.visitLiteralMapExpr = function (ast, ctx) {
        var _this = this;
        var result = {};
        ast.entries.forEach(function (entry) { return result[entry.key] = entry.value.visitExpression(_this, ctx); });
        return result;
    };
    StatementInterpreter.prototype.visitCommaExpr = function (ast, context) {
        var values = this.visitAllExpressions(ast.parts, context);
        return values[values.length - 1];
    };
    StatementInterpreter.prototype.visitAllExpressions = function (expressions, ctx) {
        var _this = this;
        return expressions.map(function (expr) { return expr.visitExpression(_this, ctx); });
    };
    StatementInterpreter.prototype.visitAllStatements = function (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 () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        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 = /** @class */ (function () {
    function JitCompiler(_metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _ngModuleCompiler, _summaryResolver, _reflector, _compilerConfig, _console, getExtraNgModuleProviders) {
        this._metadataResolver = _metadataResolver;
        this._templateParser = _templateParser;
        this._styleCompiler = _styleCompiler;
        this._viewCompiler = _viewCompiler;
        this._ngModuleCompiler = _ngModuleCompiler;
        this._summaryResolver = _summaryResolver;
        this._reflector = _reflector;
        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();
    }
    JitCompiler.prototype.compileModuleSync = function (moduleType) {
        return SyncAsync.assertSync(this._compileModuleAndComponents(moduleType, true));
    };
    JitCompiler.prototype.compileModuleAsync = function (moduleType) {
        return Promise.resolve(this._compileModuleAndComponents(moduleType, false));
    };
    JitCompiler.prototype.compileModuleAndAllComponentsSync = function (moduleType) {
        return SyncAsync.assertSync(this._compileModuleAndAllComponents(moduleType, true));
    };
    JitCompiler.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {
        return Promise.resolve(this._compileModuleAndAllComponents(moduleType, false));
    };
    JitCompiler.prototype.getComponentFactory = function (component) {
        var summary = this._metadataResolver.getDirectiveSummary(component);
        return summary.componentFactory;
    };
    JitCompiler.prototype.loadAotSummaries = function (summaries) {
        this.clearCache();
        this._addAotSummaries(summaries);
    };
    JitCompiler.prototype._addAotSummaries = function (fn$$1) {
        if (this._addedAotSummaries.has(fn$$1)) {
            return;
        }
        this._addedAotSummaries.add(fn$$1);
        var summaries = fn$$1();
        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 });
            }
        }
    };
    JitCompiler.prototype.hasAotSummary = function (ref) { return !!this._summaryResolver.resolveSummary(ref); };
    JitCompiler.prototype._filterJitIdentifiers = function (ids) {
        var _this = this;
        return ids.map(function (mod) { return mod.reference; }).filter(function (ref) { return !_this.hasAotSummary(ref); });
    };
    JitCompiler.prototype._compileModuleAndComponents = function (moduleType, isSync) {
        var _this = this;
        return SyncAsync.then(this._loadModules(moduleType, isSync), function () {
            _this._compileComponents(moduleType, null);
            return _this._compileModule(moduleType);
        });
    };
    JitCompiler.prototype._compileModuleAndAllComponents = function (moduleType, isSync) {
        var _this = this;
        return SyncAsync.then(this._loadModules(moduleType, isSync), function () {
            var componentFactories = [];
            _this._compileComponents(moduleType, componentFactories);
            return {
                ngModuleFactory: _this._compileModule(moduleType),
                componentFactories: componentFactories
            };
        });
    };
    JitCompiler.prototype._loadModules = function (mainModule, isSync) {
        var _this = 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 = _this._metadataResolver.getNgModuleMetadata(nestedNgModule);
            _this._filterJitIdentifiers(moduleMeta.declaredDirectives).forEach(function (ref) {
                var promise = _this._metadataResolver.loadDirectiveMetadata(moduleMeta.type.reference, ref, isSync);
                if (promise) {
                    loading.push(promise);
                }
            });
            _this._filterJitIdentifiers(moduleMeta.declaredPipes)
                .forEach(function (ref) { return _this._metadataResolver.getOrLoadPipeMetadata(ref); });
        });
        return SyncAsync.all(loading);
    };
    JitCompiler.prototype._compileModule = function (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
     */
    JitCompiler.prototype._compileComponents = function (mainModule, allComponentFactories) {
        var _this = 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 = _this._metadataResolver.getNgModuleMetadata(localMod);
            _this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {
                moduleByJitDirective.set(dirRef, localModuleMeta);
                var dirMeta = _this._metadataResolver.getDirectiveMetadata(dirRef);
                if (dirMeta.isComponent) {
                    templates.add(_this._createCompiledTemplate(dirMeta, localModuleMeta));
                    if (allComponentFactories) {
                        var template = _this._createCompiledHostTemplate(dirMeta.type.reference, localModuleMeta);
                        templates.add(template);
                        allComponentFactories.push(dirMeta.componentFactory);
                    }
                }
            });
        });
        transJitModules.forEach(function (localMod) {
            var localModuleMeta = _this._metadataResolver.getNgModuleMetadata(localMod);
            _this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {
                var dirMeta = _this._metadataResolver.getDirectiveMetadata(dirRef);
                if (dirMeta.isComponent) {
                    dirMeta.entryComponents.forEach(function (entryComponentType) {
                        var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);
                        templates.add(_this._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));
                    });
                }
            });
            localModuleMeta.entryComponents.forEach(function (entryComponentType) {
                if (!_this.hasAotSummary(entryComponentType.componentType)) {
                    var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);
                    templates.add(_this._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));
                }
            });
        });
        templates.forEach(function (template) { return _this._compileTemplate(template); });
    };
    JitCompiler.prototype.clearCacheFor = function (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);
        }
    };
    JitCompiler.prototype.clearCache = function () {
        // Note: don't clear the _addedAotSummaries, as they don't change!
        this._metadataResolver.clearCache();
        this._compiledTemplateCache.clear();
        this._compiledHostTemplateCache.clear();
        this._compiledNgModuleCache.clear();
    };
    JitCompiler.prototype._createCompiledHostTemplate = function (compType, ngModule) {
        if (!ngModule) {
            throw new Error("Component " + 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;
    };
    JitCompiler.prototype._createCompiledTemplate = function (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;
    };
    JitCompiler.prototype._compileTemplate = function (template) {
        var _this = 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 = _this._styleCompiler.compileStyles(createOutputContext(), compMeta, stylesheetMeta);
            externalStylesheetsByModuleUrl.set(stylesheetMeta.moduleUrl, compiledStylesheet);
        });
        this._resolveStylesCompileResult(componentStylesheet, externalStylesheetsByModuleUrl);
        var pipes = template.ngModule.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });
        var _a = this._parseTemplate(compMeta, template.ngModule, template.directives), parsedTemplate = _a.template, usedPipes = _a.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);
    };
    JitCompiler.prototype._parseTemplate = function (compMeta, ngModule, directiveIdentifiers) {
        var _this = this;
        // Note: ! is ok here as components always have a template.
        var preserveWhitespaces = compMeta.template.preserveWhitespaces;
        var directives = directiveIdentifiers.map(function (dir) { return _this._metadataResolver.getDirectiveSummary(dir.reference); });
        var pipes = ngModule.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });
        return this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);
    };
    JitCompiler.prototype._resolveStylesCompileResult = function (result, externalStylesheetsByModuleUrl) {
        var _this = this;
        result.dependencies.forEach(function (dep, i) {
            var nestedCompileResult = externalStylesheetsByModuleUrl.get(dep.moduleUrl);
            var nestedStylesArr = _this._resolveAndEvalStylesCompileResult(nestedCompileResult, externalStylesheetsByModuleUrl);
            dep.setValue(nestedStylesArr);
        });
    };
    JitCompiler.prototype._resolveAndEvalStylesCompileResult = function (result, externalStylesheetsByModuleUrl) {
        this._resolveStylesCompileResult(result, externalStylesheetsByModuleUrl);
        return this._interpretOrJit(sharedStylesheetJitUrl(result.meta, this._sharedStylesheetCount++), result.outputCtx.statements)[result.stylesVar];
    };
    JitCompiler.prototype._interpretOrJit = function (sourceUrl, statements) {
        if (!this._compilerConfig.useJit) {
            return interpretStatements(statements, this._reflector);
        }
        else {
            return jitStatements(sourceUrl, statements, this._reflector, this._compilerConfig.jitDevMode);
        }
    };
    return JitCompiler;
}());
var CompiledTemplate = /** @class */ (function () {
    function CompiledTemplate(isHost, compType, compMeta, ngModule, directives) {
        this.isHost = isHost;
        this.compType = compType;
        this.compMeta = compMeta;
        this.ngModule = ngModule;
        this.directives = directives;
        this._viewClass = null;
        this.isCompiled = false;
    }
    CompiledTemplate.prototype.compiled = function (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 '" + identifierName(meta.type) + "' because it is not a component.");
    }
}
function createOutputContext() {
    var importExpr$$1 = function (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 = /** @class */ (function () {
    function CompileReflector() {
    }
    return 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 = /** @class */ (function () {
    function UrlResolverImpl(_packagePrefix) {
        if (_packagePrefix === void 0) { _packagePrefix = null; }
        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`)
     */
    UrlResolverImpl.prototype.resolve = function (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 prefix + "/" + 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
 */
/**
 * An interface for retrieving documents by URL that the compiler uses
 * to load templates.
 */
var ResourceLoader = /** @class */ (function () {
    function ResourceLoader() {
    }
    ResourceLoader.prototype.get = function (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 Extractor = /** @class */ (function () {
    function Extractor(host, staticSymbolResolver, messageBundle, metadataResolver) {
        this.host = host;
        this.staticSymbolResolver = staticSymbolResolver;
        this.messageBundle = messageBundle;
        this.metadataResolver = metadataResolver;
    }
    Extractor.prototype.extract = function (rootFiles) {
        var _this = this;
        var _a = analyzeAndValidateNgModules(rootFiles, this.host, this.staticSymbolResolver, this.metadataResolver), files = _a.files, ngModules = _a.ngModules;
        return Promise
            .all(ngModules.map(function (ngModule) { return _this.metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false); }))
            .then(function () {
            var errors = [];
            files.forEach(function (file) {
                var compMetas = [];
                file.directives.forEach(function (directiveType) {
                    var dirMeta = _this.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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this.messageBundle.updateFromTemplate(html, templateUrl, interpolationConfig)));
                });
            });
            if (errors.length) {
                throw new Error(errors.map(function (e) { return e.toString(); }).join('\n'));
            }
            return _this.messageBundle;
        });
    };
    Extractor.create = function (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 (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 = /** @class */ (function () {
    function R3TargetBinder(directiveMatcher) {
        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.
     */
    R3TargetBinder.prototype.bind = function (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 _a = DirectiveBinder.apply(target.template, this.directiveMatcher), directives = _a.directives, bindings = _a.bindings, references = _a.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 _b = TemplateBinder.apply(target.template, scope), expressions = _b.expressions, symbols = _b.symbols, nestingLevel = _b.nestingLevel;
        return new R3BoundTarget(target, directives, bindings, references, expressions, symbols, nestingLevel);
    };
    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 = /** @class */ (function () {
    function Scope(parentScope) {
        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`.
     */
    Scope.apply = function (template) {
        var scope = new Scope();
        scope.ingest(template);
        return scope;
    };
    /**
     * Internal method to process the template and populate the `Scope`.
     */
    Scope.prototype.ingest = function (template) {
        var _this = this;
        if (template instanceof Template) {
            // Variables on an <ng-template> are defined in the inner scope.
            template.variables.forEach(function (node) { return _this.visitVariable(node); });
            // Process the nodes of the template.
            template.children.forEach(function (node) { return node.visit(_this); });
        }
        else {
            // No overarching `Template` instance, so process the nodes directly.
            template.forEach(function (node) { return node.visit(_this); });
        }
    };
    Scope.prototype.visitElement = function (element) {
        var _this = this;
        // `Element`s in the template may have `Reference`s which are captured in the scope.
        element.references.forEach(function (node) { return _this.visitReference(node); });
        // Recurse into the `Element`'s children.
        element.children.forEach(function (node) { return node.visit(_this); });
    };
    Scope.prototype.visitTemplate = function (template) {
        var _this = 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 _this.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);
    };
    Scope.prototype.visitVariable = function (variable) {
        // Declare the variable if it's not already.
        this.maybeDeclare(variable);
    };
    Scope.prototype.visitReference = function (reference) {
        // Declare the variable if it's not already.
        this.maybeDeclare(reference);
    };
    // Unused visitors.
    Scope.prototype.visitContent = function (content) { };
    Scope.prototype.visitBoundAttribute = function (attr) { };
    Scope.prototype.visitBoundEvent = function (event) { };
    Scope.prototype.visitBoundText = function (text) { };
    Scope.prototype.visitText = function (text) { };
    Scope.prototype.visitTextAttribute = function (attr) { };
    Scope.prototype.maybeDeclare = function (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.
     */
    Scope.prototype.lookup = function (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.
     */
    Scope.prototype.getChildScope = function (template) {
        var res = this.childScopes.get(template);
        if (res === undefined) {
            throw new Error("Assertion error: child scope for " + template + " not found");
        }
        return res;
    };
    return Scope;
}());
/**
 * Processes a template and matches directives on nodes (elements and templates).
 *
 * Usually used via the static `apply()` method.
 */
var DirectiveBinder = /** @class */ (function () {
    function DirectiveBinder(matcher, directives, bindings, references) {
        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.
     */
    DirectiveBinder.apply = function (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 };
    };
    DirectiveBinder.prototype.ingest = function (template) {
        var _this = this;
        template.forEach(function (node) { return node.visit(_this); });
    };
    DirectiveBinder.prototype.visitElement = function (element) { this.visitElementOrTemplate(element.name, element); };
    DirectiveBinder.prototype.visitTemplate = function (template) { this.visitElementOrTemplate('ng-template', template); };
    DirectiveBinder.prototype.visitElementOrTemplate = function (tag, node) {
        var _this = 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 === 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: " + ref.value);
                }
            }
            if (dirTarget !== null) {
                // This reference points to a directive.
                _this.references.set(ref, { directive: dirTarget, node: node });
            }
            else {
                // This reference points to the node itself.
                _this.references.set(ref, node);
            }
        });
        // Associate bindings on the node with directives or with the node itself.
        // Inputs:
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(node.attributes, node.inputs).forEach(function (binding) {
            var dir = directives.find(function (dir) { return dir.inputs.hasOwnProperty(binding.name); });
            if (dir !== undefined) {
                _this.bindings.set(binding, dir);
            }
            else {
                _this.bindings.set(binding, node);
            }
        });
        // Outputs:
        node.outputs.forEach(function (binding) {
            var dir = directives.find(function (dir) { return dir.outputs.hasOwnProperty(binding.name); });
            if (dir !== undefined) {
                _this.bindings.set(binding, dir);
            }
            else {
                _this.bindings.set(binding, node);
            }
        });
        // Recurse into the node's children.
        node.children.forEach(function (child) { return child.visit(_this); });
    };
    // Unused visitors.
    DirectiveBinder.prototype.visitContent = function (content) { };
    DirectiveBinder.prototype.visitVariable = function (variable) { };
    DirectiveBinder.prototype.visitReference = function (reference) { };
    DirectiveBinder.prototype.visitTextAttribute = function (attribute) { };
    DirectiveBinder.prototype.visitBoundAttribute = function (attribute) { };
    DirectiveBinder.prototype.visitBoundEvent = function (attribute) { };
    DirectiveBinder.prototype.visitBoundAttributeOrEvent = function (node) { };
    DirectiveBinder.prototype.visitText = function (text) { };
    DirectiveBinder.prototype.visitBoundText = function (text) { };
    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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TemplateBinder, _super);
    function TemplateBinder(bindings, symbols, nestingLevel, scope, template, level) {
        var _this = _super.call(this) || this;
        _this.bindings = bindings;
        _this.symbols = symbols;
        _this.nestingLevel = nestingLevel;
        _this.scope = scope;
        _this.template = template;
        _this.level = level;
        // Save a bit of processing time by constructing this closure in advance.
        _this.visitNode = function (node) { return node.visit(_this); };
        return _this;
    }
    /**
     * Process a template and extract metadata about expressions and symbols within.
     *
     * @param template the nodes of the template to process
     * @param scope the `Scope` of the template being processed.
     * @returns three maps which contain metadata about the template: `expressions` which interprets
     * special `AST` nodes in expressions as pointing to references or variables declared within the
     * template, `symbols` which maps those variables and references to the nested `Template` which
     * declares them, if any, and `nestingLevel` which associates each `Template` with a integer
     * nesting level (how many levels deep within the template structure the `Template` is), starting
     * at 1.
     */
    TemplateBinder.apply = function (template, scope) {
        var expressions = new Map();
        var symbols = new Map();
        var nestingLevel = new Map();
        // The top-level template has nesting level 0.
        var binder = new TemplateBinder(expressions, symbols, nestingLevel, scope, template instanceof Template ? template : null, 0);
        binder.ingest(template);
        return { expressions: expressions, symbols: symbols, nestingLevel: nestingLevel };
    };
    TemplateBinder.prototype.ingest = function (template) {
        if (template instanceof Template) {
            // For <ng-template>s, process inputs, outputs, variables, and child nodes. References were
            // processed in the scope of the containing template.
            template.inputs.forEach(this.visitNode);
            template.outputs.forEach(this.visitNode);
            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);
        }
    };
    TemplateBinder.prototype.visitElement = function (element) {
        // Vist the inputs, outputs, and children of the element.
        element.inputs.forEach(this.visitNode);
        element.outputs.forEach(this.visitNode);
        element.children.forEach(this.visitNode);
    };
    TemplateBinder.prototype.visitTemplate = function (template) {
        // First, visit the inputs, outputs of the template node.
        template.inputs.forEach(this.visitNode);
        template.outputs.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.nestingLevel, childScope, template, this.level + 1);
        binder.ingest(template);
    };
    TemplateBinder.prototype.visitVariable = function (variable) {
        // Register the `Variable` as a symbol in the current `Template`.
        if (this.template !== null) {
            this.symbols.set(variable, this.template);
        }
    };
    TemplateBinder.prototype.visitReference = function (reference) {
        // Register the `Reference` as a symbol in the current `Template`.
        if (this.template !== null) {
            this.symbols.set(reference, this.template);
        }
    };
    // Unused template visitors
    TemplateBinder.prototype.visitText = function (text) { };
    TemplateBinder.prototype.visitContent = function (content) { };
    TemplateBinder.prototype.visitTextAttribute = function (attribute) { };
    // The remaining visitors are concerned with processing AST expressions within template bindings
    TemplateBinder.prototype.visitBoundAttribute = function (attribute) { attribute.value.visit(this); };
    TemplateBinder.prototype.visitBoundEvent = function (event) { event.handler.visit(this); };
    TemplateBinder.prototype.visitBoundText = function (text) { text.value.visit(this); };
    // These five types of AST expressions can refer to expression roots, which could be variables
    // or references in the current scope.
    TemplateBinder.prototype.visitPropertyRead = function (ast, context) {
        this.maybeMap(context, ast, ast.name);
        return _super.prototype.visitPropertyRead.call(this, ast, context);
    };
    TemplateBinder.prototype.visitSafePropertyRead = function (ast, context) {
        this.maybeMap(context, ast, ast.name);
        return _super.prototype.visitSafePropertyRead.call(this, ast, context);
    };
    TemplateBinder.prototype.visitPropertyWrite = function (ast, context) {
        this.maybeMap(context, ast, ast.name);
        return _super.prototype.visitPropertyWrite.call(this, ast, context);
    };
    TemplateBinder.prototype.visitMethodCall = function (ast, context) {
        this.maybeMap(context, ast, ast.name);
        return _super.prototype.visitMethodCall.call(this, ast, context);
    };
    TemplateBinder.prototype.visitSafeMethodCall = function (ast, context) {
        this.maybeMap(context, ast, ast.name);
        return _super.prototype.visitSafeMethodCall.call(this, ast, context);
    };
    TemplateBinder.prototype.maybeMap = function (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);
        }
    };
    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 = /** @class */ (function () {
    function R3BoundTarget(target, directives, bindings, references, exprTargets, symbols, nestingLevel) {
        this.target = target;
        this.directives = directives;
        this.bindings = bindings;
        this.references = references;
        this.exprTargets = exprTargets;
        this.symbols = symbols;
        this.nestingLevel = nestingLevel;
    }
    R3BoundTarget.prototype.getDirectivesOfNode = function (node) {
        return this.directives.get(node) || null;
    };
    R3BoundTarget.prototype.getReferenceTarget = function (ref) {
        return this.references.get(ref) || null;
    };
    R3BoundTarget.prototype.getConsumerOfBinding = function (binding) {
        return this.bindings.get(binding) || null;
    };
    R3BoundTarget.prototype.getExpressionTarget = function (expr) {
        return this.exprTargets.get(expr) || null;
    };
    R3BoundTarget.prototype.getTemplateOfSymbol = function (symbol) {
        return this.symbols.get(symbol) || null;
    };
    R3BoundTarget.prototype.getNestingLevel = function (template) { return this.nestingLevel.get(template) || 0; };
    R3BoundTarget.prototype.getUsedDirectives = function () {
        var set = new Set();
        this.directives.forEach(function (dirs) { return dirs.forEach(function (dir) { return set.add(dir); }); });
        return Array.from(set.values());
    };
    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/fesm5/core.js":
/*!**************************************************!*\
  !*** ./node_modules/@angular/core/fesm5/core.js ***!
  \**************************************************/
/*! exports provided: ɵangular_packages_core_core_l, ɵangular_packages_core_core_i, ɵangular_packages_core_core_j, ɵangular_packages_core_core_k, ɵangular_packages_core_core_f, ɵangular_packages_core_core_g, ɵangular_packages_core_core_h, ɵangular_packages_core_core_c, ɵangular_packages_core_core_d, ɵangular_packages_core_core_e, ɵangular_packages_core_core_m, ɵangular_packages_core_core_o, ɵangular_packages_core_core_n, ɵangular_packages_core_core_r, ɵangular_packages_core_core_p, ɵangular_packages_core_core_q, ɵangular_packages_core_core_bd, ɵangular_packages_core_core_w, ɵangular_packages_core_core_x, ɵangular_packages_core_core_v, ɵangular_packages_core_core_z, ɵangular_packages_core_core_bg, ɵangular_packages_core_core_ba, ɵangular_packages_core_core_bb, ɵangular_packages_core_core_bc, ɵangular_packages_core_core_a, ɵangular_packages_core_core_b, ɵangular_packages_core_core_be, ɵangular_packages_core_core_s, ɵangular_packages_core_core_t, ɵangular_packages_core_core_u, 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, DebugNode, asNativeElements, getDebugNode, Testability, TestabilityRegistry, setTestabilityGetter, TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy, ApplicationModule, wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, Type, EventEmitter, ErrorHandler, Sanitizer, SecurityContext, ANALYZE_FOR_ENTRY_COMPONENTS, Attribute, ContentChild, ContentChildren, Query, ViewChild, ViewChildren, Component, Directive, HostBinding, HostListener, Input, Output, Pipe, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, NgModule, ViewEncapsulation, Version, VERSION, defineInjectable, defineInjector, forwardRef, resolveForwardRef, Injectable, inject, INJECTOR, Injector, ReflectiveInjector, createInjector, ResolvedReflectiveFactory, ReflectiveKey, InjectionToken, Inject, Optional, Self, SkipSelf, Host, NgZone, ɵNoopNgZone, RenderComponentType, Renderer, Renderer2, RendererFactory2, RendererStyleFlags2, RootRenderer, COMPILER_OPTIONS, Compiler, CompilerFactory, ModuleWithComponentFactories, 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, ɵgetInjectableDef, ɵinject, ɵsetCurrentInjector, ɵAPP_ROOT, ɵivyEnabled, ɵComponentFactory, ɵCodegenComponentFactoryResolver, ɵresolveComponentResources, ɵReflectionCapabilities, ɵRenderDebugInfo, ɵ_sanitizeHtml, ɵ_sanitizeStyle, ɵ_sanitizeUrl, ɵglobal, ɵlooseIdentical, ɵstringify, ɵmakeDecorator, ɵisObservable, ɵisPromise, ɵclearOverrides, ɵinitServicesIfNeeded, ɵoverrideComponentView, ɵoverrideProvider, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, ɵdefineBase, ɵdefineComponent, ɵdefineDirective, ɵdefinePipe, ɵdefineNgModule, ɵdetectChanges, ɵrenderComponent, ɵRender3ComponentFactory, ɵRender3ComponentRef, ɵdirectiveInject, ɵinjectAttribute, ɵgetFactoryOf, ɵgetInheritedFactory, ɵtemplateRefExtractor, ɵPublicFeature, ɵInheritDefinitionFeature, ɵNgOnChangesFeature, ɵRender3NgModuleRef, ɵmarkDirty, ɵNgModuleFactory, ɵNO_CHANGE, ɵcontainer, ɵnextContext, ɵelementStart, ɵnamespaceHTML, ɵnamespaceMathML, ɵnamespaceSVG, ɵelement, ɵlistener, ɵtext, ɵembeddedViewStart, ɵquery, ɵregisterContentQuery, ɵprojection, ɵbind, ɵinterpolation1, ɵinterpolation2, ɵinterpolation3, ɵinterpolation4, ɵinterpolation5, ɵinterpolation6, ɵinterpolation7, ɵinterpolation8, ɵinterpolationV, ɵpipeBind1, ɵpipeBind2, ɵpipeBind3, ɵpipeBind4, ɵpipeBindV, ɵpureFunction0, ɵpureFunction1, ɵpureFunction2, ɵpureFunction3, ɵpureFunction4, ɵpureFunction5, ɵpureFunction6, ɵpureFunction7, ɵpureFunction8, ɵpureFunctionV, ɵgetCurrentView, ɵrestoreView, ɵcontainerRefreshStart, ɵcontainerRefreshEnd, ɵqueryRefresh, ɵloadQueryList, ɵelementEnd, ɵelementProperty, ɵprojectionDef, ɵreference, ɵenableBindings, ɵdisableBindings, ɵelementAttribute, ɵelementStyling, ɵelementStylingMap, ɵelementStyleProp, ɵelementStylingApply, ɵelementClassProp, ɵtextBinding, ɵtemplate, ɵembeddedViewEnd, ɵstore, ɵload, ɵpipe, ɵwhenRendered, ɵi18nAttribute, ɵi18nExp, ɵi18nStart, ɵi18nEnd, ɵi18nApply, ɵi18nExpMapping, ɵi18nInterpolation1, ɵi18nInterpolation2, ɵi18nInterpolation3, ɵi18nInterpolation4, ɵi18nInterpolation5, ɵi18nInterpolation6, ɵi18nInterpolation7, ɵi18nInterpolation8, ɵi18nInterpolationV, ɵi18nMapping, ɵWRAP_RENDERER_FACTORY2, ɵRender3DebugRendererFactory2, ɵcompileNgModuleDefs, ɵpatchComponentDefWithScope, ɵcompileComponent, ɵcompileDirective, ɵcompilePipe, ɵsanitizeHtml, ɵsanitizeStyle, ɵsanitizeUrl, ɵsanitizeResourceUrl, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, ɵgetContext, ɵbindPlayerFactory, ɵaddPlayer, ɵgetPlayers, ɵcompileNgModuleFactory__POST_NGCC__, ɵR3_COMPILE_COMPONENT__POST_NGCC__, ɵR3_COMPILE_DIRECTIVE__POST_NGCC__, ɵR3_COMPILE_INJECTABLE__POST_NGCC__, ɵR3_COMPILE_NGMODULE__POST_NGCC__, ɵR3_COMPILE_PIPE__POST_NGCC__, ɵivyEnable__POST_NGCC__, ɵR3_ELEMENT_REF_FACTORY__POST_NGCC__, ɵR3_TEMPLATE_REF_FACTORY__POST_NGCC__, ɵR3_CHANGE_DETECTOR_REF_FACTORY__POST_NGCC__, ɵR3_VIEW_CONTAINER_REF_FACTORY__POST_NGCC__, ɵR3_RENDERER2_FACTORY__POST_NGCC__, ɵregisterModuleFactory, ɵEMPTY_ARRAY, ɵEMPTY_MAP, ɵand, ɵccf, ɵcmf, ɵcrt, ɵdid, ɵeld, ɵelementEventFullName, ɵgetComponentViewDefinitionFactory, ɵinlineInterpolate, ɵinterpolate, ɵmod, ɵmpd, ɵncd, ɵnov, ɵpid, ɵprd, ɵpad, ɵpod, ɵppd, ɵqud, ɵted, ɵunv, ɵvid */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_l", function() { return APPLICATION_MODULE_PROVIDERS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_i", function() { return _iterableDiffersFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_j", function() { return _keyValueDiffersFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_k", function() { return _localeFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_f", function() { return _appIdRandomProviderFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_g", function() { return DefaultIterableDifferFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_h", function() { return DefaultKeyValueDifferFactory; });
/* 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_m", function() { return wtfEnabled; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_o", function() { return createScope; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_n", function() { return detectWTF; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_r", function() { return endTimeRange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_p", function() { return leave; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_q", function() { return startTimeRange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bd", function() { return NG_INJECTABLE_DEF; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_w", function() { return _getViewData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_x", function() { return bindingUpdated; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_v", function() { return getPreviousOrParentTNode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_z", function() { return BoundPlayerFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bg", function() { return loadInternal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_ba", function() { return createElementRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bb", function() { return createTemplateRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bc", function() { return createViewRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_a", function() { return makeParamDecorator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_b", function() { return makePropDecorator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_be", function() { return getClosureSafeProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_s", function() { return _def; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_t", function() { return DebugRendererFactory2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_u", 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__, "DebugNode", function() { return DebugNode; });
/* 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; });
/* 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; });
/* 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__, "ANALYZE_FOR_ENTRY_COMPONENTS", function() { return ANALYZE_FOR_ENTRY_COMPONENTS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Attribute", function() { return Attribute; });
/* 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__, "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__, "NgModule", function() { return NgModule; });
/* 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__, "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__, "inject", function() { return inject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INJECTOR", function() { return INJECTOR; });
/* 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__, "createInjector", function() { return createInjector; });
/* 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__, "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$1; });
/* 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; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisListLikeIterable", function() { return isListLikeIterable; });
/* 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__, "ɵgetInjectableDef", function() { return getInjectableDef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinject", function() { return inject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetCurrentInjector", function() { return setCurrentInjector; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAPP_ROOT", function() { return APP_ROOT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵivyEnabled", function() { return ivyEnabled$1; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵComponentFactory", function() { return ComponentFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCodegenComponentFactoryResolver", function() { return CodegenComponentFactoryResolver; });
/* 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__, "ɵ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__, "ɵgetFactoryOf", function() { return getFactoryOf; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetInheritedFactory", function() { return getInheritedFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵtemplateRefExtractor", function() { return templateRefExtractor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPublicFeature", function() { return PublicFeature; });
/* 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__, "ɵ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__, "ɵembeddedViewStart", function() { return embeddedViewStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵquery", function() { return query; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterContentQuery", function() { return registerContentQuery; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵprojection", function() { return projection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbind", function() { return bind; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolation1", function() { return interpolation1; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolation2", function() { return interpolation2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolation3", function() { return interpolation3; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolation4", function() { return interpolation4; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolation5", function() { return interpolation5; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolation6", function() { return interpolation6; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolation7", function() { return interpolation7; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolation8", function() { return interpolation8; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolationV", function() { return interpolationV; });
/* 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__, "ɵ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__, "ɵloadQueryList", function() { return loadQueryList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵelementEnd", function() { return elementEnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵelementProperty", function() { return elementProperty; });
/* 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__, "ɵelementAttribute", function() { return elementAttribute; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵelementStyling", function() { return elementStyling; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵelementStylingMap", function() { return elementStylingMap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵelementStyleProp", function() { return elementStyleProp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵelementStylingApply", function() { return elementStylingApply; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵelementClassProp", function() { return elementClassProp; });
/* 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__, "ɵi18nAttribute", function() { return i18nAttribute; });
/* 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__, "ɵi18nExpMapping", function() { return i18nExpMapping; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nInterpolation1", function() { return i18nInterpolation1; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nInterpolation2", function() { return i18nInterpolation2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nInterpolation3", function() { return i18nInterpolation3; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nInterpolation4", function() { return i18nInterpolation4; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nInterpolation5", function() { return i18nInterpolation5; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nInterpolation6", function() { return i18nInterpolation6; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nInterpolation7", function() { return i18nInterpolation7; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nInterpolation8", function() { return i18nInterpolation8; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nInterpolationV", function() { return i18nInterpolationV; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi18nMapping", function() { return i18nMapping; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵWRAP_RENDERER_FACTORY2", function() { return WRAP_RENDERER_FACTORY2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3DebugRendererFactory2", function() { return Render3DebugRendererFactory2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleDefs", function() { return R3_COMPILE_NGMODULE_DEFS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpatchComponentDefWithScope", function() { return R3_PATCH_COMPONENT_DEF_WTIH_SCOPE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileComponent", function() { return R3_COMPILE_COMPONENT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileDirective", function() { return R3_COMPILE_DIRECTIVE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompilePipe", function() { return R3_COMPILE_PIPE; });
/* 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__, "ɵsanitizeResourceUrl", function() { return sanitizeResourceUrl; });
/* 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__, "ɵgetContext", function() { return getContext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbindPlayerFactory", function() { return bindPlayerFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵaddPlayer", function() { return addPlayer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetPlayers", function() { return getPlayers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleFactory__POST_NGCC__", function() { return compileNgModuleFactory__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_COMPILE_COMPONENT__POST_NGCC__", function() { return R3_COMPILE_COMPONENT__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_COMPILE_DIRECTIVE__POST_NGCC__", function() { return R3_COMPILE_DIRECTIVE__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_COMPILE_INJECTABLE__POST_NGCC__", function() { return R3_COMPILE_INJECTABLE__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_COMPILE_NGMODULE__POST_NGCC__", function() { return R3_COMPILE_NGMODULE__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_COMPILE_PIPE__POST_NGCC__", function() { return R3_COMPILE_PIPE__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵivyEnable__POST_NGCC__", function() { return ivyEnable__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_ELEMENT_REF_FACTORY__POST_NGCC__", function() { return R3_ELEMENT_REF_FACTORY__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_TEMPLATE_REF_FACTORY__POST_NGCC__", function() { return R3_TEMPLATE_REF_FACTORY__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_CHANGE_DETECTOR_REF_FACTORY__POST_NGCC__", function() { return R3_CHANGE_DETECTOR_REF_FACTORY__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_VIEW_CONTAINER_REF_FACTORY__POST_NGCC__", function() { return R3_VIEW_CONTAINER_REF_FACTORY__POST_NGCC__; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵR3_RENDERER2_FACTORY__POST_NGCC__", function() { return R3_RENDERER2_FACTORY__POST_NGCC__; });
/* 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$4; });
/* 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__, "ɵelementEventFullName", function() { return elementEventFullName; });
/* 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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/**
 * @license Angular v7.0.4
 * (c) 2010-2018 Google, Inc. 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
 */
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
 */
var NG_COMPONENT_DEF = getClosureSafeProperty({ ngComponentDef: getClosureSafeProperty });
var NG_DIRECTIVE_DEF = getClosureSafeProperty({ ngDirectiveDef: getClosureSafeProperty });
var NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });
var NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty });
var NG_PIPE_DEF = getClosureSafeProperty({ ngPipeDef: getClosureSafeProperty });
var NG_MODULE_DEF = getClosureSafeProperty({ ngModuleDef: getClosureSafeProperty });
var NG_BASE_DEF = getClosureSafeProperty({ ngBaseDef: getClosureSafeProperty });
/**
 * If a directive is diPublic, bloomAdd sets a property on the type with this constant as
 * the key and the directive's unique ID as the value. This allows us to map directives to their
 * bloom filter bit for DI.
 */
var NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: 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
 */
/**
 * 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.
 *
 * @publicApi
 */
function defineInjectable(opts) {
    return {
        providedIn: opts.providedIn || null, factory: opts.factory, value: undefined,
    };
}
/**
 * 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` type in a way which is immune to accidentally reading inherited value.
 *
 * @param type type which may have `ngInjectableDef`
 */
function getInjectableDef(type) {
    return type.hasOwnProperty(NG_INJECTABLE_DEF) ? type[NG_INJECTABLE_DEF] : 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.hasOwnProperty(NG_INJECTOR_DEF) ? type[NG_INJECTOR_DEF] : 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
 */
/**
 * 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
 * parametrized type.
 *
 * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
 * the `Injector`. This provides additional level of type safety.
 *
 * ```
 * interface MyInterface {...}
 * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
 * // myInterface is inferred to be MyInterface.
 * ```
 *
 * When creating an `InjectionToken`, you can optionally specify a factory function which returns
 * (possibly by creating) a default value of the parameterized type `T`. This sets up the
 * `InjectionToken` using this factory as a provider as if it was defined explicitly in the
 * application's root injector. If the factory function, which takes zero arguments, needs to inject
 * dependencies, it can do so using the `inject` function. See below for an example.
 *
 * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
 * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
 * mentioned above, `'root'` is the default value for `providedIn`.
 *
 * @usageNotes
 * ### Basic Example
 *
 * ### Plain InjectionToken
 *
 * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
 *
 * ### Tree-shakable InjectionToken
 *
 * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
 *
 *
 * @publicApi
 */
var InjectionToken = /** @class */ (function () {
    function InjectionToken(_desc, options) {
        this._desc = _desc;
        /** @internal */
        this.ngMetadataName = 'InjectionToken';
        if (options !== undefined) {
            this.ngInjectableDef = defineInjectable({
                providedIn: options.providedIn || 'root',
                factory: options.factory,
            });
        }
        else {
            this.ngInjectableDef = undefined;
        }
    }
    InjectionToken.prototype.toString = function () { return "InjectionToken " + this._desc; };
    return InjectionToken;
}());

/**
 * @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() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var _a;
        if (this instanceof DecoratorFactory) {
            metaCtor.call.apply(metaCtor, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this], args));
            return this;
        }
        var annotationInstance = new ((_a = DecoratorFactory).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))();
        return function TypeDecorator(cls) {
            if (typeFn)
                typeFn.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([cls], 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() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        if (props) {
            var values = props.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
            for (var propName in values) {
                this[propName] = values[propName];
            }
        }
    };
}
function makeParamDecorator(name, props, parentClass) {
    var metaCtor = makeMetadataCtor(props);
    function ParamDecoratorFactory() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var _a;
        if (this instanceof ParamDecoratorFactory) {
            metaCtor.apply(this, args);
            return this;
        }
        var annotationInstance = new ((_a = ParamDecoratorFactory).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], 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() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var _a;
        if (this instanceof PropDecoratorFactory) {
            metaCtor.apply(this, args);
            return this;
        }
        var decoratorInstance = new ((_a = PropDecoratorFactory).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], 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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([target, name], args));
        }
        return PropDecorator;
    }
    if (parentClass) {
        PropDecoratorFactory.prototype = Object.create(parentClass.prototype);
    }
    PropDecoratorFactory.prototype.ngMetadataName = name;
    PropDecoratorFactory.annotationCls = PropDecoratorFactory;
    return PropDecoratorFactory;
}

/**
 * @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 token can be used to create a virtual provider that will populate the
 * `entryComponents` fields of components and ng modules based on its `useValue`.
 * All components that are referenced in the `useValue` value (either directly
 * or in a nested array or map) will be added to the `entryComponents` property.
 *
 * @usageNotes
 * ### Example
 * The following example shows how the router can populate the `entryComponents`
 * field of an NgModule based on the router configuration which 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
 */
var ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');
/**
 * Attribute decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var Attribute = makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });
/**
 * Base class for query metadata.
 *
 * @see `ContentChildren`.
 * @see `ContentChild`.
 * @see `ViewChildren`.
 * @see `ViewChild`.
 *
 * @publicApi
 */
var Query = /** @class */ (function () {
    function Query() {
    }
    return Query;
}());
/**
 * ContentChildren decorator and metadata.
 *
 *
 * @Annotation
 * @publicApi
 */
var ContentChildren = makePropDecorator('ContentChildren', function (selector, data) {
    if (data === void 0) { data = {}; }
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));
}, Query);
/**
 * ContentChild decorator and metadata.
 *
 *
 * @Annotation
 * @publicApi
 */
var ContentChild = makePropDecorator('ContentChild', function (selector, data) {
    if (data === void 0) { data = {}; }
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));
}, Query);
/**
 * ViewChildren decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var ViewChildren = makePropDecorator('ViewChildren', function (selector, data) {
    if (data === void 0) { data = {}; }
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));
}, Query);
/**
 * ViewChild decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var ViewChild = makePropDecorator('ViewChild', function (selector, data) {
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));
}, 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
 */
/**
 * The strategy that the default change detector uses to detect changes.
 * When set, takes effect the next time change detection is triggered.
 *
 * @publicApi
 */
var ChangeDetectionStrategy;
(function (ChangeDetectionStrategy) {
    /**
     * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
     * until reactivated by setting the strategy to `Default` (`CheckAlways`).
     * Change detection can still be explictly invoked.
     */
    ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
    /**
     * Use the default `CheckAlways` strategy, in which change detection is automatic until
     * explicitly deactivated.
     */
    ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
/**
 * Defines the possible states of the default change detector.
 * @see `ChangeDetectorRef`
 */
var ChangeDetectorStatus;
(function (ChangeDetectorStatus) {
    /**
     * A state in which, after calling `detectChanges()`, the change detector
     * state becomes `Checked`, and must be explicitly invoked or reactivated.
     */
    ChangeDetectorStatus[ChangeDetectorStatus["CheckOnce"] = 0] = "CheckOnce";
    /**
     * A state in which change detection is skipped until the change detector mode
     * becomes `CheckOnce`.
     */
    ChangeDetectorStatus[ChangeDetectorStatus["Checked"] = 1] = "Checked";
    /**
     * A state in which change detection continues automatically until explictly
     * deactivated.
     */
    ChangeDetectorStatus[ChangeDetectorStatus["CheckAlways"] = 2] = "CheckAlways";
    /**
     * A state in which a change detector sub tree is not a part of the main tree and
     * should be skipped.
     */
    ChangeDetectorStatus[ChangeDetectorStatus["Detached"] = 3] = "Detached";
    /**
     * Indicates that the change detector encountered an error checking a binding
     * or calling a directive lifecycle method and is now in an inconsistent state. Change
     * detectors in this state do not detect changes.
     */
    ChangeDetectorStatus[ChangeDetectorStatus["Errored"] = 4] = "Errored";
    /**
     * Indicates that the change detector has been destroyed.
     */
    ChangeDetectorStatus[ChangeDetectorStatus["Destroyed"] = 5] = "Destroyed";
})(ChangeDetectorStatus || (ChangeDetectorStatus = {}));
/**
 * Reports whether a given strategy is currently the default for change detection.
 * @param changeDetectionStrategy The strategy to check.
 * @returns True if the given strategy is the current default, false otherwise.
 * @see `ChangeDetectorStatus`
 * @see `ChangeDetectorRef`
 */
function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
    return changeDetectionStrategy == null ||
        changeDetectionStrategy === ChangeDetectionStrategy.Default;
}

/**
 * @license
 * Copyright Google 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 __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;
var promise = Promise.resolve(0);
var _symbolIterator = null;
function getSymbolIterator() {
    if (!_symbolIterator) {
        var Symbol_1 = _global['Symbol'];
        if (Symbol_1 && Symbol_1.iterator) {
            _symbolIterator = Symbol_1.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;
}
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);
    }
}
// JS has NaN !== NaN
function looseIdentical(a, b) {
    return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
}
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 "" + token.overriddenName;
    }
    if (token.name) {
        return "" + token.name;
    }
    var res = token.toString();
    if (res == null) {
        return '' + res;
    }
    var newLineIndex = res.indexOf('\n');
    return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
}
/**
 * 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 };
}

/**
 * @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
 */
/**
 * Allows to refer to references which are not yet defined.
 *
 * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
 * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
 * a query is not yet defined.
 *
 * @usageNotes
 * ### Example
 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
 * @publicApi
 */
function forwardRef(forwardRefFn) {
    forwardRefFn.__forward_ref__ = forwardRef;
    forwardRefFn.toString = function () { return stringify(this()); };
    return forwardRefFn;
}
/**
 * Lazily retrieves the reference value from a forwardRef.
 *
 * Acts as the identity function when given a non-forward-ref value.
 *
 * @usageNotes
 * ### Example
 *
 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
 *
 * @see `forwardRef`
 * @publicApi
 */
function resolveForwardRef(type) {
    if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__') &&
        type.__forward_ref__ === forwardRef) {
        return type();
    }
    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
 */
/**
 * Inject decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });
/**
 * Optional decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var Optional = makeParamDecorator('Optional');
/**
 * Self decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var Self = makeParamDecorator('Self');
/**
 * SkipSelf decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var SkipSelf = makeParamDecorator('SkipSelf');
/**
 * Host decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var Host = makeParamDecorator('Host');

/**
 * @license
 * Copyright Google 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 SOURCE = '__source';
var _THROW_IF_NOT_FOUND = new Object();
var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
/**
 * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
 *
 * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
 * project.
 *
 * @publicApi
 */
var INJECTOR = new InjectionToken('INJECTOR');
var NullInjector = /** @class */ (function () {
    function NullInjector() {
    }
    NullInjector.prototype.get = function (token, notFoundValue) {
        if (notFoundValue === void 0) { notFoundValue = _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;
            throw new Error("NullInjectorError: No provider for " + stringify(token) + "!");
        }
        return notFoundValue;
    };
    return NullInjector;
}());
/**
 * 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
 */
var Injector = /** @class */ (function () {
    function Injector() {
    }
    /**
     * Create a new Injector which is configure using `StaticProvider`s.
     *
     * @usageNotes
     * ### Example
     *
     * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
     */
    Injector.create = function (options, parent) {
        if (Array.isArray(options)) {
            return new StaticInjector(options, parent);
        }
        else {
            return new StaticInjector(options.providers, options.parent, options.name || null);
        }
    };
    Injector.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
    Injector.NULL = new NullInjector();
    Injector.ngInjectableDef = defineInjectable({
        providedIn: 'any',
        factory: function () { return inject(INJECTOR); },
    });
    return Injector;
}());
var IDENT = function (value) {
    return value;
};
var EMPTY = [];
var CIRCULAR = IDENT;
var MULTI_PROVIDER_FN = function () {
    return Array.prototype.slice.call(arguments);
};
var USE_VALUE = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty });
var NG_TOKEN_PATH = 'ngTokenPath';
var NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';
var NULL_INJECTOR = Injector.NULL;
var NEW_LINE = /\n/gm;
var NO_NEW_LINE = 'ɵ';
var StaticInjector = /** @class */ (function () {
    function StaticInjector(providers, parent, source) {
        if (parent === void 0) { parent = NULL_INJECTOR; }
        if (source === void 0) { source = null; }
        this.parent = parent;
        this.source = source;
        var records = this._records = new Map();
        records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false });
        records.set(INJECTOR, { token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false });
        recursivelyProcessProviders(records, providers);
    }
    StaticInjector.prototype.get = function (token, notFoundValue, flags) {
        if (flags === void 0) { flags = 0 /* Default */; }
        var record = this._records.get(token);
        try {
            return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);
        }
        catch (e) {
            var tokenPath = e[NG_TEMP_TOKEN_PATH];
            if (token[SOURCE]) {
                tokenPath.unshift(token[SOURCE]);
            }
            e.message = formatError('\n' + e.message, tokenPath, this.source);
            e[NG_TOKEN_PATH] = tokenPath;
            e[NG_TEMP_TOKEN_PATH] = null;
            throw e;
        }
    };
    StaticInjector.prototype.toString = function () {
        var tokens = [], records = this._records;
        records.forEach(function (v, token) { return tokens.push(stringify(token)); });
        return "StaticInjector[" + tokens.join(', ') + "]";
    };
    return StaticInjector;
}());
function resolveProvider(provider) {
    var deps = computeDeps(provider);
    var fn = IDENT;
    var value = EMPTY;
    var useNew = false;
    var provide = resolveForwardRef(provider.provide);
    if (USE_VALUE in provider) {
        // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.
        value = provider.useValue;
    }
    else if (provider.useFactory) {
        fn = provider.useFactory;
    }
    else if (provider.useExisting) ;
    else if (provider.useClass) {
        useNew = true;
        fn = resolveForwardRef(provider.useClass);
    }
    else if (typeof provide == 'function') {
        useNew = true;
        fn = provide;
    }
    else {
        throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);
    }
    return { deps: deps, fn: fn, useNew: useNew, value: value };
}
function multiProviderMixError(token) {
    return staticError('Cannot mix multi providers and regular providers', token);
}
function recursivelyProcessProviders(records, provider) {
    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: ?, ....}
            var token = resolveForwardRef(provider.provide);
            var resolvedProvider = resolveProvider(provider);
            if (provider.multi === true) {
                // This is a multi provider.
                var multiProvider = records.get(token);
                if (multiProvider) {
                    if (multiProvider.fn !== MULTI_PROVIDER_FN) {
                        throw multiProviderMixError(token);
                    }
                }
                else {
                    // Create a placeholder factory which will look up the constituents of the multi provider.
                    records.set(token, multiProvider = {
                        token: provider.provide,
                        deps: [],
                        useNew: false,
                        fn: MULTI_PROVIDER_FN,
                        value: EMPTY
                    });
                }
                // Treat the provider as the token.
                token = provider;
                multiProvider.deps.push({ token: token, options: 6 /* Default */ });
            }
            var record = records.get(token);
            if (record && record.fn == MULTI_PROVIDER_FN) {
                throw multiProviderMixError(token);
            }
            records.set(token, resolvedProvider);
        }
        else {
            throw staticError('Unexpected provider', provider);
        }
    }
}
function tryResolveToken(token, record, records, parent, notFoundValue, flags) {
    try {
        return resolveToken(token, record, records, parent, notFoundValue, flags);
    }
    catch (e) {
        // ensure that 'e' is of type Error.
        if (!(e instanceof Error)) {
            e = new Error(e);
        }
        var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];
        path.unshift(token);
        if (record && record.value == CIRCULAR) {
            // Reset the Circular flag.
            record.value = EMPTY;
        }
        throw e;
    }
}
function resolveToken(token, record, records, parent, notFoundValue, flags) {
    var _a;
    var value;
    if (record && !(flags & 4 /* 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) {
            throw Error(NO_NEW_LINE + 'Circular dependency');
        }
        else if (value === EMPTY) {
            record.value = CIRCULAR;
            var obj = undefined;
            var useNew = record.useNew;
            var fn = record.fn;
            var depRecords = record.deps;
            var deps = EMPTY;
            if (depRecords.length) {
                deps = [];
                for (var i = 0; i < depRecords.length; i++) {
                    var depRecord = depRecords[i];
                    var options = depRecord.options;
                    var childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;
                    deps.push(tryResolveToken(
                    // Current Token to resolve
                    depRecord.token, 
                    // A record which describes how to resolve the token.
                    // If undefined, this means we don't have such a record
                    childRecord, 
                    // Other records we know about.
                    records, 
                    // If we don't know how to resolve dependency and we should not check parent for it,
                    // than pass in Null injector.
                    !childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, 0 /* Default */));
                }
            }
            record.value = value = useNew ? new ((_a = fn).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], deps)))() : fn.apply(obj, deps);
        }
    }
    else if (!(flags & 2 /* Self */)) {
        value = parent.get(token, notFoundValue, 0 /* Default */);
    }
    return value;
}
function computeDeps(provider) {
    var deps = EMPTY;
    var providerDeps = provider.deps;
    if (providerDeps && providerDeps.length) {
        deps = [];
        for (var i = 0; i < providerDeps.length; i++) {
            var options = 6 /* Default */;
            var token = resolveForwardRef(providerDeps[i]);
            if (token instanceof Array) {
                for (var j = 0, annotations = token; j < annotations.length; j++) {
                    var annotation = annotations[j];
                    if (annotation instanceof Optional || annotation == Optional) {
                        options = options | 1 /* Optional */;
                    }
                    else if (annotation instanceof SkipSelf || annotation == SkipSelf) {
                        options = options & ~2 /* CheckSelf */;
                    }
                    else if (annotation instanceof Self || annotation == Self) {
                        options = options & ~4 /* CheckParent */;
                    }
                    else if (annotation instanceof Inject) {
                        token = annotation.token;
                    }
                    else {
                        token = resolveForwardRef(annotation);
                    }
                }
            }
            deps.push({ token: token, options: options });
        }
    }
    else if (provider.useExisting) {
        var token = resolveForwardRef(provider.useExisting);
        deps = [{ token: token, options: 6 /* Default */ }];
    }
    else if (!providerDeps && !(USE_VALUE in provider)) {
        // useValue & useExisting are the only ones which are exempt from deps all others need it.
        throw staticError('\'deps\' required', provider);
    }
    return deps;
}
function formatError(text, obj, source) {
    if (source === void 0) { source = null; }
    text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;
    var context = stringify(obj);
    if (obj instanceof Array) {
        context = obj.map(stringify).join(' -> ');
    }
    else if (typeof obj === 'object') {
        var parts = [];
        for (var key in obj) {
            if (obj.hasOwnProperty(key)) {
                var value = obj[key];
                parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));
            }
        }
        context = "{" + parts.join(', ') + "}";
    }
    return "StaticInjectorError" + (source ? '(' + source + ')' : '') + "[" + context + "]: " + text.replace(NEW_LINE, '\n  ');
}
function staticError(text, obj) {
    return new Error(formatError(text, obj));
}
/**
 * Current injector value used by `inject`.
 * - `undefined`: it is an error to call `inject`
 * - `null`: `inject` can be called but there is no injector (limp-mode).
 * - Injector instance: Use the injector for resolution.
 */
var _currentInjector = undefined;
function setCurrentInjector(injector) {
    var former = _currentInjector;
    _currentInjector = injector;
    return former;
}
function inject(token, flags) {
    if (flags === void 0) { flags = 0 /* Default */; }
    if (_currentInjector === undefined) {
        throw new Error("inject() must be called from an injection context");
    }
    else if (_currentInjector === null) {
        var injectableDef = getInjectableDef(token);
        if (injectableDef && injectableDef.providedIn == 'root') {
            return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :
                injectableDef.value;
        }
        if (flags & 8 /* Optional */)
            return null;
        throw new Error("Injector: NOT_FOUND [" + stringify(token) + "]");
    }
    else {
        return _currentInjector.get(token, flags & 8 /* Optional */ ? null : undefined, flags);
    }
}
function injectArgs(types) {
    var args = [];
    for (var i = 0; i < types.length; i++) {
        var arg = types[i];
        if (Array.isArray(arg)) {
            if (arg.length === 0) {
                throw new Error('Arguments array must have arguments.');
            }
            var type = undefined;
            var flags = 0 /* Default */;
            for (var j = 0; j < arg.length; j++) {
                var meta = arg[j];
                if (meta instanceof Optional || meta.ngMetadataName === 'Optional') {
                    flags |= 8 /* Optional */;
                }
                else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf') {
                    flags |= 4 /* SkipSelf */;
                }
                else if (meta instanceof Self || meta.ngMetadataName === 'Self') {
                    flags |= 2 /* Self */;
                }
                else if (meta instanceof Inject) {
                    type = meta.token;
                }
                else {
                    type = meta;
                }
            }
            args.push(inject(type, flags));
        }
        else {
            args.push(inject(arg));
        }
    }
    return args;
}

/**
 * @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 ReflectionCapabilities = /** @class */ (function () {
    function ReflectionCapabilities(reflect) {
        this._reflect = reflect || _global['Reflect'];
    }
    ReflectionCapabilities.prototype.isReflectionEnabled = function () { return true; };
    ReflectionCapabilities.prototype.factory = function (t) { return function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        return new (t.bind.apply(t, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))();
    }; };
    /** @internal */
    ReflectionCapabilities.prototype._zipTypesAndAnnotations = function (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] != Object) {
                result[i] = [paramTypes[i]];
            }
            else {
                result[i] = [];
            }
            if (paramAnnotations && paramAnnotations[i] != null) {
                result[i] = result[i].concat(paramAnnotations[i]);
            }
        }
        return result;
    };
    ReflectionCapabilities.prototype._ownParameters = function (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 (DELEGATE_CTOR.exec(typeStr) ||
            (INHERITED_CLASS.exec(typeStr) && !INHERITED_CLASS_WITH_CTOR.exec(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_1 = ctorParameters.map(function (ctorParam) { return ctorParam && ctorParam.type; });
            var paramAnnotations_1 = ctorParameters.map(function (ctorParam) {
                return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators);
            });
            return this._zipTypesAndAnnotations(paramTypes_1, paramAnnotations_1);
        }
        // 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);
    };
    ReflectionCapabilities.prototype.parameters = function (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 || [];
    };
    ReflectionCapabilities.prototype._ownAnnotations = function (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;
    };
    ReflectionCapabilities.prototype.annotations = function (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);
    };
    ReflectionCapabilities.prototype._ownPropMetadata = function (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_1 = typeOrFunc.propDecorators;
            var propMetadata_1 = {};
            Object.keys(propDecorators_1).forEach(function (prop) {
                propMetadata_1[prop] = convertTsickleDecoratorIntoMetadata(propDecorators_1[prop]);
            });
            return propMetadata_1;
        }
        // API for metadata created by invoking the decorators.
        if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {
            return typeOrFunc[PROP_METADATA];
        }
        return null;
    };
    ReflectionCapabilities.prototype.propMetadata = function (typeOrFunc) {
        if (!isType(typeOrFunc)) {
            return {};
        }
        var parentCtor = getParentCtor(typeOrFunc);
        var propMetadata = {};
        if (parentCtor !== Object) {
            var parentPropMetadata_1 = this.propMetadata(parentCtor);
            Object.keys(parentPropMetadata_1).forEach(function (propName) {
                propMetadata[propName] = parentPropMetadata_1[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, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(propMetadata[propName]));
                }
                decorators.push.apply(decorators, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ownPropMetadata[propName]));
                propMetadata[propName] = decorators;
            });
        }
        return propMetadata;
    };
    ReflectionCapabilities.prototype.hasLifecycleHook = function (type, lcProperty) {
        return type instanceof Type && lcProperty in type.prototype;
    };
    ReflectionCapabilities.prototype.guards = function (type) { return {}; };
    ReflectionCapabilities.prototype.getter = function (name) { return new Function('o', 'return o.' + name + ';'); };
    ReflectionCapabilities.prototype.setter = function (name) {
        return new Function('o', 'v', 'return o.' + name + ' = v;');
    };
    ReflectionCapabilities.prototype.method = function (name) {
        var functionBody = "if (!o." + name + ") throw new Error('\"" + name + "\" is undefined');\n        return o." + 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.
    ReflectionCapabilities.prototype.importUri = function (type) {
        // StaticSymbol
        if (typeof type === 'object' && type['filePath']) {
            return type['filePath'];
        }
        // Runtime type
        return "./" + stringify(type);
    };
    ReflectionCapabilities.prototype.resourceUri = function (type) { return "./" + stringify(type); };
    ReflectionCapabilities.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {
        return runtime;
    };
    ReflectionCapabilities.prototype.resolveEnum = function (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 new (annotationCls.bind.apply(annotationCls, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], annotationArgs)))();
    });
}
function getParentCtor(ctor) {
    var parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;
    var parentCtor = parentProto ? parentProto.constructor : null;
    // Note: We always use `Object` as the null value
    // to simplify checking later on.
    return parentCtor || Object;
}

/**
 * @license
 * Copyright Google 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 MyComponnent{
 * }
 *
 * // Calling `renderComponent` will fail because `MyComponent`'s `@Compenent.templateUrl`
 * // needs to be resolved because `renderComponent` is synchronous process.
 * // renderComponent(MyComponent);
 *
 * // Calling `resolveComponentResources` will resolve `@Compenent.templateUrl` into
 * // `@Compenent.template`, which would allow `renderComponent` to proceed in synchronous manner.
 * // Use browser's `fetch` function as the default resource resolution strategy.
 * resolveComponentResources(fetch).then(() => {
 *   // After resolution all URLs have been converted into 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 to returning a `Promise` of the resolved
 * URL. Browser's `fetch` method is a good default implementation.
 */
function resolveComponentResources(resourceResolver) {
    // Store all promises which are fetching the resources.
    var urlFetches = [];
    // Cache so that we don't fetch the same resource more than once.
    var urlMap = new Map();
    function cachedResourceResolve(url) {
        var promise = urlMap.get(url);
        if (!promise) {
            var resp = resourceResolver(url);
            urlMap.set(url, promise = resp.then(unwrapResponse));
            urlFetches.push(promise);
        }
        return promise;
    }
    componentResourceResolutionQueue.forEach(function (component) {
        if (component.templateUrl) {
            cachedResourceResolve(component.templateUrl).then(function (template) {
                component.template = template;
                component.templateUrl = undefined;
            });
        }
        var styleUrls = component.styleUrls;
        var styles = component.styles || (component.styles = []);
        var styleOffset = component.styles.length;
        styleUrls && styleUrls.forEach(function (styleUrl, index) {
            styles.push(''); // pre-allocate array.
            cachedResourceResolve(styleUrl).then(function (style) {
                styles[styleOffset + index] = style;
                styleUrls.splice(styleUrls.indexOf(styleUrl), 1);
                if (styleUrls.length == 0) {
                    component.styleUrls = undefined;
                }
            });
        });
    });
    componentResourceResolutionQueue.clear();
    return Promise.all(urlFetches).then(function () { return null; });
}
var componentResourceResolutionQueue = new Set();
function maybeQueueResolutionOfComponentResources(metadata) {
    if (componentNeedsResolution(metadata)) {
        componentResourceResolutionQueue.add(metadata);
    }
}
function componentNeedsResolution(component) {
    return component.templateUrl || component.styleUrls && component.styleUrls.length;
}
function unwrapResponse(response) {
    return typeof response == 'string' ? response : response.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
 */
/**
 * Defines template and style encapsulation options available for Component's {@link Component}.
 *
 * See {@link Component#encapsulation encapsulation}.
 *
 * @usageNotes
 * ### Example
 *
 * {@example core/ts/metadata/encapsulation.ts region='longform'}
 *
 * @publicApi
 */
var ViewEncapsulation;
(function (ViewEncapsulation) {
    /**
     * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
     * Element and pre-processing the style rules provided via {@link Component#styles styles} or
     * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all
     * selectors.
     *
     * This is the default option.
     */
    ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated";
    /**
     * @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.
     */
    ViewEncapsulation[ViewEncapsulation["Native"] = 1] = "Native";
    /**
     * Don't provide any template or style encapsulation.
     */
    ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
    /**
     * Use Shadow DOM to encapsulate styles.
     *
     * For the DOM this means using modern [Shadow
     * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
     * creating a ShadowRoot for Component's Host Element.
     */
    ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom";
})(ViewEncapsulation || (ViewEncapsulation = {}));

/**
 * @license
 * Copyright Google 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 newCounters = {
        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,
        rendererCreateComment: 0,
    };
    // NOTE: Under Ivy we may have both window & global defined in the Node
    //    environment since ensureDocument() in render3.ts sets global.window.
    if (typeof window != 'undefined') {
        // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.
        window['ngDevMode'] = newCounters;
    }
    if (typeof global != 'undefined') {
        // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.
        global['ngDevMode'] = newCounters;
    }
    if (typeof self != 'undefined') {
        // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.
        self['ngDevMode'] = newCounters;
    }
    return newCounters;
}
/**
 * This checks to see if the `ngDevMode` has been set. If yes,
 * than 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.
 */
if (typeof ngDevMode === 'undefined' || ngDevMode) {
    ngDevModeResetPerfCounters();
}

/**
 * @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$1 = {};
var EMPTY_ARRAY = [];
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
    Object.freeze(EMPTY$1);
    Object.freeze(EMPTY_ARRAY);
}
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({
 *     ...
 *   });
 * }
 * ```
 */
function defineComponent(componentDefinition) {
    var type = componentDefinition.type;
    var typePrototype = type.prototype;
    var declaredInputs = {};
    var def = {
        type: type,
        diPublic: null,
        consts: componentDefinition.consts,
        vars: componentDefinition.vars,
        hostVars: componentDefinition.hostVars || 0,
        factory: componentDefinition.factory,
        template: componentDefinition.template || null,
        hostBindings: componentDefinition.hostBindings || null,
        contentQueries: componentDefinition.contentQueries || null,
        contentQueriesRefresh: componentDefinition.contentQueriesRefresh || null,
        attributes: componentDefinition.attributes || null,
        declaredInputs: declaredInputs,
        inputs: null,
        outputs: null,
        exportAs: componentDefinition.exportAs || 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: null,
        pipeDefs: null,
        selectors: componentDefinition.selectors,
        viewQuery: componentDefinition.viewQuery || null,
        features: componentDefinition.features || null,
        data: componentDefinition.data || {},
        // TODO(misko): convert ViewEncapsulation into const enum so that it can be used directly in the
        // next line. Also `None` should be 0 not 2.
        encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,
        providers: EMPTY_ARRAY,
        viewProviders: EMPTY_ARRAY,
        id: 'c',
        styles: componentDefinition.styles || EMPTY_ARRAY,
        _: null,
    };
    def._ = noSideEffects(function () {
        var directiveTypes = componentDefinition.directives;
        var feature = componentDefinition.features;
        var pipeTypes = componentDefinition.pipes;
        def.id += _renderCompCount++;
        def.inputs = invertObject(componentDefinition.inputs, declaredInputs),
            def.outputs = invertObject(componentDefinition.outputs),
            feature && feature.forEach(function (fn) { return fn(def); });
        def.directiveDefs = directiveTypes ?
            function () { return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)
                .map(extractDirectiveDef); } :
            null;
        def.pipeDefs = pipeTypes ?
            function () { return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef); } :
            null;
    });
    return def;
}
function extractDirectiveDef(type) {
    var def = getComponentDef(type) || getDirectiveDef(type);
    if (ngDevMode && !def) {
        throw new Error("'" + type.name + "' is neither 'ComponentType' or 'DirectiveType'.");
    }
    return def;
}
function extractPipeDef(type) {
    var def = getPipeDef(type);
    if (ngDevMode && !def) {
        throw new Error("'" + type.name + "' is not a 'PipeType'.");
    }
    return def;
}
function defineNgModule(def) {
    var res = {
        type: def.type,
        bootstrap: def.bootstrap || EMPTY_ARRAY,
        declarations: def.declarations || EMPTY_ARRAY,
        imports: def.imports || EMPTY_ARRAY,
        exports: def.exports || EMPTY_ARRAY,
        transitiveCompileScopes: null,
    };
    return res;
}
/**
 * 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('publicName')
 *   propName2: number;
 * }
 * ```
 *
 * will be serialized as
 *
 * ```
 * {
 *   a0: 'propName1',
 *   b1: ['publicName', 'propName2'],
 * }
 * ```
 *
 * becomes
 *
 * ```
 * {
 *  'propName1': 'a0',
 *  'publicName': 'b1'
 * }
 * ```
 *
 * Optionally the function can take `secondary` which will result in:
 *
 * ```
 * {
 *  'propName1': 'a0',
 *  'propName2': 'b1'
 * }
 * ```
 *

 */
function invertObject(obj, secondary) {
    if (obj == null)
        return EMPTY$1;
    var newLookup = {};
    for (var minifiedKey in obj) {
        if (obj.hasOwnProperty(minifiedKey)) {
            var publicName = obj[minifiedKey];
            var declaredName = publicName;
            if (Array.isArray(publicName)) {
                declaredName = publicName[1];
                publicName = publicName[0];
            }
            newLookup[publicName] = minifiedKey;
            if (secondary) {
                (secondary[declaredName] = minifiedKey);
            }
        }
    }
    return newLookup;
}
/**
 * Create a base definition
 *
 * # Example
 * ```
 * class ShouldBeInherited {
 *   static ngBaseDef = defineBase({
 *      ...
 *   })
 * }
 * @param baseDefinition The base definition parameters
 */
function defineBase(baseDefinition) {
    var declaredInputs = {};
    return {
        inputs: invertObject(baseDefinition.inputs, declaredInputs),
        declaredInputs: declaredInputs,
        outputs: invertObject(baseDefinition.outputs),
    };
}
/**
 * Create a directive definition object.
 *
 * # Example
 * ```
 * class MyDirective {
 *   // Generated by Angular Template Compiler
 *   // [Symbol] syntax will not be supported by TypeScript until v2.7
 *   static ngDirectiveDef = defineDirective({
 *     ...
 *   });
 * }
 * ```
 */
var defineDirective = defineComponent;
/**
 * Create a pipe definition object.
 *
 * # Example
 * ```
 * class MyPipe implements PipeTransform {
 *   // Generated by Angular Template Compiler
 *   static ngPipeDef = definePipe({
 *     ...
 *   });
 * }
 * ```
 * @param pipeDef Pipe definition generated by the compiler
 */
function definePipe(pipeDef) {
    return {
        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.
 */
function getComponentDef(type) {
    return type[NG_COMPONENT_DEF] || null;
}
function getDirectiveDef(type) {
    return type[NG_DIRECTIVE_DEF] || null;
}
function getPipeDef(type) {
    return type[NG_PIPE_DEF] || null;
}
function getNgModuleDef(type) {
    return type[NG_MODULE_DEF] || 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 R3ResolvedDependencyType;
(function (R3ResolvedDependencyType) {
    R3ResolvedDependencyType[R3ResolvedDependencyType["Token"] = 0] = "Token";
    R3ResolvedDependencyType[R3ResolvedDependencyType["Attribute"] = 1] = "Attribute";
    R3ResolvedDependencyType[R3ResolvedDependencyType["Injector"] = 2] = "Injector";
})(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;
}

/**
 * @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 assertEqual(actual, expected, msg) {
    if (actual != expected) {
        throwError(msg);
    }
}
function assertNotEqual(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 assertDefined(actual, msg) {
    if (actual == null) {
        throwError(msg);
    }
}
function assertComponentType(actual, msg) {
    if (msg === void 0) { msg = 'Type passed in is not ComponentType, it does not have \'ngComponentDef\' property.'; }
    if (!getComponentDef(actual)) {
        throwError(msg);
    }
}
function assertNgModuleType(actual, msg) {
    if (msg === void 0) { msg = 'Type passed in is not NgModuleType, it does not have \'ngModuleDef\' property.'; }
    if (!getNgModuleDef(actual)) {
        throwError(msg);
    }
}
function throwError(msg) {
    // tslint:disable-next-line
    debugger; // Left intentionally for better debugger experience.
    throw new Error("ASSERTION ERROR: " + msg);
}

/**
 * @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
 */
var MONKEY_PATCH_KEY_NAME = '__ngContext__';

/**
 * @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
 */
/** Size of LViewData's header. Necessary to adjust for it when setting slots.  */
var HEADER_OFFSET = 17;
// Below are constants for LViewData indices to help us look up LViewData members
// without having to remember the specific indices.
// Uglify will inline these when minifying so there shouldn't be a cost.
var TVIEW = 0;
var FLAGS = 1;
var PARENT = 2;
var NEXT = 3;
var QUERIES = 4;
var HOST = 5;
var HOST_NODE = 6;
var BINDING_INDEX = 7;
var CLEANUP = 8;
var CONTEXT = 9;
var INJECTOR$1 = 10;
var RENDERER = 11;
var SANITIZER = 12;
var TAIL = 13;
var CONTAINER_INDEX = 14;
var CONTENT_QUERIES = 15;
var DECLARATION_VIEW = 16;

/**
 * @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 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);
        }
    }
}
/**
 * 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 = /** @class */ (function () {
    function WrappedValue(value) {
        this.wrapped = value;
    }
    /** Creates a wrapped value. */
    WrappedValue.wrap = function (value) { return new WrappedValue(value); };
    /**
     * Returns the underlying value of a wrapped value.
     * Returns the given `value` when it is not wrapped.
     **/
    WrappedValue.unwrap = function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };
    /** Returns true if `value` is a wrapped value. */
    WrappedValue.isWrapped = function (value) { return value instanceof WrappedValue; };
    return WrappedValue;
}());
/**
 * Represents a basic change from a previous to a new value.
 *
 * @publicApi
 */
var SimpleChange = /** @class */ (function () {
    function SimpleChange(previousValue, currentValue, firstChange) {
        this.previousValue = previousValue;
        this.currentValue = currentValue;
        this.firstChange = firstChange;
    }
    /**
     * Check whether the new value is the first value assigned.
     */
    SimpleChange.prototype.isFirstChange = function () { return this.firstChange; };
    return SimpleChange;
}());
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 = void 0;
        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
 */
/**
 * 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.
 */
var ACTIVE_INDEX = 0;
var VIEWS = 1;
// PARENT, NEXT, QUERIES, and HOST are indices 2, 3, 4, and 5.
// As we already have these constants in LViewData, we don't need to re-create them.
var NATIVE = 6;
var RENDER_PARENT = 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
 */
/**
 * Returns whether the values are different from a change detection stand point.
 *
 * Constraints are relaxed in checkNoChanges mode. See `devModeEqual` for details.
 */
function isDifferent(a, b, checkNoChangesMode) {
    if (ngDevMode && checkNoChangesMode) {
        return !devModeEqual(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;
}
function stringify$1(value) {
    if (typeof value == 'function')
        return value.name || value;
    if (typeof value == 'string')
        return value;
    if (value == null)
        return '';
    return '' + value;
}
/**
 * Flattens an array in non-recursive way. Input arrays are not modified.
 */
function flatten(list) {
    var result = [];
    var i = 0;
    while (i < list.length) {
        var item = list[i];
        if (Array.isArray(item)) {
            if (item.length > 0) {
                list = item.concat(list.slice(i + 1));
                i = 0;
            }
            else {
                i++;
            }
        }
        else {
            result.push(item);
            i++;
        }
    }
    return result;
}
/** Retrieves a value from any `LViewData` or `TData`. */
function loadInternal(index, arr) {
    ngDevMode && assertDataInRangeInternal(index + HEADER_OFFSET, arr);
    return arr[index + HEADER_OFFSET];
}
function assertDataInRangeInternal(index, arr) {
    assertLessThan(index, arr ? arr.length : 0, 'index expected to be a valid data index');
}
/**
 * Takes the value of a slot in `LViewData` and returns the element node.
 *
 * Normally, element nodes are stored flat, but if the node has styles/classes on it,
 * it might be wrapped in a styling context. Or if that node has a directive that injects
 * ViewContainerRef, it may be wrapped in an LContainer. Or if that node is a component,
 * it will be wrapped in LViewData. It could even have all three, so we keep looping
 * until we find something that isn't an array.
 *
 * @param value The initial value in `LViewData`
 */
function readElementValue(value) {
    while (Array.isArray(value)) {
        value = value[HOST];
    }
    return value;
}
/**
 * Retrieves an element value from the provided `viewData`, by unwrapping
 * from any containers, component views, or style contexts.
 */
function getNativeByIndex(index, arr) {
    return readElementValue(arr[index + HEADER_OFFSET]);
}
function getNativeByTNode(tNode, hostView) {
    return readElementValue(hostView[tNode.index]);
}
function getTNode(index, view) {
    return view[TVIEW].data[index + HEADER_OFFSET];
}
function getComponentViewByIndex(nodeIndex, hostView) {
    // Could be an LViewData or an LContainer. If LContainer, unwrap to find LViewData.
    var slotValue = hostView[nodeIndex];
    return slotValue.length >= HEADER_OFFSET ? slotValue : slotValue[HOST];
}
function isContentQueryHost(tNode) {
    return (tNode.flags & 16384 /* hasContentQuery */) !== 0;
}
function isComponent(tNode) {
    return (tNode.flags & 4096 /* isComponent */) === 4096 /* isComponent */;
}
function isLContainer(value) {
    // Styling contexts are also arrays, but their first index contains an element node
    return Array.isArray(value) && typeof value[ACTIVE_INDEX] === 'number';
}
/**
 * Retrieve the root view from any component by walking the parent `LViewData` until
 * reaching the root `LViewData`.
 *
 * @param component any component
 */
function getRootView(target) {
    ngDevMode && assertDefined(target, 'component');
    var lViewData = Array.isArray(target) ? target : readPatchedLViewData(target);
    while (lViewData && !(lViewData[FLAGS] & 64 /* IsRoot */)) {
        lViewData = lViewData[PARENT];
    }
    return lViewData;
}
function getRootContext(viewOrComponent) {
    return getRootView(viewOrComponent)[CONTEXT];
}
/**
 * Returns the monkey-patch value data present on the target (which could be
 * a component, directive or a DOM node).
 */
function readPatchedData(target) {
    return target[MONKEY_PATCH_KEY_NAME];
}
function readPatchedLViewData(target) {
    var value = readPatchedData(target);
    if (value) {
        return Array.isArray(value) ? value : value.lViewData;
    }
    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
 */
/** 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 `LViewData` 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).
 */
function getContext(target) {
    var mpValue = readPatchedData(target);
    if (mpValue) {
        // only when it's an array is it considered an LViewData instance
        // ... otherwise it's an already constructed LContext instance
        if (Array.isArray(mpValue)) {
            var lViewData = mpValue;
            var nodeIndex = void 0;
            var component = undefined;
            var directives = undefined;
            if (isComponentInstance(target)) {
                nodeIndex = findViaComponent(lViewData, target);
                if (nodeIndex == -1) {
                    throw new Error('The provided component was not found in the application');
                }
                component = target;
            }
            else if (isDirectiveInstance(target)) {
                nodeIndex = findViaDirective(lViewData, target);
                if (nodeIndex == -1) {
                    throw new Error('The provided directive was not found in the application');
                }
                directives = discoverDirectives(nodeIndex, lViewData, false);
            }
            else {
                nodeIndex = findViaNativeElement(lViewData, 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, compontent or
            // directive details) are filled into the context. If called multiple times
            // with different target values then the missing target data will be filled in.
            var native = readElementValue(lViewData[nodeIndex]);
            var existingCtx = readPatchedData(native);
            var context = (existingCtx && !Array.isArray(existingCtx)) ?
                existingCtx :
                createLContext(lViewData, nodeIndex, native);
            // only when the component has been discovered then update the monkey-patch
            if (component && context.component === undefined) {
                context.component = component;
                attachPatchData(context.component, context);
            }
            // only when the directives have been discovered then update the monkey-patch
            if (directives && context.directives === undefined) {
                context.directives = directives;
                for (var i = 0; i < directives.length; i++) {
                    attachPatchData(directives[i], context);
                }
            }
            attachPatchData(context.native, context);
            mpValue = context;
        }
    }
    else {
        var rElement = target;
        ngDevMode && assertDomElement(rElement);
        // if the context is not found then we need to traverse upwards up the DOM
        // to find the nearest element that has already been monkey patched with data
        var parent_1 = rElement;
        while (parent_1 = parent_1.parentNode) {
            var parentContext = readPatchedData(parent_1);
            if (parentContext) {
                var lViewData = void 0;
                if (Array.isArray(parentContext)) {
                    lViewData = parentContext;
                }
                else {
                    lViewData = parentContext.lViewData;
                }
                // the edge of the app was also reached here through another means
                // (maybe because the DOM was changed manually).
                if (!lViewData) {
                    return null;
                }
                var index = findViaNativeElement(lViewData, rElement);
                if (index >= 0) {
                    var native = readElementValue(lViewData[index]);
                    var context = createLContext(lViewData, index, native);
                    attachPatchData(native, context);
                    mpValue = context;
                    break;
                }
            }
        }
    }
    return mpValue || null;
}
/**
 * Creates an empty instance of a `LContext` context
 */
function createLContext(lViewData, nodeIndex, native) {
    return {
        lViewData: lViewData,
        nodeIndex: nodeIndex, native: native,
        component: undefined,
        directives: undefined,
        localRefs: undefined,
    };
}
/**
 * Takes a component instance and returns the view for that component.
 *
 * @param componentInstance
 * @returns The component's view
 */
function getComponentViewByInstance(componentInstance) {
    var lViewData = readPatchedData(componentInstance);
    var view;
    if (Array.isArray(lViewData)) {
        var nodeIndex = findViaComponent(lViewData, componentInstance);
        view = getComponentViewByIndex(nodeIndex, lViewData);
        var context = createLContext(lViewData, nodeIndex, view[HOST]);
        context.component = componentInstance;
        attachPatchData(componentInstance, context);
        attachPatchData(context.native, context);
    }
    else {
        var context = lViewData;
        view = getComponentViewByIndex(context.nodeIndex, context.lViewData);
    }
    return view;
}
/**
 * Assigns the given data to the given target (which could be a component,
 * directive or DOM node instance) using monkey-patching.
 */
function attachPatchData(target, data) {
    target[MONKEY_PATCH_KEY_NAME] = data;
}
function isComponentInstance(instance) {
    return instance && instance.constructor && instance.constructor.ngComponentDef;
}
function isDirectiveInstance(instance) {
    return instance && instance.constructor && instance.constructor.ngDirectiveDef;
}
/**
 * Locates the element within the given LViewData and returns the matching index
 */
function findViaNativeElement(lViewData, target) {
    var tNode = lViewData[TVIEW].firstChild;
    while (tNode) {
        var native = getNativeByTNode(tNode, lViewData);
        if (native === target) {
            return tNode.index;
        }
        tNode = traverseNextElement(tNode);
    }
    return -1;
}
/**
 * Locates the next tNode (child, sibling or parent).
 */
function traverseNextElement(tNode) {
    if (tNode.child) {
        return tNode.child;
    }
    else if (tNode.next) {
        return tNode.next;
    }
    else if (tNode.parent) {
        return tNode.parent.next || null;
    }
    return null;
}
/**
 * Locates the component within the given LViewData and returns the matching index
 */
function findViaComponent(lViewData, componentInstance) {
    var componentIndices = lViewData[TVIEW].components;
    if (componentIndices) {
        for (var i = 0; i < componentIndices.length; i++) {
            var elementComponentIndex = componentIndices[i];
            var componentView = getComponentViewByIndex(elementComponentIndex, lViewData);
            if (componentView[CONTEXT] === componentInstance) {
                return elementComponentIndex;
            }
        }
    }
    else {
        var rootComponentView = getComponentViewByIndex(HEADER_OFFSET, lViewData);
        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 LViewData and returns the matching index
 */
function findViaDirective(lViewData, directiveInstance) {
    // if a directive is monkey patched then it will (by default)
    // have a reference to the LViewData of the current view. The
    // element bound to the directive being search lives somewhere
    // in the view data. We loop through the nodes and check their
    // list of directives for the instance.
    var tNode = lViewData[TVIEW].firstChild;
    while (tNode) {
        var directiveIndexStart = getDirectiveStartIndex(tNode);
        var directiveIndexEnd = getDirectiveEndIndex(tNode, directiveIndexStart);
        for (var i = directiveIndexStart; i < directiveIndexEnd; i++) {
            if (lViewData[i] === directiveInstance) {
                return tNode.index;
            }
        }
        tNode = traverseNextElement(tNode);
    }
    return -1;
}
function assertDomElement(element) {
    assertEqual(element.nodeType, 1, 'The provided value must be an instance of an HTMLElement');
}
/**
 * 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 lViewData The target view data
 * @param includeComponents Whether or not to include components in returned directives
 */
function discoverDirectives(nodeIndex, lViewData, includeComponents) {
    var tNode = lViewData[TVIEW].data[nodeIndex];
    var directiveStartIndex = getDirectiveStartIndex(tNode);
    var directiveEndIndex = getDirectiveEndIndex(tNode, directiveStartIndex);
    if (!includeComponents && tNode.flags & 4096 /* isComponent */)
        directiveStartIndex++;
    return lViewData.slice(directiveStartIndex, directiveEndIndex);
}
/**
 * Returns a map of local references (local reference name => element or directive instance) that
 * exist on a given element.
 */
function discoverLocalRefs(lViewData, nodeIndex) {
    var tNode = lViewData[TVIEW].data[nodeIndex];
    if (tNode && tNode.localNames) {
        var result = {};
        for (var i = 0; i < tNode.localNames.length; i += 2) {
            var localRefName = tNode.localNames[i];
            var directiveIndex = tNode.localNames[i + 1];
            result[localRefName] =
                directiveIndex === -1 ? getNativeByTNode(tNode, lViewData) : lViewData[directiveIndex];
        }
        return result;
    }
    return null;
}
function getDirectiveStartIndex(tNode) {
    // the tNode instances store a flag value which then has a
    // pointer which tells the starting index of where all the
    // active directives are in the master directive array
    return tNode.flags >> 15 /* DirectiveStartingIndexShift */;
}
function getDirectiveEndIndex(tNode, startIndex) {
    // The end value is also a part of the same flag
    // (see `TNodeFlags` to see how the flag bit shifting
    // values are used).
    var count = tNode.flags & 4095 /* DirectiveCountMask */;
    return count ? (startIndex + count) : -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
 */
/**
 * If this is the first template pass, any ngOnInit or ngDoCheck hooks will be queued into
 * TView.initHooks during directiveCreate.
 *
 * The directive index and hook type are encoded into one number (1st bit: type, remaining bits:
 * directive index), then saved in the even indices of the initHooks array. The odd indices
 * hold the hook functions themselves.
 *
 * @param index The index of the directive in LViewData
 * @param hooks The static hooks map on the directive def
 * @param tView The current TView
 */
function queueInitHooks(index, onInit, doCheck, tView) {
    ngDevMode &&
        assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');
    if (onInit) {
        (tView.initHooks || (tView.initHooks = [])).push(index, onInit);
    }
    if (doCheck) {
        (tView.initHooks || (tView.initHooks = [])).push(index, doCheck);
        (tView.checkHooks || (tView.checkHooks = [])).push(index, doCheck);
    }
}
/**
 * Loops through the directives on a node and queues all their hooks except ngOnInit
 * and ngDoCheck, which are queued separately in directiveCreate.
 */
function queueLifecycleHooks(flags, tView) {
    if (tView.firstTemplatePass) {
        var start = flags >> 15 /* DirectiveStartingIndexShift */;
        var count = flags & 4095 /* DirectiveCountMask */;
        var end = start + count;
        // 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 = start; i < end; i++) {
            var def = tView.data[i];
            queueContentHooks(def, tView, i);
            queueViewHooks(def, tView, i);
            queueDestroyHooks(def, tView, i);
        }
    }
}
/** Queues afterContentInit and afterContentChecked hooks on TView */
function queueContentHooks(def, tView, i) {
    if (def.afterContentInit) {
        (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentInit);
    }
    if (def.afterContentChecked) {
        (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentChecked);
        (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, def.afterContentChecked);
    }
}
/** Queues afterViewInit and afterViewChecked hooks on TView */
function queueViewHooks(def, tView, i) {
    if (def.afterViewInit) {
        (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewInit);
    }
    if (def.afterViewChecked) {
        (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewChecked);
        (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, def.afterViewChecked);
    }
}
/** Queues onDestroy hooks on TView */
function queueDestroyHooks(def, tView, i) {
    if (def.onDestroy != null) {
        (tView.destroyHooks || (tView.destroyHooks = [])).push(i, def.onDestroy);
    }
}
/**
 * Calls onInit and doCheck calls if they haven't already been called.
 *
 * @param currentView The current view
 */
function executeInitHooks(currentView, tView, creationMode) {
    if (currentView[FLAGS] & 16 /* RunInit */) {
        executeHooks(currentView, tView.initHooks, tView.checkHooks, creationMode);
        currentView[FLAGS] &= ~16 /* RunInit */;
    }
}
/**
 * Iterates over afterViewInit and afterViewChecked functions and calls them.
 *
 * @param currentView The current view
 */
function executeHooks(data, allHooks, checkHooks, creationMode) {
    var hooksToCall = creationMode ? allHooks : checkHooks;
    if (hooksToCall) {
        callHooks(data, hooksToCall);
    }
}
/**
 * Calls lifecycle hooks with their contexts, skipping init hooks if it's not
 * creation mode.
 *
 * @param currentView The current view
 * @param arr The array in which the hooks are found
 */
function callHooks(currentView, arr) {
    for (var i = 0; i < arr.length; i += 2) {
        arr[i + 1].call(currentView[arr[i]]);
    }
}

/** Called when directives inject each other (creating a circular dependency) */
function throwCyclicDependencyError(token) {
    throw new Error("Cannot instantiate cyclic dependency! " + token);
}
/** Called when there are multiple component selectors that match a given node */
function throwMultipleComponentError(tNode) {
    throw new Error("Multiple components match node with tagname " + tNode.tagName);
}
/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */
function throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, oldValue, currValue) {
    if (checkNoChangesMode) {
        var msg = "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '" + oldValue + "'. Current value: '" + 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);
    }
}

/**
 * @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 TNODE = 8;
var PARENT_INJECTOR = 8;
var INJECTOR_SIZE = 9;

/**
 * @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_PROJECT_AS_ATTR_NAME = 'ngProjectAs';

/**
 * @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: cleanup once the code is merged in angular/angular
var RendererStyleFlags3;
(function (RendererStyleFlags3) {
    RendererStyleFlags3[RendererStyleFlags3["Important"] = 1] = "Important";
    RendererStyleFlags3[RendererStyleFlags3["DashCase"] = 2] = "DashCase";
})(RendererStyleFlags3 || (RendererStyleFlags3 = {}));
/** Returns whether the `renderer` is a `ProceduralRenderer3` */
function isProceduralRenderer(renderer) {
    return !!(renderer.listen);
}
var domRendererFactory3 = {
    createRenderer: function (hostElement, rendererType) { return document; }
};

/**
 * @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 assertNodeType(tNode, type) {
    assertDefined(tNode, 'should be called with a TNode');
    assertEqual(tNode.type, type, "should be a " + typeName(type));
}
function assertNodeOfPossibleTypes(tNode) {
    var types = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        types[_i - 1] = arguments[_i];
    }
    assertDefined(tNode, 'should be called with a TNode');
    var found = types.some(function (type) { return tNode.type === type; });
    assertEqual(found, true, "Should be one of " + types.map(typeName).join(', ') + " but got " + typeName(tNode.type));
}
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>';
}

/**
 * @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
 */
/** Retrieves the parent element of a given node. */
function getParentNative(tNode, currentView) {
    return tNode.parent == null ? getHostNative(currentView) :
        getNativeByTNode(tNode.parent, currentView);
}
/**
 * Gets the host element given a view. Will return null if the current view is an embedded view,
 * which does not have a host element.
 */
function getHostNative(currentView) {
    var hostTNode = currentView[HOST_NODE];
    return hostTNode && hostTNode.type !== 2 /* View */ ?
        getNativeByTNode(hostTNode, currentView[PARENT]) :
        null;
}
function getLContainer(tNode, embeddedView) {
    if (tNode.index === -1) {
        // This is a dynamically created view inside a dynamic container.
        // If the host index is -1, the view has not yet been inserted, so it has no parent.
        var containerHostIndex = embeddedView[CONTAINER_INDEX];
        return containerHostIndex > -1 ? embeddedView[PARENT][containerHostIndex] : null;
    }
    else {
        // This is a inline view node (e.g. embeddedViewStart)
        return embeddedView[PARENT][tNode.parent.index];
    }
}
/**
 * Retrieves render parent for a given view.
 * Might be null if a view is not yet attached to any container.
 */
function getContainerRenderParent(tViewNode, view) {
    var container = getLContainer(tViewNode, view);
    return container ? container[RENDER_PARENT] : null;
}
/**
 * Stack used to keep track of projection nodes in walkTNodeTree.
 *
 * This is deliberately created outside of walkTNodeTree to avoid allocating
 * a new array each time the function is called. Instead the array will be
 * re-used by each invocation. This works because the function is not reentrant.
 */
var projectionNodeStack = [];
/**
 * Walks a tree of TNodes, applying a transformation on the element nodes, either only on the first
 * one found, or on all of them.
 *
 * @param viewToWalk the view to walk
 * @param action identifies the action to be performed on the elements
 * @param renderer the current renderer.
 * @param renderParent Optional the render parent node to be set in all LContainers found,
 * required for action modes Insert and Destroy.
 * @param beforeNode Optional the node before which elements should be added, required for action
 * Insert.
 */
function walkTNodeTree(viewToWalk, action, renderer, renderParent, beforeNode) {
    var rootTNode = viewToWalk[TVIEW].node;
    var projectionNodeIndex = -1;
    var currentView = viewToWalk;
    var tNode = rootTNode.child;
    while (tNode) {
        var nextTNode = null;
        if (tNode.type === 3 /* Element */) {
            executeNodeAction(action, renderer, renderParent, getNativeByTNode(tNode, currentView), beforeNode);
            var nodeOrContainer = currentView[tNode.index];
            if (isLContainer(nodeOrContainer)) {
                // This element has an LContainer, and its comment needs to be handled
                executeNodeAction(action, renderer, renderParent, nodeOrContainer[NATIVE], beforeNode);
            }
        }
        else if (tNode.type === 0 /* Container */) {
            var lContainer = currentView[tNode.index];
            executeNodeAction(action, renderer, renderParent, lContainer[NATIVE], beforeNode);
            if (renderParent)
                lContainer[RENDER_PARENT] = renderParent;
            if (lContainer[VIEWS].length) {
                currentView = lContainer[VIEWS][0];
                nextTNode = currentView[TVIEW].node;
                // When the walker enters a container, then the beforeNode has to become the local native
                // comment node.
                beforeNode = lContainer[NATIVE];
            }
        }
        else if (tNode.type === 1 /* Projection */) {
            var componentView = findComponentView(currentView);
            var componentHost = componentView[HOST_NODE];
            var head = componentHost.projection[tNode.projection];
            // Must store both the TNode and the view because this projection node could be nested
            // deeply inside embedded views, and we need to get back down to this particular nested view.
            projectionNodeStack[++projectionNodeIndex] = tNode;
            projectionNodeStack[++projectionNodeIndex] = currentView;
            if (head) {
                currentView = componentView[PARENT];
                nextTNode = currentView[TVIEW].data[head.index];
            }
        }
        else {
            // Otherwise, this is a View or an ElementContainer
            nextTNode = tNode.child;
        }
        if (nextTNode === null) {
            // this last node was projected, we need to get back down to its projection node
            if (tNode.next === null && (tNode.flags & 8192 /* isProjected */)) {
                currentView = projectionNodeStack[projectionNodeIndex--];
                tNode = projectionNodeStack[projectionNodeIndex--];
            }
            nextTNode = tNode.next;
            /**
             * Find the next node in the TNode tree, taking into account the place where a node is
             * projected (in the shadow DOM) rather than where it comes from (in the light DOM).
             *
             * If there is no sibling node, then it goes to the next sibling of the parent node...
             * until it reaches rootNode (at which point null is returned).
             */
            while (!nextTNode) {
                // If parent is null, we're crossing the view boundary, so we should get the host TNode.
                tNode = tNode.parent || currentView[TVIEW].node;
                if (tNode === null || tNode === rootTNode)
                    return null;
                // When exiting a container, the beforeNode must be restored to the previous value
                if (tNode.type === 0 /* Container */) {
                    currentView = currentView[PARENT];
                    beforeNode = currentView[tNode.index][NATIVE];
                }
                if (tNode.type === 2 /* View */ && currentView[NEXT]) {
                    currentView = currentView[NEXT];
                    nextTNode = currentView[TVIEW].node;
                }
                else {
                    nextTNode = tNode.next;
                }
            }
        }
        tNode = nextTNode;
    }
}
/**
 * Given a current view, finds the nearest component's host (LElement).
 *
 * @param lViewData LViewData for which we want a host element node
 * @returns The host node
 */
function findComponentView(lViewData) {
    var rootTNode = lViewData[HOST_NODE];
    while (rootTNode && rootTNode.type === 2 /* View */) {
        ngDevMode && assertDefined(lViewData[PARENT], 'viewData.parent');
        lViewData = lViewData[PARENT];
        rootTNode = lViewData[HOST_NODE];
    }
    return lViewData;
}
/**
 * NOTE: for performance reasons, the possible actions are inlined within the function instead of
 * being passed as an argument.
 */
function executeNodeAction(action, renderer, parent, node, beforeNode) {
    if (action === 0 /* Insert */) {
        isProceduralRenderer(renderer) ?
            renderer.insertBefore(parent, node, beforeNode) :
            parent.insertBefore(node, beforeNode, true);
    }
    else if (action === 1 /* Detach */) {
        isProceduralRenderer(renderer) ?
            renderer.removeChild(parent, node) :
            parent.removeChild(node);
    }
    else if (action === 2 /* Destroy */) {
        ngDevMode && ngDevMode.rendererDestroyNode++;
        renderer.destroyNode(node);
    }
}
function createTextNode(value, renderer) {
    return isProceduralRenderer(renderer) ? renderer.createText(stringify$1(value)) :
        renderer.createTextNode(stringify$1(value));
}
function addRemoveViewFromContainer(viewToWalk, insertMode, beforeNode) {
    var renderParent = getContainerRenderParent(viewToWalk[TVIEW].node, viewToWalk);
    ngDevMode && assertNodeType(viewToWalk[TVIEW].node, 2 /* View */);
    if (renderParent) {
        var renderer = viewToWalk[RENDERER];
        walkTNodeTree(viewToWalk, insertMode ? 0 /* Insert */ : 1 /* Detach */, renderer, renderParent, beforeNode);
    }
}
/**
 * Traverses down and up the tree of views and containers to remove listeners and
 * call onDestroy callbacks.
 *
 * Notes:
 *  - Because it's used for onDestroy calls, it needs to be bottom-up.
 *  - Must process containers instead of their views to avoid splicing
 *  when views are destroyed and re-added.
 *  - Using a while loop because it's faster than recursion
 *  - Destroy only called on movement to sibling or movement to parent (laterally or up)
 *
 *  @param rootView The view to destroy
 */
function destroyViewTree(rootView) {
    // If the view has no children, we can clean it up and return early.
    if (rootView[TVIEW].childIndex === -1) {
        return cleanUpView(rootView);
    }
    var viewOrContainer = getLViewChild(rootView);
    while (viewOrContainer) {
        var next = null;
        if (viewOrContainer.length >= HEADER_OFFSET) {
            // If LViewData, traverse down to child.
            var view = viewOrContainer;
            if (view[TVIEW].childIndex > -1)
                next = getLViewChild(view);
        }
        else {
            // If container, traverse down to its first LViewData.
            var container = viewOrContainer;
            if (container[VIEWS].length)
                next = container[VIEWS][0];
        }
        if (next == null) {
            // Only clean up view when moving to the side or up, as destroy hooks
            // should be called in order from the bottom up.
            while (viewOrContainer && !viewOrContainer[NEXT] && viewOrContainer !== rootView) {
                cleanUpView(viewOrContainer);
                viewOrContainer = getParentState(viewOrContainer, rootView);
            }
            cleanUpView(viewOrContainer || rootView);
            next = viewOrContainer && viewOrContainer[NEXT];
        }
        viewOrContainer = 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 parentView The new parent of the inserted view
 * @param index The index at which to insert the view
 * @param containerIndex The index of the container node, if dynamic
 */
function insertView(lView, lContainer, parentView, index, containerIndex) {
    var views = lContainer[VIEWS];
    if (index > 0) {
        // This is a new view, we need to add it to the children.
        views[index - 1][NEXT] = lView;
    }
    if (index < views.length) {
        lView[NEXT] = views[index];
        views.splice(index, 0, lView);
    }
    else {
        views.push(lView);
        lView[NEXT] = null;
    }
    // Dynamically inserted views need a reference to their parent container's host so it's
    // possible to jump from a view to its container's next when walking the node tree.
    if (containerIndex > -1) {
        lView[CONTAINER_INDEX] = containerIndex;
        lView[PARENT] = parentView;
    }
    // Notify query that a new view has been added
    if (lView[QUERIES]) {
        lView[QUERIES].insertView(index);
    }
    // Sets the attached flag
    lView[FLAGS] |= 8 /* Attached */;
}
/**
 * Detaches a view from a container.
 *
 * This method splices 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
 * @param detached Whether or not this view is already detached.
 */
function detachView(lContainer, removeIndex, detached) {
    var views = lContainer[VIEWS];
    var viewToDetach = views[removeIndex];
    if (removeIndex > 0) {
        views[removeIndex - 1][NEXT] = viewToDetach[NEXT];
    }
    views.splice(removeIndex, 1);
    if (!detached) {
        addRemoveViewFromContainer(viewToDetach, false);
    }
    if (viewToDetach[QUERIES]) {
        viewToDetach[QUERIES].removeView();
    }
    viewToDetach[CONTAINER_INDEX] = -1;
    viewToDetach[PARENT] = null;
    // Unsets the attached flag
    viewToDetach[FLAGS] &= ~8 /* Attached */;
}
/**
 * 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 tContainer The TContainer node associated with the LContainer
 * @param removeIndex The index of the view to remove
 */
function removeView(lContainer, containerHost, removeIndex) {
    var view = lContainer[VIEWS][removeIndex];
    detachView(lContainer, removeIndex, !!containerHost.detached);
    destroyLView(view);
}
/** Gets the child of the given LViewData */
function getLViewChild(viewData) {
    var childIndex = viewData[TVIEW].childIndex;
    return childIndex === -1 ? null : viewData[childIndex];
}
/**
 * A standalone function which destroys an LView,
 * conducting cleanup (e.g. removing listeners, calling onDestroys).
 *
 * @param view The view to be destroyed.
 */
function destroyLView(view) {
    var renderer = view[RENDERER];
    if (isProceduralRenderer(renderer) && renderer.destroyNode) {
        walkTNodeTree(view, 2 /* Destroy */, renderer, null);
    }
    destroyViewTree(view);
    // Sets the destroyed flag
    view[FLAGS] |= 32 /* Destroyed */;
}
/**
 * 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 state The LViewOrLContainer for which we need a parent state
 * @param rootView The rootView, so we don't propagate too far up the view tree
 * @returns The correct parent LViewOrLContainer
 */
function getParentState(state, rootView) {
    var tNode;
    if (state.length >= HEADER_OFFSET && (tNode = state[HOST_NODE]) &&
        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(tNode, state);
    }
    else {
        // otherwise, use parent view for containers or component views
        return state[PARENT] === rootView ? null : state[PARENT];
    }
}
/**
 * Removes all listeners and call all onDestroys in a given view.
 *
 * @param view The LViewData to clean up
 */
function cleanUpView(viewOrContainer) {
    if (viewOrContainer.length >= HEADER_OFFSET) {
        var view = viewOrContainer;
        removeListeners(view);
        executeOnDestroys(view);
        executePipeOnDestroys(view);
        // For component views only, the local renderer is destroyed as clean up time.
        if (view[TVIEW].id === -1 && isProceduralRenderer(view[RENDERER])) {
            ngDevMode && ngDevMode.rendererDestroy++;
            view[RENDERER].destroy();
        }
    }
}
/** Removes listeners and unsubscribes from output subscriptions */
function removeListeners(viewData) {
    var cleanup = viewData[TVIEW].cleanup;
    if (cleanup != null) {
        for (var i = 0; i < cleanup.length - 1; i += 2) {
            if (typeof cleanup[i] === 'string') {
                // This is a listener with the native renderer
                var native = readElementValue(viewData[cleanup[i + 1]]);
                var listener = viewData[CLEANUP][cleanup[i + 2]];
                native.removeEventListener(cleanup[i], listener, cleanup[i + 3]);
                i += 2;
            }
            else if (typeof cleanup[i] === 'number') {
                // This is a listener with renderer2 (cleanup fn can be found by index)
                var cleanupFn = viewData[CLEANUP][cleanup[i]];
                cleanupFn();
            }
            else {
                // This is a cleanup function that is grouped with the index of its context
                var context = viewData[CLEANUP][cleanup[i + 1]];
                cleanup[i].call(context);
            }
        }
        viewData[CLEANUP] = null;
    }
}
/** Calls onDestroy hooks for this view */
function executeOnDestroys(view) {
    var tView = view[TVIEW];
    var destroyHooks;
    if (tView != null && (destroyHooks = tView.destroyHooks) != null) {
        callHooks(view, destroyHooks);
    }
}
/** Calls pipe destroy hooks for this view */
function executePipeOnDestroys(viewData) {
    var pipeDestroyHooks = viewData[TVIEW] && viewData[TVIEW].pipeDestroyHooks;
    if (pipeDestroyHooks) {
        callHooks(viewData, pipeDestroyHooks);
    }
}
function getRenderParent(tNode, currentView) {
    if (canInsertNativeNode(tNode, currentView)) {
        var hostTNode = currentView[HOST_NODE];
        return tNode.parent == null && hostTNode.type === 2 /* View */ ?
            getContainerRenderParent(hostTNode, currentView) :
            getParentNative(tNode, currentView);
    }
    return null;
}
function canInsertNativeChildOfElement(tNode) {
    // If the parent is null, then we are inserting across views. This happens when we
    // insert a root element of the component view into the component host element and it
    // should always be eager.
    if (tNode.parent == null ||
        // We should also eagerly insert if the parent is a regular, non-component element
        // since we know that this relationship will never be broken.
        tNode.parent.type === 3 /* Element */ && !(tNode.parent.flags & 4096 /* isComponent */)) {
        return true;
    }
    // Parent is 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 than move it to its final destination.
    return false;
}
/**
 * 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.
 */
function canInsertNativeChildOfView(viewTNode, view) {
    // Because we are inserting into a `View` the `View` may be disconnected.
    var container = getLContainer(viewTNode, view);
    if (container == null || container[RENDER_PARENT] == null) {
        // The `View` is not inserted into a `Container` or the parent `Container`
        // itself is disconnected. So we have to delay.
        return false;
    }
    // The parent `Container` is in inserted state, so we can eagerly insert into
    // this location.
    return true;
}
/**
 * Returns whether a native element 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 mare for projection but has not been inserted
 *   into destination.
 *

 *
 * @param parent The parent where the child will be inserted into.
 * @param currentView Current LView being processed.
 * @return boolean Whether the child should be inserted now (or delayed until later).
 */
function canInsertNativeNode(tNode, currentView) {
    var currentNode = tNode;
    var parent = tNode.parent;
    if (tNode.parent && tNode.parent.type === 4 /* ElementContainer */) {
        currentNode = getHighestElementContainer(tNode);
        parent = currentNode.parent;
    }
    if (parent === null)
        parent = currentView[HOST_NODE];
    if (parent && parent.type === 2 /* View */) {
        return canInsertNativeChildOfView(parent, currentView);
    }
    else {
        // Parent is a regular element or a component
        return canInsertNativeChildOfElement(currentNode);
    }
}
/**
 * Inserts a native node before another native node for a given parent using {@link Renderer3}.
 * This is a utility function that can be used when native nodes were determined - it abstracts an
 * actual renderer being used.
 */
function nativeInsertBefore(renderer, parent, child, beforeNode) {
    if (isProceduralRenderer(renderer)) {
        renderer.insertBefore(parent, child, beforeNode);
    }
    else {
        parent.insertBefore(child, beforeNode, true);
    }
}
/**
 * Appends the `child` element to the `parent`.
 *
 * The element insertion might be delayed {@link canInsertNativeNode}.
 *
 * @param childEl The child that should be appended
 * @param childTNode The TNode of the child element
 * @param currentView The current LView
 * @returns Whether or not the child was appended
 */
function appendChild(childEl, childTNode, currentView) {
    if (childEl !== null && canInsertNativeNode(childTNode, currentView)) {
        var renderer = currentView[RENDERER];
        var parentEl = getParentNative(childTNode, currentView);
        var parentTNode = childTNode.parent || currentView[HOST_NODE];
        if (parentTNode.type === 2 /* View */) {
            var lContainer = getLContainer(parentTNode, currentView);
            var views = lContainer[VIEWS];
            var index = views.indexOf(currentView);
            nativeInsertBefore(renderer, lContainer[RENDER_PARENT], childEl, getBeforeNodeForView(index, views, lContainer[NATIVE]));
        }
        else if (parentTNode.type === 4 /* ElementContainer */) {
            var elementContainer = getHighestElementContainer(childTNode);
            var renderParent = getRenderParent(elementContainer, currentView);
            nativeInsertBefore(renderer, renderParent, childEl, parentEl);
        }
        else {
            isProceduralRenderer(renderer) ? renderer.appendChild(parentEl, childEl) :
                parentEl.appendChild(childEl);
        }
        return true;
    }
    return false;
}
/**
 * Gets the top-level ng-container if ng-containers are nested.
 *
 * @param ngContainer The TNode of the starting ng-container
 * @returns tNode The TNode of the highest level ng-container
 */
function getHighestElementContainer(ngContainer) {
    while (ngContainer.parent != null && ngContainer.parent.type === 4 /* ElementContainer */) {
        ngContainer = ngContainer.parent;
    }
    return ngContainer;
}
function getBeforeNodeForView(index, views, containerNative) {
    if (index + 1 < views.length) {
        var view = views[index + 1];
        var viewTNode = view[HOST_NODE];
        return viewTNode.child ? getNativeByTNode(viewTNode.child, view) : containerNative;
    }
    else {
        return containerNative;
    }
}
/**
 * Removes the `child` element from the DOM if not in view and not projected.
 *
 * @param childTNode The TNode of the child to remove
 * @param childEl The child that should be removed
 * @param currentView The current LView
 * @returns Whether or not the child was removed
 */
function removeChild(childTNode, childEl, currentView) {
    // We only remove the element if not in View or not projected.
    if (childEl !== null && canInsertNativeNode(childTNode, currentView)) {
        var parentNative = getParentNative(childTNode, currentView);
        var renderer = currentView[RENDERER];
        isProceduralRenderer(renderer) ? renderer.removeChild(parentNative, childEl) :
            parentNative.removeChild(childEl);
        return true;
    }
    return false;
}
/**
 * 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)
 */
function appendProjectedNode(projectedTNode, tProjectionNode, currentView, projectionView) {
    var native = getNativeByTNode(projectedTNode, projectionView);
    appendChild(native, 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(native, projectionView);
    var renderParent = getRenderParent(tProjectionNode, currentView);
    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.
        nodeOrContainer[RENDER_PARENT] = renderParent;
        var views = nodeOrContainer[VIEWS];
        for (var i = 0; i < views.length; i++) {
            addRemoveViewFromContainer(views[i], true, nodeOrContainer[NATIVE]);
        }
    }
    else {
        if (projectedTNode.type === 4 /* ElementContainer */) {
            var ngContainerChildTNode = projectedTNode.child;
            while (ngContainerChildTNode) {
                appendProjectedNode(ngContainerChildTNode, tProjectionNode, currentView, projectionView);
                ngContainerChildTNode = ngContainerChildTNode.next;
            }
        }
        if (isLContainer(nodeOrContainer)) {
            nodeOrContainer[RENDER_PARENT] = renderParent;
            appendChild(nodeOrContainer[NATIVE], tProjectionNode, currentView);
        }
    }
}

/**
 * @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 isCssClassMatching(nodeClassAttrVal, cssClassToMatch) {
    var nodeClassesLen = nodeClassAttrVal.length;
    var matchIndex = nodeClassAttrVal.indexOf(cssClassToMatch);
    var matchEndIdx = matchIndex + cssClassToMatch.length;
    if (matchIndex === -1 // no match
        || (matchIndex > 0 && nodeClassAttrVal[matchIndex - 1] !== ' ') // no space before
        ||
            (matchEndIdx < nodeClassesLen && nodeClassAttrVal[matchEndIdx] !== ' ')) // no space after
     {
        return false;
    }
    return true;
}
/**
 * A utility function to match an Ivy node static data against a simple CSS selector
 *
 * @param node static data to match
 * @param selector
 * @returns true if node matches the selector.
 */
function isNodeMatchingSelector(tNode, selector) {
    ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');
    var mode = 4 /* ELEMENT */;
    var nodeAttrs = tNode.attrs;
    var selectOnlyMarkerIdx = nodeAttrs ? nodeAttrs.indexOf(1 /* SelectOnly */) : -1;
    // When processing ":not" selectors, we skip to the next ":not" if the
    // current one doesn't match
    var skipToNextSelector = false;
    for (var i = 0; i < selector.length; i++) {
        var current = selector[i];
        if (typeof current === 'number') {
            // If we finish processing a :not selector and it hasn't failed, return false
            if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {
                return false;
            }
            // If we are skipping to the next :not() and this mode flag is positive,
            // it's a part of the current :not() selector, and we should keep skipping
            if (skipToNextSelector && isPositive(current))
                continue;
            skipToNextSelector = false;
            mode = current | (mode & 1 /* NOT */);
            continue;
        }
        if (skipToNextSelector)
            continue;
        if (mode & 4 /* ELEMENT */) {
            mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */;
            if (current !== '' && current !== tNode.tagName) {
                if (isPositive(mode))
                    return false;
                skipToNextSelector = true;
            }
        }
        else {
            var attrName = mode & 8 /* CLASS */ ? 'class' : current;
            var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs);
            if (attrIndexInNode === -1) {
                if (isPositive(mode))
                    return false;
                skipToNextSelector = true;
                continue;
            }
            var selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i];
            if (selectorAttrValue !== '') {
                var nodeAttrValue = void 0;
                var maybeAttrName = nodeAttrs[attrIndexInNode];
                if (selectOnlyMarkerIdx > -1 && attrIndexInNode > selectOnlyMarkerIdx) {
                    nodeAttrValue = '';
                }
                else {
                    ngDevMode && assertNotEqual(maybeAttrName, 0 /* NamespaceURI */, 'We do not match directives on namespaced attributes');
                    nodeAttrValue = nodeAttrs[attrIndexInNode + 1];
                }
                if (mode & 8 /* CLASS */ &&
                    !isCssClassMatching(nodeAttrValue, selectorAttrValue) ||
                    mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {
                    if (isPositive(mode))
                        return false;
                    skipToNextSelector = true;
                }
            }
        }
    }
    return isPositive(mode) || skipToNextSelector;
}
function isPositive(mode) {
    return (mode & 1 /* NOT */) === 0;
}
/**
 * Examines an attributes definition array from a node to find the index of the
 * attribute with the specified name.
 *
 * NOTE: Will not find namespaced attributes.
 *
 * @param name the name of the attribute to find
 * @param attrs the attribute array to examine
 */
function findAttrIndexInNode(name, attrs) {
    if (attrs === null)
        return -1;
    var selectOnlyMode = false;
    var i = 0;
    while (i < attrs.length) {
        var maybeAttrName = attrs[i];
        if (maybeAttrName === name) {
            return i;
        }
        else if (maybeAttrName === 0 /* NamespaceURI */) {
            // NOTE(benlesh): will not find namespaced attributes. This is by design.
            i += 4;
        }
        else {
            if (maybeAttrName === 1 /* SelectOnly */) {
                selectOnlyMode = true;
            }
            i += selectOnlyMode ? 1 : 2;
        }
    }
    return -1;
}
function isNodeMatchingSelectorList(tNode, selector) {
    for (var i = 0; i < selector.length; i++) {
        if (isNodeMatchingSelector(tNode, selector[i])) {
            return true;
        }
    }
    return false;
}
function getProjectAsAttrValue(tNode) {
    var nodeAttrs = tNode.attrs;
    if (nodeAttrs != null) {
        var ngProjectAsAttrIdx = nodeAttrs.indexOf(NG_PROJECT_AS_ATTR_NAME);
        // only check for ngProjectAs in attribute names, don't accidentally match attribute's value
        // (attribute names are stored at even indexes)
        if ((ngProjectAsAttrIdx & 1) === 0) {
            return nodeAttrs[ngProjectAsAttrIdx + 1];
        }
    }
    return null;
}
/**
 * Checks a given node against matching selectors and returns
 * selector index (or 0 if none matched).
 *
 * This function takes into account the ngProjectAs attribute: if present its value will be compared
 * to the raw (un-parsed) CSS selector instead of using standard selector matching logic.
 */
function matchingSelectorIndex(tNode, selectors, textSelectors) {
    var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);
    for (var i = 0; i < selectors.length; i++) {
        // if a node has the ngProjectAs attribute match it against unparsed selector
        // match a node against a parsed selector only if ngProjectAs attribute is not present
        if (ngProjectAsAttrVal === textSelectors[i] ||
            ngProjectAsAttrVal === null && isNodeMatchingSelectorList(tNode, selectors[i])) {
            return i + 1; // first matching selector "captures" a given node
        }
    }
    return 0;
}

/**
 * Combines the binding value and a factory for an animation player.
 *
 * Used to bind a player to an element template binding (currently only
 * `[style]`, `[style.prop]`, `[class]` and `[class.name]` bindings
 * supported). The provided `factoryFn` function will be run once all
 * the associated bindings have been evaluated on the element and is
 * designed to return a player which will then be placed on the element.
 *
 * @param factoryFn The function that is used to create a player
 *   once all the rendering-related (styling values) have been
 *   processed for the element binding.
 * @param value The raw value that will be exposed to the binding
 *   so that the binding can update its internal values when
 *   any changes are evaluated.
 */
function bindPlayerFactory(factoryFn, value) {
    return new BoundPlayerFactory(factoryFn, value);
}
var BoundPlayerFactory = /** @class */ (function () {
    function BoundPlayerFactory(fn, value) {
        this.fn = fn;
        this.value = value;
    }
    return BoundPlayerFactory;
}());

var CorePlayerHandler = /** @class */ (function () {
    function CorePlayerHandler() {
        this._players = [];
    }
    CorePlayerHandler.prototype.flushPlayers = function () {
        for (var i = 0; i < this._players.length; i++) {
            var player = this._players[i];
            if (!player.parent && player.state === 0 /* Pending */) {
                player.play();
            }
        }
        this._players.length = 0;
    };
    CorePlayerHandler.prototype.queuePlayer = function (player) { this._players.push(player); };
    return CorePlayerHandler;
}());

/**
 * @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 createEmptyStylingContext(element, sanitizer, initialStylingValues) {
    return [
        null,
        sanitizer || null,
        initialStylingValues || [null],
        0,
        0,
        element || null,
        null,
        null // PreviousMultiStyleValue
    ];
}
/**
 * Used clone a copy of a pre-computed template of a styling context.
 *
 * A pre-computed template is designed to be computed once for a given element
 * (instructions.ts has logic for caching this).
 */
function allocStylingContext(element, templateStyleContext) {
    // each instance gets a copy
    var context = templateStyleContext.slice();
    context[5 /* ElementPosition */] = element;
    return context;
}
/**
 * Retrieve the `StylingContext` at a given index.
 *
 * This method lazily creates the `StylingContext`. This is because in most cases
 * we have styling without any bindings. Creating `StylingContext` eagerly would mean that
 * every style declaration such as `<div style="color: red">` would result `StyleContext`
 * which would create unnecessary memory pressure.
 *
 * @param index Index of the style allocation. See: `elementStyling`.
 * @param viewData The view to search for the styling context
 */
function getStylingContext(index, viewData) {
    var storageIndex = index + HEADER_OFFSET;
    var slotValue = viewData[storageIndex];
    var wrapper = viewData;
    while (Array.isArray(slotValue)) {
        wrapper = slotValue;
        slotValue = slotValue[HOST];
    }
    if (isStylingContext(wrapper)) {
        return wrapper;
    }
    else {
        // This is an LViewData or an LContainer
        var stylingTemplate = getTNode(index, viewData).stylingTemplate;
        if (wrapper !== viewData) {
            storageIndex = HOST;
        }
        return wrapper[storageIndex] = stylingTemplate ?
            allocStylingContext(slotValue, stylingTemplate) :
            createEmptyStylingContext(slotValue);
    }
}
function isStylingContext(value) {
    // Not an LViewData or an LContainer
    return typeof value[FLAGS] !== 'number' && typeof value[ACTIVE_INDEX] !== 'number';
}
function addPlayerInternal(playerContext, rootContext, element, player, playerContextIndex, ref) {
    ref = ref || element;
    if (playerContextIndex) {
        playerContext[playerContextIndex] = player;
    }
    else {
        playerContext.push(player);
    }
    if (player) {
        player.addEventListener(200 /* Destroyed */, function () {
            var index = playerContext.indexOf(player);
            var nonFactoryPlayerIndex = playerContext[0 /* NonBuilderPlayersStart */];
            // if the player is being removed from the factory side of the context
            // (which is where the [style] and [class] bindings do their thing) then
            // that side of the array cannot be resized since the respective bindings
            // have pointer index values that point to the associated factory instance
            if (index) {
                if (index < nonFactoryPlayerIndex) {
                    playerContext[index] = null;
                }
                else {
                    playerContext.splice(index, 1);
                }
            }
            player.destroy();
        });
        var playerHandler = rootContext.playerHandler || (rootContext.playerHandler = new CorePlayerHandler());
        playerHandler.queuePlayer(player, ref);
        return true;
    }
    return false;
}
function getPlayersInternal(playerContext) {
    var players = [];
    var nonFactoryPlayersStart = playerContext[0 /* NonBuilderPlayersStart */];
    // add all factory-based players (which are apart of [style] and [class] bindings)
    for (var i = 1 /* PlayerBuildersStartPosition */ + 1 /* PlayerOffsetPosition */; i < nonFactoryPlayersStart; i += 2 /* PlayerAndPlayerBuildersTupleSize */) {
        var player = playerContext[i];
        if (player) {
            players.push(player);
        }
    }
    // add all custom players (not apart of [style] and [class] bindings)
    for (var i = nonFactoryPlayersStart; i < playerContext.length; i++) {
        players.push(playerContext[i]);
    }
    return players;
}
function getOrCreatePlayerContext(target, context) {
    context = context || getContext(target);
    if (!context) {
        ngDevMode && throwInvalidRefError();
        return null;
    }
    var lViewData = context.lViewData, nodeIndex = context.nodeIndex;
    var stylingContext = getStylingContext(nodeIndex - HEADER_OFFSET, lViewData);
    return getPlayerContext(stylingContext) || allocPlayerContext(stylingContext);
}
function getPlayerContext(stylingContext) {
    return stylingContext[0 /* PlayerContext */];
}
function allocPlayerContext(data) {
    return data[0 /* PlayerContext */] =
        [5 /* SinglePlayerBuildersStartPosition */, null, null, null, null];
}
function throwInvalidRefError() {
    throw new Error('Only elements that exist in an Angular application can be used for animations');
}

var EMPTY_ARR = [];
var EMPTY_OBJ = {};
/**
 * Creates a styling context template where styling information is stored.
 * Any styles that are later referenced using `updateStyleProp` must be
 * passed in within this function. Initial values for those styles are to
 * be declared after all initial style properties are declared (this change in
 * mode between declarations and initial styles is made possible using a special
 * enum value found in `definition.ts`).
 *
 * @param initialStyleDeclarations a list of style declarations and initial style values
 *    that are used later within the styling context.
 *
 *    -> ['width', 'height', SPECIAL_ENUM_VAL, 'width', '100px']
 *       This implies that `width` and `height` will be later styled and that the `width`
 *       property has an initial value of `100px`.
 *
 * @param initialClassDeclarations a list of class declarations and initial class values
 *    that are used later within the styling context.
 *
 *    -> ['foo', 'bar', SPECIAL_ENUM_VAL, 'foo', true]
 *       This implies that `foo` and `bar` will be later styled and that the `foo`
 *       class will be applied to the element as an initial class since it's true
 */
function createStylingContextTemplate(initialClassDeclarations, initialStyleDeclarations, styleSanitizer) {
    var initialStylingValues = [null];
    var context = createEmptyStylingContext(null, styleSanitizer, initialStylingValues);
    // we use two maps since a class name might collide with a CSS style prop
    var stylesLookup = {};
    var classesLookup = {};
    var totalStyleDeclarations = 0;
    if (initialStyleDeclarations) {
        var hasPassedDeclarations = false;
        for (var i = 0; i < initialStyleDeclarations.length; i++) {
            var v = initialStyleDeclarations[i];
            // this flag value marks where the declarations end the initial values begin
            if (v === 1 /* VALUES_MODE */) {
                hasPassedDeclarations = true;
            }
            else {
                var prop = v;
                if (hasPassedDeclarations) {
                    var value = initialStyleDeclarations[++i];
                    initialStylingValues.push(value);
                    stylesLookup[prop] = initialStylingValues.length - 1;
                }
                else {
                    totalStyleDeclarations++;
                    stylesLookup[prop] = 0;
                }
            }
        }
    }
    // make where the class offsets begin
    context[4 /* ClassOffsetPosition */] = totalStyleDeclarations;
    if (initialClassDeclarations) {
        var hasPassedDeclarations = false;
        for (var i = 0; i < initialClassDeclarations.length; i++) {
            var v = initialClassDeclarations[i];
            // this flag value marks where the declarations end the initial values begin
            if (v === 1 /* VALUES_MODE */) {
                hasPassedDeclarations = true;
            }
            else {
                var className = v;
                if (hasPassedDeclarations) {
                    var value = initialClassDeclarations[++i];
                    initialStylingValues.push(value);
                    classesLookup[className] = initialStylingValues.length - 1;
                }
                else {
                    classesLookup[className] = 0;
                }
            }
        }
    }
    var styleProps = Object.keys(stylesLookup);
    var classNames = Object.keys(classesLookup);
    var classNamesIndexStart = styleProps.length;
    var totalProps = styleProps.length + classNames.length;
    // *2 because we are filling for both single and multi style spaces
    var maxLength = totalProps * 4 /* Size */ * 2 + 8 /* SingleStylesStartPosition */;
    // we need to fill the array from the start so that we can access
    // both the multi and the single array positions in the same loop block
    for (var i = 8 /* SingleStylesStartPosition */; i < maxLength; i++) {
        context.push(null);
    }
    var singleStart = 8 /* SingleStylesStartPosition */;
    var multiStart = totalProps * 4 /* Size */ + 8 /* SingleStylesStartPosition */;
    // fill single and multi-level styles
    for (var i = 0; i < totalProps; i++) {
        var isClassBased_1 = i >= classNamesIndexStart;
        var prop = isClassBased_1 ? classNames[i - classNamesIndexStart] : styleProps[i];
        var indexForInitial = isClassBased_1 ? classesLookup[prop] : stylesLookup[prop];
        var initialValue = initialStylingValues[indexForInitial];
        var indexForMulti = i * 4 /* Size */ + multiStart;
        var indexForSingle = i * 4 /* Size */ + singleStart;
        var initialFlag = prepareInitialFlag(prop, isClassBased_1, styleSanitizer || null);
        setFlag(context, indexForSingle, pointers(initialFlag, indexForInitial, indexForMulti));
        setProp(context, indexForSingle, prop);
        setValue(context, indexForSingle, null);
        setPlayerBuilderIndex(context, indexForSingle, 0);
        var flagForMulti = initialFlag | (initialValue !== null ? 1 /* Dirty */ : 0 /* None */);
        setFlag(context, indexForMulti, pointers(flagForMulti, indexForInitial, indexForSingle));
        setProp(context, indexForMulti, prop);
        setValue(context, indexForMulti, null);
        setPlayerBuilderIndex(context, indexForMulti, 0);
    }
    // there is no initial value flag for the master index since it doesn't
    // reference an initial style value
    setFlag(context, 3 /* MasterFlagPosition */, pointers(0, 0, multiStart));
    setContextDirty(context, initialStylingValues.length > 1);
    return context;
}
/**
 * Sets and resolves all `multi` styling on an `StylingContext` so that they can be
 * applied to the element once `renderStyleAndClassBindings` is called.
 *
 * All missing styles/class (any values that are not provided in the new `styles`
 * or `classes` params) will resolve to `null` within their respective positions
 * in the context.
 *
 * @param context The styling context that will be updated with the
 *    newly provided style values.
 * @param classesInput The key/value map of CSS class names that will be used for the update.
 * @param stylesInput The key/value map of CSS styles that will be used for the update.
 */
function updateStylingMap(context, classesInput, stylesInput) {
    stylesInput = stylesInput || null;
    var element = context[5 /* ElementPosition */];
    var classesPlayerBuilder = classesInput instanceof BoundPlayerFactory ?
        new ClassAndStylePlayerBuilder(classesInput, element, 2 /* Class */) :
        null;
    var stylesPlayerBuilder = stylesInput instanceof BoundPlayerFactory ?
        new ClassAndStylePlayerBuilder(stylesInput, element, 3 /* Style */) :
        null;
    var classesValue = classesPlayerBuilder ?
        classesInput.value :
        classesInput;
    var stylesValue = stylesPlayerBuilder ? stylesInput.value : stylesInput;
    // early exit (this is what's done to avoid using ctx.bind() to cache the value)
    var ignoreAllClassUpdates = classesValue === context[6 /* PreviousMultiClassValue */];
    var ignoreAllStyleUpdates = stylesValue === context[7 /* PreviousMultiStyleValue */];
    if (ignoreAllClassUpdates && ignoreAllStyleUpdates)
        return;
    context[6 /* PreviousMultiClassValue */] = classesValue;
    context[7 /* PreviousMultiStyleValue */] = stylesValue;
    var classNames = EMPTY_ARR;
    var applyAllClasses = false;
    var playerBuildersAreDirty = false;
    var classesPlayerBuilderIndex = classesPlayerBuilder ? 1 /* ClassMapPlayerBuilderPosition */ : 0;
    if (hasPlayerBuilderChanged(context, classesPlayerBuilder, 1 /* ClassMapPlayerBuilderPosition */)) {
        setPlayerBuilder(context, classesPlayerBuilder, 1 /* ClassMapPlayerBuilderPosition */);
        playerBuildersAreDirty = true;
    }
    var stylesPlayerBuilderIndex = stylesPlayerBuilder ? 3 /* StyleMapPlayerBuilderPosition */ : 0;
    if (hasPlayerBuilderChanged(context, stylesPlayerBuilder, 3 /* StyleMapPlayerBuilderPosition */)) {
        setPlayerBuilder(context, stylesPlayerBuilder, 3 /* StyleMapPlayerBuilderPosition */);
        playerBuildersAreDirty = true;
    }
    // each time a string-based value pops up then it shouldn't require a deep
    // check of what's changed.
    if (!ignoreAllClassUpdates) {
        if (typeof classesValue == 'string') {
            classNames = classesValue.split(/\s+/);
            // this boolean is used to avoid having to create a key/value map of `true` values
            // since a classname string implies that all those classes are added
            applyAllClasses = true;
        }
        else {
            classNames = classesValue ? Object.keys(classesValue) : EMPTY_ARR;
        }
    }
    var classes = (classesValue || EMPTY_OBJ);
    var styleProps = stylesValue ? Object.keys(stylesValue) : EMPTY_ARR;
    var styles = stylesValue || EMPTY_OBJ;
    var classesStartIndex = styleProps.length;
    var multiStartIndex = getMultiStartIndex(context);
    var dirty = false;
    var ctxIndex = multiStartIndex;
    var propIndex = 0;
    var propLimit = styleProps.length + classNames.length;
    // the main loop here will try and figure out how the shape of the provided
    // styles differ with respect to the context. Later if the context/styles/classes
    // are off-balance then they will be dealt in another loop after this one
    while (ctxIndex < context.length && propIndex < propLimit) {
        var isClassBased_2 = propIndex >= classesStartIndex;
        var processValue = (!isClassBased_2 && !ignoreAllStyleUpdates) || (isClassBased_2 && !ignoreAllClassUpdates);
        // when there is a cache-hit for a string-based class then we should
        // avoid doing any work diffing any of the changes
        if (processValue) {
            var adjustedPropIndex = isClassBased_2 ? propIndex - classesStartIndex : propIndex;
            var newProp = isClassBased_2 ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];
            var newValue = isClassBased_2 ? (applyAllClasses ? true : classes[newProp]) : styles[newProp];
            var playerBuilderIndex = isClassBased_2 ? classesPlayerBuilderIndex : stylesPlayerBuilderIndex;
            var prop = getProp(context, ctxIndex);
            if (prop === newProp) {
                var value = getValue(context, ctxIndex);
                var flag = getPointers(context, ctxIndex);
                setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex);
                if (hasValueChanged(flag, value, newValue)) {
                    setValue(context, ctxIndex, newValue);
                    playerBuildersAreDirty = playerBuildersAreDirty || !!playerBuilderIndex;
                    var initialValue = getInitialValue(context, flag);
                    // there is no point in setting this to dirty if the previously
                    // rendered value was being referenced by the initial style (or null)
                    if (hasValueChanged(flag, initialValue, newValue)) {
                        setDirty(context, ctxIndex, true);
                        dirty = true;
                    }
                }
            }
            else {
                var indexOfEntry = findEntryPositionByProp(context, newProp, ctxIndex);
                if (indexOfEntry > 0) {
                    // it was found at a later point ... just swap the values
                    var valueToCompare = getValue(context, indexOfEntry);
                    var flagToCompare = getPointers(context, indexOfEntry);
                    swapMultiContextEntries(context, ctxIndex, indexOfEntry);
                    if (hasValueChanged(flagToCompare, valueToCompare, newValue)) {
                        var initialValue = getInitialValue(context, flagToCompare);
                        setValue(context, ctxIndex, newValue);
                        if (hasValueChanged(flagToCompare, initialValue, newValue)) {
                            setDirty(context, ctxIndex, true);
                            playerBuildersAreDirty = playerBuildersAreDirty || !!playerBuilderIndex;
                            dirty = true;
                        }
                    }
                }
                else {
                    // we only care to do this if the insertion is in the middle
                    var newFlag = prepareInitialFlag(newProp, isClassBased_2, getStyleSanitizer(context));
                    playerBuildersAreDirty = playerBuildersAreDirty || !!playerBuilderIndex;
                    insertNewMultiProperty(context, ctxIndex, isClassBased_2, newProp, newFlag, newValue, playerBuilderIndex);
                    dirty = true;
                }
            }
        }
        ctxIndex += 4 /* Size */;
        propIndex++;
    }
    // this means that there are left-over values in the context that
    // were not included in the provided styles/classes and in this
    // case the  goal is to "remove" them from the context (by nullifying)
    while (ctxIndex < context.length) {
        var flag = getPointers(context, ctxIndex);
        var isClassBased_3 = (flag & 2 /* Class */) === 2 /* Class */;
        var processValue = (!isClassBased_3 && !ignoreAllStyleUpdates) || (isClassBased_3 && !ignoreAllClassUpdates);
        if (processValue) {
            var value = getValue(context, ctxIndex);
            var doRemoveValue = valueExists(value, isClassBased_3);
            if (doRemoveValue) {
                setDirty(context, ctxIndex, true);
                setValue(context, ctxIndex, null);
                // we keep the player factory the same so that the `nulled` value can
                // be instructed into the player because removing a style and/or a class
                // is a valid animation player instruction.
                var playerBuilderIndex = isClassBased_3 ? classesPlayerBuilderIndex : stylesPlayerBuilderIndex;
                setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex);
                dirty = true;
            }
        }
        ctxIndex += 4 /* Size */;
    }
    // this means that there are left-over properties in the context that
    // were not detected in the context during the loop above. In that
    // case we want to add the new entries into the list
    var sanitizer = getStyleSanitizer(context);
    while (propIndex < propLimit) {
        var isClassBased_4 = propIndex >= classesStartIndex;
        var processValue = (!isClassBased_4 && !ignoreAllStyleUpdates) || (isClassBased_4 && !ignoreAllClassUpdates);
        if (processValue) {
            var adjustedPropIndex = isClassBased_4 ? propIndex - classesStartIndex : propIndex;
            var prop = isClassBased_4 ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];
            var value = isClassBased_4 ? (applyAllClasses ? true : classes[prop]) : styles[prop];
            var flag = prepareInitialFlag(prop, isClassBased_4, sanitizer) | 1 /* Dirty */;
            var playerBuilderIndex = isClassBased_4 ? classesPlayerBuilderIndex : stylesPlayerBuilderIndex;
            context.push(flag, prop, value, playerBuilderIndex);
            dirty = true;
        }
        propIndex++;
    }
    if (dirty) {
        setContextDirty(context, true);
    }
    if (playerBuildersAreDirty) {
        setContextPlayersDirty(context, true);
    }
}
/**
 * Sets and resolves a single styling property/value on the provided `StylingContext` so
 * that they can be applied to the element once `renderStyleAndClassBindings` is called.
 *
 * Note that prop-level styling values are considered higher priority than any styling that
 * has been applied using `updateStylingMap`, therefore, when styling values are rendered
 * then any styles/classes that have been applied using this function will be considered first
 * (then multi values second and then initial values as a backup).
 *
 * @param context The styling context that will be updated with the
 *    newly provided style value.
 * @param index The index of the property which is being updated.
 * @param value The CSS style value that will be assigned
 */
function updateStyleProp(context, index, input) {
    var singleIndex = 8 /* SingleStylesStartPosition */ + index * 4 /* Size */;
    var currValue = getValue(context, singleIndex);
    var currFlag = getPointers(context, singleIndex);
    var value = (input instanceof BoundPlayerFactory) ? input.value : input;
    // didn't change ... nothing to make a note of
    if (hasValueChanged(currFlag, currValue, value)) {
        var isClassBased_5 = (currFlag & 2 /* Class */) === 2 /* Class */;
        var element = context[5 /* ElementPosition */];
        var playerBuilder = input instanceof BoundPlayerFactory ?
            new ClassAndStylePlayerBuilder(input, element, isClassBased_5 ? 2 /* Class */ : 3 /* Style */) :
            null;
        var value_1 = (playerBuilder ? input.value : input);
        var currPlayerIndex = getPlayerBuilderIndex(context, singleIndex);
        var playerBuildersAreDirty = false;
        var playerBuilderIndex = playerBuilder ? currPlayerIndex : 0;
        if (hasPlayerBuilderChanged(context, playerBuilder, currPlayerIndex)) {
            var newIndex = setPlayerBuilder(context, playerBuilder, currPlayerIndex);
            playerBuilderIndex = playerBuilder ? newIndex : 0;
            setPlayerBuilderIndex(context, singleIndex, playerBuilderIndex);
            playerBuildersAreDirty = true;
        }
        // the value will always get updated (even if the dirty flag is skipped)
        setValue(context, singleIndex, value_1);
        var indexForMulti = getMultiOrSingleIndex(currFlag);
        // if the value is the same in the multi-area then there's no point in re-assembling
        var valueForMulti = getValue(context, indexForMulti);
        if (!valueForMulti || hasValueChanged(currFlag, valueForMulti, value_1)) {
            var multiDirty = false;
            var singleDirty = true;
            // only when the value is set to `null` should the multi-value get flagged
            if (!valueExists(value_1, isClassBased_5) && valueExists(valueForMulti, isClassBased_5)) {
                multiDirty = true;
                singleDirty = false;
            }
            setDirty(context, indexForMulti, multiDirty);
            setDirty(context, singleIndex, singleDirty);
            setContextDirty(context, true);
        }
        if (playerBuildersAreDirty) {
            setContextPlayersDirty(context, true);
        }
    }
}
/**
 * This method will toggle the referenced CSS class (by the provided index)
 * within the given context.
 *
 * @param context The styling context that will be updated with the
 *    newly provided class value.
 * @param index The index of the CSS class which is being updated.
 * @param addOrRemove Whether or not to add or remove the CSS class
 */
function updateClassProp(context, index, addOrRemove) {
    var adjustedIndex = index + context[4 /* ClassOffsetPosition */];
    updateStyleProp(context, adjustedIndex, addOrRemove);
}
/**
 * Renders all queued styling using a renderer onto the given element.
 *
 * This function works by rendering any styles (that have been applied
 * using `updateStylingMap`) and any classes (that have been applied using
 * `updateStyleProp`) onto the provided element using the provided renderer.
 * Just before the styles/classes are rendered a final key/value style map
 * will be assembled (if `styleStore` or `classStore` are provided).
 *
 * @param lElement the element that the styles will be rendered on
 * @param context The styling context that will be used to determine
 *      what styles will be rendered
 * @param renderer the renderer that will be used to apply the styling
 * @param classesStore if provided, the updated class values will be applied
 *    to this key/value map instead of being renderered via the renderer.
 * @param stylesStore if provided, the updated style values will be applied
 *    to this key/value map instead of being renderered via the renderer.
 * @returns number the total amount of players that got queued for animation (if any)
 */
function renderStyleAndClassBindings(context, renderer, rootOrView, classesStore, stylesStore) {
    var totalPlayersQueued = 0;
    if (isContextDirty(context)) {
        var flushPlayerBuilders = context[3 /* MasterFlagPosition */] & 8 /* PlayerBuildersDirty */;
        var native = context[5 /* ElementPosition */];
        var multiStartIndex = getMultiStartIndex(context);
        var styleSanitizer = getStyleSanitizer(context);
        for (var i = 8 /* SingleStylesStartPosition */; i < context.length; i += 4 /* Size */) {
            // there is no point in rendering styles that have not changed on screen
            if (isDirty(context, i)) {
                var prop = getProp(context, i);
                var value = getValue(context, i);
                var flag = getPointers(context, i);
                var playerBuilder = getPlayerBuilder(context, i);
                var isClassBased_6 = flag & 2 /* Class */ ? true : false;
                var isInSingleRegion = i < multiStartIndex;
                var valueToApply = value;
                // VALUE DEFER CASE 1: Use a multi value instead of a null single value
                // this check implies that a single value was removed and we
                // should now defer to a multi value and use that (if set).
                if (isInSingleRegion && !valueExists(valueToApply, isClassBased_6)) {
                    // single values ALWAYS have a reference to a multi index
                    var multiIndex = getMultiOrSingleIndex(flag);
                    valueToApply = getValue(context, multiIndex);
                }
                // VALUE DEFER CASE 2: Use the initial value if all else fails (is falsy)
                // the initial value will always be a string or null,
                // therefore we can safely adopt it incase there's nothing else
                // note that this should always be a falsy check since `false` is used
                // for both class and style comparisons (styles can't be false and false
                // classes are turned off and should therefore defer to their initial values)
                if (!valueExists(valueToApply, isClassBased_6)) {
                    valueToApply = getInitialValue(context, flag);
                }
                if (isClassBased_6) {
                    setClass(native, prop, valueToApply ? true : false, renderer, classesStore, playerBuilder);
                }
                else {
                    var sanitizer = (flag & 4 /* Sanitize */) ? styleSanitizer : null;
                    setStyle(native, prop, valueToApply, renderer, sanitizer, stylesStore, playerBuilder);
                }
                setDirty(context, i, false);
            }
        }
        if (flushPlayerBuilders) {
            var rootContext = Array.isArray(rootOrView) ? getRootContext(rootOrView) : rootOrView;
            var playerContext = getPlayerContext(context);
            var playersStartIndex = playerContext[0 /* NonBuilderPlayersStart */];
            for (var i = 1 /* PlayerBuildersStartPosition */; i < playersStartIndex; i += 2 /* PlayerAndPlayerBuildersTupleSize */) {
                var builder = playerContext[i];
                var playerInsertionIndex = i + 1 /* PlayerOffsetPosition */;
                var oldPlayer = playerContext[playerInsertionIndex];
                if (builder) {
                    var player = builder.buildPlayer(oldPlayer);
                    if (player !== undefined) {
                        if (player != null) {
                            var wasQueued = addPlayerInternal(playerContext, rootContext, native, player, playerInsertionIndex);
                            wasQueued && totalPlayersQueued++;
                        }
                        if (oldPlayer) {
                            oldPlayer.destroy();
                        }
                    }
                }
                else if (oldPlayer) {
                    // the player builder has been removed ... therefore we should delete the associated
                    // player
                    oldPlayer.destroy();
                }
            }
            setContextPlayersDirty(context, false);
        }
        setContextDirty(context, false);
    }
    return totalPlayersQueued;
}
/**
 * This function renders a given CSS prop/value entry using the
 * provided renderer. If a `store` value is provided then
 * that will be used a render context instead of the provided
 * renderer.
 *
 * @param native the DOM Element
 * @param prop the CSS style property that will be rendered
 * @param value the CSS style value that will be rendered
 * @param renderer
 * @param store an optional key/value map that will be used as a context to render styles on
 */
function setStyle(native, prop, value, renderer, sanitizer, store, playerBuilder) {
    value = sanitizer && value ? sanitizer(prop, value) : value;
    if (store || playerBuilder) {
        if (store) {
            store.setValue(prop, value);
        }
        if (playerBuilder) {
            playerBuilder.setValue(prop, value);
        }
    }
    else if (value) {
        ngDevMode && ngDevMode.rendererSetStyle++;
        isProceduralRenderer(renderer) ?
            renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :
            native['style'].setProperty(prop, value);
    }
    else {
        ngDevMode && ngDevMode.rendererRemoveStyle++;
        isProceduralRenderer(renderer) ?
            renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :
            native['style'].removeProperty(prop);
    }
}
/**
 * This function renders a given CSS class value using the provided
 * renderer (by adding or removing it from the provided element).
 * If a `store` value is provided then that will be used a render
 * context instead of the provided renderer.
 *
 * @param native the DOM Element
 * @param prop the CSS style property that will be rendered
 * @param value the CSS style value that will be rendered
 * @param renderer
 * @param store an optional key/value map that will be used as a context to render styles on
 */
function setClass(native, className, add, renderer, store, playerBuilder) {
    if (store || playerBuilder) {
        if (store) {
            store.setValue(className, add);
        }
        if (playerBuilder) {
            playerBuilder.setValue(className, add);
        }
    }
    else if (add) {
        ngDevMode && ngDevMode.rendererAddClass++;
        isProceduralRenderer(renderer) ? renderer.addClass(native, className) :
            native['classList'].add(className);
    }
    else {
        ngDevMode && ngDevMode.rendererRemoveClass++;
        isProceduralRenderer(renderer) ? renderer.removeClass(native, className) :
            native['classList'].remove(className);
    }
}
function setDirty(context, index, isDirtyYes) {
    var adjustedIndex = index >= 8 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
    if (isDirtyYes) {
        context[adjustedIndex] |= 1 /* Dirty */;
    }
    else {
        context[adjustedIndex] &= ~1 /* Dirty */;
    }
}
function isDirty(context, index) {
    var adjustedIndex = index >= 8 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
    return (context[adjustedIndex] & 1 /* Dirty */) == 1 /* Dirty */;
}
function isClassBased(context, index) {
    var adjustedIndex = index >= 8 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
    return (context[adjustedIndex] & 2 /* Class */) == 2 /* Class */;
}
function isSanitizable(context, index) {
    var adjustedIndex = index >= 8 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
    return (context[adjustedIndex] & 4 /* Sanitize */) == 4 /* Sanitize */;
}
function pointers(configFlag, staticIndex, dynamicIndex) {
    return (configFlag & 15 /* BitMask */) | (staticIndex << 4 /* BitCountSize */) |
        (dynamicIndex << (14 /* BitCountSize */ + 4 /* BitCountSize */));
}
function getInitialValue(context, flag) {
    var index = getInitialIndex(flag);
    return context[2 /* InitialStylesPosition */][index];
}
function getInitialIndex(flag) {
    return (flag >> 4 /* BitCountSize */) & 16383 /* BitMask */;
}
function getMultiOrSingleIndex(flag) {
    var index = (flag >> (14 /* BitCountSize */ + 4 /* BitCountSize */)) & 16383 /* BitMask */;
    return index >= 8 /* SingleStylesStartPosition */ ? index : -1;
}
function getMultiStartIndex(context) {
    return getMultiOrSingleIndex(context[3 /* MasterFlagPosition */]);
}
function getStyleSanitizer(context) {
    return context[1 /* StyleSanitizerPosition */];
}
function setProp(context, index, prop) {
    context[index + 1 /* PropertyOffset */] = prop;
}
function setValue(context, index, value) {
    context[index + 2 /* ValueOffset */] = value;
}
function hasPlayerBuilderChanged(context, builder, index) {
    var playerContext = context[0 /* PlayerContext */];
    if (builder) {
        if (!playerContext || index === 0) {
            return true;
        }
    }
    else if (!playerContext) {
        return false;
    }
    return playerContext[index] !== builder;
}
function setPlayerBuilder(context, builder, insertionIndex) {
    var playerContext = context[0 /* PlayerContext */] || allocPlayerContext(context);
    if (insertionIndex > 0) {
        playerContext[insertionIndex] = builder;
    }
    else {
        insertionIndex = playerContext[0 /* NonBuilderPlayersStart */];
        playerContext.splice(insertionIndex, 0, builder, null);
        playerContext[0 /* NonBuilderPlayersStart */] +=
            2 /* PlayerAndPlayerBuildersTupleSize */;
    }
    return insertionIndex;
}
function setPlayerBuilderIndex(context, index, playerBuilderIndex) {
    context[index + 3 /* PlayerBuilderIndexOffset */] = playerBuilderIndex;
}
function getPlayerBuilderIndex(context, index) {
    return context[index + 3 /* PlayerBuilderIndexOffset */] || 0;
}
function getPlayerBuilder(context, index) {
    var playerBuilderIndex = getPlayerBuilderIndex(context, index);
    if (playerBuilderIndex) {
        var playerContext = context[0 /* PlayerContext */];
        if (playerContext) {
            return playerContext[playerBuilderIndex];
        }
    }
    return null;
}
function setFlag(context, index, flag) {
    var adjustedIndex = index === 3 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);
    context[adjustedIndex] = flag;
}
function getPointers(context, index) {
    var adjustedIndex = index === 3 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);
    return context[adjustedIndex];
}
function getValue(context, index) {
    return context[index + 2 /* ValueOffset */];
}
function getProp(context, index) {
    return context[index + 1 /* PropertyOffset */];
}
function isContextDirty(context) {
    return isDirty(context, 3 /* MasterFlagPosition */);
}
function setContextDirty(context, isDirtyYes) {
    setDirty(context, 3 /* MasterFlagPosition */, isDirtyYes);
}
function setContextPlayersDirty(context, isDirtyYes) {
    if (isDirtyYes) {
        context[3 /* MasterFlagPosition */] |= 8 /* PlayerBuildersDirty */;
    }
    else {
        context[3 /* MasterFlagPosition */] &= ~8 /* PlayerBuildersDirty */;
    }
}
function findEntryPositionByProp(context, prop, startIndex) {
    for (var i = (startIndex || 0) + 1 /* PropertyOffset */; i < context.length; i += 4 /* Size */) {
        var thisProp = context[i];
        if (thisProp == prop) {
            return i - 1 /* PropertyOffset */;
        }
    }
    return -1;
}
function swapMultiContextEntries(context, indexA, indexB) {
    var tmpValue = getValue(context, indexA);
    var tmpProp = getProp(context, indexA);
    var tmpFlag = getPointers(context, indexA);
    var tmpPlayerBuilderIndex = getPlayerBuilderIndex(context, indexA);
    var flagA = tmpFlag;
    var flagB = getPointers(context, indexB);
    var singleIndexA = getMultiOrSingleIndex(flagA);
    if (singleIndexA >= 0) {
        var _flag = getPointers(context, singleIndexA);
        var _initial = getInitialIndex(_flag);
        setFlag(context, singleIndexA, pointers(_flag, _initial, indexB));
    }
    var singleIndexB = getMultiOrSingleIndex(flagB);
    if (singleIndexB >= 0) {
        var _flag = getPointers(context, singleIndexB);
        var _initial = getInitialIndex(_flag);
        setFlag(context, singleIndexB, pointers(_flag, _initial, indexA));
    }
    setValue(context, indexA, getValue(context, indexB));
    setProp(context, indexA, getProp(context, indexB));
    setFlag(context, indexA, getPointers(context, indexB));
    setPlayerBuilderIndex(context, indexA, getPlayerBuilderIndex(context, indexB));
    setValue(context, indexB, tmpValue);
    setProp(context, indexB, tmpProp);
    setFlag(context, indexB, tmpFlag);
    setPlayerBuilderIndex(context, indexB, tmpPlayerBuilderIndex);
}
function updateSinglePointerValues(context, indexStartPosition) {
    for (var i = indexStartPosition; i < context.length; i += 4 /* Size */) {
        var multiFlag = getPointers(context, i);
        var singleIndex = getMultiOrSingleIndex(multiFlag);
        if (singleIndex > 0) {
            var singleFlag = getPointers(context, singleIndex);
            var initialIndexForSingle = getInitialIndex(singleFlag);
            var flagValue = (isDirty(context, singleIndex) ? 1 /* Dirty */ : 0 /* None */) |
                (isClassBased(context, singleIndex) ? 2 /* Class */ : 0 /* None */) |
                (isSanitizable(context, singleIndex) ? 4 /* Sanitize */ : 0 /* None */);
            var updatedFlag = pointers(flagValue, initialIndexForSingle, i);
            setFlag(context, singleIndex, updatedFlag);
        }
    }
}
function insertNewMultiProperty(context, index, classBased, name, flag, value, playerIndex) {
    var doShift = index < context.length;
    // prop does not exist in the list, add it in
    context.splice(index, 0, flag | 1 /* Dirty */ | (classBased ? 2 /* Class */ : 0 /* None */), name, value, playerIndex);
    if (doShift) {
        // because the value was inserted midway into the array then we
        // need to update all the shifted multi values' single value
        // pointers to point to the newly shifted location
        updateSinglePointerValues(context, index + 4 /* Size */);
    }
}
function valueExists(value, isClassBased) {
    if (isClassBased) {
        return value ? true : false;
    }
    return value !== null;
}
function prepareInitialFlag(name, isClassBased, sanitizer) {
    if (isClassBased) {
        return 2 /* Class */;
    }
    else if (sanitizer && sanitizer(name)) {
        return 4 /* Sanitize */;
    }
    return 0 /* None */;
}
function hasValueChanged(flag, a, b) {
    var isClassBased = flag & 2 /* Class */;
    var hasValues = a && b;
    var usesSanitizer = flag & 4 /* Sanitize */;
    // the toString() comparison ensures that a value is checked
    // ... otherwise (during sanitization bypassing) the === comparsion
    // would fail since a new String() instance is created
    if (!isClassBased && hasValues && usesSanitizer) {
        // we know for sure we're dealing with strings at this point
        return a.toString() !== b.toString();
    }
    // everything else is safe to check with a normal equality check
    return a !== b;
}
var ClassAndStylePlayerBuilder = /** @class */ (function () {
    function ClassAndStylePlayerBuilder(factory, _element, _type) {
        this._element = _element;
        this._type = _type;
        this._values = {};
        this._dirty = false;
        this._factory = factory;
    }
    ClassAndStylePlayerBuilder.prototype.setValue = function (prop, value) {
        if (this._values[prop] !== value) {
            this._values[prop] = value;
            this._dirty = true;
        }
    };
    ClassAndStylePlayerBuilder.prototype.buildPlayer = function (currentPlayer) {
        // if no values have been set here then this means the binding didn't
        // change and therefore the binding values were not updated through
        // `setValue` which means no new player will be provided.
        if (this._dirty) {
            var player = this._factory.fn(this._element, this._type, this._values, currentPlayer || null);
            this._values = {};
            this._dirty = false;
            return player;
        }
        return undefined;
    };
    return ClassAndStylePlayerBuilder;
}());

/**
 * @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 permanent marker promise which signifies that the current CD tree is
 * clean.
 */
var _CLEAN_PROMISE = Promise.resolve(null);
/**
 * Token set in currentMatches while dependencies are being resolved.
 *
 * If we visit a directive that has a value set to CIRCULAR, we know we've
 * already seen it, and thus have a circular dependency.
 */
var CIRCULAR$1 = '__CIRCULAR__';
/**
 * This property gets set before entering a template.
 *
 * This renderer can be one of two varieties of Renderer3:
 *
 * - ObjectedOrientedRenderer3
 *
 * 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).
 *
 * - ProceduralRenderer3
 *
 * 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.
 */
var renderer;
function getRenderer() {
    // top level variables should not be exported for performance reasons (PERF_NOTES.md)
    return renderer;
}
var rendererFactory;
function getRendererFactory() {
    // top level variables should not be exported for performance reasons (PERF_NOTES.md)
    return rendererFactory;
}
function getCurrentSanitizer() {
    return viewData && viewData[SANITIZER];
}
/**
 * Store the element depth count. This is used to identify the root elements of the template
 * so that we can than attach `LViewData` to only those elements.
 */
var elementDepthCount;
/**
 * 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>
 * ```
 */
var bindingsEnabled;
/**
 * 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.
 */
function getCurrentView() {
    return viewData;
}
/**
 * Restores `contextViewData` to the given OpaqueViewState instance.
 *
 * Used in conjunction with the getCurrentView() instruction to save a snapshot
 * of the current view and restore it when listeners are invoked. This allows
 * walking the declaration view tree in listeners to get vars from parent views.
 *
 * @param viewToRestore The OpaqueViewState instance to restore.
 */
function restoreView(viewToRestore) {
    contextViewData = viewToRestore;
}
/** Used to set the parent property when nodes are created and track query results. */
var previousOrParentTNode;
function getPreviousOrParentTNode() {
    // top level variables should not be exported for performance reasons (PERF_NOTES.md)
    return previousOrParentTNode;
}
function setEnvironment(tNode, view) {
    previousOrParentTNode = tNode;
    viewData = view;
}
/**
 * If `isParent` is:
 *  - `true`: then `previousOrParentTNode` points to a parent node.
 *  - `false`: then `previousOrParentTNode` points to previous node (sibling).
 */
var isParent;
var tView;
var currentQueries;
/**
 * Query instructions can ask for "current queries" in 2 different cases:
 * - when creating view queries (at the root of a component view, before any node is created - in
 * this case currentQueries points to view queries)
 * - when creating content queries (i.e. this previousOrParentTNode points to a node on which we
 * create content queries).
 */
function getOrCreateCurrentQueries(QueryType) {
    // if this is the first content query on a node, any existing LQueries needs to be cloned
    // in subsequent template passes, the cloning occurs before directive instantiation.
    if (previousOrParentTNode && previousOrParentTNode !== viewData[HOST_NODE] &&
        !isContentQueryHost(previousOrParentTNode)) {
        currentQueries && (currentQueries = currentQueries.clone());
        previousOrParentTNode.flags |= 16384 /* hasContentQuery */;
    }
    return currentQueries || (currentQueries = new QueryType(null, null, null));
}
/**
 * This property gets set before entering a template.
 */
var creationMode;
function getCreationMode() {
    // top level variables should not be exported for performance reasons (PERF_NOTES.md)
    return 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.
 */
var viewData;
/**
 * Internal function that returns the current LViewData instance.
 *
 * The getCurrentView() instruction should be used for anything public.
 */
function _getViewData() {
    // top level variables should not be exported for performance reasons (PERF_NOTES.md)
    return viewData;
}
/**
 * The last viewData retrieved by nextContext().
 * Allows building nextContext() and reference() calls.
 *
 * e.g. const inner = x().$implicit; const outer = x().$implicit;
 */
var contextViewData = null;
function getCleanup(view) {
    // top level variables should not be exported for performance reasons (PERF_NOTES.md)
    return view[CLEANUP] || (view[CLEANUP] = []);
}
function getTViewCleanup(view) {
    return view[TVIEW].cleanup || (view[TVIEW].cleanup = []);
}
/**
 * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.
 *
 * Necessary to support ChangeDetectorRef.checkNoChanges().
 */
var checkNoChangesMode = false;
/** Whether or not this is the first time the current view has been processed. */
var firstTemplatePass = true;
/**
 * 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.
 */
var bindingRootIndex = -1;
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
function getBindingRoot() {
    return bindingRootIndex;
}
/**
 * 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 host Element to which the View is a child of
 * @returns the previous state;
 */
function enterView(newView, hostTNode) {
    var oldView = viewData;
    tView = newView && newView[TVIEW];
    creationMode = newView && (newView[FLAGS] & 1 /* CreationMode */) === 1 /* CreationMode */;
    firstTemplatePass = newView && tView.firstTemplatePass;
    bindingRootIndex = newView && tView.bindingStartIndex;
    renderer = newView && newView[RENDERER];
    previousOrParentTNode = hostTNode;
    isParent = true;
    viewData = contextViewData = newView;
    oldView && (oldView[QUERIES] = currentQueries);
    currentQueries = newView && newView[QUERIES];
    return oldView;
}
/**
 * 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 creationOnly An optional boolean to indicate that the view was processed in creation mode
 * only, i.e. the first update will be done later. Only possible for dynamically created views.
 */
function leaveView(newView, creationOnly) {
    if (!creationOnly) {
        if (!checkNoChangesMode) {
            executeHooks(viewData, tView.viewHooks, tView.viewCheckHooks, creationMode);
        }
        // Views are clean and in update mode after being checked, so these bits are cleared
        viewData[FLAGS] &= ~(1 /* CreationMode */ | 4 /* Dirty */);
    }
    viewData[FLAGS] |= 16 /* RunInit */;
    viewData[BINDING_INDEX] = tView.bindingStartIndex;
    enterView(newView, null);
}
/**
 * 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.
 */
function refreshDescendantViews() {
    setHostBindings();
    var parentFirstTemplatePass = firstTemplatePass;
    // This needs to be set before children are processed to support recursive components
    tView.firstTemplatePass = firstTemplatePass = false;
    if (!checkNoChangesMode) {
        executeInitHooks(viewData, tView, creationMode);
    }
    refreshDynamicEmbeddedViews(viewData);
    // Content query results must be refreshed before content hooks are called.
    refreshContentQueries(tView);
    if (!checkNoChangesMode) {
        executeHooks(viewData, tView.contentHooks, tView.contentCheckHooks, creationMode);
    }
    refreshChildComponents(tView.components, parentFirstTemplatePass);
}
/** Sets the host bindings for the current view. */
function setHostBindings() {
    if (tView.expandoInstructions) {
        bindingRootIndex = viewData[BINDING_INDEX] = tView.expandoStartIndex;
        var currentDirectiveIndex = -1;
        var currentElementIndex = -1;
        for (var i = 0; i < tView.expandoInstructions.length; i++) {
            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;
                    if (typeof viewData[bindingRootIndex] === 'number') {
                        // We've hit an injector. It may or may not exist depending on whether
                        // there is a public directive on this node.
                        bindingRootIndex += INJECTOR_SIZE;
                    }
                    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;
                }
            }
            else {
                // If it's not a number, it's a host binding function that needs to be executed.
                viewData[BINDING_INDEX] = bindingRootIndex;
                // We must subtract the header offset because the load() instruction
                // expects a raw, unadjusted index.
                instruction(currentDirectiveIndex - HEADER_OFFSET, currentElementIndex);
                currentDirectiveIndex++;
            }
        }
    }
}
/** Refreshes content queries for all directives in the given view. */
function refreshContentQueries(tView) {
    if (tView.contentQueries != null) {
        for (var i = 0; i < tView.contentQueries.length; i += 2) {
            var directiveDefIdx = tView.contentQueries[i];
            var directiveDef = tView.data[directiveDefIdx];
            directiveDef.contentQueriesRefresh(directiveDefIdx - HEADER_OFFSET, tView.contentQueries[i + 1]);
        }
    }
}
/** Refreshes child components in the current view. */
function refreshChildComponents(components, parentFirstTemplatePass) {
    if (components != null) {
        for (var i = 0; i < components.length; i++) {
            componentRefresh(components[i], parentFirstTemplatePass);
        }
    }
}
function executeInitAndContentHooks() {
    if (!checkNoChangesMode) {
        executeInitHooks(viewData, tView, creationMode);
        executeHooks(viewData, tView.contentHooks, tView.contentCheckHooks, creationMode);
    }
}
function createLViewData(renderer, tView, context, flags, sanitizer) {
    var instance = tView.blueprint.slice();
    instance[FLAGS] = flags | 1 /* CreationMode */ | 8 /* Attached */ | 16 /* RunInit */;
    instance[PARENT] = instance[DECLARATION_VIEW] = viewData;
    instance[CONTEXT] = context;
    instance[INJECTOR$1] = viewData ? viewData[INJECTOR$1] : null;
    instance[RENDERER] = renderer;
    instance[SANITIZER] = sanitizer || null;
    return instance;
}
function createNodeAtIndex(index, type, native, name, attrs) {
    var adjustedIndex = index + HEADER_OFFSET;
    ngDevMode &&
        assertLessThan(adjustedIndex, viewData.length, "Slot should have been initialized with null");
    viewData[adjustedIndex] = native;
    var tNode = tView.data[adjustedIndex];
    if (tNode == null) {
        tNode = tView.data[adjustedIndex] = createTNode(type, adjustedIndex, name, attrs, null);
        // 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;
            }
        }
    }
    if (tView.firstChild == null && type === 3 /* Element */) {
        tView.firstChild = tNode;
    }
    previousOrParentTNode = tNode;
    isParent = true;
    return tNode;
}
function createViewNode(index, view) {
    // 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.
    if (view[TVIEW].node == null) {
        view[TVIEW].node = createTNode(2 /* View */, index, null, null, null);
    }
    isParent = true;
    return previousOrParentTNode = view[HOST_NODE] = view[TVIEW].node;
}
/**
 * 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.
 */
function adjustBlueprintForNewNode(view) {
    var tView = view[TVIEW];
    if (tView.firstTemplatePass) {
        tView.expandoStartIndex++;
        tView.blueprint.push(null);
        view.push(null);
    }
}
//////////////////////////
//// Render
//////////////////////////
/**
 * Resets the application state.
 */
function resetComponentState() {
    isParent = false;
    previousOrParentTNode = null;
    elementDepthCount = 0;
    bindingsEnabled = true;
}
/**
 * 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).
 */
function createEmbeddedViewAndNode(tView, context, declarationView, renderer, queries, injectorIndex) {
    var _isParent = isParent;
    var _previousOrParentTNode = previousOrParentTNode;
    isParent = true;
    previousOrParentTNode = null;
    var lView = createLViewData(renderer, tView, context, 2 /* CheckAlways */, getCurrentSanitizer());
    lView[DECLARATION_VIEW] = declarationView;
    if (queries) {
        lView[QUERIES] = queries.createView();
    }
    createViewNode(-1, lView);
    if (tView.firstTemplatePass) {
        tView.node.injectorIndex = injectorIndex;
    }
    isParent = _isParent;
    previousOrParentTNode = _previousOrParentTNode;
    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.
 */
function renderEmbeddedTemplate(viewToRender, tView, context, rf) {
    var _isParent = isParent;
    var _previousOrParentTNode = previousOrParentTNode;
    var oldView;
    if (viewToRender[FLAGS] & 64 /* IsRoot */) {
        // This is a root view inside the view tree
        tickRootContext(viewToRender[CONTEXT]);
    }
    else {
        try {
            isParent = true;
            previousOrParentTNode = null;
            oldView = enterView(viewToRender, viewToRender[HOST_NODE]);
            namespaceHTML();
            tView.template(rf, context);
            if (rf & 2 /* Update */) {
                refreshDescendantViews();
            }
            else {
                // 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.
                viewToRender[TVIEW].firstTemplatePass = firstTemplatePass = false;
            }
        }
        finally {
            // renderEmbeddedTemplate() is called twice, once for creation only and then once for
            // update. When for creation only, leaveView() must not trigger view hooks, nor clean flags.
            var isCreationOnly = (rf & 1 /* Create */) === 1 /* Create */;
            leaveView(oldView, isCreationOnly);
            isParent = _isParent;
            previousOrParentTNode = _previousOrParentTNode;
        }
    }
}
/**
 * Retrieves a context at the level specified and saves it as the global, contextViewData.
 * Will get the next level up if level is not specified.
 *
 * This is used to save contexts of parent views so they can be bound in embedded views, or
 * in conjunction with reference() to bind a ref from a parent view.
 *
 * @param level The relative level of the view from which to grab context compared to contextVewData
 * @returns context
 */
function nextContext(level) {
    if (level === void 0) { level = 1; }
    contextViewData = walkUpViews(level, contextViewData);
    return contextViewData[CONTEXT];
}
function renderComponentOrTemplate(hostView, componentOrContext, templateFn) {
    var oldView = enterView(hostView, hostView[HOST_NODE]);
    try {
        if (rendererFactory.begin) {
            rendererFactory.begin();
        }
        if (templateFn) {
            namespaceHTML();
            templateFn(getRenderFlags(hostView), componentOrContext);
            refreshDescendantViews();
        }
        else {
            executeInitAndContentHooks();
            // Element was stored at 0 in data and directive was stored at 0 in directives
            // in renderComponent()
            setHostBindings();
            componentRefresh(HEADER_OFFSET, false);
        }
    }
    finally {
        if (rendererFactory.end) {
            rendererFactory.end();
        }
        leaveView(oldView);
    }
}
/**
 * This function returns the default configuration of rendering flags depending on when the
 * template is in creation mode or update mode. By default, the update block is run with the
 * creation block when the view is in creation mode. Otherwise, the update block is run
 * alone.
 *
 * Dynamically created views do NOT use this configuration (update block and create block are
 * always run separately).
 */
function getRenderFlags(view) {
    return view[FLAGS] & 1 /* CreationMode */ ? 1 /* Create */ | 2 /* Update */ :
        2 /* Update */;
}
//////////////////////////
//// Namespace
//////////////////////////
var _currentNamespace = null;
function namespaceSVG() {
    _currentNamespace = 'http://www.w3.org/2000/svg/';
}
function namespaceMathML() {
    _currentNamespace = 'http://www.w3.org/1998/MathML/';
}
function namespaceHTML() {
    _currentNamespace = null;
}
//////////////////////////
//// Element
//////////////////////////
/**
 * Creates an empty element using {@link elementStart} and {@link elementEnd}
 *
 * @param index Index of the element in the data array
 * @param name Name of the DOM Node
 * @param attrs Statically bound set of attributes to be written into the DOM element on creation.
 * @param localRefs A set of local reference bindings on the element.
 */
function element(index, name, attrs, localRefs) {
    elementStart(index, name, attrs, localRefs);
    elementEnd();
}
/**
 * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
 * The instruction must later be followed by `elementContainerEnd()` call.
 *
 * @param index Index of the element in the LViewData 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.
 */
function elementContainerStart(index, attrs, localRefs) {
    ngDevMode && assertEqual(viewData[BINDING_INDEX], tView.bindingStartIndex, 'element containers should be created before any bindings');
    ngDevMode && ngDevMode.rendererCreateComment++;
    var native = renderer.createComment(ngDevMode ? 'ng-container' : '');
    ngDevMode && assertDataInRange(index - 1);
    var tNode = createNodeAtIndex(index, 4 /* ElementContainer */, native, null, attrs || null);
    appendChild(native, tNode, viewData);
    createDirectivesAndLocals(localRefs);
}
/** Mark the end of the <ng-container>. */
function elementContainerEnd() {
    if (isParent) {
        isParent = false;
    }
    else {
        ngDevMode && assertHasParent();
        previousOrParentTNode = previousOrParentTNode.parent;
    }
    ngDevMode && assertNodeType(previousOrParentTNode, 4 /* ElementContainer */);
    currentQueries &&
        (currentQueries = currentQueries.addNode(previousOrParentTNode));
    queueLifecycleHooks(previousOrParentTNode.flags, tView);
}
/**
 * Create DOM element. The instruction must later be followed by `elementEnd()` call.
 *
 * @param index Index of the element in the LViewData array
 * @param name Name of the DOM Node
 * @param attrs Statically bound set of attributes to be written into the DOM element on creation.
 * @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']
 */
function elementStart(index, name, attrs, localRefs) {
    ngDevMode && assertEqual(viewData[BINDING_INDEX], tView.bindingStartIndex, 'elements should be created before any bindings ');
    ngDevMode && ngDevMode.rendererCreateElement++;
    var native = elementCreate(name);
    ngDevMode && assertDataInRange(index - 1);
    var tNode = createNodeAtIndex(index, 3 /* Element */, native, name, attrs || null);
    if (attrs) {
        setUpAttributes(native, attrs);
    }
    appendChild(native, tNode, viewData);
    createDirectivesAndLocals(localRefs);
    // 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 (elementDepthCount === 0) {
        attachPatchData(native, viewData);
    }
    elementDepthCount++;
}
/**
 * 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
 * @returns the element created
 */
function elementCreate(name, overriddenRenderer) {
    var native;
    var rendererToUse = overriddenRenderer || renderer;
    if (isProceduralRenderer(rendererToUse)) {
        native = rendererToUse.createElement(name, _currentNamespace);
    }
    else {
        if (_currentNamespace === null) {
            native = rendererToUse.createElement(name);
        }
        else {
            native = rendererToUse.createElementNS(_currentNamespace, name);
        }
    }
    return native;
}
/**
 * Creates directive instances and populates local refs.
 *
 * @param localRefs Local refs of the node in question
 * @param localRefExtractor mapping function that extracts local ref value from TNode
 */
function createDirectivesAndLocals(localRefs, localRefExtractor) {
    if (localRefExtractor === void 0) { localRefExtractor = getNativeByTNode; }
    if (!bindingsEnabled)
        return;
    if (firstTemplatePass) {
        ngDevMode && ngDevMode.firstTemplatePass++;
        cacheMatchingDirectivesForNode(previousOrParentTNode, tView, localRefs || null);
    }
    else {
        instantiateDirectivesDirectly();
    }
    saveResolvedLocalsInData(localRefExtractor);
}
/**
 * On first template pass, we match each node against available directive selectors and save
 * the resulting defs in the correct instantiation order for subsequent change detection runs
 * (so dependencies are always created before the directives that inject them).
 */
function cacheMatchingDirectivesForNode(tNode, tView, localRefs) {
    // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in tsickle.
    var exportsMap = localRefs ? { '': -1 } : null;
    var matches = tView.currentMatches = findDirectiveMatches(tNode);
    generateExpandoBlock(tNode, matches);
    var totalHostVars = 0;
    if (matches) {
        for (var i = 0; i < matches.length; i += 2) {
            var def = matches[i];
            var valueIndex = i + 1;
            resolveDirective(def, valueIndex, matches);
            totalHostVars += def.hostVars;
            saveNameToExportMap(matches[valueIndex], def, exportsMap);
        }
    }
    if (exportsMap)
        cacheMatchingLocalNames(tNode, localRefs, exportsMap);
    prefillHostVars(totalHostVars);
}
/**
 * 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.
 */
function generateExpandoBlock(tNode, matches) {
    var directiveCount = matches ? matches.length / 2 : 0;
    var elementIndex = -(tNode.index - HEADER_OFFSET);
    if (directiveCount > 0) {
        (tView.expandoInstructions || (tView.expandoInstructions = [])).push(elementIndex, directiveCount);
    }
}
/**
 * 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.
 */
function prefillHostVars(totalHostVars) {
    for (var i = 0; i < totalHostVars; i++) {
        viewData.push(NO_CHANGE);
        tView.blueprint.push(NO_CHANGE);
        tView.data.push(null);
    }
}
/** Matches the current node against all available selectors. */
function findDirectiveMatches(tNode) {
    var registry = tView.directiveRegistry;
    var matches = null;
    if (registry) {
        for (var i = 0; i < registry.length; i++) {
            var def = registry[i];
            if (isNodeMatchingSelectorList(tNode, def.selectors)) {
                matches || (matches = []);
                if (def.diPublic)
                    def.diPublic(def);
                if (def.template) {
                    if (tNode.flags & 4096 /* isComponent */)
                        throwMultipleComponentError(tNode);
                    addComponentLogic(def);
                    // The component is always stored first with directives after.
                    matches.unshift(def, null);
                }
                else {
                    matches.push(def, null);
                }
            }
        }
    }
    return matches;
}
function resolveDirective(def, valueIndex, matches) {
    if (matches[valueIndex] === null) {
        matches[valueIndex] = CIRCULAR$1;
        var instance = def.factory();
        return directiveCreate(matches[valueIndex] = viewData.length, instance, def);
    }
    else if (matches[valueIndex] === CIRCULAR$1) {
        // If we revisit this directive before it's resolved, we know it's circular
        throwCyclicDependencyError(def.type);
    }
    return null;
}
/** Stores index of component's host element so it will be queued for view refresh during CD. */
function queueComponentIndexForCheck() {
    if (firstTemplatePass) {
        (tView.components || (tView.components = [])).push(previousOrParentTNode.index);
    }
}
/** Stores index of directive and host element so it will be queued for binding refresh during CD.
 */
function queueHostBindingForCheck(dirIndex, def) {
    ngDevMode &&
        assertEqual(firstTemplatePass, true, 'Should only be called in first template pass.');
    tView.expandoInstructions.push(def.hostBindings, def.hostVars);
}
/**
 * This function instantiates the given directives.
 */
function instantiateDirectivesDirectly() {
    ngDevMode && assertEqual(firstTemplatePass, false, "Directives should only be instantiated directly after first template pass");
    var count = previousOrParentTNode.flags & 4095 /* DirectiveCountMask */;
    if (isContentQueryHost(previousOrParentTNode) && currentQueries) {
        currentQueries = currentQueries.clone();
    }
    if (count > 0) {
        var start = previousOrParentTNode.flags >> 15 /* DirectiveStartingIndexShift */;
        var end = start + count;
        for (var i = start; i < end; i++) {
            var def = tView.data[i];
            // Component view must be set on node before the factory is created so
            // ChangeDetectorRefs have a way to store component view on creation.
            if (def.template) {
                addComponentLogic(def);
            }
            directiveCreate(i, def.factory(), def);
        }
    }
}
/** Caches local names and their matching directive indices for query and template lookups. */
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
    if (localRefs) {
        var localNames = tNode.localNames = [];
        // Local names must be stored in tNode in the same order that localRefs are defined
        // in the template to ensure the data is loaded in the same slots as their refs
        // in the template (for template queries).
        for (var i = 0; i < localRefs.length; i += 2) {
            var index = exportsMap[localRefs[i + 1]];
            if (index == null)
                throw new Error("Export of name '" + localRefs[i + 1] + "' not found!");
            localNames.push(localRefs[i], index);
        }
    }
}
/**
 * Builds up an export map as directives are created, so local refs can be quickly mapped
 * to their directive instances.
 */
function saveNameToExportMap(index, def, exportsMap) {
    if (exportsMap) {
        if (def.exportAs)
            exportsMap[def.exportAs] = index;
        if (def.template)
            exportsMap[''] = index;
    }
}
/**
 * Takes a list of local names and indices and pushes the resolved local variable values
 * to LViewData in the same order as they are loaded in the template with load().
 */
function saveResolvedLocalsInData(localRefExtractor) {
    var localNames = previousOrParentTNode.localNames;
    var tNode = previousOrParentTNode;
    if (localNames) {
        var localIndex = previousOrParentTNode.index + 1;
        for (var i = 0; i < localNames.length; i += 2) {
            var index = localNames[i + 1];
            var value = index === -1 ? localRefExtractor(tNode, viewData) : viewData[index];
            viewData[localIndex++] = value;
        }
    }
}
/**
 * Gets TView from a template function or creates a new TView
 * if it doesn't already exist.
 *
 * @param templateFn The template from which to get static data
 * @param consts The number of nodes, local refs, and pipes in this view
 * @param vars The number of bindings and pure function bindings in this view
 * @param directives Directive defs that should be saved on TView
 * @param pipes Pipe defs that should be saved on TView
 * @returns TView
 */
function getOrCreateTView(templateFn, consts, vars, directives, pipes, viewQuery) {
    // TODO(misko): reading `ngPrivateData` here is problematic for two reasons
    // 1. It is a megamorphic call on each invocation.
    // 2. For nested embedded views (ngFor inside ngFor) the template instance is per
    //    outer template invocation, which means that no such property will exist
    // Correct solution is to only put `ngPrivateData` on the Component template
    // and not on embedded templates.
    return templateFn.ngPrivateData ||
        (templateFn.ngPrivateData =
            createTView(-1, templateFn, consts, vars, directives, pipes, viewQuery));
}
/**
 * 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 directives Registry of directives for this view
 * @param pipes Registry of pipes for this view
 */
function createTView(viewIndex, templateFn, consts, vars, directives, pipes, viewQuery) {
    ngDevMode && ngDevMode.tView++;
    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.
    var initialViewLength = bindingStartIndex + vars;
    var blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
    return blueprint[TVIEW] = {
        id: viewIndex,
        blueprint: blueprint,
        template: templateFn,
        viewQuery: viewQuery,
        node: null,
        data: blueprint.slice(),
        childIndex: -1,
        bindingStartIndex: bindingStartIndex,
        expandoStartIndex: initialViewLength,
        expandoInstructions: null,
        firstTemplatePass: true,
        initHooks: null,
        checkHooks: null,
        contentHooks: null,
        contentCheckHooks: null,
        viewHooks: null,
        viewCheckHooks: null,
        destroyHooks: null,
        pipeDestroyHooks: null,
        cleanup: null,
        contentQueries: null,
        components: null,
        directiveRegistry: typeof directives === 'function' ? directives() : directives,
        pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
        currentMatches: null,
        firstChild: null,
    };
}
function createViewBlueprint(bindingStartIndex, initialViewLength) {
    var blueprint = new Array(initialViewLength)
        .fill(null, 0, bindingStartIndex)
        .fill(NO_CHANGE, bindingStartIndex);
    blueprint[CONTAINER_INDEX] = -1;
    blueprint[BINDING_INDEX] = bindingStartIndex;
    return blueprint;
}
function setUpAttributes(native, attrs) {
    var isProc = isProceduralRenderer(renderer);
    var i = 0;
    while (i < attrs.length) {
        var attrName = attrs[i];
        if (attrName === 1 /* SelectOnly */)
            break;
        if (attrName === NG_PROJECT_AS_ATTR_NAME) {
            i += 2;
        }
        else {
            ngDevMode && ngDevMode.rendererSetAttribute++;
            if (attrName === 0 /* NamespaceURI */) {
                // Namespaced attributes
                var namespaceURI = attrs[i + 1];
                var attrName_1 = attrs[i + 2];
                var attrVal = attrs[i + 3];
                isProc ?
                    renderer
                        .setAttribute(native, attrName_1, attrVal, namespaceURI) :
                    native.setAttributeNS(namespaceURI, attrName_1, attrVal);
                i += 4;
            }
            else {
                // Standard attributes
                var attrVal = attrs[i + 1];
                isProc ?
                    renderer
                        .setAttribute(native, attrName, attrVal) :
                    native.setAttribute(attrName, attrVal);
                i += 2;
            }
        }
    }
}
function createError(text, token) {
    return new Error("Renderer: " + text + " [" + stringify$1(token) + "]");
}
/**
 * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.
 *
 * @param elementOrSelector Render element or CSS selector to locate the element.
 */
function locateHostElement(factory, elementOrSelector) {
    ngDevMode && assertDataInRange(-1);
    rendererFactory = factory;
    var defaultRenderer = factory.createRenderer(null, null);
    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;
}
/**
 * Adds an event listener to the current node.
 *
 * If an output exists on one of the node's directives, it also subscribes to the output
 * and saves the subscription for later cleanup.
 *
 * @param eventName Name of the event
 * @param listenerFn The function to be called when event emits
 * @param useCapture Whether or not to use capture in event listener.
 */
function listener(eventName, listenerFn, useCapture) {
    if (useCapture === void 0) { useCapture = false; }
    var tNode = previousOrParentTNode;
    ngDevMode && assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */, 4 /* ElementContainer */);
    // add native event listener - applicable to elements only
    if (tNode.type === 3 /* Element */) {
        var native = getNativeByTNode(previousOrParentTNode, viewData);
        ngDevMode && ngDevMode.rendererAddEventListener++;
        // In order to match current behavior, native DOM event listeners must be added for all
        // events (including outputs).
        if (isProceduralRenderer(renderer)) {
            var cleanupFn = renderer.listen(native, eventName, listenerFn);
            storeCleanupFn(viewData, cleanupFn);
        }
        else {
            var wrappedListener = wrapListenerWithPreventDefault(listenerFn);
            native.addEventListener(eventName, wrappedListener, useCapture);
            var cleanupInstances = getCleanup(viewData);
            cleanupInstances.push(wrappedListener);
            if (firstTemplatePass) {
                getTViewCleanup(viewData).push(eventName, tNode.index, cleanupInstances.length - 1, 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.flags, 1 /* Output */);
    }
    var outputs = tNode.outputs;
    var outputData;
    if (outputs && (outputData = outputs[eventName])) {
        createOutput(outputData, listenerFn);
    }
}
/**
 * Iterates through the outputs associated with a particular event name and subscribes to
 * each output.
 */
function createOutput(outputs, listener) {
    for (var i = 0; i < outputs.length; i += 2) {
        ngDevMode && assertDataInRange(outputs[i], viewData);
        var subscription = viewData[outputs[i]][outputs[i + 1]].subscribe(listener);
        storeCleanupWithContext(viewData, subscription, subscription.unsubscribe);
    }
}
/**
 * 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
 */
function storeCleanupWithContext(view, context, cleanupFn) {
    if (!view)
        view = viewData;
    getCleanup(view).push(context);
    if (view[TVIEW].firstTemplatePass) {
        getTViewCleanup(view).push(cleanupFn, view[CLEANUP].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.
 */
function storeCleanupFn(view, cleanupFn) {
    getCleanup(view).push(cleanupFn);
    if (view[TVIEW].firstTemplatePass) {
        getTViewCleanup(view).push(view[CLEANUP].length - 1, null);
    }
}
/** Mark the end of the element. */
function elementEnd() {
    if (isParent) {
        isParent = false;
    }
    else {
        ngDevMode && assertHasParent();
        previousOrParentTNode = previousOrParentTNode.parent;
    }
    ngDevMode && assertNodeType(previousOrParentTNode, 3 /* Element */);
    currentQueries &&
        (currentQueries = currentQueries.addNode(previousOrParentTNode));
    queueLifecycleHooks(previousOrParentTNode.flags, tView);
    elementDepthCount--;
}
/**
 * Updates the value of removes an attribute on an Element.
 *
 * @param number index The index of the element in the data array
 * @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.
 */
function elementAttribute(index, name, value, sanitizer) {
    if (value !== NO_CHANGE) {
        var element_1 = getNativeByIndex(index, viewData);
        if (value == null) {
            ngDevMode && ngDevMode.rendererRemoveAttribute++;
            isProceduralRenderer(renderer) ? renderer.removeAttribute(element_1, name) :
                element_1.removeAttribute(name);
        }
        else {
            ngDevMode && ngDevMode.rendererSetAttribute++;
            var strValue = sanitizer == null ? stringify$1(value) : sanitizer(value);
            isProceduralRenderer(renderer) ? renderer.setAttribute(element_1, name, strValue) :
                element_1.setAttribute(name, strValue);
        }
    }
}
/**
 * Update a property on an Element.
 *
 * If the property name also exists as an input property on one of the element's directives,
 * the component property will be set instead of the element property. This check must
 * be conducted at runtime so child components that add new @Inputs don't have to be re-compiled.
 *
 * @param index The index of the element to update in the data array
 * @param propName Name of property. Because it is going to DOM, this is not subject to
 *        renaming as part of minification.
 * @param value New value to write.
 * @param sanitizer An optional function used to sanitize the value.
 */
function elementProperty(index, propName, value, sanitizer) {
    if (value === NO_CHANGE)
        return;
    var element = getNativeByIndex(index, viewData);
    var tNode = getTNode(index, viewData);
    // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't
    // yet been checked
    if (tNode && tNode.inputs === undefined) {
        // mark inputs as checked
        tNode.inputs = generatePropertyAliases(tNode.flags, 0 /* Input */);
    }
    var inputData = tNode && tNode.inputs;
    var dataValue;
    if (inputData && (dataValue = inputData[propName])) {
        setInputsForProperty(dataValue, value);
        if (isComponent(tNode))
            markDirtyIfOnPush(index + HEADER_OFFSET);
    }
    else if (tNode.type === 3 /* Element */) {
        // It is assumed that the sanitizer is only added when the compiler determines that the property
        // is risky, so sanitization can be done without further checks.
        value = sanitizer != null ? sanitizer(value) : value;
        ngDevMode && ngDevMode.rendererSetProperty++;
        isProceduralRenderer(renderer) ?
            renderer.setProperty(element, propName, value) :
            (element.setProperty ? element.setProperty(propName, value) :
                element[propName] = value);
    }
}
/**
 * Enables directive matching on elements.
 *
 *  * Example:
 * ```
 * <my-comp my-directive>
 *   Should match component / directive.
 * </my-comp>
 * <div ngNonBindable>
 *   <!-- disabledBindings() -->
 *   <my-comp my-directive>
 *     Should not match component / directive because we are in ngNonBindable.
 *   </my-comp>
 *   <!-- enableBindings() -->
 * </div>
 * ```
 */
function enableBindings() {
    bindingsEnabled = true;
}
/**
 * Disables directive matching on element.
 *
 *  * Example:
 * ```
 * <my-comp my-directive>
 *   Should match component / directive.
 * </my-comp>
 * <div ngNonBindable>
 *   <!-- disabledBindings() -->
 *   <my-comp my-directive>
 *     Should not match component / directive because we are in ngNonBindable.
 *   </my-comp>
 *   <!-- enableBindings() -->
 * </div>
 * ```
 */
function disableBindings() {
    bindingsEnabled = false;
}
/**
 * Constructs a TNode object from the arguments.
 *
 * @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
 * @param tViews Any TViews attached to this node
 * @returns the TNode object
 */
function createTNode(type, adjustedIndex, tagName, attrs, tViews) {
    ngDevMode && ngDevMode.tNode++;
    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.
    var parentInSameView = parent && viewData && parent !== viewData[HOST_NODE];
    var tParent = parentInSameView ? parent : null;
    return {
        type: type,
        index: adjustedIndex,
        injectorIndex: tParent ? tParent.injectorIndex : -1,
        flags: 0,
        tagName: tagName,
        attrs: attrs,
        localNames: null,
        initialInputs: undefined,
        inputs: undefined,
        outputs: undefined,
        tViews: tViews,
        next: null,
        child: null,
        parent: tParent,
        detached: null,
        stylingTemplate: null,
        projection: null
    };
}
/**
 * Given a list of directive indices and minified input names, sets the
 * input properties on the corresponding directives.
 */
function setInputsForProperty(inputs, value) {
    for (var i = 0; i < inputs.length; i += 2) {
        ngDevMode && assertDataInRange(inputs[i], viewData);
        viewData[inputs[i]][inputs[i + 1]] = value;
    }
}
/**
 * Consolidates all inputs or outputs of all directives on this logical node.
 *
 * @param number tNodeFlags node flags
 * @param Direction direction whether to consider inputs or outputs
 * @returns PropertyAliases|null aggregate of all properties if any, `null` otherwise
 */
function generatePropertyAliases(tNodeFlags, direction) {
    var count = tNodeFlags & 4095 /* DirectiveCountMask */;
    var propStore = null;
    if (count > 0) {
        var start = tNodeFlags >> 15 /* DirectiveStartingIndexShift */;
        var end = start + count;
        var isInput = direction === 0 /* Input */;
        var defs = tView.data;
        for (var i = start; i < end; i++) {
            var directiveDef = defs[i];
            var propertyAliasMap = isInput ? directiveDef.inputs : directiveDef.outputs;
            for (var publicName in propertyAliasMap) {
                if (propertyAliasMap.hasOwnProperty(publicName)) {
                    propStore = propStore || {};
                    var internalName = propertyAliasMap[publicName];
                    var hasProperty = propStore.hasOwnProperty(publicName);
                    hasProperty ? propStore[publicName].push(i, internalName) :
                        (propStore[publicName] = [i, internalName]);
                }
            }
        }
    }
    return propStore;
}
/**
 * Add or remove a class in a `classList` on a DOM element.
 *
 * This instruction is meant to handle the [class.foo]="exp" case
 *
 * @param index The index of the element to update in the data array
 * @param className Name of class to toggle. Because it is going to DOM, this is not subject to
 *        renaming as part of minification.
 * @param value A value indicating if a given class should be added or removed.
 */
function elementClassProp(index, stylingIndex, value) {
    var val = (value instanceof BoundPlayerFactory) ? value : (!!value);
    updateClassProp(getStylingContext(index, viewData), stylingIndex, val);
}
/**
 * Assign any inline style values to the element during creation mode.
 *
 * This instruction is meant to be called during creation mode to apply all styling
 * (e.g. `style="..."`) values to the element. This is also where the provided index
 * value is allocated for the styling details for its corresponding element (the element
 * index is the previous index value from this one).
 *
 * (Note this function calls `elementStylingApply` immediately when called.)
 *
 *
 * @param index Index value which will be allocated to store styling data for the element.
 *        (Note that this is not the element index, but rather an index value allocated
 *        specifically for element styling--the index must be the next index after the element
 *        index.)
 * @param classDeclarations A key/value array of CSS classes that will be registered on the element.
 *   Each individual style will be used on the element as long as it is not overridden
 *   by any classes placed on the element by multiple (`[class]`) or singular (`[class.named]`)
 *   bindings. If a class binding changes its value to a falsy value then the matching initial
 *   class value that are passed in here will be applied to the element (if matched).
 * @param styleDeclarations A key/value array of CSS styles that will be registered on the element.
 *   Each individual style will be used on the element as long as it is not overridden
 *   by any styles placed on the element by multiple (`[style]`) or singular (`[style.prop]`)
 *   bindings. If a style binding changes its value to null then the initial styling
 *   values that are passed in here will be applied to the element (if matched).
 * @param styleSanitizer An optional sanitizer function that will be used (if provided)
 *   to sanitize the any CSS property values that are applied to the element (during rendering).
 */
function elementStyling(classDeclarations, styleDeclarations, styleSanitizer) {
    var tNode = previousOrParentTNode;
    if (!tNode.stylingTemplate) {
        // initialize the styling template.
        tNode.stylingTemplate =
            createStylingContextTemplate(classDeclarations, styleDeclarations, styleSanitizer);
    }
    if (styleDeclarations && styleDeclarations.length ||
        classDeclarations && classDeclarations.length) {
        elementStylingApply(tNode.index - HEADER_OFFSET);
    }
}
/**
 * Apply all styling values to the element which have been queued by any styling instructions.
 *
 * This instruction is meant to be run once one or more `elementStyle` and/or `elementStyleProp`
 * have been issued against the element. This function will also determine if any styles have
 * changed and will then skip the operation if there is nothing new to render.
 *
 * Once called then all queued styles will be flushed.
 *
 * @param index Index of the element's styling storage that will be rendered.
 *        (Note that this is not the element index, but rather an index value allocated
 *        specifically for element styling--the index must be the next index after the element
 *        index.)
 */
function elementStylingApply(index) {
    var totalPlayersQueued = renderStyleAndClassBindings(getStylingContext(index, viewData), renderer, viewData);
    if (totalPlayersQueued > 0) {
        var rootContext = getRootContext(viewData);
        scheduleTick(rootContext, 2 /* FlushPlayers */);
    }
}
/**
 * Queue a given style to be rendered on an Element.
 *
 * If the style value is `null` then it will be removed from the element
 * (or assigned a different value depending if there are any styles placed
 * on the element with `elementStyle` or any styles that are present
 * from when the element was created (with `elementStyling`).
 *
 * (Note that the styling instruction will not be applied until `elementStylingApply` is called.)
 *
 * @param index Index of the element's styling storage to change in the data array.
 *        (Note that this is not the element index, but rather an index value allocated
 *        specifically for element styling--the index must be the next index after the element
 *        index.)
 * @param styleIndex Index of the style property on this element. (Monotonically increasing.)
 * @param value New value to write (null 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.
 */
function elementStyleProp(index, styleIndex, value, suffix) {
    var valueToAdd = null;
    if (value) {
        if (suffix) {
            // when a suffix is applied then it will bypass
            // sanitization entirely (b/c a new string is created)
            valueToAdd = stringify$1(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)
            valueToAdd = value;
        }
    }
    updateStyleProp(getStylingContext(index, viewData), styleIndex, valueToAdd);
}
/**
 * Queue a key/value map of styles to be rendered on an Element.
 *
 * This instruction is meant to handle the `[style]="exp"` usage. When styles are applied to
 * the Element they will then be placed with respect to any styles set with `elementStyleProp`.
 * If any styles are set to `null` then they will be removed from the element (unless the same
 * style properties have been assigned to the element during creation using `elementStyling`).
 *
 * (Note that the styling instruction will not be applied until `elementStylingApply` is called.)
 *
 * @param index Index of the element's styling storage to change in the data array.
 *        (Note that this is not the element index, but rather an index value allocated
 *        specifically for element styling--the index must be the next index after the element
 *        index.)
 * @param classes A key/value style map 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.
 * @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.
 */
function elementStylingMap(index, classes, styles) {
    updateStylingMap(getStylingContext(index, viewData), classes, styles);
}
//////////////////////////
//// Text
//////////////////////////
/**
 * Create static text node
 *
 * @param index Index of the node in the data array
 * @param value Value to write. This value will be stringified.
 */
function text(index, value) {
    ngDevMode && assertEqual(viewData[BINDING_INDEX], tView.bindingStartIndex, 'text nodes should be created before any bindings');
    ngDevMode && ngDevMode.rendererCreateTextNode++;
    var textNative = createTextNode(value, renderer);
    var tNode = createNodeAtIndex(index, 3 /* Element */, textNative, null, null);
    // Text nodes are self closing.
    isParent = false;
    appendChild(textNative, tNode, viewData);
}
/**
 * Create text node with binding
 * Bindings should be handled externally with the proper interpolation(1-8) method
 *
 * @param index Index of the node in the data array.
 * @param value Stringified value to write.
 */
function textBinding(index, value) {
    if (value !== NO_CHANGE) {
        ngDevMode && assertDataInRange(index + HEADER_OFFSET);
        var element_2 = getNativeByIndex(index, viewData);
        ngDevMode && assertDefined(element_2, 'native element should exist');
        ngDevMode && ngDevMode.rendererSetText++;
        isProceduralRenderer(renderer) ? renderer.setValue(element_2, stringify$1(value)) :
            element_2.textContent = stringify$1(value);
    }
}
//////////////////////////
//// Directive
//////////////////////////
/**
 * Create a directive and their associated content queries.
 *
 * NOTE: directives can be created in order other than the index order. They can also
 *       be retrieved before they are created in which case the value will be null.
 *
 * @param directive The directive instance.
 * @param directiveDef DirectiveDef object which contains information about the template.
 */
function directiveCreate(directiveDefIdx, directive, directiveDef) {
    var native = getNativeByTNode(previousOrParentTNode, viewData);
    var instance = baseDirectiveCreate(directiveDefIdx, directive, directiveDef, native);
    if (directiveDef.template) {
        var componentView = getComponentViewByIndex(previousOrParentTNode.index, viewData);
        componentView[CONTEXT] = directive;
    }
    if (firstTemplatePass) {
        // Init hooks are queued now so ngOnInit is called in host components before
        // any projected components.
        queueInitHooks(directiveDefIdx, directiveDef.onInit, directiveDef.doCheck, tView);
    }
    ngDevMode && assertDefined(previousOrParentTNode, 'previousOrParentTNode');
    if (previousOrParentTNode && previousOrParentTNode.attrs) {
        setInputsFromAttrs(directiveDefIdx, instance, directiveDef.inputs, previousOrParentTNode);
    }
    if (directiveDef.contentQueries) {
        directiveDef.contentQueries();
    }
    return instance;
}
function addComponentLogic(def) {
    var native = getNativeByTNode(previousOrParentTNode, viewData);
    var tView = getOrCreateTView(def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery);
    // Only component views should be added to the view tree directly. Embedded views are
    // accessed through their containers because they may be removed / re-added later.
    var componentView = addToViewTree(viewData, previousOrParentTNode.index, createLViewData(rendererFactory.createRenderer(native, def), tView, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */, getCurrentSanitizer()));
    componentView[HOST_NODE] = previousOrParentTNode;
    // Component view will always be created before any injected LContainers,
    // so this is a regular element, wrap it with the component view
    componentView[HOST] = viewData[previousOrParentTNode.index];
    viewData[previousOrParentTNode.index] = componentView;
    if (firstTemplatePass) {
        queueComponentIndexForCheck();
        previousOrParentTNode.flags =
            viewData.length << 15 /* DirectiveStartingIndexShift */ | 4096 /* isComponent */;
    }
}
/**
 * A lighter version of directiveCreate() that is used for the root component
 *
 * This version does not contain features that we don't already support at root in
 * current Angular. Example: local refs and inputs on root component.
 */
function baseDirectiveCreate(index, directive, directiveDef, native) {
    ngDevMode && assertEqual(viewData[BINDING_INDEX], tView.bindingStartIndex, 'directives should be created before any bindings');
    ngDevMode && assertPreviousIsParent();
    attachPatchData(directive, viewData);
    if (native) {
        attachPatchData(native, viewData);
    }
    viewData[index] = directive;
    if (firstTemplatePass) {
        var flags = previousOrParentTNode.flags;
        if (flags === 0) {
            // When the first directive is created:
            // - save the index,
            // - set the number of directives to 1
            previousOrParentTNode.flags =
                index << 15 /* DirectiveStartingIndexShift */ | flags & 4096 /* isComponent */ | 1;
        }
        else {
            // Only need to bump the size when subsequent directives are created
            ngDevMode && assertNotEqual(flags & 4095 /* DirectiveCountMask */, 4095 /* DirectiveCountMask */, 'Reached the max number of directives');
            previousOrParentTNode.flags++;
        }
        tView.data.push(directiveDef);
        tView.blueprint.push(null);
        if (directiveDef.hostBindings)
            queueHostBindingForCheck(index, directiveDef);
    }
    else {
        var diPublic = directiveDef.diPublic;
        if (diPublic)
            diPublic(directiveDef);
    }
    if (directiveDef.attributes != null && previousOrParentTNode.type == 3 /* Element */) {
        setUpAttributes(native, directiveDef.attributes);
    }
    return directive;
}
/**
 * Sets initial input properties on directive instances from attribute data
 *
 * @param directiveIndex Index of the directive in directives array
 * @param instance Instance of the directive on which to set the initial inputs
 * @param inputs The list of inputs from the directive def
 * @param tNode The static data for this node
 */
function setInputsFromAttrs(directiveIndex, instance, inputs, tNode) {
    var initialInputData = tNode.initialInputs;
    if (initialInputData === undefined || directiveIndex >= initialInputData.length) {
        initialInputData = generateInitialInputs(directiveIndex, inputs, tNode);
    }
    var initialInputs = initialInputData[directiveIndex];
    if (initialInputs) {
        for (var i = 0; i < initialInputs.length; i += 2) {
            instance[initialInputs[i]] = initialInputs[i + 1];
        }
    }
}
/**
 * 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
 */
function generateInitialInputs(directiveIndex, inputs, tNode) {
    var initialInputData = tNode.initialInputs || (tNode.initialInputs = []);
    initialInputData[directiveIndex] = null;
    var attrs = tNode.attrs;
    var i = 0;
    while (i < attrs.length) {
        var attrName = attrs[i];
        if (attrName === 1 /* SelectOnly */)
            break;
        if (attrName === 0 /* NamespaceURI */) {
            // We do not allow inputs on namespaced attributes.
            i += 4;
            continue;
        }
        var minifiedInputName = inputs[attrName];
        var attrValue = attrs[i + 1];
        if (minifiedInputName !== undefined) {
            var inputsToStore = initialInputData[directiveIndex] || (initialInputData[directiveIndex] = []);
            inputsToStore.push(minifiedInputName, attrValue);
        }
        i += 2;
    }
    return initialInputData;
}
//////////////////////////
//// ViewContainer & View
//////////////////////////
/**
 * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
 *
 * @param hostNative The host element for the LContainer
 * @param hostTNode The host TNode for the LContainer
 * @param currentView The parent view of the LContainer
 * @param native The native comment element
 * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case
 * @returns LContainer
 */
function createLContainer(hostNative, hostTNode, currentView, native, isForViewContainerRef) {
    return [
        isForViewContainerRef ? -1 : 0,
        [],
        currentView,
        null,
        null,
        hostNative,
        native,
        getRenderParent(hostTNode, currentView) // renderParent
    ];
}
/**
 * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
 *
 * <ng-template #foo>
 *    <div></div>
 * </ng-template>
 *
 * @param index The index of the container in the data array
 * @param templateFn Inline template
 * @param 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.
 */
function template(index, templateFn, consts, vars, tagName, attrs, localRefs, localRefExtractor) {
    // TODO: consider a separate node type for templates
    var tNode = containerInternal(index, tagName || null, attrs || null);
    if (firstTemplatePass) {
        tNode.tViews = createTView(-1, templateFn, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null);
    }
    createDirectivesAndLocals(localRefs, localRefExtractor);
    currentQueries &&
        (currentQueries = currentQueries.addNode(previousOrParentTNode));
    queueLifecycleHooks(tNode.flags, tView);
    isParent = false;
}
/**
 * Creates an LContainer for inline views, e.g.
 *
 * % if (showing) {
 *   <div></div>
 * % }
 *
 * @param index The index of the container in the data array
 */
function container(index) {
    var tNode = containerInternal(index, null, null);
    firstTemplatePass && (tNode.tViews = []);
    isParent = false;
}
function containerInternal(index, tagName, attrs) {
    ngDevMode && assertEqual(viewData[BINDING_INDEX], tView.bindingStartIndex, 'container nodes should be created before any bindings');
    var adjustedIndex = index + HEADER_OFFSET;
    var comment = renderer.createComment(ngDevMode ? 'container' : '');
    ngDevMode && ngDevMode.rendererCreateComment++;
    var tNode = createNodeAtIndex(index, 0 /* Container */, comment, tagName, attrs);
    var lContainer = viewData[adjustedIndex] =
        createLContainer(viewData[adjustedIndex], tNode, viewData, comment);
    appendChild(comment, tNode, viewData);
    // Containers are added to the current view tree instead of their embedded views
    // because views can be removed and re-inserted.
    addToViewTree(viewData, index + HEADER_OFFSET, lContainer);
    if (currentQueries) {
        // prepare place for matching nodes from views inserted into a given container
        lContainer[QUERIES] = currentQueries.container();
    }
    ngDevMode && assertNodeType(previousOrParentTNode, 0 /* Container */);
    return tNode;
}
/**
 * Sets a container up to receive views.
 *
 * @param index The index of the container in the data array
 */
function containerRefreshStart(index) {
    previousOrParentTNode = loadInternal(index, tView.data);
    ngDevMode && assertNodeType(previousOrParentTNode, 0 /* Container */);
    isParent = true;
    viewData[index + HEADER_OFFSET][ACTIVE_INDEX] = 0;
    if (!checkNoChangesMode) {
        // 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).
        executeInitHooks(viewData, tView, creationMode);
    }
}
/**
 * Marks the end of the LContainer.
 *
 * Marking the end of LContainer is the time when to child views get inserted or removed.
 */
function containerRefreshEnd() {
    if (isParent) {
        isParent = false;
    }
    else {
        ngDevMode && assertNodeType(previousOrParentTNode, 2 /* View */);
        ngDevMode && assertHasParent();
        previousOrParentTNode = previousOrParentTNode.parent;
    }
    ngDevMode && assertNodeType(previousOrParentTNode, 0 /* Container */);
    var lContainer = viewData[previousOrParentTNode.index];
    var nextIndex = lContainer[ACTIVE_INDEX];
    // remove extra views at the end of the container
    while (nextIndex < lContainer[VIEWS].length) {
        removeView(lContainer, previousOrParentTNode, nextIndex);
    }
}
/**
 * Goes over dynamic embedded views (ones created through ViewContainerRef APIs) and refreshes them
 * by executing an associated template function.
 */
function refreshDynamicEmbeddedViews(lViewData) {
    for (var current = getLViewChild(lViewData); current !== null; current = current[NEXT]) {
        // Note: current can be an LViewData 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 LViewData
        // header.
        if (current.length < HEADER_OFFSET && current[ACTIVE_INDEX] === -1) {
            var container_1 = current;
            for (var i = 0; i < container_1[VIEWS].length; i++) {
                var dynamicViewData = container_1[VIEWS][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], dynamicViewData[CONTEXT], 2 /* Update */);
            }
        }
    }
}
/**
 * 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 tContainerNode to search for views
 * @param startIdx starting index in the views array to search from
 * @param viewBlockId exact view block id to look for
 * @returns index of a found view or -1 if not found
 */
function scanForView(lContainer, tContainerNode, startIdx, viewBlockId) {
    var views = lContainer[VIEWS];
    for (var i = startIdx; i < views.length; i++) {
        var viewAtPositionId = views[i][TVIEW].id;
        if (viewAtPositionId === viewBlockId) {
            return views[i];
        }
        else if (viewAtPositionId < viewBlockId) {
            // found a view that should not be at this position - remove
            removeView(lContainer, tContainerNode, i);
        }
        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 search here
            break;
        }
    }
    return null;
}
/**
 * Marks the start of an embedded view.
 *
 * @param viewBlockId The ID of this view
 * @return boolean Whether or not this view is in creation mode
 */
function embeddedViewStart(viewBlockId, consts, vars) {
    // The previous node can be a view node if we are processing an inline for loop
    var containerTNode = previousOrParentTNode.type === 2 /* View */ ?
        previousOrParentTNode.parent :
        previousOrParentTNode;
    var lContainer = viewData[containerTNode.index];
    var currentView = viewData;
    ngDevMode && assertNodeType(containerTNode, 0 /* Container */);
    var viewToRender = scanForView(lContainer, containerTNode, lContainer[ACTIVE_INDEX], viewBlockId);
    if (viewToRender) {
        isParent = true;
        enterView(viewToRender, viewToRender[TVIEW].node);
    }
    else {
        // When we create a new LView, we always reset the state of the instructions.
        viewToRender = createLViewData(renderer, getOrCreateEmbeddedTView(viewBlockId, consts, vars, containerTNode), null, 2 /* CheckAlways */, getCurrentSanitizer());
        if (lContainer[QUERIES]) {
            viewToRender[QUERIES] = lContainer[QUERIES].createView();
        }
        createViewNode(viewBlockId, viewToRender);
        enterView(viewToRender, viewToRender[TVIEW].node);
    }
    if (lContainer) {
        if (creationMode) {
            // it is a new view, insert it into collection of views for a given container
            insertView(viewToRender, lContainer, currentView, lContainer[ACTIVE_INDEX], -1);
        }
        lContainer[ACTIVE_INDEX]++;
    }
    return getRenderFlags(viewToRender);
}
/**
 * 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 container The parent container in which to look for the view's static data
 * @returns TView
 */
function getOrCreateEmbeddedTView(viewIndex, consts, vars, parent) {
    ngDevMode && assertNodeType(parent, 0 /* Container */);
    var containerTViews = 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);
    }
    return containerTViews[viewIndex];
}
/** Marks the end of an embedded view. */
function embeddedViewEnd() {
    var viewHost = viewData[HOST_NODE];
    refreshDescendantViews();
    leaveView(viewData[PARENT]);
    previousOrParentTNode = viewHost;
    isParent = false;
}
/////////////
/**
 * Refreshes components by entering the component view and processing its bindings, queries, etc.
 *
 * @param adjustedElementIndex  Element index in LViewData[] (adjusted for HEADER_OFFSET)
 */
function componentRefresh(adjustedElementIndex, parentFirstTemplatePass) {
    ngDevMode && assertDataInRange(adjustedElementIndex);
    var hostView = getComponentViewByIndex(adjustedElementIndex, viewData);
    ngDevMode && assertNodeType(tView.data[adjustedElementIndex], 3 /* Element */);
    // Only attached CheckAlways components or attached, dirty OnPush components should be checked
    if (viewAttached(hostView) && hostView[FLAGS] & (2 /* CheckAlways */ | 4 /* Dirty */)) {
        parentFirstTemplatePass && syncViewWithBlueprint(hostView);
        detectChangesInternal(hostView, hostView[CONTEXT]);
    }
}
/**
 * Syncs an LViewData 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 LViewData is created.
 * 3. Second <comp> is matched as a component and its LViewData 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 LViewData 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
 */
function syncViewWithBlueprint(componentView) {
    var componentTView = componentView[TVIEW];
    for (var i = componentView.length; i < componentTView.blueprint.length; i++) {
        componentView[i] = componentTView.blueprint[i];
    }
}
/** Returns a boolean for whether the view is attached */
function viewAttached(view) {
    return (view[FLAGS] & 8 /* Attached */) === 8 /* Attached */;
}
/**
 * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
 * It takes all the selectors from the entire component's template and decides where
 * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
 * backed by a selector).
 *
 * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
 * un-parsed form.
 *
 * The parsed form is needed for efficient matching of a node against a given CSS selector.
 * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
 *
 * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
 * drawbacks:
 * - having only a textual form would require runtime parsing of CSS selectors;
 * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
 * template author).
 *
 * @param selectors A collection of parsed CSS selectors
 * @param rawSelectors A collection of CSS selectors in the raw, un-parsed form
 */
function projectionDef(selectors, textSelectors) {
    var componentNode = findComponentView(viewData)[HOST_NODE];
    if (!componentNode.projection) {
        var noOfNodeBuckets = selectors ? selectors.length + 1 : 1;
        var pData = componentNode.projection =
            new Array(noOfNodeBuckets).fill(null);
        var tails = pData.slice();
        var componentChild = componentNode.child;
        while (componentChild !== null) {
            var bucketIndex = selectors ? matchingSelectorIndex(componentChild, selectors, textSelectors) : 0;
            var nextNode = componentChild.next;
            if (tails[bucketIndex]) {
                tails[bucketIndex].next = componentChild;
            }
            else {
                pData[bucketIndex] = componentChild;
                componentChild.next = null;
            }
            tails[bucketIndex] = componentChild;
            componentChild = nextNode;
        }
    }
}
/**
 * Stack used to keep track of projection nodes in projection() instruction.
 *
 * This is deliberately created outside of projection() to avoid allocating
 * a new array each time the function is called. Instead the array will be
 * re-used by each invocation. This works because the function is not reentrant.
 */
var projectionNodeStack$1 = [];
/**
 * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
 * to the projectionDef instruction.
 *
 * @param nodeIndex
 * @param selectorIndex:
 *        - 0 when the selector is `*` (or unspecified as this is the default value),
 *        - 1 based index of the selector from the {@link projectionDef}
 */
function projection(nodeIndex, selectorIndex, attrs) {
    if (selectorIndex === void 0) { selectorIndex = 0; }
    var tProjectionNode = createNodeAtIndex(nodeIndex, 1 /* Projection */, null, 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
    isParent = false;
    // re-distribution of projectable nodes is stored on a component's view level
    var componentView = findComponentView(viewData);
    var componentNode = componentView[HOST_NODE];
    var nodeToProject = componentNode.projection[selectorIndex];
    var projectedView = componentView[PARENT];
    var projectionNodeIndex = -1;
    while (nodeToProject) {
        if (nodeToProject.type === 1 /* Projection */) {
            // This node is re-projected, so we must go up the tree to get its projected nodes.
            var currentComponentView = findComponentView(projectedView);
            var currentComponentHost = currentComponentView[HOST_NODE];
            var firstProjectedNode = currentComponentHost.projection[nodeToProject.projection];
            if (firstProjectedNode) {
                projectionNodeStack$1[++projectionNodeIndex] = nodeToProject;
                projectionNodeStack$1[++projectionNodeIndex] = projectedView;
                nodeToProject = firstProjectedNode;
                projectedView = currentComponentView[PARENT];
                continue;
            }
        }
        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 |= 8192 /* isProjected */;
            appendProjectedNode(nodeToProject, tProjectionNode, viewData, projectedView);
        }
        // If we are finished with a list of re-projected nodes, we need to get
        // back to the root projection node that was re-projected.
        if (nodeToProject.next === null && projectedView !== componentView[PARENT]) {
            projectedView = projectionNodeStack$1[projectionNodeIndex--];
            nodeToProject = projectionNodeStack$1[projectionNodeIndex--];
        }
        nodeToProject = nodeToProject.next;
    }
}
/**
 * Adds LViewData or LContainer to the end of the current view tree.
 *
 * This structure will be used to traverse through nested views to remove listeners
 * and call onDestroy callbacks.
 *
 * @param currentView The view where LViewData or LContainer should be added
 * @param adjustedHostIndex Index of the view's host node in LViewData[], adjusted for header
 * @param state The LViewData or LContainer to add to the view tree
 * @returns The state passed in
 */
function addToViewTree(currentView, adjustedHostIndex, state) {
    if (currentView[TAIL]) {
        currentView[TAIL][NEXT] = state;
    }
    else if (firstTemplatePass) {
        tView.childIndex = adjustedHostIndex;
    }
    currentView[TAIL] = state;
    return state;
}
///////////////////////////////
//// Change detection
///////////////////////////////
/** If node is an OnPush component, marks its LViewData dirty. */
function markDirtyIfOnPush(viewIndex) {
    var view = getComponentViewByIndex(viewIndex, viewData);
    if (!(view[FLAGS] & 2 /* CheckAlways */)) {
        view[FLAGS] |= 4 /* Dirty */;
    }
}
/** Wraps an event listener with preventDefault behavior. */
function wrapListenerWithPreventDefault(listenerFn) {
    return function wrapListenerIn_preventDefault(e) {
        if (listenerFn(e) === false) {
            e.preventDefault();
            // Necessary for legacy browsers that don't support preventDefault (e.g. IE)
            e.returnValue = false;
        }
    };
}
/** Marks current view and all ancestors dirty */
function markViewDirty(view) {
    var currentView = view;
    while (currentView && !(currentView[FLAGS] & 64 /* IsRoot */)) {
        currentView[FLAGS] |= 4 /* Dirty */;
        currentView = currentView[PARENT];
    }
    currentView[FLAGS] |= 4 /* Dirty */;
    ngDevMode && assertDefined(currentView[CONTEXT], 'rootContext should be defined');
    var rootContext = currentView[CONTEXT];
    scheduleTick(rootContext, 1 /* DetectChanges */);
}
/**
 * Used to schedule change detection on the whole application.
 *
 * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.
 * It is usually called indirectly by calling `markDirty` when the view needs to be
 * re-rendered.
 *
 * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple
 * `scheduleTick` requests. The scheduling function can be overridden in
 * `renderComponent`'s `scheduler` option.
 */
function scheduleTick(rootContext, flags) {
    var nothingScheduled = rootContext.flags === 0 /* Empty */;
    rootContext.flags |= flags;
    if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {
        var res_1;
        rootContext.clean = new Promise(function (r) { return res_1 = r; });
        rootContext.scheduler(function () {
            if (rootContext.flags & 1 /* DetectChanges */) {
                rootContext.flags &= ~1 /* DetectChanges */;
                tickRootContext(rootContext);
            }
            if (rootContext.flags & 2 /* FlushPlayers */) {
                rootContext.flags &= ~2 /* FlushPlayers */;
                var playerHandler = rootContext.playerHandler;
                if (playerHandler) {
                    playerHandler.flushPlayers();
                }
            }
            rootContext.clean = _CLEAN_PROMISE;
            res_1(null);
        });
    }
}
function tickRootContext(rootContext) {
    for (var i = 0; i < rootContext.components.length; i++) {
        var rootComponent = rootContext.components[i];
        renderComponentOrTemplate(readPatchedLViewData(rootComponent), rootComponent);
    }
}
/**
 * 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
 *
 * @param component The component which the change detection should be performed on.
 */
function detectChanges(component) {
    detectChangesInternal(getComponentViewByInstance(component), component);
}
/**
 * Synchronously perform change detection on a root view and its components.
 *
 * @param lViewData The view which the change detection should be performed on.
 */
function detectChangesInRootView(lViewData) {
    tickRootContext(lViewData[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.
 */
function checkNoChanges(component) {
    checkNoChangesMode = true;
    try {
        detectChanges(component);
    }
    finally {
        checkNoChangesMode = 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 lViewData The view which the change detection should be checked on.
 */
function checkNoChangesInRootView(lViewData) {
    checkNoChangesMode = true;
    try {
        detectChangesInRootView(lViewData);
    }
    finally {
        checkNoChangesMode = false;
    }
}
/** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck. */
function detectChangesInternal(hostView, component) {
    var hostTView = hostView[TVIEW];
    var oldView = enterView(hostView, hostView[HOST_NODE]);
    var templateFn = hostTView.template;
    var viewQuery = hostTView.viewQuery;
    try {
        namespaceHTML();
        createViewQuery(viewQuery, hostView[FLAGS], component);
        templateFn(getRenderFlags(hostView), component);
        refreshDescendantViews();
        updateViewQuery(viewQuery, component);
    }
    finally {
        leaveView(oldView);
    }
}
function createViewQuery(viewQuery, flags, component) {
    if (viewQuery && (flags & 1 /* CreationMode */)) {
        viewQuery(1 /* Create */, component);
    }
}
function updateViewQuery(viewQuery, component) {
    if (viewQuery) {
        viewQuery(2 /* Update */, 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.
 *
 * @param component Component to mark as dirty.
 */
function markDirty(component) {
    ngDevMode && assertDefined(component, 'component');
    markViewDirty(getComponentViewByInstance(component));
}
/** A special value which designates that a value has not changed. */
var NO_CHANGE = {};
/**
 * Creates a single value binding.
 *
 * @param value Value to diff
 */
function bind(value) {
    return bindingUpdated(viewData[BINDING_INDEX]++, value) ? value : NO_CHANGE;
}
/**
 * Create interpolation bindings with a variable number of expressions.
 *
 * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.
 * Those are faster because there is no need to create an array of expressions and iterate over it.
 *
 * `values`:
 * - has static text at even indexes,
 * - has evaluated expressions at odd indexes.
 *
 * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */
function interpolationV(values) {
    ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');
    ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');
    var different = false;
    for (var i = 1; i < values.length; i += 2) {
        // Check if bindings (odd indexes) have changed
        bindingUpdated(viewData[BINDING_INDEX]++, values[i]) && (different = true);
    }
    if (!different) {
        return NO_CHANGE;
    }
    // Build the updated content
    var content = values[0];
    for (var i = 1; i < values.length; i += 2) {
        content += stringify$1(values[i]) + values[i + 1];
    }
    return content;
}
/**
 * Creates an interpolation binding with 1 expression.
 *
 * @param prefix static value used for concatenation only.
 * @param v0 value checked for change.
 * @param suffix static value used for concatenation only.
 */
function interpolation1(prefix, v0, suffix) {
    var different = bindingUpdated(viewData[BINDING_INDEX]++, v0);
    return different ? prefix + stringify$1(v0) + suffix : NO_CHANGE;
}
/** Creates an interpolation binding with 2 expressions. */
function interpolation2(prefix, v0, i0, v1, suffix) {
    var different = bindingUpdated2(viewData[BINDING_INDEX], v0, v1);
    viewData[BINDING_INDEX] += 2;
    return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + suffix : NO_CHANGE;
}
/** Creates an interpolation binding with 3 expressions. */
function interpolation3(prefix, v0, i0, v1, i1, v2, suffix) {
    var different = bindingUpdated3(viewData[BINDING_INDEX], v0, v1, v2);
    viewData[BINDING_INDEX] += 3;
    return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + suffix :
        NO_CHANGE;
}
/** Create an interpolation binding with 4 expressions. */
function interpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    viewData[BINDING_INDEX] += 4;
    return different ?
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) +
            suffix :
        NO_CHANGE;
}
/** Creates an interpolation binding with 5 expressions. */
function interpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    different = bindingUpdated(viewData[BINDING_INDEX] + 4, v4) || different;
    viewData[BINDING_INDEX] += 5;
    return different ?
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
            stringify$1(v4) + suffix :
        NO_CHANGE;
}
/** Creates an interpolation binding with 6 expressions. */
function interpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    different = bindingUpdated2(viewData[BINDING_INDEX] + 4, v4, v5) || different;
    viewData[BINDING_INDEX] += 6;
    return different ?
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
            stringify$1(v4) + i4 + stringify$1(v5) + suffix :
        NO_CHANGE;
}
/** Creates an interpolation binding with 7 expressions. */
function interpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    different = bindingUpdated3(viewData[BINDING_INDEX] + 4, v4, v5, v6) || different;
    viewData[BINDING_INDEX] += 7;
    return different ?
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
            stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + suffix :
        NO_CHANGE;
}
/** Creates an interpolation binding with 8 expressions. */
function interpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    different = bindingUpdated4(viewData[BINDING_INDEX] + 4, v4, v5, v6, v7) || different;
    viewData[BINDING_INDEX] += 8;
    return different ?
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
            stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + i6 + stringify$1(v7) + suffix :
        NO_CHANGE;
}
/** Store a value in the `data` at a given `index`. */
function store(index, value) {
    // We don't store any static data for local variables, so the first time
    // we see the template, we should store as null to avoid a sparse array
    var adjustedIndex = index + HEADER_OFFSET;
    if (adjustedIndex >= tView.data.length) {
        tView.data[adjustedIndex] = null;
    }
    viewData[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.
 *
 * @param index The index of the local ref in contextViewData.
 */
function reference(index) {
    return loadInternal(index, contextViewData);
}
function walkUpViews(nestingLevel, currentView) {
    while (nestingLevel > 0) {
        ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');
        currentView = currentView[DECLARATION_VIEW];
        nestingLevel--;
    }
    return currentView;
}
function loadQueryList(queryListIdx) {
    ngDevMode && assertDefined(viewData[CONTENT_QUERIES], 'Content QueryList array should be defined if reading a query.');
    ngDevMode && assertDataInRange(queryListIdx, viewData[CONTENT_QUERIES]);
    return viewData[CONTENT_QUERIES][queryListIdx];
}
/** Retrieves a value from current `viewData`. */
function load(index) {
    return loadInternal(index, viewData);
}
/** Gets the current binding value. */
function getBinding(bindingIndex) {
    ngDevMode && assertDataInRange(viewData[bindingIndex]);
    ngDevMode &&
        assertNotEqual(viewData[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');
    return viewData[bindingIndex];
}
/** Updates binding if changed, then returns whether it was updated. */
function bindingUpdated(bindingIndex, value) {
    ngDevMode && assertNotEqual(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');
    ngDevMode && assertLessThan(bindingIndex, viewData.length, "Slot should have been initialized to NO_CHANGE");
    if (viewData[bindingIndex] === NO_CHANGE) {
        viewData[bindingIndex] = value;
    }
    else if (isDifferent(viewData[bindingIndex], value, checkNoChangesMode)) {
        throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, viewData[bindingIndex], value);
        viewData[bindingIndex] = value;
    }
    else {
        return false;
    }
    return true;
}
/** Updates binding and returns the value. */
function updateBinding(bindingIndex, value) {
    return viewData[bindingIndex] = value;
}
/** Updates 2 bindings if changed, then returns whether either was updated. */
function bindingUpdated2(bindingIndex, exp1, exp2) {
    var different = bindingUpdated(bindingIndex, exp1);
    return bindingUpdated(bindingIndex + 1, exp2) || different;
}
/** Updates 3 bindings if changed, then returns whether any was updated. */
function bindingUpdated3(bindingIndex, exp1, exp2, exp3) {
    var different = bindingUpdated2(bindingIndex, exp1, exp2);
    return bindingUpdated(bindingIndex + 2, exp3) || different;
}
/** Updates 4 bindings if changed, then returns whether any was updated. */
function bindingUpdated4(bindingIndex, exp1, exp2, exp3, exp4) {
    var different = bindingUpdated2(bindingIndex, exp1, exp2);
    return bindingUpdated2(bindingIndex + 2, exp3, exp4) || different;
}
function getTView() {
    return tView;
}
/**
 * Registers a QueryList, associated with a content query, for later refresh (part of a view
 * refresh).
 */
function registerContentQuery(queryList) {
    var savedContentQueriesLength = (viewData[CONTENT_QUERIES] || (viewData[CONTENT_QUERIES] = [])).push(queryList);
    if (firstTemplatePass) {
        var currentDirectiveIndex = viewData.length - 1;
        var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);
        var lastSavedDirectiveIndex = tView.contentQueries.length ? tView.contentQueries[tView.contentQueries.length - 2] : -1;
        if (currentDirectiveIndex !== lastSavedDirectiveIndex) {
            tViewContentQueries.push(currentDirectiveIndex, savedContentQueriesLength - 1);
        }
    }
}
function assertPreviousIsParent() {
    assertEqual(isParent, true, 'previousOrParentTNode should be a parent');
}
function assertHasParent() {
    assertDefined(previousOrParentTNode.parent, 'previousOrParentTNode should have a parent');
}
function assertDataInRange(index, arr) {
    if (arr == null)
        arr = viewData;
    assertDataInRangeInternal(index, arr || viewData);
}
var CLEAN_PROMISE = _CLEAN_PROMISE;

/**
 * @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
 */
// Root component will always have an element index of 0 and an injector size of 1
var ROOT_EXPANDO_INSTRUCTIONS = [0, 1];
/**
 * Bootstraps a Component into an existing host element and returns an instance
 * of the component.
 *
 * Use this function to bootstrap a component into the DOM tree. Each invocation
 * of this function will create a separate tree of components, injectors and
 * change detection cycles and lifetimes. To dynamically insert a new component
 * into an existing tree such that it shares the same injection, change detection
 * and object lifetime, use {@link ViewContainer#createComponent}.
 *
 * @param componentType Component to bootstrap
 * @param options Optional parameters which control bootstrapping
 */
function renderComponent(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts) {
    if (opts === void 0) { opts = {}; }
    ngDevMode && assertComponentType(componentType);
    var rendererFactory = opts.rendererFactory || domRendererFactory3;
    var sanitizer = opts.sanitizer || null;
    var componentDef = getComponentDef(componentType);
    if (componentDef.type != componentType)
        componentDef.type = componentType;
    // The first index of the first selector is the tag name.
    var componentTag = componentDef.selectors[0][0];
    var hostRNode = locateHostElement(rendererFactory, opts.host || componentTag);
    var rootFlags = componentDef.onPush ? 4 /* Dirty */ | 64 /* IsRoot */ :
        2 /* CheckAlways */ | 64 /* IsRoot */;
    var rootContext = createRootContext(opts.scheduler || requestAnimationFrame.bind(window), opts.playerHandler || null);
    var renderer = rendererFactory.createRenderer(hostRNode, componentDef);
    var rootView = createLViewData(renderer, createTView(-1, null, 1, 0, null, null, null), rootContext, rootFlags);
    rootView[INJECTOR$1] = opts.injector || null;
    var oldView = enterView(rootView, null);
    var component;
    try {
        if (rendererFactory.begin)
            rendererFactory.begin();
        var componentView = createRootComponentView(hostRNode, componentDef, rootView, renderer, sanitizer);
        component = createRootComponent(hostRNode, componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);
        executeInitAndContentHooks();
        detectChangesInternal(componentView, component);
    }
    finally {
        leaveView(oldView);
        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 renderer The current renderer
 * @param sanitizer The sanitizer, if provided
 *
 * @returns Component view created
 */
function createRootComponentView(rNode, def, rootView, renderer, sanitizer) {
    resetComponentState();
    var tView = rootView[TVIEW];
    var componentView = createLViewData(renderer, getOrCreateTView(def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery), null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */, sanitizer);
    var tNode = createNodeAtIndex(0, 3 /* Element */, rNode, null, null);
    if (tView.firstTemplatePass) {
        tView.expandoInstructions = ROOT_EXPANDO_INSTRUCTIONS.slice();
        if (def.diPublic)
            def.diPublic(def);
        tNode.flags =
            rootView.length << 15 /* DirectiveStartingIndexShift */ | 4096 /* isComponent */;
    }
    // Store component view at node index, with node as the HOST
    componentView[HOST] = rootView[HEADER_OFFSET];
    componentView[HOST_NODE] = tNode;
    return rootView[HEADER_OFFSET] = componentView;
}
/**
 * Creates a root component and sets it up with features and host bindings. Shared by
 * renderComponent() and ViewContainerRef.createComponent().
 */
function createRootComponent(hostRNode, componentView, componentDef, rootView, rootContext, hostFeatures) {
    // Create directive instance with factory() and store at next index in viewData
    var component = baseDirectiveCreate(rootView.length, componentDef.factory(), componentDef, hostRNode);
    rootContext.components.push(component);
    componentView[CONTEXT] = component;
    hostFeatures && hostFeatures.forEach(function (feature) { return feature(component, componentDef); });
    if (rootView[TVIEW].firstTemplatePass)
        prefillHostVars(componentDef.hostVars);
    setHostBindings();
    return component;
}
function createRootContext(scheduler, playerHandler) {
    return {
        components: [],
        scheduler: scheduler,
        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]});
 * ```
 */
function LifecycleHooksFeature(component, def) {
    var rootTView = readPatchedLViewData(component)[TVIEW];
    var dirIndex = rootTView.data.length - 1;
    queueInitHooks(dirIndex, def.onInit, def.doCheck, rootTView);
    queueLifecycleHooks(dirIndex << 15 /* DirectiveStartingIndexShift */ | 1, rootTView);
}
/**
 * Retrieve the root context for any component by walking the parent `LView` until
 * reaching the root `LView`.
 *
 * @param component any component
 */
function getRootContext$1(component) {
    var rootContext = getRootView(component)[CONTEXT];
    ngDevMode && assertDefined(rootContext, 'rootContext');
    return rootContext;
}
/**
 * Wait on component until it is rendered.
 *
 * This function returns a `Promise` which is resolved when the component's
 * change detection is executed. This is determined by finding the scheduler
 * associated with the `component`'s render tree and waiting until the scheduler
 * flushes. If nothing is scheduled, the function returns a resolved promise.
 *
 * Example:
 * ```
 * await whenRendered(myComponent);
 * ```
 *
 * @param component Component to wait upon
 * @returns Promise which resolves when the component is rendered.
 */
function whenRendered(component) {
    return getRootContext$1(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
 */
/**
 * Determines if a definition is a {@link ComponentDef} or a {@link DirectiveDef}
 * @param definition The definition to examine
 */
function isComponentDef(definition) {
    var def = definition;
    return typeof def.template === 'function';
}
function getSuperType(type) {
    return Object.getPrototypeOf(type.prototype).constructor;
}
/**
 * Merges the definition from a super class to a sub class.
 * @param definition The definition that is a SubClass of another directive of component
 */
function InheritDefinitionFeature(definition) {
    var superType = getSuperType(definition.type);
    var _loop_1 = function () {
        var e_1, _a;
        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;
        }
        var baseDef = 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) {
            var writeableDef = definition;
            writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);
            writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);
            writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);
        }
        if (baseDef) {
            // Merge inputs and outputs
            fillProperties(definition.inputs, baseDef.inputs);
            fillProperties(definition.declaredInputs, baseDef.declaredInputs);
            fillProperties(definition.outputs, baseDef.outputs);
        }
        if (superDef) {
            // Merge hostBindings
            var prevHostBindings_1 = definition.hostBindings;
            var superHostBindings_1 = superDef.hostBindings;
            if (superHostBindings_1) {
                if (prevHostBindings_1) {
                    definition.hostBindings = function (directiveIndex, elementIndex) {
                        superHostBindings_1(directiveIndex, elementIndex);
                        prevHostBindings_1(directiveIndex, elementIndex);
                    };
                }
                else {
                    definition.hostBindings = superHostBindings_1;
                }
            }
            // Merge View Queries
            if (isComponentDef(definition) && isComponentDef(superDef)) {
                var prevViewQuery_1 = definition.viewQuery;
                var superViewQuery_1 = superDef.viewQuery;
                if (superViewQuery_1) {
                    if (prevViewQuery_1) {
                        definition.viewQuery = function (rf, ctx) {
                            superViewQuery_1(rf, ctx);
                            prevViewQuery_1(rf, ctx);
                        };
                    }
                    else {
                        definition.viewQuery = superViewQuery_1;
                    }
                }
            }
            // Merge Content Queries
            var prevContentQueries_1 = definition.contentQueries;
            var superContentQueries_1 = superDef.contentQueries;
            if (superContentQueries_1) {
                if (prevContentQueries_1) {
                    definition.contentQueries = function () {
                        superContentQueries_1();
                        prevContentQueries_1();
                    };
                }
                else {
                    definition.contentQueries = superContentQueries_1;
                }
            }
            // Merge Content Queries Refresh
            var prevContentQueriesRefresh_1 = definition.contentQueriesRefresh;
            var superContentQueriesRefresh_1 = superDef.contentQueriesRefresh;
            if (superContentQueriesRefresh_1) {
                if (prevContentQueriesRefresh_1) {
                    definition.contentQueriesRefresh = function (directiveIndex, queryIndex) {
                        superContentQueriesRefresh_1(directiveIndex, queryIndex);
                        prevContentQueriesRefresh_1(directiveIndex, queryIndex);
                    };
                }
                else {
                    definition.contentQueriesRefresh = superContentQueriesRefresh_1;
                }
            }
            // 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
            var features = superDef.features;
            if (features) {
                try {
                    for (var features_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(features), features_1_1 = features_1.next(); !features_1_1.done; features_1_1 = features_1.next()) {
                        var feature = features_1_1.value;
                        if (feature && feature !== InheritDefinitionFeature) {
                            feature(definition);
                        }
                    }
                }
                catch (e_1_1) { e_1 = { error: e_1_1 }; }
                finally {
                    try {
                        if (features_1_1 && !features_1_1.done && (_a = features_1.return)) _a.call(features_1);
                    }
                    finally { if (e_1) throw e_1.error; }
                }
            }
            return "break";
        }
        else {
            // Even if we don't have a definition, check the type for the hooks and use those if need be
            var superPrototype = superType.prototype;
            if (superPrototype) {
                definition.afterContentChecked =
                    definition.afterContentChecked || superPrototype.afterContentChecked;
                definition.afterContentInit =
                    definition.afterContentInit || superPrototype.afterContentInit;
                definition.afterViewChecked =
                    definition.afterViewChecked || superPrototype.afterViewChecked;
                definition.afterViewInit = definition.afterViewInit || superPrototype.afterViewInit;
                definition.doCheck = definition.doCheck || superPrototype.doCheck;
                definition.onDestroy = definition.onDestroy || superPrototype.onDestroy;
                definition.onInit = definition.onInit || superPrototype.onInit;
            }
        }
        superType = Object.getPrototypeOf(superType);
    };
    while (superType) {
        var state_1 = _loop_1();
        if (state_1 === "break")
            break;
    }
}
function maybeUnwrapEmpty(value) {
    if (value === EMPTY$1) {
        return {};
    }
    else if (value === EMPTY_ARRAY) {
        return [];
    }
    else {
        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 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]
 * });
 * ```
 */
function NgOnChangesFeature(definition) {
    var declaredToMinifiedInputs = definition.declaredInputs;
    var proto = definition.type.prototype;
    var _loop_1 = function (declaredName) {
        if (declaredToMinifiedInputs.hasOwnProperty(declaredName)) {
            var minifiedKey = declaredToMinifiedInputs[declaredName];
            var privateMinKey_1 = PRIVATE_PREFIX + minifiedKey;
            // Walk the prototype chain to see if we find a property descriptor
            // That way we can honor setters and getters that were inherited.
            var originalProperty = undefined;
            var checkProto = proto;
            while (!originalProperty && checkProto &&
                Object.getPrototypeOf(checkProto) !== Object.getPrototypeOf(Object.prototype)) {
                originalProperty = Object.getOwnPropertyDescriptor(checkProto, minifiedKey);
                checkProto = Object.getPrototypeOf(checkProto);
            }
            var getter = originalProperty && originalProperty.get;
            var setter_1 = originalProperty && originalProperty.set;
            // create a getter and setter for property
            Object.defineProperty(proto, minifiedKey, {
                get: getter ||
                    (setter_1 ? undefined : function () { return this[privateMinKey_1]; }),
                set: function (value) {
                    var simpleChanges = this[PRIVATE_PREFIX];
                    if (!simpleChanges) {
                        simpleChanges = {};
                        // Place where we will store SimpleChanges if there is a change
                        Object.defineProperty(this, PRIVATE_PREFIX, { value: simpleChanges, writable: true });
                    }
                    var isFirstChange = !this.hasOwnProperty(privateMinKey_1);
                    var currentChange = simpleChanges[declaredName];
                    if (currentChange) {
                        currentChange.currentValue = value;
                    }
                    else {
                        simpleChanges[declaredName] =
                            new SimpleChange(this[privateMinKey_1], value, isFirstChange);
                    }
                    if (isFirstChange) {
                        // Create a place where the actual value will be stored and make it non-enumerable
                        Object.defineProperty(this, privateMinKey_1, { value: value, writable: true });
                    }
                    else {
                        this[privateMinKey_1] = value;
                    }
                    if (setter_1)
                        setter_1.call(this, value);
                },
                // Make the property configurable in dev mode to allow overriding in tests
                configurable: !!ngDevMode
            });
        }
    };
    for (var declaredName in declaredToMinifiedInputs) {
        _loop_1(declaredName);
    }
    // If an onInit hook is defined, it will need to wrap the ngOnChanges call
    // so the call order is changes-init-check in creation mode. In subsequent
    // change detection runs, only the check wrapper will be called.
    if (definition.onInit != null) {
        definition.onInit = onChangesWrapper(definition.onInit);
    }
    definition.doCheck = onChangesWrapper(definition.doCheck);
}
function onChangesWrapper(delegateHook) {
    return function () {
        var simpleChanges = this[PRIVATE_PREFIX];
        if (simpleChanges != null) {
            this.ngOnChanges(simpleChanges);
            this[PRIVATE_PREFIX] = null;
        }
        if (delegateHook)
            delegateHook.apply(this);
    };
}

/**
 * @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 number of slots in each bloom filter (used by DI). The larger this number, the fewer
 * directives that will share slots, and thus, the fewer false positives when checking for
 * the existence of a directive.
 */
var BLOOM_SIZE = 256;
var BLOOM_MASK = BLOOM_SIZE - 1;
/** Counter used to generate unique IDs for directives. */
var nextNgElementId = 0;
/**
 * Registers this directive as present in its node's injector by flipping the directive's
 * corresponding bit in the injector's bloom filter.
 *
 * @param injectorIndex The index of the node injector where this token should be registered
 * @param tView The TView for the injector's bloom filters
 * @param type The directive token to register
 */
function bloomAdd(injectorIndex, tView, type) {
    if (tView.firstTemplatePass) {
        var id = type[NG_ELEMENT_ID];
        // Set a unique ID on the directive type, so if something tries to inject the directive,
        // we can easily retrieve the ID and hash it into the bloom bit that should be checked.
        if (id == null) {
            id = type[NG_ELEMENT_ID] = nextNgElementId++;
        }
        // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),
        // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.
        var bloomBit = id & BLOOM_MASK;
        // Create a mask that targets the specific bit associated with the directive.
        // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding
        // to bit positions 0 - 31 in a 32 bit integer.
        var mask = 1 << bloomBit;
        // Use the raw bloomBit number to determine which bloom filter bucket we should check
        // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc
        var b7 = bloomBit & 0x80;
        var b6 = bloomBit & 0x40;
        var b5 = bloomBit & 0x20;
        var tData = tView.data;
        if (b7) {
            b6 ? (b5 ? (tData[injectorIndex + 7] |= mask) : (tData[injectorIndex + 6] |= mask)) :
                (b5 ? (tData[injectorIndex + 5] |= mask) : (tData[injectorIndex + 4] |= mask));
        }
        else {
            b6 ? (b5 ? (tData[injectorIndex + 3] |= mask) : (tData[injectorIndex + 2] |= mask)) :
                (b5 ? (tData[injectorIndex + 1] |= mask) : (tData[injectorIndex] |= mask));
        }
    }
}
function getOrCreateNodeInjector() {
    return getOrCreateNodeInjectorForNode(getPreviousOrParentTNode(), _getViewData());
}
/**
 * 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
 * @returns Node injector
 */
function getOrCreateNodeInjectorForNode(tNode, hostView) {
    var existingInjectorIndex = getInjectorIndex(tNode, hostView);
    if (existingInjectorIndex !== -1) {
        return existingInjectorIndex;
    }
    var tView = hostView[TVIEW];
    if (tView.firstTemplatePass) {
        tNode.injectorIndex = hostView.length;
        setUpBloom(tView.data, tNode); // foundation for node bloom
        setUpBloom(hostView, null); // foundation for cumulative bloom
        setUpBloom(tView.blueprint, null);
    }
    var parentLoc = getParentInjectorLocation(tNode, hostView);
    var parentIndex = parentLoc & 32767 /* InjectorIndexMask */;
    var parentView = getParentInjectorView(parentLoc, hostView);
    var parentData = parentView[TVIEW].data;
    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 (parentLoc !== -1) {
        for (var i = 0; i < PARENT_INJECTOR; i++) {
            var bloomIndex = parentIndex + i;
            // Creates a cumulative bloom filter that merges the parent's bloom filter
            // and its own cumulative bloom (which contains tokens for all ancestors)
            hostView[injectorIndex + i] = parentView[bloomIndex] | parentData[bloomIndex];
        }
    }
    hostView[injectorIndex + PARENT_INJECTOR] = parentLoc;
    return injectorIndex;
}
function setUpBloom(arr, footer) {
    arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);
}
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.
 */
function getParentInjectorLocation(tNode, view) {
    if (tNode.parent && tNode.parent.injectorIndex !== -1) {
        return tNode.parent.injectorIndex; // view offset 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.
    var hostTNode = view[HOST_NODE];
    var viewOffset = 1;
    while (hostTNode && hostTNode.injectorIndex === -1) {
        view = view[DECLARATION_VIEW];
        hostTNode = view[HOST_NODE];
        viewOffset++;
    }
    return hostTNode ?
        hostTNode.injectorIndex | (viewOffset << 15 /* ViewOffsetShift */) :
        -1;
}
/**
 * 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 LViewData instance from which to start walking up the view tree
 * @returns The LViewData instance that contains the parent injector
 */
function getParentInjectorView(location, startView) {
    var viewOffset = location >> 15 /* ViewOffsetShift */;
    var parentView = startView;
    // For most cases, the parent injector can be found on the host node (e.g. for component
    // or container), but we must keep the loop here to support the rarer case of deeply nested
    // <ng-template> tags or inline views, where the parent injector might live many views
    // above the child injector.
    while (viewOffset > 0) {
        parentView = parentView[DECLARATION_VIEW];
        viewOffset--;
    }
    return parentView;
}
/**
 * Makes a directive public to the DI system by adding it to an injector's bloom filter.
 *
 * @param di The node injector in which a directive will be added
 * @param def The definition of the directive to be made public
 */
function diPublicInInjector(injectorIndex, view, def) {
    bloomAdd(injectorIndex, view[TVIEW], def.type);
}
/**
 * Makes a directive public to the DI system by adding it to an injector's bloom filter.
 *
 * @param def The definition of the directive to be made public
 */
function diPublic(def) {
    diPublicInInjector(getOrCreateNodeInjector(), _getViewData(), def);
}
function directiveInject(token, flags) {
    if (flags === void 0) { flags = 0 /* Default */; }
    var hostTNode = getPreviousOrParentTNode();
    return getOrCreateInjectable(hostTNode, _getViewData(), token, flags);
}
/**
 * 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
 */
function injectAttribute(attrNameToInject) {
    var tNode = getPreviousOrParentTNode();
    ngDevMode && assertNodeOfPossibleTypes(tNode, 0 /* Container */, 3 /* Element */, 4 /* ElementContainer */);
    ngDevMode && assertDefined(tNode, 'expecting tNode');
    var attrs = tNode.attrs;
    if (attrs) {
        for (var i = 0; i < attrs.length; i = i + 2) {
            var attrName = attrs[i];
            if (attrName === 1 /* SelectOnly */)
                break;
            if (attrName == attrNameToInject) {
                return attrs[i + 1];
            }
        }
    }
    return undefined;
}
/**
 * Returns the value associated to the given token from the injectors.
 *
 * Look for the injector providing the token by walking up the node injector tree and then
 * the module injector tree.
 *
 * @param nodeInjector Node injector where the search should start
 * @param token The token to look for
 * @param flags Injection flags
 * @returns the value from the injector or `null` when not found
 */
function getOrCreateInjectable(hostTNode, hostView, token, flags) {
    if (flags === void 0) { flags = 0 /* Default */; }
    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')
        return bloomHash();
    // If the token has a bloom hash, then it is a directive that is public to the injection system
    // (diPublic) otherwise fall back to the module injector.
    if (bloomHash != null) {
        var startInjectorIndex = getInjectorIndex(hostTNode, hostView);
        var injectorIndex = startInjectorIndex;
        var injectorView = hostView;
        var parentLocation = -1;
        // If we should skip this injector or if an injector doesn't exist on this node (e.g. all
        // directives on this node are private), start by searching the parent injector.
        if (flags & 4 /* SkipSelf */ || injectorIndex === -1) {
            parentLocation = injectorIndex === -1 ? getParentInjectorLocation(hostTNode, hostView) :
                injectorView[injectorIndex + PARENT_INJECTOR];
            if (shouldNotSearchParent(flags, parentLocation)) {
                injectorIndex = -1;
            }
            else {
                injectorIndex = parentLocation & 32767 /* InjectorIndexMask */;
                injectorView = getParentInjectorView(parentLocation, injectorView);
            }
        }
        while (injectorIndex !== -1) {
            // Traverse up the injector tree until we find a potential match or until we know there
            // *isn't* a match. Outer loop is necessary in case we get a false positive injector.
            while (injectorIndex !== -1) {
                // Check the current injector. If it matches, stop searching for an injector.
                if (injectorHasToken(bloomHash, injectorIndex, injectorView[TVIEW].data)) {
                    break;
                }
                parentLocation = injectorView[injectorIndex + PARENT_INJECTOR];
                if (shouldNotSearchParent(flags, parentLocation)) {
                    injectorIndex = -1;
                    break;
                }
                // If the ancestor bloom filter value has the bit corresponding to the directive, traverse
                // up to find the specific injector. If the ancestor bloom filter does not have the bit, we
                // can abort.
                if (injectorHasToken(bloomHash, injectorIndex, injectorView)) {
                    injectorIndex = parentLocation & 32767 /* InjectorIndexMask */;
                    injectorView = getParentInjectorView(parentLocation, injectorView);
                }
                else {
                    injectorIndex = -1;
                    break;
                }
            }
            // If no injector is found, we *know* that there is no ancestor injector that contains the
            // token, so we abort.
            if (injectorIndex === -1) {
                break;
            }
            // At this point, we have an injector which *may* contain the token, so we step through the
            // directives associated with the injector's corresponding node to get the directive instance.
            var instance = void 0;
            if (instance = searchDirectivesOnInjector(injectorIndex, injectorView, token)) {
                return instance;
            }
            // If we *didn't* find the directive for the token and we are searching the current node's
            // injector, it's possible the directive is on this node and hasn't been created yet.
            if (injectorIndex === startInjectorIndex && hostView === injectorView &&
                (instance = searchMatchesQueuedForCreation(token, injectorView[TVIEW]))) {
                return instance;
            }
            // The def wasn't found anywhere on this node, so it was a false positive.
            // Traverse up the tree and continue searching.
            injectorIndex = parentLocation & 32767 /* InjectorIndexMask */;
            injectorView = getParentInjectorView(parentLocation, injectorView);
        }
    }
    var moduleInjector = hostView[INJECTOR$1];
    var formerInjector = setCurrentInjector(moduleInjector);
    try {
        return inject(token, flags);
    }
    finally {
        setCurrentInjector(formerInjector);
    }
}
function searchMatchesQueuedForCreation(token, hostTView) {
    var matches = hostTView.currentMatches;
    if (matches) {
        for (var i = 0; i < matches.length; i += 2) {
            var def = matches[i];
            if (def.type === token) {
                return resolveDirective(def, i + 1, matches);
            }
        }
    }
    return null;
}
function searchDirectivesOnInjector(injectorIndex, injectorView, token) {
    var tNode = injectorView[TVIEW].data[injectorIndex + TNODE];
    var nodeFlags = tNode.flags;
    var count = nodeFlags & 4095 /* DirectiveCountMask */;
    if (count !== 0) {
        var start = nodeFlags >> 15 /* DirectiveStartingIndexShift */;
        var end = start + count;
        var defs = injectorView[TVIEW].data;
        for (var i = start; i < end; i++) {
            // Get the definition for the directive at this index and, if it is injectable (diPublic),
            // and matches the given token, return the directive instance.
            var directiveDef = defs[i];
            if (directiveDef.type === token && directiveDef.diPublic) {
                return injectorView[i];
            }
        }
    }
    return null;
}
/**
 * Returns the bit in an injector's bloom filter that should be used to determine whether or not
 * the directive might be provided by the injector.
 *
 * When a directive is public, it is added to the bloom filter and given a unique ID that can be
 * retrieved on the Type. When the directive isn't public or the token is not a directive `null`
 * is returned as the node injector can not possibly provide that token.
 *
 * @param token the injection token
 * @returns the matching bit to check in the bloom filter or `null` if the token is not known.
 */
function bloomHashBitOrFactory(token) {
    ngDevMode && assertDefined(token, 'token must be defined');
    var tokenId = token[NG_ELEMENT_ID];
    return typeof tokenId === 'number' ? tokenId & BLOOM_MASK : tokenId;
}
function injectorHasToken(bloomHash, injectorIndex, injectorView) {
    // Create a mask that targets the specific bit associated with the directive we're looking for.
    // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding
    // to bit positions 0 - 31 in a 32 bit integer.
    var mask = 1 << bloomHash;
    var b7 = bloomHash & 0x80;
    var b6 = bloomHash & 0x40;
    var b5 = bloomHash & 0x20;
    // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:
    // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.
    // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.
    var value;
    if (b7) {
        value = b6 ? (b5 ? injectorView[injectorIndex + 7] : injectorView[injectorIndex + 6]) :
            (b5 ? injectorView[injectorIndex + 5] : injectorView[injectorIndex + 4]);
    }
    else {
        value = b6 ? (b5 ? injectorView[injectorIndex + 3] : injectorView[injectorIndex + 2]) :
            (b5 ? injectorView[injectorIndex + 1] : injectorView[injectorIndex]);
    }
    // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,
    // this injector is a potential match.
    return !!(value & mask);
}
/** Returns true if flags prevent parent injector from being searched for tokens */
function shouldNotSearchParent(flags, parentLocation) {
    return flags & 2 /* Self */ ||
        (flags & 1 /* Host */ && (parentLocation >> 15 /* ViewOffsetShift */) > 0);
}
var NodeInjector = /** @class */ (function () {
    function NodeInjector(_tNode, _hostView) {
        this._tNode = _tNode;
        this._hostView = _hostView;
        this._injectorIndex = getOrCreateNodeInjectorForNode(_tNode, _hostView);
    }
    NodeInjector.prototype.get = function (token) {
        setEnvironment(this._tNode, this._hostView);
        return getOrCreateInjectable(this._tNode, this._hostView, token);
    };
    return NodeInjector;
}());
function getFactoryOf(type) {
    var typeAny = type;
    var def = getComponentDef(typeAny) || getDirectiveDef(typeAny) ||
        getPipeDef(typeAny) || getInjectableDef(typeAny) || getInjectorDef(typeAny);
    if (!def || def.factory === undefined) {
        return null;
    }
    return def.factory;
}
function getInheritedFactory(type) {
    var proto = Object.getPrototypeOf(type.prototype).constructor;
    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 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
 */
/**
 * This feature publishes the directive (or component) into the DI system, making it visible to
 * others for injection.
 *
 * @param definition
 */
function PublicFeature(definition) {
    definition.diPublic = diPublic;
}

/**
 * @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
 */
var ComponentRef = /** @class */ (function () {
    function ComponentRef() {
    }
    return ComponentRef;
}());
/**
 * @publicApi
 */
var ComponentFactory = /** @class */ (function () {
    function ComponentFactory() {
    }
    return ComponentFactory;
}());

/**
 * @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 noComponentFactoryError(component) {
    var error = Error("No component factory found for " + stringify(component) + ". Did you add it to @NgModule.entryComponents?");
    error[ERROR_COMPONENT] = component;
    return error;
}
var ERROR_COMPONENT = 'ngComponent';
var _NullComponentFactoryResolver = /** @class */ (function () {
    function _NullComponentFactoryResolver() {
    }
    _NullComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {
        throw noComponentFactoryError(component);
    };
    return _NullComponentFactoryResolver;
}());
/**
 * @publicApi
 */
var ComponentFactoryResolver = /** @class */ (function () {
    function ComponentFactoryResolver() {
    }
    ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();
    return ComponentFactoryResolver;
}());
var CodegenComponentFactoryResolver = /** @class */ (function () {
    function CodegenComponentFactoryResolver(factories, _parent, _ngModule) {
        this._parent = _parent;
        this._ngModule = _ngModule;
        this._factories = new Map();
        for (var i = 0; i < factories.length; i++) {
            var factory = factories[i];
            this._factories.set(factory.componentType, factory);
        }
    }
    CodegenComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {
        var factory = this._factories.get(component);
        if (!factory && this._parent) {
            factory = this._parent.resolveComponentFactory(component);
        }
        if (!factory) {
            throw noComponentFactoryError(component);
        }
        return new ComponentFactoryBoundToModule(factory, this._ngModule);
    };
    return CodegenComponentFactoryResolver;
}());
var ComponentFactoryBoundToModule = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentFactoryBoundToModule, _super);
    function ComponentFactoryBoundToModule(factory, ngModule) {
        var _this = _super.call(this) || this;
        _this.factory = factory;
        _this.ngModule = ngModule;
        _this.selector = factory.selector;
        _this.componentType = factory.componentType;
        _this.ngContentSelectors = factory.ngContentSelectors;
        _this.inputs = factory.inputs;
        _this.outputs = factory.outputs;
        return _this;
    }
    ComponentFactoryBoundToModule.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {
        return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);
    };
    return ComponentFactoryBoundToModule;
}(ComponentFactory));

/**
 * @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
 */
var NgModuleRef = /** @class */ (function () {
    function NgModuleRef() {
    }
    return NgModuleRef;
}());
/**
 * @publicApi
 */
var NgModuleFactory = /** @class */ (function () {
    function NgModuleFactory() {
    }
    return NgModuleFactory;
}());

/**
 * @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 ViewRef = /** @class */ (function () {
    function ViewRef(_view, _context, _componentIndex) {
        this._context = _context;
        this._componentIndex = _componentIndex;
        this._appRef = null;
        this._viewContainerRef = null;
        /**
         * @internal
         */
        this._tViewNode = null;
        this._view = _view;
    }
    Object.defineProperty(ViewRef.prototype, "context", {
        get: function () { return this._context ? this._context : this._lookUpContext(); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ViewRef.prototype, "destroyed", {
        get: function () {
            return (this._view[FLAGS] & 32 /* Destroyed */) === 32 /* Destroyed */;
        },
        enumerable: true,
        configurable: true
    });
    ViewRef.prototype.destroy = function () {
        if (this._viewContainerRef && viewAttached(this._view)) {
            this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));
            this._viewContainerRef = null;
        }
        destroyLView(this._view);
    };
    ViewRef.prototype.onDestroy = function (callback) { storeCleanupFn(this._view, 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);
     *   }
     * }
     * ```
     */
    ViewRef.prototype.markForCheck = function () { markViewDirty(this._view); };
    /**
     * Detaches the view from the change detection tree.
     *
     * Detached views will not be checked during change detection runs until they are
     * re-attached, even if they are dirty. `detach` can be used in combination with
     * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
     * detection checks.
     *
     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
     * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
     *
     * @usageNotes
     * ### Example
     *
     * The following example defines a component with a large list of readonly data.
     * Imagine the data changes constantly, many times per second. For performance reasons,
     * we want to check and update the list every five seconds. We can do that by detaching
     * the component's change detector and doing a local check every five seconds.
     *
     * ```typescript
     * class DataProvider {
     *   // in a real application the returned data will be different every time
     *   get data() {
     *     return [1,2,3,4,5];
     *   }
     * }
     *
     * @Component({
     *   selector: 'giant-list',
     *   template: `
     *     <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
     *   `,
     * })
     * class GiantList {
     *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
     *     ref.detach();
     *     setInterval(() => {
     *       this.ref.detectChanges();
     *     }, 5000);
     *   }
     * }
     *
     * @Component({
     *   selector: 'app',
     *   providers: [DataProvider],
     *   template: `
     *     <giant-list><giant-list>
     *   `,
     * })
     * class App {
     * }
     * ```
     */
    ViewRef.prototype.detach = function () { this._view[FLAGS] &= ~8 /* Attached */; };
    /**
     * Re-attaches a view to the change detection tree.
     *
     * This can be used to re-attach views that were previously detached from the tree
     * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
     *
     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
     *
     * @usageNotes
     * ### Example
     *
     * The following example creates a component displaying `live` data. The component will detach
     * its change detector from the main change detector tree when the component's live property
     * is set to false.
     *
     * ```typescript
     * class DataProvider {
     *   data = 1;
     *
     *   constructor() {
     *     setInterval(() => {
     *       this.data = this.data * 2;
     *     }, 500);
     *   }
     * }
     *
     * @Component({
     *   selector: 'live-data',
     *   inputs: ['live'],
     *   template: 'Data: {{dataProvider.data}}'
     * })
     * class LiveData {
     *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
     *
     *   set live(value) {
     *     if (value) {
     *       this.ref.reattach();
     *     } else {
     *       this.ref.detach();
     *     }
     *   }
     * }
     *
     * @Component({
     *   selector: 'my-app',
     *   providers: [DataProvider],
     *   template: `
     *     Live Update: <input type="checkbox" [(ngModel)]="live">
     *     <live-data [live]="live"><live-data>
     *   `,
     * })
     * class AppComponent {
     *   live = true;
     * }
     * ```
     */
    ViewRef.prototype.reattach = function () { this._view[FLAGS] |= 8 /* 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.
     */
    ViewRef.prototype.detectChanges = function () {
        var rendererFactory = getRendererFactory();
        if (rendererFactory.begin) {
            rendererFactory.begin();
        }
        detectChanges(this.context);
        if (rendererFactory.end) {
            rendererFactory.end();
        }
    };
    /**
     * 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.
     */
    ViewRef.prototype.checkNoChanges = function () { checkNoChanges(this.context); };
    ViewRef.prototype.attachToViewContainerRef = function (vcRef) { this._viewContainerRef = vcRef; };
    ViewRef.prototype.detachFromAppRef = function () { this._appRef = null; };
    ViewRef.prototype.attachToAppRef = function (appRef) { this._appRef = appRef; };
    ViewRef.prototype._lookUpContext = function () {
        return this._context = this._view[PARENT][this._componentIndex];
    };
    return ViewRef;
}());
/** @internal */
var RootViewRef = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RootViewRef, _super);
    function RootViewRef(_view) {
        var _this = _super.call(this, _view, null, -1) || this;
        _this._view = _view;
        return _this;
    }
    RootViewRef.prototype.detectChanges = function () { detectChangesInRootView(this._view); };
    RootViewRef.prototype.checkNoChanges = function () { checkNoChangesInRootView(this._view); };
    return RootViewRef;
}(ViewRef));

/**
 * @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
 */
/**
 * Creates an ElementRef from the most recent node.
 *
 * @returns The ElementRef instance to use
 */
function injectElementRef(ElementRefToken) {
    return createElementRef(ElementRefToken, getPreviousOrParentTNode(), _getViewData());
}
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
 * @returns 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 = /** @class */ (function (_super) {
            Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ElementRef_, _super);
            function ElementRef_() {
                return _super !== null && _super.apply(this, arguments) || this;
            }
            return ElementRef_;
        }(ElementRefToken));
    }
    return new R3ElementRef(getNativeByTNode(tNode, view));
}
var R3TemplateRef;
/**
 * Creates a TemplateRef given a node.
 *
 * @returns The TemplateRef instance to use
 */
function injectTemplateRef(TemplateRefToken, ElementRefToken) {
    return createTemplateRef(TemplateRefToken, ElementRefToken, getPreviousOrParentTNode(), _getViewData());
}
/**
 * Creates a TemplateRef and stores it on the injector.
 *
 * @param TemplateRefToken The TemplateRef type
 * @param ElementRefToken The ElementRef type
 * @param hostTNode The node that is requesting a TemplateRef
 * @param hostView The view to which the node belongs
 * @returns The TemplateRef instance to use
 */
function createTemplateRef(TemplateRefToken, ElementRefToken, hostTNode, hostView) {
    if (!R3TemplateRef) {
        // TODO: Fix class name, should be TemplateRef, but there appears to be a rollup bug
        R3TemplateRef = /** @class */ (function (_super) {
            Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TemplateRef_, _super);
            function TemplateRef_(_declarationParentView, elementRef, _tView, _renderer, _queries, _injectorIndex) {
                var _this = _super.call(this) || this;
                _this._declarationParentView = _declarationParentView;
                _this.elementRef = elementRef;
                _this._tView = _tView;
                _this._renderer = _renderer;
                _this._queries = _queries;
                _this._injectorIndex = _injectorIndex;
                return _this;
            }
            TemplateRef_.prototype.createEmbeddedView = function (context, container$$1, hostTNode, hostView, index) {
                var lView = createEmbeddedViewAndNode(this._tView, context, this._declarationParentView, this._renderer, this._queries, this._injectorIndex);
                if (container$$1) {
                    insertView(lView, container$$1, hostView, index, hostTNode.index);
                }
                renderEmbeddedTemplate(lView, this._tView, context, 1 /* Create */);
                var viewRef = new ViewRef(lView, context, -1);
                viewRef._tViewNode = lView[HOST_NODE];
                return viewRef;
            };
            return TemplateRef_;
        }(TemplateRefToken));
    }
    var hostContainer = hostView[hostTNode.index];
    ngDevMode && assertNodeType(hostTNode, 0 /* Container */);
    ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');
    return new R3TemplateRef(hostView, createElementRef(ElementRefToken, hostTNode, hostView), hostTNode.tViews, getRenderer(), hostContainer[QUERIES], hostTNode.injectorIndex);
}
var R3ViewContainerRef;
/**
 * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef
 * already exists, retrieves the existing ViewContainerRef.
 *
 * @returns The ViewContainerRef instance to use
 */
function injectViewContainerRef(ViewContainerRefToken, ElementRefToken) {
    var previousTNode = getPreviousOrParentTNode();
    return createContainerRef(ViewContainerRefToken, ElementRefToken, previousTNode, _getViewData());
}
/**
 * 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
 * @returns 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 = /** @class */ (function (_super) {
            Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ViewContainerRef_, _super);
            function ViewContainerRef_(_lContainer, _hostTNode, _hostView) {
                var _this = _super.call(this) || this;
                _this._lContainer = _lContainer;
                _this._hostTNode = _hostTNode;
                _this._hostView = _hostView;
                _this._viewRefs = [];
                return _this;
            }
            Object.defineProperty(ViewContainerRef_.prototype, "element", {
                get: function () {
                    return createElementRef(ElementRefToken, this._hostTNode, this._hostView);
                },
                enumerable: true,
                configurable: true
            });
            Object.defineProperty(ViewContainerRef_.prototype, "injector", {
                get: function () { return new NodeInjector(this._hostTNode, this._hostView); },
                enumerable: true,
                configurable: true
            });
            Object.defineProperty(ViewContainerRef_.prototype, "parentInjector", {
                /** @deprecated No replacement */
                get: function () {
                    var parentLocation = getParentInjectorLocation(this._hostTNode, this._hostView);
                    var parentView = getParentInjectorView(parentLocation, this._hostView);
                    var parentIndex = parentLocation & 32767 /* InjectorIndexMask */;
                    var parentTNode = parentView[TVIEW].data[parentIndex];
                    return parentLocation === -1 ? new NullInjector() :
                        new NodeInjector(parentTNode, parentView);
                },
                enumerable: true,
                configurable: true
            });
            ViewContainerRef_.prototype.clear = function () {
                while (this._lContainer[VIEWS].length) {
                    this.remove(0);
                }
            };
            ViewContainerRef_.prototype.get = function (index) { return this._viewRefs[index] || null; };
            Object.defineProperty(ViewContainerRef_.prototype, "length", {
                get: function () { return this._lContainer[VIEWS].length; },
                enumerable: true,
                configurable: true
            });
            ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {
                var adjustedIdx = this._adjustIndex(index);
                var viewRef = templateRef
                    .createEmbeddedView(context || {}, this._lContainer, this._hostTNode, this._hostView, adjustedIdx);
                viewRef.attachToViewContainerRef(this);
                this._viewRefs.splice(adjustedIdx, 0, viewRef);
                return viewRef;
            };
            ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {
                var contextInjector = injector || this.parentInjector;
                if (!ngModuleRef && contextInjector) {
                    ngModuleRef = contextInjector.get(NgModuleRef, null);
                }
                var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);
                this.insert(componentRef.hostView, index);
                return componentRef;
            };
            ViewContainerRef_.prototype.insert = function (viewRef, index) {
                if (viewRef.destroyed) {
                    throw new Error('Cannot insert a destroyed View in a ViewContainer!');
                }
                var lView = viewRef._view;
                var adjustedIdx = this._adjustIndex(index);
                insertView(lView, this._lContainer, this._hostView, adjustedIdx, this._hostTNode.index);
                var beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer[VIEWS], this._lContainer[NATIVE]);
                addRemoveViewFromContainer(lView, true, beforeNode);
                viewRef.attachToViewContainerRef(this);
                this._viewRefs.splice(adjustedIdx, 0, viewRef);
                return viewRef;
            };
            ViewContainerRef_.prototype.move = function (viewRef, newIndex) {
                var index = this.indexOf(viewRef);
                this.detach(index);
                this.insert(viewRef, this._adjustIndex(newIndex));
                return viewRef;
            };
            ViewContainerRef_.prototype.indexOf = function (viewRef) { return this._viewRefs.indexOf(viewRef); };
            ViewContainerRef_.prototype.remove = function (index) {
                var adjustedIdx = this._adjustIndex(index, -1);
                removeView(this._lContainer, this._hostTNode, adjustedIdx);
                this._viewRefs.splice(adjustedIdx, 1);
            };
            ViewContainerRef_.prototype.detach = function (index) {
                var adjustedIdx = this._adjustIndex(index, -1);
                detachView(this._lContainer, adjustedIdx, !!this._hostTNode.detached);
                return this._viewRefs.splice(adjustedIdx, 1)[0] || null;
            };
            ViewContainerRef_.prototype._adjustIndex = function (index, shift) {
                if (shift === void 0) { shift = 0; }
                if (index == null) {
                    return this._lContainer[VIEWS].length + shift;
                }
                if (ngDevMode) {
                    assertGreaterThan(index, -1, 'index must be positive');
                    // +1 because it's legal to insert at the end.
                    assertLessThan(index, this._lContainer[VIEWS].length + 1 + shift, 'index');
                }
                return index;
            };
            return ViewContainerRef_;
        }(ViewContainerRefToken));
    }
    ngDevMode && assertNodeOfPossibleTypes(hostTNode, 0 /* Container */, 3 /* Element */, 4 /* ElementContainer */);
    var lContainer;
    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 {
        var comment = hostView[RENDERER].createComment(ngDevMode ? 'container' : '');
        ngDevMode && ngDevMode.rendererCreateComment++;
        hostView[hostTNode.index] = lContainer =
            createLContainer(slotValue, hostTNode, hostView, comment, true);
        appendChild(comment, hostTNode, hostView);
        addToViewTree(hostView, hostTNode.index, lContainer);
    }
    return new R3ViewContainerRef(lContainer, hostTNode, hostView);
}
/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */
function injectChangeDetectorRef() {
    return createViewRef(getPreviousOrParentTNode(), _getViewData(), null);
}
/**
 * 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 context The context for this change detector ref
 * @returns The ChangeDetectorRef to use
 */
function createViewRef(hostTNode, hostView, context) {
    if (isComponent(hostTNode)) {
        var componentIndex = hostTNode.flags >> 15 /* DirectiveStartingIndexShift */;
        var componentView = getComponentViewByIndex(hostTNode.index, hostView);
        return new ViewRef(componentView, context, componentIndex);
    }
    else if (hostTNode.type === 3 /* Element */) {
        var hostComponentView = findComponentView(hostView);
        return new ViewRef(hostComponentView, hostComponentView[CONTEXT], -1);
    }
    return null;
}
function getOrCreateRenderer2(view) {
    var renderer = view[RENDERER];
    if (isProceduralRenderer(renderer)) {
        return renderer;
    }
    else {
        throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');
    }
}
/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */
function injectRenderer2() {
    return getOrCreateRenderer2(_getViewData());
}

/**
 * @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 R3_ELEMENT_REF_FACTORY = injectElementRef;
var R3_TEMPLATE_REF_FACTORY = injectTemplateRef;
var R3_CHANGE_DETECTOR_REF_FACTORY = injectChangeDetectorRef;
var R3_VIEW_CONTAINER_REF_FACTORY = injectViewContainerRef;
var R3_RENDERER2_FACTORY = injectRenderer2;

/**
 * @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 noopFactory() {
    var tokens = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        tokens[_i] = arguments[_i];
    }
}
var R3_ELEMENT_REF_FACTORY__POST_NGCC__ = R3_ELEMENT_REF_FACTORY;
var R3_TEMPLATE_REF_FACTORY__POST_NGCC__ = R3_TEMPLATE_REF_FACTORY;
var R3_CHANGE_DETECTOR_REF_FACTORY__POST_NGCC__ = R3_CHANGE_DETECTOR_REF_FACTORY;
var R3_VIEW_CONTAINER_REF_FACTORY__POST_NGCC__ = R3_VIEW_CONTAINER_REF_FACTORY;
var R3_RENDERER2_FACTORY__POST_NGCC__ = R3_RENDERER2_FACTORY;
var R3_ELEMENT_REF_FACTORY__PRE_NGCC__ = noopFactory;
var R3_TEMPLATE_REF_FACTORY__PRE_NGCC__ = noopFactory;
var R3_CHANGE_DETECTOR_REF_FACTORY__PRE_NGCC__ = noopFactory;
var R3_VIEW_CONTAINER_REF_FACTORY__PRE_NGCC__ = noopFactory;
var R3_RENDERER2_FACTORY__PRE_NGCC__ = noopFactory;
var R3_ELEMENT_REF_FACTORY$1 = R3_ELEMENT_REF_FACTORY__PRE_NGCC__;
var R3_TEMPLATE_REF_FACTORY$1 = R3_TEMPLATE_REF_FACTORY__PRE_NGCC__;
var R3_CHANGE_DETECTOR_REF_FACTORY$1 = R3_CHANGE_DETECTOR_REF_FACTORY__PRE_NGCC__;
var R3_VIEW_CONTAINER_REF_FACTORY$1 = R3_VIEW_CONTAINER_REF_FACTORY__PRE_NGCC__;
var R3_RENDERER2_FACTORY$1 = R3_RENDERER2_FACTORY__PRE_NGCC__;

/**
 * @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 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
 */
// 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 = /** @class */ (function () {
    function ElementRef(nativeElement) {
        this.nativeElement = nativeElement;
    }
    /** @internal */
    ElementRef.__NG_ELEMENT_ID__ = function () { return R3_ELEMENT_REF_FACTORY$1(ElementRef); };
    return ElementRef;
}());

/**
 * @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
 */
/**
 * @deprecated Use `RendererType2` (and `Renderer2`) instead.
 * @publicApi
 */
var RenderComponentType = /** @class */ (function () {
    function RenderComponentType(id, templateUrl, slotCount, encapsulation, styles, animations) {
        this.id = id;
        this.templateUrl = templateUrl;
        this.slotCount = slotCount;
        this.encapsulation = encapsulation;
        this.styles = styles;
        this.animations = animations;
    }
    return RenderComponentType;
}());
/**
 * @deprecated Debug info is handled internally in the view engine now.
 */
var RenderDebugInfo = /** @class */ (function () {
    function RenderDebugInfo() {
    }
    return RenderDebugInfo;
}());
/**
 * @deprecated Use the `Renderer2` instead.
 * @publicApi
 */
var Renderer = /** @class */ (function () {
    function Renderer() {
    }
    return Renderer;
}());
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
 */
var RootRenderer = /** @class */ (function () {
    function RootRenderer() {
    }
    return RootRenderer;
}());
/**
 * Creates and initializes a custom renderer that implements the `Renderer2` base class.
 *
 * @publicApi
 */
var RendererFactory2 = /** @class */ (function () {
    function RendererFactory2() {
    }
    return RendererFactory2;
}());
/**
 * Flags for renderer-specific style modifiers.
 * @publicApi
 */
var RendererStyleFlags2;
(function (RendererStyleFlags2) {
    /**
     * Marks a style as important.
     */
    RendererStyleFlags2[RendererStyleFlags2["Important"] = 1] = "Important";
    /**
     * Marks a style as using dash case naming (this-is-dash-case).
     */
    RendererStyleFlags2[RendererStyleFlags2["DashCase"] = 2] = "DashCase";
})(RendererStyleFlags2 || (RendererStyleFlags2 = {}));
/**
 * Extend this base class to implement custom rendering. By default, Angular
 * renders a template into DOM. You can use custom rendering to intercept
 * rendering calls, or to render to something other than DOM.
 *
 * Create your custom renderer using `RendererFactory2`.
 *
 * Use a custom renderer to bypass Angular's templating and
 * make custom UI changes that can't be expressed declaratively.
 * For example if you need to set a property or an attribute whose name is
 * not statically known, use the `setProperty()` or
 * `setAttribute()` method.
 *
 * @publicApi
 */
var Renderer2 = /** @class */ (function () {
    function Renderer2() {
    }
    /** @internal */
    Renderer2.__NG_ELEMENT_ID__ = function () { return R3_RENDERER2_FACTORY$1(); };
    return Renderer2;
}());

/**
 * @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 ComponentFactoryResolver$1 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentFactoryResolver$$1, _super);
    function ComponentFactoryResolver$$1() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ComponentFactoryResolver$$1.prototype.resolveComponentFactory = function (component) {
        ngDevMode && assertComponentType(component);
        var componentDef = getComponentDef(component);
        return new ComponentFactory$1(componentDef);
    };
    return ComponentFactoryResolver$$1;
}(ComponentFactoryResolver));
function toRefArray(map) {
    var array = [];
    for (var nonMinified in map) {
        if (map.hasOwnProperty(nonMinified)) {
            var minified = map[nonMinified];
            array.push({ propName: minified, templateName: nonMinified });
        }
    }
    return array;
}
/**
 * Default {@link RootContext} for all components rendered with {@link renderComponent}.
 */
var ROOT_CONTEXT = new InjectionToken('ROOT_CONTEXT_TOKEN', { providedIn: 'root', factory: function () { return createRootContext(inject(SCHEDULER)); } });
/**
 * A change detection scheduler token for {@link RootContext}. This token is the default value used
 * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.
 */
var SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {
    providedIn: 'root',
    factory: function () {
        var useRaf = typeof requestAnimationFrame !== 'undefined' && typeof window !== 'undefined';
        return useRaf ? requestAnimationFrame.bind(window) : setTimeout;
    },
});
/**
 * A function used to wrap the `RendererFactory2`.
 * Used in tests to change the `RendererFactory2` into a `DebugRendererFactory2`.
 */
var WRAP_RENDERER_FACTORY2 = new InjectionToken('WRAP_RENDERER_FACTORY2');
/**
 * Render3 implementation of {@link viewEngine_ComponentFactory}.
 */
var ComponentFactory$1 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentFactory$$1, _super);
    function ComponentFactory$$1(componentDef) {
        var _this = _super.call(this) || this;
        _this.componentDef = componentDef;
        _this.componentType = componentDef.type;
        _this.selector = componentDef.selectors[0][0];
        _this.ngContentSelectors = [];
        return _this;
    }
    Object.defineProperty(ComponentFactory$$1.prototype, "inputs", {
        get: function () {
            return toRefArray(this.componentDef.inputs);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ComponentFactory$$1.prototype, "outputs", {
        get: function () {
            return toRefArray(this.componentDef.outputs);
        },
        enumerable: true,
        configurable: true
    });
    ComponentFactory$$1.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {
        var isInternalRootView = rootSelectorOrNode === undefined;
        var rendererFactory;
        if (ngModule) {
            var wrapper = ngModule.injector.get(WRAP_RENDERER_FACTORY2, function (v) { return v; });
            rendererFactory = wrapper(ngModule.injector.get(RendererFactory2));
        }
        else {
            rendererFactory = domRendererFactory3;
        }
        var hostRNode = isInternalRootView ?
            elementCreate(this.selector, rendererFactory.createRenderer(null, this.componentDef)) :
            locateHostElement(rendererFactory, rootSelectorOrNode);
        // The first index of the first selector is the tag name.
        var componentTag = this.componentDef.selectors[0][0];
        var rootFlags = this.componentDef.onPush ? 4 /* Dirty */ | 64 /* IsRoot */ :
            2 /* CheckAlways */ | 64 /* IsRoot */;
        var rootContext = ngModule && !isInternalRootView ?
            ngModule.injector.get(ROOT_CONTEXT) :
            createRootContext(requestAnimationFrame.bind(window));
        var renderer = rendererFactory.createRenderer(hostRNode, this.componentDef);
        // Create the root view. Uses empty TView and ContentTemplate.
        var rootView = createLViewData(renderer, createTView(-1, null, 1, 0, null, null, null), rootContext, rootFlags);
        rootView[INJECTOR$1] = ngModule && ngModule.injector || null;
        // rootView is the parent when bootstrapping
        var oldView = enterView(rootView, null);
        var component;
        var tElementNode;
        try {
            if (rendererFactory.begin)
                rendererFactory.begin();
            var componentView = createRootComponentView(hostRNode, this.componentDef, rootView, renderer);
            tElementNode = getTNode(0, rootView);
            // Transform the arrays of native nodes into a structure that can be consumed by the
            // projection instruction. This is needed to support the reprojection of these nodes.
            if (projectableNodes) {
                var index = 0;
                var projection$$1 = tElementNode.projection = [];
                for (var i = 0; i < projectableNodes.length; i++) {
                    var nodeList = projectableNodes[i];
                    var firstTNode = null;
                    var previousTNode = null;
                    for (var j = 0; j < nodeList.length; j++) {
                        adjustBlueprintForNewNode(rootView);
                        var tNode = createNodeAtIndex(++index, 3 /* Element */, nodeList[j], null, null);
                        previousTNode ? (previousTNode.next = tNode) : (firstTNode = tNode);
                        previousTNode = tNode;
                    }
                    projection$$1.push(firstTNode);
                }
            }
            // 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(hostRNode, componentView, this.componentDef, rootView, rootContext, [LifecycleHooksFeature]);
            // Execute the template in creation mode only, and then turn off the CreationMode flag
            renderEmbeddedTemplate(componentView, componentView[TVIEW], component, 1 /* Create */);
            componentView[FLAGS] &= ~1 /* CreationMode */;
        }
        finally {
            enterView(oldView, null);
            if (rendererFactory.end)
                rendererFactory.end();
        }
        var componentRef = new ComponentRef$1(this.componentType, component, rootView, injector, createElementRef(ElementRef, tElementNode, rootView));
        if (isInternalRootView) {
            // The host element of the internal root view is attached to the component's host view node
            componentRef.hostView._tViewNode.child = tElementNode;
        }
        return componentRef;
    };
    return ComponentFactory$$1;
}(ComponentFactory));
var componentFactoryResolver = new ComponentFactoryResolver$1();
/**
 * Represents an instance of a Component created via a {@link ComponentFactory}.
 *
 * `ComponentRef` provides access to the Component Instance as well other objects related to this
 * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
 * method.
 *
 */
var ComponentRef$1 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentRef$$1, _super);
    function ComponentRef$$1(componentType, instance, rootView, injector, location) {
        var _this = _super.call(this) || this;
        _this.location = location;
        _this.destroyCbs = [];
        _this.instance = instance;
        _this.hostView = _this.changeDetectorRef = new RootViewRef(rootView);
        _this.hostView._tViewNode = createViewNode(-1, rootView);
        _this.injector = injector;
        _this.componentType = componentType;
        return _this;
    }
    ComponentRef$$1.prototype.destroy = function () {
        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
        this.destroyCbs.forEach(function (fn) { return fn(); });
        this.destroyCbs = null;
    };
    ComponentRef$$1.prototype.onDestroy = function (callback) {
        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
        this.destroyCbs.push(callback);
    };
    return ComponentRef$$1;
}(ComponentRef));

/**
 * @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 i18nTagRegex = /{\$([^}]+)}/g;
/**
 * Takes a translation string, the initial list of placeholders (elements and expressions) and the
 * indexes of their corresponding expression nodes to return a list of instructions for each
 * template function.
 *
 * Because embedded templates have different indexes for each placeholder, each parameter (except
 * the translation) is an array, where each value corresponds to a different template, by order of
 * appearance.
 *
 * @param translation A translation string where placeholders are represented by `{$name}`
 * @param elements An array containing, for each template, the maps of element placeholders and
 * their indexes.
 * @param expressions An array containing, for each template, the maps of expression placeholders
 * and their indexes.
 * @param templateRoots An array of template roots whose content should be ignored when
 * generating the instructions for their parent template.
 * @param lastChildIndex The index of the last child of the i18n node. Used when the i18n block is
 * an ng-container.
 *
 * @returns A list of instructions used to translate each template.
 */
function i18nMapping(translation, elements, expressions, templateRoots, lastChildIndex) {
    var translationParts = translation.split(i18nTagRegex);
    var nbTemplates = templateRoots ? templateRoots.length + 1 : 1;
    var instructions = (new Array(nbTemplates)).fill(undefined);
    generateMappingInstructions(0, 0, translationParts, instructions, elements, expressions, templateRoots, lastChildIndex);
    return instructions;
}
/**
 * Internal function that reads the translation parts and generates a set of instructions for each
 * template.
 *
 * See `i18nMapping()` for more details.
 *
 * @param tmplIndex The order of appearance of the template.
 * 0 for the root template, following indexes match the order in `templateRoots`.
 * @param partIndex The current index in `translationParts`.
 * @param translationParts The translation string split into an array of placeholders and text
 * elements.
 * @param instructions The current list of instructions to update.
 * @param elements An array containing, for each template, the maps of element placeholders and
 * their indexes.
 * @param expressions An array containing, for each template, the maps of expression placeholders
 * and their indexes.
 * @param templateRoots An array of template roots whose content should be ignored when
 * generating the instructions for their parent template.
 * @param lastChildIndex The index of the last child of the i18n node. Used when the i18n block is
 * an ng-container.
 *
 * @returns the current index in `translationParts`
 */
function generateMappingInstructions(tmplIndex, partIndex, translationParts, instructions, elements, expressions, templateRoots, lastChildIndex) {
    var tmplInstructions = [];
    var phVisited = [];
    var openedTagCount = 0;
    var maxIndex = 0;
    var currentElements = elements && elements[tmplIndex] ? elements[tmplIndex] : null;
    var currentExpressions = expressions && expressions[tmplIndex] ? expressions[tmplIndex] : null;
    instructions[tmplIndex] = tmplInstructions;
    for (; partIndex < translationParts.length; partIndex++) {
        // The value can either be text or the name of a placeholder (element/template root/expression)
        var value = translationParts[partIndex];
        // Odd indexes are placeholders
        if (partIndex & 1) {
            var phIndex = void 0;
            if (currentElements && currentElements[value] !== undefined) {
                phIndex = currentElements[value];
                // The placeholder represents a DOM element, add an instruction to move it
                var templateRootIndex = templateRoots ? templateRoots.indexOf(value) : -1;
                if (templateRootIndex !== -1 && (templateRootIndex + 1) !== tmplIndex) {
                    // This is a template root, it has no closing tag, not treating it as an element
                    tmplInstructions.push(phIndex | -2147483648 /* TemplateRoot */);
                }
                else {
                    tmplInstructions.push(phIndex | 1073741824 /* Element */);
                    openedTagCount++;
                }
                phVisited.push(value);
            }
            else if (currentExpressions && currentExpressions[value] !== undefined) {
                phIndex = currentExpressions[value];
                // The placeholder represents an expression, add an instruction to move it
                tmplInstructions.push(phIndex | 1610612736 /* Expression */);
                phVisited.push(value);
            }
            else {
                // It is a closing tag
                tmplInstructions.push(-1073741824 /* CloseNode */);
                if (tmplIndex > 0) {
                    openedTagCount--;
                    // If we have reached the closing tag for this template, exit the loop
                    if (openedTagCount === 0) {
                        break;
                    }
                }
            }
            if (phIndex !== undefined && phIndex > maxIndex) {
                maxIndex = phIndex;
            }
            if (templateRoots) {
                var newTmplIndex = templateRoots.indexOf(value) + 1;
                if (newTmplIndex !== 0 && newTmplIndex !== tmplIndex) {
                    partIndex = generateMappingInstructions(newTmplIndex, partIndex, translationParts, instructions, elements, expressions, templateRoots, lastChildIndex);
                }
            }
        }
        else if (value) {
            // It's a non-empty string, create a text node
            tmplInstructions.push(536870912 /* Text */, value);
        }
    }
    // Add instructions to remove elements that are not used in the translation
    if (elements) {
        var tmplElements = elements[tmplIndex];
        if (tmplElements) {
            var phKeys = Object.keys(tmplElements);
            for (var i = 0; i < phKeys.length; i++) {
                var ph = phKeys[i];
                if (phVisited.indexOf(ph) === -1) {
                    var index = tmplElements[ph];
                    // Add an instruction to remove the element
                    tmplInstructions.push(index | -536870912 /* RemoveNode */);
                    if (index > maxIndex) {
                        maxIndex = index;
                    }
                }
            }
        }
    }
    // Add instructions to remove expressions that are not used in the translation
    if (expressions) {
        var tmplExpressions = expressions[tmplIndex];
        if (tmplExpressions) {
            var phKeys = Object.keys(tmplExpressions);
            for (var i = 0; i < phKeys.length; i++) {
                var ph = phKeys[i];
                if (phVisited.indexOf(ph) === -1) {
                    var index = tmplExpressions[ph];
                    if (ngDevMode) {
                        assertLessThan(index.toString(2).length, 28, "Index " + index + " is too big and will overflow");
                    }
                    // Add an instruction to remove the expression
                    tmplInstructions.push(index | -536870912 /* RemoveNode */);
                    if (index > maxIndex) {
                        maxIndex = index;
                    }
                }
            }
        }
    }
    if (tmplIndex === 0 && typeof lastChildIndex === 'number') {
        // The current parent is an ng-container and it has more children after the translation that we
        // need to append to keep the order of the DOM nodes correct
        for (var i = maxIndex + 1; i <= lastChildIndex; i++) {
            if (ngDevMode) {
                assertLessThan(i.toString(2).length, 28, "Index " + i + " is too big and will overflow");
            }
            tmplInstructions.push(i | -1610612736 /* Any */);
        }
    }
    return partIndex;
}
function appendI18nNode(tNode, parentTNode, previousTNode) {
    if (ngDevMode) {
        ngDevMode.rendererMoveNode++;
    }
    var viewData = _getViewData();
    // On first pass, re-organize node tree to put this node in the correct position.
    var firstTemplatePass = viewData[TVIEW].firstTemplatePass;
    if (firstTemplatePass) {
        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[HOST_NODE]) {
            tNode.parent = parentTNode;
        }
    }
    appendChild(getNativeByTNode(tNode, viewData), tNode, viewData);
    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;
}
function i18nAttribute(index, attrs) {
    // placeholder for i18nAttribute function
}
function i18nExp(expression) {
    // placeholder for i18nExp function
}
function i18nStart(index, message, subTemplateIndex) {
    if (subTemplateIndex === void 0) { subTemplateIndex = 0; }
    // placeholder for i18nExp function
}
function i18nEnd() {
    // placeholder for i18nEnd function
}
/**
 * Takes a list of instructions generated by `i18nMapping()` to transform the template accordingly.
 *
 * @param startIndex Index of the first element to translate (for instance the first child of the
 * element with the i18n attribute).
 * @param instructions The list of instructions to apply on the current view.
 */
function i18nApply(startIndex, instructions) {
    var viewData = _getViewData();
    if (ngDevMode) {
        assertEqual(viewData[BINDING_INDEX], viewData[TVIEW].bindingStartIndex, 'i18nApply should be called before any binding');
    }
    if (!instructions) {
        return;
    }
    var renderer = getRenderer();
    var startTNode = getTNode(startIndex, viewData);
    var localParentTNode = startTNode.parent || viewData[HOST_NODE];
    var localPreviousTNode = localParentTNode;
    resetComponentState(); // We don't want to add to the tree with the wrong previous node
    for (var i = 0; i < instructions.length; i++) {
        var instruction = instructions[i];
        switch (instruction & -536870912 /* InstructionMask */) {
            case 1073741824 /* Element */:
                var elementTNode = getTNode(instruction & 536870911 /* IndexMask */, viewData);
                localPreviousTNode = appendI18nNode(elementTNode, localParentTNode, localPreviousTNode);
                localParentTNode = elementTNode;
                break;
            case 1610612736 /* Expression */:
            case -2147483648 /* TemplateRoot */:
            case -1610612736 /* Any */:
                var nodeIndex = instruction & 536870911 /* IndexMask */;
                localPreviousTNode =
                    appendI18nNode(getTNode(nodeIndex, viewData), localParentTNode, localPreviousTNode);
                break;
            case 536870912 /* Text */:
                if (ngDevMode) {
                    ngDevMode.rendererCreateTextNode++;
                }
                var value = instructions[++i];
                var textRNode = createTextNode(value, renderer);
                // If we were to only create a `RNode` then projections won't move the text.
                // Create text node at the current end of viewData. Must subtract header offset because
                // createNodeAtIndex takes a raw index (not adjusted by header offset).
                adjustBlueprintForNewNode(viewData);
                var textTNode = createNodeAtIndex(viewData.length - 1 - HEADER_OFFSET, 3 /* Element */, textRNode, null, null);
                localPreviousTNode = appendI18nNode(textTNode, localParentTNode, localPreviousTNode);
                resetComponentState();
                break;
            case -1073741824 /* CloseNode */:
                localPreviousTNode = localParentTNode;
                localParentTNode = localParentTNode.parent || viewData[HOST_NODE];
                break;
            case -536870912 /* RemoveNode */:
                if (ngDevMode) {
                    ngDevMode.rendererRemoveNode++;
                }
                var removeIndex = instruction & 536870911 /* IndexMask */;
                var removedElement = getNativeByIndex(removeIndex, viewData);
                var removedTNode = getTNode(removeIndex, viewData);
                removeChild(removedTNode, removedElement || null, viewData);
                var slotValue = load(removeIndex);
                if (isLContainer(slotValue)) {
                    var lContainer = slotValue;
                    if (removedTNode.type !== 0 /* Container */) {
                        removeChild(removedTNode, lContainer[NATIVE] || null, viewData);
                    }
                    removedTNode.detached = true;
                    lContainer[RENDER_PARENT] = null;
                }
                break;
        }
    }
}
/**
 * Takes a translation string and the initial list of expressions and returns a list of instructions
 * that will be used to translate an attribute.
 * Even indexes contain static strings, while odd indexes contain the index of the expression whose
 * value will be concatenated into the final translation.
 */
function i18nExpMapping(translation, placeholders) {
    var staticText = translation.split(i18nTagRegex);
    // odd indexes are placeholders
    for (var i = 1; i < staticText.length; i += 2) {
        staticText[i] = placeholders[staticText[i]];
    }
    return staticText;
}
/**
 * Checks if the value of an expression has changed and replaces it by its value in a translation,
 * or returns NO_CHANGE.
 *
 * @param instructions A list of instructions that will be used to translate an attribute.
 * @param v0 value checked for change.
 *
 * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */
function i18nInterpolation1(instructions, v0) {
    var different = bindingUpdated(_getViewData()[BINDING_INDEX]++, v0);
    if (!different) {
        return NO_CHANGE;
    }
    var res = '';
    for (var i = 0; i < instructions.length; i++) {
        // Odd indexes are bindings
        if (i & 1) {
            res += stringify$1(v0);
        }
        else {
            res += instructions[i];
        }
    }
    return res;
}
/**
 * Checks if the values of up to 2 expressions have changed and replaces them by their values in a
 * translation, or returns NO_CHANGE.
 *
 * @param instructions A list of instructions that will be used to translate an attribute.
 * @param v0 value checked for change.
 * @param v1 value checked for change.
 *
 * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */
function i18nInterpolation2(instructions, v0, v1) {
    var viewData = _getViewData();
    var different = bindingUpdated2(viewData[BINDING_INDEX], v0, v1);
    viewData[BINDING_INDEX] += 2;
    if (!different) {
        return NO_CHANGE;
    }
    var res = '';
    for (var i = 0; i < instructions.length; i++) {
        // Odd indexes are bindings
        if (i & 1) {
            // Extract bits
            var idx = instructions[i];
            var b1 = idx & 1;
            // Get the value from the argument vx where x = idx
            var value = b1 ? v1 : v0;
            res += stringify$1(value);
        }
        else {
            res += instructions[i];
        }
    }
    return res;
}
/**
 * Checks if the values of up to 3 expressions have changed and replaces them by their values in a
 * translation, or returns NO_CHANGE.
 *
 * @param instructions A list of instructions that will be used to translate an attribute.
 * @param v0 value checked for change.
 * @param v1 value checked for change.
 * @param v2 value checked for change.
 *
 * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */
function i18nInterpolation3(instructions, v0, v1, v2) {
    var viewData = _getViewData();
    var different = bindingUpdated3(viewData[BINDING_INDEX], v0, v1, v2);
    viewData[BINDING_INDEX] += 3;
    if (!different) {
        return NO_CHANGE;
    }
    var res = '';
    for (var i = 0; i < instructions.length; i++) {
        // Odd indexes are bindings
        if (i & 1) {
            // Extract bits
            var idx = instructions[i];
            var b2 = idx & 2;
            var b1 = idx & 1;
            // Get the value from the argument vx where x = idx
            var value = b2 ? v2 : (b1 ? v1 : v0);
            res += stringify$1(value);
        }
        else {
            res += instructions[i];
        }
    }
    return res;
}
/**
 * Checks if the values of up to 4 expressions have changed and replaces them by their values in a
 * translation, or returns NO_CHANGE.
 *
 * @param instructions A list of instructions that will be used to translate an attribute.
 * @param v0 value checked for change.
 * @param v1 value checked for change.
 * @param v2 value checked for change.
 * @param v3 value checked for change.
 *
 * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */
function i18nInterpolation4(instructions, v0, v1, v2, v3) {
    var viewData = _getViewData();
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    viewData[BINDING_INDEX] += 4;
    if (!different) {
        return NO_CHANGE;
    }
    var res = '';
    for (var i = 0; i < instructions.length; i++) {
        // Odd indexes are bindings
        if (i & 1) {
            // Extract bits
            var idx = instructions[i];
            var b2 = idx & 2;
            var b1 = idx & 1;
            // Get the value from the argument vx where x = idx
            var value = b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0);
            res += stringify$1(value);
        }
        else {
            res += instructions[i];
        }
    }
    return res;
}
/**
 * Checks if the values of up to 5 expressions have changed and replaces them by their values in a
 * translation, or returns NO_CHANGE.
 *
 * @param instructions A list of instructions that will be used to translate an attribute.
 * @param v0 value checked for change.
 * @param v1 value checked for change.
 * @param v2 value checked for change.
 * @param v3 value checked for change.
 * @param v4 value checked for change.
 *
 * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */
function i18nInterpolation5(instructions, v0, v1, v2, v3, v4) {
    var viewData = _getViewData();
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    different = bindingUpdated(viewData[BINDING_INDEX] + 4, v4) || different;
    viewData[BINDING_INDEX] += 5;
    if (!different) {
        return NO_CHANGE;
    }
    var res = '';
    for (var i = 0; i < instructions.length; i++) {
        // Odd indexes are bindings
        if (i & 1) {
            // Extract bits
            var idx = instructions[i];
            var b4 = idx & 4;
            var b2 = idx & 2;
            var b1 = idx & 1;
            // Get the value from the argument vx where x = idx
            var value = b4 ? v4 : (b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0));
            res += stringify$1(value);
        }
        else {
            res += instructions[i];
        }
    }
    return res;
}
/**
 * Checks if the values of up to 6 expressions have changed and replaces them by their values in a
 * translation, or returns NO_CHANGE.
 *
 * @param instructions A list of instructions that will be used to translate an attribute.
 * @param v0 value checked for change.
 * @param v1 value checked for change.
 * @param v2 value checked for change.
 * @param v3 value checked for change.
 * @param v4 value checked for change.
 * @param v5 value checked for change.
 *
 * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */ function i18nInterpolation6(instructions, v0, v1, v2, v3, v4, v5) {
    var viewData = _getViewData();
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    different = bindingUpdated2(viewData[BINDING_INDEX] + 4, v4, v5) || different;
    viewData[BINDING_INDEX] += 6;
    if (!different) {
        return NO_CHANGE;
    }
    var res = '';
    for (var i = 0; i < instructions.length; i++) {
        // Odd indexes are bindings
        if (i & 1) {
            // Extract bits
            var idx = instructions[i];
            var b4 = idx & 4;
            var b2 = idx & 2;
            var b1 = idx & 1;
            // Get the value from the argument vx where x = idx
            var value = b4 ? (b1 ? v5 : v4) : (b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0));
            res += stringify$1(value);
        }
        else {
            res += instructions[i];
        }
    }
    return res;
}
/**
 * Checks if the values of up to 7 expressions have changed and replaces them by their values in a
 * translation, or returns NO_CHANGE.
 *
 * @param instructions A list of instructions that will be used to translate an attribute.
 * @param v0 value checked for change.
 * @param v1 value checked for change.
 * @param v2 value checked for change.
 * @param v3 value checked for change.
 * @param v4 value checked for change.
 * @param v5 value checked for change.
 * @param v6 value checked for change.
 *
 * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */
function i18nInterpolation7(instructions, v0, v1, v2, v3, v4, v5, v6) {
    var viewData = _getViewData();
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    different = bindingUpdated3(viewData[BINDING_INDEX] + 4, v4, v5, v6) || different;
    viewData[BINDING_INDEX] += 7;
    if (!different) {
        return NO_CHANGE;
    }
    var res = '';
    for (var i = 0; i < instructions.length; i++) {
        // Odd indexes are bindings
        if (i & 1) {
            // Extract bits
            var idx = instructions[i];
            var b4 = idx & 4;
            var b2 = idx & 2;
            var b1 = idx & 1;
            // Get the value from the argument vx where x = idx
            var value = b4 ? (b2 ? v6 : (b1 ? v5 : v4)) : (b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0));
            res += stringify$1(value);
        }
        else {
            res += instructions[i];
        }
    }
    return res;
}
/**
 * Checks if the values of up to 8 expressions have changed and replaces them by their values in a
 * translation, or returns NO_CHANGE.
 *
 * @param instructions A list of instructions that will be used to translate an attribute.
 * @param v0 value checked for change.
 * @param v1 value checked for change.
 * @param v2 value checked for change.
 * @param v3 value checked for change.
 * @param v4 value checked for change.
 * @param v5 value checked for change.
 * @param v6 value checked for change.
 * @param v7 value checked for change.
 *
 * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */
function i18nInterpolation8(instructions, v0, v1, v2, v3, v4, v5, v6, v7) {
    var viewData = _getViewData();
    var different = bindingUpdated4(viewData[BINDING_INDEX], v0, v1, v2, v3);
    different = bindingUpdated4(viewData[BINDING_INDEX] + 4, v4, v5, v6, v7) || different;
    viewData[BINDING_INDEX] += 8;
    if (!different) {
        return NO_CHANGE;
    }
    var res = '';
    for (var i = 0; i < instructions.length; i++) {
        // Odd indexes are bindings
        if (i & 1) {
            // Extract bits
            var idx = instructions[i];
            var b4 = idx & 4;
            var b2 = idx & 2;
            var b1 = idx & 1;
            // Get the value from the argument vx where x = idx
            var value = b4 ? (b2 ? (b1 ? v7 : v6) : (b1 ? v5 : v4)) : (b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0));
            res += stringify$1(value);
        }
        else {
            res += instructions[i];
        }
    }
    return res;
}
/**
 * Create a translated interpolation binding with a variable number of expressions.
 *
 * If there are 1 to 8 expressions then `i18nInterpolation()` should be used instead. It is faster
 * because there is no need to create an array of expressions and iterate over it.
 *
 * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
 */
function i18nInterpolationV(instructions, values) {
    var viewData = _getViewData();
    var different = false;
    for (var i = 0; i < values.length; i++) {
        // Check if bindings have changed
        bindingUpdated(viewData[BINDING_INDEX]++, values[i]) && (different = true);
    }
    if (!different) {
        return NO_CHANGE;
    }
    var res = '';
    for (var i = 0; i < instructions.length; i++) {
        // Odd indexes are placeholders
        if (i & 1) {
            res += stringify$1(values[instructions[i]]);
        }
        else {
            res += instructions[i];
        }
    }
    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
 */
/**
 * An internal token whose presence in an injector indicates that the injector should treat itself
 * as a root scoped injector when processing requests for unknown tokens which may indicate
 * they are provided in the root scope.
 */
var APP_ROOT = new InjectionToken('The presence of this token marks an injector as being the root injector.');

/**
 * @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
 */
/**
 * Marker which indicates that a value has not yet been created from the factory function.
 */
var NOT_YET = {};
/**
 * Marker which indicates that the factory function for a token is in the process of being called.
 *
 * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates
 * injection of a dependency has recursively attempted to inject the original token, and there is
 * a circular dependency among the providers.
 */
var CIRCULAR$2 = {};
var EMPTY_ARRAY$1 = [];
/**
 * A lazily initialized NullInjector.
 */
var NULL_INJECTOR$2 = undefined;
function getNullInjector() {
    if (NULL_INJECTOR$2 === undefined) {
        NULL_INJECTOR$2 = new NullInjector();
    }
    return NULL_INJECTOR$2;
}
/**
 * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
 *
 * @publicApi
 */
function createInjector(defType, parent, additionalProviders) {
    if (parent === void 0) { parent = null; }
    if (additionalProviders === void 0) { additionalProviders = null; }
    parent = parent || getNullInjector();
    return new R3Injector(defType, additionalProviders, parent);
}
var R3Injector = /** @class */ (function () {
    function R3Injector(def, additionalProviders, parent) {
        var _this = this;
        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();
        /**
         * Flag indicating that this injector was previously destroyed.
         */
        this.destroyed = false;
        // Start off by creating Records for every provider declared in every InjectorType
        // included transitively in `def`.
        deepForEach([def], function (injectorDef) { return _this.processInjectorType(injectorDef, new Set()); });
        additionalProviders &&
            deepForEach(additionalProviders, function (provider) { return _this.processProvider(provider); });
        // 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(function (defType) { return _this.get(defType); });
    }
    /**
     * 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.
     */
    R3Injector.prototype.destroy = function () {
        this.assertNotDestroyed();
        // Set destroyed = true first, in case lifecycle hooks re-enter destroy().
        this.destroyed = true;
        try {
            // Call all the lifecycle hooks.
            this.onDestroy.forEach(function (service) { return service.ngOnDestroy(); });
        }
        finally {
            // Release all references.
            this.records.clear();
            this.onDestroy.clear();
            this.injectorDefTypes.clear();
        }
    };
    R3Injector.prototype.get = function (token, notFoundValue, flags) {
        if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }
        if (flags === void 0) { flags = 0 /* Default */; }
        this.assertNotDestroyed();
        // Set the injection context.
        var previousInjector = setCurrentInjector(this);
        try {
            // Check for the SkipSelf flag.
            if (!(flags & 4 /* SkipSelf */)) {
                // SkipSelf isn't set, check if the record belongs to this injector.
                var record = this.records.get(token);
                if (record === undefined) {
                    // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef
                    // with a scope matching this injector.
                    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 = injectableDefRecord(token);
                        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.
            var next = !(flags & 2 /* Self */) ? this.parent : getNullInjector();
            return this.parent.get(token, notFoundValue);
        }
        finally {
            // Lastly, clean up the state by restoring the previous injector.
            setCurrentInjector(previousInjector);
        }
    };
    R3Injector.prototype.assertNotDestroyed = function () {
        if (this.destroyed) {
            throw new Error('Injector has already been destroyed.');
        }
    };
    /**
     * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers
     * to this injector.
     */
    R3Injector.prototype.processInjectorType = function (defOrWrappedDef, parents) {
        var _this = this;
        defOrWrappedDef = resolveForwardRef(defOrWrappedDef);
        // 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.
        var def = getInjectorDef(defOrWrappedDef);
        // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.
        var ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;
        // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,
        // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type
        // is the `ngModule`.
        var defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;
        // If defOrWrappedType was an InjectorDefTypeWithProviders, then .providers may hold some
        // extra providers.
        var providers = (ngModule !== undefined) && defOrWrappedDef.providers ||
            EMPTY_ARRAY$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;
        }
        // Check for circular dependencies.
        if (parents.has(defType)) {
            throw new Error("Circular dependency: type " + stringify(defType) + " ends up importing itself.");
        }
        // Track the InjectorType and add a provider for it.
        this.injectorDefTypes.add(defType);
        this.records.set(defType, makeRecord(def.factory));
        // Add providers in the same way that @NgModule resolution did:
        // First, include providers from any imports.
        if (def.imports != null) {
            // 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.
            parents.add(defType);
            try {
                deepForEach(def.imports, function (imported) { return _this.processInjectorType(imported, parents); });
            }
            finally {
                // Remove it from the parents set when finished.
                parents.delete(defType);
            }
        }
        // Next, include providers listed on the definition itself.
        if (def.providers != null) {
            deepForEach(def.providers, function (provider) { return _this.processProvider(provider); });
        }
        // Finally, include providers from an InjectorDefTypeWithProviders if there was one.
        deepForEach(providers, function (provider) { return _this.processProvider(provider); });
    };
    /**
     * Process a `SingleProvider` and add it.
     */
    R3Injector.prototype.processProvider = function (provider) {
        // Determine the token from the provider. Either it's its own token, or has a {provide: ...}
        // property.
        provider = resolveForwardRef(provider);
        var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);
        // Construct a `Record` for the provider.
        var record = providerToRecord(provider);
        if (!isTypeProvider(provider) && provider.multi === true) {
            // If the provider indicates that it's a multi-provider, process it specially.
            // First check whether it's been defined already.
            var multiRecord_1 = this.records.get(token);
            if (multiRecord_1) {
                // It has. Throw a nice error if
                if (multiRecord_1.multi === undefined) {
                    throw new Error("Mixed multi-provider for " + token + ".");
                }
            }
            else {
                multiRecord_1 = makeRecord(undefined, NOT_YET, true);
                multiRecord_1.factory = function () { return injectArgs(multiRecord_1.multi); };
                this.records.set(token, multiRecord_1);
            }
            token = provider;
            multiRecord_1.multi.push(provider);
        }
        else {
            var existing = this.records.get(token);
            if (existing && existing.multi !== undefined) {
                throw new Error("Mixed multi-provider for " + stringify(token));
            }
        }
        this.records.set(token, record);
    };
    R3Injector.prototype.hydrate = function (token, record) {
        if (record.value === CIRCULAR$2) {
            throw new Error("Circular dep for " + stringify(token));
        }
        else if (record.value === NOT_YET) {
            record.value = CIRCULAR$2;
            record.value = record.factory();
        }
        if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {
            this.onDestroy.add(record.value);
        }
        return record.value;
    };
    R3Injector.prototype.injectableDefInScope = function (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);
        }
    };
    return R3Injector;
}());
function injectableDefRecord(token) {
    var injectableDef = getInjectableDef(token);
    if (injectableDef === null) {
        if (token instanceof InjectionToken) {
            throw new Error("Token " + stringify(token) + " is missing an ngInjectableDef definition.");
        }
        // TODO(alxhub): there should probably be a strict mode which throws here instead of assuming a
        // no-args constructor.
        return makeRecord(function () { return new token(); });
    }
    return makeRecord(injectableDef.factory);
}
function providerToRecord(provider) {
    var token = resolveForwardRef(provider);
    var value = NOT_YET;
    var factory = undefined;
    if (isTypeProvider(provider)) {
        return injectableDefRecord(provider);
    }
    else {
        token = resolveForwardRef(provider.provide);
        if (isValueProvider(provider)) {
            value = provider.useValue;
        }
        else if (isExistingProvider(provider)) {
            factory = function () { return inject(provider.useExisting); };
        }
        else if (isFactoryProvider(provider)) {
            factory = function () { return provider.useFactory.apply(provider, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(injectArgs(provider.deps || []))); };
        }
        else {
            var classRef_1 = provider.useClass || token;
            if (hasDeps(provider)) {
                factory = function () { return new ((classRef_1).bind.apply((classRef_1), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], injectArgs(provider.deps))))(); };
            }
            else {
                return injectableDefRecord(classRef_1);
            }
        }
    }
    return makeRecord(factory, value);
}
function makeRecord(factory, value, multi) {
    if (value === void 0) { value = NOT_YET; }
    if (multi === void 0) { multi = false; }
    return {
        factory: factory,
        value: value,
        multi: multi ? [] : undefined,
    };
}
function deepForEach(input, fn) {
    input.forEach(function (value) { return Array.isArray(value) ? deepForEach(value, fn) : fn(value); });
}
function isValueProvider(value) {
    return USE_VALUE in value;
}
function isExistingProvider(value) {
    return !!value.useExisting;
}
function isFactoryProvider(value) {
    return !!value.useFactory;
}
function isTypeProvider(value) {
    return typeof value === 'function';
}
function hasDeps(value) {
    return !!value.deps;
}
function hasOnDestroy(value) {
    return typeof value === 'object' && value != null && value.ngOnDestroy &&
        typeof value.ngOnDestroy === 'function';
}
function couldBeInjectableType(value) {
    return (typeof value === 'function') ||
        (typeof value === 'object' && value instanceof InjectionToken);
}

/**
 * @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_FACTORY_RESOLVER = {
    provide: ComponentFactoryResolver,
    useFactory: function () { return new ComponentFactoryResolver$1(); },
    deps: [],
};
var NgModuleRef$1 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgModuleRef$$1, _super);
    function NgModuleRef$$1(ngModuleType, parentInjector) {
        var _this = _super.call(this) || this;
        // tslint:disable-next-line:require-internal-with-underscore
        _this._bootstrapComponents = [];
        _this.destroyCbs = [];
        var ngModuleDef = getNgModuleDef(ngModuleType);
        ngDevMode && assertDefined(ngModuleDef, "NgModule '" + stringify(ngModuleType) + "' is not a subtype of 'NgModuleType'.");
        _this._bootstrapComponents = ngModuleDef.bootstrap;
        var additionalProviders = [
            COMPONENT_FACTORY_RESOLVER, {
                provide: NgModuleRef,
                useValue: _this,
            }
        ];
        _this.injector = createInjector(ngModuleType, parentInjector, additionalProviders);
        _this.instance = _this.injector.get(ngModuleType);
        _this.componentFactoryResolver = new ComponentFactoryResolver$1();
        return _this;
    }
    NgModuleRef$$1.prototype.destroy = function () {
        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
        this.destroyCbs.forEach(function (fn) { return fn(); });
        this.destroyCbs = null;
    };
    NgModuleRef$$1.prototype.onDestroy = function (callback) {
        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
        this.destroyCbs.push(callback);
    };
    return NgModuleRef$$1;
}(NgModuleRef));
var NgModuleFactory$1 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgModuleFactory$$1, _super);
    function NgModuleFactory$$1(moduleType) {
        var _this = _super.call(this) || this;
        _this.moduleType = moduleType;
        return _this;
    }
    NgModuleFactory$$1.prototype.create = function (parentInjector) {
        return new NgModuleRef$1(this.moduleType, parentInjector);
    };
    return NgModuleFactory$$1;
}(NgModuleFactory));

/**
 * @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
 */
/**
 * 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.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn Function that returns a value
 * @param thisArg Optional calling context of pureFn
 * @returns value
 */
function pureFunction0(slotOffset, pureFn, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    return getCreationMode() ?
        updateBinding(bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :
        getBinding(bindingIndex);
}
/**
 * If the value of the provided exp has changed, calls the pure function to return
 * an updated value. Or if the value has not changed, returns cached value.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn Function that returns an updated value
 * @param exp Updated expression value
 * @param thisArg Optional calling context of pureFn
 * @returns Updated or cached value
 */
function pureFunction1(slotOffset, pureFn, exp, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    return bindingUpdated(bindingIndex, exp) ?
        updateBinding(bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :
        getBinding(bindingIndex + 1);
}
/**
 * If the value of any provided exp has changed, calls the pure function to return
 * an updated value. Or if no values have changed, returns cached value.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn
 * @param exp1
 * @param exp2
 * @param thisArg Optional calling context of pureFn
 * @returns Updated or cached value
 */
function pureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    return bindingUpdated2(bindingIndex, exp1, exp2) ?
        updateBinding(bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :
        getBinding(bindingIndex + 2);
}
/**
 * If the value of any provided exp has changed, calls the pure function to return
 * an updated value. Or if no values have changed, returns cached value.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn
 * @param exp1
 * @param exp2
 * @param exp3
 * @param thisArg Optional calling context of pureFn
 * @returns Updated or cached value
 */
function pureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    return bindingUpdated3(bindingIndex, exp1, exp2, exp3) ?
        updateBinding(bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :
        getBinding(bindingIndex + 3);
}
/**
 * If the value of any provided exp has changed, calls the pure function to return
 * an updated value. Or if no values have changed, returns cached value.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn
 * @param exp1
 * @param exp2
 * @param exp3
 * @param exp4
 * @param thisArg Optional calling context of pureFn
 * @returns Updated or cached value
 */
function pureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    return bindingUpdated4(bindingIndex, exp1, exp2, exp3, exp4) ?
        updateBinding(bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :
        getBinding(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.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn
 * @param exp1
 * @param exp2
 * @param exp3
 * @param exp4
 * @param exp5
 * @param thisArg Optional calling context of pureFn
 * @returns Updated or cached value
 */
function pureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    var different = bindingUpdated4(bindingIndex, exp1, exp2, exp3, exp4);
    return bindingUpdated(bindingIndex + 4, exp5) || different ?
        updateBinding(bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :
            pureFn(exp1, exp2, exp3, exp4, exp5)) :
        getBinding(bindingIndex + 5);
}
/**
 * If the value of any provided exp has changed, calls the pure function to return
 * an updated value. Or if no values have changed, returns cached value.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn
 * @param exp1
 * @param exp2
 * @param exp3
 * @param exp4
 * @param exp5
 * @param exp6
 * @param thisArg Optional calling context of pureFn
 * @returns Updated or cached value
 */
function pureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    var different = bindingUpdated4(bindingIndex, exp1, exp2, exp3, exp4);
    return bindingUpdated2(bindingIndex + 4, exp5, exp6) || different ?
        updateBinding(bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :
            pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :
        getBinding(bindingIndex + 6);
}
/**
 * If the value of any provided exp has changed, calls the pure function to return
 * an updated value. Or if no values have changed, returns cached value.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn
 * @param exp1
 * @param exp2
 * @param exp3
 * @param exp4
 * @param exp5
 * @param exp6
 * @param exp7
 * @param thisArg Optional calling context of pureFn
 * @returns Updated or cached value
 */
function pureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    var different = bindingUpdated4(bindingIndex, exp1, exp2, exp3, exp4);
    return bindingUpdated3(bindingIndex + 4, exp5, exp6, exp7) || different ?
        updateBinding(bindingIndex + 7, thisArg ?
            pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :
            pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :
        getBinding(bindingIndex + 7);
}
/**
 * If the value of any provided exp has changed, calls the pure function to return
 * an updated value. Or if no values have changed, returns cached value.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn
 * @param exp1
 * @param exp2
 * @param exp3
 * @param exp4
 * @param exp5
 * @param exp6
 * @param exp7
 * @param exp8
 * @param thisArg Optional calling context of pureFn
 * @returns Updated or cached value
 */
function pureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    var different = bindingUpdated4(bindingIndex, exp1, exp2, exp3, exp4);
    return bindingUpdated4(bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?
        updateBinding(bindingIndex + 8, thisArg ?
            pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :
            pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :
        getBinding(bindingIndex + 8);
}
/**
 * pureFunction instruction that can support any number of bindings.
 *
 * If the value of any provided exp has changed, calls the pure function to return
 * an updated value. Or if no values have changed, returns cached value.
 *
 * @param slotOffset the offset from binding root to the reserved slot
 * @param pureFn A pure function that takes binding values and builds an object or array
 * containing those values.
 * @param exps An array of binding values
 * @param thisArg Optional calling context of pureFn
 * @returns Updated or cached value
 */
function pureFunctionV(slotOffset, pureFn, exps, thisArg) {
    // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
    var bindingIndex = getBindingRoot() + slotOffset;
    var different = false;
    for (var i = 0; i < exps.length; i++) {
        bindingUpdated(bindingIndex++, exps[i]) && (different = true);
    }
    return different ? updateBinding(bindingIndex, pureFn.apply(thisArg, exps)) :
        getBinding(bindingIndex);
}

/**
 * @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 pipe.
 *
 * @param index Pipe index where the pipe will be stored.
 * @param pipeName The name of the pipe
 * @returns T the instance of the pipe.
 */
function pipe(index, pipeName) {
    var tView = getTView();
    var pipeDef;
    var adjustedIndex = index + HEADER_OFFSET;
    if (tView.firstTemplatePass) {
        pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry);
        tView.data[adjustedIndex] = pipeDef;
        if (pipeDef.onDestroy) {
            (tView.pipeDestroyHooks || (tView.pipeDestroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);
        }
    }
    else {
        pipeDef = tView.data[adjustedIndex];
    }
    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.
 *
 * @param name Name of pipe to resolve
 * @param registry Full list of available pipes
 * @returns Matching PipeDef
 */
function getPipeDef$1(name, registry) {
    if (registry) {
        for (var i = 0; i < registry.length; i++) {
            var pipeDef = registry[i];
            if (name === pipeDef.name) {
                return pipeDef;
            }
        }
    }
    throw new Error("Pipe with name '" + name + "' not found!");
}
/**
 * Invokes a pipe with 1 arguments.
 *
 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
 * the pipe only when an input to the pipe changes.
 *
 * @param index Pipe index where the pipe was stored on creation.
 * @param slotOffset the offset in the reserved slot space
 * @param v1 1st argument to {@link PipeTransform#transform}.
 */
function pipeBind1(index, slotOffset, v1) {
    var pipeInstance = load(index);
    return 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.
 *
 * @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}.
 */
function pipeBind2(index, slotOffset, v1, v2) {
    var pipeInstance = load(index);
    return 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.
 *
 * @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}.
 */
function pipeBind3(index, slotOffset, v1, v2, v3) {
    var pipeInstance = load(index);
    return 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.
 *
 * @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}.
 */
function pipeBind4(index, slotOffset, v1, v2, v3, v4) {
    var pipeInstance = load(index);
    return 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.
 *
 * @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.
 */
function pipeBindV(index, slotOffset, values) {
    var pipeInstance = load(index);
    return isPure(index) ? pureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :
        pipeInstance.transform.apply(pipeInstance, values);
}
function isPure(index) {
    return getTView().data[index + HEADER_OFFSET].pure;
}

/**
 * @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
 */
/**
 * Use in directives and components to emit custom events synchronously
 * or asynchronously, and register handlers for those events by subscribing
 * to an instance.
 *
 * @usageNotes
 *
 * 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.
 *
 * ```
 * @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:
 *
 * ```
 * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
 * ```
 *
 * ### Notes
 *
 * Uses Rx.Observable but provides an adapter to make it work as specified here:
 * https://github.com/jhusain/observable-spec
 *
 * Once a reference implementation of the spec is available, switch to it.
 *
 * @publicApi
 */
var EventEmitter = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(EventEmitter, _super);
    /**
     * Creates an instance of this class that can
     * deliver events synchronously or asynchronously.
     *
     * @param isAsync When true, deliver events asynchronously.
     *
     */
    function EventEmitter(isAsync) {
        if (isAsync === void 0) { isAsync = false; }
        var _this = _super.call(this) || this;
        _this.__isAsync = isAsync;
        return _this;
    }
    /**
     * Emits an event containing a given value.
     * @param value The value to emit.
     */
    EventEmitter.prototype.emit = function (value) { _super.prototype.next.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.
     */
    EventEmitter.prototype.subscribe = function (generatorOrNext, error, complete) {
        var schedulerFn;
        var errorFn = function (err) { return null; };
        var completeFn = function () { return null; };
        if (generatorOrNext && typeof generatorOrNext === 'object') {
            schedulerFn = this.__isAsync ? function (value) {
                setTimeout(function () { return generatorOrNext.next(value); });
            } : function (value) { generatorOrNext.next(value); };
            if (generatorOrNext.error) {
                errorFn = this.__isAsync ? function (err) { setTimeout(function () { return generatorOrNext.error(err); }); } :
                    function (err) { generatorOrNext.error(err); };
            }
            if (generatorOrNext.complete) {
                completeFn = this.__isAsync ? function () { setTimeout(function () { return generatorOrNext.complete(); }); } :
                    function () { generatorOrNext.complete(); };
            }
        }
        else {
            schedulerFn = this.__isAsync ? function (value) { setTimeout(function () { return generatorOrNext(value); }); } :
                function (value) { generatorOrNext(value); };
            if (error) {
                errorFn =
                    this.__isAsync ? function (err) { setTimeout(function () { return error(err); }); } : function (err) { error(err); };
            }
            if (complete) {
                completeFn =
                    this.__isAsync ? function () { setTimeout(function () { return complete(); }); } : function () { complete(); };
            }
        }
        var sink = _super.prototype.subscribe.call(this, schedulerFn, errorFn, completeFn);
        if (generatorOrNext instanceof rxjs__WEBPACK_IMPORTED_MODULE_1__["Subscription"]) {
            generatorOrNext.add(sink);
        }
        return sink;
    };
    return EventEmitter;
}(rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]));

/**
 * @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 embedded template that can be used to instantiate embedded views.
 * To instantiate embedded views based on a template, use the `ViewContainerRef`
 * method `createEmbeddedView()`.
 *
 * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`
 * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view
 * is injected into the constructor of the directive,
 * using the `TemplateRef` token.
 *
 * You can also use a `Query` to find a `TemplateRef` associated with
 * a component or a directive.
 *
 * @see `ViewContainerRef`
 * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
 *
 * @publicApi
 */
var TemplateRef = /** @class */ (function () {
    function TemplateRef() {
    }
    /** @internal */
    TemplateRef.__NG_ELEMENT_ID__ = function () { return R3_TEMPLATE_REF_FACTORY$1(TemplateRef, ElementRef); };
    return TemplateRef;
}());

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

/**
 * @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 LQueries_ = /** @class */ (function () {
    function LQueries_(parent, shallow, deep) {
        this.parent = parent;
        this.shallow = shallow;
        this.deep = deep;
    }
    LQueries_.prototype.track = function (queryList, predicate, descend, read) {
        if (descend) {
            this.deep = createQuery(this.deep, queryList, predicate, read != null ? read : null);
        }
        else {
            this.shallow = createQuery(this.shallow, queryList, predicate, read != null ? read : null);
        }
    };
    LQueries_.prototype.clone = function () { return new LQueries_(this, null, this.deep); };
    LQueries_.prototype.container = function () {
        var shallowResults = copyQueriesToContainer(this.shallow);
        var deepResults = copyQueriesToContainer(this.deep);
        return shallowResults || deepResults ? new LQueries_(this, shallowResults, deepResults) : null;
    };
    LQueries_.prototype.createView = function () {
        var shallowResults = copyQueriesToView(this.shallow);
        var deepResults = copyQueriesToView(this.deep);
        return shallowResults || deepResults ? new LQueries_(this, shallowResults, deepResults) : null;
    };
    LQueries_.prototype.insertView = function (index) {
        insertView$1(index, this.shallow);
        insertView$1(index, this.deep);
    };
    LQueries_.prototype.addNode = function (tNode) {
        add(this.deep, tNode);
        if (isContentQueryHost(tNode)) {
            add(this.shallow, tNode);
            if (tNode.parent && isContentQueryHost(tNode.parent)) {
                // if node has a content query and parent also has a content query
                // both queries need to check this node for shallow matches
                add(this.parent.shallow, tNode);
            }
            return this.parent;
        }
        isRootNodeOfQuery(tNode) && add(this.shallow, tNode);
        return this;
    };
    LQueries_.prototype.removeView = function () {
        removeView$1(this.shallow);
        removeView$1(this.deep);
    };
    return LQueries_;
}());
function isRootNodeOfQuery(tNode) {
    return tNode.parent === null || isContentQueryHost(tNode.parent);
}
function copyQueriesToContainer(query) {
    var result = null;
    while (query) {
        var containerValues = []; // prepare room for views
        query.values.push(containerValues);
        var clonedQuery = {
            next: result,
            list: query.list,
            predicate: query.predicate,
            values: containerValues,
            containerValues: null
        };
        result = clonedQuery;
        query = query.next;
    }
    return result;
}
function copyQueriesToView(query) {
    var result = null;
    while (query) {
        var clonedQuery = {
            next: result,
            list: query.list,
            predicate: query.predicate,
            values: [],
            containerValues: query.values
        };
        result = clonedQuery;
        query = query.next;
    }
    return result;
}
function insertView$1(index, query) {
    while (query) {
        ngDevMode &&
            assertDefined(query.containerValues, 'View queries need to have a pointer to container values.');
        query.containerValues.splice(index, 0, query.values);
        query = query.next;
    }
}
function removeView$1(query) {
    while (query) {
        ngDevMode &&
            assertDefined(query.containerValues, 'View queries need to have a pointer to container values.');
        var containerValues = query.containerValues;
        var viewValuesIdx = containerValues.indexOf(query.values);
        var removed = containerValues.splice(viewValuesIdx, 1);
        // mark a query as dirty only when removed view had matching modes
        ngDevMode && assertEqual(removed.length, 1, 'removed.length');
        if (removed[0].length) {
            query.list.setDirty();
        }
        query = query.next;
    }
}
/**
 * Iterates over local names for a given node and returns directive index
 * (or -1 if a local name points to an element).
 *
 * @param tNode static data of a node to check
 * @param selector selector to match
 * @returns directive index, -1 or null if a selector didn't match any of the local names
 */
function getIdxOfMatchingSelector(tNode, selector) {
    var localNames = tNode.localNames;
    if (localNames) {
        for (var i = 0; i < localNames.length; i += 2) {
            if (localNames[i] === selector) {
                return localNames[i + 1];
            }
        }
    }
    return null;
}
/**
 * Iterates over all the directives for a node and returns index of a directive for a given type.
 *
 * @param tNode TNode on which directives are present.
 * @param currentView The view we are currently processing
 * @param type Type of a directive to look for.
 * @returns Index of a found directive or null when none found.
 */
function getIdxOfMatchingDirective(tNode, currentView, type) {
    var defs = currentView[TVIEW].data;
    if (defs) {
        var flags = tNode.flags;
        var count = flags & 4095 /* DirectiveCountMask */;
        var start = flags >> 15 /* DirectiveStartingIndexShift */;
        var end = start + count;
        for (var i = start; i < end; i++) {
            var def = defs[i];
            if (def.type === type && def.diPublic) {
                return i;
            }
        }
    }
    return null;
}
// TODO: "read" should be an AbstractType (FW-486)
function queryRead(tNode, currentView, read) {
    var factoryFn = read[NG_ELEMENT_ID];
    if (typeof factoryFn === 'function') {
        return factoryFn();
    }
    else {
        var matchingIdx = getIdxOfMatchingDirective(tNode, currentView, read);
        if (matchingIdx !== null) {
            return currentView[matchingIdx];
        }
    }
    return null;
}
function queryReadByTNodeType(tNode, currentView) {
    if (tNode.type === 3 /* Element */ || tNode.type === 4 /* ElementContainer */) {
        return createElementRef(ElementRef, tNode, currentView);
    }
    if (tNode.type === 0 /* Container */) {
        return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);
    }
    return null;
}
function add(query, tNode) {
    var currentView = _getViewData();
    while (query) {
        var predicate = query.predicate;
        var type = predicate.type;
        if (type) {
            // if read token and / or strategy is not specified, use type as read token
            var result = queryRead(tNode, currentView, predicate.read || type);
            if (result !== null) {
                addMatch(query, result);
            }
        }
        else {
            var selector = predicate.selector;
            for (var i = 0; i < selector.length; i++) {
                var directiveIdx = getIdxOfMatchingSelector(tNode, selector[i]);
                if (directiveIdx !== null) {
                    var result = null;
                    if (predicate.read) {
                        result = queryRead(tNode, currentView, predicate.read);
                    }
                    else {
                        if (directiveIdx > -1) {
                            result = currentView[directiveIdx];
                        }
                        else {
                            // if read token and / or strategy is not specified,
                            // detect it using appropriate tNode type
                            result = queryReadByTNodeType(tNode, currentView);
                        }
                    }
                    if (result !== null) {
                        addMatch(query, result);
                    }
                }
            }
        }
        query = query.next;
    }
}
function addMatch(query, matchingValue) {
    query.values.push(matchingValue);
    query.list.setDirty();
}
function createPredicate(predicate, read) {
    var isArray = Array.isArray(predicate);
    return {
        type: isArray ? null : predicate,
        selector: isArray ? predicate : null,
        read: read
    };
}
function createQuery(previous, queryList, predicate, read) {
    return {
        next: previous,
        list: queryList,
        predicate: createPredicate(predicate, read),
        values: queryList._valuesTree,
        containerValues: null
    };
}
var QueryList_ = /** @class */ (function () {
    function QueryList_() {
        this.dirty = true;
        this.changes = new EventEmitter();
        this._values = [];
        /** @internal */
        this._valuesTree = [];
    }
    Object.defineProperty(QueryList_.prototype, "length", {
        get: function () { return this._values.length; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryList_.prototype, "first", {
        get: function () {
            var values = this._values;
            return values.length ? values[0] : null;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryList_.prototype, "last", {
        get: function () {
            var values = this._values;
            return values.length ? values[values.length - 1] : null;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * See
     * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
     */
    QueryList_.prototype.map = function (fn) { return this._values.map(fn); };
    /**
     * See
     * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
     */
    QueryList_.prototype.filter = function (fn) {
        return this._values.filter(fn);
    };
    /**
     * See
     * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
     */
    QueryList_.prototype.find = function (fn) {
        return this._values.find(fn);
    };
    /**
     * See
     * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
     */
    QueryList_.prototype.reduce = function (fn, init) {
        return this._values.reduce(fn, init);
    };
    /**
     * See
     * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
     */
    QueryList_.prototype.forEach = function (fn) { this._values.forEach(fn); };
    /**
     * See
     * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
     */
    QueryList_.prototype.some = function (fn) {
        return this._values.some(fn);
    };
    QueryList_.prototype.toArray = function () { return this._values.slice(0); };
    QueryList_.prototype[getSymbolIterator()] = function () { return this._values[getSymbolIterator()](); };
    QueryList_.prototype.toString = function () { return this._values.toString(); };
    QueryList_.prototype.reset = function (res) {
        this._values = flatten(res);
        this.dirty = false;
    };
    QueryList_.prototype.notifyOnChanges = function () { this.changes.emit(this); };
    QueryList_.prototype.setDirty = function () { this.dirty = true; };
    QueryList_.prototype.destroy = function () {
        this.changes.complete();
        this.changes.unsubscribe();
    };
    return QueryList_;
}());
var QueryList = QueryList_;
/**
 * Creates and returns a QueryList.
 *
 * @param memoryIndex The index in memory where the QueryList should be saved. If null,
 * this is is a content query and the QueryList will be saved later through directiveCreate.
 * @param predicate The type for which the query will search
 * @param descend Whether or not to descend into children
 * @param read What to save in the query
 * @returns QueryList<T>
 */
function query(memoryIndex, predicate, descend, 
// TODO: "read" should be an AbstractType (FW-486)
read) {
    ngDevMode && assertPreviousIsParent();
    var queryList = new QueryList();
    var queries = getOrCreateCurrentQueries(LQueries_);
    queries.track(queryList, predicate, descend, read);
    storeCleanupWithContext(null, queryList, queryList.destroy);
    if (memoryIndex != null) {
        store(memoryIndex, queryList);
    }
    return queryList;
}
/**
 * Refreshes a query by combining matches from all active views and removing matches from deleted
 * views.
 * Returns true if a query got dirty during change detection, false otherwise.
 */
function queryRefresh(queryList) {
    var queryListImpl = queryList;
    if (queryList.dirty) {
        queryList.reset(queryListImpl._valuesTree);
        queryList.notifyOnChanges();
        return true;
    }
    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
 */
/**
 * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
 * `<ng-template>` element.
 */
function templateRefExtractor(tNode, currentView) {
    return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);
}

/**
 * @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
 */
var BRAND = '__SANITIZER_TRUSTED_BRAND__';
function allowSanitizationBypass(value, type) {
    return (value instanceof String && value[BRAND] === type) ? true : false;
}
/**
 * Mark `html` string as trusted.
 *
 * This function wraps the trusted string in `String` and brands it in a way which makes it
 * recognizable to {@link htmlSanitizer} to be trusted implicitly.
 *
 * @param trustedHtml `html` string which needs to be implicitly trusted.
 * @returns a `html` `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.
 * @returns 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.
 * @returns 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.
 * @returns 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.
 * @returns a `url` `String` which has been branded to be implicitly trusted.
 */
function bypassSanitizationTrustResourceUrl(trustedResourceUrl) {
    return bypassSanitizationTrustString(trustedResourceUrl, "ResourceUrl" /* ResourceUrl */);
}
function bypassSanitizationTrustString(trustedString, mode) {
    var trusted = 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;
}

/**
 * @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 = /** @class */ (function () {
    function InertBodyHelper(defaultDoc) {
        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.
            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
     */
    InertBodyHelper.prototype.getInertBodyElement_XHR = function (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 (e) {
            return null;
        }
        var xhr = new XMLHttpRequest();
        xhr.responseType = 'document';
        xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);
        xhr.send(undefined);
        var body = xhr.response.body;
        body.removeChild(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
     *
     */
    InertBodyHelper.prototype.getInertBodyElement_DOMParser = function (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 {
            var body = new window
                .DOMParser()
                .parseFromString(html, 'text/html')
                .body;
            body.removeChild(body.firstChild);
            return body;
        }
        catch (e) {
            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.
     */
    InertBodyHelper.prototype.getInertBodyElement_InertDocument = function (html) {
        // Prefer using <template> element if supported.
        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 (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.
     */
    InertBodyHelper.prototype.stripCustomNsAttrs = function (el) {
        var elAttrs = el.attributes;
        // loop backwards so that we can support removals.
        for (var i = elAttrs.length - 1; 0 < i; i--) {
            var attrib = elAttrs.item(i);
            var attrName = attrib.name;
            if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {
                el.removeAttribute(attrName);
            }
        }
        var childNode = el.firstChild;
        while (childNode) {
            if (childNode.nodeType === Node.ELEMENT_NODE)
                this.stripCustomNsAttrs(childNode);
            childNode = childNode.nextSibling;
        }
    };
    return InertBodyHelper;
}());
/**
 * 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}
 */
function isDOMParserAvailable() {
    try {
        return !!window.DOMParser;
    }
    catch (e) {
        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
 */
/**
 * 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 a protocol in a whitelist (http, https, mailto or ftp).
 * (2) or no protocol.  A protocol must be followed by a colon. The below
 *     allows that by allowing colons only after one of the characters [/?#].
 *     A colon after a hash (#) must be in the fragment.
 *     Otherwise, a colon after a (?) must be in a query.
 *     Otherwise, a colon after a single solidus (/) must be in a path.
 *     Otherwise, a colon after a double solidus (//) must be in the authority
 *     (before port).
 *
 * The pattern disallows &, used in HTML entity declarations before
 * one of the characters in [/?#]. This disallows HTML entities used in the
 * protocol name, which should never happen, e.g. "h&#116;tp" for "http".
 * It also disallows HTML entities in the first path part of a relative path,
 * e.g. "foo&lt;bar/baz".  Our existing escaping functions should not produce
 * that. More importantly, it disallows masking of a colon,
 * e.g. "javascript&#58;...".
 *
 * This regular expression was taken from the Closure sanitization library.
 */
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
/** A pattern that matches safe data URLs. Only matches image, video and audio types. */
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;
function _sanitizeUrl(url) {
    url = String(url);
    if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN))
        return url;
    if (isDevMode()) {
        console.warn("WARNING: sanitizing unsafe URL value " + url + " (see http://g.co/ng/security#xss)");
    }
    return 'unsafe:' + url;
}
function sanitizeSrcset(srcset) {
    srcset = String(srcset);
    return srcset.split(',').map(function (srcset) { return _sanitizeUrl(srcset.trim()); }).join(', ');
}

/**
 * @license
 * Copyright Google 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 tagSet(tags) {
    var e_1, _a;
    var res = {};
    try {
        for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(tags.split(',')), _c = _b.next(); !_c.done; _c = _b.next()) {
            var t = _c.value;
            res[t] = true;
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
        }
        finally { if (e_1) throw e_1.error; }
    }
    return res;
}
function merge$1() {
    var sets = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        sets[_i] = arguments[_i];
    }
    var e_2, _a;
    var res = {};
    try {
        for (var sets_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(sets), sets_1_1 = sets_1.next(); !sets_1_1.done; sets_1_1 = sets_1.next()) {
            var s = sets_1_1.value;
            for (var v in s) {
                if (s.hasOwnProperty(v))
                    res[v] = true;
            }
        }
    }
    catch (e_2_1) { e_2 = { error: e_2_1 }; }
    finally {
        try {
            if (sets_1_1 && !sets_1_1.done && (_a = sets_1.return)) _a.call(sets_1);
        }
        finally { if (e_2) throw e_2.error; }
    }
    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
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
var OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');
var OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');
var OPTIONAL_END_TAG_ELEMENTS = merge$1(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);
// Safe Block Elements - HTML5
var BLOCK_ELEMENTS = merge$1(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' +
    'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +
    'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));
// Inline Elements - HTML5
var INLINE_ELEMENTS = merge$1(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' +
    'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +
    'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));
var VALID_ELEMENTS = merge$1(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);
// Attributes that have href and hence need to be sanitized
var URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');
// Attributes that have special href set hence need to be sanitized
var SRCSET_ATTRS = tagSet('srcset');
var HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +
    'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +
    'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +
    'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +
    'valign,value,vspace,width');
// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security
// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via
// innerHTML is required, SVG attributes should be added here.
// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those
// can be sanitized, but they increase security surface area without a legitimate use case, so they
// are left out here.
var VALID_ATTRS = merge$1(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS);
/**
 * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe
 * attributes.
 */
var SanitizingHtmlSerializer = /** @class */ (function () {
    function SanitizingHtmlSerializer() {
        // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just
        // because characters were re-encoded.
        this.sanitizedSomething = false;
        this.buf = [];
    }
    SanitizingHtmlSerializer.prototype.sanitizeChildren = function (el) {
        // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.
        // However this code never accesses properties off of `document` before deleting its contents
        // again, so it shouldn't be vulnerable to DOM clobbering.
        var current = el.firstChild;
        while (current) {
            if (current.nodeType === Node.ELEMENT_NODE) {
                this.startElement(current);
            }
            else if (current.nodeType === Node.TEXT_NODE) {
                this.chars(current.nodeValue);
            }
            else {
                // Strip non-element, non-text nodes.
                this.sanitizedSomething = true;
            }
            if (current.firstChild) {
                current = current.firstChild;
                continue;
            }
            while (current) {
                // Leaving the element. Walk up and to the right, closing tags as we go.
                if (current.nodeType === Node.ELEMENT_NODE) {
                    this.endElement(current);
                }
                var next = this.checkClobberedElement(current, current.nextSibling);
                if (next) {
                    current = next;
                    break;
                }
                current = this.checkClobberedElement(current, current.parentNode);
            }
        }
        return this.buf.join('');
    };
    SanitizingHtmlSerializer.prototype.startElement = function (element) {
        var tagName = element.nodeName.toLowerCase();
        if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {
            this.sanitizedSomething = true;
            return;
        }
        this.buf.push('<');
        this.buf.push(tagName);
        var elAttrs = element.attributes;
        for (var i = 0; i < elAttrs.length; i++) {
            var elAttr = elAttrs.item(i);
            var attrName = elAttr.name;
            var lower = attrName.toLowerCase();
            if (!VALID_ATTRS.hasOwnProperty(lower)) {
                this.sanitizedSomething = true;
                continue;
            }
            var value = elAttr.value;
            // TODO(martinprobst): Special case image URIs for data:image/...
            if (URI_ATTRS[lower])
                value = _sanitizeUrl(value);
            if (SRCSET_ATTRS[lower])
                value = sanitizeSrcset(value);
            this.buf.push(' ', attrName, '="', encodeEntities(value), '"');
        }
        this.buf.push('>');
    };
    SanitizingHtmlSerializer.prototype.endElement = function (current) {
        var tagName = current.nodeName.toLowerCase();
        if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {
            this.buf.push('</');
            this.buf.push(tagName);
            this.buf.push('>');
        }
    };
    SanitizingHtmlSerializer.prototype.chars = function (chars) { this.buf.push(encodeEntities(chars)); };
    SanitizingHtmlSerializer.prototype.checkClobberedElement = function (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: " + node.outerHTML);
        }
        return nextNode;
    };
    return SanitizingHtmlSerializer;
}());
// Regular Expressions for parsing tags and attributes
var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
// ! to ~ is the ASCII range.
var NON_ALPHANUMERIC_REGEXP = /([^\#-~ |!])/g;
/**
 * Escapes all potentially dangerous characters, so that the
 * resulting string can be safely inserted into attribute or
 * element text.
 * @param value
 */
function encodeEntities(value) {
    return value.replace(/&/g, '&amp;')
        .replace(SURROGATE_PAIR_REGEXP, function (match) {
        var hi = match.charCodeAt(0);
        var low = match.charCodeAt(1);
        return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';
    })
        .replace(NON_ALPHANUMERIC_REGEXP, function (match) { return '&#' + match.charCodeAt(0) + ';'; })
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;');
}
var inertBodyHelper;
/**
 * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
 * the DOM in a browser environment.
 */
function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {
    var inertBodyElement = null;
    try {
        inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc);
        // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).
        var unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';
        inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);
        // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser
        // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.
        var mXSSAttempts = 5;
        var parsedHtml = unsafeHtml;
        do {
            if (mXSSAttempts === 0) {
                throw new Error('Failed to sanitize html because the input is unstable');
            }
            mXSSAttempts--;
            unsafeHtml = parsedHtml;
            parsedHtml = inertBodyElement.innerHTML;
            inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);
        } while (unsafeHtml !== parsedHtml);
        var sanitizer = new SanitizingHtmlSerializer();
        var safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);
        if (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) {
            var parent_1 = getTemplateContent(inertBodyElement) || inertBodyElement;
            while (parent_1.firstChild) {
                parent_1.removeChild(parent_1.firstChild);
            }
        }
    }
}
function getTemplateContent(el) {
    return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?
        el.content :
        null;
}
function isTemplateElement(el) {
    return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';
}

/**
 * @license
 * Copyright Google 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 SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
 * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
 * handled.
 *
 * See DomSanitizer for more details on security in Angular applications.
 *
 * @publicApi
 */
var SecurityContext;
(function (SecurityContext) {
    SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
    SecurityContext[SecurityContext["HTML"] = 1] = "HTML";
    SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE";
    SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT";
    SecurityContext[SecurityContext["URL"] = 4] = "URL";
    SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL";
})(SecurityContext || (SecurityContext = {}));
/**
 * Sanitizer is used by the views to sanitize potentially dangerous values.
 *
 * @publicApi
 */
var Sanitizer = /** @class */ (function () {
    function Sanitizer() {
    }
    return 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
 */
/**
 * 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.
 */
var VALUES = '[-,."\'%_!# a-zA-Z0-9]+';
var TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?';
var COLOR_FNS = '(?:rgb|hsl)a?';
var GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';
var CSS3_FNS = '(?:calc|attr)';
var FN_ARGS = '\\([-0-9.%, #a-zA-Z]+\\)';
var SAFE_STYLE_VALUE = new RegExp("^(" + VALUES + "|" +
    ("(?:" + TRANSFORMATION_FNS + "|" + COLOR_FNS + "|" + GRADIENTS + "|" + CSS3_FNS + ")") +
    (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.
 */
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.
 */
function hasBalancedQuotes(value) {
    var outsideSingle = true;
    var outsideDouble = true;
    for (var i = 0; i < value.length; i++) {
        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.
 */
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.
    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 " + value + " (see http://g.co/ng/security#xss).");
    }
    return 'unsafe';
}

/**
 * @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 `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
 * dangerous content.
 *
 * This method parses the `html` and locates potentially dangerous content (such as urls and
 * javascript) and removes it.
 *
 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
 *
 * @param unsafeHtml untrusted `html`, typically from the user.
 * @returns `html` string which is safe to display to user, because all of the dangerous javascript
 * and urls have been removed.
 */
function sanitizeHtml(unsafeHtml) {
    var s = getCurrentSanitizer();
    if (s) {
        return s.sanitize(SecurityContext.HTML, unsafeHtml) || '';
    }
    if (allowSanitizationBypass(unsafeHtml, "Html" /* Html */)) {
        return unsafeHtml.toString();
    }
    return _sanitizeHtml(document, stringify$1(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}.
 *
 * @param unsafeStyle untrusted `style`, typically from the user.
 * @returns `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) {
    var s = getCurrentSanitizer();
    if (s) {
        return s.sanitize(SecurityContext.STYLE, unsafeStyle) || '';
    }
    if (allowSanitizationBypass(unsafeStyle, "Style" /* Style */)) {
        return unsafeStyle.toString();
    }
    return _sanitizeStyle(stringify$1(unsafeStyle));
}
/**
 * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
 * dangerous
 * content.
 *
 * This method parses the `url` and locates potentially dangerous content (such as javascript) and
 * removes it.
 *
 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
 *
 * @param unsafeUrl untrusted `url`, typically from the user.
 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
 * all of the dangerous javascript has been removed.
 */
function sanitizeUrl(unsafeUrl) {
    var s = getCurrentSanitizer();
    if (s) {
        return s.sanitize(SecurityContext.URL, unsafeUrl) || '';
    }
    if (allowSanitizationBypass(unsafeUrl, "Url" /* Url */)) {
        return unsafeUrl.toString();
    }
    return _sanitizeUrl(stringify$1(unsafeUrl));
}
/**
 * A `url` sanitizer which only lets trusted `url`s through.
 *
 * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
 *
 * @param unsafeResourceUrl untrusted `url`, typically from the user.
 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
 * only trusted `url`s have been allowed to pass.
 */
function sanitizeResourceUrl(unsafeResourceUrl) {
    var s = getCurrentSanitizer();
    if (s) {
        return s.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}.
 *
 * @param unsafeScript untrusted `script`, typically from the user.
 * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
 * because only trusted `scripts`s have been allowed to pass.
 */
function sanitizeScript(unsafeScript) {
    var s = getCurrentSanitizer();
    if (s) {
        return s.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';
    }
    if (allowSanitizationBypass(unsafeScript, "Script" /* Script */)) {
        return unsafeScript.toString();
    }
    throw new Error('unsafe value used in a script context');
}
/**
 * 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)
 */
var defaultStyleSanitizer = function (prop, value) {
    if (value === undefined) {
        return prop === 'background-image' || prop === 'background' || prop === 'border-image' ||
            prop === 'filter' || prop === 'filter' || prop === 'list-style' ||
            prop === 'list-style-image';
    }
    return sanitizeStyle(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
 */
/**
 * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.
 *
 * This should be kept up to date with the public exports of @angular/core.
 */
var angularCoreEnv = {
    'ɵdefineBase': defineBase,
    'ɵdefineComponent': defineComponent,
    'ɵdefineDirective': defineDirective,
    'defineInjectable': defineInjectable,
    'defineInjector': defineInjector,
    'ɵdefineNgModule': defineNgModule,
    'ɵdefinePipe': definePipe,
    'ɵdirectiveInject': directiveInject,
    'ɵgetFactoryOf': getFactoryOf,
    'ɵgetInheritedFactory': getInheritedFactory,
    'inject': inject,
    'ɵinjectAttribute': injectAttribute,
    'ɵtemplateRefExtractor': templateRefExtractor,
    'ɵNgOnChangesFeature': NgOnChangesFeature,
    'ɵPublicFeature': PublicFeature,
    'ɵInheritDefinitionFeature': InheritDefinitionFeature,
    'ɵelementAttribute': elementAttribute,
    'ɵbind': bind,
    'ɵcontainer': container,
    'ɵnextContext': nextContext,
    'ɵcontainerRefreshStart': containerRefreshStart,
    'ɵcontainerRefreshEnd': containerRefreshEnd,
    'ɵloadQueryList': loadQueryList,
    'ɵnamespaceHTML': namespaceHTML,
    'ɵnamespaceMathML': namespaceMathML,
    'ɵnamespaceSVG': namespaceSVG,
    'ɵenableBindings': enableBindings,
    'ɵdisableBindings': disableBindings,
    'ɵelementStart': elementStart,
    'ɵelementEnd': elementEnd,
    'ɵelement': element,
    'ɵEC': elementContainerStart,
    'ɵeC': elementContainerEnd,
    'ɵpureFunction0': pureFunction0,
    'ɵpureFunction1': pureFunction1,
    'ɵpureFunction2': pureFunction2,
    'ɵpureFunction3': pureFunction3,
    'ɵpureFunction4': pureFunction4,
    'ɵpureFunction5': pureFunction5,
    'ɵpureFunction6': pureFunction6,
    'ɵpureFunction7': pureFunction7,
    'ɵpureFunction8': pureFunction8,
    'ɵpureFunctionV': pureFunctionV,
    'ɵgetCurrentView': getCurrentView,
    'ɵrestoreView': restoreView,
    'ɵinterpolation1': interpolation1,
    'ɵinterpolation2': interpolation2,
    'ɵinterpolation3': interpolation3,
    'ɵinterpolation4': interpolation4,
    'ɵinterpolation5': interpolation5,
    'ɵinterpolation6': interpolation6,
    'ɵinterpolation7': interpolation7,
    'ɵinterpolation8': interpolation8,
    'ɵinterpolationV': interpolationV,
    'ɵelementClassProp': elementClassProp,
    'ɵlistener': listener,
    'ɵload': load,
    'ɵprojection': projection,
    'ɵelementProperty': elementProperty,
    'ɵpipeBind1': pipeBind1,
    'ɵpipeBind2': pipeBind2,
    'ɵpipeBind3': pipeBind3,
    'ɵpipeBind4': pipeBind4,
    'ɵpipeBindV': pipeBindV,
    'ɵprojectionDef': projectionDef,
    'ɵpipe': pipe,
    'ɵquery': query,
    'ɵqueryRefresh': queryRefresh,
    'ɵregisterContentQuery': registerContentQuery,
    'ɵreference': reference,
    'ɵelementStyling': elementStyling,
    'ɵelementStylingMap': elementStylingMap,
    'ɵelementStyleProp': elementStyleProp,
    'ɵelementStylingApply': elementStylingApply,
    'ɵtemplate': template,
    'ɵtext': text,
    'ɵtextBinding': textBinding,
    'ɵembeddedViewStart': embeddedViewStart,
    'ɵembeddedViewEnd': embeddedViewEnd,
    'ɵi18nAttribute': i18nAttribute,
    'ɵi18nExp': i18nExp,
    'ɵi18nStart': i18nStart,
    'ɵi18nEnd': i18nEnd,
    'ɵi18nApply': i18nApply,
    'ɵsanitizeHtml': sanitizeHtml,
    'ɵsanitizeStyle': sanitizeStyle,
    'ɵdefaultStyleSanitizer': defaultStyleSanitizer,
    'ɵsanitizeResourceUrl': sanitizeResourceUrl,
    'ɵsanitizeScript': sanitizeScript,
    'ɵsanitizeUrl': sanitizeUrl
};

/**
 * @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 _reflect = null;
function getReflect() {
    return (_reflect = _reflect || new ReflectionCapabilities());
}
function reflectDependencies(type) {
    return convertDependencies(getReflect().parameters(type));
}
function convertDependencies(deps) {
    var compiler = getCompilerFacade();
    return deps.map(function (dep) { return reflectDependency(compiler, dep); });
}
function reflectDependency(compiler, dep) {
    var meta = {
        token: null,
        host: false,
        optional: false,
        resolved: compiler.R3ResolvedDependencyType.Token,
        self: false,
        skipSelf: false,
    };
    function setTokenAndResolvedType(token) {
        meta.resolved = compiler.R3ResolvedDependencyType.Token;
        meta.token = token;
    }
    if (Array.isArray(dep)) {
        if (dep.length === 0) {
            throw new Error('Dependency array must have arguments.');
        }
        for (var j = 0; j < dep.length; j++) {
            var param = dep[j];
            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 {
                setTokenAndResolvedType(param);
            }
        }
    }
    else {
        setTokenAndResolvedType(dep);
    }
    return meta;
}

/**
 * @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$2 = [];
/**
 * Compiles a module in JIT mode.
 *
 * This function automatically gets called when a class has a `@NgModule` decorator.
 */
function compileNgModule(moduleType, ngModule) {
    compileNgModuleDefs(moduleType, ngModule);
    setScopeOnDeclaredComponents(moduleType, ngModule);
}
/**
 * Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.
 */
function compileNgModuleDefs(moduleType, ngModule) {
    var declarations = flatten$1(ngModule.declarations || EMPTY_ARRAY$2);
    var ngModuleDef = null;
    Object.defineProperty(moduleType, NG_MODULE_DEF, {
        configurable: true,
        get: function () {
            if (ngModuleDef === null) {
                ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, "ng://" + moduleType.name + "/ngModuleDef.js", {
                    type: moduleType,
                    bootstrap: flatten$1(ngModule.bootstrap || EMPTY_ARRAY$2),
                    declarations: declarations,
                    imports: flatten$1(ngModule.imports || EMPTY_ARRAY$2).map(expandModuleWithProviders),
                    exports: flatten$1(ngModule.exports || EMPTY_ARRAY$2).map(expandModuleWithProviders),
                    emitInline: true,
                });
            }
            return ngModuleDef;
        }
    });
    var ngInjectorDef = null;
    Object.defineProperty(moduleType, NG_INJECTOR_DEF, {
        get: function () {
            if (ngInjectorDef === null) {
                var meta = {
                    name: moduleType.name,
                    type: moduleType,
                    deps: reflectDependencies(moduleType),
                    providers: ngModule.providers || EMPTY_ARRAY$2,
                    imports: [
                        ngModule.imports || EMPTY_ARRAY$2,
                        ngModule.exports || EMPTY_ARRAY$2,
                    ],
                };
                ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, "ng://" + moduleType.name + "/ngInjectorDef.js", meta);
            }
            return ngInjectorDef;
        },
        // Make the property configurable in dev mode to allow overriding in tests
        configurable: !!ngDevMode,
    });
}
/**
 * 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.
 */
function setScopeOnDeclaredComponents(moduleType, ngModule) {
    var declarations = flatten$1(ngModule.declarations || EMPTY_ARRAY$2);
    var transitiveScopes = transitiveScopesFor(moduleType);
    declarations.forEach(function (declaration) {
        if (declaration.hasOwnProperty(NG_COMPONENT_DEF)) {
            // An `ngComponentDef` field exists - go ahead and patch the component directly.
            var component = declaration;
            var componentDef = 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.
            declaration.ngSelectorScope = moduleType;
        }
    });
}
/**
 * Patch the definition of a component with directives and pipes from the compilation scope of
 * a given module.
 */
function patchComponentDefWithScope(componentDef, transitiveScopes) {
    componentDef.directiveDefs = function () { return Array.from(transitiveScopes.compilation.directives)
        .map(function (dir) { return getDirectiveDef(dir) || getComponentDef(dir); })
        .filter(function (def) { return !!def; }); };
    componentDef.pipeDefs = function () {
        return Array.from(transitiveScopes.compilation.pipes).map(function (pipe) { return getPipeDef(pipe); });
    };
}
/**
 * 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.
 */
function transitiveScopesFor(moduleType) {
    if (!isNgModule(moduleType)) {
        throw new Error(moduleType.name + " does not have an ngModuleDef");
    }
    var def = getNgModuleDef(moduleType);
    if (def.transitiveCompileScopes !== null) {
        return def.transitiveCompileScopes;
    }
    var scopes = {
        compilation: {
            directives: new Set(),
            pipes: new Set(),
        },
        exported: {
            directives: new Set(),
            pipes: new Set(),
        },
    };
    def.declarations.forEach(function (declared) {
        var declaredWithDefs = 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);
        }
    });
    def.imports.forEach(function (imported) {
        var importedTyped = imported;
        if (!isNgModule(importedTyped)) {
            throw new Error("Importing " + importedTyped.name + " which does not have an ngModuleDef");
        }
        // When this module imports another, the imported module's exported directives and pipes are
        // added to the compilation scope of this module.
        var importedScope = transitiveScopesFor(importedTyped);
        importedScope.exported.directives.forEach(function (entry) { return scopes.compilation.directives.add(entry); });
        importedScope.exported.pipes.forEach(function (entry) { return scopes.compilation.pipes.add(entry); });
    });
    def.exports.forEach(function (exported) {
        var exportedTyped = 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(exportedTyped)) {
            // When this module exports another, the exported module's exported directives and pipes are
            // added to both the compilation and exported scopes of this module.
            var exportedScope = transitiveScopesFor(exportedTyped);
            exportedScope.exported.directives.forEach(function (entry) {
                scopes.compilation.directives.add(entry);
                scopes.exported.directives.add(entry);
            });
            exportedScope.exported.pipes.forEach(function (entry) {
                scopes.compilation.pipes.add(entry);
                scopes.exported.pipes.add(entry);
            });
        }
        else if (getNgModuleDef(exportedTyped)) {
            scopes.exported.pipes.add(exportedTyped);
        }
        else {
            scopes.exported.directives.add(exportedTyped);
        }
    });
    def.transitiveCompileScopes = scopes;
    return scopes;
}
function flatten$1(values) {
    var out = [];
    values.forEach(function (value) {
        if (Array.isArray(value)) {
            out.push.apply(out, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(flatten$1(value)));
        }
        else {
            out.push(value);
        }
    });
    return out;
}
function expandModuleWithProviders(value) {
    if (isModuleWithProviders(value)) {
        return value.ngModule;
    }
    return value;
}
function isModuleWithProviders(value) {
    return value.ngModule !== undefined;
}
function isNgModule(value) {
    return !!getNgModuleDef(value);
}

/**
 * @license
 * Copyright Google 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
 */
/**
 * 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`.
 */
function compileComponent(type, metadata) {
    var ngComponentDef = null;
    // Metadata may have resources which need to be resolved.
    maybeQueueResolutionOfComponentResources(metadata);
    Object.defineProperty(type, NG_COMPONENT_DEF, {
        get: function () {
            var compiler = getCompilerFacade();
            if (ngComponentDef === null) {
                if (componentNeedsResolution(metadata)) {
                    var error = ["Component '" + stringify(type) + "' is not resolved:"];
                    if (metadata.templateUrl) {
                        error.push(" - templateUrl: " + stringify(metadata.templateUrl));
                    }
                    if (metadata.styleUrls && metadata.styleUrls.length) {
                        error.push(" - styleUrls: " + JSON.stringify(metadata.styleUrls));
                    }
                    error.push("Did you run and wait for 'resolveComponentResources()'?");
                    throw new Error(error.join('\n'));
                }
                var meta = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, directiveMetadata(type, metadata), { template: metadata.template || '', preserveWhitespaces: metadata.preserveWhitespaces || false, styles: metadata.styles || EMPTY_ARRAY, animations: metadata.animations, viewQueries: extractQueriesMetadata(getReflect().propMetadata(type), isViewQuery), directives: new Map(), pipes: new Map(), encapsulation: metadata.encapsulation || ViewEncapsulation.Emulated, viewProviders: metadata.viewProviders || null });
                ngComponentDef = compiler.compileComponent(angularCoreEnv, "ng://" + stringify(type) + "/template.html", meta);
                // If component compilation is async, then the @NgModule annotation which declares the
                // component may execute and set an ngSelectorScope property on the component type. This
                // allows the component to patch itself with directiveDefs from the module after it
                // finishes compiling.
                if (hasSelectorScope(type)) {
                    var scopes = transitiveScopesFor(type.ngSelectorScope);
                    patchComponentDefWithScope(ngComponentDef, scopes);
                }
            }
            return ngComponentDef;
        },
        // Make the property configurable in dev mode to allow overriding in tests
        configurable: !!ngDevMode,
    });
}
function hasSelectorScope(component) {
    return component.ngSelectorScope !== undefined;
}
/**
 * Compile an Angular directive according to its decorator metadata, and patch the resulting
 * 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.
 */
function compileDirective(type, directive) {
    var ngDirectiveDef = null;
    Object.defineProperty(type, NG_DIRECTIVE_DEF, {
        get: function () {
            if (ngDirectiveDef === null) {
                var facade = directiveMetadata(type, directive);
                ngDirectiveDef = getCompilerFacade().compileDirective(angularCoreEnv, "ng://" + (type && type.name) + "/ngDirectiveDef.js", facade);
            }
            return ngDirectiveDef;
        },
        // Make the property configurable in dev mode to allow overriding in tests
        configurable: !!ngDevMode,
    });
}
function extendsDirectlyFromObject(type) {
    return Object.getPrototypeOf(type.prototype) === Object.prototype;
}
/**
 * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a
 * `Component`).
 */
function directiveMetadata(type, metadata) {
    // Reflect inputs and outputs.
    var propMetadata = getReflect().propMetadata(type);
    return {
        name: type.name,
        type: type,
        typeArgumentCount: 0,
        selector: metadata.selector,
        deps: reflectDependencies(type),
        host: metadata.host || EMPTY_OBJ$1,
        propMetadata: propMetadata,
        inputs: metadata.inputs || EMPTY_ARRAY,
        outputs: metadata.outputs || EMPTY_ARRAY,
        queries: extractQueriesMetadata(propMetadata, isContentQuery),
        lifecycle: {
            usesOnChanges: type.prototype.ngOnChanges !== undefined,
        },
        typeSourceSpan: null,
        usesInheritance: !extendsDirectlyFromObject(type),
        exportAs: metadata.exportAs || null,
        providers: metadata.providers || null,
    };
}
var EMPTY_OBJ$1 = {};
function convertToR3QueryPredicate(selector) {
    return typeof selector === 'string' ? splitByComma(selector) : selector;
}
function convertToR3QueryMetadata(propertyName, ann) {
    return {
        propertyName: propertyName,
        predicate: convertToR3QueryPredicate(ann.selector),
        descendants: ann.descendants,
        first: ann.first,
        read: ann.read ? ann.read : null
    };
}
function extractQueriesMetadata(propMetadata, isQueryAnn) {
    var queriesMeta = [];
    var _loop_1 = function (field) {
        if (propMetadata.hasOwnProperty(field)) {
            propMetadata[field].forEach(function (ann) {
                if (isQueryAnn(ann)) {
                    queriesMeta.push(convertToR3QueryMetadata(field, ann));
                }
            });
        }
    };
    for (var field in propMetadata) {
        _loop_1(field);
    }
    return queriesMeta;
}
function isContentQuery(value) {
    var name = value.ngMetadataName;
    return name === 'ContentChild' || name === 'ContentChildren';
}
function isViewQuery(value) {
    var name = value.ngMetadataName;
    return name === 'ViewChild' || name === 'ViewChildren';
}
function splitByComma(value) {
    return value.split(',').map(function (piece) { return piece.trim(); });
}

/**
 * @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
 */
/**
 * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting
 * `ngInjectableDef` onto the injectable type.
 */
function compileInjectable(type, srcMeta) {
    var def = null;
    Object.defineProperty(type, NG_INJECTABLE_DEF, {
        get: function () {
            if (def === null) {
                var meta_1 = srcMeta || { providedIn: null };
                var hasAProvider = isUseClassProvider(meta_1) || isUseFactoryProvider(meta_1) ||
                    isUseValueProvider(meta_1) || isUseExistingProvider(meta_1);
                var compilerMeta = {
                    name: type.name,
                    type: type,
                    providedIn: meta_1.providedIn,
                    ctorDeps: reflectDependencies(type),
                    userDeps: undefined
                };
                if ((isUseClassProvider(meta_1) || isUseFactoryProvider(meta_1)) && meta_1.deps !== undefined) {
                    compilerMeta.userDeps = convertDependencies(meta_1.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_1)) {
                    // The user explicitly specified useClass, and may or may not have provided deps.
                    compilerMeta.useClass = meta_1.useClass;
                }
                else if (isUseValueProvider(meta_1)) {
                    // The user explicitly specified useValue.
                    compilerMeta.useValue = meta_1.useValue;
                }
                else if (isUseFactoryProvider(meta_1)) {
                    // The user explicitly specified useFactory.
                    compilerMeta.useFactory = meta_1.useFactory;
                }
                else if (isUseExistingProvider(meta_1)) {
                    // The user explicitly specified useExisting.
                    compilerMeta.useExisting = meta_1.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(angularCoreEnv, "ng://" + type.name + "/ngInjectableDef.js", compilerMeta);
            }
            return def;
        },
    });
}
var ɵ0$1 = getClosureSafeProperty;
var USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: ɵ0$1 });
function isUseClassProvider(meta) {
    return meta.useClass !== undefined;
}
function isUseValueProvider(meta) {
    return USE_VALUE$1 in meta;
}
function isUseFactoryProvider(meta) {
    return meta.useFactory !== undefined;
}
function isUseExistingProvider(meta) {
    return meta.useExisting !== undefined;
}

/**
 * @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 compilePipe(type, meta) {
    var ngPipeDef = null;
    Object.defineProperty(type, NG_PIPE_DEF, {
        get: function () {
            if (ngPipeDef === null) {
                ngPipeDef = getCompilerFacade().compilePipe(angularCoreEnv, "ng://" + stringify$1(type) + "/ngPipeDef.js", {
                    type: type,
                    name: type.name,
                    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,
    });
}

/**
 * @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 ivyEnabled = true;
var R3_COMPILE_COMPONENT = compileComponent;
var R3_COMPILE_DIRECTIVE = compileDirective;
var R3_COMPILE_INJECTABLE = compileInjectable;
var R3_COMPILE_NGMODULE = compileNgModule;
var R3_COMPILE_PIPE = compilePipe;
var R3_COMPILE_NGMODULE_DEFS = compileNgModuleDefs;
var R3_PATCH_COMPONENT_DEF_WTIH_SCOPE = patchComponentDefWithScope;

/**
 * @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() { }
var R3_COMPILE_COMPONENT__POST_NGCC__ = R3_COMPILE_COMPONENT;
var R3_COMPILE_DIRECTIVE__POST_NGCC__ = R3_COMPILE_DIRECTIVE;
var R3_COMPILE_INJECTABLE__POST_NGCC__ = R3_COMPILE_INJECTABLE;
var R3_COMPILE_NGMODULE__POST_NGCC__ = R3_COMPILE_NGMODULE;
var R3_COMPILE_PIPE__POST_NGCC__ = R3_COMPILE_PIPE;
var ivyEnable__POST_NGCC__ = ivyEnabled;
var R3_COMPILE_COMPONENT__PRE_NGCC__ = noop;
var R3_COMPILE_DIRECTIVE__PRE_NGCC__ = noop;
var R3_COMPILE_INJECTABLE__PRE_NGCC__ = preR3InjectableCompile;
var R3_COMPILE_NGMODULE__PRE_NGCC__ = preR3NgModuleCompile;
var R3_COMPILE_PIPE__PRE_NGCC__ = noop;
var ivyEnable__PRE_NGCC__ = false;
var ivyEnabled$1 = ivyEnable__PRE_NGCC__;
var R3_COMPILE_COMPONENT$1 = R3_COMPILE_COMPONENT__PRE_NGCC__;
var R3_COMPILE_DIRECTIVE$1 = R3_COMPILE_DIRECTIVE__PRE_NGCC__;
var R3_COMPILE_INJECTABLE$1 = R3_COMPILE_INJECTABLE__PRE_NGCC__;
var R3_COMPILE_NGMODULE$1 = R3_COMPILE_NGMODULE__PRE_NGCC__;
var R3_COMPILE_PIPE$1 = R3_COMPILE_PIPE__PRE_NGCC__;
////////////////////////////////////////////////////////////
// Glue code which should be removed after Ivy is default //
////////////////////////////////////////////////////////////
function preR3NgModuleCompile(moduleType, metadata) {
    var imports = (metadata && metadata.imports) || [];
    if (metadata && metadata.exports) {
        imports = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(imports, [metadata.exports]);
    }
    moduleType.ngInjectorDef = defineInjector({
        factory: convertInjectableProviderToFactory(moduleType, { useClass: moduleType }),
        providers: metadata && metadata.providers,
        imports: imports,
    });
}
var ɵ0$2 = getClosureSafeProperty;
var USE_VALUE$2 = getClosureSafeProperty({ provide: String, useValue: ɵ0$2 });
var EMPTY_ARRAY$3 = [];
function convertInjectableProviderToFactory(type, provider) {
    if (!provider) {
        var reflectionCapabilities = new ReflectionCapabilities();
        var deps_1 = reflectionCapabilities.parameters(type);
        // TODO - convert to flags.
        return function () { return new (type.bind.apply(type, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], injectArgs(deps_1))))(); };
    }
    if (USE_VALUE$2 in provider) {
        var valueProvider_1 = provider;
        return function () { return valueProvider_1.useValue; };
    }
    else if (provider.useExisting) {
        var existingProvider_1 = provider;
        return function () { return inject(existingProvider_1.useExisting); };
    }
    else if (provider.useFactory) {
        var factoryProvider_1 = provider;
        return function () { return factoryProvider_1.useFactory.apply(factoryProvider_1, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(injectArgs(factoryProvider_1.deps || EMPTY_ARRAY$3))); };
    }
    else if (provider.useClass) {
        var classProvider_1 = provider;
        var deps_2 = provider.deps;
        if (!deps_2) {
            var reflectionCapabilities = new ReflectionCapabilities();
            deps_2 = reflectionCapabilities.parameters(type);
        }
        return function () {
            var _a;
            return new ((_a = classProvider_1.useClass).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], injectArgs(deps_2))))();
        };
    }
    else {
        var deps_3 = provider.deps;
        if (!deps_3) {
            var reflectionCapabilities = new ReflectionCapabilities();
            deps_3 = reflectionCapabilities.parameters(type);
        }
        return function () { return new (type.bind.apply(type, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], injectArgs(deps_3))))(); };
    }
}
/**
 * Supports @Injectable() in JIT mode for Render2.
 */
function preR3InjectableCompile(injectableType, options) {
    if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {
        injectableType.ngInjectableDef = defineInjectable({
            providedIn: options.providedIn,
            factory: convertInjectableProviderToFactory(injectableType, options),
        });
    }
}

/**
 * @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 of the Directive metadata.
 *
 * @publicApi
 */
var Directive = makeDecorator('Directive', function (dir) {
    if (dir === void 0) { dir = {}; }
    return dir;
}, undefined, undefined, function (type, meta) { return R3_COMPILE_DIRECTIVE$1(type, meta); });
/**
 * Component decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var Component = makeDecorator('Component', function (c) {
    if (c === void 0) { c = {}; }
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ changeDetection: ChangeDetectionStrategy.Default }, c));
}, Directive, undefined, function (type, meta) { return R3_COMPILE_COMPONENT$1(type, meta); });
/**
 * @Annotation
 * @publicApi
 */
var Pipe = makeDecorator('Pipe', function (p) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ pure: true }, p)); }, undefined, undefined, function (type, meta) { return R3_COMPILE_PIPE$1(type, meta); });
var initializeBaseDef = function (target) {
    var constructor = target.constructor;
    var inheritedBaseDef = constructor.ngBaseDef;
    var baseDef = constructor.ngBaseDef = {
        inputs: {},
        outputs: {},
        declaredInputs: {},
    };
    if (inheritedBaseDef) {
        fillProperties(baseDef.inputs, inheritedBaseDef.inputs);
        fillProperties(baseDef.outputs, inheritedBaseDef.outputs);
        fillProperties(baseDef.declaredInputs, inheritedBaseDef.declaredInputs);
    }
};
/**
 * Does the work of creating the `ngBaseDef` property for the @Input and @Output decorators.
 * @param key "inputs" or "outputs"
 */
var updateBaseDefFromIOProp = function (getProp) {
    return function (target, name) {
        var args = [];
        for (var _i = 2; _i < arguments.length; _i++) {
            args[_i - 2] = arguments[_i];
        }
        var constructor = target.constructor;
        if (!constructor.hasOwnProperty(NG_BASE_DEF)) {
            initializeBaseDef(target);
        }
        var baseDef = constructor.ngBaseDef;
        var defProp = getProp(baseDef);
        defProp[name] = args[0];
    };
};
/**
 * @Annotation
 * @publicApi
 */
var Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); }, undefined, updateBaseDefFromIOProp(function (baseDef) { return baseDef.inputs || {}; }));
/**
 * @Annotation
 * @publicApi
 */
var Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); }, undefined, updateBaseDefFromIOProp(function (baseDef) { return baseDef.outputs || {}; }));
/**
 * @Annotation
 * @publicApi
 */
var HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });
/**
 * Binds a CSS 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.
 *
 * ```
 * @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
 */
var HostListener = makePropDecorator('HostListener', function (eventName, args) { return ({ eventName: eventName, args: args }); });

/**
 * @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
 */
/**
 * Defines a schema that allows an NgModule to contain the following:
 * - Non-Angular elements named with dash case (`-`).
 * - Element properties named with dash case (`-`).
 * Dash case is the naming convention for custom elements.
 *
 * @publicApi
 */
var CUSTOM_ELEMENTS_SCHEMA = {
    name: 'custom-elements'
};
/**
 * Defines a schema that allows any property on any element.
 *
 * @publicApi
 */
var NO_ERRORS_SCHEMA = {
    name: 'no-errors-schema'
};
/**
 * @Annotation
 * @publicApi
 */
var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined, 
/**
 * Decorator that marks the following class as an NgModule, and supplies
 * configuration metadata for it.
 *
 * * The `declarations` and `entryComponents` options configure the compiler
 * with information about what belongs to the NgModule.
 * * The `providers` options configures the NgModule's injector to provide
 * dependencies the NgModule members.
 * * The `imports` and `exports` options bring in members from other modules, and make
 * this module's members available to others.
 */
function (type, meta) { return R3_COMPILE_NGMODULE$1(type, meta); });

/**
 * @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
 */
/**
 * @description Represents the version of Angular
 *
 * @publicApi
 */
var Version = /** @class */ (function () {
    function Version(full) {
        this.full = full;
        this.major = full.split('.')[0];
        this.minor = full.split('.')[1];
        this.patch = full.split('.').slice(2).join('.');
    }
    return Version;
}());
/**
 * @publicApi
 */
var VERSION = new Version('7.0.4');

/**
 * @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
 */
/**
 * Injectable decorator and metadata.
 *
 * @Annotation
 * @publicApi
 */
var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, function (type, meta) { return R3_COMPILE_INJECTABLE$1(type, meta); });

/**
 * @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_DEBUG_CONTEXT = 'ngDebugContext';
var ERROR_ORIGINAL_ERROR = 'ngOriginalError';
var ERROR_LOGGER = 'ngErrorLogger';
function getDebugContext(error) {
    return error[ERROR_DEBUG_CONTEXT];
}
function getOriginalError(error) {
    return error[ERROR_ORIGINAL_ERROR];
}
function getErrorLogger(error) {
    return error[ERROR_LOGGER] || defaultErrorLogger;
}
function defaultErrorLogger(console) {
    var values = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        values[_i - 1] = arguments[_i];
    }
    console.error.apply(console, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(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
 */
/**
 * 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 = /** @class */ (function () {
    function ErrorHandler() {
        /**
         * @internal
         */
        this._console = console;
    }
    ErrorHandler.prototype.handleError = function (error) {
        var originalError = this._findOriginalError(error);
        var context = this._findContext(error);
        // Note: Browser consoles show the place from where console.error was called.
        // We can use this to give users additional information about the error.
        var errorLogger = getErrorLogger(error);
        errorLogger(this._console, "ERROR", error);
        if (originalError) {
            errorLogger(this._console, "ORIGINAL ERROR", originalError);
        }
        if (context) {
            errorLogger(this._console, 'ERROR CONTEXT', context);
        }
    };
    /** @internal */
    ErrorHandler.prototype._findContext = function (error) {
        if (error) {
            return getDebugContext(error) ? getDebugContext(error) :
                this._findContext(getOriginalError(error));
        }
        return null;
    };
    /** @internal */
    ErrorHandler.prototype._findOriginalError = function (error) {
        var e = getOriginalError(error);
        while (e && getOriginalError(e)) {
            e = getOriginalError(e);
        }
        return e;
    };
    return ErrorHandler;
}());
function wrappedError(message, originalError) {
    var msg = message + " caused by: " + (originalError instanceof Error ? originalError.message : originalError);
    var error = Error(msg);
    error[ERROR_ORIGINAL_ERROR] = originalError;
    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 findFirstClosedCycle(keys) {
    var res = [];
    for (var i = 0; i < keys.length; ++i) {
        if (res.indexOf(keys[i]) > -1) {
            res.push(keys[i]);
            return res;
        }
        res.push(keys[i]);
    }
    return res;
}
function constructResolvingPath(keys) {
    if (keys.length > 1) {
        var reversed = findFirstClosedCycle(keys.slice().reverse());
        var tokenStrs = reversed.map(function (k) { return stringify(k.token); });
        return ' (' + tokenStrs.join(' -> ') + ')';
    }
    return '';
}
function injectionError(injector, key, constructResolvingMessage, originalError) {
    var keys = [key];
    var errMsg = constructResolvingMessage(keys);
    var error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg));
    error.addKey = addKey;
    error.keys = keys;
    error.injectors = [injector];
    error.constructResolvingMessage = constructResolvingMessage;
    error[ERROR_ORIGINAL_ERROR] = originalError;
    return error;
}
function addKey(injector, key) {
    this.injectors.push(injector);
    this.keys.push(key);
    // Note: This updated message won't be reflected in the `.stack` property
    this.message = this.constructResolvingMessage(this.keys);
}
/**
 * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the
 * {@link Injector} does not have a {@link Provider} for the given key.
 *
 * @usageNotes
 * ### Example
 *
 * ```typescript
 * class A {
 *   constructor(b:B) {}
 * }
 *
 * expect(() => Injector.resolveAndCreate([A])).toThrowError();
 * ```
 */
function noProviderError(injector, key) {
    return injectionError(injector, key, function (keys) {
        var first = stringify(keys[0].token);
        return "No provider for " + first + "!" + constructResolvingPath(keys);
    });
}
/**
 * Thrown when dependencies form a cycle.
 *
 * @usageNotes
 * ### Example
 *
 * ```typescript
 * var injector = Injector.resolveAndCreate([
 *   {provide: "one", useFactory: (two) => "two", deps: [[new Inject("two")]]},
 *   {provide: "two", useFactory: (one) => "one", deps: [[new Inject("one")]]}
 * ]);
 *
 * expect(() => injector.get("one")).toThrowError();
 * ```
 *
 * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.
 */
function cyclicDependencyError(injector, key) {
    return injectionError(injector, key, function (keys) {
        return "Cannot instantiate cyclic dependency!" + constructResolvingPath(keys);
    });
}
/**
 * Thrown when a constructing type returns with an Error.
 *
 * The `InstantiationError` class contains the original error plus the dependency graph which caused
 * this object to be instantiated.
 *
 * @usageNotes
 * ### Example
 *
 * ```typescript
 * class A {
 *   constructor() {
 *     throw new Error('message');
 *   }
 * }
 *
 * var injector = Injector.resolveAndCreate([A]);

 * try {
 *   injector.get(A);
 * } catch (e) {
 *   expect(e instanceof InstantiationError).toBe(true);
 *   expect(e.originalException.message).toEqual("message");
 *   expect(e.originalStack).toBeDefined();
 * }
 * ```
 */
function instantiationError(injector, originalException, originalStack, key) {
    return injectionError(injector, key, function (keys) {
        var first = stringify(keys[0].token);
        return originalException.message + ": Error during instantiation of " + first + "!" + constructResolvingPath(keys) + ".";
    }, originalException);
}
/**
 * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}
 * creation.
 *
 * @usageNotes
 * ### Example
 *
 * ```typescript
 * expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError();
 * ```
 */
function invalidProviderError(provider) {
    return Error("Invalid provider - only instances of Provider and Type are allowed, got: " + provider);
}
/**
 * Thrown when the class has no annotation information.
 *
 * Lack of annotation information prevents the {@link Injector} from determining which dependencies
 * need to be injected into the constructor.
 *
 * @usageNotes
 * ### Example
 *
 * ```typescript
 * class A {
 *   constructor(b) {}
 * }
 *
 * expect(() => Injector.resolveAndCreate([A])).toThrowError();
 * ```
 *
 * This error is also thrown when the class not marked with {@link Injectable} has parameter types.
 *
 * ```typescript
 * class B {}
 *
 * class A {
 *   constructor(b:B) {} // no information about the parameter types of A is available at runtime.
 * }
 *
 * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();
 * ```
 *
 */
function noAnnotationError(typeOrFunc, params) {
    var signature = [];
    for (var i = 0, ii = params.length; i < ii; i++) {
        var parameter = params[i];
        if (!parameter || parameter.length == 0) {
            signature.push('?');
        }
        else {
            signature.push(parameter.map(stringify).join(' '));
        }
    }
    return Error('Cannot resolve all parameters for \'' + stringify(typeOrFunc) + '\'(' +
        signature.join(', ') + '). ' +
        'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \'' +
        stringify(typeOrFunc) + '\' is decorated with Injectable.');
}
/**
 * Thrown when getting an object by index.
 *
 * @usageNotes
 * ### Example
 *
 * ```typescript
 * class A {}
 *
 * var injector = Injector.resolveAndCreate([A]);
 *
 * expect(() => injector.getAt(100)).toThrowError();
 * ```
 *
 */
function outOfBoundsError(index) {
    return Error("Index " + index + " is out-of-bounds.");
}
// TODO: add a working example after alpha38 is released
/**
 * Thrown when a multi provider and a regular provider are bound to the same token.
 *
 * @usageNotes
 * ### Example
 *
 * ```typescript
 * expect(() => Injector.resolveAndCreate([
 *   { provide: "Strings", useValue: "string1", multi: true},
 *   { provide: "Strings", useValue: "string2", multi: false}
 * ])).toThrowError();
 * ```
 */
function mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {
    return Error("Cannot mix multi providers and regular providers, got: " + provider1 + " " + provider2);
}

/**
 * @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 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 = /** @class */ (function () {
    /**
     * Private
     */
    function ReflectiveKey(token, id) {
        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.
     */
    ReflectiveKey.get = function (token) {
        return _globalKeyRegistry.get(resolveForwardRef(token));
    };
    Object.defineProperty(ReflectiveKey, "numberOfKeys", {
        /**
         * @returns the number of keys registered in the system.
         */
        get: function () { return _globalKeyRegistry.numberOfKeys; },
        enumerable: true,
        configurable: true
    });
    return ReflectiveKey;
}());
var KeyRegistry = /** @class */ (function () {
    function KeyRegistry() {
        this._allKeys = new Map();
    }
    KeyRegistry.prototype.get = function (token) {
        if (token instanceof ReflectiveKey)
            return token;
        if (this._allKeys.has(token)) {
            return this._allKeys.get(token);
        }
        var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);
        this._allKeys.set(token, newKey);
        return newKey;
    };
    Object.defineProperty(KeyRegistry.prototype, "numberOfKeys", {
        get: function () { return this._allKeys.size; },
        enumerable: true,
        configurable: true
    });
    return KeyRegistry;
}());
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 = /** @class */ (function () {
    function Reflector(reflectionCapabilities) {
        this.reflectionCapabilities = reflectionCapabilities;
    }
    Reflector.prototype.updateCapabilities = function (caps) { this.reflectionCapabilities = caps; };
    Reflector.prototype.factory = function (type) { return this.reflectionCapabilities.factory(type); };
    Reflector.prototype.parameters = function (typeOrFunc) {
        return this.reflectionCapabilities.parameters(typeOrFunc);
    };
    Reflector.prototype.annotations = function (typeOrFunc) {
        return this.reflectionCapabilities.annotations(typeOrFunc);
    };
    Reflector.prototype.propMetadata = function (typeOrFunc) {
        return this.reflectionCapabilities.propMetadata(typeOrFunc);
    };
    Reflector.prototype.hasLifecycleHook = function (type, lcProperty) {
        return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
    };
    Reflector.prototype.getter = function (name) { return this.reflectionCapabilities.getter(name); };
    Reflector.prototype.setter = function (name) { return this.reflectionCapabilities.setter(name); };
    Reflector.prototype.method = function (name) { return this.reflectionCapabilities.method(name); };
    Reflector.prototype.importUri = function (type) { return this.reflectionCapabilities.importUri(type); };
    Reflector.prototype.resourceUri = function (type) { return this.reflectionCapabilities.resourceUri(type); };
    Reflector.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {
        return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);
    };
    Reflector.prototype.resolveEnum = function (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());

/**
 * @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
 */
/**
 * `Dependency` is used by the framework to extend DI.
 * This is internal to Angular and should not be used directly.
 */
var ReflectiveDependency = /** @class */ (function () {
    function ReflectiveDependency(key, optional, visibility) {
        this.key = key;
        this.optional = optional;
        this.visibility = visibility;
    }
    ReflectiveDependency.fromKey = function (key) {
        return new ReflectiveDependency(key, false, null);
    };
    return ReflectiveDependency;
}());
var _EMPTY_LIST = [];
var ResolvedReflectiveProvider_ = /** @class */ (function () {
    function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {
        this.key = key;
        this.resolvedFactories = resolvedFactories;
        this.multiProvider = multiProvider;
        this.resolvedFactory = this.resolvedFactories[0];
    }
    return ResolvedReflectiveProvider_;
}());
/**
 * An internal resolved representation of a factory function created by resolving `Provider`.
 * @publicApi
 */
var ResolvedReflectiveFactory = /** @class */ (function () {
    function ResolvedReflectiveFactory(
    /**
     * Factory function which can return an instance of an object represented by a key.
     */
    factory, 
    /**
     * Arguments (dependencies) to the `factory` function.
     */
    dependencies) {
        this.factory = factory;
        this.dependencies = dependencies;
    }
    return ResolvedReflectiveFactory;
}());
/**
 * Resolve a single provider.
 */
function resolveReflectiveFactory(provider) {
    var factoryFn;
    var resolvedDeps;
    if (provider.useClass) {
        var useClass = resolveForwardRef(provider.useClass);
        factoryFn = reflector.factory(useClass);
        resolvedDeps = _dependenciesFor(useClass);
    }
    else if (provider.useExisting) {
        factoryFn = function (aliasInstance) { return aliasInstance; };
        resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];
    }
    else if (provider.useFactory) {
        factoryFn = provider.useFactory;
        resolvedDeps = constructDependencies(provider.useFactory, provider.deps);
    }
    else {
        factoryFn = function () { return provider.useValue; };
        resolvedDeps = _EMPTY_LIST;
    }
    return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);
}
/**
 * Converts the `Provider` into `ResolvedProvider`.
 *
 * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider
 * syntax.
 */
function resolveReflectiveProvider(provider) {
    return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);
}
/**
 * Resolve a list of Providers.
 */
function resolveReflectiveProviders(providers) {
    var normalized = _normalizeProviders(providers, []);
    var resolved = normalized.map(resolveReflectiveProvider);
    var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());
    return Array.from(resolvedProviderMap.values());
}
/**
 * Merges a list of ResolvedProviders into a list where each key is contained exactly once and
 * multi providers have been merged.
 */
function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {
    for (var i = 0; i < providers.length; i++) {
        var provider = providers[i];
        var existing = normalizedProvidersMap.get(provider.key.id);
        if (existing) {
            if (provider.multiProvider !== existing.multiProvider) {
                throw mixingMultiProvidersWithRegularProvidersError(existing, provider);
            }
            if (provider.multiProvider) {
                for (var j = 0; j < provider.resolvedFactories.length; j++) {
                    existing.resolvedFactories.push(provider.resolvedFactories[j]);
                }
            }
            else {
                normalizedProvidersMap.set(provider.key.id, provider);
            }
        }
        else {
            var resolvedProvider = void 0;
            if (provider.multiProvider) {
                resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);
            }
            else {
                resolvedProvider = provider;
            }
            normalizedProvidersMap.set(provider.key.id, resolvedProvider);
        }
    }
    return normalizedProvidersMap;
}
function _normalizeProviders(providers, res) {
    providers.forEach(function (b) {
        if (b instanceof Type) {
            res.push({ provide: b, useClass: b });
        }
        else if (b && typeof b == 'object' && b.provide !== undefined) {
            res.push(b);
        }
        else if (b instanceof Array) {
            _normalizeProviders(b, res);
        }
        else {
            throw invalidProviderError(b);
        }
    });
    return res;
}
function constructDependencies(typeOrFunc, dependencies) {
    if (!dependencies) {
        return _dependenciesFor(typeOrFunc);
    }
    else {
        var params_1 = dependencies.map(function (t) { return [t]; });
        return dependencies.map(function (t) { return _extractToken(typeOrFunc, t, params_1); });
    }
}
function _dependenciesFor(typeOrFunc) {
    var params = reflector.parameters(typeOrFunc);
    if (!params)
        return [];
    if (params.some(function (p) { return p == null; })) {
        throw noAnnotationError(typeOrFunc, params);
    }
    return params.map(function (p) { return _extractToken(typeOrFunc, p, params); });
}
function _extractToken(typeOrFunc, metadata, params) {
    var token = null;
    var optional = false;
    if (!Array.isArray(metadata)) {
        if (metadata instanceof Inject) {
            return _createDependency(metadata.token, optional, null);
        }
        else {
            return _createDependency(metadata, optional, null);
        }
    }
    var visibility = null;
    for (var i = 0; i < metadata.length; ++i) {
        var paramMetadata = metadata[i];
        if (paramMetadata instanceof Type) {
            token = paramMetadata;
        }
        else if (paramMetadata instanceof Inject) {
            token = paramMetadata.token;
        }
        else if (paramMetadata instanceof Optional) {
            optional = true;
        }
        else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {
            visibility = paramMetadata;
        }
        else if (paramMetadata instanceof InjectionToken) {
            token = paramMetadata;
        }
    }
    token = resolveForwardRef(token);
    if (token != null) {
        return _createDependency(token, optional, visibility);
    }
    else {
        throw noAnnotationError(typeOrFunc, params);
    }
}
function _createDependency(token, optional, visibility) {
    return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);
}

/**
 * @license
 * Copyright Google 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
 */
// Threshold for the dynamic version
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
 */
var ReflectiveInjector = /** @class */ (function () {
    function ReflectiveInjector() {
    }
    /**
     * Turns an array of provider definitions into an array of resolved providers.
     *
     * A resolution is a process of flattening multiple nested arrays and converting individual
     * providers into an array of `ResolvedReflectiveProvider`s.
     *
     * @usageNotes
     * ### Example
     *
     * ```typescript
     * @Injectable()
     * class Engine {
     * }
     *
     * @Injectable()
     * class Car {
     *   constructor(public engine:Engine) {}
     * }
     *
     * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
     *
     * expect(providers.length).toEqual(2);
     *
     * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
     * expect(providers[0].key.displayName).toBe("Car");
     * expect(providers[0].dependencies.length).toEqual(1);
     * expect(providers[0].factory).toBeDefined();
     *
     * expect(providers[1].key.displayName).toBe("Engine");
     * });
     * ```
     *
     */
    ReflectiveInjector.resolve = function (providers) {
        return resolveReflectiveProviders(providers);
    };
    /**
     * Resolves an array of providers and creates an injector from those providers.
     *
     * The passed-in providers can be an array of `Type`, `Provider`,
     * or a recursive array of more providers.
     *
     * @usageNotes
     * ### Example
     *
     * ```typescript
     * @Injectable()
     * class Engine {
     * }
     *
     * @Injectable()
     * class Car {
     *   constructor(public engine:Engine) {}
     * }
     *
     * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
     * expect(injector.get(Car) instanceof Car).toBe(true);
     * ```
     */
    ReflectiveInjector.resolveAndCreate = function (providers, parent) {
        var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);
        return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);
    };
    /**
     * Creates an injector from previously resolved providers.
     *
     * This API is the recommended way to construct injectors in performance-sensitive parts.
     *
     * @usageNotes
     * ### Example
     *
     * ```typescript
     * @Injectable()
     * class Engine {
     * }
     *
     * @Injectable()
     * class Car {
     *   constructor(public engine:Engine) {}
     * }
     *
     * var providers = ReflectiveInjector.resolve([Car, Engine]);
     * var injector = ReflectiveInjector.fromResolvedProviders(providers);
     * expect(injector.get(Car) instanceof Car).toBe(true);
     * ```
     */
    ReflectiveInjector.fromResolvedProviders = function (providers, parent) {
        return new ReflectiveInjector_(providers, parent);
    };
    return ReflectiveInjector;
}());
var ReflectiveInjector_ = /** @class */ (function () {
    /**
     * Private
     */
    function ReflectiveInjector_(_providers, _parent) {
        /** @internal */
        this._constructionCounter = 0;
        this._providers = _providers;
        this.parent = _parent || null;
        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;
        }
    }
    ReflectiveInjector_.prototype.get = function (token, notFoundValue) {
        if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }
        return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);
    };
    ReflectiveInjector_.prototype.resolveAndCreateChild = function (providers) {
        var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);
        return this.createChildFromResolved(ResolvedReflectiveProviders);
    };
    ReflectiveInjector_.prototype.createChildFromResolved = function (providers) {
        var inj = new ReflectiveInjector_(providers);
        inj.parent = this;
        return inj;
    };
    ReflectiveInjector_.prototype.resolveAndInstantiate = function (provider) {
        return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);
    };
    ReflectiveInjector_.prototype.instantiateResolved = function (provider) {
        return this._instantiateProvider(provider);
    };
    ReflectiveInjector_.prototype.getProviderAtIndex = function (index) {
        if (index < 0 || index >= this._providers.length) {
            throw outOfBoundsError(index);
        }
        return this._providers[index];
    };
    /** @internal */
    ReflectiveInjector_.prototype._new = function (provider) {
        if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {
            throw cyclicDependencyError(this, provider.key);
        }
        return this._instantiateProvider(provider);
    };
    ReflectiveInjector_.prototype._getMaxNumberOfObjects = function () { return this.objs.length; };
    ReflectiveInjector_.prototype._instantiateProvider = function (provider) {
        if (provider.multiProvider) {
            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]);
        }
    };
    ReflectiveInjector_.prototype._instantiate = function (provider, ResolvedReflectiveFactory$$1) {
        var _this = this;
        var factory = ResolvedReflectiveFactory$$1.factory;
        var deps;
        try {
            deps =
                ResolvedReflectiveFactory$$1.dependencies.map(function (dep) { return _this._getByReflectiveDependency(dep); });
        }
        catch (e) {
            if (e.addKey) {
                e.addKey(this, provider.key);
            }
            throw e;
        }
        var obj;
        try {
            obj = factory.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(deps));
        }
        catch (e) {
            throw instantiationError(this, e, e.stack, provider.key);
        }
        return obj;
    };
    ReflectiveInjector_.prototype._getByReflectiveDependency = function (dep) {
        return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);
    };
    ReflectiveInjector_.prototype._getByKey = function (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);
        }
    };
    ReflectiveInjector_.prototype._getObjByKeyId = function (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 */
    ReflectiveInjector_.prototype._throwOrNull = function (key, notFoundValue) {
        if (notFoundValue !== THROW_IF_NOT_FOUND) {
            return notFoundValue;
        }
        else {
            throw noProviderError(this, key);
        }
    };
    /** @internal */
    ReflectiveInjector_.prototype._getByKeySelf = function (key, notFoundValue) {
        var obj = this._getObjByKeyId(key.id);
        return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);
    };
    /** @internal */
    ReflectiveInjector_.prototype._getByKeyDefault = function (key, notFoundValue, visibility) {
        var inj;
        if (visibility instanceof SkipSelf) {
            inj = this.parent;
        }
        else {
            inj = this;
        }
        while (inj instanceof ReflectiveInjector_) {
            var inj_ = inj;
            var obj = inj_._getObjByKeyId(key.id);
            if (obj !== UNDEFINED)
                return obj;
            inj = inj_.parent;
        }
        if (inj !== null) {
            return inj.get(key.token, notFoundValue);
        }
        else {
            return this._throwOrNull(key, notFoundValue);
        }
    };
    Object.defineProperty(ReflectiveInjector_.prototype, "displayName", {
        get: function () {
            var providers = _mapProviders(this, function (b) { return ' "' + b.key.displayName + '" '; })
                .join(', ');
            return "ReflectiveInjector(providers: [" + providers + "])";
        },
        enumerable: true,
        configurable: true
    });
    ReflectiveInjector_.prototype.toString = function () { return this.displayName; };
    ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);
    return ReflectiveInjector_;
}());
function _mapProviders(injector, fn) {
    var res = new Array(injector._providers.length);
    for (var i = 0; i < injector._providers.length; ++i) {
        res[i] = fn(injector.getProviderAtIndex(i));
    }
    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
 */

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

/**
 * @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 function that will be executed when an application is initialized.
 *
 * @publicApi
 */
var APP_INITIALIZER = new InjectionToken('Application Initializer');
/**
 * A class that reflects the state of running {@link APP_INITIALIZER}s.
 *
 * @publicApi
 */
var ApplicationInitStatus = /** @class */ (function () {
    function ApplicationInitStatus(appInits) {
        var _this = this;
        this.appInits = appInits;
        this.initialized = false;
        this.done = false;
        this.donePromise = new Promise(function (res, rej) {
            _this.resolve = res;
            _this.reject = rej;
        });
    }
    /** @internal */
    ApplicationInitStatus.prototype.runInitializers = function () {
        var _this = this;
        if (this.initialized) {
            return;
        }
        var asyncInitPromises = [];
        var complete = function () {
            _this.done = true;
            _this.resolve();
        };
        if (this.appInits) {
            for (var i = 0; i < this.appInits.length; i++) {
                var initResult = this.appInits[i]();
                if (isPromise(initResult)) {
                    asyncInitPromises.push(initResult);
                }
            }
        }
        Promise.all(asyncInitPromises).then(function () { complete(); }).catch(function (e) { _this.reject(e); });
        if (asyncInitPromises.length === 0) {
            complete();
        }
        this.initialized = true;
    };
    ApplicationInitStatus = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Injectable(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Inject(APP_INITIALIZER)), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Optional()),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Array])
    ], ApplicationInitStatus);
    return ApplicationInitStatus;
}());

/**
 * @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 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
 */
var APP_ID = new InjectionToken('AppId');
function _appIdRandomProviderFactory() {
    return "" + _randomChar() + _randomChar() + _randomChar();
}
/**
 * Providers that will generate a random APP_ID_TOKEN.
 * @publicApi
 */
var APP_ID_RANDOM_PROVIDER = {
    provide: APP_ID,
    useFactory: _appIdRandomProviderFactory,
    deps: [],
};
function _randomChar() {
    return String.fromCharCode(97 + Math.floor(Math.random() * 25));
}
/**
 * A function that will be executed when a platform is initialized.
 * @publicApi
 */
var PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');
/**
 * A token that indicates an opaque platform id.
 * @publicApi
 */
var PLATFORM_ID = new InjectionToken('Platform ID');
/**
 * All callbacks provided via this token will be called for every component that is bootstrapped.
 * Signature of the callback:
 *
 * `(componentRef: ComponentRef) => void`.
 *
 * @publicApi
 */
var APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');
/**
 * A token which indicates the root directory of the application
 * @publicApi
 */
var PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');

/**
 * @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 Console = /** @class */ (function () {
    function Console() {
    }
    Console.prototype.log = function (message) {
        // tslint:disable-next-line:no-console
        console.log(message);
    };
    // Note: for reporting errors use `DOM.logError()` as it is platform specific
    Console.prototype.warn = function (message) {
        // tslint:disable-next-line:no-console
        console.warn(message);
    };
    Console = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Injectable()
    ], Console);
    return Console;
}());

/**
 * @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
 */
/**
 * Combination of NgModuleFactory and ComponentFactorys.
 *
 * @publicApi
 */
var ModuleWithComponentFactories = /** @class */ (function () {
    function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {
        this.ngModuleFactory = ngModuleFactory;
        this.componentFactories = componentFactories;
    }
    return ModuleWithComponentFactories;
}());
function _throwError() {
    throw new Error("Runtime compiler is not loaded");
}
/**
 * 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 = /** @class */ (function () {
    function Compiler() {
    }
    /**
     * Compiles the given NgModule and all of its components. All templates of the components listed
     * in `entryComponents` have to be inlined.
     */
    Compiler.prototype.compileModuleSync = function (moduleType) { throw _throwError(); };
    /**
     * Compiles the given NgModule and all of its components
     */
    Compiler.prototype.compileModuleAsync = function (moduleType) { throw _throwError(); };
    /**
     * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
     */
    Compiler.prototype.compileModuleAndAllComponentsSync = function (moduleType) {
        throw _throwError();
    };
    /**
     * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
     */
    Compiler.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {
        throw _throwError();
    };
    /**
     * Clears all caches.
     */
    Compiler.prototype.clearCache = function () { };
    /**
     * Clears the cache for the given component/ngModule.
     */
    Compiler.prototype.clearCacheFor = function (type) { };
    /**
     * Returns the id for a given NgModule, if one is defined and known to the compiler.
     */
    Compiler.prototype.getModuleId = function (moduleType) { return undefined; };
    Compiler = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Injectable()
    ], Compiler);
    return Compiler;
}());
/**
 * Token to provide CompilerOptions in the platform injector.
 *
 * @publicApi
 */
var COMPILER_OPTIONS = new InjectionToken('compilerOptions');
/**
 * A factory for creating a Compiler
 *
 * @publicApi
 */
var CompilerFactory = /** @class */ (function () {
    function CompilerFactory() {
    }
    return CompilerFactory;
}());

/**
 * @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 trace;
var events;
function detectWTF() {
    var wtf = _global /** TODO #9100 */['wtf'];
    if (wtf) {
        trace = wtf['trace'];
        if (trace) {
            events = trace['events'];
            return true;
        }
    }
    return false;
}
function createScope(signature, flags) {
    if (flags === void 0) { flags = null; }
    return events.createScope(signature, flags);
}
function leave(scope, returnValue) {
    trace.leaveScope(scope, returnValue);
    return returnValue;
}
function startTimeRange(rangeType, action) {
    return trace.beginTimeRange(rangeType, action);
}
function endTimeRange(range) {
    trace.endTimeRange(range);
}

/**
 * @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
 */
/**
 * True if WTF is enabled.
 */
var wtfEnabled = detectWTF();
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
 */
var wtfCreateScope = wtfEnabled ? createScope : 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
 */
var wtfLeave = wtfEnabled ? leave : 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
 */
var wtfStartTimeRange = wtfEnabled ? startTimeRange : 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
 */
var wtfEndTimeRange = wtfEnabled ? endTimeRange : 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
 */
/**
 * 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 = /** @class */ (function () {
    function NgZone(_a) {
        var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b;
        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();
        var self = this;
        self._nesting = 0;
        self._outer = self._inner = Zone.current;
        if (Zone['wtfZoneSpec']) {
            self._inner = self._inner.fork(Zone['wtfZoneSpec']);
        }
        if (Zone['TaskTrackingZoneSpec']) {
            self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);
        }
        if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {
            self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);
        }
        forkInnerZoneWithAngularBehavior(self);
    }
    NgZone.isInAngularZone = function () { return Zone.current.get('isAngularZone') === true; };
    NgZone.assertInAngularZone = function () {
        if (!NgZone.isInAngularZone()) {
            throw new Error('Expected to be in Angular Zone, but it is not!');
        }
    };
    NgZone.assertNotInAngularZone = function () {
        if (NgZone.isInAngularZone()) {
            throw new Error('Expected to not be in Angular Zone, but it is!');
        }
    };
    /**
     * 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`.
     */
    NgZone.prototype.run = function (fn, applyThis, applyArgs) {
        return this._inner.run(fn, applyThis, applyArgs);
    };
    /**
     * Executes the `fn` function synchronously within the Angular zone as a task and returns value
     * returned by the function.
     *
     * Running functions via `run` allows you to reenter Angular zone from a task that was executed
     * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
     *
     * Any future tasks or microtasks scheduled from within this function will continue executing from
     * within the Angular zone.
     *
     * If a synchronous error happens it will be rethrown and not reported via `onError`.
     */
    NgZone.prototype.runTask = function (fn, applyThis, applyArgs, name) {
        var zone = this._inner;
        var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop$1, noop$1);
        try {
            return zone.runTask(task, applyThis, applyArgs);
        }
        finally {
            zone.cancelTask(task);
        }
    };
    /**
     * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
     * rethrown.
     */
    NgZone.prototype.runGuarded = function (fn, applyThis, applyArgs) {
        return this._inner.runGuarded(fn, applyThis, applyArgs);
    };
    /**
     * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
     * the function.
     *
     * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
     * work that
     * doesn't trigger Angular change-detection or is subject to Angular's error handling.
     *
     * Any future tasks or microtasks scheduled from within this function will continue executing from
     * outside of the Angular zone.
     *
     * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
     */
    NgZone.prototype.runOutsideAngular = function (fn) {
        return this._outer.run(fn);
    };
    return NgZone;
}());
function noop$1() { }
var EMPTY_PAYLOAD = {};
function checkStable(zone) {
    if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {
        try {
            zone._nesting++;
            zone.onMicrotaskEmpty.emit(null);
        }
        finally {
            zone._nesting--;
            if (!zone.hasPendingMicrotasks) {
                try {
                    zone.runOutsideAngular(function () { return zone.onStable.emit(null); });
                }
                finally {
                    zone.isStable = true;
                }
            }
        }
    }
}
function forkInnerZoneWithAngularBehavior(zone) {
    zone._inner = zone._inner.fork({
        name: 'angular',
        properties: { 'isAngularZone': true },
        onInvokeTask: function (delegate, current, target, task, applyThis, applyArgs) {
            try {
                onEnter(zone);
                return delegate.invokeTask(target, task, applyThis, applyArgs);
            }
            finally {
                onLeave(zone);
            }
        },
        onInvoke: function (delegate, current, target, callback, applyThis, applyArgs, source) {
            try {
                onEnter(zone);
                return delegate.invoke(target, callback, applyThis, applyArgs, source);
            }
            finally {
                onLeave(zone);
            }
        },
        onHasTask: function (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: function (delegate, current, target, error) {
            delegate.handleError(target, error);
            zone.runOutsideAngular(function () { return zone.onError.emit(error); });
            return false;
        }
    });
}
function onEnter(zone) {
    zone._nesting++;
    if (zone.isStable) {
        zone.isStable = false;
        zone.onUnstable.emit(null);
    }
}
function onLeave(zone) {
    zone._nesting--;
    checkStable(zone);
}
/**
 * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
 * to framework to perform rendering.
 */
var NoopNgZone = /** @class */ (function () {
    function 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();
    }
    NoopNgZone.prototype.run = function (fn) { return fn(); };
    NoopNgZone.prototype.runGuarded = function (fn) { return fn(); };
    NoopNgZone.prototype.runOutsideAngular = function (fn) { return fn(); };
    NoopNgZone.prototype.runTask = function (fn) { return fn(); };
    return NoopNgZone;
}());

/**
 * @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 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 = /** @class */ (function () {
    function Testability(_ngZone) {
        var _this = this;
        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._watchAngularEvents();
        _ngZone.run(function () { _this.taskTrackingZone = Zone.current.get('TaskTrackingZone'); });
    }
    Testability.prototype._watchAngularEvents = function () {
        var _this = this;
        this._ngZone.onUnstable.subscribe({
            next: function () {
                _this._didWork = true;
                _this._isZoneStable = false;
            }
        });
        this._ngZone.runOutsideAngular(function () {
            _this._ngZone.onStable.subscribe({
                next: function () {
                    NgZone.assertNotInAngularZone();
                    scheduleMicroTask(function () {
                        _this._isZoneStable = true;
                        _this._runCallbacksIfReady();
                    });
                }
            });
        });
    };
    /**
     * Increases the number of pending request
     * @deprecated pending requests are now tracked with zones.
     */
    Testability.prototype.increasePendingRequestCount = function () {
        this._pendingCount += 1;
        this._didWork = true;
        return this._pendingCount;
    };
    /**
     * Decreases the number of pending request
     * @deprecated pending requests are now tracked with zones
     */
    Testability.prototype.decreasePendingRequestCount = function () {
        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
     */
    Testability.prototype.isStable = function () {
        return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;
    };
    Testability.prototype._runCallbacksIfReady = function () {
        var _this = this;
        if (this.isStable()) {
            // Schedules the call backs in a new frame so that it is always async.
            scheduleMicroTask(function () {
                while (_this._callbacks.length !== 0) {
                    var cb = _this._callbacks.pop();
                    clearTimeout(cb.timeoutId);
                    cb.doneCb(_this._didWork);
                }
                _this._didWork = false;
            });
        }
        else {
            // Still not stable, send updates.
            var pending_1 = this.getPendingTasks();
            this._callbacks = this._callbacks.filter(function (cb) {
                if (cb.updateCb && cb.updateCb(pending_1)) {
                    clearTimeout(cb.timeoutId);
                    return false;
                }
                return true;
            });
            this._didWork = true;
        }
    };
    Testability.prototype.getPendingTasks = function () {
        if (!this.taskTrackingZone) {
            return [];
        }
        // Copy the tasks data so that we don't leak tasks.
        return this.taskTrackingZone.macroTasks.map(function (t) {
            return {
                source: t.source,
                // From TaskTrackingZone:
                // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40
                creationLocation: t.creationLocation,
                data: t.data
            };
        });
    };
    Testability.prototype.addCallback = function (cb, timeout, updateCb) {
        var _this = this;
        var timeoutId = -1;
        if (timeout && timeout > 0) {
            timeoutId = setTimeout(function () {
                _this._callbacks = _this._callbacks.filter(function (cb) { return cb.timeoutId !== timeoutId; });
                cb(_this._didWork, _this.getPendingTasks());
            }, timeout);
        }
        this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb });
    };
    /**
     * Wait for the application to be stable with a timeout. If the timeout is reached before that
     * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
     *
     * @param doneCb The callback to invoke when Angular is stable or the timeout expires
     *    whichever comes first.
     * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
     *    specified, whenStable() will wait forever.
     * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
     *    pending macrotasks changes. If this callback returns true doneCb will not be invoked
     *    and no further updates will be issued.
     */
    Testability.prototype.whenStable = function (doneCb, timeout, updateCb) {
        if (updateCb && !this.taskTrackingZone) {
            throw new Error('Task tracking zone is required when passing an update callback to ' +
                'whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');
        }
        // These arguments are 'Function' above to keep the public API simple.
        this.addCallback(doneCb, timeout, updateCb);
        this._runCallbacksIfReady();
    };
    /**
     * Get the number of pending requests
     * @deprecated pending requests are now tracked with zones
     */
    Testability.prototype.getPendingRequestCount = function () { 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
     */
    Testability.prototype.findProviders = function (using, provider, exactMatch) {
        // TODO(juliemr): implement.
        return [];
    };
    Testability = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Injectable(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [NgZone])
    ], Testability);
    return Testability;
}());
/**
 * A global registry of {@link Testability} instances for specific elements.
 * @publicApi
 */
var TestabilityRegistry = /** @class */ (function () {
    function 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
     */
    TestabilityRegistry.prototype.registerApplication = function (token, testability) {
        this._applications.set(token, testability);
    };
    /**
     * Unregisters an application.
     * @param token token of application, root element
     */
    TestabilityRegistry.prototype.unregisterApplication = function (token) { this._applications.delete(token); };
    /**
     * Unregisters all applications
     */
    TestabilityRegistry.prototype.unregisterAllApplications = function () { this._applications.clear(); };
    /**
     * Get a testability hook associated with the application
     * @param elem root element
     */
    TestabilityRegistry.prototype.getTestability = function (elem) { return this._applications.get(elem) || null; };
    /**
     * Get all registered testabilities
     */
    TestabilityRegistry.prototype.getAllTestabilities = function () { return Array.from(this._applications.values()); };
    /**
     * Get all registered applications(root elements)
     */
    TestabilityRegistry.prototype.getAllRootElements = function () { 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
     */
    TestabilityRegistry.prototype.findTestabilityInTree = function (elem, findInAncestors) {
        if (findInAncestors === void 0) { findInAncestors = true; }
        return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);
    };
    TestabilityRegistry = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Injectable(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [])
    ], TestabilityRegistry);
    return TestabilityRegistry;
}());
var _NoopGetTestability = /** @class */ (function () {
    function _NoopGetTestability() {
    }
    _NoopGetTestability.prototype.addToWindow = function (registry) { };
    _NoopGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {
        return null;
    };
    return _NoopGetTestability;
}());
/**
 * Set the {@link GetTestability} implementation used by the Angular testing framework.
 * @publicApi
 */
function setTestabilityGetter(getter) {
    _testabilityGetter = getter;
}
var _testabilityGetter = new _NoopGetTestability();

/**
 * @license
 * Copyright Google 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 _platform;
var compileNgModuleFactory = compileNgModuleFactory__PRE_NGCC__;
function compileNgModuleFactory__PRE_NGCC__(injector, options, moduleType) {
    var compilerFactory = injector.get(CompilerFactory);
    var compiler = compilerFactory.createCompiler([options]);
    return compiler.compileModuleAsync(moduleType);
}
function compileNgModuleFactory__POST_NGCC__(injector, options, moduleType) {
    ngDevMode && assertNgModuleType(moduleType);
    return Promise.resolve(new NgModuleFactory$1(moduleType));
}
var ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');
/**
 * A token for third-party components that can register themselves with NgProbe.
 *
 * @publicApi
 */
var NgProbeToken = /** @class */ (function () {
    function NgProbeToken(name, token) {
        this.name = name;
        this.token = token;
    }
    return NgProbeToken;
}());
/**
 * Creates a platform.
 * Platforms have to be eagerly created via this function.
 *
 * @publicApi
 */
function createPlatform(injector) {
    if (_platform && !_platform.destroyed &&
        !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
        throw new Error('There can be only one platform. Destroy the previous one to create a new one.');
    }
    _platform = injector.get(PlatformRef);
    var inits = injector.get(PLATFORM_INITIALIZER, null);
    if (inits)
        inits.forEach(function (init) { return init(); });
    return _platform;
}
/**
 * Creates a factory for a platform
 *
 * @publicApi
 */
function createPlatformFactory(parentPlatformFactory, name, providers) {
    if (providers === void 0) { providers = []; }
    var desc = "Platform: " + name;
    var marker = new InjectionToken(desc);
    return function (extraProviders) {
        if (extraProviders === void 0) { extraProviders = []; }
        var platform = getPlatform();
        if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
            if (parentPlatformFactory) {
                parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));
            }
            else {
                var injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true });
                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
 */
function assertPlatform(requiredToken) {
    var platform = getPlatform();
    if (!platform) {
        throw new Error('No platform exists!');
    }
    if (!platform.injector.get(requiredToken, null)) {
        throw new Error('A platform with a different configuration has been created. Please destroy it first.');
    }
    return platform;
}
/**
 * Destroy the existing platform.
 *
 * @publicApi
 */
function destroyPlatform() {
    if (_platform && !_platform.destroyed) {
        _platform.destroy();
    }
}
/**
 * Returns the current platform.
 *
 * @publicApi
 */
function getPlatform() {
    return _platform && !_platform.destroyed ? _platform : null;
}
/**
 * The Angular platform is the entry point for Angular on a web page. Each page
 * has exactly one platform, 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 = /** @class */ (function () {
    /** @internal */
    function PlatformRef(_injector) {
        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);
     * ```
     */
    PlatformRef.prototype.bootstrapModuleFactory = function (moduleFactory, options) {
        var _this = this;
        // Note: We need to create the NgZone _before_ we instantiate the module,
        // as instantiating the module creates some providers eagerly.
        // So we create a mini parent injector that just contains the new NgZone and
        // pass that as parent to the NgModuleFactory.
        var ngZoneOption = options ? options.ngZone : undefined;
        var ngZone = getNgZone(ngZoneOption);
        var providers = [{ provide: NgZone, useValue: ngZone }];
        // Attention: Don't use ApplicationRef.run here,
        // as we want to be sure that all possible constructor calls are inside `ngZone.run`!
        return ngZone.run(function () {
            var ngZoneInjector = Injector.create({ providers: providers, parent: _this.injector, name: moduleFactory.moduleType.name });
            var moduleRef = moduleFactory.create(ngZoneInjector);
            var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);
            if (!exceptionHandler) {
                throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');
            }
            moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); });
            ngZone.runOutsideAngular(function () { return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } }); });
            return _callAndReportToErrorHandler(exceptionHandler, ngZone, function () {
                var initStatus = moduleRef.injector.get(ApplicationInitStatus);
                initStatus.runInitializers();
                return initStatus.donePromise.then(function () {
                    _this._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);
     * ```
     *
     */
    PlatformRef.prototype.bootstrapModule = function (moduleType, compilerOptions) {
        var _this = this;
        if (compilerOptions === void 0) { compilerOptions = []; }
        var options = optionsReducer({}, compilerOptions);
        return compileNgModuleFactory(this.injector, options, moduleType)
            .then(function (moduleFactory) { return _this.bootstrapModuleFactory(moduleFactory, options); });
    };
    PlatformRef.prototype._moduleDoBootstrap = function (moduleRef) {
        var appRef = moduleRef.injector.get(ApplicationRef);
        if (moduleRef._bootstrapComponents.length > 0) {
            moduleRef._bootstrapComponents.forEach(function (f) { return appRef.bootstrap(f); });
        }
        else if (moduleRef.instance.ngDoBootstrap) {
            moduleRef.instance.ngDoBootstrap(appRef);
        }
        else {
            throw new Error("The module " + 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.
     */
    PlatformRef.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };
    Object.defineProperty(PlatformRef.prototype, "injector", {
        /**
         * Retrieve the platform {@link Injector}, which is the parent injector for
         * every Angular application on the page and provides singleton providers.
         */
        get: function () { return this._injector; },
        enumerable: true,
        configurable: true
    });
    /**
     * Destroy the Angular platform and all Angular applications on the page.
     */
    PlatformRef.prototype.destroy = function () {
        if (this._destroyed) {
            throw new Error('The platform has already been destroyed!');
        }
        this._modules.slice().forEach(function (module) { return module.destroy(); });
        this._destroyListeners.forEach(function (listener) { return listener(); });
        this._destroyed = true;
    };
    Object.defineProperty(PlatformRef.prototype, "destroyed", {
        get: function () { return this._destroyed; },
        enumerable: true,
        configurable: true
    });
    PlatformRef = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Injectable(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Injector])
    ], PlatformRef);
    return PlatformRef;
}());
function getNgZone(ngZoneOption) {
    var ngZone;
    if (ngZoneOption === 'noop') {
        ngZone = new NoopNgZone();
    }
    else {
        ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) ||
            new NgZone({ enableLongStackTrace: isDevMode() });
    }
    return ngZone;
}
function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
    try {
        var result = callback();
        if (isPromise(result)) {
            return result.catch(function (e) {
                ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });
                // rethrow as the exception handler might not do it
                throw e;
            });
        }
        return result;
    }
    catch (e) {
        ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });
        // rethrow as the exception handler might not do it
        throw e;
    }
}
function optionsReducer(dst, objs) {
    if (Array.isArray(objs)) {
        dst = objs.reduce(optionsReducer, dst);
    }
    else {
        dst = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, dst, objs);
    }
    return dst;
}
/**
 * A reference to an Angular application running on a page.
 *
 * @publicApi
 */
var ApplicationRef = /** @class */ (function () {
    /** @internal */
    function ApplicationRef(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {
        var _this = this;
        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: function () { _this._zone.run(function () { _this.tick(); }); } });
        var isCurrentlyStable = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (observer) {
            _this._stable = _this._zone.isStable && !_this._zone.hasPendingMacrotasks &&
                !_this._zone.hasPendingMicrotasks;
            _this._zone.runOutsideAngular(function () {
                observer.next(_this._stable);
                observer.complete();
            });
        });
        var isStable = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (observer) {
            // Create the subscription to onStable outside the Angular Zone so that
            // the callback is run outside the Angular Zone.
            var stableSub;
            _this._zone.runOutsideAngular(function () {
                stableSub = _this._zone.onStable.subscribe(function () {
                    NgZone.assertNotInAngularZone();
                    // Check whether there are no pending macro/micro tasks in the next tick
                    // to allow for NgZone to update the state.
                    scheduleMicroTask(function () {
                        if (!_this._stable && !_this._zone.hasPendingMacrotasks &&
                            !_this._zone.hasPendingMicrotasks) {
                            _this._stable = true;
                            observer.next(true);
                        }
                    });
                });
            });
            var unstableSub = _this._zone.onUnstable.subscribe(function () {
                NgZone.assertInAngularZone();
                if (_this._stable) {
                    _this._stable = false;
                    _this._zone.runOutsideAngular(function () { observer.next(false); });
                }
            });
            return function () {
                stableSub.unsubscribe();
                unstableSub.unsubscribe();
            };
        });
        this.isStable =
            Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["merge"])(isCurrentlyStable, isStable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["share"])()));
    }
    ApplicationRef_1 = ApplicationRef;
    /**
     * 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'}
     */
    ApplicationRef.prototype.bootstrap = function (componentOrFactory, rootSelectorOrNode) {
        var _this = this;
        if (!this._initStatus.done) {
            throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');
        }
        var componentFactory;
        if (componentOrFactory instanceof ComponentFactory) {
            componentFactory = componentOrFactory;
        }
        else {
            componentFactory =
                this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);
        }
        this.componentTypes.push(componentFactory.componentType);
        // Create a factory associated with the current module if it's not bound to some other
        var ngModule = componentFactory instanceof ComponentFactoryBoundToModule ?
            null :
            this._injector.get(NgModuleRef);
        var selectorOrNode = rootSelectorOrNode || componentFactory.selector;
        var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);
        compRef.onDestroy(function () { _this._unloadComponent(compRef); });
        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.
     */
    ApplicationRef.prototype.tick = function () {
        var _this = this;
        if (this._runningTick) {
            throw new Error('ApplicationRef.tick is called recursively');
        }
        var scope = ApplicationRef_1._tickScope();
        try {
            this._runningTick = true;
            this._views.forEach(function (view) { return view.detectChanges(); });
            if (this._enforceNoNewChanges) {
                this._views.forEach(function (view) { return view.checkNoChanges(); });
            }
        }
        catch (e) {
            // Attention: Don't rethrow as it could cancel subscriptions to Observables!
            this._zone.runOutsideAngular(function () { return _this._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.
     */
    ApplicationRef.prototype.attachView = function (viewRef) {
        var view = viewRef;
        this._views.push(view);
        view.attachToAppRef(this);
    };
    /**
     * Detaches a view from dirty checking again.
     */
    ApplicationRef.prototype.detachView = function (viewRef) {
        var view = viewRef;
        remove(this._views, view);
        view.detachFromAppRef();
    };
    ApplicationRef.prototype._loadComponent = function (componentRef) {
        this.attachView(componentRef.hostView);
        this.tick();
        this.components.push(componentRef);
        // Get the listeners lazily to prevent DI cycles.
        var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);
        listeners.forEach(function (listener) { return listener(componentRef); });
    };
    ApplicationRef.prototype._unloadComponent = function (componentRef) {
        this.detachView(componentRef.hostView);
        remove(this.components, componentRef);
    };
    /** @internal */
    ApplicationRef.prototype.ngOnDestroy = function () {
        // TODO(alxhub): Dispose of the NgZone.
        this._views.slice().forEach(function (view) { return view.destroy(); });
    };
    Object.defineProperty(ApplicationRef.prototype, "viewCount", {
        /**
         * Returns the number of attached views.
         */
        get: function () { return this._views.length; },
        enumerable: true,
        configurable: true
    });
    var ApplicationRef_1;
    /** @internal */
    ApplicationRef._tickScope = wtfCreateScope('ApplicationRef#tick()');
    ApplicationRef = ApplicationRef_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Injectable(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [NgZone, Console, Injector,
            ErrorHandler,
            ComponentFactoryResolver,
            ApplicationInitStatus])
    ], ApplicationRef);
    return ApplicationRef;
}());
function remove(list, el) {
    var index = list.indexOf(el);
    if (index > -1) {
        list.splice(index, 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
 */

/**
 * @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
 */
/**
 * Used to load ng module factories.
 *
 * @publicApi
 */
var NgModuleFactoryLoader = /** @class */ (function () {
    function NgModuleFactoryLoader() {
    }
    return NgModuleFactoryLoader;
}());
var moduleFactories = new Map();
/**
 * Registers a loaded module. Should only be called from generated NgModuleFactory code.
 * @publicApi
 */
function registerModuleFactory(id, factory) {
    var existing = moduleFactories.get(id);
    if (existing) {
        throw new Error("Duplicate module registered for " + id + " - " + existing.moduleType.name + " vs " + factory.moduleType.name);
    }
    moduleFactories.set(id, factory);
}
/**
 * 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
 */
function getModuleFactory(id) {
    var factory = moduleFactories.get(id);
    if (!factory)
        throw new Error("No module with ID " + id + " loaded");
    return factory;
}

/**
 * @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 unmodifiable list of items that Angular keeps up to date when the state
 * of the application changes.
 *
 * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
 * provide.
 *
 * Implements an iterable interface, therefore it can be used in both ES6
 * javascript `for (var i of items)` loops as well as in Angular templates with
 * `*ngFor="let i of myList"`.
 *
 * Changes can be observed by subscribing to the changes `Observable`.
 *
 * NOTE: In the future this class will implement an `Observable` interface.
 *
 * @usageNotes
 * ### Example
 * ```typescript
 * @Component({...})
 * class Container {
 *   @ViewChildren(Item) items:QueryList<Item>;
 * }
 * ```
 *
 * @publicApi
 */
var QueryList$1 = /** @class */ (function () {
    function QueryList() {
        this.dirty = true;
        this._results = [];
        this.changes = new EventEmitter();
        this.length = 0;
    }
    /**
     * See
     * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
     */
    QueryList.prototype.map = function (fn) { return this._results.map(fn); };
    /**
     * See
     * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
     */
    QueryList.prototype.filter = function (fn) {
        return this._results.filter(fn);
    };
    /**
     * See
     * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
     */
    QueryList.prototype.find = function (fn) {
        return this._results.find(fn);
    };
    /**
     * See
     * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
     */
    QueryList.prototype.reduce = function (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)
     */
    QueryList.prototype.forEach = function (fn) { this._results.forEach(fn); };
    /**
     * See
     * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
     */
    QueryList.prototype.some = function (fn) {
        return this._results.some(fn);
    };
    QueryList.prototype.toArray = function () { return this._results.slice(); };
    QueryList.prototype[getSymbolIterator()] = function () { return this._results[getSymbolIterator()](); };
    QueryList.prototype.toString = function () { return this._results.toString(); };
    QueryList.prototype.reset = function (res) {
        this._results = flatten$2(res);
        this.dirty = false;
        this.length = this._results.length;
        this.last = this._results[this.length - 1];
        this.first = this._results[0];
    };
    QueryList.prototype.notifyOnChanges = function () { this.changes.emit(this); };
    /** internal */
    QueryList.prototype.setDirty = function () { this.dirty = true; };
    /** internal */
    QueryList.prototype.destroy = function () {
        this.changes.complete();
        this.changes.unsubscribe();
    };
    return QueryList;
}());
function flatten$2(list) {
    return list.reduce(function (flat, item) {
        var flatItem = Array.isArray(item) ? flatten$2(item) : item;
        return flat.concat(flatItem);
    }, []);
}

/**
 * @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 _SEPARATOR = '#';
var FACTORY_CLASS_SUFFIX = 'NgFactory';
/**
 * Configuration for SystemJsNgModuleLoader.
 * token.
 *
 * @publicApi
 */
var SystemJsNgModuleLoaderConfig = /** @class */ (function () {
    function SystemJsNgModuleLoaderConfig() {
    }
    return SystemJsNgModuleLoaderConfig;
}());
var DEFAULT_CONFIG = {
    factoryPathPrefix: '',
    factoryPathSuffix: '.ngfactory',
};
/**
 * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory
 * @publicApi
 */
var SystemJsNgModuleLoader = /** @class */ (function () {
    function SystemJsNgModuleLoader(_compiler, config) {
        this._compiler = _compiler;
        this._config = config || DEFAULT_CONFIG;
    }
    SystemJsNgModuleLoader.prototype.load = function (path) {
        var offlineMode = this._compiler instanceof Compiler;
        return offlineMode ? this.loadFactory(path) : this.loadAndCompile(path);
    };
    SystemJsNgModuleLoader.prototype.loadAndCompile = function (path) {
        var _this = this;
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];
        if (exportName === undefined) {
            exportName = 'default';
        }
        return __webpack_require__("./src/$$_lazy_route_resource lazy recursive")(module)
            .then(function (module) { return module[exportName]; })
            .then(function (type) { return checkNotEmpty(type, module, exportName); })
            .then(function (type) { return _this._compiler.compileModuleAsync(type); });
    };
    SystemJsNgModuleLoader.prototype.loadFactory = function (path) {
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];
        var factoryClassSuffix = FACTORY_CLASS_SUFFIX;
        if (exportName === undefined) {
            exportName = 'default';
            factoryClassSuffix = '';
        }
        return __webpack_require__("./src/$$_lazy_route_resource lazy recursive")(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)
            .then(function (module) { return module[exportName + factoryClassSuffix]; })
            .then(function (factory) { return checkNotEmpty(factory, module, exportName); });
    };
    SystemJsNgModuleLoader = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Injectable(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(1, Optional()),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Compiler, SystemJsNgModuleLoaderConfig])
    ], SystemJsNgModuleLoader);
    return SystemJsNgModuleLoader;
}());
function checkNotEmpty(value, modulePath, exportName) {
    if (!value) {
        throw new Error("Cannot find '" + exportName + "' in '" + modulePath + "'");
    }
    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
 */
/**
 * Represents a container where one or more views can be attached to a component.
 *
 * Can contain *host views* (created by instantiating a
 * component with the `createComponent()` method), and *embedded views*
 * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
 *
 * A view container instance can contain other view containers,
 * creating a [view hierarchy](guide/glossary#view-tree).
 *
 * @see `ComponentRef`
 * @see `EmbeddedViewRef`
 *
 * @publicApi
 */
var ViewContainerRef = /** @class */ (function () {
    function ViewContainerRef() {
    }
    /** @internal */
    ViewContainerRef.__NG_ELEMENT_ID__ = function () { return R3_VIEW_CONTAINER_REF_FACTORY$1(ViewContainerRef, ElementRef); };
    return ViewContainerRef;
}());

/**
 * @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
 */
/**
 * 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
 */
var ChangeDetectorRef = /** @class */ (function () {
    function ChangeDetectorRef() {
    }
    /** @internal */
    ChangeDetectorRef.__NG_ELEMENT_ID__ = function () { return R3_CHANGE_DETECTOR_REF_FACTORY$1(); };
    return ChangeDetectorRef;
}());

/**
 * @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 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
 */
var ViewRef$1 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ViewRef, _super);
    function ViewRef() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return ViewRef;
}(ChangeDetectorRef));
/**
 * Represents an Angular [view](guide/glossary#view) in a view container.
 * An [embedded view](guide/glossary#view-tree) can be referenced from a component
 * other than the hosting component whose template defines it, or it can be defined
 * independently by a `TemplateRef`.
 *
 * Properties of elements in a view can change, but the structure (number and order) of elements in
 * a view cannot. Change the structure of elements by inserting, moving, or
 * removing nested views in a view container.
 *
 * @see `ViewContainerRef`
 *
 * @usageNotes
 *
 * The following template breaks down into two separate `TemplateRef` instances,
 * an outer one and an inner one.
 *
 * ```
 * Count: {{items.length}}
 * <ul>
 *   <li *ngFor="let  item of items">{{item}}</li>
 * </ul>
 * ```
 *
 * This is the outer `TemplateRef`:
 *
 * ```
 * Count: {{items.length}}
 * <ul>
 *   <ng-template ngFor let-item [ngForOf]="items"></ng-template>
 * </ul>
 * ```
 *
 * This is the inner `TemplateRef`:
 *
 * ```
 *   <li>{{item}}</li>
 * ```
 *
 * The outer and inner `TemplateRef` instances are assembled into views as follows:
 *
 * ```
 * <!-- ViewRef: outer-0 -->
 * Count: 2
 * <ul>
 *   <ng-template view-container-ref></ng-template>
 *   <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
 *   <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
 * </ul>
 * <!-- /ViewRef: outer-0 -->
 * ```
 * @publicApi
 */
var EmbeddedViewRef = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(EmbeddedViewRef, _super);
    function EmbeddedViewRef() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return EmbeddedViewRef;
}(ViewRef$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
 */

/**
 * @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 EventListener = /** @class */ (function () {
    function EventListener(name, callback) {
        this.name = name;
        this.callback = callback;
    }
    return EventListener;
}());
/**
 * @publicApi
 */
var DebugNode = /** @class */ (function () {
    function DebugNode(nativeNode, parent, _debugContext) {
        this.nativeNode = nativeNode;
        this._debugContext = _debugContext;
        this.listeners = [];
        this.parent = null;
        if (parent && parent instanceof DebugElement) {
            parent.addChild(this);
        }
    }
    Object.defineProperty(DebugNode.prototype, "injector", {
        get: function () { return this._debugContext.injector; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugNode.prototype, "componentInstance", {
        get: function () { return this._debugContext.component; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugNode.prototype, "context", {
        get: function () { return this._debugContext.context; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugNode.prototype, "references", {
        get: function () { return this._debugContext.references; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugNode.prototype, "providerTokens", {
        get: function () { return this._debugContext.providerTokens; },
        enumerable: true,
        configurable: true
    });
    return DebugNode;
}());
/**
 * @publicApi
 */
var DebugElement = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DebugElement, _super);
    function DebugElement(nativeNode, parent, _debugContext) {
        var _this = _super.call(this, nativeNode, parent, _debugContext) || this;
        _this.properties = {};
        _this.attributes = {};
        _this.classes = {};
        _this.styles = {};
        _this.childNodes = [];
        _this.nativeElement = nativeNode;
        return _this;
    }
    DebugElement.prototype.addChild = function (child) {
        if (child) {
            this.childNodes.push(child);
            child.parent = this;
        }
    };
    DebugElement.prototype.removeChild = function (child) {
        var childIndex = this.childNodes.indexOf(child);
        if (childIndex !== -1) {
            child.parent = null;
            this.childNodes.splice(childIndex, 1);
        }
    };
    DebugElement.prototype.insertChildrenAfter = function (child, newChildren) {
        var _this = this;
        var _a;
        var siblingIndex = this.childNodes.indexOf(child);
        if (siblingIndex !== -1) {
            (_a = this.childNodes).splice.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([siblingIndex + 1, 0], newChildren));
            newChildren.forEach(function (c) {
                if (c.parent) {
                    c.parent.removeChild(c);
                }
                c.parent = _this;
            });
        }
    };
    DebugElement.prototype.insertBefore = function (refChild, newChild) {
        var refIndex = this.childNodes.indexOf(refChild);
        if (refIndex === -1) {
            this.addChild(newChild);
        }
        else {
            if (newChild.parent) {
                newChild.parent.removeChild(newChild);
            }
            newChild.parent = this;
            this.childNodes.splice(refIndex, 0, newChild);
        }
    };
    DebugElement.prototype.query = function (predicate) {
        var results = this.queryAll(predicate);
        return results[0] || null;
    };
    DebugElement.prototype.queryAll = function (predicate) {
        var matches = [];
        _queryElementChildren(this, predicate, matches);
        return matches;
    };
    DebugElement.prototype.queryAllNodes = function (predicate) {
        var matches = [];
        _queryNodeChildren(this, predicate, matches);
        return matches;
    };
    Object.defineProperty(DebugElement.prototype, "children", {
        get: function () {
            return this.childNodes.filter(function (node) { return node instanceof DebugElement; });
        },
        enumerable: true,
        configurable: true
    });
    DebugElement.prototype.triggerEventHandler = function (eventName, eventObj) {
        this.listeners.forEach(function (listener) {
            if (listener.name == eventName) {
                listener.callback(eventObj);
            }
        });
    };
    return DebugElement;
}(DebugNode));
/**
 * @publicApi
 */
function asNativeElements(debugEls) {
    return debugEls.map(function (el) { return el.nativeElement; });
}
function _queryElementChildren(element, predicate, matches) {
    element.childNodes.forEach(function (node) {
        if (node instanceof DebugElement) {
            if (predicate(node)) {
                matches.push(node);
            }
            _queryElementChildren(node, predicate, matches);
        }
    });
}
function _queryNodeChildren(parentNode, predicate, matches) {
    if (parentNode instanceof DebugElement) {
        parentNode.childNodes.forEach(function (node) {
            if (predicate(node)) {
                matches.push(node);
            }
            if (node instanceof DebugElement) {
                _queryNodeChildren(node, predicate, matches);
            }
        });
    }
}
// Need to keep the nodes in a global Map so that multiple angular apps are supported.
var _nativeNodeToDebugNode = new Map();
/**
 * @publicApi
 */
function getDebugNode(nativeNode) {
    return _nativeNodeToDebugNode.get(nativeNode) || null;
}
function indexDebugNode(node) {
    _nativeNodeToDebugNode.set(node.nativeNode, node);
}
function removeDebugNodeFromIndex(node) {
    _nativeNodeToDebugNode.delete(node.nativeNode);
}

/**
 * @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 DefaultIterableDifferFactory = /** @class */ (function () {
    function DefaultIterableDifferFactory() {
    }
    DefaultIterableDifferFactory.prototype.supports = function (obj) { return isListLikeIterable(obj); };
    DefaultIterableDifferFactory.prototype.create = function (trackByFn) {
        return new DefaultIterableDiffer(trackByFn);
    };
    return DefaultIterableDifferFactory;
}());
var trackByIdentity = function (index, item) { return item; };
/**
 * @deprecated v4.0.0 - Should not be part of public API.
 * @publicApi
 */
var DefaultIterableDiffer = /** @class */ (function () {
    function DefaultIterableDiffer(trackByFn) {
        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;
    }
    DefaultIterableDiffer.prototype.forEachItem = function (fn) {
        var record;
        for (record = this._itHead; record !== null; record = record._next) {
            fn(record);
        }
    };
    DefaultIterableDiffer.prototype.forEachOperation = function (fn) {
        var nextIt = this._itHead;
        var nextRemove = this._removalsHead;
        var addRemoveOffset = 0;
        var moveOffsets = null;
        while (nextIt || nextRemove) {
            // Figure out which is the next record to process
            // Order: remove, add, move
            var record = !nextRemove ||
                nextIt &&
                    nextIt.currentIndex <
                        getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?
                nextIt :
                nextRemove;
            var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
            var currentIndex = record.currentIndex;
            // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary
            if (record === nextRemove) {
                addRemoveOffset--;
                nextRemove = nextRemove._nextRemoved;
            }
            else {
                nextIt = nextIt._next;
                if (record.previousIndex == null) {
                    addRemoveOffset++;
                }
                else {
                    // INVARIANT:  currentIndex < previousIndex
                    if (!moveOffsets)
                        moveOffsets = [];
                    var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
                    var localCurrentIndex = currentIndex - addRemoveOffset;
                    if (localMovePreviousIndex != localCurrentIndex) {
                        for (var i = 0; i < localMovePreviousIndex; i++) {
                            var offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);
                            var index = offset + i;
                            if (localCurrentIndex <= index && index < localMovePreviousIndex) {
                                moveOffsets[i] = offset + 1;
                            }
                        }
                        var previousIndex = record.previousIndex;
                        moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
                    }
                }
            }
            if (adjPreviousIndex !== currentIndex) {
                fn(record, adjPreviousIndex, currentIndex);
            }
        }
    };
    DefaultIterableDiffer.prototype.forEachPreviousItem = function (fn) {
        var record;
        for (record = this._previousItHead; record !== null; record = record._nextPrevious) {
            fn(record);
        }
    };
    DefaultIterableDiffer.prototype.forEachAddedItem = function (fn) {
        var record;
        for (record = this._additionsHead; record !== null; record = record._nextAdded) {
            fn(record);
        }
    };
    DefaultIterableDiffer.prototype.forEachMovedItem = function (fn) {
        var record;
        for (record = this._movesHead; record !== null; record = record._nextMoved) {
            fn(record);
        }
    };
    DefaultIterableDiffer.prototype.forEachRemovedItem = function (fn) {
        var record;
        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
            fn(record);
        }
    };
    DefaultIterableDiffer.prototype.forEachIdentityChange = function (fn) {
        var record;
        for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {
            fn(record);
        }
    };
    DefaultIterableDiffer.prototype.diff = function (collection) {
        if (collection == null)
            collection = [];
        if (!isListLikeIterable(collection)) {
            throw new Error("Error trying to diff '" + stringify(collection) + "'. Only arrays and iterables are allowed");
        }
        if (this.check(collection)) {
            return this;
        }
        else {
            return null;
        }
    };
    DefaultIterableDiffer.prototype.onDestroy = function () { };
    DefaultIterableDiffer.prototype.check = function (collection) {
        var _this = this;
        this._reset();
        var record = this._itHead;
        var mayBeDirty = false;
        var index;
        var item;
        var itemTrackBy;
        if (Array.isArray(collection)) {
            this.length = collection.length;
            for (var index_1 = 0; index_1 < this.length; index_1++) {
                item = collection[index_1];
                itemTrackBy = this._trackByFn(index_1, item);
                if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {
                    record = this._mismatch(record, item, itemTrackBy, index_1);
                    mayBeDirty = true;
                }
                else {
                    if (mayBeDirty) {
                        // TODO(misko): can we limit this to duplicates only?
                        record = this._verifyReinsertion(record, item, itemTrackBy, index_1);
                    }
                    if (!looseIdentical(record.item, item))
                        this._addIdentityChange(record, item);
                }
                record = record._next;
            }
        }
        else {
            index = 0;
            iterateListLike(collection, function (item) {
                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;
                index++;
            });
            this.length = index;
        }
        this._truncate(record);
        this.collection = collection;
        return this.isDirty;
    };
    Object.defineProperty(DefaultIterableDiffer.prototype, "isDirty", {
        /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity
         * changes.
         */
        get: function () {
            return this._additionsHead !== null || this._movesHead !== null ||
                this._removalsHead !== null || this._identityChangesHead !== null;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * 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
     */
    DefaultIterableDiffer.prototype._reset = function () {
        if (this.isDirty) {
            var record = void 0;
            var nextRecord = void 0;
            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
     */
    DefaultIterableDiffer.prototype._mismatch = function (record, item, itemTrackBy, index) {
        // The previous record after which we will append the current one.
        var previousRecord;
        if (record === null) {
            previousRecord = this._itTail;
        }
        else {
            previousRecord = record._prev;
            // Remove the record from the collection since we know it does not match the item.
            this._remove(record);
        }
        // Attempt to see if we have seen the item before.
        record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);
        if (record !== null) {
            // We have seen this before, we need to move it forward in the collection.
            // But first we need to check if identity changed, so we can update in view if necessary
            if (!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
     */
    DefaultIterableDiffer.prototype._verifyReinsertion = function (record, item, itemTrackBy, index) {
        var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
        if (reinsertRecord !== null) {
            record = this._reinsertAfter(reinsertRecord, record._prev, index);
        }
        else if (record.currentIndex != index) {
            record.currentIndex = index;
            this._addToMoves(record, index);
        }
        return record;
    };
    /**
     * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
     *
     * - `record` The first excess {@link IterableChangeRecord_}.
     *
     * @internal
     */
    DefaultIterableDiffer.prototype._truncate = function (record) {
        // Anything after that needs to be removed;
        while (record !== null) {
            var nextRecord = record._next;
            this._addToRemovals(this._unlink(record));
            record = nextRecord;
        }
        if (this._unlinkedRecords !== null) {
            this._unlinkedRecords.clear();
        }
        if (this._additionsTail !== null) {
            this._additionsTail._nextAdded = null;
        }
        if (this._movesTail !== null) {
            this._movesTail._nextMoved = null;
        }
        if (this._itTail !== null) {
            this._itTail._next = null;
        }
        if (this._removalsTail !== null) {
            this._removalsTail._nextRemoved = null;
        }
        if (this._identityChangesTail !== null) {
            this._identityChangesTail._nextIdentityChange = null;
        }
    };
    /** @internal */
    DefaultIterableDiffer.prototype._reinsertAfter = function (record, prevRecord, index) {
        if (this._unlinkedRecords !== null) {
            this._unlinkedRecords.remove(record);
        }
        var prev = record._prevRemoved;
        var next = record._nextRemoved;
        if (prev === null) {
            this._removalsHead = next;
        }
        else {
            prev._nextRemoved = next;
        }
        if (next === null) {
            this._removalsTail = prev;
        }
        else {
            next._prevRemoved = prev;
        }
        this._insertAfter(record, prevRecord, index);
        this._addToMoves(record, index);
        return record;
    };
    /** @internal */
    DefaultIterableDiffer.prototype._moveAfter = function (record, prevRecord, index) {
        this._unlink(record);
        this._insertAfter(record, prevRecord, index);
        this._addToMoves(record, index);
        return record;
    };
    /** @internal */
    DefaultIterableDiffer.prototype._addAfter = function (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 */
    DefaultIterableDiffer.prototype._insertAfter = function (record, prevRecord, index) {
        // TODO(vicb):
        // assert(record != prevRecord);
        // assert(record._next === null);
        // assert(record._prev === null);
        var next = prevRecord === null ? this._itHead : prevRecord._next;
        // TODO(vicb):
        // assert(next != record);
        // assert(prevRecord != record);
        record._next = next;
        record._prev = prevRecord;
        if (next === null) {
            this._itTail = record;
        }
        else {
            next._prev = record;
        }
        if (prevRecord === null) {
            this._itHead = record;
        }
        else {
            prevRecord._next = record;
        }
        if (this._linkedRecords === null) {
            this._linkedRecords = new _DuplicateMap();
        }
        this._linkedRecords.put(record);
        record.currentIndex = index;
        return record;
    };
    /** @internal */
    DefaultIterableDiffer.prototype._remove = function (record) {
        return this._addToRemovals(this._unlink(record));
    };
    /** @internal */
    DefaultIterableDiffer.prototype._unlink = function (record) {
        if (this._linkedRecords !== null) {
            this._linkedRecords.remove(record);
        }
        var prev = record._prev;
        var next = record._next;
        // TODO(vicb):
        // assert((record._prev = null) === null);
        // assert((record._next = null) === null);
        if (prev === null) {
            this._itHead = next;
        }
        else {
            prev._next = next;
        }
        if (next === null) {
            this._itTail = prev;
        }
        else {
            next._prev = prev;
        }
        return record;
    };
    /** @internal */
    DefaultIterableDiffer.prototype._addToMoves = function (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;
    };
    DefaultIterableDiffer.prototype._addToRemovals = function (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 */
    DefaultIterableDiffer.prototype._addIdentityChange = function (record, item) {
        record.item = item;
        if (this._identityChangesTail === null) {
            this._identityChangesTail = this._identityChangesHead = record;
        }
        else {
            this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;
        }
        return record;
    };
    return DefaultIterableDiffer;
}());
var IterableChangeRecord_ = /** @class */ (function () {
    function IterableChangeRecord_(item, trackById) {
        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;
    }
    return IterableChangeRecord_;
}());
// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item
var _DuplicateItemRecordList = /** @class */ (function () {
    function _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.
     */
    _DuplicateItemRecordList.prototype.add = function (record) {
        if (this._head === null) {
            this._head = this._tail = record;
            record._nextDup = null;
            record._prevDup = null;
        }
        else {
            // TODO(vicb):
            // assert(record.item ==  _head.item ||
            //       record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);
            this._tail._nextDup = record;
            record._prevDup = this._tail;
            record._nextDup = null;
            this._tail = record;
        }
    };
    // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
    // IterableChangeRecord_.currentIndex >= atOrAfterIndex
    _DuplicateItemRecordList.prototype.get = function (trackById, atOrAfterIndex) {
        var record;
        for (record = this._head; record !== null; record = record._nextDup) {
            if ((atOrAfterIndex === null || atOrAfterIndex <= 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.
     */
    _DuplicateItemRecordList.prototype.remove = function (record) {
        // TODO(vicb):
        // assert(() {
        //  // verify that the record being removed is in the list.
        //  for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {
        //    if (identical(cursor, record)) return true;
        //  }
        //  return false;
        //});
        var prev = record._prevDup;
        var next = record._nextDup;
        if (prev === null) {
            this._head = next;
        }
        else {
            prev._nextDup = next;
        }
        if (next === null) {
            this._tail = prev;
        }
        else {
            next._prevDup = prev;
        }
        return this._head === null;
    };
    return _DuplicateItemRecordList;
}());
var _DuplicateMap = /** @class */ (function () {
    function _DuplicateMap() {
        this.map = new Map();
    }
    _DuplicateMap.prototype.put = function (record) {
        var key = record.trackById;
        var duplicates = this.map.get(key);
        if (!duplicates) {
            duplicates = new _DuplicateItemRecordList();
            this.map.set(key, duplicates);
        }
        duplicates.add(record);
    };
    /**
     * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
     * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
     *
     * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
     * have any more `a`s needs to return the second `a`.
     */
    _DuplicateMap.prototype.get = function (trackById, atOrAfterIndex) {
        var key = trackById;
        var recordList = this.map.get(key);
        return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
    };
    /**
     * Removes a {@link IterableChangeRecord_} from the list of duplicates.
     *
     * The list of duplicates also is removed from the map if it gets empty.
     */
    _DuplicateMap.prototype.remove = function (record) {
        var key = record.trackById;
        var recordList = this.map.get(key);
        // Remove the list of duplicates when it gets empty
        if (recordList.remove(record)) {
            this.map.delete(key);
        }
        return record;
    };
    Object.defineProperty(_DuplicateMap.prototype, "isEmpty", {
        get: function () { return this.map.size === 0; },
        enumerable: true,
        configurable: true
    });
    _DuplicateMap.prototype.clear = function () { this.map.clear(); };
    return _DuplicateMap;
}());
function getPreviousIndex(item, addRemoveOffset, moveOffsets) {
    var previousIndex = item.previousIndex;
    if (previousIndex === null)
        return previousIndex;
    var moveOffset = 0;
    if (moveOffsets && previousIndex < moveOffsets.length) {
        moveOffset = moveOffsets[previousIndex];
    }
    return previousIndex + addRemoveOffset + moveOffset;
}

/**
 * @license
 * Copyright Google 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 DefaultKeyValueDifferFactory = /** @class */ (function () {
    function DefaultKeyValueDifferFactory() {
    }
    DefaultKeyValueDifferFactory.prototype.supports = function (obj) { return obj instanceof Map || isJsObject(obj); };
    DefaultKeyValueDifferFactory.prototype.create = function () { return new DefaultKeyValueDiffer(); };
    return DefaultKeyValueDifferFactory;
}());
var DefaultKeyValueDiffer = /** @class */ (function () {
    function 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;
    }
    Object.defineProperty(DefaultKeyValueDiffer.prototype, "isDirty", {
        get: function () {
            return this._additionsHead !== null || this._changesHead !== null ||
                this._removalsHead !== null;
        },
        enumerable: true,
        configurable: true
    });
    DefaultKeyValueDiffer.prototype.forEachItem = function (fn) {
        var record;
        for (record = this._mapHead; record !== null; record = record._next) {
            fn(record);
        }
    };
    DefaultKeyValueDiffer.prototype.forEachPreviousItem = function (fn) {
        var record;
        for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
            fn(record);
        }
    };
    DefaultKeyValueDiffer.prototype.forEachChangedItem = function (fn) {
        var record;
        for (record = this._changesHead; record !== null; record = record._nextChanged) {
            fn(record);
        }
    };
    DefaultKeyValueDiffer.prototype.forEachAddedItem = function (fn) {
        var record;
        for (record = this._additionsHead; record !== null; record = record._nextAdded) {
            fn(record);
        }
    };
    DefaultKeyValueDiffer.prototype.forEachRemovedItem = function (fn) {
        var record;
        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
            fn(record);
        }
    };
    DefaultKeyValueDiffer.prototype.diff = function (map) {
        if (!map) {
            map = new Map();
        }
        else if (!(map instanceof Map || isJsObject(map))) {
            throw new Error("Error trying to diff '" + stringify(map) + "'. Only maps and objects are allowed");
        }
        return this.check(map) ? this : null;
    };
    DefaultKeyValueDiffer.prototype.onDestroy = function () { };
    /**
     * Check the current state of the map vs the previous.
     * The algorithm is optimised for when the keys do no change.
     */
    DefaultKeyValueDiffer.prototype.check = function (map) {
        var _this = this;
        this._reset();
        var insertBefore = this._mapHead;
        this._appendAfter = null;
        this._forEach(map, function (value, key) {
            if (insertBefore && insertBefore.key === key) {
                _this._maybeAddToChanges(insertBefore, value);
                _this._appendAfter = insertBefore;
                insertBefore = insertBefore._next;
            }
            else {
                var record = _this._getOrCreateRecordForKey(key, value);
                insertBefore = _this._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.
     */
    DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = function (before, record) {
        if (before) {
            var prev = before._prev;
            record._next = before;
            record._prev = prev;
            before._prev = record;
            if (prev) {
                prev._next = record;
            }
            if (before === this._mapHead) {
                this._mapHead = record;
            }
            this._appendAfter = before;
            return before;
        }
        if (this._appendAfter) {
            this._appendAfter._next = record;
            record._prev = this._appendAfter;
        }
        else {
            this._mapHead = record;
        }
        this._appendAfter = record;
        return null;
    };
    DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey = function (key, value) {
        if (this._records.has(key)) {
            var record_1 = this._records.get(key);
            this._maybeAddToChanges(record_1, value);
            var prev = record_1._prev;
            var next = record_1._next;
            if (prev) {
                prev._next = next;
            }
            if (next) {
                next._prev = prev;
            }
            record_1._next = null;
            record_1._prev = null;
            return record_1;
        }
        var record = new KeyValueChangeRecord_(key);
        this._records.set(key, record);
        record.currentValue = value;
        this._addToAdditions(record);
        return record;
    };
    /** @internal */
    DefaultKeyValueDiffer.prototype._reset = function () {
        if (this.isDirty) {
            var record = void 0;
            // 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
    DefaultKeyValueDiffer.prototype._maybeAddToChanges = function (record, newValue) {
        if (!looseIdentical(newValue, record.currentValue)) {
            record.previousValue = record.currentValue;
            record.currentValue = newValue;
            this._addToChanges(record);
        }
    };
    DefaultKeyValueDiffer.prototype._addToAdditions = function (record) {
        if (this._additionsHead === null) {
            this._additionsHead = this._additionsTail = record;
        }
        else {
            this._additionsTail._nextAdded = record;
            this._additionsTail = record;
        }
    };
    DefaultKeyValueDiffer.prototype._addToChanges = function (record) {
        if (this._changesHead === null) {
            this._changesHead = this._changesTail = record;
        }
        else {
            this._changesTail._nextChanged = record;
            this._changesTail = record;
        }
    };
    /** @internal */
    DefaultKeyValueDiffer.prototype._forEach = function (obj, fn) {
        if (obj instanceof Map) {
            obj.forEach(fn);
        }
        else {
            Object.keys(obj).forEach(function (k) { return fn(obj[k], k); });
        }
    };
    return DefaultKeyValueDiffer;
}());
var KeyValueChangeRecord_ = /** @class */ (function () {
    function KeyValueChangeRecord_(key) {
        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;
    }
    return KeyValueChangeRecord_;
}());

/**
 * @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 repository of different iterable diffing strategies used by NgFor, NgClass, and others.
 *
 * @publicApi
 */
var IterableDiffers = /** @class */ (function () {
    function IterableDiffers(factories) {
        this.factories = factories;
    }
    IterableDiffers.create = function (factories, parent) {
        if (parent != null) {
            var copied = parent.factories.slice();
            factories = factories.concat(copied);
        }
        return new IterableDiffers(factories);
    };
    /**
     * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
     * inherited {@link IterableDiffers} instance with the provided factories and return a new
     * {@link IterableDiffers} instance.
     *
     * @usageNotes
     * ### Example
     *
     * The following example shows how to extend an existing list of factories,
     * which will only be applied to the injector for this component and its children.
     * This step is all that's required to make a new {@link IterableDiffer} available.
     *
     * ```
     * @Component({
     *   viewProviders: [
     *     IterableDiffers.extend([new ImmutableListDiffer()])
     *   ]
     * })
     * ```
     */
    IterableDiffers.extend = function (factories) {
        return {
            provide: IterableDiffers,
            useFactory: function (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()]]
        };
    };
    IterableDiffers.prototype.find = function (iterable) {
        var factory = this.factories.find(function (f) { return f.supports(iterable); });
        if (factory != null) {
            return factory;
        }
        else {
            throw new Error("Cannot find a differ supporting object '" + iterable + "' of type '" + getTypeNameForDebugging(iterable) + "'");
        }
    };
    IterableDiffers.ngInjectableDef = defineInjectable({
        providedIn: 'root',
        factory: function () { return new IterableDiffers([new DefaultIterableDifferFactory()]); }
    });
    return IterableDiffers;
}());
function getTypeNameForDebugging(type) {
    return type['name'] || typeof 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
 */
/**
 * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
 *
 * @publicApi
 */
var KeyValueDiffers = /** @class */ (function () {
    function KeyValueDiffers(factories) {
        this.factories = factories;
    }
    KeyValueDiffers.create = function (factories, parent) {
        if (parent) {
            var copied = parent.factories.slice();
            factories = factories.concat(copied);
        }
        return new KeyValueDiffers(factories);
    };
    /**
     * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
     * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
     * {@link KeyValueDiffers} instance.
     *
     * @usageNotes
     * ### Example
     *
     * The following example shows how to extend an existing list of factories,
     * which will only be applied to the injector for this component and its children.
     * This step is all that's required to make a new {@link KeyValueDiffer} available.
     *
     * ```
     * @Component({
     *   viewProviders: [
     *     KeyValueDiffers.extend([new ImmutableMapDiffer()])
     *   ]
     * })
     * ```
     */
    KeyValueDiffers.extend = function (factories) {
        return {
            provide: KeyValueDiffers,
            useFactory: function (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()]]
        };
    };
    KeyValueDiffers.prototype.find = function (kv) {
        var factory = this.factories.find(function (f) { return f.supports(kv); });
        if (factory) {
            return factory;
        }
        throw new Error("Cannot find a differ supporting object '" + kv + "'");
    };
    return KeyValueDiffers;
}());

/**
 * @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
 */
/**
 * Structural diffing for `Object`s and `Map`s.
 */
var keyValDiff = [new DefaultKeyValueDifferFactory()];
/**
 * Structural diffing for `Iterable` types such as `Array`s.
 */
var iterableDiff = [new DefaultIterableDifferFactory()];
var defaultIterableDiffers = new IterableDiffers(iterableDiff);
var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);

/**
 * @license
 * Copyright Google 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
 */
var _CORE_PLATFORM_PROVIDERS = [
    // Set a default platform name for platforms that don't set it explicitly.
    { provide: PLATFORM_ID, useValue: 'unknown' },
    { provide: PlatformRef, deps: [Injector] },
    { provide: TestabilityRegistry, deps: [] },
    { provide: Console, deps: [] },
];
/**
 * This platform has to be included in any other platform
 *
 * @publicApi
 */
var platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);

/**
 * @license
 * Copyright Google 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
 */
/**
 * Provide this token to set the locale of your application.
 * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
 * DecimalPipe and PercentPipe) and by ICU expressions.
 *
 * See the [i18n guide](guide/i18n#setting-up-locale) for more information.
 *
 * @usageNotes
 * ### Example
 *
 * ```typescript
 * import { LOCALE_ID } from '@angular/core';
 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
 * import { AppModule } from './app/app.module';
 *
 * platformBrowserDynamic().bootstrapModule(AppModule, {
 *   providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
 * });
 * ```
 *
 * @publicApi
 */
var LOCALE_ID = 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
 */
var TRANSLATIONS = new InjectionToken('Translations');
/**
 * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
 * `xlf` or `xlf2`.
 *
 * See the [i18n guide](guide/i18n#merge) for more information.
 *
 * @usageNotes
 * ### Example
 *
 * ```typescript
 * import { TRANSLATIONS_FORMAT } from '@angular/core';
 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
 * import { AppModule } from './app/app.module';
 *
 * platformBrowserDynamic().bootstrapModule(AppModule, {
 *   providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
 * });
 * ```
 *
 * @publicApi
 */
var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');
/**
 * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
 * that the compiler should use in case of missing translations:
 * - Error: throw if you have missing translations.
 * - Warning (default): show a warning in the console and/or shell.
 * - Ignore: do nothing.
 *
 * See the [i18n guide](guide/i18n#missing-translation) for more information.
 *
 * @usageNotes
 * ### Example
 * ```typescript
 * import { MissingTranslationStrategy } from '@angular/core';
 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
 * import { AppModule } from './app/app.module';
 *
 * platformBrowserDynamic().bootstrapModule(AppModule, {
 *   missingTranslation: MissingTranslationStrategy.Error
 * });
 * ```
 *
 * @publicApi
 */
var MissingTranslationStrategy;
(function (MissingTranslationStrategy) {
    MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error";
    MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning";
    MissingTranslationStrategy[MissingTranslationStrategy["Ignore"] = 2] = "Ignore";
})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));

/**
 * @license
 * Copyright Google 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 _iterableDiffersFactory() {
    return defaultIterableDiffers;
}
function _keyValueDiffersFactory() {
    return defaultKeyValueDiffers;
}
function _localeFactory(locale) {
    return locale || 'en-US';
}
/**
 * A built-in [dependency injection token](guide/glossary#di-token)
 * that is used to configure the root injector for bootstrapping.
 */
var APPLICATION_MODULE_PROVIDERS = [
    {
        provide: ApplicationRef,
        useClass: ApplicationRef,
        deps: [NgZone, Console, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]
    },
    {
        provide: 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,
        useFactory: _localeFactory,
        deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]
    },
];
/**
 * 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 = /** @class */ (function () {
    // Inject ApplicationRef to make it eager...
    function ApplicationModule(appRef) {
    }
    ApplicationModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        NgModule({ providers: APPLICATION_MODULE_PROVIDERS }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [ApplicationRef])
    ], ApplicationModule);
    return ApplicationModule;
}());

/**
 * @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
 */
// Called before each cycle of a view's check to detect whether this is in the
// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit
// lifecycle methods. Returns true if this check cycle should call lifecycle
// methods.
function shiftInitState(view, priorInitState, newInitState) {
    // Only update the InitState if we are currently in the prior state.
    // For example, only move into CallingInit if we are in BeforeInit. Only
    // move into CallingContentInit if we are in CallingInit. Normally this will
    // always be true because of how checkCycle is called in checkAndUpdateView.
    // However, if checkAndUpdateView is called recursively or if an exception is
    // thrown while checkAndUpdateView is running, checkAndUpdateView starts over
    // from the beginning. This ensures the state is monotonically increasing,
    // terminating in the AfterInit state, which ensures the Init methods are called
    // at least once and only once.
    var state = view.state;
    var initState = state & 1792 /* InitState_Mask */;
    if (initState === priorInitState) {
        view.state = (state & ~1792 /* InitState_Mask */) | newInitState;
        view.initIndex = -1;
        return true;
    }
    return initState === newInitState;
}
// Returns true if the lifecycle init method should be called for the node with
// the given init index.
function shouldCallLifecycleInitHook(view, initState, index) {
    if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {
        view.initIndex = index + 1;
        return true;
    }
    return false;
}
/**
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
 */
function asTextData(view, index) {
    return view.nodes[index];
}
/**
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
 */
function asElementData(view, index) {
    return view.nodes[index];
}
/**
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
 */
function asProviderData(view, index) {
    return view.nodes[index];
}
/**
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
 */
function asPureExpressionData(view, index) {
    return view.nodes[index];
}
/**
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
 */
function asQueryList(view, index) {
    return view.nodes[index];
}
var DebugContext = /** @class */ (function () {
    function DebugContext() {
    }
    return DebugContext;
}());
/**
 * This object is used to prevent cycles in the source files and to have a place where
 * debug mode can hook it. It is lazily filled when `isDevMode` is known.
 */
var Services = {
    setCurrentNode: undefined,
    createRootView: undefined,
    createEmbeddedView: undefined,
    createComponentView: undefined,
    createNgModuleRef: undefined,
    overrideProvider: undefined,
    overrideComponentView: undefined,
    clearOverrides: undefined,
    checkAndUpdateView: undefined,
    checkNoChangesView: undefined,
    destroyView: undefined,
    resolveDep: undefined,
    createDebugContext: undefined,
    handleEvent: undefined,
    updateDirectives: undefined,
    updateRenderer: undefined,
    dirtyParentQueries: undefined,
};

/**
 * @license
 * Copyright Google 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 expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {
    var msg = "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '" + oldValue + "'. Current value: '" + currValue + "'.";
    if (isFirstCheck) {
        msg +=
            " It seems like the view has been created after its parent and its children have been dirty checked." +
                " Has it been created in a change detection hook ?";
    }
    return viewDebugError(msg, context);
}
function viewWrappedDebugError(err, context) {
    if (!(err instanceof Error)) {
        // errors that are not Error instances don't have a stack,
        // so it is ok to wrap them into a new Error object...
        err = new Error(err.toString());
    }
    _addDebugContext(err, context);
    return err;
}
function viewDebugError(msg, context) {
    var err = new Error(msg);
    _addDebugContext(err, context);
    return err;
}
function _addDebugContext(err, context) {
    err[ERROR_DEBUG_CONTEXT] = context;
    err[ERROR_LOGGER] = context.logError.bind(context);
}
function isViewDebugError(err) {
    return !!getDebugContext(err);
}
function viewDestroyedError(action) {
    return new Error("ViewDestroyedError: Attempt to use a destroyed view: " + action);
}

/**
 * @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 NOOP = function () { };
var _tokenKeyCache = new Map();
function tokenKey(token) {
    var key = _tokenKeyCache.get(token);
    if (!key) {
        key = stringify(token) + '_' + _tokenKeyCache.size;
        _tokenKeyCache.set(token, key);
    }
    return key;
}
function unwrapValue(view, nodeIdx, bindingIdx, value) {
    if (WrappedValue.isWrapped(value)) {
        value = WrappedValue.unwrap(value);
        var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;
        var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);
        view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);
    }
    return value;
}
var UNDEFINED_RENDERER_TYPE_ID = '$$undefined';
var EMPTY_RENDERER_TYPE_ID = '$$empty';
// Attention: this function is called as top level function.
// Putting any logic in here will destroy closure tree shaking!
function createRendererType2(values) {
    return {
        id: UNDEFINED_RENDERER_TYPE_ID,
        styles: values.styles,
        encapsulation: values.encapsulation,
        data: values.data
    };
}
var _renderCompCount$1 = 0;
function resolveRendererType2(type) {
    if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {
        // first time we see this RendererType2. Initialize it...
        var isFilled = ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) ||
            type.styles.length || Object.keys(type.data).length);
        if (isFilled) {
            type.id = "c" + _renderCompCount$1++;
        }
        else {
            type.id = EMPTY_RENDERER_TYPE_ID;
        }
    }
    if (type && type.id === EMPTY_RENDERER_TYPE_ID) {
        type = null;
    }
    return type || null;
}
function checkBinding(view, def, bindingIdx, value) {
    var oldValues = view.oldValues;
    if ((view.state & 2 /* FirstCheck */) ||
        !looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) {
        return true;
    }
    return false;
}
function checkAndUpdateBinding(view, def, bindingIdx, value) {
    if (checkBinding(view, def, bindingIdx, value)) {
        view.oldValues[def.bindingIndex + bindingIdx] = value;
        return true;
    }
    return false;
}
function checkBindingNoChanges(view, def, bindingIdx, value) {
    var oldValue = view.oldValues[def.bindingIndex + bindingIdx];
    if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) {
        var bindingName = def.bindings[bindingIdx].name;
        throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), bindingName + ": " + oldValue, bindingName + ": " + value, (view.state & 1 /* BeforeFirstCheck */) !== 0);
    }
}
function markParentViewsForCheck(view) {
    var currView = view;
    while (currView) {
        if (currView.def.flags & 2 /* OnPush */) {
            currView.state |= 8 /* ChecksEnabled */;
        }
        currView = currView.viewContainerParent || currView.parent;
    }
}
function markParentViewsForCheckProjectedViews(view, endView) {
    var currView = view;
    while (currView && currView !== endView) {
        currView.state |= 64 /* CheckProjectedViews */;
        currView = currView.viewContainerParent || currView.parent;
    }
}
function dispatchEvent(view, nodeIndex, eventName, event) {
    try {
        var nodeDef = view.def.nodes[nodeIndex];
        var startView = nodeDef.flags & 33554432 /* ComponentView */ ?
            asElementData(view, nodeIndex).componentView :
            view;
        markParentViewsForCheck(startView);
        return Services.handleEvent(view, nodeIndex, eventName, event);
    }
    catch (e) {
        // Attention: Don't rethrow, as it would cancel Observable subscriptions!
        view.root.errorHandler.handleError(e);
    }
}
function declaredViewContainer(view) {
    if (view.parent) {
        var parentView = view.parent;
        return asElementData(parentView, view.parentNodeDef.nodeIndex);
    }
    return null;
}
/**
 * for component views, this is the host element.
 * for embedded views, this is the index of the parent node
 * that contains the view container.
 */
function viewParentEl(view) {
    var parentView = view.parent;
    if (parentView) {
        return view.parentNodeDef.parent;
    }
    else {
        return null;
    }
}
function renderNode(view, def) {
    switch (def.flags & 201347067 /* Types */) {
        case 1 /* TypeElement */:
            return asElementData(view, def.nodeIndex).renderElement;
        case 2 /* TypeText */:
            return asTextData(view, def.nodeIndex).renderText;
    }
}
function elementEventFullName(target, name) {
    return target ? target + ":" + name : name;
}
function isComponentView(view) {
    return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */);
}
function isEmbeddedView(view) {
    return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */);
}
function filterQueryId(queryId) {
    return 1 << (queryId % 32);
}
function splitMatchedQueriesDsl(matchedQueriesDsl) {
    var matchedQueries = {};
    var matchedQueryIds = 0;
    var references = {};
    if (matchedQueriesDsl) {
        matchedQueriesDsl.forEach(function (_a) {
            var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), queryId = _b[0], valueType = _b[1];
            if (typeof queryId === 'number') {
                matchedQueries[queryId] = valueType;
                matchedQueryIds |= filterQueryId(queryId);
            }
            else {
                references[queryId] = valueType;
            }
        });
    }
    return { matchedQueries: matchedQueries, references: references, matchedQueryIds: matchedQueryIds };
}
function splitDepsDsl(deps, sourceName) {
    return deps.map(function (value) {
        var _a;
        var token;
        var flags;
        if (Array.isArray(value)) {
            _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(value, 2), flags = _a[0], token = _a[1];
        }
        else {
            flags = 0 /* None */;
            token = value;
        }
        if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {
            Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true });
        }
        return { flags: flags, token: token, tokenKey: tokenKey(token) };
    });
}
function getParentRenderElement(view, renderHost, def) {
    var renderParent = def.renderParent;
    if (renderParent) {
        if ((renderParent.flags & 1 /* TypeElement */) === 0 ||
            (renderParent.flags & 33554432 /* ComponentView */) === 0 ||
            (renderParent.element.componentRendererType &&
                renderParent.element.componentRendererType.encapsulation ===
                    ViewEncapsulation.Native)) {
            // only children of non components, or children of components with native encapsulation should
            // be attached.
            return asElementData(view, def.renderParent.nodeIndex).renderElement;
        }
    }
    else {
        return renderHost;
    }
}
var DEFINITION_CACHE = new WeakMap();
function resolveDefinition(factory) {
    var value = DEFINITION_CACHE.get(factory);
    if (!value) {
        value = factory(function () { return NOOP; });
        value.factory = factory;
        DEFINITION_CACHE.set(factory, value);
    }
    return value;
}
function rootRenderNodes(view) {
    var renderNodes = [];
    visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes);
    return renderNodes;
}
function visitRootRenderNodes(view, action, parentNode, nextSibling, target) {
    // We need to re-compute the parent node in case the nodes have been moved around manually
    if (action === 3 /* RemoveChild */) {
        parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));
    }
    visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);
}
function visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {
    for (var i = startIndex; i <= endIndex; i++) {
        var nodeDef = view.def.nodes[i];
        if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) {
            visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);
        }
        // jump to next sibling
        i += nodeDef.childCount;
    }
}
function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {
    var compView = view;
    while (compView && !isComponentView(compView)) {
        compView = compView.parent;
    }
    var hostView = compView.parent;
    var hostElDef = viewParentEl(compView);
    var startIndex = hostElDef.nodeIndex + 1;
    var endIndex = hostElDef.nodeIndex + hostElDef.childCount;
    for (var i = startIndex; i <= endIndex; i++) {
        var nodeDef = hostView.def.nodes[i];
        if (nodeDef.ngContentIndex === ngContentIndex) {
            visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);
        }
        // jump to next sibling
        i += nodeDef.childCount;
    }
    if (!hostView.parent) {
        // a root view
        var projectedNodes = view.root.projectableNodes[ngContentIndex];
        if (projectedNodes) {
            for (var i = 0; i < projectedNodes.length; i++) {
                execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);
            }
        }
    }
}
function visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {
    if (nodeDef.flags & 8 /* TypeNgContent */) {
        visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);
    }
    else {
        var rn = renderNode(view, nodeDef);
        if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) &&
            (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) {
            // Note: we might need to do both actions.
            if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) {
                execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);
            }
            if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) {
                var compView = asElementData(view, nodeDef.nodeIndex).componentView;
                execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);
            }
        }
        else {
            execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);
        }
        if (nodeDef.flags & 16777216 /* EmbeddedViews */) {
            var embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;
            for (var k = 0; k < embeddedViews.length; k++) {
                visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);
            }
        }
        if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) {
            visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);
        }
    }
}
function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {
    var renderer = view.renderer;
    switch (action) {
        case 1 /* AppendChild */:
            renderer.appendChild(parentNode, renderNode);
            break;
        case 2 /* InsertBefore */:
            renderer.insertBefore(parentNode, renderNode, nextSibling);
            break;
        case 3 /* RemoveChild */:
            renderer.removeChild(parentNode, renderNode);
            break;
        case 0 /* Collect */:
            target.push(renderNode);
            break;
    }
}
var NS_PREFIX_RE = /^:([^:]+):(.+)$/;
function splitNamespace(name) {
    if (name[0] === ':') {
        var match = name.match(NS_PREFIX_RE);
        return [match[1], match[2]];
    }
    return ['', name];
}
function calcBindingFlags(bindings) {
    var flags = 0;
    for (var i = 0; i < bindings.length; i++) {
        flags |= bindings[i].flags;
    }
    return flags;
}
function interpolate(valueCount, constAndInterp) {
    var result = '';
    for (var i = 0; i < valueCount * 2; i = i + 2) {
        result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);
    }
    return result + constAndInterp[valueCount * 2];
}
function inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {
    switch (valueCount) {
        case 1:
            return c0 + _toStringWithNull(a1) + c1;
        case 2:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;
        case 3:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
                c3;
        case 4:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
                c3 + _toStringWithNull(a4) + c4;
        case 5:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;
        case 6:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;
        case 7:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +
                c6 + _toStringWithNull(a7) + c7;
        case 8:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +
                c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;
        case 9:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +
                c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;
        default:
            throw new Error("Does not support more than 9 expressions");
    }
}
function _toStringWithNull(v) {
    return v != null ? v.toString() : '';
}
var EMPTY_ARRAY$4 = [];
var EMPTY_MAP = {};

/**
 * @license
 * Copyright Google 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 anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {
    flags |= 1 /* TypeElement */;
    var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;
    var template = templateFactory ? resolveDefinition(templateFactory) : null;
    return {
        // will bet set by the view definition
        nodeIndex: -1,
        parent: null,
        renderParent: null,
        bindingIndex: -1,
        outputIndex: -1,
        // regular values
        flags: flags,
        checkIndex: -1,
        childFlags: 0,
        directChildFlags: 0,
        childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,
        bindings: [],
        bindingFlags: 0,
        outputs: [],
        element: {
            ns: null,
            name: null,
            attrs: null, template: template,
            componentProvider: null,
            componentView: null,
            componentRendererType: null,
            publicProviders: null,
            allProviders: null,
            handleEvent: handleEvent || NOOP
        },
        provider: null,
        text: null,
        query: null,
        ngContent: null
    };
}
function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs, bindings, outputs, handleEvent, componentView, componentRendererType) {
    if (fixedAttrs === void 0) { fixedAttrs = []; }
    var _a;
    if (!handleEvent) {
        handleEvent = NOOP;
    }
    var _b = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _b.matchedQueries, references = _b.references, matchedQueryIds = _b.matchedQueryIds;
    var ns = null;
    var name = null;
    if (namespaceAndName) {
        _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];
    }
    bindings = bindings || [];
    var bindingDefs = new Array(bindings.length);
    for (var i = 0; i < bindings.length; i++) {
        var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(bindings[i], 3), bindingFlags = _c[0], namespaceAndName_1 = _c[1], suffixOrSecurityContext = _c[2];
        var _d = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName_1), 2), ns_1 = _d[0], name_1 = _d[1];
        var securityContext = undefined;
        var suffix = undefined;
        switch (bindingFlags & 15 /* Types */) {
            case 4 /* TypeElementStyle */:
                suffix = suffixOrSecurityContext;
                break;
            case 1 /* TypeElementAttribute */:
            case 8 /* TypeProperty */:
                securityContext = suffixOrSecurityContext;
                break;
        }
        bindingDefs[i] =
            { flags: bindingFlags, ns: ns_1, name: name_1, nonMinifiedName: name_1, securityContext: securityContext, suffix: suffix };
    }
    outputs = outputs || [];
    var outputDefs = new Array(outputs.length);
    for (var i = 0; i < outputs.length; i++) {
        var _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(outputs[i], 2), target = _e[0], eventName = _e[1];
        outputDefs[i] = {
            type: 0 /* ElementOutput */,
            target: target, eventName: eventName,
            propName: null
        };
    }
    fixedAttrs = fixedAttrs || [];
    var attrs = fixedAttrs.map(function (_a) {
        var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), namespaceAndName = _b[0], value = _b[1];
        var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName), 2), ns = _c[0], name = _c[1];
        return [ns, name, value];
    });
    componentRendererType = resolveRendererType2(componentRendererType);
    if (componentView) {
        flags |= 33554432 /* ComponentView */;
    }
    flags |= 1 /* TypeElement */;
    return {
        // will bet set by the view definition
        nodeIndex: -1,
        parent: null,
        renderParent: null,
        bindingIndex: -1,
        outputIndex: -1,
        // regular values
        checkIndex: checkIndex,
        flags: flags,
        childFlags: 0,
        directChildFlags: 0,
        childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,
        bindings: bindingDefs,
        bindingFlags: calcBindingFlags(bindingDefs),
        outputs: outputDefs,
        element: {
            ns: ns,
            name: name,
            attrs: attrs,
            template: null,
            // will bet set by the view definition
            componentProvider: null,
            componentView: componentView || null,
            componentRendererType: componentRendererType,
            publicProviders: null,
            allProviders: null,
            handleEvent: handleEvent || NOOP,
        },
        provider: null,
        text: null,
        query: null,
        ngContent: null
    };
}
function createElement(view, renderHost, def) {
    var elDef = def.element;
    var rootSelectorOrNode = view.root.selectorOrNode;
    var renderer = view.renderer;
    var el;
    if (view.parent || !rootSelectorOrNode) {
        if (elDef.name) {
            el = renderer.createElement(elDef.name, elDef.ns);
        }
        else {
            el = renderer.createComment('');
        }
        var parentEl = getParentRenderElement(view, renderHost, def);
        if (parentEl) {
            renderer.appendChild(parentEl, el);
        }
    }
    else {
        // when using native Shadow DOM, do not clear the root element contents to allow slot projection
        var preserveContent = (!!elDef.componentRendererType &&
            elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom);
        el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);
    }
    if (elDef.attrs) {
        for (var i = 0; i < elDef.attrs.length; i++) {
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(elDef.attrs[i], 3), ns = _a[0], name_2 = _a[1], value = _a[2];
            renderer.setAttribute(el, name_2, value, ns);
        }
    }
    return el;
}
function listenToElementOutputs(view, compView, def, el) {
    for (var i = 0; i < def.outputs.length; i++) {
        var output = def.outputs[i];
        var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));
        var listenTarget = output.target;
        var listenerView = view;
        if (output.target === 'component') {
            listenTarget = null;
            listenerView = compView;
        }
        var disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);
        view.disposables[def.outputIndex + i] = disposable;
    }
}
function renderEventHandlerClosure(view, index, eventName) {
    return function (event) { return dispatchEvent(view, index, eventName, event); };
}
function checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    var bindLen = def.bindings.length;
    var changed = false;
    if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0))
        changed = true;
    if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1))
        changed = true;
    if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2))
        changed = true;
    if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3))
        changed = true;
    if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4))
        changed = true;
    if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5))
        changed = true;
    if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6))
        changed = true;
    if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7))
        changed = true;
    if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8))
        changed = true;
    if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9))
        changed = true;
    return changed;
}
function checkAndUpdateElementDynamic(view, def, values) {
    var changed = false;
    for (var i = 0; i < values.length; i++) {
        if (checkAndUpdateElementValue(view, def, i, values[i]))
            changed = true;
    }
    return changed;
}
function checkAndUpdateElementValue(view, def, bindingIdx, value) {
    if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {
        return false;
    }
    var binding = def.bindings[bindingIdx];
    var elData = asElementData(view, def.nodeIndex);
    var renderNode$$1 = elData.renderElement;
    var name = binding.name;
    switch (binding.flags & 15 /* Types */) {
        case 1 /* TypeElementAttribute */:
            setElementAttribute(view, binding, renderNode$$1, binding.ns, name, value);
            break;
        case 2 /* TypeElementClass */:
            setElementClass(view, renderNode$$1, name, value);
            break;
        case 4 /* TypeElementStyle */:
            setElementStyle(view, binding, renderNode$$1, name, value);
            break;
        case 8 /* TypeProperty */:
            var bindView = (def.flags & 33554432 /* ComponentView */ &&
                binding.flags & 32 /* SyntheticHostProperty */) ?
                elData.componentView :
                view;
            setElementProperty(bindView, binding, renderNode$$1, name, value);
            break;
    }
    return true;
}
function setElementAttribute(view, binding, renderNode$$1, ns, name, value) {
    var securityContext = binding.securityContext;
    var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;
    renderValue = renderValue != null ? renderValue.toString() : null;
    var renderer = view.renderer;
    if (value != null) {
        renderer.setAttribute(renderNode$$1, name, renderValue, ns);
    }
    else {
        renderer.removeAttribute(renderNode$$1, name, ns);
    }
}
function setElementClass(view, renderNode$$1, name, value) {
    var renderer = view.renderer;
    if (value) {
        renderer.addClass(renderNode$$1, name);
    }
    else {
        renderer.removeClass(renderNode$$1, name);
    }
}
function setElementStyle(view, binding, renderNode$$1, name, value) {
    var renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE, value);
    if (renderValue != null) {
        renderValue = renderValue.toString();
        var unit = binding.suffix;
        if (unit != null) {
            renderValue = renderValue + unit;
        }
    }
    else {
        renderValue = null;
    }
    var renderer = view.renderer;
    if (renderValue != null) {
        renderer.setStyle(renderNode$$1, name, renderValue);
    }
    else {
        renderer.removeStyle(renderNode$$1, name);
    }
}
function setElementProperty(view, binding, renderNode$$1, name, value) {
    var securityContext = binding.securityContext;
    var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;
    view.renderer.setProperty(renderNode$$1, name, renderValue);
}

/**
 * @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 UNDEFINED_VALUE = new Object();
var InjectorRefTokenKey = tokenKey(Injector);
var INJECTORRefTokenKey = tokenKey(INJECTOR);
var NgModuleRefTokenKey = tokenKey(NgModuleRef);
function moduleProvideDef(flags, token, value, deps) {
    // Need to resolve forwardRefs as e.g. for `useValue` we
    // lowered the expression and then stopped evaluating it,
    // i.e. also didn't unwrap it.
    value = resolveForwardRef(value);
    var depDefs = splitDepsDsl(deps, stringify(token));
    return {
        // will bet set by the module definition
        index: -1,
        deps: depDefs, flags: flags, token: token, value: value
    };
}
function moduleDef(providers) {
    var providersByKey = {};
    var modules = [];
    var isRoot = false;
    for (var i = 0; i < providers.length; i++) {
        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,
    };
}
function initNgModule(data) {
    var def = data._def;
    var providers = data._providers = new Array(def.providers.length);
    for (var i = 0; i < def.providers.length; i++) {
        var provDef = def.providers[i];
        if (!(provDef.flags & 4096 /* LazyProvider */)) {
            // Make sure the provider has not been already initialized outside this loop.
            if (providers[i] === undefined) {
                providers[i] = _createProviderInstance(data, provDef);
            }
        }
    }
}
function resolveNgModuleDep(data, depDef, notFoundValue) {
    if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
    var former = setCurrentInjector(data);
    try {
        if (depDef.flags & 8 /* Value */) {
            return depDef.token;
        }
        if (depDef.flags & 2 /* Optional */) {
            notFoundValue = null;
        }
        if (depDef.flags & 1 /* SkipSelf */) {
            return data._parent.get(depDef.token, notFoundValue);
        }
        var tokenKey_1 = depDef.tokenKey;
        switch (tokenKey_1) {
            case InjectorRefTokenKey:
            case INJECTORRefTokenKey:
            case NgModuleRefTokenKey:
                return data;
        }
        var providerDef = data._def.providersByKey[tokenKey_1];
        var injectableDef = void 0;
        if (providerDef) {
            var providerInstance = data._providers[providerDef.index];
            if (providerInstance === undefined) {
                providerInstance = data._providers[providerDef.index] =
                    _createProviderInstance(data, providerDef);
            }
            return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;
        }
        else if ((injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {
            var index = data._providers.length;
            data._def.providersByKey[depDef.tokenKey] = {
                flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */,
                value: injectableDef.factory,
                deps: [], index: index,
                token: depDef.token,
            };
            data._providers[index] = UNDEFINED_VALUE;
            return (data._providers[index] =
                _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));
        }
        else if (depDef.flags & 4 /* Self */) {
            return notFoundValue;
        }
        return data._parent.get(depDef.token, notFoundValue);
    }
    finally {
        setCurrentInjector(former);
    }
}
function moduleTransitivelyPresent(ngModule, scope) {
    return ngModule._def.modules.indexOf(scope) > -1;
}
function targetsModule(ngModule, def) {
    return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||
        def.providedIn === 'root' && ngModule._def.isRoot);
}
function _createProviderInstance(ngModule, providerDef) {
    var injectable;
    switch (providerDef.flags & 201347067 /* Types */) {
        case 512 /* TypeClassProvider */:
            injectable = _createClass(ngModule, providerDef.value, providerDef.deps);
            break;
        case 1024 /* TypeFactoryProvider */:
            injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);
            break;
        case 2048 /* TypeUseExistingProvider */:
            injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);
            break;
        case 256 /* TypeValueProvider */:
            injectable = providerDef.value;
            break;
    }
    // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be
    // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be
    // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already
    // set (ngOnDestroy was detected statically).
    if (injectable !== UNDEFINED_VALUE && injectable != null && typeof injectable === 'object' &&
        !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') {
        providerDef.flags |= 131072 /* OnDestroy */;
    }
    return injectable === undefined ? UNDEFINED_VALUE : injectable;
}
function _createClass(ngModule, ctor, deps) {
    var len = deps.length;
    switch (len) {
        case 0:
            return new ctor();
        case 1:
            return new ctor(resolveNgModuleDep(ngModule, deps[0]));
        case 2:
            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));
        case 3:
            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));
        default:
            var depValues = new Array(len);
            for (var i = 0; i < len; i++) {
                depValues[i] = resolveNgModuleDep(ngModule, deps[i]);
            }
            return new (ctor.bind.apply(ctor, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], depValues)))();
    }
}
function _callFactory(ngModule, factory, deps) {
    var len = deps.length;
    switch (len) {
        case 0:
            return factory();
        case 1:
            return factory(resolveNgModuleDep(ngModule, deps[0]));
        case 2:
            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));
        case 3:
            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));
        default:
            var depValues = Array(len);
            for (var i = 0; i < len; i++) {
                depValues[i] = resolveNgModuleDep(ngModule, deps[i]);
            }
            return factory.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(depValues));
    }
}
function callNgModuleLifecycle(ngModule, lifecycles) {
    var def = ngModule._def;
    var destroyed = new Set();
    for (var i = 0; i < def.providers.length; i++) {
        var provDef = def.providers[i];
        if (provDef.flags & 131072 /* OnDestroy */) {
            var instance = ngModule._providers[i];
            if (instance && instance !== UNDEFINED_VALUE) {
                var onDestroy = instance.ngOnDestroy;
                if (typeof onDestroy === 'function' && !destroyed.has(instance)) {
                    onDestroy.apply(instance);
                    destroyed.add(instance);
                }
            }
        }
    }
}

/**
 * @license
 * Copyright Google 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 attachEmbeddedView(parentView, elementData, viewIndex, view) {
    var embeddedViews = elementData.viewContainer._embeddedViews;
    if (viewIndex === null || viewIndex === undefined) {
        viewIndex = embeddedViews.length;
    }
    view.viewContainerParent = parentView;
    addToArray(embeddedViews, viewIndex, view);
    attachProjectedView(elementData, view);
    Services.dirtyParentQueries(view);
    var prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;
    renderAttachEmbeddedView(elementData, prevView, view);
}
function attachProjectedView(vcElementData, view) {
    var dvcElementData = declaredViewContainer(view);
    if (!dvcElementData || dvcElementData === vcElementData ||
        view.state & 16 /* IsProjectedView */) {
        return;
    }
    // Note: For performance reasons, we
    // - add a view to template._projectedViews only 1x throughout its lifetime,
    //   and remove it not until the view is destroyed.
    //   (hard, as when a parent view is attached/detached we would need to attach/detach all
    //    nested projected views as well, even across component boundaries).
    // - don't track the insertion order of views in the projected views array
    //   (hard, as when the views of the same template are inserted different view containers)
    view.state |= 16 /* IsProjectedView */;
    var projectedViews = dvcElementData.template._projectedViews;
    if (!projectedViews) {
        projectedViews = dvcElementData.template._projectedViews = [];
    }
    projectedViews.push(view);
    // Note: we are changing the NodeDef here as we cannot calculate
    // the fact whether a template is used for projection during compilation.
    markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);
}
function markNodeAsProjectedTemplate(viewDef, nodeDef) {
    if (nodeDef.flags & 4 /* ProjectedTemplate */) {
        return;
    }
    viewDef.nodeFlags |= 4 /* ProjectedTemplate */;
    nodeDef.flags |= 4 /* ProjectedTemplate */;
    var parentNodeDef = nodeDef.parent;
    while (parentNodeDef) {
        parentNodeDef.childFlags |= 4 /* ProjectedTemplate */;
        parentNodeDef = parentNodeDef.parent;
    }
}
function detachEmbeddedView(elementData, viewIndex) {
    var embeddedViews = elementData.viewContainer._embeddedViews;
    if (viewIndex == null || viewIndex >= embeddedViews.length) {
        viewIndex = embeddedViews.length - 1;
    }
    if (viewIndex < 0) {
        return null;
    }
    var view = embeddedViews[viewIndex];
    view.viewContainerParent = null;
    removeFromArray(embeddedViews, viewIndex);
    // See attachProjectedView for why we don't update projectedViews here.
    Services.dirtyParentQueries(view);
    renderDetachView(view);
    return view;
}
function detachProjectedView(view) {
    if (!(view.state & 16 /* IsProjectedView */)) {
        return;
    }
    var dvcElementData = declaredViewContainer(view);
    if (dvcElementData) {
        var projectedViews = dvcElementData.template._projectedViews;
        if (projectedViews) {
            removeFromArray(projectedViews, projectedViews.indexOf(view));
            Services.dirtyParentQueries(view);
        }
    }
}
function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {
    var embeddedViews = elementData.viewContainer._embeddedViews;
    var view = embeddedViews[oldViewIndex];
    removeFromArray(embeddedViews, oldViewIndex);
    if (newViewIndex == null) {
        newViewIndex = embeddedViews.length;
    }
    addToArray(embeddedViews, newViewIndex, view);
    // Note: Don't need to change projectedViews as the order in there
    // as always invalid...
    Services.dirtyParentQueries(view);
    renderDetachView(view);
    var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;
    renderAttachEmbeddedView(elementData, prevView, view);
    return view;
}
function renderAttachEmbeddedView(elementData, prevView, view) {
    var prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) :
        elementData.renderElement;
    var parentNode = view.renderer.parentNode(prevRenderNode);
    var nextSibling = view.renderer.nextSibling(prevRenderNode);
    // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!
    // However, browsers automatically do `appendChild` when there is no `nextSibling`.
    visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined);
}
function renderDetachView(view) {
    visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined);
}
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) {
        arr.pop();
    }
    else {
        arr.splice(index, 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 EMPTY_CONTEXT = new Object();
// Attention: this function is called as top level function.
// Putting any logic in here will destroy closure tree shaking!
function createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {
    return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);
}
function getComponentViewDefinitionFactory(componentFactory) {
    return componentFactory.viewDefFactory;
}
var ComponentFactory_ = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentFactory_, _super);
    function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {
        var _this = 
        // Attention: this ctor is called as top level function.
        // Putting any logic in here will destroy closure tree shaking!
        _super.call(this) || this;
        _this.selector = selector;
        _this.componentType = componentType;
        _this._inputs = _inputs;
        _this._outputs = _outputs;
        _this.ngContentSelectors = ngContentSelectors;
        _this.viewDefFactory = viewDefFactory;
        return _this;
    }
    Object.defineProperty(ComponentFactory_.prototype, "inputs", {
        get: function () {
            var inputsArr = [];
            var inputs = this._inputs;
            for (var propName in inputs) {
                var templateName = inputs[propName];
                inputsArr.push({ propName: propName, templateName: templateName });
            }
            return inputsArr;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ComponentFactory_.prototype, "outputs", {
        get: function () {
            var outputsArr = [];
            for (var propName in this._outputs) {
                var templateName = this._outputs[propName];
                outputsArr.push({ propName: propName, templateName: templateName });
            }
            return outputsArr;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Creates a new component.
     */
    ComponentFactory_.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {
        if (!ngModule) {
            throw new Error('ngModule should be provided');
        }
        var viewDef = resolveDefinition(this.viewDefFactory);
        var componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;
        var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);
        var component = asProviderData(view, componentNodeIndex).instance;
        if (rootSelectorOrNode) {
            view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);
        }
        return new ComponentRef_(view, new ViewRef_(view), component);
    };
    return ComponentFactory_;
}(ComponentFactory));
var ComponentRef_ = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentRef_, _super);
    function ComponentRef_(_view, _viewRef, _component) {
        var _this = _super.call(this) || this;
        _this._view = _view;
        _this._viewRef = _viewRef;
        _this._component = _component;
        _this._elDef = _this._view.def.nodes[0];
        _this.hostView = _viewRef;
        _this.changeDetectorRef = _viewRef;
        _this.instance = _component;
        return _this;
    }
    Object.defineProperty(ComponentRef_.prototype, "location", {
        get: function () {
            return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ComponentRef_.prototype, "injector", {
        get: function () { return new Injector_(this._view, this._elDef); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ComponentRef_.prototype, "componentType", {
        get: function () { return this._component.constructor; },
        enumerable: true,
        configurable: true
    });
    ComponentRef_.prototype.destroy = function () { this._viewRef.destroy(); };
    ComponentRef_.prototype.onDestroy = function (callback) { this._viewRef.onDestroy(callback); };
    return ComponentRef_;
}(ComponentRef));
function createViewContainerData(view, elDef, elData) {
    return new ViewContainerRef_(view, elDef, elData);
}
var ViewContainerRef_ = /** @class */ (function () {
    function ViewContainerRef_(_view, _elDef, _data) {
        this._view = _view;
        this._elDef = _elDef;
        this._data = _data;
        /**
         * @internal
         */
        this._embeddedViews = [];
    }
    Object.defineProperty(ViewContainerRef_.prototype, "element", {
        get: function () { return new ElementRef(this._data.renderElement); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ViewContainerRef_.prototype, "injector", {
        get: function () { return new Injector_(this._view, this._elDef); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ViewContainerRef_.prototype, "parentInjector", {
        /** @deprecated No replacement */
        get: function () {
            var view = this._view;
            var elDef = this._elDef.parent;
            while (!elDef && view) {
                elDef = viewParentEl(view);
                view = view.parent;
            }
            return view ? new Injector_(view, elDef) : new Injector_(this._view, null);
        },
        enumerable: true,
        configurable: true
    });
    ViewContainerRef_.prototype.clear = function () {
        var len = this._embeddedViews.length;
        for (var i = len - 1; i >= 0; i--) {
            var view = detachEmbeddedView(this._data, i);
            Services.destroyView(view);
        }
    };
    ViewContainerRef_.prototype.get = function (index) {
        var view = this._embeddedViews[index];
        if (view) {
            var ref = new ViewRef_(view);
            ref.attachToViewContainerRef(this);
            return ref;
        }
        return null;
    };
    Object.defineProperty(ViewContainerRef_.prototype, "length", {
        get: function () { return this._embeddedViews.length; },
        enumerable: true,
        configurable: true
    });
    ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {
        var viewRef = templateRef.createEmbeddedView(context || {});
        this.insert(viewRef, index);
        return viewRef;
    };
    ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {
        var contextInjector = injector || this.parentInjector;
        if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {
            ngModuleRef = contextInjector.get(NgModuleRef);
        }
        var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);
        this.insert(componentRef.hostView, index);
        return componentRef;
    };
    ViewContainerRef_.prototype.insert = function (viewRef, index) {
        if (viewRef.destroyed) {
            throw new Error('Cannot insert a destroyed View in a ViewContainer!');
        }
        var viewRef_ = viewRef;
        var viewData = viewRef_._view;
        attachEmbeddedView(this._view, this._data, index, viewData);
        viewRef_.attachToViewContainerRef(this);
        return viewRef;
    };
    ViewContainerRef_.prototype.move = function (viewRef, currentIndex) {
        if (viewRef.destroyed) {
            throw new Error('Cannot move a destroyed View in a ViewContainer!');
        }
        var previousIndex = this._embeddedViews.indexOf(viewRef._view);
        moveEmbeddedView(this._data, previousIndex, currentIndex);
        return viewRef;
    };
    ViewContainerRef_.prototype.indexOf = function (viewRef) {
        return this._embeddedViews.indexOf(viewRef._view);
    };
    ViewContainerRef_.prototype.remove = function (index) {
        var viewData = detachEmbeddedView(this._data, index);
        if (viewData) {
            Services.destroyView(viewData);
        }
    };
    ViewContainerRef_.prototype.detach = function (index) {
        var view = detachEmbeddedView(this._data, index);
        return view ? new ViewRef_(view) : null;
    };
    return ViewContainerRef_;
}());
function createChangeDetectorRef(view) {
    return new ViewRef_(view);
}
var ViewRef_ = /** @class */ (function () {
    function ViewRef_(_view) {
        this._view = _view;
        this._viewContainerRef = null;
        this._appRef = null;
    }
    Object.defineProperty(ViewRef_.prototype, "rootNodes", {
        get: function () { return rootRenderNodes(this._view); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ViewRef_.prototype, "context", {
        get: function () { return this._view.context; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ViewRef_.prototype, "destroyed", {
        get: function () { return (this._view.state & 128 /* Destroyed */) !== 0; },
        enumerable: true,
        configurable: true
    });
    ViewRef_.prototype.markForCheck = function () { markParentViewsForCheck(this._view); };
    ViewRef_.prototype.detach = function () { this._view.state &= ~4 /* Attached */; };
    ViewRef_.prototype.detectChanges = function () {
        var fs = this._view.root.rendererFactory;
        if (fs.begin) {
            fs.begin();
        }
        try {
            Services.checkAndUpdateView(this._view);
        }
        finally {
            if (fs.end) {
                fs.end();
            }
        }
    };
    ViewRef_.prototype.checkNoChanges = function () { Services.checkNoChangesView(this._view); };
    ViewRef_.prototype.reattach = function () { this._view.state |= 4 /* Attached */; };
    ViewRef_.prototype.onDestroy = function (callback) {
        if (!this._view.disposables) {
            this._view.disposables = [];
        }
        this._view.disposables.push(callback);
    };
    ViewRef_.prototype.destroy = function () {
        if (this._appRef) {
            this._appRef.detachView(this);
        }
        else if (this._viewContainerRef) {
            this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));
        }
        Services.destroyView(this._view);
    };
    ViewRef_.prototype.detachFromAppRef = function () {
        this._appRef = null;
        renderDetachView(this._view);
        Services.dirtyParentQueries(this._view);
    };
    ViewRef_.prototype.attachToAppRef = function (appRef) {
        if (this._viewContainerRef) {
            throw new Error('This view is already attached to a ViewContainer!');
        }
        this._appRef = appRef;
    };
    ViewRef_.prototype.attachToViewContainerRef = function (vcRef) {
        if (this._appRef) {
            throw new Error('This view is already attached directly to the ApplicationRef!');
        }
        this._viewContainerRef = vcRef;
    };
    return ViewRef_;
}());
function createTemplateData(view, def) {
    return new TemplateRef_(view, def);
}
var TemplateRef_ = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TemplateRef_, _super);
    function TemplateRef_(_parentView, _def) {
        var _this = _super.call(this) || this;
        _this._parentView = _parentView;
        _this._def = _def;
        return _this;
    }
    TemplateRef_.prototype.createEmbeddedView = function (context) {
        return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));
    };
    Object.defineProperty(TemplateRef_.prototype, "elementRef", {
        get: function () {
            return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);
        },
        enumerable: true,
        configurable: true
    });
    return TemplateRef_;
}(TemplateRef));
function createInjector$1(view, elDef) {
    return new Injector_(view, elDef);
}
var Injector_ = /** @class */ (function () {
    function Injector_(view, elDef) {
        this.view = view;
        this.elDef = elDef;
    }
    Injector_.prototype.get = function (token, notFoundValue) {
        if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
        var allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false;
        return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token: token, tokenKey: tokenKey(token) }, notFoundValue);
    };
    return Injector_;
}());
function nodeValue(view, index) {
    var def = view.def.nodes[index];
    if (def.flags & 1 /* TypeElement */) {
        var elData = asElementData(view, def.nodeIndex);
        return def.element.template ? elData.template : elData.renderElement;
    }
    else if (def.flags & 2 /* TypeText */) {
        return asTextData(view, def.nodeIndex).renderText;
    }
    else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) {
        return asProviderData(view, def.nodeIndex).instance;
    }
    throw new Error("Illegal state: read nodeValue for node index " + index);
}
function createRendererV1(view) {
    return new RendererAdapter(view.renderer);
}
var RendererAdapter = /** @class */ (function () {
    function RendererAdapter(delegate) {
        this.delegate = delegate;
    }
    RendererAdapter.prototype.selectRootElement = function (selectorOrNode) {
        return this.delegate.selectRootElement(selectorOrNode);
    };
    RendererAdapter.prototype.createElement = function (parent, namespaceAndName) {
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];
        var el = this.delegate.createElement(name, ns);
        if (parent) {
            this.delegate.appendChild(parent, el);
        }
        return el;
    };
    RendererAdapter.prototype.createViewRoot = function (hostElement) { return hostElement; };
    RendererAdapter.prototype.createTemplateAnchor = function (parentElement) {
        var comment = this.delegate.createComment('');
        if (parentElement) {
            this.delegate.appendChild(parentElement, comment);
        }
        return comment;
    };
    RendererAdapter.prototype.createText = function (parentElement, value) {
        var node = this.delegate.createText(value);
        if (parentElement) {
            this.delegate.appendChild(parentElement, node);
        }
        return node;
    };
    RendererAdapter.prototype.projectNodes = function (parentElement, nodes) {
        for (var i = 0; i < nodes.length; i++) {
            this.delegate.appendChild(parentElement, nodes[i]);
        }
    };
    RendererAdapter.prototype.attachViewAfter = function (node, viewRootNodes) {
        var parentElement = this.delegate.parentNode(node);
        var nextSibling = this.delegate.nextSibling(node);
        for (var i = 0; i < viewRootNodes.length; i++) {
            this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);
        }
    };
    RendererAdapter.prototype.detachView = function (viewRootNodes) {
        for (var i = 0; i < viewRootNodes.length; i++) {
            var node = viewRootNodes[i];
            var parentElement = this.delegate.parentNode(node);
            this.delegate.removeChild(parentElement, node);
        }
    };
    RendererAdapter.prototype.destroyView = function (hostElement, viewAllNodes) {
        for (var i = 0; i < viewAllNodes.length; i++) {
            this.delegate.destroyNode(viewAllNodes[i]);
        }
    };
    RendererAdapter.prototype.listen = function (renderElement, name, callback) {
        return this.delegate.listen(renderElement, name, callback);
    };
    RendererAdapter.prototype.listenGlobal = function (target, name, callback) {
        return this.delegate.listen(target, name, callback);
    };
    RendererAdapter.prototype.setElementProperty = function (renderElement, propertyName, propertyValue) {
        this.delegate.setProperty(renderElement, propertyName, propertyValue);
    };
    RendererAdapter.prototype.setElementAttribute = function (renderElement, namespaceAndName, attributeValue) {
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];
        if (attributeValue != null) {
            this.delegate.setAttribute(renderElement, name, attributeValue, ns);
        }
        else {
            this.delegate.removeAttribute(renderElement, name, ns);
        }
    };
    RendererAdapter.prototype.setBindingDebugInfo = function (renderElement, propertyName, propertyValue) { };
    RendererAdapter.prototype.setElementClass = function (renderElement, className, isAdd) {
        if (isAdd) {
            this.delegate.addClass(renderElement, className);
        }
        else {
            this.delegate.removeClass(renderElement, className);
        }
    };
    RendererAdapter.prototype.setElementStyle = function (renderElement, styleName, styleValue) {
        if (styleValue != null) {
            this.delegate.setStyle(renderElement, styleName, styleValue);
        }
        else {
            this.delegate.removeStyle(renderElement, styleName);
        }
    };
    RendererAdapter.prototype.invokeElementMethod = function (renderElement, methodName, args) {
        renderElement[methodName].apply(renderElement, args);
    };
    RendererAdapter.prototype.setText = function (renderNode$$1, text) { this.delegate.setValue(renderNode$$1, text); };
    RendererAdapter.prototype.animate = function () { throw new Error('Renderer.animate is no longer supported!'); };
    return RendererAdapter;
}());
function createNgModuleRef(moduleType, parent, bootstrapComponents, def) {
    return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);
}
var NgModuleRef_ = /** @class */ (function () {
    function NgModuleRef_(_moduleType, _parent, _bootstrapComponents, _def) {
        this._moduleType = _moduleType;
        this._parent = _parent;
        this._bootstrapComponents = _bootstrapComponents;
        this._def = _def;
        this._destroyListeners = [];
        this._destroyed = false;
        this.injector = this;
        initNgModule(this);
    }
    NgModuleRef_.prototype.get = function (token, notFoundValue, injectFlags) {
        if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
        if (injectFlags === void 0) { injectFlags = 0 /* Default */; }
        var flags = 0 /* None */;
        if (injectFlags & 4 /* SkipSelf */) {
            flags |= 1 /* SkipSelf */;
        }
        else if (injectFlags & 2 /* Self */) {
            flags |= 4 /* Self */;
        }
        return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);
    };
    Object.defineProperty(NgModuleRef_.prototype, "instance", {
        get: function () { return this.get(this._moduleType); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgModuleRef_.prototype, "componentFactoryResolver", {
        get: function () { return this.get(ComponentFactoryResolver); },
        enumerable: true,
        configurable: true
    });
    NgModuleRef_.prototype.destroy = function () {
        if (this._destroyed) {
            throw new Error("The ng module " + stringify(this.instance.constructor) + " has already been destroyed.");
        }
        this._destroyed = true;
        callNgModuleLifecycle(this, 131072 /* OnDestroy */);
        this._destroyListeners.forEach(function (listener) { return listener(); });
    };
    NgModuleRef_.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };
    return NgModuleRef_;
}());

/**
 * @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 RendererV1TokenKey = tokenKey(Renderer);
var Renderer2TokenKey = tokenKey(Renderer2);
var ElementRefTokenKey = tokenKey(ElementRef);
var ViewContainerRefTokenKey = tokenKey(ViewContainerRef);
var TemplateRefTokenKey = tokenKey(TemplateRef);
var ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);
var InjectorRefTokenKey$1 = tokenKey(Injector);
var INJECTORRefTokenKey$1 = tokenKey(INJECTOR);
function directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {
    var bindings = [];
    if (props) {
        for (var prop in props) {
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(props[prop], 2), bindingIndex = _a[0], nonMinifiedName = _a[1];
            bindings[bindingIndex] = {
                flags: 8 /* TypeProperty */,
                name: prop, nonMinifiedName: nonMinifiedName,
                ns: null,
                securityContext: null,
                suffix: null
            };
        }
    }
    var outputDefs = [];
    if (outputs) {
        for (var propName in outputs) {
            outputDefs.push({ type: 1 /* DirectiveOutput */, propName: propName, target: null, eventName: outputs[propName] });
        }
    }
    flags |= 16384 /* TypeDirective */;
    return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);
}
function pipeDef(flags, ctor, deps) {
    flags |= 16 /* TypePipe */;
    return _def(-1, flags, null, 0, ctor, ctor, deps);
}
function providerDef(flags, matchedQueries, token, value, deps) {
    return _def(-1, flags, matchedQueries, 0, token, value, deps);
}
function _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {
    var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;
    if (!outputs) {
        outputs = [];
    }
    if (!bindings) {
        bindings = [];
    }
    // Need to resolve forwardRefs as e.g. for `useValue` we
    // lowered the expression and then stopped evaluating it,
    // i.e. also didn't unwrap it.
    value = resolveForwardRef(value);
    var depDefs = splitDepsDsl(deps, stringify(token));
    return {
        // will bet set by the view definition
        nodeIndex: -1,
        parent: null,
        renderParent: null,
        bindingIndex: -1,
        outputIndex: -1,
        // regular values
        checkIndex: checkIndex,
        flags: flags,
        childFlags: 0,
        directChildFlags: 0,
        childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references,
        ngContentIndex: -1, childCount: childCount, bindings: bindings,
        bindingFlags: calcBindingFlags(bindings), outputs: outputs,
        element: null,
        provider: { token: token, value: value, deps: depDefs },
        text: null,
        query: null,
        ngContent: null
    };
}
function createProviderInstance(view, def) {
    return _createProviderInstance$1(view, def);
}
function createPipeInstance(view, def) {
    // deps are looked up from component.
    var compView = view;
    while (compView.parent && !isComponentView(compView)) {
        compView = compView.parent;
    }
    // pipes can see the private services of the component
    var allowPrivateServices = true;
    // pipes are always eager and classes!
    return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);
}
function createDirectiveInstance(view, def) {
    // components can see other private services, other directives can't.
    var allowPrivateServices = (def.flags & 32768 /* Component */) > 0;
    // directives are always eager and classes!
    var instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);
    if (def.outputs.length) {
        for (var i = 0; i < def.outputs.length; i++) {
            var output = def.outputs[i];
            var outputObservable = instance[output.propName];
            if (isObservable(outputObservable)) {
                var subscription = outputObservable.subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));
                view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);
            }
            else {
                throw new Error("@Output " + output.propName + " not initialized in '" + instance.constructor.name + "'.");
            }
        }
    }
    return instance;
}
function eventHandlerClosure(view, index, eventName) {
    return function (event) { return dispatchEvent(view, index, eventName, event); };
}
function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    var providerData = asProviderData(view, def.nodeIndex);
    var directive = providerData.instance;
    var changed = false;
    var changes = undefined;
    var bindLen = def.bindings.length;
    if (bindLen > 0 && checkBinding(view, def, 0, v0)) {
        changed = true;
        changes = updateProp(view, providerData, def, 0, v0, changes);
    }
    if (bindLen > 1 && checkBinding(view, def, 1, v1)) {
        changed = true;
        changes = updateProp(view, providerData, def, 1, v1, changes);
    }
    if (bindLen > 2 && checkBinding(view, def, 2, v2)) {
        changed = true;
        changes = updateProp(view, providerData, def, 2, v2, changes);
    }
    if (bindLen > 3 && checkBinding(view, def, 3, v3)) {
        changed = true;
        changes = updateProp(view, providerData, def, 3, v3, changes);
    }
    if (bindLen > 4 && checkBinding(view, def, 4, v4)) {
        changed = true;
        changes = updateProp(view, providerData, def, 4, v4, changes);
    }
    if (bindLen > 5 && checkBinding(view, def, 5, v5)) {
        changed = true;
        changes = updateProp(view, providerData, def, 5, v5, changes);
    }
    if (bindLen > 6 && checkBinding(view, def, 6, v6)) {
        changed = true;
        changes = updateProp(view, providerData, def, 6, v6, changes);
    }
    if (bindLen > 7 && checkBinding(view, def, 7, v7)) {
        changed = true;
        changes = updateProp(view, providerData, def, 7, v7, changes);
    }
    if (bindLen > 8 && checkBinding(view, def, 8, v8)) {
        changed = true;
        changes = updateProp(view, providerData, def, 8, v8, changes);
    }
    if (bindLen > 9 && checkBinding(view, def, 9, v9)) {
        changed = true;
        changes = updateProp(view, providerData, def, 9, v9, changes);
    }
    if (changes) {
        directive.ngOnChanges(changes);
    }
    if ((def.flags & 65536 /* OnInit */) &&
        shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {
        directive.ngOnInit();
    }
    if (def.flags & 262144 /* DoCheck */) {
        directive.ngDoCheck();
    }
    return changed;
}
function checkAndUpdateDirectiveDynamic(view, def, values) {
    var providerData = asProviderData(view, def.nodeIndex);
    var directive = providerData.instance;
    var changed = false;
    var changes = undefined;
    for (var i = 0; i < values.length; i++) {
        if (checkBinding(view, def, i, values[i])) {
            changed = true;
            changes = updateProp(view, providerData, def, i, values[i], changes);
        }
    }
    if (changes) {
        directive.ngOnChanges(changes);
    }
    if ((def.flags & 65536 /* OnInit */) &&
        shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {
        directive.ngOnInit();
    }
    if (def.flags & 262144 /* DoCheck */) {
        directive.ngDoCheck();
    }
    return changed;
}
function _createProviderInstance$1(view, def) {
    // private services can see other private services
    var allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0;
    var providerDef = def.provider;
    switch (def.flags & 201347067 /* Types */) {
        case 512 /* TypeClassProvider */:
            return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);
        case 1024 /* TypeFactoryProvider */:
            return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);
        case 2048 /* TypeUseExistingProvider */:
            return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);
        case 256 /* TypeValueProvider */:
            return providerDef.value;
    }
}
function createClass(view, elDef, allowPrivateServices, ctor, deps) {
    var len = deps.length;
    switch (len) {
        case 0:
            return new ctor();
        case 1:
            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));
        case 2:
            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));
        case 3:
            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));
        default:
            var depValues = new Array(len);
            for (var i = 0; i < len; i++) {
                depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);
            }
            return new (ctor.bind.apply(ctor, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], depValues)))();
    }
}
function callFactory(view, elDef, allowPrivateServices, factory, deps) {
    var len = deps.length;
    switch (len) {
        case 0:
            return factory();
        case 1:
            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));
        case 2:
            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));
        case 3:
            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));
        default:
            var depValues = Array(len);
            for (var i = 0; i < len; i++) {
                depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);
            }
            return factory.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(depValues));
    }
}
// This default value is when checking the hierarchy for a token.
//
// It means both:
// - the token is not provided by the current injector,
// - only the element injectors should be checked (ie do not check module injectors
//
//          mod1
//         /
//       el1   mod2
//         \  /
//         el2
//
// When requesting el2.injector.get(token), we should check in the following order and return the
// first found value:
// - el2.injector.get(token, default)
// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module
// - mod2.injector.get(token, default)
var NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};
function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {
    if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
    if (depDef.flags & 8 /* Value */) {
        return depDef.token;
    }
    var startView = view;
    if (depDef.flags & 2 /* Optional */) {
        notFoundValue = null;
    }
    var tokenKey$$1 = depDef.tokenKey;
    if (tokenKey$$1 === ChangeDetectorRefTokenKey) {
        // directives on the same element as a component should be able to control the change detector
        // of that component as well.
        allowPrivateServices = !!(elDef && elDef.element.componentView);
    }
    if (elDef && (depDef.flags & 1 /* SkipSelf */)) {
        allowPrivateServices = false;
        elDef = elDef.parent;
    }
    var searchView = view;
    while (searchView) {
        if (elDef) {
            switch (tokenKey$$1) {
                case RendererV1TokenKey: {
                    var compView = findCompView(searchView, elDef, allowPrivateServices);
                    return createRendererV1(compView);
                }
                case Renderer2TokenKey: {
                    var compView = findCompView(searchView, elDef, allowPrivateServices);
                    return compView.renderer;
                }
                case ElementRefTokenKey:
                    return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);
                case ViewContainerRefTokenKey:
                    return asElementData(searchView, elDef.nodeIndex).viewContainer;
                case TemplateRefTokenKey: {
                    if (elDef.element.template) {
                        return asElementData(searchView, elDef.nodeIndex).template;
                    }
                    break;
                }
                case ChangeDetectorRefTokenKey: {
                    var cdView = findCompView(searchView, elDef, allowPrivateServices);
                    return createChangeDetectorRef(cdView);
                }
                case InjectorRefTokenKey$1:
                case INJECTORRefTokenKey$1:
                    return createInjector$1(searchView, elDef);
                default:
                    var providerDef_1 = (allowPrivateServices ? elDef.element.allProviders :
                        elDef.element.publicProviders)[tokenKey$$1];
                    if (providerDef_1) {
                        var providerData = asProviderData(searchView, providerDef_1.nodeIndex);
                        if (!providerData) {
                            providerData = { instance: _createProviderInstance$1(searchView, providerDef_1) };
                            searchView.nodes[providerDef_1.nodeIndex] = providerData;
                        }
                        return providerData.instance;
                    }
            }
        }
        allowPrivateServices = isComponentView(searchView);
        elDef = viewParentEl(searchView);
        searchView = searchView.parent;
        if (depDef.flags & 4 /* Self */) {
            searchView = null;
        }
    }
    var value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);
    if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
        notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
        // Return the value from the root element injector when
        // - it provides it
        //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
        // - the module injector should not be checked
        //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
        return value;
    }
    return startView.root.ngModule.injector.get(depDef.token, notFoundValue);
}
function findCompView(view, elDef, allowPrivateServices) {
    var compView;
    if (allowPrivateServices) {
        compView = asElementData(view, elDef.nodeIndex).componentView;
    }
    else {
        compView = view;
        while (compView.parent && !isComponentView(compView)) {
            compView = compView.parent;
        }
    }
    return compView;
}
function updateProp(view, providerData, def, bindingIdx, value, changes) {
    if (def.flags & 32768 /* Component */) {
        var compView = asElementData(view, def.parent.nodeIndex).componentView;
        if (compView.def.flags & 2 /* OnPush */) {
            compView.state |= 8 /* ChecksEnabled */;
        }
    }
    var binding = def.bindings[bindingIdx];
    var propName = binding.name;
    // Note: This is still safe with Closure Compiler as
    // the user passed in the property name as an object has to `providerDef`,
    // so Closure Compiler will have renamed the property correctly already.
    providerData.instance[propName] = value;
    if (def.flags & 524288 /* OnChanges */) {
        changes = changes || {};
        var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);
        var binding_1 = def.bindings[bindingIdx];
        changes[binding_1.nonMinifiedName] =
            new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0);
    }
    view.oldValues[def.bindingIndex + bindingIdx] = value;
    return changes;
}
// This function calls the ngAfterContentCheck, ngAfterContentInit,
// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node
// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are
// called during a pre-order traversal of the view tree (that is calling the
// parent hooks before the child hooks) these events are sent in using a
// post-order traversal of the tree (children before parents). This changes the
// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the
// expected nodeIndex which a ngOnInit should be called. When sending
// ngAfterContentInit and ngAfterViewInit it is the expected count of
// ngAfterContentInit or ngAfterViewInit methods that have been called. This
// ensure that despite being called recursively or after picking up after an
// exception, the ngAfterContentInit or ngAfterViewInit will be called on the
// correct nodes. Consider for example, the following (where E is an element
// and D is a directive)
//  Tree:       pre-order index  post-order index
//    E1        0                6
//      E2      1                1
//       D3     2                0
//      E4      3                5
//       E5     4                4
//        E6    5                2
//        E7    6                3
// As can be seen, the post-order index has an unclear relationship to the
// pre-order index (postOrderIndex === preOrderIndex - parentCount +
// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit
// are stable (will be the same for the same view regardless of exceptions or
// recursion) we just need to count them which will roughly correspond to the
// post-order index (it skips elements and directives that do not have
// lifecycle hooks).
//
// For example, if an exception is raised in the E6.onAfterViewInit() the
// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to
// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will
// not have their ngAfterViewInit() called but, starting with E7, the rest of
// the view will begin getting ngAfterViewInit() called until a check and
// pass is complete.
//
// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()
// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected
// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.
// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.
// When the recursion returns the initIndex will be 7 so E1 is skipped as it
// has already been called in the recursively called checkAnUpdateView().
function callLifecycleHooksChildrenFirst(view, lifecycles) {
    if (!(view.def.nodeFlags & lifecycles)) {
        return;
    }
    var nodes = view.def.nodes;
    var initIndex = 0;
    for (var i = 0; i < nodes.length; i++) {
        var nodeDef = nodes[i];
        var parent_1 = nodeDef.parent;
        if (!parent_1 && 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_1 && (parent_1.flags & 1 /* TypeElement */) &&
            i === parent_1.nodeIndex + parent_1.childCount) {
            // last child of an element
            if (parent_1.directChildFlags & lifecycles) {
                initIndex = callElementProvidersLifecycles(view, parent_1, lifecycles, initIndex);
            }
            parent_1 = parent_1.parent;
        }
    }
}
function callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {
    for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {
        var nodeDef = view.def.nodes[i];
        if (nodeDef.flags & lifecycles) {
            callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);
        }
        // only visit direct children
        i += nodeDef.childCount;
    }
    return initIndex;
}
function callProviderLifecycles(view, index, lifecycles, initIndex) {
    var providerData = asProviderData(view, index);
    if (!providerData) {
        return;
    }
    var provider = providerData.instance;
    if (!provider) {
        return;
    }
    Services.setCurrentNode(view, index);
    if (lifecycles & 1048576 /* AfterContentInit */ &&
        shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) {
        provider.ngAfterContentInit();
    }
    if (lifecycles & 2097152 /* AfterContentChecked */) {
        provider.ngAfterContentChecked();
    }
    if (lifecycles & 4194304 /* AfterViewInit */ &&
        shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) {
        provider.ngAfterViewInit();
    }
    if (lifecycles & 8388608 /* AfterViewChecked */) {
        provider.ngAfterViewChecked();
    }
    if (lifecycles & 131072 /* OnDestroy */) {
        provider.ngOnDestroy();
    }
}

/**
 * @license
 * Copyright Google 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 queryDef(flags, id, bindings) {
    var bindingDefs = [];
    for (var propName in bindings) {
        var bindingType = bindings[propName];
        bindingDefs.push({ propName: propName, bindingType: bindingType });
    }
    return {
        // will bet set by the view definition
        nodeIndex: -1,
        parent: null,
        renderParent: null,
        bindingIndex: -1,
        outputIndex: -1,
        // regular values
        // TODO(vicb): check
        checkIndex: -1, flags: flags,
        childFlags: 0,
        directChildFlags: 0,
        childMatchedQueries: 0,
        ngContentIndex: -1,
        matchedQueries: {},
        matchedQueryIds: 0,
        references: {},
        childCount: 0,
        bindings: [],
        bindingFlags: 0,
        outputs: [],
        element: null,
        provider: null,
        text: null,
        query: { id: id, filterId: filterQueryId(id), bindings: bindingDefs },
        ngContent: null
    };
}
function createQuery$1() {
    return new QueryList$1();
}
function dirtyParentQueries(view) {
    var queryIds = view.def.nodeMatchedQueries;
    while (view.parent && isEmbeddedView(view)) {
        var tplDef = view.parentNodeDef;
        view = view.parent;
        // content queries
        var end = tplDef.nodeIndex + tplDef.childCount;
        for (var i = 0; i <= end; i++) {
            var nodeDef = view.def.nodes[i];
            if ((nodeDef.flags & 67108864 /* TypeContentQuery */) &&
                (nodeDef.flags & 536870912 /* DynamicQuery */) &&
                (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {
                asQueryList(view, i).setDirty();
            }
            if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) ||
                !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) ||
                !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) {
                // skip elements that don't contain the template element or no query.
                i += nodeDef.childCount;
            }
        }
    }
    // view queries
    if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) {
        for (var i = 0; i < view.def.nodes.length; i++) {
            var nodeDef = view.def.nodes[i];
            if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) {
                asQueryList(view, i).setDirty();
            }
            // only visit the root nodes
            i += nodeDef.childCount;
        }
    }
}
function checkAndUpdateQuery(view, nodeDef) {
    var queryList = asQueryList(view, nodeDef.nodeIndex);
    if (!queryList.dirty) {
        return;
    }
    var directiveInstance;
    var newValues = undefined;
    if (nodeDef.flags & 67108864 /* TypeContentQuery */) {
        var elementDef = nodeDef.parent.parent;
        newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []);
        directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;
    }
    else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {
        newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);
        directiveInstance = view.component;
    }
    queryList.reset(newValues);
    var bindings = nodeDef.query.bindings;
    var notify = false;
    for (var i = 0; i < bindings.length; i++) {
        var binding = bindings[i];
        var boundValue = void 0;
        switch (binding.bindingType) {
            case 0 /* First */:
                boundValue = queryList.first;
                break;
            case 1 /* All */:
                boundValue = queryList;
                notify = true;
                break;
        }
        directiveInstance[binding.propName] = boundValue;
    }
    if (notify) {
        queryList.notifyOnChanges();
    }
}
function calcQueryValues(view, startIndex, endIndex, queryDef, values) {
    for (var i = startIndex; i <= endIndex; i++) {
        var nodeDef = view.def.nodes[i];
        var valueType = nodeDef.matchedQueries[queryDef.id];
        if (valueType != null) {
            values.push(getQueryValue(view, nodeDef, valueType));
        }
        if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template &&
            (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) ===
                queryDef.filterId) {
            var elementData = asElementData(view, i);
            // check embedded views that were attached at the place of their template,
            // but process child nodes first if some match the query (see issue #16568)
            if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {
                calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);
                i += nodeDef.childCount;
            }
            if (nodeDef.flags & 16777216 /* EmbeddedViews */) {
                var embeddedViews = elementData.viewContainer._embeddedViews;
                for (var k = 0; k < embeddedViews.length; k++) {
                    var embeddedView = embeddedViews[k];
                    var dvc = declaredViewContainer(embeddedView);
                    if (dvc && dvc === elementData) {
                        calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);
                    }
                }
            }
            var projectedViews = elementData.template._projectedViews;
            if (projectedViews) {
                for (var k = 0; k < projectedViews.length; k++) {
                    var projectedView = projectedViews[k];
                    calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);
                }
            }
        }
        if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {
            // if no child matches the query, skip the children.
            i += nodeDef.childCount;
        }
    }
    return values;
}
function getQueryValue(view, nodeDef, queryValueType) {
    if (queryValueType != null) {
        // a match
        switch (queryValueType) {
            case 1 /* RenderElement */:
                return asElementData(view, nodeDef.nodeIndex).renderElement;
            case 0 /* ElementRef */:
                return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);
            case 2 /* TemplateRef */:
                return asElementData(view, nodeDef.nodeIndex).template;
            case 3 /* ViewContainerRef */:
                return asElementData(view, nodeDef.nodeIndex).viewContainer;
            case 4 /* Provider */:
                return asProviderData(view, nodeDef.nodeIndex).instance;
        }
    }
}

/**
 * @license
 * Copyright Google 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 ngContentDef(ngContentIndex, index) {
    return {
        // will bet set by the view definition
        nodeIndex: -1,
        parent: null,
        renderParent: null,
        bindingIndex: -1,
        outputIndex: -1,
        // regular values
        checkIndex: -1,
        flags: 8 /* TypeNgContent */,
        childFlags: 0,
        directChildFlags: 0,
        childMatchedQueries: 0,
        matchedQueries: {},
        matchedQueryIds: 0,
        references: {}, ngContentIndex: ngContentIndex,
        childCount: 0,
        bindings: [],
        bindingFlags: 0,
        outputs: [],
        element: null,
        provider: null,
        text: null,
        query: null,
        ngContent: { index: index }
    };
}
function appendNgContent(view, renderHost, def) {
    var parentEl = getParentRenderElement(view, renderHost, def);
    if (!parentEl) {
        // Nothing to do if there is no parent element.
        return;
    }
    var ngContentIndex = def.ngContent.index;
    visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined);
}

/**
 * @license
 * Copyright Google 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 purePipeDef(checkIndex, argCount) {
    // argCount + 1 to include the pipe as first arg
    return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, new Array(argCount + 1));
}
function pureArrayDef(checkIndex, argCount) {
    return _pureExpressionDef(32 /* TypePureArray */, checkIndex, new Array(argCount));
}
function pureObjectDef(checkIndex, propToIndex) {
    var keys = Object.keys(propToIndex);
    var nbKeys = keys.length;
    var propertyNames = new Array(nbKeys);
    for (var i = 0; i < nbKeys; i++) {
        var key = keys[i];
        var index = propToIndex[key];
        propertyNames[index] = key;
    }
    return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);
}
function _pureExpressionDef(flags, checkIndex, propertyNames) {
    var bindings = new Array(propertyNames.length);
    for (var i = 0; i < propertyNames.length; i++) {
        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
    };
}
function createPureExpression(view, def) {
    return { value: undefined };
}
function checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    var bindings = def.bindings;
    var changed = false;
    var bindLen = bindings.length;
    if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))
        changed = true;
    if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))
        changed = true;
    if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))
        changed = true;
    if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))
        changed = true;
    if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))
        changed = true;
    if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))
        changed = true;
    if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))
        changed = true;
    if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))
        changed = true;
    if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))
        changed = true;
    if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))
        changed = true;
    if (changed) {
        var data = asPureExpressionData(view, def.nodeIndex);
        var value = void 0;
        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[bindings[0].name] = v0;
                if (bindLen > 1)
                    value[bindings[1].name] = v1;
                if (bindLen > 2)
                    value[bindings[2].name] = v2;
                if (bindLen > 3)
                    value[bindings[3].name] = v3;
                if (bindLen > 4)
                    value[bindings[4].name] = v4;
                if (bindLen > 5)
                    value[bindings[5].name] = v5;
                if (bindLen > 6)
                    value[bindings[6].name] = v6;
                if (bindLen > 7)
                    value[bindings[7].name] = v7;
                if (bindLen > 8)
                    value[bindings[8].name] = v8;
                if (bindLen > 9)
                    value[bindings[9].name] = v9;
                break;
            case 128 /* TypePurePipe */:
                var pipe = v0;
                switch (bindLen) {
                    case 1:
                        value = pipe.transform(v0);
                        break;
                    case 2:
                        value = pipe.transform(v1);
                        break;
                    case 3:
                        value = pipe.transform(v1, v2);
                        break;
                    case 4:
                        value = pipe.transform(v1, v2, v3);
                        break;
                    case 5:
                        value = pipe.transform(v1, v2, v3, v4);
                        break;
                    case 6:
                        value = pipe.transform(v1, v2, v3, v4, v5);
                        break;
                    case 7:
                        value = pipe.transform(v1, v2, v3, v4, v5, v6);
                        break;
                    case 8:
                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);
                        break;
                    case 9:
                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);
                        break;
                    case 10:
                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);
                        break;
                }
                break;
        }
        data.value = value;
    }
    return changed;
}
function checkAndUpdatePureExpressionDynamic(view, def, values) {
    var bindings = def.bindings;
    var changed = false;
    for (var i = 0; i < values.length; i++) {
        // Note: We need to loop over all values, so that
        // the old values are updates as well!
        if (checkAndUpdateBinding(view, def, i, values[i])) {
            changed = true;
        }
    }
    if (changed) {
        var data = asPureExpressionData(view, def.nodeIndex);
        var value = void 0;
        switch (def.flags & 201347067 /* Types */) {
            case 32 /* TypePureArray */:
                value = values;
                break;
            case 64 /* TypePureObject */:
                value = {};
                for (var i = 0; i < values.length; i++) {
                    value[bindings[i].name] = values[i];
                }
                break;
            case 128 /* TypePurePipe */:
                var pipe = values[0];
                var params = values.slice(1);
                value = pipe.transform.apply(pipe, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(params));
                break;
        }
        data.value = value;
    }
    return changed;
}

/**
 * @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 textDef(checkIndex, ngContentIndex, staticText) {
    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,
    };
}
function createText(view, renderHost, def) {
    var renderNode$$1;
    var renderer = view.renderer;
    renderNode$$1 = renderer.createText(def.text.prefix);
    var parentEl = getParentRenderElement(view, renderHost, def);
    if (parentEl) {
        renderer.appendChild(parentEl, renderNode$$1);
    }
    return { renderText: renderNode$$1 };
}
function checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    var changed = false;
    var bindings = def.bindings;
    var bindLen = bindings.length;
    if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))
        changed = true;
    if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))
        changed = true;
    if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))
        changed = true;
    if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))
        changed = true;
    if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))
        changed = true;
    if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))
        changed = true;
    if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))
        changed = true;
    if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))
        changed = true;
    if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))
        changed = true;
    if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))
        changed = true;
    if (changed) {
        var value = def.text.prefix;
        if (bindLen > 0)
            value += _addInterpolationPart(v0, bindings[0]);
        if (bindLen > 1)
            value += _addInterpolationPart(v1, bindings[1]);
        if (bindLen > 2)
            value += _addInterpolationPart(v2, bindings[2]);
        if (bindLen > 3)
            value += _addInterpolationPart(v3, bindings[3]);
        if (bindLen > 4)
            value += _addInterpolationPart(v4, bindings[4]);
        if (bindLen > 5)
            value += _addInterpolationPart(v5, bindings[5]);
        if (bindLen > 6)
            value += _addInterpolationPart(v6, bindings[6]);
        if (bindLen > 7)
            value += _addInterpolationPart(v7, bindings[7]);
        if (bindLen > 8)
            value += _addInterpolationPart(v8, bindings[8]);
        if (bindLen > 9)
            value += _addInterpolationPart(v9, bindings[9]);
        var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;
        view.renderer.setValue(renderNode$$1, value);
    }
    return changed;
}
function checkAndUpdateTextDynamic(view, def, values) {
    var bindings = def.bindings;
    var changed = false;
    for (var i = 0; i < values.length; i++) {
        // Note: We need to loop over all values, so that
        // the old values are updates as well!
        if (checkAndUpdateBinding(view, def, i, values[i])) {
            changed = true;
        }
    }
    if (changed) {
        var value = '';
        for (var i = 0; i < values.length; i++) {
            value = value + _addInterpolationPart(values[i], bindings[i]);
        }
        value = def.text.prefix + value;
        var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;
        view.renderer.setValue(renderNode$$1, value);
    }
    return changed;
}
function _addInterpolationPart(value, binding) {
    var valueStr = value != null ? value.toString() : '';
    return valueStr + binding.suffix;
}

/**
 * @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 viewDef(flags, nodes, updateDirectives, updateRenderer) {
    // clone nodes and set auto calculated values
    var viewBindingCount = 0;
    var viewDisposableCount = 0;
    var viewNodeFlags = 0;
    var viewRootNodeFlags = 0;
    var viewMatchedQueries = 0;
    var currentParent = null;
    var currentRenderParent = null;
    var currentElementHasPublicProviders = false;
    var currentElementHasPrivateProviders = false;
    var lastRenderRootNode = null;
    for (var i = 0; i < nodes.length; i++) {
        var node = nodes[i];
        node.nodeIndex = i;
        node.parent = currentParent;
        node.bindingIndex = viewBindingCount;
        node.outputIndex = viewDisposableCount;
        node.renderParent = currentRenderParent;
        viewNodeFlags |= node.flags;
        viewMatchedQueries |= node.matchedQueryIds;
        if (node.element) {
            var elDef = node.element;
            elDef.publicProviders =
                currentParent ? currentParent.element.publicProviders : Object.create(null);
            elDef.allProviders = elDef.publicProviders;
            // Note: We assume that all providers of an element are before any child element!
            currentElementHasPublicProviders = false;
            currentElementHasPrivateProviders = false;
            if (node.element.template) {
                viewMatchedQueries |= node.element.template.nodeMatchedQueries;
            }
        }
        validateNode(currentParent, node, nodes.length);
        viewBindingCount += node.bindings.length;
        viewDisposableCount += node.outputs.length;
        if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {
            lastRenderRootNode = node;
        }
        if (node.flags & 20224 /* CatProvider */) {
            if (!currentElementHasPublicProviders) {
                currentElementHasPublicProviders = true;
                // Use prototypical inheritance to not get O(n^2) complexity...
                currentParent.element.publicProviders =
                    Object.create(currentParent.element.publicProviders);
                currentParent.element.allProviders = currentParent.element.publicProviders;
            }
            var isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0;
            var isComponent = (node.flags & 32768 /* Component */) !== 0;
            if (!isPrivateService || isComponent) {
                currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;
            }
            else {
                if (!currentElementHasPrivateProviders) {
                    currentElementHasPrivateProviders = true;
                    // Use prototypical inheritance to not get O(n^2) complexity...
                    currentParent.element.allProviders =
                        Object.create(currentParent.element.publicProviders);
                }
                currentParent.element.allProviders[tokenKey(node.provider.token)] = node;
            }
            if (isComponent) {
                currentParent.element.componentProvider = node;
            }
        }
        if (currentParent) {
            currentParent.childFlags |= node.flags;
            currentParent.directChildFlags |= node.flags;
            currentParent.childMatchedQueries |= node.matchedQueryIds;
            if (node.element && node.element.template) {
                currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;
            }
        }
        else {
            viewRootNodeFlags |= node.flags;
        }
        if (node.childCount > 0) {
            currentParent = node;
            if (!isNgContainer(node)) {
                currentRenderParent = node;
            }
        }
        else {
            // When the current node has no children, check if it is the last children of its parent.
            // When it is, propagate the flags up.
            // The loop is required because an element could be the last transitive children of several
            // elements. We loop to either the root or the highest opened element (= with remaining
            // children)
            while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {
                var newParent = currentParent.parent;
                if (newParent) {
                    newParent.childFlags |= currentParent.childFlags;
                    newParent.childMatchedQueries |= currentParent.childMatchedQueries;
                }
                currentParent = newParent;
                // We also need to update the render parent & account for ng-container
                if (currentParent && isNgContainer(currentParent)) {
                    currentRenderParent = currentParent.renderParent;
                }
                else {
                    currentRenderParent = currentParent;
                }
            }
        }
    }
    var handleEvent = function (view, nodeIndex, eventName, event) {
        return nodes[nodeIndex].element.handleEvent(view, eventName, event);
    };
    return {
        // Will be filled later...
        factory: null,
        nodeFlags: viewNodeFlags,
        rootNodeFlags: viewRootNodeFlags,
        nodeMatchedQueries: viewMatchedQueries, flags: flags,
        nodes: nodes,
        updateDirectives: updateDirectives || NOOP,
        updateRenderer: updateRenderer || NOOP, handleEvent: handleEvent,
        bindingCount: viewBindingCount,
        outputCount: viewDisposableCount, lastRenderRootNode: lastRenderRootNode
    };
}
function isNgContainer(node) {
    return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;
}
function validateNode(parent, node, nodeCount) {
    var template = node.element && node.element.template;
    if (template) {
        if (!template.lastRenderRootNode) {
            throw new Error("Illegal State: Embedded templates without nodes are not allowed!");
        }
        if (template.lastRenderRootNode &&
            template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) {
            throw new Error("Illegal State: Last root node of a template can't have embedded views, at index " + node.nodeIndex + "!");
        }
    }
    if (node.flags & 20224 /* CatProvider */) {
        var parentFlags = parent ? parent.flags : 0;
        if ((parentFlags & 1 /* TypeElement */) === 0) {
            throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index " + 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 " + node.nodeIndex + "!");
        }
        if (node.flags & 134217728 /* TypeViewQuery */ && parent) {
            throw new Error("Illegal State: View Query nodes have to be top level nodes, at index " + node.nodeIndex + "!");
        }
    }
    if (node.childCount) {
        var parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;
        if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {
            throw new Error("Illegal State: childCount of node leads outside of parent, at index " + node.nodeIndex + "!");
        }
    }
}
function createEmbeddedView(parent, anchorDef$$1, viewDef, context) {
    // embedded views are seen as siblings to the anchor, so we need
    // to get the parent of the anchor and use it as parentIndex.
    var view = createView(parent.root, parent.renderer, parent, anchorDef$$1, viewDef);
    initView(view, parent.component, context);
    createViewNodes(view);
    return view;
}
function createRootView(root, def, context) {
    var view = createView(root, root.renderer, null, null, def);
    initView(view, context, context);
    createViewNodes(view);
    return view;
}
function createComponentView(parentView, nodeDef, viewDef, hostElement) {
    var rendererType = nodeDef.element.componentRendererType;
    var compRenderer;
    if (!rendererType) {
        compRenderer = parentView.root.renderer;
    }
    else {
        compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);
    }
    return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);
}
function createView(root, renderer, parent, parentNodeDef, def) {
    var nodes = new Array(def.nodes.length);
    var disposables = def.outputCount ? new Array(def.outputCount) : null;
    var view = {
        def: def,
        parent: parent,
        viewContainerParent: null, parentNodeDef: parentNodeDef,
        context: null,
        component: null, nodes: nodes,
        state: 13 /* CatInit */, root: root, renderer: renderer,
        oldValues: new Array(def.bindingCount), disposables: disposables,
        initIndex: -1
    };
    return view;
}
function initView(view, component, context) {
    view.component = component;
    view.context = context;
}
function createViewNodes(view) {
    var renderHost;
    if (isComponentView(view)) {
        var hostDef = view.parentNodeDef;
        renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;
    }
    var def = view.def;
    var nodes = view.nodes;
    for (var i = 0; i < def.nodes.length; i++) {
        var nodeDef = def.nodes[i];
        Services.setCurrentNode(view, i);
        var nodeData = void 0;
        switch (nodeDef.flags & 201347067 /* Types */) {
            case 1 /* TypeElement */:
                var el = createElement(view, renderHost, nodeDef);
                var componentView = undefined;
                if (nodeDef.flags & 33554432 /* ComponentView */) {
                    var compViewDef = resolveDefinition(nodeDef.element.componentView);
                    componentView = Services.createComponentView(view, nodeDef, compViewDef, el);
                }
                listenToElementOutputs(view, componentView, nodeDef, el);
                nodeData = {
                    renderElement: el,
                    componentView: componentView,
                    viewContainer: null,
                    template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined
                };
                if (nodeDef.flags & 16777216 /* EmbeddedViews */) {
                    nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);
                }
                break;
            case 2 /* TypeText */:
                nodeData = createText(view, renderHost, nodeDef);
                break;
            case 512 /* TypeClassProvider */:
            case 1024 /* TypeFactoryProvider */:
            case 2048 /* TypeUseExistingProvider */:
            case 256 /* TypeValueProvider */: {
                nodeData = nodes[i];
                if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) {
                    var instance = createProviderInstance(view, nodeDef);
                    nodeData = { instance: instance };
                }
                break;
            }
            case 16 /* TypePipe */: {
                var instance = createPipeInstance(view, nodeDef);
                nodeData = { instance: instance };
                break;
            }
            case 16384 /* TypeDirective */: {
                nodeData = nodes[i];
                if (!nodeData) {
                    var instance = createDirectiveInstance(view, nodeDef);
                    nodeData = { instance: instance };
                }
                if (nodeDef.flags & 32768 /* Component */) {
                    var compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;
                    initView(compView, nodeData.instance, nodeData.instance);
                }
                break;
            }
            case 32 /* TypePureArray */:
            case 64 /* TypePureObject */:
            case 128 /* TypePurePipe */:
                nodeData = createPureExpression(view, nodeDef);
                break;
            case 67108864 /* TypeContentQuery */:
            case 134217728 /* TypeViewQuery */:
                nodeData = createQuery$1();
                break;
            case 8 /* TypeNgContent */:
                appendNgContent(view, renderHost, nodeDef);
                // no runtime data needed for NgContent...
                nodeData = undefined;
                break;
        }
        nodes[i] = nodeData;
    }
    // Create the ViewData.nodes of component views after we created everything else,
    // so that e.g. ng-content works
    execComponentViewsAction(view, ViewAction.CreateViewNodes);
    // fill static content and view queries
    execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */);
}
function checkNoChangesView(view) {
    markProjectedViewsForCheck(view);
    Services.updateDirectives(view, 1 /* CheckNoChanges */);
    execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);
    Services.updateRenderer(view, 1 /* CheckNoChanges */);
    execComponentViewsAction(view, ViewAction.CheckNoChanges);
    // Note: We don't check queries for changes as we didn't do this in v2.x.
    // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.
    view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);
}
function checkAndUpdateView(view) {
    if (view.state & 1 /* BeforeFirstCheck */) {
        view.state &= ~1 /* BeforeFirstCheck */;
        view.state |= 2 /* FirstCheck */;
    }
    else {
        view.state &= ~2 /* FirstCheck */;
    }
    shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */);
    markProjectedViewsForCheck(view);
    Services.updateDirectives(view, 0 /* CheckAndUpdate */);
    execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);
    execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);
    var callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */);
    callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0));
    Services.updateRenderer(view, 0 /* CheckAndUpdate */);
    execComponentViewsAction(view, ViewAction.CheckAndUpdate);
    execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);
    callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */);
    callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0));
    if (view.def.flags & 2 /* OnPush */) {
        view.state &= ~8 /* ChecksEnabled */;
    }
    view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);
    shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */);
}
function checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    if (argStyle === 0 /* Inline */) {
        return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
    }
    else {
        return checkAndUpdateNodeDynamic(view, nodeDef, v0);
    }
}
function markProjectedViewsForCheck(view) {
    var def = view.def;
    if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) {
        return;
    }
    for (var i = 0; i < def.nodes.length; i++) {
        var nodeDef = def.nodes[i];
        if (nodeDef.flags & 4 /* ProjectedTemplate */) {
            var projectedViews = asElementData(view, i).template._projectedViews;
            if (projectedViews) {
                for (var i_1 = 0; i_1 < projectedViews.length; i_1++) {
                    var projectedView = projectedViews[i_1];
                    projectedView.state |= 32 /* CheckProjectedView */;
                    markParentViewsForCheckProjectedViews(projectedView, view);
                }
            }
        }
        else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) {
            // a parent with leafs
            // no child is a component,
            // then skip the children
            i += nodeDef.childCount;
        }
    }
}
function checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    switch (nodeDef.flags & 201347067 /* Types */) {
        case 1 /* TypeElement */:
            return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
        case 2 /* TypeText */:
            return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
        case 16384 /* TypeDirective */:
            return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
        case 32 /* TypePureArray */:
        case 64 /* TypePureObject */:
        case 128 /* TypePurePipe */:
            return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
        default:
            throw 'unreachable';
    }
}
function checkAndUpdateNodeDynamic(view, nodeDef, values) {
    switch (nodeDef.flags & 201347067 /* Types */) {
        case 1 /* TypeElement */:
            return checkAndUpdateElementDynamic(view, nodeDef, values);
        case 2 /* TypeText */:
            return checkAndUpdateTextDynamic(view, nodeDef, values);
        case 16384 /* TypeDirective */:
            return checkAndUpdateDirectiveDynamic(view, nodeDef, values);
        case 32 /* TypePureArray */:
        case 64 /* TypePureObject */:
        case 128 /* TypePurePipe */:
            return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);
        default:
            throw 'unreachable';
    }
}
function checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    if (argStyle === 0 /* Inline */) {
        checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
    }
    else {
        checkNoChangesNodeDynamic(view, nodeDef, v0);
    }
    // Returning false is ok here as we would have thrown in case of a change.
    return false;
}
function checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    var bindLen = nodeDef.bindings.length;
    if (bindLen > 0)
        checkBindingNoChanges(view, nodeDef, 0, v0);
    if (bindLen > 1)
        checkBindingNoChanges(view, nodeDef, 1, v1);
    if (bindLen > 2)
        checkBindingNoChanges(view, nodeDef, 2, v2);
    if (bindLen > 3)
        checkBindingNoChanges(view, nodeDef, 3, v3);
    if (bindLen > 4)
        checkBindingNoChanges(view, nodeDef, 4, v4);
    if (bindLen > 5)
        checkBindingNoChanges(view, nodeDef, 5, v5);
    if (bindLen > 6)
        checkBindingNoChanges(view, nodeDef, 6, v6);
    if (bindLen > 7)
        checkBindingNoChanges(view, nodeDef, 7, v7);
    if (bindLen > 8)
        checkBindingNoChanges(view, nodeDef, 8, v8);
    if (bindLen > 9)
        checkBindingNoChanges(view, nodeDef, 9, v9);
}
function checkNoChangesNodeDynamic(view, nodeDef, values) {
    for (var i = 0; i < values.length; i++) {
        checkBindingNoChanges(view, nodeDef, i, values[i]);
    }
}
/**
 * Workaround https://github.com/angular/tsickle/issues/497
 * @suppress {misplacedTypeAnnotation}
 */
function checkNoChangesQuery(view, nodeDef) {
    var queryList = asQueryList(view, nodeDef.nodeIndex);
    if (queryList.dirty) {
        throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), "Query " + nodeDef.query.id + " not dirty", "Query " + nodeDef.query.id + " dirty", (view.state & 1 /* BeforeFirstCheck */) !== 0);
    }
}
function destroyView(view) {
    if (view.state & 128 /* Destroyed */) {
        return;
    }
    execEmbeddedViewsAction(view, ViewAction.Destroy);
    execComponentViewsAction(view, ViewAction.Destroy);
    callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */);
    if (view.disposables) {
        for (var i = 0; i < view.disposables.length; i++) {
            view.disposables[i]();
        }
    }
    detachProjectedView(view);
    if (view.renderer.destroyNode) {
        destroyViewNodes(view);
    }
    if (isComponentView(view)) {
        view.renderer.destroy();
    }
    view.state |= 128 /* Destroyed */;
}
function destroyViewNodes(view) {
    var len = view.def.nodes.length;
    for (var i = 0; i < len; i++) {
        var def = view.def.nodes[i];
        if (def.flags & 1 /* TypeElement */) {
            view.renderer.destroyNode(asElementData(view, i).renderElement);
        }
        else if (def.flags & 2 /* TypeText */) {
            view.renderer.destroyNode(asTextData(view, i).renderText);
        }
        else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) {
            asQueryList(view, i).destroy();
        }
    }
}
var ViewAction;
(function (ViewAction) {
    ViewAction[ViewAction["CreateViewNodes"] = 0] = "CreateViewNodes";
    ViewAction[ViewAction["CheckNoChanges"] = 1] = "CheckNoChanges";
    ViewAction[ViewAction["CheckNoChangesProjectedViews"] = 2] = "CheckNoChangesProjectedViews";
    ViewAction[ViewAction["CheckAndUpdate"] = 3] = "CheckAndUpdate";
    ViewAction[ViewAction["CheckAndUpdateProjectedViews"] = 4] = "CheckAndUpdateProjectedViews";
    ViewAction[ViewAction["Destroy"] = 5] = "Destroy";
})(ViewAction || (ViewAction = {}));
function execComponentViewsAction(view, action) {
    var def = view.def;
    if (!(def.nodeFlags & 33554432 /* ComponentView */)) {
        return;
    }
    for (var i = 0; i < def.nodes.length; i++) {
        var nodeDef = def.nodes[i];
        if (nodeDef.flags & 33554432 /* ComponentView */) {
            // a leaf
            callViewAction(asElementData(view, i).componentView, action);
        }
        else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) {
            // a parent with leafs
            // no child is a component,
            // then skip the children
            i += nodeDef.childCount;
        }
    }
}
function execEmbeddedViewsAction(view, action) {
    var def = view.def;
    if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) {
        return;
    }
    for (var i = 0; i < def.nodes.length; i++) {
        var nodeDef = def.nodes[i];
        if (nodeDef.flags & 16777216 /* EmbeddedViews */) {
            // a leaf
            var embeddedViews = asElementData(view, i).viewContainer._embeddedViews;
            for (var k = 0; k < embeddedViews.length; k++) {
                callViewAction(embeddedViews[k], action);
            }
        }
        else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) {
            // a parent with leafs
            // no child is a component,
            // then skip the children
            i += nodeDef.childCount;
        }
    }
}
function callViewAction(view, action) {
    var viewState = view.state;
    switch (action) {
        case ViewAction.CheckNoChanges:
            if ((viewState & 128 /* Destroyed */) === 0) {
                if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {
                    checkNoChangesView(view);
                }
                else if (viewState & 64 /* CheckProjectedViews */) {
                    execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);
                }
            }
            break;
        case ViewAction.CheckNoChangesProjectedViews:
            if ((viewState & 128 /* Destroyed */) === 0) {
                if (viewState & 32 /* CheckProjectedView */) {
                    checkNoChangesView(view);
                }
                else if (viewState & 64 /* CheckProjectedViews */) {
                    execProjectedViewsAction(view, action);
                }
            }
            break;
        case ViewAction.CheckAndUpdate:
            if ((viewState & 128 /* Destroyed */) === 0) {
                if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {
                    checkAndUpdateView(view);
                }
                else if (viewState & 64 /* CheckProjectedViews */) {
                    execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);
                }
            }
            break;
        case ViewAction.CheckAndUpdateProjectedViews:
            if ((viewState & 128 /* Destroyed */) === 0) {
                if (viewState & 32 /* CheckProjectedView */) {
                    checkAndUpdateView(view);
                }
                else if (viewState & 64 /* CheckProjectedViews */) {
                    execProjectedViewsAction(view, action);
                }
            }
            break;
        case ViewAction.Destroy:
            // Note: destroyView recurses over all views,
            // so we don't need to special case projected views here.
            destroyView(view);
            break;
        case ViewAction.CreateViewNodes:
            createViewNodes(view);
            break;
    }
}
function execProjectedViewsAction(view, action) {
    execEmbeddedViewsAction(view, action);
    execComponentViewsAction(view, action);
}
function execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {
    if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {
        return;
    }
    var nodeCount = view.def.nodes.length;
    for (var i = 0; i < nodeCount; i++) {
        var nodeDef = view.def.nodes[i];
        if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {
            Services.setCurrentNode(view, nodeDef.nodeIndex);
            switch (checkType) {
                case 0 /* CheckAndUpdate */:
                    checkAndUpdateQuery(view, nodeDef);
                    break;
                case 1 /* CheckNoChanges */:
                    checkNoChangesQuery(view, nodeDef);
                    break;
            }
        }
        if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {
            // no child has a matching query
            // then skip the children
            i += nodeDef.childCount;
        }
    }
}

/**
 * @license
 * Copyright Google 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 initialized = false;
function initServicesIfNeeded() {
    if (initialized) {
        return;
    }
    initialized = true;
    var services = isDevMode() ? createDebugServices() : createProdServices();
    Services.setCurrentNode = services.setCurrentNode;
    Services.createRootView = services.createRootView;
    Services.createEmbeddedView = services.createEmbeddedView;
    Services.createComponentView = services.createComponentView;
    Services.createNgModuleRef = services.createNgModuleRef;
    Services.overrideProvider = services.overrideProvider;
    Services.overrideComponentView = services.overrideComponentView;
    Services.clearOverrides = services.clearOverrides;
    Services.checkAndUpdateView = services.checkAndUpdateView;
    Services.checkNoChangesView = services.checkNoChangesView;
    Services.destroyView = services.destroyView;
    Services.resolveDep = resolveDep;
    Services.createDebugContext = services.createDebugContext;
    Services.handleEvent = services.handleEvent;
    Services.updateDirectives = services.updateDirectives;
    Services.updateRenderer = services.updateRenderer;
    Services.dirtyParentQueries = dirtyParentQueries;
}
function createProdServices() {
    return {
        setCurrentNode: function () { },
        createRootView: createProdRootView,
        createEmbeddedView: createEmbeddedView,
        createComponentView: createComponentView,
        createNgModuleRef: createNgModuleRef,
        overrideProvider: NOOP,
        overrideComponentView: NOOP,
        clearOverrides: NOOP,
        checkAndUpdateView: checkAndUpdateView,
        checkNoChangesView: checkNoChangesView,
        destroyView: destroyView,
        createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },
        handleEvent: function (view, nodeIndex, eventName, event) {
            return view.def.handleEvent(view, nodeIndex, eventName, event);
        },
        updateDirectives: function (view, checkType) { return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
            prodCheckNoChangesNode, view); },
        updateRenderer: function (view, checkType) { return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
            prodCheckNoChangesNode, view); },
    };
}
function createDebugServices() {
    return {
        setCurrentNode: debugSetCurrentNode,
        createRootView: debugCreateRootView,
        createEmbeddedView: debugCreateEmbeddedView,
        createComponentView: debugCreateComponentView,
        createNgModuleRef: debugCreateNgModuleRef,
        overrideProvider: debugOverrideProvider,
        overrideComponentView: debugOverrideComponentView,
        clearOverrides: debugClearOverrides,
        checkAndUpdateView: debugCheckAndUpdateView,
        checkNoChangesView: debugCheckNoChangesView,
        destroyView: debugDestroyView,
        createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },
        handleEvent: debugHandleEvent,
        updateDirectives: debugUpdateDirectives,
        updateRenderer: debugUpdateRenderer,
    };
}
function createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {
    var rendererFactory = ngModule.injector.get(RendererFactory2);
    return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);
}
function debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {
    var rendererFactory = ngModule.injector.get(RendererFactory2);
    var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);
    var defWithOverride = applyProviderOverridesToView(def);
    return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);
}
function createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {
    var sanitizer = ngModule.injector.get(Sanitizer);
    var errorHandler = ngModule.injector.get(ErrorHandler);
    var renderer = rendererFactory.createRenderer(null, null);
    return {
        ngModule: ngModule,
        injector: elInjector, projectableNodes: projectableNodes,
        selectorOrNode: rootSelectorOrNode, sanitizer: sanitizer, rendererFactory: rendererFactory, renderer: renderer, errorHandler: errorHandler
    };
}
function debugCreateEmbeddedView(parentView, anchorDef, viewDef$$1, context) {
    var defWithOverride = applyProviderOverridesToView(viewDef$$1);
    return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);
}
function debugCreateComponentView(parentView, nodeDef, viewDef$$1, hostElement) {
    var overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);
    if (overrideComponentView) {
        viewDef$$1 = overrideComponentView;
    }
    else {
        viewDef$$1 = applyProviderOverridesToView(viewDef$$1);
    }
    return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef$$1, hostElement]);
}
function debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {
    var defWithOverride = applyProviderOverridesToNgModule(def);
    return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);
}
var providerOverrides = new Map();
var providerOverridesWithScope = new Map();
var viewDefOverrides = new Map();
function debugOverrideProvider(override) {
    providerOverrides.set(override.token, override);
    var injectableDef;
    if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&
        typeof injectableDef.providedIn === 'function') {
        providerOverridesWithScope.set(override.token, override);
    }
}
function debugOverrideComponentView(comp, compFactory) {
    var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));
    var compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);
    viewDefOverrides.set(comp, compViewDef);
}
function debugClearOverrides() {
    providerOverrides.clear();
    providerOverridesWithScope.clear();
    viewDefOverrides.clear();
}
// Notes about the algorithm:
// 1) Locate the providers of an element and check if one of them was overwritten
// 2) Change the providers of that element
//
// We only create new datastructures if we need to, to keep perf impact
// reasonable.
function applyProviderOverridesToView(def) {
    if (providerOverrides.size === 0) {
        return def;
    }
    var elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);
    if (elementIndicesWithOverwrittenProviders.length === 0) {
        return def;
    }
    // clone the whole view definition,
    // as it maintains references between the nodes that are hard to update.
    def = def.factory(function () { return NOOP; });
    for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {
        applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);
    }
    return def;
    function findElementIndicesWithOverwrittenProviders(def) {
        var elIndicesWithOverwrittenProviders = [];
        var lastElementDef = null;
        for (var i = 0; i < def.nodes.length; i++) {
            var nodeDef = def.nodes[i];
            if (nodeDef.flags & 1 /* TypeElement */) {
                lastElementDef = nodeDef;
            }
            if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ &&
                providerOverrides.has(nodeDef.provider.token)) {
                elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);
                lastElementDef = null;
            }
        }
        return elIndicesWithOverwrittenProviders;
    }
    function applyProviderOverridesToElement(viewDef$$1, elIndex) {
        for (var i = elIndex + 1; i < viewDef$$1.nodes.length; i++) {
            var nodeDef = viewDef$$1.nodes[i];
            if (nodeDef.flags & 1 /* TypeElement */) {
                // stop at the next element
                return;
            }
            if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {
                var provider = nodeDef.provider;
                var override = providerOverrides.get(provider.token);
                if (override) {
                    nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;
                    provider.deps = splitDepsDsl(override.deps);
                    provider.value = override.value;
                }
            }
        }
    }
}
// Notes about the algorithm:
// We only create new datastructures if we need to, to keep perf impact
// reasonable.
function applyProviderOverridesToNgModule(def) {
    var _a = calcHasOverrides(def), hasOverrides = _a.hasOverrides, hasDeprecatedOverrides = _a.hasDeprecatedOverrides;
    if (!hasOverrides) {
        return def;
    }
    // clone the whole view definition,
    // as it maintains references between the nodes that are hard to update.
    def = def.factory(function () { return NOOP; });
    applyProviderOverrides(def);
    return def;
    function calcHasOverrides(def) {
        var hasOverrides = false;
        var hasDeprecatedOverrides = false;
        if (providerOverrides.size === 0) {
            return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };
        }
        def.providers.forEach(function (node) {
            var override = providerOverrides.get(node.token);
            if ((node.flags & 3840 /* CatProviderNoDirective */) && override) {
                hasOverrides = true;
                hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
            }
        });
        def.modules.forEach(function (module) {
            providerOverridesWithScope.forEach(function (override, token) {
                if (getInjectableDef(token).providedIn === module) {
                    hasOverrides = true;
                    hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
                }
            });
        });
        return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };
    }
    function applyProviderOverrides(def) {
        for (var i = 0; i < def.providers.length; i++) {
            var provider = def.providers[i];
            if (hasDeprecatedOverrides) {
                // We had a bug where me made
                // all providers lazy. Keep this logic behind a flag
                // for migrating existing users.
                provider.flags |= 4096 /* LazyProvider */;
            }
            var override = providerOverrides.get(provider.token);
            if (override) {
                provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags;
                provider.deps = splitDepsDsl(override.deps);
                provider.value = override.value;
            }
        }
        if (providerOverridesWithScope.size > 0) {
            var moduleSet_1 = new Set(def.modules);
            providerOverridesWithScope.forEach(function (override, token) {
                if (moduleSet_1.has(getInjectableDef(token).providedIn)) {
                    var provider = {
                        token: token,
                        flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */),
                        deps: splitDepsDsl(override.deps),
                        value: override.value,
                        index: def.providers.length,
                    };
                    def.providers.push(provider);
                    def.providersByKey[tokenKey(token)] = provider;
                }
            });
        }
    }
}
function prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    var nodeDef = view.def.nodes[checkIndex];
    checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
    return (nodeDef.flags & 224 /* CatPureExpression */) ?
        asPureExpressionData(view, checkIndex).value :
        undefined;
}
function prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
    var nodeDef = view.def.nodes[checkIndex];
    checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
    return (nodeDef.flags & 224 /* CatPureExpression */) ?
        asPureExpressionData(view, checkIndex).value :
        undefined;
}
function debugCheckAndUpdateView(view) {
    return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);
}
function debugCheckNoChangesView(view) {
    return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);
}
function debugDestroyView(view) {
    return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);
}
var DebugAction;
(function (DebugAction) {
    DebugAction[DebugAction["create"] = 0] = "create";
    DebugAction[DebugAction["detectChanges"] = 1] = "detectChanges";
    DebugAction[DebugAction["checkNoChanges"] = 2] = "checkNoChanges";
    DebugAction[DebugAction["destroy"] = 3] = "destroy";
    DebugAction[DebugAction["handleEvent"] = 4] = "handleEvent";
})(DebugAction || (DebugAction = {}));
var _currentAction;
var _currentView;
var _currentNodeIndex;
function debugSetCurrentNode(view, nodeIndex) {
    _currentView = view;
    _currentNodeIndex = nodeIndex;
}
function debugHandleEvent(view, nodeIndex, eventName, event) {
    debugSetCurrentNode(view, nodeIndex);
    return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);
}
function debugUpdateDirectives(view, checkType) {
    if (view.state & 128 /* Destroyed */) {
        throw viewDestroyedError(DebugAction[_currentAction]);
    }
    debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));
    return view.def.updateDirectives(debugCheckDirectivesFn, view);
    function debugCheckDirectivesFn(view, nodeIndex, argStyle) {
        var values = [];
        for (var _i = 3; _i < arguments.length; _i++) {
            values[_i - 3] = arguments[_i];
        }
        var nodeDef = view.def.nodes[nodeIndex];
        if (checkType === 0 /* CheckAndUpdate */) {
            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);
        }
        else {
            debugCheckNoChangesNode(view, nodeDef, argStyle, values);
        }
        if (nodeDef.flags & 16384 /* TypeDirective */) {
            debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));
        }
        return (nodeDef.flags & 224 /* CatPureExpression */) ?
            asPureExpressionData(view, nodeDef.nodeIndex).value :
            undefined;
    }
}
function debugUpdateRenderer(view, checkType) {
    if (view.state & 128 /* Destroyed */) {
        throw viewDestroyedError(DebugAction[_currentAction]);
    }
    debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));
    return view.def.updateRenderer(debugCheckRenderNodeFn, view);
    function debugCheckRenderNodeFn(view, nodeIndex, argStyle) {
        var values = [];
        for (var _i = 3; _i < arguments.length; _i++) {
            values[_i - 3] = arguments[_i];
        }
        var nodeDef = view.def.nodes[nodeIndex];
        if (checkType === 0 /* CheckAndUpdate */) {
            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);
        }
        else {
            debugCheckNoChangesNode(view, nodeDef, argStyle, values);
        }
        if (nodeDef.flags & 3 /* CatRenderNode */) {
            debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));
        }
        return (nodeDef.flags & 224 /* CatPureExpression */) ?
            asPureExpressionData(view, nodeDef.nodeIndex).value :
            undefined;
    }
}
function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {
    var changed = checkAndUpdateNode.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([view, nodeDef, argStyle], givenValues));
    if (changed) {
        var values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues;
        if (nodeDef.flags & 16384 /* TypeDirective */) {
            var bindingValues = {};
            for (var i = 0; i < nodeDef.bindings.length; i++) {
                var binding = nodeDef.bindings[i];
                var value = values[i];
                if (binding.flags & 8 /* TypeProperty */) {
                    bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] =
                        normalizeDebugBindingValue(value);
                }
            }
            var elDef = nodeDef.parent;
            var el = asElementData(view, elDef.nodeIndex).renderElement;
            if (!elDef.element.name) {
                // a comment.
                view.renderer.setValue(el, "bindings=" + JSON.stringify(bindingValues, null, 2));
            }
            else {
                // a regular element.
                for (var attr in bindingValues) {
                    var value = bindingValues[attr];
                    if (value != null) {
                        view.renderer.setAttribute(el, attr, value);
                    }
                    else {
                        view.renderer.removeAttribute(el, attr);
                    }
                }
            }
        }
    }
}
function debugCheckNoChangesNode(view, nodeDef, argStyle, values) {
    checkNoChangesNode.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([view, nodeDef, argStyle], values));
}
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-" + name;
}
var CAMEL_CASE_REGEXP = /([A-Z])/g;
function camelCaseToDashCase(input) {
    return input.replace(CAMEL_CASE_REGEXP, function () {
        var m = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            m[_i] = arguments[_i];
        }
        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';
    }
}
function nextDirectiveWithBinding(view, nodeIndex) {
    for (var i = nodeIndex; i < view.def.nodes.length; i++) {
        var nodeDef = view.def.nodes[i];
        if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) {
            return i;
        }
    }
    return null;
}
function nextRenderNodeWithBinding(view, nodeIndex) {
    for (var i = nodeIndex; i < view.def.nodes.length; i++) {
        var nodeDef = view.def.nodes[i];
        if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) {
            return i;
        }
    }
    return null;
}
var DebugContext_ = /** @class */ (function () {
    function DebugContext_(view, nodeIndex) {
        this.view = view;
        this.nodeIndex = nodeIndex;
        if (nodeIndex == null) {
            this.nodeIndex = nodeIndex = 0;
        }
        this.nodeDef = view.def.nodes[nodeIndex];
        var elDef = this.nodeDef;
        var elView = view;
        while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {
            elDef = elDef.parent;
        }
        if (!elDef) {
            while (!elDef && elView) {
                elDef = viewParentEl(elView);
                elView = elView.parent;
            }
        }
        this.elDef = elDef;
        this.elView = elView;
    }
    Object.defineProperty(DebugContext_.prototype, "elOrCompView", {
        get: function () {
            // 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;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugContext_.prototype, "injector", {
        get: function () { return createInjector$1(this.elView, this.elDef); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugContext_.prototype, "component", {
        get: function () { return this.elOrCompView.component; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugContext_.prototype, "context", {
        get: function () { return this.elOrCompView.context; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugContext_.prototype, "providerTokens", {
        get: function () {
            var tokens = [];
            if (this.elDef) {
                for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {
                    var childDef = this.elView.def.nodes[i];
                    if (childDef.flags & 20224 /* CatProvider */) {
                        tokens.push(childDef.provider.token);
                    }
                    i += childDef.childCount;
                }
            }
            return tokens;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugContext_.prototype, "references", {
        get: function () {
            var references = {};
            if (this.elDef) {
                collectReferences(this.elView, this.elDef, references);
                for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {
                    var childDef = this.elView.def.nodes[i];
                    if (childDef.flags & 20224 /* CatProvider */) {
                        collectReferences(this.elView, childDef, references);
                    }
                    i += childDef.childCount;
                }
            }
            return references;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugContext_.prototype, "componentRenderElement", {
        get: function () {
            var elData = findHostElement(this.elOrCompView);
            return elData ? elData.renderElement : undefined;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugContext_.prototype, "renderNode", {
        get: function () {
            return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) :
                renderNode(this.elView, this.elDef);
        },
        enumerable: true,
        configurable: true
    });
    DebugContext_.prototype.logError = function (console) {
        var values = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            values[_i - 1] = arguments[_i];
        }
        var logViewDef;
        var logNodeIndex;
        if (this.nodeDef.flags & 2 /* TypeText */) {
            logViewDef = this.view.def;
            logNodeIndex = this.nodeDef.nodeIndex;
        }
        else {
            logViewDef = this.elView.def;
            logNodeIndex = this.elDef.nodeIndex;
        }
        // Note: we only generate a log function for text and element nodes
        // to make the generated code as small as possible.
        var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);
        var currRenderNodeIndex = -1;
        var nodeLogger = function () {
            var _a;
            currRenderNodeIndex++;
            if (currRenderNodeIndex === renderNodeIndex) {
                return (_a = console.error).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([console], values));
            }
            else {
                return NOOP;
            }
        };
        logViewDef.factory(nodeLogger);
        if (currRenderNodeIndex < renderNodeIndex) {
            console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');
            console.error.apply(console, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(values));
        }
    };
    return DebugContext_;
}());
function getRenderNodeIndex(viewDef$$1, nodeIndex) {
    var renderNodeIndex = -1;
    for (var i = 0; i <= nodeIndex; i++) {
        var nodeDef = viewDef$$1.nodes[i];
        if (nodeDef.flags & 3 /* CatRenderNode */) {
            renderNodeIndex++;
        }
    }
    return renderNodeIndex;
}
function findHostElement(view) {
    while (view && !isComponentView(view)) {
        view = view.parent;
    }
    if (view.parent) {
        return asElementData(view.parent, viewParentEl(view).nodeIndex);
    }
    return null;
}
function collectReferences(view, nodeDef, references) {
    for (var refName in nodeDef.references) {
        references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);
    }
}
function callWithDebugContext(action, fn, self, args) {
    var oldAction = _currentAction;
    var oldView = _currentView;
    var oldNodeIndex = _currentNodeIndex;
    try {
        _currentAction = action;
        var result = fn.apply(self, args);
        _currentView = oldView;
        _currentNodeIndex = oldNodeIndex;
        _currentAction = oldAction;
        return result;
    }
    catch (e) {
        if (isViewDebugError(e) || !_currentView) {
            throw e;
        }
        throw viewWrappedDebugError(e, getCurrentDebugContext());
    }
}
function getCurrentDebugContext() {
    return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;
}
var DebugRendererFactory2 = /** @class */ (function () {
    function DebugRendererFactory2(delegate) {
        this.delegate = delegate;
    }
    DebugRendererFactory2.prototype.createRenderer = function (element, renderData) {
        return new DebugRenderer2(this.delegate.createRenderer(element, renderData));
    };
    DebugRendererFactory2.prototype.begin = function () {
        if (this.delegate.begin) {
            this.delegate.begin();
        }
    };
    DebugRendererFactory2.prototype.end = function () {
        if (this.delegate.end) {
            this.delegate.end();
        }
    };
    DebugRendererFactory2.prototype.whenRenderingDone = function () {
        if (this.delegate.whenRenderingDone) {
            return this.delegate.whenRenderingDone();
        }
        return Promise.resolve(null);
    };
    return DebugRendererFactory2;
}());
var DebugRenderer2 = /** @class */ (function () {
    function DebugRenderer2(delegate) {
        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;
    }
    DebugRenderer2.prototype.createDebugContext = function (nativeElement) { return this.debugContextFactory(nativeElement); };
    DebugRenderer2.prototype.destroyNode = function (node) {
        removeDebugNodeFromIndex(getDebugNode(node));
        if (this.delegate.destroyNode) {
            this.delegate.destroyNode(node);
        }
    };
    DebugRenderer2.prototype.destroy = function () { this.delegate.destroy(); };
    DebugRenderer2.prototype.createElement = function (name, namespace) {
        var el = this.delegate.createElement(name, namespace);
        var debugCtx = this.createDebugContext(el);
        if (debugCtx) {
            var debugEl = new DebugElement(el, null, debugCtx);
            debugEl.name = name;
            indexDebugNode(debugEl);
        }
        return el;
    };
    DebugRenderer2.prototype.createComment = function (value) {
        var comment = this.delegate.createComment(value);
        var debugCtx = this.createDebugContext(comment);
        if (debugCtx) {
            indexDebugNode(new DebugNode(comment, null, debugCtx));
        }
        return comment;
    };
    DebugRenderer2.prototype.createText = function (value) {
        var text = this.delegate.createText(value);
        var debugCtx = this.createDebugContext(text);
        if (debugCtx) {
            indexDebugNode(new DebugNode(text, null, debugCtx));
        }
        return text;
    };
    DebugRenderer2.prototype.appendChild = function (parent, newChild) {
        var debugEl = getDebugNode(parent);
        var debugChildEl = getDebugNode(newChild);
        if (debugEl && debugChildEl && debugEl instanceof DebugElement) {
            debugEl.addChild(debugChildEl);
        }
        this.delegate.appendChild(parent, newChild);
    };
    DebugRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
        var debugEl = getDebugNode(parent);
        var debugChildEl = getDebugNode(newChild);
        var debugRefEl = getDebugNode(refChild);
        if (debugEl && debugChildEl && debugEl instanceof DebugElement) {
            debugEl.insertBefore(debugRefEl, debugChildEl);
        }
        this.delegate.insertBefore(parent, newChild, refChild);
    };
    DebugRenderer2.prototype.removeChild = function (parent, oldChild) {
        var debugEl = getDebugNode(parent);
        var debugChildEl = getDebugNode(oldChild);
        if (debugEl && debugChildEl && debugEl instanceof DebugElement) {
            debugEl.removeChild(debugChildEl);
        }
        this.delegate.removeChild(parent, oldChild);
    };
    DebugRenderer2.prototype.selectRootElement = function (selectorOrNode, preserveContent) {
        var el = this.delegate.selectRootElement(selectorOrNode, preserveContent);
        var debugCtx = getCurrentDebugContext() || (ivyEnabled$1 ? this.createDebugContext(el) : null);
        if (debugCtx) {
            indexDebugNode(new DebugElement(el, null, debugCtx));
        }
        return el;
    };
    DebugRenderer2.prototype.setAttribute = function (el, name, value, namespace) {
        var debugEl = getDebugNode(el);
        if (debugEl && debugEl instanceof DebugElement) {
            var fullName = namespace ? namespace + ':' + name : name;
            debugEl.attributes[fullName] = value;
        }
        this.delegate.setAttribute(el, name, value, namespace);
    };
    DebugRenderer2.prototype.removeAttribute = function (el, name, namespace) {
        var debugEl = getDebugNode(el);
        if (debugEl && debugEl instanceof DebugElement) {
            var fullName = namespace ? namespace + ':' + name : name;
            debugEl.attributes[fullName] = null;
        }
        this.delegate.removeAttribute(el, name, namespace);
    };
    DebugRenderer2.prototype.addClass = function (el, name) {
        var debugEl = getDebugNode(el);
        if (debugEl && debugEl instanceof DebugElement) {
            debugEl.classes[name] = true;
        }
        this.delegate.addClass(el, name);
    };
    DebugRenderer2.prototype.removeClass = function (el, name) {
        var debugEl = getDebugNode(el);
        if (debugEl && debugEl instanceof DebugElement) {
            debugEl.classes[name] = false;
        }
        this.delegate.removeClass(el, name);
    };
    DebugRenderer2.prototype.setStyle = function (el, style, value, flags) {
        var debugEl = getDebugNode(el);
        if (debugEl && debugEl instanceof DebugElement) {
            debugEl.styles[style] = value;
        }
        this.delegate.setStyle(el, style, value, flags);
    };
    DebugRenderer2.prototype.removeStyle = function (el, style, flags) {
        var debugEl = getDebugNode(el);
        if (debugEl && debugEl instanceof DebugElement) {
            debugEl.styles[style] = null;
        }
        this.delegate.removeStyle(el, style, flags);
    };
    DebugRenderer2.prototype.setProperty = function (el, name, value) {
        var debugEl = getDebugNode(el);
        if (debugEl && debugEl instanceof DebugElement) {
            debugEl.properties[name] = value;
        }
        this.delegate.setProperty(el, name, value);
    };
    DebugRenderer2.prototype.listen = function (target, eventName, callback) {
        if (typeof target !== 'string') {
            var debugEl = getDebugNode(target);
            if (debugEl) {
                debugEl.listeners.push(new EventListener(eventName, callback));
            }
        }
        return this.delegate.listen(target, eventName, callback);
    };
    DebugRenderer2.prototype.parentNode = function (node) { return this.delegate.parentNode(node); };
    DebugRenderer2.prototype.nextSibling = function (node) { return this.delegate.nextSibling(node); };
    DebugRenderer2.prototype.setValue = function (node, value) { return this.delegate.setValue(node, value); };
    return DebugRenderer2;
}());

/**
 * @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 overrideProvider(override) {
    initServicesIfNeeded();
    return Services.overrideProvider(override);
}
function overrideComponentView(comp, componentFactory) {
    initServicesIfNeeded();
    return Services.overrideComponentView(comp, componentFactory);
}
function clearOverrides() {
    initServicesIfNeeded();
    return Services.clearOverrides();
}
// Attention: this function is called as top level function.
// Putting any logic in here will destroy closure tree shaking!
function createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {
    return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);
}
function cloneNgModuleDefinition(def) {
    var providers = Array.from(def.providers);
    var modules = Array.from(def.modules);
    var providersByKey = {};
    for (var key in def.providersByKey) {
        providersByKey[key] = def.providersByKey[key];
    }
    return {
        factory: def.factory,
        isRoot: def.isRoot, providers: providers, modules: modules, providersByKey: providersByKey,
    };
}
var NgModuleFactory_ = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgModuleFactory_, _super);
    function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {
        var _this = 
        // Attention: this ctor is called as top level function.
        // Putting any logic in here will destroy closure tree shaking!
        _super.call(this) || this;
        _this.moduleType = moduleType;
        _this._bootstrapComponents = _bootstrapComponents;
        _this._ngModuleDefFactory = _ngModuleDefFactory;
        return _this;
    }
    NgModuleFactory_.prototype.create = function (parentInjector) {
        initServicesIfNeeded();
        // Clone the NgModuleDefinition so that any tree shakeable provider definition
        // added to this instance of the NgModuleRef doesn't affect the cached copy.
        // See https://github.com/angular/angular/issues/25018.
        var def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));
        return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);
    };
    return NgModuleFactory_;
}(NgModuleFactory));

/**
 * @license
 * Copyright Google 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
 */

/**
 * Returns the host component instance associated with the target.
 *
 * This will only return a component instance of the DOM node
 * contains an instance of a component on it.
 */
function getHostComponent(target) {
    var context = loadContext(target);
    var tNode = context.lViewData[TVIEW].data[context.nodeIndex];
    if (tNode.flags & 4096 /* isComponent */) {
        var componentView = getComponentViewByIndex(context.nodeIndex, context.lViewData);
        return componentView[CONTEXT];
    }
    return null;
}
/**
 * Returns the `RootContext` instance that is associated with
 * the application where the target is situated.
 */
function getRootContext$2(target) {
    var lViewData = Array.isArray(target) ? target : loadContext(target).lViewData;
    var rootLViewData = getRootView$1(lViewData);
    return rootLViewData[CONTEXT];
}
/**
 * Returns the injector instance that is associated with
 * the element, component or directive.
 */
function getInjector(target) {
    var context = loadContext(target);
    var tNode = context.lViewData[TVIEW].data[context.nodeIndex];
    return new NodeInjector(tNode, context.lViewData);
}
/**
 * Returns LContext associated with a target passed as an argument.
 * Throws if a given target doesn't have associated LContext.
 */
function loadContext(target) {
    var context = getContext(target);
    if (!context) {
        throw new Error(ngDevMode ? 'Unable to find the given context data for the given target' :
            'Invalid ng target');
    }
    return context;
}
/**
 * Retrieve the root view from any component by walking the parent `LViewData` until
 * reaching the root `LViewData`.
 *
 * @param componentOrView any component or view
 */
function getRootView$1(componentOrView) {
    var lViewData;
    if (Array.isArray(componentOrView)) {
        ngDevMode && assertDefined(componentOrView, 'lViewData');
        lViewData = componentOrView;
    }
    else {
        ngDevMode && assertDefined(componentOrView, 'component');
        lViewData = readPatchedLViewData(componentOrView);
    }
    while (lViewData && !(lViewData[FLAGS] & 64 /* IsRoot */)) {
        lViewData = lViewData[PARENT];
    }
    return lViewData;
}
/**
 *  Retrieve map of local references (local reference name => element or directive instance).
 */
function getLocalRefs(target) {
    var context = loadContext(target);
    if (context.localRefs === undefined) {
        context.localRefs = discoverLocalRefs(context.lViewData, context.nodeIndex);
    }
    return context.localRefs || {};
}

/**
 * @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
 */
/**
 * Adapts the DebugRendererFactory2 to create a DebugRenderer2 specific for IVY.
 *
 * The created DebugRenderer know how to create a Debug Context specific to IVY.
 */
var Render3DebugRendererFactory2 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Render3DebugRendererFactory2, _super);
    function Render3DebugRendererFactory2() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Render3DebugRendererFactory2.prototype.createRenderer = function (element, renderData) {
        var renderer = _super.prototype.createRenderer.call(this, element, renderData);
        renderer.debugContextFactory = function (nativeElement) { return new Render3DebugContext(nativeElement); };
        return renderer;
    };
    return Render3DebugRendererFactory2;
}(DebugRendererFactory2));
/**
 * Stores context information about view nodes.
 *
 * Used in tests to retrieve information those nodes.
 */
var Render3DebugContext = /** @class */ (function () {
    function Render3DebugContext(_nativeNode) {
        this._nativeNode = _nativeNode;
    }
    Object.defineProperty(Render3DebugContext.prototype, "nodeIndex", {
        get: function () { return loadContext(this._nativeNode).nodeIndex; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Render3DebugContext.prototype, "view", {
        get: function () { return loadContext(this._nativeNode).lViewData; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Render3DebugContext.prototype, "injector", {
        get: function () { return getInjector(this._nativeNode); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Render3DebugContext.prototype, "component", {
        get: function () { return getHostComponent(this._nativeNode); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Render3DebugContext.prototype, "providerTokens", {
        get: function () {
            var lDebugCtx = loadContext(this._nativeNode);
            var lViewData = lDebugCtx.lViewData;
            var tNode = lViewData[TVIEW].data[lDebugCtx.nodeIndex];
            var directivesCount = tNode.flags & 4095 /* DirectiveCountMask */;
            if (directivesCount > 0) {
                var directiveIdxStart = tNode.flags >> 15 /* DirectiveStartingIndexShift */;
                var directiveIdxEnd = directiveIdxStart + directivesCount;
                var viewDirectiveDefs = this.view[TVIEW].data;
                var directiveDefs = viewDirectiveDefs.slice(directiveIdxStart, directiveIdxEnd);
                return directiveDefs.map(function (directiveDef) { return directiveDef.type; });
            }
            return [];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Render3DebugContext.prototype, "references", {
        get: function () { return getLocalRefs(this._nativeNode); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Render3DebugContext.prototype, "context", {
        // TODO(pk): check previous implementation and re-implement
        get: function () { throw new Error('Not implemented in ivy'); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Render3DebugContext.prototype, "componentRenderElement", {
        // TODO(pk): check previous implementation and re-implement
        get: function () { throw new Error('Not implemented in ivy'); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Render3DebugContext.prototype, "renderNode", {
        // TODO(pk): check previous implementation and re-implement
        get: function () { throw new Error('Not implemented in ivy'); },
        enumerable: true,
        configurable: true
    });
    // TODO(pk): check previous implementation and re-implement
    Render3DebugContext.prototype.logError = function (console) {
        var values = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            values[_i - 1] = arguments[_i];
        }
        console.error.apply(console, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(values));
    };
    return Render3DebugContext;
}());

/**
 * @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
 */
/**
 * Adds a player to an element, directive or component instance that will later be
 * animated once change detection has passed.
 *
 * When a player is added to a reference it will stay active until `player.destroy()`
 * is called. Once called then the player will be removed from the active players
 * present on the associated ref instance.
 *
 * To get a list of all the active players on an element see [getPlayers].
 *
 * @param ref The element, directive or component that the player will be placed on.
 * @param player The player that will be triggered to play once change detection has run.
 */
function addPlayer(ref, player) {
    var context = getContext(ref);
    if (!context) {
        ngDevMode && throwInvalidRefError();
        return;
    }
    var element$$1 = context.native;
    var lViewData = context.lViewData;
    var playerContext = getOrCreatePlayerContext(element$$1, context);
    var rootContext = getRootContext$2(lViewData);
    addPlayerInternal(playerContext, rootContext, element$$1, player, 0, ref);
    scheduleTick(rootContext, 2 /* FlushPlayers */);
}
/**
 * Returns a list of all the active players present on the provided ref instance (which can
 * be an instance of a directive, component or element).
 *
 * This function will only return players that have been added to the ref instance using
 * `addPlayer` or any players that are active through any template styling bindings
 * (`[style]`, `[style.prop]`, `[class]` and `[class.name]`).
 */
function getPlayers(ref) {
    var context = getContext(ref);
    if (!context) {
        ngDevMode && throwInvalidRefError();
        return [];
    }
    var stylingContext = getStylingContext(context.nodeIndex - HEADER_OFFSET, context.lViewData);
    var playerContext = stylingContext ? getPlayerContext(stylingContext) : null;
    return playerContext ? getPlayersInternal(playerContext) : [];
}

/**
 * @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
 */
// clang-format on

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

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

/**
 * Generated bundle index. Do not edit.
 */


//# sourceMappingURL=core.js.map


/***/ }),

/***/ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js ***!
  \******************************************************************************************/
/*! exports provided: ɵangular_packages_platform_browser_dynamic_platform_browser_dynamic_a, RESOURCE_CACHE_PROVIDER, platformBrowserDynamic, VERSION, JitCompilerFactory, ɵCompilerImpl, ɵplatformCoreDynamic, ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, ɵResourceLoaderImpl */
/***/ (function(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__, "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__, "VERSION", function() { return VERSION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JitCompilerFactory", function() { return JitCompilerFactory; });
/* 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/fesm5/compiler.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
/**
 * @license Angular v7.0.4
 * (c) 2010-2018 Google, Inc. 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 MODULE_SUFFIX = '';
var builtinExternalReferences = createBuiltinExternalReferencesMap();
var JitReflector = /** @class */ (function () {
    function JitReflector() {
        this.reflectionCapabilities = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵReflectionCapabilities"]();
    }
    JitReflector.prototype.componentModuleUrl = function (type, cmpMetadata) {
        var moduleId = cmpMetadata.moduleId;
        if (typeof moduleId === 'string') {
            var scheme = Object(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["getUrlScheme"])(moduleId);
            return scheme ? moduleId : "package:" + moduleId + MODULE_SUFFIX;
        }
        else if (moduleId !== null && moduleId !== void 0) {
            throw Object(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["syntaxError"])("moduleId should be a string in \"" + 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 "./" + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵstringify"])(type);
    };
    JitReflector.prototype.parameters = function (typeOrFunc) {
        return this.reflectionCapabilities.parameters(typeOrFunc);
    };
    JitReflector.prototype.tryAnnotations = function (typeOrFunc) { return this.annotations(typeOrFunc); };
    JitReflector.prototype.annotations = function (typeOrFunc) {
        return this.reflectionCapabilities.annotations(typeOrFunc);
    };
    JitReflector.prototype.shallowAnnotations = function (typeOrFunc) {
        throw new Error('Not supported in JIT mode');
    };
    JitReflector.prototype.propMetadata = function (typeOrFunc) {
        return this.reflectionCapabilities.propMetadata(typeOrFunc);
    };
    JitReflector.prototype.hasLifecycleHook = function (type, lcProperty) {
        return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
    };
    JitReflector.prototype.guards = function (type) { return this.reflectionCapabilities.guards(type); };
    JitReflector.prototype.resolveExternalReference = function (ref) {
        return builtinExternalReferences.get(ref) || ref.runtime;
    };
    return JitReflector;
}());
function createBuiltinExternalReferencesMap() {
    var map = new Map();
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ANALYZE_FOR_ENTRY_COMPONENTS, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ANALYZE_FOR_ENTRY_COMPONENTS"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ElementRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].NgModuleRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ViewContainerRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ChangeDetectorRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].Renderer2, _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].QueryList, _angular_core__WEBPACK_IMPORTED_MODULE_1__["QueryList"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].TemplateRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].CodegenComponentFactoryResolver, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵCodegenComponentFactoryResolver"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ComponentFactoryResolver, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ComponentFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactory"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ComponentRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentRef"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].NgModuleFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactory"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].createModuleFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵcmf"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].moduleDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵmod"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].moduleProviderDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵmpd"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].RegisterModuleFactoryFn, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵregisterModuleFactory"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].Injector, _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ViewEncapsulation, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ChangeDetectionStrategy, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].SecurityContext, _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].LOCALE_ID, _angular_core__WEBPACK_IMPORTED_MODULE_1__["LOCALE_ID"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].TRANSLATIONS_FORMAT, _angular_core__WEBPACK_IMPORTED_MODULE_1__["TRANSLATIONS_FORMAT"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].inlineInterpolate, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵinlineInterpolate"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].interpolate, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵinterpolate"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].EMPTY_ARRAY, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵEMPTY_ARRAY"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].EMPTY_MAP, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵEMPTY_MAP"]);
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].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;
}

/**
 * @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_COLLECTOR_TOKEN = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ErrorCollector');
/**
 * A default provider for {@link PACKAGE_ROOT_URL} that maps to '/'.
 */
var DEFAULT_PACKAGE_URL_PROVIDER = {
    provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PACKAGE_ROOT_URL"],
    useValue: '/'
};
var _NO_RESOURCE_LOADER = {
    get: function (url) {
        throw new Error("No ResourceLoader implementation has been provided. Can't read the url \"" + url + "\"");
    }
};
var baseHtmlParser = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HtmlParser');
var CompilerImpl = /** @class */ (function () {
    function CompilerImpl(injector, _metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, compilerConfig, console) {
        this._metadataResolver = _metadataResolver;
        this._delegate = new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitCompiler"](_metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, compilerConfig, console, this.getExtraNgModuleProviders.bind(this));
        this.injector = injector;
    }
    CompilerImpl.prototype.getExtraNgModuleProviders = function () {
        return [this._metadataResolver.getProviderMetadata(new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ProviderMeta"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"], { useValue: this }))];
    };
    CompilerImpl.prototype.compileModuleSync = function (moduleType) {
        return this._delegate.compileModuleSync(moduleType);
    };
    CompilerImpl.prototype.compileModuleAsync = function (moduleType) {
        return this._delegate.compileModuleAsync(moduleType);
    };
    CompilerImpl.prototype.compileModuleAndAllComponentsSync = function (moduleType) {
        var result = this._delegate.compileModuleAndAllComponentsSync(moduleType);
        return {
            ngModuleFactory: result.ngModuleFactory,
            componentFactories: result.componentFactories,
        };
    };
    CompilerImpl.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {
        return this._delegate.compileModuleAndAllComponentsAsync(moduleType)
            .then(function (result) { return ({
            ngModuleFactory: result.ngModuleFactory,
            componentFactories: result.componentFactories,
        }); });
    };
    CompilerImpl.prototype.loadAotSummaries = function (summaries) { this._delegate.loadAotSummaries(summaries); };
    CompilerImpl.prototype.hasAotSummary = function (ref) { return this._delegate.hasAotSummary(ref); };
    CompilerImpl.prototype.getComponentFactory = function (component) {
        return this._delegate.getComponentFactory(component);
    };
    CompilerImpl.prototype.clearCache = function () { this._delegate.clearCache(); };
    CompilerImpl.prototype.clearCacheFor = function (type) { this._delegate.clearCacheFor(type); };
    CompilerImpl.prototype.getModuleId = function (moduleType) {
        var meta = this._metadataResolver.getNgModuleMetadata(moduleType);
        return meta && meta.id || undefined;
    };
    return CompilerImpl;
}());
/**
 * A set of providers that provide `JitCompiler` and its dependencies to use for
 * template compilation.
 */
var COMPILER_PROVIDERS = [
    { 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: function (parser, translations, format, config, console) {
            translations = translations || '';
            var missingTranslation = translations ? config.missingTranslation : _angular_core__WEBPACK_IMPORTED_MODULE_1__["MissingTranslationStrategy"].Ignore;
            return new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"](parser, translations, format, missingTranslation, console);
        },
        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__["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__["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 = /** @class */ (function () {
    /* @internal */
    function JitCompilerFactory(defaultOptions) {
        var compilerOptions = {
            useJit: true,
            defaultEncapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].Emulated,
            missingTranslation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["MissingTranslationStrategy"].Warning,
        };
        this._defaultOptions = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])([compilerOptions], defaultOptions);
    }
    JitCompilerFactory.prototype.createCompiler = function (options) {
        if (options === void 0) { options = []; }
        var opts = _mergeOptions(this._defaultOptions.concat(options));
        var injector = _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"].create([
            COMPILER_PROVIDERS, {
                provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"],
                useFactory: function () {
                    return new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]({
                        // let explicit values from the compiler options overwrite options
                        // from the app providers
                        useJit: opts.useJit,
                        jitDevMode: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])(),
                        // let explicit values from the compiler options overwrite options
                        // from the app providers
                        defaultEncapsulation: opts.defaultEncapsulation,
                        missingTranslation: opts.missingTranslation,
                        preserveWhitespaces: opts.preserveWhitespaces,
                    });
                },
                deps: []
            },
            opts.providers
        ]);
        return injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]);
    };
    return JitCompilerFactory;
}());
function _mergeOptions(optionsArr) {
    return {
        useJit: _lastDefined(optionsArr.map(function (options) { return options.useJit; })),
        defaultEncapsulation: _lastDefined(optionsArr.map(function (options) { return options.defaultEncapsulation; })),
        providers: _mergeArrays(optionsArr.map(function (options) { return options.providers; })),
        missingTranslation: _lastDefined(optionsArr.map(function (options) { return options.missingTranslation; })),
        preserveWhitespaces: _lastDefined(optionsArr.map(function (options) { return options.preserveWhitespaces; })),
    };
}
function _lastDefined(args) {
    for (var i = args.length - 1; i >= 0; i--) {
        if (args[i] !== undefined) {
            return args[i];
        }
    }
    return undefined;
}
function _mergeArrays(parts) {
    var result = [];
    parts.forEach(function (part) { return part && result.push.apply(result, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])(part)); });
    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 platform that included corePlatform and the compiler.
 *
 * @publicApi
 */
var platformCoreDynamic = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["platformCore"], 'coreDynamic', [
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"], useValue: {}, multi: true },
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["CompilerFactory"], useClass: JitCompilerFactory, deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"]] },
]);

var ResourceLoaderImpl = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(ResourceLoaderImpl, _super);
    function ResourceLoaderImpl() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ResourceLoaderImpl.prototype.get = function (url) {
        var resolve;
        var reject;
        var promise = new Promise(function (res, rej) {
            resolve = res;
            reject = rej;
        });
        var xhr = new XMLHttpRequest();
        xhr.open('GET', url, true);
        xhr.responseType = 'text';
        xhr.onload = function () {
            // responseText is the old-school way of retrieving response (supported by IE8 & 9)
            // response/responseType properties were introduced in ResourceLoader Level2 spec (supported
            // by IE10)
            var response = xhr.response || xhr.responseText;
            // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
            var status = xhr.status === 1223 ? 204 : xhr.status;
            // fix status code when it is 0 (0 status is undocumented).
            // Occurs when accessing file resources or on Android 4.1 stock browser
            // while retrieving files from application cache.
            if (status === 0) {
                status = response ? 200 : 0;
            }
            if (200 <= status && status <= 300) {
                resolve(response);
            }
            else {
                reject("Failed to load " + url);
            }
        };
        xhr.onerror = function () { reject("Failed to load " + url); };
        xhr.send();
        return promise;
    };
    ResourceLoaderImpl = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])()
    ], ResourceLoaderImpl);
    return ResourceLoaderImpl;
}(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["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
 */
/**
 * @publicApi
 */
var INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [
    _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__["ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS"],
    {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"],
        useValue: { providers: [{ provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"], useClass: ResourceLoaderImpl, deps: [] }] },
        multi: true
    },
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"], useValue: _angular_common__WEBPACK_IMPORTED_MODULE_3__["ɵPLATFORM_BROWSER_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
 */
/**
 * 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(CachedResourceLoader, _super);
    function CachedResourceLoader() {
        var _this = _super.call(this) || this;
        _this._cache = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"].$templateCache;
        if (_this._cache == null) {
            throw new Error('CachedResourceLoader: Template cache was not found in $templateCache.');
        }
        return _this;
    }
    CachedResourceLoader.prototype.get = function (url) {
        if (this._cache.hasOwnProperty(url)) {
            return Promise.resolve(this._cache[url]);
        }
        else {
            return Promise.reject('CachedResourceLoader: Did not find cached template for ' + url);
        }
    };
    return CachedResourceLoader;
}(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"]));

/**
 * @license
 * Copyright Google 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
 */
/**
 * @publicApi
 */
var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('7.0.4');

/**
 * @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
 */
/**
 * @publicApi
 */
var RESOURCE_CACHE_PROVIDER = [{ provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"], useClass: CachedResourceLoader, deps: [] }];
/**
 * @publicApi
 */
var platformBrowserDynamic = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);

/**
 * @license
 * Copyright Google 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
 */

/**
 * Generated bundle index. Do not edit.
 */


//# sourceMappingURL=platform-browser-dynamic.js.map


/***/ }),

/***/ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@angular/platform-browser/fesm5/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_k, ɵ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_j, ɵangular_packages_platform_browser_platform_browser_g, BrowserModule, platformBrowser, Meta, Title, disableDebugTools, enableDebugTools, BrowserTransferStateModule, TransferState, makeStateKey, By, DOCUMENT, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, DomSanitizer, VERSION, ɵ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(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_k", 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_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__, "DOCUMENT", function() { return DOCUMENT$1; });
/* 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__, "ɵ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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/**
 * @license Angular v7.0.4
 * (c) 2010-2018 Google, Inc. 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 _DOM = null;
function getDOM() {
    return _DOM;
}
function setRootDomAdapter(adapter) {
    if (!_DOM) {
        _DOM = adapter;
    }
}
/* tslint:disable:requireParameterType */
/**
 * Provides DOM operations in an environment-agnostic way.
 *
 * @security Tread carefully! Interacting with the DOM directly is dangerous and
 * can introduce XSS risks.
 */
var DomAdapter = /** @class */ (function () {
    function DomAdapter() {
        this.resourceLoaderType = null;
    }
    Object.defineProperty(DomAdapter.prototype, "attrToPropMap", {
        /**
         * Maps attribute names to their corresponding property names for cases
         * where attribute name doesn't match property name.
         */
        get: function () { return this._attrToPropMap; },
        set: function (value) { this._attrToPropMap = value; },
        enumerable: true,
        configurable: true
    });
    return DomAdapter;
}());

/**
 * @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 DOM operations in any browser environment.
 *
 * @security Tread carefully! Interacting with the DOM directly is dangerous and
 * can introduce XSS risks.
 */
var GenericBrowserDomAdapter = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GenericBrowserDomAdapter, _super);
    function GenericBrowserDomAdapter() {
        var _this = _super.call(this) || this;
        _this._animationPrefix = null;
        _this._transitionEnd = null;
        try {
            var element_1 = _this.createElement('div', document);
            if (_this.getStyle(element_1, 'animationName') != null) {
                _this._animationPrefix = '';
            }
            else {
                var domPrefixes = ['Webkit', 'Moz', 'O', 'ms'];
                for (var i = 0; i < domPrefixes.length; i++) {
                    if (_this.getStyle(element_1, domPrefixes[i] + 'AnimationName') != null) {
                        _this._animationPrefix = '-' + domPrefixes[i].toLowerCase() + '-';
                        break;
                    }
                }
            }
            var transEndEventNames_1 = {
                WebkitTransition: 'webkitTransitionEnd',
                MozTransition: 'transitionend',
                OTransition: 'oTransitionEnd otransitionend',
                transition: 'transitionend'
            };
            Object.keys(transEndEventNames_1).forEach(function (key) {
                if (_this.getStyle(element_1, key) != null) {
                    _this._transitionEnd = transEndEventNames_1[key];
                }
            });
        }
        catch (e) {
            _this._animationPrefix = null;
            _this._transitionEnd = null;
        }
        return _this;
    }
    GenericBrowserDomAdapter.prototype.getDistributedNodes = function (el) { return el.getDistributedNodes(); };
    GenericBrowserDomAdapter.prototype.resolveAndSetHref = function (el, baseUrl, href) {
        el.href = href == null ? baseUrl : baseUrl + '/../' + href;
    };
    GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () { return true; };
    GenericBrowserDomAdapter.prototype.supportsNativeShadowDOM = function () {
        return typeof document.body.createShadowRoot === 'function';
    };
    GenericBrowserDomAdapter.prototype.getAnimationPrefix = function () { return this._animationPrefix ? this._animationPrefix : ''; };
    GenericBrowserDomAdapter.prototype.getTransitionEnd = function () { return this._transitionEnd ? this._transitionEnd : ''; };
    GenericBrowserDomAdapter.prototype.supportsAnimation = function () {
        return this._animationPrefix != null && this._transitionEnd != null;
    };
    return GenericBrowserDomAdapter;
}(DomAdapter));

/**
 * @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 _attrToPropMap = {
    'class': 'className',
    'innerHtml': 'innerHTML',
    'readonly': 'readOnly',
    'tabindex': 'tabIndex',
};
var DOM_KEY_LOCATION_NUMPAD = 3;
// Map to convert some key or keyIdentifier values to what will be returned by getEventKey
var _keyMap = {
    // The following values are here for cross-browser compatibility and to match the W3C standard
    // cf 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 ...
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 nodeContains;
if (_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['Node']) {
    nodeContains = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['Node'].prototype.contains || function (node) {
        return !!(this.compareDocumentPosition(node) & 16);
    };
}
/**
 * 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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BrowserDomAdapter, _super);
    function BrowserDomAdapter() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    BrowserDomAdapter.prototype.parse = function (templateHtml) { throw new Error('parse not implemented'); };
    BrowserDomAdapter.makeCurrent = function () { setRootDomAdapter(new BrowserDomAdapter()); };
    BrowserDomAdapter.prototype.hasProperty = function (element, name) { return name in element; };
    BrowserDomAdapter.prototype.setProperty = function (el, name, value) { el[name] = value; };
    BrowserDomAdapter.prototype.getProperty = function (el, name) { return el[name]; };
    BrowserDomAdapter.prototype.invoke = function (el, methodName, args) {
        var _a;
        (_a = el)[methodName].apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
    };
    // TODO(tbosch): move this into a separate environment class once we have it
    BrowserDomAdapter.prototype.logError = function (error) {
        if (window.console) {
            if (console.error) {
                console.error(error);
            }
            else {
                console.log(error);
            }
        }
    };
    BrowserDomAdapter.prototype.log = function (error) {
        if (window.console) {
            window.console.log && window.console.log(error);
        }
    };
    BrowserDomAdapter.prototype.logGroup = function (error) {
        if (window.console) {
            window.console.group && window.console.group(error);
        }
    };
    BrowserDomAdapter.prototype.logGroupEnd = function () {
        if (window.console) {
            window.console.groupEnd && window.console.groupEnd();
        }
    };
    Object.defineProperty(BrowserDomAdapter.prototype, "attrToPropMap", {
        get: function () { return _attrToPropMap; },
        enumerable: true,
        configurable: true
    });
    BrowserDomAdapter.prototype.contains = function (nodeA, nodeB) { return nodeContains.call(nodeA, nodeB); };
    BrowserDomAdapter.prototype.querySelector = function (el, selector) { return el.querySelector(selector); };
    BrowserDomAdapter.prototype.querySelectorAll = function (el, selector) { return el.querySelectorAll(selector); };
    BrowserDomAdapter.prototype.on = function (el, evt, listener) { el.addEventListener(evt, listener, false); };
    BrowserDomAdapter.prototype.onAndCancel = function (el, evt, listener) {
        el.addEventListener(evt, listener, false);
        // Needed to follow Dart's subscription semantic, until fix of
        // https://code.google.com/p/dart/issues/detail?id=17406
        return function () { el.removeEventListener(evt, listener, false); };
    };
    BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) { el.dispatchEvent(evt); };
    BrowserDomAdapter.prototype.createMouseEvent = function (eventType) {
        var evt = this.getDefaultDocument().createEvent('MouseEvent');
        evt.initEvent(eventType, true, true);
        return evt;
    };
    BrowserDomAdapter.prototype.createEvent = function (eventType) {
        var evt = this.getDefaultDocument().createEvent('Event');
        evt.initEvent(eventType, true, true);
        return evt;
    };
    BrowserDomAdapter.prototype.preventDefault = function (evt) {
        evt.preventDefault();
        evt.returnValue = false;
    };
    BrowserDomAdapter.prototype.isPrevented = function (evt) {
        return evt.defaultPrevented || evt.returnValue != null && !evt.returnValue;
    };
    BrowserDomAdapter.prototype.getInnerHTML = function (el) { return el.innerHTML; };
    BrowserDomAdapter.prototype.getTemplateContent = function (el) {
        return 'content' in el && this.isTemplateElement(el) ? el.content : null;
    };
    BrowserDomAdapter.prototype.getOuterHTML = function (el) { return el.outerHTML; };
    BrowserDomAdapter.prototype.nodeName = function (node) { return node.nodeName; };
    BrowserDomAdapter.prototype.nodeValue = function (node) { return node.nodeValue; };
    BrowserDomAdapter.prototype.type = function (node) { return node.type; };
    BrowserDomAdapter.prototype.content = function (node) {
        if (this.hasProperty(node, 'content')) {
            return node.content;
        }
        else {
            return node;
        }
    };
    BrowserDomAdapter.prototype.firstChild = function (el) { return el.firstChild; };
    BrowserDomAdapter.prototype.nextSibling = function (el) { return el.nextSibling; };
    BrowserDomAdapter.prototype.parentElement = function (el) { return el.parentNode; };
    BrowserDomAdapter.prototype.childNodes = function (el) { return el.childNodes; };
    BrowserDomAdapter.prototype.childNodesAsList = function (el) {
        var childNodes = el.childNodes;
        var res = new Array(childNodes.length);
        for (var i = 0; i < childNodes.length; i++) {
            res[i] = childNodes[i];
        }
        return res;
    };
    BrowserDomAdapter.prototype.clearNodes = function (el) {
        while (el.firstChild) {
            el.removeChild(el.firstChild);
        }
    };
    BrowserDomAdapter.prototype.appendChild = function (el, node) { el.appendChild(node); };
    BrowserDomAdapter.prototype.removeChild = function (el, node) { el.removeChild(node); };
    BrowserDomAdapter.prototype.replaceChild = function (el, newChild, oldChild) { el.replaceChild(newChild, oldChild); };
    BrowserDomAdapter.prototype.remove = function (node) {
        if (node.parentNode) {
            node.parentNode.removeChild(node);
        }
        return node;
    };
    BrowserDomAdapter.prototype.insertBefore = function (parent, ref, node) { parent.insertBefore(node, ref); };
    BrowserDomAdapter.prototype.insertAllBefore = function (parent, ref, nodes) {
        nodes.forEach(function (n) { return parent.insertBefore(n, ref); });
    };
    BrowserDomAdapter.prototype.insertAfter = function (parent, ref, node) { parent.insertBefore(node, ref.nextSibling); };
    BrowserDomAdapter.prototype.setInnerHTML = function (el, value) { el.innerHTML = value; };
    BrowserDomAdapter.prototype.getText = function (el) { return el.textContent; };
    BrowserDomAdapter.prototype.setText = function (el, value) { el.textContent = value; };
    BrowserDomAdapter.prototype.getValue = function (el) { return el.value; };
    BrowserDomAdapter.prototype.setValue = function (el, value) { el.value = value; };
    BrowserDomAdapter.prototype.getChecked = function (el) { return el.checked; };
    BrowserDomAdapter.prototype.setChecked = function (el, value) { el.checked = value; };
    BrowserDomAdapter.prototype.createComment = function (text) { return this.getDefaultDocument().createComment(text); };
    BrowserDomAdapter.prototype.createTemplate = function (html) {
        var t = this.getDefaultDocument().createElement('template');
        t.innerHTML = html;
        return t;
    };
    BrowserDomAdapter.prototype.createElement = function (tagName, doc) {
        doc = doc || this.getDefaultDocument();
        return doc.createElement(tagName);
    };
    BrowserDomAdapter.prototype.createElementNS = function (ns, tagName, doc) {
        doc = doc || this.getDefaultDocument();
        return doc.createElementNS(ns, tagName);
    };
    BrowserDomAdapter.prototype.createTextNode = function (text, doc) {
        doc = doc || this.getDefaultDocument();
        return doc.createTextNode(text);
    };
    BrowserDomAdapter.prototype.createScriptTag = function (attrName, attrValue, doc) {
        doc = doc || this.getDefaultDocument();
        var el = doc.createElement('SCRIPT');
        el.setAttribute(attrName, attrValue);
        return el;
    };
    BrowserDomAdapter.prototype.createStyleElement = function (css, doc) {
        doc = doc || this.getDefaultDocument();
        var style = doc.createElement('style');
        this.appendChild(style, this.createTextNode(css, doc));
        return style;
    };
    BrowserDomAdapter.prototype.createShadowRoot = function (el) { return el.createShadowRoot(); };
    BrowserDomAdapter.prototype.getShadowRoot = function (el) { return el.shadowRoot; };
    BrowserDomAdapter.prototype.getHost = function (el) { return el.host; };
    BrowserDomAdapter.prototype.clone = function (node) { return node.cloneNode(true); };
    BrowserDomAdapter.prototype.getElementsByClassName = function (element, name) {
        return element.getElementsByClassName(name);
    };
    BrowserDomAdapter.prototype.getElementsByTagName = function (element, name) {
        return element.getElementsByTagName(name);
    };
    BrowserDomAdapter.prototype.classList = function (element) { return Array.prototype.slice.call(element.classList, 0); };
    BrowserDomAdapter.prototype.addClass = function (element, className) { element.classList.add(className); };
    BrowserDomAdapter.prototype.removeClass = function (element, className) { element.classList.remove(className); };
    BrowserDomAdapter.prototype.hasClass = function (element, className) {
        return element.classList.contains(className);
    };
    BrowserDomAdapter.prototype.setStyle = function (element, styleName, styleValue) {
        element.style[styleName] = styleValue;
    };
    BrowserDomAdapter.prototype.removeStyle = function (element, stylename) {
        // IE requires '' instead of null
        // see https://github.com/angular/angular/issues/7916
        element.style[stylename] = '';
    };
    BrowserDomAdapter.prototype.getStyle = function (element, stylename) { return element.style[stylename]; };
    BrowserDomAdapter.prototype.hasStyle = function (element, styleName, styleValue) {
        var value = this.getStyle(element, styleName) || '';
        return styleValue ? value == styleValue : value.length > 0;
    };
    BrowserDomAdapter.prototype.tagName = function (element) { return element.tagName; };
    BrowserDomAdapter.prototype.attributeMap = function (element) {
        var res = new Map();
        var elAttrs = element.attributes;
        for (var i = 0; i < elAttrs.length; i++) {
            var attrib = elAttrs.item(i);
            res.set(attrib.name, attrib.value);
        }
        return res;
    };
    BrowserDomAdapter.prototype.hasAttribute = function (element, attribute) {
        return element.hasAttribute(attribute);
    };
    BrowserDomAdapter.prototype.hasAttributeNS = function (element, ns, attribute) {
        return element.hasAttributeNS(ns, attribute);
    };
    BrowserDomAdapter.prototype.getAttribute = function (element, attribute) {
        return element.getAttribute(attribute);
    };
    BrowserDomAdapter.prototype.getAttributeNS = function (element, ns, name) {
        return element.getAttributeNS(ns, name);
    };
    BrowserDomAdapter.prototype.setAttribute = function (element, name, value) { element.setAttribute(name, value); };
    BrowserDomAdapter.prototype.setAttributeNS = function (element, ns, name, value) {
        element.setAttributeNS(ns, name, value);
    };
    BrowserDomAdapter.prototype.removeAttribute = function (element, attribute) { element.removeAttribute(attribute); };
    BrowserDomAdapter.prototype.removeAttributeNS = function (element, ns, name) {
        element.removeAttributeNS(ns, name);
    };
    BrowserDomAdapter.prototype.templateAwareRoot = function (el) { return this.isTemplateElement(el) ? this.content(el) : el; };
    BrowserDomAdapter.prototype.createHtmlDocument = function () {
        return document.implementation.createHTMLDocument('fakeTitle');
    };
    BrowserDomAdapter.prototype.getDefaultDocument = function () { return document; };
    BrowserDomAdapter.prototype.getBoundingClientRect = function (el) {
        try {
            return el.getBoundingClientRect();
        }
        catch (e) {
            return { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 };
        }
    };
    BrowserDomAdapter.prototype.getTitle = function (doc) { return doc.title; };
    BrowserDomAdapter.prototype.setTitle = function (doc, newTitle) { doc.title = newTitle || ''; };
    BrowserDomAdapter.prototype.elementMatches = function (n, selector) {
        if (this.isElementNode(n)) {
            return n.matches && n.matches(selector) ||
                n.msMatchesSelector && n.msMatchesSelector(selector) ||
                n.webkitMatchesSelector && n.webkitMatchesSelector(selector);
        }
        return false;
    };
    BrowserDomAdapter.prototype.isTemplateElement = function (el) {
        return this.isElementNode(el) && el.nodeName === 'TEMPLATE';
    };
    BrowserDomAdapter.prototype.isTextNode = function (node) { return node.nodeType === Node.TEXT_NODE; };
    BrowserDomAdapter.prototype.isCommentNode = function (node) { return node.nodeType === Node.COMMENT_NODE; };
    BrowserDomAdapter.prototype.isElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; };
    BrowserDomAdapter.prototype.hasShadowRoot = function (node) {
        return node.shadowRoot != null && node instanceof HTMLElement;
    };
    BrowserDomAdapter.prototype.isShadowRoot = function (node) { return node instanceof DocumentFragment; };
    BrowserDomAdapter.prototype.importIntoDoc = function (node) { return document.importNode(this.templateAwareRoot(node), true); };
    BrowserDomAdapter.prototype.adoptNode = function (node) { return document.adoptNode(node); };
    BrowserDomAdapter.prototype.getHref = function (el) { return el.getAttribute('href'); };
    BrowserDomAdapter.prototype.getEventKey = function (event) {
        var key = event.key;
        if (key == null) {
            key = event.keyIdentifier;
            // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and
            // Safari cf
            // 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 = _chromeNumKeyPadMap[key];
                }
            }
        }
        return _keyMap[key] || key;
    };
    BrowserDomAdapter.prototype.getGlobalEventTarget = function (doc, target) {
        if (target === 'window') {
            return window;
        }
        if (target === 'document') {
            return doc;
        }
        if (target === 'body') {
            return doc.body;
        }
        return null;
    };
    BrowserDomAdapter.prototype.getHistory = function () { return window.history; };
    BrowserDomAdapter.prototype.getLocation = function () { return window.location; };
    BrowserDomAdapter.prototype.getBaseHref = function (doc) {
        var href = getBaseElementHref();
        return href == null ? null : relativePath(href);
    };
    BrowserDomAdapter.prototype.resetBaseElement = function () { baseElement = null; };
    BrowserDomAdapter.prototype.getUserAgent = function () { return window.navigator.userAgent; };
    BrowserDomAdapter.prototype.setData = function (element, name, value) {
        this.setAttribute(element, 'data-' + name, value);
    };
    BrowserDomAdapter.prototype.getData = function (element, name) {
        return this.getAttribute(element, 'data-' + name);
    };
    BrowserDomAdapter.prototype.getComputedStyle = function (element) { return getComputedStyle(element); };
    // TODO(tbosch): move this into a separate environment class once we have it
    BrowserDomAdapter.prototype.supportsWebAnimation = function () {
        return typeof Element.prototype['animate'] === 'function';
    };
    BrowserDomAdapter.prototype.performanceNow = function () {
        // 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();
    };
    BrowserDomAdapter.prototype.supportsCookies = function () { return true; };
    BrowserDomAdapter.prototype.getCookie = function (name) { return Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["ɵparseCookieValue"])(document.cookie, name); };
    BrowserDomAdapter.prototype.setCookie = function (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);
    };
    return BrowserDomAdapter;
}(GenericBrowserDomAdapter));
var baseElement = null;
function getBaseElementHref() {
    if (!baseElement) {
        baseElement = document.querySelector('base');
        if (!baseElement) {
            return null;
        }
    }
    return baseElement.getAttribute('href');
}
// based on urlUtils.js in AngularJS 1
var urlParsingNode;
function relativePath(url) {
    if (!urlParsingNode) {
        urlParsingNode = document.createElement('a');
    }
    urlParsingNode.setAttribute('href', url);
    return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname :
        '/' + urlParsingNode.pathname;
}

/**
 * @license
 * Copyright Google 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 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 into a Web Worker).
 *
 * @deprecated import from `@angular/common` instead.
 * @publicApi
 */
var DOCUMENT$1 = _angular_common__WEBPACK_IMPORTED_MODULE_1__["DOCUMENT"];

/**
 * @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 supportsState() {
    return !!window.history.pushState;
}

/**
 * @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
 */
/**
 * `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 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BrowserPlatformLocation, _super);
    function BrowserPlatformLocation(_doc) {
        var _this = _super.call(this) || this;
        _this._doc = _doc;
        _this._init();
        return _this;
    }
    // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
    /** @internal */
    BrowserPlatformLocation.prototype._init = function () {
        this.location = getDOM().getLocation();
        this._history = getDOM().getHistory();
    };
    BrowserPlatformLocation.prototype.getBaseHrefFromDOM = function () { return getDOM().getBaseHref(this._doc); };
    BrowserPlatformLocation.prototype.onPopState = function (fn) {
        getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);
    };
    BrowserPlatformLocation.prototype.onHashChange = function (fn) {
        getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);
    };
    Object.defineProperty(BrowserPlatformLocation.prototype, "pathname", {
        get: function () { return this.location.pathname; },
        set: function (newPath) { this.location.pathname = newPath; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BrowserPlatformLocation.prototype, "search", {
        get: function () { return this.location.search; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BrowserPlatformLocation.prototype, "hash", {
        get: function () { return this.location.hash; },
        enumerable: true,
        configurable: true
    });
    BrowserPlatformLocation.prototype.pushState = function (state, title, url) {
        if (supportsState()) {
            this._history.pushState(state, title, url);
        }
        else {
            this.location.hash = url;
        }
    };
    BrowserPlatformLocation.prototype.replaceState = function (state, title, url) {
        if (supportsState()) {
            this._history.replaceState(state, title, url);
        }
        else {
            this.location.hash = url;
        }
    };
    BrowserPlatformLocation.prototype.forward = function () { this._history.forward(); };
    BrowserPlatformLocation.prototype.back = function () { this._history.back(); };
    BrowserPlatformLocation = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(DOCUMENT$1)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], BrowserPlatformLocation);
    return BrowserPlatformLocation;
}(_angular_common__WEBPACK_IMPORTED_MODULE_1__["PlatformLocation"]));

/**
 * @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 id that identifies a particular application being bootstrapped, that should
 * match across the client/server boundary.
 */
var TRANSITION_ID = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('TRANSITION_ID');
function appInitializerFactory(transitionId, document, injector) {
    return function () {
        // Wait for all application initializers to be completed before removing the styles set by
        // the server.
        injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ApplicationInitStatus"]).donePromise.then(function () {
            var dom = getDOM();
            var styles = Array.prototype.slice.apply(dom.querySelectorAll(document, "style[ng-transition]"));
            styles.filter(function (el) { return dom.getAttribute(el, 'ng-transition') === transitionId; })
                .forEach(function (el) { return dom.remove(el); });
        });
    };
}
var SERVER_TRANSITION_PROVIDERS = [
    {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["APP_INITIALIZER"],
        useFactory: appInitializerFactory,
        deps: [TRANSITION_ID, DOCUMENT$1, _angular_core__WEBPACK_IMPORTED_MODULE_2__["Injector"]],
        multi: true
    },
];

/**
 * @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 BrowserGetTestability = /** @class */ (function () {
    function BrowserGetTestability() {
    }
    BrowserGetTestability.init = function () { Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["setTestabilityGetter"])(new BrowserGetTestability()); };
    BrowserGetTestability.prototype.addToWindow = function (registry) {
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['getAngularTestability'] = function (elem, findInAncestors) {
            if (findInAncestors === void 0) { findInAncestors = true; }
            var testability = registry.findTestabilityInTree(elem, findInAncestors);
            if (testability == null) {
                throw new Error('Could not find testability for element.');
            }
            return testability;
        };
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['getAllAngularTestabilities'] = function () { return registry.getAllTestabilities(); };
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['getAllAngularRootElements'] = function () { return registry.getAllRootElements(); };
        var whenAllStable = function (callback /** TODO #9100 */) {
            var testabilities = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['getAllAngularTestabilities']();
            var count = testabilities.length;
            var didWork = false;
            var decrement = function (didWork_ /** TODO #9100 */) {
                didWork = didWork || didWork_;
                count--;
                if (count == 0) {
                    callback(didWork);
                }
            };
            testabilities.forEach(function (testability /** TODO #9100 */) {
                testability.whenStable(decrement);
            });
        };
        if (!_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['frameworkStabilizers']) {
            _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['frameworkStabilizers'] = [];
        }
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['frameworkStabilizers'].push(whenAllStable);
    };
    BrowserGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {
        if (elem == null) {
            return null;
        }
        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);
    };
    return BrowserGetTestability;
}());

/**
 * @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
 */
/**
 * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if
 * `name` is `'probe'`.
 * @param name Name under which it will be exported. Keep in mind this will be a property of the
 * global `ng` object.
 * @param value The value to export.
 */
function exportNgVar(name, value) {
    if (typeof COMPILED === 'undefined' || !COMPILED) {
        // Note: we can't export `ng` when using closure enhanced optimization as:
        // - closure declares globals itself for minified names, which sometimes clobber our `ng` global
        // - we can't declare a closure extern as the namespace `ng` is already used within Google
        //   for typings for angularJS (via `goog.provide('ng....')`).
        var ng = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['ng'] = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵglobal"]['ng'] || {};
        ng[name] = 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 CORE_TOKENS = {
    'ApplicationRef': _angular_core__WEBPACK_IMPORTED_MODULE_2__["ApplicationRef"],
    'NgZone': _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgZone"],
};
var INSPECT_GLOBAL_NAME = 'probe';
var CORE_TOKENS_GLOBAL_NAME = 'coreTokens';
/**
 * Returns a {@link DebugElement} for the given native DOM element, or
 * null if the given native element does not have an Angular view associated
 * with it.
 */
function inspectNativeElement(element) {
    return Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["getDebugNode"])(element);
}
function _createNgProbe(coreTokens) {
    exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElement);
    exportNgVar(CORE_TOKENS_GLOBAL_NAME, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, CORE_TOKENS, _ngProbeTokensToMap(coreTokens || [])));
    return function () { return inspectNativeElement; };
}
function _ngProbeTokensToMap(tokens) {
    return tokens.reduce(function (prev, t) { return (prev[t.name] = t.token, prev); }, {});
}
/**
 * Providers which support debugging Angular applications (e.g. via `ng.probe`).
 */
var ELEMENT_PROBE_PROVIDERS = [
    {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["APP_INITIALIZER"],
        useFactory: _createNgProbe,
        deps: [
            [_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgProbeToken"], new _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"]()],
        ],
        multi: true,
    },
];

/**
 * @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 injection token for the event-manager plug-in service.
 *
 * @publicApi
 */
var EVENT_MANAGER_PLUGINS = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('EventManagerPlugins');
/**
 * An injectable service that provides event management for Angular
 * through a browser plug-in.
 *
 * @publicApi
 */
var EventManager = /** @class */ (function () {
    /**
     * Initializes an instance of the event-manager service.
     */
    function EventManager(plugins, _zone) {
        var _this = this;
        this._zone = _zone;
        this._eventNameToPlugin = new Map();
        plugins.forEach(function (p) { return p.manager = _this; });
        this._plugins = plugins.slice().reverse();
    }
    /**
     * Registers a handler for a specific element and event.
     *
     * @param element The HTML element to receive event notifications.
     * @param eventName The name of the event to listen for.
     * @param handler A function to call when the notification occurs. Receives the
     * event object as an argument.
     * @returns  A callback function that can be used to remove the handler.
     */
    EventManager.prototype.addEventListener = function (element, eventName, handler) {
        var plugin = this._findPluginFor(eventName);
        return plugin.addEventListener(element, eventName, handler);
    };
    /**
     * Registers a global handler for an event in a target view.
     *
     * @param target A target for global event notifications. One of "window", "document", or "body".
     * @param eventName The name of the event to listen for.
     * @param handler A function to call when the notification occurs. Receives the
     * event object as an argument.
     * @returns A callback function that can be used to remove the handler.
     */
    EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {
        var plugin = this._findPluginFor(eventName);
        return plugin.addGlobalEventListener(target, eventName, handler);
    };
    /**
     * Retrieves the compilation zone in which event listeners are registered.
     */
    EventManager.prototype.getZone = function () { return this._zone; };
    /** @internal */
    EventManager.prototype._findPluginFor = function (eventName) {
        var plugin = this._eventNameToPlugin.get(eventName);
        if (plugin) {
            return plugin;
        }
        var plugins = this._plugins;
        for (var i = 0; i < plugins.length; i++) {
            var plugin_1 = plugins[i];
            if (plugin_1.supports(eventName)) {
                this._eventNameToPlugin.set(eventName, plugin_1);
                return plugin_1;
            }
        }
        throw new Error("No event manager plugin found for event " + eventName);
    };
    EventManager = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(EVENT_MANAGER_PLUGINS)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Array, _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgZone"]])
    ], EventManager);
    return EventManager;
}());
var EventManagerPlugin = /** @class */ (function () {
    function EventManagerPlugin(_doc) {
        this._doc = _doc;
    }
    EventManagerPlugin.prototype.addGlobalEventListener = function (element, eventName, handler) {
        var target = getDOM().getGlobalEventTarget(this._doc, element);
        if (!target) {
            throw new Error("Unsupported event target " + target + " for event " + eventName);
        }
        return this.addEventListener(target, eventName, handler);
    };
    return EventManagerPlugin;
}());

/**
 * @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 SharedStylesHost = /** @class */ (function () {
    function SharedStylesHost() {
        /** @internal */
        this._stylesSet = new Set();
    }
    SharedStylesHost.prototype.addStyles = function (styles) {
        var _this = this;
        var additions = new Set();
        styles.forEach(function (style) {
            if (!_this._stylesSet.has(style)) {
                _this._stylesSet.add(style);
                additions.add(style);
            }
        });
        this.onStylesAdded(additions);
    };
    SharedStylesHost.prototype.onStylesAdded = function (additions) { };
    SharedStylesHost.prototype.getAllStyles = function () { return Array.from(this._stylesSet); };
    SharedStylesHost = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])()
    ], SharedStylesHost);
    return SharedStylesHost;
}());
var DomSharedStylesHost = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DomSharedStylesHost, _super);
    function DomSharedStylesHost(_doc) {
        var _this = _super.call(this) || this;
        _this._doc = _doc;
        _this._hostNodes = new Set();
        _this._styleNodes = new Set();
        _this._hostNodes.add(_doc.head);
        return _this;
    }
    DomSharedStylesHost.prototype._addStylesToHost = function (styles, host) {
        var _this = this;
        styles.forEach(function (style) {
            var styleEl = _this._doc.createElement('style');
            styleEl.textContent = style;
            _this._styleNodes.add(host.appendChild(styleEl));
        });
    };
    DomSharedStylesHost.prototype.addHost = function (hostNode) {
        this._addStylesToHost(this._stylesSet, hostNode);
        this._hostNodes.add(hostNode);
    };
    DomSharedStylesHost.prototype.removeHost = function (hostNode) { this._hostNodes.delete(hostNode); };
    DomSharedStylesHost.prototype.onStylesAdded = function (additions) {
        var _this = this;
        this._hostNodes.forEach(function (hostNode) { return _this._addStylesToHost(additions, hostNode); });
    };
    DomSharedStylesHost.prototype.ngOnDestroy = function () { this._styleNodes.forEach(function (styleNode) { return getDOM().remove(styleNode); }); };
    DomSharedStylesHost = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(DOCUMENT$1)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], DomSharedStylesHost);
    return DomSharedStylesHost;
}(SharedStylesHost));

/**
 * @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 NAMESPACE_URIS = {
    'svg': 'http://www.w3.org/2000/svg',
    'xhtml': 'http://www.w3.org/1999/xhtml',
    'xlink': 'http://www.w3.org/1999/xlink',
    'xml': 'http://www.w3.org/XML/1998/namespace',
    'xmlns': 'http://www.w3.org/2000/xmlns/',
};
var COMPONENT_REGEX = /%COMP%/g;
var COMPONENT_VARIABLE = '%COMP%';
var HOST_ATTR = "_nghost-" + COMPONENT_VARIABLE;
var CONTENT_ATTR = "_ngcontent-" + COMPONENT_VARIABLE;
function shimContentAttribute(componentShortId) {
    return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
}
function shimHostAttribute(componentShortId) {
    return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
}
function flattenStyles(compId, styles, target) {
    for (var i = 0; i < styles.length; i++) {
        var style = styles[i];
        if (Array.isArray(style)) {
            flattenStyles(compId, style, target);
        }
        else {
            style = style.replace(COMPONENT_REGEX, compId);
            target.push(style);
        }
    }
    return target;
}
function decoratePreventDefault(eventHandler) {
    return function (event) {
        var allowDefaultBehavior = eventHandler(event);
        if (allowDefaultBehavior === false) {
            // TODO(tbosch): move preventDefault into event plugins...
            event.preventDefault();
            event.returnValue = false;
        }
    };
}
var DomRendererFactory2 = /** @class */ (function () {
    function DomRendererFactory2(eventManager, sharedStylesHost) {
        this.eventManager = eventManager;
        this.sharedStylesHost = sharedStylesHost;
        this.rendererByCompId = new Map();
        this.defaultRenderer = new DefaultDomRenderer2(eventManager);
    }
    DomRendererFactory2.prototype.createRenderer = function (element, type) {
        if (!element || !type) {
            return this.defaultRenderer;
        }
        switch (type.encapsulation) {
            case _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].Emulated: {
                var renderer = this.rendererByCompId.get(type.id);
                if (!renderer) {
                    renderer =
                        new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type);
                    this.rendererByCompId.set(type.id, renderer);
                }
                renderer.applyToHost(element);
                return renderer;
            }
            case _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].Native:
            case _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].ShadowDom:
                return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);
            default: {
                if (!this.rendererByCompId.has(type.id)) {
                    var styles = flattenStyles(type.id, type.styles, []);
                    this.sharedStylesHost.addStyles(styles);
                    this.rendererByCompId.set(type.id, this.defaultRenderer);
                }
                return this.defaultRenderer;
            }
        }
    };
    DomRendererFactory2.prototype.begin = function () { };
    DomRendererFactory2.prototype.end = function () { };
    DomRendererFactory2 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [EventManager, DomSharedStylesHost])
    ], DomRendererFactory2);
    return DomRendererFactory2;
}());
var DefaultDomRenderer2 = /** @class */ (function () {
    function DefaultDomRenderer2(eventManager) {
        this.eventManager = eventManager;
        this.data = Object.create(null);
    }
    DefaultDomRenderer2.prototype.destroy = function () { };
    DefaultDomRenderer2.prototype.createElement = function (name, namespace) {
        if (namespace) {
            return document.createElementNS(NAMESPACE_URIS[namespace], name);
        }
        return document.createElement(name);
    };
    DefaultDomRenderer2.prototype.createComment = function (value) { return document.createComment(value); };
    DefaultDomRenderer2.prototype.createText = function (value) { return document.createTextNode(value); };
    DefaultDomRenderer2.prototype.appendChild = function (parent, newChild) { parent.appendChild(newChild); };
    DefaultDomRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
        if (parent) {
            parent.insertBefore(newChild, refChild);
        }
    };
    DefaultDomRenderer2.prototype.removeChild = function (parent, oldChild) {
        if (parent) {
            parent.removeChild(oldChild);
        }
    };
    DefaultDomRenderer2.prototype.selectRootElement = function (selectorOrNode, preserveContent) {
        var el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :
            selectorOrNode;
        if (!el) {
            throw new Error("The selector \"" + selectorOrNode + "\" did not match any elements");
        }
        if (!preserveContent) {
            el.textContent = '';
        }
        return el;
    };
    DefaultDomRenderer2.prototype.parentNode = function (node) { return node.parentNode; };
    DefaultDomRenderer2.prototype.nextSibling = function (node) { return node.nextSibling; };
    DefaultDomRenderer2.prototype.setAttribute = function (el, name, value, namespace) {
        if (namespace) {
            name = namespace + ":" + name;
            var namespaceUri = NAMESPACE_URIS[namespace];
            if (namespaceUri) {
                el.setAttributeNS(namespaceUri, name, value);
            }
            else {
                el.setAttribute(name, value);
            }
        }
        else {
            el.setAttribute(name, value);
        }
    };
    DefaultDomRenderer2.prototype.removeAttribute = function (el, name, namespace) {
        if (namespace) {
            var namespaceUri = NAMESPACE_URIS[namespace];
            if (namespaceUri) {
                el.removeAttributeNS(namespaceUri, name);
            }
            else {
                el.removeAttribute(namespace + ":" + name);
            }
        }
        else {
            el.removeAttribute(name);
        }
    };
    DefaultDomRenderer2.prototype.addClass = function (el, name) { el.classList.add(name); };
    DefaultDomRenderer2.prototype.removeClass = function (el, name) { el.classList.remove(name); };
    DefaultDomRenderer2.prototype.setStyle = function (el, style, value, flags) {
        if (flags & _angular_core__WEBPACK_IMPORTED_MODULE_2__["RendererStyleFlags2"].DashCase) {
            el.style.setProperty(style, value, !!(flags & _angular_core__WEBPACK_IMPORTED_MODULE_2__["RendererStyleFlags2"].Important) ? 'important' : '');
        }
        else {
            el.style[style] = value;
        }
    };
    DefaultDomRenderer2.prototype.removeStyle = function (el, style, flags) {
        if (flags & _angular_core__WEBPACK_IMPORTED_MODULE_2__["RendererStyleFlags2"].DashCase) {
            el.style.removeProperty(style);
        }
        else {
            // IE requires '' instead of null
            // see https://github.com/angular/angular/issues/7916
            el.style[style] = '';
        }
    };
    DefaultDomRenderer2.prototype.setProperty = function (el, name, value) {
        checkNoSyntheticProp(name, 'property');
        el[name] = value;
    };
    DefaultDomRenderer2.prototype.setValue = function (node, value) { node.nodeValue = value; };
    DefaultDomRenderer2.prototype.listen = function (target, event, callback) {
        checkNoSyntheticProp(event, 'listener');
        if (typeof target === 'string') {
            return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));
        }
        return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));
    };
    return DefaultDomRenderer2;
}());
var AT_CHARCODE = '@'.charCodeAt(0);
function checkNoSyntheticProp(name, nameKind) {
    if (name.charCodeAt(0) === AT_CHARCODE) {
        throw new Error("Found the synthetic " + nameKind + " " + name + ". Please include either \"BrowserAnimationsModule\" or \"NoopAnimationsModule\" in your application.");
    }
}
var EmulatedEncapsulationDomRenderer2 = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(EmulatedEncapsulationDomRenderer2, _super);
    function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component) {
        var _this = _super.call(this, eventManager) || this;
        _this.component = component;
        var styles = flattenStyles(component.id, component.styles, []);
        sharedStylesHost.addStyles(styles);
        _this.contentAttr = shimContentAttribute(component.id);
        _this.hostAttr = shimHostAttribute(component.id);
        return _this;
    }
    EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) { _super.prototype.setAttribute.call(this, element, this.hostAttr, ''); };
    EmulatedEncapsulationDomRenderer2.prototype.createElement = function (parent, name) {
        var el = _super.prototype.createElement.call(this, parent, name);
        _super.prototype.setAttribute.call(this, el, this.contentAttr, '');
        return el;
    };
    return EmulatedEncapsulationDomRenderer2;
}(DefaultDomRenderer2));
var ShadowDomRenderer = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ShadowDomRenderer, _super);
    function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {
        var _this = _super.call(this, eventManager) || this;
        _this.sharedStylesHost = sharedStylesHost;
        _this.hostEl = hostEl;
        _this.component = component;
        if (component.encapsulation === _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].ShadowDom) {
            _this.shadowRoot = hostEl.attachShadow({ mode: 'open' });
        }
        else {
            _this.shadowRoot = hostEl.createShadowRoot();
        }
        _this.sharedStylesHost.addHost(_this.shadowRoot);
        var styles = flattenStyles(component.id, component.styles, []);
        for (var i = 0; i < styles.length; i++) {
            var styleEl = document.createElement('style');
            styleEl.textContent = styles[i];
            _this.shadowRoot.appendChild(styleEl);
        }
        return _this;
    }
    ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) { return node === this.hostEl ? this.shadowRoot : node; };
    ShadowDomRenderer.prototype.destroy = function () { this.sharedStylesHost.removeHost(this.shadowRoot); };
    ShadowDomRenderer.prototype.appendChild = function (parent, newChild) {
        return _super.prototype.appendChild.call(this, this.nodeOrShadowRoot(parent), newChild);
    };
    ShadowDomRenderer.prototype.insertBefore = function (parent, newChild, refChild) {
        return _super.prototype.insertBefore.call(this, this.nodeOrShadowRoot(parent), newChild, refChild);
    };
    ShadowDomRenderer.prototype.removeChild = function (parent, oldChild) {
        return _super.prototype.removeChild.call(this, this.nodeOrShadowRoot(parent), oldChild);
    };
    ShadowDomRenderer.prototype.parentNode = function (node) {
        return this.nodeOrShadowRoot(_super.prototype.parentNode.call(this, this.nodeOrShadowRoot(node)));
    };
    return ShadowDomRenderer;
}(DefaultDomRenderer2));

/**
 * @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 ɵ0 = 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.
 */
var __symbol__ = (typeof Zone !== 'undefined') && Zone['__symbol__'] || ɵ0;
var ADD_EVENT_LISTENER = __symbol__('addEventListener');
var REMOVE_EVENT_LISTENER = __symbol__('removeEventListener');
var symbolNames = {};
var FALSE = 'FALSE';
var ANGULAR = 'ANGULAR';
var NATIVE_ADD_LISTENER = 'addEventListener';
var NATIVE_REMOVE_LISTENER = 'removeEventListener';
// use the same symbol string which is used in zone.js
var stopSymbol = '__zone_symbol__propagationStopped';
var stopMethodSymbol = '__zone_symbol__stopImmediatePropagation';
var blackListedEvents = (typeof Zone !== 'undefined') && Zone[__symbol__('BLACK_LISTED_EVENTS')];
var blackListedMap;
if (blackListedEvents) {
    blackListedMap = {};
    blackListedEvents.forEach(function (eventName) { blackListedMap[eventName] = eventName; });
}
var isBlackListedEvent = function (eventName) {
    if (!blackListedMap) {
        return false;
    }
    return blackListedMap.hasOwnProperty(eventName);
};
// a global listener to handle all dom event,
// so we do not need to create a closure every time
var globalListener = function (event) {
    var symbolName = symbolNames[event.type];
    if (!symbolName) {
        return;
    }
    var taskDatas = this[symbolName];
    if (!taskDatas) {
        return;
    }
    var args = [event];
    if (taskDatas.length === 1) {
        // if taskDatas only have one element, just invoke it
        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
        var copiedTasks = taskDatas.slice();
        for (var i = 0; i < copiedTasks.length; i++) {
            // if other listener call event.stopImmediatePropagation
            // just break
            if (event[stopSymbol] === true) {
                break;
            }
            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 DomEventsPlugin = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DomEventsPlugin, _super);
    function DomEventsPlugin(doc, ngZone, platformId) {
        var _this = _super.call(this, doc) || this;
        _this.ngZone = ngZone;
        if (!platformId || !Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformServer"])(platformId)) {
            _this.patchEvent();
        }
        return _this;
    }
    DomEventsPlugin.prototype.patchEvent = function () {
        if (typeof Event === 'undefined' || !Event || !Event.prototype) {
            return;
        }
        if (Event.prototype[stopMethodSymbol]) {
            // already patched by zone.js
            return;
        }
        var delegate = Event.prototype[stopMethodSymbol] =
            Event.prototype.stopImmediatePropagation;
        Event.prototype.stopImmediatePropagation = function () {
            if (this) {
                this[stopSymbol] = true;
            }
            // should call native delegate in case
            // in some environment part of the application
            // will not use the patched Event
            delegate && delegate.apply(this, arguments);
        };
    };
    // This plugin should come last in the list of plugins, because it accepts all
    // events.
    DomEventsPlugin.prototype.supports = function (eventName) { return true; };
    DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
        var _this = this;
        var zoneJsLoaded = element[ADD_EVENT_LISTENER];
        var callback = 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_2__["NgZone"].isInAngularZone() || isBlackListedEvent(eventName))) {
            var symbolName = symbolNames[eventName];
            if (!symbolName) {
                symbolName = symbolNames[eventName] = __symbol__(ANGULAR + eventName + FALSE);
            }
            var taskDatas = element[symbolName];
            var globalListenerRegistered = taskDatas && taskDatas.length > 0;
            if (!taskDatas) {
                taskDatas = element[symbolName] = [];
            }
            var zone = isBlackListedEvent(eventName) ? Zone.root : Zone.current;
            if (taskDatas.length === 0) {
                taskDatas.push({ zone: zone, handler: callback });
            }
            else {
                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 function () { return _this.removeEventListener(element, eventName, callback); };
    };
    DomEventsPlugin.prototype.removeEventListener = function (target, eventName, callback) {
        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]);
        }
        var symbolName = symbolNames[eventName];
        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
        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]);
        }
    };
    DomEventsPlugin = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(DOCUMENT$1)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(2, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(2, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_2__["PLATFORM_ID"])),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object, _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgZone"], Object])
    ], DomEventsPlugin);
    return DomEventsPlugin;
}(EventManagerPlugin));

/**
 * @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
 */
/**
 * Supported HammerJS recognizer event names.
 */
var EVENT_NAMES = {
    // pan
    'pan': true,
    'panstart': true,
    'panmove': true,
    'panend': true,
    'pancancel': true,
    'panleft': true,
    'panright': true,
    'panup': true,
    'pandown': true,
    // pinch
    'pinch': true,
    'pinchstart': true,
    'pinchmove': true,
    'pinchend': true,
    'pinchcancel': true,
    'pinchin': true,
    'pinchout': true,
    // press
    'press': true,
    'pressup': true,
    // rotate
    'rotate': true,
    'rotatestart': true,
    'rotatemove': true,
    'rotateend': true,
    'rotatecancel': true,
    // swipe
    'swipe': true,
    'swipeleft': true,
    'swiperight': true,
    'swipeup': true,
    'swipedown': true,
    // tap
    'tap': true,
};
/**
 * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.
 * @see `HammerGestureConfig`
 *
 * @publicApi
 */
var HAMMER_GESTURE_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('HammerGestureConfig');
/**
 * Injection token used to provide a {@link HammerLoader} to Angular.
 *
 * @publicApi
 */
var HAMMER_LOADER = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('HammerLoader');
/**
 * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
 * for gesture recognition. Configures specific event recognition.
 * @publicApi
 */
var HammerGestureConfig = /** @class */ (function () {
    function 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.
     * @returns A HammerJS event-manager object.
     */
    HammerGestureConfig.prototype.buildHammer = function (element) {
        var mc = new Hammer(element, this.options);
        mc.get('pinch').set({ enable: true });
        mc.get('rotate').set({ enable: true });
        for (var eventName in this.overrides) {
            mc.get(eventName).set(this.overrides[eventName]);
        }
        return mc;
    };
    HammerGestureConfig = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])()
    ], HammerGestureConfig);
    return HammerGestureConfig;
}());
var HammerGesturesPlugin = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(HammerGesturesPlugin, _super);
    function HammerGesturesPlugin(doc, _config, console, loader) {
        var _this = _super.call(this, doc) || this;
        _this._config = _config;
        _this.console = console;
        _this.loader = loader;
        return _this;
    }
    HammerGesturesPlugin.prototype.supports = function (eventName) {
        if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
            return false;
        }
        if (!window.Hammer && !this.loader) {
            this.console.warn("The \"" + eventName + "\" event cannot be bound because Hammer.JS is not " +
                "loaded and no custom loader has been specified.");
            return false;
        }
        return true;
    };
    HammerGesturesPlugin.prototype.addEventListener = function (element, eventName, handler) {
        var _this = this;
        var zone = this.manager.getZone();
        eventName = eventName.toLowerCase();
        // If Hammer is not present but a loader is specified, we defer adding the event listener
        // until Hammer is loaded.
        if (!window.Hammer && this.loader) {
            // This `addEventListener` method returns a function to remove the added listener.
            // Until Hammer is loaded, the returned function needs to *cancel* the registration rather
            // than remove anything.
            var cancelRegistration_1 = false;
            var deregister_1 = function () { cancelRegistration_1 = true; };
            this.loader()
                .then(function () {
                // If Hammer isn't actually loaded when the custom loader resolves, give up.
                if (!window.Hammer) {
                    _this.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present.");
                    deregister_1 = function () { };
                    return;
                }
                if (!cancelRegistration_1) {
                    // Now that Hammer is loaded and the listener is being loaded for real,
                    // the deregistration function changes from canceling registration to removal.
                    deregister_1 = _this.addEventListener(element, eventName, handler);
                }
            })
                .catch(function () {
                _this.console.warn("The \"" + eventName + "\" event cannot be bound because the custom " +
                    "Hammer.JS loader failed.");
                deregister_1 = function () { };
            });
            // Return a function that *executes* `deregister` (and not `deregister` itself) so that we
            // can change the behavior of `deregister` once the listener is added. Using a closure in
            // this way allows us to avoid any additional data structures to track listener removal.
            return function () { deregister_1(); };
        }
        return zone.runOutsideAngular(function () {
            // Creating the manager bind events, must be done outside of angular
            var mc = _this._config.buildHammer(element);
            var callback = function (eventObj) {
                zone.runGuarded(function () { handler(eventObj); });
            };
            mc.on(eventName, callback);
            return function () {
                mc.off(eventName, callback);
                // destroy mc to prevent memory leak
                if (typeof mc.destroy === 'function') {
                    mc.destroy();
                }
            };
        });
    };
    HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) { return this._config.events.indexOf(eventName) > -1; };
    HammerGesturesPlugin = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(DOCUMENT$1)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(HAMMER_GESTURE_CONFIG)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(3, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(3, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(HAMMER_LOADER)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object, HammerGestureConfig, _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵConsole"], Object])
    ], HammerGesturesPlugin);
    return HammerGesturesPlugin;
}(EventManagerPlugin));

/**
 * @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
 */
/**
 * Defines supported modifiers for key events.
 */
var MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];
var ɵ0$1 = function (event) { return event.altKey; }, ɵ1$1 = function (event) { return event.ctrlKey; }, ɵ2$1 = function (event) { return event.metaKey; }, ɵ3 = function (event) { return event.shiftKey; };
/**
 * Retrieves modifiers from key-event objects.
 */
var MODIFIER_KEY_GETTERS = {
    'alt': ɵ0$1,
    'control': ɵ1$1,
    'meta': ɵ2$1,
    'shift': ɵ3
};
/**
 * @publicApi
 * A browser plug-in that provides support for handling of key events in Angular.
 */
var KeyEventsPlugin = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(KeyEventsPlugin, _super);
    /**
     * Initializes an instance of the browser plug-in.
     * @param doc The document in which key events will be detected.
     */
    function KeyEventsPlugin(doc) {
        return _super.call(this, doc) || this;
    }
    KeyEventsPlugin_1 = KeyEventsPlugin;
    /**
      * Reports whether a named key event is supported.
      * @param eventName The event name to query.
      * @return True if the named key event is supported.
     */
    KeyEventsPlugin.prototype.supports = function (eventName) { return KeyEventsPlugin_1.parseEventName(eventName) != null; };
    /**
     * Registers a handler for a specific element and key event.
     * @param element The HTML element to receive event notifications.
     * @param eventName The name of the key event to listen for.
     * @param handler A function to call when the notification occurs. Receives the
     * event object as an argument.
     * @returns The key event that was registered.
    */
    KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
        var parsedEvent = KeyEventsPlugin_1.parseEventName(eventName);
        var outsideHandler = KeyEventsPlugin_1.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
        return this.manager.getZone().runOutsideAngular(function () {
            return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);
        });
    };
    KeyEventsPlugin.parseEventName = function (eventName) {
        var parts = eventName.toLowerCase().split('.');
        var domEventName = parts.shift();
        if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {
            return null;
        }
        var key = KeyEventsPlugin_1._normalizeKey(parts.pop());
        var fullKey = '';
        MODIFIER_KEYS.forEach(function (modifierName) {
            var index = parts.indexOf(modifierName);
            if (index > -1) {
                parts.splice(index, 1);
                fullKey += modifierName + '.';
            }
        });
        fullKey += key;
        if (parts.length != 0 || key.length === 0) {
            // returning null instead of throwing to let another plugin process the event
            return null;
        }
        var result = {};
        result['domEventName'] = domEventName;
        result['fullKey'] = fullKey;
        return result;
    };
    KeyEventsPlugin.getEventFullKey = function (event) {
        var fullKey = '';
        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(function (modifierName) {
            if (modifierName != key) {
                var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];
                if (modifierGetter(event)) {
                    fullKey += modifierName + '.';
                }
            }
        });
        fullKey += key;
        return fullKey;
    };
    /**
     * Configures a handler callback for a key event.
     * @param fullKey The event name that combines all simultaneous keystrokes.
     * @param handler The function that responds to the key event.
     * @param zone The zone in which the event occurred.
     * @returns A callback function.
     */
    KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {
        return function (event /** TODO #9100 */) {
            if (KeyEventsPlugin_1.getEventFullKey(event) === fullKey) {
                zone.runGuarded(function () { return handler(event); });
            }
        };
    };
    /** @internal */
    KeyEventsPlugin._normalizeKey = function (keyName) {
        // TODO: switch to a Map if the mapping grows too much
        switch (keyName) {
            case 'esc':
                return 'escape';
            default:
                return keyName;
        }
    };
    var KeyEventsPlugin_1;
    KeyEventsPlugin = KeyEventsPlugin_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(DOCUMENT$1)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], KeyEventsPlugin);
    return KeyEventsPlugin;
}(EventManagerPlugin));

/**
 * @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
 */
/**
 * 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
 */
var DomSanitizer = /** @class */ (function () {
    function DomSanitizer() {
    }
    return DomSanitizer;
}());
var DomSanitizerImpl = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DomSanitizerImpl, _super);
    function DomSanitizerImpl(_doc) {
        var _this = _super.call(this) || this;
        _this._doc = _doc;
        return _this;
    }
    DomSanitizerImpl.prototype.sanitize = function (ctx, value) {
        if (value == null)
            return null;
        switch (ctx) {
            case _angular_core__WEBPACK_IMPORTED_MODULE_2__["SecurityContext"].NONE:
                return value;
            case _angular_core__WEBPACK_IMPORTED_MODULE_2__["SecurityContext"].HTML:
                if (value instanceof SafeHtmlImpl)
                    return value.changingThisBreaksApplicationSecurity;
                this.checkNotSafeValue(value, 'HTML');
                return Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵ_sanitizeHtml"])(this._doc, String(value));
            case _angular_core__WEBPACK_IMPORTED_MODULE_2__["SecurityContext"].STYLE:
                if (value instanceof SafeStyleImpl)
                    return value.changingThisBreaksApplicationSecurity;
                this.checkNotSafeValue(value, 'Style');
                return Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵ_sanitizeStyle"])(value);
            case _angular_core__WEBPACK_IMPORTED_MODULE_2__["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_2__["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_2__["ɵ_sanitizeUrl"])(String(value));
            case _angular_core__WEBPACK_IMPORTED_MODULE_2__["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 " + ctx + " (see http://g.co/ng/security#xss)");
        }
    };
    DomSanitizerImpl.prototype.checkNotSafeValue = function (value, expectedType) {
        if (value instanceof SafeValueImpl) {
            throw new Error("Required a safe " + expectedType + ", got a " + value.getTypeName() + " " +
                "(see http://g.co/ng/security#xss)");
        }
    };
    DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) { return new SafeHtmlImpl(value); };
    DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) { return new SafeStyleImpl(value); };
    DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) { return new SafeScriptImpl(value); };
    DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) { return new SafeUrlImpl(value); };
    DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {
        return new SafeResourceUrlImpl(value);
    };
    DomSanitizerImpl = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(DOCUMENT$1)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], DomSanitizerImpl);
    return DomSanitizerImpl;
}(DomSanitizer));
var SafeValueImpl = /** @class */ (function () {
    function SafeValueImpl(changingThisBreaksApplicationSecurity) {
        this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;
        // empty
    }
    SafeValueImpl.prototype.toString = function () {
        return "SafeValue must use [property]=binding: " + this.changingThisBreaksApplicationSecurity +
            " (see http://g.co/ng/security#xss)";
    };
    return SafeValueImpl;
}());
var SafeHtmlImpl = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SafeHtmlImpl, _super);
    function SafeHtmlImpl() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SafeHtmlImpl.prototype.getTypeName = function () { return 'HTML'; };
    return SafeHtmlImpl;
}(SafeValueImpl));
var SafeStyleImpl = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SafeStyleImpl, _super);
    function SafeStyleImpl() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SafeStyleImpl.prototype.getTypeName = function () { return 'Style'; };
    return SafeStyleImpl;
}(SafeValueImpl));
var SafeScriptImpl = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SafeScriptImpl, _super);
    function SafeScriptImpl() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SafeScriptImpl.prototype.getTypeName = function () { return 'Script'; };
    return SafeScriptImpl;
}(SafeValueImpl));
var SafeUrlImpl = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SafeUrlImpl, _super);
    function SafeUrlImpl() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SafeUrlImpl.prototype.getTypeName = function () { return 'URL'; };
    return SafeUrlImpl;
}(SafeValueImpl));
var SafeResourceUrlImpl = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SafeResourceUrlImpl, _super);
    function SafeResourceUrlImpl() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SafeResourceUrlImpl.prototype.getTypeName = function () { return 'ResourceURL'; };
    return SafeResourceUrlImpl;
}(SafeValueImpl));

/**
 * @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 INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["PLATFORM_ID"], useValue: _angular_common__WEBPACK_IMPORTED_MODULE_1__["ɵPLATFORM_BROWSER_ID"] },
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["PLATFORM_INITIALIZER"], useValue: initDomAdapter, multi: true },
    { provide: _angular_common__WEBPACK_IMPORTED_MODULE_1__["PlatformLocation"], useClass: BrowserPlatformLocation, deps: [DOCUMENT$1] },
    { provide: DOCUMENT$1, 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
 */
var BROWSER_SANITIZATION_PROVIDERS = [
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Sanitizer"], useExisting: DomSanitizer },
    { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT$1] },
];
/**
 * @publicApi
 */
var platformBrowser = Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["createPlatformFactory"])(_angular_core__WEBPACK_IMPORTED_MODULE_2__["platformCore"], 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
function initDomAdapter() {
    BrowserDomAdapter.makeCurrent();
    BrowserGetTestability.init();
}
function errorHandler() {
    return new _angular_core__WEBPACK_IMPORTED_MODULE_2__["ErrorHandler"]();
}
function _document() {
    return document;
}
var BROWSER_MODULE_PROVIDERS = [
    BROWSER_SANITIZATION_PROVIDERS,
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵAPP_ROOT"], useValue: true },
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ErrorHandler"], useFactory: errorHandler, deps: [] },
    {
        provide: EVENT_MANAGER_PLUGINS,
        useClass: DomEventsPlugin,
        multi: true,
        deps: [DOCUMENT$1, _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgZone"], _angular_core__WEBPACK_IMPORTED_MODULE_2__["PLATFORM_ID"]]
    },
    { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT$1] },
    {
        provide: EVENT_MANAGER_PLUGINS,
        useClass: HammerGesturesPlugin,
        multi: true,
        deps: [DOCUMENT$1, HAMMER_GESTURE_CONFIG, _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵConsole"], [new _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"](), HAMMER_LOADER]]
    },
    { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },
    {
        provide: DomRendererFactory2,
        useClass: DomRendererFactory2,
        deps: [EventManager, DomSharedStylesHost]
    },
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["RendererFactory2"], useExisting: DomRendererFactory2 },
    { provide: SharedStylesHost, useExisting: DomSharedStylesHost },
    { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT$1] },
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Testability"], useClass: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Testability"], deps: [_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgZone"]] },
    { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgZone"]] },
    ELEMENT_PROBE_PROVIDERS,
];
/**
 * Exports required infrastructure for all Angular apps.
 * Included by defaults 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 = /** @class */ (function () {
    function BrowserModule(parentModule) {
        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.");
        }
    }
    BrowserModule_1 = BrowserModule;
    /**
     * Configures a browser-based app to transition from a server-rendered app, if
     * one is present on the page.
     *
     * @param params An object containing an identifier for the app to transition.
     * The ID must match between the client and server versions of the app.
     * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
     */
    BrowserModule.withServerTransition = function (params) {
        return {
            ngModule: BrowserModule_1,
            providers: [
                { provide: _angular_core__WEBPACK_IMPORTED_MODULE_2__["APP_ID"], useValue: params.appId },
                { provide: TRANSITION_ID, useExisting: _angular_core__WEBPACK_IMPORTED_MODULE_2__["APP_ID"] },
                SERVER_TRANSITION_PROVIDERS,
            ],
        };
    };
    var BrowserModule_1;
    BrowserModule = BrowserModule_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"])({ providers: BROWSER_MODULE_PROVIDERS, exports: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_2__["ApplicationModule"]] }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["SkipSelf"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(BrowserModule_1)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], BrowserModule);
    return BrowserModule;
}());

/**
 * Factory to create Meta service.
 */
function createMeta() {
    return new Meta(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["inject"])(DOCUMENT$1));
}
/**
 * A service that can be used to get and add meta tags.
 *
 * @publicApi
 */
var Meta = /** @class */ (function () {
    function Meta(_doc) {
        this._doc = _doc;
        this._dom = getDOM();
    }
    Meta.prototype.addTag = function (tag, forceCreation) {
        if (forceCreation === void 0) { forceCreation = false; }
        if (!tag)
            return null;
        return this._getOrCreateElement(tag, forceCreation);
    };
    Meta.prototype.addTags = function (tags, forceCreation) {
        var _this = this;
        if (forceCreation === void 0) { forceCreation = false; }
        if (!tags)
            return [];
        return tags.reduce(function (result, tag) {
            if (tag) {
                result.push(_this._getOrCreateElement(tag, forceCreation));
            }
            return result;
        }, []);
    };
    Meta.prototype.getTag = function (attrSelector) {
        if (!attrSelector)
            return null;
        return this._dom.querySelector(this._doc, "meta[" + attrSelector + "]") || null;
    };
    Meta.prototype.getTags = function (attrSelector) {
        if (!attrSelector)
            return [];
        var list /*NodeList*/ = this._dom.querySelectorAll(this._doc, "meta[" + attrSelector + "]");
        return list ? [].slice.call(list) : [];
    };
    Meta.prototype.updateTag = function (tag, selector) {
        if (!tag)
            return null;
        selector = selector || this._parseSelector(tag);
        var meta = this.getTag(selector);
        if (meta) {
            return this._setMetaElementAttributes(tag, meta);
        }
        return this._getOrCreateElement(tag, true);
    };
    Meta.prototype.removeTag = function (attrSelector) { this.removeTagElement(this.getTag(attrSelector)); };
    Meta.prototype.removeTagElement = function (meta) {
        if (meta) {
            this._dom.remove(meta);
        }
    };
    Meta.prototype._getOrCreateElement = function (meta, forceCreation) {
        if (forceCreation === void 0) { forceCreation = false; }
        if (!forceCreation) {
            var selector = this._parseSelector(meta);
            var elem = this.getTag(selector);
            // It's allowed to have multiple elements with the same name so it's not enough to
            // just check that element with the same name already present on the page. We also need to
            // check if element has tag attributes
            if (elem && this._containsAttributes(meta, elem))
                return elem;
        }
        var element = this._dom.createElement('meta');
        this._setMetaElementAttributes(meta, element);
        var head = this._dom.getElementsByTagName(this._doc, 'head')[0];
        this._dom.appendChild(head, element);
        return element;
    };
    Meta.prototype._setMetaElementAttributes = function (tag, el) {
        var _this = this;
        Object.keys(tag).forEach(function (prop) { return _this._dom.setAttribute(el, prop, tag[prop]); });
        return el;
    };
    Meta.prototype._parseSelector = function (tag) {
        var attr = tag.name ? 'name' : 'property';
        return attr + "=\"" + tag[attr] + "\"";
    };
    Meta.prototype._containsAttributes = function (tag, elem) {
        var _this = this;
        return Object.keys(tag).every(function (key) { return _this._dom.getAttribute(elem, key) === tag[key]; });
    };
    Meta.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["defineInjectable"])({ factory: createMeta, token: Meta, providedIn: "root" });
    Meta = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])({ providedIn: 'root', useFactory: createMeta, deps: [] }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(DOCUMENT$1)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], Meta);
    return Meta;
}());

/**
 * Factory to create Title service.
 */
function createTitle() {
    return new Title(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["inject"])(DOCUMENT$1));
}
/**
 * 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 = /** @class */ (function () {
    function Title(_doc) {
        this._doc = _doc;
    }
    /**
     * Get the title of the current HTML document.
     */
    Title.prototype.getTitle = function () { return getDOM().getTitle(this._doc); };
    /**
     * Set the title of the current HTML document.
     * @param newTitle
     */
    Title.prototype.setTitle = function (newTitle) { getDOM().setTitle(this._doc, newTitle); };
    Title.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["defineInjectable"])({ factory: createTitle, token: Title, providedIn: "root" });
    Title = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])({ providedIn: 'root', useFactory: createTitle, deps: [] }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"])(DOCUMENT$1)),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], Title);
    return Title;
}());

/**
 * @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 win = typeof window !== 'undefined' && window || {};

/**
 * @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 ChangeDetectionPerfRecord = /** @class */ (function () {
    function ChangeDetectionPerfRecord(msPerTick, numTicks) {
        this.msPerTick = msPerTick;
        this.numTicks = numTicks;
    }
    return ChangeDetectionPerfRecord;
}());
/**
 * Entry point for all Angular profiling-related debug tools. This object
 * corresponds to the `ng.profiler` in the dev console.
 */
var AngularProfiler = /** @class */ (function () {
    function AngularProfiler(ref) {
        this.appRef = ref.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_2__["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})
     * ```
     */
    AngularProfiler.prototype.timeChangeDetection = function (config) {
        var record = config && config['record'];
        var profileName = 'Change Detection';
        // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
        var isProfilerAvailable = win.console.profile != null;
        if (record && isProfilerAvailable) {
            win.console.profile(profileName);
        }
        var start = getDOM().performanceNow();
        var numTicks = 0;
        while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {
            this.appRef.tick();
            numTicks++;
        }
        var end = getDOM().performanceNow();
        if (record && isProfilerAvailable) {
            win.console.profileEnd(profileName);
        }
        var msPerTick = (end - start) / numTicks;
        win.console.log("ran " + numTicks + " change detection cycles");
        win.console.log(msPerTick.toFixed(2) + " ms per check");
        return new ChangeDetectionPerfRecord(msPerTick, numTicks);
    };
    return AngularProfiler;
}());

/**
 * @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 PROFILER_GLOBAL_NAME = 'profiler';
/**
 * Enabled Angular debug tools that are accessible via your browser's
 * developer console.
 *
 * Usage:
 *
 * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
 * 1. Type `ng.` (usually the console will show auto-complete suggestion)
 * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
 *    then hit Enter.
 *
 * @publicApi
 */
function enableDebugTools(ref) {
    exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
    return ref;
}
/**
 * Disables Angular tools.
 *
 * @publicApi
 */
function disableDebugTools() {
    exportNgVar(PROFILER_GLOBAL_NAME, null);
}

/**
 * @license
 * Copyright Google 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 escapeHtml(text) {
    var escapedText = {
        '&': '&a;',
        '"': '&q;',
        '\'': '&s;',
        '<': '&l;',
        '>': '&g;',
    };
    return text.replace(/[&"'<>]/g, function (s) { return escapedText[s]; });
}
function unescapeHtml(text) {
    var unescapedText = {
        '&a;': '&',
        '&q;': '"',
        '&s;': '\'',
        '&l;': '<',
        '&g;': '>',
    };
    return text.replace(/&[^;]+;/g, function (s) { return unescapedText[s]; });
}
/**
 * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
 *
 * Example:
 *
 * ```
 * const COUNTER_KEY = makeStateKey<number>('counter');
 * let value = 10;
 *
 * transferState.set(COUNTER_KEY, value);
 * ```
 *
 * @publicApi
 */
function makeStateKey(key) {
    return key;
}
/**
 * A key value store that is transferred from the application on the server side to the application
 * on the client side.
 *
 * `TransferState` will be available as an injectable token. To use it import
 * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.
 *
 * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
 * boolean, number, string, null and non-class objects will be serialized and deserialzied in a
 * non-lossy manner.
 *
 * @publicApi
 */
var TransferState = /** @class */ (function () {
    function TransferState() {
        this.store = {};
        this.onSerializeCallbacks = {};
    }
    TransferState_1 = TransferState;
    /** @internal */
    TransferState.init = function (initState) {
        var transferState = new TransferState_1();
        transferState.store = initState;
        return transferState;
    };
    /**
     * Get the value corresponding to a key. Return `defaultValue` if key is not found.
     */
    TransferState.prototype.get = function (key, defaultValue) {
        return this.store[key] !== undefined ? this.store[key] : defaultValue;
    };
    /**
     * Set the value corresponding to a key.
     */
    TransferState.prototype.set = function (key, value) { this.store[key] = value; };
    /**
     * Remove a key from the store.
     */
    TransferState.prototype.remove = function (key) { delete this.store[key]; };
    /**
     * Test whether a key exists in the store.
     */
    TransferState.prototype.hasKey = function (key) { return this.store.hasOwnProperty(key); };
    /**
     * Register a callback to provide the value for a key when `toJson` is called.
     */
    TransferState.prototype.onSerialize = function (key, callback) {
        this.onSerializeCallbacks[key] = callback;
    };
    /**
     * Serialize the current state of the store to JSON.
     */
    TransferState.prototype.toJson = function () {
        // 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);
    };
    var TransferState_1;
    TransferState = TransferState_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])()
    ], TransferState);
    return TransferState;
}());
function initTransferState(doc, appId) {
    // Locate the script tag with the JSON data transferred from the server.
    // The id of the script tag is set to the Angular appId + 'state'.
    var script = doc.getElementById(appId + '-state');
    var initialState = {};
    if (script && script.textContent) {
        try {
            initialState = JSON.parse(unescapeHtml(script.textContent));
        }
        catch (e) {
            console.warn('Exception while restoring TransferState for app ' + appId, e);
        }
    }
    return TransferState.init(initialState);
}
/**
 * NgModule to install on the client side while using the `TransferState` to transfer state from
 * server to client.
 *
 * @publicApi
 */
var BrowserTransferStateModule = /** @class */ (function () {
    function BrowserTransferStateModule() {
    }
    BrowserTransferStateModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"])({
            providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT$1, _angular_core__WEBPACK_IMPORTED_MODULE_2__["APP_ID"]] }],
        })
    ], BrowserTransferStateModule);
    return BrowserTransferStateModule;
}());

/**
 * @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
 */
/**
 * Predicates for use with {@link DebugElement}'s query functions.
 *
 * @publicApi
 */
var By = /** @class */ (function () {
    function By() {
    }
    /**
     * Match all elements.
     *
     * @usageNotes
     * ### Example
     *
     * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
     */
    By.all = function () { return function (debugElement) { return true; }; };
    /**
     * Match elements by the given CSS selector.
     *
     * @usageNotes
     * ### Example
     *
     * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
     */
    By.css = function (selector) {
        return function (debugElement) {
            return debugElement.nativeElement != null ?
                getDOM().elementMatches(debugElement.nativeElement, selector) :
                false;
        };
    };
    /**
     * Match elements that have the given directive present.
     *
     * @usageNotes
     * ### Example
     *
     * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
     */
    By.directive = function (type) {
        return function (debugElement) { return debugElement.providerTokens.indexOf(type) !== -1; };
    };
    return By;
}());

/**
 * @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
 */
/**
 * @publicApi
 */
var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["Version"]('7.0.4');

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

/**
 * Generated bundle index. Do not edit.
 */


//# sourceMappingURL=platform-browser.js.map


/***/ }),

/***/ "./node_modules/@angular/router/fesm5/router.js":
/*!******************************************************!*\
  !*** ./node_modules/@angular/router/fesm5/router.js ***!
  \******************************************************/
/*! exports provided: ɵangular_packages_router_router_a, ɵangular_packages_router_router_h, ɵangular_packages_router_router_c, ɵangular_packages_router_router_i, ɵangular_packages_router_router_j, ɵangular_packages_router_router_e, ɵangular_packages_router_router_d, ɵangular_packages_router_router_k, ɵangular_packages_router_router_g, ɵangular_packages_router_router_b, ɵangular_packages_router_router_f, ɵangular_packages_router_router_n, ɵangular_packages_router_router_l, ɵangular_packages_router_router_m, RouterLink, RouterLinkWithHref, RouterLinkActive, RouterOutlet, ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll, RouteReuseStrategy, Router, ROUTES, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule, provideRoutes, ChildrenOutletContexts, OutletContext, NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader, ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot, PRIMARY_OUTLET, convertToParamMap, UrlHandlingStrategy, DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, ɵEmptyOutletComponent, ɵROUTER_PROVIDERS, ɵflatten */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_a", function() { return ROUTER_FORROOT_GUARD; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_h", function() { return RouterInitializer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_c", function() { return createRouterScroller; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_i", function() { return getAppInitializer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_j", function() { return getBootstrapListener; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_e", function() { return provideForRootGuard; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_d", function() { return provideLocationStrategy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_k", function() { return provideRouterInitializer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_g", function() { return rootRoute; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_b", function() { return routerNgProbeToken; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_f", function() { return setupRouter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_n", function() { return RouterScroller; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_l", function() { return Tree; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_m", function() { return TreeNode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLink", function() { return RouterLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLinkWithHref", function() { return RouterLinkWithHref; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLinkActive", function() { return RouterLinkActive; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterOutlet", function() { return RouterOutlet; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivationEnd", function() { return ActivationEnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivationStart", function() { return ActivationStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildActivationEnd", function() { return ChildActivationEnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildActivationStart", function() { return ChildActivationStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GuardsCheckEnd", function() { return GuardsCheckEnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GuardsCheckStart", function() { return GuardsCheckStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationCancel", function() { return NavigationCancel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationEnd", function() { return NavigationEnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationError", function() { return NavigationError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationStart", function() { return NavigationStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolveEnd", function() { return ResolveEnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolveStart", function() { return ResolveStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouteConfigLoadEnd", function() { return RouteConfigLoadEnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouteConfigLoadStart", function() { return RouteConfigLoadStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterEvent", function() { return RouterEvent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RoutesRecognized", function() { return RoutesRecognized; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scroll", function() { return Scroll; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouteReuseStrategy", function() { return RouteReuseStrategy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return Router; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ROUTES", function() { return ROUTES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ROUTER_CONFIGURATION", function() { return ROUTER_CONFIGURATION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ROUTER_INITIALIZER", function() { return ROUTER_INITIALIZER; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterModule", function() { return RouterModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "provideRoutes", function() { return provideRoutes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildrenOutletContexts", function() { return ChildrenOutletContexts; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutletContext", function() { return OutletContext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoPreloading", function() { return NoPreloading; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloadAllModules", function() { return PreloadAllModules; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloadingStrategy", function() { return PreloadingStrategy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterPreloader", function() { return RouterPreloader; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivatedRoute", function() { return ActivatedRoute; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivatedRouteSnapshot", function() { return ActivatedRouteSnapshot; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterState", function() { return RouterState; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterStateSnapshot", function() { return RouterStateSnapshot; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PRIMARY_OUTLET", function() { return PRIMARY_OUTLET; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToParamMap", function() { return convertToParamMap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlHandlingStrategy", function() { return UrlHandlingStrategy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultUrlSerializer", function() { return DefaultUrlSerializer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlSegment", function() { return UrlSegment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlSegmentGroup", function() { return UrlSegmentGroup; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlSerializer", function() { return UrlSerializer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlTree", function() { return UrlTree; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEmptyOutletComponent", function() { return EmptyOutletComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵROUTER_PROVIDERS", function() { return ROUTER_PROVIDERS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵflatten", function() { return flatten; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
/**
 * @license Angular v7.0.4
 * (c) 2010-2018 Google, Inc. 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
 */
/**
 * @description
 *
 * Base for events the Router goes through, as opposed to events tied to a specific
 * Route. `RouterEvent`s will only be fired one time for any given navigation.
 *
 * Example:
 *
 * ```
 * class MyService {
 *   constructor(public router: Router, logger: Logger) {
 *     router.events.pipe(
 *       filter(e => e instanceof RouterEvent)
 *     ).subscribe(e => {
 *       logger.log(e.id, e.url);
 *     });
 *   }
 * }
 * ```
 *
 * @publicApi
 */
var RouterEvent = /** @class */ (function () {
    function RouterEvent(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url) {
        this.id = id;
        this.url = url;
    }
    return RouterEvent;
}());
/**
 * @description
 *
 * Represents an event triggered when a navigation starts.
 *
 * @publicApi
 */
var NavigationStart = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NavigationStart, _super);
    function NavigationStart(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url, 
    /** @docsNotRequired */
    navigationTrigger, 
    /** @docsNotRequired */
    restoredState) {
        if (navigationTrigger === void 0) { navigationTrigger = 'imperative'; }
        if (restoredState === void 0) { restoredState = null; }
        var _this = _super.call(this, id, url) || this;
        _this.navigationTrigger = navigationTrigger;
        _this.restoredState = restoredState;
        return _this;
    }
    /** @docsNotRequired */
    NavigationStart.prototype.toString = function () { return "NavigationStart(id: " + this.id + ", url: '" + this.url + "')"; };
    return NavigationStart;
}(RouterEvent));
/**
 * @description
 *
 * Represents an event triggered when a navigation ends successfully.
 *
 * @publicApi
 */
var NavigationEnd = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NavigationEnd, _super);
    function NavigationEnd(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url, 
    /** @docsNotRequired */
    urlAfterRedirects) {
        var _this = _super.call(this, id, url) || this;
        _this.urlAfterRedirects = urlAfterRedirects;
        return _this;
    }
    /** @docsNotRequired */
    NavigationEnd.prototype.toString = function () {
        return "NavigationEnd(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "')";
    };
    return NavigationEnd;
}(RouterEvent));
/**
 * @description
 *
 * Represents an event triggered when a navigation is canceled.
 *
 * @publicApi
 */
var NavigationCancel = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NavigationCancel, _super);
    function NavigationCancel(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url, 
    /** @docsNotRequired */
    reason) {
        var _this = _super.call(this, id, url) || this;
        _this.reason = reason;
        return _this;
    }
    /** @docsNotRequired */
    NavigationCancel.prototype.toString = function () { return "NavigationCancel(id: " + this.id + ", url: '" + this.url + "')"; };
    return NavigationCancel;
}(RouterEvent));
/**
 * @description
 *
 * Represents an event triggered when a navigation fails due to an unexpected error.
 *
 * @publicApi
 */
var NavigationError = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NavigationError, _super);
    function NavigationError(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url, 
    /** @docsNotRequired */
    error) {
        var _this = _super.call(this, id, url) || this;
        _this.error = error;
        return _this;
    }
    /** @docsNotRequired */
    NavigationError.prototype.toString = function () {
        return "NavigationError(id: " + this.id + ", url: '" + this.url + "', error: " + this.error + ")";
    };
    return NavigationError;
}(RouterEvent));
/**
 * @description
 *
 * Represents an event triggered when routes are recognized.
 *
 * @publicApi
 */
var RoutesRecognized = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RoutesRecognized, _super);
    function RoutesRecognized(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url, 
    /** @docsNotRequired */
    urlAfterRedirects, 
    /** @docsNotRequired */
    state) {
        var _this = _super.call(this, id, url) || this;
        _this.urlAfterRedirects = urlAfterRedirects;
        _this.state = state;
        return _this;
    }
    /** @docsNotRequired */
    RoutesRecognized.prototype.toString = function () {
        return "RoutesRecognized(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "', state: " + this.state + ")";
    };
    return RoutesRecognized;
}(RouterEvent));
/**
 * @description
 *
 * Represents the start of the Guard phase of routing.
 *
 * @publicApi
 */
var GuardsCheckStart = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GuardsCheckStart, _super);
    function GuardsCheckStart(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url, 
    /** @docsNotRequired */
    urlAfterRedirects, 
    /** @docsNotRequired */
    state) {
        var _this = _super.call(this, id, url) || this;
        _this.urlAfterRedirects = urlAfterRedirects;
        _this.state = state;
        return _this;
    }
    GuardsCheckStart.prototype.toString = function () {
        return "GuardsCheckStart(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "', state: " + this.state + ")";
    };
    return GuardsCheckStart;
}(RouterEvent));
/**
 * @description
 *
 * Represents the end of the Guard phase of routing.
 *
 * @publicApi
 */
var GuardsCheckEnd = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GuardsCheckEnd, _super);
    function GuardsCheckEnd(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url, 
    /** @docsNotRequired */
    urlAfterRedirects, 
    /** @docsNotRequired */
    state, 
    /** @docsNotRequired */
    shouldActivate) {
        var _this = _super.call(this, id, url) || this;
        _this.urlAfterRedirects = urlAfterRedirects;
        _this.state = state;
        _this.shouldActivate = shouldActivate;
        return _this;
    }
    GuardsCheckEnd.prototype.toString = function () {
        return "GuardsCheckEnd(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "', state: " + this.state + ", shouldActivate: " + this.shouldActivate + ")";
    };
    return GuardsCheckEnd;
}(RouterEvent));
/**
 * @description
 *
 * Represents the start of the Resolve phase of routing. The timing of this
 * event may change, thus it's experimental. In the current iteration it will run
 * in the "resolve" phase whether there's things to resolve or not. In the future this
 * behavior may change to only run when there are things to be resolved.
 *
 * @publicApi
 */
var ResolveStart = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ResolveStart, _super);
    function ResolveStart(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url, 
    /** @docsNotRequired */
    urlAfterRedirects, 
    /** @docsNotRequired */
    state) {
        var _this = _super.call(this, id, url) || this;
        _this.urlAfterRedirects = urlAfterRedirects;
        _this.state = state;
        return _this;
    }
    ResolveStart.prototype.toString = function () {
        return "ResolveStart(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "', state: " + this.state + ")";
    };
    return ResolveStart;
}(RouterEvent));
/**
 * @description
 *
 * Represents the end of the Resolve phase of routing. See note on
 * `ResolveStart` for use of this experimental API.
 *
 * @publicApi
 */
var ResolveEnd = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ResolveEnd, _super);
    function ResolveEnd(
    /** @docsNotRequired */
    id, 
    /** @docsNotRequired */
    url, 
    /** @docsNotRequired */
    urlAfterRedirects, 
    /** @docsNotRequired */
    state) {
        var _this = _super.call(this, id, url) || this;
        _this.urlAfterRedirects = urlAfterRedirects;
        _this.state = state;
        return _this;
    }
    ResolveEnd.prototype.toString = function () {
        return "ResolveEnd(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "', state: " + this.state + ")";
    };
    return ResolveEnd;
}(RouterEvent));
/**
 * @description
 *
 * Represents an event triggered before lazy loading a route config.
 *
 * @publicApi
 */
var RouteConfigLoadStart = /** @class */ (function () {
    function RouteConfigLoadStart(
    /** @docsNotRequired */
    route) {
        this.route = route;
    }
    RouteConfigLoadStart.prototype.toString = function () { return "RouteConfigLoadStart(path: " + this.route.path + ")"; };
    return RouteConfigLoadStart;
}());
/**
 * @description
 *
 * Represents an event triggered when a route has been lazy loaded.
 *
 * @publicApi
 */
var RouteConfigLoadEnd = /** @class */ (function () {
    function RouteConfigLoadEnd(
    /** @docsNotRequired */
    route) {
        this.route = route;
    }
    RouteConfigLoadEnd.prototype.toString = function () { return "RouteConfigLoadEnd(path: " + this.route.path + ")"; };
    return RouteConfigLoadEnd;
}());
/**
 * @description
 *
 * Represents the start of end of the Resolve phase of routing. See note on
 * `ChildActivationEnd` for use of this experimental API.
 *
 * @publicApi
 */
var ChildActivationStart = /** @class */ (function () {
    function ChildActivationStart(
    /** @docsNotRequired */
    snapshot) {
        this.snapshot = snapshot;
    }
    ChildActivationStart.prototype.toString = function () {
        var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';
        return "ChildActivationStart(path: '" + path + "')";
    };
    return ChildActivationStart;
}());
/**
 * @description
 *
 * Represents the start of end of the Resolve phase of routing. See note on
 * `ChildActivationStart` for use of this experimental API.
 *
 * @publicApi
 */
var ChildActivationEnd = /** @class */ (function () {
    function ChildActivationEnd(
    /** @docsNotRequired */
    snapshot) {
        this.snapshot = snapshot;
    }
    ChildActivationEnd.prototype.toString = function () {
        var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';
        return "ChildActivationEnd(path: '" + path + "')";
    };
    return ChildActivationEnd;
}());
/**
 * @description
 *
 * Represents the start of end of the Resolve phase of routing. See note on
 * `ActivationEnd` for use of this experimental API.
 *
 * @publicApi
 */
var ActivationStart = /** @class */ (function () {
    function ActivationStart(
    /** @docsNotRequired */
    snapshot) {
        this.snapshot = snapshot;
    }
    ActivationStart.prototype.toString = function () {
        var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';
        return "ActivationStart(path: '" + path + "')";
    };
    return ActivationStart;
}());
/**
 * @description
 *
 * Represents the start of end of the Resolve phase of routing. See note on
 * `ActivationStart` for use of this experimental API.
 *
 * @publicApi
 */
var ActivationEnd = /** @class */ (function () {
    function ActivationEnd(
    /** @docsNotRequired */
    snapshot) {
        this.snapshot = snapshot;
    }
    ActivationEnd.prototype.toString = function () {
        var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';
        return "ActivationEnd(path: '" + path + "')";
    };
    return ActivationEnd;
}());
/**
 * @description
 *
 * Represents a scrolling event.
 *
 * @publicApi
 */
var Scroll = /** @class */ (function () {
    function Scroll(
    /** @docsNotRequired */
    routerEvent, 
    /** @docsNotRequired */
    position, 
    /** @docsNotRequired */
    anchor) {
        this.routerEvent = routerEvent;
        this.position = position;
        this.anchor = anchor;
    }
    Scroll.prototype.toString = function () {
        var pos = this.position ? this.position[0] + ", " + this.position[1] : null;
        return "Scroll(anchor: '" + this.anchor + "', position: '" + pos + "')";
    };
    return Scroll;
}());

/**
 * @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 component is used internally within the router to be a placeholder when an empty
 * router-outlet is needed. For example, with a config such as:
 *
 * `{path: 'parent', outlet: 'nav', children: [...]}`
 *
 * In order to render, there needs to be a component on this config, which will default
 * to this `EmptyOutletComponent`.
 */
var EmptyOutletComponent = /** @class */ (function () {
    function EmptyOutletComponent() {
    }
    EmptyOutletComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ template: "<router-outlet></router-outlet>" })
    ], EmptyOutletComponent);
    return EmptyOutletComponent;
}());

/**
 * @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
 *
 * Name of the primary outlet.
 *
 * @publicApi
 */
var PRIMARY_OUTLET = 'primary';
var ParamsAsMap = /** @class */ (function () {
    function ParamsAsMap(params) {
        this.params = params || {};
    }
    ParamsAsMap.prototype.has = function (name) { return this.params.hasOwnProperty(name); };
    ParamsAsMap.prototype.get = function (name) {
        if (this.has(name)) {
            var v = this.params[name];
            return Array.isArray(v) ? v[0] : v;
        }
        return null;
    };
    ParamsAsMap.prototype.getAll = function (name) {
        if (this.has(name)) {
            var v = this.params[name];
            return Array.isArray(v) ? v : [v];
        }
        return [];
    };
    Object.defineProperty(ParamsAsMap.prototype, "keys", {
        get: function () { return Object.keys(this.params); },
        enumerable: true,
        configurable: true
    });
    return ParamsAsMap;
}());
/**
 * Convert a `Params` instance to a `ParamMap`.
 *
 * @publicApi
 */
function convertToParamMap(params) {
    return new ParamsAsMap(params);
}
var NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';
function navigationCancelingError(message) {
    var error = Error('NavigationCancelingError: ' + message);
    error[NAVIGATION_CANCELING_ERROR] = true;
    return error;
}
function isNavigationCancelingError(error) {
    return error && error[NAVIGATION_CANCELING_ERROR];
}
// Matches the route configuration (`route`) against the actual URL (`segments`).
function defaultUrlMatcher(segments, segmentGroup, route) {
    var parts = route.path.split('/');
    if (parts.length > segments.length) {
        // The actual URL is shorter than the config, no match
        return null;
    }
    if (route.pathMatch === 'full' &&
        (segmentGroup.hasChildren() || parts.length < segments.length)) {
        // The config is longer than the actual URL but we are looking for a full match, return null
        return null;
    }
    var posParams = {};
    // Check each config part against the actual URL
    for (var index = 0; index < parts.length; index++) {
        var part = parts[index];
        var segment = segments[index];
        var isParameter = part.startsWith(':');
        if (isParameter) {
            posParams[part.substring(1)] = segment;
        }
        else if (part !== segment.path) {
            // The actual URL part does not match the config, no match
            return null;
        }
    }
    return { consumed: segments.slice(0, parts.length), posParams: posParams };
}

/**
 * @license
 * Copyright Google 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 LoadedRouterConfig = /** @class */ (function () {
    function LoadedRouterConfig(routes, module) {
        this.routes = routes;
        this.module = module;
    }
    return LoadedRouterConfig;
}());
function validateConfig(config, parentPath) {
    if (parentPath === void 0) { parentPath = ''; }
    // forEach doesn't iterate undefined values
    for (var i = 0; i < config.length; i++) {
        var route = config[i];
        var fullPath = getFullPath(parentPath, route);
        validateNode(route, fullPath);
    }
}
function validateNode(route, fullPath) {
    if (!route) {
        throw new Error("\n      Invalid configuration of route '" + fullPath + "': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    ");
    }
    if (Array.isArray(route)) {
        throw new Error("Invalid configuration of route '" + fullPath + "': Array cannot be specified");
    }
    if (!route.component && !route.children && !route.loadChildren &&
        (route.outlet && route.outlet !== PRIMARY_OUTLET)) {
        throw new Error("Invalid configuration of route '" + fullPath + "': a componentless route without children or loadChildren cannot have a named outlet set");
    }
    if (route.redirectTo && route.children) {
        throw new Error("Invalid configuration of route '" + fullPath + "': redirectTo and children cannot be used together");
    }
    if (route.redirectTo && route.loadChildren) {
        throw new Error("Invalid configuration of route '" + fullPath + "': redirectTo and loadChildren cannot be used together");
    }
    if (route.children && route.loadChildren) {
        throw new Error("Invalid configuration of route '" + fullPath + "': children and loadChildren cannot be used together");
    }
    if (route.redirectTo && route.component) {
        throw new Error("Invalid configuration of route '" + fullPath + "': redirectTo and component cannot be used together");
    }
    if (route.path && route.matcher) {
        throw new Error("Invalid configuration of route '" + fullPath + "': path and matcher cannot be used together");
    }
    if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {
        throw new Error("Invalid configuration of route '" + fullPath + "'. One of the following must be provided: component, redirectTo, children or loadChildren");
    }
    if (route.path === void 0 && route.matcher === void 0) {
        throw new Error("Invalid configuration of route '" + fullPath + "': routes must have either a path or a matcher specified");
    }
    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {
        throw new Error("Invalid configuration of route '" + fullPath + "': path cannot start with a slash");
    }
    if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {
        var exp = "The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.";
        throw new Error("Invalid configuration of route '{path: \"" + fullPath + "\", redirectTo: \"" + route.redirectTo + "\"}': please provide 'pathMatch'. " + exp);
    }
    if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {
        throw new Error("Invalid configuration of route '" + fullPath + "': pathMatch can only be set to 'prefix' or 'full'");
    }
    if (route.children) {
        validateConfig(route.children, fullPath);
    }
}
function getFullPath(parentPath, currentRoute) {
    if (!currentRoute) {
        return parentPath;
    }
    if (!parentPath && !currentRoute.path) {
        return '';
    }
    else if (parentPath && !currentRoute.path) {
        return parentPath + "/";
    }
    else if (!parentPath && currentRoute.path) {
        return currentRoute.path;
    }
    else {
        return parentPath + "/" + currentRoute.path;
    }
}
/**
 * Makes a copy of the config and adds any default required properties.
 */
function standardizeConfig(r) {
    var children = r.children && r.children.map(standardizeConfig);
    var c = children ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, r, { children: children }) : Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, r);
    if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {
        c.component = EmptyOutletComponent;
    }
    return c;
}

/**
 * @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 shallowEqualArrays(a, b) {
    if (a.length !== b.length)
        return false;
    for (var i = 0; i < a.length; ++i) {
        if (!shallowEqual(a[i], b[i]))
            return false;
    }
    return true;
}
function shallowEqual(a, b) {
    var k1 = Object.keys(a);
    var k2 = Object.keys(b);
    if (k1.length != k2.length) {
        return false;
    }
    var key;
    for (var i = 0; i < k1.length; i++) {
        key = k1[i];
        if (a[key] !== b[key]) {
            return false;
        }
    }
    return true;
}
/**
 * Flattens single-level nested arrays.
 */
function flatten(arr) {
    return Array.prototype.concat.apply([], arr);
}
/**
 * Return the last element of an array.
 */
function last$1(a) {
    return a.length > 0 ? a[a.length - 1] : null;
}
function forEach(map$$1, callback) {
    for (var prop in map$$1) {
        if (map$$1.hasOwnProperty(prop)) {
            callback(map$$1[prop], prop);
        }
    }
}
function waitForMap(obj, fn) {
    if (Object.keys(obj).length === 0) {
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])({});
    }
    var waitHead = [];
    var waitTail = [];
    var res = {};
    forEach(obj, function (a, k) {
        var mapped = fn(k, a).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (r) { return res[k] = r; }));
        if (k === PRIMARY_OUTLET) {
            waitHead.push(mapped);
        }
        else {
            waitTail.push(mapped);
        }
    });
    // Closure compiler has problem with using spread operator here. So just using Array.concat.
    return rxjs__WEBPACK_IMPORTED_MODULE_2__["of"].apply(null, waitHead.concat(waitTail)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatAll"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["last"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function () { return res; }));
}
/**
 * ANDs Observables by merging all input observables, reducing to an Observable verifying all
 * input Observables return `true`.
 */
function andObservables(observables) {
    return observables.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["every"])(function (result) { return result === true; }));
}
function wrapIntoObservable(value) {
    if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisObservable"])(value)) {
        return value;
    }
    if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisPromise"])(value)) {
        // Use `Promise.resolve()` to wrap promise-like instances.
        // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the
        // change detection.
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(Promise.resolve(value));
    }
    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(value);
}

/**
 * @license
 * Copyright Google 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 createEmptyUrlTree() {
    return new UrlTree(new UrlSegmentGroup([], {}), {}, null);
}
function containsTree(container, containee, exact) {
    if (exact) {
        return equalQueryParams(container.queryParams, containee.queryParams) &&
            equalSegmentGroups(container.root, containee.root);
    }
    return containsQueryParams(container.queryParams, containee.queryParams) &&
        containsSegmentGroup(container.root, containee.root);
}
function equalQueryParams(container, containee) {
    // TODO: This does not handle array params correctly.
    return shallowEqual(container, containee);
}
function equalSegmentGroups(container, containee) {
    if (!equalPath(container.segments, containee.segments))
        return false;
    if (container.numberOfChildren !== containee.numberOfChildren)
        return false;
    for (var c in containee.children) {
        if (!container.children[c])
            return false;
        if (!equalSegmentGroups(container.children[c], containee.children[c]))
            return false;
    }
    return true;
}
function containsQueryParams(container, containee) {
    // TODO: This does not handle array params correctly.
    return Object.keys(containee).length <= Object.keys(container).length &&
        Object.keys(containee).every(function (key) { return containee[key] === container[key]; });
}
function containsSegmentGroup(container, containee) {
    return containsSegmentGroupHelper(container, containee, containee.segments);
}
function containsSegmentGroupHelper(container, containee, containeePaths) {
    if (container.segments.length > containeePaths.length) {
        var current = container.segments.slice(0, containeePaths.length);
        if (!equalPath(current, containeePaths))
            return false;
        if (containee.hasChildren())
            return false;
        return true;
    }
    else if (container.segments.length === containeePaths.length) {
        if (!equalPath(container.segments, containeePaths))
            return false;
        for (var c in containee.children) {
            if (!container.children[c])
                return false;
            if (!containsSegmentGroup(container.children[c], containee.children[c]))
                return false;
        }
        return true;
    }
    else {
        var current = containeePaths.slice(0, container.segments.length);
        var next = containeePaths.slice(container.segments.length);
        if (!equalPath(container.segments, current))
            return false;
        if (!container.children[PRIMARY_OUTLET])
            return false;
        return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);
    }
}
/**
 * @description
 *
 * Represents the parsed URL.
 *
 * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a
 * serialized tree.
 * UrlTree is a data structure that provides a lot of affordances in dealing with URLs
 *
 * @usageNotes
 * ### Example
 *
 * ```
 * @Component({templateUrl:'template.html'})
 * class MyComponent {
 *   constructor(router: Router) {
 *     const tree: UrlTree =
 *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');
 *     const f = tree.fragment; // return 'fragment'
 *     const q = tree.queryParams; // returns {debug: 'true'}
 *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];
 *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'
 *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'
 *     g.children['support'].segments; // return 1 segment 'help'
 *   }
 * }
 * ```
 *
 * @publicApi
 */
var UrlTree = /** @class */ (function () {
    /** @internal */
    function UrlTree(
    /** The root segment group of the URL tree */
    root, 
    /** The query params of the URL */
    queryParams, 
    /** The fragment of the URL */
    fragment) {
        this.root = root;
        this.queryParams = queryParams;
        this.fragment = fragment;
    }
    Object.defineProperty(UrlTree.prototype, "queryParamMap", {
        get: function () {
            if (!this._queryParamMap) {
                this._queryParamMap = convertToParamMap(this.queryParams);
            }
            return this._queryParamMap;
        },
        enumerable: true,
        configurable: true
    });
    /** @docsNotRequired */
    UrlTree.prototype.toString = function () { return DEFAULT_SERIALIZER.serialize(this); };
    return UrlTree;
}());
/**
 * @description
 *
 * Represents the parsed URL segment group.
 *
 * See `UrlTree` for more information.
 *
 * @publicApi
 */
var UrlSegmentGroup = /** @class */ (function () {
    function UrlSegmentGroup(
    /** The URL segments of this group. See `UrlSegment` for more information */
    segments, 
    /** The list of children of this group */
    children) {
        var _this = this;
        this.segments = segments;
        this.children = children;
        /** The parent node in the url tree */
        this.parent = null;
        forEach(children, function (v, k) { return v.parent = _this; });
    }
    /** Whether the segment has child segments */
    UrlSegmentGroup.prototype.hasChildren = function () { return this.numberOfChildren > 0; };
    Object.defineProperty(UrlSegmentGroup.prototype, "numberOfChildren", {
        /** Number of child segments */
        get: function () { return Object.keys(this.children).length; },
        enumerable: true,
        configurable: true
    });
    /** @docsNotRequired */
    UrlSegmentGroup.prototype.toString = function () { return serializePaths(this); };
    return UrlSegmentGroup;
}());
/**
 * @description
 *
 * Represents a single URL segment.
 *
 * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix
 * parameters associated with the segment.
 *
 * @usageNotes
 * ### Example
 *
 * ```
 * @Component({templateUrl:'template.html'})
 * class MyComponent {
 *   constructor(router: Router) {
 *     const tree: UrlTree = router.parseUrl('/team;id=33');
 *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];
 *     const s: UrlSegment[] = g.segments;
 *     s[0].path; // returns 'team'
 *     s[0].parameters; // returns {id: 33}
 *   }
 * }
 * ```
 *
 * @publicApi
 */
var UrlSegment = /** @class */ (function () {
    function UrlSegment(
    /** The path part of a URL segment */
    path, 
    /** The matrix parameters associated with a segment */
    parameters) {
        this.path = path;
        this.parameters = parameters;
    }
    Object.defineProperty(UrlSegment.prototype, "parameterMap", {
        get: function () {
            if (!this._parameterMap) {
                this._parameterMap = convertToParamMap(this.parameters);
            }
            return this._parameterMap;
        },
        enumerable: true,
        configurable: true
    });
    /** @docsNotRequired */
    UrlSegment.prototype.toString = function () { return serializePath(this); };
    return UrlSegment;
}());
function equalSegments(as, bs) {
    return equalPath(as, bs) && as.every(function (a, i) { return shallowEqual(a.parameters, bs[i].parameters); });
}
function equalPath(as, bs) {
    if (as.length !== bs.length)
        return false;
    return as.every(function (a, i) { return a.path === bs[i].path; });
}
function mapChildrenIntoArray(segment, fn) {
    var res = [];
    forEach(segment.children, function (child, childOutlet) {
        if (childOutlet === PRIMARY_OUTLET) {
            res = res.concat(fn(child, childOutlet));
        }
    });
    forEach(segment.children, function (child, childOutlet) {
        if (childOutlet !== PRIMARY_OUTLET) {
            res = res.concat(fn(child, childOutlet));
        }
    });
    return res;
}
/**
 * @description
 *
 * Serializes and deserializes a URL string into a URL tree.
 *
 * The url serialization strategy is customizable. You can
 * make all URLs case insensitive by providing a custom UrlSerializer.
 *
 * See `DefaultUrlSerializer` for an example of a URL serializer.
 *
 * @publicApi
 */
var UrlSerializer = /** @class */ (function () {
    function UrlSerializer() {
    }
    return UrlSerializer;
}());
/**
 * @description
 *
 * A default implementation of the `UrlSerializer`.
 *
 * Example URLs:
 *
 * ```
 * /inbox/33(popup:compose)
 * /inbox/33;open=true/messages/44
 * ```
 *
 * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the
 * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to
 * specify route specific parameters.
 *
 * @publicApi
 */
var DefaultUrlSerializer = /** @class */ (function () {
    function DefaultUrlSerializer() {
    }
    /** Parses a url into a `UrlTree` */
    DefaultUrlSerializer.prototype.parse = function (url) {
        var p = new UrlParser(url);
        return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());
    };
    /** Converts a `UrlTree` into a url */
    DefaultUrlSerializer.prototype.serialize = function (tree) {
        var segment = "/" + serializeSegment(tree.root, true);
        var query = serializeQueryParams(tree.queryParams);
        var fragment = typeof tree.fragment === "string" ? "#" + encodeUriFragment(tree.fragment) : '';
        return "" + segment + query + fragment;
    };
    return DefaultUrlSerializer;
}());
var DEFAULT_SERIALIZER = new DefaultUrlSerializer();
function serializePaths(segment) {
    return segment.segments.map(function (p) { return serializePath(p); }).join('/');
}
function serializeSegment(segment, root) {
    if (!segment.hasChildren()) {
        return serializePaths(segment);
    }
    if (root) {
        var primary = segment.children[PRIMARY_OUTLET] ?
            serializeSegment(segment.children[PRIMARY_OUTLET], false) :
            '';
        var children_1 = [];
        forEach(segment.children, function (v, k) {
            if (k !== PRIMARY_OUTLET) {
                children_1.push(k + ":" + serializeSegment(v, false));
            }
        });
        return children_1.length > 0 ? primary + "(" + children_1.join('//') + ")" : primary;
    }
    else {
        var children = mapChildrenIntoArray(segment, function (v, k) {
            if (k === PRIMARY_OUTLET) {
                return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];
            }
            return [k + ":" + serializeSegment(v, false)];
        });
        return serializePaths(segment) + "/(" + children.join('//') + ")";
    }
}
/**
 * Encodes a URI string with the default encoding. This function will only ever be called from
 * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need
 * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't
 * have to be encoded per https://url.spec.whatwg.org.
 */
function encodeUriString(s) {
    return encodeURIComponent(s)
        .replace(/%40/g, '@')
        .replace(/%3A/gi, ':')
        .replace(/%24/g, '$')
        .replace(/%2C/gi, ',');
}
/**
 * This function should be used to encode both keys and values in a query string key/value. In
 * the following URL, you need to call encodeUriQuery on "k" and "v":
 *
 * http://www.site.org/html;mk=mv?k=v#f
 */
function encodeUriQuery(s) {
    return encodeUriString(s).replace(/%3B/gi, ';');
}
/**
 * This function should be used to encode a URL fragment. In the following URL, you need to call
 * encodeUriFragment on "f":
 *
 * http://www.site.org/html;mk=mv?k=v#f
 */
function encodeUriFragment(s) {
    return encodeURI(s);
}
/**
 * This function should be run on any URI segment as well as the key and value in a key/value
 * pair for matrix params. In the following URL, you need to call encodeUriSegment on "html",
 * "mk", and "mv":
 *
 * http://www.site.org/html;mk=mv?k=v#f
 */
function encodeUriSegment(s) {
    return encodeUriString(s).replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/%26/gi, '&');
}
function decode(s) {
    return decodeURIComponent(s);
}
// Query keys/values should have the "+" replaced first, as "+" in a query string is " ".
// decodeURIComponent function will not decode "+" as a space.
function decodeQuery(s) {
    return decode(s.replace(/\+/g, '%20'));
}
function serializePath(path) {
    return "" + encodeUriSegment(path.path) + serializeMatrixParams(path.parameters);
}
function serializeMatrixParams(params) {
    return Object.keys(params)
        .map(function (key) { return ";" + encodeUriSegment(key) + "=" + encodeUriSegment(params[key]); })
        .join('');
}
function serializeQueryParams(params) {
    var strParams = Object.keys(params).map(function (name) {
        var value = params[name];
        return Array.isArray(value) ?
            value.map(function (v) { return encodeUriQuery(name) + "=" + encodeUriQuery(v); }).join('&') :
            encodeUriQuery(name) + "=" + encodeUriQuery(value);
    });
    return strParams.length ? "?" + strParams.join("&") : '';
}
var SEGMENT_RE = /^[^\/()?;=#]+/;
function matchSegments(str) {
    var match = str.match(SEGMENT_RE);
    return match ? match[0] : '';
}
var QUERY_PARAM_RE = /^[^=?&#]+/;
// Return the name of the query param at the start of the string or an empty string
function matchQueryParams(str) {
    var match = str.match(QUERY_PARAM_RE);
    return match ? match[0] : '';
}
var QUERY_PARAM_VALUE_RE = /^[^?&#]+/;
// Return the value of the query param at the start of the string or an empty string
function matchUrlQueryParamValue(str) {
    var match = str.match(QUERY_PARAM_VALUE_RE);
    return match ? match[0] : '';
}
var UrlParser = /** @class */ (function () {
    function UrlParser(url) {
        this.url = url;
        this.remaining = url;
    }
    UrlParser.prototype.parseRootSegment = function () {
        this.consumeOptional('/');
        if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {
            return new UrlSegmentGroup([], {});
        }
        // The root segment group never has segments
        return new UrlSegmentGroup([], this.parseChildren());
    };
    UrlParser.prototype.parseQueryParams = function () {
        var params = {};
        if (this.consumeOptional('?')) {
            do {
                this.parseQueryParam(params);
            } while (this.consumeOptional('&'));
        }
        return params;
    };
    UrlParser.prototype.parseFragment = function () {
        return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;
    };
    UrlParser.prototype.parseChildren = function () {
        if (this.remaining === '') {
            return {};
        }
        this.consumeOptional('/');
        var segments = [];
        if (!this.peekStartsWith('(')) {
            segments.push(this.parseSegment());
        }
        while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {
            this.capture('/');
            segments.push(this.parseSegment());
        }
        var children = {};
        if (this.peekStartsWith('/(')) {
            this.capture('/');
            children = this.parseParens(true);
        }
        var res = {};
        if (this.peekStartsWith('(')) {
            res = this.parseParens(false);
        }
        if (segments.length > 0 || Object.keys(children).length > 0) {
            res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);
        }
        return res;
    };
    // parse a segment with its matrix parameters
    // ie `name;k1=v1;k2`
    UrlParser.prototype.parseSegment = function () {
        var path = matchSegments(this.remaining);
        if (path === '' && this.peekStartsWith(';')) {
            throw new Error("Empty path url segment cannot have parameters: '" + this.remaining + "'.");
        }
        this.capture(path);
        return new UrlSegment(decode(path), this.parseMatrixParams());
    };
    UrlParser.prototype.parseMatrixParams = function () {
        var params = {};
        while (this.consumeOptional(';')) {
            this.parseParam(params);
        }
        return params;
    };
    UrlParser.prototype.parseParam = function (params) {
        var key = matchSegments(this.remaining);
        if (!key) {
            return;
        }
        this.capture(key);
        var value = '';
        if (this.consumeOptional('=')) {
            var valueMatch = matchSegments(this.remaining);
            if (valueMatch) {
                value = valueMatch;
                this.capture(value);
            }
        }
        params[decode(key)] = decode(value);
    };
    // Parse a single query parameter `name[=value]`
    UrlParser.prototype.parseQueryParam = function (params) {
        var key = matchQueryParams(this.remaining);
        if (!key) {
            return;
        }
        this.capture(key);
        var value = '';
        if (this.consumeOptional('=')) {
            var valueMatch = matchUrlQueryParamValue(this.remaining);
            if (valueMatch) {
                value = valueMatch;
                this.capture(value);
            }
        }
        var decodedKey = decodeQuery(key);
        var decodedVal = decodeQuery(value);
        if (params.hasOwnProperty(decodedKey)) {
            // Append to existing values
            var currentVal = params[decodedKey];
            if (!Array.isArray(currentVal)) {
                currentVal = [currentVal];
                params[decodedKey] = currentVal;
            }
            currentVal.push(decodedVal);
        }
        else {
            // Create a new value
            params[decodedKey] = decodedVal;
        }
    };
    // parse `(a/b//outlet_name:c/d)`
    UrlParser.prototype.parseParens = function (allowPrimary) {
        var segments = {};
        this.capture('(');
        while (!this.consumeOptional(')') && this.remaining.length > 0) {
            var path = matchSegments(this.remaining);
            var next = this.remaining[path.length];
            // if is is not one of these characters, then the segment was unescaped
            // or the group was not closed
            if (next !== '/' && next !== ')' && next !== ';') {
                throw new Error("Cannot parse url '" + this.url + "'");
            }
            var outletName = undefined;
            if (path.indexOf(':') > -1) {
                outletName = path.substr(0, path.indexOf(':'));
                this.capture(outletName);
                this.capture(':');
            }
            else if (allowPrimary) {
                outletName = PRIMARY_OUTLET;
            }
            var children = this.parseChildren();
            segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :
                new UrlSegmentGroup([], children);
            this.consumeOptional('//');
        }
        return segments;
    };
    UrlParser.prototype.peekStartsWith = function (str) { return this.remaining.startsWith(str); };
    // Consumes the prefix when it is present and returns whether it has been consumed
    UrlParser.prototype.consumeOptional = function (str) {
        if (this.peekStartsWith(str)) {
            this.remaining = this.remaining.substring(str.length);
            return true;
        }
        return false;
    };
    UrlParser.prototype.capture = function (str) {
        if (!this.consumeOptional(str)) {
            throw new Error("Expected \"" + str + "\".");
        }
    };
    return UrlParser;
}());

/**
 * @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 Tree = /** @class */ (function () {
    function Tree(root) {
        this._root = root;
    }
    Object.defineProperty(Tree.prototype, "root", {
        get: function () { return this._root.value; },
        enumerable: true,
        configurable: true
    });
    /**
     * @internal
     */
    Tree.prototype.parent = function (t) {
        var p = this.pathFromRoot(t);
        return p.length > 1 ? p[p.length - 2] : null;
    };
    /**
     * @internal
     */
    Tree.prototype.children = function (t) {
        var n = findNode(t, this._root);
        return n ? n.children.map(function (t) { return t.value; }) : [];
    };
    /**
     * @internal
     */
    Tree.prototype.firstChild = function (t) {
        var n = findNode(t, this._root);
        return n && n.children.length > 0 ? n.children[0].value : null;
    };
    /**
     * @internal
     */
    Tree.prototype.siblings = function (t) {
        var p = findPath(t, this._root);
        if (p.length < 2)
            return [];
        var c = p[p.length - 2].children.map(function (c) { return c.value; });
        return c.filter(function (cc) { return cc !== t; });
    };
    /**
     * @internal
     */
    Tree.prototype.pathFromRoot = function (t) { return findPath(t, this._root).map(function (s) { return s.value; }); };
    return Tree;
}());
// DFS for the node matching the value
function findNode(value, node) {
    var e_1, _a;
    if (value === node.value)
        return node;
    try {
        for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {
            var child = _c.value;
            var node_1 = findNode(value, child);
            if (node_1)
                return node_1;
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
        }
        finally { if (e_1) throw e_1.error; }
    }
    return null;
}
// Return the path to the node with the given value using DFS
function findPath(value, node) {
    var e_2, _a;
    if (value === node.value)
        return [node];
    try {
        for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {
            var child = _c.value;
            var path = findPath(value, child);
            if (path.length) {
                path.unshift(node);
                return path;
            }
        }
    }
    catch (e_2_1) { e_2 = { error: e_2_1 }; }
    finally {
        try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
        }
        finally { if (e_2) throw e_2.error; }
    }
    return [];
}
var TreeNode = /** @class */ (function () {
    function TreeNode(value, children) {
        this.value = value;
        this.children = children;
    }
    TreeNode.prototype.toString = function () { return "TreeNode(" + this.value + ")"; };
    return TreeNode;
}());
// Return the list of T indexed by outlet name
function nodeChildrenAsMap(node) {
    var map$$1 = {};
    if (node) {
        node.children.forEach(function (child) { return map$$1[child.value.outlet] = child; });
    }
    return map$$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
 */
/**
 * @description
 *
 * Represents the state of the router.
 *
 * RouterState is a tree of activated routes. Every node in this tree knows about the "consumed" URL
 * segments, the extracted parameters, and the resolved data.
 *
 * @usageNotes
 * ### Example
 *
 * ```
 * @Component({templateUrl:'template.html'})
 * class MyComponent {
 *   constructor(router: Router) {
 *     const state: RouterState = router.routerState;
 *     const root: ActivatedRoute = state.root;
 *     const child = root.firstChild;
 *     const id: Observable<string> = child.params.map(p => p.id);
 *     //...
 *   }
 * }
 * ```
 *
 * See `ActivatedRoute` for more information.
 *
 * @publicApi
 */
var RouterState = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RouterState, _super);
    /** @internal */
    function RouterState(root, 
    /** The current snapshot of the router state */
    snapshot) {
        var _this = _super.call(this, root) || this;
        _this.snapshot = snapshot;
        setRouterState(_this, root);
        return _this;
    }
    RouterState.prototype.toString = function () { return this.snapshot.toString(); };
    return RouterState;
}(Tree));
function createEmptyState(urlTree, rootComponent) {
    var snapshot = createEmptyStateSnapshot(urlTree, rootComponent);
    var emptyUrl = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]([new UrlSegment('', {})]);
    var emptyParams = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({});
    var emptyData = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({});
    var emptyQueryParams = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({});
    var fragment = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]('');
    var activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);
    activated.snapshot = snapshot.root;
    return new RouterState(new TreeNode(activated, []), snapshot);
}
function createEmptyStateSnapshot(urlTree, rootComponent) {
    var emptyParams = {};
    var emptyData = {};
    var emptyQueryParams = {};
    var fragment = '';
    var activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});
    return new RouterStateSnapshot('', new TreeNode(activated, []));
}
/**
 * @description
 *
 * Contains the information about a route associated with a component loaded in an
 * outlet.  An `ActivatedRoute` can also be used to traverse the router state tree.
 *
 * ```
 * @Component({...})
 * class MyComponent {
 *   constructor(route: ActivatedRoute) {
 *     const id: Observable<string> = route.params.map(p => p.id);
 *     const url: Observable<string> = route.url.map(segments => segments.join(''));
 *     // route.data includes both `data` and `resolve`
 *     const user = route.data.map(d => d.user);
 *   }
 * }
 * ```
 *
 * @publicApi
 */
var ActivatedRoute = /** @class */ (function () {
    /** @internal */
    function ActivatedRoute(
    /** An observable of the URL segments matched by this route */
    url, 
    /** An observable of the matrix parameters scoped to this route */
    params, 
    /** An observable of the query parameters shared by all the routes */
    queryParams, 
    /** An observable of the URL fragment shared by all the routes */
    fragment, 
    /** An observable of the static and resolved data of this route. */
    data, 
    /** The outlet name of the route. It's a constant */
    outlet, 
    /** The component of the route. It's a constant */
    // TODO(vsavkin): remove |string
    component, futureSnapshot) {
        this.url = url;
        this.params = params;
        this.queryParams = queryParams;
        this.fragment = fragment;
        this.data = data;
        this.outlet = outlet;
        this.component = component;
        this._futureSnapshot = futureSnapshot;
    }
    Object.defineProperty(ActivatedRoute.prototype, "routeConfig", {
        /** The configuration used to match this route */
        get: function () { return this._futureSnapshot.routeConfig; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRoute.prototype, "root", {
        /** The root of the router state */
        get: function () { return this._routerState.root; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRoute.prototype, "parent", {
        /** The parent of this route in the router state tree */
        get: function () { return this._routerState.parent(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRoute.prototype, "firstChild", {
        /** The first child of this route in the router state tree */
        get: function () { return this._routerState.firstChild(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRoute.prototype, "children", {
        /** The children of this route in the router state tree */
        get: function () { return this._routerState.children(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRoute.prototype, "pathFromRoot", {
        /** The path from the root of the router state tree to this route */
        get: function () { return this._routerState.pathFromRoot(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRoute.prototype, "paramMap", {
        get: function () {
            if (!this._paramMap) {
                this._paramMap = this.params.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (p) { return convertToParamMap(p); }));
            }
            return this._paramMap;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRoute.prototype, "queryParamMap", {
        get: function () {
            if (!this._queryParamMap) {
                this._queryParamMap =
                    this.queryParams.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (p) { return convertToParamMap(p); }));
            }
            return this._queryParamMap;
        },
        enumerable: true,
        configurable: true
    });
    ActivatedRoute.prototype.toString = function () {
        return this.snapshot ? this.snapshot.toString() : "Future(" + this._futureSnapshot + ")";
    };
    return ActivatedRoute;
}());
/**
 * Returns the inherited params, data, and resolve for a given route.
 * By default, this only inherits values up to the nearest path-less or component-less route.
 * @internal
 */
function inheritedParamsDataResolve(route, paramsInheritanceStrategy) {
    if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }
    var pathFromRoot = route.pathFromRoot;
    var inheritingStartingFrom = 0;
    if (paramsInheritanceStrategy !== 'always') {
        inheritingStartingFrom = pathFromRoot.length - 1;
        while (inheritingStartingFrom >= 1) {
            var current = pathFromRoot[inheritingStartingFrom];
            var parent_1 = pathFromRoot[inheritingStartingFrom - 1];
            // current route is an empty path => inherits its parent's params and data
            if (current.routeConfig && current.routeConfig.path === '') {
                inheritingStartingFrom--;
                // parent is componentless => current route should inherit its params and data
            }
            else if (!parent_1.component) {
                inheritingStartingFrom--;
            }
            else {
                break;
            }
        }
    }
    return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));
}
/** @internal */
function flattenInherited(pathFromRoot) {
    return pathFromRoot.reduce(function (res, curr) {
        var params = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, res.params, curr.params);
        var data = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, res.data, curr.data);
        var resolve = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, res.resolve, curr._resolvedData);
        return { params: params, data: data, resolve: resolve };
    }, { params: {}, data: {}, resolve: {} });
}
/**
 * @description
 *
 * Contains the information about a route associated with a component loaded in an
 * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to
 * traverse the router state tree.
 *
 * ```
 * @Component({templateUrl:'./my-component.html'})
 * class MyComponent {
 *   constructor(route: ActivatedRoute) {
 *     const id: string = route.snapshot.params.id;
 *     const url: string = route.snapshot.url.join('');
 *     const user = route.snapshot.data.user;
 *   }
 * }
 * ```
 *
 * @publicApi
 */
var ActivatedRouteSnapshot = /** @class */ (function () {
    /** @internal */
    function ActivatedRouteSnapshot(
    /** The URL segments matched by this route */
    url, 
    /** The matrix parameters scoped to this route */
    params, 
    /** The query parameters shared by all the routes */
    queryParams, 
    /** The URL fragment shared by all the routes */
    fragment, 
    /** The static and resolved data of this route */
    data, 
    /** The outlet name of the route */
    outlet, 
    /** The component of the route */
    component, routeConfig, urlSegment, lastPathIndex, resolve) {
        this.url = url;
        this.params = params;
        this.queryParams = queryParams;
        this.fragment = fragment;
        this.data = data;
        this.outlet = outlet;
        this.component = component;
        this.routeConfig = routeConfig;
        this._urlSegment = urlSegment;
        this._lastPathIndex = lastPathIndex;
        this._resolve = resolve;
    }
    Object.defineProperty(ActivatedRouteSnapshot.prototype, "root", {
        /** The root of the router state */
        get: function () { return this._routerState.root; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRouteSnapshot.prototype, "parent", {
        /** The parent of this route in the router state tree */
        get: function () { return this._routerState.parent(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRouteSnapshot.prototype, "firstChild", {
        /** The first child of this route in the router state tree */
        get: function () { return this._routerState.firstChild(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRouteSnapshot.prototype, "children", {
        /** The children of this route in the router state tree */
        get: function () { return this._routerState.children(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRouteSnapshot.prototype, "pathFromRoot", {
        /** The path from the root of the router state tree to this route */
        get: function () { return this._routerState.pathFromRoot(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRouteSnapshot.prototype, "paramMap", {
        get: function () {
            if (!this._paramMap) {
                this._paramMap = convertToParamMap(this.params);
            }
            return this._paramMap;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivatedRouteSnapshot.prototype, "queryParamMap", {
        get: function () {
            if (!this._queryParamMap) {
                this._queryParamMap = convertToParamMap(this.queryParams);
            }
            return this._queryParamMap;
        },
        enumerable: true,
        configurable: true
    });
    ActivatedRouteSnapshot.prototype.toString = function () {
        var url = this.url.map(function (segment) { return segment.toString(); }).join('/');
        var matched = this.routeConfig ? this.routeConfig.path : '';
        return "Route(url:'" + url + "', path:'" + matched + "')";
    };
    return ActivatedRouteSnapshot;
}());
/**
 * @description
 *
 * Represents the state of the router at a moment in time.
 *
 * This is a tree of activated route snapshots. Every node in this tree knows about
 * the "consumed" URL segments, the extracted parameters, and the resolved data.
 *
 * @usageNotes
 * ### Example
 *
 * ```
 * @Component({templateUrl:'template.html'})
 * class MyComponent {
 *   constructor(router: Router) {
 *     const state: RouterState = router.routerState;
 *     const snapshot: RouterStateSnapshot = state.snapshot;
 *     const root: ActivatedRouteSnapshot = snapshot.root;
 *     const child = root.firstChild;
 *     const id: Observable<string> = child.params.map(p => p.id);
 *     //...
 *   }
 * }
 * ```
 *
 * @publicApi
 */
var RouterStateSnapshot = /** @class */ (function (_super) {
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RouterStateSnapshot, _super);
    /** @internal */
    function RouterStateSnapshot(
    /** The url from which this snapshot was created */
    url, root) {
        var _this = _super.call(this, root) || this;
        _this.url = url;
        setRouterState(_this, root);
        return _this;
    }
    RouterStateSnapshot.prototype.toString = function () { return serializeNode(this._root); };
    return RouterStateSnapshot;
}(Tree));
function setRouterState(state, node) {
    node.value._routerState = state;
    node.children.forEach(function (c) { return setRouterState(state, c); });
}
function serializeNode(node) {
    var c = node.children.length > 0 ? " { " + node.children.map(serializeNode).join(', ') + " } " : '';
    return "" + node.value + c;
}
/**
 * The expectation is that the activate route is created with the right set of parameters.
 * So we push new values into the observables only when they are not the initial values.
 * And we detect that by checking if the snapshot field is set.
 */
function advanceActivatedRoute(route) {
    if (route.snapshot) {
        var currentSnapshot = route.snapshot;
        var nextSnapshot = route._futureSnapshot;
        route.snapshot = nextSnapshot;
        if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {
            route.queryParams.next(nextSnapshot.queryParams);
        }
        if (currentSnapshot.fragment !== nextSnapshot.fragment) {
            route.fragment.next(nextSnapshot.fragment);
        }
        if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {
            route.params.next(nextSnapshot.params);
        }
        if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {
            route.url.next(nextSnapshot.url);
        }
        if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {
            route.data.next(nextSnapshot.data);
        }
    }
    else {
        route.snapshot = route._futureSnapshot;
        // this is for resolved data
        route.data.next(route._futureSnapshot.data);
    }
}
function equalParamsAndUrlSegments(a, b) {
    var equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);
    var parentsMismatch = !a.parent !== !b.parent;
    return equalUrlParams && !parentsMismatch &&
        (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));
}

/**
 * @license
 * Copyright Google 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 createRouterState(routeReuseStrategy, curr, prevState) {
    var root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);
    return new RouterState(root, curr);
}
function createNode(routeReuseStrategy, curr, prevState) {
    // reuse an activated route that is currently displayed on the screen
    if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {
        var value = prevState.value;
        value._futureSnapshot = curr.value;
        var children = createOrReuseChildren(routeReuseStrategy, curr, prevState);
        return new TreeNode(value, children);
        // retrieve an activated route that is used to be displayed, but is not currently displayed
    }
    else {
        var detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);
        if (detachedRouteHandle) {
            var tree = detachedRouteHandle.route;
            setFutureSnapshotsOfActivatedRoutes(curr, tree);
            return tree;
        }
        else {
            var value = createActivatedRoute(curr.value);
            var children = curr.children.map(function (c) { return createNode(routeReuseStrategy, c); });
            return new TreeNode(value, children);
        }
    }
}
function setFutureSnapshotsOfActivatedRoutes(curr, result) {
    if (curr.value.routeConfig !== result.value.routeConfig) {
        throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');
    }
    if (curr.children.length !== result.children.length) {
        throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');
    }
    result.value._futureSnapshot = curr.value;
    for (var i = 0; i < curr.children.length; ++i) {
        setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);
    }
}
function createOrReuseChildren(routeReuseStrategy, curr, prevState) {
    return curr.children.map(function (child) {
        var e_1, _a;
        try {
            for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(prevState.children), _c = _b.next(); !_c.done; _c = _b.next()) {
                var p = _c.value;
                if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {
                    return createNode(routeReuseStrategy, child, p);
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            }
            finally { if (e_1) throw e_1.error; }
        }
        return createNode(routeReuseStrategy, child);
    });
}
function createActivatedRoute(c) {
    return new ActivatedRoute(new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.url), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.params), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.queryParams), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.fragment), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.data), c.outlet, c.component, c);
}

/**
 * @license
 * Copyright Google 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 createUrlTree(route, urlTree, commands, queryParams, fragment) {
    if (commands.length === 0) {
        return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);
    }
    var nav = computeNavigation(commands);
    if (nav.toRoot()) {
        return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);
    }
    var startingPosition = findStartingPosition(nav, urlTree, route);
    var segmentGroup = startingPosition.processChildren ?
        updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) :
        updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);
    return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);
}
function isMatrixParams(command) {
    return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;
}
function tree(oldSegmentGroup, newSegmentGroup, urlTree, queryParams, fragment) {
    var qp = {};
    if (queryParams) {
        forEach(queryParams, function (value, name) {
            qp[name] = Array.isArray(value) ? value.map(function (v) { return "" + v; }) : "" + value;
        });
    }
    if (urlTree.root === oldSegmentGroup) {
        return new UrlTree(newSegmentGroup, qp, fragment);
    }
    return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);
}
function replaceSegment(current, oldSegment, newSegment) {
    var children = {};
    forEach(current.children, function (c, outletName) {
        if (c === oldSegment) {
            children[outletName] = newSegment;
        }
        else {
            children[outletName] = replaceSegment(c, oldSegment, newSegment);
        }
    });
    return new UrlSegmentGroup(current.segments, children);
}
var Navigation = /** @class */ (function () {
    function Navigation(isAbsolute, numberOfDoubleDots, commands) {
        this.isAbsolute = isAbsolute;
        this.numberOfDoubleDots = numberOfDoubleDots;
        this.commands = commands;
        if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {
            throw new Error('Root segment cannot have matrix parameters');
        }
        var cmdWithOutlet = commands.find(function (c) { return typeof c === 'object' && c != null && c.outlets; });
        if (cmdWithOutlet && cmdWithOutlet !== last$1(commands)) {
            throw new Error('{outlets:{}} has to be the last command');
        }
    }
    Navigation.prototype.toRoot = function () {
        return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';
    };
    return Navigation;
}());
/** Transforms commands to a normalized `Navigation` */
function computeNavigation(commands) {
    if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {
        return new Navigation(true, 0, commands);
    }
    var numberOfDoubleDots = 0;
    var isAbsolute = false;
    var res = commands.reduce(function (res, cmd, cmdIdx) {
        if (typeof cmd === 'object' && cmd != null) {
            if (cmd.outlets) {
                var outlets_1 = {};
                forEach(cmd.outlets, function (commands, name) {
                    outlets_1[name] = typeof commands === 'string' ? commands.split('/') : commands;
                });
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(res, [{ outlets: outlets_1 }]);
            }
            if (cmd.segmentPath) {
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(res, [cmd.segmentPath]);
            }
        }
        if (!(typeof cmd === 'string')) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(res, [cmd]);
        }
        if (cmdIdx === 0) {
            cmd.split('/').forEach(function (urlPart, partIndex) {
                if (partIndex == 0 && urlPart === '.') ;
                else if (partIndex == 0 && urlPart === '') { //  '/a'
                    isAbsolute = true;
                }
                else if (urlPart === '..') { //  '../a'
                    numberOfDoubleDots++;
                }
                else if (urlPart != '') {
                    res.push(urlPart);
                }
            });
            return res;
        }
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(res, [cmd]);
    }, []);
    return new Navigation(isAbsolute, numberOfDoubleDots, res);
}
var Position = /** @class */ (function () {
    function Position(segmentGroup, processChildren, index) {
        this.segmentGroup = segmentGroup;
        this.processChildren = processChildren;
        this.index = index;
    }
    return Position;
}());
function findStartingPosition(nav, tree, route) {
    if (nav.isAbsolute) {
        return new Position(tree.root, true, 0);
    }
    if (route.snapshot._lastPathIndex === -1) {
        return new Position(route.snapshot._urlSegment, true, 0);
    }
    var modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;
    var index = route.snapshot._lastPathIndex + modifier;
    return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots);
}
function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {
    var g = group;
    var ci = index;
    var dd = numberOfDoubleDots;
    while (dd > ci) {
        dd -= ci;
        g = g.parent;
        if (!g) {
            throw new Error('Invalid number of \'../\'');
        }
        ci = g.segments.length;
    }
    return new Position(g, false, ci - dd);
}
function getPath(command) {
    if (typeof command === 'object' && command != null && command.outlets) {
        return command.outlets[PRIMARY_OUTLET];
    }
    return "" + command;
}
function getOutlets(commands) {
    var _a, _b;
    if (!(typeof commands[0] === 'object'))
        return _a = {}, _a[PRIMARY_OUTLET] = commands, _a;
    if (commands[0].outlets === undefined)
        return _b = {}, _b[PRIMARY_OUTLET] = commands, _b;
    return commands[0].outlets;
}
function updateSegmentGroup(segmentGroup, startIndex, commands) {
    if (!segmentGroup) {
        segmentGroup = new UrlSegmentGroup([], {});
    }
    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {
        return updateSegmentGroupChildren(segmentGroup, startIndex, commands);
    }
    var m = prefixedWith(segmentGroup, startIndex, commands);
    var slicedCommands = commands.slice(m.commandIndex);
    if (m.match && m.pathIndex < segmentGroup.segments.length) {
        var g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});
        g.children[PRIMARY_OUTLET] =
            new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);
        return updateSegmentGroupChildren(g, 0, slicedCommands);
    }
    else if (m.match && slicedCommands.length === 0) {
        return new UrlSegmentGroup(segmentGroup.segments, {});
    }
    else if (m.match && !segmentGroup.hasChildren()) {
        return createNewSegmentGroup(segmentGroup, startIndex, commands);
    }
    else if (m.match) {
        return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);
    }
    else {
        return createNewSegmentGroup(segmentGroup, startIndex, commands);
    }
}
function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {
    if (commands.length === 0) {
        return new UrlSegmentGroup(segmentGroup.segments, {});
    }
    else {
        var outlets_2 = getOutlets(commands);
        var children_1 = {};
        forEach(outlets_2, function (commands, outlet) {
            if (commands !== null) {
                children_1[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);
            }
        });
        forEach(segmentGroup.children, function (child, childOutlet) {
            if (outlets_2[childOutlet] === undefined) {
                children_1[childOutlet] = child;
            }
        });
        return new UrlSegmentGroup(segmentGroup.segments, children_1);
    }
}
function prefixedWith(segmentGroup, startIndex, commands) {
    var currentCommandIndex = 0;
    var currentPathIndex = startIndex;
    var noMatch = { match: false, pathIndex: 0, commandIndex: 0 };
    while (currentPathIndex < segmentGroup.segments.length) {
        if (currentCommandIndex >= commands.length)
            return noMatch;
        var path = segmentGroup.segments[currentPathIndex];
        var curr = getPath(commands[currentCommandIndex]);
        var next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;
        if (currentPathIndex > 0 && curr === undefined)
            break;
        if (curr && next && (typeof next === 'object') && next.outlets === undefined) {
            if (!compare(curr, next, path))
                return noMatch;
            currentCommandIndex += 2;
        }
        else {
            if (!compare(curr, {}, path))
                return noMatch;
            currentCommandIndex++;
        }
        currentPathIndex++;
    }
    return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex };
}
function createNewSegmentGroup(segmentGroup, startIndex, commands) {
    var paths = segmentGroup.segments.slice(0, startIndex);
    var i = 0;
    while (i < commands.length) {
        if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {
            var children = createNewSegmentChildren(commands[i].outlets);
            return new UrlSegmentGroup(paths, children);
        }
        // if we start with an object literal, we need to reuse the path part from the segment
        if (i === 0 && isMatrixParams(commands[0])) {
            var p = segmentGroup.segments[startIndex];
            paths.push(new UrlSegment(p.path, commands[0]));
            i++;
            continue;
        }
        var curr = getPath(commands[i]);
        var next = (i < commands.length - 1) ? commands[i + 1] : null;
        if (curr && next && isMatrixParams(next)) {
            paths.push(new UrlSegment(curr, stringify(next)));
            i += 2;
        }
        else {
            paths.push(new UrlSegment(curr, {}));
            i++;
        }
    }
    return new UrlSegmentGroup(paths, {});
}
function createNewSegmentChildren(outlets) {
    var children = {};
    forEach(outlets, function (commands, outlet) {
        if (commands !== null) {
            children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);
        }
    });
    return children;
}
function stringify(params) {
    var res = {};
    forEach(params, function (v, k) { return res[k] = "" + v; });
    return res;
}
function compare(path, params, segment) {
    return path == segment.path && shallowEqual(params, segment.parameters);
}

/**
 * @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 activateRoutes = function (rootContexts, routeReuseStrategy, forwardEvent) {
    return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (t) {
        new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent)
            .activate(rootContexts);
        return t;
    });
};
var ActivateRoutes = /** @class */ (function () {
    function ActivateRoutes(routeReuseStrategy, futureState, currState, forwardEvent) {
        this.routeReuseStrategy = routeReuseStrategy;
        this.futureState = futureState;
        this.currState = currState;
        this.forwardEvent = forwardEvent;
    }
    ActivateRoutes.prototype.activate = function (parentContexts) {
        var futureRoot = this.futureState._root;
        var currRoot = this.currState ? this.currState._root : null;
        this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);
        advanceActivatedRoute(this.futureState.root);
        this.activateChildRoutes(futureRoot, currRoot, parentContexts);
    };
    // De-activate the child route that are not re-used for the future state
    ActivateRoutes.prototype.deactivateChildRoutes = function (futureNode, currNode, contexts) {
        var _this = this;
        var children = nodeChildrenAsMap(currNode);
        // Recurse on the routes active in the future state to de-activate deeper children
        futureNode.children.forEach(function (futureChild) {
            var childOutletName = futureChild.value.outlet;
            _this.deactivateRoutes(futureChild, children[childOutletName], contexts);
            delete children[childOutletName];
        });
        // De-activate the routes that will not be re-used
        forEach(children, function (v, childName) {
            _this.deactivateRouteAndItsChildren(v, contexts);
        });
    };
    ActivateRoutes.prototype.deactivateRoutes = function (futureNode, currNode, parentContext) {
        var future = futureNode.value;
        var curr = currNode ? currNode.value : null;
        if (future === curr) {
            // Reusing the node, check to see if the children need to be de-activated
            if (future.component) {
                // If we have a normal route, we need to go through an outlet.
                var context = parentContext.getContext(future.outlet);
                if (context) {
                    this.deactivateChildRoutes(futureNode, currNode, context.children);
                }
            }
            else {
                // if we have a componentless route, we recurse but keep the same outlet map.
                this.deactivateChildRoutes(futureNode, currNode, parentContext);
            }
        }
        else {
            if (curr) {
                // Deactivate the current route which will not be re-used
                this.deactivateRouteAndItsChildren(currNode, parentContext);
            }
        }
    };
    ActivateRoutes.prototype.deactivateRouteAndItsChildren = function (route, parentContexts) {
        if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {
            this.detachAndStoreRouteSubtree(route, parentContexts);
        }
        else {
            this.deactivateRouteAndOutlet(route, parentContexts);
        }
    };
    ActivateRoutes.prototype.detachAndStoreRouteSubtree = function (route, parentContexts) {
        var context = parentContexts.getContext(route.value.outlet);
        if (context && context.outlet) {
            var componentRef = context.outlet.detach();
            var contexts = context.children.onOutletDeactivated();
            this.routeReuseStrategy.store(route.value.snapshot, { componentRef: componentRef, route: route, contexts: contexts });
        }
    };
    ActivateRoutes.prototype.deactivateRouteAndOutlet = function (route, parentContexts) {
        var _this = this;
        var context = parentContexts.getContext(route.value.outlet);
        if (context) {
            var children = nodeChildrenAsMap(route);
            var contexts_1 = route.value.component ? context.children : parentContexts;
            forEach(children, function (v, k) { return _this.deactivateRouteAndItsChildren(v, contexts_1); });
            if (context.outlet) {
                // Destroy the component
                context.outlet.deactivate();
                // Destroy the contexts for all the outlets that were in the component
                context.children.onOutletDeactivated();
            }
        }
    };
    ActivateRoutes.prototype.activateChildRoutes = function (futureNode, currNode, contexts) {
        var _this = this;
        var children = nodeChildrenAsMap(currNode);
        futureNode.children.forEach(function (c) {
            _this.activateRoutes(c, children[c.value.outlet], contexts);
            _this.forwardEvent(new ActivationEnd(c.value.snapshot));
        });
        if (futureNode.children.length) {
            this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));
        }
    };
    ActivateRoutes.prototype.activateRoutes = function (futureNode, currNode, parentContexts) {
        var future = futureNode.value;
        var curr = currNode ? currNode.value : null;
        advanceActivatedRoute(future);
        // reusing the node
        if (future === curr) {
            if (future.component) {
                // If we have a normal route, we need to go through an outlet.
                var context = parentContexts.getOrCreateContext(future.outlet);
                this.activateChildRoutes(futureNode, currNode, context.children);
            }
            else {
                // if we have a componentless route, we recurse but keep the same outlet map.
                this.activateChildRoutes(futureNode, currNode, parentContexts);
            }
        }
        else {
            if (future.component) {
                // if we have a normal route, we need to place the component into the outlet and recurse.
                var context = parentContexts.getOrCreateContext(future.outlet);
                if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {
                    var stored = this.routeReuseStrategy.retrieve(future.snapshot);
                    this.routeReuseStrategy.store(future.snapshot, null);
                    context.children.onOutletReAttached(stored.contexts);
                    context.attachRef = stored.componentRef;
                    context.route = stored.route.value;
                    if (context.outlet) {
                        // Attach right away when the outlet has already been instantiated
                        // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated
                        context.outlet.attach(stored.componentRef, stored.route.value);
                    }
                    advanceActivatedRouteNodeAndItsChildren(stored.route);
                }
                else {
                    var config = parentLoadedConfig(future.snapshot);
                    var cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;
                    context.attachRef = null;
                    context.route = future;
                    context.resolver = cmpFactoryResolver;
                    if (context.outlet) {
                        // Activate the outlet when it has already been instantiated
                        // Otherwise it will get activated from its `ngOnInit` when instantiated
                        context.outlet.activateWith(future, cmpFactoryResolver);
                    }
                    this.activateChildRoutes(futureNode, null, context.children);
                }
            }
            else {
                // if we have a componentless route, we recurse but keep the same outlet map.
                this.activateChildRoutes(futureNode, null, parentContexts);
            }
        }
    };
    return ActivateRoutes;
}());
function advanceActivatedRouteNodeAndItsChildren(node) {
    advanceActivatedRoute(node.value);
    node.children.forEach(advanceActivatedRouteNodeAndItsChildren);
}
function parentLoadedConfig(snapshot) {
    for (var s = snapshot.parent; s; s = s.parent) {
        var route = s.routeConfig;
        if (route && route._loadedConfig)
            return route._loadedConfig;
        if (route && route.component)
            return null;
    }
    return null;
}

/**
 * @license
 * Copyright Google 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 NoMatch = /** @class */ (function () {
    function NoMatch(segmentGroup) {
        this.segmentGroup = segmentGroup || null;
    }
    return NoMatch;
}());
var AbsoluteRedirect = /** @class */ (function () {
    function AbsoluteRedirect(urlTree) {
        this.urlTree = urlTree;
    }
    return AbsoluteRedirect;
}());
function noMatch(segmentGroup) {
    return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) { return obs.error(new NoMatch(segmentGroup)); });
}
function absoluteRedirect(newTree) {
    return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) { return obs.error(new AbsoluteRedirect(newTree)); });
}
function namedOutletsRedirect(redirectTo) {
    return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) { return obs.error(new Error("Only absolute redirects can have named outlets. redirectTo: '" + redirectTo + "'")); });
}
function canLoadFails(route) {
    return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) { return obs.error(navigationCancelingError("Cannot load children because the guard of the route \"path: '" + route.path + "'\" returned false")); });
}
/**
 * Returns the `UrlTree` with the redirection applied.
 *
 * Lazy modules are loaded along the way.
 */
function applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {
    return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();
}
var ApplyRedirects = /** @class */ (function () {
    function ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {
        this.configLoader = configLoader;
        this.urlSerializer = urlSerializer;
        this.urlTree = urlTree;
        this.config = config;
        this.allowRedirects = true;
        this.ngModule = moduleInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]);
    }
    ApplyRedirects.prototype.apply = function () {
        var _this = this;
        var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);
        var urlTrees$ = expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (rootSegmentGroup) { return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, _this.urlTree.fragment); }));
        return urlTrees$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e) {
            if (e instanceof AbsoluteRedirect) {
                // after an absolute redirect we do not apply any more redirects!
                _this.allowRedirects = false;
                // we need to run matching, so we can fetch all lazy-loaded modules
                return _this.match(e.urlTree);
            }
            if (e instanceof NoMatch) {
                throw _this.noMatchError(e);
            }
            throw e;
        }));
    };
    ApplyRedirects.prototype.match = function (tree) {
        var _this = this;
        var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);
        var mapped$ = expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (rootSegmentGroup) {
            return _this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment);
        }));
        return mapped$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e) {
            if (e instanceof NoMatch) {
                throw _this.noMatchError(e);
            }
            throw e;
        }));
    };
    ApplyRedirects.prototype.noMatchError = function (e) {
        return new Error("Cannot match any routes. URL Segment: '" + e.segmentGroup + "'");
    };
    ApplyRedirects.prototype.createUrlTree = function (rootCandidate, queryParams, fragment) {
        var _a;
        var root = rootCandidate.segments.length > 0 ?
            new UrlSegmentGroup([], (_a = {}, _a[PRIMARY_OUTLET] = rootCandidate, _a)) :
            rootCandidate;
        return new UrlTree(root, queryParams, fragment);
    };
    ApplyRedirects.prototype.expandSegmentGroup = function (ngModule, routes, segmentGroup, outlet) {
        if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {
            return this.expandChildren(ngModule, routes, segmentGroup)
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (children) { return new UrlSegmentGroup([], children); }));
        }
        return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);
    };
    // Recursively expand segment groups for all the child outlets
    ApplyRedirects.prototype.expandChildren = function (ngModule, routes, segmentGroup) {
        var _this = this;
        return waitForMap(segmentGroup.children, function (childOutlet, child) { return _this.expandSegmentGroup(ngModule, routes, child, childOutlet); });
    };
    ApplyRedirects.prototype.expandSegment = function (ngModule, segmentGroup, routes, segments, outlet, allowRedirects) {
        var _this = this;
        return rxjs__WEBPACK_IMPORTED_MODULE_2__["of"].apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(routes)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (r) {
            var expanded$ = _this.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);
            return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e) {
                if (e instanceof NoMatch) {
                    // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -
                    // talk to Jason
                    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null);
                }
                throw e;
            }));
        }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatAll"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])(function (s) { return !!s; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e, _) {
            if (e instanceof rxjs__WEBPACK_IMPORTED_MODULE_2__["EmptyError"] || e.name === 'EmptyError') {
                if (_this.noLeftoversInUrl(segmentGroup, segments, outlet)) {
                    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup([], {}));
                }
                throw new NoMatch(segmentGroup);
            }
            throw e;
        }));
    };
    ApplyRedirects.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {
        return segments.length === 0 && !segmentGroup.children[outlet];
    };
    ApplyRedirects.prototype.expandSegmentAgainstRoute = function (ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) {
        if (getOutlet(route) !== outlet) {
            return noMatch(segmentGroup);
        }
        if (route.redirectTo === undefined) {
            return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);
        }
        if (allowRedirects && this.allowRedirects) {
            return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet);
        }
        return noMatch(segmentGroup);
    };
    ApplyRedirects.prototype.expandSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {
        if (route.path === '**') {
            return this.expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet);
        }
        return this.expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet);
    };
    ApplyRedirects.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect = function (ngModule, routes, route, outlet) {
        var _this = this;
        var newTree = this.applyRedirectCommands([], route.redirectTo, {});
        if (route.redirectTo.startsWith('/')) {
            return absoluteRedirect(newTree);
        }
        return this.lineralizeSegments(route, newTree).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (newSegments) {
            var group = new UrlSegmentGroup(newSegments, {});
            return _this.expandSegment(ngModule, group, routes, newSegments, outlet, false);
        }));
    };
    ApplyRedirects.prototype.expandRegularSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {
        var _this = this;
        var _a = match(segmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild, positionalParamSegments = _a.positionalParamSegments;
        if (!matched)
            return noMatch(segmentGroup);
        var newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);
        if (route.redirectTo.startsWith('/')) {
            return absoluteRedirect(newTree);
        }
        return this.lineralizeSegments(route, newTree).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (newSegments) {
            return _this.expandSegment(ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet, false);
        }));
    };
    ApplyRedirects.prototype.matchSegmentAgainstRoute = function (ngModule, rawSegmentGroup, route, segments) {
        var _this = this;
        if (route.path === '**') {
            if (route.loadChildren) {
                return this.configLoader.load(ngModule.injector, route)
                    .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (cfg) {
                    route._loadedConfig = cfg;
                    return new UrlSegmentGroup(segments, {});
                }));
            }
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup(segments, {}));
        }
        var _a = match(rawSegmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild;
        if (!matched)
            return noMatch(rawSegmentGroup);
        var rawSlicedSegments = segments.slice(lastChild);
        var childConfig$ = this.getChildConfig(ngModule, route, segments);
        return childConfig$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (routerConfig) {
            var childModule = routerConfig.module;
            var childConfig = routerConfig.routes;
            var _a = split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;
            if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {
                var expanded$_1 = _this.expandChildren(childModule, childConfig, segmentGroup);
                return expanded$_1.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (children) { return new UrlSegmentGroup(consumedSegments, children); }));
            }
            if (childConfig.length === 0 && slicedSegments.length === 0) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup(consumedSegments, {}));
            }
            var expanded$ = _this.expandSegment(childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);
            return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (cs) {
                return new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children);
            }));
        }));
    };
    ApplyRedirects.prototype.getChildConfig = function (ngModule, route, segments) {
        var _this = this;
        if (route.children) {
            // The children belong to the same module
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new LoadedRouterConfig(route.children, ngModule));
        }
        if (route.loadChildren) {
            // lazy children belong to the loaded module
            if (route._loadedConfig !== undefined) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(route._loadedConfig);
            }
            return runCanLoadGuard(ngModule.injector, route, segments)
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (shouldLoad) {
                if (shouldLoad) {
                    return _this.configLoader.load(ngModule.injector, route)
                        .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (cfg) {
                        route._loadedConfig = cfg;
                        return cfg;
                    }));
                }
                return canLoadFails(route);
            }));
        }
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new LoadedRouterConfig([], ngModule));
    };
    ApplyRedirects.prototype.lineralizeSegments = function (route, urlTree) {
        var res = [];
        var c = urlTree.root;
        while (true) {
            res = res.concat(c.segments);
            if (c.numberOfChildren === 0) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(res);
            }
            if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {
                return namedOutletsRedirect(route.redirectTo);
            }
            c = c.children[PRIMARY_OUTLET];
        }
    };
    ApplyRedirects.prototype.applyRedirectCommands = function (segments, redirectTo, posParams) {
        return this.applyRedirectCreatreUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);
    };
    ApplyRedirects.prototype.applyRedirectCreatreUrlTree = function (redirectTo, urlTree, segments, posParams) {
        var newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);
        return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);
    };
    ApplyRedirects.prototype.createQueryParams = function (redirectToParams, actualParams) {
        var res = {};
        forEach(redirectToParams, function (v, k) {
            var copySourceValue = typeof v === 'string' && v.startsWith(':');
            if (copySourceValue) {
                var sourceName = v.substring(1);
                res[k] = actualParams[sourceName];
            }
            else {
                res[k] = v;
            }
        });
        return res;
    };
    ApplyRedirects.prototype.createSegmentGroup = function (redirectTo, group, segments, posParams) {
        var _this = this;
        var updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);
        var children = {};
        forEach(group.children, function (child, name) {
            children[name] = _this.createSegmentGroup(redirectTo, child, segments, posParams);
        });
        return new UrlSegmentGroup(updatedSegments, children);
    };
    ApplyRedirects.prototype.createSegments = function (redirectTo, redirectToSegments, actualSegments, posParams) {
        var _this = this;
        return redirectToSegments.map(function (s) { return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :
            _this.findOrReturn(s, actualSegments); });
    };
    ApplyRedirects.prototype.findPosParam = function (redirectTo, redirectToUrlSegment, posParams) {
        var pos = posParams[redirectToUrlSegment.path.substring(1)];
        if (!pos)
            throw new Error("Cannot redirect to '" + redirectTo + "'. Cannot find '" + redirectToUrlSegment.path + "'.");
        return pos;
    };
    ApplyRedirects.prototype.findOrReturn = function (redirectToUrlSegment, actualSegments) {
        var e_1, _a;
        var idx = 0;
        try {
            for (var actualSegments_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(actualSegments), actualSegments_1_1 = actualSegments_1.next(); !actualSegments_1_1.done; actualSegments_1_1 = actualSegments_1.next()) {
                var s = actualSegments_1_1.value;
                if (s.path === redirectToUrlSegment.path) {
                    actualSegments.splice(idx);
                    return s;
                }
                idx++;
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (actualSegments_1_1 && !actualSegments_1_1.done && (_a = actualSegments_1.return)) _a.call(actualSegments_1);
            }
            finally { if (e_1) throw e_1.error; }
        }
        return redirectToUrlSegment;
    };
    return ApplyRedirects;
}());
function runCanLoadGuard(moduleInjector, route, segments) {
    var canLoad = route.canLoad;
    if (!canLoad || canLoad.length === 0)
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
    var obs = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(canLoad).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (injectionToken) {
        var guard = moduleInjector.get(injectionToken);
        return wrapIntoObservable(guard.canLoad ? guard.canLoad(route, segments) : guard(route, segments));
    }));
    return andObservables(obs);
}
function match(segmentGroup, route, segments) {
    if (route.path === '') {
        if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {
            return { matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };
        }
        return { matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };
    }
    var matcher = route.matcher || defaultUrlMatcher;
    var res = matcher(segments, segmentGroup, route);
    if (!res) {
        return {
            matched: false,
            consumedSegments: [],
            lastChild: 0,
            positionalParamSegments: {},
        };
    }
    return {
        matched: true,
        consumedSegments: res.consumed,
        lastChild: res.consumed.length,
        positionalParamSegments: res.posParams,
    };
}
function split(segmentGroup, consumedSegments, slicedSegments, config) {
    if (slicedSegments.length > 0 &&
        containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {
        var s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptySegments(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));
        return { segmentGroup: mergeTrivialChildren(s), slicedSegments: [] };
    }
    if (slicedSegments.length === 0 &&
        containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {
        var s = new UrlSegmentGroup(segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children));
        return { segmentGroup: mergeTrivialChildren(s), slicedSegments: slicedSegments };
    }
    return { segmentGroup: segmentGroup, slicedSegments: slicedSegments };
}
function mergeTrivialChildren(s) {
    if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {
        var c = s.children[PRIMARY_OUTLET];
        return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);
    }
    return s;
}
function addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, routes, children) {
    var e_2, _a;
    var res = {};
    try {
        for (var routes_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {
            var r = routes_1_1.value;
            if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {
                res[getOutlet(r)] = new UrlSegmentGroup([], {});
            }
        }
    }
    catch (e_2_1) { e_2 = { error: e_2_1 }; }
    finally {
        try {
            if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);
        }
        finally { if (e_2) throw e_2.error; }
    }
    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, children, res);
}
function createChildrenForEmptySegments(routes, primarySegmentGroup) {
    var e_3, _a;
    var res = {};
    res[PRIMARY_OUTLET] = primarySegmentGroup;
    try {
        for (var routes_2 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {
            var r = routes_2_1.value;
            if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {
                res[getOutlet(r)] = new UrlSegmentGroup([], {});
            }
        }
    }
    catch (e_3_1) { e_3 = { error: e_3_1 }; }
    finally {
        try {
            if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);
        }
        finally { if (e_3) throw e_3.error; }
    }
    return res;
}
function containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, segments, routes) {
    return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET; });
}
function containsEmptyPathRedirects(segmentGroup, segments, routes) {
    return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r); });
}
function isEmptyPathRedirect(segmentGroup, segments, r) {
    if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {
        return false;
    }
    return r.path === '' && r.redirectTo !== undefined;
}
function getOutlet(route) {
    return route.outlet || PRIMARY_OUTLET;
}

/**
 * @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 applyRedirects$1(moduleInjector, configLoader, urlSerializer, config) {
    return function (source) {
        return source.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) { return applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (urlAfterRedirects) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, t, { urlAfterRedirects: urlAfterRedirects })); })); }));
    };
}

/**
 * @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 CanActivate = /** @class */ (function () {
    function CanActivate(path) {
        this.path = path;
        this.route = this.path[this.path.length - 1];
    }
    return CanActivate;
}());
var CanDeactivate = /** @class */ (function () {
    function CanDeactivate(component, route) {
        this.component = component;
        this.route = route;
    }
    return CanDeactivate;
}());
function getAllRouteGuards(future, curr, parentContexts) {
    var futureRoot = future._root;
    var currRoot = curr ? curr._root : null;
    return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);
}
function getCanActivateChild(p) {
    var canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;
    if (!canActivateChild || canActivateChild.length === 0)
        return null;
    return { node: p, guards: canActivateChild };
}
function getToken(token, snapshot, moduleInjector) {
    var config = getClosestLoadedConfig(snapshot);
    var injector = config ? config.module.injector : moduleInjector;
    return injector.get(token);
}
function getClosestLoadedConfig(snapshot) {
    if (!snapshot)
        return null;
    for (var s = snapshot.parent; s; s = s.parent) {
        var route = s.routeConfig;
        if (route && route._loadedConfig)
            return route._loadedConfig;
    }
    return null;
}
function getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks) {
    if (checks === void 0) { checks = {
        canDeactivateChecks: [],
        canActivateChecks: []
    }; }
    var prevChildren = nodeChildrenAsMap(currNode);
    // Process the children of the future route
    futureNode.children.forEach(function (c) {
        getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);
        delete prevChildren[c.value.outlet];
    });
    // Process any children left from the current route (not active for the future route)
    forEach(prevChildren, function (v, k) {
        return deactivateRouteAndItsChildren(v, contexts.getContext(k), checks);
    });
    return checks;
}
function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks) {
    if (checks === void 0) { checks = {
        canDeactivateChecks: [],
        canActivateChecks: []
    }; }
    var future = futureNode.value;
    var curr = currNode ? currNode.value : null;
    var context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;
    // reusing the node
    if (curr && future.routeConfig === curr.routeConfig) {
        var shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);
        if (shouldRun) {
            checks.canActivateChecks.push(new CanActivate(futurePath));
        }
        else {
            // we need to set the data
            future.data = curr.data;
            future._resolvedData = curr._resolvedData;
        }
        // If we have a component, we need to go through an outlet.
        if (future.component) {
            getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);
            // if we have a componentless route, we recurse but keep the same outlet map.
        }
        else {
            getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);
        }
        if (shouldRun) {
            var component = context && context.outlet && context.outlet.component || null;
            checks.canDeactivateChecks.push(new CanDeactivate(component, curr));
        }
    }
    else {
        if (curr) {
            deactivateRouteAndItsChildren(currNode, context, checks);
        }
        checks.canActivateChecks.push(new CanActivate(futurePath));
        // If we have a component, we need to go through an outlet.
        if (future.component) {
            getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);
            // if we have a componentless route, we recurse but keep the same outlet map.
        }
        else {
            getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);
        }
    }
    return checks;
}
function shouldRunGuardsAndResolvers(curr, future, mode) {
    switch (mode) {
        case 'always':
            return true;
        case 'paramsOrQueryParamsChange':
            return !equalParamsAndUrlSegments(curr, future) ||
                !shallowEqual(curr.queryParams, future.queryParams);
        case 'paramsChange':
        default:
            return !equalParamsAndUrlSegments(curr, future);
    }
}
function deactivateRouteAndItsChildren(route, context, checks) {
    var children = nodeChildrenAsMap(route);
    var r = route.value;
    forEach(children, function (node, childName) {
        if (!r.component) {
            deactivateRouteAndItsChildren(node, context, checks);
        }
        else if (context) {
            deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);
        }
        else {
            deactivateRouteAndItsChildren(node, null, checks);
        }
    });
    if (!r.component) {
        checks.canDeactivateChecks.push(new CanDeactivate(null, r));
    }
    else if (context && context.outlet && context.outlet.isActivated) {
        checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));
    }
    else {
        checks.canDeactivateChecks.push(new CanDeactivate(null, r));
    }
}

/**
 * @license
 * Copyright Google 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 checkGuards(moduleInjector, forwardEvent) {
    return function (source) {
        return source.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (t) {
            var targetSnapshot = t.targetSnapshot, currentSnapshot = t.currentSnapshot, _a = t.guards, canActivateChecks = _a.canActivateChecks, canDeactivateChecks = _a.canDeactivateChecks;
            if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, t, { guardsResult: true }));
            }
            return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector)
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (canDeactivate) {
                return canDeactivate ?
                    runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) :
                    Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(false);
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (guardsResult) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, t, { guardsResult: guardsResult })); }));
        }));
    };
}
function runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) {
    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(checks).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (check) {
        return runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector);
    }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["every"])(function (result) { return result === true; }));
}
function runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) {
    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(checks).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(function (check) { return andObservables(Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])([
        fireChildActivationStart(check.route.parent, forwardEvent),
        fireActivationStart(check.route, forwardEvent),
        runCanActivateChild(futureSnapshot, check.path, moduleInjector),
        runCanActivate(futureSnapshot, check.route, moduleInjector)
    ])); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["every"])(function (result) { return result === true; }));
}
/**
   * This should fire off `ActivationStart` events for each route being activated at this
   * level.
   * In other words, if you're activating `a` and `b` below, `path` will contain the
   * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always
   * return
   * `true` so checks continue to run.
   */
function fireActivationStart(snapshot, forwardEvent) {
    if (snapshot !== null && forwardEvent) {
        forwardEvent(new ActivationStart(snapshot));
    }
    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
}
/**
   * This should fire off `ChildActivationStart` events for each route being activated at this
   * level.
   * In other words, if you're activating `a` and `b` below, `path` will contain the
   * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always
   * return
   * `true` so checks continue to run.
   */
function fireChildActivationStart(snapshot, forwardEvent) {
    if (snapshot !== null && forwardEvent) {
        forwardEvent(new ChildActivationStart(snapshot));
    }
    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
}
function runCanActivate(futureRSS, futureARS, moduleInjector) {
    var canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;
    if (!canActivate || canActivate.length === 0)
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
    var obs = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(canActivate).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (c) {
        var guard = getToken(c, futureARS, moduleInjector);
        var observable;
        if (guard.canActivate) {
            observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));
        }
        else {
            observable = wrapIntoObservable(guard(futureARS, futureRSS));
        }
        return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])());
    }));
    return andObservables(obs);
}
function runCanActivateChild(futureRSS, path, moduleInjector) {
    var futureARS = path[path.length - 1];
    var canActivateChildGuards = path.slice(0, path.length - 1)
        .reverse()
        .map(function (p) { return getCanActivateChild(p); })
        .filter(function (_) { return _ !== null; });
    return andObservables(Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(canActivateChildGuards).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (d) {
        var obs = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(d.guards).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (c) {
            var guard = getToken(c, d.node, moduleInjector);
            var observable;
            if (guard.canActivateChild) {
                observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));
            }
            else {
                observable = wrapIntoObservable(guard(futureARS, futureRSS));
            }
            return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])());
        }));
        return andObservables(obs);
    })));
}
function runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector) {
    var canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;
    if (!canDeactivate || canDeactivate.length === 0)
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
    var canDeactivate$ = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(canDeactivate).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (c) {
        var guard = getToken(c, currARS, moduleInjector);
        var observable;
        if (guard.canDeactivate) {
            observable = wrapIntoObservable(guard.canDeactivate(component, currARS, currRSS, futureRSS));
        }
        else {
            observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));
        }
        return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])());
    }));
    return canDeactivate$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["every"])(function (result) { return result === true; }));
}

/**
 * @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 NoMatch$1 = /** @class */ (function () {
    function NoMatch() {
    }
    return NoMatch;
}());
function recognize(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {
    if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }
    if (relativeLinkResolution === void 0) { relativeLinkResolution = 'legacy'; }
    return new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution)
        .recognize();
}
var Recognizer = /** @class */ (function () {
    function Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {
        this.rootComponentType = rootComponentType;
        this.config = config;
        this.urlTree = urlTree;
        this.url = url;
        this.paramsInheritanceStrategy = paramsInheritanceStrategy;
        this.relativeLinkResolution = relativeLinkResolution;
    }
    Recognizer.prototype.recognize = function () {
        try {
            var rootSegmentGroup = split$1(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;
            var children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);
            var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});
            var rootNode = new TreeNode(root, children);
            var routeState = new RouterStateSnapshot(this.url, rootNode);
            this.inheritParamsAndData(routeState._root);
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(routeState);
        }
        catch (e) {
            return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) { return obs.error(e); });
        }
    };
    Recognizer.prototype.inheritParamsAndData = function (routeNode) {
        var _this = this;
        var route = routeNode.value;
        var i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);
        route.params = Object.freeze(i.params);
        route.data = Object.freeze(i.data);
        routeNode.children.forEach(function (n) { return _this.inheritParamsAndData(n); });
    };
    Recognizer.prototype.processSegmentGroup = function (config, segmentGroup, outlet) {
        if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {
            return this.processChildren(config, segmentGroup);
        }
        return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);
    };
    Recognizer.prototype.processChildren = function (config, segmentGroup) {
        var _this = this;
        var children = mapChildrenIntoArray(segmentGroup, function (child, childOutlet) { return _this.processSegmentGroup(config, child, childOutlet); });
        checkOutletNameUniqueness(children);
        sortActivatedRouteSnapshots(children);
        return children;
    };
    Recognizer.prototype.processSegment = function (config, segmentGroup, segments, outlet) {
        var e_1, _a;
        try {
            for (var config_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(config), config_1_1 = config_1.next(); !config_1_1.done; config_1_1 = config_1.next()) {
                var r = config_1_1.value;
                try {
                    return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);
                }
                catch (e) {
                    if (!(e instanceof NoMatch$1))
                        throw e;
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (config_1_1 && !config_1_1.done && (_a = config_1.return)) _a.call(config_1);
            }
            finally { if (e_1) throw e_1.error; }
        }
        if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {
            return [];
        }
        throw new NoMatch$1();
    };
    Recognizer.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {
        return segments.length === 0 && !segmentGroup.children[outlet];
    };
    Recognizer.prototype.processSegmentAgainstRoute = function (route, rawSegment, segments, outlet) {
        if (route.redirectTo)
            throw new NoMatch$1();
        if ((route.outlet || PRIMARY_OUTLET) !== outlet)
            throw new NoMatch$1();
        var snapshot;
        var consumedSegments = [];
        var rawSlicedSegments = [];
        if (route.path === '**') {
            var params = segments.length > 0 ? last$1(segments).parameters : {};
            snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route));
        }
        else {
            var result = match$1(rawSegment, route, segments);
            consumedSegments = result.consumedSegments;
            rawSlicedSegments = segments.slice(result.lastChild);
            snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));
        }
        var childConfig = getChildConfig(route);
        var _a = split$1(rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;
        if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {
            var children_1 = this.processChildren(childConfig, segmentGroup);
            return [new TreeNode(snapshot, children_1)];
        }
        if (childConfig.length === 0 && slicedSegments.length === 0) {
            return [new TreeNode(snapshot, [])];
        }
        var children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);
        return [new TreeNode(snapshot, children)];
    };
    return Recognizer;
}());
function sortActivatedRouteSnapshots(nodes) {
    nodes.sort(function (a, b) {
        if (a.value.outlet === PRIMARY_OUTLET)
            return -1;
        if (b.value.outlet === PRIMARY_OUTLET)
            return 1;
        return a.value.outlet.localeCompare(b.value.outlet);
    });
}
function getChildConfig(route) {
    if (route.children) {
        return route.children;
    }
    if (route.loadChildren) {
        return route._loadedConfig.routes;
    }
    return [];
}
function match$1(segmentGroup, route, segments) {
    if (route.path === '') {
        if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {
            throw new NoMatch$1();
        }
        return { consumedSegments: [], lastChild: 0, parameters: {} };
    }
    var matcher = route.matcher || defaultUrlMatcher;
    var res = matcher(segments, segmentGroup, route);
    if (!res)
        throw new NoMatch$1();
    var posParams = {};
    forEach(res.posParams, function (v, k) { posParams[k] = v.path; });
    var parameters = res.consumed.length > 0 ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, posParams, res.consumed[res.consumed.length - 1].parameters) :
        posParams;
    return { consumedSegments: res.consumed, lastChild: res.consumed.length, parameters: parameters };
}
function checkOutletNameUniqueness(nodes) {
    var names = {};
    nodes.forEach(function (n) {
        var routeWithSameOutletName = names[n.value.outlet];
        if (routeWithSameOutletName) {
            var p = routeWithSameOutletName.url.map(function (s) { return s.toString(); }).join('/');
            var c = n.value.url.map(function (s) { return s.toString(); }).join('/');
            throw new Error("Two segments cannot have the same outlet name: '" + p + "' and '" + c + "'.");
        }
        names[n.value.outlet] = n.value;
    });
}
function getSourceSegmentGroup(segmentGroup) {
    var s = segmentGroup;
    while (s._sourceSegment) {
        s = s._sourceSegment;
    }
    return s;
}
function getPathIndexShift(segmentGroup) {
    var s = segmentGroup;
    var res = (s._segmentIndexShift ? s._segmentIndexShift : 0);
    while (s._sourceSegment) {
        s = s._sourceSegment;
        res += (s._segmentIndexShift ? s._segmentIndexShift : 0);
    }
    return res - 1;
}
function split$1(segmentGroup, consumedSegments, slicedSegments, config, relativeLinkResolution) {
    if (slicedSegments.length > 0 &&
        containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {
        var s_1 = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));
        s_1._sourceSegment = segmentGroup;
        s_1._segmentIndexShift = consumedSegments.length;
        return { segmentGroup: s_1, slicedSegments: [] };
    }
    if (slicedSegments.length === 0 &&
        containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {
        var s_2 = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children, relativeLinkResolution));
        s_2._sourceSegment = segmentGroup;
        s_2._segmentIndexShift = consumedSegments.length;
        return { segmentGroup: s_2, slicedSegments: slicedSegments };
    }
    var s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);
    s._sourceSegment = segmentGroup;
    s._segmentIndexShift = consumedSegments.length;
    return { segmentGroup: s, slicedSegments: slicedSegments };
}
function addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children, relativeLinkResolution) {
    var e_2, _a;
    var res = {};
    try {
        for (var routes_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {
            var r = routes_1_1.value;
            if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet$1(r)]) {
                var s = new UrlSegmentGroup([], {});
                s._sourceSegment = segmentGroup;
                if (relativeLinkResolution === 'legacy') {
                    s._segmentIndexShift = segmentGroup.segments.length;
                }
                else {
                    s._segmentIndexShift = consumedSegments.length;
                }
                res[getOutlet$1(r)] = s;
            }
        }
    }
    catch (e_2_1) { e_2 = { error: e_2_1 }; }
    finally {
        try {
            if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);
        }
        finally { if (e_2) throw e_2.error; }
    }
    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, children, res);
}
function createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {
    var e_3, _a;
    var res = {};
    res[PRIMARY_OUTLET] = primarySegment;
    primarySegment._sourceSegment = segmentGroup;
    primarySegment._segmentIndexShift = consumedSegments.length;
    try {
        for (var routes_2 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {
            var r = routes_2_1.value;
            if (r.path === '' && getOutlet$1(r) !== PRIMARY_OUTLET) {
                var s = new UrlSegmentGroup([], {});
                s._sourceSegment = segmentGroup;
                s._segmentIndexShift = consumedSegments.length;
                res[getOutlet$1(r)] = s;
            }
        }
    }
    catch (e_3_1) { e_3 = { error: e_3_1 }; }
    finally {
        try {
            if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);
        }
        finally { if (e_3) throw e_3.error; }
    }
    return res;
}
function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {
    return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet$1(r) !== PRIMARY_OUTLET; });
}
function containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {
    return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r); });
}
function emptyPathMatch(segmentGroup, slicedSegments, r) {
    if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {
        return false;
    }
    return r.path === '' && r.redirectTo === undefined;
}
function getOutlet$1(route) {
    return route.outlet || PRIMARY_OUTLET;
}
function getData(route) {
    return route.data || {};
}
function getResolve(route) {
    return route.resolve || {};
}

/**
 * @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 recognize$1(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) {
    return function (source) {
        return source.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (t) { return recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (targetSnapshot) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, t, { targetSnapshot: targetSnapshot })); })); }));
    };
}

/**
 * @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 resolveData(paramsInheritanceStrategy, moduleInjector) {
    return function (source) {
        return source.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (t) {
            var targetSnapshot = t.targetSnapshot, canActivateChecks = t.guards.canActivateChecks;
            if (!canActivateChecks.length) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t);
            }
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(canActivateChecks)
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(function (check) { return runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["reduce"])(function (_, __) { return _; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_) { return t; }));
        }));
    };
}
function runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) {
    var resolve = futureARS._resolve;
    return resolveNode(resolve, futureARS, futureRSS, moduleInjector)
        .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (resolvedData) {
        futureARS._resolvedData = resolvedData;
        futureARS.data = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, futureARS.data, inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve);
        return null;
    }));
}
function resolveNode(resolve, futureARS, futureRSS, moduleInjector) {
    var keys = Object.keys(resolve);
    if (keys.length === 0) {
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])({});
    }
    if (keys.length === 1) {
        var key_1 = keys[0];
        return getResolver(resolve[key_1], futureARS, futureRSS, moduleInjector)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (value) {
            var _a;
            return _a = {}, _a[key_1] = value, _a;
        }));
    }
    var data = {};
    var runningResolvers$ = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(keys).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (key) {
        return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (value) {
            data[key] = value;
            return value;
        }));
    }));
    return runningResolvers$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["last"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function () { return data; }));
}
function getResolver(injectionToken, futureARS, futureRSS, moduleInjector) {
    var resolver = getToken(injectionToken, futureARS, moduleInjector);
    return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :
        wrapIntoObservable(resolver(futureARS, futureRSS));
}

/**
 * @license
 * Copyright Google 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
 */
/**
 * Perform a side effect through a switchMap for every emission on the source Observable,
 * but return an Observable that is identical to the source. It's essentially the same as
 * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,
 * it will wait before continuing with the original value.
 */
function switchTap(next) {
    return function (source) {
        return source.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (v) {
            var nextResult = next(v);
            if (nextResult) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(nextResult).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function () { return v; }));
            }
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])([v]);
        }));
    };
}

/**
 * @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
 *
 * Provides a way to customize when activated routes get reused.
 *
 * @publicApi
 */
var RouteReuseStrategy = /** @class */ (function () {
    function RouteReuseStrategy() {
    }
    return RouteReuseStrategy;
}());
/**
 * Does not detach any subtrees. Reuses routes as long as their route config is the same.
 */
var DefaultRouteReuseStrategy = /** @class */ (function () {
    function DefaultRouteReuseStrategy() {
    }
    DefaultRouteReuseStrategy.prototype.shouldDetach = function (route) { return false; };
    DefaultRouteReuseStrategy.prototype.store = function (route, detachedTree) { };
    DefaultRouteReuseStrategy.prototype.shouldAttach = function (route) { return false; };
    DefaultRouteReuseStrategy.prototype.retrieve = function (route) { return null; };
    DefaultRouteReuseStrategy.prototype.shouldReuseRoute = function (future, curr) {
        return future.routeConfig === curr.routeConfig;
    };
    return DefaultRouteReuseStrategy;
}());

/**
 * @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
 */
/**
 * @docsNotRequired
 * @publicApi
 */
var ROUTES = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTES');
var RouterConfigLoader = /** @class */ (function () {
    function RouterConfigLoader(loader, compiler, onLoadStartListener, onLoadEndListener) {
        this.loader = loader;
        this.compiler = compiler;
        this.onLoadStartListener = onLoadStartListener;
        this.onLoadEndListener = onLoadEndListener;
    }
    RouterConfigLoader.prototype.load = function (parentInjector, route) {
        var _this = this;
        if (this.onLoadStartListener) {
            this.onLoadStartListener(route);
        }
        var moduleFactory$ = this.loadModuleFactory(route.loadChildren);
        return moduleFactory$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (factory) {
            if (_this.onLoadEndListener) {
                _this.onLoadEndListener(route);
            }
            var module = factory.create(parentInjector);
            return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);
        }));
    };
    RouterConfigLoader.prototype.loadModuleFactory = function (loadChildren) {
        var _this = this;
        if (typeof loadChildren === 'string') {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(this.loader.load(loadChildren));
        }
        else {
            return wrapIntoObservable(loadChildren()).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (t) {
                if (t instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactory"]) {
                    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t);
                }
                else {
                    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(_this.compiler.compileModuleAsync(t));
                }
            }));
        }
    };
    return RouterConfigLoader;
}());

/**
 * @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
 *
 * Provides a way to migrate AngularJS applications to Angular.
 *
 * @publicApi
 */
var UrlHandlingStrategy = /** @class */ (function () {
    function UrlHandlingStrategy() {
    }
    return UrlHandlingStrategy;
}());
/**
 * @publicApi
 */
var DefaultUrlHandlingStrategy = /** @class */ (function () {
    function DefaultUrlHandlingStrategy() {
    }
    DefaultUrlHandlingStrategy.prototype.shouldProcessUrl = function (url) { return true; };
    DefaultUrlHandlingStrategy.prototype.extract = function (url) { return url; };
    DefaultUrlHandlingStrategy.prototype.merge = function (newUrlPart, wholeUrl) { return newUrlPart; };
    return DefaultUrlHandlingStrategy;
}());

/**
 * @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 defaultErrorHandler(error) {
    throw error;
}
function defaultMalformedUriErrorHandler(error, urlSerializer, url) {
    return urlSerializer.parse('/');
}
/**
 * @internal
 */
function defaultRouterHook(snapshot, runExtras) {
    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null);
}
/**
 * @description
 *
 * Provides the navigation and url manipulation capabilities.
 *
 * See `Routes` for more details and examples.
 *
 * @ngModule RouterModule
 *
 * @publicApi
 */
var Router = /** @class */ (function () {
    /**
     * Creates the router service.
     */
    // TODO: vsavkin make internal after the final is out.
    function Router(rootComponentType, urlSerializer, rootContexts, location, injector, loader, compiler, config) {
        var _this = this;
        this.rootComponentType = rootComponentType;
        this.urlSerializer = urlSerializer;
        this.rootContexts = rootContexts;
        this.location = location;
        this.config = config;
        this.navigationId = 0;
        this.isNgZoneEnabled = false;
        this.events = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
        /**
         * Error handler that is invoked when a navigation errors.
         *
         * See `ErrorHandler` for more information.
         */
        this.errorHandler = defaultErrorHandler;
        /**
         * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an
         * error due to containing an invalid character. The most common case would be a `%` sign
         * that's not encoded and is not part of a percent encoded sequence.
         */
        this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;
        /**
         * Indicates if at least one navigation happened.
         */
        this.navigated = false;
        this.lastSuccessfulId = -1;
        /**
         * Used by RouterModule. This allows us to
         * pause the navigation either before preactivation or after it.
         * @internal
         */
        this.hooks = {
            beforePreactivation: defaultRouterHook,
            afterPreactivation: defaultRouterHook
        };
        /**
         * Extracts and merges URLs. Used for AngularJS to Angular migrations.
         */
        this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();
        this.routeReuseStrategy = new DefaultRouteReuseStrategy();
        /**
         * Define what the router should do if it receives a navigation request to the current URL.
         * By default, the router will ignore this navigation. However, this prevents features such
         * as a "refresh" button. Use this option to configure the behavior when navigating to the
         * current URL. Default is 'ignore'.
         */
        this.onSameUrlNavigation = 'ignore';
        /**
         * Defines how the router merges params, data and resolved data from parent to child
         * routes. Available options are:
         *
         * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less
         *   routes.
         * - `'always'`, enables unconditional inheritance of parent params.
         */
        this.paramsInheritanceStrategy = 'emptyOnly';
        /**
         * Defines when the router updates the browser URL. The default behavior is to update after
         * successful navigation. However, some applications may prefer a mode where the URL gets
         * updated at the beginning of navigation. The most common use case would be updating the
         * URL early so if navigation fails, you can show an error message with the URL that failed.
         * Available options are:
         *
         * - `'deferred'`, the default, updates the browser URL after navigation has finished.
         * - `'eager'`, updates browser URL at the beginning of navigation.
         */
        this.urlUpdateStrategy = 'deferred';
        /**
         * See {@link RouterModule} for more information.
         */
        this.relativeLinkResolution = 'legacy';
        var onLoadStart = function (r) { return _this.triggerEvent(new RouteConfigLoadStart(r)); };
        var onLoadEnd = function (r) { return _this.triggerEvent(new RouteConfigLoadEnd(r)); };
        this.ngModule = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]);
        this.console = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]);
        var ngZone = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]);
        this.isNgZoneEnabled = ngZone instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"];
        this.resetConfig(config);
        this.currentUrlTree = createEmptyUrlTree();
        this.rawUrlTree = this.currentUrlTree;
        this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);
        this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);
        this.transitions = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({
            id: 0,
            currentUrlTree: this.currentUrlTree,
            currentRawUrl: this.currentUrlTree,
            extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),
            urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),
            rawUrl: this.currentUrlTree,
            extras: {},
            resolve: null,
            reject: null,
            promise: Promise.resolve(true),
            source: 'imperative',
            state: null,
            currentSnapshot: this.routerState.snapshot,
            targetSnapshot: null,
            currentRouterState: this.routerState,
            targetRouterState: null,
            guards: { canActivateChecks: [], canDeactivateChecks: [] },
            guardsResult: null,
        });
        this.navigations = this.setupNavigations(this.transitions);
        this.processNavigations();
    }
    Router.prototype.setupNavigations = function (transitions) {
        var _this = this;
        var eventsSubject = this.events;
        return transitions.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(function (t) { return t.id !== 0; }), 
        // Extract URL
        Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (t) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, t, { extractedUrl: _this.urlHandlingStrategy.extract(t.rawUrl) })); }), 
        // Using switchMap so we cancel executing navigations when a new one comes in
        Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) {
            var completed = false;
            var errored = false;
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) {
                var urlTransition = !_this.navigated || t.extractedUrl.toString() !== _this.currentUrlTree.toString();
                var processCurrentUrl = (_this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&
                    _this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);
                if (processCurrentUrl) {
                    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe(
                    // Update URL if in `eager` update mode
                    Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) { return _this.urlUpdateStrategy === 'eager' && !t.extras.skipLocationChange &&
                        _this.setBrowserUrl(t.rawUrl, !!t.extras.replaceUrl, t.id); }), 
                    // Fire NavigationStart event
                    Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) {
                        var transition = _this.transitions.getValue();
                        eventsSubject.next(new NavigationStart(t.id, _this.serializeUrl(t.extractedUrl), t.source, t.state));
                        if (transition !== _this.transitions.getValue()) {
                            return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
                        }
                        return [t];
                    }), 
                    // This delay is required to match old behavior that forced navigation to
                    // always be async
                    Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) { return Promise.resolve(t); }), 
                    // ApplyRedirects
                    applyRedirects$1(_this.ngModule.injector, _this.configLoader, _this.urlSerializer, _this.config), 
                    // Recognize
                    recognize$1(_this.rootComponentType, _this.config, function (url) { return _this.serializeUrl(url); }, _this.paramsInheritanceStrategy, _this.relativeLinkResolution), 
                    // Fire RoutesRecognized
                    Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                        var routesRecognized = new RoutesRecognized(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
                        eventsSubject.next(routesRecognized);
                    }));
                }
                else {
                    var processPreviousUrl = urlTransition && _this.rawUrlTree &&
                        _this.urlHandlingStrategy.shouldProcessUrl(_this.rawUrlTree);
                    /* When the current URL shouldn't be processed, but the previous one was, we
                     * handle this "error condition" by navigating to the previously successful URL,
                     * but leaving the URL intact.*/
                    if (processPreviousUrl) {
                        var id = t.id, extractedUrl = t.extractedUrl, source = t.source, state = t.state, extras = t.extras;
                        var navStart = new NavigationStart(id, _this.serializeUrl(extractedUrl), source, state);
                        eventsSubject.next(navStart);
                        var targetSnapshot = createEmptyState(extractedUrl, _this.rootComponentType).snapshot;
                        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, t, { targetSnapshot: targetSnapshot, urlAfterRedirects: extractedUrl, extras: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, extras, { skipLocationChange: false, replaceUrl: false }) }));
                    }
                    else {
                        /* When neither the current or previous URL can be processed, do nothing other
                         * than update router's internal reference to the current "settled" URL. This
                         * way the next navigation will be coming from the current URL in the browser.
                         */
                        _this.rawUrlTree = t.rawUrl;
                        t.resolve(null);
                        return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
                    }
                }
            }), 
            // Before Preactivation
            switchTap(function (t) {
                var targetSnapshot = t.targetSnapshot, navigationId = t.id, appliedUrlTree = t.extractedUrl, rawUrlTree = t.rawUrl, _a = t.extras, skipLocationChange = _a.skipLocationChange, replaceUrl = _a.replaceUrl;
                return _this.hooks.beforePreactivation(targetSnapshot, {
                    navigationId: navigationId,
                    appliedUrlTree: appliedUrlTree,
                    rawUrlTree: rawUrlTree,
                    skipLocationChange: !!skipLocationChange,
                    replaceUrl: !!replaceUrl,
                });
            }), 
            // --- GUARDS ---
            Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                var guardsStart = new GuardsCheckStart(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
                _this.triggerEvent(guardsStart);
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (t) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, t, { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, _this.rootContexts) })); }), checkGuards(_this.ngModule.injector, function (evt) { return _this.triggerEvent(evt); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                var guardsEnd = new GuardsCheckEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);
                _this.triggerEvent(guardsEnd);
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(function (t) {
                if (!t.guardsResult) {
                    _this.resetUrlToCurrentUrlTree();
                    var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), '');
                    eventsSubject.next(navCancel);
                    t.resolve(false);
                    return false;
                }
                return true;
            }), 
            // --- RESOLVE ---
            switchTap(function (t) {
                if (t.guards.canActivateChecks.length) {
                    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                        var resolveStart = new ResolveStart(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
                        _this.triggerEvent(resolveStart);
                    }), resolveData(_this.paramsInheritanceStrategy, _this.ngModule.injector), //
                    Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                        var resolveEnd = new ResolveEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
                        _this.triggerEvent(resolveEnd);
                    }));
                }
                return undefined;
            }), 
            // --- AFTER PREACTIVATION ---
            switchTap(function (t) {
                var targetSnapshot = t.targetSnapshot, navigationId = t.id, appliedUrlTree = t.extractedUrl, rawUrlTree = t.rawUrl, _a = t.extras, skipLocationChange = _a.skipLocationChange, replaceUrl = _a.replaceUrl;
                return _this.hooks.afterPreactivation(targetSnapshot, {
                    navigationId: navigationId,
                    appliedUrlTree: appliedUrlTree,
                    rawUrlTree: rawUrlTree,
                    skipLocationChange: !!skipLocationChange,
                    replaceUrl: !!replaceUrl,
                });
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (t) {
                var targetRouterState = createRouterState(_this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);
                return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, t, { targetRouterState: targetRouterState }));
            }), 
            /* Once here, we are about to activate syncronously. The assumption is this will
               succeed, and user code may read from the Router service. Therefore before
               activation, we need to update router properties storing the current URL and the
               RouterState, as well as updated the browser URL. All this should happen *before*
               activating. */
            Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                _this.currentUrlTree = t.urlAfterRedirects;
                _this.rawUrlTree = _this.urlHandlingStrategy.merge(_this.currentUrlTree, t.rawUrl);
                _this.routerState = t.targetRouterState;
                if (_this.urlUpdateStrategy === 'deferred' && !t.extras.skipLocationChange) {
                    _this.setBrowserUrl(_this.rawUrlTree, !!t.extras.replaceUrl, t.id);
                }
            }), activateRoutes(_this.rootContexts, _this.routeReuseStrategy, function (evt) { return _this.triggerEvent(evt); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])({ next: function () { completed = true; }, complete: function () { completed = true; } }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["finalize"])(function () {
                /* When the navigation stream finishes either through error or success, we set the
                 * `completed` or `errored` flag. However, there are some situations where we could
                 * get here without either of those being set. For instance, a redirect during
                 * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel
                 * event is fired when a navigation gets cancelled but not caught by other means. */
                if (!completed && !errored) {
                    // Must reset to current URL tree here to ensure history.state is set. On a fresh
                    // page load, if a new navigation comes in before a successful navigation
                    // completes, there will be nothing in history.state.navigationId. This can cause
                    // sync problems with AngularJS sync code which looks for a value here in order
                    // to determine whether or not to handle a given popstate event or to leave it
                    // to the Angualr router.
                    _this.resetUrlToCurrentUrlTree();
                    var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), "Navigation ID " + t.id + " is not equal to the current navigation id " + _this.navigationId);
                    eventsSubject.next(navCancel);
                    t.resolve(false);
                }
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e) {
                errored = true;
                /* This error type is issued during Redirect, and is handled as a cancellation
                 * rather than an error. */
                if (isNavigationCancelingError(e)) {
                    _this.navigated = true;
                    _this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);
                    var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), e.message);
                    eventsSubject.next(navCancel);
                    t.resolve(false);
                    /* All other errors should reset to the router's internal URL reference to the
                     * pre-error state. */
                }
                else {
                    _this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);
                    var navError = new NavigationError(t.id, _this.serializeUrl(t.extractedUrl), e);
                    eventsSubject.next(navError);
                    try {
                        t.resolve(_this.errorHandler(e));
                    }
                    catch (ee) {
                        t.reject(ee);
                    }
                }
                return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
            }));
            // TODO(jasonaden): remove cast once g3 is on updated TypeScript
        }));
    };
    /**
     * @internal
     * TODO: this should be removed once the constructor of the router made internal
     */
    Router.prototype.resetRootComponentType = function (rootComponentType) {
        this.rootComponentType = rootComponentType;
        // TODO: vsavkin router 4.0 should make the root component set to null
        // this will simplify the lifecycle of the router.
        this.routerState.root.component = this.rootComponentType;
    };
    Router.prototype.getTransition = function () { return this.transitions.value; };
    Router.prototype.setTransition = function (t) {
        this.transitions.next(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.getTransition(), t));
    };
    /**
     * Sets up the location change listener and performs the initial navigation.
     */
    Router.prototype.initialNavigation = function () {
        this.setUpLocationChangeListener();
        if (this.navigationId === 0) {
            this.navigateByUrl(this.location.path(true), { replaceUrl: true });
        }
    };
    /**
     * Sets up the location change listener.
     */
    Router.prototype.setUpLocationChangeListener = function () {
        var _this = this;
        // Don't need to use Zone.wrap any more, because zone.js
        // already patch onPopState, so location change callback will
        // run into ngZone
        if (!this.locationSubscription) {
            this.locationSubscription = this.location.subscribe(function (change) {
                var rawUrlTree = _this.parseUrl(change['url']);
                var source = change['type'] === 'popstate' ? 'popstate' : 'hashchange';
                var state = change.state && change.state.navigationId ?
                    { navigationId: change.state.navigationId } :
                    null;
                setTimeout(function () { _this.scheduleNavigation(rawUrlTree, source, state, { replaceUrl: true }); }, 0);
            });
        }
    };
    Object.defineProperty(Router.prototype, "url", {
        /** The current url */
        get: function () { return this.serializeUrl(this.currentUrlTree); },
        enumerable: true,
        configurable: true
    });
    /** @internal */
    Router.prototype.triggerEvent = function (event) { this.events.next(event); };
    /**
     * Resets the configuration used for navigation and generating links.
     *
     * @usageNotes
     *
     * ### Example
     *
     * ```
     * router.resetConfig([
     *  { path: 'team/:id', component: TeamCmp, children: [
     *    { path: 'simple', component: SimpleCmp },
     *    { path: 'user/:name', component: UserCmp }
     *  ]}
     * ]);
     * ```
     */
    Router.prototype.resetConfig = function (config) {
        validateConfig(config);
        this.config = config.map(standardizeConfig);
        this.navigated = false;
        this.lastSuccessfulId = -1;
    };
    /** @docsNotRequired */
    Router.prototype.ngOnDestroy = function () { this.dispose(); };
    /** Disposes of the router */
    Router.prototype.dispose = function () {
        if (this.locationSubscription) {
            this.locationSubscription.unsubscribe();
            this.locationSubscription = null;
        }
    };
    /**
     * Applies an array of commands to the current url tree and creates a new url tree.
     *
     * When given an activate route, applies the given commands starting from the route.
     * When not given a route, applies the given command starting from the root.
     *
     * @usageNotes
     *
     * ### Example
     *
     * ```
     * // create /team/33/user/11
     * router.createUrlTree(['/team', 33, 'user', 11]);
     *
     * // create /team/33;expand=true/user/11
     * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);
     *
     * // you can collapse static segments like this (this works only with the first passed-in value):
     * router.createUrlTree(['/team/33/user', userId]);
     *
     * // If the first segment can contain slashes, and you do not want the router to split it, you
     * // can do the following:
     *
     * router.createUrlTree([{segmentPath: '/one/two'}]);
     *
     * // create /team/33/(user/11//right:chat)
     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);
     *
     * // remove the right secondary node
     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);
     *
     * // assuming the current url is `/team/33/user/11` and the route points to `user/11`
     *
     * // navigate to /team/33/user/11/details
     * router.createUrlTree(['details'], {relativeTo: route});
     *
     * // navigate to /team/33/user/22
     * router.createUrlTree(['../22'], {relativeTo: route});
     *
     * // navigate to /team/44/user/22
     * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
     * ```
     */
    Router.prototype.createUrlTree = function (commands, navigationExtras) {
        if (navigationExtras === void 0) { navigationExtras = {}; }
        var relativeTo = navigationExtras.relativeTo, queryParams = navigationExtras.queryParams, fragment = navigationExtras.fragment, preserveQueryParams = navigationExtras.preserveQueryParams, queryParamsHandling = navigationExtras.queryParamsHandling, preserveFragment = navigationExtras.preserveFragment;
        if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])() && preserveQueryParams && console && console.warn) {
            console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');
        }
        var a = relativeTo || this.routerState.root;
        var f = preserveFragment ? this.currentUrlTree.fragment : fragment;
        var q = null;
        if (queryParamsHandling) {
            switch (queryParamsHandling) {
                case 'merge':
                    q = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.currentUrlTree.queryParams, queryParams);
                    break;
                case 'preserve':
                    q = this.currentUrlTree.queryParams;
                    break;
                default:
                    q = queryParams || null;
            }
        }
        else {
            q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;
        }
        if (q !== null) {
            q = this.removeEmptyProps(q);
        }
        return createUrlTree(a, this.currentUrlTree, commands, q, f);
    };
    /**
     * Navigate based on the provided url. This navigation is always absolute.
     *
     * Returns a promise that:
     * - resolves to 'true' when navigation succeeds,
     * - resolves to 'false' when navigation fails,
     * - is rejected when an error happens.
     *
     * @usageNotes
     *
     * ### Example
     *
     * ```
     * router.navigateByUrl("/team/33/user/11");
     *
     * // Navigate without updating the URL
     * router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });
     * ```
     *
     * Since `navigateByUrl()` takes an absolute URL as the first parameter,
     * it will not apply any delta to the current URL and ignores any properties
     * in the second parameter (the `NavigationExtras`) that would change the
     * provided URL.
     */
    Router.prototype.navigateByUrl = function (url, extras) {
        if (extras === void 0) { extras = { skipLocationChange: false }; }
        if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])() && this.isNgZoneEnabled && !_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"].isInAngularZone()) {
            this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");
        }
        var urlTree = url instanceof UrlTree ? url : this.parseUrl(url);
        var mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);
        return this.scheduleNavigation(mergedTree, 'imperative', null, extras);
    };
    /**
     * Navigate based on the provided array of commands and a starting point.
     * If no starting route is provided, the navigation is absolute.
     *
     * Returns a promise that:
     * - resolves to 'true' when navigation succeeds,
     * - resolves to 'false' when navigation fails,
     * - is rejected when an error happens.
     *
     * @usageNotes
     *
     * ### Example
     *
     * ```
     * router.navigate(['team', 33, 'user', 11], {relativeTo: route});
     *
     * // Navigate without updating the URL
     * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});
     * ```
     *
     * The first parameter of `navigate()` is a delta to be applied to the current URL
     * or the one provided in the `relativeTo` property of the second parameter (the
     * `NavigationExtras`).
     */
    Router.prototype.navigate = function (commands, extras) {
        if (extras === void 0) { extras = { skipLocationChange: false }; }
        validateCommands(commands);
        return this.navigateByUrl(this.createUrlTree(commands, extras), extras);
    };
    /** Serializes a `UrlTree` into a string */
    Router.prototype.serializeUrl = function (url) { return this.urlSerializer.serialize(url); };
    /** Parses a string into a `UrlTree` */
    Router.prototype.parseUrl = function (url) {
        var urlTree;
        try {
            urlTree = this.urlSerializer.parse(url);
        }
        catch (e) {
            urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);
        }
        return urlTree;
    };
    /** Returns whether the url is activated */
    Router.prototype.isActive = function (url, exact) {
        if (url instanceof UrlTree) {
            return containsTree(this.currentUrlTree, url, exact);
        }
        var urlTree = this.parseUrl(url);
        return containsTree(this.currentUrlTree, urlTree, exact);
    };
    Router.prototype.removeEmptyProps = function (params) {
        return Object.keys(params).reduce(function (result, key) {
            var value = params[key];
            if (value !== null && value !== undefined) {
                result[key] = value;
            }
            return result;
        }, {});
    };
    Router.prototype.processNavigations = function () {
        var _this = this;
        this.navigations.subscribe(function (t) {
            _this.navigated = true;
            _this.lastSuccessfulId = t.id;
            _this.events
                .next(new NavigationEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(_this.currentUrlTree)));
            t.resolve(true);
        }, function (e) { _this.console.warn("Unhandled Navigation Error: "); });
    };
    Router.prototype.scheduleNavigation = function (rawUrl, source, state, extras) {
        var lastNavigation = this.getTransition();
        // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),
        // and that navigation results in 'replaceState' that leads to the same URL,
        // we should skip those.
        if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&
            lastNavigation.rawUrl.toString() === rawUrl.toString()) {
            return Promise.resolve(true); // return value is not used
        }
        // Because of a bug in IE and Edge, the location class fires two events (popstate and
        // hashchange) every single time. The second one should be ignored. Otherwise, the URL will
        // flicker. Handles the case when a popstate was emitted first.
        if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&
            lastNavigation.rawUrl.toString() === rawUrl.toString()) {
            return Promise.resolve(true); // return value is not used
        }
        // Because of a bug in IE and Edge, the location class fires two events (popstate and
        // hashchange) every single time. The second one should be ignored. Otherwise, the URL will
        // flicker. Handles the case when a hashchange was emitted first.
        if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&
            lastNavigation.rawUrl.toString() === rawUrl.toString()) {
            return Promise.resolve(true); // return value is not used
        }
        var resolve = null;
        var reject = null;
        var promise = new Promise(function (res, rej) {
            resolve = res;
            reject = rej;
        });
        var id = ++this.navigationId;
        this.setTransition({
            id: id,
            source: source,
            state: state,
            currentUrlTree: this.currentUrlTree,
            currentRawUrl: this.rawUrlTree, rawUrl: rawUrl, extras: extras, resolve: resolve, reject: reject, promise: promise,
            currentSnapshot: this.routerState.snapshot,
            currentRouterState: this.routerState
        });
        // Make sure that the error is propagated even though `processNavigations` catch
        // handler does not rethrow
        return promise.catch(function (e) { return Promise.reject(e); });
    };
    Router.prototype.setBrowserUrl = function (url, replaceUrl, id) {
        var path = this.urlSerializer.serialize(url);
        if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {
            this.location.replaceState(path, '', { navigationId: id });
        }
        else {
            this.location.go(path, '', { navigationId: id });
        }
    };
    Router.prototype.resetStateAndUrl = function (storedState, storedUrl, rawUrl) {
        this.routerState = storedState;
        this.currentUrlTree = storedUrl;
        this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);
        this.resetUrlToCurrentUrlTree();
    };
    Router.prototype.resetUrlToCurrentUrlTree = function () {
        this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', { navigationId: this.lastSuccessfulId });
    };
    return Router;
}());
function validateCommands(commands) {
    for (var i = 0; i < commands.length; i++) {
        var cmd = commands[i];
        if (cmd == null) {
            throw new Error("The requested path contains " + cmd + " segment at index " + i);
        }
    }
}

/**
 * @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
 *
 * Lets you link to specific routes in your app.
 *
 * Consider the following route configuration:
 * `[{ path: 'user/:name', component: UserCmp }]`.
 * When linking to this `user/:name` route, you use the `RouterLink` directive.
 *
 * If the link is static, you can use the directive as follows:
 * `<a routerLink="/user/bob">link to user component</a>`
 *
 * If you use dynamic values to generate the link, you can pass an array of path
 * segments, followed by the params for each segment.
 *
 * For instance `['/team', teamId, 'user', userName, {details: true}]`
 * means that we want to generate a link to `/team/11/user/bob;details=true`.
 *
 * Multiple static segments can be merged into one
 * (e.g., `['/team/11/user', userName, {details: true}]`).
 *
 * The first segment name can be prepended with `/`, `./`, or `../`:
 * * If the first segment begins with `/`, the router will look up the route from the root of the
 *   app.
 * * If the first segment begins with `./`, or doesn't begin with a slash, the router will
 *   instead look in the children of the current activated route.
 * * And if the first segment begins with `../`, the router will go up one level.
 *
 * You can set query params and fragment as follows:
 *
 * ```
 * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" fragment="education">
 *   link to user component
 * </a>
 * ```
 * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.
 *
 * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the
 * directive to preserve the current query params and fragment:
 *
 * ```
 * <a [routerLink]="['/user/bob']" preserveQueryParams preserveFragment>
 *   link to user component
 * </a>
 * ```
 *
 * You can tell the directive to how to handle queryParams, available options are:
 *  - `'merge'`: merge the queryParams into the current queryParams
 *  - `'preserve'`: preserve the current queryParams
 *  - default/`''`: use the queryParams only
 *
 * Same options for {@link NavigationExtras#queryParamsHandling
 * NavigationExtras#queryParamsHandling}.
 *
 * ```
 * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" queryParamsHandling="merge">
 *   link to user component
 * </a>
 * ```
 *
 * The router link directive always treats the provided input as a delta to the current url.
 *
 * For instance, if the current url is `/user/(box//aux:team)`.
 *
 * Then the following link `<a [routerLink]="['/user/jim']">Jim</a>` will generate the link
 * `/user/(jim//aux:team)`.
 *
 * See {@link Router#createUrlTree createUrlTree} for more information.
 *
 * @ngModule RouterModule
 *
 * @publicApi
 */
var RouterLink = /** @class */ (function () {
    function RouterLink(router, route, tabIndex, renderer, el) {
        this.router = router;
        this.route = route;
        this.commands = [];
        if (tabIndex == null) {
            renderer.setAttribute(el.nativeElement, 'tabindex', '0');
        }
    }
    Object.defineProperty(RouterLink.prototype, "routerLink", {
        set: function (commands) {
            if (commands != null) {
                this.commands = Array.isArray(commands) ? commands : [commands];
            }
            else {
                this.commands = [];
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RouterLink.prototype, "preserveQueryParams", {
        /**
         * @deprecated 4.0.0 use `queryParamsHandling` instead.
         */
        set: function (value) {
            if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])() && console && console.warn) {
                console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');
            }
            this.preserve = value;
        },
        enumerable: true,
        configurable: true
    });
    RouterLink.prototype.onClick = function () {
        var extras = {
            skipLocationChange: attrBoolValue(this.skipLocationChange),
            replaceUrl: attrBoolValue(this.replaceUrl),
        };
        this.router.navigateByUrl(this.urlTree, extras);
        return true;
    };
    Object.defineProperty(RouterLink.prototype, "urlTree", {
        get: function () {
            return this.router.createUrlTree(this.commands, {
                relativeTo: this.route,
                queryParams: this.queryParams,
                fragment: this.fragment,
                preserveQueryParams: attrBoolValue(this.preserve),
                queryParamsHandling: this.queryParamsHandling,
                preserveFragment: attrBoolValue(this.preserveFragment),
            });
        },
        enumerable: true,
        configurable: true
    });
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Object)
    ], RouterLink.prototype, "queryParams", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", String)
    ], RouterLink.prototype, "fragment", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", String)
    ], RouterLink.prototype, "queryParamsHandling", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Boolean)
    ], RouterLink.prototype, "preserveFragment", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Boolean)
    ], RouterLink.prototype, "skipLocationChange", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Boolean)
    ], RouterLink.prototype, "replaceUrl", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], RouterLink.prototype, "routerLink", null);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Boolean),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Boolean])
    ], RouterLink.prototype, "preserveQueryParams", null);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('click'),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Function),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", []),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:returntype", Boolean)
    ], RouterLink.prototype, "onClick", null);
    RouterLink = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"])({ selector: ':not(a)[routerLink]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(2, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"])('tabindex')),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Router, ActivatedRoute, String, _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]])
    ], RouterLink);
    return RouterLink;
}());
/**
 * @description
 *
 * Lets you link to specific routes in your app.
 *
 * See `RouterLink` for more information.
 *
 * @ngModule RouterModule
 *
 * @publicApi
 */
var RouterLinkWithHref = /** @class */ (function () {
    function RouterLinkWithHref(router, route, locationStrategy) {
        var _this = this;
        this.router = router;
        this.route = route;
        this.locationStrategy = locationStrategy;
        this.commands = [];
        this.subscription = router.events.subscribe(function (s) {
            if (s instanceof NavigationEnd) {
                _this.updateTargetUrlAndHref();
            }
        });
    }
    Object.defineProperty(RouterLinkWithHref.prototype, "routerLink", {
        set: function (commands) {
            if (commands != null) {
                this.commands = Array.isArray(commands) ? commands : [commands];
            }
            else {
                this.commands = [];
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RouterLinkWithHref.prototype, "preserveQueryParams", {
        set: function (value) {
            if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])() && console && console.warn) {
                console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');
            }
            this.preserve = value;
        },
        enumerable: true,
        configurable: true
    });
    RouterLinkWithHref.prototype.ngOnChanges = function (changes) { this.updateTargetUrlAndHref(); };
    RouterLinkWithHref.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };
    RouterLinkWithHref.prototype.onClick = function (button, ctrlKey, metaKey, shiftKey) {
        if (button !== 0 || ctrlKey || metaKey || shiftKey) {
            return true;
        }
        if (typeof this.target === 'string' && this.target != '_self') {
            return true;
        }
        var extras = {
            skipLocationChange: attrBoolValue(this.skipLocationChange),
            replaceUrl: attrBoolValue(this.replaceUrl),
        };
        this.router.navigateByUrl(this.urlTree, extras);
        return false;
    };
    RouterLinkWithHref.prototype.updateTargetUrlAndHref = function () {
        this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));
    };
    Object.defineProperty(RouterLinkWithHref.prototype, "urlTree", {
        get: function () {
            return this.router.createUrlTree(this.commands, {
                relativeTo: this.route,
                queryParams: this.queryParams,
                fragment: this.fragment,
                preserveQueryParams: attrBoolValue(this.preserve),
                queryParamsHandling: this.queryParamsHandling,
                preserveFragment: attrBoolValue(this.preserveFragment),
            });
        },
        enumerable: true,
        configurable: true
    });
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"])('attr.target'), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", String)
    ], RouterLinkWithHref.prototype, "target", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Object)
    ], RouterLinkWithHref.prototype, "queryParams", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", String)
    ], RouterLinkWithHref.prototype, "fragment", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", String)
    ], RouterLinkWithHref.prototype, "queryParamsHandling", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Boolean)
    ], RouterLinkWithHref.prototype, "preserveFragment", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Boolean)
    ], RouterLinkWithHref.prototype, "skipLocationChange", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Boolean)
    ], RouterLinkWithHref.prototype, "replaceUrl", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", String)
    ], RouterLinkWithHref.prototype, "href", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], RouterLinkWithHref.prototype, "routerLink", null);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Boolean),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Boolean])
    ], RouterLinkWithHref.prototype, "preserveQueryParams", null);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey']),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Function),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Number, Boolean, Boolean, Boolean]),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:returntype", Boolean)
    ], RouterLinkWithHref.prototype, "onClick", null);
    RouterLinkWithHref = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"])({ selector: 'a[routerLink]' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Router, ActivatedRoute,
            _angular_common__WEBPACK_IMPORTED_MODULE_4__["LocationStrategy"]])
    ], RouterLinkWithHref);
    return RouterLinkWithHref;
}());
function attrBoolValue(s) {
    return s === '' || !!s;
}

/**
 * @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
 *
 * Lets you add a CSS class to an element when the link's route becomes active.
 *
 * This directive lets you add a CSS class to an element when the link's route
 * becomes active.
 *
 * Consider the following example:
 *
 * ```
 * <a routerLink="/user/bob" routerLinkActive="active-link">Bob</a>
 * ```
 *
 * When the url is either '/user' or '/user/bob', the active-link class will
 * be added to the `a` tag. If the url changes, the class will be removed.
 *
 * You can set more than one class, as follows:
 *
 * ```
 * <a routerLink="/user/bob" routerLinkActive="class1 class2">Bob</a>
 * <a routerLink="/user/bob" [routerLinkActive]="['class1', 'class2']">Bob</a>
 * ```
 *
 * You can configure RouterLinkActive by passing `exact: true`. This will add the classes
 * only when the url matches the link exactly.
 *
 * ```
 * <a routerLink="/user/bob" routerLinkActive="active-link" [routerLinkActiveOptions]="{exact:
 * true}">Bob</a>
 * ```
 *
 * You can assign the RouterLinkActive instance to a template variable and directly check
 * the `isActive` status.
 * ```
 * <a routerLink="/user/bob" routerLinkActive #rla="routerLinkActive">
 *   Bob {{ rla.isActive ? '(already open)' : ''}}
 * </a>
 * ```
 *
 * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.
 *
 * ```
 * <div routerLinkActive="active-link" [routerLinkActiveOptions]="{exact: true}">
 *   <a routerLink="/user/jim">Jim</a>
 *   <a routerLink="/user/bob">Bob</a>
 * </div>
 * ```
 *
 * This will set the active-link class on the div tag if the url is either '/user/jim' or
 * '/user/bob'.
 *
 * @ngModule RouterModule
 *
 * @publicApi
 */
var RouterLinkActive = /** @class */ (function () {
    function RouterLinkActive(router, element, renderer, cdr) {
        var _this = this;
        this.router = router;
        this.element = element;
        this.renderer = renderer;
        this.cdr = cdr;
        this.classes = [];
        this.isActive = false;
        this.routerLinkActiveOptions = { exact: false };
        this.subscription = router.events.subscribe(function (s) {
            if (s instanceof NavigationEnd) {
                _this.update();
            }
        });
    }
    RouterLinkActive.prototype.ngAfterContentInit = function () {
        var _this = this;
        this.links.changes.subscribe(function (_) { return _this.update(); });
        this.linksWithHrefs.changes.subscribe(function (_) { return _this.update(); });
        this.update();
    };
    Object.defineProperty(RouterLinkActive.prototype, "routerLinkActive", {
        set: function (data) {
            var classes = Array.isArray(data) ? data : data.split(' ');
            this.classes = classes.filter(function (c) { return !!c; });
        },
        enumerable: true,
        configurable: true
    });
    RouterLinkActive.prototype.ngOnChanges = function (changes) { this.update(); };
    RouterLinkActive.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };
    RouterLinkActive.prototype.update = function () {
        var _this = this;
        if (!this.links || !this.linksWithHrefs || !this.router.navigated)
            return;
        Promise.resolve().then(function () {
            var hasActiveLinks = _this.hasActiveLinks();
            if (_this.isActive !== hasActiveLinks) {
                _this.isActive = hasActiveLinks;
                _this.classes.forEach(function (c) {
                    if (hasActiveLinks) {
                        _this.renderer.addClass(_this.element.nativeElement, c);
                    }
                    else {
                        _this.renderer.removeClass(_this.element.nativeElement, c);
                    }
                });
            }
        });
    };
    RouterLinkActive.prototype.isLinkActive = function (router) {
        var _this = this;
        return function (link) {
            return router.isActive(link.urlTree, _this.routerLinkActiveOptions.exact);
        };
    };
    RouterLinkActive.prototype.hasActiveLinks = function () {
        return this.links.some(this.isLinkActive(this.router)) ||
            this.linksWithHrefs.some(this.isLinkActive(this.router));
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"])(RouterLink, { descendants: true }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["QueryList"])
    ], RouterLinkActive.prototype, "links", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"])(RouterLinkWithHref, { descendants: true }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["QueryList"])
    ], RouterLinkActive.prototype, "linksWithHrefs", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Object)
    ], RouterLinkActive.prototype, "routerLinkActiveOptions", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Object),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object])
    ], RouterLinkActive.prototype, "routerLinkActive", null);
    RouterLinkActive = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"])({
            selector: '[routerLinkActive]',
            exportAs: 'routerLinkActive',
        }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Router, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"],
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]])
    ], RouterLinkActive);
    return RouterLinkActive;
}());

/**
 * @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
 */
/**
 * Store contextual information about a `RouterOutlet`
 *
 * @publicApi
 */
var OutletContext = /** @class */ (function () {
    function OutletContext() {
        this.outlet = null;
        this.route = null;
        this.resolver = null;
        this.children = new ChildrenOutletContexts();
        this.attachRef = null;
    }
    return OutletContext;
}());
/**
 * Store contextual information about the children (= nested) `RouterOutlet`
 *
 * @publicApi
 */
var ChildrenOutletContexts = /** @class */ (function () {
    function ChildrenOutletContexts() {
        // contexts for child outlets, by name.
        this.contexts = new Map();
    }
    /** Called when a `RouterOutlet` directive is instantiated */
    ChildrenOutletContexts.prototype.onChildOutletCreated = function (childName, outlet) {
        var context = this.getOrCreateContext(childName);
        context.outlet = outlet;
        this.contexts.set(childName, context);
    };
    /**
     * Called when a `RouterOutlet` directive is destroyed.
     * We need to keep the context as the outlet could be destroyed inside a NgIf and might be
     * re-created later.
     */
    ChildrenOutletContexts.prototype.onChildOutletDestroyed = function (childName) {
        var context = this.getContext(childName);
        if (context) {
            context.outlet = null;
        }
    };
    /**
     * Called when the corresponding route is deactivated during navigation.
     * Because the component get destroyed, all children outlet are destroyed.
     */
    ChildrenOutletContexts.prototype.onOutletDeactivated = function () {
        var contexts = this.contexts;
        this.contexts = new Map();
        return contexts;
    };
    ChildrenOutletContexts.prototype.onOutletReAttached = function (contexts) { this.contexts = contexts; };
    ChildrenOutletContexts.prototype.getOrCreateContext = function (childName) {
        var context = this.getContext(childName);
        if (!context) {
            context = new OutletContext();
            this.contexts.set(childName, context);
        }
        return context;
    };
    ChildrenOutletContexts.prototype.getContext = function (childName) { return this.contexts.get(childName) || null; };
    return ChildrenOutletContexts;
}());

/**
 * @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
 *
 * Acts as a placeholder that Angular dynamically fills based on the current router state.
 *
 * ```
 * <router-outlet></router-outlet>
 * <router-outlet name='left'></router-outlet>
 * <router-outlet name='right'></router-outlet>
 * ```
 *
 * A router outlet will emit an activate event any time a new component is being instantiated,
 * and a deactivate event when it is being destroyed.
 *
 * ```
 * <router-outlet
 *   (activate)='onActivate($event)'
 *   (deactivate)='onDeactivate($event)'></router-outlet>
 * ```
 * @ngModule RouterModule
 *
 * @publicApi
 */
var RouterOutlet = /** @class */ (function () {
    function RouterOutlet(parentContexts, location, resolver, name, changeDetector) {
        this.parentContexts = parentContexts;
        this.location = location;
        this.resolver = resolver;
        this.changeDetector = changeDetector;
        this.activated = null;
        this._activatedRoute = null;
        this.activateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.deactivateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.name = name || PRIMARY_OUTLET;
        parentContexts.onChildOutletCreated(this.name, this);
    }
    RouterOutlet.prototype.ngOnDestroy = function () { this.parentContexts.onChildOutletDestroyed(this.name); };
    RouterOutlet.prototype.ngOnInit = function () {
        if (!this.activated) {
            // If the outlet was not instantiated at the time the route got activated we need to populate
            // the outlet when it is initialized (ie inside a NgIf)
            var context = this.parentContexts.getContext(this.name);
            if (context && context.route) {
                if (context.attachRef) {
                    // `attachRef` is populated when there is an existing component to mount
                    this.attach(context.attachRef, context.route);
                }
                else {
                    // otherwise the component defined in the configuration is created
                    this.activateWith(context.route, context.resolver || null);
                }
            }
        }
    };
    Object.defineProperty(RouterOutlet.prototype, "isActivated", {
        get: function () { return !!this.activated; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RouterOutlet.prototype, "component", {
        get: function () {
            if (!this.activated)
                throw new Error('Outlet is not activated');
            return this.activated.instance;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RouterOutlet.prototype, "activatedRoute", {
        get: function () {
            if (!this.activated)
                throw new Error('Outlet is not activated');
            return this._activatedRoute;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RouterOutlet.prototype, "activatedRouteData", {
        get: function () {
            if (this._activatedRoute) {
                return this._activatedRoute.snapshot.data;
            }
            return {};
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Called when the `RouteReuseStrategy` instructs to detach the subtree
     */
    RouterOutlet.prototype.detach = function () {
        if (!this.activated)
            throw new Error('Outlet is not activated');
        this.location.detach();
        var cmp = this.activated;
        this.activated = null;
        this._activatedRoute = null;
        return cmp;
    };
    /**
     * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
     */
    RouterOutlet.prototype.attach = function (ref, activatedRoute) {
        this.activated = ref;
        this._activatedRoute = activatedRoute;
        this.location.insert(ref.hostView);
    };
    RouterOutlet.prototype.deactivate = function () {
        if (this.activated) {
            var c = this.component;
            this.activated.destroy();
            this.activated = null;
            this._activatedRoute = null;
            this.deactivateEvents.emit(c);
        }
    };
    RouterOutlet.prototype.activateWith = function (activatedRoute, resolver) {
        if (this.isActivated) {
            throw new Error('Cannot activate an already activated outlet');
        }
        this._activatedRoute = activatedRoute;
        var snapshot = activatedRoute._futureSnapshot;
        var component = snapshot.routeConfig.component;
        resolver = resolver || this.resolver;
        var factory = resolver.resolveComponentFactory(component);
        var childContexts = this.parentContexts.getOrCreateContext(this.name).children;
        var injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);
        this.activated = this.location.createComponent(factory, this.location.length, injector);
        // Calling `markForCheck` to make sure we will run the change detection when the
        // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.
        this.changeDetector.markForCheck();
        this.activateEvents.emit(this.activated.instance);
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])('activate'),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Object)
    ], RouterOutlet.prototype, "activateEvents", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])('deactivate'),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", Object)
    ], RouterOutlet.prototype, "deactivateEvents", void 0);
    RouterOutlet = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"])({ selector: 'router-outlet', exportAs: 'outlet' }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(3, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"])('name')),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [ChildrenOutletContexts, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"],
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"], String, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]])
    ], RouterOutlet);
    return RouterOutlet;
}());
var OutletInjector = /** @class */ (function () {
    function OutletInjector(route, childContexts, parent) {
        this.route = route;
        this.childContexts = childContexts;
        this.parent = parent;
    }
    OutletInjector.prototype.get = function (token, notFoundValue) {
        if (token === ActivatedRoute) {
            return this.route;
        }
        if (token === ChildrenOutletContexts) {
            return this.childContexts;
        }
        return this.parent.get(token, notFoundValue);
    };
    return OutletInjector;
}());

/**
*@license
*Copyright Google 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
 *
 * Provides a preloading strategy.
 *
 * @publicApi
 */
var PreloadingStrategy = /** @class */ (function () {
    function PreloadingStrategy() {
    }
    return PreloadingStrategy;
}());
/**
 * @description
 *
 * Provides a preloading strategy that preloads all modules as quickly as possible.
 *
 * ```
 * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})
 * ```
 *
 * @publicApi
 */
var PreloadAllModules = /** @class */ (function () {
    function PreloadAllModules() {
    }
    PreloadAllModules.prototype.preload = function (route, fn) {
        return fn().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function () { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); }));
    };
    return PreloadAllModules;
}());
/**
 * @description
 *
 * Provides a preloading strategy that does not preload any modules.
 *
 * This strategy is enabled by default.
 *
 * @publicApi
 */
var NoPreloading = /** @class */ (function () {
    function NoPreloading() {
    }
    NoPreloading.prototype.preload = function (route, fn) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); };
    return NoPreloading;
}());
/**
 * The preloader optimistically loads all router configurations to
 * make navigations into lazily-loaded sections of the application faster.
 *
 * The preloader runs in the background. When the router bootstraps, the preloader
 * starts listening to all navigation events. After every such event, the preloader
 * will check if any configurations can be loaded lazily.
 *
 * If a route is protected by `canLoad` guards, the preloaded will not load it.
 *
 * @publicApi
 */
var RouterPreloader = /** @class */ (function () {
    function RouterPreloader(router, moduleLoader, compiler, injector, preloadingStrategy) {
        this.router = router;
        this.injector = injector;
        this.preloadingStrategy = preloadingStrategy;
        var onStartLoad = function (r) { return router.triggerEvent(new RouteConfigLoadStart(r)); };
        var onEndLoad = function (r) { return router.triggerEvent(new RouteConfigLoadEnd(r)); };
        this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);
    }
    RouterPreloader.prototype.setUpPreloading = function () {
        var _this = this;
        this.subscription =
            this.router.events
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(function (e) { return e instanceof NavigationEnd; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(function () { return _this.preload(); }))
                .subscribe(function () { });
    };
    RouterPreloader.prototype.preload = function () {
        var ngModule = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]);
        return this.processRoutes(ngModule, this.router.config);
    };
    // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If
    // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This
    // should be refactored.
    RouterPreloader.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };
    RouterPreloader.prototype.processRoutes = function (ngModule, routes) {
        var e_1, _a;
        var res = [];
        try {
            for (var routes_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {
                var route = routes_1_1.value;
                // we already have the config loaded, just recurse
                if (route.loadChildren && !route.canLoad && route._loadedConfig) {
                    var childConfig = route._loadedConfig;
                    res.push(this.processRoutes(childConfig.module, childConfig.routes));
                    // no config loaded, fetch the config
                }
                else if (route.loadChildren && !route.canLoad) {
                    res.push(this.preloadConfig(ngModule, route));
                    // recurse into children
                }
                else if (route.children) {
                    res.push(this.processRoutes(ngModule, route.children));
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);
            }
            finally { if (e_1) throw e_1.error; }
        }
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(res).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_) { return void 0; }));
    };
    RouterPreloader.prototype.preloadConfig = function (ngModule, route) {
        var _this = this;
        return this.preloadingStrategy.preload(route, function () {
            var loaded$ = _this.loader.load(ngModule.injector, route);
            return loaded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (config) {
                route._loadedConfig = config;
                return _this.processRoutes(config.module, config.routes);
            }));
        });
    };
    RouterPreloader = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Router, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"],
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"], PreloadingStrategy])
    ], RouterPreloader);
    return RouterPreloader;
}());

/**
 * @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 RouterScroller = /** @class */ (function () {
    function RouterScroller(router, 
    /** @docsNotRequired */ viewportScroller, options) {
        if (options === void 0) { options = {}; }
        this.router = router;
        this.viewportScroller = viewportScroller;
        this.options = options;
        this.lastId = 0;
        this.lastSource = 'imperative';
        this.restoredId = 0;
        this.store = {};
        // Default both options to 'disabled'
        options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';
        options.anchorScrolling = options.anchorScrolling || 'disabled';
    }
    RouterScroller.prototype.init = function () {
        // we want to disable the automatic scrolling because having two places
        // responsible for scrolling results race conditions, especially given
        // that browser don't implement this behavior consistently
        if (this.options.scrollPositionRestoration !== 'disabled') {
            this.viewportScroller.setHistoryScrollRestoration('manual');
        }
        this.routerEventsSubscription = this.createScrollEvents();
        this.scrollEventsSubscription = this.consumeScrollEvents();
    };
    RouterScroller.prototype.createScrollEvents = function () {
        var _this = this;
        return this.router.events.subscribe(function (e) {
            if (e instanceof NavigationStart) {
                // store the scroll position of the current stable navigations.
                _this.store[_this.lastId] = _this.viewportScroller.getScrollPosition();
                _this.lastSource = e.navigationTrigger;
                _this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;
            }
            else if (e instanceof NavigationEnd) {
                _this.lastId = e.id;
                _this.scheduleScrollEvent(e, _this.router.parseUrl(e.urlAfterRedirects).fragment);
            }
        });
    };
    RouterScroller.prototype.consumeScrollEvents = function () {
        var _this = this;
        return this.router.events.subscribe(function (e) {
            if (!(e instanceof Scroll))
                return;
            // a popstate event. The pop state event will always ignore anchor scrolling.
            if (e.position) {
                if (_this.options.scrollPositionRestoration === 'top') {
                    _this.viewportScroller.scrollToPosition([0, 0]);
                }
                else if (_this.options.scrollPositionRestoration === 'enabled') {
                    _this.viewportScroller.scrollToPosition(e.position);
                }
                // imperative navigation "forward"
            }
            else {
                if (e.anchor && _this.options.anchorScrolling === 'enabled') {
                    _this.viewportScroller.scrollToAnchor(e.anchor);
                }
                else if (_this.options.scrollPositionRestoration !== 'disabled') {
                    _this.viewportScroller.scrollToPosition([0, 0]);
                }
            }
        });
    };
    RouterScroller.prototype.scheduleScrollEvent = function (routerEvent, anchor) {
        this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));
    };
    RouterScroller.prototype.ngOnDestroy = function () {
        if (this.routerEventsSubscription) {
            this.routerEventsSubscription.unsubscribe();
        }
        if (this.scrollEventsSubscription) {
            this.scrollEventsSubscription.unsubscribe();
        }
    };
    return RouterScroller;
}());

/**
 * @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
 *
 * Contains a list of directives
 *
 *
 */
var ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];
/**
 * @description
 *
 * Is used in DI to configure the router.
 *
 * @publicApi
 */
var ROUTER_CONFIGURATION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTER_CONFIGURATION');
/**
 * @docsNotRequired
 */
var ROUTER_FORROOT_GUARD = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTER_FORROOT_GUARD');
var ROUTER_PROVIDERS = [
    _angular_common__WEBPACK_IMPORTED_MODULE_4__["Location"],
    { provide: UrlSerializer, useClass: DefaultUrlSerializer },
    {
        provide: Router,
        useFactory: setupRouter,
        deps: [
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"], UrlSerializer, ChildrenOutletContexts, _angular_common__WEBPACK_IMPORTED_MODULE_4__["Location"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"],
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"], ROUTES, ROUTER_CONFIGURATION,
            [UrlHandlingStrategy, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], [RouteReuseStrategy, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()]
        ]
    },
    ChildrenOutletContexts,
    { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"], useClass: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SystemJsNgModuleLoader"] },
    RouterPreloader,
    NoPreloading,
    PreloadAllModules,
    { provide: ROUTER_CONFIGURATION, useValue: { enableTracing: false } },
];
function routerNgProbeToken() {
    return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"]('Router', Router);
}
/**
 * @usageNotes
 *
 * RouterModule can be imported multiple times: once per lazily-loaded bundle.
 * Since the router deals with a global shared resource--location, we cannot have
 * more than one router service active.
 *
 * That is why there are two ways to create the module: `RouterModule.forRoot` and
 * `RouterModule.forChild`.
 *
 * * `forRoot` creates a module that contains all the directives, the given routes, and the router
 *   service itself.
 * * `forChild` creates a module that contains all the directives and the given routes, but does not
 *   include the router service.
 *
 * When registered at the root, the module should be used as follows
 *
 * ```
 * @NgModule({
 *   imports: [RouterModule.forRoot(ROUTES)]
 * })
 * class MyNgModule {}
 * ```
 *
 * For submodules and lazy loaded submodules the module should be used as follows:
 *
 * ```
 * @NgModule({
 *   imports: [RouterModule.forChild(ROUTES)]
 * })
 * class MyNgModule {}
 * ```
 *
 * @description
 *
 * Adds router directives and providers.
 *
 * Managing state transitions is one of the hardest parts of building applications. This is
 * especially true on the web, where you also need to ensure that the state is reflected in the URL.
 * In addition, we often want to split applications into multiple bundles and load them on demand.
 * Doing this transparently is not trivial.
 *
 * The Angular router solves these problems. Using the router, you can declaratively specify
 * application states, manage state transitions while taking care of the URL, and load bundles on
 * demand.
 *
 * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an
 * overview of how the router should be used.
 *
 * @publicApi
 */
var RouterModule = /** @class */ (function () {
    // Note: We are injecting the Router so it gets created eagerly...
    function RouterModule(guard, router) {
    }
    RouterModule_1 = RouterModule;
    /**
     * Creates a module with all the router providers and directives. It also optionally sets up an
     * application listener to perform an initial navigation.
     *
     * Options (see `ExtraOptions`):
     * * `enableTracing` makes the router log all its internal events to the console.
     * * `useHash` enables the location strategy that uses the URL fragment instead of the history
     * API.
     * * `initialNavigation` disables the initial navigation.
     * * `errorHandler` provides a custom error handler.
     * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).
     * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See
     * `ExtraOptions` for more details.
     * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data
     * from parent to child routes.
     */
    RouterModule.forRoot = function (routes, config) {
        return {
            ngModule: RouterModule_1,
            providers: [
                ROUTER_PROVIDERS,
                provideRoutes(routes),
                {
                    provide: ROUTER_FORROOT_GUARD,
                    useFactory: provideForRootGuard,
                    deps: [[Router, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"]()]]
                },
                { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },
                {
                    provide: _angular_common__WEBPACK_IMPORTED_MODULE_4__["LocationStrategy"],
                    useFactory: provideLocationStrategy,
                    deps: [
                        _angular_common__WEBPACK_IMPORTED_MODULE_4__["PlatformLocation"], [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"](_angular_common__WEBPACK_IMPORTED_MODULE_4__["APP_BASE_HREF"]), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], ROUTER_CONFIGURATION
                    ]
                },
                {
                    provide: RouterScroller,
                    useFactory: createRouterScroller,
                    deps: [Router, _angular_common__WEBPACK_IMPORTED_MODULE_4__["ViewportScroller"], ROUTER_CONFIGURATION]
                },
                {
                    provide: PreloadingStrategy,
                    useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :
                        NoPreloading
                },
                { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"], multi: true, useFactory: routerNgProbeToken },
                provideRouterInitializer(),
            ],
        };
    };
    /**
     * Creates a module with all the router directives and a provider registering routes.
     */
    RouterModule.forChild = function (routes) {
        return { ngModule: RouterModule_1, providers: [provideRoutes(routes)] };
    };
    var RouterModule_1;
    RouterModule = RouterModule_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
            declarations: ROUTER_DIRECTIVES,
            exports: ROUTER_DIRECTIVES,
            entryComponents: [EmptyOutletComponent]
        }),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"])(ROUTER_FORROOT_GUARD)), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"])()),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [Object, Router])
    ], RouterModule);
    return RouterModule;
}());
function createRouterScroller(router, viewportScroller, config) {
    if (config.scrollOffset) {
        viewportScroller.setOffset(config.scrollOffset);
    }
    return new RouterScroller(router, viewportScroller, config);
}
function provideLocationStrategy(platformLocationStrategy, baseHref, options) {
    if (options === void 0) { options = {}; }
    return options.useHash ? new _angular_common__WEBPACK_IMPORTED_MODULE_4__["HashLocationStrategy"](platformLocationStrategy, baseHref) :
        new _angular_common__WEBPACK_IMPORTED_MODULE_4__["PathLocationStrategy"](platformLocationStrategy, baseHref);
}
function provideForRootGuard(router) {
    if (router) {
        throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");
    }
    return 'guarded';
}
/**
 * @description
 *
 * Registers routes.
 *
 * @usageNotes
 * ### Example
 *
 * ```
 * @NgModule({
 *   imports: [RouterModule.forChild(ROUTES)],
 *   providers: [provideRoutes(EXTRA_ROUTES)]
 * })
 * class MyNgModule {}
 * ```
 *
 * @publicApi
 */
function provideRoutes(routes) {
    return [
        { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ANALYZE_FOR_ENTRY_COMPONENTS"], multi: true, useValue: routes },
        { provide: ROUTES, multi: true, useValue: routes },
    ];
}
function setupRouter(ref, urlSerializer, contexts, location, injector, loader, compiler, config, opts, urlHandlingStrategy, routeReuseStrategy) {
    if (opts === void 0) { opts = {}; }
    var router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));
    if (urlHandlingStrategy) {
        router.urlHandlingStrategy = urlHandlingStrategy;
    }
    if (routeReuseStrategy) {
        router.routeReuseStrategy = routeReuseStrategy;
    }
    if (opts.errorHandler) {
        router.errorHandler = opts.errorHandler;
    }
    if (opts.malformedUriErrorHandler) {
        router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
    }
    if (opts.enableTracing) {
        var dom_1 = Object(_angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__["ɵgetDOM"])();
        router.events.subscribe(function (e) {
            dom_1.logGroup("Router Event: " + e.constructor.name);
            dom_1.log(e.toString());
            dom_1.log(e);
            dom_1.logGroupEnd();
        });
    }
    if (opts.onSameUrlNavigation) {
        router.onSameUrlNavigation = opts.onSameUrlNavigation;
    }
    if (opts.paramsInheritanceStrategy) {
        router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
    }
    if (opts.urlUpdateStrategy) {
        router.urlUpdateStrategy = opts.urlUpdateStrategy;
    }
    if (opts.relativeLinkResolution) {
        router.relativeLinkResolution = opts.relativeLinkResolution;
    }
    return router;
}
function rootRoute(router) {
    return router.routerState.root;
}
/**
 * To initialize the router properly we need to do in two steps:
 *
 * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if
 * a resolver or a guards executes asynchronously. Second, we need to actually run
 * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation
 * hook provided by the router to do that.
 *
 * The router navigation starts, reaches the point when preactivation is done, and then
 * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.
 */
var RouterInitializer = /** @class */ (function () {
    function RouterInitializer(injector) {
        this.injector = injector;
        this.initNavigation = false;
        this.resultOfPreactivationDone = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
    }
    RouterInitializer.prototype.appInitializer = function () {
        var _this = this;
        var p = this.injector.get(_angular_common__WEBPACK_IMPORTED_MODULE_4__["LOCATION_INITIALIZED"], Promise.resolve(null));
        return p.then(function () {
            var resolve = null;
            var res = new Promise(function (r) { return resolve = r; });
            var router = _this.injector.get(Router);
            var opts = _this.injector.get(ROUTER_CONFIGURATION);
            if (_this.isLegacyDisabled(opts) || _this.isLegacyEnabled(opts)) {
                resolve(true);
            }
            else if (opts.initialNavigation === 'disabled') {
                router.setUpLocationChangeListener();
                resolve(true);
            }
            else if (opts.initialNavigation === 'enabled') {
                router.hooks.afterPreactivation = function () {
                    // only the initial navigation should be delayed
                    if (!_this.initNavigation) {
                        _this.initNavigation = true;
                        resolve(true);
                        return _this.resultOfPreactivationDone;
                        // subsequent navigations should not be delayed
                    }
                    else {
                        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null);
                    }
                };
                router.initialNavigation();
            }
            else {
                throw new Error("Invalid initialNavigation options: '" + opts.initialNavigation + "'");
            }
            return res;
        });
    };
    RouterInitializer.prototype.bootstrapListener = function (bootstrappedComponentRef) {
        var opts = this.injector.get(ROUTER_CONFIGURATION);
        var preloader = this.injector.get(RouterPreloader);
        var routerScroller = this.injector.get(RouterScroller);
        var router = this.injector.get(Router);
        var ref = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]);
        if (bootstrappedComponentRef !== ref.components[0]) {
            return;
        }
        if (this.isLegacyEnabled(opts)) {
            router.initialNavigation();
        }
        else if (this.isLegacyDisabled(opts)) {
            router.setUpLocationChangeListener();
        }
        preloader.setUpPreloading();
        routerScroller.init();
        router.resetRootComponentType(ref.componentTypes[0]);
        this.resultOfPreactivationDone.next(null);
        this.resultOfPreactivationDone.complete();
    };
    RouterInitializer.prototype.isLegacyEnabled = function (opts) {
        return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||
            opts.initialNavigation === undefined;
    };
    RouterInitializer.prototype.isLegacyDisabled = function (opts) {
        return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;
    };
    RouterInitializer = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]])
    ], RouterInitializer);
    return RouterInitializer;
}());
function getAppInitializer(r) {
    return r.appInitializer.bind(r);
}
function getBootstrapListener(r) {
    return r.bootstrapListener.bind(r);
}
/**
 * A token for the router initializer that will be called after the app is bootstrapped.
 *
 * @publicApi
 */
var ROUTER_INITIALIZER = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('Router Initializer');
function provideRouterInitializer() {
    return [
        RouterInitializer,
        {
            provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"],
            multi: true,
            useFactory: getAppInitializer,
            deps: [RouterInitializer]
        },
        { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer] },
        { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_BOOTSTRAP_LISTENER"], multi: true, useExisting: ROUTER_INITIALIZER },
    ];
}

/**
 * @license
 * Copyright Google 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
 */
/**
 * @publicApi
 */
var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('7.0.4');

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

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

/**
 * Generated bundle index. Do not edit.
 */


//# sourceMappingURL=router.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(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(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/index.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.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);
        }
    };
    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;
    };
    ComplexBase.prototype.clearTemplate = function (templateNames) {
        Object(_util__WEBPACK_IMPORTED_MODULE_1__["clearTemplate"])(this, templateNames);
    };
    ComplexBase.prototype.getProperties = function () {
        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;
        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);
        });
    };
    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;
        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;
        /* istanbul ignore next */
        this.hasNewChildren = (this.list.length !== this.children.length) ? true : null;
        /* istanbul ignore next */
        if (this.hasNewChildren) {
            this.list = this.children.map(function (child) {
                child.index = index++;
                child.property = _this.propertyName;
                return child;
            });
        }
        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;
        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(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/index.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/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 () {
            clearTimeout(changeTime);
        };
        this.finalUpdate = clearUpdate;
    };
    ;
    ComponentBase.prototype.ngOnInit = function () {
        var _this = this;
        this.registeredTemplate = {};
        this.ngBoundedEvents = {};
        this.isAngular = true;
        this.tags = this.tags || [];
        this.complexTemplate = this.complexTemplate || [];
        this.tagObjects = [];
        this.ngAttr = this.getAngularAttr(this.element);
        /* istanbul ignore next */
        this.createElement = function (tagName, prop) {
            //tslint:disable-next-line
            var ele = _this.srenderer ? _this.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 (_this.ngAttr !== undefined) {
                ele.setAttribute(_this.ngAttr, '');
            }
            if (prop.attrs !== undefined) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(ele, prop.attrs);
            }
            return ele;
        };
        for (var _i = 0, _a = this.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), this),
                name: tag
            };
            this.tagObjects.push(tagObject);
        }
        var complexTemplates = Object.keys(this);
        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, this), val);
            this.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++) {
            if (/_ngcontent/g.test(attributes[i].name)) {
                ngAr = attributes[i].name;
            }
        }
        return ngAr;
    };
    ;
    ComponentBase.prototype.ngAfterViewInit = function () {
        var _this = this;
        // Used setTimeout for template binding
        // Refer Link: https://github.com/angular/angular/issues/6005
        setTimeout(function () {
            /* istanbul ignore else  */
            if (typeof window !== 'undefined') {
                _this.appendTo(_this.element);
            }
        });
    };
    ComponentBase.prototype.ngOnDestroy = function () {
        /* istanbul ignore else  */
        if (typeof window !== 'undefined' && this.element.classList.contains('e-control')) {
            this.destroy();
            this.clearTemplate(null);
        }
    };
    //tslint:disable-next-line
    ComponentBase.prototype.clearTemplate = function (templateNames, index) {
        Object(_util__WEBPACK_IMPORTED_MODULE_2__["clearTemplate"])(this, templateNames, index);
    };
    ;
    ComponentBase.prototype.ngAfterContentChecked = function () {
        for (var _i = 0, _a = this.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 = {};
                    propObj[tagObject.name] = tagObject.instance.getProperties();
                    this.setProperties(propObj, tagObject.instance.isInitChanges);
                }
                else {
                    for (var _b = 0, _c = tagObject.instance.list; _b < _c.length; _b++) {
                        var list = _c[_b];
                        if (list.hasChanges) {
                            var curIndex = tagObject.instance.list.indexOf(list);
                            var curChild = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(tagObject.name, this)[curIndex];
                            if (curChild !== undefined && curChild.setProperties !== undefined) {
                                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 (prop) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, this_1);
            Object.defineProperty(this_1, prop, {
                get: function () {
                    return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, _this.properties);
                },
                set: function (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(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/index.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 {
                    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);
    };
    FormBase.prototype.ngAfterViewInit = function () {
        // 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') {
            this.appendTo(this.element);
            var ele = this.inputElement || this.element;
            ele.addEventListener('focus', this.ngOnFocus.bind(this));
            ele.addEventListener('blur', this.ngOnBlur.bind(this));
        }
        // });
    };
    FormBase.prototype.setDisabledState = function (disabled) {
        this.enabled = !disabled;
        this.disabled = disabled;
    };
    FormBase.prototype.writeValue = function (value) {
        //update control value from angular
        if (this.checked === undefined) {
            this.value = value;
        }
        else {
            if (typeof value === 'boolean') {
                this.checked = value;
            }
            else {
                this.checked = value === this.value;
            }
        }
        if (value === null) {
            return;
        }
        this.angularValue = value;
        // 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);
        }
    };
    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(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(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/index.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 };
            var conRef = contRef_1 ? contRef_1 : component.viewContainerRef;
            var viewRef = conRef.createEmbeddedView(templateEle, context);
            viewRef.markForCheck();
            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 () {
        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(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/fesm5/core.js");

/**
 * Angular Utility Module
 */
/* tslint:disable */
function applyMixins(derivedClass, baseClass) {
    baseClass.forEach(function (baseClass) {
        Object.getOwnPropertyNames(baseClass.prototype).forEach(function (name) {
            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) {
        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) {
                        var pNode = rt._view.renderer.parentNode(rt.rootNodes[0]);
                        for (var m = 0; m < rt.rootNodes.length; m++) {
                            pNode.appendChild(rt.rootNodes[m]);
                        }
                        rt.destroy();
                    }
                }
            }
            delete _this.registeredTemplate[registeredTemplate];
        }
    }
    var _loop_1 = function (tagObject) {
        if (tagObject.instance) {
            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('.');
    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-charts/@syncfusion/ej2-angular-charts.es5.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-angular-charts/@syncfusion/ej2-angular-charts.es5.js ***!
  \*******************************************************************************************/
/*! exports provided: TrendlineDirective, TrendlinesDirective, SegmentDirective, SegmentsDirective, SeriesDirective, SeriesCollectionDirective, StripLineDirective, StripLinesDirective, CategoryDirective, CategoriesDirective, MultiLevelLabelDirective, MultiLevelLabelsDirective, AxisDirective, AxesDirective, RowDirective, RowsDirective, ColumnDirective, ColumnsDirective, AnnotationDirective, AnnotationsDirective, SelectedDataIndexDirective, SelectedDataIndexesDirective, IndicatorDirective, IndicatorsDirective, ChartComponent, ChartModule, ChartAllModule, LineSeriesService, ScatterSeriesService, ColumnSeriesService, SplineSeriesService, SplineAreaSeriesService, StripLineService, AreaSeriesService, ScrollBarService, StepLineSeriesService, StepAreaSeriesService, StackingColumnSeriesService, StackingLineSeriesService, StackingAreaSeriesService, BarSeriesService, StackingBarSeriesService, RangeColumnSeriesService, BubbleSeriesService, TooltipService, CrosshairService, CategoryService, DateTimeService, LogarithmicService, LegendService, ZoomService, DataLabelService, SelectionService, ChartAnnotationService, HiloSeriesService, HiloOpenCloseSeriesService, WaterfallSeriesService, RangeAreaSeriesService, CandleSeriesService, PolarSeriesService, RadarSeriesService, SmaIndicatorService, TmaIndicatorService, EmaIndicatorService, AccumulationDistributionIndicatorService, MacdIndicatorService, AtrIndicatorService, RsiIndicatorService, MomentumIndicatorService, StochasticIndicatorService, BollingerBandsService, BoxAndWhiskerSeriesService, HistogramSeriesService, ErrorBarService, TrendlinesService, DateTimeCategoryService, MultiColoredLineSeriesService, MultiColoredAreaSeriesService, MultiLevelLabelService, ParetoSeriesService, ExportService, DataEditingService, AccumulationSeriesDirective, AccumulationSeriesCollectionDirective, AccumulationAnnotationDirective, AccumulationAnnotationsDirective, AccumulationChartComponent, AccumulationChartModule, AccumulationChartAllModule, PieSeriesService, FunnelSeriesService, PyramidSeriesService, AccumulationTooltipService, AccumulationLegendService, AccumulationSelectionService, AccumulationDataLabelService, AccumulationAnnotationService, RangenavigatorSeriesDirective, RangenavigatorSeriesCollectionDirective, RangeNavigatorComponent, RangeNavigatorModule, RangeNavigatorAllModule, RangeTooltipService, PeriodSelectorService, RangeBandSettingDirective, RangeBandSettingsDirective, SparklineComponent, SparklineModule, SparklineAllModule, SparklineTooltipService, SmithchartSeriesDirective, SmithchartSeriesCollectionDirective, SmithchartComponent, SmithchartModule, SmithchartAllModule, SmithchartLegendService, TooltipRenderService, StockChartTrendlineDirective, StockChartTrendlinesDirective, StockChartSeriesDirective, StockChartSeriesCollectionDirective, StockChartStripLineDirective, StockChartStripLinesDirective, StockChartAxisDirective, StockChartAxesDirective, StockChartRowDirective, StockChartRowsDirective, StockChartAnnotationDirective, StockChartAnnotationsDirective, StockChartSelectedDataIndexDirective, StockChartSelectedDataIndexesDirective, StockChartPeriodDirective, StockChartPeriodsDirective, StockEventDirective, StockEventsDirective, StockChartIndicatorDirective, StockChartIndicatorsDirective, StockChartComponent, StockChartModule, StockChartAllModule, ɵc, ɵd, ɵa, ɵb, ɵe, ɵf, ɵi, ɵj, ɵg, ɵh, ɵk, ɵl, CrosshairSettings, ZoomSettings, Chart, Row, Column, MajorGridLines, MinorGridLines, AxisLine, MajorTickLines, MinorTickLines, CrosshairTooltip, Axis, VisibleLabels, DateTime, Category, Logarithmic, DateTimeCategory, NiceInterval, StripLine, Connector, Font, Border, ChartArea, Margin, Animation, Indexes, CornerRadius, Index, EmptyPointSettings, DragSettings, TooltipSettings, Periods, PeriodSelectorSettings, LineSeries, ColumnSeries, AreaSeries, BarSeries, PolarSeries, RadarSeries, StackingBarSeries, CandleSeries, StackingColumnSeries, StepLineSeries, StepAreaSeries, StackingAreaSeries, StackingLineSeries, ScatterSeries, RangeColumnSeries, WaterfallSeries, HiloSeries, HiloOpenCloseSeries, RangeAreaSeries, BubbleSeries, SplineSeries, HistogramSeries, SplineAreaSeries, TechnicalIndicator, SmaIndicator, EmaIndicator, TmaIndicator, AccumulationDistributionIndicator, AtrIndicator, MomentumIndicator, RsiIndicator, StochasticIndicator, BollingerBands, MacdIndicator, Trendlines, sort, isBreakLabel, rotateTextSize, removeElement, logBase, showTooltip, inside, withIn, logWithIn, withInRange, sum, subArraySum, subtractThickness, subtractRect, degreeToLocation, getAngle, subArray, valueToCoefficient, TransformToVisible, indexFinder, CoefficientToVector, valueToPolarCoefficient, Mean, PolarArc, createTooltip, createZoomingLabels, withInBounds, getValueXByPoint, getValueYByPoint, findClipRect, firstToLowerCase, getTransform, getMinPointsDelta, getAnimationFunction, linear, markerAnimate, animateRectElement, pathAnimation, appendClipElement, triggerLabelRender, setRange, getActualDesiredIntervalsCount, templateAnimate, drawSymbol, calculateShapes, getRectLocation, minMax, getElement, getTemplateFunction, createTemplate, getFontStyle, measureElementRect, findlElement, getPoint, appendElement, appendChildElement, getDraggedRectLocation, checkBounds, getLabelText, stopTimer, isCollide, isOverlap, containsRect, calculateRect, convertToHexCode, componentToHex, convertHexToColor, colorNameToHex, getSaturationColor, getMedian, calculateLegendShapes, textTrim, lineBreakLabelTrim, stringToNumber, redrawElement, animateRedrawElement, textElement, calculateSize, createSvg, getTitle, titlePositionX, textWrap, blazorTemplatesReset, CustomizeOption, StackValues, RectOption, CircleOption, PolygonOption, ChartLocation, Thickness, ColorValue, PointData, AccPointData, ControlPoints, Crosshair, Tooltip, Zoom, Selection, DataEditing, DataLabel, ErrorBar, DataLabelSettings, MarkerSettings, Points, Trendline, ErrorBarCapSettings, ChartSegment, ErrorBarSettings, SeriesBase, Series, Legend, ChartAnnotation, ChartAnnotationSettings, LabelBorder, MultiLevelCategories, StripLineSettings, MultiLevelLabels, ScrollbarSettingsRange, ScrollbarSettings, BoxAndWhiskerSeries, MultiColoredAreaSeries, MultiColoredLineSeries, MultiColoredSeries, MultiLevelLabel, ScrollBar, ParetoSeries, Export, AccumulationChart, AccumulationAnnotationSettings, AccumulationDataLabelSettings, PieCenter, AccPoints, AccumulationSeries, getSeriesFromIndex, pointByIndex, PieSeries, FunnelSeries, PyramidSeries, AccumulationLegend, AccumulationDataLabel, AccumulationTooltip, AccumulationSelection, AccumulationAnnotation, StockChart, StockChartFont, StockChartBorder, StockChartArea, StockMargin, StockChartStripLineSettings, StockEmptyPointSettings, StockChartConnector, StockSeries, StockChartIndicator, StockChartAxis, StockChartRow, StockChartTrendline, StockChartAnnotationSettings, StockChartIndexes, StockEventsSettings, loaded, legendClick, load, animationComplete, legendRender, textRender, pointRender, seriesRender, axisLabelRender, axisRangeCalculated, axisMultiLabelRender, tooltipRender, chartMouseMove, chartMouseClick, pointClick, pointMove, chartMouseLeave, chartMouseDown, chartMouseUp, zoomComplete, dragComplete, resized, beforePrint, annotationRender, scrollStart, scrollEnd, scrollChanged, stockEventRender, multiLevelLabelClick, dragStart, drag, dragEnd, Theme, getSeriesColor, getThemeColor, getScrollbarThemeColor, PeriodSelector, RangeNavigator, rangeValueToCoefficient, getXLocation, getRangeValueXByPoint, getExactData, getNearestValue, DataPoint, RangeNavigatorTheme, getRangeThemeColor, RangeNavigatorAxis, RangeSeries, RangeSlider, RangeNavigatorSeries, ThumbSettings, StyleSettings, RangeTooltipSettings, Double, RangeTooltip, Smithchart, SmithchartMajorGridLines, SmithchartMinorGridLines, SmithchartAxisLine, SmithchartAxis, LegendTitle, LegendLocation, LegendItemStyleBorder, LegendItemStyle, LegendBorder, SmithchartLegendSettings, SeriesTooltipBorder, SeriesTooltip, SeriesMarkerBorder, SeriesMarkerDataLabelBorder, SeriesMarkerDataLabelConnectorLine, SeriesMarkerDataLabel, SeriesMarker, SmithchartSeries, TooltipRender, Subtitle, Title, SmithchartFont, SmithchartMargin, SmithchartBorder, SmithchartRect, LabelCollection, LegendSeries, LabelRegion, HorizontalLabelCollection, RadialLabelCollections, LineSegment, PointRegion, Point, ClosestPoint, MarkerOptions, SmithchartLabelPosition, Direction, DataLabelTextOptions, LabelOption, SmithchartSize, GridArcPoints, smithchartBeforePrint, SmithchartLegend, Sparkline, SparklineTooltip, SparklineBorder, SparklineFont, TrackLineSettings, SparklineTooltipSettings, ContainerArea, LineSettings, RangeBandSettings, AxisSettings, Padding, SparklineMarkerSettings, LabelOffset, SparklineDataLabelSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TrendlineDirective", function() { return TrendlineDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TrendlinesDirective", function() { return TrendlinesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SegmentDirective", function() { return SegmentDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SegmentsDirective", function() { return SegmentsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesDirective", function() { return SeriesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesCollectionDirective", function() { return SeriesCollectionDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StripLineDirective", function() { return StripLineDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StripLinesDirective", function() { return StripLinesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CategoryDirective", function() { return CategoryDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CategoriesDirective", function() { return CategoriesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLevelLabelDirective", function() { return MultiLevelLabelDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLevelLabelsDirective", function() { return MultiLevelLabelsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AxisDirective", function() { return AxisDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AxesDirective", function() { return AxesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowDirective", function() { return RowDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowsDirective", function() { return RowsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnDirective", function() { return ColumnDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnsDirective", function() { return ColumnsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnnotationDirective", function() { return AnnotationDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnnotationsDirective", function() { return AnnotationsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectedDataIndexDirective", function() { return SelectedDataIndexDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectedDataIndexesDirective", function() { return SelectedDataIndexesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndicatorDirective", function() { return IndicatorDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndicatorsDirective", function() { return IndicatorsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartComponent", function() { return ChartComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartModule", function() { return ChartModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartAllModule", function() { return ChartAllModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineSeriesService", function() { return LineSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScatterSeriesService", function() { return ScatterSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnSeriesService", function() { return ColumnSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplineSeriesService", function() { return SplineSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplineAreaSeriesService", function() { return SplineAreaSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StripLineService", function() { return StripLineService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AreaSeriesService", function() { return AreaSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollBarService", function() { return ScrollBarService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StepLineSeriesService", function() { return StepLineSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StepAreaSeriesService", function() { return StepAreaSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackingColumnSeriesService", function() { return StackingColumnSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackingLineSeriesService", function() { return StackingLineSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackingAreaSeriesService", function() { return StackingAreaSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarSeriesService", function() { return BarSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackingBarSeriesService", function() { return StackingBarSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeColumnSeriesService", function() { return RangeColumnSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BubbleSeriesService", function() { return BubbleSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipService", function() { return TooltipService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CrosshairService", function() { return CrosshairService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CategoryService", function() { return CategoryService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateTimeService", function() { return DateTimeService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LogarithmicService", function() { return LogarithmicService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LegendService", function() { return LegendService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZoomService", function() { return ZoomService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataLabelService", function() { return DataLabelService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionService", function() { return SelectionService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartAnnotationService", function() { return ChartAnnotationService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HiloSeriesService", function() { return HiloSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HiloOpenCloseSeriesService", function() { return HiloOpenCloseSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WaterfallSeriesService", function() { return WaterfallSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeAreaSeriesService", function() { return RangeAreaSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CandleSeriesService", function() { return CandleSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PolarSeriesService", function() { return PolarSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RadarSeriesService", function() { return RadarSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmaIndicatorService", function() { return SmaIndicatorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TmaIndicatorService", function() { return TmaIndicatorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmaIndicatorService", function() { return EmaIndicatorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationDistributionIndicatorService", function() { return AccumulationDistributionIndicatorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MacdIndicatorService", function() { return MacdIndicatorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AtrIndicatorService", function() { return AtrIndicatorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RsiIndicatorService", function() { return RsiIndicatorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MomentumIndicatorService", function() { return MomentumIndicatorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StochasticIndicatorService", function() { return StochasticIndicatorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BollingerBandsService", function() { return BollingerBandsService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BoxAndWhiskerSeriesService", function() { return BoxAndWhiskerSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HistogramSeriesService", function() { return HistogramSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorBarService", function() { return ErrorBarService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TrendlinesService", function() { return TrendlinesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateTimeCategoryService", function() { return DateTimeCategoryService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiColoredLineSeriesService", function() { return MultiColoredLineSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiColoredAreaSeriesService", function() { return MultiColoredAreaSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLevelLabelService", function() { return MultiLevelLabelService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParetoSeriesService", function() { return ParetoSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportService", function() { return ExportService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataEditingService", function() { return DataEditingService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationSeriesDirective", function() { return AccumulationSeriesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationSeriesCollectionDirective", function() { return AccumulationSeriesCollectionDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationAnnotationDirective", function() { return AccumulationAnnotationDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationAnnotationsDirective", function() { return AccumulationAnnotationsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationChartComponent", function() { return AccumulationChartComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationChartModule", function() { return AccumulationChartModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationChartAllModule", function() { return AccumulationChartAllModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PieSeriesService", function() { return PieSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunnelSeriesService", function() { return FunnelSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PyramidSeriesService", function() { return PyramidSeriesService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationTooltipService", function() { return AccumulationTooltipService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationLegendService", function() { return AccumulationLegendService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationSelectionService", function() { return AccumulationSelectionService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationDataLabelService", function() { return AccumulationDataLabelService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationAnnotationService", function() { return AccumulationAnnotationService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangenavigatorSeriesDirective", function() { return RangenavigatorSeriesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangenavigatorSeriesCollectionDirective", function() { return RangenavigatorSeriesCollectionDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorComponent", function() { return RangeNavigatorComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorModule", function() { return RangeNavigatorModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorAllModule", function() { return RangeNavigatorAllModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeTooltipService", function() { return RangeTooltipService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeriodSelectorService", function() { return PeriodSelectorService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeBandSettingDirective", function() { return RangeBandSettingDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeBandSettingsDirective", function() { return RangeBandSettingsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineComponent", function() { return SparklineComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineModule", function() { return SparklineModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineAllModule", function() { return SparklineAllModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineTooltipService", function() { return SparklineTooltipService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartSeriesDirective", function() { return SmithchartSeriesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartSeriesCollectionDirective", function() { return SmithchartSeriesCollectionDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartComponent", function() { return SmithchartComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartModule", function() { return SmithchartModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartAllModule", function() { return SmithchartAllModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartLegendService", function() { return SmithchartLegendService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipRenderService", function() { return TooltipRenderService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartTrendlineDirective", function() { return StockChartTrendlineDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartTrendlinesDirective", function() { return StockChartTrendlinesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartSeriesDirective", function() { return StockChartSeriesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartSeriesCollectionDirective", function() { return StockChartSeriesCollectionDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartStripLineDirective", function() { return StockChartStripLineDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartStripLinesDirective", function() { return StockChartStripLinesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartAxisDirective", function() { return StockChartAxisDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartAxesDirective", function() { return StockChartAxesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartRowDirective", function() { return StockChartRowDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartRowsDirective", function() { return StockChartRowsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartAnnotationDirective", function() { return StockChartAnnotationDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartAnnotationsDirective", function() { return StockChartAnnotationsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartSelectedDataIndexDirective", function() { return StockChartSelectedDataIndexDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartSelectedDataIndexesDirective", function() { return StockChartSelectedDataIndexesDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartPeriodDirective", function() { return StockChartPeriodDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartPeriodsDirective", function() { return StockChartPeriodsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockEventDirective", function() { return StockEventDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockEventsDirective", function() { return StockEventsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartIndicatorDirective", function() { return StockChartIndicatorDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartIndicatorsDirective", function() { return StockChartIndicatorsDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartComponent", function() { return StockChartComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartModule", function() { return StockChartModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartAllModule", function() { return StockChartAllModule; });
/* 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$15; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa", function() { return inputs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵb", function() { return outputs$12; });
/* 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$17; });
/* 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$21; });
/* 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$19; });
/* 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$32; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-angular-base */ "./node_modules/@syncfusion/ej2-angular-base/index.js");
/* harmony import */ var _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-charts */ "./node_modules/@syncfusion/ej2-charts/index.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CrosshairSettings", function() { return _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["CrosshairSettings"]; });

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var input = ['animation', 'backwardForecast', 'enableTooltip', 'fill', 'forwardForecast', 'intercept', 'legendShape', 'marker', 'name', 'period', 'polynomialOrder', 'type', 'width'];
var outputs = [];
/**
 * Series Directive
 * ```html
 * <e-series-collection>
 * <e-series>
 * <e-trendlines>
 * <e-trendline>
 * </e-trendline>
 * </e-trendlines>
 * </e-series-collection>
 * ```
 */
var TrendlineDirective = /** @class */ (function (_super) {
    __extends(TrendlineDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function TrendlineDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs);
        return _this;
    }
    return TrendlineDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
TrendlineDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-series>e-trendlines>e-trendline',
                inputs: input,
                outputs: outputs,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
TrendlineDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * Trendline Array Directive
 */
var TrendlinesDirective = /** @class */ (function (_super) {
    __extends(TrendlinesDirective, _super);
    function TrendlinesDirective() {
        return _super.call(this, 'trendlines') || this;
    }
    return TrendlinesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
TrendlinesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-series>e-trendlines',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](TrendlineDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
TrendlinesDirective.ctorParameters = function () { return []; };
var input$1 = ['color', 'dashArray', 'value'];
var outputs$1 = [];
/**
 * Series Directive
 * ```html
 * <e-series-collection>
 * <e-series>
 * <e-segments>
 * <e-segment>
 * </e-segment>
 * </e-segments>
 * </e-series-collection>
 * ```
 */
var SegmentDirective = /** @class */ (function (_super) {
    __extends(SegmentDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function SegmentDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$1);
        return _this;
    }
    return SegmentDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
SegmentDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-series>e-segments>e-segment',
                inputs: input$1,
                outputs: outputs$1,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
SegmentDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * Segment Array Directive
 */
var SegmentsDirective = /** @class */ (function (_super) {
    __extends(SegmentsDirective, _super);
    function SegmentsDirective() {
        return _super.call(this, 'segments') || this;
    }
    return SegmentsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
SegmentsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-series>e-segments',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](SegmentDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
SegmentsDirective.ctorParameters = function () { return []; };
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 input$2 = ['animation', 'bearFillColor', 'binInterval', 'border', 'boxPlotMode', 'bullFillColor', 'cardinalSplineTension', 'close', 'columnSpacing', 'columnWidth', 'connector', 'cornerRadius', 'dashArray', 'dataSource', 'dragSettings', 'drawType', 'emptyPointSettings', 'enableComplexProperty', 'enableSolidCandles', 'enableTooltip', 'errorBar', 'fill', 'high', 'intermediateSumIndexes', 'isClosed', 'legendShape', 'low', 'marker', 'maxRadius', 'minRadius', 'name', 'negativeFillColor', 'opacity', 'open', 'pointColorMapping', 'query', 'segmentAxis', 'segments', 'selectionStyle', 'showMean', 'showNormalDistribution', 'size', 'splineType', 'stackingGroup', 'sumIndexes', 'summaryFillColor', 'tooltipMappingName', 'trendlines', 'type', 'visible', 'volume', 'width', 'xAxisName', 'xName', 'yAxisName', 'yName', 'zOrder'];
var outputs$2 = [];
/**
 * Series Directive
 * ```html
 * <e-series-collection>
 * <e-series></e-series>
 * </e-series-collection>
 * ```
 */
var SeriesDirective = /** @class */ (function (_super) {
    __extends(SeriesDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function SeriesDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        _this.tags = ['trendlines', 'segments'];
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$2);
        return _this;
    }
    return SeriesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
SeriesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-series-collection>e-series',
                inputs: input$2,
                outputs: outputs$2,
                queries: {
                    childTrendlines: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](TrendlinesDirective),
                    childSegments: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](SegmentsDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
SeriesDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
SeriesDirective.propDecorators = {
    'dataLabel_template': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: ['dataLabelTemplate',] },],
};
__decorate([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["Template"])(),
    __metadata("design:type", Object)
], SeriesDirective.prototype, "dataLabel_template", void 0);
/**
 * Series Array Directive
 */
var SeriesCollectionDirective = /** @class */ (function (_super) {
    __extends(SeriesCollectionDirective, _super);
    function SeriesCollectionDirective() {
        return _super.call(this, 'series') || this;
    }
    return SeriesCollectionDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
SeriesCollectionDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ej-chart>e-series-collection',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](SeriesDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
SeriesCollectionDirective.ctorParameters = function () { return []; };
var input$3 = ['border', 'color', 'dashArray', 'end', 'horizontalAlignment', 'isRepeat', 'isSegmented', 'opacity', 'repeatEvery', 'repeatUntil', 'rotation', 'segmentAxisName', 'segmentEnd', 'segmentStart', 'size', 'sizeType', 'start', 'startFromAxis', 'text', 'textStyle', 'verticalAlignment', 'visible', 'zIndex'];
var outputs$3 = [];
/**
 * StripLine Directive
 * ```html
 * <e-axis>
 * <e-striplines>
 * <e-stripline></e-stripline>
 * </e-striplines>
 * </e-axis>
 * ```
 */
var StripLineDirective = /** @class */ (function (_super) {
    __extends(StripLineDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StripLineDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$3);
        return _this;
    }
    return StripLineDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StripLineDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-axis>e-striplines>e-stripline',
                inputs: input$3,
                outputs: outputs$3,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
StripLineDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StripLine Array Directive
 */
var StripLinesDirective = /** @class */ (function (_super) {
    __extends(StripLinesDirective, _super);
    function StripLinesDirective() {
        return _super.call(this, 'striplines') || this;
    }
    return StripLinesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StripLinesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-axis>e-striplines',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StripLineDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StripLinesDirective.ctorParameters = function () { return []; };
var input$4 = ['customAttributes', 'end', 'maximumTextWidth', 'start', 'text', 'type'];
var outputs$4 = [];
/**
 * MultiLevelLabels Directive
 * ```html
 * <e-multilevellabels>
 * <e-multilevellabel>
 * <e-Categories>
 * <e-Category>
 * </e-Category>
 * </e-Categories>
 * </e-multilevellabel>
 * </e-multilevellabels>
 * ```
 */
var CategoryDirective = /** @class */ (function (_super) {
    __extends(CategoryDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function CategoryDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$4);
        return _this;
    }
    return CategoryDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
CategoryDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-multilevellabel>e-categories>e-category',
                inputs: input$4,
                outputs: outputs$4,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
CategoryDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * Category Array Directive
 */
var CategoriesDirective = /** @class */ (function (_super) {
    __extends(CategoriesDirective, _super);
    function CategoriesDirective() {
        return _super.call(this, 'categories') || this;
    }
    return CategoriesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
CategoriesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-multilevellabel>e-categories',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](CategoryDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
CategoriesDirective.ctorParameters = function () { return []; };
var input$5 = ['alignment', 'border', 'categories', 'overflow', 'textStyle'];
var outputs$5 = [];
/**
 * MultiLevelLabel Directive
 * ```html
 * <e-axis>
 * <e-multilevellabels>
 * <e-multilevellabel></e-multilevellabel>
 * </e-multilevellabels>
 * </e-axis>
 * ```
 */
var MultiLevelLabelDirective = /** @class */ (function (_super) {
    __extends(MultiLevelLabelDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function MultiLevelLabelDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        _this.tags = ['categories'];
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$5);
        return _this;
    }
    return MultiLevelLabelDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
MultiLevelLabelDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-axis>e-multilevellabels>e-multilevellabel',
                inputs: input$5,
                outputs: outputs$5,
                queries: {
                    childCategories: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](CategoriesDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
MultiLevelLabelDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * MultiLevelLabel Array Directive
 */
var MultiLevelLabelsDirective = /** @class */ (function (_super) {
    __extends(MultiLevelLabelsDirective, _super);
    function MultiLevelLabelsDirective() {
        return _super.call(this, 'multilevellabels') || this;
    }
    return MultiLevelLabelsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
MultiLevelLabelsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-axis>e-multilevellabels',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](MultiLevelLabelDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
MultiLevelLabelsDirective.ctorParameters = function () { return []; };
var input$6 = ['border', 'coefficient', 'columnIndex', 'crossesAt', 'crossesInAxis', 'crosshairTooltip', 'description', 'desiredIntervals', 'edgeLabelPlacement', 'enableAutoIntervalOnZooming', 'enableTrim', 'interval', 'intervalType', 'isIndexed', 'isInversed', 'labelFormat', 'labelIntersectAction', 'labelPlacement', 'labelPosition', 'labelRotation', 'labelStyle', 'lineStyle', 'logBase', 'majorGridLines', 'majorTickLines', 'maximum', 'maximumLabelWidth', 'maximumLabels', 'minimum', 'minorGridLines', 'minorTickLines', 'minorTicksPerInterval', 'multiLevelLabels', 'name', 'opposedPosition', 'placeNextToAxisLine', 'plotOffset', 'rangePadding', 'rowIndex', 'scrollbarSettings', 'skeleton', 'skeletonType', 'span', 'startAngle', 'stripLines', 'tabIndex', 'tickPosition', 'title', 'titleStyle', 'valueType', 'visible', 'zoomFactor', 'zoomPosition'];
var outputs$6 = [];
/**
 * Axis Directive
 * ```html
 * <e-axes><e-axis></e-axis></e-axes>
 * ```
 */
var AxisDirective = /** @class */ (function (_super) {
    __extends(AxisDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function AxisDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        _this.tags = ['stripLines', 'multiLevelLabels'];
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$6);
        return _this;
    }
    return AxisDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
AxisDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-axes>e-axis',
                inputs: input$6,
                outputs: outputs$6,
                queries: {
                    childStripLines: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StripLinesDirective),
                    childMultiLevelLabels: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](MultiLevelLabelsDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
AxisDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * Axis Array Directive
 */
var AxesDirective = /** @class */ (function (_super) {
    __extends(AxesDirective, _super);
    function AxesDirective() {
        return _super.call(this, 'axes') || this;
    }
    return AxesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
AxesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-chart>e-axes',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](AxisDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
AxesDirective.ctorParameters = function () { return []; };
var input$7 = ['border', 'height'];
var outputs$7 = [];
/**
 * Row Directive
 * ```html
 * <e-rows><e-row></e-row><e-rows>
 * ```
 */
var RowDirective = /** @class */ (function (_super) {
    __extends(RowDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function RowDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$7);
        return _this;
    }
    return RowDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
RowDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-rows>e-row',
                inputs: input$7,
                outputs: outputs$7,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
RowDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * Row Array Directive
 */
var RowsDirective = /** @class */ (function (_super) {
    __extends(RowsDirective, _super);
    function RowsDirective() {
        return _super.call(this, 'rows') || this;
    }
    return RowsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
RowsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-chart>e-rows',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](RowDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
RowsDirective.ctorParameters = function () { return []; };
var input$8 = ['border', 'width'];
var outputs$8 = [];
/**
 * Column Directive
 * ```html
 * <e-columns><e-column></e-column><e-columns>
 * ```
 */
var ColumnDirective = /** @class */ (function (_super) {
    __extends(ColumnDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function ColumnDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$8);
        return _this;
    }
    return ColumnDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
ColumnDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-columns>e-column',
                inputs: input$8,
                outputs: outputs$8,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
ColumnDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * Column Array Directive
 */
var ColumnsDirective = /** @class */ (function (_super) {
    __extends(ColumnsDirective, _super);
    function ColumnsDirective() {
        return _super.call(this, 'columns') || this;
    }
    return ColumnsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
ColumnsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-chart>e-columns',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](ColumnDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
ColumnsDirective.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 input$9 = ['content', 'coordinateUnits', 'description', 'horizontalAlignment', 'region', 'verticalAlignment', 'x', 'xAxisName', 'y', 'yAxisName'];
var outputs$9 = [];
/**
 * Annotation Directive
 * ```html
 * <e-annotations><e-annotation></e-annotation><e-annotations>
 * ```
 */
var AnnotationDirective = /** @class */ (function (_super) {
    __extends(AnnotationDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function AnnotationDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$9);
        return _this;
    }
    return AnnotationDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
AnnotationDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-annotations>e-annotation',
                inputs: input$9,
                outputs: outputs$9,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
AnnotationDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
AnnotationDirective.propDecorators = {
    'content': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: ['content',] },],
};
__decorate$1([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["Template"])(),
    __metadata$1("design:type", Object)
], AnnotationDirective.prototype, "content", void 0);
/**
 * Annotation Array Directive
 */
var AnnotationsDirective = /** @class */ (function (_super) {
    __extends(AnnotationsDirective, _super);
    function AnnotationsDirective() {
        return _super.call(this, 'annotations') || this;
    }
    return AnnotationsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
AnnotationsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-chart>e-annotations',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](AnnotationDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
AnnotationsDirective.ctorParameters = function () { return []; };
var input$10 = ['point', 'series'];
var outputs$10 = [];
/**
 * Selected Data Directive
 * ```html
 * <e-selecteddataindexes><e-selecteddataindex></e-selecteddataindex><e-selecteddataindexes>
 * ```
 */
var SelectedDataIndexDirective = /** @class */ (function (_super) {
    __extends(SelectedDataIndexDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function SelectedDataIndexDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$10);
        return _this;
    }
    return SelectedDataIndexDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
SelectedDataIndexDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-selecteddataindexes>e-selecteddataindex',
                inputs: input$10,
                outputs: outputs$10,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
SelectedDataIndexDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * SelectedDataIndex Array Directive
 */
var SelectedDataIndexesDirective = /** @class */ (function (_super) {
    __extends(SelectedDataIndexesDirective, _super);
    function SelectedDataIndexesDirective() {
        return _super.call(this, 'selecteddataindexes') || this;
    }
    return SelectedDataIndexesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
SelectedDataIndexesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-chart>e-selecteddataindexes',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](SelectedDataIndexDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
SelectedDataIndexesDirective.ctorParameters = function () { return []; };
var input$11 = ['animation', 'bandColor', 'close', 'dPeriod', 'dashArray', 'dataSource', 'enableComplexProperty', 'fastPeriod', 'field', 'fill', 'high', 'kPeriod', 'low', 'lowerLine', 'macdLine', 'macdNegativeColor', 'macdPositiveColor', 'macdType', 'open', 'overBought', 'overSold', 'period', 'periodLine', 'pointColorMapping', 'query', 'segmentAxis', 'segments', 'seriesName', 'showZones', 'slowPeriod', 'standardDeviation', 'type', 'upperLine', 'volume', 'width', 'xAxisName', 'xName', 'yAxisName'];
var outputs$11 = [];
/**
 * Indicator Directive
 * ```html
 * <e-indicators>
 * <e-indicator></e-indicator>
 * </e-indicators>
 * ```
 */
var IndicatorDirective = /** @class */ (function (_super) {
    __extends(IndicatorDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function IndicatorDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$11);
        return _this;
    }
    return IndicatorDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
IndicatorDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-indicators>e-indicator',
                inputs: input$11,
                outputs: outputs$11,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
IndicatorDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * Indicator Array Directive
 */
var IndicatorsDirective = /** @class */ (function (_super) {
    __extends(IndicatorsDirective, _super);
    function IndicatorsDirective() {
        return _super.call(this, 'indicators') || this;
    }
    return IndicatorsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
IndicatorsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ej-chart>e-indicators',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](IndicatorDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
IndicatorsDirective.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 = ['annotations', 'axes', 'background', 'border', 'chartArea', 'columns', 'crosshair', 'currencyCode', 'dataSource', 'description', 'enableAnimation', 'enableCanvas', 'enableExport', 'enablePersistence', 'enableRtl', 'enableSideBySidePlacement', 'height', 'indicators', 'isMultiSelect', 'isTransposed', 'legendSettings', 'locale', 'margin', 'palettes', 'primaryXAxis', 'primaryYAxis', 'rows', 'selectedDataIndexes', 'selectionMode', 'series', 'subTitle', 'subTitleStyle', 'tabIndex', 'theme', 'title', 'titleStyle', 'tooltip', 'useGroupingSeparator', 'width', 'zoomSettings'];
var outputs$12 = ['animationComplete', 'annotationRender', 'axisLabelRender', 'axisMultiLabelRender', 'axisRangeCalculated', 'beforePrint', 'chartMouseClick', 'chartMouseDown', 'chartMouseLeave', 'chartMouseMove', 'chartMouseUp', 'drag', 'dragComplete', 'dragEnd', 'dragStart', 'legendClick', 'legendRender', 'load', 'loaded', 'multiLevelLabelClick', 'pointClick', 'pointMove', 'pointRender', 'resized', 'scrollChanged', 'scrollEnd', 'scrollStart', 'seriesRender', 'textRender', 'tooltipRender', 'zoomComplete', 'dataSourceChange'];
var twoWays = ['dataSource'];
/**
 * Chart Component
 * ```html
 * <ejschart></ejschart>
 * ```
 */
var ChartComponent = /** @class */ (function (_super) {
    __extends(ChartComponent, _super);
    /**
     * @param {?} ngEle
     * @param {?} srenderer
     * @param {?} viewContainerRef
     * @param {?} injector
     */
    function ChartComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this = _super.call(this) || this;
        _this.ngEle = ngEle;
        _this.srenderer = srenderer;
        _this.viewContainerRef = viewContainerRef;
        _this.injector = injector;
        _this.tags = ['series', 'axes', 'rows', 'columns', 'annotations', 'selectedDataIndexes', 'indicators'];
        _this.element = _this.ngEle.nativeElement;
        _this.injectedModules = _this.injectedModules || [];
        try {
            var mod = _this.injector.get('ChartsLineSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_a) { }
        try {
            var mod = _this.injector.get('ChartsScatterSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_b) { }
        try {
            var mod = _this.injector.get('ChartsColumnSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_c) { }
        try {
            var mod = _this.injector.get('ChartsSplineSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_d) { }
        try {
            var mod = _this.injector.get('ChartsSplineAreaSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_e) { }
        try {
            var mod = _this.injector.get('ChartsStripLine');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_f) { }
        try {
            var mod = _this.injector.get('ChartsAreaSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_g) { }
        try {
            var mod = _this.injector.get('ChartsScrollBar');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_h) { }
        try {
            var mod = _this.injector.get('ChartsStepLineSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_j) { }
        try {
            var mod = _this.injector.get('ChartsStepAreaSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_k) { }
        try {
            var mod = _this.injector.get('ChartsStackingColumnSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_l) { }
        try {
            var mod = _this.injector.get('ChartsStackingLineSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_m) { }
        try {
            var mod = _this.injector.get('ChartsStackingAreaSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_o) { }
        try {
            var mod = _this.injector.get('ChartsBarSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_p) { }
        try {
            var mod = _this.injector.get('ChartsStackingBarSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_q) { }
        try {
            var mod = _this.injector.get('ChartsRangeColumnSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_r) { }
        try {
            var mod = _this.injector.get('ChartsBubbleSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_s) { }
        try {
            var mod = _this.injector.get('ChartsTooltip');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_t) { }
        try {
            var mod = _this.injector.get('ChartsCrosshair');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_u) { }
        try {
            var mod = _this.injector.get('ChartsCategory');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_v) { }
        try {
            var mod = _this.injector.get('ChartsDateTime');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_w) { }
        try {
            var mod = _this.injector.get('ChartsLogarithmic');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_x) { }
        try {
            var mod = _this.injector.get('ChartsLegend');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_y) { }
        try {
            var mod = _this.injector.get('ChartsZoom');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_z) { }
        try {
            var mod = _this.injector.get('ChartsDataLabel');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_0) { }
        try {
            var mod = _this.injector.get('ChartsSelection');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_1) { }
        try {
            var mod = _this.injector.get('ChartsChartAnnotation');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_2) { }
        try {
            var mod = _this.injector.get('ChartsHiloSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_3) { }
        try {
            var mod = _this.injector.get('ChartsHiloOpenCloseSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_4) { }
        try {
            var mod = _this.injector.get('ChartsWaterfallSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_5) { }
        try {
            var mod = _this.injector.get('ChartsRangeAreaSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_6) { }
        try {
            var mod = _this.injector.get('ChartsCandleSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_7) { }
        try {
            var mod = _this.injector.get('ChartsPolarSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_8) { }
        try {
            var mod = _this.injector.get('ChartsRadarSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_9) { }
        try {
            var mod = _this.injector.get('ChartsSmaIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_10) { }
        try {
            var mod = _this.injector.get('ChartsTmaIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_11) { }
        try {
            var mod = _this.injector.get('ChartsEmaIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_12) { }
        try {
            var mod = _this.injector.get('ChartsAccumulationDistributionIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_13) { }
        try {
            var mod = _this.injector.get('ChartsMacdIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_14) { }
        try {
            var mod = _this.injector.get('ChartsAtrIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_15) { }
        try {
            var mod = _this.injector.get('ChartsRsiIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_16) { }
        try {
            var mod = _this.injector.get('ChartsMomentumIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_17) { }
        try {
            var mod = _this.injector.get('ChartsStochasticIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_18) { }
        try {
            var mod = _this.injector.get('ChartsBollingerBands');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_19) { }
        try {
            var mod = _this.injector.get('ChartsBoxAndWhiskerSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_20) { }
        try {
            var mod = _this.injector.get('ChartsHistogramSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_21) { }
        try {
            var mod = _this.injector.get('ChartsErrorBar');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_22) { }
        try {
            var mod = _this.injector.get('ChartsTrendlines');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_23) { }
        try {
            var mod = _this.injector.get('ChartsDateTimeCategory');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_24) { }
        try {
            var mod = _this.injector.get('ChartsMultiColoredLineSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_25) { }
        try {
            var mod = _this.injector.get('ChartsMultiColoredAreaSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_26) { }
        try {
            var mod = _this.injector.get('ChartsMultiLevelLabel');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_27) { }
        try {
            var mod = _this.injector.get('ChartsParetoSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_28) { }
        try {
            var mod = _this.injector.get('ChartsExport');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_29) { }
        try {
            var mod = _this.injector.get('ChartsDataEditing');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_30) { }
        _this.registerEvents(outputs$12);
        _this.addTwoWay.call(_this, twoWays);
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        return _this;
    }
    /**
     * @return {?}
     */
    ChartComponent.prototype.ngOnInit = function () {
    };
    /**
     * @return {?}
     */
    ChartComponent.prototype.ngAfterViewInit = function () {
    };
    /**
     * @return {?}
     */
    ChartComponent.prototype.ngOnDestroy = function () {
    };
    /**
     * @return {?}
     */
    ChartComponent.prototype.ngAfterContentChecked = function () {
    };
    return ChartComponent;
}(_syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Chart"]));
ChartComponent.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
                selector: 'ejs-chart',
                inputs: inputs,
                outputs: outputs$12,
                template: '',
                changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
                queries: {
                    childSeries: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](SeriesCollectionDirective),
                    childAxes: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](AxesDirective),
                    childRows: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](RowsDirective),
                    childColumns: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](ColumnsDirective),
                    childAnnotations: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](AnnotationsDirective),
                    childSelectedDataIndexes: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](SelectedDataIndexesDirective),
                    childIndicators: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](IndicatorsDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
ChartComponent.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"], },
]; };
ChartComponent.propDecorators = {
    'tooltip_template': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: ['tooltipTemplate',] },],
};
__decorate$2([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["Template"])(),
    __metadata$2("design:type", Object)
], ChartComponent.prototype, "tooltip_template", void 0);
ChartComponent = __decorate$2([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentBase"]]),
    __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"]])
], ChartComponent);
/**
 * NgModule definition for the Chart component.
 */
var ChartModule = /** @class */ (function () {
    function ChartModule() {
    }
    return ChartModule;
}());
ChartModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]],
                declarations: [
                    ChartComponent,
                    TrendlineDirective,
                    TrendlinesDirective,
                    SegmentDirective,
                    SegmentsDirective,
                    SeriesDirective,
                    SeriesCollectionDirective,
                    StripLineDirective,
                    StripLinesDirective,
                    CategoryDirective,
                    CategoriesDirective,
                    MultiLevelLabelDirective,
                    MultiLevelLabelsDirective,
                    AxisDirective,
                    AxesDirective,
                    RowDirective,
                    RowsDirective,
                    ColumnDirective,
                    ColumnsDirective,
                    AnnotationDirective,
                    AnnotationsDirective,
                    SelectedDataIndexDirective,
                    SelectedDataIndexesDirective,
                    IndicatorDirective,
                    IndicatorsDirective
                ],
                exports: [
                    ChartComponent,
                    TrendlineDirective,
                    TrendlinesDirective,
                    SegmentDirective,
                    SegmentsDirective,
                    SeriesDirective,
                    SeriesCollectionDirective,
                    StripLineDirective,
                    StripLinesDirective,
                    CategoryDirective,
                    CategoriesDirective,
                    MultiLevelLabelDirective,
                    MultiLevelLabelsDirective,
                    AxisDirective,
                    AxesDirective,
                    RowDirective,
                    RowsDirective,
                    ColumnDirective,
                    ColumnsDirective,
                    AnnotationDirective,
                    AnnotationsDirective,
                    SelectedDataIndexDirective,
                    SelectedDataIndexesDirective,
                    IndicatorDirective,
                    IndicatorsDirective
                ]
            },] },
];
/**
 * @nocollapse
 */
ChartModule.ctorParameters = function () { return []; };
var LineSeriesService = { provide: 'ChartsLineSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["LineSeries"] };
var ScatterSeriesService = { provide: 'ChartsScatterSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["ScatterSeries"] };
var ColumnSeriesService = { provide: 'ChartsColumnSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["ColumnSeries"] };
var SplineSeriesService = { provide: 'ChartsSplineSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["SplineSeries"] };
var SplineAreaSeriesService = { provide: 'ChartsSplineAreaSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["SplineAreaSeries"] };
var StripLineService = { provide: 'ChartsStripLine', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["StripLine"] };
var AreaSeriesService = { provide: 'ChartsAreaSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["AreaSeries"] };
var ScrollBarService = { provide: 'ChartsScrollBar', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["ScrollBar"] };
var StepLineSeriesService = { provide: 'ChartsStepLineSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["StepLineSeries"] };
var StepAreaSeriesService = { provide: 'ChartsStepAreaSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["StepAreaSeries"] };
var StackingColumnSeriesService = { provide: 'ChartsStackingColumnSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["StackingColumnSeries"] };
var StackingLineSeriesService = { provide: 'ChartsStackingLineSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["StackingLineSeries"] };
var StackingAreaSeriesService = { provide: 'ChartsStackingAreaSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["StackingAreaSeries"] };
var BarSeriesService = { provide: 'ChartsBarSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["BarSeries"] };
var StackingBarSeriesService = { provide: 'ChartsStackingBarSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["StackingBarSeries"] };
var RangeColumnSeriesService = { provide: 'ChartsRangeColumnSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["RangeColumnSeries"] };
var BubbleSeriesService = { provide: 'ChartsBubbleSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["BubbleSeries"] };
var TooltipService = { provide: 'ChartsTooltip', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Tooltip"] };
var CrosshairService = { provide: 'ChartsCrosshair', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Crosshair"] };
var CategoryService = { provide: 'ChartsCategory', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Category"] };
var DateTimeService = { provide: 'ChartsDateTime', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["DateTime"] };
var LogarithmicService = { provide: 'ChartsLogarithmic', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Logarithmic"] };
var LegendService = { provide: 'ChartsLegend', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Legend"] };
var ZoomService = { provide: 'ChartsZoom', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Zoom"] };
var DataLabelService = { provide: 'ChartsDataLabel', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["DataLabel"] };
var SelectionService = { provide: 'ChartsSelection', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Selection"] };
var ChartAnnotationService = { provide: 'ChartsChartAnnotation', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["ChartAnnotation"] };
var HiloSeriesService = { provide: 'ChartsHiloSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["HiloSeries"] };
var HiloOpenCloseSeriesService = { provide: 'ChartsHiloOpenCloseSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["HiloOpenCloseSeries"] };
var WaterfallSeriesService = { provide: 'ChartsWaterfallSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["WaterfallSeries"] };
var RangeAreaSeriesService = { provide: 'ChartsRangeAreaSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["RangeAreaSeries"] };
var CandleSeriesService = { provide: 'ChartsCandleSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["CandleSeries"] };
var PolarSeriesService = { provide: 'ChartsPolarSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["PolarSeries"] };
var RadarSeriesService = { provide: 'ChartsRadarSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["RadarSeries"] };
var SmaIndicatorService = { provide: 'ChartsSmaIndicator', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["SmaIndicator"] };
var TmaIndicatorService = { provide: 'ChartsTmaIndicator', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["TmaIndicator"] };
var EmaIndicatorService = { provide: 'ChartsEmaIndicator', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["EmaIndicator"] };
var AccumulationDistributionIndicatorService = { provide: 'ChartsAccumulationDistributionIndicator', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["AccumulationDistributionIndicator"] };
var MacdIndicatorService = { provide: 'ChartsMacdIndicator', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["MacdIndicator"] };
var AtrIndicatorService = { provide: 'ChartsAtrIndicator', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["AtrIndicator"] };
var RsiIndicatorService = { provide: 'ChartsRsiIndicator', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["RsiIndicator"] };
var MomentumIndicatorService = { provide: 'ChartsMomentumIndicator', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["MomentumIndicator"] };
var StochasticIndicatorService = { provide: 'ChartsStochasticIndicator', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["StochasticIndicator"] };
var BollingerBandsService = { provide: 'ChartsBollingerBands', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["BollingerBands"] };
var BoxAndWhiskerSeriesService = { provide: 'ChartsBoxAndWhiskerSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["BoxAndWhiskerSeries"] };
var HistogramSeriesService = { provide: 'ChartsHistogramSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["HistogramSeries"] };
var ErrorBarService = { provide: 'ChartsErrorBar', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["ErrorBar"] };
var TrendlinesService = { provide: 'ChartsTrendlines', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Trendlines"] };
var DateTimeCategoryService = { provide: 'ChartsDateTimeCategory', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["DateTimeCategory"] };
var MultiColoredLineSeriesService = { provide: 'ChartsMultiColoredLineSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["MultiColoredLineSeries"] };
var MultiColoredAreaSeriesService = { provide: 'ChartsMultiColoredAreaSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["MultiColoredAreaSeries"] };
var MultiLevelLabelService = { provide: 'ChartsMultiLevelLabel', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["MultiLevelLabel"] };
var ParetoSeriesService = { provide: 'ChartsParetoSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["ParetoSeries"] };
var ExportService = { provide: 'ChartsExport', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Export"] };
var DataEditingService = { provide: 'ChartsDataEditing', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["DataEditing"] };
/**
 * NgModule definition for the Chart component with providers.
 */
var ChartAllModule = /** @class */ (function () {
    function ChartAllModule() {
    }
    return ChartAllModule;
}());
ChartAllModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"], ChartModule],
                exports: [
                    ChartModule
                ],
                providers: [
                    LineSeriesService,
                    ScatterSeriesService,
                    ColumnSeriesService,
                    SplineSeriesService,
                    SplineAreaSeriesService,
                    StripLineService,
                    AreaSeriesService,
                    ScrollBarService,
                    StepLineSeriesService,
                    StepAreaSeriesService,
                    StackingColumnSeriesService,
                    StackingLineSeriesService,
                    StackingAreaSeriesService,
                    BarSeriesService,
                    StackingBarSeriesService,
                    RangeColumnSeriesService,
                    BubbleSeriesService,
                    TooltipService,
                    CrosshairService,
                    CategoryService,
                    DateTimeService,
                    LogarithmicService,
                    LegendService,
                    ZoomService,
                    DataLabelService,
                    SelectionService,
                    ChartAnnotationService,
                    HiloSeriesService,
                    HiloOpenCloseSeriesService,
                    WaterfallSeriesService,
                    RangeAreaSeriesService,
                    CandleSeriesService,
                    PolarSeriesService,
                    RadarSeriesService,
                    SmaIndicatorService,
                    TmaIndicatorService,
                    EmaIndicatorService,
                    AccumulationDistributionIndicatorService,
                    MacdIndicatorService,
                    AtrIndicatorService,
                    RsiIndicatorService,
                    MomentumIndicatorService,
                    StochasticIndicatorService,
                    BollingerBandsService,
                    BoxAndWhiskerSeriesService,
                    HistogramSeriesService,
                    ErrorBarService,
                    TrendlinesService,
                    DateTimeCategoryService,
                    MultiColoredLineSeriesService,
                    MultiColoredAreaSeriesService,
                    MultiLevelLabelService,
                    ParetoSeriesService,
                    ExportService,
                    DataEditingService
                ]
            },] },
];
/**
 * @nocollapse
 */
ChartAllModule.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 input$12 = ['animation', 'border', 'dataLabel', 'dataSource', 'emptyPointSettings', 'enableTooltip', 'endAngle', 'explode', 'explodeAll', 'explodeIndex', 'explodeOffset', 'gapRatio', 'groupMode', 'groupTo', 'height', 'innerRadius', 'legendShape', 'name', 'neckHeight', 'neckWidth', 'opacity', 'palettes', 'pointColorMapping', 'pyramidMode', 'query', 'radius', 'selectionStyle', 'startAngle', 'tooltipMappingName', 'type', 'visible', 'width', 'xName', 'yName'];
var outputs$13 = [];
/**
 * AccumulationSeries Directive
 * ```html
 * <e-accumulation-series-collection>
 * <e-accumulation-series></e-accumulation-series>
 * </e-accumulation-series-collection>
 * ```
 */
var AccumulationSeriesDirective = /** @class */ (function (_super) {
    __extends(AccumulationSeriesDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function AccumulationSeriesDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$13);
        return _this;
    }
    return AccumulationSeriesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
AccumulationSeriesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-accumulation-series-collection>e-accumulation-series',
                inputs: input$12,
                outputs: outputs$13,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
AccumulationSeriesDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
AccumulationSeriesDirective.propDecorators = {
    'dataLabel_template': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: ['dataLabelTemplate',] },],
};
__decorate$3([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["Template"])(),
    __metadata$3("design:type", Object)
], AccumulationSeriesDirective.prototype, "dataLabel_template", void 0);
/**
 * AccumulationSeries Array Directive
 */
var AccumulationSeriesCollectionDirective = /** @class */ (function (_super) {
    __extends(AccumulationSeriesCollectionDirective, _super);
    function AccumulationSeriesCollectionDirective() {
        return _super.call(this, 'series') || this;
    }
    return AccumulationSeriesCollectionDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
AccumulationSeriesCollectionDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ej-accumulationchart>e-accumulation-series-collection',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](AccumulationSeriesDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
AccumulationSeriesCollectionDirective.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 input$13 = ['content', 'coordinateUnits', 'description', 'horizontalAlignment', 'region', 'verticalAlignment', 'x', 'y'];
var outputs$14 = [];
/**
 * AccumulationAnnotations Directive
 * ```html
 * <e-accumulation-annotations>
 * <e-accumulation-annotation></e-accumulation-annotation>
 * </e-accumulation-annotations>
 * ```
 */
var AccumulationAnnotationDirective = /** @class */ (function (_super) {
    __extends(AccumulationAnnotationDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function AccumulationAnnotationDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$14);
        return _this;
    }
    return AccumulationAnnotationDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
AccumulationAnnotationDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-accumulation-annotations>e-accumulation-annotation',
                inputs: input$13,
                outputs: outputs$14,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
AccumulationAnnotationDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
AccumulationAnnotationDirective.propDecorators = {
    'content': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: ['content',] },],
};
__decorate$4([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["Template"])(),
    __metadata$4("design:type", Object)
], AccumulationAnnotationDirective.prototype, "content", void 0);
/**
 * AccumulationAnnotation Array Directive
 */
var AccumulationAnnotationsDirective = /** @class */ (function (_super) {
    __extends(AccumulationAnnotationsDirective, _super);
    function AccumulationAnnotationsDirective() {
        return _super.call(this, 'annotations') || this;
    }
    return AccumulationAnnotationsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
AccumulationAnnotationsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ej-accumulationchart>e-accumulation-annotations',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](AccumulationAnnotationDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
AccumulationAnnotationsDirective.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$1 = ['annotations', 'background', 'border', 'center', 'currencyCode', 'dataSource', 'enableAnimation', 'enableExport', 'enablePersistence', 'enableRtl', 'enableSmartLabels', 'height', 'isMultiSelect', 'legendSettings', 'locale', 'margin', 'selectedDataIndexes', 'selectionMode', 'series', 'subTitle', 'subTitleStyle', 'theme', 'title', 'titleStyle', 'tooltip', 'useGroupingSeparator', 'width'];
var outputs$15 = ['animationComplete', 'annotationRender', 'beforePrint', 'chartMouseClick', 'chartMouseDown', 'chartMouseLeave', 'chartMouseMove', 'chartMouseUp', 'legendRender', 'load', 'loaded', 'pointClick', 'pointMove', 'pointRender', 'resized', 'seriesRender', 'textRender', 'tooltipRender', 'dataSourceChange'];
var twoWays$1 = ['dataSource'];
/**
 * AccumulationChart Component
 * ```html
 * <ejs-accumulationchart></ejs-accumulationchart>
 * ```
 */
var AccumulationChartComponent = /** @class */ (function (_super) {
    __extends(AccumulationChartComponent, _super);
    /**
     * @param {?} ngEle
     * @param {?} srenderer
     * @param {?} viewContainerRef
     * @param {?} injector
     */
    function AccumulationChartComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this = _super.call(this) || this;
        _this.ngEle = ngEle;
        _this.srenderer = srenderer;
        _this.viewContainerRef = viewContainerRef;
        _this.injector = injector;
        _this.tags = ['series', 'annotations'];
        _this.element = _this.ngEle.nativeElement;
        _this.injectedModules = _this.injectedModules || [];
        try {
            var mod = _this.injector.get('ChartsPieSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_a) { }
        try {
            var mod = _this.injector.get('ChartsFunnelSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_b) { }
        try {
            var mod = _this.injector.get('ChartsPyramidSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_c) { }
        try {
            var mod = _this.injector.get('ChartsAccumulationTooltip');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_d) { }
        try {
            var mod = _this.injector.get('ChartsAccumulationLegend');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_e) { }
        try {
            var mod = _this.injector.get('ChartsAccumulationSelection');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_f) { }
        try {
            var mod = _this.injector.get('ChartsAccumulationDataLabel');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_g) { }
        try {
            var mod = _this.injector.get('ChartsAccumulationAnnotation');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_h) { }
        try {
            var mod = _this.injector.get('ChartsExport');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_j) { }
        _this.registerEvents(outputs$15);
        _this.addTwoWay.call(_this, twoWays$1);
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        return _this;
    }
    /**
     * @return {?}
     */
    AccumulationChartComponent.prototype.ngOnInit = function () {
    };
    /**
     * @return {?}
     */
    AccumulationChartComponent.prototype.ngAfterViewInit = function () {
    };
    /**
     * @return {?}
     */
    AccumulationChartComponent.prototype.ngOnDestroy = function () {
    };
    /**
     * @return {?}
     */
    AccumulationChartComponent.prototype.ngAfterContentChecked = function () {
    };
    return AccumulationChartComponent;
}(_syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["AccumulationChart"]));
AccumulationChartComponent.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
                selector: 'ejs-accumulationchart',
                inputs: inputs$1,
                outputs: outputs$15,
                template: '',
                changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
                queries: {
                    childSeries: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](AccumulationSeriesCollectionDirective),
                    childAnnotations: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](AccumulationAnnotationsDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
AccumulationChartComponent.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"], },
]; };
AccumulationChartComponent.propDecorators = {
    'tooltip_template': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: ['tooltipTemplate',] },],
};
__decorate$5([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["Template"])(),
    __metadata$5("design:type", Object)
], AccumulationChartComponent.prototype, "tooltip_template", void 0);
AccumulationChartComponent = __decorate$5([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentBase"]]),
    __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"]])
], AccumulationChartComponent);
/**
 * NgModule definition for the AccumulationChart component.
 */
var AccumulationChartModule = /** @class */ (function () {
    function AccumulationChartModule() {
    }
    return AccumulationChartModule;
}());
AccumulationChartModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]],
                declarations: [
                    AccumulationChartComponent,
                    AccumulationSeriesDirective,
                    AccumulationSeriesCollectionDirective,
                    AccumulationAnnotationDirective,
                    AccumulationAnnotationsDirective
                ],
                exports: [
                    AccumulationChartComponent,
                    AccumulationSeriesDirective,
                    AccumulationSeriesCollectionDirective,
                    AccumulationAnnotationDirective,
                    AccumulationAnnotationsDirective
                ]
            },] },
];
/**
 * @nocollapse
 */
AccumulationChartModule.ctorParameters = function () { return []; };
var PieSeriesService = { provide: 'ChartsPieSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["PieSeries"] };
var FunnelSeriesService = { provide: 'ChartsFunnelSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["FunnelSeries"] };
var PyramidSeriesService = { provide: 'ChartsPyramidSeries', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["PyramidSeries"] };
var AccumulationTooltipService = { provide: 'ChartsAccumulationTooltip', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["AccumulationTooltip"] };
var AccumulationLegendService = { provide: 'ChartsAccumulationLegend', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["AccumulationLegend"] };
var AccumulationSelectionService = { provide: 'ChartsAccumulationSelection', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["AccumulationSelection"] };
var AccumulationDataLabelService = { provide: 'ChartsAccumulationDataLabel', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["AccumulationDataLabel"] };
var AccumulationAnnotationService = { provide: 'ChartsAccumulationAnnotation', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["AccumulationAnnotation"] };
/**
 * NgModule definition for the AccumulationChart component with providers.
 */
var AccumulationChartAllModule = /** @class */ (function () {
    function AccumulationChartAllModule() {
    }
    return AccumulationChartAllModule;
}());
AccumulationChartAllModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"], AccumulationChartModule],
                exports: [
                    AccumulationChartModule
                ],
                providers: [
                    PieSeriesService,
                    FunnelSeriesService,
                    PyramidSeriesService,
                    AccumulationTooltipService,
                    AccumulationLegendService,
                    AccumulationSelectionService,
                    AccumulationDataLabelService,
                    AccumulationAnnotationService
                ]
            },] },
];
/**
 * @nocollapse
 */
AccumulationChartAllModule.ctorParameters = function () { return []; };
var input$14 = ['animation', 'border', 'dashArray', 'dataSource', 'fill', 'opacity', 'query', 'type', 'width', 'xName', 'yName'];
var outputs$16 = [];
/**
 * RangenavigatorSeries Directive
 * ```html
 * <e-rangenavigator-series-collection>
 * <e-rangenavigator-series></e-rangenavigator-series>
 * </e-rangenavigator-series-collection>
 * ```
 */
var RangenavigatorSeriesDirective = /** @class */ (function (_super) {
    __extends(RangenavigatorSeriesDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function RangenavigatorSeriesDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$16);
        return _this;
    }
    return RangenavigatorSeriesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
RangenavigatorSeriesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-rangenavigator-series-collection>e-rangenavigator-series',
                inputs: input$14,
                outputs: outputs$16,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
RangenavigatorSeriesDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * RangenavigatorSeries Array Directive
 */
var RangenavigatorSeriesCollectionDirective = /** @class */ (function (_super) {
    __extends(RangenavigatorSeriesCollectionDirective, _super);
    function RangenavigatorSeriesCollectionDirective() {
        return _super.call(this, 'series') || this;
    }
    return RangenavigatorSeriesCollectionDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
RangenavigatorSeriesCollectionDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ej-rangenavigator>e-rangenavigator-series-collection',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](RangenavigatorSeriesDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
RangenavigatorSeriesCollectionDirective.ctorParameters = function () { return []; };
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 __metadata$6 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
        return Reflect.metadata(k, v);
};
var inputs$2 = ['allowSnapping', 'animationDuration', 'dataSource', 'disableRangeSelector', 'enableDeferredUpdate', 'enableGrouping', 'enablePersistence', 'enableRtl', 'groupBy', 'height', 'interval', 'intervalType', 'labelFormat', 'labelIntersectAction', 'labelPosition', 'labelStyle', 'locale', 'logBase', 'majorGridLines', 'majorTickLines', 'margin', 'maximum', 'minimum', 'navigatorBorder', 'navigatorStyleSettings', 'periodSelectorSettings', 'query', 'secondaryLabelAlignment', 'series', 'skeleton', 'skeletonType', 'theme', 'tickPosition', 'tooltip', 'useGroupingSeparator', 'value', 'valueType', 'width', 'xName', 'yName'];
var outputs$17 = ['beforePrint', 'changed', 'labelRender', 'load', 'loaded', 'resized', 'selectorRender', 'tooltipRender', 'dataSourceChange'];
var twoWays$2 = ['dataSource'];
/**
 * RangeNavigator Component
 * ```html
 * <ejs-rangenavigator></ejs-rangenavigator>
 * ```
 */
var RangeNavigatorComponent = /** @class */ (function (_super) {
    __extends(RangeNavigatorComponent, _super);
    /**
     * @param {?} ngEle
     * @param {?} srenderer
     * @param {?} viewContainerRef
     * @param {?} injector
     */
    function RangeNavigatorComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this = _super.call(this) || this;
        _this.ngEle = ngEle;
        _this.srenderer = srenderer;
        _this.viewContainerRef = viewContainerRef;
        _this.injector = injector;
        _this.tags = ['series'];
        _this.element = _this.ngEle.nativeElement;
        _this.injectedModules = _this.injectedModules || [];
        try {
            var mod = _this.injector.get('ChartsRangeTooltip');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_a) { }
        try {
            var mod = _this.injector.get('ChartsPeriodSelector');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_b) { }
        try {
            var mod = _this.injector.get('ChartsAreaSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_c) { }
        try {
            var mod = _this.injector.get('ChartsStepLineSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_d) { }
        try {
            var mod = _this.injector.get('ChartsDateTime');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_e) { }
        try {
            var mod = _this.injector.get('ChartsLogarithmic');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_f) { }
        try {
            var mod = _this.injector.get('ChartsExport');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_g) { }
        _this.registerEvents(outputs$17);
        _this.addTwoWay.call(_this, twoWays$2);
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        return _this;
    }
    /**
     * @return {?}
     */
    RangeNavigatorComponent.prototype.ngOnInit = function () {
    };
    /**
     * @return {?}
     */
    RangeNavigatorComponent.prototype.ngAfterViewInit = function () {
    };
    /**
     * @return {?}
     */
    RangeNavigatorComponent.prototype.ngOnDestroy = function () {
    };
    /**
     * @return {?}
     */
    RangeNavigatorComponent.prototype.ngAfterContentChecked = function () {
    };
    return RangeNavigatorComponent;
}(_syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["RangeNavigator"]));
RangeNavigatorComponent.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
                selector: 'ejs-rangenavigator',
                inputs: inputs$2,
                outputs: outputs$17,
                template: '',
                changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
                queries: {
                    childSeries: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](RangenavigatorSeriesCollectionDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
RangeNavigatorComponent.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"], },
]; };
RangeNavigatorComponent.propDecorators = {
    'tooltip_template': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: ['tooltipTemplate',] },],
};
__decorate$6([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["Template"])(),
    __metadata$6("design:type", Object)
], RangeNavigatorComponent.prototype, "tooltip_template", void 0);
RangeNavigatorComponent = __decorate$6([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentBase"]]),
    __metadata$6("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"]])
], RangeNavigatorComponent);
/**
 * NgModule definition for the RangeNavigator component.
 */
var RangeNavigatorModule = /** @class */ (function () {
    function RangeNavigatorModule() {
    }
    return RangeNavigatorModule;
}());
RangeNavigatorModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]],
                declarations: [
                    RangeNavigatorComponent,
                    RangenavigatorSeriesDirective,
                    RangenavigatorSeriesCollectionDirective
                ],
                exports: [
                    RangeNavigatorComponent,
                    RangenavigatorSeriesDirective,
                    RangenavigatorSeriesCollectionDirective
                ]
            },] },
];
/**
 * @nocollapse
 */
RangeNavigatorModule.ctorParameters = function () { return []; };
var RangeTooltipService = { provide: 'ChartsRangeTooltip', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["RangeTooltip"] };
var PeriodSelectorService = { provide: 'ChartsPeriodSelector', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["PeriodSelector"] };
/**
 * NgModule definition for the RangeNavigator component with providers.
 */
var RangeNavigatorAllModule = /** @class */ (function () {
    function RangeNavigatorAllModule() {
    }
    return RangeNavigatorAllModule;
}());
RangeNavigatorAllModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"], RangeNavigatorModule],
                exports: [
                    RangeNavigatorModule
                ],
                providers: [
                    RangeTooltipService,
                    PeriodSelectorService
                ]
            },] },
];
/**
 * @nocollapse
 */
RangeNavigatorAllModule.ctorParameters = function () { return []; };
var input$15 = ['color', 'endRange', 'opacity', 'startRange'];
var outputs$18 = [];
var RangeBandSettingDirective = /** @class */ (function (_super) {
    __extends(RangeBandSettingDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function RangeBandSettingDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$18);
        return _this;
    }
    return RangeBandSettingDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
RangeBandSettingDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-rangeBandSettings>e-rangeBandSetting',
                inputs: input$15,
                outputs: outputs$18,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
RangeBandSettingDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * RangeBandSetting Array Directive
 */
var RangeBandSettingsDirective = /** @class */ (function (_super) {
    __extends(RangeBandSettingsDirective, _super);
    function RangeBandSettingsDirective() {
        return _super.call(this, 'rangebandsettings') || this;
    }
    return RangeBandSettingsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
RangeBandSettingsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-sparkline>e-rangeBandSettings',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](RangeBandSettingDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
RangeBandSettingsDirective.ctorParameters = function () { return []; };
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 __metadata$7 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
        return Reflect.metadata(k, v);
};
var inputs$3 = ['axisSettings', 'border', 'containerArea', 'dataLabelSettings', 'dataSource', 'enablePersistence', 'enableRtl', 'endPointColor', 'fill', 'format', 'height', 'highPointColor', 'lineWidth', 'locale', 'lowPointColor', 'markerSettings', 'negativePointColor', 'opacity', 'padding', 'palette', 'query', 'rangeBandSettings', 'startPointColor', 'theme', 'tiePointColor', 'tooltipSettings', 'type', 'useGroupingSeparator', 'valueType', 'width', 'xName', 'yName'];
var outputs$19 = ['axisRendering', 'dataLabelRendering', 'load', 'loaded', 'markerRendering', 'pointRegionMouseClick', 'pointRegionMouseMove', 'pointRendering', 'resize', 'seriesRendering', 'sparklineMouseClick', 'sparklineMouseMove', 'tooltipInitialize'];
var twoWays$3 = [''];
/**
 * Sparkline Component
 * ```html
 * <ejs-sparkline></ejs-sparkline>
 * ```
 */
var SparklineComponent = /** @class */ (function (_super) {
    __extends(SparklineComponent, _super);
    /**
     * @param {?} ngEle
     * @param {?} srenderer
     * @param {?} viewContainerRef
     * @param {?} injector
     */
    function SparklineComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this = _super.call(this) || this;
        _this.ngEle = ngEle;
        _this.srenderer = srenderer;
        _this.viewContainerRef = viewContainerRef;
        _this.injector = injector;
        _this.tags = ['rangeBandSettings'];
        _this.element = _this.ngEle.nativeElement;
        _this.injectedModules = _this.injectedModules || [];
        try {
            var mod = _this.injector.get('ChartsSparklineTooltip');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_a) { }
        _this.registerEvents(outputs$19);
        _this.addTwoWay.call(_this, twoWays$3);
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        return _this;
    }
    /**
     * @return {?}
     */
    SparklineComponent.prototype.ngOnInit = function () {
    };
    /**
     * @return {?}
     */
    SparklineComponent.prototype.ngAfterViewInit = function () {
    };
    /**
     * @return {?}
     */
    SparklineComponent.prototype.ngOnDestroy = function () {
    };
    /**
     * @return {?}
     */
    SparklineComponent.prototype.ngAfterContentChecked = function () {
    };
    return SparklineComponent;
}(_syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Sparkline"]));
SparklineComponent.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
                selector: 'ejs-sparkline',
                inputs: inputs$3,
                outputs: outputs$19,
                template: '',
                changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
                queries: {
                    childRangeBandSettings: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](RangeBandSettingsDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
SparklineComponent.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"], },
]; };
SparklineComponent = __decorate$7([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentBase"]]),
    __metadata$7("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"]])
], SparklineComponent);
/**
 * NgModule definition for the Sparkline component.
 */
var SparklineModule = /** @class */ (function () {
    function SparklineModule() {
    }
    return SparklineModule;
}());
SparklineModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]],
                declarations: [
                    SparklineComponent,
                    RangeBandSettingDirective,
                    RangeBandSettingsDirective
                ],
                exports: [
                    SparklineComponent,
                    RangeBandSettingDirective,
                    RangeBandSettingsDirective
                ]
            },] },
];
/**
 * @nocollapse
 */
SparklineModule.ctorParameters = function () { return []; };
var SparklineTooltipService = { provide: 'ChartsSparklineTooltip', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["SparklineTooltip"] };
/**
 * NgModule definition for the Sparkline component with providers.
 */
var SparklineAllModule = /** @class */ (function () {
    function SparklineAllModule() {
    }
    return SparklineAllModule;
}());
SparklineAllModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"], SparklineModule],
                exports: [
                    SparklineModule
                ],
                providers: [
                    SparklineTooltipService
                ]
            },] },
];
/**
 * @nocollapse
 */
SparklineAllModule.ctorParameters = function () { return []; };
var input$16 = ['animationDuration', 'dataSource', 'enableAnimation', 'enableSmartLabels', 'fill', 'marker', 'name', 'opacity', 'points', 'reactance', 'resistance', 'tooltip', 'visibility', 'width'];
var outputs$20 = [];
var SmithchartSeriesDirective = /** @class */ (function (_super) {
    __extends(SmithchartSeriesDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function SmithchartSeriesDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$20);
        return _this;
    }
    return SmithchartSeriesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
SmithchartSeriesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-seriesCollection>e-series',
                inputs: input$16,
                outputs: outputs$20,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
SmithchartSeriesDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * SmithchartSeries Array Directive
 */
var SmithchartSeriesCollectionDirective = /** @class */ (function (_super) {
    __extends(SmithchartSeriesCollectionDirective, _super);
    function SmithchartSeriesCollectionDirective() {
        return _super.call(this, 'series') || this;
    }
    return SmithchartSeriesCollectionDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
SmithchartSeriesCollectionDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-smithchart>e-seriesCollection',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](SmithchartSeriesDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
SmithchartSeriesCollectionDirective.ctorParameters = function () { return []; };
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 __metadata$8 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
        return Reflect.metadata(k, v);
};
var inputs$4 = ['background', 'border', 'elementSpacing', 'enablePersistence', 'enableRtl', 'font', 'height', 'horizontalAxis', 'legendSettings', 'locale', 'margin', 'radialAxis', 'radius', 'renderType', 'series', 'theme', 'title', 'width'];
var outputs$21 = ['animationComplete', 'axisLabelRender', 'beforePrint', 'legendRender', 'load', 'loaded', 'seriesRender', 'subtitleRender', 'textRender', 'titleRender'];
var twoWays$4 = [''];
/**
 * Smithchart Component
 * ```html
 * <ejs-smithchart></ejs-smithchart>
 * ```
 */
var SmithchartComponent = /** @class */ (function (_super) {
    __extends(SmithchartComponent, _super);
    /**
     * @param {?} ngEle
     * @param {?} srenderer
     * @param {?} viewContainerRef
     * @param {?} injector
     */
    function SmithchartComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this = _super.call(this) || this;
        _this.ngEle = ngEle;
        _this.srenderer = srenderer;
        _this.viewContainerRef = viewContainerRef;
        _this.injector = injector;
        _this.tags = ['series'];
        _this.element = _this.ngEle.nativeElement;
        _this.injectedModules = _this.injectedModules || [];
        try {
            var mod = _this.injector.get('ChartsSmithchartLegend');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_a) { }
        try {
            var mod = _this.injector.get('ChartsTooltipRender');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_b) { }
        _this.registerEvents(outputs$21);
        _this.addTwoWay.call(_this, twoWays$4);
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        return _this;
    }
    /**
     * @return {?}
     */
    SmithchartComponent.prototype.ngOnInit = function () {
    };
    /**
     * @return {?}
     */
    SmithchartComponent.prototype.ngAfterViewInit = function () {
    };
    /**
     * @return {?}
     */
    SmithchartComponent.prototype.ngOnDestroy = function () {
    };
    /**
     * @return {?}
     */
    SmithchartComponent.prototype.ngAfterContentChecked = function () {
    };
    return SmithchartComponent;
}(_syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["Smithchart"]));
SmithchartComponent.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
                selector: 'ejs-smithchart',
                inputs: inputs$4,
                outputs: outputs$21,
                template: '',
                changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
                queries: {
                    childSeries: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](SmithchartSeriesCollectionDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
SmithchartComponent.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"], },
]; };
SmithchartComponent = __decorate$8([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentBase"]]),
    __metadata$8("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"]])
], SmithchartComponent);
/**
 * NgModule definition for the Smithchart component.
 */
var SmithchartModule = /** @class */ (function () {
    function SmithchartModule() {
    }
    return SmithchartModule;
}());
SmithchartModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]],
                declarations: [
                    SmithchartComponent,
                    SmithchartSeriesDirective,
                    SmithchartSeriesCollectionDirective
                ],
                exports: [
                    SmithchartComponent,
                    SmithchartSeriesDirective,
                    SmithchartSeriesCollectionDirective
                ]
            },] },
];
/**
 * @nocollapse
 */
SmithchartModule.ctorParameters = function () { return []; };
var SmithchartLegendService = { provide: 'ChartsSmithchartLegend', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["SmithchartLegend"] };
var TooltipRenderService = { provide: 'ChartsTooltipRender', useValue: _syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["TooltipRender"] };
/**
 * NgModule definition for the Smithchart component with providers.
 */
var SmithchartAllModule = /** @class */ (function () {
    function SmithchartAllModule() {
    }
    return SmithchartAllModule;
}());
SmithchartAllModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"], SmithchartModule],
                exports: [
                    SmithchartModule
                ],
                providers: [
                    SmithchartLegendService,
                    TooltipRenderService
                ]
            },] },
];
/**
 * @nocollapse
 */
SmithchartAllModule.ctorParameters = function () { return []; };
var input$17 = ['animation', 'backwardForecast', 'enableTooltip', 'fill', 'forwardForecast', 'intercept', 'legendShape', 'marker', 'name', 'period', 'polynomialOrder', 'type', 'width'];
var outputs$22 = [];
/**
 * Series Directive
 * ```html
 * <e-stockchart-series-collection>
 * <e-stockchart-series>
 * <e-trendlines>
 * </e-trendline>
 * <e-trendline>
 * </e-trendlines>
 * </e-stockchart-series>
 * </e-stockchart-series-collection>
 * ```
 */
var StockChartTrendlineDirective = /** @class */ (function (_super) {
    __extends(StockChartTrendlineDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockChartTrendlineDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$22);
        return _this;
    }
    return StockChartTrendlineDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockChartTrendlineDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-series>e-trendlines>e-trendline',
                inputs: input$17,
                outputs: outputs$22,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
StockChartTrendlineDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StockChartTrendline Array Directive
 */
var StockChartTrendlinesDirective = /** @class */ (function (_super) {
    __extends(StockChartTrendlinesDirective, _super);
    function StockChartTrendlinesDirective() {
        return _super.call(this, 'trendlines') || this;
    }
    return StockChartTrendlinesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockChartTrendlinesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-series>e-trendlines',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockChartTrendlineDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockChartTrendlinesDirective.ctorParameters = function () { return []; };
var input$18 = ['animation', 'bearFillColor', 'border', 'bullFillColor', 'cardinalSplineTension', 'close', 'columnSpacing', 'columnWidth', 'cornerRadius', 'dashArray', 'dataSource', 'emptyPointSettings', 'enableSolidCandles', 'enableTooltip', 'fill', 'high', 'low', 'marker', 'name', 'opacity', 'open', 'pointColorMapping', 'query', 'selectionStyle', 'tooltipMappingName', 'trendlines', 'type', 'visible', 'volume', 'width', 'xAxisName', 'xName', 'yAxisName', 'yName'];
var outputs$23 = [];
/**
 * Series Directive
 * ```html
 * <e-stockchart-series-collection>
 * <e-stockchart-series></e-stockchart-series>
 * </e-stockchart-series-collection>
 * ```
 */
var StockChartSeriesDirective = /** @class */ (function (_super) {
    __extends(StockChartSeriesDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockChartSeriesDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        _this.tags = ['trendlines'];
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$23);
        return _this;
    }
    return StockChartSeriesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockChartSeriesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-series-collection>e-stockchart-series',
                inputs: input$18,
                outputs: outputs$23,
                queries: {
                    childTrendlines: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockChartTrendlinesDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
StockChartSeriesDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StockChartSeries Array Directive
 */
var StockChartSeriesCollectionDirective = /** @class */ (function (_super) {
    __extends(StockChartSeriesCollectionDirective, _super);
    function StockChartSeriesCollectionDirective() {
        return _super.call(this, 'series') || this;
    }
    return StockChartSeriesCollectionDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockChartSeriesCollectionDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart>e-stockchart-series-collection',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockChartSeriesDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockChartSeriesCollectionDirective.ctorParameters = function () { return []; };
var input$19 = ['border', 'color', 'dashArray', 'delay', 'duration', 'enable', 'end', 'horizontalAlignment', 'isRepeat', 'isSegmented', 'opacity', 'repeatEvery', 'repeatUntil', 'rotation', 'segmentAxisName', 'segmentEnd', 'segmentStart', 'size', 'sizeType', 'start', 'startFromAxis', 'text', 'textStyle', 'verticalAlignment', 'visible', 'zIndex'];
var outputs$24 = [];
/**
 * StripLine Directive
 * ```html
 * <e-stockchart-axis>
 * <e-striplines>
 * <e-stripline></e-stripline>
 * </e-striplines>
 * </e-stock-chart-axis>
 * ```
 */
var StockChartStripLineDirective = /** @class */ (function (_super) {
    __extends(StockChartStripLineDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockChartStripLineDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$24);
        return _this;
    }
    return StockChartStripLineDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockChartStripLineDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-axis>e-stockchart-striplines>e-stockchart-stripline',
                inputs: input$19,
                outputs: outputs$24,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
StockChartStripLineDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StockChartStripLine Array Directive
 */
var StockChartStripLinesDirective = /** @class */ (function (_super) {
    __extends(StockChartStripLinesDirective, _super);
    function StockChartStripLinesDirective() {
        return _super.call(this, 'striplines') || this;
    }
    return StockChartStripLinesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockChartStripLinesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-axis>e-stockchart-striplines',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockChartStripLineDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockChartStripLinesDirective.ctorParameters = function () { return []; };
var input$20 = ['coefficient', 'crossesAt', 'crossesInAxis', 'crosshairTooltip', 'description', 'desiredIntervals', 'edgeLabelPlacement', 'enableAutoIntervalOnZooming', 'enableTrim', 'interval', 'intervalType', 'isInversed', 'labelFormat', 'labelIntersectAction', 'labelPlacement', 'labelPosition', 'labelRotation', 'labelStyle', 'lineStyle', 'logBase', 'majorGridLines', 'majorTickLines', 'maximum', 'maximumLabelWidth', 'maximumLabels', 'minimum', 'minorGridLines', 'minorTickLines', 'minorTicksPerInterval', 'name', 'opposedPosition', 'placeNextToAxisLine', 'plotOffset', 'rangePadding', 'rowIndex', 'skeleton', 'skeletonType', 'span', 'startAngle', 'stripLines', 'tabIndex', 'tickPosition', 'title', 'titleStyle', 'valueType', 'visible', 'zoomFactor', 'zoomPosition'];
var outputs$25 = [];
/**
 * Axis Directive
 * ```html
 * <e-stockchart-axes><e-stockchart-axis></e-stockchart-axis></e-stockchart-axes>
 * ```
 */
var StockChartAxisDirective = /** @class */ (function (_super) {
    __extends(StockChartAxisDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockChartAxisDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        _this.tags = ['stripLines'];
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$25);
        return _this;
    }
    return StockChartAxisDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockChartAxisDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-axes>e-stockchart-axis',
                inputs: input$20,
                outputs: outputs$25,
                queries: {
                    childStripLines: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockChartStripLinesDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
StockChartAxisDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StockChartAxis Array Directive
 */
var StockChartAxesDirective = /** @class */ (function (_super) {
    __extends(StockChartAxesDirective, _super);
    function StockChartAxesDirective() {
        return _super.call(this, 'axes') || this;
    }
    return StockChartAxesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockChartAxesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart>e-stockchart-axes',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockChartAxisDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockChartAxesDirective.ctorParameters = function () { return []; };
var input$21 = ['border', 'height'];
var outputs$26 = [];
/**
 * Row Directive
 * ```html
 * <e-rows><e-row></e-row><e-rows>
 * ```
 */
var StockChartRowDirective = /** @class */ (function (_super) {
    __extends(StockChartRowDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockChartRowDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$26);
        return _this;
    }
    return StockChartRowDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockChartRowDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-rows>e-striplines>e-stockchart-row',
                inputs: input$21,
                outputs: outputs$26,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
StockChartRowDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StockChartRow Array Directive
 */
var StockChartRowsDirective = /** @class */ (function (_super) {
    __extends(StockChartRowsDirective, _super);
    function StockChartRowsDirective() {
        return _super.call(this, 'rows') || this;
    }
    return StockChartRowsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockChartRowsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart>e-stockchart-rows',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockChartRowDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockChartRowsDirective.ctorParameters = function () { return []; };
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 __metadata$9 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
        return Reflect.metadata(k, v);
};
var input$22 = ['content', 'coordinateUnits', 'description', 'horizontalAlignment', 'region', 'verticalAlignment', 'x', 'xAxisName', 'y', 'yAxisName'];
var outputs$27 = [];
/**
 * Annotation Directive
 * ```html
 * <e-stockchart-annotations><e-stockchart-annotation></e-stockchart-annotation><e-stockchart-annotations>
 * ```
 */
var StockChartAnnotationDirective = /** @class */ (function (_super) {
    __extends(StockChartAnnotationDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockChartAnnotationDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$27);
        return _this;
    }
    return StockChartAnnotationDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockChartAnnotationDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart-annotations>e-stockchart-annotation',
                inputs: input$22,
                outputs: outputs$27,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
StockChartAnnotationDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
StockChartAnnotationDirective.propDecorators = {
    'content': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: ['content',] },],
};
__decorate$9([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["Template"])(),
    __metadata$9("design:type", Object)
], StockChartAnnotationDirective.prototype, "content", void 0);
/**
 * StockChartAnnotation Array Directive
 */
var StockChartAnnotationsDirective = /** @class */ (function (_super) {
    __extends(StockChartAnnotationsDirective, _super);
    function StockChartAnnotationsDirective() {
        return _super.call(this, 'annotations') || this;
    }
    return StockChartAnnotationsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockChartAnnotationsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart>e-stockchart-annotations',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockChartAnnotationDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockChartAnnotationsDirective.ctorParameters = function () { return []; };
var input$23 = ['point', 'series'];
var outputs$28 = [];
/**
 * Selected Data Directive
 * ```html
 * <e-selecteddataindexes><e-selecteddataindex></e-selecteddataindex><e-selecteddataindexes>
 * ```
 */
var StockChartSelectedDataIndexDirective = /** @class */ (function (_super) {
    __extends(StockChartSelectedDataIndexDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockChartSelectedDataIndexDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$28);
        return _this;
    }
    return StockChartSelectedDataIndexDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockChartSelectedDataIndexDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart-selectedDataIndexes>e-stockchart-selectedDataIndex',
                inputs: input$23,
                outputs: outputs$28,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
StockChartSelectedDataIndexDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StockChartSelectedDataIndex Array Directive
 */
var StockChartSelectedDataIndexesDirective = /** @class */ (function (_super) {
    __extends(StockChartSelectedDataIndexesDirective, _super);
    function StockChartSelectedDataIndexesDirective() {
        return _super.call(this, 'selecteddataindexes') || this;
    }
    return StockChartSelectedDataIndexesDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockChartSelectedDataIndexesDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart>e-stockchart-selectedDataIndexes',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockChartSelectedDataIndexDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockChartSelectedDataIndexesDirective.ctorParameters = function () { return []; };
var input$24 = ['interval', 'intervalType', 'selected', 'text'];
var outputs$29 = [];
/**
 * Indicator Directive
 * ```html
 * <e-stockchart-periods>
 * <e-stockchart-period></e-stockchart-period>
 * </e-stockchart-periods>
 * ```
 */
var StockChartPeriodDirective = /** @class */ (function (_super) {
    __extends(StockChartPeriodDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockChartPeriodDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$29);
        return _this;
    }
    return StockChartPeriodDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockChartPeriodDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-indicators>e-stockchart-period',
                inputs: input$24,
                outputs: outputs$29,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
StockChartPeriodDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StockChartPeriod Array Directive
 */
var StockChartPeriodsDirective = /** @class */ (function (_super) {
    __extends(StockChartPeriodsDirective, _super);
    function StockChartPeriodsDirective() {
        return _super.call(this, 'periods') || this;
    }
    return StockChartPeriodsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockChartPeriodsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart>e-stockchart-periods',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockChartPeriodDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockChartPeriodsDirective.ctorParameters = function () { return []; };
var input$25 = ['background', 'border', 'date', 'description', 'placeAt', 'showOnSeries', 'text', 'textStyle', 'type'];
var outputs$30 = [];
/**
 * StockEvents
 * ```html
 * <e-stockchart-stockevents>
 * <e-stockchart-stockevent></e-stockchart-stockevent>
 * </e-stockchart-stockevents>
 * ```
 */
var StockEventDirective = /** @class */ (function (_super) {
    __extends(StockEventDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockEventDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$30);
        return _this;
    }
    return StockEventDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockEventDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-indicators>e-stockchart-stockevent',
                inputs: input$25,
                outputs: outputs$30,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
StockEventDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StockEvent Array Directive
 */
var StockEventsDirective = /** @class */ (function (_super) {
    __extends(StockEventsDirective, _super);
    function StockEventsDirective() {
        return _super.call(this, 'stockevents') || this;
    }
    return StockEventsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockEventsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart>e-stockchart-stockevents',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockEventDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockEventsDirective.ctorParameters = function () { return []; };
var input$26 = ['animation', 'bandColor', 'close', 'dPeriod', 'dashArray', 'dataSource', 'fastPeriod', 'field', 'fill', 'high', 'kPeriod', 'low', 'lowerLine', 'macdLine', 'macdNegativeColor', 'macdPositiveColor', 'macdType', 'open', 'overBought', 'overSold', 'period', 'periodLine', 'pointColorMapping', 'query', 'seriesName', 'showZones', 'slowPeriod', 'standardDeviation', 'type', 'upperLine', 'volume', 'width', 'xAxisName', 'xName', 'yAxisName'];
var outputs$31 = [];
/**
 * Indicator Directive
 * ```html
 * <e-stockchart-indicators>
 * <e-stockchart-indicator></e-stockchart-indicator>
 * </e-stockchart-indicators>
 * ```
 */
var StockChartIndicatorDirective = /** @class */ (function (_super) {
    __extends(StockChartIndicatorDirective, _super);
    /**
     * @param {?} viewContainerRef
     */
    function StockChartIndicatorDirective(viewContainerRef) {
        var _this = _super.call(this) || this;
        _this.viewContainerRef = viewContainerRef;
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        _this.registerEvents(outputs$31);
        return _this;
    }
    return StockChartIndicatorDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComplexBase"]));
StockChartIndicatorDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'e-stockchart-indicators>e-stockchart-indicator',
                inputs: input$26,
                outputs: outputs$31,
                queries: {}
            },] },
];
/**
 * @nocollapse
 */
StockChartIndicatorDirective.ctorParameters = function () { return [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
]; };
/**
 * StockChartIndicator Array Directive
 */
var StockChartIndicatorsDirective = /** @class */ (function (_super) {
    __extends(StockChartIndicatorsDirective, _super);
    function StockChartIndicatorsDirective() {
        return _super.call(this, 'indicators') || this;
    }
    return StockChartIndicatorsDirective;
}(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ArrayBase"]));
StockChartIndicatorsDirective.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                selector: 'ejs-stockchart>e-stockchart-indicators',
                queries: {
                    children: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"](StockChartIndicatorDirective)
                },
            },] },
];
/**
 * @nocollapse
 */
StockChartIndicatorsDirective.ctorParameters = function () { return []; };
var __decorate$10 = (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$10 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
        return Reflect.metadata(k, v);
};
var inputs$5 = ['annotations', 'axes', 'background', 'border', 'chartArea', 'crosshair', 'dataSource', 'enableCustomRange', 'enablePeriodSelector', 'enablePersistence', 'enableRtl', 'enableSelector', 'exportType', 'height', 'indicatorType', 'indicators', 'isMultiSelect', 'isSelect', 'isTransposed', 'locale', 'margin', 'periods', 'primaryXAxis', 'primaryYAxis', 'rows', 'selectedDataIndexes', 'selectionMode', 'series', 'seriesType', 'stockEvents', 'theme', 'title', 'titleStyle', 'tooltip', 'trendlineType', 'width', 'zoomSettings'];
var outputs$32 = ['axisLabelRender', 'load', 'loaded', 'pointClick', 'pointMove', 'rangeChange', 'selectorRender', 'seriesRender', 'stockChartMouseClick', 'stockChartMouseDown', 'stockChartMouseLeave', 'stockChartMouseMove', 'stockChartMouseUp', 'stockEventRender', 'tooltipRender', 'dataSourceChange'];
var twoWays$5 = ['dataSource'];
/**
 * Stock Chart Component
 * ```html
 * <ejs-stockchart></ejs-stockchart>
 * ```
 */
var StockChartComponent = /** @class */ (function (_super) {
    __extends(StockChartComponent, _super);
    /**
     * @param {?} ngEle
     * @param {?} srenderer
     * @param {?} viewContainerRef
     * @param {?} injector
     */
    function StockChartComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this = _super.call(this) || this;
        _this.ngEle = ngEle;
        _this.srenderer = srenderer;
        _this.viewContainerRef = viewContainerRef;
        _this.injector = injector;
        _this.tags = ['series', 'axes', 'rows', 'annotations', 'selectedDataIndexes', 'periods', 'stockEvents', 'indicators'];
        _this.element = _this.ngEle.nativeElement;
        _this.injectedModules = _this.injectedModules || [];
        try {
            var mod = _this.injector.get('ChartsLineSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_a) { }
        try {
            var mod = _this.injector.get('ChartsColumnSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_b) { }
        try {
            var mod = _this.injector.get('ChartsSplineSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_c) { }
        try {
            var mod = _this.injector.get('ChartsSplineAreaSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_d) { }
        try {
            var mod = _this.injector.get('ChartsStripLine');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_e) { }
        try {
            var mod = _this.injector.get('ChartsAreaSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_f) { }
        try {
            var mod = _this.injector.get('ChartsTooltip');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_g) { }
        try {
            var mod = _this.injector.get('ChartsCrosshair');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_h) { }
        try {
            var mod = _this.injector.get('ChartsDateTime');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_j) { }
        try {
            var mod = _this.injector.get('ChartsZoom');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_k) { }
        try {
            var mod = _this.injector.get('ChartsDataLabel');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_l) { }
        try {
            var mod = _this.injector.get('ChartsSelection');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_m) { }
        try {
            var mod = _this.injector.get('ChartsChartAnnotation');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_o) { }
        try {
            var mod = _this.injector.get('ChartsHiloSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_p) { }
        try {
            var mod = _this.injector.get('ChartsHiloOpenCloseSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_q) { }
        try {
            var mod = _this.injector.get('ChartsCandleSeries');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_r) { }
        try {
            var mod = _this.injector.get('ChartsSmaIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_s) { }
        try {
            var mod = _this.injector.get('ChartsTmaIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_t) { }
        try {
            var mod = _this.injector.get('ChartsEmaIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_u) { }
        try {
            var mod = _this.injector.get('ChartsAccumulationDistributionIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_v) { }
        try {
            var mod = _this.injector.get('ChartsMacdIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_w) { }
        try {
            var mod = _this.injector.get('ChartsAtrIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_x) { }
        try {
            var mod = _this.injector.get('ChartsRsiIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_y) { }
        try {
            var mod = _this.injector.get('ChartsMomentumIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_z) { }
        try {
            var mod = _this.injector.get('ChartsStochasticIndicator');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_0) { }
        try {
            var mod = _this.injector.get('ChartsBollingerBands');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_1) { }
        try {
            var mod = _this.injector.get('ChartsTrendlines');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_2) { }
        try {
            var mod = _this.injector.get('ChartsRangeTooltip');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_3) { }
        try {
            var mod = _this.injector.get('ChartsExport');
            if (_this.injectedModules.indexOf(mod) === -1) {
                _this.injectedModules.push(mod);
            }
        }
        catch (_4) { }
        _this.registerEvents(outputs$32);
        _this.addTwoWay.call(_this, twoWays$5);
        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('currentInstance', _this, _this.viewContainerRef);
        return _this;
    }
    /**
     * @return {?}
     */
    StockChartComponent.prototype.ngOnInit = function () {
    };
    /**
     * @return {?}
     */
    StockChartComponent.prototype.ngAfterViewInit = function () {
    };
    /**
     * @return {?}
     */
    StockChartComponent.prototype.ngOnDestroy = function () {
    };
    /**
     * @return {?}
     */
    StockChartComponent.prototype.ngAfterContentChecked = function () {
    };
    return StockChartComponent;
}(_syncfusion_ej2_charts__WEBPACK_IMPORTED_MODULE_2__["StockChart"]));
StockChartComponent.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
                selector: 'ejs-stockchart',
                inputs: inputs$5,
                outputs: outputs$32,
                template: '',
                changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
                queries: {
                    childSeries: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockChartSeriesCollectionDirective),
                    childAxes: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockChartAxesDirective),
                    childRows: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockChartRowsDirective),
                    childAnnotations: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockChartAnnotationsDirective),
                    childSelectedDataIndexes: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockChartSelectedDataIndexesDirective),
                    childPeriods: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockChartPeriodsDirective),
                    childStockEvents: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockEventsDirective),
                    childIndicators: new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"](StockChartIndicatorsDirective)
                }
            },] },
];
/**
 * @nocollapse
 */
StockChartComponent.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"], },
]; };
StockChartComponent.propDecorators = {
    'tooltip_template': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: ['tooltipTemplate',] },],
};
__decorate$10([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["Template"])(),
    __metadata$10("design:type", Object)
], StockChartComponent.prototype, "tooltip_template", void 0);
StockChartComponent = __decorate$10([
    Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_1__["ComponentBase"]]),
    __metadata$10("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"]])
], StockChartComponent);
/**
 * NgModule definition for the StockChart component.
 */
var StockChartModule = /** @class */ (function () {
    function StockChartModule() {
    }
    return StockChartModule;
}());
StockChartModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]],
                declarations: [
                    StockChartComponent,
                    StockChartTrendlineDirective,
                    StockChartTrendlinesDirective,
                    StockChartSeriesDirective,
                    StockChartSeriesCollectionDirective,
                    StockChartStripLineDirective,
                    StockChartStripLinesDirective,
                    StockChartAxisDirective,
                    StockChartAxesDirective,
                    StockChartRowDirective,
                    StockChartRowsDirective,
                    StockChartAnnotationDirective,
                    StockChartAnnotationsDirective,
                    StockChartSelectedDataIndexDirective,
                    StockChartSelectedDataIndexesDirective,
                    StockChartPeriodDirective,
                    StockChartPeriodsDirective,
                    StockEventDirective,
                    StockEventsDirective,
                    StockChartIndicatorDirective,
                    StockChartIndicatorsDirective
                ],
                exports: [
                    StockChartComponent,
                    StockChartTrendlineDirective,
                    StockChartTrendlinesDirective,
                    StockChartSeriesDirective,
                    StockChartSeriesCollectionDirective,
                    StockChartStripLineDirective,
                    StockChartStripLinesDirective,
                    StockChartAxisDirective,
                    StockChartAxesDirective,
                    StockChartRowDirective,
                    StockChartRowsDirective,
                    StockChartAnnotationDirective,
                    StockChartAnnotationsDirective,
                    StockChartSelectedDataIndexDirective,
                    StockChartSelectedDataIndexesDirective,
                    StockChartPeriodDirective,
                    StockChartPeriodsDirective,
                    StockEventDirective,
                    StockEventsDirective,
                    StockChartIndicatorDirective,
                    StockChartIndicatorsDirective
                ]
            },] },
];
/**
 * @nocollapse
 */
StockChartModule.ctorParameters = function () { return []; };
/**
 * NgModule definition for the StockChart component with providers.
 */
var StockChartAllModule = /** @class */ (function () {
    function StockChartAllModule() {
    }
    return StockChartAllModule;
}());
StockChartAllModule.decorators = [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"], StockChartModule],
                exports: [
                    StockChartModule
                ],
                providers: []
            },] },
];
/**
 * @nocollapse
 */
StockChartAllModule.ctorParameters = function () { return []; };
/**
 * Generated bundle index. Do not edit.
 */


//# sourceMappingURL=ej2-angular-charts.es5.js.map


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/index.js":
/*!****************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/index.js ***!
  \****************************************************/
/*! exports provided: Ajax, Animation, rippleEffect, isRippleEnabled, enableRipple, Base, getComponent, 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, createInstance, setImmediate, getValue, setValue, deleteObject, isObject, getEnumValue, merge, extend, isNullOrUndefined, isUndefined, getUniqueID, debounce, queryParams, isObjectArray, compareElementParent, throwError, print, formatUnit, isBlazor, getElement, getInstance, addInstance, uniqueID, createElement, addClass, removeClass, isVisible, prepend, append, detach, remove, attributes, select, selectAll, closest, siblings, getAttributeOrDefault, setStyleAttribute, classList, matches, Observer */
/***/ (function(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-base/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ajax", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Ajax"]; });

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* 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__, "updateBlazorTemplate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"]; });

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

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

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

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

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

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

/* 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__, "deleteObject", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["deleteObject"]; });

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/ajax.js":
/*!*******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/ajax.js ***!
  \*******************************************************/
/*! exports provided: Ajax */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ajax", function() { return Ajax; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");

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 = /** @class */ (function () {
    /**
     * Constructor for Ajax class
     * @param  {string|Object} options?
     * @param  {string} type?
     * @param  {boolean} async?
     * @returns defaultType
     */
    function Ajax(options, type, async, contentType) {
        /**
         * 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 = !Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(async) ? async : true;
        }
        else if (typeof options === 'object') {
            this.options = options;
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    Ajax.prototype.send = function (data) {
        var _this = this;
        this.data = Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data) ? this.data : data;
        var eventArgs = {
            cancel: false,
            httpRequest: null
        };
        var promise = new Promise(function (resolve, reject) {
            _this.httpRequest = new XMLHttpRequest();
            _this.httpRequest.onreadystatechange = function () { _this.stateChange(resolve, reject); };
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.onLoad)) {
                _this.httpRequest.onload = _this.onLoad;
            }
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.onProgress)) {
                _this.httpRequest.onprogress = _this.onProgress;
            }
            /* istanbul ignore next */
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.onAbort)) {
                _this.httpRequest.onabort = _this.onAbort;
            }
            /* istanbul ignore next */
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.onError)) {
                _this.httpRequest.onerror = _this.onError;
            }
            //** Upload Events **/
            /* istanbul ignore next */
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.onUploadProgress)) {
                _this.httpRequest.upload.onprogress = _this.onUploadProgress;
            }
            _this.httpRequest.open(_this.type, _this.url, _this.mode);
            // Set default headers
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.data) && _this.contentType !== null) {
                _this.httpRequest.setRequestHeader('Content-Type', _this.contentType || 'application/json; charset=utf-8');
            }
            if (_this.beforeSend) {
                eventArgs.httpRequest = _this.httpRequest;
                _this.beforeSend(eventArgs);
            }
            if (!eventArgs.cancel) {
                _this.httpRequest.send(!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.data) ? _this.data : null);
            }
        });
        return promise;
    };
    Ajax.prototype.successHandler = function (data) {
        if (this.onSuccess) {
            this.onSuccess(data, this);
        }
        return data;
    };
    Ajax.prototype.failureHandler = function (reason) {
        if (this.onFailure) {
            this.onFailure(this.httpRequest);
        }
        return reason;
    };
    Ajax.prototype.stateChange = function (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}
     */
    Ajax.prototype.getResponseHeader = function (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 Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(header) ? null : header;
    };
    return Ajax;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/animation.js":
/*!************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/animation.js ***!
  \************************************************************/
/*! exports provided: Animation, rippleEffect, isRippleEnabled, enableRipple */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom */ "./node_modules/@syncfusion/ej2-base/src/dom.js");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./node_modules/@syncfusion/ej2-base/src/base.js");
/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./browser */ "./node_modules/@syncfusion/ej2-base/src/browser.js");
/* harmony import */ var _event_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./event-handler */ "./node_modules/@syncfusion/ej2-base/src/event-handler.js");
/* harmony import */ var _notify_property_change__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./notify-property-change */ "./node_modules/@syncfusion/ej2-base/src/notify-property-change.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};





/**
 * 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 = /** @class */ (function (_super) {
    __extends(Animation, _super);
    function Animation(options) {
        var _this = _super.call(this, options, undefined) || this;
        /**
         * @private
         */
        _this.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 _this;
    }
    Animation_1 = Animation;
    /**
     * 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}
     */
    Animation.prototype.animate = function (element, options) {
        options = !options ? {} : options;
        var model = this.getModel(options);
        if (typeof element === 'string') {
            var elements = Array.prototype.slice.call(Object(_dom__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(element, document));
            for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
                var element_1 = elements_1[_i];
                model.element = element_1;
                Animation_1.delayAnimation(model);
            }
        }
        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}
     */
    Animation.stop = function (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}
     */
    Animation.delayAnimation = function (model) {
        if (model.delay) {
            setTimeout(function () { Animation_1.applyAnimation(model); }, model.delay);
        }
        else {
            Animation_1.applyAnimation(model);
        }
    };
    /**
     * Triggers animation
     * @param {AnimationModel} model
     * @returns {void}
     */
    Animation.applyAnimation = function (model) {
        var _this = 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 (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(_this, 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(_this, 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(_this, 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(_this, e);
                }
            }
        };
        startAnimation();
    };
    /**
     * Returns Animation Model
     * @param {AnimationModel} options
     * @returns {AnimationModel}
     */
    Animation.prototype.getModel = function (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
     */
    Animation.prototype.onPropertyChanged = function (newProp, oldProp) {
        // no code needed
    };
    /**
     * Returns module name as animation
     * @private
     */
    Animation.prototype.getModuleName = function () {
        return 'animation';
    };
    /**
     * @private
     */
    Animation.prototype.destroy = function () {
        //Override base destroy;
    };
    var Animation_1;
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_4__["Property"])('FadeIn')
    ], Animation.prototype, "name", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_4__["Property"])(400)
    ], Animation.prototype, "duration", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_4__["Property"])('ease')
    ], Animation.prototype, "timingFunction", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_4__["Property"])(0)
    ], Animation.prototype, "delay", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_4__["Event"])()
    ], Animation.prototype, "progress", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_4__["Event"])()
    ], Animation.prototype, "begin", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_4__["Event"])()
    ], Animation.prototype, "end", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_4__["Event"])()
    ], Animation.prototype, "fail", void 0);
    Animation = Animation_1 = __decorate([
        _notify_property_change__WEBPACK_IMPORTED_MODULE_4__["NotifyPropertyChanges"]
    ], Animation);
    return Animation;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));

/**
 * 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');
    _event_handler__WEBPACK_IMPORTED_MODULE_3__["EventHandler"].add(element, 'mousedown', rippleHandler, { parent: element, rippleOptions: rippleModel });
    _event_handler__WEBPACK_IMPORTED_MODULE_3__["EventHandler"].add(element, 'mouseup', rippleUpHandler, { parent: element, rippleOptions: rippleModel, done: done });
    _event_handler__WEBPACK_IMPORTED_MODULE_3__["EventHandler"].add(element, 'mouseleave', rippleLeaveHandler, { parent: element, rippleOptions: rippleModel });
    if (_browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].isPointer) {
        _event_handler__WEBPACK_IMPORTED_MODULE_3__["EventHandler"].add(element, 'transitionend', rippleLeaveHandler, { parent: element, rippleOptions: rippleModel });
    }
    return (function () {
        element.removeAttribute('data-ripple');
        _event_handler__WEBPACK_IMPORTED_MODULE_3__["EventHandler"].remove(element, 'mousedown', rippleHandler);
        _event_handler__WEBPACK_IMPORTED_MODULE_3__["EventHandler"].remove(element, 'mouseup', rippleUpHandler);
        _event_handler__WEBPACK_IMPORTED_MODULE_3__["EventHandler"].remove(element, 'mouseleave', rippleLeaveHandler);
        _event_handler__WEBPACK_IMPORTED_MODULE_3__["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 ? Object(_dom__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, selector) : target;
    if (!element || (this.rippleOptions && Object(_dom__WEBPACK_IMPORTED_MODULE_0__["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 = Object(_dom__WEBPACK_IMPORTED_MODULE_0__["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) {
        _event_handler__WEBPACK_IMPORTED_MODULE_3__["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 ? Object(_dom__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, selector) : target;
    if (!element || (element && element.className.indexOf('e-ripple') === -1)) {
        return;
    }
    var rippleElements = Object(_dom__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.e-ripple-element', element);
    var rippleElement = rippleElements[rippleElements.length - 1];
    if (rippleElement) {
        rippleElement.style.opacity = '0.5';
    }
    if (eventArgs.parent !== element) {
        _event_handler__WEBPACK_IMPORTED_MODULE_3__["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;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/base.js":
/*!*******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/base.js ***!
  \*******************************************************/
/*! exports provided: Base, getComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dom */ "./node_modules/@syncfusion/ej2-base/src/dom.js");
/* harmony import */ var _observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./observer */ "./node_modules/@syncfusion/ej2-base/src/observer.js");



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 = /** @class */ (function () {
    /**
     * Base constructor accept options and element
     */
    function Base(options, element) {
        this.isProtectedOnChange = true;
        this.properties = {};
        this.changedProperties = {};
        this.oldProperties = {};
        this.refreshing = false;
        // tslint:disable-next-line:no-empty
        this.finalUpdate = function () { };
        this.childChangedProperties = {};
        this.modelObserver = new _observer__WEBPACK_IMPORTED_MODULE_2__["Observer"](this);
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(element)) {
            if ('string' === typeof (element)) {
                this.element = document.querySelector(element);
            }
            else {
                this.element = element;
            }
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element)) {
                this.isProtectedOnChange = false;
                this.addInstance();
            }
        }
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["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.
     */
    Base.prototype.setProperties = function (prop, muteOnChange) {
        var prevDetection = this.isProtectedOnChange;
        this.isProtectedOnChange = !!muteOnChange;
        Object(_util__WEBPACK_IMPORTED_MODULE_0__["merge"])(this, prop);
        if (muteOnChange !== true) {
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["merge"])(this.changedProperties, prop);
            this.dataBind();
        }
        this.finalUpdate();
        this.changedProperties = {};
        this.oldProperties = {};
        this.isProtectedOnChange = prevDetection;
    };
    ;
    /**
     * Calls for child element data bind
     * @param {Object} obj
     * @param {Object} parent
     * @returns {void}
     */
    // tslint:disable-next-line:no-any
    Base.callChildDataBind = function (obj, parent) {
        var keys = Object.keys(obj);
        for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
            var key = keys_1[_i];
            if (parent[key] instanceof Array) {
                for (var _a = 0, _b = parent[key]; _a < _b.length; _a++) {
                    var obj_1 = _b[_a];
                    if (obj_1.dataBind !== undefined) {
                        obj_1.dataBind();
                    }
                }
            }
            else {
                parent[key].dataBind();
            }
        }
    };
    Base.prototype.clearChanges = function () {
        this.finalUpdate();
        this.changedProperties = {};
        this.oldProperties = {};
        this.childChangedProperties = {};
    };
    /**
     * Bind property changes immediately to components
     */
    Base.prototype.dataBind = function () {
        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;
        }
    };
    ;
    Base.prototype.saveChanges = function (key, newValue, oldValue) {
        if (this.isProtectedOnChange) {
            return;
        }
        this.oldProperties[key] = oldValue;
        this.changedProperties[key] = newValue;
        this.finalUpdate();
        this.finalUpdate = Object(_util__WEBPACK_IMPORTED_MODULE_0__["setImmediate"])(this.dataBind.bind(this));
    };
    ;
    /** 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}
     */
    Base.prototype.addEventListener = function (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}
     */
    Base.prototype.removeEventListener = function (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}
     */
    Base.prototype.trigger = function (eventName, eventProp, successHandler, errorHandler) {
        var _this = 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 = Object(_util__WEBPACK_IMPORTED_MODULE_0__["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' && _this.modelObserver.isJson(data) ?
                                            JSON.parse(data) : data;
                                        successHandler.call(_this, data);
                                    }
                                }).catch(function (data) {
                                    if (errorHandler) {
                                        data = typeof data === 'string' && _this.modelObserver.isJson(data) ? JSON.parse(data) : data;
                                        errorHandler.call(_this, 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
     */
    Base.prototype.addInstance = function () {
        // Add module class to the root element
        var moduleClass = 'e-' + this.getModuleName().toLowerCase();
        Object(_dom__WEBPACK_IMPORTED_MODULE_1__["addClass"])([this.element], ['e-lib', moduleClass]);
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.ej2_instances)) {
            this.element.ej2_instances.push(this);
        }
        else {
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["setValue"])('ej2_instances', [this], this.element);
        }
    };
    /**
     * To remove the instance from the element
     */
    Base.prototype.destroy = function () {
        var _this = this;
        this.element.ej2_instances =
            this.element.ej2_instances.filter(function (i) { return i !== _this; });
        Object(_dom__WEBPACK_IMPORTED_MODULE_1__["removeClass"])([this.element], ['e-' + this.getModuleName()]);
        if (this.element.ej2_instances.length === 0) {
            // Remove module class from the root element
            Object(_dom__WEBPACK_IMPORTED_MODULE_1__["removeClass"])([this.element], ['e-lib']);
        }
        this.clearChanges();
        this.modelObserver.destroy();
        this.isDestroyed = true;
    };
    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;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/browser.js":
/*!**********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/browser.js ***!
  \**********************************************************/
/*! exports provided: Browser */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Browser", function() { return Browser; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");

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 = /** @class */ (function () {
    function Browser() {
    }
    Browser.extractBrowserDetail = function () {
        var browserInfo = { culture: {} };
        var keys = Object.keys(REGX_BROWSER);
        var clientInfo = [];
        for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
            var key = keys_1[_i];
            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}
     */
    Browser.getEvent = function (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}
     */
    Browser.getTouchStartEvent = function () {
        return Browser.getEvent('start');
    };
    /**
     * To get the Touch end event from browser
     * @returns {string}
     */
    Browser.getTouchEndEvent = function () {
        return Browser.getEvent('end');
    };
    /**
     * To get the Touch move event from browser
     * @returns {string}
     */
    Browser.getTouchMoveEvent = function () {
        return Browser.getEvent('move');
    };
    /**
     * To cancel the touch event from browser
     * @returns {string}
     */
    Browser.getTouchCancelEvent = function () {
        return Browser.getEvent('cancel');
    };
    /**
     * To get the value based on provided key and regX
     * @param {string} key
     * @param {RegExp} regX
     * @returns {Object}
     */
    Browser.getValue = function (key, regX) {
        var browserDetails = window.browserDetails;
        if ('undefined' === typeof browserDetails[key]) {
            return browserDetails[key] = regX.test(Browser.userAgent);
        }
        return browserDetails[key];
    };
    Object.defineProperty(Browser, "userAgent", {
        get: function () {
            return Browser.uA;
        },
        //Properties 
        /**
         * Property specifies the userAgent of the browser. Default userAgent value is based on the browser.
         * Also we can set our own userAgent.
         */
        set: function (uA) {
            Browser.uA = uA;
            window.browserDetails = {};
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "info", {
        //Read Only Properties
        /**
         * Property is to get the browser information like Name, Version and Language
         * @returns BrowserInfo
         */
        get: function () {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.browserDetails.info)) {
                return window.browserDetails.info = Browser.extractBrowserDetail();
            }
            return window.browserDetails.info;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isIE", {
        /**
         * Property is to get whether the userAgent is based IE.
         */
        get: function () {
            return Browser.getValue('isIE', REGX_IE);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isTouch", {
        /**
         * Property is to get whether the browser has touch support.
         */
        get: function () {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.browserDetails.isTouch)) {
                return window.browserDetails.isTouch = ('ontouchstart' in window);
            }
            return window.browserDetails.isTouch;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isPointer", {
        /**
         * Property is to get whether the browser has Pointer support.
         */
        get: function () {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.browserDetails.isPointer)) {
                return window.browserDetails.isPointer = ('pointerEnabled' in window.navigator);
            }
            return window.browserDetails.isPointer;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isMSPointer", {
        /**
         * Property is to get whether the browser has MSPointer support.
         */
        get: function () {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.browserDetails.isMSPointer)) {
                return window.browserDetails.isMSPointer = ('msPointerEnabled' in window.navigator);
            }
            return window.browserDetails.isMSPointer;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isDevice", {
        /**
         * Property is to get whether the userAgent is device based.
         */
        get: function () {
            return Browser.getValue('isDevice', REGX_MOBILE);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isIos", {
        /**
         * Property is to get whether the userAgent is IOS.
         */
        get: function () {
            return Browser.getValue('isIos', REGX_IOS);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isIos7", {
        /**
         * Property is to get whether the userAgent is Ios7.
         */
        get: function () {
            return Browser.getValue('isIos7', REGX_IOS7);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isAndroid", {
        /**
         * Property is to get whether the userAgent is Android.
         */
        get: function () {
            return Browser.getValue('isAndroid', REGX_ANDROID);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isWebView", {
        /**
         * Property is to identify whether application ran in web view.
         */
        get: function () {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.browserDetails.isWebView)) {
                window.browserDetails.isWebView = !(Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.cordova) && Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.PhoneGap)
                    && Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.phonegap) && window.forge !== 'object');
                return window.browserDetails.isWebView;
            }
            return window.browserDetails.isWebView;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "isWindows", {
        /**
         * Property is to get whether the userAgent is Windows.
         */
        get: function () {
            return Browser.getValue('isWindows', REGX_WINDOWS);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "touchStartEvent", {
        /**
         * Property is to get the touch start event. It returns event name based on browser.
         */
        get: function () {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.browserDetails.touchStartEvent)) {
                return window.browserDetails.touchStartEvent = Browser.getTouchStartEvent();
            }
            return window.browserDetails.touchStartEvent;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "touchMoveEvent", {
        /**
         * Property is to get the touch move event. It returns event name based on browser.
         */
        get: function () {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.browserDetails.touchMoveEvent)) {
                return window.browserDetails.touchMoveEvent = Browser.getTouchMoveEvent();
            }
            return window.browserDetails.touchMoveEvent;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "touchEndEvent", {
        /**
         * Property is to get the touch end event. It returns event name based on browser.
         */
        get: function () {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.browserDetails.touchEndEvent)) {
                return window.browserDetails.touchEndEvent = Browser.getTouchEndEvent();
            }
            return window.browserDetails.touchEndEvent;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Browser, "touchCancelEvent", {
        /**
         * Property is to cancel the touch end event.
         */
        get: function () {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(window.browserDetails.touchCancelEvent)) {
                return window.browserDetails.touchCancelEvent = Browser.getTouchCancelEvent();
            }
            return window.browserDetails.touchCancelEvent;
        },
        enumerable: true,
        configurable: true
    });
    /* istanbul ignore next */
    Browser.uA = typeof navigator !== 'undefined' ? navigator.userAgent : '';
    return Browser;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/child-property.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/child-property.js ***!
  \*****************************************************************/
/*! exports provided: ChildProperty */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildProperty", function() { return ChildProperty; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./node_modules/@syncfusion/ej2-base/src/base.js");


/**
 * To detect the changes for inner properties.
 * @private
 */
var ChildProperty = /** @class */ (function () {
    function ChildProperty(parent, propName, defaultValue, isArray) {
        this.properties = {};
        this.changedProperties = {};
        this.childChangedProperties = {};
        this.oldProperties = {};
        // tslint:disable-next-line:no-empty
        this.finalUpdate = function () { };
        this.callChildDataBind = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('callChildDataBind', _base__WEBPACK_IMPORTED_MODULE_1__["Base"]);
        this.parentObj = parent;
        this.controlParent = this.parentObj.controlParent || this.parentObj;
        this.propName = propName;
        this.setProperties(defaultValue, true);
        this.isParentArray = isArray;
    }
    /**
     * Updates the property changes
     * @param {boolean} val
     * @param {string} propName
     * @returns {void}
     */
    ChildProperty.prototype.updateChange = function (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
     */
    ChildProperty.prototype.updateTimeOut = function () {
        if (this.parentObj.updateTimeOut) {
            this.parentObj.finalUpdate();
            this.parentObj.updateTimeOut();
        }
        else {
            var changeTime_1 = setTimeout(this.parentObj.dataBind.bind(this.parentObj));
            var clearUpdate = function () {
                clearTimeout(changeTime_1);
            };
            this.finalUpdate = clearUpdate;
        }
    };
    /**
     * Clears changed properties
     */
    ChildProperty.prototype.clearChanges = function () {
        this.finalUpdate();
        this.updateChange(false, this.propName);
        this.oldProperties = {};
        this.changedProperties = {};
    };
    /**
     * Set property changes
     * @param {Object} prop
     * @param {boolean} muteOnChange
     * {void}
     */
    ChildProperty.prototype.setProperties = function (prop, muteOnChange) {
        if (muteOnChange === true) {
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["merge"])(this, prop);
            this.updateChange(false, this.propName);
            this.clearChanges();
        }
        else {
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["merge"])(this, prop);
        }
    };
    /**
     * Binds data
     */
    ChildProperty.prototype.dataBind = function () {
        this.callChildDataBind(this.childChangedProperties, this);
        if (this.isParentArray) {
            var curIndex = this.parentObj[this.propName].indexOf(this);
            if (Object.keys(this.changedProperties).length) {
                Object(_util__WEBPACK_IMPORTED_MODULE_0__["setValue"])(this.propName + '.' + curIndex, this.changedProperties, this.parentObj.changedProperties);
                Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    ChildProperty.prototype.saveChanges = function (key, newValue, oldValue) {
        if (this.controlParent.isProtectedOnChange) {
            return;
        }
        this.oldProperties[key] = oldValue;
        this.changedProperties[key] = newValue;
        this.updateChange(true, this.propName);
        this.finalUpdate();
        this.updateTimeOut();
    };
    return ChildProperty;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/component.js":
/*!************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/component.js ***!
  \************************************************************/
/*! exports provided: Component */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _module_loader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./module-loader */ "./node_modules/@syncfusion/ej2-base/src/module-loader.js");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@syncfusion/ej2-base/src/base.js");
/* harmony import */ var _observer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./observer */ "./node_modules/@syncfusion/ej2-base/src/observer.js");
/* harmony import */ var _child_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./child-property */ "./node_modules/@syncfusion/ej2-base/src/child-property.js");
/* harmony import */ var _notify_property_change__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./notify-property-change */ "./node_modules/@syncfusion/ej2-base/src/notify-property-change.js");
/* harmony import */ var _internationalization__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./internationalization */ "./node_modules/@syncfusion/ej2-base/src/internationalization.js");
/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./dom */ "./node_modules/@syncfusion/ej2-base/src/dom.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 componentCount = 0;
var lastPageID;
var lastHistoryLen = 0;
/**
 * Base class for all Essential JavaScript components
 */
var Component = /** @class */ (function (_super) {
    __extends(Component, _super);
    /**
     * Initialize the constructor for component base
     */
    function Component(options, selector) {
        var _this = _super.call(this, options, selector) || this;
        _this.randomId = Object(_util__WEBPACK_IMPORTED_MODULE_0__["uniqueID"])();
        /**
         * string template option for Blazor template rendering
         * @private
         */
        _this.isStringTemplate = false;
        _this.needsID = false;
        /**
         * This is a instance method to create an element.
         * @private
         */
        _this.createElement = _dom__WEBPACK_IMPORTED_MODULE_7__["createElement"];
        if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.enableRtl)) {
            _this.setProperties({ 'enableRtl': _internationalization__WEBPACK_IMPORTED_MODULE_6__["rightToLeft"] }, true);
        }
        if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.locale)) {
            _this.setProperties({ 'locale': _internationalization__WEBPACK_IMPORTED_MODULE_6__["defaultCulture"] }, true);
        }
        _this.moduleLoader = new _module_loader__WEBPACK_IMPORTED_MODULE_1__["ModuleLoader"](_this);
        _this.localObserver = new _observer__WEBPACK_IMPORTED_MODULE_3__["Observer"](_this);
        // tslint:disable-next-line:no-function-constructor-with-string-args
        _internationalization__WEBPACK_IMPORTED_MODULE_6__["onIntlChange"].on('notifyExternalChange', _this.detectFunction, _this, _this.randomId);
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(selector)) {
            _this.appendTo();
        }
        return _this;
    }
    Component.prototype.requiredModules = function () {
        return [];
    };
    ;
    /**
     * Destroys the sub modules while destroying the widget
     */
    Component.prototype.destroy = function () {
        if (this.isDestroyed) {
            return;
        }
        if (this.enablePersistence) {
            this.setPersistData();
        }
        this.localObserver.destroy();
        if (this.refreshing) {
            return;
        }
        Object(_dom__WEBPACK_IMPORTED_MODULE_7__["removeClass"])([this.element], ['e-control']);
        this.trigger('destroyed', { cancel: false });
        _super.prototype.destroy.call(this);
        this.moduleLoader.clean();
        _internationalization__WEBPACK_IMPORTED_MODULE_6__["onIntlChange"].off('notifyExternalChange', this.detectFunction, this.randomId);
    };
    /**
     * Applies all the pending property changes and render the component again.
     */
    Component.prototype.refresh = function () {
        this.refreshing = true;
        this.moduleLoader.clean();
        this.destroy();
        this.clearChanges();
        this.localObserver = new _observer__WEBPACK_IMPORTED_MODULE_3__["Observer"](this);
        this.preRender();
        this.injectModules();
        this.render();
        this.refreshing = false;
    };
    /**
     * Appends the control within the given HTML element
     * @param {string | HTMLElement} selector - Target element where control needs to be appended
     */
    Component.prototype.appendTo = function (selector) {
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selector) && typeof (selector) === 'string') {
            this.element = document.querySelector(selector);
        }
        else if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selector)) {
            this.element = selector;
        }
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element)) {
            var moduleClass = 'e-' + this.getModuleName().toLowerCase();
            Object(_dom__WEBPACK_IMPORTED_MODULE_7__["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 = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ej2_instances', this.element);
            if (!inst || inst.indexOf(this) === -1) {
                _super.prototype.addInstance.call(this);
            }
            this.preRender();
            this.injectModules();
            this.render();
            this.trigger('created');
        }
    };
    /**
     * When invoked, applies the pending property changes immediately to the component.
     */
    Component.prototype.dataBind = function () {
        this.injectModules();
        _super.prototype.dataBind.call(this);
    };
    ;
    /**
     * 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
     */
    Component.prototype.on = function (event, handler, context) {
        if (typeof event === 'string') {
            this.localObserver.on(event, handler, context);
        }
        else {
            for (var _i = 0, event_1 = event; _i < event_1.length; _i++) {
                var arg = event_1[_i];
                this.localObserver.on(arg.event, arg.handler, arg.context);
            }
        }
    };
    /**
     * 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
     */
    Component.prototype.off = function (event, handler) {
        if (typeof event === 'string') {
            this.localObserver.off(event, handler);
        }
        else {
            for (var _i = 0, event_2 = event; _i < event_2.length; _i++) {
                var arg = event_2[_i];
                this.localObserver.off(arg.event, arg.handler);
            }
        }
    };
    /**
     * 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
     */
    Component.prototype.notify = function (property, argument) {
        if (this.isDestroyed !== true) {
            this.localObserver.notify(property, argument);
        }
    };
    /**
     * Get injected modules
     * @private
     */
    Component.prototype.getInjectedModules = function () {
        return this.injectedModules;
    };
    ;
    /**
     * Dynamically injects the required modules to the component.
     */
    Component.Inject = function () {
        var moduleList = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            moduleList[_i] = arguments[_i];
        }
        if (!this.prototype.injectedModules) {
            this.prototype.injectedModules = [];
        }
        for (var i = 0; i < moduleList.length; i++) {
            if (this.prototype.injectedModules.indexOf(moduleList[i]) === -1) {
                this.prototype.injectedModules.push(moduleList[i]);
            }
        }
    };
    Component.prototype.injectModules = function () {
        if (this.injectedModules && this.injectedModules.length) {
            this.moduleLoader.inject(this.requiredModules(), this.injectedModules);
        }
    };
    Component.prototype.detectFunction = function (args) {
        var prop = Object.keys(args);
        if (prop.length) {
            this[prop[0]] = args[prop[0]];
        }
    };
    Component.prototype.mergePersistData = function () {
        var data = window.localStorage.getItem(this.getModuleName() + this.element.id);
        if (!(Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data) || (data === ''))) {
            this.setProperties(JSON.parse(data), true);
        }
    };
    Component.prototype.setPersistData = function () {
        if (!this.isDestroyed) {
            window.localStorage.setItem(this.getModuleName() + this.element.id, this.getPersistData());
        }
    };
    //tslint:disable-next-line
    Component.prototype.clearTemplate = function (templateName, index) {
        //No Code
    };
    Component.prototype.getUniqueID = function (definedName) {
        if (this.isHistoryChanged()) {
            componentCount = 0;
        }
        lastPageID = this.pageID(location.href);
        lastHistoryLen = history.length;
        return definedName + '_' + lastPageID + '_' + componentCount++;
    };
    Component.prototype.pageID = function (url) {
        var hash = 0;
        if (url.length === 0) {
            return hash;
        }
        for (var i = 0; i < url.length; i++) {
            var char = url.charCodeAt(i);
            hash = ((hash << 5) - hash) + char;
            hash = hash & hash; // Convert to 32bit integer
        }
        return Math.abs(hash);
    };
    Component.prototype.isHistoryChanged = function () {
        return lastPageID !== this.pageID(location.href) || lastHistoryLen !== history.length;
    };
    Component.prototype.addOnPersist = function (options) {
        var _this = this;
        var persistObj = {};
        for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
            var key = options_1[_i];
            var objValue = void 0;
            objValue = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])(key, this);
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(objValue)) {
                Object(_util__WEBPACK_IMPORTED_MODULE_0__["setValue"])(key, this.getActualProperties(objValue), persistObj);
            }
        }
        return JSON.stringify(persistObj, function (key, value) {
            return _this.getActualProperties(value);
        });
    };
    Component.prototype.getActualProperties = function (obj) {
        if (obj instanceof _child_property__WEBPACK_IMPORTED_MODULE_4__["ChildProperty"]) {
            return Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('properties', obj);
        }
        else {
            return obj;
        }
    };
    Component.prototype.ignoreOnPersist = function (options) {
        return JSON.stringify(this.iterateJsonProperties(this.properties, options));
    };
    Component.prototype.iterateJsonProperties = function (obj, ignoreList) {
        var newObj = {};
        var _loop_1 = function (key) {
            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] = this_1.iterateJsonProperties(this_1.getActualProperties(value), newList);
                }
                else {
                    newObj[key] = value;
                }
            }
        };
        var this_1 = this;
        for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {
            var key = _a[_i];
            _loop_1(key);
        }
        return newObj;
    };
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_5__["Property"])(false)
    ], Component.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_5__["Property"])()
    ], Component.prototype, "enableRtl", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_5__["Property"])()
    ], Component.prototype, "locale", void 0);
    Component = __decorate([
        _notify_property_change__WEBPACK_IMPORTED_MODULE_5__["NotifyPropertyChanges"]
    ], Component);
    return Component;
}(_base__WEBPACK_IMPORTED_MODULE_2__["Base"]));

//Function handling for page navigation detection 
/* istanbul ignore next */
(function () {
    if (typeof window !== 'undefined') {
        window.addEventListener('popstate', 
        /* istanbul ignore next */
        function () {
            componentCount = 0;
        });
    }
})();


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/dom.js":
/*!******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/dom.js ***!
  \******************************************************/
/*! exports provided: createElement, addClass, removeClass, isVisible, prepend, append, detach, remove, attributes, select, selectAll, closest, siblings, getAttributeOrDefault, setStyleAttribute, classList, matches */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _event_handler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./event-handler */ "./node_modules/@syncfusion/ej2-base/src/event-handler.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/**
 * 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);
    for (var _i = 0, _a = elements; _i < _a.length; _i++) {
        var ele = _a[_i];
        for (var _b = 0, classList_1 = classList; _b < classList_1.length; _b++) {
            var className = classList_1[_b];
            if (!ele.classList.contains(className)) {
                ele.classList.add(className);
            }
        }
    }
    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);
    for (var _i = 0, _a = elements; _i < _a.length; _i++) {
        var ele = _a[_i];
        if (ele.className !== '') {
            for (var _b = 0, classList_2 = classList; _b < classList_2.length; _b++) {
                var className = classList_2[_b];
                ele.classList.remove(className);
            }
        }
    }
    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) {
    var docFrag = document.createDocumentFragment();
    for (var _i = 0, _a = fromElements; _i < _a.length; _i++) {
        var ele = _a[_i];
        docFrag.appendChild(ele);
    }
    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) {
    var docFrag = document.createDocumentFragment();
    for (var _i = 0, _a = fromElements; _i < _a.length; _i++) {
        var ele = _a[_i];
        docFrag.appendChild(ele);
    }
    toElement.appendChild(docFrag);
    if (isEval) {
        executeScript(toElement);
    }
    return fromElements;
}
/**
 * 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) {
    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) {
    var parentNode = element.parentNode;
    _event_handler__WEBPACK_IMPORTED_MODULE_0__["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 _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
        var key = keys_1[_i];
        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
 */
function select(selector, context) {
    if (context === void 0) { context = document; }
    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, context) {
    if (context === void 0) { context = document; }
    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);
    for (var _i = 0, childNodes_1 = childNodes; _i < childNodes_1.length; _i++) {
        var curNode = childNodes_1[_i];
        if (curNode.nodeType === Node.ELEMENT_NODE && element !== curNode) {
            siblings.push(curNode);
        }
    }
    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 = element.getAttribute(property);
    if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(attrVal)) {
        element.setAttribute(property, value.toString());
        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) {
        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) {
    var matches = element.matches || element.msMatchesSelector || element.webkitMatchesSelector;
    if (matches) {
        return matches.call(element, selector);
    }
    else {
        return [].indexOf.call(document.querySelectorAll(selector), element) !== -1;
    }
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/draggable.js":
/*!************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/draggable.js ***!
  \************************************************************/
/*! exports provided: Position, Draggable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./node_modules/@syncfusion/ej2-base/src/base.js");
/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./browser */ "./node_modules/@syncfusion/ej2-base/src/browser.js");
/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dom */ "./node_modules/@syncfusion/ej2-base/src/dom.js");
/* harmony import */ var _notify_property_change__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./notify-property-change */ "./node_modules/@syncfusion/ej2-base/src/notify-property-change.js");
/* harmony import */ var _event_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./event-handler */ "./node_modules/@syncfusion/ej2-base/src/event-handler.js");
/* harmony import */ var _child_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./child-property */ "./node_modules/@syncfusion/ej2-base/src/child-property.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 defaultPosition = { left: 0, top: 0, bottom: 0, right: 0 };
var positionProp = ['offsetLeft', 'offsetTop'];
var axisMapper = ['x', 'y'];
var axisValueMapper = ['left', 'top'];
/**
 * Specifies the position coordinates
 */
var Position = /** @class */ (function (_super) {
    __extends(Position, _super);
    function Position() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(0)
    ], Position.prototype, "left", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(0)
    ], Position.prototype, "top", void 0);
    return Position;
}(_child_property__WEBPACK_IMPORTED_MODULE_5__["ChildProperty"]));

/**
 * 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 = /** @class */ (function (_super) {
    __extends(Draggable, _super);
    function Draggable(element, options) {
        var _this = _super.call(this, options, element) || this;
        _this.dragLimit = Draggable_1.getDefaultPosition();
        _this.borderWidth = Draggable_1.getDefaultPosition();
        _this.padding = Draggable_1.getDefaultPosition();
        _this.diffX = 0;
        _this.prevLeft = 0;
        _this.prevTop = 0;
        _this.dragProcessStarted = false;
        /* tslint:disable no-any */
        _this.tapHoldTimer = 0;
        _this.externalInitialize = false;
        _this.diffY = 0;
        _this.droppables = {};
        _this.bind();
        return _this;
    }
    Draggable_1 = Draggable;
    Draggable.prototype.bind = function () {
        this.toggleEvents();
        if (_browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].isIE) {
            Object(_dom__WEBPACK_IMPORTED_MODULE_2__["addClass"])([this.element], 'e-block-touch');
        }
        this.droppables[this.scope] = {};
    };
    Draggable.getDefaultPosition = function () {
        return Object(_util__WEBPACK_IMPORTED_MODULE_6__["extend"])({}, defaultPosition);
    };
    Draggable.prototype.toggleEvents = function (isUnWire) {
        var ele;
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__["isUndefined"])(this.handle)) {
            ele = Object(_dom__WEBPACK_IMPORTED_MODULE_2__["select"])(this.handle, this.element);
        }
        var handler = (this.enableTapHold && _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].isDevice && _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].isTouch) ? this.mobileInitialize : this.initialize;
        if (isUnWire) {
            _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].remove(ele || this.element, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchStartEvent, handler);
        }
        else {
            _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].add(ele || this.element, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchStartEvent, handler, this);
        }
    };
    /* istanbul ignore next */
    Draggable.prototype.mobileInitialize = function (evt) {
        var _this = this;
        var target = evt.currentTarget;
        this.tapHoldTimer = setTimeout(function () {
            _this.externalInitialize = true;
            _this.removeTapholdTimer();
            _this.initialize(evt, target);
        }, this.tapHoldThreshold);
        _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].add(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchMoveEvent, this.removeTapholdTimer, this);
    };
    /* istanbul ignore next */
    Draggable.prototype.removeTapholdTimer = function () {
        clearTimeout(this.tapHoldTimer);
        _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].remove(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchMoveEvent, this.removeTapholdTimer);
    };
    /* istanbul ignore next */
    Draggable.prototype.getScrollableParent = function (element, axis) {
        var scroll = { 'vertical': 'scrollHeight', 'horizontal': 'scrollWidth' };
        var client = { 'vertical': 'clientHeight', 'horizontal': 'clientWidth' };
        if (Object(_util__WEBPACK_IMPORTED_MODULE_6__["isNullOrUndefined"])(element)) {
            return null;
        }
        if (element[scroll[axis]] > element[client[axis]]) {
            return element;
        }
        else {
            return this.getScrollableParent(element.parentNode, axis);
        }
    };
    Draggable.prototype.initialize = function (evt, curTarget) {
        this.target = (evt.currentTarget || curTarget);
        this.dragProcessStarted = false;
        if (this.abort) {
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__["isNullOrUndefined"])(Object(_dom__WEBPACK_IMPORTED_MODULE_2__["closest"])(evt.target, this.abort))) {
                return;
            }
        }
        if (this.preventDefault && !Object(_util__WEBPACK_IMPORTED_MODULE_6__["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();
            var verticalScrollParent = this.getScrollableParent(this.element.parentNode, 'vertical');
            var horizontalScrollParent = this.getScrollableParent(this.element.parentNode, 'horizontal');
            var parentScrollX = horizontalScrollParent ? horizontalScrollParent.scrollLeft : 0;
            var parentScrollY = verticalScrollParent ? verticalScrollParent.scrollTop : 0;
            this.relativeXPosition = intCoord.pageX - (pos.left + parentScrollX);
            this.relativeYPosition = intCoord.pageY - (pos.top + parentScrollY);
        }
        if (this.externalInitialize) {
            this.intDragStart(evt);
        }
        else {
            _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].add(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchMoveEvent, this.intDragStart, this);
            _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].add(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchEndEvent, this.intDestroy, this);
        }
        this.toggleEvents(true);
        document.body.classList.add('e-prevent-select');
        this.externalInitialize = false;
        _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].trigger(document.documentElement, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchStartEvent, evt);
    };
    Draggable.prototype.intDragStart = function (evt) {
        this.removeTapholdTimer();
        var isChangeTouch = !Object(_util__WEBPACK_IMPORTED_MODULE_6__["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 = Object(_dom__WEBPACK_IMPORTED_MODULE_2__["closest"])(evt.target, this.dragTarget);
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__["isNullOrUndefined"])(intClosest)) {
                element = intClosest;
            }
        }
        this.offset = this.calculateParentPosition(element);
        this.position = this.getMousePosition(evt);
        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 || Object(_util__WEBPACK_IMPORTED_MODULE_6__["isNullOrUndefined"])(ele)) {
                return;
            }
            var dragTargetElement = this.helperElement = ele;
            this.parentClientRect = this.calculateParentPosition(dragTargetElement.offsetParent);
            if (this.dragStart) {
                var curTarget = this.getProperTargetElement(evt);
                this.trigger('dragStart', { event: evt, element: element, target: curTarget });
            }
            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;
            }
            var posValue = this.getProcessedPositionValue({
                top: (pos.top - this.diffY) + 'px',
                left: (pos.left - this.diffX) + 'px'
            });
            Object(_dom__WEBPACK_IMPORTED_MODULE_2__["setStyleAttribute"])(dragTargetElement, this.getDragPosition({ position: 'absolute', left: posValue.left, top: posValue.top }));
            _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].remove(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchMoveEvent, this.intDragStart);
            _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].remove(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchEndEvent, this.intDestroy);
            if (Object(_dom__WEBPACK_IMPORTED_MODULE_2__["isVisible"])(dragTargetElement)) {
                _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].add(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchMoveEvent, this.intDrag, this);
                _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].add(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchEndEvent, this.intDragStop, this);
                this.setGlobalDroppables(false, this.element, dragTargetElement);
            }
            else {
                this.toggleEvents();
                document.body.classList.remove('e-prevent-select');
            }
        }
    };
    Draggable.prototype.elementInViewport = function (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));
    };
    Draggable.prototype.getProcessedPositionValue = function (value) {
        if (this.queryPositionInfo) {
            return this.queryPositionInfo(value);
        }
        return value;
    };
    Draggable.prototype.calculateParentPosition = function (ele) {
        if (Object(_util__WEBPACK_IMPORTED_MODULE_6__["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)
        };
    };
    Draggable.prototype.intDrag = function (evt) {
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__["isUndefined"])(evt.changedTouches) && (evt.changedTouches.length !== 1)) {
            return;
        }
        var left;
        var top;
        this.position = this.getMousePosition(evt);
        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 */
            eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
            eleObj.instance.intOver(evt, eleObj.target);
            this.hoverObject = eleObj;
        }
        else if (this.hoverObject) {
            this.hoverObject.instance.intOut(evt, eleObj.target);
            this.hoverObject.instance.dragData[this.scope] = null;
            this.hoverObject = null;
        }
        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 + window.pageXOffset > dLeft) {
                    left = this.dragLimit.left;
                }
                else if (this.dragLimit.right + window.pageXOffset < dLeft + helperWidth) {
                    left = this.dragLimit.right - helperWidth;
                }
                else {
                    left = dLeft;
                }
            }
            if (this.pageY !== pagey || this.skipDistanceCheck) {
                var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop)
                    + parseFloat(styles.marginBottom));
                if (this.dragLimit.top + window.pageYOffset > dTop) {
                    top = this.dragLimit.top;
                }
                else if (this.dragLimit.bottom + window.pageYOffset < dTop + helperHeight) {
                    top = this.dragLimit.bottom - helperHeight;
                }
                else {
                    top = dTop;
                }
            }
        }
        else {
            left = dLeft;
            top = dTop;
        }
        var iTop = tTop + this.borderWidth.top;
        var iLeft = tLeft + this.borderWidth.left;
        if (this.dragProcessStarted) {
            if (Object(_util__WEBPACK_IMPORTED_MODULE_6__["isNullOrUndefined"])(top)) {
                top = this.prevTop;
            }
            if (Object(_util__WEBPACK_IMPORTED_MODULE_6__["isNullOrUndefined"])(left)) {
                left = this.prevLeft;
            }
        }
        var dragValue = this.getProcessedPositionValue({ top: (top - iTop) + 'px', left: (left - iLeft) + 'px' });
        Object(_dom__WEBPACK_IMPORTED_MODULE_2__["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;
    };
    Draggable.prototype.getDragPosition = function (dragValue) {
        var temp = Object(_util__WEBPACK_IMPORTED_MODULE_6__["extend"])({}, dragValue);
        if (this.axis) {
            if (this.axis === 'x') {
                delete temp.top;
            }
            else if (this.axis === 'y') {
                delete temp.left;
            }
        }
        return temp;
    };
    Draggable.prototype.getDocumentWidthHeight = function (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;
    };
    Draggable.prototype.intDragStop = function (evt) {
        this.dragProcessStarted = false;
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__["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');
    };
    Draggable.prototype.intDestroy = function (evt) {
        this.dragProcessStarted = false;
        this.toggleEvents();
        document.body.classList.remove('e-prevent-select');
        this.element.setAttribute('aria-grabbed', 'false');
        _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].remove(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchMoveEvent, this.intDragStart);
        _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].remove(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchEndEvent, this.intDragStop);
        _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].remove(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchEndEvent, this.intDestroy);
        _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].remove(document, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchMoveEvent, this.intDrag);
    };
    // triggers when property changed
    Draggable.prototype.onPropertyChanged = function (newProp, oldProp) {
        //No Code to handle
    };
    Draggable.prototype.getModuleName = function () {
        return 'draggable';
    };
    Draggable.prototype.setDragArea = function () {
        var eleWidthBound;
        var eleHeightBound;
        var top = 0;
        var left = 0;
        var ele;
        var type = typeof this.dragArea;
        if (type === 'string') {
            ele = Object(_dom__WEBPACK_IMPORTED_MODULE_2__["select"])(this.dragArea);
        }
        else {
            ele = this.dragArea;
        }
        if (ele) {
            var elementArea = ele.getBoundingClientRect();
            eleWidthBound = elementArea.width ? elementArea.width : elementArea.right - elementArea.left;
            eleHeightBound = elementArea.height ? elementArea.height : elementArea.bottom - elementArea.top;
            var keys = ['Top', 'Left', 'Bottom', 'Right'];
            var styles = getComputedStyle(ele);
            for (var i = 0; i < keys.length; i++) {
                var key = keys[i];
                var tborder = styles['border' + key + 'Width'];
                var tpadding = styles['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 = top + 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);
        }
    };
    Draggable.prototype.getProperTargetElement = function (evt) {
        var intCoord = this.getCoordinates(evt);
        var ele;
        var prevStyle = this.helperElement.style.display || '';
        if (Object(_util__WEBPACK_IMPORTED_MODULE_6__["compareElementParent"])(evt.target, this.helperElement) || evt.type.indexOf('touch') !== -1) {
            this.helperElement.style.display = 'none';
            ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
            this.helperElement.style.display = prevStyle;
        }
        else {
            ele = evt.target;
        }
        return ele;
    };
    Draggable.prototype.getMousePosition = function (evt) {
        var intCoord = this.getCoordinates(evt);
        var pageX = this.clone ? intCoord.pageX : (intCoord.pageX + window.pageXOffset) - this.relativeXPosition;
        var 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)
        };
    };
    Draggable.prototype.getCoordinates = function (evt) {
        if (evt.type.indexOf('touch') > -1) {
            return evt.changedTouches[0];
        }
        return evt;
    };
    Draggable.prototype.getHelperElement = function (evt) {
        var element;
        if (this.clone) {
            if (this.helper) {
                element = this.helper({ sender: evt, element: this.target });
            }
            else {
                element = Object(_dom__WEBPACK_IMPORTED_MODULE_2__["createElement"])('div', { className: 'e-drag-helper e-block-touch', innerHTML: 'Draggable' });
                document.body.appendChild(element);
            }
        }
        else {
            element = this.element;
        }
        return element;
    };
    Draggable.prototype.setGlobalDroppables = function (reset, drag, helper) {
        this.droppables[this.scope] = reset ? null : {
            draggable: drag,
            helper: helper,
            draggedElement: this.element
        };
    };
    Draggable.prototype.checkTargetElement = function (evt) {
        var target = this.getProperTargetElement(evt);
        var dropIns = this.getDropInstance(target);
        if (!dropIns && target && !Object(_util__WEBPACK_IMPORTED_MODULE_6__["isNullOrUndefined"])(target.parentNode)) {
            var parent_1 = Object(_dom__WEBPACK_IMPORTED_MODULE_2__["closest"])(target.parentNode, '.e-droppable') || target.parentElement;
            if (parent_1) {
                dropIns = this.getDropInstance(parent_1);
            }
        }
        return { target: target, instance: dropIns };
    };
    Draggable.prototype.getDropInstance = function (ele) {
        var name = 'getModuleName';
        var drop;
        var eleInst = ele && ele.ej2_instances;
        if (eleInst) {
            for (var _i = 0, eleInst_1 = eleInst; _i < eleInst_1.length; _i++) {
                var inst = eleInst_1[_i];
                if (inst[name]() === 'droppable') {
                    drop = inst;
                    break;
                }
            }
        }
        return drop;
    };
    Draggable.prototype.destroy = function () {
        this.toggleEvents(true);
        _super.prototype.destroy.call(this);
    };
    var Draggable_1;
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Complex"])({}, Position)
    ], Draggable.prototype, "cursorAt", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(true)
    ], Draggable.prototype, "clone", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])()
    ], Draggable.prototype, "dragArea", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Event"])()
    ], Draggable.prototype, "drag", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Event"])()
    ], Draggable.prototype, "dragStart", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Event"])()
    ], Draggable.prototype, "dragStop", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(1)
    ], Draggable.prototype, "distance", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])()
    ], Draggable.prototype, "handle", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])()
    ], Draggable.prototype, "abort", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])()
    ], Draggable.prototype, "helper", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])('default')
    ], Draggable.prototype, "scope", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])('')
    ], Draggable.prototype, "dragTarget", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])()
    ], Draggable.prototype, "axis", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])()
    ], Draggable.prototype, "queryPositionInfo", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(false)
    ], Draggable.prototype, "enableTailMode", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(false)
    ], Draggable.prototype, "skipDistanceCheck", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(true)
    ], Draggable.prototype, "preventDefault", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(false)
    ], Draggable.prototype, "enableAutoScroll", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(false)
    ], Draggable.prototype, "enableTapHold", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])(750)
    ], Draggable.prototype, "tapHoldThreshold", void 0);
    Draggable = Draggable_1 = __decorate([
        _notify_property_change__WEBPACK_IMPORTED_MODULE_3__["NotifyPropertyChanges"]
    ], Draggable);
    return Draggable;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/droppable.js":
/*!************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/droppable.js ***!
  \************************************************************/
/*! exports provided: Droppable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Droppable", function() { return Droppable; });
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./node_modules/@syncfusion/ej2-base/src/base.js");
/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./browser */ "./node_modules/@syncfusion/ej2-base/src/browser.js");
/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dom */ "./node_modules/@syncfusion/ej2-base/src/dom.js");
/* harmony import */ var _notify_property_change__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./notify-property-change */ "./node_modules/@syncfusion/ej2-base/src/notify-property-change.js");
/* harmony import */ var _event_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./event-handler */ "./node_modules/@syncfusion/ej2-base/src/event-handler.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};






/**
 * 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 = /** @class */ (function (_super) {
    __extends(Droppable, _super);
    function Droppable(element, options) {
        var _this = _super.call(this, options, element) || this;
        _this.mouseOver = false;
        _this.dragData = {};
        _this.dragStopCalled = false;
        _this.bind();
        return _this;
    }
    Droppable.prototype.bind = function () {
        this.wireEvents();
    };
    Droppable.prototype.wireEvents = function () {
        _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].add(this.element, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchEndEvent, this.intDrop, this);
    };
    // triggers when property changed
    Droppable.prototype.onPropertyChanged = function (newProp, oldProp) {
        //No Code to handle
    };
    Droppable.prototype.getModuleName = function () {
        return 'droppable';
    };
    Droppable.prototype.intOver = function (event, element) {
        if (!this.mouseOver) {
            var drag = this.dragData[this.scope];
            this.trigger('over', { event: event, target: element, dragData: drag });
            this.mouseOver = true;
        }
    };
    Droppable.prototype.intOut = function (event, element) {
        if (this.mouseOver) {
            this.trigger('out', { evt: event, target: element });
            this.mouseOver = false;
        }
    };
    Droppable.prototype.intDrop = function (evt, element) {
        if (!this.dragStopCalled) {
            return;
        }
        else {
            this.dragStopCalled = false;
        }
        var accept = true;
        var drag = this.dragData[this.scope];
        var isDrag = drag ? (drag.helper && Object(_dom__WEBPACK_IMPORTED_MODULE_2__["isVisible"])(drag.helper)) : false;
        var area;
        if (isDrag) {
            area = this.isDropArea(evt, drag.helper, element);
            if (this.accept) {
                accept = Object(_dom__WEBPACK_IMPORTED_MODULE_2__["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;
    };
    Droppable.prototype.isDropArea = function (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 = Object(_util__WEBPACK_IMPORTED_MODULE_5__["compareElementParent"])(ele, this.element);
            if (area.canDrop) {
                area.target = ele;
            }
            helper.style.display = '';
        }
        return area;
    };
    Droppable.prototype.destroy = function () {
        _event_handler__WEBPACK_IMPORTED_MODULE_4__["EventHandler"].remove(this.element, _browser__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchEndEvent, this.intDrop);
        _super.prototype.destroy.call(this);
    };
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])()
    ], Droppable.prototype, "accept", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Property"])('default')
    ], Droppable.prototype, "scope", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Event"])()
    ], Droppable.prototype, "drop", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Event"])()
    ], Droppable.prototype, "over", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_3__["Event"])()
    ], Droppable.prototype, "out", void 0);
    Droppable = __decorate([
        _notify_property_change__WEBPACK_IMPORTED_MODULE_3__["NotifyPropertyChanges"]
    ], Droppable);
    return Droppable;
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/event-handler.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/event-handler.js ***!
  \****************************************************************/
/*! exports provided: EventHandler */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventHandler", function() { return EventHandler; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");

/**
 * 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 = /** @class */ (function () {
    function EventHandler() {
    }
    // to get the event data based on element
    EventHandler.addOrGetEventData = function (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}
     */
    EventHandler.add = function (element, eventName, listener, bindTo, intDebounce) {
        var eventData = EventHandler.addOrGetEventData(element);
        var debounceListener;
        if (intDebounce) {
            debounceListener = Object(_util__WEBPACK_IMPORTED_MODULE_0__["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
            });
            element.addEventListener(event[i], debounceListener);
        }
        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}
     */
    EventHandler.remove = function (element, eventName, listener) {
        var eventData = EventHandler.addOrGetEventData(element);
        var event = eventName.split(' ');
        var _loop_1 = function (j) {
            var index = -1;
            var debounceListener;
            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++) {
            _loop_1(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}
     */
    EventHandler.clearEvents = function (element) {
        var eventData;
        var copyData;
        eventData = EventHandler.addOrGetEventData(element);
        copyData = Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    EventHandler.trigger = function (element, eventName, eventProp) {
        var eventData = EventHandler.addOrGetEventData(element);
        var fn = null;
        for (var _i = 0, eventData_1 = eventData; _i < eventData_1.length; _i++) {
            var event_1 = eventData_1[_i];
            if (event_1.name === eventName) {
                event_1.debounce.call(this, eventProp);
            }
        }
    };
    return EventHandler;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/hijri-parser.js":
/*!***************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/hijri-parser.js ***!
  \***************************************************************/
/*! exports provided: HijriParser */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HijriParser", function() { return HijriParser; });
/***
 * 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 = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/index.js":
/*!********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/index.js ***!
  \********************************************************/
/*! exports provided: Ajax, Animation, rippleEffect, isRippleEnabled, enableRipple, Base, getComponent, 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, createInstance, setImmediate, getValue, setValue, deleteObject, isObject, getEnumValue, merge, extend, isNullOrUndefined, isUndefined, getUniqueID, debounce, queryParams, isObjectArray, compareElementParent, throwError, print, formatUnit, isBlazor, getElement, getInstance, addInstance, uniqueID, createElement, addClass, removeClass, isVisible, prepend, append, detach, remove, attributes, select, selectAll, closest, siblings, getAttributeOrDefault, setStyleAttribute, classList, matches, Observer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _ajax__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ajax */ "./node_modules/@syncfusion/ej2-base/src/ajax.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ajax", function() { return _ajax__WEBPACK_IMPORTED_MODULE_0__["Ajax"]; });

/* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./animation */ "./node_modules/@syncfusion/ej2-base/src/animation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return _animation__WEBPACK_IMPORTED_MODULE_1__["Animation"]; });

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

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

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

/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@syncfusion/ej2-base/src/base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _base__WEBPACK_IMPORTED_MODULE_2__["Base"]; });

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

/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./browser */ "./node_modules/@syncfusion/ej2-base/src/browser.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Browser", function() { return _browser__WEBPACK_IMPORTED_MODULE_3__["Browser"]; });

/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./component */ "./node_modules/@syncfusion/ej2-base/src/component.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return _component__WEBPACK_IMPORTED_MODULE_4__["Component"]; });

/* harmony import */ var _child_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./child-property */ "./node_modules/@syncfusion/ej2-base/src/child-property.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChildProperty", function() { return _child_property__WEBPACK_IMPORTED_MODULE_5__["ChildProperty"]; });

/* harmony import */ var _draggable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./draggable */ "./node_modules/@syncfusion/ej2-base/src/draggable.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return _draggable__WEBPACK_IMPORTED_MODULE_6__["Position"]; });

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

/* harmony import */ var _droppable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./droppable */ "./node_modules/@syncfusion/ej2-base/src/droppable.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Droppable", function() { return _droppable__WEBPACK_IMPORTED_MODULE_7__["Droppable"]; });

/* harmony import */ var _event_handler__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./event-handler */ "./node_modules/@syncfusion/ej2-base/src/event-handler.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EventHandler", function() { return _event_handler__WEBPACK_IMPORTED_MODULE_8__["EventHandler"]; });

/* harmony import */ var _internationalization__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./internationalization */ "./node_modules/@syncfusion/ej2-base/src/internationalization.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onIntlChange", function() { return _internationalization__WEBPACK_IMPORTED_MODULE_9__["onIntlChange"]; });

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

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

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

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

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

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

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

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

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

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

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

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

/* harmony import */ var _keyboard__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./keyboard */ "./node_modules/@syncfusion/ej2-base/src/keyboard.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "KeyboardEvents", function() { return _keyboard__WEBPACK_IMPORTED_MODULE_10__["KeyboardEvents"]; });

/* harmony import */ var _l10n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./l10n */ "./node_modules/@syncfusion/ej2-base/src/l10n.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "L10n", function() { return _l10n__WEBPACK_IMPORTED_MODULE_11__["L10n"]; });

/* harmony import */ var _module_loader__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./module-loader */ "./node_modules/@syncfusion/ej2-base/src/module-loader.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModuleLoader", function() { return _module_loader__WEBPACK_IMPORTED_MODULE_12__["ModuleLoader"]; });

/* harmony import */ var _notify_property_change__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./notify-property-change */ "./node_modules/@syncfusion/ej2-base/src/notify-property-change.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Property", function() { return _notify_property_change__WEBPACK_IMPORTED_MODULE_13__["Property"]; });

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

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

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

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

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

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

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

/* harmony import */ var _touch__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./touch */ "./node_modules/@syncfusion/ej2-base/src/touch.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SwipeSettings", function() { return _touch__WEBPACK_IMPORTED_MODULE_14__["SwipeSettings"]; });

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

/* harmony import */ var _hijri_parser__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hijri-parser */ "./node_modules/@syncfusion/ej2-base/src/hijri-parser.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HijriParser", function() { return _hijri_parser__WEBPACK_IMPORTED_MODULE_15__["HijriParser"]; });

/* harmony import */ var _template_engine__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./template-engine */ "./node_modules/@syncfusion/ej2-base/src/template-engine.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blazorTemplates", function() { return _template_engine__WEBPACK_IMPORTED_MODULE_16__["blazorTemplates"]; });

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

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

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

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

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

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

/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createInstance", function() { return _util__WEBPACK_IMPORTED_MODULE_17__["createInstance"]; });

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./dom */ "./node_modules/@syncfusion/ej2-base/src/dom.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return _dom__WEBPACK_IMPORTED_MODULE_18__["createElement"]; });

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* harmony import */ var _observer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./observer */ "./node_modules/@syncfusion/ej2-base/src/observer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observer", function() { return _observer__WEBPACK_IMPORTED_MODULE_19__["Observer"]; });

/**
 * Base modules
 */






















/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/internationalization.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/internationalization.js ***!
  \***********************************************************************/
/*! exports provided: onIntlChange, rightToLeft, cldrData, defaultCulture, defaultCurrencyCode, Internationalization, setCulture, setCurrencyCode, loadCldr, enableRtl, getNumericObject, getNumberDependable, getDefaultDateObject */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _intl_date_formatter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intl/date-formatter */ "./node_modules/@syncfusion/ej2-base/src/intl/date-formatter.js");
/* harmony import */ var _intl_number_formatter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./intl/number-formatter */ "./node_modules/@syncfusion/ej2-base/src/intl/number-formatter.js");
/* harmony import */ var _intl_date_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./intl/date-parser */ "./node_modules/@syncfusion/ej2-base/src/intl/date-parser.js");
/* harmony import */ var _intl_number_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./intl/number-parser */ "./node_modules/@syncfusion/ej2-base/src/intl/number-parser.js");
/* harmony import */ var _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./intl/intl-base */ "./node_modules/@syncfusion/ej2-base/src/intl/intl-base.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _observer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./observer */ "./node_modules/@syncfusion/ej2-base/src/observer.js");







/**
 * Specifies the observer used for external change detection.
 */
var onIntlChange = new _observer__WEBPACK_IMPORTED_MODULE_6__["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 = /** @class */ (function () {
    function Internationalization(cultureName) {
        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}
     */
    Internationalization.prototype.getDateFormat = function (options) {
        return _intl_date_formatter__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    Internationalization.prototype.getNumberFormat = function (options) {
        if (options && !options.currency) {
            options.currency = defaultCurrencyCode;
        }
        return _intl_number_formatter__WEBPACK_IMPORTED_MODULE_1__["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}
     */
    Internationalization.prototype.getDateParser = function (options) {
        return _intl_date_parser__WEBPACK_IMPORTED_MODULE_2__["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}
     */
    Internationalization.prototype.getNumberParser = function (options) {
        return _intl_number_parser__WEBPACK_IMPORTED_MODULE_3__["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}
     */
    Internationalization.prototype.formatNumber = function (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}
     */
    Internationalization.prototype.formatDate = function (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}
     */
    Internationalization.prototype.parseDate = function (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}
     */
    Internationalization.prototype.parseNumber = function (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
     */
    Internationalization.prototype.getDatePattern = function (option, isExcelFormat) {
        return _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["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
     */
    Internationalization.prototype.getNumberPattern = function (option) {
        return _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["IntlBase"].getActualNumberFormat(this.getCulture(), option, cldrData);
    };
    /**
     * Returns the First Day of the Week
     * @returns {number}
     */
    Internationalization.prototype.getFirstDayOfWeek = function () {
        return _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["IntlBase"].getWeekData(this.getCulture(), cldrData);
    };
    Internationalization.prototype.getCulture = function () {
        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() {
    var data = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        data[_i] = arguments[_i];
    }
    for (var _a = 0, data_1 = data; _a < data_1.length; _a++) {
        var obj = data_1[_a];
        Object(_util__WEBPACK_IMPORTED_MODULE_5__["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(status) {
    if (status === void 0) { status = 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 = _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["IntlBase"].getDependables(cldrData, locale, '', true)[mapper[0]];
    var dateObject = _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["IntlBase"].getDependables(cldrData, locale, '')[mapper[1]];
    var numSystem = Object(_util__WEBPACK_IMPORTED_MODULE_5__["getValue"])('defaultNumberingSystem', numObject);
    var symbPattern = Object(_util__WEBPACK_IMPORTED_MODULE_5__["getValue"])('symbols-numberSystem-' + numSystem, numObject);
    var pattern = _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["IntlBase"].getSymbolPattern(type || 'decimal', numSystem, numObject, false);
    return Object(_util__WEBPACK_IMPORTED_MODULE_5__["extend"])(symbPattern, _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["IntlBase"].getFormatData(pattern, true, '', true), { 'dateSeparator': _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["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 = _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["IntlBase"].getDependables(cldrData, locale, '', true);
    return _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["IntlBase"].getCurrencySymbol(numObject.numericObject, currency);
}
/**
 * To get the default date CLDR object.
 * @ignore
 * @private
 */
function getDefaultDateObject(mode) {
    return _intl_intl_base__WEBPACK_IMPORTED_MODULE_4__["IntlBase"].getDependables(cldrData, '', mode, false)[mapper[1]];
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/intl/date-formatter.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/intl/date-formatter.js ***!
  \**********************************************************************/
/*! exports provided: basicPatterns, datePartMatcher, DateFormat */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basicPatterns", function() { return basicPatterns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "datePartMatcher", function() { return datePartMatcher; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateFormat", function() { return DateFormat; });
/* harmony import */ var _parser_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parser-base */ "./node_modules/@syncfusion/ej2-base/src/intl/parser-base.js");
/* harmony import */ var _intl_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./intl-base */ "./node_modules/@syncfusion/ej2-base/src/intl/intl-base.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _hijri_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hijri-parser */ "./node_modules/@syncfusion/ej2-base/src/hijri-parser.js");





var abbreviateRegexGlobal = /\/MMMMM|MMMM|MMM|a|LLL|EEEEE|EEEE|E|K|cccc|ccc|G+|z+/gi;
var standalone = 'stand-alone';
var weekdayKey = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
var basicPatterns = ['short', 'medium', 'long', 'full'];
var timeSetter = {
    m: 'getMinutes',
    h: 'getHours',
    H: 'getHours',
    s: 'getSeconds',
    d: 'getDate',
};
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'
};
var timeSeparator = 'timeSeparator';
/**
 * Date Format is a framework provides support for date formatting.
 * @private
 */
var DateFormat = /** @class */ (function () {
    function 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.
     */
    DateFormat.dateFormat = function (culture, option, cldr) {
        var _this = this;
        var dependable = _intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].getDependables(cldr, culture, option.calendar);
        var formatOptions = { isIslamic: _intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].islamicRegex.test(option.calendar) };
        var resPattern = option.format || _intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].getResultantPattern(option.skeleton, dependable.dateObject, option.type);
        formatOptions.dateSeperator = _intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].getDateSeparator(dependable.dateObject);
        if (Object(_util__WEBPACK_IMPORTED_MODULE_2__["isUndefined"])(resPattern)) {
            Object(_util__WEBPACK_IMPORTED_MODULE_2__["throwError"])('Format options or type given must be invalid');
        }
        else {
            formatOptions.pattern = resPattern;
            formatOptions.numMapper = _parser_base__WEBPACK_IMPORTED_MODULE_0__["ParserBase"].getNumberMapper(dependable.parserObject, _parser_base__WEBPACK_IMPORTED_MODULE_0__["ParserBase"].getNumberingSystem(cldr));
            var patternMatch = resPattern.match(abbreviateRegexGlobal) || [];
            for (var _i = 0, patternMatch_1 = patternMatch; _i < patternMatch_1.length; _i++) {
                var str = patternMatch_1[_i];
                var len = str.length;
                var char = str[0];
                if (char === 'K') {
                    char = 'h';
                }
                /* tslint:disable no-any */
                var charKey = datePartMatcher[char];
                switch (char) {
                    case 'E':
                    case 'c':
                        formatOptions.weekday = dependable.dateObject[_intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].days][standalone][_intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].monthIndex[len]];
                        break;
                    case 'M':
                    case 'L':
                        formatOptions.month = dependable.dateObject[_intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].month][standalone][_intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].monthIndex[len]];
                        break;
                    case 'a':
                        formatOptions.designator = Object(_util__WEBPACK_IMPORTED_MODULE_2__["getValue"])('dayPeriods.format.wide', dependable.dateObject);
                        break;
                    case 'G':
                        var eText = (len <= 3) ? 'eraAbbr' : (len === 4) ? 'eraNames' : 'eraNarrow';
                        formatOptions.era = Object(_util__WEBPACK_IMPORTED_MODULE_2__["getValue"])('eras.' + eText, dependable.dateObject);
                        break;
                    case 'z':
                        formatOptions.timeZone = Object(_util__WEBPACK_IMPORTED_MODULE_2__["getValue"])('dates.timeZoneNames', dependable.parserObject);
                        break;
                }
            }
        }
        return function (value) {
            if (isNaN(value.getDate())) {
                return null;
            }
            return _this.intDateFormatter(value, formatOptions);
        };
    };
    /**
     * Returns formatted date string based on options passed.
     * @param {Date} value
     * @param {FormatOptions} options
     */
    DateFormat.intDateFormatter = function (value, options) {
        var pattern = options.pattern;
        var ret = '';
        var matches = pattern.match(_intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].dateParseRegex);
        var dObject = this.getCurrentDateValue(value, options.isIslamic);
        for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) {
            var match = matches_1[_i];
            var length_1 = match.length;
            var char = match[0];
            if (char === 'K') {
                char = 'h';
            }
            var curval = void 0;
            var isNumber = void 0;
            var processNumber = void 0;
            var curstr = '';
            switch (char) {
                case 'M':
                case 'L':
                    curval = dObject.month;
                    if (length_1 > 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':
                    isNumber = true;
                    if (char === 'd') {
                        curval = dObject.date;
                    }
                    else {
                        curval = value[timeSetter[char]]();
                    }
                    if (char === 'h') {
                        curval = curval % 12 || 12;
                    }
                    break;
                case 'y':
                    processNumber = true;
                    curstr += dObject.year;
                    if (length_1 === 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 (Object(_util__WEBPACK_IMPORTED_MODULE_2__["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 pattern_1 = (length_1 < 4) ? '+H;-H' : options.timeZone.hourFormat;
                    pattern_1 = pattern_1.replace(/:/g, options.numMapper.timeSeparator);
                    if (timezone === 0) {
                        ret += options.timeZone.gmtZeroFormat;
                    }
                    else {
                        processNumber = true;
                        curstr = this.getTimeZoneValue(timezone, pattern_1);
                    }
                    curstr = options.timeZone.gmtFormat.replace(/\{0\}/, curstr);
                    break;
                case ':':
                    ret += options.numMapper.numberSymbols[timeSeparator];
                    /* tslint:enable no-any */
                    break;
                case '/':
                    ret += options.dateSeperator;
                    break;
                default:
                    ret += match;
            }
            if (isNumber) {
                processNumber = true;
                curstr = this.checkTwodigitNumber(curval, length_1);
            }
            if (processNumber) {
                ret += _parser_base__WEBPACK_IMPORTED_MODULE_0__["ParserBase"].convertValueParts(curstr, _intl_base__WEBPACK_IMPORTED_MODULE_1__["IntlBase"].latnParseRegex, options.numMapper.mapper);
            }
        }
        return ret;
    };
    DateFormat.getCurrentDateValue = function (value, isIslamic) {
        if (isIslamic) {
            return _hijri_parser__WEBPACK_IMPORTED_MODULE_3__["HijriParser"].getHijriDate(value);
        }
        return { year: value.getFullYear(), month: value.getMonth() + 1, date: value.getDate() };
    };
    /**
     * Returns two digit numbers for given value and length
     */
    DateFormat.checkTwodigitNumber = function (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
     */
    DateFormat.getTimeZoneValue = function (tVal, pattern) {
        var _this = 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 _this.checkTwodigitNumber(Math.floor(ishour ? (no / 60) : (no % 60)), len);
        });
    };
    return DateFormat;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/intl/date-parser.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/intl/date-parser.js ***!
  \*******************************************************************/
/*! exports provided: DateParser */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateParser", function() { return DateParser; });
/* harmony import */ var _intl_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intl-base */ "./node_modules/@syncfusion/ej2-base/src/intl/intl-base.js");
/* harmony import */ var _parser_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser-base */ "./node_modules/@syncfusion/ej2-base/src/intl/parser-base.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _date_formatter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date-formatter */ "./node_modules/@syncfusion/ej2-base/src/intl/date-formatter.js");
/* harmony import */ var _hijri_parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hijri-parser */ "./node_modules/@syncfusion/ej2-base/src/hijri-parser.js");





var number = 'numbers';
var defNoSystem = 'defaultNumberingSystem';
var noSystem = 'numberingSystem';
var standalone = 'stand-alone';
var curWeekDay = 'curWeekDay';
var latnRegex = /^[0-9]*$/;
var abbreviateRegex = /\/MMMMM|MMMM|MMM|a|LLL|EEEEE|EEEE|E|ccc/;
var timeSetter = {
    minute: 'setMinutes',
    hour: 'setHours',
    second: 'setSeconds',
    day: 'setDate',
    month: 'setMonth'
};
var month = 'months';
/* tslint:disable no-any */
/**
 * Date Parser.
 * @private
 */
var DateParser = /** @class */ (function () {
    function 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
    DateParser.dateParser = function (culture, option, cldr) {
        var _this = this;
        var dependable = _intl_base__WEBPACK_IMPORTED_MODULE_0__["IntlBase"].getDependables(cldr, culture, option.calendar);
        var numOptions = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].getCurrentNumericOptions(dependable.parserObject, _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].getNumberingSystem(cldr));
        var parseOptions = {};
        var resPattern = option.format || _intl_base__WEBPACK_IMPORTED_MODULE_0__["IntlBase"].getResultantPattern(option.skeleton, dependable.dateObject, option.type);
        var regexString = '';
        var hourOnly;
        if (Object(_util__WEBPACK_IMPORTED_MODULE_2__["isUndefined"])(resPattern)) {
            Object(_util__WEBPACK_IMPORTED_MODULE_2__["throwError"])('Format options or type given must be invalid');
        }
        else {
            parseOptions = { isIslamic: _intl_base__WEBPACK_IMPORTED_MODULE_0__["IntlBase"].islamicRegex.test(option.calendar), pattern: resPattern, evalposition: {} };
            var patternMatch = resPattern.match(_intl_base__WEBPACK_IMPORTED_MODULE_0__["IntlBase"].dateParseRegex) || [];
            var length_1 = patternMatch.length;
            var gmtCorrection = 0;
            var zCorrectTemp = 0;
            var isgmtTraversed = false;
            var nRegx = numOptions.numericRegex;
            var numMapper = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].getNumberMapper(dependable.parserObject, _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].getNumberingSystem(cldr));
            for (var i = 0; i < length_1; i++) {
                var str = patternMatch[i];
                var len = str.length;
                var char = (str[0] === 'K') ? 'h' : str[0];
                var isNumber = void 0;
                var canUpdate = void 0;
                var charKey = _date_formatter__WEBPACK_IMPORTED_MODULE_3__["datePartMatcher"][char];
                var optional = (len === 2) ? '' : '?';
                if (isgmtTraversed) {
                    gmtCorrection = zCorrectTemp;
                    isgmtTraversed = false;
                }
                switch (char) {
                    case 'E':
                    case 'c':
                        // tslint:disable-next-line
                        var weekObject = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].reverseObject(dependable.dateObject[_intl_base__WEBPACK_IMPORTED_MODULE_0__["IntlBase"].days][standalone][_intl_base__WEBPACK_IMPORTED_MODULE_0__["IntlBase"].monthIndex[len]]);
                        regexString += '(' + Object.keys(weekObject).join('|') + ')';
                        break;
                    case 'M':
                    case 'L':
                    case 'd':
                    case 'm':
                    case 's':
                    case 'h':
                    case 'H':
                        canUpdate = true;
                        if ((char === 'M' || char === 'L') && len > 2) {
                            // tslint:disable-next-line
                            parseOptions[charKey] = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].reverseObject(dependable.dateObject[month][standalone][_intl_base__WEBPACK_IMPORTED_MODULE_0__["IntlBase"].monthIndex[len]]);
                            /* tslint:disable no-any */
                            regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + ')';
                        }
                        else {
                            isNumber = true;
                            regexString += '(' + nRegx + nRegx + optional + ')';
                        }
                        if (char === 'h') {
                            parseOptions.hour12 = true;
                        }
                        break;
                    case 'y':
                        canUpdate = isNumber = true;
                        if (len === 2) {
                            regexString += '(' + nRegx + nRegx + ')';
                        }
                        else {
                            regexString += '(' + nRegx + '{' + len + ',})';
                        }
                        break;
                    case 'a':
                        canUpdate = true;
                        parseOptions[charKey] = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].reverseObject(Object(_util__WEBPACK_IMPORTED_MODULE_2__["getValue"])('dayPeriods.format.wide', dependable.dateObject));
                        regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + ')';
                        break;
                    case 'G':
                        canUpdate = true;
                        var eText = (len <= 3) ? 'eraAbbr' : (len === 4) ? 'eraNames' : 'eraNarrow';
                        parseOptions[charKey] = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].reverseObject(Object(_util__WEBPACK_IMPORTED_MODULE_2__["getValue"])('eras.' + eText, dependable.dateObject));
                        regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + '?)';
                        break;
                    case 'z':
                        var tval = new Date().getTimezoneOffset();
                        canUpdate = (tval !== 0);
                        parseOptions[charKey] = Object(_util__WEBPACK_IMPORTED_MODULE_2__["getValue"])('dates.timeZoneNames', dependable.parserObject);
                        var tzone = parseOptions[charKey];
                        hourOnly = (len < 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 - 1 && !Object(_util__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(regexString)) {
                    parseOptions.parserRegex = new RegExp('^' + regexString + '$');
                }
            }
        }
        return function (value) {
            var parsedDateParts = _this.internalDateParse(value, parseOptions, numOptions);
            if (Object(_util__WEBPACK_IMPORTED_MODULE_2__["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 = _hijri_parser__WEBPACK_IMPORTED_MODULE_4__["HijriParser"].getHijriDate(new Date());
                }
                if (is2DigitYear) {
                    tYear = parseInt((dobj.year + '').slice(0, 2) + ystrig, 10);
                }
                // tslint:disable-next-line
                var dateObject = _hijri_parser__WEBPACK_IMPORTED_MODULE_4__["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 _this.getDateObject(parsedDateParts);
        };
    };
    /* tslint:disable */
    /**
     * Returns date object for provided date options
     * @param {DateParts} options
     * @param {Date} value
     * @returns {Date}
     */
    DateParser.getDateObject = function (options, value) {
        var res = value || new Date();
        res.setMilliseconds(0);
        var tKeys = ['hour', 'minute', 'second', 'month', 'day'];
        var y = options.year;
        var desig = options.designator;
        var tzone = options.timeZone;
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_2__["isUndefined"])(y)) {
            var len = (y + '').length;
            if (len <= 2) {
                var century = Math.floor(res.getFullYear() / 100) * 100;
                y += century;
            }
            res.setFullYear(y);
        }
        for (var _i = 0, tKeys_1 = tKeys; _i < tKeys_1.length; _i++) {
            var key = tKeys_1[_i];
            var tValue = options[key];
            if (Object(_util__WEBPACK_IMPORTED_MODULE_2__["isUndefined"])(tValue) && key === "day") {
                res.setDate(1);
            }
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_2__["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[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[key]](tValue);
                }
            }
        }
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_2__["isUndefined"])(desig)) {
            var hour = res.getHours();
            if (desig === 'pm') {
                res.setHours(hour + (hour === 12 ? 0 : 12));
            }
            else if (hour === 12) {
                res.setHours(0);
            }
        }
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_2__["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}
     */
    DateParser.internalDateParse = function (value, parseOptions, num) {
        var matches = value.match(parseOptions.parserRegex);
        var retOptions = { 'hour': 0, 'minute': 0, 'second': 0 };
        var nRegx = num.numericRegex;
        if (Object(_util__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(matches)) {
            return null;
        }
        else {
            var props = Object.keys(parseOptions.evalposition);
            for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {
                var prop = props_1[_i];
                var curObject = parseOptions.evalposition[prop];
                var matchString = matches[curObject.pos];
                if (curObject.isNumber) {
                    retOptions[prop] = this.internalNumberParser(matchString, num);
                }
                else {
                    if (prop === 'timeZone' && !Object(_util__WEBPACK_IMPORTED_MODULE_2__["isUndefined"])(matchString)) {
                        var pos = curObject.pos;
                        var val = void 0;
                        var tmatch = matches[pos + 1];
                        var flag = !Object(_util__WEBPACK_IMPORTED_MODULE_2__["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 (!Object(_util__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(val)) {
                            retOptions[prop] = val;
                        }
                    }
                    else {
                        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}
     */
    DateParser.internalNumberParser = function (value, option) {
        value = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].convertValueParts(value, option.numberParseRegex, option.numericPair);
        if (latnRegex.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}
     */
    DateParser.parseTimeZoneRegx = function (hourFormat, tZone, nRegex) {
        var pattern = tZone.gmtFormat;
        var ret;
        var result;
        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}
     */
    DateParser.getZoneValue = function (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 */


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/intl/intl-base.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/intl/intl-base.js ***!
  \*****************************************************************/
/*! exports provided: IntlBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IntlBase", function() { return IntlBase; });
/* harmony import */ var _internationalization__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internationalization */ "./node_modules/@syncfusion/ej2-base/src/internationalization.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _parser_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser-base */ "./node_modules/@syncfusion/ej2-base/src/intl/parser-base.js");
/* harmony import */ var _date_formatter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date-formatter */ "./node_modules/@syncfusion/ej2-base/src/intl/date-formatter.js");
/* harmony import */ var _number_formatter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number-formatter */ "./node_modules/@syncfusion/ej2-base/src/intl/number-formatter.js");






/**
 * 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'
    };
    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'
            }
        }
    };
    /* 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) {
        var resPattern;
        var iType = type || 'date';
        if (IntlBase.basicPatterns.indexOf(skeleton) !== -1) {
            resPattern = Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])(iType + 'Formats.' + skeleton, dateObject);
            if (iType === 'dateTime') {
                var dPattern = Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])('dateFormats.' + skeleton, dateObject);
                var tPattern = Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])('timeFormats.' + skeleton, dateObject);
                resPattern = resPattern.replace('{1}', dPattern).replace('{0}', tPattern);
            }
        }
        else {
            resPattern = Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])('dateTimeFormats.availableFormats.' + skeleton, dateObject);
        }
        if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["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 = _parser_base__WEBPACK_IMPORTED_MODULE_2__["ParserBase"].getMainObject(cldr, culture) || IntlBase.defaultObject;
        if (isNumber) {
            ret.numericObject = Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])('numbers', ret.parserObject);
        }
        else {
            ret.dateObject = Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])('dates.calendars.' + calendartype, 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 Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])(type + 'Formats-numberSystem-' +
            numSystem + (isAccount ? '.accounting' : '.standard'), obj) || (isAccount ? Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])(type + 'Formats-numberSystem-' +
            numSystem + '.standard', obj) : '');
    }
    IntlBase.getSymbolPattern = getSymbolPattern;
    /**
     * 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 (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["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) {
        return Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])('currencies.' + currencyCode + '.symbol', numericObject) || '$';
    }
    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 (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(options.nData)) {
            options.nData = Object(_util__WEBPACK_IMPORTED_MODULE_1__["extend"])({}, options.pData);
            options.nData.nlead = Object(_util__WEBPACK_IMPORTED_MODULE_1__["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 (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(pattern) || (pattern[5] === '' && format !== 'N/A')) {
            cOptions.type = undefined;
        }
        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 (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["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 (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(dOptions)) {
            Object(_util__WEBPACK_IMPORTED_MODULE_1__["extend"])(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '$', dOptions.currencySymbol));
            if (!cOptions.isCurrency) {
                Object(_util__WEBPACK_IMPORTED_MODULE_1__["extend"])(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '%', dOptions.percentSymbol));
            }
        }
        else {
            Object(_util__WEBPACK_IMPORTED_MODULE_1__["extend"])(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '%', '%'));
        }
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(numObject)) {
            var symbolPattern = getSymbolPattern(cOptions.type, dOptions.numberMapper.numberSystem, numObject, false);
            if (cOptions.useGrouping) {
                cOptions.groupSeparator = dOptions.numberMapper.numberSymbols[mapper[2]];
                cOptions.groupData = _number_formatter__WEBPACK_IMPORTED_MODULE_4__["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 = (Object(_util__WEBPACK_IMPORTED_MODULE_1__["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);
        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 = void 0;
                var options_1 = { 'timeZone': {} };
                options_1.numMapper = _parser_base__WEBPACK_IMPORTED_MODULE_2__["ParserBase"].getNumberMapper(dependable.parserObject, _parser_base__WEBPACK_IMPORTED_MODULE_2__["ParserBase"].getNumberingSystem(cldr));
                options_1.timeZone = Object(_util__WEBPACK_IMPORTED_MODULE_1__["getValue"])('dates.timeZoneNames', dependable.parserObject);
                var value = new Date();
                var timezone = value.getTimezoneOffset();
                var pattern = (tLength < 4) ? '+H;-H' : options_1.timeZone.hourFormat;
                pattern = pattern.replace(/:/g, options_1.numMapper.timeSeparator);
                if (timezone === 0) {
                    timeZonePattern = options_1.timeZone.gmtZeroFormat;
                }
                else {
                    timeZonePattern = _date_formatter__WEBPACK_IMPORTED_MODULE_3__["DateFormat"].getTimeZoneValue(timezone, pattern);
                    timeZonePattern = options_1.timeZone.gmtFormat.replace(/\{0\}/, timeZonePattern);
                }
                actualPattern = actualPattern.replace(/[z]+/, '"' + timeZonePattern + '"');
            }
            actualPattern = actualPattern.replace(/ $/, '');
        }
        return actualPattern;
    }
    IntlBase.getActualDateTimeFormat = getActualDateTimeFormat;
    /**
     * Returns Native Number pattern
     * @private
     * @param {string} culture
     * @param {NumberFormatOptions} options
     * @param {Object} cldr
     * @returns {string}
     */
    function getActualNumberFormat(culture, options, cldr) {
        var dependable = getDependables(cldr, culture, '', true);
        var parseOptions = { custom: true };
        var minFrac;
        var curObj = {};
        var curMatch = (options.format || '').match(IntlBase.currencyFormatRegex);
        if (curMatch) {
            var dOptions = {};
            dOptions.numberMapper = _parser_base__WEBPACK_IMPORTED_MODULE_2__["ParserBase"].getNumberMapper(dependable.parserObject, _parser_base__WEBPACK_IMPORTED_MODULE_2__["ParserBase"].getNumberingSystem(cldr), true);
            var curCode = getCurrencySymbol(dependable.numericObject, options.currency || _internationalization__WEBPACK_IMPORTED_MODULE_0__["defaultCurrencyCode"]);
            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 = (split.length > 1);
            curObj.nData = getFormatData(split[1] || '-' + split[0], true, curCode);
            curObj.pData = 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)) {
            Object(_util__WEBPACK_IMPORTED_MODULE_1__["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') {
                var cPattern = actualPattern;
                actualPattern = curObj.pData.nlead + cPattern + curObj.pData.nend;
                if (curObj.hasNegativePattern) {
                    actualPattern += ';' + curObj.nData.nlead + cPattern + curObj.nData.nend;
                }
            }
            if (parseOptions.type === 'percent') {
                actualPattern += ' %';
            }
        }
        else {
            actualPattern = options.format.replace(/\'/g, '"');
        }
        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 = Object(_util__WEBPACK_IMPORTED_MODULE_1__["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;
})(IntlBase || (IntlBase = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/intl/number-formatter.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/intl/number-formatter.js ***!
  \************************************************************************/
/*! exports provided: NumberFormat */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFormat", function() { return NumberFormat; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _internationalization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internationalization */ "./node_modules/@syncfusion/ej2-base/src/internationalization.js");
/* harmony import */ var _intl_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./intl-base */ "./node_modules/@syncfusion/ej2-base/src/intl/intl-base.js");
/* harmony import */ var _parser_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser-base */ "./node_modules/@syncfusion/ej2-base/src/intl/parser-base.js");




var errorText = {
    'ms': 'minimumSignificantDigits',
    'ls': 'maximumSignificantDigits',
    'mf': 'minimumFractionDigits',
    'lf': 'maximumFractionDigits',
};
var integerError = 'minimumIntegerDigits';
var percentSign = 'percentSign';
var minusSign = 'minusSign';
var spaceRegex = /\s/;
var mapper = ['infinity', 'nan', 'group', 'decimal', 'exponential'];
var infinity = 'infinity';
var nan = 'nan';
/**
 * Module for number formatting.
 * @private
 */
var NumberFormat = /** @class */ (function () {
    function NumberFormat() {
    }
    /**
     * 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.
     */
    NumberFormat.numberFormatter = function (culture, option, cldr) {
        var _this = this;
        var fOptions = Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, option);
        var cOptions = {};
        var dOptions = {};
        var symbolPattern;
        var dependable = _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getDependables(cldr, culture, '', true);
        dOptions.numberMapper = _parser_base__WEBPACK_IMPORTED_MODULE_3__["ParserBase"].getNumberMapper(dependable.parserObject, _parser_base__WEBPACK_IMPORTED_MODULE_3__["ParserBase"].getNumberingSystem(cldr), true);
        dOptions.currencySymbol = _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getCurrencySymbol(dependable.numericObject, fOptions.currency || _internationalization__WEBPACK_IMPORTED_MODULE_1__["defaultCurrencyCode"]);
        /* tslint:disable no-any */
        dOptions.percentSymbol = dOptions.numberMapper.numberSymbols[percentSign];
        dOptions.minusSymbol = dOptions.numberMapper.numberSymbols[minusSign];
        var symbols = dOptions.numberMapper.numberSymbols;
        if ((option.format) && !(_intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].formatRegex.test(option.format))) {
            cOptions = _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].customFormat(option.format, dOptions, dependable.numericObject);
        }
        else {
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])(fOptions, _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getProperNumericSkeleton(option.format || 'N'));
            fOptions.isCurrency = fOptions.type === 'currency';
            fOptions.isPercent = fOptions.type === 'percent';
            symbolPattern = _intl_base__WEBPACK_IMPORTED_MODULE_2__["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 (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(fOptions.fractionDigits)) {
                fOptions.minimumFractionDigits = fOptions.maximumFractionDigits = fOptions.fractionDigits;
            }
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(fOptions.useGrouping)) {
                fOptions.useGrouping = true;
            }
            if (fOptions.isCurrency) {
                symbolPattern = symbolPattern.replace(/\u00A4/g, _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].defaultCurrency);
            }
            var split = symbolPattern.split(';');
            cOptions.nData = _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getFormatData(split[1] || '-' + split[0], true, dOptions.currencySymbol);
            cOptions.pData = _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getFormatData(split[0], false, dOptions.currencySymbol);
            if (fOptions.useGrouping) {
                fOptions.groupSeparator = symbols[mapper[2]];
                fOptions.groupData = this.getGroupingDetails(split[0]);
            }
            var minFrac = Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(fOptions.minimumFractionDigits);
            if (minFrac) {
                fOptions.minimumFractionDigits = cOptions.nData.minimumFraction;
            }
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(fOptions.maximumFractionDigits)) {
                var mval = cOptions.nData.maximumFraction;
                fOptions.maximumFractionDigits = Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(mval) && fOptions.isPercent ? 0 : mval;
            }
            var mfrac = fOptions.minimumFractionDigits;
            var lfrac = fOptions.maximumFractionDigits;
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(mfrac) && !Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(lfrac)) {
                if (mfrac > lfrac) {
                    fOptions.maximumFractionDigits = mfrac;
                }
            }
        }
        Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])(cOptions.nData, fOptions);
        Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])(cOptions.pData, fOptions);
        return function (value) {
            if (isNaN(value)) {
                return symbols[mapper[1]];
            }
            else if (!isFinite(value)) {
                return symbols[mapper[0]];
            }
            return _this.intNumberFormatter(value, cOptions, dOptions);
        };
    };
    /**
     * Returns grouping details for the pattern provided
     * @param {string} pattern
     * @returns {GroupDetails}
     */
    NumberFormat.getGroupingDetails = function (pattern) {
        var ret = {};
        var match = pattern.match(_intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].negativeDataRegex);
        if (match && match[4]) {
            var pattern_1 = match[4];
            var p = pattern_1.lastIndexOf(',');
            if (p !== -1) {
                var temp = pattern_1.split('.')[0];
                ret.primary = (temp.length - p) - 1;
                var s = pattern_1.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}
     */
    NumberFormat.checkValueRange = function (val1, val2, checkbothExist, isFraction) {
        var decide = isFraction ? 'f' : 's';
        var dint = 0;
        var str1 = errorText['l' + decide];
        var str2 = errorText['m' + decide];
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(val1)) {
            this.checkRange(val1, str1, isFraction);
            dint++;
        }
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(val2)) {
            this.checkRange(val2, str2, isFraction);
            dint++;
        }
        if (dint === 2) {
            if (val1 < val2) {
                Object(_util__WEBPACK_IMPORTED_MODULE_0__["throwError"])(str2 + 'specified must be less than the' + str1);
            }
            else {
                return true;
            }
        }
        else if (checkbothExist && dint === 1) {
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    NumberFormat.checkRange = function (val, text, isFraction) {
        var range = isFraction ? [0, 20] : [1, 21];
        if (val < range[0] || val > range[1]) {
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    NumberFormat.intNumberFormatter = function (value, fOptions, dOptions) {
        var curData;
        if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["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[4]]);
            }
            fValue = fValue.replace('.', dOptions.numberMapper.numberSymbols[mapper[3]]);
            if (curData.useGrouping) {
                fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ',', dOptions.numberMapper.numberSymbols[mapper[3]] || '.', curData.groupData.secondary);
            }
            fValue = _parser_base__WEBPACK_IMPORTED_MODULE_3__["ParserBase"].convertValueParts(fValue, _intl_base__WEBPACK_IMPORTED_MODULE_2__["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}
     */
    NumberFormat.processSignificantDigits = function (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}
     */
    NumberFormat.groupNumbers = function (val, level1, sep, decimalSymbol, level2) {
        var flag = !Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    NumberFormat.processFraction = function (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 (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    NumberFormat.processMinimumIntegers = function (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;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/intl/number-parser.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/intl/number-parser.js ***!
  \*********************************************************************/
/*! exports provided: NumberParser */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberParser", function() { return NumberParser; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _parser_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser-base */ "./node_modules/@syncfusion/ej2-base/src/intl/parser-base.js");
/* harmony import */ var _intl_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./intl-base */ "./node_modules/@syncfusion/ej2-base/src/intl/intl-base.js");



var formatRegex = /(^[ncpa]{1})([0-1]?[0-9]|20)?$/i;
var parseRegex = /^([^0-9]*)(([0-9,]*[0-9]+)(\.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$/;
var groupRegex = /,/g;
var latnDecimalRegex = /^[0-9]*(\.[0-9]+)?$/;
var keys = ['minusSign', 'infinity'];
/**
 * Module for Number Parser.
 * @private
 */
var NumberParser = /** @class */ (function () {
    function 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.
     */
    NumberParser.numberParser = function (culture, option, cldr) {
        var _this = this;
        var dependable = _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getDependables(cldr, culture, '', true);
        var parseOptions = { custom: true };
        var numOptions;
        if ((_intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].formatRegex.test(option.format)) || !(option.format)) {
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])(parseOptions, _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getProperNumericSkeleton(option.format || 'N'));
            parseOptions.custom = false;
        }
        else {
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])(parseOptions, _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].customFormat(option.format, null, null));
        }
        numOptions = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].getCurrentNumericOptions(dependable.parserObject, _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].getNumberingSystem(cldr), true);
        parseOptions.symbolRegex = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].getSymbolRegex(Object.keys(numOptions.symbolMatch));
        // tslint:disable-next-line:no-any
        parseOptions.infinity = numOptions.symbolNumberSystem[keys[1]];
        var symbolpattern = _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getSymbolPattern(parseOptions.type, numOptions.numberSystem, dependable.numericObject, parseOptions.isAccount);
        if (symbolpattern) {
            symbolpattern = symbolpattern.replace(/\u00A4/g, _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].defaultCurrency);
            var split = symbolpattern.split(';');
            parseOptions.nData = _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getFormatData(split[1] || '-' + split[0], true, '');
            parseOptions.pData = _intl_base__WEBPACK_IMPORTED_MODULE_2__["IntlBase"].getFormatData(split[0], true, '');
        }
        return function (value) {
            return _this.getParsedNumber(value, parseOptions, numOptions);
        };
    };
    /**
     * Returns parsed number for the provided formatting options
     * @param {string} value
     * @param {NumericParts} options
     * @param {NumericOptions} numOptions
     * @returns {number}
     */
    NumberParser.getParsedNumber = function (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 = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].convertValueParts(value, options.symbolRegex, numOptions.symbolMatch);
            value = _parser_base__WEBPACK_IMPORTED_MODULE_1__["ParserBase"].convertValueParts(value, numOptions.numberParseRegex, numOptions.numericPair);
            if (value.indexOf('.') === 0) {
                value = '0' + value;
            }
            var matches = value.match(parseRegex);
            if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["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;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/intl/parser-base.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/intl/parser-base.js ***!
  \*******************************************************************/
/*! exports provided: ParserBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParserBase", function() { return ParserBase; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/**
 * Parser
 */
var defaultNumberingSystem = {
    'latn': {
        '_digits': '0123456789',
        '_type': 'numeric'
    }
};

var latnRegex = /^[0-9]*$/;
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 = /** @class */ (function () {
    function ParserBase() {
    }
    /**
     * 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}
     */
    ParserBase.getMainObject = function (obj, cName) {
        return Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('main.' + cName, obj);
    };
    /**
     * Returns the numbering system object from given cldr data.
     * @param {Object} obj - Specifies the object from which number system is acquired.
     * @returns {Object}
     */
    ParserBase.getNumberingSystem = function (obj) {
        return Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    ParserBase.reverseObject = function (prop, keys) {
        var propKeys = keys || Object.keys(prop);
        var res = {};
        for (var _i = 0, propKeys_1 = propKeys; _i < propKeys_1.length; _i++) {
            var key = propKeys_1[_i];
            /* tslint:disable no-any */
            if (!res.hasOwnProperty(prop[key])) {
                res[prop[key]] = key;
            }
        }
        return res;
    };
    /**
     * Returns the symbol regex by skipping the escape sequence.
     * @param {string[]} props - Specifies the array values to be skipped.
     * @returns {RegExp}
     */
    ParserBase.getSymbolRegex = function (props) {
        var regexStr = props.map(function (str) {
            return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1');
        }).join('|');
        return new RegExp(regexStr, 'g');
    };
    ParserBase.getSymbolMatch = function (prop) {
        var matchKeys = Object.keys(defaultNumberSymbols);
        var ret = {};
        for (var _i = 0, matchKeys_1 = matchKeys; _i < matchKeys_1.length; _i++) {
            var key = matchKeys_1[_i];
            ret[prop[key]] = defaultNumberSymbols[key];
        }
        return ret;
    };
    /**
     * Returns regex string for provided value
     * @param {string} val
     * @returns {string}
     */
    ParserBase.constructRegex = function (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}
     */
    ParserBase.convertValueParts = function (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}
     */
    ParserBase.getDefaultNumberingSystem = function (obj) {
        var ret = {};
        ret.obj = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('numbers', obj);
        ret.nSystem = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('defaultNumberingSystem', ret.obj);
        return ret;
    };
    /**
     * Returns the replaced value of matching regex and obj mapper.
     */
    ParserBase.getCurrentNumericOptions = function (curObj, numberSystem, needSymbols) {
        var ret = {};
        var cur = this.getDefaultNumberingSystem(curObj);
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(cur.nSystem)) {
            var digits = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])(cur.nSystem + '._digits', numberSystem);
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["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 = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('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}
     */
    ParserBase.getNumberMapper = function (curObj, numberSystem, isNumber) {
        var ret = { mapper: {} };
        var cur = this.getDefaultNumberingSystem(curObj);
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(cur.nSystem)) {
            ret.numberSystem = cur.nSystem;
            ret.numberSymbols = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('symbols-numberSystem-' + cur.nSystem, cur.obj);
            ret.timeSeparator = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('timeSeparator', ret.numberSymbols);
            var digits = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])(cur.nSystem + '._digits', numberSystem);
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(digits)) {
                for (var _i = 0, latnNumberSystem_1 = latnNumberSystem; _i < latnNumberSystem_1.length; _i++) {
                    var i = latnNumberSystem_1[_i];
                    ret.mapper[i] = digits[i];
                }
            }
        }
        return ret;
    };
    ParserBase.nPair = 'numericPair';
    ParserBase.nRegex = 'numericRegex';
    ParserBase.numberingSystems = defaultNumberingSystem;
    return ParserBase;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/keyboard.js":
/*!***********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/keyboard.js ***!
  \***********************************************************/
/*! exports provided: KeyboardEvents */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyboardEvents", function() { return KeyboardEvents; });
/* harmony import */ var _notify_property_change__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./notify-property-change */ "./node_modules/@syncfusion/ej2-base/src/notify-property-change.js");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./node_modules/@syncfusion/ej2-base/src/base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 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 = /** @class */ (function (_super) {
    __extends(KeyboardEvents, _super);
    /**
     * Initializes the KeyboardEvents
     * @param {HTMLElement} element
     * @param {KeyboardEventsModel} options
     */
    function KeyboardEvents(element, options) {
        var _this = _super.call(this, options, element) || this;
        /**
         * To handle a key press event returns null
         */
        _this.keyPressHandler = function (e) {
            var isAltKey = e.altKey;
            var isCtrlKey = e.ctrlKey;
            var isShiftKey = e.shiftKey;
            var curkeyCode = e.which;
            var keys = Object.keys(_this.keyConfigs);
            for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
                var key = keys_1[_i];
                var configCollection = _this.keyConfigs[key].split(',');
                for (var _a = 0, configCollection_1 = configCollection; _a < configCollection_1.length; _a++) {
                    var rconfig = configCollection_1[_a];
                    var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());
                    if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey &&
                        isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {
                        e.action = key;
                        if (_this.keyAction) {
                            _this.keyAction(e);
                        }
                    }
                }
            }
        };
        _this.bind();
        return _this;
    }
    KeyboardEvents_1 = KeyboardEvents;
    /**
     * Unwire bound events and destroy the instance.
     * @return {void}
     */
    KeyboardEvents.prototype.destroy = function () {
        this.unwireEvents();
        _super.prototype.destroy.call(this);
    };
    /**
     * Function can be used to specify certain action if a property is changed
     * @param newProp
     * @param oldProp
     * @returns {void}
     * @private
     */
    KeyboardEvents.prototype.onPropertyChanged = function (newProp, oldProp) {
        // No code are needed
    };
    ;
    KeyboardEvents.prototype.bind = function () {
        this.wireEvents();
    };
    /**
     * To get the module name, returns 'keyboard'.
     * @private
     */
    KeyboardEvents.prototype.getModuleName = function () {
        return 'keyboard';
    };
    /**
     * Wiring event handlers to events
     */
    KeyboardEvents.prototype.wireEvents = function () {
        this.element.addEventListener(this.eventName, this.keyPressHandler);
    };
    /**
     * Unwiring event handlers to events
     */
    KeyboardEvents.prototype.unwireEvents = function () {
        this.element.removeEventListener(this.eventName, this.keyPressHandler);
    };
    /**
     * To get the key configuration data
     * @param {string} config - configuration data
     * returns {KeyData}
     */
    KeyboardEvents.getKeyConfigData = function (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 
    KeyboardEvents.getKeyCode = function (keyVal) {
        return keyCode[keyVal] || keyVal.toUpperCase().charCodeAt(0);
    };
    var KeyboardEvents_1;
    KeyboardEvents.configCache = {};
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], KeyboardEvents.prototype, "keyConfigs", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_0__["Property"])('keyup')
    ], KeyboardEvents.prototype, "eventName", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], KeyboardEvents.prototype, "keyAction", void 0);
    KeyboardEvents = KeyboardEvents_1 = __decorate([
        _notify_property_change__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], KeyboardEvents);
    return KeyboardEvents;
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/l10n.js":
/*!*******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/l10n.js ***!
  \*******************************************************/
/*! exports provided: L10n */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L10n", function() { return L10n; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _internationalization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internationalization */ "./node_modules/@syncfusion/ej2-base/src/internationalization.js");


/**
 * 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 = /** @class */ (function () {
    /**
     * Constructor
     */
    function L10n(controlName, localeStrings, locale) {
        this.controlName = controlName;
        this.localeStrings = localeStrings;
        this.setLocale(locale || _internationalization__WEBPACK_IMPORTED_MODULE_1__["defaultCulture"]);
    }
    /**
     * Sets the locale text
     * @param {string} locale
     * @returns {void}
     */
    L10n.prototype.setLocale = function (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.
     */
    L10n.load = function (localeObject) {
        this.locale = Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.locale, localeObject, {}, true);
    };
    /**
     * 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
     */
    L10n.prototype.getConstant = function (prop) {
        // Removed conditional operator because this method does not return correct value when passing 0 as value in localization
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    L10n.prototype.intGetControlConstant = function (curObject, locale) {
        if ((curObject)[locale]) {
            return (curObject)[locale][this.controlName];
        }
        return null;
    };
    L10n.locale = {};
    return L10n;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/module-loader.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/module-loader.js ***!
  \****************************************************************/
/*! exports provided: ModuleLoader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleLoader", function() { return ModuleLoader; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/**
 * Module loading operations
 */

var MODULE_SUFFIX = 'Module';
var ModuleLoader = /** @class */ (function () {
    function ModuleLoader(parent) {
        this.loadedModules = [];
        this.parent = parent;
    }
    ;
    /**
     * 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
     */
    ModuleLoader.prototype.inject = function (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];
            for (var _i = 0, moduleList_1 = moduleList; _i < moduleList_1.length; _i++) {
                var module = moduleList_1[_i];
                var modName = modl.member;
                if (module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
                    var moduleObject = Object(_util__WEBPACK_IMPORTED_MODULE_0__["createInstance"])(module, modl.args);
                    var memberName = this.getMemberName(modName);
                    if (modl.isProperty) {
                        Object(_util__WEBPACK_IMPORTED_MODULE_0__["setValue"])(memberName, module, this.parent);
                    }
                    else {
                        Object(_util__WEBPACK_IMPORTED_MODULE_0__["setValue"])(memberName, moduleObject, this.parent);
                    }
                    var loadedModule = modl;
                    loadedModule.member = memberName;
                    this.loadedModules.push(loadedModule);
                }
            }
        }
    };
    /**
     * To remove the created object while destroying the control
     * @return {void}
     */
    ModuleLoader.prototype.clean = function () {
        for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
            var modules = _a[_i];
            if (!modules.isProperty) {
                Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])(modules.member, this.parent).destroy();
            }
        }
        this.loadedModules = [];
    };
    /**
     * Removes all unused modules
     * @param {ModuleDeclaration[]} moduleList
     * @returns {void}
     */
    ModuleLoader.prototype.clearUnusedModule = function (moduleList) {
        var _this = this;
        var usedModules = moduleList.map(function (arg) { return _this.getMemberName(arg.member); });
        var removableModule = this.loadedModules.filter(function (module) {
            return usedModules.indexOf(module.member) === -1;
        });
        for (var _i = 0, removableModule_1 = removableModule; _i < removableModule_1.length; _i++) {
            var mod = removableModule_1[_i];
            if (!mod.isProperty) {
                Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mod.member, this.parent).destroy();
            }
            this.loadedModules.splice(this.loadedModules.indexOf(mod), 1);
            Object(_util__WEBPACK_IMPORTED_MODULE_0__["deleteObject"])(this.parent, mod.member);
        }
    };
    /**
     * To get the name of the member.
     * @param {string} name
     * @returns {string}
     */
    ModuleLoader.prototype.getMemberName = function (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}
     */
    ModuleLoader.prototype.isModuleLoaded = function (modName) {
        for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
            var mod = _a[_i];
            if (mod.member === this.getMemberName(modName)) {
                return true;
            }
        }
        return false;
    };
    return ModuleLoader;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/notify-property-change.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/notify-property-change.js ***!
  \*************************************************************************/
/*! exports provided: Property, Complex, ComplexFactory, Collection, CollectionFactory, Event, NotifyPropertyChanges, CreateBuilder */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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; });
/* 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 import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");

/**
 * 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] = Object(_util__WEBPACK_IMPORTED_MODULE_0__["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 = Object(_util__WEBPACK_IMPORTED_MODULE_0__["createInstance"])(curType, [instance, curKey, {}, true]);
            inst.setProperties(defaultValue[i], true);
            result.push(inst);
        }
        else {
            result.push(Object(_util__WEBPACK_IMPORTED_MODULE_0__["createInstance"])(curType, [instance, curKey, defaultValue[i], true]));
        }
    }
    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 () {
        if (!this.properties.hasOwnProperty(curKey)) {
            var defCollection = getObjectArray(this, curKey, defaultValue, type, false);
            this.properties[curKey] = defCollection;
        }
        return this.properties[curKey];
    };
}
function complexArraySetter(defaultValue, curKey, type) {
    return function (newValue) {
        var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, false);
        var newValCollection = getObjectArray(this, curKey, newValue, type, true);
        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];
    };
}
/**
 * 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() {
    return function (target, key) {
        var eventDescriptor = {
            set: function (newValue) {
                var oldValue = this.properties[key];
                if (oldValue !== newValue) {
                    var finalContext = getParentContext(this, key);
                    if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["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 (Object(_util__WEBPACK_IMPORTED_MODULE_0__["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 (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(component.prototype.builderObject)) {
        component.prototype.builderObject = {
            properties: {}, propCollections: [], add: function () {
                this.isPropertyArray = true;
                this.propCollections.push(Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, this.properties, {}));
            }
        };
        var rex = /complex/;
        for (var _i = 0, _a = Object.keys(component.prototype.propList); _i < _a.length; _i++) {
            var key = _a[_i];
            var _loop_1 = function (prop) {
                if (rex.test(key)) {
                    component.prototype.builderObject[prop.propertyName] = function (value) {
                        var childType = {};
                        Object(_util__WEBPACK_IMPORTED_MODULE_0__["merge"])(childType, getBuilderProperties(prop.type));
                        value(childType);
                        var tempValue;
                        if (!childType.isPropertyArray) {
                            tempValue = Object(_util__WEBPACK_IMPORTED_MODULE_0__["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 (var _b = 0, _c = component.prototype.propList[key]; _b < _c.length; _b++) {
                var prop = _c[_b];
                _loop_1(prop);
            }
        }
    }
    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 (element) {
        this.element = element;
        return this;
    };
    var instanceFunction = function (element) {
        if (!builderFunction.prototype.hasOwnProperty('create')) {
            builderFunction.prototype = getBuilderProperties(component);
            builderFunction.prototype.create = function () {
                var temp = Object(_util__WEBPACK_IMPORTED_MODULE_0__["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 = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('propName', context);
        if (curText) {
            prefix = curText + '-' + prefix;
        }
        return getParentContext(Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])('parentObj', context), prefix);
    }
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/observer.js":
/*!***********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/observer.js ***!
  \***********************************************************/
/*! exports provided: Observer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observer", function() { return Observer; });
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");

var Observer = /** @class */ (function () {
    function Observer(context) {
        this.ranArray = [];
        this.boundedEvents = {};
        if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(context)) {
            return;
        }
        this.context = context;
    }
    ;
    /**
     * 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}
     */
    Observer.prototype.on = function (property, handler, context, id) {
        if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(handler)) {
            return;
        }
        var cntxt = context || this.context;
        if (this.notExist(property)) {
            this.boundedEvents[property] = [{ handler: handler, context: cntxt }];
            return;
        }
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    Observer.prototype.off = function (property, handler, id) {
        if (this.notExist(property)) {
            return;
        }
        var curObject = Object(_util__WEBPACK_IMPORTED_MODULE_0__["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}
     */
    Observer.prototype.notify = function (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 = Object(_util__WEBPACK_IMPORTED_MODULE_0__["getValue"])(property, this.boundedEvents).slice(0);
        if (window[blazor]) {
            return this.blazorCallback(curObject, argument, successHandler, errorHandler, 0);
        }
        else {
            for (var _i = 0, curObject_1 = curObject; _i < curObject_1.length; _i++) {
                var cur = curObject_1[_i];
                cur.handler.call(cur.context, argument);
            }
            if (successHandler) {
                successHandler.call(this, argument);
            }
        }
    };
    Observer.prototype.blazorCallback = function (objs, argument, successHandler, errorHandler, index) {
        var _this = this;
        var isTrigger = index === objs.length - 1;
        if (index < objs.length) {
            var obj_1 = objs[index];
            var promise = obj_1.handler.call(obj_1.context, argument);
            if (promise && typeof promise.then === 'function') {
                if (!successHandler) {
                    return promise;
                }
                promise.then(function (data) {
                    data = typeof data === 'string' && _this.isJson(data) ? JSON.parse(data) : data;
                    Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])(argument, argument, data, true);
                    if (successHandler && isTrigger) {
                        successHandler.call(obj_1.context, argument);
                    }
                    else {
                        return _this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
                    }
                }).catch(function (data) {
                    if (errorHandler) {
                        errorHandler.call(obj_1.context, typeof data === 'string' && _this.isJson(data) ? JSON.parse(data) : data);
                    }
                });
            }
            else if (successHandler && isTrigger) {
                successHandler.call(obj_1.context, argument);
            }
            else {
                return this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
            }
        }
    };
    Observer.prototype.isJson = function (value) {
        try {
            JSON.parse(value);
        }
        catch (e) {
            return false;
        }
        return true;
    };
    /**
     * To destroy handlers in the event
     */
    Observer.prototype.destroy = function () {
        this.boundedEvents = this.context = undefined;
    };
    /**
     * Returns if the property exists.
     */
    Observer.prototype.notExist = function (prop) {
        return this.boundedEvents.hasOwnProperty(prop) === false || this.boundedEvents[prop].length <= 0;
    };
    /**
     * Returns if the handler is present.
     */
    Observer.prototype.isHandlerPresent = function (boundedEvents, handler) {
        for (var _i = 0, boundedEvents_1 = boundedEvents; _i < boundedEvents_1.length; _i++) {
            var cur = boundedEvents_1[_i];
            if (cur.handler === handler) {
                return true;
            }
        }
        return false;
    };
    return Observer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/template-engine.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/template-engine.js ***!
  \******************************************************************/
/*! exports provided: blazorTemplates, getRandomId, compile, updateBlazorTemplate, resetBlazorTemplate, setTemplateEngine, getTemplateEngine */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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; });
/* 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 import */ var _template__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./template */ "./node_modules/@syncfusion/ej2-base/src/template.js");
/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dom */ "./node_modules/@syncfusion/ej2-base/src/dom.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/**
 * 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(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 blazor = 'Blazor';
        var blazorTemplateId = 'BlazorTemplateId';
        if (window && window[blazor] && !isStringTemplate) {
            var randomId = getRandomId();
            var blazorId = templateId + randomId;
            if (!blazorTemplates[templateId]) {
                blazorTemplates[templateId] = [];
            }
            if (!Object(_util__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(index)) {
                var keys = Object.keys(blazorTemplates[templateId][index]);
                for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
                    var key = keys_1[_i];
                    if (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' ? [Object(_dom__WEBPACK_IMPORTED_MODULE_1__["createElement"])('tr', { id: blazorId })] :
                // tslint:disable-next-line:no-any
                [Object(_dom__WEBPACK_IMPORTED_MODULE_1__["createElement"])('div', { id: blazorId })];
        }
        if (typeof result === 'string') {
            if (HAS_SVG.test(result)) {
                var ele = Object(_dom__WEBPACK_IMPORTED_MODULE_1__["createElement"])('svg', { innerHTML: result });
                return ele.childNodes;
            }
            else {
                var ele = Object(_dom__WEBPACK_IMPORTED_MODULE_1__["createElement"])((HAS_ROW.test(result) ? 'table' : 'div'), { innerHTML: result });
                return ele.childNodes;
            }
        }
        else {
            return result;
        }
    };
}
function updateBlazorTemplate(templateId, templateName, comp, isEmpty) {
    var blazor = 'Blazor';
    if (window && window[blazor]) {
        var ejsIntrop = 'ejsInterop';
        window[ejsIntrop].updateTemplate(templateName, blazorTemplates[templateId], templateId, comp);
        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 = innerTemplates[i].getAttribute('data-templateId');
            var tempElement = document.getElementById(tempId);
            if (tempElement) {
                var length_1 = tempElement.children.length;
                for (var j = 0; j < length_1; j++) {
                    if (!Object(_util__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(index)) {
                        innerTemplates[index].appendChild(tempElement.children[0]);
                        return;
                    }
                    else {
                        innerTemplates[i].appendChild(tempElement.children[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 = /** @class */ (function () {
    function Engine() {
    }
    Engine.prototype.compile = function (templateString, helper) {
        if (helper === void 0) { helper = {}; }
        return Object(_template__WEBPACK_IMPORTED_MODULE_0__["compile"])(templateString, helper);
    };
    return Engine;
}());
var engineObj = { compile: new Engine().compile };


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/template.js":
/*!***********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/template.js ***!
  \***********************************************************/
/*! exports provided: expression, compile */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expression", function() { return expression; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compile", function() { return compile; });
/**
 * 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 exp = new RegExp('\\${([^}]*)}', 'g');
// let cachedTemplate: Object = {};
/**
 * The function to set regular expression for template expression string.
 * @param  {RegExp} value - Value expression.
 * @private
 */
function expression(value) {
    if (value) {
        exp = value;
    }
    return exp;
}
// /**
//  * 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(template, helper) {
    var argName = 'data';
    var evalExpResult = evalExp(template, argName, helper);
    var fnCode = "var str=\"" + 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 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(WORD, function (strs) {
                    strs = strs.trim();
                    return addNameSpace(strs, !(QUOTES.test(strs)) && (localKeys.indexOf(strs) === -1), nameSpace, localKeys);
                })) + '{ \n str = str + "';
            }
            else if (FOR_STMT.test(cnt)) {
                //handling for condition
                var rlStr_1 = matches[1].split(' of ');
                // replace for each into actual JavaScript
                cnt = '"; ' + cnt.replace(matches[1], function (mtc) {
                    localKeys.push(rlStr_1[0]);
                    localKeys.push(rlStr_1[0] + 'Index');
                    varCOunt = varCOunt + 1;
                    // tslint:disable-next-line
                    return 'var i' + varCOunt + '=0; i' + varCOunt + ' < ' + addNameSpace(rlStr_1[1], true, nameSpace, localKeys) + '.length; i' + varCOunt + '++';
                }) + '{ \n ' + rlStr_1[0] + '= ' + addNameSpace(rlStr_1[1], true, nameSpace, localKeys)
                    + '[i' + varCOunt + ']; \n var ' + rlStr_1[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]);
                }
                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 {
            // 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);
}
// // 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();
// }


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/touch.js":
/*!********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/touch.js ***!
  \********************************************************/
/*! exports provided: SwipeSettings, Touch */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-base/src/util.js");
/* harmony import */ var _notify_property_change__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./notify-property-change */ "./node_modules/@syncfusion/ej2-base/src/notify-property-change.js");
/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./browser */ "./node_modules/@syncfusion/ej2-base/src/browser.js");
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./node_modules/@syncfusion/ej2-base/src/base.js");
/* harmony import */ var _child_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./child-property */ "./node_modules/@syncfusion/ej2-base/src/child-property.js");
/* harmony import */ var _event_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event-handler */ "./node_modules/@syncfusion/ej2-base/src/event-handler.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};






/**
 * SwipeSettings is a framework module that provides support to handle swipe event like swipe up, swipe right, etc..,
 */
var SwipeSettings = /** @class */ (function (_super) {
    __extends(SwipeSettings, _super);
    function SwipeSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_1__["Property"])(50)
    ], SwipeSettings.prototype, "swipeThresholdDistance", void 0);
    return SwipeSettings;
}(_child_property__WEBPACK_IMPORTED_MODULE_4__["ChildProperty"]));

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 = /** @class */ (function (_super) {
    __extends(Touch, _super);
    /* End-Properties */
    function Touch(element, options) {
        var _this = _super.call(this, options, element) || this;
        _this.touchAction = true;
        _this.tapCount = 0;
        _this.startEvent = function (evt) {
            if (_this.touchAction === true) {
                var point = (evt.changedTouches ? evt.changedTouches[0] : evt);
                if (evt.changedTouches !== undefined) {
                    _this.touchAction = false;
                }
                _this.isTouchMoved = false;
                _this.movedDirection = '';
                _this.startPoint = _this.lastMovedPoint = { clientX: point.clientX, clientY: point.clientY };
                _this.startEventData = point;
                _this.hScrollLocked = _this.vScrollLocked = false;
                _this.tStampStart = Date.now();
                _this.timeOutTapHold = setTimeout(function () { _this.tapHoldEvent(evt); }, _this.tapHoldThreshold);
                _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].add(_this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchMoveEvent, _this.moveEvent, _this);
                _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].add(_this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchEndEvent, _this.endEvent, _this);
                _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].add(_this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchCancelEvent, _this.cancelEvent, _this);
            }
        };
        _this.moveEvent = function (evt) {
            var point = evt.changedTouches ? evt.changedTouches[0] : evt;
            _this.movedPoint = point;
            _this.isTouchMoved = !(point.clientX === _this.startPoint.clientX && point.clientY === _this.startPoint.clientY);
            var eScrollArgs = {};
            if (_this.isTouchMoved) {
                clearTimeout(_this.timeOutTapHold);
                _this.calcScrollPoints(evt);
                var scrollArg = {
                    startEvents: _this.startEventData,
                    originalEvent: evt, startX: _this.startPoint.clientX,
                    startY: _this.startPoint.clientY, distanceX: _this.distanceX,
                    distanceY: _this.distanceY, scrollDirection: _this.scrollDirection,
                    velocity: _this.getVelocity(point)
                };
                eScrollArgs = Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])(eScrollArgs, {}, scrollArg);
                _this.trigger('scroll', eScrollArgs);
                _this.lastMovedPoint = { clientX: point.clientX, clientY: point.clientY };
            }
        };
        _this.cancelEvent = function (evt) {
            clearTimeout(_this.timeOutTapHold);
            clearTimeout(_this.timeOutTap);
            _this.tapCount = 0;
            _this.swipeFn(evt);
            _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].remove(_this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchCancelEvent, _this.cancelEvent);
        };
        _this.endEvent = function (evt) {
            _this.swipeFn(evt);
            if (!_this.isTouchMoved) {
                if (typeof _this.tap === 'function') {
                    _this.trigger('tap', { originalEvent: evt, tapCount: ++_this.tapCount });
                    _this.timeOutTap = setTimeout(function () {
                        _this.tapCount = 0;
                    }, _this.tapThreshold);
                }
            }
            _this.modeclear();
        };
        _this.swipeFn = function (evt) {
            clearTimeout(_this.timeOutTapHold);
            clearTimeout(_this.timeOutTap);
            var point = evt;
            if (evt.changedTouches) {
                point = evt.changedTouches[0];
            }
            var diffX = point.clientX - _this.startPoint.clientX;
            var diffY = point.clientY - _this.startPoint.clientY;
            diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);
            diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);
            _this.isTouchMoved = diffX > 1 || diffY > 1;
            _this.endPoint = point;
            _this.calcPoints(evt);
            var swipeArgs = {
                originalEvent: evt,
                startEvents: _this.startEventData,
                startX: _this.startPoint.clientX,
                startY: _this.startPoint.clientY,
                distanceX: _this.distanceX, distanceY: _this.distanceY, swipeDirection: _this.movedDirection,
                velocity: _this.getVelocity(point)
            };
            if (_this.isTouchMoved) {
                var eSwipeArgs = void 0;
                var tDistance = _this.swipeSettings.swipeThresholdDistance;
                eSwipeArgs = Object(_util__WEBPACK_IMPORTED_MODULE_0__["extend"])(eSwipeArgs, _this.defaultArgs, swipeArgs);
                var canTrigger = false;
                var ele = _this.element;
                var scrollBool = _this.isScrollable(ele);
                var moved = swipeRegex.test(_this.movedDirection);
                if ((tDistance < _this.distanceX && !moved) || (tDistance < _this.distanceY && moved)) {
                    if (!scrollBool) {
                        canTrigger = true;
                    }
                    else {
                        canTrigger = _this.checkSwipe(ele, moved);
                    }
                }
                if (canTrigger) {
                    _this.trigger('swipe', eSwipeArgs);
                }
            }
            _this.modeclear();
        };
        _this.modeclear = function () {
            _this.modeClear = setTimeout(function () {
                _this.touchAction = true;
            }, (typeof _this.tap !== 'function' ? 0 : 20));
            _this.lastTapTime = new Date().getTime();
            _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].remove(_this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchMoveEvent, _this.moveEvent);
            _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].remove(_this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchEndEvent, _this.endEvent);
            _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].remove(_this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchCancelEvent, _this.cancelEvent);
        };
        _this.bind();
        return _this;
    }
    // triggers when property changed 
    /**
     * @private
     * @param newProp
     * @param oldProp
     */
    Touch.prototype.onPropertyChanged = function (newProp, oldProp) {
        //No Code to handle
    };
    Touch.prototype.bind = function () {
        this.wireEvents();
        if (_browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].isIE) {
            this.element.classList.add('e-block-touch');
        }
    };
    /**
     * To destroy the touch instance.
     * @return {void}
     */
    Touch.prototype.destroy = function () {
        this.unwireEvents();
        _super.prototype.destroy.call(this);
    };
    // Need to changes the event binding once we updated the event handler.
    Touch.prototype.wireEvents = function () {
        _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].add(this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchStartEvent, this.startEvent, this);
    };
    Touch.prototype.unwireEvents = function () {
        _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].remove(this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchStartEvent, this.startEvent);
    };
    /**
     * Returns module name as touch
     * @returns {string}
     * @private
     */
    Touch.prototype.getModuleName = function () {
        return 'touch';
    };
    /**
     * Returns if the HTML element is Scrollable.
     * @param {HTMLElement} element - HTML Element to check if Scrollable.
     * @returns {boolean}
     */
    Touch.prototype.isScrollable = function (element) {
        var eleStyle = getComputedStyle(element);
        var style = eleStyle.overflow + eleStyle.overflowX + eleStyle.overflowY;
        if ((/(auto|scroll)/).test(style)) {
            return true;
        }
        return false;
    };
    Touch.prototype.tapHoldEvent = function (evt) {
        this.tapCount = 0;
        this.touchAction = true;
        var eTapArgs;
        _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].remove(this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchMoveEvent, this.moveEvent);
        _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].remove(this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchEndEvent, this.endEvent);
        eTapArgs = { originalEvent: evt };
        this.trigger('tapHold', eTapArgs);
        _event_handler__WEBPACK_IMPORTED_MODULE_5__["EventHandler"].remove(this.element, _browser__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchCancelEvent, this.cancelEvent);
    };
    Touch.prototype.calcPoints = function (evt) {
        var point = evt.changedTouches ? evt.changedTouches[0] : 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';
        }
    };
    Touch.prototype.calcScrollPoints = function (evt) {
        var point = evt.changedTouches ? evt.changedTouches[0] : 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;
        }
    };
    Touch.prototype.getVelocity = function (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
    Touch.prototype.checkSwipe = function (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]]);
    };
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], Touch.prototype, "tap", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], Touch.prototype, "tapHold", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], Touch.prototype, "swipe", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], Touch.prototype, "scroll", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_1__["Property"])(350)
    ], Touch.prototype, "tapThreshold", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_1__["Property"])(750)
    ], Touch.prototype, "tapHoldThreshold", void 0);
    __decorate([
        Object(_notify_property_change__WEBPACK_IMPORTED_MODULE_1__["Complex"])({}, SwipeSettings)
    ], Touch.prototype, "swipeSettings", void 0);
    Touch = __decorate([
        _notify_property_change__WEBPACK_IMPORTED_MODULE_1__["NotifyPropertyChanges"]
    ], Touch);
    return Touch;
}(_base__WEBPACK_IMPORTED_MODULE_3__["Base"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-base/src/util.js":
/*!*******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-base/src/util.js ***!
  \*******************************************************/
/*! exports provided: createInstance, setImmediate, getValue, setValue, deleteObject, isObject, getEnumValue, merge, extend, isNullOrUndefined, isUndefined, getUniqueID, debounce, queryParams, isObjectArray, compareElementParent, throwError, print, formatUnit, isBlazor, getElement, getInstance, addInstance, uniqueID */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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__, "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; });
var instances = 'ej2_instances';
var uid = 0;
/**
 * 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 (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 () {
        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 keys = Object.keys(destination);
        var deepmerge = 'deepMerge';
        for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
            var key = keys_1[_i];
            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 result = copied || {};
    var length = arguments.length;
    if (deep) {
        length = length - 1;
    }
    var _loop_1 = function (i) {
        if (!arguments_1[i]) {
            return "continue";
        }
        var obj1 = arguments_1[i];
        Object.keys(obj1).forEach(function (key) {
            var src = result[key];
            var copy = obj1[key];
            var clone;
            if (deep && (isObject(copy) || Array.isArray(copy))) {
                if (isObject(copy)) {
                    clone = src ? src : {};
                    result[key] = extend({}, clone, copy, deep);
                }
                else {
                    clone = src ? src : [];
                    result[key] = extend([], clone, copy, deep);
                }
            }
            else {
                result[key] = copy;
            }
        });
    };
    var arguments_1 = arguments;
    for (var i = 1; i < length; i++) {
        _loop_1(i);
    }
    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 _this = this;
        var args = arguments;
        var later = function () {
            out = null;
            return eventFunction.apply(_this, 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 _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {
        var key = keys_2[_i];
        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('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, len = links.length; i < len; 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 isBlazor() {
    return window && Object.keys(window).indexOf('Blazor') >= 0;
}
/**
 * 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]) {
        for (var _i = 0, _a = elem[instances]; _i < _a.length; _i++) {
            var inst = _a[_i];
            if (inst instanceof component) {
                return inst;
            }
        }
    }
    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;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/index.js":
/*!*******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/index.js ***!
  \*******************************************************/
/*! exports provided: wrapperInitialize, getTextNode, destroy, preRender, createCheckBox, rippleMouseHandler, setHiddenInput, Button, CheckBox, RadioButton, Switch, classNames, ChipList, Chip */
/***/ (function(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-buttons/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrapperInitialize", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["wrapperInitialize"]; });

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/button/button.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/button/button.js ***!
  \*******************************************************************/
/*! exports provided: Button */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/common */ "./node_modules/@syncfusion/ej2-buttons/src/common/common.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 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 = /** @class */ (function (_super) {
    __extends(Button, _super);
    /**
     * Constructor for creating the widget
     * @param  {ButtonModel} options?
     * @param  {string|HTMLButtonElement} element?
     */
    function Button(options, element) {
        return _super.call(this, options, element) || this;
    }
    Button.prototype.preRender = function () {
        // pre render code snippets
    };
    /**
     * Initialize the control rendering
     * @returns void
     * @private
     */
    Button.prototype.render = function () {
        this.initialize();
    };
    Button.prototype.initialize = function () {
        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 (this.content) {
            this.element.innerHTML = this.content;
        }
        this.setIconCss();
        if (this.enableRtl) {
            this.element.classList.add(cssClassName.RTL);
        }
        if (this.disabled) {
            this.controlStatus(this.disabled);
        }
        else {
            this.wireEvents();
        }
        this.removeRippleEffect = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element, { selector: '.' + cssClassName.BUTTON });
    };
    Button.prototype.controlStatus = function (disabled) {
        this.element.disabled = disabled;
    };
    Button.prototype.setIconCss = function () {
        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);
            }
        }
    };
    Button.prototype.wireEvents = function () {
        if (this.isToggle) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.btnClickHandler, this);
        }
    };
    Button.prototype.unWireEvents = function () {
        if (this.isToggle) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.btnClickHandler);
        }
    };
    Button.prototype.btnClickHandler = function () {
        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
     */
    Button.prototype.destroy = function () {
        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(' '));
        }
        _super.prototype.destroy.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();
        this.removeRippleEffect();
    };
    /**
     * Get component name.
     * @returns string
     * @private
     */
    Button.prototype.getModuleName = function () {
        return 'btn';
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @returns string
     * @private
     */
    Button.prototype.getPersistData = function () {
        return this.addOnPersist([]);
    };
    /**
     * Dynamically injects the required modules to the component.
     * @private
     */
    Button.Inject = function () {
        // Inject code snippets
    };
    /**
     * Called internally if any of the property value changed.
     * @param  {ButtonModel} newProp
     * @param  {ButtonModel} oldProp
     * @returns void
     * @private
     */
    Button.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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);
                    this.unWireEvents();
                    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 = Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["getTextNode"])(this.element);
                    if (!node) {
                        this.element.classList.remove(cssClassName.ICONBTN);
                    }
                    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
     */
    Button.prototype.click = function () {
        this.element.click();
    };
    /**
     * Sets the focus to Button
     * its native method
     * @public
     */
    Button.prototype.focusIn = function () {
        this.element.focus();
    };
    __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__["Event"])()
    ], Button.prototype, "created", void 0);
    Button = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Button);
    return Button;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/button/index.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/button/index.js ***!
  \******************************************************************/
/*! exports provided: Button */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button */ "./node_modules/@syncfusion/ej2-buttons/src/button/button.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return _button__WEBPACK_IMPORTED_MODULE_0__["Button"]; });

/**
 * Button modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/check-box/check-box.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/check-box/check-box.js ***!
  \*************************************************************************/
/*! exports provided: CheckBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckBox", function() { return CheckBox; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../common/common */ "./node_modules/@syncfusion/ej2-buttons/src/common/common.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 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';
/**
 * 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 = /** @class */ (function (_super) {
    __extends(CheckBox, _super);
    /**
     * Constructor for creating the widget
     * @private
     */
    function CheckBox(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.isFocused = false;
        _this.isMouseClick = false;
        return _this;
    }
    CheckBox.prototype.changeState = function (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);
    };
    CheckBox.prototype.clickHandler = function (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
     */
    CheckBox.prototype.destroy = function () {
        var _this = this;
        var wrapper = this.getWrapper();
        _super.prototype.destroy.call(this);
        if (!this.disabled) {
            this.unWireEvents();
        }
        if (this.tagName === 'INPUT') {
            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) {
                _this.element.removeAttribute(key);
            });
        }
        else {
            ['role', 'aria-checked', 'class'].forEach(function (key) {
                wrapper.removeAttribute(key);
            });
            wrapper.innerHTML = '';
        }
    };
    CheckBox.prototype.focusHandler = function () {
        this.isFocused = true;
    };
    CheckBox.prototype.focusOutHandler = function () {
        this.getWrapper().classList.remove('e-focus');
        this.isFocused = false;
    };
    /**
     * Gets the module name.
     * @private
     */
    CheckBox.prototype.getModuleName = function () {
        return 'checkbox';
    };
    /**
     * Gets the properties to be maintained in the persistence state.
     * @private
     */
    CheckBox.prototype.getPersistData = function () {
        return this.addOnPersist(['checked', 'indeterminate']);
    };
    CheckBox.prototype.getWrapper = function () {
        return this.element.parentElement.parentElement;
    };
    CheckBox.prototype.initialize = function () {
        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();
        }
    };
    CheckBox.prototype.initWrapper = function () {
        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 });
        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);
        Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["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);
        }
    };
    CheckBox.prototype.keyUpHandler = function () {
        if (this.isFocused) {
            this.getWrapper().classList.add('e-focus');
        }
    };
    CheckBox.prototype.labelMouseHandler = function (e) {
        this.isMouseClick = true;
        var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];
        Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["rippleMouseHandler"])(e, rippleSpan);
    };
    /**
     * Called internally if any of the property value changes.
     * @private
     */
    CheckBox.prototype.onPropertyChanged = function (newProp, oldProp) {
        var wrapper = this.getWrapper();
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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.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;
            }
        }
    };
    /**
     * Initialize Angular, React and Unique ID support.
     * @private
     */
    CheckBox.prototype.preRender = function () {
        var element = this.element;
        this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
        this.tagName = this.element.tagName;
        element = Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["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
     */
    CheckBox.prototype.render = function () {
        this.initWrapper();
        this.initialize();
        if (!this.disabled) {
            this.wireEvents();
        }
    };
    CheckBox.prototype.setDisabled = function () {
        var wrapper = this.getWrapper();
        this.element.disabled = true;
        wrapper.classList.add(DISABLED);
        wrapper.setAttribute('aria-disabled', 'true');
    };
    CheckBox.prototype.setText = function (text) {
        var label = this.getWrapper().getElementsByClassName(LABEL)[0];
        if (label) {
            label.textContent = text;
        }
        else {
            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);
            }
        }
    };
    CheckBox.prototype.changeHandler = function (e) {
        e.stopPropagation();
    };
    CheckBox.prototype.formResetHandler = function () {
        this.checked = this.initialCheckedValue;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, { 'checked': this.initialCheckedValue.toString() });
    };
    CheckBox.prototype.unWireEvents = function () {
        var wrapper = this.getWrapper();
        _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);
        }
    };
    CheckBox.prototype.wireEvents = function () {
        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);
        }
    };
    /**
     * Click the CheckBox element
     * its native method
     * @public
     */
    CheckBox.prototype.click = function () {
        this.element.click();
    };
    /**
     * Sets the focus to CheckBox
     * its native method
     * @public
     */
    CheckBox.prototype.focusIn = function () {
        this.element.focus();
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], CheckBox.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], CheckBox.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], CheckBox.prototype, "checked", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], CheckBox.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], CheckBox.prototype, "disabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], CheckBox.prototype, "indeterminate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], CheckBox.prototype, "label", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('After')
    ], CheckBox.prototype, "labelPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], CheckBox.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], CheckBox.prototype, "value", void 0);
    CheckBox = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], CheckBox);
    return CheckBox;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/check-box/index.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/check-box/index.js ***!
  \*********************************************************************/
/*! exports provided: CheckBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _check_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./check-box */ "./node_modules/@syncfusion/ej2-buttons/src/check-box/check-box.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckBox", function() { return _check_box__WEBPACK_IMPORTED_MODULE_0__["CheckBox"]; });

/**
 * CheckBox modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/chips/chip-list.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/chips/chip-list.js ***!
  \*********************************************************************/
/*! exports provided: classNames, ChipList */
/***/ (function(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__, "ChipList", function() { return ChipList; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 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 = /** @class */ (function (_super) {
    __extends(ChipList, _super);
    function ChipList(options, element) {
        return _super.call(this, options, element) || this;
    }
    ChipList.prototype.preRender = function () {
        //prerender
    };
    ChipList.prototype.render = function () {
        this.type = this.chips.length ? 'chipset' : (this.text || this.element.innerText ? 'chip' : 'chipset');
        this.setAttributes();
        this.createChip();
        this.setRtl();
        this.wireEvent(false);
        this.select(this.selectedChips);
        this.rippleFunctin = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element, {
            selector: '.e-chip'
        });
    };
    ChipList.prototype.createChip = function () {
        this.innerText = this.element.innerText.trim();
        this.element.innerHTML = '';
        this.chipCreation(this.type === 'chip' ? [this.innerText ? this.innerText : this.text] : this.chips);
    };
    ChipList.prototype.setAttributes = function () {
        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');
            }
        }
    };
    ChipList.prototype.setRtl = function () {
        this.element.classList[this.enableRtl ? 'add' : 'remove'](classNames.rtl);
    };
    ChipList.prototype.chipCreation = function (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.type === 'chip') {
                chipListArray = chipArray;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], className);
                this.element.setAttribute('aria-label', fieldsData.text);
            }
            else {
                var wrapper = this.createElement('DIV', {
                    className: className.join(' '), attrs: {
                        tabIndex: '0', role: 'option',
                        'aria-label': fieldsData.text, 'aria-selected': 'false'
                    }
                });
                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);
    };
    ChipList.prototype.getFieldValues = function (data) {
        var chipEnabled = this.enabled.toString() === 'false' ? false : true;
        var fields = {
            text: typeof data === 'object' ? (data.text ? data.text.toString() : this.text.toString()) :
                (this.type === 'chip' ? (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)
        };
        return fields;
    };
    ChipList.prototype.elementCreation = function (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);
        }
        var chipTextElement = this.createElement('span', { className: classNames.text });
        chipTextElement.innerText = fields.text;
        chipArray.push(chipTextElement);
        if (fields.trailingIconCss || (this.type !== 'chip' && this.enableDelete)) {
            var className = (classNames.delete + ' ' +
                (fields.trailingIconCss ? fields.trailingIconCss : classNames.deleteIcon)).trim();
            var chipdeleteElement = this.createElement('span', { className: className });
            chipArray.push(chipdeleteElement);
        }
        return chipArray;
    };
    /**
     * A function that finds chip based on given input.
     * @param  {number | HTMLElement } fields - We can pass index number or element of chip.
     */
    ChipList.prototype.find = function (fields) {
        var chipData;
        var chipElement = fields instanceof HTMLElement ?
            fields : this.element.querySelectorAll('.' + classNames.chip)[fields];
        if (chipElement && this.type !== 'chip') {
            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;
    };
    /**
     * A function that adds chip items based on given input.
     * @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.
     */
    ChipList.prototype.add = function (chipsData) {
        var _a;
        if (this.type !== 'chip') {
            var fieldData = chipsData instanceof Array ?
                chipsData : [chipsData];
            (_a = this.chips).push.apply(_a, fieldData);
            this.chipCreation(fieldData);
        }
    };
    /**
     * A function that selects chip items based on given input.
     * @param  {number | number[] | HTMLElement | HTMLElement[]} fields - We can pass number or array of number
     *  or chip element or array of chip element.
     */
    ChipList.prototype.select = function (fields) {
        if (this.type !== 'chip' && this.selection !== 'None') {
            var fieldData = fields instanceof Array ? fields : [fields];
            for (var i = 0; i < fieldData.length; i++) {
                var chipElement = fieldData[i] instanceof HTMLElement ? fieldData[i]
                    : this.element.querySelectorAll('.' + classNames.chip)[fieldData[i]];
                if (chipElement instanceof HTMLElement) {
                    this.selectionHandler(chipElement);
                }
            }
        }
    };
    /**
     * A function that removes chip items based on given input.
     * @param  {number | number[] | HTMLElement | HTMLElement[]} fields - We can pass number or array of number
     *  or chip element or array of chip element.
     */
    ChipList.prototype.remove = function (fields) {
        var _this = this;
        if (this.type !== 'chip') {
            var fieldData = fields instanceof Array ? fields : [fields];
            var chipElements_1 = [];
            var chipCollection_1 = this.element.querySelectorAll('.' + classNames.chip);
            fieldData.forEach(function (data) {
                var chipElement = data instanceof HTMLElement ? data
                    : chipCollection_1[data];
                if (chipElement instanceof HTMLElement) {
                    chipElements_1.push(chipElement);
                }
            });
            chipElements_1.forEach(function (element) {
                var chips = _this.element.querySelectorAll('.' + classNames.chip);
                var index = Array.prototype.slice.call(chips).indexOf(element);
                _this.deleteHandler(element, index);
            });
        }
    };
    /**
     * A function that returns selected chips data.
     */
    ChipList.prototype.getSelectedChips = function () {
        var selectedChips;
        if (this.type !== 'chip' && 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.toString() : 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;
    };
    ChipList.prototype.wireEvent = function (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);
        }
    };
    ChipList.prototype.keyHandler = function (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);
            }
        }
    };
    ChipList.prototype.focusInHandler = function (chipWrapper) {
        if (!chipWrapper.classList.contains(classNames.focused)) {
            chipWrapper.classList.add(classNames.focused);
        }
    };
    ChipList.prototype.focusOutHandler = function (e) {
        var chipWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + classNames.chip);
        var focusedElement = this.type === 'chip' ? (this.element.classList.contains(classNames.focused) ?
            this.element : null) : this.element.querySelector('.' + classNames.focused);
        if (chipWrapper && focusedElement) {
            focusedElement.classList.remove(classNames.focused);
        }
    };
    ChipList.prototype.clickHandler = function (e, del) {
        var _this = this;
        if (del === void 0) { del = false; }
        var chipWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + classNames.chip);
        if (chipWrapper) {
            if (this.type !== 'chip') {
                var chipData_1 = this.find(chipWrapper);
                chipData_1.event = e;
                var deleteElement = e.target.classList.contains(classNames.delete) ?
                    e.target : (del ? chipWrapper.querySelector('.' + classNames.delete) : undefined);
                if (deleteElement && this.enableDelete) {
                    chipData_1.cancel = false;
                    var deletedItemArgs = chipData_1;
                    this.trigger('delete', deletedItemArgs, function (observedArgs) {
                        if (!observedArgs.cancel) {
                            _this.deleteHandler(chipData_1.element, chipData_1.index);
                        }
                    });
                }
                else if (this.selection !== 'None') {
                    this.selectionHandler(chipWrapper);
                    chipData_1.selected = chipWrapper.classList.contains(classNames.active);
                    var selectedItemArgs = chipData_1;
                    this.trigger('click', selectedItemArgs);
                }
                else {
                    this.focusInHandler(chipWrapper);
                    var clickedItemArgs = chipData_1;
                    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);
            }
        }
    };
    ChipList.prototype.selectionHandler = function (chipWrapper) {
        if (this.selection === 'Single') {
            var activeElement = this.element.querySelector('.' + classNames.active);
            if (activeElement && activeElement !== chipWrapper) {
                activeElement.classList.remove(classNames.active);
                chipWrapper.setAttribute('aria-selected', 'false');
            }
        }
        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');
        }
    };
    ChipList.prototype.deleteHandler = function (chipWrapper, index) {
        this.chips.splice(index, 1);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(chipWrapper);
    };
    /**
     * It is used to destroy the ChipList component.
     */
    ChipList.prototype.destroy = function () {
        _super.prototype.destroy.call(this);
        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.rippleFunctin();
        this.element.innerHTML = '';
        this.element.innerText = this.innerText;
    };
    ChipList.prototype.removeMultipleAttributes = function (attributes, element) {
        attributes.forEach(function (attr) {
            element.removeAttribute(attr);
        });
    };
    ChipList.prototype.getPersistData = function () {
        return this.addOnPersist([]);
    };
    ChipList.prototype.getModuleName = function () {
        return 'chip-list';
    };
    ChipList.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'chips':
                case 'text':
                case 'avatarText':
                case 'avatarIconCss':
                case 'leadingIconCss':
                case 'trailingIconCss':
                case 'selection':
                case 'enableDelete':
                case 'enabled':
                    this.refresh();
                    break;
                case 'cssClass':
                    if (this.type === 'chip') {
                        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.refresh();
                    }
                    break;
                case 'selectedChips':
                    this.select(newProp.selectedChips);
                    break;
                case 'enableRtl':
                    this.setRtl();
                    break;
            }
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], ChipList.prototype, "chips", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], ChipList.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], ChipList.prototype, "avatarText", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], ChipList.prototype, "avatarIconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], ChipList.prototype, "leadingIconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], ChipList.prototype, "trailingIconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], ChipList.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], ChipList.prototype, "enabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], ChipList.prototype, "selectedChips", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], ChipList.prototype, "selection", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ChipList.prototype, "enableDelete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ChipList.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ChipList.prototype, "click", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ChipList.prototype, "delete", void 0);
    ChipList = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], ChipList);
    return ChipList;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/chips/chip.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/chips/chip.js ***!
  \****************************************************************/
/*! exports provided: Chip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Chip", function() { return Chip; });
/**
 * Represents ChipList `Chip` model class.
 */
var Chip = /** @class */ (function () {
    function Chip() {
    }
    return Chip;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/chips/index.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/chips/index.js ***!
  \*****************************************************************/
/*! exports provided: classNames, ChipList, Chip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _chip_list__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chip-list */ "./node_modules/@syncfusion/ej2-buttons/src/chips/chip-list.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "classNames", function() { return _chip_list__WEBPACK_IMPORTED_MODULE_0__["classNames"]; });

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

/* harmony import */ var _chip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chip */ "./node_modules/@syncfusion/ej2-buttons/src/chips/chip.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Chip", function() { return _chip__WEBPACK_IMPORTED_MODULE_1__["Chip"]; });

/**
 * Chip modules
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/common/common.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/common/common.js ***!
  \*******************************************************************/
/*! exports provided: wrapperInitialize, getTextNode, destroy, preRender, createCheckBox, rippleMouseHandler, setHiddenInput */
/***/ (function(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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.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, len = element.attributes.length; index < len; 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, enableRipple, options) {
    if (enableRipple === void 0) { enableRipple = false; }
    if (options === void 0) { options = {}; }
    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 event_1 = document.createEvent('MouseEvents');
        event_1.initEvent(e.type, false, true);
        rippleSpan.dispatchEvent(event_1);
    }
}
/**
 * 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' }
        }));
    }
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/common/index.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/common/index.js ***!
  \******************************************************************/
/*! exports provided: wrapperInitialize, getTextNode, destroy, preRender, createCheckBox, rippleMouseHandler, setHiddenInput */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ "./node_modules/@syncfusion/ej2-buttons/src/common/common.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrapperInitialize", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["wrapperInitialize"]; });

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

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

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

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

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

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

/**
 * Common modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/index.js":
/*!***********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/index.js ***!
  \***********************************************************/
/*! exports provided: wrapperInitialize, getTextNode, destroy, preRender, createCheckBox, rippleMouseHandler, setHiddenInput, Button, CheckBox, RadioButton, Switch, classNames, ChipList, Chip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/index */ "./node_modules/@syncfusion/ej2-buttons/src/common/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrapperInitialize", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["wrapperInitialize"]; });

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

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

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

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

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

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

/* harmony import */ var _button_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./button/index */ "./node_modules/@syncfusion/ej2-buttons/src/button/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return _button_index__WEBPACK_IMPORTED_MODULE_1__["Button"]; });

/* harmony import */ var _check_box_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./check-box/index */ "./node_modules/@syncfusion/ej2-buttons/src/check-box/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckBox", function() { return _check_box_index__WEBPACK_IMPORTED_MODULE_2__["CheckBox"]; });

/* harmony import */ var _radio_button_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./radio-button/index */ "./node_modules/@syncfusion/ej2-buttons/src/radio-button/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RadioButton", function() { return _radio_button_index__WEBPACK_IMPORTED_MODULE_3__["RadioButton"]; });

/* harmony import */ var _switch_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./switch/index */ "./node_modules/@syncfusion/ej2-buttons/src/switch/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return _switch_index__WEBPACK_IMPORTED_MODULE_4__["Switch"]; });

/* harmony import */ var _chips_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./chips/index */ "./node_modules/@syncfusion/ej2-buttons/src/chips/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "classNames", function() { return _chips_index__WEBPACK_IMPORTED_MODULE_5__["classNames"]; });

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

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

/**
 * Button all modules
 */








/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/radio-button/index.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/radio-button/index.js ***!
  \************************************************************************/
/*! exports provided: RadioButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _radio_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./radio-button */ "./node_modules/@syncfusion/ej2-buttons/src/radio-button/radio-button.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RadioButton", function() { return _radio_button__WEBPACK_IMPORTED_MODULE_0__["RadioButton"]; });

/**
 * RadioButton modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/radio-button/radio-button.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/radio-button/radio-button.js ***!
  \*******************************************************************************/
/*! exports provided: RadioButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RadioButton", function() { return RadioButton; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../common/common */ "./node_modules/@syncfusion/ej2-buttons/src/common/common.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 LABEL = 'e-label';
var RIPPLE = 'e-ripple-container';
var RTL = 'e-rtl';
var WRAPPER = '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 = /** @class */ (function (_super) {
    __extends(RadioButton, _super);
    /**
     * Constructor for creating the widget
     * @private
     */
    function RadioButton(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.isKeyPressed = false;
        return _this;
    }
    RadioButton_1 = RadioButton;
    RadioButton.prototype.changeHandler = function (event) {
        this.checked = true;
        this.dataBind();
        var changeEventArgs = { value: this.value, event: event };
        this.trigger('change', changeEventArgs);
        if (this.tagName === 'EJS-RADIOBUTTON') {
            event.stopPropagation();
        }
    };
    RadioButton.prototype.updateChange = function (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
     */
    RadioButton.prototype.destroy = function () {
        var _this = this;
        var radioWrap = this.element.parentElement;
        _super.prototype.destroy.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) {
                _this.element.removeAttribute(key);
            });
        }
        else {
            ['role', 'aria-checked', 'class'].forEach(function (key) {
                radioWrap.removeAttribute(key);
            });
            radioWrap.innerHTML = '';
        }
    };
    RadioButton.prototype.focusHandler = function () {
        if (this.isKeyPressed) {
            this.getLabel().classList.add('e-focus');
        }
    };
    RadioButton.prototype.focusOutHandler = function () {
        this.getLabel().classList.remove('e-focus');
    };
    RadioButton.prototype.getModuleName = function () {
        return 'radio';
    };
    /**
     * To get the value of selected radio button in a group.
     * @method getSelectedValue
     * @return {string}
     */
    RadioButton.prototype.getSelectedValue = function () {
        var input;
        var radioGrp = this.getRadioGroup();
        for (var i = 0, len = radioGrp.length; i < len; i++) {
            input = radioGrp[i];
            if (input.checked) {
                return input.value;
            }
        }
        return '';
    };
    RadioButton.prototype.getRadioGroup = function () {
        return document.querySelectorAll('input.e-radio[name="' + this.element.getAttribute('name') + '"]');
    };
    /**
     * Gets the properties to be maintained in the persistence state.
     * @private
     */
    RadioButton.prototype.getPersistData = function () {
        return this.addOnPersist(['checked']);
    };
    RadioButton.prototype.getLabel = function () {
        return this.element.nextElementSibling;
    };
    RadioButton.prototype.initialize = function () {
        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();
        }
    };
    RadioButton.prototype.initWrapper = function () {
        var rippleSpan;
        var wrapper = this.element.parentElement;
        if (!wrapper.classList.contains(WRAPPER)) {
            wrapper = this.createElement('div', { className: WRAPPER });
            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) });
            label.appendChild(rippleSpan);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(rippleSpan, {
                duration: 400,
                isCenterRipple: true
            });
        }
        if (this.enableRtl) {
            label.classList.add(RTL);
        }
        if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], this.cssClass.split(' '));
        }
        if (this.label) {
            this.setText(this.label);
        }
    };
    RadioButton.prototype.keyDownHandler = function () {
        this.isKeyPressed = true;
    };
    RadioButton.prototype.labelRippleHandler = function (e) {
        var ripple = this.getLabel().getElementsByClassName(RIPPLE)[0];
        Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["rippleMouseHandler"])(e, ripple);
    };
    RadioButton.prototype.mouseDownHandler = function () {
        this.isKeyPressed = false;
    };
    RadioButton.prototype.formResetHandler = function () {
        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
     */
    RadioButton.prototype.onPropertyChanged = function (newProp, oldProp) {
        var label = this.getLabel();
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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);
                    }
                    else {
                        label.classList.remove(RTL);
                    }
                    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
     */
    RadioButton.prototype.preRender = function () {
        var element = this.element;
        this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
        this.tagName = this.element.tagName;
        element = Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["wrapperInitialize"])(this.createElement, 'EJS-RADIOBUTTON', 'radio', element, WRAPPER, '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
     */
    RadioButton.prototype.render = function () {
        this.initialize();
        if (!this.disabled) {
            this.wireEvents();
        }
    };
    RadioButton.prototype.setDisabled = function () {
        this.element.disabled = true;
    };
    RadioButton.prototype.setText = function (text) {
        var label = this.getLabel();
        var textLabel = label.getElementsByClassName(LABEL)[0];
        if (textLabel) {
            textLabel.textContent = text;
        }
        else {
            textLabel = this.createElement('span', { className: LABEL, innerHTML: text });
            label.appendChild(textLabel);
        }
        if (this.labelPosition === 'Before') {
            this.getLabel().classList.add('e-right');
        }
        else {
            this.getLabel().classList.remove('e-right');
        }
    };
    RadioButton.prototype.unWireEvents = function () {
        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(document, 'keydown', this.keyDownHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(label, 'mousedown', this.mouseDownHandler);
        _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 rippleLabel = label.getElementsByClassName(LABEL)[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);
        }
    };
    RadioButton.prototype.wireEvents = function () {
        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(document, 'keydown', this.keyDownHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(label, 'mousedown', this.mouseDownHandler, 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)[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
     */
    RadioButton.prototype.click = function () {
        this.element.click();
    };
    /**
     * Sets the focus to RadioButton
     * its native method
     * @public
     */
    RadioButton.prototype.focusIn = function () {
        this.element.focus();
    };
    var RadioButton_1;
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RadioButton.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RadioButton.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], RadioButton.prototype, "checked", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], RadioButton.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], RadioButton.prototype, "disabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], RadioButton.prototype, "label", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('After')
    ], RadioButton.prototype, "labelPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], RadioButton.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], RadioButton.prototype, "value", void 0);
    RadioButton = RadioButton_1 = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], RadioButton);
    return RadioButton;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/switch/index.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/switch/index.js ***!
  \******************************************************************/
/*! exports provided: Switch */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _switch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./switch */ "./node_modules/@syncfusion/ej2-buttons/src/switch/switch.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return _switch__WEBPACK_IMPORTED_MODULE_0__["Switch"]; });

/**
 * Switch modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-buttons/src/switch/switch.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-buttons/src/switch/switch.js ***!
  \*******************************************************************/
/*! exports provided: Switch */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return Switch; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../common/common */ "./node_modules/@syncfusion/ej2-buttons/src/common/common.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 CHECK = 'e-check';
var DISABLED = 'e-switch-disabled';
var RIPPLE = 'e-ripple-container';
var RIPPLE_CHECK = 'e-ripple-check';
var RTL = 'e-rtl';
var WRAPPER = '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 = /** @class */ (function (_super) {
    __extends(Switch, _super);
    /**
     * Constructor for creating the widget.
     * @private
     */
    function Switch(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.isKeyPressed = false;
        _this.isDrag = false;
        return _this;
    }
    Switch.prototype.changeState = function (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)[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);
    };
    Switch.prototype.clickHandler = function (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
     */
    Switch.prototype.destroy = function () {
        _super.prototype.destroy.call(this);
        if (!this.disabled) {
            this.unWireEvents();
        }
        Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["destroy"])(this, this.getWrapper(), this.tagName);
    };
    Switch.prototype.focusHandler = function () {
        if (this.isKeyPressed) {
            this.getWrapper().classList.add('e-focus');
        }
    };
    Switch.prototype.focusOutHandler = function () {
        this.getWrapper().classList.remove('e-focus');
    };
    /**
     * Gets the module name.
     * @private
     */
    Switch.prototype.getModuleName = function () {
        return 'switch';
    };
    /**
     * Gets the properties to be maintained in the persistence state.
     * @private
     */
    Switch.prototype.getPersistData = function () {
        return this.addOnPersist(['checked']);
    };
    Switch.prototype.getWrapper = function () {
        return this.element.parentElement;
    };
    Switch.prototype.initialize = function () {
        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);
        }
    };
    Switch.prototype.initWrapper = function () {
        var wrapper = this.element.parentElement;
        if (!wrapper.classList.contains(WRAPPER)) {
            wrapper = this.createElement('div', {
                className: WRAPPER, 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);
        Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["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 });
            handle.appendChild(rippleSpan);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(rippleSpan, { duration: 400, isCenterRipple: true });
        }
        if (this.enableRtl) {
            wrapper.classList.add(RTL);
        }
        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
     */
    Switch.prototype.onPropertyChanged = function (newProp, oldProp) {
        var wrapper = this.getWrapper();
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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);
                        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);
                    }
                    else {
                        wrapper.classList.remove(RTL);
                    }
                    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
     */
    Switch.prototype.preRender = function () {
        var element = this.element;
        this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
        this.tagName = this.element.tagName;
        Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["preRender"])(this, 'EJS-SWITCH', WRAPPER, element, this.getModuleName());
    };
    /**
     * Initialize control rendering.
     * @private
     */
    Switch.prototype.render = function () {
        this.initWrapper();
        this.initialize();
        if (!this.disabled) {
            this.wireEvents();
        }
    };
    Switch.prototype.rippleHandler = function (e) {
        var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];
        Object(_common_common__WEBPACK_IMPORTED_MODULE_1__["rippleMouseHandler"])(e, rippleSpan);
        if (e.type === 'mousedown' && e.currentTarget.classList.contains('e-switch-wrapper') && e.which === 1) {
            this.isDrag = true;
            this.isKeyPressed = false;
        }
    };
    Switch.prototype.rippleTouchHandler = function (eventType) {
        var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];
        if (rippleSpan) {
            var event_1 = document.createEvent('MouseEvents');
            event_1.initEvent(eventType, false, true);
            rippleSpan.dispatchEvent(event_1);
        }
    };
    Switch.prototype.setDisabled = function () {
        var wrapper = this.getWrapper();
        this.element.disabled = true;
        wrapper.classList.add(DISABLED);
        wrapper.setAttribute('aria-disabled', 'true');
    };
    Switch.prototype.setLabel = function (onText, offText) {
        var wrapper = this.getWrapper();
        if (onText) {
            wrapper.querySelector('.e-switch-on').textContent = onText;
        }
        if (offText) {
            wrapper.querySelector('.e-switch-off').textContent = offText;
        }
    };
    Switch.prototype.switchFocusHandler = function () {
        this.isKeyPressed = true;
    };
    Switch.prototype.switchMouseUp = function (e) {
        var target = e.target;
        var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[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();
            }
        }
    };
    Switch.prototype.formResetHandler = function () {
        this.checked = this.initialSwitchCheckedValue;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, { 'checked': this.initialSwitchCheckedValue.toString() });
    };
    /**
     * Toggle the Switch component state into checked/unchecked.
     * @returns void
     */
    Switch.prototype.toggle = function () {
        this.clickHandler();
    };
    Switch.prototype.wireEvents = function () {
        var wrapper = this.getWrapper();
        var handle = wrapper.querySelector('.e-switch-handle');
        this.delegateMouseUpHandler = this.switchMouseUp.bind(this);
        this.delegateKeyDownHandler = 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(document, 'mouseup', this.delegateMouseUpHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'keydown', this.delegateKeyDownHandler, 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);
        }
    };
    Switch.prototype.unWireEvents = function () {
        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(document, 'mouseup', this.delegateMouseUpHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'keydown', this.delegateKeyDownHandler);
        _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
     */
    Switch.prototype.click = function () {
        this.element.click();
    };
    /**
     * Sets the focus to Switch
     * its native method
     * @public
     */
    Switch.prototype.focusIn = function () {
        this.element.focus();
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Switch.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Switch.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Switch.prototype, "checked", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Switch.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Switch.prototype, "disabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Switch.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Switch.prototype, "onLabel", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Switch.prototype, "offLabel", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Switch.prototype, "value", void 0);
    Switch = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Switch);
    return Switch;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/index.js":
/*!*********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/index.js ***!
  \*********************************************************/
/*! exports provided: CalendarBase, Calendar, Islamic, DatePicker, Presets, DateRangePicker, TimePickerBase, TimePicker, DateTimePicker */
/***/ (function(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-calendars/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CalendarBase", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CalendarBase"]; });

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

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

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

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

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

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

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

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

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/calendar/calendar.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/calendar/calendar.js ***!
  \*************************************************************************/
/*! exports provided: CalendarBase, Calendar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CalendarBase", function() { return CalendarBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Calendar", function() { return Calendar; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};







//class constant defination.
var OTHERMONTH = 'e-other-month';
var OTHERDECADE = 'e-other-year';
var ROOT = 'e-calendar';
var DEVICE = 'e-device';
var HEADER = 'e-header';
var RTL = 'e-rtl';
var CONTENT = 'e-content';
var YEAR = 'e-year';
var MONTH = 'e-month';
var DECADE = 'e-decade';
var ICON = 'e-icons';
var PREVICON = 'e-prev';
var NEXTICON = 'e-next';
var PREVSPAN = 'e-date-icon-prev';
var NEXTSPAN = 'e-date-icon-next ';
var ICONCONTAINER = 'e-icon-container';
var DISABLED = 'e-disabled';
var OVERLAY = 'e-overlay';
var WEEKEND = 'e-weekend';
var WEEKNUMBER = 'e-week-number';
var SELECTED = 'e-selected';
var FOCUSEDDATE = 'e-focused-date';
var OTHERMONTHROW = 'e-month-hide';
var TODAY = 'e-today';
var TITLE = 'e-title';
var LINK = 'e-day';
var CELL = 'e-cell';
var WEEKHEADER = 'e-week-header';
var ZOOMIN = 'e-zoomin';
var FOOTER = 'e-footer-container';
var BTN = 'e-btn';
var FLAT = 'e-flat';
var CSS = 'e-css';
var PRIMARY = 'e-primary';
var DAYHEADERLONG = 'e-calendar-day-header-lg';
var dayMilliSeconds = 86400000;
var minutesMilliSeconds = 60000;
/**
 *
 * @private
 */
var CalendarBase = /** @class */ (function (_super) {
    __extends(CalendarBase, _super);
    /**
     * Initialized new instance of Calendar Class.
     * Constructor for creating the widget
     * @param  {CalendarModel} options?
     * @param  {string|HTMLElement} element?
     */
    function CalendarBase(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.effect = '';
        _this.isPopupClicked = false;
        _this.isDateSelected = true;
        _this.keyConfigs = {
            controlUp: 'ctrl+38',
            controlDown: 'ctrl+40',
            moveDown: 'downarrow',
            moveUp: 'uparrow',
            moveLeft: 'leftarrow',
            moveRight: 'rightarrow',
            select: 'enter',
            home: 'home',
            end: 'end',
            pageUp: 'pageup',
            pageDown: 'pagedown',
            shiftPageUp: 'shift+pageup',
            shiftPageDown: 'shift+pagedown',
            controlHome: 'ctrl+home',
            controlEnd: 'ctrl+end',
            altUpArrow: 'alt+uparrow',
            spacebar: 'space',
            altRightArrow: 'alt+rightarrow',
            altLeftArrow: 'alt+leftarrow'
        };
        return _this;
    }
    /**
     * To Initialize the control rendering.
     * @returns void
     * @private
     */
    CalendarBase.prototype.render = function () {
        this.rangeValidation(this.min, this.max);
        this.calendarEleCopy = this.element.cloneNode(true);
        if (this.calendarMode === 'Islamic') {
            if (+(this.min.setSeconds(0)) === +new Date(1900, 0, 1, 0, 0, 0)) {
                this.min = new Date(1944, 2, 18);
            }
            if (+this.max === +new Date(2099, 11, 31)) {
                this.max = new Date(2069, 10, 16);
            }
        }
        this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.firstDayOfWeek) || this.firstDayOfWeek > 6 || this.firstDayOfWeek < 0) {
            this.setProperties({ firstDayOfWeek: this.globalize.getFirstDayOfWeek() }, true);
        }
        this.todayDisabled = false;
        this.todayDate = new Date(new Date().setHours(0, 0, 0, 0));
        if (this.getModuleName() === 'calendar') {
            this.element.classList.add(ROOT);
            if (this.enableRtl) {
                this.element.classList.add(RTL);
            }
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                this.element.classList.add(DEVICE);
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
                'data-role': 'calendar'
            });
            this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
            this.element.setAttribute('tabindex', this.tabIndex);
        }
        else {
            this.calendarElement = this.createElement('div');
            this.calendarElement.classList.add(ROOT);
            if (this.enableRtl) {
                this.calendarElement.classList.add(RTL);
            }
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                this.calendarElement.classList.add(DEVICE);
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.calendarElement, {
                'role': 'calendar'
            });
        }
        this.createHeader();
        this.createContent();
        this.wireEvents();
    };
    CalendarBase.prototype.rangeValidation = function (min, max) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(min)) {
            this.setProperties({ min: new Date(1900, 0, 1) }, true);
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(max)) {
            this.setProperties({ max: new Date(2099, 11, 31) }, true);
        }
    };
    CalendarBase.prototype.validateDate = function (value) {
        this.setProperties({ min: this.checkDateValue(new Date(this.checkValue(this.min))) }, true);
        this.setProperties({ max: this.checkDateValue(new Date(this.checkValue(this.max))) }, true);
        this.currentDate = this.currentDate ? this.currentDate : new Date(new Date().setHours(0, 0, 0, 0));
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && this.min <= this.max && value >= this.min && value <= this.max) {
            this.currentDate = new Date(this.checkValue(value));
        }
    };
    CalendarBase.prototype.setOverlayIndex = function (popupWrapper, popupElement, modal, isDevice) {
        if (isDevice && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(popupElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(modal) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(popupWrapper)) {
            var index = parseInt(popupElement.style.zIndex, 10) ? parseInt(popupElement.style.zIndex, 10) : 1000;
            modal.style.zIndex = (index - 1).toString();
            popupWrapper.style.zIndex = index.toString();
        }
    };
    CalendarBase.prototype.minMaxUpdate = function (value) {
        if (!(+this.min <= +this.max)) {
            this.setProperties({ min: this.min }, true);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], OVERLAY);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], OVERLAY);
        }
        this.min = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.min) || !(+this.min) ? this.min = new Date(1900, 0, 1) : this.min;
        this.max = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.max) || !(+this.max) ? this.max = new Date(2099, 11, 31) : this.max;
        if (+this.min <= +this.max && value && +value <= +this.max && +value >= +this.min) {
            this.currentDate = new Date(this.checkValue(value));
        }
        else {
            if (+this.min <= +this.max && !value && +this.currentDate > +this.max) {
                this.currentDate = new Date(this.checkValue(this.max));
            }
            else {
                if (+this.currentDate < +this.min) {
                    this.currentDate = new Date(this.checkValue(this.min));
                }
            }
        }
    };
    CalendarBase.prototype.createHeader = function () {
        var ariaPrevAttrs = {
            'aria-disabled': 'false',
            'aria-label': 'previous month'
        };
        var ariaNextAttrs = {
            'aria-disabled': 'false',
            'aria-label': 'next month'
        };
        var ariaTitleAttrs = {
            'aria-atomic': 'true', 'aria-live': 'assertive', 'aria-label': 'title'
        };
        this.headerElement = this.createElement('div', { className: HEADER });
        var iconContainer = this.createElement('div', { className: ICONCONTAINER });
        this.previousIcon = this.createElement('button', { className: '' + PREVICON, attrs: { type: 'button' } });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.previousIcon, {
            duration: 400,
            selector: '.e-prev',
            isCenterRipple: true
        });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.previousIcon, ariaPrevAttrs);
        this.nextIcon = this.createElement('button', { className: '' + NEXTICON, attrs: { type: 'button' } });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.nextIcon, {
            selector: '.e-next',
            duration: 400,
            isCenterRipple: true
        });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.nextIcon, ariaNextAttrs);
        this.headerTitleElement = this.createElement('div', { className: '' + LINK + ' ' + TITLE });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.headerTitleElement, ariaTitleAttrs);
        this.headerElement.appendChild(this.headerTitleElement);
        this.previousIcon.appendChild(this.createElement('span', { className: '' + PREVSPAN + ' ' + ICON }));
        this.nextIcon.appendChild(this.createElement('span', { className: '' + NEXTSPAN + ' ' + ICON }));
        iconContainer.appendChild(this.previousIcon);
        iconContainer.appendChild(this.nextIcon);
        this.headerElement.appendChild(iconContainer);
        if (this.getModuleName() === 'calendar') {
            this.element.appendChild(this.headerElement);
        }
        else {
            this.calendarElement.appendChild(this.headerElement);
        }
        this.adjustLongHeaderSize();
    };
    CalendarBase.prototype.createContent = function () {
        this.contentElement = this.createElement('div', { className: CONTENT });
        this.table = this.createElement('table', { attrs: { tabIndex: '0', 'role': 'grid', 'aria-activedescendant': '' } });
        if (this.getModuleName() === 'calendar') {
            this.element.appendChild(this.contentElement);
        }
        else {
            this.calendarElement.appendChild(this.contentElement);
        }
        this.contentElement.appendChild(this.table);
        this.createContentHeader();
        this.createContentBody();
        if (this.showTodayButton) {
            this.createContentFooter();
        }
    };
    CalendarBase.prototype.getCultureValues = function () {
        var culShortNames = [];
        var cldrObj;
        var dayFormat = 'days.stand-alone.' + this.dayHeaderFormat.toLowerCase();
        if (this.locale === 'en' || this.locale === 'en-US') {
            cldrObj = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(dayFormat, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getDefaultDateObject"])()));
        }
        else {
            cldrObj = (this.getCultureObjects(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["cldrData"], '' + this.locale));
        }
        for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
            var obj = _a[_i];
            culShortNames.push(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(obj, cldrObj));
        }
        return culShortNames;
    };
    CalendarBase.prototype.createContentHeader = function () {
        if (this.getModuleName() === 'calendar') {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelectorAll('.e-content .e-week-header')[0])) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.element.querySelectorAll('.e-content .e-week-header')[0]);
            }
        }
        else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.calendarElement.querySelectorAll('.e-content .e-week-header')[0])) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.calendarElement.querySelectorAll('.e-content .e-week-header')[0]);
            }
        }
        var daysCount = 6;
        var html = '';
        var shortNames;
        if (this.firstDayOfWeek > 6 || this.firstDayOfWeek < 0) {
            this.setProperties({ firstDayOfWeek: 0 }, true);
        }
        this.tableHeadElement = this.createElement('thead', { className: WEEKHEADER });
        if (this.weekNumber) {
            html += '<th class="e-week-number"></th>';
            if (this.getModuleName() === 'calendar') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], '' + WEEKNUMBER);
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.calendarElement], '' + WEEKNUMBER);
            }
        }
        shortNames = this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek);
        for (var days = 0; days <= daysCount; days++) {
            html += '<th  class="">' + shortNames[days] + '</th>';
        }
        html = '<tr>' + html + '</tr>';
        this.tableHeadElement.innerHTML = html;
        this.table.appendChild(this.tableHeadElement);
    };
    CalendarBase.prototype.createContentBody = function () {
        if (this.getModuleName() === 'calendar') {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelectorAll('.e-content tbody')[0])) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.element.querySelectorAll('.e-content tbody')[0]);
            }
        }
        else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.calendarElement.querySelectorAll('.e-content tbody')[0])) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.calendarElement.querySelectorAll('.e-content tbody')[0]);
            }
        }
        switch (this.start) {
            case 'Year':
                this.renderYears();
                break;
            case 'Decade':
                this.renderDecades();
                break;
            default:
                this.renderMonths();
        }
    };
    CalendarBase.prototype.updateFooter = function () {
        this.todayElement.textContent = this.l10.getConstant('today');
    };
    CalendarBase.prototype.createContentFooter = function () {
        if (this.showTodayButton) {
            var minimum = new Date(+this.min);
            var maximum = new Date(+this.max);
            var l10nLocale = { today: 'Today' };
            this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
            this.l10 = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName(), l10nLocale, this.locale);
            this.todayElement = this.createElement('button');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.todayElement);
            this.updateFooter();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.todayElement], [BTN, TODAY, FLAT, PRIMARY, CSS]);
            if ((!(+new Date(minimum.setHours(0, 0, 0, 0)) <= +this.todayDate &&
                +this.todayDate <= +new Date(maximum.setHours(0, 0, 0, 0)))) || (this.todayDisabled)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.todayElement], DISABLED);
            }
            this.footer = this.createElement('div', { className: FOOTER });
            this.footer.appendChild(this.todayElement);
            if (this.getModuleName() === 'calendar') {
                this.element.appendChild(this.footer);
            }
            if (this.getModuleName() === 'datepicker') {
                this.calendarElement.appendChild(this.footer);
            }
            if (this.getModuleName() === 'datetimepicker') {
                this.calendarElement.appendChild(this.footer);
            }
            if (!this.todayElement.classList.contains(DISABLED)) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.todayElement, 'click', this.todayButtonClick, this);
            }
        }
    };
    CalendarBase.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.headerTitleElement, 'click', this.navigateTitle, this);
        if (this.getModuleName() === 'calendar') {
            this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.element, {
                eventName: 'keydown',
                keyAction: this.keyActionHandle.bind(this),
                keyConfigs: this.keyConfigs
            });
        }
        else {
            this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.calendarElement, {
                eventName: 'keydown',
                keyAction: this.keyActionHandle.bind(this),
                keyConfigs: this.keyConfigs
            });
        }
    };
    CalendarBase.prototype.todayButtonClick = function (value) {
        if (this.showTodayButton) {
            if (this.currentView() === this.depth) {
                this.effect = '';
            }
            else {
                this.effect = 'e-zoomin';
            }
            if (this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {
                this.navigateTo(this.depth, new Date(this.checkValue(value)));
            }
            else {
                this.navigateTo('Month', new Date(this.checkValue(value)));
            }
        }
    };
    // tslint:disable-next-line:max-func-body-length
    CalendarBase.prototype.keyActionHandle = function (e, value, multiSelection) {
        var view = this.getViewNumber(this.currentView());
        var focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');
        var selectedDate;
        if (multiSelection) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(focusedDate) && +value === parseInt(focusedDate.getAttribute('id').split('_')[0], 10)) {
                selectedDate = focusedDate;
            }
            else {
                selectedDate = this.tableBodyElement.querySelector('tr td.e-selected');
            }
        }
        else {
            selectedDate = this.tableBodyElement.querySelector('tr td.e-selected');
        }
        var depthValue = this.getViewNumber(this.depth);
        var levelRestrict = (view === depthValue && this.getViewNumber(this.start) >= depthValue);
        this.effect = '';
        switch (e.action) {
            case 'moveLeft':
                this.KeyboardNavigate(-1, view, e, this.max, this.min);
                e.preventDefault();
                break;
            case 'moveRight':
                this.KeyboardNavigate(1, view, e, this.max, this.min);
                e.preventDefault();
                break;
            case 'moveUp':
                if (view === 0) {
                    this.KeyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.
                }
                else {
                    this.KeyboardNavigate(-4, view, e, this.max, this.min); // move the current year to the previous four days.
                }
                e.preventDefault();
                break;
            case 'moveDown':
                if (view === 0) {
                    this.KeyboardNavigate(7, view, e, this.max, this.min);
                }
                else {
                    this.KeyboardNavigate(4, view, e, this.max, this.min);
                }
                e.preventDefault();
                break;
            case 'select':
                if (e.target === this.todayElement) {
                    this.todayButtonClick(value);
                }
                else {
                    var element = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(focusedDate) ? focusedDate : selectedDate;
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element) && !element.classList.contains(DISABLED)) {
                        if (levelRestrict) {
                            var d = new Date(parseInt('' + (element).id, 0));
                            this.selectDate(e, d, (element));
                        }
                        else {
                            this.contentClick(null, --view, (element), value);
                        }
                    }
                }
                break;
            case 'controlUp':
                this.title();
                e.preventDefault();
                break;
            case 'controlDown':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(focusedDate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedDate) && !levelRestrict) {
                    this.contentClick(null, --view, (focusedDate || selectedDate), value);
                }
                e.preventDefault();
                break;
            case 'home':
                this.currentDate = this.firstDay(this.currentDate);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                (view === 0) ? this.renderMonths(e) : ((view === 1) ? this.renderYears(e) : this.renderDecades(e));
                e.preventDefault();
                break;
            case 'end':
                this.currentDate = this.lastDay(this.currentDate, view);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                (view === 0) ? this.renderMonths(e) : ((view === 1) ? this.renderYears(e) : this.renderDecades(e));
                e.preventDefault();
                break;
            case 'pageUp':
                this.addMonths(this.currentDate, -1);
                this.navigateTo('Month', this.currentDate);
                e.preventDefault();
                break;
            case 'pageDown':
                this.addMonths(this.currentDate, 1);
                this.navigateTo('Month', this.currentDate);
                e.preventDefault();
                break;
            case 'shiftPageUp':
                this.addYears(this.currentDate, -1);
                this.navigateTo('Month', this.currentDate);
                e.preventDefault();
                break;
            case 'shiftPageDown':
                this.addYears(this.currentDate, 1);
                this.navigateTo('Month', this.currentDate);
                e.preventDefault();
                break;
            case 'controlHome':
                this.navigateTo('Month', new Date(this.currentDate.getFullYear(), 0, 1));
                e.preventDefault();
                break;
            case 'controlEnd':
                this.navigateTo('Month', new Date(this.currentDate.getFullYear(), 11, 31));
                e.preventDefault();
                break;
        }
        if (this.getModuleName() === 'calendar') {
            this.table.focus();
        }
    };
    CalendarBase.prototype.KeyboardNavigate = function (number, currentView, e, max, min) {
        var date = new Date(this.checkValue(this.currentDate));
        switch (currentView) {
            case 2:
                this.addYears(this.currentDate, number);
                if (this.isMonthYearRange(this.currentDate)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                    this.renderDecades(e);
                }
                else {
                    this.currentDate = date;
                }
                break;
            case 1:
                this.addMonths(this.currentDate, number);
                if (this.calendarMode === 'Gregorian') {
                    if (this.isMonthYearRange(this.currentDate)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                        this.renderYears(e);
                    }
                    else {
                        this.currentDate = date;
                    }
                }
                else {
                    if (this.isMonthYearRange(this.currentDate)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                        this.renderYears(e);
                    }
                    else {
                        this.currentDate = date;
                    }
                }
                break;
            case 0:
                this.addDay(this.currentDate, number, e, max, min);
                if (this.isMinMaxRange(this.currentDate)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                    this.renderMonths(e);
                }
                else {
                    this.currentDate = date;
                }
                break;
        }
    };
    /**
     * Initialize the event handler
     * @private
     */
    CalendarBase.prototype.preRender = function (value) {
        var _this = this;
        this.navigatePreviousHandler = this.navigatePrevious.bind(this);
        this.navigateNextHandler = this.navigateNext.bind(this);
        this.navigateHandler = function (e) {
            _this.triggerNavigate(e);
        };
    };
    ;
    CalendarBase.prototype.minMaxDate = function (localDate) {
        var currentDate = new Date(new Date(+localDate).setHours(0, 0, 0, 0));
        var minDate = new Date(new Date(+this.min).setHours(0, 0, 0, 0));
        var maxDate = new Date(new Date(+this.max).setHours(0, 0, 0, 0));
        if (+currentDate === +minDate || +currentDate === +maxDate) {
            if (+localDate < +this.min) {
                localDate = new Date(+this.min);
            }
            if (+localDate > +this.max) {
                localDate = new Date(+this.max);
            }
        }
        return localDate;
    };
    CalendarBase.prototype.renderMonths = function (e, value) {
        var numCells = this.weekNumber ? 8 : 7;
        var tdEles;
        if (this.calendarMode === 'Gregorian') {
            tdEles = this.renderDays(this.currentDate, e, value);
        }
        else {
            tdEles = this.islamicModule.islamicRenderDays(this.currentDate, value);
        }
        this.createContentHeader();
        if (this.calendarMode === 'Gregorian') {
            this.renderTemplate(tdEles, numCells, MONTH, e, value);
        }
        else {
            this.islamicModule.islamicRenderTemplate(tdEles, numCells, MONTH, e, value);
        }
    };
    // tslint:disable-next-line:max-func-body-length
    CalendarBase.prototype.renderDays = function (currentDate, e, value, multiSelection, values) {
        var tdEles = [];
        var cellsCount = 42;
        var localDate = new Date(this.checkValue(currentDate));
        var minMaxDate;
        var numCells = this.weekNumber ? 8 : 7;
        // 8 and 7 denotes the number of columns to be specified.
        var currentMonth = localDate.getMonth();
        this.titleUpdate(currentDate, 'days');
        var d = localDate;
        localDate = new Date(d.getFullYear(), d.getMonth(), 0, d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds());
        while (localDate.getDay() !== this.firstDayOfWeek) {
            this.setStartDate(localDate, -1 * dayMilliSeconds);
        }
        for (var day = 0; day < cellsCount; ++day) {
            var weekEle = this.createElement('td', { className: CELL });
            var weekAnchor = this.createElement('span');
            if (day % 7 === 0 && this.weekNumber) {
                weekAnchor.textContent = '' + this.getWeek(localDate);
                weekEle.appendChild(weekAnchor);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([weekEle], '' + WEEKNUMBER);
                tdEles.push(weekEle);
            }
            minMaxDate = new Date(+localDate);
            localDate = this.minMaxDate(localDate);
            var dateFormatOptions = { type: 'dateTime', skeleton: 'full' };
            var date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
            var tdEle = this.dayCell(localDate);
            var title = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'full' });
            var dayLink = this.createElement('span');
            dayLink.textContent = this.globalize.formatDate(localDate, { format: 'd', type: 'date', skeleton: 'yMd' });
            var disabled = (this.min > localDate) || (this.max < localDate);
            if (disabled) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], DISABLED);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], OVERLAY);
            }
            else {
                dayLink.setAttribute('title', '' + title);
            }
            if (currentMonth !== localDate.getMonth()) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], OTHERMONTH);
            }
            if (localDate.getDay() === 0 || localDate.getDay() === 6) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], WEEKEND);
            }
            tdEle.appendChild(dayLink);
            this.renderDayCellArgs = {
                date: localDate,
                isDisabled: false,
                element: tdEle,
                isOutOfRange: disabled
            };
            var argument = this.renderDayCellArgs;
            this.renderDayCellEvent(argument);
            if (argument.isDisabled) {
                if (multiSelection) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(values) && values.length > 0) {
                        for (var index = 0; index < values.length; index++) {
                            var localDateString = +new Date(this.globalize.formatDate(argument.date, { type: 'date', skeleton: 'yMd' }));
                            var tempDateString = +new Date(this.globalize.formatDate(values[index], { type: 'date', skeleton: 'yMd' }));
                            if (localDateString === tempDateString) {
                                values.splice(index, 1);
                                index = -1;
                            }
                        }
                    }
                }
                else if (value && +value === +argument.date) {
                    this.setProperties({ value: null }, true);
                }
            }
            if (this.renderDayCellArgs.isDisabled && !tdEle.classList.contains(SELECTED)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], DISABLED);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], OVERLAY);
                if (+this.renderDayCellArgs.date === +this.todayDate) {
                    this.todayDisabled = true;
                }
            }
            var otherMnthBool = tdEle.classList.contains(OTHERMONTH);
            var disabledCls = tdEle.classList.contains(DISABLED);
            if (!disabledCls) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(tdEle, 'click', this.clickHandler, this);
            }
            // to set the value as null while setting the disabled date onProperty change.
            // if (args.isDisabled && +this.value === +args.date) {
            //     this.setProperties({ value: null }, true);
            // }
            if (multiSelection && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(values) && !otherMnthBool && !disabledCls) {
                for (var tempValue = 0; tempValue < values.length; tempValue++) {
                    var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
                    var formatOptions = { type: 'date', skeleton: 'short', calendar: type };
                    var localDateString = this.globalize.formatDate(localDate, formatOptions);
                    var tempDateString = this.globalize.formatDate(values[tempValue], formatOptions);
                    if ((localDateString === tempDateString && this.getDateVal(localDate, values[tempValue]))
                        || (this.getDateVal(localDate, value))) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], SELECTED);
                    }
                    else {
                        this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
                    }
                }
                if (values.length <= 0) {
                    this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
                }
            }
            else if (!otherMnthBool && !disabledCls && this.getDateVal(localDate, value)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], SELECTED);
            }
            else {
                this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
            }
            if (date.getMonth() === new Date().getMonth() && date.getDate() === new Date().getDate()) {
                if (date.getFullYear() === new Date().getFullYear()) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], TODAY);
                }
            }
            tdEles.push(this.renderDayCellArgs.element);
            localDate = new Date(+minMaxDate);
            this.addDay(localDate, 1, null, this.max, this.min);
        }
        return tdEles;
    };
    CalendarBase.prototype.updateFocus = function (otherMonth, disabled, localDate, tableElement, currentDate) {
        if (currentDate.getDate() === localDate.getDate() && !otherMonth && !disabled) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tableElement], FOCUSEDDATE);
        }
        else {
            if (currentDate >= this.max && parseInt(tableElement.id, 0) === +this.max && !otherMonth && !disabled) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tableElement], FOCUSEDDATE);
            }
            if (currentDate <= this.min && parseInt(tableElement.id, 0) === +this.min && !otherMonth && !disabled) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tableElement], FOCUSEDDATE);
            }
        }
    };
    CalendarBase.prototype.renderYears = function (e, value) {
        this.removeTableHeadElement();
        var numCells = 4;
        var days;
        var tdEles = [];
        var valueUtil = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value);
        var curDate = new Date(this.checkValue(this.currentDate));
        var mon = curDate.getMonth();
        var yr = curDate.getFullYear();
        var localDate = curDate;
        var curYrs = localDate.getFullYear();
        var minYr = new Date(this.checkValue(this.min)).getFullYear();
        var minMonth = new Date(this.checkValue(this.min)).getMonth();
        var maxYr = new Date(this.checkValue(this.max)).getFullYear();
        var maxMonth = new Date(this.checkValue(this.max)).getMonth();
        localDate.setMonth(0);
        this.titleUpdate(this.currentDate, 'months');
        var disabled = (this.min > localDate) || (this.max < localDate);
        localDate.setDate(1);
        for (var month = 0; month < 12; ++month) {
            var tdEle = this.dayCell(localDate);
            var dayLink = this.createElement('span');
            var localMonth = (value && (value).getMonth() === localDate.getMonth());
            var select = (value && (value).getFullYear() === yr && localMonth);
            dayLink.textContent = this.globalize.formatDate(localDate, { type: 'dateTime', skeleton: 'MMM' });
            if ((this.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], DISABLED);
            }
            else if (!valueUtil && select) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], SELECTED);
            }
            else {
                if (localDate.getMonth() === mon && this.currentDate.getMonth() === mon) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], FOCUSEDDATE);
                }
            }
            localDate.setDate(1);
            localDate.setMonth(localDate.getMonth() + 1);
            if (!tdEle.classList.contains(DISABLED)) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(tdEle, 'click', this.clickHandler, this);
            }
            tdEle.appendChild(dayLink);
            tdEles.push(tdEle);
        }
        this.renderTemplate(tdEles, numCells, YEAR, e, value);
    };
    CalendarBase.prototype.renderDecades = function (e, value) {
        this.removeTableHeadElement();
        var numCells = 4;
        var yearCell = 12;
        var tdEles = [];
        var localDate = new Date(this.checkValue(this.currentDate));
        localDate.setMonth(0);
        localDate.setDate(1);
        var localYr = localDate.getFullYear();
        var startYr = new Date(localDate.setFullYear((localYr - localYr % 10)));
        var endYr = new Date(localDate.setFullYear((localYr - localYr % 10 + (10 - 1))));
        var startFullYr = startYr.getFullYear();
        var endFullYr = endYr.getFullYear();
        var startHdrYr = this.globalize.formatDate(startYr, { type: 'dateTime', skeleton: 'y' });
        var endHdrYr = this.globalize.formatDate(endYr, { type: 'dateTime', skeleton: 'y' });
        this.headerTitleElement.textContent = startHdrYr + ' - ' + (endHdrYr);
        var start = new Date(localYr - (localYr % 10) - 1, 0, 1);
        var startYear = start.getFullYear();
        for (var rowIterator = 0; rowIterator < yearCell; ++rowIterator) {
            var year = startYear + rowIterator;
            localDate.setFullYear(year);
            var tdEle = this.dayCell(localDate);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(tdEle, { 'role': 'gridcell' });
            var dayLink = this.createElement('span');
            dayLink.textContent = this.globalize.formatDate(localDate, { type: 'dateTime', skeleton: 'y' });
            if ((year < startFullYr) || (year > endFullYr)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], OTHERDECADE);
                if (year < new Date(this.checkValue(this.min)).getFullYear() ||
                    year > new Date(this.checkValue(this.max)).getFullYear()) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], DISABLED);
                }
            }
            else if (year < new Date(this.checkValue(this.min)).getFullYear() ||
                year > new Date(this.checkValue(this.max)).getFullYear()) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], DISABLED);
            }
            else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && localDate.getFullYear() === (value).getFullYear()) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], SELECTED);
            }
            else {
                if (localDate.getFullYear() === this.currentDate.getFullYear() && !tdEle.classList.contains(DISABLED)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], FOCUSEDDATE);
                }
            }
            if (!tdEle.classList.contains(DISABLED)) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(tdEle, 'click', this.clickHandler, this);
            }
            tdEle.appendChild(dayLink);
            tdEles.push(tdEle);
        }
        this.renderTemplate(tdEles, numCells, 'e-decade', e, value);
    };
    CalendarBase.prototype.dayCell = function (localDate) {
        var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
        var dateFormatOptions = { skeleton: 'full', type: 'dateTime', calendar: type };
        var date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
        var value = date.valueOf();
        var attrs = {
            className: CELL, attrs: { 'id': '' + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('' + value), 'aria-selected': 'false', 'role': 'gridcell' }
        };
        return this.createElement('td', attrs);
    };
    CalendarBase.prototype.firstDay = function (date) {
        var collection = this.currentView() !== 'Decade' ? this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERMONTH + '') :
            this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERDECADE + '');
        if (collection.length) {
            for (var i = 0; i < collection.length; i++) {
                if (!collection[i].classList.contains(DISABLED)) {
                    date = new Date(parseInt(collection[i].id, 0));
                    break;
                }
            }
        }
        return date;
    };
    CalendarBase.prototype.lastDay = function (date, view) {
        var lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0);
        if (view !== 2) {
            var timeOffset = Math.abs(lastDate.getTimezoneOffset() - this.firstDay(date).getTimezoneOffset());
            if (timeOffset) {
                lastDate.setHours(this.firstDay(date).getHours() + (timeOffset / 60));
            }
            return this.findLastDay(lastDate);
        }
        else {
            return this.findLastDay(this.firstDay(lastDate));
        }
    };
    ;
    CalendarBase.prototype.checkDateValue = function (value) {
        return (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && value instanceof Date && !isNaN(+value)) ? value : null;
    };
    CalendarBase.prototype.findLastDay = function (date) {
        var collection = this.currentView() === 'Decade' ? this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERDECADE + '') :
            this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERMONTH + '');
        if (collection.length) {
            for (var i = collection.length - 1; i >= 0; i--) {
                if (!collection[i].classList.contains(DISABLED)) {
                    date = new Date(parseInt(collection[i].id, 0));
                    break;
                }
            }
        }
        return date;
    };
    CalendarBase.prototype.removeTableHeadElement = function () {
        if (this.getModuleName() === 'calendar') {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelectorAll('.e-content table thead')[0])) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableHeadElement);
            }
        }
        else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.calendarElement.querySelectorAll('.e-content table thead')[0])) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableHeadElement);
            }
        }
    };
    CalendarBase.prototype.renderTemplate = function (elements, count, classNm, e, value) {
        var view = this.getViewNumber(this.currentView());
        var trEle;
        this.tableBodyElement = this.createElement('tbody');
        this.table.appendChild(this.tableBodyElement);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.contentElement, this.headerElement], [MONTH, DECADE, YEAR]);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.contentElement, this.headerElement], [classNm]);
        var weekNumCell = 41;
        var numberCell = 35;
        var otherMonthCell = 6;
        var row = count;
        var rowIterator = 0;
        for (var dayCell = 0; dayCell < elements.length / count; ++dayCell) {
            trEle = this.createElement('tr', { attrs: { 'role': 'row' } });
            for (rowIterator = 0 + rowIterator; rowIterator < row; rowIterator++) {
                if (!elements[rowIterator].classList.contains('e-week-number') && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(elements[rowIterator].children[0])) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([elements[rowIterator].children[0]], [LINK]);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(elements[rowIterator].children[0], {
                        duration: 600,
                        isCenterRipple: true
                    });
                }
                trEle.appendChild(elements[rowIterator]);
                if (this.weekNumber && rowIterator === otherMonthCell + 1 && elements[otherMonthCell + 1].classList.contains(OTHERMONTH)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trEle], OTHERMONTHROW);
                }
                if (!this.weekNumber && rowIterator === otherMonthCell && elements[otherMonthCell].classList.contains(OTHERMONTH)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trEle], OTHERMONTHROW);
                }
                if (this.weekNumber) {
                    if (rowIterator === weekNumCell && elements[weekNumCell].classList.contains(OTHERMONTH)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trEle], OTHERMONTHROW);
                    }
                }
                else {
                    if (rowIterator === numberCell && elements[numberCell].classList.contains(OTHERMONTH)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trEle], OTHERMONTHROW);
                    }
                }
            }
            row = row + count;
            rowIterator = rowIterator + 0;
            this.tableBodyElement.appendChild(trEle);
        }
        this.table.querySelector('tbody').className = this.effect;
        if (this.calendarMode === 'Gregorian') {
            this.iconHandler();
        }
        else {
            this.islamicModule.islamicIconHandler();
        }
        if (view !== this.getViewNumber(this.currentView()) || (view === 0 && view !== this.getViewNumber(this.currentView()))) {
            this.navigateHandler(e);
        }
        this.setAriaActiveDescendant();
    };
    CalendarBase.prototype.clickHandler = function (e, value) {
        this.clickEventEmitter(e);
        var eve = e.currentTarget;
        var view = this.getViewNumber(this.currentView());
        if (eve.classList.contains(OTHERMONTH)) {
            this.contentClick(e, 0, null, value);
        }
        else if (view === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {
            this.contentClick(e, 1, null, value);
        }
        else if (2 === view) {
            this.contentClick(e, 1, null, value);
        }
        else if (!eve.classList.contains(OTHERMONTH) && view === 0) {
            this.selectDate(e, this.getIdValue(e, null), null);
        }
        else {
            this.contentClick(e, 0, eve, value);
        }
        if (this.getModuleName() === 'calendar') {
            this.table.focus();
        }
    };
    // Content click event handler required for extended components
    CalendarBase.prototype.clickEventEmitter = function (e) {
        e.preventDefault();
    };
    CalendarBase.prototype.contentClick = function (e, view, element, value) {
        var currentView = this.getViewNumber(this.currentView());
        var d = this.getIdValue(e, element);
        switch (view) {
            case 0:
                if (currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                    this.currentDate = d;
                    this.effect = ZOOMIN;
                    this.renderMonths(e);
                }
                else {
                    if (this.calendarMode === 'Gregorian') {
                        this.currentDate.setMonth(d.getMonth());
                        if (d.getMonth() > 0 && this.currentDate.getMonth() !== d.getMonth()) {
                            this.currentDate.setDate(0);
                        }
                        this.currentDate.setFullYear(d.getFullYear());
                    }
                    else {
                        this.currentDate = d;
                    }
                    this.effect = ZOOMIN;
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                    this.renderMonths(e);
                }
                break;
            case 1:
                if (currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {
                    this.selectDate(e, d, null);
                }
                else {
                    if (this.calendarMode === 'Gregorian') {
                        this.currentDate.setFullYear(d.getFullYear());
                    }
                    else {
                        var islamicDate = this.islamicModule.getIslamicDate(d);
                        this.currentDate = this.islamicModule.toGregorian(islamicDate.year, islamicDate.month, 1);
                    }
                    this.effect = ZOOMIN;
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                    this.renderYears(e);
                }
        }
    };
    CalendarBase.prototype.switchView = function (view, e, multiSelection) {
        switch (view) {
            case 0:
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                this.renderMonths(e);
                if (multiSelection && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0])) {
                    this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0].classList.remove(FOCUSEDDATE);
                }
                break;
            case 1:
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                this.renderYears(e);
                break;
            case 2:
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                this.renderDecades(e);
        }
    };
    /**
     * To get component name
     * @private
     */
    CalendarBase.prototype.getModuleName = function () {
        return 'calendar';
    };
    CalendarBase.prototype.requiredModules = function () {
        var modules = [];
        if (this) {
            modules.push({ args: [this], member: 'islamic' });
        }
        return modules;
    };
    /**
     * Gets the properties to be maintained upon browser refresh.
     * @returns string
     */
    CalendarBase.prototype.getPersistData = function () {
        var keyEntity = ['value'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Called internally if any of the property value changed.
     * returns void
     * @private
     */
    CalendarBase.prototype.onPropertyChanged = function (newProp, oldProp, multiSelection, values) {
        this.effect = '';
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'enableRtl':
                    if (newProp.enableRtl) {
                        if (this.getModuleName() === 'calendar') {
                            this.element.classList.add('e-rtl');
                        }
                        else {
                            this.calendarElement.classList.add('e-rtl');
                        }
                    }
                    else {
                        if (this.getModuleName() === 'calendar') {
                            this.element.classList.remove('e-rtl');
                        }
                        else {
                            this.calendarElement.classList.remove('e-rtl');
                        }
                    }
                    break;
                case 'dayHeaderFormat':
                    this.getCultureValues();
                    this.createContentHeader();
                    this.adjustLongHeaderSize();
                    break;
                case 'min':
                case 'max':
                    this.rangeValidation(this.min, this.max);
                    prop === 'min' ? this.setProperties({ min: this.checkDateValue(new Date(this.checkValue(newProp.min))) }, true) :
                        this.setProperties({ max: this.checkDateValue(new Date(this.checkValue(newProp.max))) }, true);
                    this.setProperties({ start: this.currentView() }, true);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
                    this.minMaxUpdate();
                    if (multiSelection) {
                        this.validateValues(multiSelection, values);
                    }
                    this.createContentBody();
                    if ((this.todayDate < this.min || this.max < this.todayDate) && (this.footer) && (this.todayElement)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.todayElement);
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.footer);
                        this.todayElement = this.footer = null;
                        this.createContentFooter();
                    }
                    else {
                        if ((this.footer) && (this.todayElement) && this.todayElement.classList.contains('e-disabled')) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.todayElement], DISABLED);
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.todayElement);
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.footer);
                            this.todayElement = this.footer = null;
                            this.createContentFooter();
                        }
                    }
                    break;
                case 'start':
                case 'depth':
                case 'weekNumber':
                case 'firstDayOfWeek':
                    this.checkView();
                    this.createContentHeader();
                    this.createContentBody();
                    break;
                case 'locale':
                    this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
                    this.createContentHeader();
                    this.createContentBody();
                    this.l10.setLocale(this.locale);
                    this.updateFooter();
                    break;
                case 'showTodayButton':
                    if (newProp.showTodayButton) {
                        this.createContentFooter();
                    }
                    else {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.todayElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.footer)) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.todayElement);
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.footer);
                            this.todayElement = this.footer = undefined;
                        }
                    }
                    this.setProperties({ showTodayButton: newProp.showTodayButton }, true);
                    break;
            }
        }
    };
    /**
     * values property updated with considered disabled dates of the calendar.
     */
    CalendarBase.prototype.validateValues = function (multiSelection, values) {
        if (multiSelection && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(values) && values.length > 0) {
            var copyValues = this.copyValues(values);
            for (var skipIndex = 0; skipIndex < copyValues.length; skipIndex++) {
                var tempValue = copyValues[skipIndex];
                var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
                var tempValueString = void 0;
                if (this.calendarMode === 'Gregorian') {
                    /* tslint:disable-next-line:max-line-length */
                    tempValueString = this.globalize.formatDate(tempValue, { type: 'date', skeleton: 'yMd' });
                }
                else {
                    /* tslint:disable-next-line:max-line-length */
                    tempValueString = this.globalize.formatDate(tempValue, { type: 'dateTime', skeleton: 'full', calendar: 'islamic' });
                }
                var minFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };
                var minStringValue = this.globalize.formatDate(this.min, minFormatOption);
                var minString = minStringValue;
                var maxFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };
                var maxStringValue = this.globalize.formatDate(this.max, maxFormatOption);
                var maxString = maxStringValue;
                if (+new Date(tempValueString) < +new Date(minString) ||
                    +new Date(tempValueString) > +new Date(maxString)) {
                    copyValues.splice(skipIndex, 1);
                    skipIndex = -1;
                }
            }
            this.setProperties({ values: copyValues }, true);
        }
    };
    CalendarBase.prototype.setValueUpdate = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tableBodyElement)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.tableBodyElement);
            this.setProperties({ start: this.currentView() }, true);
            this.createContentBody();
        }
    };
    CalendarBase.prototype.copyValues = function (values) {
        var copyValues = [];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(values) && values.length > 0) {
            for (var index = 0; index < values.length; index++) {
                copyValues.push(new Date(+values[index]));
            }
        }
        return copyValues;
    };
    CalendarBase.prototype.titleUpdate = function (date, view) {
        var globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        var dayFormatOptions;
        var monthFormatOptions;
        var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
        if (this.calendarMode === 'Gregorian') {
            dayFormatOptions = globalize.formatDate(date, { type: 'dateTime', skeleton: 'yMMMM', calendar: type });
            monthFormatOptions = globalize.formatDate(date, { type: 'dateTime', skeleton: 'y', calendar: type });
        }
        else {
            dayFormatOptions = globalize.formatDate(date, { type: 'dateTime', format: 'MMMM y', calendar: type });
            monthFormatOptions = globalize.formatDate(date, { type: 'dateTime', format: 'y', calendar: type });
        }
        switch (view) {
            case 'days':
                this.headerTitleElement.textContent = dayFormatOptions;
                break;
            case 'months':
                this.headerTitleElement.textContent = monthFormatOptions;
        }
    };
    CalendarBase.prototype.setActiveDescendant = function () {
        var id;
        var focusedEle = this.tableBodyElement.querySelector('tr td.e-focused-date');
        var selectedEle = this.tableBodyElement.querySelector('tr td.e-selected');
        var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
        var title = this.globalize.formatDate(this.currentDate, { type: 'dateTime', skeleton: 'full', calendar: type });
        if (selectedEle || focusedEle) {
            (focusedEle || selectedEle).setAttribute('aria-selected', 'true');
            (focusedEle || selectedEle).setAttribute('aria-label', 'The current focused date is ' + '' + title);
            id = (focusedEle || selectedEle).getAttribute('id');
        }
        return id;
    };
    CalendarBase.prototype.iconHandler = function () {
        new Date(this.checkValue(this.currentDate)).setDate(1);
        switch (this.currentView()) {
            case 'Month':
                this.previousIconHandler(this.compareMonth(new Date(this.checkValue(this.currentDate)), this.min) < 1);
                this.nextIconHandler(this.compareMonth(new Date(this.checkValue(this.currentDate)), this.max) > -1);
                break;
            case 'Year':
                this.previousIconHandler(this.compareYear(new Date(this.checkValue(this.currentDate)), this.min) < 1);
                this.nextIconHandler(this.compareYear(new Date(this.checkValue(this.currentDate)), this.max) > -1);
                break;
            case 'Decade':
                this.previousIconHandler(this.compareDecade(new Date(this.checkValue(this.currentDate)), this.min) < 1);
                this.nextIconHandler(this.compareDecade(new Date(this.checkValue(this.currentDate)), this.max) > -1);
        }
    };
    /**
     * Destroys the widget.
     * @returns void
     */
    CalendarBase.prototype.destroy = function () {
        if (this.getModuleName() === 'calendar') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [ROOT]);
        }
        else {
            if (this.calendarElement) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [ROOT]);
            }
        }
        if (this.getModuleName() === 'calendar') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.headerTitleElement, 'click', this.navigateTitle);
            if (this.todayElement) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.todayElement, 'click', this.todayButtonClick);
            }
            this.previousIconHandler(true);
            this.nextIconHandler(true);
            this.keyboardModule.destroy();
            this.element.removeAttribute('data-role');
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.calendarEleCopy.getAttribute('tabindex'))) ?
                this.element.setAttribute('tabindex', this.tabIndex) : this.element.removeAttribute('tabindex');
        }
        this.element.innerHTML = '';
        _super.prototype.destroy.call(this);
    };
    CalendarBase.prototype.title = function (e) {
        var currentView = this.getViewNumber(this.currentView());
        this.effect = ZOOMIN;
        this.switchView(++currentView, e);
    };
    CalendarBase.prototype.getViewNumber = function (stringVal) {
        if (stringVal === 'Month') {
            return 0;
        }
        else if (stringVal === 'Year') {
            return 1;
        }
        else {
            return 2;
        }
    };
    CalendarBase.prototype.navigateTitle = function (e) {
        e.preventDefault();
        this.title(e);
        if (this.getModuleName() === 'calendar') {
            this.table.focus();
        }
    };
    CalendarBase.prototype.previous = function () {
        this.effect = '';
        var currentView = this.getViewNumber(this.currentView());
        switch (this.currentView()) {
            case 'Month':
                this.addMonths(this.currentDate, -1);
                this.switchView(currentView);
                break;
            case 'Year':
                this.addYears(this.currentDate, -1);
                this.switchView(currentView);
                break;
            case 'Decade':
                this.addYears(this.currentDate, -10);
                this.switchView(currentView);
                break;
        }
    };
    CalendarBase.prototype.navigatePrevious = function (e) {
        e.preventDefault();
        if (this.calendarMode === 'Gregorian') {
            this.previous();
        }
        else {
            this.islamicModule.islamicPrevious();
        }
        this.triggerNavigate(e);
        if (this.getModuleName() === 'calendar') {
            this.table.focus();
        }
    };
    CalendarBase.prototype.next = function () {
        this.effect = '';
        var currentView = this.getViewNumber(this.currentView());
        switch (this.currentView()) {
            case 'Month':
                this.addMonths(this.currentDate, 1);
                this.switchView(currentView);
                break;
            case 'Year':
                this.addYears(this.currentDate, 1);
                this.switchView(currentView);
                break;
            case 'Decade':
                this.addYears(this.currentDate, 10);
                this.switchView(currentView);
                break;
        }
    };
    CalendarBase.prototype.navigateNext = function (eve) {
        eve.preventDefault();
        if (this.calendarMode === 'Gregorian') {
            this.next();
        }
        else {
            this.islamicModule.islamicNext();
        }
        this.triggerNavigate(eve);
        if (this.getModuleName() === 'calendar') {
            this.table.focus();
        }
    };
    /**
     * This method is used to navigate to the month/year/decade view of the Calendar.
     * @param  {string} view - Specifies the view of the Calendar.
     * @param  {Date} date - Specifies the focused date in a view.
     * @returns void
     */
    CalendarBase.prototype.navigateTo = function (view, date) {
        if (+date >= +this.min && +date <= +this.max) {
            this.currentDate = date;
        }
        if (+date <= +this.min) {
            this.currentDate = new Date(this.checkValue(this.min));
        }
        if (+date >= +this.max) {
            this.currentDate = new Date(this.checkValue(this.max));
        }
        if ((this.getViewNumber(this.depth) >= this.getViewNumber(view))) {
            if ((this.getViewNumber(this.depth) <= this.getViewNumber(this.start))
                || this.getViewNumber(this.depth) === this.getViewNumber(view)) {
                view = this.depth;
            }
        }
        this.switchView(this.getViewNumber(view));
    };
    /**
     * Gets the current view of the Calendar.
     * @returns string
     */
    CalendarBase.prototype.currentView = function () {
        if (this.contentElement.classList.contains(YEAR)) {
            return 'Year';
        }
        else if (this.contentElement.classList.contains(DECADE)) {
            return 'Decade';
        }
        else {
            return 'Month';
        }
    };
    CalendarBase.prototype.getDateVal = function (date, value) {
        return (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && date.getDate() === (value).getDate()
            && date.getMonth() === (value).getMonth() && date.getFullYear() === (value).getFullYear());
    };
    CalendarBase.prototype.getCultureObjects = function (ld, c) {
        var gregorianFormat = '.dates.calendars.gregorian.days.format.' + this.dayHeaderFormat.toLowerCase();
        var islamicFormat = '.dates.calendars.islamic.days.format.' + this.dayHeaderFormat.toLowerCase();
        if (this.calendarMode === 'Gregorian') {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('main.' + '' + this.locale + gregorianFormat, ld);
        }
        else {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('main.' + '' + this.locale + islamicFormat, ld);
        }
    };
    ;
    CalendarBase.prototype.getWeek = function (d) {
        var currentDate = new Date(this.checkValue(d)).valueOf();
        var date = new Date(d.getFullYear(), 0, 1).valueOf();
        var a = (currentDate - date);
        return Math.ceil((((a) / dayMilliSeconds) + new Date(date).getDay() + 1) / 7);
    };
    CalendarBase.prototype.setStartDate = function (date, time) {
        var tzOffset = date.getTimezoneOffset();
        var d = new Date(date.getTime() + time);
        var tzOffsetDiff = d.getTimezoneOffset() - tzOffset;
        date.setTime(d.getTime() + tzOffsetDiff * minutesMilliSeconds);
    };
    CalendarBase.prototype.addMonths = function (date, i) {
        if (this.calendarMode === 'Gregorian') {
            var day = date.getDate();
            date.setDate(1);
            date.setMonth(date.getMonth() + i);
            date.setDate(Math.min(day, this.getMaxDays(date)));
        }
        else {
            var islamicDate = this.islamicModule.getIslamicDate(date);
            this.currentDate = this.islamicModule.toGregorian(islamicDate.year, (islamicDate.month) + i, 1);
        }
    };
    CalendarBase.prototype.addYears = function (date, i) {
        if (this.calendarMode === 'Gregorian') {
            var day = date.getDate();
            date.setDate(1);
            date.setFullYear(date.getFullYear() + i);
            date.setDate(Math.min(day, this.getMaxDays(date)));
        }
        else {
            var islamicDate = this.islamicModule.getIslamicDate(date);
            this.currentDate = this.islamicModule.toGregorian(islamicDate.year + i, (islamicDate.month), 1);
        }
    };
    CalendarBase.prototype.getIdValue = function (e, element) {
        var eve;
        if (e) {
            eve = e.currentTarget;
        }
        else {
            eve = element;
        }
        var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
        var dateFormatOptions = { type: 'dateTime', skeleton: 'full', calendar: type };
        var dateString = this.globalize.formatDate(new Date(parseInt('' + eve.getAttribute('id'), 0)), dateFormatOptions);
        var date = this.globalize.parseDate(dateString, dateFormatOptions);
        var value = date.valueOf() - date.valueOf() % 1000;
        return new Date(value);
        //return this.globalize.parseDate(dateString, dateFormatOptions);
    };
    CalendarBase.prototype.adjustLongHeaderSize = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], DAYHEADERLONG);
        if (this.dayHeaderFormat === 'Wide') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.getModuleName() === 'calendar' ? this.element : this.calendarElement], DAYHEADERLONG);
        }
    };
    CalendarBase.prototype.selectDate = function (e, date, node, multiSelection, values) {
        var element = node || e.currentTarget;
        this.isDateSelected = false;
        if (this.currentView() === 'Decade') {
            this.setDateDecade(this.currentDate, date.getFullYear());
        }
        else if (this.currentView() === 'Year') {
            this.setDateYear(this.currentDate, date);
        }
        else {
            if (multiSelection && !this.checkPresentDate(date, values)) {
                var copyValues = this.copyValues(values);
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(values) && copyValues.length > 0) {
                    copyValues.push(new Date(this.checkValue(date)));
                    this.setProperties({ values: copyValues }, true);
                    this.setProperties({ value: values[values.length - 1] }, true);
                }
                else {
                    this.setProperties({ values: [new Date(this.checkValue(date))] }, true);
                }
            }
            else {
                this.setProperties({ value: new Date(this.checkValue(date)) }, true);
            }
            this.currentDate = new Date(this.checkValue(date));
        }
        var tableBodyElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(element, '.' + ROOT);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tableBodyElement)) {
            tableBodyElement = this.tableBodyElement;
        }
        if (!multiSelection && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tableBodyElement.querySelector('.' + SELECTED))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([tableBodyElement.querySelector('.' + SELECTED)], SELECTED);
        }
        if (!multiSelection && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tableBodyElement.querySelector('.' + FOCUSEDDATE))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([tableBodyElement.querySelector('.' + FOCUSEDDATE)], FOCUSEDDATE);
        }
        if (multiSelection) {
            var copyValues = this.copyValues(values);
            var collection = Array.prototype.slice.call(this.tableBodyElement.querySelectorAll('td'));
            for (var index = 0; index < collection.length; index++) {
                var tempElement = tableBodyElement.querySelectorAll('td' + '.' + FOCUSEDDATE)[0];
                var selectedElement = tableBodyElement.querySelectorAll('td' + '.' + SELECTED)[0];
                if (collection[index] === tempElement) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([collection[index]], FOCUSEDDATE);
                }
                if (collection[index] === selectedElement &&
                    !this.checkPresentDate(new Date(parseInt(selectedElement.getAttribute('id').split('_')[0], 10)), values)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([collection[index]], SELECTED);
                }
            }
            if (element.classList.contains(SELECTED)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element], SELECTED);
                for (var i = 0; i < copyValues.length; i++) {
                    var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
                    var formatOptions = { type: 'date', skeleton: 'short', calendar: type };
                    var localDateString = this.globalize.formatDate(date, formatOptions);
                    var tempDateString = this.globalize.formatDate(copyValues[i], formatOptions);
                    if (localDateString === tempDateString) {
                        var index = copyValues.indexOf(copyValues[i]);
                        copyValues.splice(index, 1);
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], FOCUSEDDATE);
                    }
                }
                this.setProperties({ values: copyValues }, true);
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], SELECTED);
            }
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], SELECTED);
        }
        this.isDateSelected = true;
    };
    CalendarBase.prototype.checkPresentDate = function (dates, values) {
        var previousValue = false;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(values)) {
            for (var checkPrevious = 0; checkPrevious < values.length; checkPrevious++) {
                var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
                /* tslint:disable-next-line:max-line-length */
                var localDateString = this.globalize.formatDate(dates, { type: 'date', skeleton: 'short', calendar: type });
                /* tslint:disable-next-line:max-line-length */
                var tempDateString = this.globalize.formatDate(values[checkPrevious], { type: 'date', skeleton: 'short', calendar: type });
                if (localDateString === tempDateString) {
                    previousValue = true;
                }
            }
        }
        return previousValue;
    };
    CalendarBase.prototype.setAriaActiveDescendant = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.table, {
            'aria-activedescendant': '' + this.setActiveDescendant()
        });
    };
    CalendarBase.prototype.previousIconHandler = function (disabled) {
        if (disabled) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.previousIcon, 'click', this.navigatePreviousHandler);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.previousIcon], '' + DISABLED);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.previousIcon], '' + OVERLAY);
            this.previousIcon.setAttribute('aria-disabled', 'true');
        }
        else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.previousIcon, 'click', this.navigatePreviousHandler);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.previousIcon], '' + DISABLED);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.previousIcon], '' + OVERLAY);
            this.previousIcon.setAttribute('aria-disabled', 'false');
        }
    };
    CalendarBase.prototype.renderDayCellEvent = function (args) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.renderDayCellArgs, { name: 'renderDayCell' });
        this.trigger('renderDayCell', args);
    };
    CalendarBase.prototype.navigatedEvent = function (eve) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.navigatedArgs, { name: 'navigated', event: eve });
        this.trigger('navigated', this.navigatedArgs);
    };
    CalendarBase.prototype.triggerNavigate = function (event) {
        this.navigatedArgs = { view: this.currentView(), date: this.currentDate };
        this.navigatedEvent(event);
    };
    CalendarBase.prototype.nextIconHandler = function (disabled) {
        if (disabled) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.nextIcon, 'click', this.navigateNextHandler);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.nextIcon], DISABLED);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.nextIcon], OVERLAY);
            this.nextIcon.setAttribute('aria-disabled', 'true');
        }
        else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.nextIcon, 'click', this.navigateNextHandler);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.nextIcon], DISABLED);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.nextIcon], OVERLAY);
            this.nextIcon.setAttribute('aria-disabled', 'false');
        }
    };
    CalendarBase.prototype.compare = function (startDate, endDate, modifier) {
        var start = endDate.getFullYear();
        var end;
        var result;
        end = start;
        result = 0;
        if (modifier) {
            start = start - start % modifier;
            end = start - start % modifier + modifier - 1;
        }
        if (startDate.getFullYear() > end) {
            result = 1;
        }
        else if (startDate.getFullYear() < start) {
            result = -1;
        }
        return result;
    };
    CalendarBase.prototype.isMinMaxRange = function (date) {
        return +date >= +this.min && +date <= +this.max;
    };
    CalendarBase.prototype.isMonthYearRange = function (date) {
        if (this.calendarMode === 'Gregorian') {
            return date.getMonth() >= this.min.getMonth()
                && date.getFullYear() >= this.min.getFullYear()
                && date.getMonth() <= this.max.getMonth()
                && date.getFullYear() <= this.max.getFullYear();
        }
        else {
            var islamicDate = this.islamicModule.getIslamicDate(date);
            return islamicDate.month >= (this.islamicModule.getIslamicDate(new Date(1944, 1, 18))).month
                && islamicDate.year >= (this.islamicModule.getIslamicDate(new Date(1944, 1, 18))).year
                && islamicDate.month <= (this.islamicModule.getIslamicDate(new Date(2069, 1, 16))).month
                && islamicDate.year <= (this.islamicModule.getIslamicDate(new Date(2069, 1, 16))).year;
        }
    };
    CalendarBase.prototype.compareYear = function (start, end) {
        return this.compare(start, end, 0);
    };
    CalendarBase.prototype.compareDecade = function (start, end) {
        return this.compare(start, end, 10);
    };
    CalendarBase.prototype.shiftArray = function (array, i) {
        return array.slice(i).concat(array.slice(0, i));
    };
    CalendarBase.prototype.addDay = function (date, i, e, max, min) {
        var column = i;
        var value = new Date(+date);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tableBodyElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e)) {
            while (this.findNextTD(new Date(+date), column, max, min)) {
                column += i;
            }
            var rangeValue = new Date(value.setDate(value.getDate() + column));
            column = (+rangeValue > +max || +rangeValue < +min) ? column === i ? i - i : i : column;
        }
        date.setDate(date.getDate() + column);
    };
    CalendarBase.prototype.findNextTD = function (date, column, max, min) {
        var value = new Date(date.setDate(date.getDate() + column));
        var collection = [];
        var isDisabled = false;
        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && value.getMonth()) === (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.currentDate) && this.currentDate.getMonth())) {
            var tdEles = void 0;
            if (this.calendarMode === 'Gregorian') {
                tdEles = this.renderDays(value, null);
            }
            else {
                tdEles = this.islamicModule.islamicRenderDays(this.currentDate, value);
            }
            collection = tdEles.filter(function (element) {
                return element.classList.contains(DISABLED);
            });
        }
        else {
            collection = this.tableBodyElement.querySelectorAll('td.' + DISABLED);
        }
        if (+value <= (+(max)) && +value >= (+(min))) {
            if (collection.length) {
                for (var i = 0; i < collection.length; i++) {
                    isDisabled = (+value === +new Date(parseInt(collection[i].id, 0))) ? true : false;
                    if (isDisabled) {
                        break;
                    }
                }
            }
        }
        return isDisabled;
    };
    CalendarBase.prototype.getMaxDays = function (d) {
        var date;
        var month;
        var tmpDate = new Date(this.checkValue(d));
        date = 28;
        month = tmpDate.getMonth();
        while (tmpDate.getMonth() === month) {
            ++date;
            tmpDate.setDate(date);
        }
        return date - 1;
    };
    CalendarBase.prototype.setDateDecade = function (date, year) {
        date.setFullYear(year);
        this.setProperties({ value: new Date(this.checkValue(date)) }, true);
    };
    ;
    CalendarBase.prototype.setDateYear = function (date, value) {
        date.setFullYear(value.getFullYear(), value.getMonth(), date.getDate());
        if (value.getMonth() !== date.getMonth()) {
            date.setDate(0);
        }
        this.setProperties({ value: new Date(this.checkValue(date)) }, true);
        this.currentDate = new Date(this.checkValue(value));
    };
    CalendarBase.prototype.compareMonth = function (start, end) {
        var result;
        if (start.getFullYear() > end.getFullYear()) {
            result = 1;
        }
        else if (start.getFullYear() < end.getFullYear()) {
            result = -1;
        }
        else {
            result = start.getMonth() === end.getMonth() ? 0 : start.getMonth() > end.getMonth() ? 1 : -1;
        }
        return result;
    };
    CalendarBase.prototype.checkValue = function (inValue) {
        if (inValue instanceof Date) {
            return (inValue.toUTCString());
        }
        else {
            return ('' + inValue);
        }
    };
    CalendarBase.prototype.checkView = function () {
        if (this.start !== 'Decade' && this.start !== 'Year') {
            this.setProperties({ start: 'Month' }, true);
        }
        if (this.depth !== 'Decade' && this.depth !== 'Year') {
            this.setProperties({ depth: 'Month' }, true);
        }
        if (this.getViewNumber(this.depth) > this.getViewNumber(this.start)) {
            this.setProperties({ depth: 'Month' }, true);
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(new Date(1900, 0, 1))
    ], CalendarBase.prototype, "min", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(new Date(2099, 11, 31))
    ], CalendarBase.prototype, "max", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], CalendarBase.prototype, "firstDayOfWeek", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Gregorian')
    ], CalendarBase.prototype, "calendarMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Month')
    ], CalendarBase.prototype, "start", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Month')
    ], CalendarBase.prototype, "depth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], CalendarBase.prototype, "weekNumber", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], CalendarBase.prototype, "showTodayButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Short')
    ], CalendarBase.prototype, "dayHeaderFormat", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], CalendarBase.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], CalendarBase.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], CalendarBase.prototype, "destroyed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], CalendarBase.prototype, "navigated", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], CalendarBase.prototype, "renderDayCell", void 0);
    CalendarBase = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], CalendarBase);
    return CalendarBase;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));

/**
 * Represents the Calendar component that allows the user to select a date.
 * ```html
 * <div id="calendar"/>
 * ```
 * ```typescript
 * <script>
 *   var calendarObj = new Calendar({ value: new Date() });
 *   calendarObj.appendTo("#calendar");
 * </script>
 * ```
 */
var Calendar = /** @class */ (function (_super) {
    __extends(Calendar, _super);
    /**
     * Initialized new instance of Calendar Class.
     * Constructor for creating the widget
     * @param  {CalendarModel} options?
     * @param  {string|HTMLElement} element?
     */
    function Calendar(options, element) {
        return _super.call(this, options, element) || this;
    }
    /**
     * To Initialize the control rendering.
     * @returns void
     * @private
     */
    Calendar.prototype.render = function () {
        if (this.calendarMode === 'Islamic' && this.islamicModule === undefined) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["throwError"])('Requires the injectable Islamic modules to render Calendar in Islamic mode');
        }
        if (this.isMultiSelection && typeof this.values === 'object' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.values) && this.values.length > 0) {
            var tempValues = [];
            var copyValues = [];
            for (var limit = 0; limit < this.values.length; limit++) {
                if (tempValues.indexOf(+this.values[limit]) === -1) {
                    tempValues.push(+this.values[limit]);
                    copyValues.push(this.values[limit]);
                }
            }
            this.setProperties({ values: copyValues }, true);
            for (var index = 0; index < this.values.length; index++) {
                if (!this.checkDateValue(this.values[index])) {
                    if (typeof (this.values[index]) === 'string' && this.checkDateValue(new Date(this.checkValue(this.values[index])))) {
                        var copyDate = new Date(this.checkValue(this.values[index]));
                        this.values.splice(index, 1);
                        this.values.splice(index, 0, copyDate);
                    }
                    else {
                        this.values.splice(index, 1);
                    }
                }
            }
            this.setProperties({ value: this.values[this.values.length - 1] }, true);
            this.previousValues = this.values.length;
        }
        this.validateDate();
        this.minMaxUpdate();
        _super.prototype.render.call(this);
        if (this.getModuleName() === 'calendar') {
            var form = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
            if (form) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(form, 'reset', this.formResetHandler.bind(this));
            }
        }
    };
    Calendar.prototype.formResetHandler = function () {
        this.setProperties({ value: null }, true);
    };
    Calendar.prototype.validateDate = function () {
        if (typeof this.value === 'string') {
            this.setProperties({ value: this.checkDateValue(new Date(this.checkValue(this.value))) }, true); // persist the value property.
        }
        _super.prototype.validateDate.call(this, this.value);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max) {
            this.currentDate = new Date(this.checkValue(this.value));
        }
        if (isNaN(+this.value)) {
            this.setProperties({ value: null }, true);
        }
    };
    Calendar.prototype.minMaxUpdate = function () {
        if (this.getModuleName() === 'calendar') {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.value <= this.min && this.min <= this.max) {
                this.setProperties({ value: this.min }, true);
                this.changedArgs = { value: this.value };
            }
            else {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.value >= this.max && this.min <= this.max) {
                    this.setProperties({ value: this.max }, true);
                    this.changedArgs = { value: this.value };
                }
            }
        }
        if (this.getModuleName() !== 'calendar' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.value < this.min && this.min <= this.max) {
                _super.prototype.minMaxUpdate.call(this, this.min);
            }
            else {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.value > this.max && this.min <= this.max) {
                    _super.prototype.minMaxUpdate.call(this, this.max);
                }
            }
        }
        else {
            _super.prototype.minMaxUpdate.call(this, this.value);
        }
    };
    Calendar.prototype.todayButtonClick = function () {
        if (this.showTodayButton) {
            var tempValue = new Date();
            if (this.value) {
                tempValue.setHours(this.value.getHours());
                tempValue.setMinutes(this.value.getMinutes());
                tempValue.setSeconds(this.value.getSeconds());
                tempValue.setMilliseconds(this.value.getMilliseconds());
            }
            else {
                tempValue = new Date(tempValue.getFullYear(), tempValue.getMonth(), tempValue.getDate(), 0, 0, 0, 0);
            }
            this.setProperties({ value: tempValue }, true);
            if (this.isMultiSelection) {
                var copyValues = this.copyValues(this.values);
                if (!_super.prototype.checkPresentDate.call(this, tempValue, this.values)) {
                    copyValues.push(tempValue);
                    this.setProperties({ values: copyValues });
                }
            }
            _super.prototype.todayButtonClick.call(this, new Date(+this.value));
        }
    };
    Calendar.prototype.keyActionHandle = function (e) {
        _super.prototype.keyActionHandle.call(this, e, this.value, this.isMultiSelection);
    };
    /**
     * Initialize the event handler
     * @private
     */
    Calendar.prototype.preRender = function () {
        var _this = this;
        this.changeHandler = function (e) {
            _this.triggerChange(e);
        };
        this.checkView();
        _super.prototype.preRender.call(this, this.value);
    };
    ;
    Calendar.prototype.createContent = function () {
        this.previousDate = this.value;
        _super.prototype.createContent.call(this);
    };
    Calendar.prototype.minMaxDate = function (localDate) {
        return _super.prototype.minMaxDate.call(this, localDate);
    };
    Calendar.prototype.renderMonths = function (e) {
        _super.prototype.renderMonths.call(this, e, this.value);
    };
    Calendar.prototype.renderDays = function (currentDate, e) {
        var tempDays = _super.prototype.renderDays.call(this, currentDate, e, this.value, this.isMultiSelection, this.values);
        if (this.isMultiSelection) {
            _super.prototype.validateValues.call(this, this.isMultiSelection, this.values);
        }
        return tempDays;
    };
    Calendar.prototype.renderYears = function (e) {
        if (this.calendarMode === 'Gregorian') {
            _super.prototype.renderYears.call(this, e, this.value);
        }
        else {
            this.islamicModule.islamicRenderYears(e, this.value);
        }
    };
    Calendar.prototype.renderDecades = function (e) {
        if (this.calendarMode === 'Gregorian') {
            _super.prototype.renderDecades.call(this, e, this.value);
        }
        else {
            this.islamicModule.islamicRenderDecade(e, this.value);
        }
    };
    Calendar.prototype.renderTemplate = function (elements, count, classNm, e) {
        if (this.calendarMode === 'Gregorian') {
            _super.prototype.renderTemplate.call(this, elements, count, classNm, e, this.value);
        }
        else {
            this.islamicModule.islamicRenderTemplate(elements, count, classNm, e, this.value);
        }
        this.changedArgs = { value: this.value, values: this.values };
        this.changeHandler();
    };
    Calendar.prototype.clickHandler = function (e) {
        var eve = e.currentTarget;
        this.isPopupClicked = true;
        if (eve.classList.contains(OTHERMONTH)) {
            if (this.isMultiSelection) {
                var copyValues = this.copyValues(this.values);
                copyValues.push(this.getIdValue(e, null));
                this.setProperties({ values: copyValues }, true);
                this.setProperties({ value: this.values[this.values.length - 1] }, true);
            }
            else {
                this.setProperties({ value: this.getIdValue(e, null) }, true);
            }
        }
        var storeView = this.currentView();
        _super.prototype.clickHandler.call(this, e, this.value);
        if (this.isMultiSelection && this.currentDate !== this.value &&
            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0]) && storeView === 'Year') {
            this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0].classList.remove(FOCUSEDDATE);
        }
    };
    Calendar.prototype.switchView = function (view, e) {
        _super.prototype.switchView.call(this, view, e, this.isMultiSelection);
    };
    /**
     * To get component name
     * @private
     */
    Calendar.prototype.getModuleName = function () {
        _super.prototype.getModuleName.call(this);
        return 'calendar';
    };
    /**
     * Gets the properties to be maintained upon browser refresh.
     * @returns string
     */
    Calendar.prototype.getPersistData = function () {
        _super.prototype.getPersistData.call(this);
        var keyEntity = ['value', 'values'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Called internally if any of the property value changed.
     * returns void
     * @private
     */
    Calendar.prototype.onPropertyChanged = function (newProp, oldProp) {
        this.effect = '';
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'value':
                    if (this.isDateSelected) {
                        if (typeof newProp.value === 'string') {
                            this.setProperties({ value: new Date(this.checkValue(newProp.value)) }, true);
                        }
                        else {
                            newProp.value = new Date(this.checkValue(newProp.value));
                        }
                        if (isNaN(+this.value)) {
                            this.setProperties({ value: oldProp.value }, true);
                        }
                        this.update();
                    }
                    break;
                case 'values':
                    if (this.isDateSelected) {
                        if (typeof newProp.values === 'string' || typeof newProp.values === 'number') {
                            this.setProperties({ values: null }, true);
                        }
                        else {
                            var copyValues = this.copyValues(this.values);
                            for (var index = 0; index < copyValues.length; index++) {
                                var tempDate = copyValues[index];
                                if (this.checkDateValue(tempDate) && !_super.prototype.checkPresentDate.call(this, tempDate, copyValues)) {
                                    copyValues.push(tempDate);
                                }
                            }
                            this.setProperties({ values: copyValues }, true);
                            if (this.values.length > 0) {
                                this.setProperties({ value: newProp.values[newProp.values.length - 1] }, true);
                            }
                        }
                        this.validateValues(this.isMultiSelection, this.values);
                        this.update();
                    }
                    break;
                case 'isMultiSelection':
                    if (this.isDateSelected) {
                        this.setProperties({ isMultiSelection: newProp.isMultiSelection }, true);
                        this.update();
                    }
                    break;
                default:
                    _super.prototype.onPropertyChanged.call(this, newProp, oldProp, this.isMultiSelection, this.values);
            }
        }
    };
    /**
     * Destroys the widget.
     * @returns void
     */
    Calendar.prototype.destroy = function () {
        _super.prototype.destroy.call(this);
        if (this.getModuleName() === 'calendar') {
            var form = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
            if (form) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(form, 'reset', this.formResetHandler.bind(this));
            }
        }
    };
    /**
     * This method is used to navigate to the month/year/decade view of the Calendar.
     * @param  {string} view - Specifies the view of the Calendar.
     * @param  {Date} date - Specifies the focused date in a view.
     * @returns void
     */
    Calendar.prototype.navigateTo = function (view, date) {
        this.minMaxUpdate();
        _super.prototype.navigateTo.call(this, view, date);
    };
    /**
     * Gets the current view of the Calendar.
     * @returns string
     */
    Calendar.prototype.currentView = function () {
        return _super.prototype.currentView.call(this);
    };
    /**
     * This method is used to add the single or multiple dates to the values property of the Calendar.
     * @param  {Date || Date[]} dates - Specifies the date or dates to be added to the values property of the Calendar.
     * @returns void
     */
    Calendar.prototype.addDate = function (dates) {
        if (typeof dates !== 'string' && typeof dates !== 'number') {
            var copyValues = this.copyValues(this.values);
            if (typeof dates === 'object' && (dates).length > 0) {
                var tempDates = dates;
                for (var i = 0; i < tempDates.length; i++) {
                    if (this.checkDateValue(tempDates[i]) && !_super.prototype.checkPresentDate.call(this, tempDates[i], copyValues)) {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(copyValues) && copyValues.length > 0) {
                            copyValues.push(tempDates[i]);
                        }
                        else {
                            copyValues = [new Date(+tempDates[i])];
                        }
                    }
                }
            }
            else {
                if (this.checkDateValue(dates) && !_super.prototype.checkPresentDate.call(this, dates, copyValues)) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(copyValues) && copyValues.length > 0) {
                        copyValues.push((dates));
                    }
                    else {
                        copyValues = [new Date(+dates)];
                    }
                }
            }
            this.setProperties({ values: copyValues }, true);
            if (this.isMultiSelection) {
                this.setProperties({ value: this.values[this.values.length - 1] }, true);
            }
            this.validateValues(this.isMultiSelection, copyValues);
            this.update();
            this.changedArgs = { value: this.value, values: this.values };
            this.changeHandler();
        }
    };
    /**
     * This method is used to remove the single or multiple dates from the values property of the Calendar.
     * @param  {Date || Date[]} dates - Specifies the date or dates which need to be removed from the values property of the Calendar.
     * @returns void
     */
    Calendar.prototype.removeDate = function (dates) {
        if (typeof dates !== 'string' && typeof dates !== 'number' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.values) && this.values.length > 0) {
            var copyValues = this.copyValues(this.values);
            if (typeof dates === 'object' && ((dates).length > 0)) {
                var tempDates = dates;
                for (var index = 0; index < tempDates.length; index++) {
                    for (var i = 0; i < copyValues.length; i++) {
                        if (+copyValues[i] === +tempDates[index]) {
                            copyValues.splice(i, 1);
                        }
                    }
                }
            }
            else {
                for (var i = 0; i < copyValues.length; i++) {
                    if (+copyValues[i] === +dates) {
                        copyValues.splice(i, 1);
                    }
                }
            }
            this.setProperties({ values: copyValues }, false);
            this.update();
            if (this.isMultiSelection) {
                this.setProperties({ value: this.values[this.values.length - 1] }, true);
            }
            this.changedArgs = { value: this.value, values: this.values };
            this.changeHandler();
        }
    };
    Calendar.prototype.update = function () {
        this.validateDate();
        this.minMaxUpdate();
        _super.prototype.setValueUpdate.call(this);
    };
    Calendar.prototype.selectDate = function (e, date, element) {
        _super.prototype.selectDate.call(this, e, date, element, this.isMultiSelection, this.values);
        if (this.isMultiSelection && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.values) && this.values.length > 0) {
            this.setProperties({ value: this.values[this.values.length - 1] }, true);
        }
        this.changedArgs = { value: this.value, values: this.values };
        this.changeHandler(e);
    };
    Calendar.prototype.changeEvent = function (e) {
        this.trigger('change', this.changedArgs);
        this.previousDate = new Date(+this.value);
    };
    Calendar.prototype.triggerChange = function (e) {
        this.changedArgs.event = e || null;
        this.changedArgs.isInteracted = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.setProperties({ value: this.value }, true);
        }
        if (!this.isMultiSelection && +this.value !== Number.NaN && +this.value !== +this.previousDate) {
            this.changeEvent(e);
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.values) && this.previousValues !== this.values.length) {
            this.changeEvent(e);
            this.previousValues = this.values.length;
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Calendar.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Calendar.prototype, "values", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Calendar.prototype, "isMultiSelection", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Calendar.prototype, "change", void 0);
    Calendar = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Calendar);
    return Calendar;
}(CalendarBase));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/calendar/index.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/calendar/index.js ***!
  \**********************************************************************/
/*! exports provided: CalendarBase, Calendar, Islamic */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _calendar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./calendar */ "./node_modules/@syncfusion/ej2-calendars/src/calendar/calendar.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CalendarBase", function() { return _calendar__WEBPACK_IMPORTED_MODULE_0__["CalendarBase"]; });

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

/* harmony import */ var _islamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./islamic */ "./node_modules/@syncfusion/ej2-calendars/src/calendar/islamic.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Islamic", function() { return _islamic__WEBPACK_IMPORTED_MODULE_1__["Islamic"]; });

/**
 * Calendar modules
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/calendar/islamic.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/calendar/islamic.js ***!
  \************************************************************************/
/*! exports provided: Islamic */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Islamic", function() { return Islamic; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/**
 *
 */





//class constant defination.
var OTHERMONTH = 'e-other-month';
var YEAR = 'e-year';
var MONTH = 'e-month';
var DECADE = 'e-decade';
var DISABLED = 'e-disabled';
var OVERLAY = 'e-overlay';
var WEEKEND = 'e-weekend';
var WEEKNUMBER = 'e-week-number';
var SELECTED = 'e-selected';
var FOCUSEDDATE = 'e-focused-date';
var OTHERMONTHROW = 'e-month-hide';
var TODAY = 'e-today';
var LINK = 'e-day';
var CELL = 'e-cell';
var dayMilliSeconds = 86400000;
var minDecade = 2060;
var maxDecade = 2069;
var Islamic = /** @class */ (function () {
    function Islamic(instance) {
        this.calendarInstance = instance;
    }
    Islamic.prototype.getModuleName = function () {
        return 'islamic';
    };
    Islamic.prototype.islamicTitleUpdate = function (date, view) {
        var globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.calendarInstance.locale);
        switch (view) {
            case 'days':
                /* tslint:disable-next-line:max-line-length */
                this.calendarInstance.headerTitleElement.textContent = globalize.formatDate(date, { type: 'dateTime', format: 'MMMMyyyy', calendar: 'islamic' });
                break;
            case 'months':
                /* tslint:disable-next-line:max-line-length */
                this.calendarInstance.headerTitleElement.textContent = globalize.formatDate(date, { type: 'dateTime', format: 'yyyy', calendar: 'islamic' });
        }
    };
    /* tslint:disable-next-line:max-line-length */
    // tslint:disable-next-line:max-func-body-length
    Islamic.prototype.islamicRenderDays = function (currentDate, value, multiSelection, values) {
        var tdEles = [];
        var cellsCount = 42;
        var localDate = new Date(this.islamicInValue(currentDate));
        var minMaxDate;
        var numCells = this.calendarInstance.weekNumber ? 8 : 7;
        // 8 and 7 denotes the number of columns to be specified.
        this.islamicTitleUpdate(currentDate, 'days');
        /* tslint:disable-next-line:no-any */
        var islamicDate = this.getIslamicDate(localDate);
        var gregorianObject = this.toGregorian(islamicDate.year, islamicDate.month, 1);
        var currentMonth = islamicDate.month;
        localDate = gregorianObject;
        while (localDate.getDay() !== this.calendarInstance.firstDayOfWeek) {
            this.calendarInstance.setStartDate(localDate, -1 * dayMilliSeconds);
        }
        for (var day = 0; day < cellsCount; ++day) {
            var weekEle = this.calendarInstance.createElement('td', { className: CELL });
            var weekAnchor = this.calendarInstance.createElement('span');
            if (day % 7 === 0 && this.calendarInstance.weekNumber) {
                weekAnchor.textContent = '' + this.calendarInstance.getWeek(localDate);
                weekEle.appendChild(weekAnchor);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([weekEle], '' + WEEKNUMBER);
                tdEles.push(weekEle);
            }
            minMaxDate = new Date(+localDate);
            localDate = this.calendarInstance.minMaxDate(localDate);
            /* tslint:disable-next-line:max-line-length */
            var dateFormatOptions = { type: 'dateTime', skeleton: 'full', calendar: 'islamic' };
            var date = this.calendarInstance.globalize.parseDate(this.calendarInstance.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
            var tdEle = this.islamicDayCell(localDate);
            /* tslint:disable-next-line:max-line-length */
            var title = this.calendarInstance.globalize.formatDate(localDate, { type: 'date', skeleton: 'full', calendar: 'islamic' });
            var dayLink = this.calendarInstance.createElement('span');
            /* tslint:disable-next-line:max-line-length */
            dayLink.textContent = this.calendarInstance.globalize.formatDate(localDate, { type: 'date', skeleton: 'd', calendar: 'islamic' });
            var disabled = (this.calendarInstance.min > localDate) || (this.calendarInstance.max < localDate);
            if (disabled) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], DISABLED);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], OVERLAY);
            }
            else {
                dayLink.setAttribute('title', '' + title);
            }
            /* tslint:disable-next-line:no-any */
            var hijriMonthObject = this.getIslamicDate(localDate);
            if (currentMonth !== hijriMonthObject.month) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], OTHERMONTH);
            }
            if (localDate.getDay() === 0 || localDate.getDay() === 6) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], WEEKEND);
            }
            tdEle.appendChild(dayLink);
            this.calendarInstance.renderDayCellArgs = {
                date: localDate,
                isDisabled: false,
                element: tdEle,
                isOutOfRange: disabled
            };
            var argument = this.calendarInstance.renderDayCellArgs;
            this.calendarInstance.renderDayCellEvent(argument);
            if (argument.isDisabled) {
                if (this.calendarInstance.isMultiSelection) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.calendarInstance.values) && this.calendarInstance.values.length > 0) {
                        for (var index = 0; index < values.length; index++) {
                            /* tslint:disable-next-line:max-line-length */
                            var localDateString = +new Date(this.calendarInstance.globalize.formatDate(argument.date, { type: 'date', skeleton: 'yMd', calendar: 'islamic' }));
                            /* tslint:disable-next-line:max-line-length */
                            var tempDateString = +new Date(this.calendarInstance.globalize.formatDate(this.calendarInstance.values[index], { type: 'date', skeleton: 'yMd', calendar: 'islamic' }));
                            if (localDateString === tempDateString) {
                                this.calendarInstance.values.splice(index, 1);
                                index = -1;
                            }
                        }
                    }
                }
                else if (value && +value === +argument.date) {
                    this.calendarInstance.setProperties({ value: null }, true);
                }
            }
            if (this.calendarInstance.renderDayCellArgs.isDisabled && !tdEle.classList.contains(SELECTED)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], DISABLED);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], OVERLAY);
                if (+this.calendarInstance.renderDayCellArgs.date === +this.calendarInstance.todayDate) {
                    this.calendarInstance.todayDisabled = true;
                }
            }
            var otherMnthBool = tdEle.classList.contains(OTHERMONTH);
            var disabledCls = tdEle.classList.contains(DISABLED);
            if (!disabledCls) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(tdEle, 'click', this.calendarInstance.clickHandler, this.calendarInstance);
            }
            if (this.calendarInstance.isMultiSelection && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.calendarInstance.values) &&
                !otherMnthBool && !disabledCls) {
                for (var tempValue = 0; tempValue < this.calendarInstance.values.length; tempValue++) {
                    /* tslint:disable-next-line:max-line-length */
                    var localDateString = this.calendarInstance.globalize.formatDate(localDate, { type: 'date', skeleton: 'short', calendar: 'islamic' });
                    var tempDateString = this.calendarInstance.globalize.formatDate(this.calendarInstance.values[tempValue], { type: 'date', skeleton: 'short', calendar: 'islamic' });
                    if (localDateString === tempDateString &&
                        this.calendarInstance.getDateVal(localDate, this.calendarInstance.values[tempValue])) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], SELECTED);
                    }
                    else {
                        this.calendarInstance.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
                    }
                }
                if (this.calendarInstance.values.length <= 0) {
                    this.calendarInstance.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
                }
            }
            else if (!otherMnthBool && !disabledCls && this.calendarInstance.getDateVal(localDate, value)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], SELECTED);
            }
            else {
                this.calendarInstance.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
            }
            if (date.getDate() === new Date().getDate() && date.getMonth() === new Date().getMonth()) {
                if (date.getFullYear() === new Date().getFullYear()) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], TODAY);
                }
            }
            localDate = new Date(+minMaxDate);
            tdEles.push(this.calendarInstance.renderDayCellArgs.element);
            this.calendarInstance.addDay(localDate, 1, null, this.calendarInstance.max, this.calendarInstance.min);
        }
        return tdEles;
    };
    Islamic.prototype.islamicIconHandler = function () {
        new Date(this.islamicInValue(this.calendarInstance.currentDate)).setDate(1);
        var date = new Date(this.islamicInValue(this.calendarInstance.currentDate));
        switch (this.calendarInstance.currentView()) {
            case 'Month':
                var prevMonthCompare = this.islamicCompareMonth(date, this.calendarInstance.min) < 1;
                var nextMonthCompare = this.islamicCompareMonth(date, this.calendarInstance.max) > -1;
                this.calendarInstance.previousIconHandler(prevMonthCompare);
                this.calendarInstance.nextIconHandler(nextMonthCompare);
                break;
            case 'Year':
                var prevYearCompare = this.hijriCompareYear(date, this.calendarInstance.min) < 1;
                var nextYearCompare = this.hijriCompareYear(date, this.calendarInstance.max) > -1;
                this.calendarInstance.previousIconHandler(prevYearCompare);
                this.calendarInstance.nextIconHandler(nextYearCompare);
                break;
            case 'Decade':
                var prevDecadeCompare = this.hijriCompareDecade(date, this.calendarInstance.min) < 1;
                var nextDecadeCompare = this.hijriCompareDecade(date, this.calendarInstance.max) > -1;
                this.calendarInstance.previousIconHandler(prevDecadeCompare);
                this.calendarInstance.nextIconHandler(nextDecadeCompare);
        }
    };
    Islamic.prototype.islamicNext = function () {
        this.calendarInstance.effect = '';
        var view = this.calendarInstance.getViewNumber(this.calendarInstance.currentView());
        /* tslint:disable-next-line:no-any */
        var islamicDate = this.getIslamicDate(this.calendarInstance.currentDate);
        switch (this.calendarInstance.currentView()) {
            case 'Year':
                this.calendarInstance.currentDate = this.toGregorian(islamicDate.year + 1, islamicDate.month, 1);
                this.calendarInstance.switchView(view);
                break;
            case 'Month':
                this.calendarInstance.currentDate = this.toGregorian(islamicDate.year, islamicDate.month + 1, 1);
                this.calendarInstance.switchView(view);
                break;
            case 'Decade':
                this.calendarInstance.currentDate = this.toGregorian(islamicDate.year + 10, islamicDate.month, 1);
                this.calendarInstance.switchView(view);
                break;
        }
    };
    Islamic.prototype.islamicPrevious = function () {
        var currentView = this.calendarInstance.getViewNumber(this.calendarInstance.currentView());
        this.calendarInstance.effect = '';
        /* tslint:disable-next-line:no-any */
        var islamicDate = this.getIslamicDate(this.calendarInstance.currentDate);
        switch (this.calendarInstance.currentView()) {
            case 'Month':
                this.calendarInstance.currentDate = this.toGregorian(islamicDate.year, islamicDate.month - 1, 1);
                this.calendarInstance.switchView(currentView);
                break;
            case 'Year':
                this.calendarInstance.currentDate = this.toGregorian(islamicDate.year - 1, islamicDate.month, 1);
                this.calendarInstance.switchView(currentView);
                break;
            case 'Decade':
                this.calendarInstance.currentDate = this.toGregorian(islamicDate.year - 10, islamicDate.month - 1, 1);
                this.calendarInstance.switchView(currentView);
                break;
        }
    };
    Islamic.prototype.islamicRenderYears = function (e, value) {
        this.calendarInstance.removeTableHeadElement();
        var numCells = 4;
        var days;
        var tdEles = [];
        var valueUtil = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value);
        var curDate = new Date(this.islamicInValue(this.calendarInstance.currentDate));
        var localDate = curDate;
        /* tslint:disable-next-line:no-any */
        var islamicDate = this.getIslamicDate(localDate);
        var gregorianObject = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["HijriParser"].toGregorian(islamicDate.year, 1, 1);
        localDate = gregorianObject;
        var mon = islamicDate.month;
        var yr = islamicDate.year;
        var curYrs = islamicDate.year;
        /* tslint:disable-next-line:no-any */
        var minYr = (this.getIslamicDate(this.calendarInstance.min)).year;
        /* tslint:disable-next-line:no-any */
        var minMonth = (this.getIslamicDate(this.calendarInstance.min)).month;
        /* tslint:disable-next-line:no-any */
        var maxYr = (this.getIslamicDate(this.calendarInstance.max)).year;
        /* tslint:disable-next-line:no-any */
        var maxMonth = (this.getIslamicDate(this.calendarInstance.max)).month;
        this.islamicTitleUpdate(this.calendarInstance.currentDate, 'months');
        var disabled = (this.calendarInstance.min > localDate) || (this.calendarInstance.max < localDate);
        for (var month = 1; month <= 12; ++month) {
            /* tslint:disable-next-line:no-any */
            var islamicDate_1 = this.getIslamicDate(localDate);
            var gregorianObject_1 = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["HijriParser"].toGregorian(islamicDate_1.year, month, 1);
            localDate = gregorianObject_1;
            var tdEle = this.islamicDayCell(localDate);
            var dayLink = this.calendarInstance.createElement('span');
            /* tslint:disable-next-line:max-line-length */
            /* tslint:disable-next-line:no-any */
            var localMonth = (value && (this.getIslamicDate(value)).month === (this.getIslamicDate(localDate)).month);
            /* tslint:disable-next-line:no-any  tslint:disable-next-line:max-line-length */
            var select = (value && (this.getIslamicDate(value)).year === yr && localMonth);
            /* tslint:disable-next-line:max-line-length */
            dayLink.textContent = this.calendarInstance.globalize.formatDate(localDate, { type: 'dateTime', format: 'MMM', calendar: 'islamic' });
            if ((this.calendarInstance.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.calendarInstance.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], DISABLED);
            }
            else if (!valueUtil && select) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], SELECTED);
            }
            else {
                /* tslint:disable-next-line:no-any */
                if ((this.getIslamicDate(localDate)).month === mon &&
                    /* tslint:disable-next-line:no-any */
                    (this.getIslamicDate(this.calendarInstance.currentDate)).month === mon) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], FOCUSEDDATE);
                }
            }
            if (!tdEle.classList.contains(DISABLED)) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(tdEle, 'click', this.calendarInstance.clickHandler, this.calendarInstance);
            }
            tdEle.appendChild(dayLink);
            tdEles.push(tdEle);
        }
        this.islamicRenderTemplate(tdEles, numCells, YEAR, e, value);
    };
    Islamic.prototype.islamicRenderDecade = function (e, value) {
        this.calendarInstance.removeTableHeadElement();
        var numCells = 4;
        var yearCell = 12;
        var tdEles = [];
        var localDate = new Date(this.islamicInValue(this.calendarInstance.currentDate));
        /* tslint:disable-next-line:no-any */
        var islamicDate = this.getIslamicDate(localDate);
        var gregorianObject = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["HijriParser"].toGregorian(islamicDate.year, 1, 1);
        localDate = gregorianObject;
        var localYr = localDate.getFullYear();
        var startYr = new Date(this.islamicInValue((localYr - localYr % 10)));
        var endYr = new Date(this.islamicInValue((localYr - localYr % 10 + (10 - 1))));
        var startFullYr = startYr.getFullYear();
        var endFullYr = endYr.getFullYear();
        /* tslint:disable-next-line:max-line-length */
        var startHdrYr = this.calendarInstance.globalize.formatDate(startYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
        var endHdrYr = this.calendarInstance.globalize.formatDate(endYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
        this.calendarInstance.headerTitleElement.textContent = startHdrYr + ' - ' + (endHdrYr);
        var start = new Date(localYr - (localYr % 10) - 2, 0, 1);
        var startYear = start.getFullYear();
        for (var rowCount = 1; rowCount <= yearCell; ++rowCount) {
            var year = startYear + rowCount;
            localDate.setFullYear(year);
            localDate.setDate(1);
            localDate.setMonth(0);
            /* tslint:disable-next-line:no-any */
            var islamicDate_2 = this.getIslamicDate(localDate);
            var gregorianObject_2 = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["HijriParser"].toGregorian(islamicDate_2.year, 1, 1);
            localDate = gregorianObject_2;
            var tdEle = this.islamicDayCell(localDate);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(tdEle, { 'role': 'gridcell' });
            var dayLink = this.calendarInstance.createElement('span');
            /* tslint:disable-next-line:max-line-length */
            dayLink.textContent = this.calendarInstance.globalize.formatDate(localDate, { type: 'dateTime', format: 'y', calendar: 'islamic' });
            /* tslint:disable-next-line:no-any */
            if ((year < startFullYr) || (year > endFullYr)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], OTHERMONTH);
            }
            else if (year < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
                || year > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], DISABLED);
            }
            else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) &&
                /* tslint:disable-next-line:no-any */
                (this.getIslamicDate(localDate)).year ===
                    /* tslint:disable-next-line:no-any */
                    (this.getIslamicDate(value)).year) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], SELECTED);
            }
            else {
                if (localDate.getFullYear() === this.calendarInstance.currentDate.getFullYear() && !tdEle.classList.contains(DISABLED)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdEle], FOCUSEDDATE);
                }
            }
            if (!tdEle.classList.contains(DISABLED)) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(tdEle, 'click', this.calendarInstance.clickHandler, this.calendarInstance);
            }
            tdEle.appendChild(dayLink);
            tdEles.push(tdEle);
        }
        this.islamicRenderTemplate(tdEles, numCells, 'e-decade', e, value);
    };
    Islamic.prototype.islamicDayCell = function (localDate) {
        var dateFormatOptions = { skeleton: 'full', type: 'dateTime', calendar: 'islamic' };
        var formatDate = this.calendarInstance.globalize.formatDate(localDate, dateFormatOptions);
        var date = this.calendarInstance.globalize.parseDate(formatDate, dateFormatOptions);
        var value = date.valueOf();
        var attrs = {
            className: CELL, attrs: { 'id': '' + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('' + value), 'aria-selected': 'false', 'role': 'gridcell' }
        };
        return this.calendarInstance.createElement('td', attrs);
    };
    Islamic.prototype.islamicRenderTemplate = function (elements, count, classNm, e, value) {
        var view = this.calendarInstance.getViewNumber(this.calendarInstance.currentView());
        var trEle;
        this.calendarInstance.tableBodyElement = this.calendarInstance.createElement('tbody');
        this.calendarInstance.table.appendChild(this.calendarInstance.tableBodyElement);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.calendarInstance.contentElement, this.calendarInstance.headerElement], [MONTH, DECADE, YEAR]);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.calendarInstance.contentElement, this.calendarInstance.headerElement], [classNm]);
        var weekNumCell = 41;
        var numberCell = 35;
        var otherMonthCell = 6;
        var row = count;
        var rowCount = 0;
        for (var dayCell = 0; dayCell < elements.length / count; ++dayCell) {
            trEle = this.calendarInstance.createElement('tr', { attrs: { 'role': 'row' } });
            for (rowCount = 0 + rowCount; rowCount < row; rowCount++) {
                if (!elements[rowCount].classList.contains('e-week-number') && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(elements[rowCount].children[0])) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([elements[rowCount].children[0]], [LINK]);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(elements[rowCount].children[0], {
                        duration: 600,
                        isCenterRipple: true
                    });
                }
                trEle.appendChild(elements[rowCount]);
                if (this.calendarInstance.weekNumber &&
                    rowCount === otherMonthCell + 1 && elements[otherMonthCell + 1].classList.contains(OTHERMONTH)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trEle], OTHERMONTHROW);
                }
                if (!this.calendarInstance.weekNumber
                    && rowCount === otherMonthCell && elements[otherMonthCell].classList.contains(OTHERMONTH)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trEle], OTHERMONTHROW);
                }
                if (this.calendarInstance.weekNumber) {
                    if (rowCount === weekNumCell && elements[weekNumCell].classList.contains(OTHERMONTH)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trEle], OTHERMONTHROW);
                    }
                }
                else {
                    if (rowCount === numberCell && elements[numberCell].classList.contains(OTHERMONTH)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trEle], OTHERMONTHROW);
                    }
                }
            }
            row = row + count;
            rowCount = rowCount + 0;
            this.calendarInstance.tableBodyElement.appendChild(trEle);
        }
        this.calendarInstance.table.querySelector('tbody').className = this.calendarInstance.effect;
        this.islamicIconHandler();
        if (view !== this.calendarInstance.getViewNumber(this.calendarInstance.currentView())
            || (view === 0 && view !== this.calendarInstance.getViewNumber(this.calendarInstance.currentView()))) {
            this.calendarInstance.navigateHandler(e);
        }
        this.calendarInstance.setAriaActiveDescendant();
        this.calendarInstance.changedArgs = { value: this.calendarInstance.value, values: this.calendarInstance.values };
        this.calendarInstance.changeHandler();
    };
    Islamic.prototype.islamicCompareMonth = function (start, end) {
        /* tslint:disable-next-line:no-any */
        var hijriStart = (this.getIslamicDate(start));
        /* tslint:disable-next-line:no-any */
        var hijriEnd = (this.getIslamicDate(end));
        var result;
        if (hijriStart.year > hijriEnd.year) {
            result = 1;
        }
        else if (hijriStart.year < hijriEnd.year) {
            result = -1;
        }
        else {
            result = hijriStart.month === hijriEnd.month ? 0 : hijriStart.month > hijriEnd.month ? 1 : -1;
        }
        return result;
    };
    ;
    Islamic.prototype.islamicCompare = function (startDate, endDate, modifier) {
        /* tslint:disable-next-line:no-any */
        var hijriStart = this.getIslamicDate(startDate);
        /* tslint:disable-next-line:no-any */
        var hijriEnd = this.getIslamicDate(endDate);
        var start = hijriEnd.year;
        var end;
        var result;
        end = start;
        result = 0;
        if (modifier) {
            start = start - start % modifier;
            end = start - start % modifier + modifier - 1;
        }
        if (hijriStart.year > end) {
            result = 1;
        }
        else if ((this.calendarInstance.currentView() === 'Decade') && hijriStart.year < start &&
            !((startDate.getFullYear() >= minDecade && startDate.getFullYear() <= maxDecade))) {
            result = -1;
        }
        else if (hijriStart.year < start && (this.calendarInstance.currentView() === 'Year')) {
            result = -1;
        }
        return result;
    };
    ;
    /* tslint:disable-next-line:no-any */
    Islamic.prototype.getIslamicDate = function (date) {
        /* tslint:disable-next-line:no-any */
        return (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["HijriParser"].getHijriDate(date));
    };
    Islamic.prototype.toGregorian = function (year, month, date) {
        return _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["HijriParser"].toGregorian(year, month, date);
    };
    Islamic.prototype.hijriCompareYear = function (start, end) {
        return this.islamicCompare(start, end, 0);
    };
    Islamic.prototype.hijriCompareDecade = function (start, end) {
        return this.islamicCompare(start, end, 10);
    };
    ;
    Islamic.prototype.destroy = function () {
        this.calendarInstance = null;
    };
    Islamic.prototype.islamicInValue = function (inValue) {
        if (inValue instanceof Date) {
            return (inValue.toUTCString());
        }
        else {
            return ('' + inValue);
        }
    };
    return Islamic;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/datepicker/datepicker.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/datepicker/datepicker.js ***!
  \*****************************************************************************/
/*! exports provided: DatePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DatePicker", function() { return DatePicker; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _calendar_calendar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../calendar/calendar */ "./node_modules/@syncfusion/ej2-calendars/src/calendar/calendar.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <reference path='../calendar/calendar-model.d.ts'/>







//class constant defination
var DATEWRAPPER = 'e-date-wrapper';
var ROOT = 'e-datepicker';
var LIBRARY = 'e-lib';
var CONTROL = 'e-control';
var POPUPWRAPPER = 'e-popup-wrapper';
var INPUTWRAPPER = 'e-input-group-icon';
var POPUP = 'e-popup';
var INPUTCONTAINER = 'e-input-group';
var INPUTFOCUS = 'e-input-focus';
var INPUTROOT = 'e-input';
var ERROR = 'e-error';
var RTL = 'e-rtl';
var LINK = 'e-day';
var ACTIVE = 'e-active';
var OVERFLOW = 'e-date-overflow';
var DATEICON = 'e-date-icon';
var ICONS = 'e-icons';
var OPENDURATION = 300;
var CLOSEDURATION = 200;
var OFFSETVALUE = 4;
var SELECTED = 'e-selected';
var NONEDIT = 'e-non-edit';
var containerAttr = ['title', 'class', 'style'];
/**
 * Represents the DatePicker component that allows user to select
 * or enter a date value.
 * ```html
 * <input id='datepicker'/>
 * ```
 * ```typescript
 * <script>
 *   let datePickerObject:DatePicker = new DatePicker({ value: new Date() });
 *   datePickerObject.appendTo('#datepicker');
 * </script>
 * ```
 */
var DatePicker = /** @class */ (function (_super) {
    __extends(DatePicker, _super);
    /**
     * Constructor for creating the widget.
     */
    function DatePicker(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.previousElementValue = '';
        _this.isDateIconClicked = false;
        _this.isAltKeyPressed = false;
        _this.isInteracted = true;
        _this.invalidValueString = null;
        _this.checkPreviousValue = null;
        _this.keyConfigs = {
            altUpArrow: 'alt+uparrow',
            altDownArrow: 'alt+downarrow',
            escape: 'escape',
            enter: 'enter',
            controlUp: 'ctrl+38',
            controlDown: 'ctrl+40',
            moveDown: 'downarrow',
            moveUp: 'uparrow',
            moveLeft: 'leftarrow',
            moveRight: 'rightarrow',
            select: 'enter',
            home: 'home',
            end: 'end',
            pageUp: 'pageup',
            pageDown: 'pagedown',
            shiftPageUp: 'shift+pageup',
            shiftPageDown: 'shift+pagedown',
            controlHome: 'ctrl+home',
            controlEnd: 'ctrl+end',
            tab: 'tab'
        };
        _this.calendarKeyConfigs = {
            escape: 'escape',
            enter: 'enter',
            tab: 'tab'
        };
        _this.datepickerOptions = options;
        return _this;
    }
    /**
     * To Initialize the control rendering.
     * @return void
     * @private
     */
    DatePicker.prototype.render = function () {
        this.initialize();
        this.bindEvents();
    };
    DatePicker.prototype.setAllowEdit = function () {
        if (this.allowEdit) {
            if (!this.readonly) {
                this.inputElement.removeAttribute('readonly');
            }
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'readonly': '' });
        }
        this.updateIconState();
    };
    DatePicker.prototype.updateIconState = function () {
        if (!this.allowEdit && this.inputWrapper && !this.readonly) {
            if (this.inputElement.value === '') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [NONEDIT]);
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [NONEDIT]);
            }
        }
        else if (this.inputWrapper) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [NONEDIT]);
        }
    };
    DatePicker.prototype.initialize = function () {
        this.checkInvalidValue(this.value);
        this.createInput();
        this.updateHtmlAttributeToWrapper();
        this.setAllowEdit();
        this.updateInput();
        this.previousElementValue = this.inputElement.value;
        this.previousDate = new Date(+this.value);
        this.inputElement.setAttribute('value', this.inputElement.value);
        this.inputValueCopy = this.value;
    };
    DatePicker.prototype.createInput = function () {
        var ariaAttrs = {
            'aria-live': 'assertive', 'aria-atomic': 'true',
            'aria-haspopup': 'true', 'aria-activedescendant': 'null',
            'aria-owns': this.element.id + '_options', 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
            'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false'
        };
        if (this.getModuleName() === 'datepicker') {
            var l10nLocale = { placeholder: null };
            this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
            this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('datepicker', l10nLocale, this.locale);
            this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
        }
        this.inputWrapper = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].createInput({
            element: this.inputElement,
            floatLabelType: this.floatLabelType,
            properties: {
                readonly: this.readonly,
                placeholder: this.placeholder,
                cssClass: this.cssClass,
                enabled: this.enabled,
                enableRtl: this.enableRtl,
                showClearButton: this.showClearButton,
            },
            buttons: [INPUTWRAPPER + ' ' + DATEICON + ' ' + ICONS]
        }, this.createElement);
        this.setWidth(this.width);
        if (this.inputElement.name !== '') {
            this.inputElement.setAttribute('name', '' + this.inputElement.getAttribute('name'));
        }
        else {
            this.inputElement.setAttribute('name', '' + this.element.id);
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, ariaAttrs);
        if (!this.enabled) {
            this.inputElement.setAttribute('aria-disabled', 'true');
            this.inputElement.tabIndex = -1;
        }
        else {
            this.inputElement.setAttribute('aria-disabled', 'false');
            this.inputElement.setAttribute('tabindex', this.tabIndex);
        }
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].addAttributes({ 'aria-label': 'select' }, this.inputWrapper.buttons[0]);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], DATEWRAPPER);
    };
    DatePicker.prototype.updateInput = function () {
        var formatOptions;
        if (this.value && !this.isCalendar()) {
            this.disabledDates();
        }
        if (!+new Date(this.checkValue(this.value))) {
            this.setProperties({ value: null }, true);
        }
        if (this.strictMode) {
            //calls the Calendar processDate protected method to update the date value according to the strictMode true behaviour.
            _super.prototype.validateDate.call(this);
            this.minMaxUpdates();
            _super.prototype.minMaxUpdate.call(this);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            var dateValue = this.value;
            var dateString = void 0;
            var tempFormat = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.dateTimeFormat;
            if (this.getModuleName() === 'datetimepicker') {
                if (this.calendarMode === 'Gregorian') {
                    dateString = this.globalize.formatDate(this.value, {
                        format: tempFormat, type: 'dateTime', skeleton: 'yMd'
                    });
                }
                else {
                    dateString = this.globalize.formatDate(this.value, {
                        format: tempFormat, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'
                    });
                }
            }
            else {
                if (this.calendarMode === 'Gregorian') {
                    formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };
                }
                else {
                    formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
                }
                dateString = this.globalize.formatDate(this.value, formatOptions);
            }
            if ((+dateValue <= +this.max) && (+dateValue >= +this.min)) {
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton);
            }
            else {
                var value = (+dateValue >= +this.max || !+this.value) || (!+this.value || +dateValue <= +this.min);
                if (!this.strictMode && value) {
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton);
                }
            }
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.strictMode) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
        }
        if (!this.strictMode && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.invalidValueString) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(this.invalidValueString, this.inputElement, this.floatLabelType, this.showClearButton);
        }
        this.changedArgs = { value: this.value };
        this.errorClass();
        this.updateIconState();
    };
    ;
    DatePicker.prototype.minMaxUpdates = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.value < this.min && this.min <= this.max && this.strictMode) {
            this.setProperties({ value: this.min }, true);
            this.changedArgs = { value: this.value };
        }
        else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.value > this.max && this.min <= this.max && this.strictMode) {
                this.setProperties({ value: this.max }, true);
                this.changedArgs = { value: this.value };
            }
        }
    };
    DatePicker.prototype.checkStringValue = function (val) {
        var returnDate = null;
        var formatOptions = null;
        var formatDateTime = null;
        if (this.getModuleName() === 'datetimepicker') {
            var culture = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
            if (this.calendarMode === 'Gregorian') {
                formatOptions = { format: this.dateTimeFormat, type: 'dateTime', skeleton: 'yMd' };
                formatDateTime = { format: culture.getDatePattern({ skeleton: 'yMd' }), type: 'dateTime' };
            }
            else {
                formatOptions = { format: this.dateTimeFormat, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
                formatDateTime = { format: culture.getDatePattern({ skeleton: 'yMd' }), type: 'dateTime', calendar: 'islamic' };
            }
        }
        else {
            if (this.calendarMode === 'Gregorian') {
                formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };
            }
            else {
                formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
            }
        }
        returnDate = this.checkDateValue(this.globalize.parseDate(val, formatOptions));
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(returnDate) && (this.getModuleName() === 'datetimepicker')) {
            returnDate = this.checkDateValue(this.globalize.parseDate(val, formatDateTime));
        }
        return returnDate;
    };
    DatePicker.prototype.checkInvalidValue = function (value) {
        if (!(value instanceof Date) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            var valueDate = null;
            var valueString = value;
            if (typeof value === 'number') {
                valueString = value.toString();
            }
            var formatOptions = null;
            var formatDateTime = null;
            if (this.getModuleName() === 'datetimepicker') {
                var culture = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
                if (this.calendarMode === 'Gregorian') {
                    formatOptions = { format: this.dateTimeFormat, type: 'dateTime', skeleton: 'yMd' };
                    formatDateTime = { format: culture.getDatePattern({ skeleton: 'yMd' }), type: 'dateTime' };
                }
                else {
                    formatOptions = { format: this.dateTimeFormat, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
                    formatDateTime = { format: culture.getDatePattern({ skeleton: 'yMd' }), type: 'dateTime', calendar: 'islamic' };
                }
            }
            else {
                if (this.calendarMode === 'Gregorian') {
                    formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };
                }
                else {
                    formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
                }
            }
            var invalid = false;
            if (typeof valueString !== 'string') {
                valueString = null;
                invalid = true;
            }
            else {
                if (typeof valueString === 'string') {
                    valueString = valueString.trim();
                }
                valueDate = this.checkStringValue(valueString);
                if (!valueDate) {
                    var extISOString = null;
                    var basicISOString = null;
                    // tslint:disable-next-line
                    extISOString = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
                    // tslint:disable-next-line
                    basicISOString = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
                    if ((!extISOString.test(valueString) && !basicISOString.test(valueString))
                        || (/^[a-zA-Z0-9- ]*$/).test(valueString) || isNaN(+new Date(this.checkValue(valueString)))) {
                        invalid = true;
                    }
                    else {
                        valueDate = new Date(valueString);
                    }
                }
            }
            if (invalid) {
                if (!this.strictMode) {
                    this.invalidValueString = valueString;
                }
                this.setProperties({ value: null }, true);
            }
            else {
                this.setProperties({ value: valueDate }, true);
            }
        }
    };
    ;
    DatePicker.prototype.bindInputEvent = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString)) {
            if (this.formatString.indexOf('y') === -1) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'input', this.inputHandler, this);
            }
            else {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'input', this.inputHandler);
            }
        }
    };
    DatePicker.prototype.bindEvents = function () {
        if (this.enabled) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.buttons[0], 'mousedown touchstart', this.dateIconHandler, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'focus', this.inputFocusHandler, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'blur', this.inputBlurHandler, this);
            this.bindInputEvent();
            // To prevent the twice triggering.
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'change', this.inputChangeHandler, this);
            if (this.showClearButton && this.inputWrapper.clearButton) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler, this);
            }
            if (this.formElement) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.resetFormHandler, this);
            }
        }
        else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.dateIconHandler);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'focus', this.inputFocusHandler);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'blur', this.inputBlurHandler);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'change', this.inputChangeHandler);
            if (this.showClearButton && this.inputWrapper.clearButton) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
            }
            if (this.formElement) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.resetFormHandler);
            }
        }
        this.keyboardModules = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.inputElement, {
            eventName: 'keydown',
            keyAction: this.inputKeyActionHandle.bind(this),
            keyConfigs: this.keyConfigs
        });
    };
    DatePicker.prototype.resetFormHandler = function () {
        if (!this.inputElement.disabled) {
            var value = this.inputElement.getAttribute('value');
            if (this.element.tagName === 'EJS-DATEPICKER' || this.element.tagName === 'EJS-DATETIMEPICKER') {
                value = '';
                this.inputValueCopy = null;
                this.inputElement.setAttribute('value', '');
            }
            this.setProperties({ value: this.inputValueCopy }, true);
            this.restoreValue();
            if (this.inputElement) {
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(value, this.inputElement, this.floatLabelType, this.showClearButton);
                this.errorClass();
            }
        }
    };
    DatePicker.prototype.restoreValue = function () {
        this.currentDate = this.value ? this.value : new Date();
        this.previousDate = this.value;
        this.previousElementValue = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputValueCopy)) ? '' :
            this.globalize.formatDate(this.inputValueCopy, { format: this.formatString, type: 'dateTime', skeleton: 'yMd' });
    };
    DatePicker.prototype.inputChangeHandler = function (e) {
        e.stopPropagation();
    };
    DatePicker.prototype.bindClearEvent = function () {
        if (this.showClearButton && this.inputWrapper.clearButton) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler, this);
        }
    };
    DatePicker.prototype.resetHandler = function (e) {
        e.preventDefault();
        this.clear(e);
    };
    DatePicker.prototype.clear = function (event) {
        this.setProperties({ value: null }, true);
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
        this.invalidValueString = '';
        this.updateInput();
        this.popupUpdate();
        this.changeEvent(event);
    };
    DatePicker.prototype.dateIconHandler = function (e) {
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.inputElement.setAttribute('readonly', '');
            this.inputElement.blur();
        }
        e.preventDefault();
        if (!this.readonly) {
            if (this.isCalendar()) {
                this.hide(e);
            }
            else {
                this.isDateIconClicked = true;
                this.show(null, e);
                if (this.getModuleName() === 'datetimepicker') {
                    this.inputElement.focus();
                }
                this.inputElement.focus();
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [INPUTFOCUS]);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(this.inputWrapper.buttons, ACTIVE);
            }
        }
    };
    DatePicker.prototype.updateHtmlAttributeToWrapper = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (containerAttr.indexOf(key) > -1) {
                if (key === 'class') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], this.htmlAttributes[key].split(' '));
                }
                else if (key === 'style') {
                    var setStyle = this.inputWrapper.container.getAttribute(key);
                    setStyle = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(setStyle) ? (setStyle + this.htmlAttributes[key]) :
                        this.htmlAttributes[key];
                    this.inputWrapper.container.setAttribute(key, setStyle);
                }
                else {
                    this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
                }
            }
        }
    };
    DatePicker.prototype.updateHtmlAttributeToElement = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (containerAttr.indexOf(key) < 0) {
                this.inputElement.setAttribute(key, this.htmlAttributes[key]);
            }
        }
    };
    DatePicker.prototype.CalendarKeyActionHandle = function (e) {
        switch (e.action) {
            case 'escape':
                if (this.isCalendar()) {
                    this.hide(e);
                }
                else {
                    this.inputWrapper.container.children[this.index].blur();
                }
                break;
            case 'enter':
                if (!this.isCalendar()) {
                    this.show(null, e);
                }
                else {
                    if (+this.value !== +this.currentDate && !this.isCalendar()) {
                        this.inputWrapper.container.children[this.index].focus();
                    }
                }
                if (this.getModuleName() === 'datetimepicker') {
                    this.inputElement.focus();
                }
                break;
            case 'tab':
                this.hide(e);
        }
    };
    DatePicker.prototype.inputFocusHandler = function () {
        var focusArguments = {
            model: this
        };
        this.isDateIconClicked = false;
        this.trigger('focus', focusArguments);
        this.updateIconState();
    };
    DatePicker.prototype.inputHandler = function (e) {
        this.isPopupClicked = false;
    };
    DatePicker.prototype.inputBlurHandler = function (e) {
        this.strictModeUpdate();
        if (this.inputElement.value === '' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.invalidValueString = null;
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
        }
        this.updateInput();
        this.popupUpdate();
        this.changeTrigger(e);
        this.errorClass();
        if (this.isCalendar() && document.activeElement === this.inputElement) {
            this.hide(e);
        }
        if (this.getModuleName() === 'datepicker') {
            var blurArguments = {
                model: this
            };
            this.trigger('blur', blurArguments);
        }
        if (this.isCalendar()) {
            this.calendarKeyboardModules = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.calendarElement.children[1].firstElementChild, {
                eventName: 'keydown',
                keyAction: this.CalendarKeyActionHandle.bind(this),
                keyConfigs: this.calendarKeyConfigs
            });
        }
        this.isPopupClicked = false;
    };
    DatePicker.prototype.documentHandler = function (e) {
        if (e.type !== 'touchstart') {
            e.preventDefault();
        }
        var target = e.target;
        if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-datepicker.e-popup-wrapper'))
            && !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
            && (!target.classList.contains('e-day'))) {
            this.hide(e);
            this.focusOut();
        }
    };
    DatePicker.prototype.inputKeyActionHandle = function (e) {
        switch (e.action) {
            case 'altUpArrow':
                this.isAltKeyPressed = false;
                this.hide(e);
                this.inputElement.focus();
                break;
            case 'altDownArrow':
                this.isAltKeyPressed = true;
                this.strictModeUpdate();
                this.updateInput();
                this.changeTrigger(e);
                if (this.getModuleName() === 'datepicker') {
                    this.show(null, e);
                }
                break;
            case 'escape':
                this.hide(e);
                break;
            case 'enter':
                this.strictModeUpdate();
                this.updateInput();
                this.popupUpdate();
                this.changeTrigger(e);
                this.errorClass();
                if (!this.isCalendar() && document.activeElement === this.inputElement) {
                    this.hide(e);
                }
                if (this.isCalendar()) {
                    e.preventDefault();
                    e.stopPropagation();
                }
                break;
            case 'tab':
                this.strictModeUpdate();
                this.updateInput();
                this.popupUpdate();
                this.changeTrigger(e);
                this.errorClass();
                this.hide(e);
                break;
            default:
                this.defaultAction(e);
        }
    };
    DatePicker.prototype.defaultAction = function (e) {
        this.previousDate = ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && new Date(+this.value)) || null);
        if (this.isCalendar()) {
            _super.prototype.keyActionHandle.call(this, e);
        }
    };
    DatePicker.prototype.popupUpdate = function () {
        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.previousDate)) ||
            (+this.value !== +this.previousDate)) {
            if (this.popupObj) {
                if (this.popupObj.element.querySelectorAll('.' + SELECTED).length > 0) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.popupObj.element.querySelectorAll('.' + SELECTED), [SELECTED]);
                }
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
                if ((+this.value >= +this.min) && (+this.value <= +this.max)) {
                    var targetdate = new Date(this.checkValue(this.value));
                    _super.prototype.navigateTo.call(this, 'Month', targetdate);
                }
            }
        }
    };
    DatePicker.prototype.strictModeUpdate = function () {
        var format;
        var formatOptions;
        if (this.getModuleName() === 'datetimepicker') {
            format = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.dateTimeFormat;
        }
        else {
            format = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.formatString.replace('dd', 'd');
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(format)) {
            var len = format.split('M').length - 1;
            if (len < 3) {
                format = format.replace('MM', 'M');
            }
        }
        var dateOptions;
        if (this.getModuleName() === 'datetimepicker') {
            if (this.calendarMode === 'Gregorian') {
                dateOptions = {
                    format: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.dateTimeFormat,
                    type: 'dateTime', skeleton: 'yMd'
                };
            }
            else {
                dateOptions = {
                    format: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.dateTimeFormat,
                    type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'
                };
            }
        }
        else {
            if (this.calendarMode === 'Gregorian') {
                formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd' };
            }
            else {
                formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
            }
            dateOptions = formatOptions;
        }
        var date;
        if (typeof this.inputElement.value === 'string') {
            this.inputElement.value = this.inputElement.value.trim();
        }
        if ((this.getModuleName() === 'datetimepicker')) {
            if (this.checkDateValue(this.globalize.parseDate(this.inputElement.value, dateOptions))) {
                date = this.globalize.parseDate(this.inputElement.value, dateOptions);
            }
            else {
                if (this.calendarMode === 'Gregorian') {
                    formatOptions = { type: 'dateTime', skeleton: 'yMd' };
                }
                else {
                    formatOptions = { type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
                }
                date = this.globalize.parseDate(this.inputElement.value, formatOptions);
            }
        }
        else {
            date = this.globalize.parseDate(this.inputElement.value, dateOptions);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) && this.inputElement.value !== '' && this.strictMode) {
                if ((this.isPopupClicked || (!this.isPopupClicked && this.inputElement.value === this.previousElementValue))
                    && this.formatString.indexOf('y') === -1) {
                    date.setFullYear(this.value.getFullYear());
                }
            }
        }
        if (this.strictMode && date) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(this.globalize.formatDate(date, dateOptions), this.inputElement, this.floatLabelType, this.showClearButton);
            if (this.inputElement.value !== this.previousElementValue) {
                this.setProperties({ value: date }, true);
            }
        }
        else if (!this.strictMode) {
            if (this.inputElement.value !== this.previousElementValue) {
                this.setProperties({ value: date }, true);
            }
        }
        if (this.strictMode && !date && this.inputElement.value === '') {
            this.setProperties({ value: null }, true);
        }
        if (isNaN(+this.value)) {
            this.setProperties({ value: null }, true);
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
        }
    };
    DatePicker.prototype.createCalendar = function () {
        var _this = this;
        this.popupWrapper = this.createElement('div', { className: '' + ROOT + ' ' + POPUPWRAPPER });
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass)) {
            this.popupWrapper.className += ' ' + this.cssClass;
        }
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.modelHeader();
            this.modal = this.createElement('div');
            this.modal.className = '' + ROOT + ' e-date-modal';
            document.body.className += ' ' + OVERFLOW;
            this.modal.style.display = 'block';
            document.body.appendChild(this.modal);
        }
        //this.calendarElement represent the Calendar object from the Calendar class.
        this.calendarElement.querySelector('table tbody').className = '';
        this.popupObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["Popup"](this.popupWrapper, {
            content: this.calendarElement,
            relateTo: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? document.body : this.inputWrapper.container,
            position: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? { X: 'center', Y: 'center' } : { X: 'left', Y: 'bottom' },
            offsetY: OFFSETVALUE,
            targetType: 'container',
            enableRtl: this.enableRtl,
            zIndex: this.zIndex,
            collision: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? { X: 'fit', Y: 'fit' } : { X: 'flip', Y: 'flip' },
            open: function () {
                if (_this.getModuleName() !== 'datetimepicker') {
                    if (document.activeElement !== _this.inputElement) {
                        _this.calendarElement.children[1].firstElementChild.focus();
                        _this.calendarKeyboardModules = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](_this.calendarElement.children[1].firstElementChild, {
                            eventName: 'keydown',
                            keyAction: _this.CalendarKeyActionHandle.bind(_this),
                            keyConfigs: _this.calendarKeyConfigs
                        });
                        _this.calendarKeyboardModules = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](_this.inputWrapper.container.children[_this.index], {
                            eventName: 'keydown',
                            keyAction: _this.CalendarKeyActionHandle.bind(_this),
                            keyConfigs: _this.calendarKeyConfigs
                        });
                    }
                }
            }, close: function () {
                if (_this.isDateIconClicked) {
                    _this.inputWrapper.container.children[_this.index].focus();
                }
                if (_this.value) {
                    _this.disabledDates();
                }
                if (_this.popupObj) {
                    _this.popupObj.destroy();
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(_this.popupWrapper);
                _this.popupObj = _this.popupWrapper = null;
                _this.setAriaAttributes();
            }
        });
        this.popupObj.element.className += ' ' + this.cssClass;
        this.setAriaAttributes();
    };
    DatePicker.prototype.setAriaDisabled = function () {
        if (!this.enabled) {
            this.inputElement.setAttribute('aria-disabled', 'true');
            this.inputElement.tabIndex = -1;
        }
        else {
            this.inputElement.setAttribute('aria-disabled', 'false');
            this.inputElement.setAttribute('tabindex', this.tabIndex);
        }
    };
    DatePicker.prototype.modelHeader = function () {
        var dateOptions;
        var modelHeader = this.createElement('div', { className: 'e-model-header' });
        var yearHeading = this.createElement('h1', { className: 'e-model-year' });
        var h2 = this.createElement('div');
        var daySpan = this.createElement('span', { className: 'e-model-day' });
        var monthSpan = this.createElement('span', { className: 'e-model-month' });
        if (this.calendarMode === 'Gregorian') {
            dateOptions = { format: 'y', skeleton: 'dateTime' };
        }
        else {
            dateOptions = { format: 'y', skeleton: 'dateTime', calendar: 'islamic' };
        }
        yearHeading.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions);
        if (this.calendarMode === 'Gregorian') {
            dateOptions = { format: 'E', skeleton: 'dateTime' };
        }
        else {
            dateOptions = { format: 'E', skeleton: 'dateTime', calendar: 'islamic' };
        }
        daySpan.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions) + ', ';
        if (this.calendarMode === 'Gregorian') {
            dateOptions = { format: 'MMM d', skeleton: 'dateTime' };
        }
        else {
            dateOptions = { format: 'MMM d', skeleton: 'dateTime', calendar: 'islamic' };
        }
        monthSpan.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions);
        modelHeader.appendChild(yearHeading);
        h2.appendChild(daySpan);
        h2.appendChild(monthSpan);
        modelHeader.appendChild(h2);
        this.calendarElement.insertBefore(modelHeader, this.calendarElement.firstElementChild);
    };
    DatePicker.prototype.changeTrigger = function (event) {
        if (this.inputElement.value !== this.previousElementValue) {
            if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
                this.changedArgs.value = this.value;
                this.changedArgs.event = event || null;
                this.changedArgs.element = this.element;
                this.changedArgs.isInteracted = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(event);
                this.trigger('change', this.changedArgs);
                this.previousElementValue = this.inputElement.value;
                this.previousDate = !isNaN(+new Date(this.checkValue(this.value))) ? new Date(this.checkValue(this.value)) : null;
                this.isInteracted = true;
            }
        }
    };
    DatePicker.prototype.navigatedEvent = function () {
        this.trigger('navigated', this.navigatedArgs);
    };
    DatePicker.prototype.changeEvent = function (event) {
        if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
            this.selectCalendar(event);
            this.changedArgs.event = event ? event : null;
            this.changedArgs.element = this.element;
            this.changedArgs.isInteracted = this.isInteracted;
            this.trigger('change', this.changedArgs);
            this.previousDate = this.value && new Date(+this.value);
            this.hide(event);
            this.previousElementValue = this.inputElement.value;
            this.errorClass();
        }
    };
    DatePicker.prototype.requiredModules = function () {
        var modules = [];
        if (this) {
            modules.push({ args: [this], member: 'islamic' });
        }
        return modules;
    };
    DatePicker.prototype.selectCalendar = function (e) {
        var date;
        var tempFormat;
        var formatOptions;
        if (this.getModuleName() === 'datetimepicker') {
            tempFormat = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.dateTimeFormat;
        }
        else {
            tempFormat = this.formatString;
        }
        if (this.value) {
            if (this.getModuleName() === 'datetimepicker') {
                if (this.calendarMode === 'Gregorian') {
                    formatOptions = { format: tempFormat, type: 'dateTime', skeleton: 'yMd' };
                }
                else {
                    formatOptions = { format: tempFormat, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
                }
                date = this.globalize.formatDate(this.changedArgs.value, formatOptions);
            }
            else {
                if (this.calendarMode === 'Gregorian') {
                    formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };
                }
                else {
                    formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
                }
                date = this.globalize.formatDate(this.changedArgs.value, formatOptions);
            }
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(date)) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(date, this.inputElement, this.floatLabelType, this.showClearButton);
        }
    };
    DatePicker.prototype.isCalendar = function () {
        if (this.popupWrapper && this.popupWrapper.classList.contains('' + POPUPWRAPPER)) {
            return true;
        }
        return false;
    };
    DatePicker.prototype.setWidth = function (width) {
        if (typeof width === 'number') {
            this.inputWrapper.container.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width);
        }
        else if (typeof width === 'string') {
            this.inputWrapper.container.style.width = (width.match(/px|%|em/)) ? (this.width) : (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width));
        }
        else {
            this.inputWrapper.container.style.width = '100%';
        }
    };
    /**
     * Shows the Calendar.
     * @returns void
     */
    DatePicker.prototype.show = function (type, e) {
        var _this = this;
        if ((this.enabled && this.readonly) || !this.enabled || this.popupObj) {
            return;
        }
        else {
            var prevent_1 = true;
            var outOfRange = void 0;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && !(+this.value >= +this.min && +this.value <= +this.max)) {
                outOfRange = new Date(this.checkValue(this.value));
                this.setProperties({ 'value': null }, true);
            }
            else {
                outOfRange = this.value || null;
            }
            if (!this.isCalendar()) {
                _super.prototype.render.call(this);
                this.setProperties({ 'value': outOfRange || null }, true);
                this.previousDate = outOfRange;
                this.createCalendar();
            }
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                this.mobilePopupWrapper = this.createElement('div', { className: 'e-datepick-mob-popup-wrap' });
                document.body.appendChild(this.mobilePopupWrapper);
            }
            this.preventArgs = {
                preventDefault: function () {
                    prevent_1 = false;
                },
                popup: this.popupObj,
                event: e || null,
                cancel: false,
                appendTo: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? this.mobilePopupWrapper : document.body
            };
            var eventArgs = this.preventArgs;
            this.trigger('open', eventArgs, function (eventArgs) {
                _this.preventArgs = eventArgs;
                if (prevent_1 && !_this.preventArgs.cancel) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(_this.inputWrapper.buttons, ACTIVE);
                    _this.preventArgs.appendTo.appendChild(_this.popupWrapper);
                    _this.popupObj.refreshPosition(_this.inputElement);
                    var openAnimation = {
                        name: 'FadeIn',
                        duration: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 0 : OPENDURATION,
                    };
                    if (_this.zIndex === 1000) {
                        _this.popupObj.show(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](openAnimation), _this.element);
                    }
                    else {
                        _this.popupObj.show(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](openAnimation), null);
                    }
                    _super.prototype.setOverlayIndex.call(_this, _this.mobilePopupWrapper, _this.popupObj.element, _this.modal, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice);
                    _this.setAriaAttributes();
                }
                else {
                    _this.popupObj.destroy();
                    _this.popupWrapper = _this.popupObj = null;
                }
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown touchstart', _this.documentHandler, _this);
            });
        }
    };
    /**
     * Hide the Calendar.
     * @returns void
     */
    DatePicker.prototype.hide = function (event) {
        var _this = this;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupWrapper)) {
            var prevent_2 = true;
            this.preventArgs = {
                preventDefault: function () {
                    prevent_2 = false;
                },
                popup: this.popupObj,
                event: event || null,
                cancel: false
            };
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.inputWrapper.buttons, ACTIVE);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], OVERFLOW);
            var eventArgs = this.preventArgs;
            if (this.isCalendar()) {
                this.trigger('close', eventArgs, function (eventArgs) {
                    _this.closeEventCallback(prevent_2, eventArgs);
                });
            }
            else {
                this.closeEventCallback(prevent_2, eventArgs);
            }
        }
        else {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.allowEdit && !this.readonly) {
                this.inputElement.removeAttribute('readonly');
            }
            this.setAllowEdit();
        }
    };
    DatePicker.prototype.closeEventCallback = function (prevent, eventArgs) {
        this.preventArgs = eventArgs;
        if (this.isCalendar() && (prevent && !this.preventArgs.cancel)) {
            var closeAnimation = {
                name: 'FadeOut',
                duration: CLOSEDURATION,
            };
            this.popupObj.hide();
            this.isAltKeyPressed = false;
            this.keyboardModule.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.inputWrapper.buttons, ACTIVE);
        }
        this.setAriaAttributes();
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.modal) {
            this.modal.style.display = 'none';
            this.modal.outerHTML = '';
            this.modal = null;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.mobilePopupWrapper)) {
                this.mobilePopupWrapper.remove();
                this.mobilePopupWrapper = null;
            }
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown touchstart', this.documentHandler);
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.allowEdit && !this.readonly) {
            this.inputElement.removeAttribute('readonly');
        }
        this.setAllowEdit();
    };
    /**
     * Sets the focus to widget for interaction.
     * @returns void
     */
    DatePicker.prototype.focusIn = function (triggerEvent) {
        if (document.activeElement !== this.inputElement && this.enabled) {
            this.inputElement.focus();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [INPUTFOCUS]);
            var focusArguments = {
                model: this
            };
        }
    };
    /**
     * Remove the focus from widget, if the widget is in focus state.
     * @returns void
     */
    DatePicker.prototype.focusOut = function () {
        if (document.activeElement === this.inputElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [INPUTFOCUS]);
            this.inputElement.blur();
        }
    };
    /**
     * Gets the current view of the DatePicker.
     * @returns string
     */
    DatePicker.prototype.currentView = function () {
        var currentView;
        if (this.calendarElement) {
            // calls the Calendar currentView public method
            currentView = _super.prototype.currentView.call(this);
        }
        return currentView;
    };
    /**
     * Navigates to specified month or year or decade view of the DatePicker.
     * @param  {string} view - Specifies the view of the calendar.
     * @param  {Date} date - Specifies the focused date in a view.
     * @returns void
     */
    DatePicker.prototype.navigateTo = function (view, date) {
        if (this.calendarElement) {
            // calls the Calendar navigateTo public method
            _super.prototype.navigateTo.call(this, view, date);
        }
    };
    /**
     * To destroy the widget.
     * @returns void
     */
    DatePicker.prototype.destroy = function () {
        _super.prototype.destroy.call(this);
        this.keyboardModules.destroy();
        if (this.popupObj && this.popupObj.element.classList.contains(POPUP)) {
            _super.prototype.destroy.call(this);
        }
        var ariaAttrs = {
            'aria-live': 'assertive', 'aria-atomic': 'true', 'aria-disabled': 'true',
            'aria-haspopup': 'true', 'aria-activedescendant': 'null',
            'aria-owns': this.element.id + '_options', 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
            'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
        };
        if (this.inputElement) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].removeAttributes(ariaAttrs, this.inputElement);
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElementCopy.getAttribute('tabindex'))) ?
                this.inputElement.setAttribute('tabindex', this.tabIndex) : this.inputElement.removeAttribute('tabindex');
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'blur', this.inputBlurHandler);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'focus', this.inputFocusHandler);
            this.ensureInputAttribute();
        }
        if (this.isCalendar()) {
            if (this.popupWrapper) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.popupWrapper);
            }
            this.popupObj = this.popupWrapper = null;
            this.keyboardModule.destroy();
        }
        if (this.ngTag === null) {
            if (this.inputElement) {
                this.inputWrapper.container.insertAdjacentElement('afterend', this.inputElement);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputElement], [INPUTROOT]);
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [ROOT]);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.inputWrapper.container);
        }
        if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.resetFormHandler);
        }
    };
    DatePicker.prototype.ensureInputAttribute = function () {
        var prop = [];
        for (var i = 0; i < this.inputElement.attributes.length; i++) {
            prop[i] = this.inputElement.attributes[i].name;
        }
        for (var i = 0; i < prop.length; i++) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElementCopy.getAttribute(prop[i]))) {
                if (prop[i].toLowerCase() === 'value') {
                    this.inputElement.value = '';
                }
                this.inputElement.removeAttribute(prop[i]);
            }
            else {
                if (prop[i].toLowerCase() === 'value') {
                    this.inputElement.value = this.inputElementCopy.getAttribute(prop[i]);
                }
                this.inputElement.setAttribute(prop[i], this.inputElementCopy.getAttribute(prop[i]));
            }
        }
    };
    /**
     * Initialize the event handler
     * @private
     */
    DatePicker.prototype.preRender = function () {
        this.inputElementCopy = this.element.cloneNode(true);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputElementCopy], [ROOT, CONTROL, LIBRARY]);
        this.inputElement = this.element;
        this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');
        this.index = this.showClearButton ? 2 : 1;
        this.ngTag = null;
        if (this.element.tagName === 'EJS-DATEPICKER' || this.element.tagName === 'EJS-DATETIMEPICKER') {
            this.ngTag = this.element.tagName;
            this.inputElement = this.createElement('input');
            this.element.appendChild(this.inputElement);
        }
        if (this.element.getAttribute('id')) {
            if (this.ngTag !== null) {
                this.inputElement.id = this.element.getAttribute('id') + '_input';
            }
        }
        else {
            if (this.getModuleName() === 'datetimepicker') {
                this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('ej2-datetimepicker');
                if (this.ngTag !== null) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'id': this.element.id + '_input' });
                }
            }
            else {
                this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('ej2-datepicker');
                if (this.ngTag !== null) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'id': this.element.id + '_input' });
                }
            }
        }
        if (this.ngTag !== null) {
            this.validationAttribute(this.element, this.inputElement);
        }
        this.updateHtmlAttributeToElement();
        this.checkHtmlAttributes(true);
        this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
        this.element.removeAttribute('tabindex');
        _super.prototype.preRender.call(this);
    };
    ;
    DatePicker.prototype.validationAttribute = function (target, inputElement) {
        var nameAttribute = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
        inputElement.setAttribute('name', nameAttribute);
        target.removeAttribute('name');
        var attribute = ['required', 'aria-required', 'form'];
        for (var i = 0; i < attribute.length; i++) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target.getAttribute(attribute[i]))) {
                continue;
            }
            var attr = target.getAttribute(attribute[i]);
            inputElement.setAttribute(attribute[i], attr);
            target.removeAttribute(attribute[i]);
        }
    };
    DatePicker.prototype.checkFormat = function () {
        var culture = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        if (this.format) {
            if (typeof this.format === 'string') {
                this.formatString = this.format;
            }
            else if (this.format.skeleton !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.format.skeleton)) {
                var skeletonString = this.format.skeleton;
                if (this.getModuleName() === 'datetimepicker') {
                    this.formatString = culture.getDatePattern({ skeleton: skeletonString, type: 'dateTime' });
                }
                else {
                    this.formatString = culture.getDatePattern({ skeleton: skeletonString, type: 'date' });
                }
            }
            else {
                if (this.getModuleName() === 'datetimepicker') {
                    this.formatString = this.dateTimeFormat;
                }
                else {
                    this.formatString = null;
                }
            }
        }
        else {
            this.formatString = null;
        }
    };
    DatePicker.prototype.checkHtmlAttributes = function (dynamic) {
        this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        this.checkFormat();
        this.checkView();
        var attributes = ['value', 'min', 'max', 'disabled', 'readonly', 'style', 'name', 'placeholder', 'type'];
        var options;
        if (this.getModuleName() === 'datetimepicker') {
            if (this.calendarMode === 'Gregorian') {
                options = {
                    format: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.dateTimeFormat,
                    type: 'dateTime', skeleton: 'yMd'
                };
            }
            else {
                options = {
                    format: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.dateTimeFormat,
                    type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'
                };
            }
        }
        else {
            if (this.calendarMode === 'Gregorian') {
                options = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };
            }
            else {
                options = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
            }
        }
        for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
            var prop = attributes_1[_i];
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElement.getAttribute(prop))) {
                switch (prop) {
                    case 'disabled':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.datepickerOptions) || (this.datepickerOptions['enabled'] === undefined)) || !dynamic) {
                            var enabled = this.inputElement.getAttribute(prop) === 'disabled' || this.inputElement.getAttribute(prop) === '' ||
                                this.inputElement.getAttribute(prop) === 'true' ? false : true;
                            this.setProperties({ enabled: enabled }, dynamic);
                        }
                        break;
                    case 'readonly':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.datepickerOptions) || (this.datepickerOptions['readonly'] === undefined)) || !dynamic) {
                            var readonly = this.inputElement.getAttribute(prop) === 'readonly' || this.inputElement.getAttribute(prop) === '' ||
                                this.inputElement.getAttribute(prop) === 'true' ? true : false;
                            this.setProperties({ readonly: readonly }, dynamic);
                        }
                        break;
                    case 'placeholder':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.datepickerOptions) || (this.datepickerOptions['placeholder'] === undefined)) || !dynamic) {
                            var placeholder = this.inputElement.getAttribute(prop);
                            this.setProperties({ placeholder: this.inputElement.getAttribute(prop) }, dynamic);
                        }
                        break;
                    case 'style':
                        this.inputElement.setAttribute('style', '' + this.inputElement.getAttribute(prop));
                        break;
                    case 'name':
                        this.inputElement.setAttribute('name', '' + this.inputElement.getAttribute(prop));
                        break;
                    case 'value':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.datepickerOptions) || (this.datepickerOptions['value'] === undefined)) || !dynamic) {
                            var value = this.inputElement.getAttribute(prop);
                            this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, this.globalize.parseDate(value, options), {}), dynamic);
                        }
                        break;
                    case 'min':
                        if ((+this.min === +new Date(1900, 0, 1)) || !dynamic) {
                            this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, this.globalize.parseDate(this.inputElement.getAttribute(prop)), {}), dynamic);
                        }
                        break;
                    case 'max':
                        if ((+this.max === +new Date(2099, 11, 31)) || !dynamic) {
                            this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, this.globalize.parseDate(this.inputElement.getAttribute(prop)), {}), dynamic);
                        }
                        break;
                    case 'type':
                        if (this.inputElement.getAttribute(prop) !== 'text') {
                            this.inputElement.setAttribute('type', 'text');
                        }
                        break;
                }
            }
        }
    };
    /**
     * To get component name.
     * @private
     */
    DatePicker.prototype.getModuleName = function () {
        return 'datepicker';
    };
    DatePicker.prototype.disabledDates = function () {
        var valueCopy;
        var formatOptions;
        var globalize;
        valueCopy = this.checkDateValue(this.value) ? new Date(+this.value) : new Date(this.checkValue(this.value));
        var previousValCopy = this.previousDate;
        //calls the Calendar render method to check the disabled dates through renderDayCell event and update the input value accordingly.
        this.minMaxUpdates();
        _super.prototype.render.call(this);
        this.previousDate = previousValCopy;
        var date = valueCopy && +(valueCopy);
        var dateIdString = '*[id^="/id"]'.replace('/id', '' + date);
        if (!this.strictMode) {
            if (typeof this.value === 'string' || ((typeof this.value === 'object') && (+this.value) !== (+valueCopy))) {
                this.setProperties({ value: valueCopy }, true);
            }
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.calendarElement.querySelectorAll(dateIdString)[0])) {
            if (this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled')) {
                if (!this.strictMode) {
                    this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
                }
            }
        }
        var inputVal;
        if (this.getModuleName() === 'datetimepicker') {
            if (this.calendarMode === 'Gregorian') {
                globalize = this.globalize.formatDate(valueCopy, {
                    format: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.dateTimeFormat,
                    type: 'dateTime', skeleton: 'yMd'
                });
            }
            else {
                globalize = this.globalize.formatDate(valueCopy, {
                    format: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.dateTimeFormat,
                    type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'
                });
            }
            inputVal = globalize;
        }
        else {
            if (this.calendarMode === 'Gregorian') {
                formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };
            }
            else {
                formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
            }
            inputVal = this.globalize.formatDate(valueCopy, formatOptions);
        }
        if (!this.popupObj) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(inputVal, this.inputElement, this.floatLabelType, this.showClearButton);
        }
    };
    DatePicker.prototype.setAriaAttributes = function () {
        if (this.isCalendar()) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].addAttributes({ 'aria-expanded': 'true' }, this.inputElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
                'aria-activedescendant': '' + this.setActiveDescendant()
            });
        }
        else {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].addAttributes({ 'aria-expanded': 'false' }, this.inputElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
                'aria-activedescendant': 'null'
            });
        }
    };
    DatePicker.prototype.errorClass = function () {
        var dateIdString = '*[id^="/id"]'.replace('/id', '' + (+this.value));
        var isDisabledDate = this.calendarElement &&
            this.calendarElement.querySelectorAll(dateIdString)[0] &&
            this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');
        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && !(+new Date(+this.value).setMilliseconds(0) >= +this.min
            && +new Date(+this.value).setMilliseconds(0) <= +this.max))
            || (!this.strictMode && this.inputElement.value !== '' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || isDisabledDate)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], ERROR);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-invalid': 'true' });
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], ERROR);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-invalid': 'false' });
        }
    };
    /**
     * Called internally if any of the property value changed.
     * returns void
     * @private
     */
    DatePicker.prototype.onPropertyChanged = function (newProp, oldProp) {
        var options;
        if (this.calendarMode === 'Gregorian') {
            options = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };
        }
        else {
            options = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
        }
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'value':
                    this.isInteracted = false;
                    this.invalidValueString = null;
                    this.checkInvalidValue(newProp.value);
                    newProp.value = this.value;
                    this.previousElementValue = this.inputElement.value;
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
                        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
                        this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
                    }
                    this.updateInput();
                    if (+this.previousDate !== +this.value) {
                        this.changeTrigger(null);
                    }
                    break;
                case 'format':
                    this.checkFormat();
                    this.bindInputEvent();
                    this.updateInput();
                    break;
                case 'allowEdit':
                    this.setAllowEdit();
                    break;
                case 'placeholder':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setPlaceholder(this.placeholder, this.inputElement);
                    break;
                case 'readonly':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setReadonly(this.readonly, this.inputElement);
                    break;
                case 'enabled':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setEnabled(this.enabled, this.inputElement);
                    this.setAriaDisabled();
                    this.bindEvents();
                    break;
                case 'htmlAttributes':
                    this.updateHtmlAttributeToElement();
                    this.updateHtmlAttributeToWrapper();
                    this.checkHtmlAttributes(false);
                    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);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setPlaceholder(this.placeholder, this.inputElement);
                    this.updateInput();
                    break;
                case 'enableRtl':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setEnableRtl(this.enableRtl, [this.inputWrapper.container]);
                    break;
                case 'start':
                case 'depth':
                    this.checkView();
                    if (this.calendarElement) {
                        _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
                    }
                    break;
                case 'zIndex':
                    this.setProperties({ zIndex: newProp.zIndex }, true);
                    break;
                case 'cssClass':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setCssClass(newProp.cssClass, [this.inputWrapper.container], oldProp.cssClass);
                    if (this.popupWrapper) {
                        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setCssClass(newProp.cssClass, [this.popupWrapper], oldProp.cssClass);
                    }
                    break;
                case 'showClearButton':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setClearButton(this.showClearButton, this.inputElement, this.inputWrapper);
                    this.bindClearEvent();
                    break;
                case 'strictMode':
                    this.invalidValueString = null;
                    this.updateInput();
                    break;
                case 'width':
                    this.setWidth(newProp.width);
                    break;
                case 'floatLabelType':
                    this.floatLabelType = newProp.floatLabelType;
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].removeFloating(this.inputWrapper);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].addFloating(this.inputElement, this.floatLabelType, this.placeholder);
                    break;
                default:
                    if (this.calendarElement) {
                        _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
                    }
                    break;
            }
            this.hide(null);
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DatePicker.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DatePicker.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DatePicker.prototype, "strictMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DatePicker.prototype, "format", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], DatePicker.prototype, "enabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], DatePicker.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DatePicker.prototype, "values", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DatePicker.prototype, "isMultiSelection", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], DatePicker.prototype, "showClearButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], DatePicker.prototype, "allowEdit", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DatePicker.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)
    ], DatePicker.prototype, "zIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DatePicker.prototype, "readonly", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DatePicker.prototype, "placeholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')
    ], DatePicker.prototype, "floatLabelType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DatePicker.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DatePicker.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DatePicker.prototype, "blur", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DatePicker.prototype, "focus", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DatePicker.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DatePicker.prototype, "destroyed", void 0);
    DatePicker = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], DatePicker);
    return DatePicker;
}(_calendar_calendar__WEBPACK_IMPORTED_MODULE_3__["Calendar"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/datepicker/index.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/datepicker/index.js ***!
  \************************************************************************/
/*! exports provided: DatePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _datepicker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./datepicker */ "./node_modules/@syncfusion/ej2-calendars/src/datepicker/datepicker.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DatePicker", function() { return _datepicker__WEBPACK_IMPORTED_MODULE_0__["DatePicker"]; });

/**
 * Datepicker modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/daterangepicker/daterangepicker.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/daterangepicker/daterangepicker.js ***!
  \***************************************************************************************/
/*! exports provided: Presets, DateRangePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Presets", function() { return Presets; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateRangePicker", function() { return DateRangePicker; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _calendar_calendar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../calendar/calendar */ "./node_modules/@syncfusion/ej2-calendars/src/calendar/calendar.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-lists */ "./node_modules/@syncfusion/ej2-lists/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <reference path='../calendar/calendar-model.d.ts'/>









var DATERANGEWRAPPER = 'e-date-range-wrapper';
var INPUTCONTAINER = 'e-input-group';
var DATERANGEICON = 'e-input-group-icon e-range-icon e-icons';
var POPUP = 'e-popup';
var LEFTCALENDER = 'e-left-calendar';
var RIGHTCALENDER = 'e-right-calendar';
var LEFTCONTAINER = 'e-left-container';
var RIGHTCONTAINER = 'e-right-container';
var ROOT = 'e-daterangepicker';
var LIBRARY = 'e-lib';
var CONTROL = 'e-control';
var ERROR = 'e-error';
var ACTIVE = 'e-active';
var STARTENDCONTAINER = 'e-start-end';
var STARTDATE = 'e-start-date';
var ENDDATE = 'e-end-date';
var STARTBUTTON = 'e-start-btn';
var INPUTFOCUS = 'e-input-focus';
var ENDBUTTON = 'e-end-btn';
var RANGEHOVER = 'e-range-hover';
var OTHERMONTH = 'e-other-month';
var STARTLABEL = 'e-start-label';
var ENDLABEL = 'e-end-label';
var DISABLED = 'e-disabled';
var SELECTED = 'e-selected';
var CALENDAR = 'e-calendar';
var NEXTICON = 'e-next';
var PREVICON = 'e-prev';
var HEADER = 'e-header';
var TITLE = 'e-title';
var ICONCONTAINER = 'e-icon-container';
var RANGECONTAINER = 'e-date-range-container';
var RANGEHEADER = 'e-range-header';
var PRESETS = 'e-presets';
var FOOTER = 'e-footer';
var RANGEBORDER = 'e-range-border';
var TODAY = 'e-today';
var FOCUSDATE = 'e-focused-date';
var CONTENT = 'e-content';
var DAYSPAN = 'e-day-span';
var WEEKNUMBER = 'e-week-number';
var DATEDISABLED = 'e-date-disabled';
var ICONDISABLED = 'e-icon-disabled';
var CALENDARCONTAINER = 'e-calendar-container';
var SEPARATOR = 'e-separator';
var APPLY = 'e-apply';
var CANCEL = 'e-cancel';
var DEVICE = 'e-device';
var OVERLAY = 'e-overlay';
var CHANGEICON = 'e-change-icon e-icons';
var LISTCLASS = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_5__["cssClass"].li;
var RTL = 'e-rtl';
var HOVER = 'e-hover';
var OVERFLOW = 'e-range-overflow';
var OFFSETVALUE = 4;
var PRIMARY = 'e-primary';
var FLAT = 'e-flat';
var CSS = 'e-css';
var ZOOMIN = 'e-zoomin';
var NONEDITABLE = 'e-non-edit';
var DAYHEADERLONG = 'e-daterange-day-header-lg';
var wrapperAttr = ['title', 'class', 'style'];
var Presets = /** @class */ (function (_super) {
    __extends(Presets, _super);
    function Presets() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Presets.prototype, "label", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Presets.prototype, "start", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Presets.prototype, "end", void 0);
    return Presets;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Represents the DateRangePicker component that allows user to select the date range from the calendar
 * or entering the range through the input element.
 * ```html
 * <input id="daterangepicker"/>
 * ```
 * ```typescript
 * <script>
 *   var dateRangePickerObj = new DateRangePicker({ startDate: new Date("05/07/2017"), endDate: new Date("10/07/2017") });
 *   dateRangePickerObj.appendTo("#daterangepicker");
 * </script>
 * ```
 */
var DateRangePicker = /** @class */ (function (_super) {
    __extends(DateRangePicker, _super);
    /**
     * Constructor for creating the widget
     */
    function DateRangePicker(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.isCustomRange = false;
        _this.isCustomWindow = false;
        _this.presetsItem = [];
        _this.liCollections = [];
        _this.previousEleValue = '';
        _this.isKeyPopup = false;
        _this.dateDisabled = false;
        _this.isRangeIconClicked = false;
        _this.isMaxDaysClicked = false;
        _this.disabledDays = [];
        _this.preventBlur = false;
        _this.preventFocus = false;
        _this.invalidValueString = null;
        _this.dateRangeOptions = options;
        return _this;
    }
    /**
     * To Initialize the control rendering.
     * @return void
     * @private
     */
    DateRangePicker.prototype.render = function () {
        this.initialize();
        this.setProperties({ startDate: this.startValue }, true);
        this.setProperties({ endDate: this.endValue }, true);
        this.setModelValue();
    };
    /**
     * Initialize the event handler
     * @returns void
     * @private
     */
    DateRangePicker.prototype.preRender = function () {
        this.presetKeyConfig = {
            moveUp: 'uparrow',
            moveDown: 'downarrow',
            enter: 'enter',
            tab: 'tab',
            spacebar: 'space'
        };
        this.keyInputConfigs = {
            altDownArrow: 'alt+downarrow',
            escape: 'escape',
            enter: 'enter',
            tab: 'tab',
            altRightArrow: 'alt+rightarrow',
            altLeftArrow: 'alt+leftarrow'
        };
        this.defaultConstant = {
            placeholder: '',
            startLabel: 'Start Date',
            endLabel: 'End Date',
            customRange: 'Custom Range',
            applyText: 'Apply',
            cancelText: 'Cancel',
            selectedDays: 'Selected Days',
            days: 'days'
        };
        /**
         * Mobile View
         */
        this.isMobile = window.matchMedia('(max-width:550px)').matches;
        this.inputElement = this.element;
        this.angularTag = null;
        if (this.element.tagName === 'EJS-DATERANGEPICKER') {
            this.angularTag = this.element.tagName;
            this.inputElement = this.createElement('input');
            this.element.appendChild(this.inputElement);
        }
        this.cloneElement = this.element.cloneNode(true);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.cloneElement], [ROOT, CONTROL, LIBRARY]);
        this.updateHtmlAttributeToElement();
        if (this.element.getAttribute('id')) {
            if (this.angularTag !== null) {
                this.inputElement.id = this.element.getAttribute('id') + '_input';
            }
        }
        else {
            this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('ej2-datetimepicker');
            if (this.angularTag !== null) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'id': this.element.id + '_input' });
            }
        }
        this.checkInvalidRange(this.value);
        if (!this.invalidValueString && (typeof (this.value) === 'string')) {
            var rangeArray = this.value.split(' ' + this.separator + ' ');
            this.value = [new Date(rangeArray[0]), new Date(rangeArray[1])];
        }
        this.initProperty();
        this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
        this.element.removeAttribute('tabindex');
        _super.prototype.preRender.call(this);
        this.navNextFunction = this.navNextMonth.bind(this);
        this.navPrevFunction = this.navPrevMonth.bind(this);
        this.deviceNavNextFunction = this.deviceNavNext.bind(this);
        this.deviceNavPrevFunction = this.deviceNavPrevious.bind(this);
        this.initStartDate = this.checkDateValue(this.startValue);
        this.initEndDate = this.checkDateValue(this.endValue);
        this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
    };
    ;
    DateRangePicker.prototype.updateValue = function () {
        var dateOptions = { format: this.formatString, type: 'date', skeleton: 'yMd' };
        if (this.value && this.value.length > 0) {
            if (this.value[0] instanceof Date && !isNaN(+this.value[0])) {
                this.setProperties({ startDate: this.value[0] }, true);
                this.startValue = this.value[0];
            }
            else if (typeof this.value[0] === 'string') {
                if (+this.value[0] === 0 || isNaN(+(new Date(this.checkValue(this.value[0]))))) {
                    this.startValue = null;
                    this.setValue();
                }
                else {
                    this.setProperties({ startDate: new Date(this.checkValue(this.value[0])) }, true);
                    this.startValue = new Date(this.checkValue(this.value[0]));
                }
            }
            else {
                this.startValue = null;
                this.setValue();
            }
            if (this.value[1] instanceof Date && !isNaN(+this.value[1])) {
                this.setProperties({ endDate: this.value[1] }, true);
                this.endValue = this.value[1];
            }
            else if (typeof this.value[1] === 'string') {
                if (+this.value[0] === 0 || isNaN(+(new Date(this.checkValue(this.value[0]))))) {
                    this.setProperties({ endDate: null }, true);
                    this.endValue = null;
                    this.setValue();
                }
                else {
                    this.setProperties({ endDate: new Date(this.checkValue(this.value[1])) }, true);
                    this.endValue = new Date(this.checkValue(this.value[1]));
                    this.setValue();
                }
            }
            else {
                this.setProperties({ endDate: null }, true);
                this.endValue = null;
                this.setValue();
            }
        }
        else if (this.value && this.value.start) {
            if (this.value.start instanceof Date && !isNaN(+this.value.start)) {
                this.setProperties({ startDate: this.value.start }, true);
                this.startValue = this.value.start;
            }
            else if (typeof this.value.start === 'string') {
                this.setProperties({ startDate: new Date(this.checkValue(this.value.start)) }, true);
                this.startValue = new Date(this.checkValue(this.value.start));
            }
            else {
                this.startValue = null;
                this.setValue();
            }
            if (this.value.end instanceof Date && !isNaN(+this.value.end)) {
                this.setProperties({ endDate: this.value.end }, true);
                this.endValue = this.value.end;
            }
            else if (typeof this.value.end === 'string') {
                this.setProperties({ endDate: new Date(this.checkValue(this.value.end)) }, true);
                this.endValue = new Date(this.checkValue(this.value.end));
                this.setValue();
            }
            else {
                this.setProperties({ endDate: null }, true);
                this.endValue = null;
                this.setValue();
            }
        }
        else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.endValue = this.checkDateValue(new Date(this.checkValue(this.endDate)));
            this.startValue = this.checkDateValue(new Date(this.checkValue(this.startDate)));
            this.setValue();
        }
    };
    DateRangePicker.prototype.initProperty = function () {
        this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        this.checkFormat();
        this.checkView();
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.firstDayOfWeek) || this.firstDayOfWeek > 6 || this.firstDayOfWeek < 0) {
            this.setProperties({ firstDayOfWeek: this.globalize.getFirstDayOfWeek() }, true);
        }
        this.updateValue();
    };
    DateRangePicker.prototype.checkFormat = function () {
        if (this.format) {
            if (typeof this.format === 'string') {
                this.formatString = this.format;
            }
            else if (this.format.skeleton !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.format.skeleton)) {
                var skeletonString = this.format.skeleton;
                this.formatString = this.globalize.getDatePattern({ skeleton: skeletonString, type: 'date' });
            }
            else {
                this.formatString = null;
            }
        }
        else {
            this.formatString = null;
        }
    };
    DateRangePicker.prototype.initialize = function () {
        if (this.angularTag !== null) {
            this.validationAttribute(this.element, this.inputElement);
        }
        this.checkHtmlAttributes(true);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(this.keyConfigs, { shiftTab: 'shift+tab' });
        var start = this.checkDateValue(new Date(this.checkValue(this.startValue)));
        this.setProperties({ startDate: start }, true); // persist the value propeerty.
        this.setProperties({ endValue: this.checkDateValue(new Date(this.checkValue(this.endValue))) }, true);
        this.setValue();
        this.setProperties({ min: this.checkDateValue(new Date(this.checkValue(this.min))) }, true);
        this.setProperties({ max: this.checkDateValue(new Date(this.checkValue(this.max))) }, true);
        this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('daterangepicker', this.defaultConstant, this.locale);
        this.l10n.setLocale(this.locale);
        this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
        this.processPresets();
        this.createInput();
        this.updateHtmlAttributeToWrapper();
        this.setRangeAllowEdit();
        this.bindEvents();
    };
    DateRangePicker.prototype.setRangeAllowEdit = function () {
        if (this.allowEdit) {
            if (!this.readonly) {
                this.inputElement.removeAttribute('readonly');
            }
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'readonly': '' });
        }
        this.updateClearIconState();
    };
    DateRangePicker.prototype.updateClearIconState = function () {
        if (!this.allowEdit && this.inputWrapper && !this.readonly) {
            if (this.inputElement.value === '') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [NONEDITABLE]);
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [NONEDITABLE]);
            }
        }
        else if (this.inputWrapper) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [NONEDITABLE]);
        }
    };
    DateRangePicker.prototype.validationAttribute = function (element, input) {
        var name = element.getAttribute('name') ? element.getAttribute('name') : element.getAttribute('id');
        input.setAttribute('name', name);
        element.removeAttribute('name');
        var attributes = ['required', 'aria-required', 'form'];
        for (var i = 0; i < attributes.length; i++) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element.getAttribute(attributes[i]))) {
                continue;
            }
            var attr = element.getAttribute(attributes[i]);
            input.setAttribute(attributes[i], attr);
            element.removeAttribute(attributes[i]);
        }
    };
    DateRangePicker.prototype.updateHtmlAttributeToWrapper = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (wrapperAttr.indexOf(key) > -1) {
                if (key === 'class') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], this.htmlAttributes[key].split(' '));
                }
                else if (key === 'style') {
                    var dateRangeStyle = this.inputWrapper.container.getAttribute(key);
                    dateRangeStyle = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dateRangeStyle) ? (dateRangeStyle + this.htmlAttributes[key]) :
                        this.htmlAttributes[key];
                    this.inputWrapper.container.setAttribute(key, dateRangeStyle);
                }
                else {
                    this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
                }
            }
        }
    };
    DateRangePicker.prototype.updateHtmlAttributeToElement = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (wrapperAttr.indexOf(key) < 0) {
                this.inputElement.setAttribute(key, this.htmlAttributes[key]);
            }
        }
    };
    DateRangePicker.prototype.processPresets = function () {
        this.presetsItem = [];
        var i = 0;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
            for (var _i = 0, _a = this.presets; _i < _a.length; _i++) {
                var range = _a[_i];
                var id = range.label.replace(/\s+/g, '') + '_' + (++i);
                if (typeof range.end === 'string') {
                    this.presetsItem.push({
                        id: id, text: range.label, end: new Date(this.checkValue(range.end)), start: new Date(this.checkValue(range.start))
                    });
                }
                else {
                    this.presetsItem.push({ id: id, text: range.label, start: range.start, end: range.end });
                }
            }
            var startDate = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) ? null : new Date(+this.startValue);
            var endDate = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) ? null : new Date(+this.endValue);
            this.presetsItem.push({ id: 'custom_range', text: this.l10n.getConstant('customRange'), start: startDate, end: endDate });
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
                this.isCustomRange = true;
                this.activeIndex = this.presetsItem.length - 1;
            }
        }
    };
    DateRangePicker.prototype.bindEvents = function () {
        if (this.enabled) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'focus', this.inputFocusHandler, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'blur', this.inputBlurHandler, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'change', this.inputChangeHandler, this);
            if (this.showClearButton && this.inputWrapper.clearButton) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
            }
            if (!this.isMobile) {
                this.inputKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.inputElement, {
                    eventName: 'keydown', keyAction: this.inputHandler.bind(this), keyConfigs: this.keyInputConfigs
                });
            }
            if (this.formElement) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.formResetHandler, this);
            }
            this.inputElement.setAttribute('tabindex', this.tabIndex);
        }
        else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'blur', this.inputBlurHandler);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'focus', this.inputFocusHandler);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'change', this.inputChangeHandler);
            if (this.showClearButton && this.inputWrapper.clearButton) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
            }
            if (!this.isMobile) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputKeyboardModule)) {
                    this.inputKeyboardModule.destroy();
                }
            }
            if (this.formElement) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.formResetHandler);
            }
            this.inputElement.tabIndex = -1;
        }
    };
    DateRangePicker.prototype.updateHiddenInput = function () {
        if (this.firstHiddenChild && this.secondHiddenChild) {
            var format = { type: 'datetime', skeleton: 'yMd' };
            if (typeof this.startDate === 'string') {
                this.startDate = this.globalize.parseDate(this.startDate, format);
            }
            if (typeof this.endDate === 'string') {
                this.endDate = this.globalize.parseDate(this.endDate, format);
            }
            this.firstHiddenChild.value = (this.startDate && this.globalize.formatDate(this.startDate, format))
                || (this.inputElement.value);
            this.secondHiddenChild.value = (this.endDate && this.globalize.formatDate(this.endDate, format)) ||
                (this.inputElement.value);
            this.dispatchEvent(this.firstHiddenChild, 'focusout');
            this.dispatchEvent(this.firstHiddenChild, 'change');
        }
    };
    DateRangePicker.prototype.inputChangeHandler = function (e) {
        e.stopPropagation();
        this.updateHiddenInput();
    };
    DateRangePicker.prototype.bindClearEvent = function () {
        if (this.showClearButton && this.inputWrapper.clearButton) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
        }
    };
    DateRangePicker.prototype.resetHandler = function (e) {
        this.valueType = this.value;
        e.preventDefault();
        this.clear();
        this.changeTrigger(e);
        this.clearRange();
        this.hide(e);
    };
    DateRangePicker.prototype.restoreValue = function () {
        this.previousEleValue = this.inputElement.value;
        this.previousStartValue = this.startValue;
        this.previousEndValue = this.endValue;
        this.valueType = null;
        this.initStartDate = this.checkDateValue(this.startValue);
        this.initEndDate = this.checkDateValue(this.endValue);
        this.setValue();
        this.setModelValue();
    };
    DateRangePicker.prototype.formResetHandler = function (e) {
        if (this.formElement && (e.target === this.formElement) && !this.inputElement.disabled) {
            var val = this.inputElement.getAttribute('value');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startCopy)) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value.start)) {
                    this.setProperties({ value: { start: this.startCopy, end: this.endCopy } }, true);
                    this.startValue = this.value.start;
                    this.endValue = this.value.end;
                }
                else {
                    this.setProperties({ value: [this.startCopy, this.endCopy] }, true);
                    this.startValue = this.value[0];
                    this.endValue = this.value[1];
                }
                this.setProperties({ startDate: this.startValue, endDate: this.endValue }, true);
            }
            else {
                this.setProperties({ value: null, startDate: null, endDate: null }, true);
                this.startValue = this.endValue = null;
            }
            if (this.element.tagName === 'EJS-DATERANGEPICKER') {
                this.setProperties({ value: null, startDate: null, endDate: null }, true);
                val = '';
                this.startValue = this.endValue = null;
                this.inputElement.setAttribute('value', '');
            }
            this.restoreValue();
            if (this.inputElement) {
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(val, this.inputElement, this.floatLabelType, this.showClearButton);
                this.errorClass();
            }
        }
    };
    DateRangePicker.prototype.clear = function () {
        if (this.startValue !== null) {
            this.startValue = null;
        }
        if (this.endValue !== null) {
            this.endValue = null;
        }
        if (this.value && this.value.start) {
            this.setProperties({ value: { start: null, end: null } }, true);
        }
        if (this.value !== null && this.value.length > 0) {
            this.setProperties({ value: null }, true);
        }
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
        if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.applyButton))) {
            this.applyButton.disabled = this.applyButton.element.disabled = true;
        }
        this.removeSelection();
    };
    DateRangePicker.prototype.rangeIconHandler = function (e) {
        if (this.isMobile) {
            this.inputElement.setAttribute('readonly', '');
        }
        e.preventDefault();
        this.targetElement = null;
        if (this.isPopupOpen()) {
            this.applyFunction(e);
        }
        else {
            this.isRangeIconClicked = true;
            this.inputWrapper.container.children[0].focus();
            this.show(null, e);
            if (!this.isMobile) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.leftCalendar)) {
                    this.isRangeIconClicked = false;
                    this.calendarFocus();
                    this.isRangeIconClicked = true;
                }
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [INPUTFOCUS]);
        }
    };
    DateRangePicker.prototype.checkHtmlAttributes = function (isDynamic) {
        this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        var attributes;
        attributes = ['startDate', 'endDate', 'minDays', 'maxDays', 'min', 'max', 'disabled',
            'readonly', 'style', 'name', 'placeholder', 'type', 'value'];
        var format = { format: this.formatString, type: 'date', skeleton: 'yMd' };
        for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
            var prop = attributes_1[_i];
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElement.getAttribute(prop))) {
                switch (prop) {
                    case 'disabled':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateRangeOptions) || (this.dateRangeOptions['enabled'] === undefined)) || !isDynamic) {
                            var disabled = this.inputElement.getAttribute(prop) === 'disabled' ||
                                this.inputElement.getAttribute(prop) === '';
                            this.setProperties({ enabled: !disabled }, isDynamic);
                        }
                        break;
                    case 'readonly':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateRangeOptions) || (this.dateRangeOptions['readonly'] === undefined)) || !isDynamic) {
                            var readonly = this.inputElement.getAttribute(prop) === 'readonly' ||
                                this.inputElement.getAttribute(prop) === '';
                            this.setProperties({ readonly: readonly }, isDynamic);
                        }
                        break;
                    case 'placeholder':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateRangeOptions) || (this.dateRangeOptions['placeholder'] === undefined)) || !isDynamic) {
                            this.setProperties({ placeholder: this.inputElement.getAttribute(prop) }, isDynamic);
                        }
                        break;
                    case 'value':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateRangeOptions) || (this.dateRangeOptions['value'] === undefined)) || !isDynamic) {
                            var value = this.inputElement.getAttribute(prop);
                            this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, value, {}), isDynamic);
                        }
                        break;
                    case 'style':
                        this.inputElement.setAttribute('style', '' + this.inputElement.getAttribute(prop));
                        break;
                    case 'min':
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.min) || +this.min === +new Date(1900, 0, 1)) || !isDynamic) {
                            var dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
                            this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, dateValue, {}), isDynamic);
                        }
                        break;
                    case 'name':
                        this.inputElement.setAttribute('name', '' + this.inputElement.getAttribute(prop));
                        break;
                    case 'max':
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.max) || +this.max === +new Date(2099, 11, 31)) || !isDynamic) {
                            var dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
                            this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, dateValue, {}), isDynamic);
                        }
                        break;
                    case 'startDate':
                        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startDate)) {
                            var dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
                            this.startValue = dateValue;
                            this.setValue();
                        }
                        break;
                    case 'endDate':
                        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endDate)) {
                            var dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
                            this.endValue = dateValue;
                            this.setValue();
                        }
                        break;
                    case 'minDays':
                        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.minDays)) {
                            this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, parseInt(this.inputElement.getAttribute(prop), 10), {}), true);
                        }
                        break;
                    case 'maxDays':
                        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maxDays)) {
                            this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, parseInt(this.inputElement.getAttribute(prop), 10), {}), true);
                        }
                        break;
                    case 'type':
                        if (this.inputElement.getAttribute(prop) !== 'text') {
                            this.inputElement.setAttribute('type', 'text');
                        }
                        break;
                }
            }
        }
    };
    DateRangePicker.prototype.createPopup = function () {
        for (var i = 0; i < this.presetsItem.length; i++) {
            if ((i !== (this.presetsItem.length - 1)) && this.presetsItem[i].id === 'custom_range') {
                this.presetsItem.splice(i, 1);
            }
        }
        this.activeIndex = this.presetsItem.length - 1;
        this.isCustomRange = true;
        for (var i = 0; i <= this.presetsItem.length - 2; i++) {
            var startDate = this.presetsItem[i].start;
            var endDate = this.presetsItem[i].end;
            if (this.startValue && this.endValue) {
                if ((+startDate.setMilliseconds(0) === +this.startValue.setMilliseconds(0)) &&
                    (+endDate.setMilliseconds(0) === +this.endValue.setMilliseconds(0))) {
                    this.activeIndex = i;
                    this.isCustomRange = false;
                }
            }
        }
        this.popupWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { id: this.element.id + '_popup', className: ROOT + ' ' + POPUP });
        this.adjustLongHeaderWidth();
        var isPreset = (!this.isCustomRange || this.isMobile);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.presets[0].start && this.presets[0].end && this.presets[0].label) && isPreset) {
            this.isCustomWindow = false;
            this.createPresets();
            this.listRippleEffect();
            this.renderPopup();
        }
        else {
            this.isCustomWindow = true;
            this.renderControl();
        }
    };
    DateRangePicker.prototype.renderControl = function () {
        this.createControl();
        this.bindCalendarEvents();
        this.updateRange((this.isMobile ? [this.calendarElement] : [this.leftCalendar, this.rightCalendar]));
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            this.disabledDateRender();
        }
        this.updateHeader();
    };
    DateRangePicker.prototype.clearCalendarEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(this.leftCalPrevIcon);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(this.leftCalNextIcon);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(this.rightCalPrevIcon);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(this.rightCalNextIcon);
    };
    DateRangePicker.prototype.updateNavIcons = function () {
        if (this.isPopupOpen() && this.depth === this.currentView()) {
            var leftDate = new Date(this.checkValue(this.leftCalCurrentDate));
            var iconState = false;
            if (this.currentView() === 'Year') {
                iconState = (this.compareYears(leftDate, this.rightCalCurrentDate) < 1);
            }
            else if (this.currentView() === 'Decade') {
                iconState = (this.compareDecades(leftDate, this.rightCalCurrentDate) < 1);
            }
            else if (this.currentView() === 'Month') {
                iconState = (this.compareMonths(leftDate, this.rightCalCurrentDate) < 1);
            }
            this.previousIcon = this.rightCalPrevIcon;
            this.nextIcon = this.leftCalNextIcon;
            this.nextIconHandler(iconState);
            this.previousIconHandler(iconState);
        }
    };
    DateRangePicker.prototype.calendarIconEvent = function () {
        this.clearCalendarEvents();
        if (this.leftCalPrevIcon && !this.leftCalPrevIcon.classList.contains(DISABLED)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.leftCalPrevIcon, 'mousedown', this.navPrevFunction);
        }
        if (this.leftCalNextIcon && !this.leftCalNextIcon.classList.contains(DISABLED)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.leftCalNextIcon, 'mousedown', this.navNextFunction);
        }
        if (this.rightCalPrevIcon && !this.rightCalPrevIcon.classList.contains(DISABLED)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.rightCalPrevIcon, 'mousedown', this.navPrevFunction);
        }
        if (this.rightCalNextIcon && !this.rightCalNextIcon.classList.contains(DISABLED)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.rightCalNextIcon, 'mousedown', this.navNextFunction);
        }
    };
    DateRangePicker.prototype.bindCalendarEvents = function () {
        if (!this.isMobile) {
            this.updateNavIcons();
            this.calendarIconEvent();
            this.calendarIconRipple();
            this.headerTitleElement = this.popupObj.element.querySelector('.' + RIGHTCALENDER + ' .' + HEADER + ' .' + TITLE);
            this.headerTitleElement = this.popupObj.element.querySelector('.' + LEFTCALENDER + ' .' + HEADER + ' .' + TITLE);
            this.leftKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.leftCalendar, {
                eventName: 'keydown',
                keyAction: this.keyInputHandler.bind(this),
                keyConfigs: this.keyConfigs
            });
            this.rightKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.rightCalendar, {
                eventName: 'keydown',
                keyAction: this.keyInputHandler.bind(this),
                keyConfigs: this.keyConfigs
            });
        }
        else {
            this.deviceCalendarEvent();
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.startButton.element, 'click', this.deviceHeaderClick, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.endButton.element, 'click', this.deviceHeaderClick, this);
        }
        if (this.start === this.depth) {
            this.bindCalendarCellEvents();
        }
        this.removeFocusedDate();
    };
    DateRangePicker.prototype.calendarIconRipple = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.leftCalPrevIcon, { selector: '.e-prev', duration: 400, isCenterRipple: true });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.leftCalNextIcon, { selector: '.e-next', duration: 400, isCenterRipple: true });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.rightCalPrevIcon, { selector: '.e-prev', duration: 400, isCenterRipple: true });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.rightCalNextIcon, { selector: '.e-next', duration: 400, isCenterRipple: true });
    };
    DateRangePicker.prototype.deviceCalendarEvent = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(this.nextIcon);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(this.previousIcon);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.nextIcon, { selector: '.e-prev', duration: 400, isCenterRipple: true });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.previousIcon, { selector: '.e-next', duration: 400, isCenterRipple: true });
        if (this.nextIcon && !this.nextIcon.classList.contains(DISABLED)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.nextIcon, 'mousedown', this.deviceNavNextFunction);
        }
        if (this.previousIcon && !this.previousIcon.classList.contains(DISABLED)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.previousIcon, 'mousedown', this.deviceNavPrevFunction);
        }
    };
    DateRangePicker.prototype.deviceNavNext = function (e) {
        var calendar = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + CALENDAR);
        this.updateDeviceCalendar(calendar);
        this.navigateNext(e);
        this.deviceNavigation();
    };
    DateRangePicker.prototype.deviceNavPrevious = function (e) {
        var calendar = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + CALENDAR);
        this.updateDeviceCalendar(calendar);
        this.navigatePrevious(e);
        this.deviceNavigation();
    };
    DateRangePicker.prototype.updateDeviceCalendar = function (calendar) {
        if (calendar) {
            this.previousIcon = calendar.querySelector('.' + PREVICON);
            this.nextIcon = calendar.querySelector('.' + NEXTICON);
            this.calendarElement = calendar;
            this.deviceCalendar = calendar;
            this.contentElement = calendar.querySelector('.' + CONTENT);
            this.tableBodyElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CONTENT + ' tbody', calendar);
            this.table = calendar.querySelector('.' + CONTENT).getElementsByTagName('table')[0];
            this.headerTitleElement = calendar.querySelector('.' + HEADER + ' .' + TITLE);
            this.headerElement = calendar.querySelector('.' + HEADER);
        }
    };
    DateRangePicker.prototype.deviceHeaderClick = function (event) {
        var element = event.currentTarget;
        if (element.classList.contains(STARTBUTTON) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            this.endButton.element.classList.remove(ACTIVE);
            this.startButton.element.classList.add(ACTIVE);
            var calendar = this.popupObj.element.querySelector('.' + CALENDAR);
            this.updateDeviceCalendar(calendar);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.calendarElement.querySelector('.' + STARTDATE + ':not(.e-other-month)'))) {
                this.currentDate = new Date(+this.startValue);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.tableBodyElement);
                this.createContentBody();
                this.deviceNavigation();
            }
            this.removeClassDisabled();
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
            this.startButton.element.classList.remove(ACTIVE);
            this.endButton.element.classList.add(ACTIVE);
            var calendar = this.popupObj.element.querySelector('.' + CALENDAR);
            this.updateDeviceCalendar(calendar);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.calendarElement.querySelector('.' + ENDDATE + ':not(.e-other-month)'))) {
                this.currentDate = new Date(+this.endValue);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.tableBodyElement);
                this.createContentBody();
                this.deviceNavigation();
            }
            this.updateMinMaxDays(this.popupObj.element.querySelector('.' + CALENDAR));
            this.selectableDates();
        }
    };
    DateRangePicker.prototype.inputFocusHandler = function () {
        this.preventBlur = false;
        var focusArguments = {
            model: this
        };
        if (!this.preventFocus) {
            this.preventFocus = true;
            this.trigger('focus', focusArguments);
        }
        this.updateClearIconState();
        this.updateHiddenInput();
    };
    DateRangePicker.prototype.inputBlurHandler = function (e) {
        if (!this.preventBlur) {
            var value = this.inputElement.value;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.presetsItem)) {
                if (this.presetsItem.length > 0 && this.previousEleValue !== this.inputElement.value) {
                    this.activeIndex = this.presetsItem.length - 1;
                    this.isCustomRange = true;
                }
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && value.trim() !== '') {
                var range = value.split(' ' + this.separator + ' ');
                if (range.length > 1) {
                    this.invalidValueString = null;
                    var dateOptions = { format: this.formatString, type: 'date', skeleton: 'yMd' };
                    var startDate = this.globalize.parseDate(range[0].trim(), dateOptions);
                    var endDate = this.globalize.parseDate(range[1].trim(), dateOptions);
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(startDate) && !isNaN(+startDate) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(endDate) && !isNaN(+endDate)) {
                        this.startValue = startDate;
                        this.endValue = endDate;
                        this.setValue();
                        this.refreshControl();
                        if (value !== this.previousEleValue) {
                            this.changeTrigger(e);
                        }
                        if (!this.preventBlur && document.activeElement !== this.inputElement) {
                            this.preventFocus = false;
                            var blurArguments = {
                                model: this
                            };
                            this.trigger('blur', blurArguments);
                        }
                        this.updateHiddenInput();
                        return;
                    }
                    else {
                        if (!this.strictMode) {
                            this.startValue = null;
                            this.endValue = null;
                            this.setValue();
                        }
                    }
                }
                else {
                    if (!this.strictMode) {
                        this.startValue = null;
                        this.endValue = null;
                        this.setValue();
                    }
                }
            }
            if (!this.strictMode) {
                this.clearRange();
                this.startValue = null;
                this.endValue = null;
                this.setValue();
            }
            else {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && value.trim() === '') {
                    this.startValue = null;
                    this.endValue = null;
                }
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
                this.updateInput();
            }
            this.errorClass();
            this.changeTrigger(e);
            if (!this.preventBlur && document.activeElement !== this.inputElement) {
                this.preventFocus = false;
                var blurArguments = {
                    model: this
                };
                this.trigger('blur', blurArguments);
            }
        }
        this.updateHiddenInput();
    };
    DateRangePicker.prototype.clearRange = function () {
        this.previousStartValue = this.previousEndValue = null;
        this.currentDate = null;
    };
    DateRangePicker.prototype.errorClass = function () {
        var inputStr = this.inputElement.value.trim();
        if (((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && inputStr !== '') ||
            ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && +this.startValue < +this.min)
                || ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) && +this.startValue > +this.endValue)
                || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && +this.endValue > +this.max))
            || ((this.startValue && this.isDateDisabled(this.startValue))
                || (this.endValue && this.isDateDisabled(this.endValue)))) && inputStr !== '') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], ERROR);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-invalid': 'true' });
        }
        else {
            if (this.inputWrapper) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], ERROR);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-invalid': 'false' });
            }
        }
    };
    DateRangePicker.prototype.keyCalendarUpdate = function (isLeftCalendar, ele) {
        this.removeFocusedDate();
        if (isLeftCalendar) {
            this.leftCalCurrentDate = new Date(+this.currentDate);
            ele = this.leftCalendar;
        }
        else {
            this.rightCalCurrentDate = new Date(+this.currentDate);
            ele = this.rightCalendar;
        }
        this.updateCalendarElement(ele);
        this.table.focus();
        return ele;
    };
    DateRangePicker.prototype.navInCalendar = function (e, isLeftCalendar, leftLimit, rightLimit, ele) {
        var view = this.getViewNumber(this.currentView());
        var date;
        var min = this.min;
        var max;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maxDays) && this.isMaxDaysClicked && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            max = new Date(new Date(+this.startValue).setDate(this.startValue.getDate() + (this.maxDays - 1)));
        }
        else {
            max = this.max;
        }
        switch (e.action) {
            case 'moveRight':
                date = new Date(+this.currentDate);
                this.addDay(date, 1, e, max, min);
                if (isLeftCalendar && +date === +rightLimit) {
                    ele = this.keyCalendarUpdate(false, ele);
                }
                this.KeyboardNavigate(1, view, e, max, min);
                this.keyNavigation(ele, e);
                break;
            case 'moveLeft':
                date = new Date(+this.currentDate);
                this.addDay(date, -1, e, max, min);
                if (!isLeftCalendar) {
                    if (+date === +leftLimit) {
                        ele = this.keyCalendarUpdate(true, ele);
                    }
                }
                this.KeyboardNavigate(-1, view, e, max, min);
                this.keyNavigation(ele, e);
                break;
            case 'moveUp':
                if (view === 0) {
                    date = new Date(+this.currentDate);
                    this.addDay(date, -7, e, max, min);
                    if (+date <= +leftLimit && !isLeftCalendar) {
                        ele = this.keyCalendarUpdate(true, ele);
                    }
                    this.KeyboardNavigate(-7, view, e, max, min);
                }
                else {
                    this.KeyboardNavigate(-4, view, e, this.max, this.min); // move the current year to the previous four days.
                }
                this.keyNavigation(ele, e);
                break;
            case 'moveDown':
                if (view === 0) {
                    date = new Date(+this.currentDate);
                    this.addDay(date, 7, e, max, min);
                    if (isLeftCalendar && +date >= +rightLimit) {
                        ele = this.keyCalendarUpdate(false, ele);
                    }
                    this.KeyboardNavigate(7, view, e, max, min);
                }
                else {
                    this.KeyboardNavigate(4, view, e, this.max, this.min);
                }
                this.keyNavigation(ele, e);
                break;
            case 'home':
                this.currentDate = this.firstDay(this.currentDate);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.tableBodyElement);
                (view === 0) ? this.renderMonths(e) : ((view === 1) ? this.renderYears(e) : this.renderDecades(e));
                this.keyNavigation(ele, e);
                break;
            case 'end':
                this.currentDate = this.lastDay(this.currentDate, view);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.tableBodyElement);
                (view === 0) ? this.renderMonths(e) : ((view === 1) ? this.renderYears(e) : this.renderDecades(e));
                this.keyNavigation(ele, e);
                break;
        }
    };
    // tslint:disable-next-line:max-func-body-length
    DateRangePicker.prototype.keyInputHandler = function (e, value) {
        var date;
        var view = this.getViewNumber(this.currentView());
        var rightDateLimit = new Date(this.rightCalCurrentDate.getFullYear(), this.rightCalCurrentDate.getMonth(), 1);
        var leftDateLimit = new Date(this.leftCalCurrentDate.getFullYear(), this.leftCalCurrentDate.getMonth() + 1, 0);
        var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + RIGHTCALENDER);
        ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele) ? this.leftCalendar : ele;
        var isLeftCalendar = ele.classList.contains(LEFTCALENDER);
        this.updateCalendarElement(ele);
        var selectedDate = this.tableBodyElement.querySelector('tr td.e-selected');
        var focusedDate = ele.querySelector('tr td.' + FOCUSDATE);
        var startDate = ele.querySelector('tr td.' + STARTDATE);
        var endDate = ele.querySelector('tr td.' + ENDDATE);
        var depthValue = this.getViewNumber(this.depth);
        var levelRestrict = (view === depthValue && this.getViewNumber(this.start) >= depthValue);
        var leftCalendar = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + LEFTCALENDER);
        var rightCalendar = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + RIGHTCALENDER);
        var presetElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + PRESETS);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(focusedDate)) {
            this.currentDate = this.currentDate;
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(endDate) && !this.dateDisabled) {
            this.currentDate = new Date(+this.endValue);
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(startDate) && !this.dateDisabled) {
            this.currentDate = new Date(+this.startValue);
        }
        else if (!this.dateDisabled) {
            this.currentDate.setDate(1);
        }
        this.effect = '';
        switch (e.action) {
            case 'altUpArrow':
                if (this.isPopupOpen()) {
                    this.hide(e);
                    this.preventFocus = true;
                    this.inputElement.focus();
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [INPUTFOCUS]);
                }
                break;
            case 'select':
                if (levelRestrict) {
                    var element = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(focusedDate) ? focusedDate : startDate;
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element) && !element.classList.contains(DISABLED)) {
                        this.selectRange(null, (element));
                    }
                }
                else {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedDate) && !levelRestrict || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(focusedDate)) {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
                            if (this.calendarElement.classList.contains(LEFTCALENDER)) {
                                value = this.startDate;
                            }
                            else {
                                value = this.endDate;
                            }
                        }
                        this.controlDown = e;
                        this.contentClick(null, --view, (focusedDate || selectedDate), value);
                    }
                }
                e.preventDefault();
                break;
            case 'controlHome':
                var yearDate = new Date(this.currentDate.getFullYear(), 0, 1);
                if (!isLeftCalendar && +yearDate < +leftDateLimit) {
                    ele = this.keyCalendarUpdate(true, ele);
                }
                _super.prototype.navigateTo.call(this, 'Month', new Date(this.currentDate.getFullYear(), 0, 1));
                this.keyNavigation(ele, e);
                break;
            case 'altRightArrow':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(leftCalendar)) {
                    this.rightCalendar.children[1].firstElementChild.focus();
                }
                else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(rightCalendar)) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.presetElement)) {
                        this.presetElement.focus();
                        this.removeFocusedDate();
                    }
                    else {
                        this.cancelButton.element.focus();
                    }
                }
                else {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(presetElement)) {
                        this.cancelButton.element.focus();
                    }
                }
                e.preventDefault();
                break;
            case 'altLeftArrow':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(leftCalendar)) {
                    if (this.applyButton.element.disabled !== true) {
                        this.applyButton.element.focus();
                    }
                    else {
                        this.cancelButton.element.focus();
                    }
                }
                else {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(rightCalendar)) {
                        this.leftCalendar.children[1].firstElementChild.focus();
                    }
                }
                e.preventDefault();
                break;
            case 'controlUp':
                if (this.calendarElement.classList.contains(LEFTCALENDER)) {
                    this.calendarNavigation(e, this.calendarElement);
                }
                else {
                    this.calendarNavigation(e, this.calendarElement);
                }
                e.preventDefault();
                break;
            case 'controlDown':
                if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedDate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(focusedDate)) && !levelRestrict) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
                        if (this.calendarElement.classList.contains(LEFTCALENDER)) {
                            value = this.startDate;
                        }
                        else {
                            value = this.endDate;
                        }
                    }
                    this.controlDown = e;
                    this.contentClick(null, --view, (selectedDate || focusedDate), value);
                }
                e.preventDefault();
                break;
            case 'controlEnd':
                yearDate = new Date(this.currentDate.getFullYear(), 11, 31);
                if (isLeftCalendar && +yearDate > +rightDateLimit) {
                    ele = this.keyCalendarUpdate(false, ele);
                }
                _super.prototype.navigateTo.call(this, 'Month', new Date(this.currentDate.getFullYear(), 11, 31));
                this.keyNavigation(ele, e);
                break;
            case 'pageUp':
                date = new Date(+this.currentDate);
                this.addMonths(date, -1);
                if (!isLeftCalendar && +date <= +leftDateLimit) {
                    ele = this.keyCalendarUpdate(true, ele);
                }
                this.addMonths(this.currentDate, -1);
                _super.prototype.navigateTo.call(this, 'Month', this.currentDate);
                this.keyNavigation(ele, e);
                break;
            case 'pageDown':
                date = new Date(+this.currentDate);
                this.addMonths(date, 1);
                if (isLeftCalendar && +date >= +rightDateLimit) {
                    ele = this.keyCalendarUpdate(false, ele);
                }
                this.addMonths(this.currentDate, 1);
                _super.prototype.navigateTo.call(this, 'Month', this.currentDate);
                this.keyNavigation(ele, e);
                break;
            case 'shiftPageUp':
                date = new Date(+this.currentDate);
                this.addYears(date, -1);
                if (!isLeftCalendar && +date <= +leftDateLimit) {
                    ele = this.keyCalendarUpdate(true, ele);
                }
                this.addYears(this.currentDate, -1);
                _super.prototype.navigateTo.call(this, 'Month', this.currentDate);
                this.keyNavigation(ele, e);
                break;
            case 'shiftPageDown':
                date = new Date(+this.currentDate);
                this.addYears(date, 1);
                if (isLeftCalendar && +date >= +rightDateLimit) {
                    ele = this.keyCalendarUpdate(false, ele);
                }
                this.addYears(this.currentDate, 1);
                _super.prototype.navigateTo.call(this, 'Month', this.currentDate);
                this.keyNavigation(ele, e);
                break;
            case 'shiftTab':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.presetElement)) {
                    this.presetElement.setAttribute('tabindex', '0');
                    this.presetElement.focus();
                    this.removeFocusedDate();
                }
                e.preventDefault();
                break;
            case 'spacebar':
                if (this.applyButton && !this.applyButton.disabled) {
                    this.applyFunction(e);
                }
                break;
            default:
                this.navInCalendar(e, isLeftCalendar, leftDateLimit, rightDateLimit, ele);
                this.checkMinMaxDays();
        }
        this.presetHeight();
    };
    DateRangePicker.prototype.keyNavigation = function (calendar, e) {
        this.bindCalendarCellEvents(calendar);
        if (calendar.classList.contains(LEFTCALENDER)) {
            this.leftCalCurrentDate = new Date(+this.currentDate);
        }
        else {
            this.rightCalCurrentDate = new Date(+this.currentDate);
        }
        this.updateNavIcons();
        this.calendarIconEvent();
        this.updateRange([calendar]);
        this.dateDisabled = this.isDateDisabled(this.currentDate);
        e.preventDefault();
    };
    DateRangePicker.prototype.inputHandler = function (e) {
        switch (e.action) {
            case 'altDownArrow':
                if (!this.isPopupOpen()) {
                    if (this.inputElement.value === '') {
                        this.clear();
                        this.changeTrigger(e);
                        this.clearRange();
                    }
                    this.show(null, e);
                    this.isRangeIconClicked = false;
                    if (!this.isMobile) {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.leftCalendar)) {
                            this.calendarFocus();
                        }
                    }
                    this.isKeyPopup = true;
                }
                break;
            case 'escape':
                if (this.isPopupOpen()) {
                    this.hide(e);
                }
                break;
            case 'enter':
                if (document.activeElement === this.inputElement) {
                    this.inputBlurHandler(e);
                    this.hide(e);
                }
                break;
            case 'tab':
                if (document.activeElement === this.inputElement && this.isPopupOpen()) {
                    this.hide(e);
                    e.preventDefault();
                }
                break;
        }
    };
    DateRangePicker.prototype.bindCalendarCellEvents = function (calendar) {
        var tdCells;
        if (calendar) {
            tdCells = calendar.querySelectorAll('.' + CALENDAR + ' td');
        }
        else {
            tdCells = this.popupObj.element.querySelectorAll('.' + CALENDAR + ' td');
        }
        for (var _i = 0, tdCells_1 = tdCells; _i < tdCells_1.length; _i++) {
            var cell = tdCells_1[_i];
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(cell);
            var disabledCell = void 0;
            disabledCell = cell.classList.contains(DISABLED) || cell.classList.contains(DATEDISABLED);
            if (!disabledCell && !cell.classList.contains(WEEKNUMBER)) {
                if (!this.isMobile) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(cell, 'mouseover', this.hoverSelection, this);
                }
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(cell, 'mousedown', this.selectRange, this);
            }
        }
    };
    DateRangePicker.prototype.removeFocusedDate = function () {
        var isDate = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue);
        var focusedDate;
        focusedDate = this.popupObj.element.querySelectorAll('.' + CALENDAR + ' .' + FOCUSDATE);
        for (var _i = 0, focusedDate_1 = focusedDate; _i < focusedDate_1.length; _i++) {
            var ele = focusedDate_1[_i];
            var today = new Date();
            var eleDate = this.getIdValue(null, ele);
            if ((this.depth === 'Month' && this.currentView() === 'Month' &&
                (!ele.classList.contains(TODAY) || (ele.classList.contains(TODAY) && isDate)))
                || (this.depth === 'Year' && this.currentView() === 'Year' &&
                    ((!this.isSameMonth(today, eleDate) && !this.isSameYear(today, eleDate)) || isDate))
                || (this.depth === 'Decade' && this.currentView() === 'Decade' &&
                    (!this.isSameYear(today, eleDate) || isDate))) {
                ele.classList.remove(FOCUSDATE);
                if (!ele.classList.contains(STARTDATE) && !ele.classList.contains(ENDDATE)) {
                    ele.removeAttribute('aria-label');
                }
            }
        }
    };
    DateRangePicker.prototype.hoverSelection = function (event, element) {
        var currentElement = element || event.currentTarget;
        var currentDate = this.getIdValue(null, currentElement);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && +this.startValue >= +this.min && +this.startValue <= +this.max) {
            if ((!this.isDateDisabled(this.endValue) && !this.isDateDisabled(this.startValue)
                && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue))
                || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue))) {
                var tdCells = void 0;
                tdCells = this.popupObj.element.querySelectorAll('.' + CALENDAR + ' td');
                for (var _i = 0, tdCells_2 = tdCells; _i < tdCells_2.length; _i++) {
                    var ele = tdCells_2[_i];
                    var isDisabledCell = (!ele.classList.contains(DISABLED) || ele.classList.contains(DATEDISABLED));
                    if (!ele.classList.contains(WEEKNUMBER) && isDisabledCell) {
                        var eleDate = this.getIdValue(null, ele);
                        var startDateValue = new Date(+this.startValue);
                        var eleDateValue = new Date(+eleDate);
                        if (eleDateValue.setHours(0, 0, 0, 0) >= startDateValue.setHours(0, 0, 0, 0) && +eleDate <= +currentDate) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], RANGEHOVER);
                        }
                        else {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele], [RANGEHOVER]);
                        }
                    }
                }
            }
        }
    };
    DateRangePicker.prototype.isSameStartEnd = function (startVal, endVal) {
        var isSame = false;
        if (this.depth === 'Month') {
            if ((startVal).setHours(0, 0, 0, 0) === (endVal).setHours(0, 0, 0, 0)) {
                isSame = true;
            }
        }
        else if (this.depth === 'Year') {
            if ((startVal.getFullYear() === endVal.getFullYear()) &&
                (startVal.getMonth() === endVal.getMonth())) {
                isSame = true;
            }
        }
        else if (this.depth === 'Decade') {
            if (startVal.getFullYear() === endVal.getFullYear()) {
                isSame = true;
            }
        }
        return isSame;
    };
    DateRangePicker.prototype.updateRange = function (elementCollection) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            for (var _i = 0, elementCollection_1 = elementCollection; _i < elementCollection_1.length; _i++) {
                var calendar = elementCollection_1[_i];
                var tdCells = calendar.querySelectorAll('.' + CALENDAR + ' td');
                for (var _a = 0, tdCells_3 = tdCells; _a < tdCells_3.length; _a++) {
                    var ele = tdCells_3[_a];
                    if (!ele.classList.contains(WEEKNUMBER) && !ele.classList.contains(DISABLED)) {
                        var eleDate = this.getIdValue(null, ele);
                        var eleDateValue = this.getIdValue(null, ele);
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
                            if (this.currentView() === this.depth &&
                                +eleDateValue.setHours(0, 0, 0, 0) >= +new Date(+this.startValue).setHours(0, 0, 0, 0)
                                && +eleDateValue.setHours(0, 0, 0, 0) <= +new Date(+this.endValue).setHours(0, 0, 0, 0) &&
                                !this.isSameStartEnd(new Date(+this.startValue), new Date(+this.endValue)) &&
                                +new Date(+this.startValue).setHours(0, 0, 0, 0) >= +this.min
                                && +new Date(+this.endValue).setHours(0, 0, 0, 0) <= +this.max
                                && !(this.isDateDisabled(this.startValue) || this.isDateDisabled(this.endValue))) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], RANGEHOVER);
                            }
                        }
                        else {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele], [RANGEHOVER]);
                        }
                        if (!ele.classList.contains(OTHERMONTH)) {
                            var startDateValue = new Date(+this.startValue);
                            var eleDateValue_1 = new Date(+eleDate);
                            if (this.currentView() === this.depth &&
                                +eleDateValue_1.setHours(0, 0, 0, 0) === +startDateValue.setHours(0, 0, 0, 0)
                                && +eleDateValue_1.setHours(0, 0, 0, 0) >= +startDateValue.setHours(0, 0, 0, 0) &&
                                +this.startValue >= +this.min
                                && !this.inputWrapper.container.classList.contains('e-error')
                                && !(this.isDateDisabled(this.startValue) || this.isDateDisabled(this.endValue))) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], [STARTDATE, SELECTED]);
                                this.addSelectedAttributes(ele, this.startValue, true);
                            }
                            var endDateValue = new Date(+this.endValue);
                            if (this.currentView() === 'Year') {
                                eleDateValue_1 = new Date(eleDateValue_1.getFullYear(), eleDateValue_1.getMonth() + 1, 0);
                            }
                            else if (this.currentView() === 'Decade') {
                                eleDateValue_1 = new Date(eleDateValue_1.getFullYear(), 11, 31);
                            }
                            if (this.currentView() === this.depth &&
                                !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) &&
                                +eleDateValue_1.setHours(0, 0, 0, 0) === +endDateValue.setHours(0, 0, 0, 0)
                                && +eleDateValue_1.setHours(0, 0, 0, 0) <= +endDateValue.setHours(0, 0, 0, 0) &&
                                +this.startValue >= +this.min
                                && !this.inputWrapper.container.classList.contains('e-error')
                                && !(this.isDateDisabled(this.startValue) || this.isDateDisabled(this.endValue))) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], [ENDDATE, SELECTED]);
                                this.addSelectedAttributes(ele, this.startValue, false);
                            }
                            if (+eleDate === +this.startValue && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && +eleDate === +this.endValue) {
                                this.addSelectedAttributes(ele, this.endValue, false, true);
                            }
                        }
                    }
                }
            }
        }
    };
    DateRangePicker.prototype.checkMinMaxDays = function () {
        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.minDays) && this.minDays > 0) || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maxDays) && this.maxDays > 0)) {
            if (!this.isMobile) {
                this.updateMinMaxDays(this.popupObj.element.querySelector('.' + LEFTCALENDER));
                this.updateMinMaxDays(this.popupObj.element.querySelector('.' + RIGHTCALENDER));
            }
            else {
                this.updateMinMaxDays(this.popupObj.element.querySelector('.' + CALENDAR));
            }
        }
    };
    DateRangePicker.prototype.rangeArgs = function (e) {
        var inputValue;
        var range;
        var startDate = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) ?
            this.globalize.formatDate(this.startValue, { format: this.formatString, type: 'date', skeleton: 'yMd' }) : null;
        var endDate = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) ?
            this.globalize.formatDate(this.endValue, { format: this.formatString, type: 'date', skeleton: 'yMd' }) : null;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            inputValue = startDate + ' ' + this.separator + ' ' + endDate;
            range = (Math.round(Math.abs((this.startValue.getTime() - this.endValue.getTime()) / (1000 * 60 * 60 * 24))) + 1);
        }
        else {
            inputValue = '';
            range = 0;
        }
        var args = {
            value: this.value,
            startDate: this.startValue,
            endDate: this.endValue,
            daySpan: range,
            event: e || null,
            element: this.element,
            isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
            text: inputValue
        };
        return args;
    };
    DateRangePicker.prototype.otherMonthSelect = function (ele, isStartDate, sameDate) {
        var value = +this.getIdValue(null, ele);
        var dateIdString = '*[id^="/id"]:not(.e-other-month)'.replace('/id', '' + value);
        var tdCell = this.popupObj && this.popupObj.element.querySelector(dateIdString);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tdCell)) {
            if (isStartDate) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdCell], [STARTDATE, SELECTED]);
                this.addSelectedAttributes(tdCell, this.startValue, true);
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([tdCell], [ENDDATE, SELECTED]);
                this.addSelectedAttributes(tdCell, this.endValue, true);
            }
            if (sameDate) {
                this.addSelectedAttributes(ele, this.endValue, false, true);
            }
        }
    };
    // tslint:disable-next-line:max-func-body-length
    DateRangePicker.prototype.selectRange = function (event, element) {
        var leftCalendar;
        var rightCalendar;
        if (event) {
            event.preventDefault();
        }
        var date;
        date = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(event) ? this.getIdValue(null, element)
            : this.getIdValue(event, null);
        var y = date.getFullYear();
        var m = date.getMonth();
        var firstDay = new Date(y, m, 1);
        var lastDay = new Date(y, m + 1, 0);
        var firstMonth = new Date(y, 0, 1);
        var lastMonth = new Date(y, 11, 31);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            if (!this.isMobile || this.isMobile && !this.endButton.element.classList.contains(ACTIVE)) {
                this.removeSelection();
            }
        }
        else if (this.isMobile && this.startButton.element.classList.contains(ACTIVE)) {
            this.removeSelection();
        }
        var ele = element || event.currentTarget;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.previousStartValue)) {
                date.setHours(this.previousStartValue.getHours());
                date.setMinutes(this.previousStartValue.getMinutes());
                date.setSeconds(this.previousStartValue.getSeconds());
            }
            this.startValue = (this.depth === 'Month') ? new Date(this.checkValue(date)) :
                (this.depth === 'Year') ? firstDay : firstMonth;
            this.endValue = null;
            this.setValue();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], STARTDATE);
            this.addSelectedAttributes(ele, this.startValue, true);
            if (ele.classList.contains(OTHERMONTH)) {
                this.otherMonthSelect(ele, true);
            }
            this.checkMinMaxDays();
            this.applyButton.disabled = true;
            this.applyButton.element.disabled = true;
            if (this.isMobile) {
                this.endButton.element.classList.add(ACTIVE);
                this.startButton.element.classList.remove(ACTIVE);
                this.endButton.element.removeAttribute('disabled');
                this.selectableDates();
            }
            this.trigger('select', this.rangeArgs(event));
        }
        else {
            if (+date === +this.startValue || +date > +this.startValue) {
                if (+date === +this.startValue && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.minDays) && this.minDays > 1) {
                    return;
                }
                this.endValue = null;
                this.setValue();
                if (this.isMobile || element) {
                    this.hoverSelection(event, element);
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.previousEndValue)) {
                    date.setHours(this.previousEndValue.getHours());
                    date.setMinutes(this.previousEndValue.getMinutes());
                    date.setSeconds(this.previousEndValue.getSeconds());
                }
                this.endValue = (this.depth === 'Month') ? new Date(this.checkValue(date)) :
                    (this.depth === 'Year') ? lastDay : lastMonth;
                this.setValue();
                var endEle = this.popupObj.element.querySelectorAll('.' + ENDDATE);
                if (this.isMobile) {
                    this.startButton.element.classList.remove(ACTIVE);
                    this.endButton.element.classList.add(ACTIVE);
                    for (var _i = 0, endEle_1 = endEle; _i < endEle_1.length; _i++) {
                        var ele_1 = endEle_1[_i];
                        ele_1.removeAttribute('aria-label');
                        if (!ele_1.classList.contains(STARTDATE)) {
                            ele_1.setAttribute('aria-selected', 'false');
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele_1], [ENDDATE, SELECTED]);
                        }
                        else {
                            this.addSelectedAttributes(ele_1, this.startValue, true);
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele_1], [ENDDATE]);
                        }
                    }
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], ENDDATE);
                if (+this.endValue === +this.startValue) {
                    this.addSelectedAttributes(ele, this.endValue, false, true);
                }
                else {
                    this.addSelectedAttributes(ele, this.endValue, false);
                }
                if (ele.classList.contains(OTHERMONTH)) {
                    if (+this.endValue === +this.startValue) {
                        this.otherMonthSelect(ele, false, true);
                    }
                    else {
                        this.otherMonthSelect(ele, false);
                    }
                }
                endEle = this.popupObj.element.querySelectorAll('.' + ENDDATE);
                for (var _a = 0, endEle_2 = endEle; _a < endEle_2.length; _a++) {
                    var ele_2 = endEle_2[_a];
                    if (ele_2.classList.contains(STARTDATE)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele_2], [RANGEHOVER]);
                    }
                }
                this.applyButton.disabled = false;
                this.applyButton.element.disabled = false;
                if (!this.isMobile) {
                    this.removeClassDisabled();
                }
                this.disabledDateRender();
                this.trigger('select', this.rangeArgs(event));
            }
            else if (+date < +this.startValue) {
                this.removeClassDisabled();
                this.startValue = (this.depth === 'Month') ? new Date(this.checkValue(date)) :
                    (this.depth === 'Year') ? firstDay : firstMonth;
                this.setValue();
                this.removeSelectedAttributes();
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.popupObj.element.querySelectorAll('.' + STARTDATE), [STARTDATE, SELECTED]);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], STARTDATE);
                this.addSelectedAttributes(ele, this.startValue, true);
                if (ele.classList.contains(OTHERMONTH)) {
                    this.otherMonthSelect(ele, true);
                }
                this.checkMinMaxDays();
            }
        }
        if (event) {
            leftCalendar = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(event.target, '.' + LEFTCALENDER);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(leftCalendar)) {
            this.leftCalendar.children[1].firstElementChild.focus();
        }
        else {
            if (event) {
                rightCalendar = event && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(event.target, '.' + RIGHTCALENDER);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(rightCalendar)) {
                this.rightCalendar.children[1].firstElementChild.focus();
            }
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], SELECTED);
        this.updateHeader();
        this.removeFocusedDate();
    };
    DateRangePicker.prototype.selectableDates = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            var tdCells = this.calendarElement.querySelectorAll('.' + CALENDAR + ' td');
            var isStartDate = false;
            if (this.currentView() === this.depth) {
                for (var _i = 0, tdCells_4 = tdCells; _i < tdCells_4.length; _i++) {
                    var ele = tdCells_4[_i];
                    if (!ele.classList.contains(STARTDATE) && !ele.classList.contains(WEEKNUMBER)) {
                        if (!ele.classList.contains(DISABLED)) {
                            var eleDate = this.getIdValue(null, ele);
                            if (+eleDate < +this.startValue) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], [DATEDISABLED, DISABLED, OVERLAY]);
                                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(ele);
                                continue;
                            }
                            else {
                                break;
                            }
                        }
                    }
                    if (ele.classList.contains(STARTDATE) && !ele.classList.contains(OTHERMONTH)) {
                        isStartDate = true;
                        break;
                    }
                }
                if (isStartDate) {
                    if (!this.previousIcon.classList.contains(DISABLED)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.previousIcon], [ICONDISABLED, DISABLED, OVERLAY]);
                    }
                }
            }
            else {
                for (var _a = 0, tdCells_5 = tdCells; _a < tdCells_5.length; _a++) {
                    var ele = tdCells_5[_a];
                    var startMonth = this.startValue.getMonth();
                    var startYear = this.startValue.getFullYear();
                    var element = this.getIdValue(null, ele);
                    if (!this.startButton.element.classList.contains(ACTIVE) && ((this.currentView() === 'Year' &&
                        (element.getMonth() < startMonth) && (element.getFullYear() <= startYear))
                        || (this.currentView() === 'Decade' && (element.getMonth() <= startMonth) &&
                            (element.getFullYear() < startYear)))) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], [DISABLED]);
                    }
                    else {
                        break;
                    }
                }
                if (tdCells[0].classList.contains(DISABLED)) {
                    this.previousIconHandler(true);
                }
                else if (tdCells[tdCells.length - 1].classList.contains(DISABLED)) {
                    this.nextIconHandler(true);
                }
            }
        }
    };
    DateRangePicker.prototype.updateMinMaxDays = function (calendar) {
        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) ||
            (this.isMobile && this.endButton.element.classList.contains(ACTIVE))) {
            if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.minDays) && this.minDays > 0) || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maxDays) && this.maxDays > 0)) {
                var minDate = new Date(new Date(+this.startValue).setDate(this.startValue.getDate() + (this.minDays - 1)));
                var maxDate = new Date(new Date(+this.startValue).setDate(this.startValue.getDate() + (this.maxDays - 1)));
                minDate = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.minDays) && this.minDays > 0) ? minDate : null;
                maxDate = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maxDays) && this.maxDays > 0) ? maxDate : null;
                if (this.currentView() === 'Year') {
                    minDate = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(minDate) ? null : new Date(minDate.getFullYear(), minDate.getMonth(), 0);
                    maxDate = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(maxDate) ? null : new Date(maxDate.getFullYear(), maxDate.getMonth(), 1);
                }
                else if (this.currentView() === 'Decade') {
                    minDate = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(minDate) ? null : new Date(minDate.getFullYear() - 1, 11, 1);
                    maxDate = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(maxDate) ? null : new Date(maxDate.getFullYear(), 0, 1);
                }
                var tdCells = calendar.querySelectorAll('.' + CALENDAR + ' td');
                var maxEle = void 0;
                for (var _i = 0, tdCells_6 = tdCells; _i < tdCells_6.length; _i++) {
                    var ele = tdCells_6[_i];
                    if (!ele.classList.contains(STARTDATE) && !ele.classList.contains(WEEKNUMBER)) {
                        var eleDate = this.getIdValue(null, ele);
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(minDate) && +eleDate === +minDate && ele.classList.contains(DISABLED)) {
                            minDate.setDate(minDate.getDate() + 1);
                        }
                        if (!ele.classList.contains(DISABLED)) {
                            if (+eleDate <= +this.startValue) {
                                continue;
                            }
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(minDate) && +eleDate < +minDate) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], [DATEDISABLED, DISABLED, OVERLAY]);
                                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(ele);
                            }
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(maxDate) && +eleDate > +maxDate) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], [DATEDISABLED, DISABLED, OVERLAY]);
                                this.isMaxDaysClicked = true;
                                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(ele);
                                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(maxEle) && !ele.classList.contains(OTHERMONTH)) {
                                    maxEle = ele;
                                }
                            }
                        }
                    }
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(maxEle)) {
                    if (this.isMobile) {
                        if (!this.nextIcon.classList.contains(DISABLED)) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.nextIcon], [ICONDISABLED, DISABLED, OVERLAY]);
                        }
                    }
                    else {
                        var calendar_1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(maxEle, '.' + RIGHTCALENDER);
                        calendar_1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(calendar_1) ? this.leftCalendar : calendar_1;
                        var isLeftCalendar = calendar_1.classList.contains(LEFTCALENDER);
                        if (!isLeftCalendar) {
                            if (!this.rightCalNextIcon.classList.contains(DISABLED)) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.rightCalNextIcon], [ICONDISABLED, DISABLED, OVERLAY]);
                            }
                        }
                        else {
                            if (!this.rightCalNextIcon.classList.contains(DISABLED)) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.rightCalNextIcon], [ICONDISABLED, DISABLED, OVERLAY]);
                            }
                            if (!this.leftCalNextIcon.classList.contains(DISABLED)) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.leftCalNextIcon], [ICONDISABLED, DISABLED, OVERLAY]);
                            }
                            if (!this.rightCalPrevIcon.classList.contains(DISABLED)) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.rightCalPrevIcon], [ICONDISABLED, DISABLED, OVERLAY]);
                            }
                        }
                    }
                }
            }
        }
        else {
            this.isMaxDaysClicked = false;
        }
    };
    DateRangePicker.prototype.removeClassDisabled = function () {
        var tdCells;
        tdCells = this.popupObj.element.querySelectorAll('.' + CALENDAR + ' td' + '.' + DATEDISABLED);
        for (var _i = 0, tdCells_7 = tdCells; _i < tdCells_7.length; _i++) {
            var ele = tdCells_7[_i];
            if (ele.classList.contains(DATEDISABLED)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele], [DATEDISABLED, DISABLED, OVERLAY]);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(ele, 'click', this.selectRange, this);
                if (!this.isMobile) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(ele, 'mouseover', this.hoverSelection, this);
                }
            }
        }
        if (this.isMobile) {
            if (this.nextIcon.classList.contains(ICONDISABLED)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.nextIcon], [ICONDISABLED, DISABLED, OVERLAY]);
            }
            if (this.previousIcon.classList.contains(ICONDISABLED)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.previousIcon], [ICONDISABLED, DISABLED, OVERLAY]);
            }
        }
        else {
            if (this.rightCalNextIcon.classList.contains(ICONDISABLED)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.rightCalNextIcon], [ICONDISABLED, DISABLED, OVERLAY]);
            }
            if (this.rightCalPrevIcon.classList.contains(ICONDISABLED)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.rightCalPrevIcon], [ICONDISABLED, DISABLED, OVERLAY]);
            }
            if (this.leftCalNextIcon.classList.contains(ICONDISABLED)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.leftCalNextIcon], [ICONDISABLED, DISABLED, OVERLAY]);
            }
        }
    };
    DateRangePicker.prototype.updateHeader = function () {
        var format = { type: 'date', skeleton: 'yMMMd' };
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            var range = (Math.round(Math.abs((this.startValue.getTime() - this.endValue.getTime()) / (1000 * 60 * 60 * 24))) + 1);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.disabledDayCnt)) {
                range = range - this.disabledDayCnt;
                this.disabledDayCnt = null;
            }
            this.popupObj.element.querySelector('.' + DAYSPAN).textContent = range.toString() + ' ' + this.l10n.getConstant('days');
        }
        else {
            this.popupObj.element.querySelector('.' + DAYSPAN).textContent = this.l10n.getConstant('selectedDays');
        }
        if (!this.isMobile) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
                this.popupObj.element.querySelector('.' + ENDLABEL).textContent = this.globalize.formatDate(this.endValue, format);
            }
            else {
                this.popupObj.element.querySelector('.' + ENDLABEL).textContent = this.l10n.getConstant('endLabel');
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
                this.popupObj.element.querySelector('.' + STARTLABEL).textContent = this.globalize.formatDate(this.startValue, format);
            }
            else {
                this.popupObj.element.querySelector('.' + STARTLABEL).textContent = this.l10n.getConstant('startLabel');
            }
        }
        else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
                this.startButton.element.textContent = this.globalize.formatDate(this.startValue, format);
            }
            else {
                this.startButton.element.textContent = this.l10n.getConstant('startLabel');
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
                this.endButton.element.textContent = this.globalize.formatDate(this.endValue, format);
            }
            else {
                this.endButton.element.textContent = this.l10n.getConstant('endLabel');
            }
        }
        if ((this.isDateDisabled(this.startValue) || this.isDateDisabled(this.endValue)) ||
            ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && +this.startValue < +this.min)
                || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && +this.endValue > +this.max)
                || ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue))
                    && +this.startValue > +this.endValue))) {
            if (!this.isMobile) {
                this.popupObj.element.querySelector('.' + DAYSPAN).textContent = this.l10n.getConstant('selectedDays');
                this.popupObj.element.querySelector('.' + STARTLABEL).textContent = this.l10n.getConstant('startLabel');
                this.popupObj.element.querySelector('.' + ENDLABEL).textContent = this.l10n.getConstant('endLabel');
            }
            else {
                this.startButton.element.textContent = this.l10n.getConstant('startLabel');
                this.endButton.element.textContent = this.l10n.getConstant('endLabel');
                this.popupObj.element.querySelector('.' + DAYSPAN).textContent = this.l10n.getConstant('selectedDays');
            }
        }
        if (this.popupObj.element.querySelector('#custom_range')) {
            this.popupObj.element.querySelector('#custom_range').textContent =
                this.l10n.getConstant('customRange') !== '' ? this.l10n.getConstant('customRange') : 'Custom Range';
        }
    };
    DateRangePicker.prototype.removeSelection = function () {
        this.startValue = null;
        this.endValue = null;
        this.setValue();
        this.removeSelectedAttributes();
        if (this.popupObj) {
            if (this.popupObj.element.querySelectorAll('.' + SELECTED).length > 0) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.popupObj.element.querySelectorAll('.' + SELECTED), [STARTDATE, ENDDATE, SELECTED]);
            }
            if (this.popupObj.element.querySelectorAll('.' + FOCUSDATE).length > 0) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.popupObj.element.querySelectorAll('.' + FOCUSDATE), FOCUSDATE);
            }
            if (this.popupObj.element.querySelectorAll('.' + RANGEHOVER).length > 0) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.popupObj.element.querySelectorAll('.' + RANGEHOVER), [RANGEHOVER]);
            }
        }
    };
    DateRangePicker.prototype.addSelectedAttributes = function (ele, date, isStartDate, sameDate) {
        if (ele) {
            var title = this.globalize.formatDate(date, { type: 'date', skeleton: 'full' });
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(sameDate) && sameDate) {
                ele.setAttribute('aria-label', 'The current start and end date is ' + '' + title);
            }
            else {
                ele.setAttribute('aria-label', 'The current ' + (isStartDate ? 'start' : 'end') + ' date is ' + '' + title);
            }
            ele.setAttribute('aria-selected', 'true');
        }
    };
    DateRangePicker.prototype.removeSelectedAttributes = function () {
        if (this.popupObj) {
            var start = this.popupObj.element.querySelectorAll('.' + STARTDATE);
            for (var _i = 0, start_1 = start; _i < start_1.length; _i++) {
                var ele = start_1[_i];
                ele.setAttribute('aria-selected', 'false');
                ele.removeAttribute('aria-label');
            }
            var end = this.popupObj.element.querySelectorAll('.' + ENDDATE);
            for (var _a = 0, end_1 = end; _a < end_1.length; _a++) {
                var ele = end_1[_a];
                ele.setAttribute('aria-selected', 'false');
                ele.removeAttribute('aria-label');
            }
        }
    };
    DateRangePicker.prototype.updateCalendarElement = function (calendar) {
        if (calendar.classList.contains(LEFTCALENDER)) {
            this.calendarElement = this.leftCalendar;
            this.currentDate = this.leftCalCurrentDate;
            this.previousIcon = this.leftCalPrevIcon;
            this.nextIcon = this.leftCalNextIcon;
        }
        else {
            this.calendarElement = this.rightCalendar;
            this.currentDate = this.rightCalCurrentDate;
            this.previousIcon = this.rightCalPrevIcon;
            this.nextIcon = this.rightCalNextIcon;
        }
        this.contentElement = calendar.querySelector('.' + CONTENT);
        this.tableBodyElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CONTENT + ' tbody', calendar);
        this.table = calendar.querySelector('.' + CONTENT).getElementsByTagName('table')[0];
        this.headerTitleElement = calendar.querySelector('.' + HEADER + ' .' + TITLE);
        this.headerElement = calendar.querySelector('.' + HEADER);
    };
    DateRangePicker.prototype.navPrevMonth = function (e) {
        e.preventDefault();
        var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + LEFTCALENDER);
        ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + RIGHTCALENDER) : ele;
        this.updateCalendarElement(ele);
        this.navigatePrevious(e);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
            this.updateMinMaxDays(ele);
        }
        this.updateControl(ele);
    };
    DateRangePicker.prototype.deviceNavigation = function (ele) {
        this.deviceCalendarEvent();
        this.updateRange([this.popupObj.element.querySelector('.' + CALENDAR)]);
        if (this.endButton.element.classList.contains(ACTIVE)) {
            this.updateMinMaxDays(this.popupObj.element.querySelector('.' + CALENDAR));
        }
        if (this.endButton.element.classList.contains(ACTIVE)) {
            this.selectableDates();
        }
        if (this.currentView() === this.depth) {
            this.bindCalendarCellEvents();
        }
        this.removeFocusedDate();
    };
    DateRangePicker.prototype.updateControl = function (calendar) {
        if (calendar.classList.contains(RIGHTCALENDER)) {
            this.rightCalCurrentDate = new Date(+this.currentDate);
        }
        else {
            this.leftCalCurrentDate = new Date(+this.currentDate);
        }
        this.updateNavIcons();
        this.calendarIconEvent();
        if ((((this.depth === 'Month')
            && this.leftCalendar.querySelector('.e-content').classList.contains('e-month')
            && this.rightCalendar.querySelector('.e-content').classList.contains('e-month'))
            || ((this.depth === 'Year')
                && this.leftCalendar.querySelector('.e-content').classList.contains('e-year')
                && this.rightCalendar.querySelector('.e-content').classList.contains('e-year'))
            || ((this.depth === 'Decade')
                && this.leftCalendar.querySelector('.e-content').classList.contains('e-decade')
                && this.rightCalendar.querySelector('.e-content').classList.contains('e-decade')))
            || this.isMobile) {
            this.bindCalendarCellEvents();
        }
        this.removeFocusedDate();
        this.updateRange([calendar]);
    };
    DateRangePicker.prototype.navNextMonth = function (event) {
        event.preventDefault();
        var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(event.target, '.' + LEFTCALENDER);
        ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(event.target, '.' + RIGHTCALENDER) : ele;
        this.updateCalendarElement(ele);
        this.navigateNext(event);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
            this.updateMinMaxDays(ele);
        }
        this.updateControl(ele);
    };
    DateRangePicker.prototype.compareMonths = function (start, end) {
        var result;
        if (start.getFullYear() === end.getFullYear() &&
            (this.currentView() === 'Year' || this.currentView() === 'Decade')) {
            result = -1;
        }
        else if (start.getFullYear() > end.getFullYear()) {
            result = -1;
        }
        else if (start.getFullYear() < end.getFullYear()) {
            if (start.getFullYear() + 1 === end.getFullYear() && start.getMonth() === 11 && end.getMonth() === 0) {
                result = -1;
            }
            else {
                result = 1;
            }
        }
        else {
            result = start.getMonth() === end.getMonth() ? 0 : start.getMonth() + 1 === end.getMonth() ? -1 : 1;
        }
        return result;
    };
    DateRangePicker.prototype.compareYears = function (start, end) {
        var result;
        if (start.getFullYear() === end.getFullYear()) {
            result = -1;
        }
        else if (start.getFullYear() > end.getFullYear()) {
            result = -1;
        }
        else {
            if (start.getFullYear() + 1 === end.getFullYear()) {
                result = -1;
            }
            else {
                result = 1;
            }
        }
        return result;
    };
    DateRangePicker.prototype.compareDecades = function (start, end) {
        var result;
        if (start.getFullYear() === end.getFullYear()) {
            result = -1;
        }
        else if (start.getFullYear() > end.getFullYear()) {
            result = -1;
        }
        else {
            var strtFullYr = start.getFullYear();
            var enFullYr = end.getFullYear();
            if ((strtFullYr - (strtFullYr % 10) + 10) === (enFullYr - (enFullYr % 10))) {
                result = -1;
            }
            else {
                result = 1;
            }
        }
        return result;
    };
    DateRangePicker.prototype.isPopupOpen = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj) && this.popupObj.element.classList.contains(POPUP)) {
            return true;
        }
        return false;
    };
    DateRangePicker.prototype.createRangeHeader = function () {
        var labelContainer = this.createElement('div', { className: STARTENDCONTAINER });
        if (!this.isMobile) {
            var startLabel = this.createElement('a', { className: STARTLABEL });
            var endLabel = this.createElement('a', { className: ENDLABEL });
            var changeIcon = this.createElement('span', { className: CHANGEICON });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(startLabel, { 'aria-atomic': 'true', 'aria-live': 'assertive', 'aria-label': 'Start Date', 'role': 'button' });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(endLabel, { 'aria-atomic': 'true', 'aria-live': 'assertive', 'aria-label': 'End Date', 'role': 'button' });
            labelContainer.appendChild(startLabel);
            labelContainer.appendChild(changeIcon);
            labelContainer.appendChild(endLabel);
            startLabel.textContent = this.l10n.getConstant('startLabel');
            endLabel.textContent = this.l10n.getConstant('endLabel');
        }
        else {
            var endBtn = this.createElement('button', { className: ENDBUTTON });
            var startBtn = this.createElement('button', { className: STARTBUTTON });
            this.startButton = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["Button"]({ content: this.l10n.getConstant('startLabel') }, startBtn);
            this.endButton = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["Button"]({ content: this.l10n.getConstant('endLabel') }, endBtn);
            labelContainer.appendChild(startBtn);
            labelContainer.appendChild(endBtn);
        }
        return labelContainer;
    };
    DateRangePicker.prototype.disableInput = function () {
        if (this.strictMode) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.previousStartValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.previousEndValue)) {
                this.startValue = this.previousStartValue;
                this.endValue = this.previousEndValue;
                this.setValue();
                this.updateInput();
            }
        }
        else {
            this.updateInput();
            this.clearRange();
            this.setProperties({ startDate: null }, true);
            this.setProperties({ endDate: null }, true);
            this.startValue = null;
            this.endValue = null;
            this.setValue();
            this.errorClass();
        }
        this.setProperties({ enabled: false }, true);
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setEnabled(this.enabled, this.inputElement);
        this.bindEvents();
    };
    DateRangePicker.prototype.validateMinMax = function () {
        this.min = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.min) || !(+this.min) ? this.min = new Date(1900, 0, 1) : this.min;
        this.max = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.max) || !(+this.max) ? this.max = new Date(2099, 11, 31) : this.max;
        if (!(this.min <= this.max)) {
            this.disableInput();
            return;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.minDays) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maxDays)) {
            if (this.maxDays > 0 && this.minDays > 0 && (this.minDays > this.maxDays)) {
                this.maxDays = null;
            }
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.minDays) && this.minDays < 0) {
            this.minDays = null;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maxDays) && this.maxDays < 0) {
            this.maxDays = null;
        }
    };
    DateRangePicker.prototype.validateRangeStrict = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            if (+this.startValue <= +this.min) {
                this.startValue = this.min;
                this.setValue();
            }
            else if (+this.startValue >= +this.min && +this.startValue >= +this.max) {
                this.startValue = this.max;
            }
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
            if (+this.endValue > +this.max) {
                this.endValue = this.max;
                this.setValue();
            }
            else if (+this.endValue < +this.min) {
                this.endValue = this.min;
                this.setValue();
            }
        }
        this.validateMinMaxDays();
    };
    DateRangePicker.prototype.validateRange = function () {
        this.validateMinMaxDays();
    };
    DateRangePicker.prototype.validateMinMaxDays = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
            var range = (Math.round(Math.abs((this.startValue.getTime() - this.endValue.getTime()) / (1000 * 60 * 60 * 24))) + 1);
            if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.minDays) && this.minDays > 0) && !(range >= this.minDays)) {
                if (this.strictMode) {
                    var date = new Date(+this.startValue);
                    date.setDate(date.getDate() + (this.minDays - 1));
                    if (+date > +this.max) {
                        this.endValue = this.max;
                        this.setValue();
                    }
                    else {
                        this.endValue = date;
                        this.setValue();
                    }
                }
                else {
                    this.startValue = null;
                    this.endValue = null;
                    this.setValue();
                }
            }
            if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maxDays) && this.maxDays > 0) && !(range <= this.maxDays)) {
                if (this.strictMode) {
                    this.endValue = new Date(+this.startValue);
                    this.endValue.setDate(this.endValue.getDate() + (this.maxDays - 1));
                    this.setValue();
                }
                else {
                    this.startValue = null;
                    this.endValue = null;
                    this.setValue();
                }
            }
        }
    };
    DateRangePicker.prototype.renderCalendar = function () {
        this.calendarElement = this.createElement('div');
        this.calendarElement.classList.add(CALENDAR);
        if (this.enableRtl) {
            this.calendarElement.classList.add(RTL);
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.calendarElement, { 'role': 'calendar' });
        _super.prototype.createHeader.call(this);
        _super.prototype.createContent.call(this);
    };
    DateRangePicker.prototype.isSameMonth = function (start, end) {
        if (start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear()) {
            return true;
        }
        return false;
    };
    DateRangePicker.prototype.isSameYear = function (start, end) {
        if (start.getFullYear() === end.getFullYear()) {
            return true;
        }
        return false;
    };
    DateRangePicker.prototype.isSameDecade = function (start, end) {
        var startYear = start.getFullYear();
        var endYear = end.getFullYear();
        if ((startYear - (startYear % 10)) === (endYear - (endYear % 10))) {
            return true;
        }
        return false;
    };
    DateRangePicker.prototype.startMonthCurrentDate = function () {
        if (this.isSameMonth(this.min, this.max) || +this.currentDate > +this.max || this.isSameMonth(this.currentDate, this.max)) {
            this.currentDate = new Date(+this.max);
            this.currentDate.setDate(1);
            this.currentDate.setMonth(this.currentDate.getMonth() - 1);
        }
        else if (this.currentDate < this.min) {
            this.currentDate = new Date(this.checkValue(this.min));
        }
    };
    DateRangePicker.prototype.selectNextMonth = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !this.isSameMonth(this.endValue, this.currentDate)
            && !this.isDateDisabled(this.endValue) && !this.isDateDisabled(this.startValue)) {
            this.currentDate = new Date(+this.endValue);
        }
        else {
            this.currentDate.setDate(1);
            this.currentDate.setMonth(this.currentDate.getMonth() + 1);
            return;
        }
        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && +this.startValue < +this.min)
            || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && +this.endValue > +this.max)
            || ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) && +this.startValue > +this.endValue)) {
            this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
            this.currentDate.setDate(1);
            var month = this.currentDate.getMonth() + 1;
            this.currentDate.setMonth(month);
        }
    };
    DateRangePicker.prototype.selectNextYear = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !this.isSameYear(this.endValue, this.currentDate)
            && !this.isDateDisabled(this.endValue) && !this.isDateDisabled(this.startValue)) {
            this.currentDate = new Date(+this.endValue);
        }
        else {
            this.currentDate.setMonth(0);
            var yr = this.currentDate.getFullYear() + 1;
            this.currentDate.setFullYear(yr);
            return;
        }
        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && +this.endValue > +this.max)
            || ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) && +this.startValue > +this.endValue)
            || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && +this.startValue < +this.min)) {
            this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
            this.currentDate.setMonth(0);
            this.currentDate.setFullYear(this.currentDate.getFullYear() + 1);
        }
    };
    DateRangePicker.prototype.selectNextDecade = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !this.isSameDecade(this.endValue, this.currentDate)
            && !this.isDateDisabled(this.endValue) && !this.isDateDisabled(this.startValue)) {
            this.currentDate = new Date(+this.endValue);
        }
        else {
            var decyr = this.currentDate.getFullYear() + 10;
            this.currentDate.setFullYear(decyr);
            return;
        }
        if (((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) && +this.startValue > +this.endValue)
            || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && +this.endValue > +this.max)
            || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && +this.startValue < +this.min)) {
            this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
            this.currentDate.setFullYear(this.currentDate.getFullYear() + 10);
        }
    };
    DateRangePicker.prototype.selectStartMonth = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.max) && this.isSameMonth(this.startValue, this.max)) {
                this.currentDate = new Date(+this.max);
                this.currentDate.setDate(1);
                this.currentDate.setMonth(this.currentDate.getMonth() - 1);
            }
            else if (!(this.startValue >= this.min && this.startValue <= this.max)
                || this.isDateDisabled(this.startValue)) {
                this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
            }
            else {
                this.currentDate = new Date(+this.startValue);
            }
        }
        else {
            this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
            this.startMonthCurrentDate();
        }
        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && +this.endValue > +this.max)
            || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && +this.startValue < +this.min)
            || ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) && +this.startValue > +this.endValue)) {
            this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
        }
        this.startMonthCurrentDate();
    };
    DateRangePicker.prototype.createCalendar = function () {
        var calendarContainer = this.createElement('div', { className: CALENDARCONTAINER });
        if (!this.isMobile) {
            this.selectStartMonth();
            this.renderCalendar();
            this.leftCalCurrentDate = new Date(+this.currentDate);
            this.calendarElement.classList.add(LEFTCALENDER);
            this.leftCalPrevIcon = this.calendarElement.querySelector('.' + LEFTCALENDER + ' .' + PREVICON);
            this.leftCalNextIcon = this.calendarElement.querySelector('.' + LEFTCALENDER + ' .' + NEXTICON);
            this.leftTitle = this.calendarElement.querySelector('.' + LEFTCALENDER + ' .' + TITLE);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.calendarElement.querySelector('.' + LEFTCALENDER + ' .' + ICONCONTAINER));
            this.calendarElement.querySelector('.' + LEFTCALENDER + ' .' + HEADER).appendChild(this.leftCalNextIcon);
            this.calendarElement.querySelector('.' + LEFTCALENDER + ' .' + HEADER).appendChild(this.leftCalPrevIcon);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.leftCalPrevIcon], this.calendarElement.querySelector('.' + LEFTCALENDER + ' .' + HEADER));
            this.leftCalendar = this.calendarElement;
            var leftContainer = this.createElement('div', { className: LEFTCONTAINER });
            var rightContainer = this.createElement('div', { className: RIGHTCONTAINER });
            leftContainer.appendChild(this.leftCalendar);
            calendarContainer.appendChild(leftContainer);
            if (!this.isMobile) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.leftTitle, 'click', this.leftNavTitle, this);
            }
            if (this.start === 'Month') {
                this.selectNextMonth();
            }
            if (this.start === 'Year') {
                this.selectNextYear();
            }
            if (this.start === 'Decade') {
                this.selectNextDecade();
            }
            this.renderCalendar();
            this.rightCalCurrentDate = new Date(+this.currentDate);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.calendarElement], RIGHTCALENDER);
            this.rightCalendar = this.calendarElement;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.leftCalendar && this.leftCalendar.querySelector('.e-content tbody')], 'e-zoomin');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.rightCalendar && this.rightCalendar.querySelector('.e-content tbody')], 'e-zoomin');
            this.rightCalPrevIcon = this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + PREVICON);
            this.rightCalNextIcon = this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + NEXTICON);
            this.rightTitle = this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + TITLE);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + ICONCONTAINER));
            this.calendarElement.querySelector('table').setAttribute('tabindex', '-1');
            this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + HEADER).appendChild(this.rightCalNextIcon);
            this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + HEADER).appendChild(this.rightCalPrevIcon);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.rightCalPrevIcon], this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + HEADER));
            rightContainer.appendChild(this.rightCalendar);
            calendarContainer.appendChild(rightContainer);
            if (!this.isMobile) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.rightTitle, 'click', this.rightNavTitle, this);
            }
        }
        else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
                this.currentDate = new Date(+this.startValue);
            }
            _super.prototype.validateDate.call(this);
            _super.prototype.minMaxUpdate.call(this);
            _super.prototype.render.call(this);
            var prevIcon = this.calendarElement.querySelector('.' + CALENDAR + ' .' + PREVICON);
            var nextIcon = this.calendarElement.querySelector('.' + CALENDAR + ' .' + NEXTICON);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.calendarElement.querySelector('.' + CALENDAR + ' .' + ICONCONTAINER));
            this.calendarElement.querySelector('.' + CALENDAR + ' .' + HEADER).appendChild(nextIcon);
            this.calendarElement.querySelector('.' + CALENDAR + ' .' + HEADER).appendChild(prevIcon);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([prevIcon], this.calendarElement.querySelector('.' + CALENDAR + ' .' + HEADER));
            this.deviceCalendar = this.calendarElement;
            calendarContainer.appendChild(this.calendarElement);
            this.headerTitleElement = this.calendarElement.querySelector('.' + CALENDAR + ' .' + HEADER + ' .' + TITLE);
        }
        return calendarContainer;
    };
    DateRangePicker.prototype.leftNavTitle = function (e) {
        if (this.isPopupOpen()) {
            this.calendarElement = this.leftCalendar;
            this.calendarNavigation(e, this.calendarElement);
        }
    };
    DateRangePicker.prototype.calendarNavigation = function (e, element) {
        this.table = element.querySelector('table');
        this.headerTitleElement = element.querySelector('.e-title');
        this.tableBodyElement = element.querySelector('tbody');
        this.tableHeadElement = element.querySelector('thead');
        this.contentElement = element.querySelector('.e-content');
        this.updateCalendarElement(element);
        _super.prototype.navigateTitle.call(this, e);
        this.updateNavIcons();
    };
    DateRangePicker.prototype.rightNavTitle = function (e) {
        if (this.isPopupOpen()) {
            this.calendarElement = this.rightCalendar;
            this.calendarNavigation(e, this.calendarElement);
        }
    };
    DateRangePicker.prototype.clickEventEmitter = function (e) {
        if (!this.isMobile) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-calendar.e-left-calendar')) {
                this.calendarElement = this.leftCalendar;
                this.updateCalendarElement(this.leftCalendar);
            }
            else {
                this.calendarElement = this.rightCalendar;
                this.updateCalendarElement(this.rightCalendar);
            }
        }
    };
    /**
     * Gets the current view of the Calendar.
     * @returns string
     * @private
     * @hidden
     */
    DateRangePicker.prototype.currentView = function () {
        return _super.prototype.currentView.call(this);
    };
    DateRangePicker.prototype.getCalendarView = function (view) {
        if (view === 'Year') {
            return 'Year';
        }
        else if (view === 'Decade') {
            return 'Decade';
        }
        else {
            return 'Month';
        }
    };
    DateRangePicker.prototype.navigatedEvent = function (e) {
        this.trigger('navigated', this.navigatedArgs);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj)) {
            var element = void 0;
            var view = this.getCalendarView(this.currentView());
            if (this.isMobile) {
                if (view === this.depth) {
                    this.bindCalendarCellEvents();
                    this.deviceNavigation();
                    this.removeFocusedDate();
                    this.checkMinMaxDays();
                }
                else {
                    this.selectableDates();
                }
            }
            else {
                if (!this.isMobile && view === this.depth) {
                    element = this.calendarElement.classList.contains('e-left-calendar') ? this.leftCalendar : this.rightCalendar;
                    if (element === this.leftCalendar && ((e && !e.currentTarget.children[0].classList.contains('e-icons'))
                        || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.controlDown)))) {
                        this.leftCalCurrentDate = new Date(+this.currentDate);
                        if (view === 'Year') {
                            var year = this.currentDate.getFullYear() + 1;
                            this.rightCalCurrentDate = new Date(new Date(+this.currentDate).setFullYear(year));
                        }
                        else if (view === 'Decade') {
                            var decYear = this.currentDate.getFullYear() + 10;
                            this.rightCalCurrentDate = new Date(new Date(+this.currentDate).setFullYear(decYear));
                        }
                        else {
                            this.rightCalCurrentDate = new Date(new Date(+this.currentDate).setMonth(this.currentDate.getMonth() + 1));
                        }
                        this.currentDate = this.leftCalCurrentDate;
                        this.updateCalendarElement(this.leftCalendar);
                        this.updateControl(this.leftCalendar);
                        this.updateCalendarElement(this.rightCalendar);
                        _super.prototype.navigateTo.call(this, view, this.rightCalCurrentDate);
                        this.updateControl(this.rightCalendar);
                        this.updateNavIcons();
                        this.calendarIconEvent();
                        this.calendarIconRipple();
                        this.controlDown = null;
                    }
                    else if (e && !e.currentTarget.children[0].classList.contains('e-icons')
                        || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.controlDown))) {
                        this.rightCalCurrentDate = new Date(+this.currentDate);
                        if (view === 'Year') {
                            var yr = this.currentDate.getFullYear() - 1;
                            this.leftCalCurrentDate = new Date(new Date(+this.currentDate).setFullYear(yr));
                        }
                        else if (view === 'Decade') {
                            var decyr = this.currentDate.getFullYear() - 10;
                            this.leftCalCurrentDate = new Date(new Date(+this.currentDate).setFullYear(decyr));
                        }
                        else {
                            this.leftCalCurrentDate = new Date(new Date(+this.currentDate).setMonth(this.currentDate.getMonth() - 1));
                        }
                        this.currentDate = this.rightCalCurrentDate;
                        this.updateCalendarElement(this.rightCalendar);
                        this.updateControl(this.rightCalendar);
                        this.updateCalendarElement(this.leftCalendar);
                        if (this.startValue && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
                            if (view === 'Month' && this.startValue.getMonth() < this.rightCalCurrentDate.getMonth() &&
                                this.startValue.getFullYear() <= this.rightCalCurrentDate.getFullYear()) {
                                _super.prototype.navigateTo.call(this, view, new Date(+this.startValue));
                            }
                            else if (view === 'Year' && this.startValue.getFullYear() < this.rightCalCurrentDate.getFullYear()) {
                                _super.prototype.navigateTo.call(this, view, new Date(+this.startValue));
                            }
                            else {
                                _super.prototype.navigateTo.call(this, view, this.leftCalCurrentDate);
                            }
                        }
                        else {
                            _super.prototype.navigateTo.call(this, view, this.leftCalCurrentDate);
                        }
                        this.updateControl(this.leftCalendar);
                        this.updateNavIcons();
                        this.calendarIconEvent();
                        this.calendarIconRipple();
                        this.controlDown = null;
                    }
                    this.checkMinMaxDays();
                }
                else {
                    this.updateNavIcons();
                    this.calendarIconEvent();
                }
            }
        }
    };
    DateRangePicker.prototype.createControl = function () {
        var controlContainer = this.createElement('div', { className: RANGECONTAINER });
        var headerContainer = this.createElement('div', { className: RANGEHEADER });
        var labelContainer = this.createRangeHeader();
        headerContainer.appendChild(labelContainer);
        var daySpan = this.createElement('div', { className: DAYSPAN });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(daySpan, { 'aria-label': 'Selected Days' });
        daySpan.textContent = this.l10n.getConstant('selectedDays');
        headerContainer.appendChild(daySpan);
        var separator = this.createElement('div', { className: SEPARATOR });
        var calendarContainer = this.createCalendar();
        controlContainer.appendChild(headerContainer);
        controlContainer.appendChild(separator);
        controlContainer.appendChild(calendarContainer);
        var footerSection = this.createElement('div', { className: FOOTER });
        var cancelBtn = this.createElement('button', { className: CANCEL + ' ' + FLAT + ' ' + CSS });
        var applyBtn = this.createElement('button');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([applyBtn], [APPLY, FLAT, PRIMARY, CSS]);
        footerSection.appendChild(applyBtn);
        footerSection.appendChild(cancelBtn);
        var enable = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue);
        this.cancelButton = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["Button"]({ content: this.l10n.getConstant('cancelText') }, cancelBtn);
        this.applyButton = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["Button"]({ content: this.l10n.getConstant('applyText'), disabled: !enable }, applyBtn);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(applyBtn, 'click', this.applyFunction, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(cancelBtn, 'click', this.cancelFunction, this);
        this.popupWrapper.appendChild(controlContainer);
        if (!this.isMobile) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
                this.createPresets();
                this.listRippleEffect();
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([controlContainer], RANGEBORDER);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.popupWrapper], 'e-preset-wrapper');
                var presets = this.popupWrapper.querySelector('.' + PRESETS);
                presets.style.height = this.popupWrapper.querySelector('.' + RANGECONTAINER).getBoundingClientRect().height + 'px';
            }
        }
        this.popupWrapper.appendChild(footerSection);
        if (this.isMobile) {
            this.deviceHeaderUpdate();
        }
        this.renderPopup();
    };
    DateRangePicker.prototype.cancelFunction = function (eve) {
        if (document.activeElement !== this.inputElement) {
            this.preventFocus = true;
            this.inputElement.focus();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [INPUTFOCUS]);
        }
        eve.preventDefault();
        if (this.isKeyPopup) {
            this.inputElement.focus();
            this.isKeyPopup = false;
        }
        this.startValue = null;
        this.endValue = null;
        this.removeSelection();
        this.hide(eve);
    };
    DateRangePicker.prototype.deviceHeaderUpdate = function () {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
            this.endButton.element.setAttribute('disabled', '');
            this.startButton.element.classList.add(ACTIVE);
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            this.startButton.element.classList.add(ACTIVE);
        }
    };
    DateRangePicker.prototype.applyFunction = function (eve) {
        var isValueChanged = false;
        eve.preventDefault();
        if (this.closeEventArgs && this.closeEventArgs.cancel) {
            this.startValue = this.popupWrapper.querySelector('.e-start-date') &&
                this.getIdValue(null, this.popupWrapper.querySelector('.e-start-date'));
            this.endValue = this.popupWrapper.querySelector('.e-end-date') &&
                this.getIdValue(null, this.popupWrapper.querySelector('.e-end-date'));
            this.setValue();
        }
        if (document.activeElement !== this.inputElement) {
            this.preventFocus = true;
            this.inputElement.focus();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [INPUTFOCUS]);
        }
        if (eve.type !== 'touchstart' &&
            this.closeEventArgs && !this.closeEventArgs.cancel) {
            eve.preventDefault();
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
            this.previousStartValue = new Date(+this.startValue);
            this.previousEndValue = new Date(+this.endValue);
            this.previousEleValue = this.inputElement.value;
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
            if (+this.initStartDate !== +this.startValue || +this.initEndDate !== +this.endValue) {
                isValueChanged = true;
            }
            this.changeTrigger(eve);
            this.hide(eve ? eve : null);
            this.errorClass();
            isValueChanged = true;
        }
        else {
            this.hide(eve ? eve : null);
        }
        if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(eve.target, '.' + INPUTCONTAINER))
            && (!isValueChanged)) {
            this.focusOut();
        }
        if (!this.isMobile) {
            this.isKeyPopup = false;
            if (this.isRangeIconClicked) {
                this.inputWrapper.container.children[1].focus();
                this.popupKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.inputWrapper.container.children[1], {
                    eventName: 'keydown',
                    keyAction: this.popupKeyActionHandle.bind(this),
                    keyConfigs: this.keyInputConfigs
                });
            }
        }
    };
    DateRangePicker.prototype.onMouseClick = function (event, item) {
        if (event.type === 'touchstart') {
            return;
        }
        var target = item || event.target;
        var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTCLASS);
        var isClick = li && li.classList.contains(ACTIVE);
        if (li && li.classList.contains(LISTCLASS)) {
            this.setListSelection(li, event);
        }
        this.inputElement.focus();
        if (!this.isMobile) {
            this.preventFocus = true;
            if (li && li.classList.contains(LISTCLASS) && li.getAttribute('id') === 'custom_range') {
                this.leftCalendar.children[1].firstElementChild.focus();
            }
            else {
                if (!isClick && event.type === 'keydown') {
                    this.inputElement.focus();
                }
            }
        }
    };
    DateRangePicker.prototype.onMouseOver = function (event) {
        var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(event.target, '.' + LISTCLASS);
        if (li && li.classList.contains(LISTCLASS) && !li.classList.contains(HOVER)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], HOVER);
        }
    };
    DateRangePicker.prototype.onMouseLeave = function (event) {
        var item = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(event.target, '.' + HOVER);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([item], HOVER);
        }
    };
    DateRangePicker.prototype.setListSelection = function (li, event) {
        if (li && (!li.classList.contains(ACTIVE) || (this.isMobile && li.classList.contains(ACTIVE)))) {
            if (this.isMobile && li.classList.contains(ACTIVE)) {
                this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li);
                var values_1 = this.presetsItem[this.activeIndex];
                if (values_1.id === 'custom_range') {
                    this.renderCustomPopup();
                    return;
                }
                return;
            }
            this.removeListSelection();
            this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], ACTIVE);
            li.setAttribute('aria-selected', 'true');
            var values = this.presetsItem[this.activeIndex];
            if (values.id === 'custom_range') {
                this.renderCustomPopup();
            }
            else {
                this.applyPresetRange(values);
            }
        }
    };
    DateRangePicker.prototype.removeListSelection = function () {
        var item = this.presetElement.querySelector('.' + ACTIVE);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([item], ACTIVE);
            item.removeAttribute('aria-selected');
        }
    };
    DateRangePicker.prototype.setValue = function () {
        this.modelValue = [this.startValue, this.endValue];
    };
    DateRangePicker.prototype.applyPresetRange = function (values) {
        this.hide(null);
        this.presetsItem[this.presetsItem.length - 1].start = null;
        this.presetsItem[this.presetsItem.length - 1].end = null;
        this.startValue = values.start;
        this.endValue = values.end;
        this.setValue();
        this.refreshControl();
        this.trigger('select', this.rangeArgs(null));
        this.changeTrigger();
        this.previousEleValue = this.inputElement.value;
        this.isCustomRange = false;
        this.leftCalendar = this.rightCalendar = null;
        if (this.isKeyPopup) {
            this.isRangeIconClicked = false;
            this.inputElement.focus();
        }
    };
    DateRangePicker.prototype.showPopup = function (element, event) {
        this.presetHeight();
        if (this.zIndex === 1000) {
            this.popupObj.show(null, this.element);
        }
        else {
            this.popupObj.show(null, null);
        }
        if (this.isMobile) {
            this.popupObj.refreshPosition();
        }
    };
    DateRangePicker.prototype.renderCustomPopup = function () {
        this.isCustomWindow = true;
        this.popupObj.hide();
        this.popupWrapper = this.createElement('div', { id: this.element.id + '_popup', className: ROOT + ' ' + POPUP });
        this.renderControl();
        this.openEventArgs.appendTo.appendChild(this.popupWrapper);
        this.showPopup();
        this.isCustomRange = true;
        if (!this.isMobile) {
            this.calendarFocus();
        }
    };
    DateRangePicker.prototype.listRippleEffect = function () {
        for (var _i = 0, _a = this.liCollections; _i < _a.length; _i++) {
            var li = _a[_i];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(li);
        }
    };
    DateRangePicker.prototype.createPresets = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
            this.presetElement = this.createElement('div', { className: PRESETS, attrs: { 'tabindex': '0' } });
            var listTag = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_5__["ListBase"].createList(this.createElement, this.presetsItem, null, true);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options' });
            this.presetElement.appendChild(listTag);
            this.popupWrapper.appendChild(this.presetElement);
            var customElement = this.presetElement.querySelector('#custom_range');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(customElement)) {
                customElement.textContent = this.l10n.getConstant('customRange') !== '' ? this.l10n.getConstant('customRange')
                    : 'Custom Range';
            }
            this.liCollections = this.presetElement.querySelectorAll('.' + LISTCLASS);
            this.wireListEvents();
            if (this.isMobile) {
                this.presetElement.style.width = this.inputWrapper.container.getBoundingClientRect().width + 'px';
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex) && this.activeIndex > -1) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.liCollections[this.activeIndex]], ACTIVE);
            }
        }
    };
    DateRangePicker.prototype.wireListEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.presetElement, 'click', this.onMouseClick, this);
        if (!this.isMobile) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.presetElement, 'mouseover', this.onMouseOver, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.presetElement, 'mouseout', this.onMouseLeave, this);
        }
    };
    DateRangePicker.prototype.unWireListEvents = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.presetElement)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.presetElement, 'click touchstart', this.onMouseClick);
            if (!this.isMobile) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.presetElement, 'mouseover', this.onMouseOver);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.presetElement, 'mouseout', this.onMouseLeave);
            }
        }
    };
    // tslint:disable-next-line:max-func-body-length
    DateRangePicker.prototype.renderPopup = function () {
        var _this = this;
        this.popupWrapper.classList.add('e-control');
        var popupWidth = this.popupWrapper.getBoundingClientRect().width;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass) && this.cssClass.trim() !== '') {
            this.popupWrapper.className += ' ' + this.cssClass;
        }
        if (this.isMobile && this.isCustomWindow) {
            this.modal = this.createElement('div');
            document.body.appendChild(this.modal);
        }
        this.popupObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["Popup"](this.popupWrapper, {
            relateTo: this.isMobile && this.isCustomWindow ? document.body :
                (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.targetElement) ? this.targetElement : this.inputWrapper.container),
            position: (this.isMobile ?
                (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.presets[0].start && this.presets[0].end && this.presets[0].label) && !this.isCustomWindow ?
                    { X: 'left', Y: 'bottom' } : { X: 'center', Y: 'center' }) :
                this.enableRtl ? { X: 'left', Y: 'bottom' } : { X: 'right', Y: 'bottom' }),
            offsetX: this.isMobile || this.enableRtl ? 0 : -popupWidth,
            offsetY: OFFSETVALUE,
            collision: this.isMobile ?
                (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.presets[0].start && this.presets[0].end && this.presets[0].label) && !this.isCustomWindow ?
                    { X: 'fit' } : { X: 'fit', Y: 'fit' }) : { X: 'fit', Y: 'flip' },
            targetType: this.isMobile && this.isCustomWindow ? 'container' : 'relative',
            enableRtl: this.enableRtl,
            zIndex: this.zIndex,
            open: function () {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this.inputElement, { 'aria-expanded': 'true' });
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.inputWrapper.buttons[0]], ACTIVE);
                if (!_this.isMobile) {
                    if (_this.cancelButton) {
                        _this.btnKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](_this.cancelButton.element, {
                            eventName: 'keydown',
                            keyAction: _this.popupKeyActionHandle.bind(_this),
                            keyConfigs: { tab: 'tab', altRightArrow: 'alt+rightarrow', altLeftArrow: 'alt+leftarrow' }
                        });
                        _this.btnKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](_this.applyButton.element, {
                            eventName: 'keydown',
                            keyAction: _this.popupKeyActionHandle.bind(_this),
                            keyConfigs: { altRightArrow: 'alt+rightarrow', altLeftArrow: 'alt+leftarrow' }
                        });
                    }
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.leftCalendar)) {
                        if (!_this.isRangeIconClicked) {
                            _this.calendarFocus();
                        }
                    }
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.presetElement)) {
                        _this.presetKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](_this.presetElement, {
                            eventName: 'keydown',
                            keyAction: _this.presetKeyActionHandler.bind(_this),
                            keyConfigs: _this.presetKeyConfig
                        });
                        _this.presetKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](_this.presetElement, {
                            eventName: 'keydown',
                            keyAction: _this.popupKeyActionHandle.bind(_this),
                            keyConfigs: { altRightArrow: 'alt+rightarrow', altLeftArrow: 'alt+leftarrow' }
                        });
                        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.leftCalendar)) {
                            _this.preventBlur = true;
                            _this.presetElement.focus();
                        }
                        else {
                            _this.presetElement.setAttribute('tabindex', '-1');
                        }
                    }
                    _this.popupKeyBoardHandler();
                }
                if (_this.isMobile && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'keydown', _this.popupCloseHandler, _this);
                }
            },
            close: function () {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this.inputElement, { 'aria-expanded': 'false' });
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.inputWrapper.buttons[0]], ACTIVE);
                if (_this.isRangeIconClicked) {
                    _this.inputWrapper.container.children[1].focus();
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(_this.presets[0].start && _this.presets[0].end && _this.presets[0].label)) {
                    _this.unWireListEvents();
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.popupObj)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(_this.popupObj.element);
                    _this.popupObj.destroy();
                    _this.popupObj = null;
                }
                if (_this.isMobile && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'keydown', _this.popupCloseHandler);
                }
            }
        });
        if (this.isMobile) {
            this.popupObj.element.classList.add(DEVICE);
            if (!this.isMobile) {
                this.popupObj.element.classList.add('e-bigger');
            }
        }
        if (this.isMobile && this.isCustomWindow) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.modal], [DEVICE, ROOT, 'e-range-modal']);
            document.body.className += ' ' + OVERFLOW;
            this.modal.style.display = 'block';
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown touchstart', this.documentHandler, this);
    };
    DateRangePicker.prototype.popupCloseHandler = function (e) {
        switch (e.keyCode) {
            case 27:
                this.hide(e);
                break;
        }
    };
    DateRangePicker.prototype.calendarFocus = function () {
        var startDate = this.popupObj && this.popupObj.element.querySelector('.' + STARTDATE);
        if (startDate) {
            var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(startDate, '.' + RIGHTCALENDER);
            ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele) ? this.leftCalendar : ele;
            if (this.isRangeIconClicked) {
                this.inputWrapper.container.focus();
            }
            else {
                this.preventBlur = true;
                ele.children[1].firstElementChild.focus();
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([startDate], FOCUSDATE);
        }
        else {
            if (this.isRangeIconClicked) {
                this.inputWrapper.container.focus();
            }
            else {
                this.preventBlur = true;
                this.leftCalendar.children[1].firstElementChild.focus();
            }
        }
    };
    DateRangePicker.prototype.presetHeight = function () {
        var presets = this.popupObj && this.popupObj.element.querySelector('.' + PRESETS);
        var rangeContainer = this.popupObj && this.popupObj.element.querySelector('.' + RANGECONTAINER);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(presets) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(rangeContainer)) {
            presets.style.height = rangeContainer.getBoundingClientRect().height + 'px';
        }
    };
    DateRangePicker.prototype.presetKeyActionHandler = function (e) {
        switch (e.action) {
            case 'moveDown':
                this.listMoveDown(e);
                this.setScrollPosition();
                e.preventDefault();
                break;
            case 'moveUp':
                this.listMoveUp(e);
                this.setScrollPosition();
                e.preventDefault();
                break;
            case 'enter':
                var hvrItem = this.getHoverLI();
                var actItem = this.getActiveLI();
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.leftCalendar) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(actItem)) {
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(hvrItem) || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(actItem) && actItem === hvrItem)) {
                        this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(actItem);
                        var values = this.presetsItem[this.activeIndex];
                        if (values.id === 'custom_range') {
                            this.calendarFocus();
                            actItem.classList.remove(HOVER);
                            e.preventDefault();
                            return;
                        }
                    }
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(hvrItem) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(actItem)) {
                    this.onMouseClick(e, hvrItem || actItem);
                }
                e.preventDefault();
                break;
            case 'tab':
                if (this.leftCalendar) {
                    var item = this.getHoverLI();
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
                        item.classList.remove(HOVER);
                    }
                }
                else {
                    this.hide(e);
                    e.preventDefault();
                }
                break;
        }
    };
    DateRangePicker.prototype.listMoveDown = function (e) {
        var hvrItem = this.getHoverLI();
        var actItem = this.getActiveLI();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(hvrItem)) {
            var li = hvrItem.nextElementSibling;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) && li.classList.contains(LISTCLASS)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([hvrItem], HOVER);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], HOVER);
            }
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(actItem)) {
            var li = actItem.nextElementSibling;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) && li.classList.contains(LISTCLASS)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], HOVER);
            }
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.liCollections[0]], HOVER);
        }
    };
    DateRangePicker.prototype.listMoveUp = function (e) {
        var hvrItem = this.getHoverLI();
        var actItem = this.getActiveLI();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(hvrItem)) {
            var li = hvrItem.previousElementSibling;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) && li.classList.contains(LISTCLASS)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([hvrItem], HOVER);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], HOVER);
            }
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(actItem)) {
            var li = actItem.previousElementSibling;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) && li.classList.contains(LISTCLASS)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], HOVER);
            }
        }
    };
    DateRangePicker.prototype.getHoverLI = function () {
        var item = this.presetElement.querySelector('.' + HOVER);
        return item;
    };
    DateRangePicker.prototype.getActiveLI = function () {
        var item = this.presetElement.querySelector('.' + ACTIVE);
        return item;
    };
    DateRangePicker.prototype.popupKeyBoardHandler = function () {
        this.popupKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.popupWrapper, {
            eventName: 'keydown',
            keyAction: this.popupKeyActionHandle.bind(this),
            keyConfigs: { escape: 'escape' }
        });
        this.popupKeyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.inputWrapper.container.children[1], {
            eventName: 'keydown',
            keyAction: this.popupKeyActionHandle.bind(this),
            keyConfigs: this.keyInputConfigs
        });
    };
    DateRangePicker.prototype.setScrollPosition = function () {
        var listHeight = this.presetElement.getBoundingClientRect().height;
        var hover = this.presetElement.querySelector('.' + HOVER);
        var active = this.presetElement.querySelector('.' + ACTIVE);
        var element = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(hover) ? hover : active;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            var nextEle = element.nextElementSibling;
            var height = nextEle ? nextEle.offsetTop : element.offsetTop;
            var liHeight = element.getBoundingClientRect().height;
            if ((height + element.offsetTop) > listHeight) {
                this.presetElement.scrollTop = nextEle ? (height - (listHeight / 2 + liHeight / 2)) : height;
            }
            else {
                this.presetElement.scrollTop = 0;
            }
        }
    };
    DateRangePicker.prototype.popupKeyActionHandle = function (e) {
        var presetElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + PRESETS);
        switch (e.action) {
            case 'escape':
                if (this.isPopupOpen()) {
                    if (this.isKeyPopup) {
                        this.inputElement.focus();
                        this.isKeyPopup = false;
                    }
                    this.hide(e);
                }
                else {
                    this.inputWrapper.container.children[1].blur();
                }
                break;
            case 'enter':
                if (!this.isPopupOpen()) {
                    this.show(null, e);
                }
                else {
                    this.inputWrapper.container.children[1].focus();
                }
                break;
            case 'tab':
                this.hide(e);
                break;
            case 'altRightArrow':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(presetElement)) {
                    this.cancelButton.element.focus();
                }
                else {
                    if (document.activeElement === this.cancelButton.element && this.applyButton.element.disabled !== true) {
                        this.applyButton.element.focus();
                    }
                    else {
                        this.leftCalendar.children[1].firstElementChild.focus();
                    }
                }
                e.preventDefault();
                break;
            case 'altLeftArrow':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(presetElement)) {
                    this.rightCalendar.children[1].firstElementChild.focus();
                }
                else {
                    if (document.activeElement === this.applyButton.element && this.applyButton.element.disabled !== true) {
                        this.cancelButton.element.focus();
                    }
                    else {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.presetElement) && (document.activeElement === this.cancelButton.element)) {
                            this.presetElement.focus();
                        }
                        else {
                            this.rightCalendar.children[1].firstElementChild.focus();
                        }
                    }
                }
                e.preventDefault();
                break;
        }
    };
    DateRangePicker.prototype.documentHandler = function (e) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj)) {
            return;
        }
        var target = e.target;
        if (!this.inputWrapper.container.contains(target) ||
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, this.popupWrapper.id))) {
            if ((e.type === 'touchstart' || e.type === 'mousedown') ||
                this.closeEventArgs && !this.closeEventArgs.cancel) {
                e.preventDefault();
            }
        }
        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.targetElement) ||
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.targetElement) && !(target === this.targetElement))) &&
            !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '#' + this.popupObj.element.id))
            && !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
            && !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-daterangepicker.e-popup') && (!target.classList.contains('e-day')))) {
            this.preventBlur = false;
            if (this.isPopupOpen()) {
                this.applyFunction(e);
                if (!this.isMobile) {
                    this.isRangeIconClicked = false;
                }
            }
        }
    };
    DateRangePicker.prototype.createInput = function () {
        this.inputWrapper = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].createInput({
            floatLabelType: this.floatLabelType,
            element: this.inputElement,
            properties: {
                readonly: this.readonly,
                placeholder: this.placeholder,
                cssClass: this.cssClass,
                enabled: this.enabled,
                enableRtl: this.enableRtl,
                showClearButton: this.showClearButton,
            },
            buttons: [DATERANGEICON]
        }, this.createElement);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
            'aria-readonly': this.readonly ? 'true' : 'false', 'tabindex': '0', 'aria-haspopup': 'true',
            'aria-activedescendant': 'null', 'aria-owns': this.element.id + '_popup', 'aria-expanded': 'false',
            'role': 'daterangepicker', 'autocomplete': 'off', 'aria-disabled': !this.enabled ? 'true' : 'false',
            'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
        });
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].addAttributes({ 'aria-label': 'select' }, this.inputWrapper.buttons[0]);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.placeholder) && this.placeholder.trim() !== '') {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].addAttributes({ 'aria-placeholder': this.placeholder }, this.inputElement);
        }
        this.setEleWidth(this.width);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], DATERANGEWRAPPER);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElement.getAttribute('name'))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'name': this.element.id });
        }
        if (this.inputElement.type === 'hidden') {
            this.inputWrapper.container.style.display = 'none';
        }
        this.refreshControl();
        this.previousEleValue = this.inputElement.value;
        this.inputElement.setAttribute('value', this.inputElement.value);
        this.startCopy = this.startDate;
        this.endCopy = this.endDate;
    };
    DateRangePicker.prototype.setEleWidth = function (width) {
        if (typeof width === 'string') {
            this.inputWrapper.container.style.width = (this.width);
        }
        else if (typeof width === 'number') {
            this.inputWrapper.container.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width);
        }
        else {
            this.inputWrapper.container.style.width = '100%';
        }
    };
    DateRangePicker.prototype.adjustLongHeaderWidth = function () {
        if (this.dayHeaderFormat === 'Wide') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.popupWrapper], DAYHEADERLONG);
        }
    };
    DateRangePicker.prototype.refreshControl = function () {
        this.validateMinMax();
        if (this.strictMode) {
            this.validateRangeStrict();
        }
        var isDisabled = this.disabledDates();
        if (this.strictMode && (isDisabled)) {
            this.startValue = this.previousStartValue;
            this.setProperties({ startDate: this.startValue }, true);
            this.endValue = this.previousEndValue;
            this.setProperties({ endDate: this.endValue }, true);
            this.setValue();
        }
        this.updateInput();
        if (!this.strictMode) {
            this.validateRange();
        }
        if (!this.strictMode && (isDisabled)) {
            this.clearRange();
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !isDisabled) {
            this.disabledDateRender();
        }
        this.errorClass();
        this.previousStartValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) || isNaN(+this.startValue) ? null : new Date(+this.startValue);
        this.previousEndValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) || isNaN(+this.endValue) ? null : new Date(+this.endValue);
    };
    DateRangePicker.prototype.updateInput = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            var formatOption = { format: this.formatString, type: 'date', skeleton: 'yMd' };
            var startDate = this.globalize.formatDate(this.startValue, formatOption);
            var endDate = this.globalize.formatDate(this.endValue, formatOption);
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(startDate + ' ' + this.separator + ' ' + endDate, this.inputElement, this.floatLabelType, this.showClearButton);
            this.previousStartValue = new Date(+this.startValue);
            this.previousEndValue = new Date(+this.endValue);
        }
        if (!this.strictMode && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.invalidValueString) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.invalidValueString, this.inputElement, this.floatLabelType, this.showClearButton);
        }
    };
    DateRangePicker.prototype.checkInvalidRange = function (value) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            var invalid = false;
            var startinvalue = void 0;
            var endinvalue = void 0;
            var startString = null;
            var endString = null;
            var valueString = null;
            var startObject = false;
            var endObject = false;
            var invalidobject = false;
            if (typeof (value) === 'string') {
                var range = value.split(' ' + this.separator + ' ');
                if (range.length === 2) {
                    startString = range[0];
                    endString = range[1];
                }
                else {
                    invalid = true;
                    valueString = value;
                }
            }
            else {
                if (value.length > 0) {
                    startinvalue = value[0];
                    endinvalue = value[1];
                }
                else {
                    startinvalue = value.start;
                    endinvalue = value.end;
                }
                if (!(startinvalue instanceof Date) && typeof (startinvalue) !== 'object') {
                    startString = this.getstringvalue(startinvalue);
                }
                else if (startinvalue instanceof Date) {
                    startObject = true;
                }
                else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(startinvalue)) {
                    invalidobject = true;
                }
                if (!(endinvalue instanceof Date) && typeof (endinvalue) !== 'object') {
                    endString = this.getstringvalue(endinvalue);
                }
                else if (endinvalue instanceof Date) {
                    endObject = true;
                }
                else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(endinvalue)) {
                    invalidobject = true;
                }
            }
            if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(startString) && !startObject && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(endString)) ||
                (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(startString) && !endObject && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(endString))) {
                invalid = true;
            }
            if (invalidobject) {
                startString = endString = valueString = null;
                invalid = true;
            }
            if (startString) {
                invalid = invalid || this.checkInvalidValue(startString);
            }
            if (endString) {
                invalid = invalid || this.checkInvalidValue(endString);
            }
            if (invalid) {
                if (startObject && !invalidobject) {
                    startString = startinvalue.toLocaleDateString();
                }
                if (endObject && !invalidobject) {
                    endString = endinvalue.toLocaleDateString();
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(startString) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(endString)) {
                    valueString = startString + ' ' + this.separator + ' ' + endString;
                }
                else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(startString)) {
                    valueString = startString;
                }
                else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(endString)) {
                    valueString = endString;
                }
                this.invalidValueString = valueString;
                this.setProperties({ value: null }, true);
                this.setProperties({ startValue: null }, true);
                this.setProperties({ endValue: null }, true);
                this.startDate = null;
                this.endDate = null;
            }
        }
    };
    DateRangePicker.prototype.getstringvalue = function (value) {
        var stringValue = null;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && (typeof value === 'number')) {
            stringValue = (value).toString();
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && (typeof value === 'string')) {
            stringValue = '' + value;
        }
        return stringValue;
    };
    DateRangePicker.prototype.checkInvalidValue = function (value) {
        var valueString = value;
        var invalid = false;
        var formatOpt = null;
        formatOpt = { format: this.formatString, type: 'date', skeleton: 'yMd' };
        if (typeof valueString !== 'string') {
            invalid = true;
        }
        else {
            var globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
            if (!this.checkDateValue(globalize.parseDate(valueString, formatOpt))) {
                var extISOStr = null;
                var basISOString = null;
                // tslint:disable-next-line
                extISOStr = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
                // tslint:disable-next-line
                basISOString = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
                if ((!extISOStr.test(valueString) && !basISOString.test(valueString))
                    || (/^[a-zA-Z0-9- ]*$/).test(valueString) || isNaN(+new Date(this.checkValue(valueString)))) {
                    invalid = true;
                }
            }
        }
        return invalid;
    };
    DateRangePicker.prototype.isDateDisabled = function (date) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(date)) {
            return false;
        }
        var value = new Date(+date);
        if (+value < +this.min || +value > +this.max) {
            return true;
        }
        this.virtualRenderCellArgs = {
            date: value,
            isDisabled: false,
        };
        var args = this.virtualRenderCellArgs;
        this.virtualRenderCellEvent(args);
        if (args.isDisabled) {
            return true;
        }
        return false;
    };
    DateRangePicker.prototype.disabledDateRender = function () {
        this.disabledDays = [];
        this.disabledDayCnt = null;
        var localDate = new Date(+this.startValue);
        var count = 0;
        while (+localDate <= +this.endValue) {
            this.virtualRenderCellArgs = {
                date: localDate,
                isDisabled: false,
            };
            var args = this.virtualRenderCellArgs;
            this.virtualRenderCellEvent(args);
            if (args.isDisabled) {
                this.disabledDays.push(new Date(+args.date));
                if (+localDate > +this.startValue && +localDate < +this.endValue) {
                    count++;
                }
            }
            this.addDay(localDate, 1, null, this.max, this.min);
        }
        this.disabledDayCnt = count;
    };
    DateRangePicker.prototype.virtualRenderCellEvent = function (args) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.virtualRenderCellArgs, { name: 'renderDayCell' });
        this.trigger('renderDayCell', args);
    };
    DateRangePicker.prototype.disabledDates = function () {
        var isStartDisabled = false;
        var isEndDisabled = false;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue)) {
            isStartDisabled = this.isDateDisabled(this.startValue);
            isEndDisabled = this.isDateDisabled(this.endValue);
            this.currentDate = null;
            this.setValue();
        }
        return (isStartDisabled || isEndDisabled);
    };
    DateRangePicker.prototype.setModelValue = function () {
        if (!this.value && this.startDate === null && this.endDate === null) {
            this.setProperties({ value: null }, true);
        }
        else if (this.value === null || this.value.start === null) {
            if (this.value === null) {
                this.setProperties({ value: [this.startDate, this.endDate] }, true);
            }
            else if (this.value.start === null) {
                this.setProperties({ value: { start: this.startDate, end: this.endDate } }, true);
            }
        }
        else {
            if ((this.value && this.value.length > 0) ||
                this.valueType && this.valueType.length > 0) {
                if (+this.startDate !== +this.value[0] || +this.endDate !== +this.value[1]) {
                    this.setProperties({ value: [this.startDate, this.endDate] }, true);
                }
                if (this.value && this.value[0] == null && this.value[1] == null) {
                    this.setProperties({ value: null }, true);
                }
            }
            else {
                if ((this.value && this.value.start)) {
                    this.setProperties({ value: { start: this.startDate, end: this.endDate } }, true);
                }
            }
        }
        this.createHiddenInput();
    };
    /**
     * To dispatch the event manually
     */
    DateRangePicker.prototype.dispatchEvent = function (element, type) {
        var evt = document.createEvent('HTMLEvents');
        evt.initEvent(type, false, true);
        element.dispatchEvent(evt);
        this.firstHiddenChild.dispatchEvent(evt);
    };
    DateRangePicker.prototype.changeTrigger = function (e) {
        if (+this.initStartDate !== +this.startValue || +this.initEndDate !== +this.endValue) {
            this.setProperties({ endDate: this.checkDateValue(this.endValue) }, true);
            this.setProperties({ startDate: this.checkDateValue(this.startValue) }, true);
            this.setModelValue();
            this.trigger('change', this.rangeArgs(e));
        }
        this.previousEleValue = this.inputElement.value;
        this.initStartDate = this.checkDateValue(this.startValue);
        this.initEndDate = this.checkDateValue(this.endValue);
    };
    /**
     * This method is used to navigate to the month/year/decade view of the Calendar.
     * @param  {string} view - Specifies the view of the Calendar.
     * @param  {Date} date - Specifies the focused date in a view.
     * @returns void
     * @hidden
     */
    DateRangePicker.prototype.navigateTo = function (view, date) {
        if (this.isPopupOpen()) {
            if (view.toLowerCase() === 'month') {
                view = 'Month';
            }
            else if (view.toLowerCase() === 'year') {
                view = 'Year';
            }
            else if (view.toLowerCase() === 'decade') {
                view = 'Decade';
            }
            else {
                return;
            }
            if (this.getViewNumber(view) < this.getViewNumber(this.depth)) {
                view = this.depth;
            }
            if (this.isMobile) {
                _super.prototype.navigateTo.call(this, view, date);
            }
            else {
                if (date < this.min) {
                    date = new Date(+this.min);
                }
                else if (date >= this.max) {
                    date = new Date(+this.max);
                }
                if (view === 'Month' && this.isSameMonth(date, this.max)) {
                    date = new Date(this.max.getFullYear(), this.max.getMonth() - 1, this.min.getDate());
                }
                else if (view === 'Year' && this.isSameYear(date, this.max)) {
                    date = new Date((this.max.getFullYear() - 1), this.max.getMonth(), this.max.getDate());
                }
                else if (view === 'Decade' && this.isSameDecade(date, this.max)) {
                    date = new Date((this.max.getFullYear() - 10), this.max.getMonth(), this.max.getDate());
                }
                this.leftCalCurrentDate = date;
                this.navigate(this.leftCalendar, this.leftCalCurrentDate, view);
                if (view === 'Month') {
                    date = new Date(this.currentDate.setMonth(this.currentDate.getMonth() + 1));
                }
                else if (view === 'Year') {
                    date = new Date(this.currentDate.setFullYear(this.currentDate.getFullYear() + 1));
                }
                else {
                    date = new Date(this.currentDate.setFullYear(this.currentDate.getFullYear() + 10));
                }
                this.rightCalCurrentDate = date;
                this.navigate(this.rightCalendar, this.rightCalCurrentDate, view);
                this.leftKeyboardModule = this.rightKeyboardModule = null;
                this.updateNavIcons();
            }
            if (this.currentView() === this.depth) {
                this.bindCalendarCellEvents();
            }
            this.removeFocusedDate();
            this.updateRange((this.isMobile ? [this.calendarElement] : [this.leftCalendar, this.rightCalendar]));
        }
    };
    DateRangePicker.prototype.navigate = function (calendar, date, view) {
        this.calendarElement = calendar;
        this.table = calendar.querySelector('table');
        this.tableBodyElement = calendar.querySelector('tbody');
        this.headerTitleElement = calendar.querySelector('.e-title');
        this.tableHeadElement = calendar.querySelector('thead');
        this.contentElement = calendar.querySelector('.e-content');
        this.previousIcon = calendar.querySelector('.e-prev');
        this.nextIcon = calendar.querySelector('.e-next');
        this.effect = ZOOMIN;
        _super.prototype.navigateTo.call(this, view, date);
    };
    /**
     * Sets the focus to widget for interaction.
     * @returns void
     */
    DateRangePicker.prototype.focusIn = function () {
        if (document.activeElement !== this.inputElement && this.enabled) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [INPUTFOCUS]);
            this.inputElement.focus();
            var focusArguments = {
                model: this
            };
        }
    };
    /**
     * Remove the focus from widget, if the widget is in focus state.
     * @returns void
     */
    DateRangePicker.prototype.focusOut = function () {
        var isBlur = this.preventBlur;
        if (document.activeElement === this.inputElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [INPUTFOCUS]);
            this.preventBlur = false;
            this.inputElement.blur();
            this.preventBlur = isBlur;
        }
    };
    /**
     * To destroy the widget.
     * @returns void
     */
    DateRangePicker.prototype.destroy = function () {
        this.hide(null);
        var ariaAttrs = {
            'aria-readonly': this.readonly ? 'true' : 'false', 'tabindex': '0', 'aria-haspopup': 'true',
            'aria-activedescendant': 'null', 'aria-owns': this.element.id + '_popup', 'aria-expanded': 'false',
            'role': 'daterangepicker', 'autocomplete': 'off', 'aria-disabled': !this.enabled ? 'true' : 'false',
            'autocorrect': 'off', 'autocapitalize': 'off', 'aria-invalid': 'false', 'spellcheck': 'false'
        };
        if (this.inputElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputElement], [ROOT]);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'blur', this.inputBlurHandler);
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].removeAttributes(ariaAttrs, this.inputElement);
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cloneElement.getAttribute('tabindex'))) ?
                this.inputElement.setAttribute('tabindex', this.tabIndex) : this.inputElement.removeAttribute('tabindex');
            this.ensureInputAttribute();
            this.inputElement.classList.remove('e-input');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputWrapper)) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
                if (this.angularTag === null) {
                    this.inputWrapper.container.parentElement.appendChild(this.inputElement);
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.inputWrapper.container);
            }
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputKeyboardModule) && !this.isMobile) {
            this.inputKeyboardModule.destroy();
        }
        if (this.popupObj) {
            if (!this.isMobile) {
                this.clearCalendarEvents();
            }
        }
        _super.prototype.destroy.call(this);
        this.inputWrapper = this.popupWrapper = this.popupObj = this.cloneElement = this.presetElement = null;
        if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.formResetHandler);
        }
        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.firstHiddenChild))
            && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.secondHiddenChild))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.firstHiddenChild);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.secondHiddenChild);
            this.firstHiddenChild = this.secondHiddenChild = null;
            this.inputElement.setAttribute('name', this.element.getAttribute('data-name'));
            this.inputElement.removeAttribute('data-name');
        }
    };
    DateRangePicker.prototype.ensureInputAttribute = function () {
        var attr = [];
        for (var i = 0; i < this.inputElement.attributes.length; i++) {
            attr[i] = this.inputElement.attributes[i].name;
        }
        for (var i = 0; i < attr.length; i++) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cloneElement.getAttribute(attr[i]))) {
                if (attr[i].toLowerCase() === 'value') {
                    this.inputElement.value = '';
                }
                this.inputElement.removeAttribute(attr[i]);
            }
            else {
                if (attr[i].toLowerCase() === 'value') {
                    this.inputElement.value = this.cloneElement.getAttribute(attr[i]);
                }
                this.inputElement.setAttribute(attr[i], this.cloneElement.getAttribute(attr[i]));
            }
        }
    };
    /**
     * To get component name
     * @returns string
     * @private
     */
    DateRangePicker.prototype.getModuleName = function () {
        return 'daterangepicker';
    };
    /**
     * Return the properties that are maintained upon browser refresh.
     * @returns string
     */
    DateRangePicker.prototype.getPersistData = function () {
        var keyEntity = ['startDate', 'endDate', 'value'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Return the selected range and day span in the DateRangePicker.
     * @returns Object
     */
    DateRangePicker.prototype.getSelectedRange = function () {
        var range;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.startValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.endValue)) {
            range = (Math.round(Math.abs((this.startValue.getTime() - this.endValue.getTime()) / (1000 * 60 * 60 * 24))) + 1);
            this.disabledDateRender();
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.disabledDayCnt)) {
                range = range - this.disabledDayCnt;
                this.disabledDayCnt = null;
            }
        }
        else {
            range = 0;
        }
        return { startDate: this.startValue, endDate: this.endValue, daySpan: range };
    };
    /**
     * To open the Popup container in the DateRangePicker component.
     * @returns void
     */
    DateRangePicker.prototype.show = function (element, event) {
        var _this = this;
        if (this.isMobile && this.popupObj) {
            this.popupObj.refreshPosition();
        }
        if ((this.enabled && this.readonly) || !this.enabled || this.popupObj) {
            return;
        }
        else {
            if (!this.isPopupOpen()) {
                if (element) {
                    this.targetElement = element;
                }
                this.createPopup();
                if (this.isMobile || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                    this.mobileRangePopupWrap = this.createElement('div', { className: 'e-daterangepick-mob-popup-wrap' });
                    document.body.appendChild(this.mobileRangePopupWrap);
                }
                this.openEventArgs = {
                    popup: this.popupObj || null,
                    cancel: false,
                    date: this.inputElement.value,
                    model: this,
                    event: event ? event : null,
                    appendTo: this.isMobile || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? this.mobileRangePopupWrap : document.body
                };
                var eventArgs = this.openEventArgs;
                this.trigger('open', eventArgs, function (eventArgs) {
                    _this.openEventArgs = eventArgs;
                    if (!_this.openEventArgs.cancel) {
                        _this.openEventArgs.appendTo.appendChild(_this.popupWrapper);
                        _this.showPopup(element, event);
                        var isPreset = (!_this.isCustomRange || (_this.isMobile && _this.isCustomRange));
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(_this.presets[0].start && _this.presets[0].end && _this.presets[0].label) && isPreset) {
                            _this.setScrollPosition();
                        }
                        _this.checkMinMaxDays();
                        if ((_this.isMobile) && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.startDate)) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.endDate))) {
                            _this.endButton.element.classList.add(ACTIVE);
                            _this.startButton.element.classList.remove(ACTIVE);
                            _this.endButton.element.removeAttribute('disabled');
                            _this.selectableDates();
                        }
                        _super.prototype.setOverlayIndex.call(_this, _this.mobileRangePopupWrap, _this.popupObj.element, _this.modal, _this.isMobile || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice);
                    }
                });
            }
        }
    };
    /**
     * To close the Popup container in the DateRangePicker component.
     * @returns void
     */
    DateRangePicker.prototype.hide = function (event) {
        var _this = this;
        if (this.popupObj) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.previousEndValue) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.previousStartValue)) {
                this.clearRange();
            }
            else {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.previousStartValue)) {
                    this.startValue = new Date(this.checkValue(this.previousStartValue));
                    this.setValue();
                    this.currentDate = new Date(this.checkValue(this.startValue));
                }
                else {
                    this.startValue = null;
                    this.setValue();
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.previousEndValue)) {
                    this.endValue = new Date(this.checkValue(this.previousEndValue));
                    this.setValue();
                }
                else {
                    this.endValue = null;
                    this.setValue();
                }
            }
            if (this.isPopupOpen()) {
                this.closeEventArgs = {
                    cancel: false,
                    popup: this.popupObj,
                    date: this.inputElement.value,
                    model: this,
                    event: event ? event : null
                };
                var eventArgs = this.closeEventArgs;
                this.trigger('close', eventArgs, function (eventArgs) {
                    _this.closeEventArgs = eventArgs;
                    if (!_this.closeEventArgs.cancel) {
                        if (_this.isMobile) {
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.startButton) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.endButton)) {
                                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(_this.startButton.element, 'click touchstart', _this.deviceHeaderClick);
                                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(_this.endButton.element, 'click touchstart', _this.deviceHeaderClick);
                            }
                        }
                        if (_this.popupObj) {
                            _this.popupObj.hide();
                            if (_this.preventBlur) {
                                _this.inputElement.focus();
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.inputWrapper.container], [INPUTFOCUS]);
                            }
                        }
                        if (!_this.isMobile) {
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.leftKeyboardModule) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.rightKeyboardModule)) {
                                _this.leftKeyboardModule.destroy();
                                _this.rightKeyboardModule.destroy();
                            }
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.presetElement)) {
                                _this.presetKeyboardModule.destroy();
                            }
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.cancelButton)) {
                                _this.btnKeyboardModule.destroy();
                            }
                        }
                        _this.targetElement = null;
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], OVERFLOW);
                        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown touchstart', _this.documentHandler);
                        if (_this.isMobile && _this.modal) {
                            _this.modal.style.display = 'none';
                            _this.modal.outerHTML = '';
                            _this.modal = null;
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.mobileRangePopupWrap)) {
                                _this.mobileRangePopupWrap.remove();
                                _this.mobileRangePopupWrap = null;
                            }
                        }
                        _this.isKeyPopup = _this.dateDisabled = false;
                    }
                    else {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.inputWrapper.buttons[0]], ACTIVE);
                    }
                    _this.updateClearIconState();
                    _this.updateHiddenInput();
                    if (_this.isMobile && _this.allowEdit && !_this.readonly) {
                        _this.inputElement.removeAttribute('readonly');
                    }
                });
            }
        }
        else {
            this.updateClearIconState();
            this.updateHiddenInput();
            if (this.isMobile && this.allowEdit && !this.readonly) {
                this.inputElement.removeAttribute('readonly');
            }
        }
    };
    DateRangePicker.prototype.setLocale = function () {
        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);
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(this.placeholder, this.inputElement);
        this.updateInput();
        this.changeTrigger();
    };
    DateRangePicker.prototype.refreshChange = function () {
        this.checkView();
        this.refreshControl();
        this.changeTrigger();
    };
    DateRangePicker.prototype.setDate = function () {
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
        this.refreshChange();
    };
    DateRangePicker.prototype.enableInput = function () {
        if (+this.min <= +this.max) {
            this.setProperties({ enabled: true }, true);
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setEnabled(this.enabled, this.inputElement);
            if (this.element.hasAttribute('disabled')) {
                this.bindEvents();
            }
        }
    };
    DateRangePicker.prototype.clearModelvalue = function (newProp, oldProp) {
        this.setProperties({ startDate: null }, true);
        this.setProperties({ endDate: null }, true);
        if (oldProp.value && oldProp.value.length > 0) {
            this.setProperties({ value: null }, true);
        }
        else if (oldProp.value && oldProp.value.start) {
            this.setProperties({ value: { start: null, end: null } }, true);
        }
        else if (oldProp.value && !oldProp.value.start) {
            this.setProperties({ value: { start: null, end: null } }, true);
        }
        this.updateValue();
        this.setDate();
    };
    DateRangePicker.prototype.createHiddenInput = function () {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.firstHiddenChild) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.secondHiddenChild)) {
            this.firstHiddenChild = this.createElement('input');
            this.secondHiddenChild = this.createElement('input');
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElement.getAttribute('name'))) {
            this.inputElement.setAttribute('data-name', this.inputElement.getAttribute('name'));
            this.inputElement.removeAttribute('name');
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.firstHiddenChild, {
            'type': 'text', 'name': this.inputElement.getAttribute('data-name')
        });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.secondHiddenChild, {
            'type': 'text', 'name': this.inputElement.getAttribute('data-name'),
        });
        var format = { type: 'datetime', skeleton: 'yMd' };
        this.firstHiddenChild.value = this.startDate && this.globalize.formatDate(this.startDate, format);
        this.secondHiddenChild.value = this.endDate && this.globalize.formatDate(this.endDate, format);
        this.inputElement.parentElement.appendChild(this.firstHiddenChild);
        this.inputElement.parentElement.appendChild(this.secondHiddenChild);
        this.firstHiddenChild.style.display = 'none';
        this.secondHiddenChild.style.display = 'none';
    };
    /**
     * Called internally if any of the property value changed.
     * returns void
     * @private
     */
    // tslint:disable-next-line:max-func-body-length
    DateRangePicker.prototype.onPropertyChanged = function (newProp, oldProp) {
        var format = { format: this.formatString, type: 'date', skeleton: 'yMd' };
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            this.hide(null);
            switch (prop) {
                case 'width':
                    this.setEleWidth(this.width);
                    break;
                case 'separator':
                    this.previousEleValue = this.inputElement.value;
                    this.setProperties({ separator: newProp.separator }, true);
                    this.updateInput();
                    this.changeTrigger();
                    break;
                case 'placeholder':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(newProp.placeholder, this.inputElement);
                    this.setProperties({ placeholder: newProp.placeholder }, true);
                    break;
                case 'readonly':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setReadonly(this.readonly, this.inputElement);
                    this.inputElement.setAttribute('aria-readonly', '' + this.readonly);
                    this.setRangeAllowEdit();
                    break;
                case 'cssClass':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setCssClass(newProp.cssClass, [this.inputWrapper.container], oldProp.cssClass);
                    if (this.popupWrapper) {
                        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setCssClass(newProp.cssClass, [this.popupWrapper], oldProp.cssClass);
                    }
                    break;
                case 'enabled':
                    this.setProperties({ enabled: newProp.enabled }, true);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setEnabled(this.enabled, this.inputElement);
                    this.bindEvents();
                    break;
                case 'allowEdit':
                    this.setRangeAllowEdit();
                    break;
                case 'enableRtl':
                    this.setProperties({ enableRtl: newProp.enableRtl }, true);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setEnableRtl(this.enableRtl, [this.inputWrapper.container]);
                    break;
                case 'zIndex':
                    this.setProperties({ zIndex: newProp.zIndex }, true);
                    break;
                case 'format':
                    this.setProperties({ format: newProp.format }, true);
                    this.checkFormat();
                    this.updateInput();
                    this.changeTrigger();
                    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);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(this.placeholder, this.inputElement);
                    this.setLocale();
                    break;
                case 'htmlAttributes':
                    this.updateHtmlAttributeToElement();
                    this.updateHtmlAttributeToWrapper();
                    this.checkHtmlAttributes(false);
                    break;
                case 'showClearButton':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setClearButton(this.showClearButton, this.inputElement, this.inputWrapper);
                    this.bindClearEvent();
                    break;
                case 'startDate':
                    if (typeof newProp.startDate === 'string') {
                        newProp.startDate = this.globalize.parseDate(newProp.startDate, format);
                    }
                    if (+this.initStartDate !== +newProp.startDate) {
                        this.startValue = this.checkDateValue(new Date(this.checkValue(newProp.startDate)));
                        this.setDate();
                        this.setValue();
                    }
                    break;
                case 'endDate':
                    if (typeof newProp.endDate === 'string') {
                        newProp.endDate = this.globalize.parseDate(newProp.endDate, format);
                    }
                    if (+this.initEndDate !== +newProp.endDate) {
                        this.endValue = this.checkDateValue(new Date(this.checkValue(newProp.endDate)));
                        this.setDate();
                        this.setValue();
                    }
                    break;
                case 'value':
                    this.invalidValueString = null;
                    this.checkInvalidRange(newProp.value);
                    if (typeof (newProp.value) === 'string') {
                        if (!this.invalidValueString) {
                            var rangeArray = newProp.value.split(' ' + this.separator + ' ');
                            this.value = [new Date(rangeArray[0]), new Date(rangeArray[1])];
                            this.updateValue();
                            this.setDate();
                        }
                        else {
                            this.clearModelvalue(newProp, oldProp);
                        }
                    }
                    else {
                        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.value) && newProp.value.length > 0)
                            || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.value) && newProp.value.start) {
                            this.valueType = newProp.value;
                            if (newProp.value[0] === null || (newProp.value.start === null)) {
                                if (newProp.value.length === 1 || (newProp.value.start)) {
                                    this.clearModelvalue(newProp, oldProp);
                                }
                                else if (newProp.value[1] === null ||
                                    (newProp.value.start === null)) {
                                    this.clearModelvalue(newProp, oldProp);
                                }
                            }
                            else if ((+this.initStartDate !== +newProp.value[0]
                                || +this.initEndDate !== +newProp.value[1]) ||
                                (+this.initStartDate !== +(newProp.value.start
                                    || +this.initEndDate !== +newProp.value.start))) {
                                if (newProp.value.length === 1) {
                                    this.modelValue = newProp.value;
                                }
                                else if (newProp.value.start) {
                                    this.modelValue = newProp.value;
                                }
                                this.updateValue();
                                this.setDate();
                            }
                        }
                        else {
                            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)
                                || newProp.value.start == null) {
                                this.valueType = newProp.value;
                                this.startValue = null;
                                this.endValue = null;
                                this.clearModelvalue(newProp, oldProp);
                            }
                        }
                    }
                    break;
                case 'minDays':
                    this.setProperties({ minDays: newProp.minDays }, true);
                    this.refreshChange();
                    break;
                case 'maxDays':
                    this.setProperties({ maxDays: newProp.maxDays }, true);
                    this.refreshChange();
                    break;
                case 'min':
                    this.setProperties({ min: this.checkDateValue(new Date(this.checkValue(newProp.min))) }, true);
                    this.previousEleValue = this.inputElement.value;
                    this.enableInput();
                    this.refreshChange();
                    break;
                case 'max':
                    this.setProperties({ max: this.checkDateValue(new Date(this.checkValue(newProp.max))) }, true);
                    this.enableInput();
                    this.refreshChange();
                    break;
                case 'strictMode':
                    this.invalidValueString = null;
                    this.setProperties({ strictMode: newProp.strictMode }, true);
                    this.refreshChange();
                    break;
                case 'presets':
                    this.setProperties({ presets: newProp.presets }, true);
                    this.processPresets();
                    break;
                case 'floatLabelType':
                    this.floatLabelType = newProp.floatLabelType;
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].removeFloating(this.inputWrapper);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].addFloating(this.inputElement, this.floatLabelType, this.placeholder);
                    break;
                case 'start':
                    this.setProperties({ start: newProp.start }, true);
                    this.refreshChange();
                    break;
                case 'depth':
                    this.setProperties({ depth: newProp.depth }, true);
                    this.refreshChange();
                    break;
            }
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateRangePicker.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DateRangePicker.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(new Date(1900, 0, 1))
    ], DateRangePicker.prototype, "min", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(new Date(2099, 11, 31))
    ], DateRangePicker.prototype, "max", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateRangePicker.prototype, "locale", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateRangePicker.prototype, "firstDayOfWeek", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DateRangePicker.prototype, "weekNumber", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Gregorian')
    ], DateRangePicker.prototype, "calendarMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "destroyed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "navigated", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "renderDayCell", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateRangePicker.prototype, "startDate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateRangePicker.prototype, "endDate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], Presets)
    ], DateRangePicker.prototype, "presets", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], DateRangePicker.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)
    ], DateRangePicker.prototype, "zIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], DateRangePicker.prototype, "showClearButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], DateRangePicker.prototype, "showTodayButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Month')
    ], DateRangePicker.prototype, "start", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Month')
    ], DateRangePicker.prototype, "depth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], DateRangePicker.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('-')
    ], DateRangePicker.prototype, "separator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateRangePicker.prototype, "minDays", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateRangePicker.prototype, "maxDays", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DateRangePicker.prototype, "strictMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateRangePicker.prototype, "format", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], DateRangePicker.prototype, "enabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DateRangePicker.prototype, "readonly", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], DateRangePicker.prototype, "allowEdit", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')
    ], DateRangePicker.prototype, "floatLabelType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateRangePicker.prototype, "placeholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], DateRangePicker.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "select", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "focus", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateRangePicker.prototype, "blur", void 0);
    DateRangePicker = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], DateRangePicker);
    return DateRangePicker;
}(_calendar_calendar__WEBPACK_IMPORTED_MODULE_1__["CalendarBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/daterangepicker/index.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/daterangepicker/index.js ***!
  \*****************************************************************************/
/*! exports provided: Presets, DateRangePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _daterangepicker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./daterangepicker */ "./node_modules/@syncfusion/ej2-calendars/src/daterangepicker/daterangepicker.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Presets", function() { return _daterangepicker__WEBPACK_IMPORTED_MODULE_0__["Presets"]; });

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

/**
 * DateRangePicker modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/datetimepicker/datetimepicker.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/datetimepicker/datetimepicker.js ***!
  \*************************************************************************************/
/*! exports provided: DateTimePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateTimePicker", function() { return DateTimePicker; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _datepicker_datepicker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../datepicker/datepicker */ "./node_modules/@syncfusion/ej2-calendars/src/datepicker/datepicker.js");
/* harmony import */ var _timepicker_timepicker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../timepicker/timepicker */ "./node_modules/@syncfusion/ej2-calendars/src/timepicker/timepicker.js");
/* harmony import */ var _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-lists */ "./node_modules/@syncfusion/ej2-lists/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
///<reference path='../datepicker/datepicker-model.d.ts'/>









//class constant defination
var DATEWRAPPER = 'e-date-wrapper';
var DATEPICKERROOT = 'e-datepicker';
var DATETIMEWRAPPER = 'e-datetime-wrapper';
var DAY = new Date().getDate();
var MONTH = new Date().getMonth();
var YEAR = new Date().getFullYear();
var HOUR = new Date().getHours();
var MINUTE = new Date().getMinutes();
var SECOND = new Date().getSeconds();
var MILLISECOND = new Date().getMilliseconds();
var ROOT = 'e-datetimepicker';
var DATETIMEPOPUPWRAPPER = 'e-datetimepopup-wrapper';
var INPUTWRAPPER = 'e-input-group-icon';
var POPUP = 'e-popup';
var TIMEICON = 'e-time-icon';
var INPUTFOCUS = 'e-input-focus';
var POPUPDIMENSION = '250px';
var ICONANIMATION = 'e-icon-anim';
var DISABLED = 'e-disabled';
var ERROR = 'e-error';
var CONTENT = 'e-content';
var RTL = 'e-rtl';
var NAVIGATION = 'e-navigation';
var ACTIVE = 'e-active';
var HOVER = 'e-hover';
var ICONS = 'e-icons';
var HALFPOSITION = 2;
var LISTCLASS = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_5__["cssClass"].li;
var ANIMATIONDURATION = 100;
var OVERFLOW = 'e-time-overflow';
/**
 * Represents the DateTimePicker component that allows user to select
 * or enter a date time value.
 * ```html
 * <input id="dateTimePicker"/>
 * ```
 * ```typescript
 * <script>
 *   let dateTimePickerObject:DateTimePicker = new DateTimePicker({ value: new Date() });
 *   dateTimePickerObject.appendTo("#dateTimePicker");
 * </script>
 * ```
 */
var DateTimePicker = /** @class */ (function (_super) {
    __extends(DateTimePicker, _super);
    /**
     * Constructor for creating the widget
     */
    function DateTimePicker(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.valueWithMinutes = null;
        _this.previousDateTime = null;
        _this.dateTimeOptions = options;
        return _this;
    }
    DateTimePicker.prototype.focusHandler = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], INPUTFOCUS);
    };
    /**
     * Sets the focus to widget for interaction.
     * @returns void
     */
    DateTimePicker.prototype.focusIn = function () {
        _super.prototype.focusIn.call(this);
    };
    /**
     * Remove the focus from widget, if the widget is in focus state.
     * @returns void
     */
    DateTimePicker.prototype.focusOut = function () {
        if (document.activeElement === this.inputElement) {
            this.inputElement.blur();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [INPUTFOCUS]);
        }
    };
    DateTimePicker.prototype.blurHandler = function (e) {
        // IE popup closing issue when click over the scrollbar
        if (this.isTimePopupOpen() && this.isPreventBlur) {
            this.inputElement.focus();
            return;
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], INPUTFOCUS);
        var blurArguments = {
            model: this
        };
        if (this.isTimePopupOpen()) {
            this.hide(e);
        }
        this.trigger('blur', blurArguments);
    };
    /**
     * To destroy the widget.
     * @returns void
     */
    DateTimePicker.prototype.destroy = function () {
        if (this.popupObject && this.popupObject.element.classList.contains(POPUP)) {
            this.dateTimeWrapper = undefined;
            this.liCollections = this.timeCollections = [];
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.rippleFn)) {
                this.rippleFn();
            }
        }
        var ariaAttribute = {
            'aria-live': 'assertive', 'aria-atomic': 'true', 'aria-invalid': 'false',
            'aria-haspopup': 'true', 'aria-activedescendant': 'null',
            'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false',
            'aria-owns': this.element.id + '_options', 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off'
        };
        if (this.inputElement) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].removeAttributes(ariaAttribute, this.inputElement);
            this.inputElement.removeAttribute('aria-placeholder');
        }
        if (this.isCalendar()) {
            if (this.popupWrapper) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.popupWrapper);
            }
            this.popupObject = this.popupWrapper = null;
            this.keyboardHandler.destroy();
        }
        this.unBindInputEvents();
        _super.prototype.destroy.call(this);
    };
    /**
     * To Initialize the control rendering.
     * @return void
     * @private
     */
    DateTimePicker.prototype.render = function () {
        this.timekeyConfigure = {
            enter: 'enter',
            escape: 'escape',
            end: 'end',
            tab: 'tab',
            home: 'home',
            down: 'downarrow',
            up: 'uparrow',
            left: 'leftarrow',
            right: 'rightarrow',
            open: 'alt+downarrow',
            close: 'alt+uparrow'
        };
        this.valueWithMinutes = null;
        this.previousDateTime = null;
        this.isPreventBlur = false;
        this.cloneElement = this.element.cloneNode(true);
        this.dateTimeFormat = this.cldrDateTimeFormat();
        this.initValue = this.value;
        _super.prototype.updateHtmlAttributeToElement.call(this);
        this.checkAttributes(true);
        var localeText = { placeholder: this.placeholder };
        this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('datetimepicker', localeText, this.locale);
        this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
        _super.prototype.render.call(this);
        this.createInputElement();
        _super.prototype.updateHtmlAttributeToWrapper.call(this);
        this.bindInputEvents();
        this.setValue();
        this.previousDateTime = this.value && new Date(+this.value);
        if (this.element.tagName === 'EJS-DATETIMEPICKER') {
            this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
            this.element.removeAttribute('tabindex');
            if (!this.enabled) {
                this.inputElement.tabIndex = -1;
            }
        }
    };
    DateTimePicker.prototype.setValue = function () {
        this.initValue = this.validateMinMaxRange(this.value);
        if (!this.strictMode && this.isDateObject(this.initValue)) {
            var value = this.validateMinMaxRange(this.initValue);
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(this.getFormattedValue(value), this.inputElement, this.floatLabelType, this.showClearButton);
            this.setProperties({ value: value }, true);
        }
        else {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
                this.initValue = null;
                this.setProperties({ value: null }, true);
            }
        }
        this.valueWithMinutes = this.value;
        _super.prototype.updateInput.call(this);
    };
    DateTimePicker.prototype.validateMinMaxRange = function (value) {
        var result = value;
        if (this.isDateObject(value)) {
            result = this.validateValue(value);
        }
        else {
            if (+this.min > +this.max) {
                this.disablePopupButton(true);
            }
        }
        this.checkValidState(result);
        return result;
    };
    DateTimePicker.prototype.checkValidState = function (value) {
        this.isValidState = true;
        if (!this.strictMode) {
            if ((+(value) > +(this.max)) || (+(value) < +(this.min))) {
                this.isValidState = false;
            }
        }
        this.checkErrorState();
    };
    DateTimePicker.prototype.checkErrorState = function () {
        if (this.isValidState) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], ERROR);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], ERROR);
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-invalid': this.isValidState ? 'false' : 'true' });
    };
    DateTimePicker.prototype.validateValue = function (value) {
        var dateVal = value;
        if (this.strictMode) {
            if (+this.min > +this.max) {
                this.disablePopupButton(true);
                dateVal = this.max;
            }
            else if (+value < +this.min) {
                dateVal = this.min;
            }
            else if (+value > +this.max) {
                dateVal = this.max;
            }
        }
        else {
            if (+this.min > +this.max) {
                this.disablePopupButton(true);
                dateVal = value;
            }
        }
        return dateVal;
    };
    DateTimePicker.prototype.disablePopupButton = function (isDisable) {
        if (isDisable) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.buttons[0], this.timeIcon], DISABLED);
            this.hide();
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.buttons[0], this.timeIcon], DISABLED);
        }
    };
    DateTimePicker.prototype.getFormattedValue = function (value) {
        var dateOptions;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            if (this.calendarMode === 'Gregorian') {
                dateOptions = { format: this.cldrDateTimeFormat(), type: 'dateTime', skeleton: 'yMd' };
            }
            else {
                dateOptions = { format: this.cldrDateTimeFormat(), type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
            }
            return this.globalize.formatDate(value, dateOptions);
        }
        else {
            return null;
        }
    };
    DateTimePicker.prototype.isDateObject = function (value) {
        return (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && !isNaN(+value)) ? true : false;
    };
    DateTimePicker.prototype.createInputElement = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputElement], DATEPICKERROOT);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], DATEWRAPPER);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], DATETIMEWRAPPER);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputElement], ROOT);
        this.renderTimeIcon();
    };
    DateTimePicker.prototype.renderTimeIcon = function () {
        this.timeIcon = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].appendSpan(INPUTWRAPPER + ' ' + TIMEICON + ' ' + ICONS, this.inputWrapper.container);
    };
    DateTimePicker.prototype.bindInputEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.timeIcon, 'mousedown', this.timeHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.buttons[0], 'mousedown', this.dateHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'blur', this.blurHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'focus', this.focusHandler, this);
        this.keyboardHandler = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.inputElement, {
            eventName: 'keydown',
            keyAction: this.inputKeyAction.bind(this),
            keyConfigs: this.keyConfigs
        });
    };
    DateTimePicker.prototype.unBindInputEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.timeIcon, 'mousedown touchstart', this.timeHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.dateHandler);
        if (this.inputElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'blur', this.blurHandler);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'focus', this.focusHandler);
        }
        if (this.keyboardHandler) {
            this.keyboardHandler.destroy();
        }
    };
    DateTimePicker.prototype.cldrTimeFormat = function () {
        var cldrTime;
        if (this.isNullOrEmpty(this.timeFormat)) {
            if (this.locale === 'en' || this.locale === 'en-US') {
                cldrTime = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('timeFormats.short', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getDefaultDateObject"])()));
            }
            else {
                cldrTime = (this.getCultureTimeObject(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["cldrData"], '' + this.locale));
            }
        }
        else {
            cldrTime = this.timeFormat;
        }
        return cldrTime;
    };
    DateTimePicker.prototype.cldrDateTimeFormat = function () {
        var cldrTime;
        var culture = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        var dateFormat = culture.getDatePattern({ skeleton: 'yMd' });
        if (this.isNullOrEmpty(this.formatString)) {
            cldrTime = dateFormat + ' ' + this.getCldrFormat('time');
        }
        else {
            cldrTime = this.formatString;
        }
        return cldrTime;
    };
    DateTimePicker.prototype.getCldrFormat = function (type) {
        var cldrDateTime;
        if (this.locale === 'en' || this.locale === 'en-US') {
            cldrDateTime = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('timeFormats.short', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getDefaultDateObject"])()));
        }
        else {
            cldrDateTime = (this.getCultureTimeObject(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["cldrData"], '' + this.locale));
        }
        return cldrDateTime;
    };
    DateTimePicker.prototype.isNullOrEmpty = function (value) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) || (typeof value === 'string' && value.trim() === '')) {
            return true;
        }
        else {
            return false;
        }
    };
    DateTimePicker.prototype.getCultureTimeObject = function (ld, c) {
        if (this.calendarMode === 'Gregorian') {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('main.' + '' + this.locale + '.dates.calendars.gregorian.timeFormats.short', ld);
        }
        else {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('main.' + '' + this.locale + '.dates.calendars.islamic.timeFormats.short', ld);
        }
    };
    DateTimePicker.prototype.timeHandler = function (e) {
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.inputElement.setAttribute('readonly', '');
        }
        if (e.currentTarget === this.timeIcon) {
            e.preventDefault();
        }
        if (this.enabled && !this.readonly) {
            if (this.isDatePopupOpen()) {
                _super.prototype.hide.call(this, e);
            }
            if (this.isTimePopupOpen()) {
                this.closePopup(e);
            }
            else {
                this.inputElement.focus();
                this.popupCreation('time', e);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [INPUTFOCUS]);
            }
        }
    };
    DateTimePicker.prototype.dateHandler = function (e) {
        if (e.currentTarget === this.inputWrapper.buttons[0]) {
            e.preventDefault();
        }
        if (this.enabled && !this.readonly) {
            if (this.isTimePopupOpen()) {
                this.closePopup(e);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupWrapper)) {
                this.popupCreation('date', e);
            }
        }
    };
    DateTimePicker.prototype.show = function (type, e) {
        if ((this.enabled && this.readonly) || !this.enabled) {
            return;
        }
        else {
            if (type === 'time' && !this.dateTimeWrapper) {
                if (this.isDatePopupOpen()) {
                    this.hide(e);
                }
                this.popupCreation('time', e);
            }
            else if (!this.popupObj) {
                if (this.isTimePopupOpen()) {
                    this.hide(e);
                }
                _super.prototype.show.call(this);
                this.popupCreation('date', e);
            }
        }
    };
    DateTimePicker.prototype.toggle = function (e) {
        if (this.isDatePopupOpen()) {
            _super.prototype.hide.call(this, e);
            this.show('time', null);
        }
        else if (this.isTimePopupOpen()) {
            this.hide(e);
            _super.prototype.show.call(this, null, e);
            this.popupCreation('date', null);
        }
        else {
            this.show(null, e);
        }
    };
    DateTimePicker.prototype.listCreation = function () {
        var dateObject;
        if (this.calendarMode === 'Gregorian') {
            dateObject = this.globalize.parseDate(this.inputElement.value, {
                format: this.cldrDateTimeFormat(), type: 'datetime'
            });
        }
        else {
            dateObject = this.globalize.parseDate(this.inputElement.value, {
                format: this.cldrDateTimeFormat(), type: 'datetime', calendar: 'islamic'
            });
        }
        var value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? this.inputElement.value !== '' ?
            dateObject :
            new Date() : this.value;
        this.valueWithMinutes = value;
        this.listWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: CONTENT, attrs: { 'tabindex': '0' } });
        var min = this.startTime(value);
        var max = this.endTime(value);
        var listDetails = _timepicker_timepicker__WEBPACK_IMPORTED_MODULE_4__["TimePickerBase"].createListItems(this.createElement, min, max, this.globalize, this.cldrTimeFormat(), this.step);
        this.timeCollections = listDetails.collection;
        this.listTag = listDetails.list;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options' });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([listDetails.list], this.listWrapper);
        this.wireTimeListEvents();
        var rippleModel = { duration: 300, selector: '.' + LISTCLASS };
        this.rippleFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.listWrapper, rippleModel);
        this.liCollections = this.listWrapper.querySelectorAll('.' + LISTCLASS);
    };
    DateTimePicker.prototype.popupCreation = function (type, e) {
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.element.setAttribute('readonly', 'readonly');
        }
        if (type === 'date') {
            if (!this.readonly && this.popupWrapper) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.popupWrapper], DATETIMEPOPUPWRAPPER);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.popupWrapper, { 'id': this.element.id + '_datepopup' });
            }
        }
        else {
            if (!this.readonly) {
                this.dateTimeWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
                    className: ROOT + ' ' + POPUP,
                    attrs: { 'id': this.element.id + '_timepopup', 'style': 'visibility:hidden ; display:block' }
                });
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass)) {
                    this.dateTimeWrapper.className += ' ' + this.cssClass;
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.step) && this.step > 0) {
                    this.listCreation();
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.listWrapper], this.dateTimeWrapper);
                }
                document.body.appendChild(this.dateTimeWrapper);
                this.addTimeSelection();
                this.renderPopup();
                this.setTimeScrollPosition();
                this.openPopup(e);
                this.popupObject.refreshPosition(this.inputElement);
            }
        }
    };
    DateTimePicker.prototype.openPopup = function (e) {
        var _this = this;
        this.preventArgs = {
            cancel: false,
            popup: this.popupObject,
            event: e || null
        };
        var eventArgs = this.preventArgs;
        this.trigger('open', eventArgs, function (eventArgs) {
            _this.preventArgs = eventArgs;
            if (!_this.preventArgs.cancel && !_this.readonly) {
                var openAnimation = {
                    name: 'FadeIn',
                    duration: ANIMATIONDURATION,
                };
                if (_this.zIndex === 1000) {
                    _this.popupObject.show(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](openAnimation), _this.element);
                }
                else {
                    _this.popupObject.show(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](openAnimation), null);
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.inputWrapper.container], [ICONANIMATION]);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this.inputElement, { 'aria-expanded': 'true' });
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown touchstart', _this.documentClickHandler, _this);
            }
        });
    };
    DateTimePicker.prototype.documentClickHandler = function (event) {
        if (event.type !== 'touchstart') {
            event.preventDefault();
        }
        var target = event.target;
        if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '#' + (this.popupObject && this.popupObject.element.id))) && target !== this.inputElement
            && target !== this.timeIcon && target !== this.inputWrapper.container) {
            if (this.isTimePopupOpen()) {
                this.hide(event);
                this.focusOut();
            }
        }
        else if (target !== this.inputElement) {
            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                this.isPreventBlur = ((document.activeElement === this.inputElement) && (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'edge')
                    && target === this.popupObject.element);
                event.preventDefault();
            }
        }
    };
    DateTimePicker.prototype.isTimePopupOpen = function () {
        return (this.dateTimeWrapper && this.dateTimeWrapper.classList.contains('' + ROOT)) ? true : false;
    };
    DateTimePicker.prototype.isDatePopupOpen = function () {
        return (this.popupWrapper && this.popupWrapper.classList.contains('' + DATETIMEPOPUPWRAPPER)) ? true : false;
    };
    DateTimePicker.prototype.renderPopup = function () {
        var _this = this;
        this.containerStyle = this.inputWrapper.container.getBoundingClientRect();
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.timeModal = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div');
            this.timeModal.className = '' + ROOT + ' e-time-modal';
            document.body.className += ' ' + OVERFLOW;
            this.timeModal.style.display = 'block';
            document.body.appendChild(this.timeModal);
        }
        var offset = 4;
        this.popupObject = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["Popup"](this.dateTimeWrapper, {
            width: this.setPopupWidth(),
            zIndex: this.zIndex,
            targetType: 'container',
            collision: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? { X: 'fit', Y: 'fit' } : { X: 'flip', Y: 'flip' },
            relateTo: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? document.body : this.inputWrapper.container,
            position: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? { X: 'center', Y: 'center' } : { X: 'left', Y: 'bottom' },
            enableRtl: this.enableRtl,
            offsetY: offset,
            open: function () {
                _this.dateTimeWrapper.style.visibility = 'visible';
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.timeIcon], ACTIVE);
                if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                    _this.inputEvent = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](_this.inputWrapper.container, {
                        keyAction: _this.TimeKeyActionHandle.bind(_this), keyConfigs: _this.timekeyConfigure, eventName: 'keydown'
                    });
                }
            }, close: function () {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.timeIcon], ACTIVE);
                _this.unWireTimeListEvents();
                _this.inputElement.setAttribute('aria-activedescendant', 'null');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(_this.popupObject.element);
                _this.popupObject.destroy();
                _this.dateTimeWrapper.innerHTML = '';
                _this.listWrapper = _this.dateTimeWrapper = undefined;
                if (_this.inputEvent) {
                    _this.inputEvent.destroy();
                }
            }
        });
        this.popupObject.element.style.maxHeight = POPUPDIMENSION;
    };
    DateTimePicker.prototype.setDimension = function (width) {
        if (typeof width === 'number') {
            width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
        }
        else if (typeof width === 'string') {
            width = width;
        }
        else {
            width = '100%';
        }
        return width;
    };
    DateTimePicker.prototype.setPopupWidth = function () {
        var width = this.setDimension(this.width);
        if (width.indexOf('%') > -1) {
            var inputWidth = this.containerStyle.width * parseFloat(width) / 100;
            width = inputWidth.toString() + 'px';
        }
        return width;
    };
    DateTimePicker.prototype.wireTimeListEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listWrapper, 'click', this.onMouseClick, this);
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listWrapper, 'mouseover', this.onMouseOver, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listWrapper, 'mouseout', this.onMouseLeave, this);
        }
    };
    DateTimePicker.prototype.unWireTimeListEvents = function () {
        if (this.listWrapper) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.listWrapper, 'click', this.onMouseClick);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown touchstart', this.documentClickHandler);
            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listWrapper, 'mouseover', this.onMouseOver, this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listWrapper, 'mouseout', this.onMouseLeave, this);
            }
        }
    };
    DateTimePicker.prototype.onMouseOver = function (event) {
        var currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(event.target, '.' + LISTCLASS);
        this.setTimeHover(currentLi, HOVER);
    };
    DateTimePicker.prototype.onMouseLeave = function () {
        this.removeTimeHover(HOVER);
    };
    DateTimePicker.prototype.setTimeHover = function (li, className) {
        if (this.enabled && this.isValidLI(li) && !li.classList.contains(className)) {
            this.removeTimeHover(className);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], className);
        }
    };
    DateTimePicker.prototype.getPopupHeight = function () {
        var height = parseInt(POPUPDIMENSION, 10);
        var popupHeight = this.dateTimeWrapper.getBoundingClientRect().height;
        return popupHeight > height ? height : popupHeight;
    };
    DateTimePicker.prototype.changeEvent = function (e) {
        if (+this.previousDateTime !== +this.value) {
            _super.prototype.changeEvent.call(this, e);
            this.inputElement.focus();
            this.valueWithMinutes = this.value;
            this.setInputValue('date');
            this.previousDateTime = this.value && new Date(+this.value);
        }
    };
    DateTimePicker.prototype.updateValue = function (e) {
        this.setInputValue('time');
        if (+this.previousDateTime !== +this.value) {
            this.changedArgs = {
                value: this.value, event: e || null,
                isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
                element: this.element
            };
            this.addTimeSelection();
            this.trigger('change', this.changedArgs);
            this.previousDateTime = this.value;
        }
    };
    DateTimePicker.prototype.setTimeScrollPosition = function () {
        var popupElement;
        popupElement = this.selectedElement;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(popupElement)) {
            this.findScrollTop(popupElement);
        }
        else if (this.dateTimeWrapper && this.checkDateValue(this.scrollTo)) {
            this.setScrollTo();
        }
    };
    DateTimePicker.prototype.findScrollTop = function (element) {
        var listHeight = this.getPopupHeight();
        var nextElement = element.nextElementSibling;
        var height = nextElement ? nextElement.offsetTop : element.offsetTop;
        var lineHeight = element.getBoundingClientRect().height;
        if ((height + element.offsetTop) > listHeight) {
            this.dateTimeWrapper.scrollTop = nextElement ? (height - (listHeight / HALFPOSITION + lineHeight / HALFPOSITION)) : height;
        }
        else {
            this.dateTimeWrapper.scrollTop = 0;
        }
    };
    DateTimePicker.prototype.setScrollTo = function () {
        var element;
        var items = this.dateTimeWrapper.querySelectorAll('.' + LISTCLASS);
        if (items.length >= 0) {
            var initialTime = this.timeCollections[0];
            var scrollTime = this.getDateObject(this.checkDateValue(this.scrollTo)).getTime();
            element = items[Math.round((scrollTime - initialTime) / (this.step * 60000))];
        }
        else {
            this.dateTimeWrapper.scrollTop = 0;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            this.findScrollTop(element);
        }
        else {
            this.dateTimeWrapper.scrollTop = 0;
        }
    };
    DateTimePicker.prototype.setInputValue = function (type) {
        if (type === 'date') {
            this.inputElement.value = this.previousElementValue = this.getFormattedValue(this.getFullDateTime());
            this.setProperties({ value: this.getFullDateTime() }, true);
        }
        else {
            var tempVal = this.getFormattedValue(new Date(this.timeCollections[this.activeIndex]));
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(tempVal, this.inputElement, this.floatLabelType, this.showClearButton);
            this.previousElementValue = this.inputElement.value;
            this.setProperties({ value: new Date(this.timeCollections[this.activeIndex]) }, true);
        }
        this.updateIconState();
    };
    DateTimePicker.prototype.getFullDateTime = function () {
        var value = null;
        if (this.isDateObject(this.valueWithMinutes)) {
            value = this.combineDateTime(this.valueWithMinutes);
        }
        else {
            value = this.previousDate;
        }
        return this.validateMinMaxRange(value);
    };
    DateTimePicker.prototype.combineDateTime = function (value) {
        if (this.isDateObject(value)) {
            var day = this.previousDate.getDate();
            var month = this.previousDate.getMonth();
            var year = this.previousDate.getFullYear();
            var hour = value.getHours();
            var minutes = value.getMinutes();
            var seconds = value.getSeconds();
            return new Date(year, month, day, hour, minutes, seconds);
        }
        else {
            return this.previousDate;
        }
    };
    DateTimePicker.prototype.onMouseClick = function (event) {
        var target = event.target;
        var li = this.selectedElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTCLASS);
        if (li && li.classList.contains(LISTCLASS)) {
            this.timeValue = li.getAttribute('data-value');
            this.hide(event);
        }
        this.setSelection(li, event);
    };
    DateTimePicker.prototype.setSelection = function (li, event) {
        if (this.isValidLI(li) && !li.classList.contains(ACTIVE)) {
            var value = li.getAttribute('data-value');
            this.selectedElement = li;
            var index = Array.prototype.slice.call(this.liCollections).indexOf(li);
            this.activeIndex = index;
            this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.selectedElement], ACTIVE);
            this.selectedElement.setAttribute('aria-selected', 'true');
            this.updateValue(event);
        }
    };
    DateTimePicker.prototype.setTimeActiveClass = function () {
        var collections = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeWrapper) ? this.listWrapper : this.dateTimeWrapper;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(collections)) {
            var items = collections.querySelectorAll('.' + LISTCLASS);
            if (items.length) {
                for (var i = 0; i < items.length; i++) {
                    if (this.timeCollections[i] === +(this.valueWithMinutes)) {
                        items[i].setAttribute('aria-selected', 'true');
                        this.selectedElement = items[i];
                        this.activeIndex = i;
                        this.setTimeActiveDescendant();
                        break;
                    }
                }
            }
        }
    };
    DateTimePicker.prototype.setTimeActiveDescendant = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedElement)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-activedescendant': this.selectedElement.getAttribute('id') });
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-activedescendant': 'null' });
        }
    };
    DateTimePicker.prototype.addTimeSelection = function () {
        this.selectedElement = null;
        this.removeTimeSelection();
        this.setTimeActiveClass();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedElement)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.selectedElement], ACTIVE);
            this.selectedElement.setAttribute('aria-selected', 'true');
        }
    };
    DateTimePicker.prototype.removeTimeSelection = function () {
        this.removeTimeHover(HOVER);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeWrapper)) {
            var items = this.dateTimeWrapper.querySelectorAll('.' + ACTIVE);
            if (items.length) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(items, ACTIVE);
                items[0].removeAttribute('aria-selected');
            }
        }
    };
    DateTimePicker.prototype.removeTimeHover = function (className) {
        var hoveredItem = this.getTimeHoverItem(className);
        if (hoveredItem && hoveredItem.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(hoveredItem, className);
        }
    };
    DateTimePicker.prototype.getTimeHoverItem = function (className) {
        var collections = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeWrapper) ? this.listWrapper : this.dateTimeWrapper;
        var hoveredItem;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(collections)) {
            hoveredItem = collections.querySelectorAll('.' + className);
        }
        return hoveredItem;
    };
    DateTimePicker.prototype.isValidLI = function (li) {
        return (li && li.classList.contains(LISTCLASS) && !li.classList.contains(DISABLED));
    };
    DateTimePicker.prototype.calculateStartEnd = function (value, range, method) {
        var day = value.getDate();
        var month = value.getMonth();
        var year = value.getFullYear();
        var hours = value.getHours();
        var minutes = value.getMinutes();
        var seconds = value.getSeconds();
        var milliseconds = value.getMilliseconds();
        if (range) {
            if (method === 'starttime') {
                return new Date(year, month, day, 0, 0, 0);
            }
            else {
                return new Date(year, month, day, 23, 59, 59);
            }
        }
        else {
            return new Date(year, month, day, hours, minutes, seconds, milliseconds);
        }
    };
    DateTimePicker.prototype.startTime = function (date) {
        var tempStartValue;
        var start;
        var tempMin = this.min;
        var value;
        value = date === null ? new Date() : date;
        if ((+value.getDate() === +tempMin.getDate() && +value.getMonth() === +tempMin.getMonth() &&
            +value.getFullYear() === +tempMin.getFullYear()) || ((+new Date(value.getFullYear(), value.getMonth(), value.getDate())) <=
            +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate()))) {
            start = false;
            tempStartValue = this.min;
        }
        else if (+value < +this.max && +value > +this.min) {
            start = true;
            tempStartValue = value;
        }
        else if (+value >= +this.max) {
            start = true;
            tempStartValue = this.max;
        }
        return this.calculateStartEnd(tempStartValue, start, 'starttime');
    };
    DateTimePicker.prototype.endTime = function (date) {
        var tempEndValue;
        var end;
        var tempMax = this.max;
        var value;
        value = date === null ? new Date() : date;
        if ((+value.getDate() === +tempMax.getDate() && +value.getMonth() === +tempMax.getMonth() &&
            +value.getFullYear() === +tempMax.getFullYear()) || (+new Date(value.getUTCFullYear(), value.getMonth(), value.getDate()) >=
            +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate()))) {
            end = false;
            tempEndValue = this.max;
        }
        else if (+value < +this.max && +value > +this.min) {
            end = true;
            tempEndValue = value;
        }
        else if (+value <= +this.min) {
            end = true;
            tempEndValue = this.min;
        }
        return this.calculateStartEnd(tempEndValue, end, 'endtime');
    };
    DateTimePicker.prototype.hide = function (e) {
        var _this = this;
        if (this.popupObj || this.dateTimeWrapper) {
            this.preventArgs = {
                cancel: false,
                popup: this.popupObj || this.popupObject,
                event: e || null
            };
            var eventArgs = this.preventArgs;
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj)) {
                this.trigger('close', eventArgs, function (eventArgs) {
                    _this.dateTimeCloseEventCallback(e, eventArgs);
                });
            }
            else {
                this.dateTimeCloseEventCallback(e, eventArgs);
            }
        }
        else {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.allowEdit && !this.readonly) {
                this.inputElement.removeAttribute('readonly');
            }
            this.setAllowEdit();
        }
    };
    DateTimePicker.prototype.dateTimeCloseEventCallback = function (e, eventArgs) {
        this.preventArgs = eventArgs;
        if (!this.preventArgs.cancel) {
            if (this.isDatePopupOpen()) {
                _super.prototype.hide.call(this, e);
            }
            else if (this.isTimePopupOpen()) {
                this.closePopup(e);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], OVERFLOW);
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.timeModal) {
                    this.timeModal.style.display = 'none';
                    this.timeModal.outerHTML = '';
                    this.timeModal = null;
                }
                this.setTimeActiveDescendant();
            }
        }
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.allowEdit && !this.readonly) {
            this.inputElement.removeAttribute('readonly');
        }
        this.setAllowEdit();
    };
    DateTimePicker.prototype.closePopup = function (e) {
        if (this.isTimePopupOpen() && this.popupObject) {
            var animModel = {
                name: 'FadeOut',
                duration: ANIMATIONDURATION,
                delay: 0
            };
            this.popupObject.hide(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animModel));
            this.inputWrapper.container.classList.remove(ICONANIMATION);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-expanded': 'false' });
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown touchstart', this.documentClickHandler);
        }
    };
    DateTimePicker.prototype.preRender = function () {
        this.checkFormat();
        this.dateTimeFormat = this.cldrDateTimeFormat();
        _super.prototype.preRender.call(this);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputElementCopy], [ROOT]);
    };
    ;
    DateTimePicker.prototype.getProperty = function (date, val) {
        if (val === 'min') {
            this.setProperties({ min: this.validateValue(date.min) }, true);
        }
        else {
            this.setProperties({ max: this.validateValue(date.max) }, true);
        }
    };
    DateTimePicker.prototype.checkAttributes = function (isDynamic) {
        var attributes = ['style', 'name', 'step', 'disabled', 'readonly', 'value', 'min', 'max', 'placeholder', 'type'];
        var value;
        for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
            var prop = attributes_1[_i];
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElement.getAttribute(prop))) {
                switch (prop) {
                    case 'name':
                        this.inputElement.setAttribute('name', this.inputElement.getAttribute(prop));
                        break;
                    case 'step':
                        this.step = parseInt(this.inputElement.getAttribute(prop), 10);
                        break;
                    case 'readonly':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeOptions) || (this.dateTimeOptions['readonly'] === undefined)) || !isDynamic) {
                            var readonly = this.inputElement.getAttribute(prop) === 'disabled' ||
                                this.inputElement.getAttribute(prop) === '';
                            this.setProperties({ readonly: readonly }, isDynamic);
                        }
                        break;
                    case 'placeholder':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeOptions) || (this.dateTimeOptions['placeholder'] === undefined)) || !isDynamic) {
                            this.setProperties({ placeholder: this.inputElement.getAttribute(prop) }, isDynamic);
                        }
                        break;
                    case 'min':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeOptions) || (this.dateTimeOptions['min'] === undefined)) || !isDynamic) {
                            value = new Date(this.inputElement.getAttribute(prop));
                            if (!this.isNullOrEmpty(value) && !isNaN(+value)) {
                                this.setProperties({ min: value }, isDynamic);
                            }
                        }
                        break;
                    case 'disabled':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeOptions) || (this.dateTimeOptions['enabled'] === undefined)) || !isDynamic) {
                            var enabled = this.inputElement.getAttribute(prop) === 'disabled' ||
                                this.inputElement.getAttribute(prop) === '';
                            this.setProperties({ enabled: enabled }, isDynamic);
                        }
                        break;
                    case 'value':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeOptions) || (this.dateTimeOptions['value'] === undefined)) || !isDynamic) {
                            value = new Date(this.inputElement.getAttribute(prop));
                            if (!this.isNullOrEmpty(value) && !isNaN(+value)) {
                                this.setProperties({ value: value }, isDynamic);
                            }
                        }
                        break;
                    case 'max':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeOptions) || (this.dateTimeOptions['max'] === undefined)) || !isDynamic) {
                            value = new Date(this.inputElement.getAttribute(prop));
                            if (!this.isNullOrEmpty(value) && !isNaN(+value)) {
                                this.setProperties({ max: value }, isDynamic);
                            }
                        }
                        break;
                }
            }
        }
    };
    DateTimePicker.prototype.requiredModules = function () {
        var modules = [];
        if (this) {
            modules.push({ args: [this], member: 'islamic' });
        }
        return modules;
    };
    DateTimePicker.prototype.getTimeActiveElement = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dateTimeWrapper)) {
            return this.dateTimeWrapper.querySelectorAll('.' + ACTIVE);
        }
        else {
            return null;
        }
    };
    DateTimePicker.prototype.createDateObj = function (val) {
        return val instanceof Date ? val : null;
    };
    DateTimePicker.prototype.getDateObject = function (text) {
        if (!this.isNullOrEmpty(text)) {
            var dateValue = this.createDateObj(text);
            var value = this.valueWithMinutes;
            var status_1 = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value);
            if (this.checkDateValue(dateValue)) {
                var date = status_1 ? value.getDate() : DAY;
                var month = status_1 ? value.getMonth() : MONTH;
                var year = status_1 ? value.getFullYear() : YEAR;
                var hour = status_1 ? value.getHours() : HOUR;
                var minute = status_1 ? value.getMinutes() : MINUTE;
                var second = status_1 ? value.getSeconds() : SECOND;
                var millisecond = status_1 ? value.getMilliseconds() : MILLISECOND;
                return new Date(year, month, date, hour, minute, second, millisecond);
            }
        }
        return null;
    };
    DateTimePicker.prototype.findNextTimeElement = function (event) {
        var textVal = (this.inputElement).value;
        var value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.valueWithMinutes) ? this.createDateObj(textVal) :
            this.getDateObject(this.valueWithMinutes);
        var dateTimeVal = null;
        var listCount = this.liCollections.length;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
            if (event.action === 'home') {
                dateTimeVal = +(this.createDateObj(new Date(this.timeCollections[0])));
                this.activeIndex = 0;
            }
            else if (event.action === 'end') {
                dateTimeVal = +(this.createDateObj(new Date(this.timeCollections[this.timeCollections.length - 1])));
                this.activeIndex = this.timeCollections.length - 1;
            }
            else {
                if (event.action === 'down') {
                    for (var i = 0; i < listCount; i++) {
                        if (+value < this.timeCollections[i]) {
                            dateTimeVal = +(this.createDateObj(new Date(this.timeCollections[i])));
                            this.activeIndex = i;
                            break;
                        }
                    }
                }
                else {
                    for (var i = listCount - 1; i >= 0; i--) {
                        if (+value > this.timeCollections[i]) {
                            dateTimeVal = +(this.createDateObj(new Date(this.timeCollections[i])));
                            this.activeIndex = i;
                            break;
                        }
                    }
                }
            }
            this.selectedElement = this.liCollections[this.activeIndex];
            this.timeElementValue(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dateTimeVal) ? null : new Date(dateTimeVal));
        }
    };
    DateTimePicker.prototype.setTimeValue = function (date, value) {
        var dateString;
        var time;
        var val = this.validateMinMaxRange(value);
        var newval = this.createDateObj(val);
        if (this.getFormattedValue(newval) !== (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? this.getFormattedValue(this.value) : null)) {
            this.valueWithMinutes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newval) ? null : newval;
            time = new Date(+this.valueWithMinutes);
        }
        else {
            if (this.strictMode) {
                //for strict mode case, when value not present within a range. Reset the nearest range value.
                date = newval;
            }
            this.valueWithMinutes = this.checkDateValue(date);
            time = new Date(+this.valueWithMinutes);
        }
        if (this.calendarMode === 'Gregorian') {
            dateString = this.globalize.formatDate(time, {
                format: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.cldrDateTimeFormat(),
                type: 'dateTime', skeleton: 'yMd'
            });
        }
        else {
            dateString = this.globalize.formatDate(time, {
                format: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formatString) ? this.formatString : this.cldrDateTimeFormat(),
                type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'
            });
        }
        if (!this.strictMode && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(time)) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton);
        }
        else {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton);
        }
        return time;
    };
    DateTimePicker.prototype.timeElementValue = function (value) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value)) && !this.isNullOrEmpty(value)) {
            var date = value instanceof Date ? value : this.getDateObject(value);
            return this.setTimeValue(date, value);
        }
        return null;
    };
    DateTimePicker.prototype.timeKeyHandler = function (event) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.step) || this.step <= 0) {
            return;
        }
        var listCount = this.timeCollections.length;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.getTimeActiveElement()) || this.getTimeActiveElement().length === 0) {
            if (this.liCollections.length > 0) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex)) {
                    this.activeIndex = 0;
                    this.selectedElement = this.liCollections[0];
                    this.timeElementValue(new Date(this.timeCollections[0]));
                }
                else {
                    this.findNextTimeElement(event);
                }
            }
        }
        else {
            var nextItemValue = void 0;
            if ((event.keyCode >= 37) && (event.keyCode <= 40)) {
                var index = (event.keyCode === 40 || event.keyCode === 39) ? ++this.activeIndex : --this.activeIndex;
                this.activeIndex = index = this.activeIndex === (listCount) ? 0 : this.activeIndex;
                this.activeIndex = index = this.activeIndex < 0 ? (listCount - 1) : this.activeIndex;
                nextItemValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.timeCollections[index]) ? this.timeCollections[0] : this.timeCollections[index];
            }
            else if (event.action === 'home') {
                this.activeIndex = 0;
                nextItemValue = this.timeCollections[0];
            }
            else if (event.action === 'end') {
                this.activeIndex = listCount - 1;
                nextItemValue = this.timeCollections[listCount - 1];
            }
            this.selectedElement = this.liCollections[this.activeIndex];
            this.timeElementValue(new Date(nextItemValue));
        }
        this.isNavigate = true;
        this.setTimeHover(this.selectedElement, NAVIGATION);
        this.setTimeActiveDescendant();
        if (this.isTimePopupOpen() && this.selectedElement !== null && (!event || event.type !== 'click')) {
            this.setTimeScrollPosition();
        }
    };
    DateTimePicker.prototype.TimeKeyActionHandle = function (event) {
        if (this.enabled) {
            if (event.action !== 'right' && event.action !== 'left' && event.action !== 'tab') {
                event.preventDefault();
            }
            switch (event.action) {
                case 'up':
                case 'down':
                case 'home':
                case 'end':
                    this.timeKeyHandler(event);
                    break;
                case 'enter':
                    if (this.isNavigate) {
                        this.selectedElement = this.liCollections[this.activeIndex];
                        this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]);
                        this.setInputValue('time');
                        if (+this.previousDateTime !== +this.value) {
                            this.changedArgs.value = this.value;
                            this.addTimeSelection();
                            this.previousDateTime = this.value;
                        }
                    }
                    else {
                        this.updateValue(event);
                    }
                    this.hide(event);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], INPUTFOCUS);
                    this.isNavigate = false;
                    event.stopPropagation();
                    break;
                case 'escape':
                    this.hide(event);
                    break;
                default:
                    this.isNavigate = false;
                    break;
            }
        }
    };
    DateTimePicker.prototype.inputKeyAction = function (event) {
        switch (event.action) {
            case 'altDownArrow':
                this.strictModeUpdate();
                this.updateInput();
                this.toggle(event);
                break;
        }
    };
    DateTimePicker.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'value':
                    var options = { format: this.cldrDateTimeFormat(), type: 'dateTime', skeleton: 'yMd' };
                    this.invalidValueString = null;
                    this.checkInvalidValue(newProp.value);
                    newProp.value = this.value;
                    newProp.value = this.validateValue(newProp.value);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(this.getFormattedValue(newProp.value), this.inputElement, this.floatLabelType, this.showClearButton);
                    this.valueWithMinutes = newProp.value;
                    this.setProperties({ value: newProp.value }, true);
                    this.previousDateTime = new Date(this.inputElement.value);
                    this.updateInput();
                    this.changeTrigger(null);
                    break;
                case 'min':
                case 'max':
                    this.getProperty(newProp, prop);
                    this.updateInput();
                    break;
                case 'enableRtl':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setEnableRtl(this.enableRtl, [this.inputWrapper.container]);
                    break;
                case 'cssClass':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setCssClass(newProp.cssClass, [this.inputWrapper.container], oldProp.cssClass);
                    if (this.dateTimeWrapper) {
                        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setCssClass(newProp.cssClass, [this.dateTimeWrapper], 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);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setPlaceholder(this.l10n.getConstant('placeholder'), this.inputElement);
                    this.dateTimeFormat = this.cldrDateTimeFormat();
                    _super.prototype.updateInput.call(this);
                    break;
                case 'htmlAttributes':
                    this.updateHtmlAttributeToElement();
                    this.updateHtmlAttributeToWrapper();
                    this.checkAttributes(false);
                    break;
                case 'format':
                    this.setProperties({ format: newProp.format }, true);
                    this.checkFormat();
                    this.dateTimeFormat = this.formatString;
                    this.setValue();
                    break;
                case 'placeholder':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setPlaceholder(newProp.placeholder, this.inputElement);
                    this.inputElement.setAttribute('aria-placeholder', newProp.placeholder);
                    break;
                case 'enabled':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setEnabled(this.enabled, this.inputElement);
                    if (!this.enabled) {
                        this.inputElement.tabIndex = -1;
                    }
                    this.bindEvents();
                    break;
                case 'strictMode':
                    this.invalidValueString = null;
                    this.updateInput();
                    break;
                case 'width':
                    this.setWidth(newProp.width);
                    break;
                case 'readonly':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setReadonly(this.readonly, this.inputElement);
                    break;
                case 'floatLabelType':
                    this.floatLabelType = newProp.floatLabelType;
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].removeFloating(this.inputWrapper);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].addFloating(this.inputElement, this.floatLabelType, this.placeholder);
                    break;
                case 'scrollTo':
                    if (this.checkDateValue(new Date(this.checkValue(newProp.scrollTo)))) {
                        if (this.dateTimeWrapper) {
                            this.setScrollTo();
                        }
                        this.setProperties({ scrollTo: newProp.scrollTo }, true);
                    }
                    else {
                        this.setProperties({ scrollTo: null }, true);
                    }
                    break;
                default:
                    _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
                    break;
            }
            this.hide(null);
        }
    };
    /**
     * To get component name.
     * @private
     */
    DateTimePicker.prototype.getModuleName = function () {
        return 'datetimepicker';
    };
    DateTimePicker.prototype.restoreValue = function () {
        this.previousDateTime = this.previousDate;
        this.currentDate = this.value ? this.value : new Date();
        this.valueWithMinutes = this.value;
        this.previousDate = this.value;
        this.previousElementValue = this.previousElementValue = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputValueCopy)) ? '' :
            this.getFormattedValue(this.inputValueCopy);
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateTimePicker.prototype, "timeFormat", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(30)
    ], DateTimePicker.prototype, "step", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateTimePicker.prototype, "scrollTo", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)
    ], DateTimePicker.prototype, "zIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], DateTimePicker.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DateTimePicker.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], DateTimePicker.prototype, "allowEdit", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DateTimePicker.prototype, "isMultiSelection", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateTimePicker.prototype, "values", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], DateTimePicker.prototype, "showClearButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DateTimePicker.prototype, "placeholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DateTimePicker.prototype, "strictMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateTimePicker.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateTimePicker.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateTimePicker.prototype, "blur", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateTimePicker.prototype, "focus", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateTimePicker.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DateTimePicker.prototype, "destroyed", void 0);
    DateTimePicker = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], DateTimePicker);
    return DateTimePicker;
}(_datepicker_datepicker__WEBPACK_IMPORTED_MODULE_3__["DatePicker"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/datetimepicker/index.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/datetimepicker/index.js ***!
  \****************************************************************************/
/*! exports provided: DateTimePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _datetimepicker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./datetimepicker */ "./node_modules/@syncfusion/ej2-calendars/src/datetimepicker/datetimepicker.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateTimePicker", function() { return _datetimepicker__WEBPACK_IMPORTED_MODULE_0__["DateTimePicker"]; });

/**
 * DateTimePicker modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/index.js":
/*!*************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/index.js ***!
  \*************************************************************/
/*! exports provided: CalendarBase, Calendar, Islamic, DatePicker, Presets, DateRangePicker, TimePickerBase, TimePicker, DateTimePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _calendar_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./calendar/index */ "./node_modules/@syncfusion/ej2-calendars/src/calendar/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CalendarBase", function() { return _calendar_index__WEBPACK_IMPORTED_MODULE_0__["CalendarBase"]; });

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

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

/* harmony import */ var _datepicker_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./datepicker/index */ "./node_modules/@syncfusion/ej2-calendars/src/datepicker/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DatePicker", function() { return _datepicker_index__WEBPACK_IMPORTED_MODULE_1__["DatePicker"]; });

/* harmony import */ var _daterangepicker_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./daterangepicker/index */ "./node_modules/@syncfusion/ej2-calendars/src/daterangepicker/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Presets", function() { return _daterangepicker_index__WEBPACK_IMPORTED_MODULE_2__["Presets"]; });

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

/* harmony import */ var _timepicker_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./timepicker/index */ "./node_modules/@syncfusion/ej2-calendars/src/timepicker/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimePickerBase", function() { return _timepicker_index__WEBPACK_IMPORTED_MODULE_3__["TimePickerBase"]; });

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

/* harmony import */ var _datetimepicker_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./datetimepicker/index */ "./node_modules/@syncfusion/ej2-calendars/src/datetimepicker/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateTimePicker", function() { return _datetimepicker_index__WEBPACK_IMPORTED_MODULE_4__["DateTimePicker"]; });

/**
 * Calendar all modules
 */







/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/timepicker/index.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/timepicker/index.js ***!
  \************************************************************************/
/*! exports provided: TimePickerBase, TimePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _timepicker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timepicker */ "./node_modules/@syncfusion/ej2-calendars/src/timepicker/timepicker.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimePickerBase", function() { return _timepicker__WEBPACK_IMPORTED_MODULE_0__["TimePickerBase"]; });

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

/**
 * TimePicker modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-calendars/src/timepicker/timepicker.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-calendars/src/timepicker/timepicker.js ***!
  \*****************************************************************************/
/*! exports provided: TimePickerBase, TimePicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimePickerBase", function() { return TimePickerBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimePicker", function() { return TimePicker; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-lists */ "./node_modules/@syncfusion/ej2-lists/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 WRAPPERCLASS = 'e-time-wrapper';
var POPUP = 'e-popup';
var ERROR = 'e-error';
var POPUPDIMENSION = '240px';
var DAY = new Date().getDate();
var MONTH = new Date().getMonth();
var YEAR = new Date().getFullYear();
var ROOT = 'e-timepicker';
var LIBRARY = 'e-lib';
var CONTROL = 'e-control';
var RTL = 'e-rtl';
var CONTENT = 'e-content';
var SELECTED = 'e-active';
var HOVER = 'e-hover';
var NAVIGATION = 'e-navigation';
var DISABLED = 'e-disabled';
var ICONANIMATION = 'e-icon-anim';
var FOCUS = 'e-input-focus';
var DEVICE = 'e-device';
var LISTCLASS = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_3__["cssClass"].li;
var HALFPOSITION = 2;
var ANIMATIONDURATION = 50;
var OVERFLOW = 'e-time-overflow';
var OFFSETVAL = 4;
var EDITABLE = 'e-non-edit';
var wrapperAttributes = ['title', 'class', 'style'];
var TimePickerBase;
(function (TimePickerBase) {
    // tslint:disable-next-line
    function createListItems(createdEl, min, max, globalize, timeFormat, step) {
        var formatOptions;
        if (this.calendarMode === 'Gregorian') {
            formatOptions = { format: timeFormat, type: 'time' };
        }
        else {
            formatOptions = { format: timeFormat, type: 'time', calendar: 'islamic' };
        }
        var start;
        var end;
        var interval = step * 60000;
        var listItems = [];
        var timeCollections = [];
        start = +(min.setMilliseconds(0));
        end = +(max.setMilliseconds(0));
        while (end >= start) {
            timeCollections.push(start);
            listItems.push(globalize.formatDate(new Date(start), { format: timeFormat, type: 'time' }));
            start += interval;
        }
        var listTag = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_3__["ListBase"].createList(createdEl, listItems, null, true);
        return { collection: timeCollections, list: listTag };
    }
    TimePickerBase.createListItems = createListItems;
})(TimePickerBase || (TimePickerBase = {}));
/**
 * TimePicker is an intuitive interface component which provides an options to select a time value
 * from popup list or to set a desired time value.
 * ```
 * <input id='timepicker' type='text'/>
 * <script>
 *   var timePickerObj = new TimePicker({ value: new Date() });
 *   timePickerObj.appendTo('#timepicker');
 * </script>
 * ```
 */
var TimePicker = /** @class */ (function (_super) {
    __extends(TimePicker, _super);
    /**
     * Constructor for creating the widget
     */
    function TimePicker(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.liCollections = [];
        _this.timeCollections = [];
        _this.disableItemCollection = [];
        _this.invalidValueString = null;
        _this.timeOptions = options;
        return _this;
    }
    /**
     * Initialize the event handler
     * @private
     */
    TimePicker.prototype.preRender = function () {
        this.keyConfigure = {
            enter: 'enter',
            escape: 'escape',
            end: 'end',
            tab: 'tab',
            home: 'home',
            down: 'downarrow',
            up: 'uparrow',
            left: 'leftarrow',
            right: 'rightarrow',
            open: 'alt+downarrow',
            close: 'alt+uparrow'
        };
        this.cloneElement = this.element.cloneNode(true);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.cloneElement], [ROOT, CONTROL, LIBRARY]);
        this.inputElement = this.element;
        this.angularTag = null;
        this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
        if (this.element.tagName === 'EJS-TIMEPICKER') {
            this.angularTag = this.element.tagName;
            this.inputElement = this.createElement('input');
            this.element.appendChild(this.inputElement);
        }
        this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
        this.element.removeAttribute('tabindex');
        this.openPopupEventArgs = {
            appendTo: document.body
        };
    };
    // element creation
    TimePicker.prototype.render = function () {
        this.initialize();
        this.createInputElement();
        this.updateHtmlAttributeToWrapper();
        this.setTimeAllowEdit();
        this.setEnable();
        this.validateInterval();
        this.bindEvents();
        this.validateDisable();
        this.setValue(this.getFormattedValue(this.value));
        this.anchor = this.inputElement;
        this.inputElement.setAttribute('value', this.inputElement.value);
        this.inputEleValue = this.getDateObject(this.inputElement.value);
    };
    TimePicker.prototype.setTimeAllowEdit = function () {
        if (this.allowEdit) {
            if (!this.readonly) {
                this.inputElement.removeAttribute('readonly');
            }
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'readonly': '' });
        }
        this.clearIconState();
    };
    TimePicker.prototype.clearIconState = function () {
        if (!this.allowEdit && this.inputWrapper && !this.readonly) {
            if (this.inputElement.value === '') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [EDITABLE]);
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [EDITABLE]);
            }
        }
        else if (this.inputWrapper) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [EDITABLE]);
        }
    };
    TimePicker.prototype.validateDisable = function () {
        this.setMinMax(this.initMin, this.initMax);
        this.popupCreation();
        this.popupObj.destroy();
        this.popupWrapper = this.popupObj = null;
        if ((!isNaN(+this.value) && this.value !== null)) {
            if (!this.valueIsDisable(this.value)) {
                //disable value given in value property so reset the date based on current date
                if (this.strictMode) {
                    this.resetState();
                }
                this.initValue = null;
                this.initMax = this.getDateObject(this.initMax);
                this.initMin = this.getDateObject(this.initMin);
                this.timeCollections = this.liCollections = [];
                this.setMinMax(this.initMin, this.initMax);
            }
        }
    };
    TimePicker.prototype.validationAttribute = function (target, input) {
        var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
        input.setAttribute('name', name);
        target.removeAttribute('name');
        var attributes = ['required', 'aria-required', 'form'];
        for (var i = 0; i < attributes.length; i++) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target.getAttribute(attributes[i]))) {
                continue;
            }
            var attr = target.getAttribute(attributes[i]);
            input.setAttribute(attributes[i], attr);
            target.removeAttribute(attributes[i]);
        }
    };
    TimePicker.prototype.initialize = function () {
        this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        this.defaultCulture = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"]('en');
        this.checkTimeFormat();
        this.checkInvalidValue(this.value);
        // persist the value property.
        this.setProperties({ value: this.checkDateValue(new Date(this.checkInValue(this.value))) }, true);
        this.setProperties({ min: this.checkDateValue(new Date(this.checkInValue(this.min))) }, true);
        this.setProperties({ max: this.checkDateValue(new Date(this.checkInValue(this.max))) }, true);
        if (this.angularTag !== null) {
            this.validationAttribute(this.element, this.inputElement);
        }
        this.updateHtmlAttributeToElement();
        this.checkAttributes(true); //check the input element attributes
        var localeText = { placeholder: this.placeholder };
        this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('timepicker', localeText, this.locale);
        this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
        this.initValue = this.checkDateValue(this.value);
        this.initMin = this.checkDateValue(this.min);
        this.initMax = this.checkDateValue(this.max);
        this.isNavigate = this.isPreventBlur = this.isTextSelected = false;
        this.activeIndex = this.valueWithMinutes = this.prevDate = null;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.getAttribute('id'))) {
            if (this.angularTag !== null) {
                this.inputElement.id = this.element.getAttribute('id') + '_input';
            }
        }
        else {
            //for angular case
            this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('ej2_timepicker');
            if (this.angularTag !== null) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'id': this.element.id + '_input' });
            }
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElement.getAttribute('name'))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'name': this.element.id });
        }
    };
    TimePicker.prototype.checkTimeFormat = function () {
        if (this.format) {
            if (typeof this.format === 'string') {
                this.formatString = this.format;
            }
            else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.format.skeleton) && this.format.skeleton !== '') {
                var skeletonString = this.format.skeleton;
                this.formatString = this.globalize.getDatePattern({ type: 'time', skeleton: skeletonString });
            }
            else {
                this.formatString = this.globalize.getDatePattern({ type: 'time', skeleton: 'short' });
            }
        }
        else {
            this.formatString = null;
        }
    };
    TimePicker.prototype.checkDateValue = function (value) {
        return (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && value instanceof Date && !isNaN(+value)) ? value : null;
    };
    TimePicker.prototype.createInputElement = function () {
        this.inputWrapper = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].createInput({
            element: this.inputElement,
            floatLabelType: this.floatLabelType,
            properties: {
                readonly: this.readonly,
                placeholder: this.placeholder,
                cssClass: this.cssClass,
                enabled: this.enabled,
                enableRtl: this.enableRtl,
                showClearButton: this.showClearButton,
            },
            buttons: [' e-input-group-icon e-time-icon e-icons']
        }, this.createElement);
        this.inputWrapper.container.style.width = this.setWidth(this.width);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
            'aria-haspopup': 'true', 'aria-autocomplete': 'list', 'tabindex': '0', 'aria-activedescendant': 'null',
            'aria-owns': this.element.id + '_options', 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
            'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-disabled': 'false', 'aria-invalid': 'false'
        });
        if (!this.isNullOrEmpty(this.inputStyle)) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].addAttributes({ 'style': this.inputStyle }, this.inputElement);
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], WRAPPERCLASS);
    };
    TimePicker.prototype.getCldrDateTimeFormat = function () {
        var culture = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        var cldrTime;
        var dateFormat = culture.getDatePattern({ skeleton: 'yMd' });
        if (this.isNullOrEmpty(this.formatString)) {
            cldrTime = dateFormat + ' ' + this.CldrFormat('time');
        }
        else {
            cldrTime = this.formatString;
        }
        return cldrTime;
    };
    TimePicker.prototype.checkInvalidValue = function (value) {
        var isInvalid = false;
        if (typeof value !== 'object' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            var valueString = value;
            if (typeof valueString === 'string') {
                valueString = valueString.trim();
            }
            var valueExpression = null;
            var valueExp = null;
            if (typeof value === 'number') {
                valueString = value.toString();
            }
            else if (typeof value === 'string') {
                if (!(/^[a-zA-Z0-9- ]*$/).test(value)) {
                    valueExpression = this.setCurrentDate(this.getDateObject(value));
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(valueExpression)) {
                        valueExpression = this.checkDateValue(this.globalize.parseDate(valueString, {
                            format: this.getCldrDateTimeFormat(), type: 'datetime'
                        }));
                        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(valueExpression)) {
                            valueExpression = this.checkDateValue(this.globalize.parseDate(valueString, {
                                format: this.formatString, type: 'dateTime', skeleton: 'yMd'
                            }));
                        }
                    }
                }
            }
            valueExp = this.globalize.parseDate(valueString, {
                format: this.getCldrDateTimeFormat(), type: 'datetime'
            });
            valueExpression = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(valueExp) && valueExp instanceof Date && !isNaN(+valueExp)) ? valueExp : null;
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(valueExpression) && valueString.replace(/\s/g, '').length) {
                var extISOString = null;
                var basicISOString = null;
                // tslint:disable-next-line
                extISOString = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
                // tslint:disable-next-line
                basicISOString = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
                if ((!extISOString.test(valueString) && !basicISOString.test(valueString))
                    || ((/^[a-zA-Z0-9- ]*$/).test(value)) || isNaN(+new Date('' + valueString))) {
                    isInvalid = true;
                }
                else {
                    valueExpression = new Date('' + valueString);
                }
            }
            if (isInvalid) {
                if (!this.strictMode) {
                    this.invalidValueString = valueString;
                }
                this.setProperties({ value: null }, true);
                this.initValue = null;
            }
            else {
                this.setProperties({ value: valueExpression }, true);
                this.initValue = this.value;
            }
        }
    };
    TimePicker.prototype.CldrFormat = function (type) {
        var cldrDateTimeString;
        if (this.locale === 'en' || this.locale === 'en-US') {
            cldrDateTimeString = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('timeFormats.short', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getDefaultDateObject"])()));
        }
        else {
            cldrDateTimeString = (this.getCultureTimeObject(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["cldrData"], '' + this.locale));
        }
        return cldrDateTimeString;
    };
    // destroy function
    TimePicker.prototype.destroy = function () {
        this.hide();
        this.unBindEvents();
        var ariaAttribute = {
            'aria-haspopup': 'true', 'aria-autocomplete': 'list', 'tabindex': '0', 'aria-activedescendant': 'null',
            'aria-owns': this.element.id + '_options', 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
            'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-disabled': 'true', 'aria-invalid': 'false'
        };
        if (this.inputElement) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].removeAttributes(ariaAttribute, this.inputElement);
            if (this.angularTag === null) {
                this.inputWrapper.container.parentElement.appendChild(this.inputElement);
            }
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cloneElement.getAttribute('tabindex'))) ?
                this.inputElement.setAttribute('tabindex', this.tabIndex) : this.inputElement.removeAttribute('tabindex');
            this.ensureInputAttribute();
            this.enableElement([this.inputElement]);
            this.inputElement.classList.remove('e-input');
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cloneElement.getAttribute('disabled'))) {
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setEnabled(true, this.inputElement, this.floatLabelType);
            }
        }
        if (this.inputWrapper.container) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.inputWrapper.container);
        }
        this.inputWrapper = this.popupWrapper = this.cloneElement = undefined;
        this.liCollections = this.timeCollections = this.disableItemCollection = [];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.rippleFn)) {
            this.rippleFn();
        }
        _super.prototype.destroy.call(this);
        if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.formResetHandler);
        }
    };
    TimePicker.prototype.ensureInputAttribute = function () {
        var propertyList = [];
        for (var i = 0; i < this.inputElement.attributes.length; i++) {
            propertyList[i] = this.inputElement.attributes[i].name;
        }
        for (var i = 0; i < propertyList.length; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cloneElement.getAttribute(propertyList[i]))) {
                this.inputElement.setAttribute(propertyList[i], this.cloneElement.getAttribute(propertyList[i]));
                if (propertyList[i].toLowerCase() === 'value') {
                    this.inputElement.value = this.cloneElement.getAttribute(propertyList[i]);
                }
            }
            else {
                this.inputElement.removeAttribute(propertyList[i]);
                if (propertyList[i].toLowerCase() === 'value') {
                    this.inputElement.value = '';
                }
            }
        }
    };
    //popup creation
    TimePicker.prototype.popupCreation = function () {
        this.popupWrapper = this.createElement('div', {
            className: ROOT + ' ' + POPUP,
            attrs: { 'id': this.element.id + '_popup', 'style': 'visibility:hidden' }
        });
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass)) {
            this.popupWrapper.className += ' ' + this.cssClass;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.step) && this.step > 0) {
            this.generateList();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.listWrapper], this.popupWrapper);
        }
        this.openPopupEventArgs.appendTo.appendChild(this.popupWrapper);
        this.addSelection();
        this.renderPopup();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.popupWrapper);
    };
    TimePicker.prototype.getPopupHeight = function () {
        var height = parseInt(POPUPDIMENSION, 10);
        var popupHeight = this.popupWrapper.getBoundingClientRect().height;
        return popupHeight > height ? height : popupHeight;
    };
    TimePicker.prototype.generateList = function () {
        this.createListItems();
        this.wireListEvents();
        var rippleModel = { duration: 300, selector: '.' + LISTCLASS };
        this.rippleFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.listWrapper, rippleModel);
        this.liCollections = this.listWrapper.querySelectorAll('.' + LISTCLASS);
    };
    TimePicker.prototype.renderPopup = function () {
        var _this = this;
        this.containerStyle = this.inputWrapper.container.getBoundingClientRect();
        this.popupObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["Popup"](this.popupWrapper, {
            width: this.setPopupWidth(this.width),
            zIndex: this.zIndex,
            targetType: 'relative',
            position: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? { X: 'center', Y: 'center' } : { X: 'left', Y: 'bottom' },
            collision: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? { X: 'fit', Y: 'fit' } : { X: 'flip', Y: 'flip' },
            enableRtl: this.enableRtl,
            relateTo: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? document.body : this.inputWrapper.container,
            offsetY: OFFSETVAL,
            open: function () {
                _this.popupWrapper.style.visibility = 'visible';
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.inputWrapper.buttons[0]], SELECTED);
            }, close: function () {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.inputWrapper.buttons[0]], SELECTED);
                _this.unWireListEvents();
                _this.inputElement.setAttribute('aria-activedescendant', 'null');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(_this.popupObj.element);
                _this.popupObj.destroy();
                _this.popupWrapper.innerHTML = '';
                _this.listWrapper = _this.popupWrapper = _this.listTag = undefined;
            }
        });
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.popupObj.collision = { X: 'none', Y: 'flip' };
        }
        this.popupObj.element.style.maxHeight = POPUPDIMENSION;
    };
    //util function
    TimePicker.prototype.getFormattedValue = function (value) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
            return null;
        }
        else {
            return this.globalize.formatDate(value, { skeleton: 'medium', type: 'time' });
        }
    };
    TimePicker.prototype.getDateObject = function (text) {
        if (!this.isNullOrEmpty(text)) {
            var dateValue = this.createDateObj(text);
            var value = !this.isNullOrEmpty(this.initValue);
            if (this.checkDateValue(dateValue)) {
                var date = value ? this.initValue.getDate() : DAY;
                var month = value ? this.initValue.getMonth() : MONTH;
                var year = value ? this.initValue.getFullYear() : YEAR;
                return new Date(year, month, date, dateValue.getHours(), dateValue.getMinutes(), dateValue.getSeconds());
            }
        }
        return null;
    };
    TimePicker.prototype.updateHtmlAttributeToWrapper = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (wrapperAttributes.indexOf(key) > -1) {
                if (key === 'class') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], this.htmlAttributes[key].split(' '));
                }
                else if (key === 'style') {
                    var timeStyle = this.inputWrapper.container.getAttribute(key);
                    timeStyle = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(timeStyle) ? (timeStyle + this.htmlAttributes[key]) :
                        this.htmlAttributes[key];
                    this.inputWrapper.container.setAttribute(key, timeStyle);
                }
                else {
                    this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
                }
            }
        }
    };
    TimePicker.prototype.updateHtmlAttributeToElement = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (wrapperAttributes.indexOf(key) < 0) {
                this.inputElement.setAttribute(key, this.htmlAttributes[key]);
            }
        }
    };
    TimePicker.prototype.removeErrorClass = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], ERROR);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-invalid': 'false' });
    };
    TimePicker.prototype.checkErrorState = function (val) {
        var value = this.getDateObject(val);
        if (this.validateState(value) && !this.invalidValueString) {
            this.removeErrorClass();
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], ERROR);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-invalid': 'true' });
        }
    };
    TimePicker.prototype.validateInterval = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.step) && this.step > 0) {
            this.enableElement([this.inputWrapper.buttons[0]]);
        }
        else {
            this.disableTimeIcon();
        }
    };
    TimePicker.prototype.disableTimeIcon = function () {
        this.disableElement([this.inputWrapper.buttons[0]]);
        this.hide();
    };
    TimePicker.prototype.disableElement = function (element) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(element, DISABLED);
    };
    TimePicker.prototype.enableElement = function (element) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(element, DISABLED);
    };
    TimePicker.prototype.selectInputText = function () {
        this.inputElement.setSelectionRange(0, (this.inputElement).value.length);
    };
    TimePicker.prototype.getMeridianText = function () {
        var meridian;
        if (this.locale === 'en' || this.locale === 'en-US') {
            meridian = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('dayPeriods.format.wide', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getDefaultDateObject"])());
        }
        else {
            meridian = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('main.' + '' + this.locale + '.dates.calendars.gregorian.dayPeriods.format.abbreviated', _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["cldrData"]);
        }
        return meridian;
    };
    TimePicker.prototype.getCursorSelection = function () {
        var input = (this.inputElement);
        var start = 0;
        var end = 0;
        if (!isNaN(input.selectionStart)) {
            start = input.selectionStart;
            end = input.selectionEnd;
        }
        return { start: Math.abs(start), end: Math.abs(end) };
    };
    TimePicker.prototype.getActiveElement = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupWrapper)) {
            return this.popupWrapper.querySelectorAll('.' + SELECTED);
        }
        else {
            return null;
        }
    };
    TimePicker.prototype.isNullOrEmpty = function (value) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) || (typeof value === 'string' && value.trim() === '')) {
            return true;
        }
        else {
            return false;
        }
    };
    TimePicker.prototype.setWidth = function (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;
    };
    TimePicker.prototype.setPopupWidth = function (width) {
        width = this.setWidth(width);
        if (width.indexOf('%') > -1) {
            var inputWidth = this.containerStyle.width * parseFloat(width) / 100;
            width = inputWidth.toString() + 'px';
        }
        return width;
    };
    TimePicker.prototype.setScrollPosition = function () {
        var listHeight = this.getPopupHeight();
        var element;
        element = this.selectedElement;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            this.findScrollTop(element);
        }
        else if (this.popupWrapper && this.checkDateValue(this.scrollTo)) {
            this.setScrollTo();
        }
    };
    TimePicker.prototype.findScrollTop = function (element) {
        var listHeight = this.getPopupHeight();
        var nextEle = element.nextElementSibling;
        var height = nextEle ? nextEle.offsetTop : element.offsetTop;
        var liHeight = element.getBoundingClientRect().height;
        if ((height + element.offsetTop) > listHeight) {
            this.popupWrapper.scrollTop = nextEle ? (height - (listHeight / HALFPOSITION + liHeight / HALFPOSITION)) : height;
        }
        else {
            this.popupWrapper.scrollTop = 0;
        }
    };
    TimePicker.prototype.setScrollTo = function () {
        var element;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupWrapper)) {
            var items = this.popupWrapper.querySelectorAll('.' + LISTCLASS);
            if (items.length) {
                var initialTime = this.timeCollections[0];
                var scrollTime = this.getDateObject(this.checkDateValue(this.scrollTo)).getTime();
                element = items[Math.round((scrollTime - initialTime) / (this.step * 60000))];
            }
        }
        else {
            this.popupWrapper.scrollTop = 0;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            this.findScrollTop(element);
        }
        else {
            this.popupWrapper.scrollTop = 0;
        }
    };
    TimePicker.prototype.getText = function () {
        return (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(this.value))) ? '' : this.getValue(this.value);
    };
    TimePicker.prototype.getValue = function (value) {
        return (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) ? null : this.globalize.formatDate(value, {
            format: this.cldrTimeFormat(), type: 'time'
        });
    };
    TimePicker.prototype.cldrDateFormat = function () {
        var cldrDate;
        if (this.locale === 'en' || this.locale === 'en-US') {
            cldrDate = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('dateFormats.short', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getDefaultDateObject"])()));
        }
        else {
            cldrDate = (this.getCultureDateObject(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["cldrData"], '' + this.locale));
        }
        return cldrDate;
    };
    TimePicker.prototype.cldrTimeFormat = function () {
        var cldrTime;
        if (this.isNullOrEmpty(this.formatString)) {
            if (this.locale === 'en' || this.locale === 'en-US') {
                cldrTime = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('timeFormats.short', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getDefaultDateObject"])()));
            }
            else {
                cldrTime = (this.getCultureTimeObject(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["cldrData"], '' + this.locale));
            }
        }
        else {
            cldrTime = this.formatString;
        }
        return cldrTime;
    };
    TimePicker.prototype.dateToNumeric = function () {
        var cldrTime;
        if (this.locale === 'en' || this.locale === 'en-US') {
            cldrTime = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('timeFormats.medium', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getDefaultDateObject"])()));
        }
        else {
            cldrTime = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('main.' + '' + this.locale + '.dates.calendars.gregorian.timeFormats.medium', _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["cldrData"]));
        }
        return cldrTime;
    };
    TimePicker.prototype.getExactDateTime = function (value) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
            return null;
        }
        else {
            return this.globalize.formatDate(value, { format: this.dateToNumeric(), type: 'time' });
        }
    };
    TimePicker.prototype.setValue = function (value) {
        var time = this.checkValue(value);
        if (!this.strictMode && !this.validateState(time)) {
            if (this.checkDateValue(this.valueWithMinutes) === null) {
                this.initValue = this.valueWithMinutes = null;
            }
            this.validateMinMax(this.value, this.min, this.max);
        }
        else {
            if (this.isNullOrEmpty(time)) {
                this.initValue = null;
                this.validateMinMax(this.value, this.min, this.max);
            }
            else {
                this.initValue = this.compareFormatChange(time);
            }
        }
        this.updateInput(true, this.initValue);
    };
    TimePicker.prototype.compareFormatChange = function (value) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            return null;
        }
        return (value !== this.getText()) ? this.getDateObject(value) : this.getDateObject(this.value);
    };
    TimePicker.prototype.updatePlaceHolder = function () {
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setPlaceholder(this.l10n.getConstant('placeholder'), this.inputElement);
    };
    //event related functions
    TimePicker.prototype.popupHandler = function (e) {
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.inputElement.setAttribute('readonly', '');
        }
        e.preventDefault();
        if (this.isPopupOpen()) {
            this.closePopup(0, e);
        }
        else {
            this.inputElement.focus();
            this.show(e);
        }
    };
    TimePicker.prototype.mouseDownHandler = function () {
        if (!this.readonly) {
            var curPos = this.getCursorSelection();
            this.inputElement.setSelectionRange(0, 0);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'mouseup', this.mouseUpHandler, this);
        }
    };
    TimePicker.prototype.mouseUpHandler = function (event) {
        if (!this.readonly) {
            event.preventDefault();
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'mouseup', this.mouseUpHandler);
            var curPos = this.getCursorSelection();
            if (!(curPos.start === 0 && curPos.end === this.inputElement.value.length)) {
                if (this.inputElement.value.length > 0) {
                    this.cursorDetails = this.focusSelection();
                }
                this.inputElement.setSelectionRange(this.cursorDetails.start, this.cursorDetails.end);
            }
        }
    };
    TimePicker.prototype.focusSelection = function () {
        var regex = new RegExp('^[a-zA-Z0-9]+$');
        var split = this.inputElement.value.split('');
        split.push(' ');
        var curPos = this.getCursorSelection();
        var start = 0;
        var end = 0;
        var isSeparator = false;
        if (!this.isTextSelected) {
            for (var i = 0; i < split.length; i++) {
                if (!regex.test(split[i])) {
                    end = i;
                    isSeparator = true;
                }
                if (isSeparator) {
                    if (curPos.start >= start && curPos.end <= end) {
                        end = end;
                        this.isTextSelected = true;
                        break;
                    }
                    else {
                        start = i + 1;
                        isSeparator = false;
                    }
                }
            }
        }
        else {
            start = curPos.start;
            end = curPos.end;
            this.isTextSelected = false;
        }
        return { start: start, end: end };
    };
    TimePicker.prototype.inputHandler = function (event) {
        if (!this.readonly && this.enabled) {
            if (event.action !== 'right' && event.action !== 'left' && event.action !== 'tab') {
                event.preventDefault();
            }
            switch (event.action) {
                case 'home':
                case 'end':
                case 'up':
                case 'down':
                    this.keyHandler(event);
                    break;
                case 'enter':
                    if (this.isNavigate) {
                        this.selectedElement = this.liCollections[this.activeIndex];
                        this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]);
                        this.updateValue(this.valueWithMinutes, event);
                    }
                    else {
                        this.updateValue(this.inputElement.value, event);
                    }
                    this.hide();
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], FOCUS);
                    this.isNavigate = false;
                    if (this.isPopupOpen()) {
                        event.stopPropagation();
                    }
                    break;
                case 'open':
                    this.show(event);
                    break;
                case 'escape':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(this.objToString(this.value), this.inputElement, this.floatLabelType, this.showClearButton);
                    this.previousState(this.value);
                    this.hide();
                    break;
                case 'close':
                    this.hide();
                    break;
                default:
                    this.isNavigate = false;
                    break;
            }
        }
    };
    TimePicker.prototype.onMouseClick = function (event) {
        var target = event.target;
        var li = this.selectedElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTCLASS);
        this.setSelection(li, event);
        if (li && li.classList.contains(LISTCLASS)) {
            this.hide();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], FOCUS);
        }
    };
    TimePicker.prototype.closePopup = function (delay, e) {
        var _this = this;
        if (this.isPopupOpen() && this.popupWrapper) {
            var args = {
                popup: this.popupObj,
                event: e || null,
                cancel: false,
                name: 'open'
            };
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], OVERFLOW);
            this.trigger('close', args, function (args) {
                if (!args.cancel) {
                    var animModel = {
                        name: 'FadeOut',
                        duration: ANIMATIONDURATION,
                        delay: delay ? delay : 0
                    };
                    _this.popupObj.hide(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animModel));
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.inputWrapper.container], [ICONANIMATION]);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this.inputElement, { 'aria-expanded': 'false' });
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown touchstart', _this.documentClickHandler);
                }
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _this.modal) {
                    _this.modal.style.display = 'none';
                    _this.modal.outerHTML = '';
                    _this.modal = null;
                }
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _this.allowEdit && !_this.readonly) {
                    _this.inputElement.removeAttribute('readonly');
                }
            });
        }
        else {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.allowEdit && !this.readonly) {
                this.inputElement.removeAttribute('readonly');
            }
        }
    };
    TimePicker.prototype.checkValueChange = function (event, isNavigation) {
        if (!this.strictMode && !this.validateState(this.valueWithMinutes)) {
            if (this.checkDateValue(this.valueWithMinutes) === null) {
                this.initValue = this.valueWithMinutes = null;
            }
            this.setProperties({ value: this.compareFormatChange(this.inputElement.value) }, true);
            this.initValue = this.valueWithMinutes = this.compareFormatChange(this.inputElement.value);
            this.prevValue = this.inputElement.value;
            if (+this.prevDate !== +this.value) {
                this.changeEvent(event);
            }
        }
        else {
            if (!isNavigation) {
                if ((this.prevValue !== this.inputElement.value) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(this.value))) {
                    this.valueProcess(event, this.compareFormatChange(this.inputElement.value));
                }
            }
            else {
                var value = this.getDateObject(new Date(this.timeCollections[this.activeIndex]));
                if (+this.prevDate !== +value) {
                    this.valueProcess(event, value);
                }
            }
        }
    };
    TimePicker.prototype.onMouseOver = function (event) {
        var currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(event.target, '.' + LISTCLASS);
        this.setHover(currentLi, HOVER);
    };
    TimePicker.prototype.setHover = function (li, className) {
        if (this.enabled && this.isValidLI(li) && !li.classList.contains(className)) {
            this.removeHover(className);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], className);
            if (className === NAVIGATION) {
                li.setAttribute('aria-selected', 'true');
            }
        }
    };
    TimePicker.prototype.setSelection = function (li, event) {
        if (this.isValidLI(li) && !li.classList.contains(SELECTED)) {
            this.checkValue(li.getAttribute('data-value'));
            this.selectedElement = li;
            this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li);
            this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.selectedElement], SELECTED);
            this.selectedElement.setAttribute('aria-selected', 'true');
            this.checkValueChange(event, true);
        }
    };
    TimePicker.prototype.onMouseLeave = function () {
        this.removeHover(HOVER);
    };
    TimePicker.prototype.scrollHandler = function () {
        if (this.getModuleName() === 'timepicker' && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            return;
        }
        else {
            this.hide();
        }
    };
    TimePicker.prototype.setMinMax = function (minVal, maxVal) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(minVal))) {
            this.initMin = this.getDateObject('12:00:00 AM');
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(maxVal))) {
            this.initMax = this.getDateObject('11:59:59 PM');
        }
    };
    //protected function
    TimePicker.prototype.validateMinMax = function (dateVal, minVal, maxVal) {
        var value = dateVal instanceof Date ? dateVal : this.getDateObject(dateVal);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
            dateVal = this.strictOperation(this.initMin, this.initMax, dateVal, value);
        }
        else if (+(this.createDateObj(this.getFormattedValue(this.initMin))) >
            +(this.createDateObj(this.getFormattedValue(this.initMax)))) {
            this.disableTimeIcon();
        }
        if (this.strictMode) {
            dateVal = this.valueIsDisable(dateVal) ? dateVal : null;
        }
        this.checkErrorState(dateVal);
        return dateVal;
    };
    TimePicker.prototype.valueIsDisable = function (value) {
        if (this.disableItemCollection.length > 0) {
            if (this.disableItemCollection.length === this.timeCollections.length) {
                return false;
            }
            var time = value instanceof Date ? this.objToString(value) : value;
            for (var index = 0; index < this.disableItemCollection.length; index++) {
                if (time === this.disableItemCollection[index]) {
                    return false;
                }
            }
        }
        return true;
    };
    TimePicker.prototype.validateState = function (val) {
        if (!this.strictMode) {
            if (this.valueIsDisable(val)) {
                var value = typeof val === 'string' ? this.setCurrentDate(this.getDateObject(val)) :
                    this.setCurrentDate(this.getDateObject(val));
                var maxValue = this.setCurrentDate(this.getDateObject(this.initMax));
                var minValue = this.setCurrentDate(this.getDateObject(this.initMin));
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
                    if ((+(value) > +(maxValue)) || (+(value) < +(minValue))) {
                        return false;
                    }
                }
                else {
                    if ((+(maxValue) < +(minValue)) || this.inputElement.value !== '') {
                        return false;
                    }
                }
            }
            else {
                return false;
            }
        }
        return true;
    };
    TimePicker.prototype.strictOperation = function (minimum, maximum, dateVal, val) {
        var maxValue = this.createDateObj(this.getFormattedValue(maximum));
        var minValue = this.createDateObj(this.getFormattedValue(minimum));
        var value = this.createDateObj(this.getFormattedValue(val));
        if (this.strictMode) {
            if (+minValue > +maxValue) {
                this.disableTimeIcon();
                this.initValue = this.getDateObject(maxValue);
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(this.getValue(this.initValue), this.inputElement, this.floatLabelType, this.showClearButton);
                return this.inputElement.value;
            }
            else if (+minValue >= +value) {
                return this.getDateObject(minValue);
            }
            else if (+value >= +maxValue || +minValue === +maxValue) {
                return this.getDateObject(maxValue);
            }
        }
        else {
            if (+minValue > +maxValue) {
                this.disableTimeIcon();
                if (!isNaN(+this.createDateObj(dateVal))) {
                    return dateVal;
                }
            }
        }
        return dateVal;
    };
    TimePicker.prototype.bindEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.buttons[0], 'mousedown', this.popupHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'blur', this.inputBlurHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'focus', this.inputFocusHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'change', this.inputChangeHandler, this);
        if (this.showClearButton && this.inputWrapper.clearButton) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown', this.clearHandler, this);
        }
        if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.formResetHandler, this);
        }
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.inputEvent = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.inputWrapper.container, {
                keyAction: this.inputHandler.bind(this), keyConfigs: this.keyConfigure, eventName: 'keydown'
            });
            if (this.showClearButton && this.inputElement) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'mousedown', this.mouseDownHandler, this);
            }
        }
    };
    TimePicker.prototype.formResetHandler = function () {
        if (!this.inputElement.disabled) {
            var timeValue = this.inputElement.getAttribute('value');
            var val = this.checkDateValue(this.inputEleValue);
            if (this.element.tagName === 'EJS-TIMEPICKER') {
                val = null;
                timeValue = '';
                this.inputElement.setAttribute('value', '');
            }
            this.setProperties({ value: val }, true);
            this.prevDate = this.value;
            this.valueWithMinutes = this.value;
            this.initValue = this.value;
            if (this.inputElement) {
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(timeValue, this.inputElement, this.floatLabelType, this.showClearButton);
                this.checkErrorState(timeValue);
                this.prevValue = this.inputElement.value;
            }
        }
    };
    TimePicker.prototype.inputChangeHandler = function (e) {
        e.stopPropagation();
    };
    TimePicker.prototype.unBindEvents = function () {
        if (this.inputWrapper) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.popupHandler);
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'blur', this.inputBlurHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'focus', this.inputFocusHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'change', this.inputChangeHandler);
        if (this.inputEvent) {
            this.inputEvent.destroy();
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'mousedown touchstart', this.mouseDownHandler);
        if (this.showClearButton && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputWrapper.clearButton)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.clearHandler);
        }
        if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.formResetHandler);
        }
    };
    TimePicker.prototype.bindClearEvent = function () {
        if (this.showClearButton && this.inputWrapper.clearButton) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown', this.clearHandler, this);
        }
    };
    TimePicker.prototype.clearHandler = function (e) {
        e.preventDefault();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.clear(e);
        }
        if (this.popupWrapper) {
            this.popupWrapper.scrollTop = 0;
        }
    };
    TimePicker.prototype.clear = function (event) {
        this.setProperties({ value: null }, true);
        this.initValue = null;
        this.resetState();
        this.changeEvent(event);
    };
    TimePicker.prototype.setZIndex = function () {
        if (this.popupObj) {
            this.popupObj.zIndex = this.zIndex;
            this.popupObj.dataBind();
        }
    };
    TimePicker.prototype.checkAttributes = function (isDynamic) {
        var attributes = ['step', 'disabled', 'readonly', 'style', 'name', 'value', 'min', 'max', 'placeholder'];
        var value;
        for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
            var prop = attributes_1[_i];
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElement.getAttribute(prop))) {
                switch (prop) {
                    case 'disabled':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.timeOptions) || (this.timeOptions['enabled'] === undefined)) || !isDynamic) {
                            var enabled = this.inputElement.getAttribute(prop) === 'disabled' || this.inputElement.getAttribute(prop) === '' ||
                                this.inputElement.getAttribute(prop) === 'true' ? false : true;
                            this.setProperties({ enabled: enabled }, isDynamic);
                        }
                        break;
                    case 'style':
                        this.inputStyle = this.inputElement.getAttribute(prop);
                        break;
                    case 'readonly':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.timeOptions) || (this.timeOptions['readonly'] === undefined)) || !isDynamic) {
                            var readonly = this.inputElement.getAttribute(prop) === 'readonly' || this.inputElement.getAttribute(prop) === '' ||
                                this.inputElement.getAttribute(prop) === 'true' ? true : false;
                            this.setProperties({ readonly: readonly }, isDynamic);
                        }
                        break;
                    case 'name':
                        this.inputElement.setAttribute('name', this.inputElement.getAttribute(prop));
                        break;
                    case 'step':
                        this.step = parseInt(this.inputElement.getAttribute(prop), 10);
                        break;
                    case 'placeholder':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.timeOptions) || (this.timeOptions['placeholder'] === undefined)) || !isDynamic) {
                            this.setProperties({ placeholder: this.inputElement.getAttribute(prop) }, isDynamic);
                        }
                        break;
                    case 'min':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.timeOptions) || (this.timeOptions['min'] === undefined)) || !isDynamic) {
                            value = new Date(this.inputElement.getAttribute(prop));
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
                                this.setProperties({ min: value }, isDynamic);
                            }
                        }
                        break;
                    case 'max':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.timeOptions) || (this.timeOptions['max'] === undefined)) || !isDynamic) {
                            value = new Date(this.inputElement.getAttribute(prop));
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
                                this.setProperties({ max: value }, isDynamic);
                            }
                        }
                        break;
                    case 'value':
                        // tslint:disable-next-line
                        if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.timeOptions) || (this.timeOptions['value'] === undefined)) || !isDynamic) {
                            value = new Date(this.inputElement.getAttribute(prop));
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
                                this.initValue = value;
                                this.updateInput(false, this.initValue);
                                this.setProperties({ value: value }, isDynamic);
                            }
                        }
                        break;
                }
            }
        }
    };
    TimePicker.prototype.setCurrentDate = function (value) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
            return null;
        }
        return new Date(YEAR, MONTH, DAY, value.getHours(), value.getMinutes(), value.getSeconds());
    };
    TimePicker.prototype.getTextFormat = function () {
        var time = 0;
        if (this.cldrTimeFormat().split(' ')[0] === 'a' || this.cldrTimeFormat().indexOf('a') === 0) {
            time = 1;
        }
        else if (this.cldrTimeFormat().indexOf('a') < 0) {
            var strArray = this.cldrTimeFormat().split(' ');
            for (var i = 0; i < strArray.length; i++) {
                if (strArray[i].toLowerCase().indexOf('h') >= 0) {
                    time = i;
                    break;
                }
            }
        }
        return time;
    };
    TimePicker.prototype.updateValue = function (value, event) {
        var val;
        if (this.isNullOrEmpty(value)) {
            this.resetState();
        }
        else {
            val = this.checkValue(value);
            if (this.strictMode) {
                // this case set previous value to the text box when set invalid date
                var inputVal = (val === null && value.trim().length > 0) ?
                    this.previousState(this.prevDate) : this.inputElement.value;
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(inputVal, this.inputElement, this.floatLabelType, this.showClearButton);
            }
        }
        this.checkValueChange(event, typeof value === 'string' ? false : true);
    };
    TimePicker.prototype.previousState = function (date) {
        var value = this.getDateObject(date);
        for (var i = 0; i < this.timeCollections.length; i++) {
            if (+value === this.timeCollections[i]) {
                this.activeIndex = i;
                this.selectedElement = this.liCollections[i];
                this.valueWithMinutes = new Date(this.timeCollections[i]);
                break;
            }
        }
        return this.prevValue;
    };
    TimePicker.prototype.resetState = function () {
        this.removeSelection();
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue('', this.inputElement, this.floatLabelType, false);
        this.valueWithMinutes = this.activeIndex = null;
        if (!this.strictMode) {
            this.checkErrorState(null);
        }
    };
    TimePicker.prototype.objToString = function (val) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(val))) {
            return null;
        }
        else {
            return this.globalize.formatDate(val, { format: this.cldrTimeFormat(), type: 'time' });
        }
    };
    TimePicker.prototype.checkValue = function (value) {
        if (!this.isNullOrEmpty(value)) {
            var date = value instanceof Date ? value : this.getDateObject(value);
            return this.validateValue(date, value);
        }
        this.resetState();
        return this.valueWithMinutes = null;
    };
    TimePicker.prototype.validateValue = function (date, value) {
        var time;
        var val = this.validateMinMax(value, this.min, this.max);
        var newval = this.createDateObj(val);
        if (this.getFormattedValue(newval) !== this.getFormattedValue(this.value)) {
            this.valueWithMinutes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newval) ? null : newval;
            time = this.objToString(this.valueWithMinutes);
        }
        else {
            if (this.strictMode) {
                //for strict mode case, when value not present within a range. Reset the nearest range value.
                date = newval;
            }
            this.valueWithMinutes = this.checkDateValue(date);
            time = this.objToString(this.valueWithMinutes);
        }
        if (!this.strictMode && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(time)) {
            var value_1 = val.trim().length > 0 ? val : '';
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(value_1, this.inputElement, this.floatLabelType, this.showClearButton);
        }
        else {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(time, this.inputElement, this.floatLabelType, this.showClearButton);
        }
        return time;
    };
    TimePicker.prototype.findNextElement = function (event) {
        var textVal = (this.inputElement).value;
        var value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.valueWithMinutes) ? this.createDateObj(textVal) :
            this.getDateObject(this.valueWithMinutes);
        var timeVal = null;
        var count = this.liCollections.length;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value)) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex)) {
            if (event.action === 'home') {
                var index = this.validLiElement(0);
                timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));
                this.activeIndex = index;
            }
            else if (event.action === 'end') {
                var index = this.validLiElement(this.timeCollections.length - 1, true);
                timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));
                this.activeIndex = index;
            }
            else {
                if (event.action === 'down') {
                    for (var i = 0; i < count; i++) {
                        if (+value < this.timeCollections[i]) {
                            var index = this.validLiElement(i);
                            timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));
                            this.activeIndex = index;
                            break;
                        }
                        else if (i === count - 1) {
                            var index = this.validLiElement(0);
                            timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));
                            this.activeIndex = index;
                            break;
                        }
                    }
                }
                else {
                    for (var i = count - 1; i >= 0; i--) {
                        if (+value > this.timeCollections[i]) {
                            var index = this.validLiElement(i, true);
                            timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));
                            this.activeIndex = index;
                            break;
                        }
                        else if (i === 0) {
                            var index = this.validLiElement(count - 1);
                            timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));
                            this.activeIndex = index;
                            break;
                        }
                    }
                }
            }
            this.selectedElement = this.liCollections[this.activeIndex];
            this.elementValue(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(timeVal) ? null : new Date(timeVal));
        }
        else {
            var index = this.validLiElement(0, event.action === 'down' ? false : true);
            this.activeIndex = index;
            this.selectedElement = this.liCollections[index];
            this.elementValue(new Date(this.timeCollections[index]));
        }
    };
    TimePicker.prototype.elementValue = function (value) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) {
            this.checkValue(value);
        }
    };
    TimePicker.prototype.validLiElement = function (index, backward) {
        var elementIndex = null;
        var items = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupWrapper) ? this.liCollections :
            this.popupWrapper.querySelectorAll('.' + LISTCLASS);
        var isCheck = true;
        if (items.length) {
            if (backward) {
                for (var i = index; i >= 0; i--) {
                    if (!items[i].classList.contains(DISABLED)) {
                        elementIndex = i;
                        break;
                    }
                    else if (i === 0) {
                        if (isCheck) {
                            index = i = items.length;
                            isCheck = false;
                        }
                    }
                }
            }
            else {
                for (var i = index; i <= items.length - 1; i++) {
                    if (!items[i].classList.contains(DISABLED)) {
                        elementIndex = i;
                        break;
                    }
                    else if (i === items.length - 1) {
                        if (isCheck) {
                            index = i = -1;
                            isCheck = false;
                        }
                    }
                }
            }
        }
        return elementIndex;
    };
    TimePicker.prototype.keyHandler = function (event) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.step) || this.step <= 0 || this.inputWrapper.buttons[0].classList.contains(DISABLED)) {
            return;
        }
        var count = this.timeCollections.length;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.getActiveElement()) || this.getActiveElement().length === 0) {
            if (this.liCollections.length > 0) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex)) {
                    var index = this.validLiElement(0, event.action === 'down' ? false : true);
                    this.activeIndex = index;
                    this.selectedElement = this.liCollections[index];
                    this.elementValue(new Date(this.timeCollections[index]));
                }
                else {
                    this.findNextElement(event);
                }
            }
            else {
                this.findNextElement(event);
            }
        }
        else {
            var nextItem = void 0;
            if ((event.keyCode >= 37) && (event.keyCode <= 40)) {
                var index = (event.keyCode === 40 || event.keyCode === 39) ? ++this.activeIndex : --this.activeIndex;
                this.activeIndex = index = this.activeIndex === (count) ? 0 : this.activeIndex;
                this.activeIndex = index = this.activeIndex < 0 ? (count - 1) : this.activeIndex;
                this.activeIndex = index = this.validLiElement(this.activeIndex, (event.keyCode === 40 || event.keyCode === 39) ?
                    false : true);
                nextItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.timeCollections[index]) ? this.timeCollections[0] : this.timeCollections[index];
            }
            else if (event.action === 'home') {
                var index = this.validLiElement(0);
                this.activeIndex = index;
                nextItem = this.timeCollections[index];
            }
            else if (event.action === 'end') {
                var index = this.validLiElement(count - 1, true);
                this.activeIndex = index;
                nextItem = this.timeCollections[index];
            }
            this.selectedElement = this.liCollections[this.activeIndex];
            this.elementValue(new Date(nextItem));
        }
        this.isNavigate = true;
        this.setHover(this.selectedElement, NAVIGATION);
        this.setActiveDescendant();
        this.selectInputText();
        if (this.isPopupOpen() && this.selectedElement !== null && (!event || event.type !== 'click')) {
            this.setScrollPosition();
        }
    };
    TimePicker.prototype.getCultureTimeObject = function (ld, c) {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('main.' + c + '.dates.calendars.gregorian.timeFormats.short', ld);
    };
    TimePicker.prototype.getCultureDateObject = function (ld, c) {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('main.' + c + '.dates.calendars.gregorian.dateFormats.short', ld);
    };
    TimePicker.prototype.wireListEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listWrapper, 'click', this.onMouseClick, this);
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listWrapper, 'mouseover', this.onMouseOver, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listWrapper, 'mouseout', this.onMouseLeave, this);
        }
    };
    TimePicker.prototype.unWireListEvents = function () {
        if (this.listWrapper) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.listWrapper, 'click', this.onMouseClick);
            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.listWrapper, 'mouseover', this.onMouseOver);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.listWrapper, 'mouseout', this.onMouseLeave);
            }
        }
    };
    TimePicker.prototype.valueProcess = function (event, value) {
        var result = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkDateValue(value))) ? null : value;
        if (+this.prevDate !== +result) {
            this.initValue = result;
            this.changeEvent(event);
        }
    };
    TimePicker.prototype.changeEvent = function (e) {
        this.addSelection();
        this.updateInput(true, this.initValue);
        var eventArgs = {
            event: (e || null),
            value: this.value,
            text: (this.inputElement).value,
            isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
            element: this.element
        };
        eventArgs.value = this.valueWithMinutes || this.getDateObject(this.inputElement.value);
        this.prevDate = this.valueWithMinutes || this.getDateObject(this.inputElement.value);
        this.trigger('change', eventArgs);
        this.invalidValueString = null;
        this.checkErrorState(this.value);
    };
    TimePicker.prototype.updateInput = function (isUpdate, date) {
        if (isUpdate) {
            this.prevValue = this.getValue(date);
        }
        this.prevDate = this.valueWithMinutes = date;
        if ((typeof date !== 'number') || (this.value && +new Date(+this.value).setMilliseconds(0)) !== +date) {
            this.setProperties({ value: date }, true);
        }
        if (!this.strictMode && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.invalidValueString) {
            this.checkErrorState(this.invalidValueString);
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(this.invalidValueString, this.inputElement, this.floatLabelType, this.showClearButton);
        }
        this.clearIconState();
    };
    TimePicker.prototype.setActiveDescendant = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedElement)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-activedescendant': this.selectedElement.getAttribute('id') });
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-activedescendant': 'null' });
        }
    };
    TimePicker.prototype.removeSelection = function () {
        this.removeHover(HOVER);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupWrapper)) {
            var items = this.popupWrapper.querySelectorAll('.' + SELECTED);
            if (items.length) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(items, SELECTED);
                items[0].removeAttribute('aria-selected');
            }
        }
    };
    TimePicker.prototype.removeHover = function (className) {
        var hoveredItem = this.getHoverItem(className);
        if (hoveredItem && hoveredItem.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(hoveredItem, className);
            if (className === NAVIGATION) {
                hoveredItem[0].removeAttribute('aria-selected');
            }
        }
    };
    TimePicker.prototype.getHoverItem = function (className) {
        var hoveredItem;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupWrapper)) {
            hoveredItem = this.popupWrapper.querySelectorAll('.' + className);
        }
        return hoveredItem;
    };
    TimePicker.prototype.setActiveClass = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupWrapper)) {
            var items = this.popupWrapper.querySelectorAll('.' + LISTCLASS);
            if (items.length) {
                for (var i = 0; i < items.length; i++) {
                    if (this.timeCollections[i] === +this.getDateObject(this.valueWithMinutes)) {
                        items[i].setAttribute('aria-selected', 'true');
                        this.selectedElement = items[i];
                        this.activeIndex = i;
                        break;
                    }
                }
            }
        }
    };
    TimePicker.prototype.addSelection = function () {
        this.selectedElement = null;
        this.removeSelection();
        this.setActiveClass();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedElement)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.selectedElement], SELECTED);
            this.selectedElement.setAttribute('aria-selected', 'true');
        }
    };
    TimePicker.prototype.isValidLI = function (li) {
        return (li && li.classList.contains(LISTCLASS) && !li.classList.contains(DISABLED));
    };
    TimePicker.prototype.createDateObj = function (val) {
        var today = this.globalize.formatDate(new Date(), { skeleton: 'short', type: 'date' });
        var value = null;
        if (typeof val === 'string') {
            if (val.toUpperCase().indexOf('AM') > -1 || val.toUpperCase().indexOf('PM') > -1) {
                today = this.defaultCulture.formatDate(new Date(), { skeleton: 'short', type: 'date' });
                value = isNaN(+new Date(today + ' ' + val)) ? null : new Date(new Date(today + ' ' + val).setMilliseconds(0));
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
                    value = this.TimeParse(today, val);
                }
            }
            else {
                value = this.TimeParse(today, val);
            }
        }
        else if (val instanceof Date) {
            value = val;
        }
        return value;
    };
    TimePicker.prototype.TimeParse = function (today, val) {
        var value;
        value = this.globalize.parseDate(today + ' ' + val, {
            format: this.cldrDateFormat() + ' ' + this.cldrTimeFormat(), type: 'datetime'
        });
        value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) ? this.globalize.parseDate(today + ' ' + val, {
            format: this.cldrDateFormat() + ' ' + this.dateToNumeric(), type: 'datetime'
        }) : value;
        value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) ? value : new Date(value.setMilliseconds(0));
        return value;
    };
    TimePicker.prototype.createListItems = function () {
        var _this = this;
        this.listWrapper = this.createElement('div', { className: CONTENT, attrs: { 'tabindex': '0' } });
        var start;
        var end;
        var interval = this.step * 60000;
        var listItems = [];
        this.timeCollections = [];
        this.disableItemCollection = [];
        start = +(this.getDateObject(this.initMin).setMilliseconds(0));
        end = +(this.getDateObject(this.initMax).setMilliseconds(0));
        while (end >= start) {
            this.timeCollections.push(start);
            listItems.push(this.globalize.formatDate(new Date(start), { format: this.cldrTimeFormat(), type: 'time' }));
            start += interval;
        }
        var listBaseOptions = {
            itemCreated: function (args) {
                var eventArgs = {
                    element: args.item,
                    text: args.text, value: _this.getDateObject(args.text), isDisabled: false
                };
                _this.trigger('itemRender', eventArgs, function (eventArgs) {
                    if (eventArgs.isDisabled) {
                        eventArgs.element.classList.add(DISABLED);
                    }
                    if (eventArgs.element.classList.contains(DISABLED)) {
                        _this.disableItemCollection.push(eventArgs.element.getAttribute('data-value'));
                    }
                });
            }
        };
        this.listTag = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_3__["ListBase"].createList(this.createElement, listItems, listBaseOptions, true);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options' });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.listTag], this.listWrapper);
    };
    TimePicker.prototype.documentClickHandler = function (event) {
        if (event.type !== 'touchstart') {
            event.preventDefault();
        }
        var target = event.target;
        if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '#' + this.popupObj.element.id)) && target !== this.inputElement
            && target !== (this.inputWrapper && this.inputWrapper.buttons[0]) &&
            target !== (this.inputWrapper && this.inputWrapper.clearButton) &&
            target !== (this.inputWrapper && this.inputWrapper.container)) {
            if (this.isPopupOpen()) {
                this.hide();
                this.focusOut();
            }
        }
        else if (target !== this.inputElement) {
            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                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.inputElement);
                event.preventDefault();
            }
        }
    };
    TimePicker.prototype.setEnableRtl = function () {
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setEnableRtl(this.enableRtl, [this.inputWrapper.container]);
        if (this.popupObj) {
            this.popupObj.enableRtl = this.enableRtl;
            this.popupObj.dataBind();
        }
    };
    TimePicker.prototype.setEnable = function () {
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setEnabled(this.enabled, this.inputElement, this.floatLabelType);
        if (this.enabled) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], DISABLED);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-disabled': 'false' });
            this.inputElement.setAttribute('tabindex', this.tabIndex);
        }
        else {
            this.hide();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], DISABLED);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-disabled': 'true' });
            this.inputElement.tabIndex = -1;
        }
    };
    TimePicker.prototype.getProperty = function (date, val) {
        if (val === 'min') {
            this.initMin = this.checkDateValue(new Date(this.checkInValue(date.min)));
            this.setProperties({ min: this.initMin }, true);
        }
        else {
            this.initMax = this.checkDateValue(new Date(this.checkInValue(date.max)));
            this.setProperties({ max: this.initMax }, true);
        }
        if (this.inputElement.value === '') {
            this.validateMinMax(this.value, this.min, this.max);
        }
        else {
            this.checkValue(this.inputElement.value);
        }
        this.checkValueChange(null, false);
    };
    TimePicker.prototype.inputBlurHandler = function (e) {
        // IE popup closing issue when click over the scrollbar
        if (this.isPreventBlur && this.isPopupOpen()) {
            this.inputElement.focus();
            return;
        }
        this.closePopup(0, e);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [FOCUS]);
        var blurArguments = {
            model: this
        };
        this.trigger('blur', blurArguments);
        if (this.getText() !== this.inputElement.value) {
            this.updateValue((this.inputElement).value, e);
        }
        else if (this.inputElement.value.trim().length === 0) {
            this.resetState();
        }
        this.cursorDetails = null;
        this.isNavigate = false;
        if (this.inputElement.value === '') {
            this.invalidValueString = null;
        }
    };
    /**
     * Focuses out the TimePicker textbox element.
     * @returns void
     */
    TimePicker.prototype.focusOut = function () {
        if (document.activeElement === this.inputElement) {
            this.inputElement.blur();
            var blurArguments = {
                model: this
            };
            this.trigger('blur', blurArguments);
        }
    };
    TimePicker.prototype.isPopupOpen = function () {
        if (this.popupWrapper && this.popupWrapper.classList.contains('' + ROOT)) {
            return true;
        }
        return false;
    };
    TimePicker.prototype.inputFocusHandler = function () {
        var focusArguments = {
            model: this
        };
        if (!this.readonly && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.selectInputText();
        }
        this.trigger('focus', focusArguments);
        this.clearIconState();
    };
    /**
     * Focused the TimePicker textbox element.
     * @returns void
     */
    TimePicker.prototype.focusIn = function () {
        if (document.activeElement !== this.inputElement && this.enabled) {
            this.inputElement.focus();
            var focusArguments = {
                model: this
            };
        }
    };
    /**
     * Hides the TimePicker popup.
     * @returns void
     */
    TimePicker.prototype.hide = function () {
        this.closePopup(100, null);
        this.clearIconState();
    };
    /**
     * Opens the popup to show the list items.
     * @returns void
     */
    TimePicker.prototype.show = function (event) {
        var _this = this;
        if ((this.enabled && this.readonly) || !this.enabled || this.popupWrapper) {
            return;
        }
        else {
            this.popupCreation();
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.listWrapper) {
                this.modal = this.createElement('div');
                this.modal.className = '' + ROOT + ' e-time-modal';
                document.body.className += ' ' + OVERFLOW;
                document.body.appendChild(this.modal);
            }
            this.openPopupEventArgs = {
                popup: this.popupObj || null,
                cancel: false,
                event: event || null,
                name: 'open',
                appendTo: document.body
            };
            var eventArgs = this.openPopupEventArgs;
            this.trigger('open', eventArgs, function (eventArgs) {
                _this.openPopupEventArgs = eventArgs;
                if (!_this.openPopupEventArgs.cancel && !_this.inputWrapper.buttons[0].classList.contains(DISABLED)) {
                    _this.openPopupEventArgs.appendTo.appendChild(_this.popupWrapper);
                    _this.popupAlignment(_this.openPopupEventArgs);
                    _this.setScrollPosition();
                    if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                        _this.inputElement.focus();
                    }
                    var openAnimation = {
                        name: 'FadeIn',
                        duration: ANIMATIONDURATION,
                    };
                    _this.popupObj.refreshPosition(_this.anchor);
                    if (_this.zIndex === 1000) {
                        _this.popupObj.show(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](openAnimation), _this.element);
                    }
                    else {
                        _this.popupObj.show(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](openAnimation), null);
                    }
                    _this.setActiveDescendant();
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this.inputElement, { 'aria-expanded': 'true' });
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.inputWrapper.container], FOCUS);
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown touchstart', _this.documentClickHandler, _this);
                }
                else {
                    _this.popupObj.destroy();
                    _this.popupWrapper = _this.listTag = undefined;
                    _this.liCollections = _this.timeCollections = _this.disableItemCollection = [];
                    _this.popupObj = null;
                }
            });
        }
    };
    TimePicker.prototype.formatValues = function (type) {
        var value;
        if (typeof type === 'number') {
            value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(type);
        }
        else if (typeof type === 'string') {
            value = (type.match(/px|%|em/)) ? type : isNaN(parseInt(type, 10)) ? type : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(type);
        }
        return value;
    };
    TimePicker.prototype.popupAlignment = function (args) {
        args.popup.position.X = this.formatValues(args.popup.position.X);
        args.popup.position.Y = this.formatValues(args.popup.position.Y);
        if (!isNaN(parseFloat(args.popup.position.X)) || !isNaN(parseFloat(args.popup.position.Y))) {
            this.popupObj.relateTo = this.anchor = document.body;
            this.popupObj.targetType = 'container';
        }
        if (!isNaN(parseFloat(args.popup.position.X))) {
            this.popupObj.offsetX = parseFloat(args.popup.position.X);
        }
        if (!isNaN(parseFloat(args.popup.position.Y))) {
            this.popupObj.offsetY = parseFloat(args.popup.position.Y);
        }
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            switch (args.popup.position.X) {
                case 'left':
                    break;
                case 'right':
                    args.popup.offsetX = this.containerStyle.width;
                    break;
                case 'center':
                    args.popup.offsetX = -(this.containerStyle.width / 2);
                    break;
            }
            switch (args.popup.position.Y) {
                case 'top':
                    break;
                case 'bottom':
                    break;
                case 'center':
                    args.popup.offsetY = -(this.containerStyle.height / 2);
                    break;
            }
            if (args.popup.position.X === 'center' && args.popup.position.Y === 'center') {
                this.popupObj.relateTo = this.inputWrapper.container;
                this.anchor = this.inputElement;
                this.popupObj.targetType = 'relative';
            }
        }
        else {
            if (args.popup.position.X === 'center' && args.popup.position.Y === 'center') {
                this.popupObj.relateTo = this.anchor = document.body;
                this.popupObj.offsetY = 0;
                this.popupObj.targetType = 'container';
                this.popupObj.collision = { X: 'fit', Y: 'fit' };
            }
        }
    };
    /**
     * Gets the properties to be maintained upon browser refresh.
     * @returns string
     */
    TimePicker.prototype.getPersistData = function () {
        var keyEntity = ['value'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * To get component name
     * @private
     */
    TimePicker.prototype.getModuleName = function () {
        return 'timepicker';
    };
    /**
     * Called internally if any of the property value changed.
     * returns void
     * @private
     */
    // tslint:disable-next-line:max-func-body-length
    TimePicker.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'placeholder':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setPlaceholder(newProp.placeholder, this.inputElement);
                    this.inputElement.setAttribute('aria-placeholder', newProp.placeholder);
                    break;
                case 'readonly':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setReadonly(this.readonly, this.inputElement, this.floatLabelType);
                    if (this.readonly) {
                        this.hide();
                    }
                    this.setTimeAllowEdit();
                    break;
                case 'enabled':
                    this.setProperties({ enabled: newProp.enabled }, true);
                    this.setEnable();
                    break;
                case 'allowEdit':
                    this.setTimeAllowEdit();
                    break;
                case 'enableRtl':
                    this.setProperties({ enableRtl: newProp.enableRtl }, true);
                    this.setEnableRtl();
                    break;
                case 'cssClass':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setCssClass(newProp.cssClass, [this.inputWrapper.container], oldProp.cssClass);
                    if (this.popupWrapper) {
                        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setCssClass(newProp.cssClass, [this.popupWrapper], oldProp.cssClass);
                    }
                    break;
                case 'zIndex':
                    this.setProperties({ zIndex: newProp.zIndex }, true);
                    this.setZIndex();
                    break;
                case 'htmlAttributes':
                    this.updateHtmlAttributeToElement();
                    this.updateHtmlAttributeToWrapper();
                    this.checkAttributes(false);
                    break;
                case 'min':
                case 'max':
                    this.getProperty(newProp, prop);
                    break;
                case 'showClearButton':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setClearButton(this.showClearButton, this.inputElement, this.inputWrapper);
                    this.bindClearEvent();
                    break;
                case 'locale':
                    this.setProperties({ locale: newProp.locale }, true);
                    this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
                    this.l10n.setLocale(this.locale);
                    this.updatePlaceHolder();
                    this.setValue(this.value);
                    break;
                case 'width':
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.inputWrapper.container, { 'width': this.setWidth(newProp.width) });
                    this.containerStyle = this.inputWrapper.container.getBoundingClientRect();
                    break;
                case 'format':
                    this.setProperties({ format: newProp.format }, true);
                    this.checkTimeFormat();
                    this.setValue(this.value);
                    break;
                case 'value':
                    this.invalidValueString = null;
                    this.checkInvalidValue(newProp.value);
                    newProp.value = this.value;
                    if (!this.invalidValueString) {
                        if (typeof newProp.value === 'string') {
                            this.setProperties({ value: this.checkDateValue(new Date(newProp.value)) }, true);
                            newProp.value = this.value;
                        }
                        else {
                            if ((newProp.value && +new Date(+newProp.value).setMilliseconds(0)) !== +this.value) {
                                newProp.value = this.checkDateValue(new Date('' + newProp.value));
                            }
                        }
                        this.initValue = newProp.value;
                        newProp.value = this.compareFormatChange(this.checkValue(newProp.value));
                    }
                    else {
                        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(this.invalidValueString, this.inputElement, this.floatLabelType, this.showClearButton);
                        this.checkErrorState(this.invalidValueString);
                    }
                    this.checkValueChange(null, false);
                    break;
                case 'floatLabelType':
                    this.floatLabelType = newProp.floatLabelType;
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].removeFloating(this.inputWrapper);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].addFloating(this.inputElement, this.floatLabelType, this.placeholder);
                    break;
                case 'strictMode':
                    this.invalidValueString = null;
                    if (newProp.strictMode) {
                        this.checkErrorState(null);
                    }
                    this.setProperties({ strictMode: newProp.strictMode }, true);
                    this.checkValue((this.inputElement).value);
                    this.checkValueChange(null, false);
                    break;
                case 'scrollTo':
                    if (this.checkDateValue(new Date(this.checkInValue(newProp.scrollTo)))) {
                        if (this.popupWrapper) {
                            this.setScrollTo();
                        }
                        this.setProperties({ scrollTo: newProp.scrollTo }, true);
                    }
                    else {
                        this.setProperties({ scrollTo: null }, true);
                    }
                    break;
            }
        }
    };
    TimePicker.prototype.checkInValue = function (inValue) {
        if (inValue instanceof Date) {
            return (inValue.toUTCString());
        }
        else {
            return ('' + inValue);
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TimePicker.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TimePicker.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TimePicker.prototype, "strictMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TimePicker.prototype, "format", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TimePicker.prototype, "enabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TimePicker.prototype, "readonly", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], TimePicker.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')
    ], TimePicker.prototype, "floatLabelType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TimePicker.prototype, "placeholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)
    ], TimePicker.prototype, "zIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TimePicker.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TimePicker.prototype, "showClearButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(30)
    ], TimePicker.prototype, "step", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TimePicker.prototype, "scrollTo", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TimePicker.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TimePicker.prototype, "min", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TimePicker.prototype, "max", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TimePicker.prototype, "allowEdit", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TimePicker.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TimePicker.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TimePicker.prototype, "destroyed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TimePicker.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TimePicker.prototype, "itemRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TimePicker.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TimePicker.prototype, "blur", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TimePicker.prototype, "focus", void 0);
    TimePicker = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], TimePicker);
    return TimePicker;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/index.js":
/*!******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/index.js ***!
  \******************************************************/
/*! exports provided: CrosshairSettings, ZoomSettings, Chart, Row, Column, MajorGridLines, MinorGridLines, AxisLine, MajorTickLines, MinorTickLines, CrosshairTooltip, Axis, VisibleLabels, DateTime, Category, Logarithmic, DateTimeCategory, NiceInterval, StripLine, Connector, Font, Border, ChartArea, Margin, Animation, Indexes, CornerRadius, Index, EmptyPointSettings, DragSettings, TooltipSettings, Periods, PeriodSelectorSettings, LineSeries, ColumnSeries, AreaSeries, BarSeries, PolarSeries, RadarSeries, StackingBarSeries, CandleSeries, StackingColumnSeries, StepLineSeries, StepAreaSeries, StackingAreaSeries, StackingLineSeries, ScatterSeries, RangeColumnSeries, WaterfallSeries, HiloSeries, HiloOpenCloseSeries, RangeAreaSeries, BubbleSeries, SplineSeries, HistogramSeries, SplineAreaSeries, TechnicalIndicator, SmaIndicator, EmaIndicator, TmaIndicator, AccumulationDistributionIndicator, AtrIndicator, MomentumIndicator, RsiIndicator, StochasticIndicator, BollingerBands, MacdIndicator, Trendlines, sort, isBreakLabel, rotateTextSize, removeElement, logBase, showTooltip, inside, withIn, logWithIn, withInRange, sum, subArraySum, subtractThickness, subtractRect, degreeToLocation, getAngle, subArray, valueToCoefficient, TransformToVisible, indexFinder, CoefficientToVector, valueToPolarCoefficient, Mean, PolarArc, createTooltip, createZoomingLabels, withInBounds, getValueXByPoint, getValueYByPoint, findClipRect, firstToLowerCase, getTransform, getMinPointsDelta, getAnimationFunction, linear, markerAnimate, animateRectElement, pathAnimation, appendClipElement, triggerLabelRender, setRange, getActualDesiredIntervalsCount, templateAnimate, drawSymbol, calculateShapes, getRectLocation, minMax, getElement, getTemplateFunction, createTemplate, getFontStyle, measureElementRect, findlElement, getPoint, appendElement, appendChildElement, getDraggedRectLocation, checkBounds, getLabelText, stopTimer, isCollide, isOverlap, containsRect, calculateRect, convertToHexCode, componentToHex, convertHexToColor, colorNameToHex, getSaturationColor, getMedian, calculateLegendShapes, textTrim, lineBreakLabelTrim, stringToNumber, redrawElement, animateRedrawElement, textElement, calculateSize, createSvg, getTitle, titlePositionX, textWrap, blazorTemplatesReset, CustomizeOption, StackValues, RectOption, CircleOption, PolygonOption, ChartLocation, Thickness, ColorValue, PointData, AccPointData, ControlPoints, Crosshair, Tooltip, Zoom, Selection, DataEditing, DataLabel, ErrorBar, DataLabelSettings, MarkerSettings, Points, Trendline, ErrorBarCapSettings, ChartSegment, ErrorBarSettings, SeriesBase, Series, Legend, ChartAnnotation, ChartAnnotationSettings, LabelBorder, MultiLevelCategories, StripLineSettings, MultiLevelLabels, ScrollbarSettingsRange, ScrollbarSettings, BoxAndWhiskerSeries, MultiColoredAreaSeries, MultiColoredLineSeries, MultiColoredSeries, MultiLevelLabel, ScrollBar, ParetoSeries, Export, AccumulationChart, AccumulationAnnotationSettings, AccumulationDataLabelSettings, PieCenter, AccPoints, AccumulationSeries, getSeriesFromIndex, pointByIndex, PieSeries, FunnelSeries, PyramidSeries, AccumulationLegend, AccumulationDataLabel, AccumulationTooltip, AccumulationSelection, AccumulationAnnotation, StockChart, StockChartFont, StockChartBorder, StockChartArea, StockMargin, StockChartStripLineSettings, StockEmptyPointSettings, StockChartConnector, StockSeries, StockChartIndicator, StockChartAxis, StockChartRow, StockChartTrendline, StockChartAnnotationSettings, StockChartIndexes, StockEventsSettings, loaded, legendClick, load, animationComplete, legendRender, textRender, pointRender, seriesRender, axisLabelRender, axisRangeCalculated, axisMultiLabelRender, tooltipRender, chartMouseMove, chartMouseClick, pointClick, pointMove, chartMouseLeave, chartMouseDown, chartMouseUp, zoomComplete, dragComplete, resized, beforePrint, annotationRender, scrollStart, scrollEnd, scrollChanged, stockEventRender, multiLevelLabelClick, dragStart, drag, dragEnd, Theme, getSeriesColor, getThemeColor, getScrollbarThemeColor, PeriodSelector, RangeNavigator, rangeValueToCoefficient, getXLocation, getRangeValueXByPoint, getExactData, getNearestValue, DataPoint, RangeNavigatorTheme, getRangeThemeColor, RangeNavigatorAxis, RangeSeries, RangeSlider, RangeNavigatorSeries, ThumbSettings, StyleSettings, RangeTooltipSettings, Double, RangeTooltip, Smithchart, SmithchartMajorGridLines, SmithchartMinorGridLines, SmithchartAxisLine, SmithchartAxis, LegendTitle, LegendLocation, LegendItemStyleBorder, LegendItemStyle, LegendBorder, SmithchartLegendSettings, SeriesTooltipBorder, SeriesTooltip, SeriesMarkerBorder, SeriesMarkerDataLabelBorder, SeriesMarkerDataLabelConnectorLine, SeriesMarkerDataLabel, SeriesMarker, SmithchartSeries, TooltipRender, Subtitle, Title, SmithchartFont, SmithchartMargin, SmithchartBorder, SmithchartRect, LabelCollection, LegendSeries, LabelRegion, HorizontalLabelCollection, RadialLabelCollections, LineSegment, PointRegion, Point, ClosestPoint, MarkerOptions, SmithchartLabelPosition, Direction, DataLabelTextOptions, LabelOption, SmithchartSize, GridArcPoints, smithchartBeforePrint, SmithchartLegend, Sparkline, SparklineTooltip, SparklineBorder, SparklineFont, TrackLineSettings, SparklineTooltipSettings, ContainerArea, LineSettings, RangeBandSettings, AxisSettings, Padding, SparklineMarkerSettings, LabelOffset, SparklineDataLabelSettings */
/***/ (function(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-charts/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CrosshairSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CrosshairSettings"]; });

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragStart", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["drag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnd", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dragEnd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Theme", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Theme"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getSeriesColor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getSeriesColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getThemeColor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getThemeColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollbarThemeColor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getScrollbarThemeColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PeriodSelector", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PeriodSelector"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigator", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RangeNavigator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rangeValueToCoefficient", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rangeValueToCoefficient"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getXLocation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getXLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRangeValueXByPoint", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getRangeValueXByPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getExactData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getExactData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getNearestValue", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getNearestValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataPoint", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DataPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorTheme", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RangeNavigatorTheme"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRangeThemeColor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getRangeThemeColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorAxis", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RangeNavigatorAxis"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeSeries", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RangeSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeSlider", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RangeSlider"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorSeries", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RangeNavigatorSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ThumbSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ThumbSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StyleSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["StyleSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeTooltipSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RangeTooltipSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Double", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Double"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeTooltip", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RangeTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Smithchart", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Smithchart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartMajorGridLines", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartMajorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartMinorGridLines", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartMinorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartAxisLine", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartAxisLine"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartAxis", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartAxis"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendTitle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LegendTitle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendLocation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LegendLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendItemStyleBorder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LegendItemStyleBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendItemStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LegendItemStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendBorder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LegendBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartLegendSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartLegendSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesTooltipBorder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SeriesTooltipBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesTooltip", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SeriesTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerBorder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SeriesMarkerBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabelBorder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SeriesMarkerDataLabelBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabelConnectorLine", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SeriesMarkerDataLabelConnectorLine"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabel", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SeriesMarkerDataLabel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarker", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SeriesMarker"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartSeries", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TooltipRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subtitle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Subtitle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Title", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Title"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartFont", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartMargin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartMargin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartBorder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartRect", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LabelCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendSeries", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LegendSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelRegion", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LabelRegion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalLabelCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["HorizontalLabelCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RadialLabelCollections", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RadialLabelCollections"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSegment", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LineSegment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PointRegion", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PointRegion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Point", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Point"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClosestPoint", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ClosestPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkerOptions", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["MarkerOptions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartLabelPosition", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartLabelPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Direction", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Direction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataLabelTextOptions", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DataLabelTextOptions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelOption", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LabelOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartSize", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartSize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridArcPoints", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["GridArcPoints"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "smithchartBeforePrint", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["smithchartBeforePrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartLegend", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SmithchartLegend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sparkline", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Sparkline"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineTooltip", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SparklineTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineBorder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SparklineBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineFont", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SparklineFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TrackLineSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TrackLineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineTooltipSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SparklineTooltipSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContainerArea", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ContainerArea"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeBandSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RangeBandSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AxisSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AxisSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Padding", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Padding"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineMarkerSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SparklineMarkerSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelOffset", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LabelOffset"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineDataLabelSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SparklineDataLabelSettings"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/accumulation.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/accumulation.js ***!
  \************************************************************************************/
/*! exports provided: AccumulationChart */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationChart", function() { return AccumulationChart; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _model_acc_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model/acc-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/model/acc-base.js");
/* harmony import */ var _common_model_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _common_legend_legend__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/legend/legend */ "./node_modules/@syncfusion/ej2-charts/src/common/legend/legend.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/model/data */ "./node_modules/@syncfusion/ej2-charts/src/common/model/data.js");
/* harmony import */ var _renderer_accumulation_base__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./renderer/accumulation-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/accumulation-base.js");
/* harmony import */ var _renderer_pie_series__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./renderer/pie-series */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pie-series.js");
/* harmony import */ var _common_utils_export__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../common/utils/export */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/export.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/**
 * AccumulationChart file
 */





















/**
 * Represents the AccumulationChart control.
 * ```html
 * <div id="accumulation"/>
 * <script>
 *   var accObj = new AccumulationChart({ });
 *   accObj.appendTo("#accumulation");
 * </script>
 * ```
 * @public
 */
var AccumulationChart = /** @class */ (function (_super) {
    __extends(AccumulationChart, _super);
    /**
     * Constructor for creating the AccumulationChart widget
     * @private
     */
    function AccumulationChart(options, element) {
        var _this = _super.call(this, options, element) || this;
        /** @private */
        _this.animateselected = false;
        /** @private explode radius internal property */
        _this.explodeDistance = 0;
        _this.chartid = 57724;
        return _this;
    }
    /**
     * Animate the series bounds on data change.
     * @private
     */
    AccumulationChart.prototype.animate = function (duration) {
        this.duration = duration ? duration : 700;
        this.animateselected = true;
        this.animateSeries = false;
        var temIndex = 0;
        var tempcolor = [];
        var tempindex = [];
        var tempindex1 = [];
        var currentSeries = this.visibleSeries[0];
        var datasource = [];
        datasource = currentSeries.dataSource;
        currentSeries.sumOfPoints = 0;
        if (currentSeries.points.length < Object.keys(currentSeries.dataSource).length) {
            this.refresh();
        }
        else if (currentSeries.points.length > Object.keys(currentSeries.dataSource).length) {
            var currentSeries_1 = this.visibleSeries[0];
            currentSeries_1.points = currentSeries_1.points.filter(function (entry1) {
                entry1.visible = false;
                tempindex.push(entry1.index);
                tempcolor.push(entry1.color);
                return (datasource).some(function (entry2) {
                    var accPoint = entry2;
                    if (entry1.x === accPoint.x) {
                        entry1.visible = true;
                        tempindex1.push(entry1.index);
                        entry1.index = temIndex;
                        temIndex++;
                    }
                    return entry1.x === accPoint.x;
                });
            });
            var missing = tempindex.filter(function (item) { return tempindex1.indexOf(item) < 0; });
            var interval = tempindex.length - missing.length;
            for (var i = (tempindex.length - 1); i >= interval; i--) {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["removeElement"])('container_Series_0_Point_' + tempindex[i]);
            }
            for (var i = 0; i < currentSeries_1.points.length; i++) {
                currentSeries_1.points[i].y = currentSeries_1.dataSource[i].y;
                currentSeries_1.points[i].color = tempcolor[i];
                currentSeries_1.sumOfPoints += currentSeries_1.dataSource[i].y;
            }
            this.redraw = this.enableAnimation;
            this.animateSeries = false;
            this.calculateBounds();
            this.renderElements();
        }
        else {
            for (var i = 0; i < currentSeries.points.length; i++) {
                currentSeries.points[i].y = currentSeries.dataSource[i].y;
                currentSeries.sumOfPoints += currentSeries.dataSource[i].y;
            }
            this.redraw = this.enableAnimation;
            this.animateSeries = false;
            this.removeSvg();
            this.refreshPoints(currentSeries.points);
            this.renderElements();
        }
    };
    Object.defineProperty(AccumulationChart.prototype, "type", {
        /** @private */
        get: function () {
            if (this.series && this.series.length) {
                return this.series[0].type;
            }
            return 'Pie';
        },
        enumerable: true,
        configurable: true
    });
    // accumulation chart methods
    /**
     *  To create svg object, renderer and binding events for the container.
     */
    AccumulationChart.prototype.preRender = function () {
        var blazor = 'Blazor';
        this.isBlazor = window[blazor];
        this.unWireEvents();
        this.setCulture();
        this.animateSeries = true;
        if (this.element.id === '') {
            var collection = document.getElementsByClassName('e-accumulationchart').length;
            this.element.id = 'acc_chart_' + this.chartid + '_' + collection;
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["calculateSize"])(this);
        this.wireEvents();
    };
    /**
     * Themeing for chart goes here
     */
    AccumulationChart.prototype.setTheme = function () {
        /*! Set theme for accumulation chart */
        this.themeStyle = Object(_common_model_theme__WEBPACK_IMPORTED_MODULE_3__["getThemeColor"])(this.theme);
    };
    /**
     * To render the accumulation chart elements
     */
    AccumulationChart.prototype.render = function () {
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["load"], { accumulation: this, chart: this });
        this.setTheme();
        this.accBaseModule = new _renderer_accumulation_base__WEBPACK_IMPORTED_MODULE_9__["AccumulationBase"](this);
        this.pieSeriesModule = new _renderer_pie_series__WEBPACK_IMPORTED_MODULE_10__["PieSeries"](this);
        this.calculateVisibleSeries();
        this.processData();
    };
    /**
     * Method to unbind events for accumulation chart
     */
    AccumulationChart.prototype.unWireEvents = function () {
        /*! Find the Events type */
        var isIE11Pointer = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer;
        var start = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent;
        var move = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent;
        var stop = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent;
        var cancel = isIE11Pointer ? 'pointerleave' : 'mouseleave';
        /*! UnBind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, move, this.accumulationMouseMove);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, stop, this.accumulationMouseEnd);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, start, this.accumulationMouseStart);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.accumulationOnMouseClick);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'contextmenu', this.accumulationRightClick);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, cancel, this.accumulationMouseLeave);
        window.removeEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.accumulationResize);
    };
    /**
     * Method to bind events for the accumulation chart
     */
    AccumulationChart.prototype.wireEvents = function () {
        /*! Find the Events type */
        var isIE11Pointer = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer;
        var start = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent;
        var stop = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent;
        var move = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent;
        var cancel = isIE11Pointer ? 'pointerleave' : 'mouseleave';
        /*! Bind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, move, this.accumulationMouseMove, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, stop, this.accumulationMouseEnd, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, start, this.accumulationMouseStart, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.accumulationOnMouseClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'contextmenu', this.accumulationRightClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, cancel, this.accumulationMouseLeave, this);
        window.addEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.accumulationResize.bind(this));
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element); // To avoid geasture blocking for browser
        /*! Apply the style for chart */
        this.setStyle(this.element);
    };
    /**
     * Method to set mouse x, y from events
     */
    AccumulationChart.prototype.setMouseXY = function (e) {
        var pageX;
        var pageY;
        var svgRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_svg').getBoundingClientRect();
        var rect = this.element.getBoundingClientRect();
        if (e.type.indexOf('touch') > -1) {
            this.isTouch = true;
            var touchArg = e;
            pageY = touchArg.changedTouches[0].clientY;
            pageX = touchArg.changedTouches[0].clientX;
        }
        else {
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2';
            pageX = e.clientX;
            pageY = e.clientY;
        }
        this.mouseY = (pageY - rect.top) - Math.max(svgRect.top - rect.top, 0);
        this.mouseX = (pageX - rect.left) - Math.max(svgRect.left - rect.left, 0);
    };
    /**
     * Handles the mouse end.
     * @return {boolean}
     * @private
     */
    AccumulationChart.prototype.accumulationMouseEnd = function (e) {
        this.setMouseXY(e);
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["chartMouseUp"], { target: e.target.id, x: this.mouseX, y: this.mouseY });
        if (this.isTouch) {
            this.titleTooltip(e, this.mouseX, this.mouseY, this.isTouch);
            if (this.accumulationDataLabelModule && this.visibleSeries[0].dataLabel.visible) {
                this.accumulationDataLabelModule.move(e, this.mouseX, this.mouseY, this.isTouch);
            }
            if (this.accumulationLegendModule && this.legendSettings.visible) {
                this.accumulationLegendModule.move(e);
            }
        }
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, e);
        return false;
    };
    /*public removeSvgOffset(x: number, y: number): ChartLocation {
        let rect: ClientRect = this.element.getBoundingClientRect();
        let svgRect: ClientRect = getElement(this.element.id + '_svg').getBoundingClientRect();
        return { x: (x - rect.left) - Math.max(svgRect.left - rect.left, 0), y: (y - rect.top) - Math.max(svgRect.top - rect.top, 0)};
    }*/
    /**
     * Handles the mouse start.
     * @return {boolean}
     * @private
     */
    AccumulationChart.prototype.accumulationMouseStart = function (e) {
        this.setMouseXY(e);
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["chartMouseDown"], { target: e.target.id, x: this.mouseX, y: this.mouseY });
        return false;
    };
    /**
     * Handles the accumulation chart resize.
     * @return {boolean}
     * @private
     */
    AccumulationChart.prototype.accumulationResize = function (e) {
        var _this = this;
        this.animateSeries = false;
        var args = {
            accumulation: this.isBlazor ? {} : this,
            previousSize: new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["Size"](this.availableSize.width, this.availableSize.height),
            name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["resized"],
            currentSize: new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["Size"](0, 0),
            chart: this.isBlazor ? {} : this,
        };
        if (this.resizeTo) {
            clearTimeout(this.resizeTo);
        }
        this.resizeTo = setTimeout(function () {
            if (_this.isDestroyed) {
                clearTimeout(_this.resizeTo);
                return;
            }
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["calculateSize"])(_this);
            args.currentSize = _this.availableSize;
            _this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["resized"], args);
            _this.refreshSeries();
            _this.refreshChart();
        }, 500);
        return false;
    };
    /**
     * Handles the print method for accumulation chart control.
     */
    AccumulationChart.prototype.print = function (id) {
        // To handle the print funtion in IE and Edge browsers
        var clippath = document.getElementById(this.element.id + '_Series_0').style.clipPath;
        document.getElementById(this.element.id + '_Series_0').style.clipPath = '';
        var exportChart = new _common_utils_export__WEBPACK_IMPORTED_MODULE_11__["ExportUtils"](this);
        exportChart.print(id);
        document.getElementById(this.element.id + '_Series_0').style.clipPath = clippath;
    };
    /**
     * Export method for the chart.
     */
    AccumulationChart.prototype.export = function (type, fileName) {
        if (this.exportModule) {
            this.exportModule.export(type, fileName);
        }
    };
    /**
     * Applying styles for accumulation chart element
     */
    AccumulationChart.prototype.setStyle = function (element) {
        element.style.touchAction = 'element';
        element.style.msTouchAction = 'element';
        element.style.msContentZooming = 'none';
        element.style.msUserSelect = 'none';
        element.style.webkitUserSelect = 'none';
        element.style.position = 'relative';
        element.style.display = 'block';
    };
    /**
     * Method to set the annotation content dynamically for accumulation.
     */
    AccumulationChart.prototype.setAnnotationValue = function (annotationIndex, content) {
        var annotation = this.annotations[annotationIndex];
        var element;
        var parentNode = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_Annotation_Collections');
        if (content) {
            annotation.content = content;
            if (parentNode) {
                element = this.createElement('div');
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(this.element.id + '_Annotation_' + annotationIndex);
                this.annotationModule.processAnnotation(annotation, annotationIndex, element);
                parentNode.appendChild(element.children[0]);
            }
            else {
                this.annotationModule.renderAnnotations(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_Secondary_Element'));
            }
        }
    };
    /**
     * Handles the mouse move on accumulation chart.
     * @return {boolean}
     * @private
     */
    AccumulationChart.prototype.accumulationMouseMove = function (e) {
        this.setMouseXY(e);
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["chartMouseMove"], { target: e.target.id, x: this.mouseX, y: this.mouseY });
        if (this.pointMove) {
            this.triggerPointEvent(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["pointMove"], e.target);
        }
        if (this.accumulationLegendModule && this.legendSettings.visible) {
            this.accumulationLegendModule.move(e);
        }
        if (this.accumulationDataLabelModule && this.visibleSeries[0] && this.visibleSeries[0].dataLabel.visible) {
            this.accumulationDataLabelModule.move(e, this.mouseX, this.mouseY);
        }
        if (!this.isTouch) {
            this.titleTooltip(e, this.mouseX, this.mouseY);
        }
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, e);
        return false;
    };
    AccumulationChart.prototype.titleTooltip = function (event, x, y, isTouch) {
        var targetId = event.target.id;
        var id = (targetId === (this.element.id + '_title') || targetId === (this.element.id + '_subTitle'));
        if ((event.target.textContent.indexOf('...') > -1) && id) {
            var title = (targetId === (this.element.id + '_title')) ? this.title : this.subTitle;
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["showTooltip"])(title, x, y, this.element.offsetWidth, this.element.id + '_EJ2_Title_Tooltip', Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_Secondary_Element'), isTouch);
        }
        else {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(this.element.id + '_EJ2_Title_Tooltip');
        }
    };
    /**
     * Handles the mouse click on accumulation chart.
     * @return {boolean}
     * @private
     */
    AccumulationChart.prototype.accumulationOnMouseClick = function (e) {
        this.setMouseXY(e);
        if (this.accumulationLegendModule && this.legendSettings.visible) {
            this.accumulationLegendModule.click(e);
        }
        if (this.selectionMode !== 'None' && this.accumulationSelectionModule) {
            this.accumulationSelectionModule.calculateSelectedElements(this, e);
        }
        if (this.visibleSeries[0].explode) {
            this.accBaseModule.processExplode(e);
        }
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["chartMouseClick"], { target: e.target.id, x: this.mouseX, y: this.mouseY });
        if (this.pointClick) {
            this.triggerPointEvent(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["pointClick"], e.target);
        }
        return false;
    };
    AccumulationChart.prototype.triggerPointEvent = function (event, element) {
        var indexes = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["indexFinder"])(element.id, true);
        if (indexes.series >= 0 && indexes.point >= 0) {
            this.trigger(event, { series: this.isBlazor ? {} : this.series[indexes.series],
                point: this.series[indexes.series].points[indexes.point],
                seriesIndex: indexes.series, pointIndex: indexes.point,
                x: this.mouseX, y: this.mouseY });
        }
    };
    /**
     * Handles the mouse right click on accumulation chart.
     * @return {boolean}
     * @private
     */
    AccumulationChart.prototype.accumulationRightClick = function (event) {
        if (event.buttons === 2 || event.pointerType === 'touch') {
            event.preventDefault();
            event.stopPropagation();
            return false;
        }
        return true;
    };
    /**
     * Handles the mouse leave on accumulation chart.
     * @return {boolean}
     * @private
     */
    AccumulationChart.prototype.accumulationMouseLeave = function (e) {
        this.setMouseXY(e);
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["chartMouseLeave"], { target: e.target.id, x: this.mouseX, y: this.mouseY });
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave', e);
        return false;
    };
    /**
     * Method to set culture for chart
     */
    AccumulationChart.prototype.setCulture = function () {
        this.intl = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"]();
    };
    /**
     * Method to create SVG element for accumulation chart.
     */
    AccumulationChart.prototype.createPieSvg = function () {
        this.removeSvg();
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["createSvg"])(this);
    };
    /**
     * To Remove the SVG from accumulation chart.
     * @return {boolean}
     * @private
     */
    AccumulationChart.prototype.removeSvg = function () {
        if (this.redraw) {
            return null;
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["blazorTemplatesReset"])(this);
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(this.element.id + '_Secondary_Element');
        if (this.svgObject) {
            while (this.svgObject.childNodes.length > 0) {
                this.svgObject.removeChild(this.svgObject.firstChild);
            }
            if (!this.svgObject.hasChildNodes() && this.svgObject.parentNode) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.svgObject);
            }
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["removeElement"])('EJ2_legend_tooltip');
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["removeElement"])('EJ2_datalabel_tooltip');
    };
    /**
     * Method to create the secondary element for tooltip, datalabel and annotaitons.
     */
    AccumulationChart.prototype.createSecondaryElement = function () {
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["redrawElement"])(this.redraw, this.element.id + '_Secondary_Element') ||
            this.createElement('div', {
                id: this.element.id + '_Secondary_Element',
                styles: 'position: relative'
            });
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["appendChildElement"])(false, this.element, element, this.redraw);
    };
    /**
     * Method to find visible series based on series types
     */
    AccumulationChart.prototype.calculateVisibleSeries = function () {
        this.visibleSeries = [];
        for (var i = 0, length_1 = this.series.length; i < length_1; i++) {
            this.series[i].index = i;
            if (this.series[i].type === this.type && this.visibleSeries.length === 0) {
                this.visibleSeries.push(this.series[i]);
                break;
            }
        }
    };
    /**
     * To find points from dataSource
     */
    AccumulationChart.prototype.processData = function (render) {
        if (render === void 0) { render = true; }
        this.seriesCounts = 0;
        for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            series.dataModule = new _common_model_data__WEBPACK_IMPORTED_MODULE_8__["Data"](series.dataSource || this.dataSource, series.query);
            series.refreshDataManager(this, render);
        }
    };
    /**
     * To refresh the accumulation chart
     * @private
     */
    AccumulationChart.prototype.refreshChart = function () {
        this.doGrouppingProcess();
        this.createPieSvg();
        this.calculateBounds();
        this.renderElements();
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["removeElement"])('chartmeasuretext');
    };
    /**
     * Method to find groupped points
     */
    AccumulationChart.prototype.doGrouppingProcess = function () {
        var series = this.visibleSeries[0];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(series.resultData) && ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(series.lastGroupTo) &&
            series.lastGroupTo !== series.groupTo))) {
            series.getPoints(series.resultData, this);
        }
    };
    /**
     * Method to calculate bounds for accumulation chart
     */
    AccumulationChart.prototype.calculateBounds = function () {
        this.initialClipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["Rect"](this.margin.left, this.margin.top, this.availableSize.width, this.availableSize.height);
        this.titleCollection = [];
        this.subTitleCollection = [];
        var titleHeight = 0;
        var subTitleHeight = 0;
        var maxWidth = 0;
        var titleWidth = 0;
        this.titleCollection = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getTitle"])(this.title, this.titleStyle, this.initialClipRect.width);
        titleHeight = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["measureText"])(this.title, this.titleStyle).height * this.titleCollection.length;
        if (this.subTitle) {
            for (var _i = 0, _a = this.titleCollection; _i < _a.length; _i++) {
                var titleText = _a[_i];
                titleWidth = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["measureText"])(titleText, this.titleStyle).width;
                maxWidth = titleWidth > maxWidth ? titleWidth : maxWidth;
            }
            this.subTitleCollection = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getTitle"])(this.subTitle, this.subTitleStyle, maxWidth);
            subTitleHeight = (Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["measureText"])(this.subTitle, this.subTitleStyle).height * this.subTitleCollection.length);
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["subtractRect"])(this.initialClipRect, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["Rect"](0, (subTitleHeight + titleHeight), this.margin.right + this.margin.left, this.margin.bottom + this.margin.top));
        this.calculateLegendBounds();
    };
    /*
     * Method to calculate legend bounds for accumulation chart
     */
    AccumulationChart.prototype.calculateLegendBounds = function () {
        if (!this.accumulationLegendModule || !this.legendSettings.visible) {
            return null;
        }
        this.accumulationLegendModule.getLegendOptions(this, this.visibleSeries);
        this.accumulationLegendModule.calculateLegendBounds(this.initialClipRect, this.availableSize);
    };
    /**
     * To render elements for accumulation chart
     * @private
     */
    AccumulationChart.prototype.renderElements = function () {
        this.renderBorder();
        this.createSecondaryElement();
        this.renderSeries();
        this.renderTitle();
        this.renderLegend();
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["appendChildElement"])(false, this.element, this.svgObject, this.redraw);
        this.processSelection();
        this.processExplode();
        this.renderAnnotation();
        this.setSecondaryElementPosition();
        this.trigger('loaded', { accumulation: this.isBlazor ? {} : this, chart: this.isBlazor ? {} : this });
        this.animateSeries = false;
    };
    /**
     * To set the left and top position for data label template for center aligned chart
     * @private
     */
    AccumulationChart.prototype.setSecondaryElementPosition = function () {
        var tooltipParent = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_Secondary_Element');
        if (!tooltipParent) {
            return;
        }
        var rect = this.element.getBoundingClientRect();
        var svgRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_svg').getBoundingClientRect();
        tooltipParent.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
        tooltipParent.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
    };
    /**
     * To render the annotaitions for accumulation series.
     * @private
     */
    AccumulationChart.prototype.renderAnnotation = function () {
        if (this.annotationModule) {
            this.annotationModule.renderAnnotations(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_Secondary_Element'));
        }
    };
    /**
     * Method to process the explode in accumulation chart
     * @private
     */
    AccumulationChart.prototype.processExplode = function () {
        if (this.redraw) {
            return null;
        }
        if (!this.visibleSeries[0].explode) {
            return null;
        }
        this.accBaseModule.invokeExplode();
    };
    /**
     * Method to render series for accumulation chart
     */
    AccumulationChart.prototype.renderSeries = function () {
        if (!this.redraw) {
            this.svgObject.appendChild(this.renderer.createGroup({ id: this.element.id + '_SeriesCollection' }));
        }
        for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            if (series.visible && this[(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["firstToLowerCase"])(series.type) + 'SeriesModule')]) {
                this[(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["firstToLowerCase"])(series.type) + 'SeriesModule')].initProperties(this, series);
                series.renderSeries(this, this.redraw);
            }
        }
    };
    /**
     * Method to render border for accumulation chart
     */
    AccumulationChart.prototype.renderBorder = function () {
        var padding = this.border.width;
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["appendChildElement"])(false, this.svgObject, this.renderer.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["RectOption"](this.element.id + '_border', this.background || this.themeStyle.background, this.border, 1, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["Rect"](padding / 2, padding / 2, this.availableSize.width - padding, this.availableSize.height - padding))), this.redraw);
    };
    /**
     * Method to render legend for accumulation chart
     */
    AccumulationChart.prototype.renderLegend = function () {
        if (!this.accumulationLegendModule || !this.legendSettings.visible) {
            return null;
        }
        if (this.accumulationLegendModule.legendCollections.length) {
            if (this.visibleSeries[0].type === 'Pie') {
                this.accumulationLegendModule.getSmartLegendLocation(this.visibleSeries[0].labelBound, this.accumulationLegendModule.legendBounds, this.margin);
            }
            this.accumulationLegendModule.renderLegend(this, this.legendSettings, this.accumulationLegendModule.legendBounds, this.redraw);
        }
    };
    /**
     * To process the selection in accumulation chart
     * @private
     */
    AccumulationChart.prototype.processSelection = function () {
        if (!this.accumulationSelectionModule || this.selectionMode === 'None') {
            return null;
        }
        var selectedDataIndexes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], this.accumulationSelectionModule.selectedDataIndexes, null, true);
        this.accumulationSelectionModule.invokeSelection(this);
        if (selectedDataIndexes.length > 0) {
            this.accumulationSelectionModule.selectedDataIndexes = selectedDataIndexes;
            this.accumulationSelectionModule.redrawSelection(this, this.selectionMode);
        }
    };
    /**
     * To render title for accumulation chart
     */
    AccumulationChart.prototype.renderTitle = function () {
        var rect;
        var margin = this.margin;
        if (!this.title) {
            return null;
        }
        var alignment = this.titleStyle.textAlignment;
        var getAnchor = alignment === 'Near' ? 'start' : alignment === 'Far' ? 'end' : 'middle';
        var titleSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["measureText"])(this.title, this.titleStyle);
        rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["Rect"](margin.left, 0, this.availableSize.width - margin.left - margin.right, 0);
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["TextOption"](this.element.id + '_title', Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["titlePositionX"])(rect, this.titleStyle), this.margin.top + (titleSize.height * 3 / 4), getAnchor, this.titleCollection, '', 'auto');
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["textElement"])(this.renderer, options, this.titleStyle, this.titleStyle.color || this.themeStyle.chartTitle, this.svgObject, false, this.redraw);
        if (this.subTitle) {
            this.renderSubTitle(options);
        }
    };
    AccumulationChart.prototype.renderSubTitle = function (options) {
        var maxWidth = 0;
        var titleWidth = 0;
        var padding = 10;
        var rect;
        var alignment = this.titleStyle.textAlignment;
        var getAnchor = function (alignment) {
            return alignment === 'Near' ? 'start' : alignment === 'Far' ? 'end' : 'middle';
        };
        var subTitleElementSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["measureText"])(this.subTitle, this.subTitleStyle);
        for (var _i = 0, _a = this.titleCollection; _i < _a.length; _i++) {
            var titleText = _a[_i];
            titleWidth = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["measureText"])(titleText, this.titleStyle).width;
            maxWidth = titleWidth > maxWidth ? titleWidth : maxWidth;
        }
        rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["Rect"](alignment === 'Center' ? (options.x - maxWidth / 2) : alignment === 'Far' ? options.x - maxWidth : options.x, 0, maxWidth, 0);
        var subTitleOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_7__["TextOption"](this.element.id + '_subTitle', Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["titlePositionX"])(rect, this.subTitleStyle), options.y * options.text.length + ((subTitleElementSize.height) * 3 / 4) + padding, getAnchor(this.subTitleStyle.textAlignment), this.subTitleCollection, '', 'auto');
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["textElement"])(this.renderer, subTitleOption, this.subTitleStyle, this.subTitleStyle.color || this.themeStyle.chartTitle, this.svgObject, false, this.redraw);
    };
    /**
     * To get the series parent element
     * @private
     */
    AccumulationChart.prototype.getSeriesElement = function () {
        return this.svgObject.getElementsByTagName('g')[0];
    };
    /**
     * To refresh the all visible series points
     * @private
     */
    AccumulationChart.prototype.refreshSeries = function () {
        for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            this.refreshPoints(series.points);
        }
    };
    /**
     * To refresh points label region and visible
     * @private
     */
    AccumulationChart.prototype.refreshPoints = function (points) {
        for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
            var point = points_1[_i];
            point.labelPosition = null;
            point.labelRegion = null;
            point.labelVisible = true;
        }
    };
    /**
     * To get Module name
     *  @private
     */
    AccumulationChart.prototype.getModuleName = function () {
        return 'accumulationchart';
    };
    /**
     * To destroy the accumulationcharts
     * @private
     */
    AccumulationChart.prototype.destroy = function () {
        this.unWireEvents();
        _super.prototype.destroy.call(this);
        this.element.classList.remove('e-accumulationchart');
    };
    /**
     * To provide the array of modules needed for control rendering
     * @return {ModuleDeclaration[]}
     * @private
     */
    AccumulationChart.prototype.requiredModules = function () {
        var modules = [];
        var enableAnnotation = false;
        modules.push({
            member: this.type + 'Series',
            args: [this]
        });
        if (this.legendSettings.visible) {
            modules.push({
                member: 'AccumulationLegend',
                args: [this]
            });
        }
        if (this.findDatalabelVisibility()) {
            modules.push({
                member: 'AccumulationDataLabel',
                args: [this]
            });
        }
        if (this.tooltip.enable) {
            modules.push({
                member: 'AccumulationTooltip',
                args: [this]
            });
        }
        if (this.selectionMode !== 'None') {
            modules.push({
                member: 'AccumulationSelection',
                args: [this]
            });
        }
        if (this.enableExport) {
            modules.push({
                member: 'Export',
                args: [this]
            });
        }
        enableAnnotation = this.annotations.some(function (value) {
            return (value.content !== null);
        });
        if (enableAnnotation) {
            modules.push({
                member: 'Annotation',
                args: [this]
            });
        }
        return modules;
    };
    /**
     * To find datalabel visibility in series
     */
    AccumulationChart.prototype.findDatalabelVisibility = function () {
        for (var _i = 0, _a = this.series; _i < _a.length; _i++) {
            var series = _a[_i];
            if (series.dataLabel.visible) {
                return true;
            }
        }
        return false;
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @private
     */
    AccumulationChart.prototype.getPersistData = function () {
        return '';
    };
    /**
     * Called internally if any of the property value changed.
     * @private
     */
    AccumulationChart.prototype.onPropertyChanged = function (newProp, oldProp) {
        var update = {
            refreshElements: false, refreshBounds: false
        };
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'theme':
                    this.animateSeries = true;
                    break;
                case 'title':
                case 'subTitle':
                case 'height':
                case 'width':
                case 'margin':
                    update.refreshBounds = true;
                    break;
                case 'titleStyle':
                    if (newProp.titleStyle && (newProp.titleStyle.size || newProp.titleStyle.textOverflow)) {
                        update.refreshBounds = true;
                    }
                    else {
                        update.refreshElements = true;
                    }
                    break;
                case 'subTitleStyle':
                    if (newProp.subTitleStyle && (newProp.subTitleStyle.size || newProp.subTitleStyle.textOverflow)) {
                        update.refreshBounds = true;
                    }
                    else {
                        update.refreshElements = true;
                    }
                    break;
                case 'legendSettings':
                    update.refreshBounds = true;
                    update.refreshElements = true;
                    break;
                case 'dataSource':
                    this.processData(false);
                    update.refreshBounds = true;
                    break;
                case 'series':
                    if (!this.animateselected) {
                        var len = this.series.length;
                        var seriesRefresh = false;
                        for (var i = 0; i < len; i++) {
                            if (newProp.series[i] && (newProp.series[i].dataSource || newProp.series[i].yName || newProp.series[i].xName)) {
                                seriesRefresh = true;
                            }
                            if (newProp.series[i] && newProp.series[i].explodeIndex !== oldProp.series[i].explodeIndex) {
                                this.accBaseModule.explodePoints(newProp.series[i].explodeIndex, this);
                                this.accBaseModule.deExplodeAll(newProp.series[i].explodeIndex, this.enableAnimation ? 300 : 0);
                            }
                        }
                        if (seriesRefresh) {
                            this.processData(false);
                            update.refreshBounds = true;
                        }
                    }
                    this.animateselected = false;
                    this.redraw = false;
                    break;
                case 'locale':
                case 'currencyCode':
                    _super.prototype.refresh.call(this);
                    break;
                case 'background':
                case 'border':
                case 'annotations':
                case 'enableSmartLabels':
                    update.refreshElements = true;
                    break;
                case 'isMultiSelect':
                case 'selectedDataIndexes':
                case 'selectionMode':
                    if (this.accumulationSelectionModule) {
                        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.accumulationSelectionModule.selectedDataIndexes)) {
                            this.accumulationSelectionModule.invokeSelection(this);
                        }
                        else {
                            this.accumulationSelectionModule.redrawSelection(this, oldProp.selectionMode);
                        }
                    }
                    break;
            }
        }
        if (!update.refreshBounds && update.refreshElements) {
            this.createPieSvg();
            this.renderElements();
        }
        else if (update.refreshBounds) {
            this.refreshSeries();
            this.createPieSvg();
            this.calculateBounds();
            this.renderElements();
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationChart.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationChart.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationChart.prototype, "title", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_acc_base__WEBPACK_IMPORTED_MODULE_2__["PieCenter"])
    ], AccumulationChart.prototype, "center", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AccumulationChart.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_3__["Theme"].chartTitleFont, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Font"])
    ], AccumulationChart.prototype, "titleStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationChart.prototype, "subTitle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_3__["Theme"].chartSubTitleFont, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Font"])
    ], AccumulationChart.prototype, "subTitleStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_legend_legend__WEBPACK_IMPORTED_MODULE_5__["LegendSettings"])
    ], AccumulationChart.prototype, "legendSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["TooltipSettings"])
    ], AccumulationChart.prototype, "tooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], AccumulationChart.prototype, "selectionMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], AccumulationChart.prototype, "isMultiSelect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], AccumulationChart.prototype, "enableAnimation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Indexes"])
    ], AccumulationChart.prototype, "selectedDataIndexes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Margin"])
    ], AccumulationChart.prototype, "margin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], AccumulationChart.prototype, "enableSmartLabels", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#DDDDDD', width: 0 }, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Border"])
    ], AccumulationChart.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationChart.prototype, "background", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _model_acc_base__WEBPACK_IMPORTED_MODULE_2__["AccumulationSeries"])
    ], AccumulationChart.prototype, "series", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _model_acc_base__WEBPACK_IMPORTED_MODULE_2__["AccumulationAnnotationSettings"])
    ], AccumulationChart.prototype, "annotations", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Material')
    ], AccumulationChart.prototype, "theme", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], AccumulationChart.prototype, "useGroupingSeparator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], AccumulationChart.prototype, "enableExport", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "loaded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "load", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "seriesRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "legendRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "textRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "tooltipRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "pointRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "annotationRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "beforePrint", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "chartMouseMove", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "chartMouseClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "pointClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "pointMove", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "animationComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "chartMouseDown", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "chartMouseLeave", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "chartMouseUp", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AccumulationChart.prototype, "resized", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('USD')
    ], AccumulationChart.prototype, "currencyCode", void 0);
    AccumulationChart = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], AccumulationChart);
    return AccumulationChart;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/annotation/annotation.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/annotation/annotation.js ***!
  \*********************************************************************************************/
/*! exports provided: AccumulationAnnotation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationAnnotation", function() { return AccumulationAnnotation; });
/* harmony import */ var _common_annotation_annotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/annotation/annotation */ "./node_modules/@syncfusion/ej2-charts/src/common/annotation/annotation.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/**
 * AccumulationChart annotation properties
 */
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `AccumulationAnnotation` module handles the annotation for accumulation chart.
 */
var AccumulationAnnotation = /** @class */ (function (_super) {
    __extends(AccumulationAnnotation, _super);
    /**
     * Constructor for accumulation chart annotation.
     * @private.
     */
    function AccumulationAnnotation(control) {
        var _this = _super.call(this, control) || this;
        _this.pie = control;
        return _this;
    }
    /**
     * Method to render the annotation for accumulation chart
     * @param element
     */
    AccumulationAnnotation.prototype.renderAnnotations = function (element) {
        var _this = this;
        this.annotations = this.pie.annotations;
        var redraw = this.pie.redraw;
        this.parentElement = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["redrawElement"])(redraw, this.pie.element.id + '_Annotation_Collections') ||
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["createElement"])('div', {
                id: this.pie.element.id + '_Annotation_Collections'
            }));
        this.annotations.map(function (annotation, index) {
            _this.processAnnotation(annotation, index, _this.parentElement);
        });
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendElement"])(this.parentElement, element, redraw);
    };
    /**
     * Get module name.
     */
    AccumulationAnnotation.prototype.getModuleName = function () {
        // Returns te module name
        return 'Annotation';
    };
    /**
     * To destroy the annotation.
     * @return {void}
     * @private
     */
    AccumulationAnnotation.prototype.destroy = function (control) {
        // Destroy method performed here
    };
    return AccumulationAnnotation;
}(_common_annotation_annotation__WEBPACK_IMPORTED_MODULE_0__["AnnotationBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/index.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/index.js ***!
  \*****************************************************************************/
/*! exports provided: AccumulationChart, AccumulationAnnotationSettings, AccumulationDataLabelSettings, PieCenter, AccPoints, AccumulationSeries, getSeriesFromIndex, pointByIndex, PieSeries, FunnelSeries, PyramidSeries, AccumulationLegend, AccumulationDataLabel, AccumulationTooltip, AccumulationSelection, AccumulationAnnotation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _accumulation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accumulation */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/accumulation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationChart", function() { return _accumulation__WEBPACK_IMPORTED_MODULE_0__["AccumulationChart"]; });

/* harmony import */ var _model_acc_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./model/acc-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/model/acc-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationAnnotationSettings", function() { return _model_acc_base__WEBPACK_IMPORTED_MODULE_1__["AccumulationAnnotationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationDataLabelSettings", function() { return _model_acc_base__WEBPACK_IMPORTED_MODULE_1__["AccumulationDataLabelSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PieCenter", function() { return _model_acc_base__WEBPACK_IMPORTED_MODULE_1__["PieCenter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccPoints", function() { return _model_acc_base__WEBPACK_IMPORTED_MODULE_1__["AccPoints"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationSeries", function() { return _model_acc_base__WEBPACK_IMPORTED_MODULE_1__["AccumulationSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getSeriesFromIndex", function() { return _model_acc_base__WEBPACK_IMPORTED_MODULE_1__["getSeriesFromIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointByIndex", function() { return _model_acc_base__WEBPACK_IMPORTED_MODULE_1__["pointByIndex"]; });

/* harmony import */ var _renderer_pie_series__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./renderer/pie-series */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pie-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PieSeries", function() { return _renderer_pie_series__WEBPACK_IMPORTED_MODULE_2__["PieSeries"]; });

/* harmony import */ var _renderer_funnel_series__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./renderer/funnel-series */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/funnel-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunnelSeries", function() { return _renderer_funnel_series__WEBPACK_IMPORTED_MODULE_3__["FunnelSeries"]; });

/* harmony import */ var _renderer_pyramid_series__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./renderer/pyramid-series */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pyramid-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PyramidSeries", function() { return _renderer_pyramid_series__WEBPACK_IMPORTED_MODULE_4__["PyramidSeries"]; });

/* harmony import */ var _renderer_legend__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./renderer/legend */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/legend.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationLegend", function() { return _renderer_legend__WEBPACK_IMPORTED_MODULE_5__["AccumulationLegend"]; });

/* harmony import */ var _renderer_dataLabel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./renderer/dataLabel */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/dataLabel.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationDataLabel", function() { return _renderer_dataLabel__WEBPACK_IMPORTED_MODULE_6__["AccumulationDataLabel"]; });

/* harmony import */ var _user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./user-interaction/tooltip */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/user-interaction/tooltip.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationTooltip", function() { return _user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_7__["AccumulationTooltip"]; });

/* harmony import */ var _user_interaction_selection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./user-interaction/selection */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/user-interaction/selection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationSelection", function() { return _user_interaction_selection__WEBPACK_IMPORTED_MODULE_8__["AccumulationSelection"]; });

/* harmony import */ var _annotation_annotation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./annotation/annotation */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/annotation/annotation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationAnnotation", function() { return _annotation_annotation__WEBPACK_IMPORTED_MODULE_9__["AccumulationAnnotation"]; });

/**
 * Pie Component items exported
 */












/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/model/acc-base.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/model/acc-base.js ***!
  \**************************************************************************************/
/*! exports provided: AccumulationAnnotationSettings, AccumulationDataLabelSettings, PieCenter, AccPoints, AccumulationSeries, getSeriesFromIndex, pointByIndex */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationAnnotationSettings", function() { return AccumulationAnnotationSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationDataLabelSettings", function() { return AccumulationDataLabelSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PieCenter", function() { return PieCenter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccPoints", function() { return AccPoints; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationSeries", function() { return AccumulationSeries; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSeriesFromIndex", function() { return getSeriesFromIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pointByIndex", function() { return pointByIndex; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _common_model_theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/**
 * AccumulationChart base file
 */









/**
 * Annotation for accumulation series
 */
var AccumulationAnnotationSettings = /** @class */ (function (_super) {
    __extends(AccumulationAnnotationSettings, _super);
    function AccumulationAnnotationSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationAnnotationSettings.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], AccumulationAnnotationSettings.prototype, "x", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], AccumulationAnnotationSettings.prototype, "y", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Pixel')
    ], AccumulationAnnotationSettings.prototype, "coordinateUnits", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Chart')
    ], AccumulationAnnotationSettings.prototype, "region", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Middle')
    ], AccumulationAnnotationSettings.prototype, "verticalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], AccumulationAnnotationSettings.prototype, "horizontalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationAnnotationSettings.prototype, "description", void 0);
    return AccumulationAnnotationSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the dataLabel in accumulation chart.
 */
var AccumulationDataLabelSettings = /** @class */ (function (_super) {
    __extends(AccumulationDataLabelSettings, _super);
    function AccumulationDataLabelSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], AccumulationDataLabelSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationDataLabelSettings.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('transparent')
    ], AccumulationDataLabelSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Inside')
    ], AccumulationDataLabelSettings.prototype, "position", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], AccumulationDataLabelSettings.prototype, "rx", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], AccumulationDataLabelSettings.prototype, "ry", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ width: null, color: null }, _common_model_base__WEBPACK_IMPORTED_MODULE_2__["Border"])
    ], AccumulationDataLabelSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ size: '11px', color: '', fontStyle: 'Normal', fontWeight: 'Normal', fontFamily: 'Segoe UI' }, _common_model_base__WEBPACK_IMPORTED_MODULE_2__["Font"])
    ], AccumulationDataLabelSettings.prototype, "font", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_2__["Connector"])
    ], AccumulationDataLabelSettings.prototype, "connectorStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationDataLabelSettings.prototype, "template", void 0);
    return AccumulationDataLabelSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Center value of the Pie series.
 */
var PieCenter = /** @class */ (function (_super) {
    __extends(PieCenter, _super);
    function PieCenter() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('50%')
    ], PieCenter.prototype, "x", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('50%')
    ], PieCenter.prototype, "y", void 0);
    return PieCenter;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Points model for the series.
 * @public
 */
var AccPoints = /** @class */ (function () {
    function AccPoints() {
        /** accumulation point visibility */
        this.visible = true;
        /** accumulation point symbol location */
        this.symbolLocation = null;
        /** @private */
        this.region = null;
        /** @private */
        this.labelRegion = null;
        /** @private */
        this.labelVisible = true;
        this.regions = null;
        /** @private */
        this.isExplode = false;
        /** @private */
        this.isClubbed = false;
        /** @private */
        this.isSliced = false;
    }
    return AccPoints;
}());

/**
 *  Configures the series in accumulation chart.
 */
var AccumulationSeries = /** @class */ (function (_super) {
    __extends(AccumulationSeries, _super);
    function AccumulationSeries() {
        /**
         * Specifies the dataSource for the series. It can be an array of JSON objects or an instance of DataManager.
         * ```html
         * <div id='Pie'></div>
         * ```
         * ```typescript
         * let dataManager: DataManager = new DataManager({
         *         url: 'http://mvc.syncfusion.com/Services/Northwnd.svc/Tasks/'
         * });
         * let query: Query = new Query().take(50).where('Estimate', 'greaterThan', 0, false);
         * let pie: AccumulationChart = new AccumulationChart({
         * ...
         *     series: [{
         *        dataSource: dataManager,
         *        xName: 'Id',
         *        yName: 'Estimate',
         *        query: query
         *    }],
         * ...
         * });
         * pie.appendTo('#Pie');
         * ```
         * @default ''
         */
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /** @private */
        _this.points = [];
        /** @private */
        _this.clubbedPoints = [];
        /** @private */
        _this.sumOfPoints = 0;
        /** @private */
        _this.isRectSeries = true;
        /** @private */
        _this.clipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Rect"](0, 0, 0, 0);
        /** @private */
        _this.category = 'Series';
        return _this;
    }
    /** @private To refresh the Datamanager for series */
    AccumulationSeries.prototype.refreshDataManager = function (accumulation, render) {
        var _this = this;
        var dateSource = this.dataSource || accumulation.dataSource;
        if (!(dateSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.query)) {
            this.dataManagerSuccess({ result: dateSource, count: dateSource.length }, accumulation, render);
            return;
        }
        var dataManager = this.dataModule.getData(this.dataModule.generateQuery().requiresCount());
        dataManager.then(function (e) { return _this.dataManagerSuccess(e, accumulation, render); });
    };
    /**
     * To get points on dataManager is success
     * @private
     */
    AccumulationSeries.prototype.dataManagerSuccess = function (e, accumulation, render) {
        var argsData = {
            name: _common_model_constants__WEBPACK_IMPORTED_MODULE_5__["seriesRender"], series: this, data: e.result,
        };
        accumulation.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_5__["seriesRender"], argsData);
        this.resultData = e.result !== '' ? e.result : [];
        this.getPoints(this.resultData, accumulation);
        // tslint:disable
        if ((++accumulation.seriesCounts === accumulation.visibleSeries.length && render) || (window['Blazor'] && !render && accumulation.seriesCounts === 1)) {
            accumulation.refreshChart();
        }
    };
    /** @private To find points from result data */
    AccumulationSeries.prototype.getPoints = function (result, accumulation) {
        var length = Object.keys(result).length;
        this.sumOfPoints = 0;
        if (length === 0) {
            return null;
        }
        this.findSumOfPoints(result);
        this.points = [];
        this.clubbedPoints = [];
        this.sumOfClub = 0;
        var point;
        var colors = this.palettes.length ? this.palettes : Object(_common_model_theme__WEBPACK_IMPORTED_MODULE_6__["getSeriesColor"])(accumulation.theme);
        var clubValue = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_4__["stringToNumber"])(this.groupTo, this.sumOfPoints);
        for (var i = 0; i < length; i++) {
            point = this.setPoints(result, i, colors);
            var currentY = point.y;
            if (!this.isClub(point, clubValue, i)) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.y)) {
                    point.visible = false;
                }
                this.pushPoints(point, colors);
            }
            else {
                point.index = this.clubbedPoints.length;
                point.isExplode = true;
                this.clubbedPoints.push(point);
                point.isSliced = true;
            }
        }
        this.lastGroupTo = this.groupTo;
        if (this.sumOfClub > 0) {
            var clubPoint_1 = this.generateClubPoint();
            this.pushPoints(clubPoint_1, colors);
            var pointsLength_1 = this.points.length - 1;
            this.clubbedPoints.map(function (point) {
                point.index += pointsLength_1;
                point.color = clubPoint_1.color;
            });
        }
        if (this.clubbedPoints.length && this.explode && this.type === 'Pie'
            && (this.explodeAll || this.points[this.points.length - 1].index === this.explodeIndex)) {
            this.points.splice(this.points.length - 1, 1);
            this.points = this.points.concat(this.clubbedPoints);
        }
    };
    AccumulationSeries.prototype.generateClubPoint = function () {
        var clubPoint = new AccPoints();
        clubPoint.isClubbed = true;
        clubPoint.x = 'Others';
        clubPoint.y = this.sumOfClub;
        clubPoint.text = clubPoint.originalText = clubPoint.x + ': ' + this.sumOfClub;
        clubPoint.sliceRadius = '80%';
        return clubPoint;
    };
    /**
     * Method to set point index and color
     */
    AccumulationSeries.prototype.pushPoints = function (point, colors) {
        point.index = this.points.length;
        point.isExplode = this.explodeAll || (point.index === this.explodeIndex);
        point.color = point.color || colors[point.index % colors.length];
        this.points.push(point);
    };
    /**
     * Method to find club point
     */
    AccumulationSeries.prototype.isClub = function (point, clubValue, index) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(clubValue)) {
            if (this.groupMode === 'Value' && Math.abs(point.y) <= clubValue) {
                this.sumOfClub += Math.abs(point.y);
                return true;
            }
            else if (this.groupMode === 'Point' && index >= clubValue) {
                this.sumOfClub += Math.abs(point.y);
                return true;
            }
        }
        return false;
    };
    /**
     * Method to find sum of points in the series
     */
    AccumulationSeries.prototype.findSumOfPoints = function (result) {
        var length = Object.keys(result).length;
        for (var i = 0; i < length; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(result[i][this.yName])) {
                this.sumOfPoints += Math.abs(result[i][this.yName]);
            }
        }
    };
    /**
     * Method to set points x, y and text from data source
     */
    AccumulationSeries.prototype.setPoints = function (data, i, colors) {
        var point = new AccPoints();
        point.x = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.xName, data[i]);
        point.y = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.yName, data[i]);
        point.percentage = (+(point.y / this.sumOfPoints * 100).toFixed(2));
        point.color = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.pointColorMapping, data[i]);
        point.text = point.originalText = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.dataLabel.name || '', data[i]);
        point.tooltip = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.tooltipMappingName || '', data[i]);
        point.sliceRadius = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.radius, data[i]);
        point.sliceRadius = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.sliceRadius) ? '80%' : point.sliceRadius;
        this.setAccEmptyPoint(point, i, data, colors);
        return point;
    };
    /**
     * Method render the series elements for accumulation chart
     * @private
     */
    AccumulationSeries.prototype.renderSeries = function (accumulation, redraw) {
        var seriesGroup = redraw ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_4__["getElement"])(accumulation.element.id + '_Series_' + this.index) :
            accumulation.renderer.createGroup({ id: accumulation.element.id + '_Series_' + this.index });
        this.renderPoints(accumulation, seriesGroup, redraw);
        var datalabelGroup;
        if (accumulation.accumulationDataLabelModule && this.dataLabel.visible) {
            datalabelGroup = accumulation.renderer.createGroup({ id: accumulation.element.id + '_datalabel_Series_' + this.index });
            datalabelGroup.style.visibility =
                (this.animation.enable && accumulation.animateSeries && this.type === 'Pie') ? 'hidden' : 'visible';
            this.renderDataLabel(accumulation, datalabelGroup, redraw);
        }
        if (this.type === 'Pie') {
            this.findMaxBounds(this.labelBound, this.accumulationBound);
            accumulation.pieSeriesModule.animateSeries(accumulation, this.animation, this, seriesGroup);
        }
        if (accumulation.accumulationLegendModule) {
            this.labelBound.x -= accumulation.explodeDistance;
            this.labelBound.y -= accumulation.explodeDistance;
            this.labelBound.height += (accumulation.explodeDistance - this.labelBound.y);
            this.labelBound.width += (accumulation.explodeDistance - this.labelBound.x);
        }
    };
    /**
     * Method render the points elements for accumulation chart series.
     */
    AccumulationSeries.prototype.renderPoints = function (accumulation, seriesGroup, redraw) {
        var pointId = accumulation.element.id + '_Series_' + this.index + '_Point_';
        var option;
        for (var _i = 0, _a = this.points; _i < _a.length; _i++) {
            var point = _a[_i];
            var argsData = {
                cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_5__["pointRender"], series: this, point: point, fill: point.color,
                border: this.isEmpty(point) ? { width: this.emptyPointSettings.border.width, color: this.emptyPointSettings.border.color } :
                    { width: this.border.width, color: this.border.color }
            };
            accumulation.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_5__["pointRender"], argsData);
            point.color = argsData.fill;
            option = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](pointId + point.index, point.color, argsData.border.width || 1, argsData.border.color || point.color, this.opacity, '', '');
            accumulation[(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_4__["firstToLowerCase"])(this.type) + 'SeriesModule')].
                renderPoint(point, this, accumulation, option, seriesGroup, redraw);
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_4__["appendChildElement"])(false, accumulation.getSeriesElement(), seriesGroup, redraw);
    };
    /**
     * Method render the datalabel elements for accumulation chart.
     */
    AccumulationSeries.prototype.renderDataLabel = function (accumulation, datalabelGroup, redraw) {
        accumulation.accumulationDataLabelModule.findAreaRect();
        var element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            id: accumulation.element.id + '_Series_0' + '_DataLabelCollections'
        });
        for (var _i = 0, _a = this.points; _i < _a.length; _i++) {
            var point = _a[_i];
            if (point.visible) {
                accumulation.accumulationDataLabelModule.renderDataLabel(point, this.dataLabel, datalabelGroup, this.points, this.index, element, redraw);
            }
        }
        if (this.dataLabel.template !== null && element.childElementCount) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_4__["appendChildElement"])(false, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_4__["getElement"])(accumulation.element.id + '_Secondary_Element'), element, redraw);
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_4__["appendChildElement"])(false, accumulation.getSeriesElement(), datalabelGroup, redraw);
    };
    /**
     * To find maximum bounds for smart legend placing
     * @private
     */
    AccumulationSeries.prototype.findMaxBounds = function (totalbound, bound) {
        totalbound.x = bound.x < totalbound.x ? bound.x : totalbound.x;
        totalbound.y = bound.y < totalbound.y ? bound.y : totalbound.y;
        totalbound.height = (bound.y + bound.height) > totalbound.height ? (bound.y + bound.height) : totalbound.height;
        totalbound.width = (bound.x + bound.width) > totalbound.width ? (bound.x + bound.width) : totalbound.width;
    };
    /**
     * To set empty point value for null points
     * @private
     */
    AccumulationSeries.prototype.setAccEmptyPoint = function (point, i, data, colors) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.y)) {
            return null;
        }
        point.color = this.emptyPointSettings.fill || point.color;
        switch (this.emptyPointSettings.mode) {
            case 'Zero':
                point.y = 0;
                point.visible = true;
                break;
            case 'Average':
                var previous = data[i - 1] ? (data[i - 1][this.yName] || 0) : 0;
                var next = data[i + 1] ? (data[i + 1][this.yName] || 0) : 0;
                point.y = (Math.abs(previous) + Math.abs(next)) / 2;
                this.sumOfPoints += point.y;
                point.visible = true;
                break;
            default:
                point.visible = false;
                break;
        }
    };
    /**
     * To find point is empty
     */
    AccumulationSeries.prototype.isEmpty = function (point) {
        return point.color === this.emptyPointSettings.fill;
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AccumulationSeries.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], AccumulationSeries.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AccumulationSeries.prototype, "xName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AccumulationSeries.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AccumulationSeries.prototype, "tooltipMappingName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AccumulationSeries.prototype, "yName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], AccumulationSeries.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: null, width: 0 }, _common_model_base__WEBPACK_IMPORTED_MODULE_2__["Border"])
    ], AccumulationSeries.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, _common_model_base__WEBPACK_IMPORTED_MODULE_2__["Animation"])
    ], AccumulationSeries.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SeriesType')
    ], AccumulationSeries.prototype, "legendShape", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AccumulationSeries.prototype, "pointColorMapping", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationSeries.prototype, "selectionStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationSeries.prototype, "groupTo", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Value')
    ], AccumulationSeries.prototype, "groupMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, AccumulationDataLabelSettings)
    ], AccumulationSeries.prototype, "dataLabel", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], AccumulationSeries.prototype, "palettes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], AccumulationSeries.prototype, "startAngle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationSeries.prototype, "endAngle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('80%')
    ], AccumulationSeries.prototype, "radius", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], AccumulationSeries.prototype, "innerRadius", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Pie')
    ], AccumulationSeries.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], AccumulationSeries.prototype, "enableTooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], AccumulationSeries.prototype, "explode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('30%')
    ], AccumulationSeries.prototype, "explodeOffset", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], AccumulationSeries.prototype, "explodeAll", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccumulationSeries.prototype, "explodeIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ mode: 'Drop' }, _common_model_base__WEBPACK_IMPORTED_MODULE_2__["EmptyPointSettings"])
    ], AccumulationSeries.prototype, "emptyPointSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], AccumulationSeries.prototype, "gapRatio", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('80%')
    ], AccumulationSeries.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('80%')
    ], AccumulationSeries.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('20%')
    ], AccumulationSeries.prototype, "neckWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('20%')
    ], AccumulationSeries.prototype, "neckHeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Linear')
    ], AccumulationSeries.prototype, "pyramidMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], AccumulationSeries.prototype, "opacity", void 0);
    return AccumulationSeries;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * method to get series from index
 * @private
 */
function getSeriesFromIndex(index, visibleSeries) {
    for (var _i = 0, visibleSeries_1 = visibleSeries; _i < visibleSeries_1.length; _i++) {
        var series = visibleSeries_1[_i];
        if (index === series.index) {
            return series;
        }
    }
    return visibleSeries[0];
}
/**
 * method to get point from index
 * @private
 */
function pointByIndex(index, points) {
    for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
        var point = points_1[_i];
        if (point.index === index) {
            return point;
        }
    }
    return null;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/accumulation-base.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/accumulation-base.js ***!
  \**************************************************************************************************/
/*! exports provided: AccumulationBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationBase", function() { return AccumulationBase; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _model_acc_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/acc-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/model/acc-base.js");
/**
 * Defines the common functionalities of accumulation series
 */



/**
 * Accumulation Base used to do some base calculation for accumulation chart.
 */
var AccumulationBase = /** @class */ (function () {
    /** @private */
    function AccumulationBase(accumulation) {
        this.accumulation = accumulation;
    }
    Object.defineProperty(AccumulationBase.prototype, "center", {
        /**
         * Gets the center of the pie
         * @private
         */
        get: function () {
            return this.pieCenter || (this.accumulation.visibleSeries[0].type === 'Pie' ?
                this.accumulation.pieSeriesModule.center : null);
        },
        /**
         * Sets the center of the pie
         * @private
         */
        set: function (value) {
            this.pieCenter = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AccumulationBase.prototype, "radius", {
        /**
         * Gets the radius of the pie
         * @private
         */
        get: function () {
            return this.pieRadius !== undefined ? this.pieRadius :
                this.accumulation.pieSeriesModule.radius;
        },
        /**
         * Sets the radius of the pie
         * @private
         */
        set: function (value) {
            this.pieRadius = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AccumulationBase.prototype, "labelRadius", {
        /**
         * Gets the label radius of the pie
         * @private
         */
        get: function () {
            return this.pieLabelRadius !== undefined ? this.pieLabelRadius :
                this.accumulation.pieSeriesModule.labelRadius;
        },
        /**
         * Sets the label radius of the pie
         * @private
         */
        set: function (value) {
            this.pieLabelRadius = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Checks whether the series is circular or not
     * @private
     */
    AccumulationBase.prototype.isCircular = function () {
        return this.accumulation.type === 'Pie';
    };
    /**
     * To check various radius pie
     * @private
     */
    AccumulationBase.prototype.isVariousRadius = function () {
        return this.accumulation.pieSeriesModule.isRadiusMapped;
    };
    /**
     * To process the explode on accumulation chart loading
     * @private
     */
    AccumulationBase.prototype.processExplode = function (event) {
        if (event.target.id.indexOf('_Series_') > -1 || event.target.id.indexOf('_datalabel_') > -1) {
            var pointIndex = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["indexFinder"])(event.target.id).point;
            if (isNaN(pointIndex) || (event.target.id.indexOf('_datalabel_') > -1 &&
                this.accumulation.visibleSeries[0].points[pointIndex].labelPosition === 'Outside')) {
                return null;
            }
            this.explodePoints(pointIndex, this.accumulation);
            this.deExplodeAll(pointIndex, this.accumulation.enableAnimation ? 300 : 0);
        }
    };
    /**
     * To invoke the explode on accumulation chart loading
     * @private
     */
    AccumulationBase.prototype.invokeExplode = function () {
        var series = this.accumulation.visibleSeries[0];
        var duration = this.accumulation.enableAnimation ? 300 : 0;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            if (point.isExplode) {
                this.pointExplode(point.index, point, duration);
            }
        }
        if (this.accumulation.accumulationSelectionModule && this.accumulation.selectionMode !== 'None' &&
            this.accumulation.accumulationSelectionModule.selectedDataIndexes.length) {
            for (var _b = 0, _c = this.accumulation.accumulationSelectionModule.selectedDataIndexes; _b < _c.length; _b++) {
                var index = _c[_b];
                this.explodePoints(index.point, this.accumulation, true);
                this.deExplodeAll(index.point, duration);
            }
        }
    };
    /**
     * To deExplode all points in the series
     * @private
     */
    AccumulationBase.prototype.deExplodeAll = function (index, animationDuration) {
        var pointId = this.accumulation.element.id + '_Series_0_Point_';
        var points = this.accumulation.visibleSeries[0].points;
        for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
            var currentPoint = points_1[_i];
            if ((index !== currentPoint.index && !currentPoint.isSliced) || currentPoint.isClubbed) {
                currentPoint.isExplode = false;
                this.deExplodeSlice(currentPoint.index, pointId, animationDuration);
            }
        }
    };
    /**
     * To explode point by index
     * @private
     */
    AccumulationBase.prototype.explodePoints = function (index, chart, explode) {
        if (explode === void 0) { explode = false; }
        var series = chart.visibleSeries[0];
        var points = series.points;
        var point = Object(_model_acc_base__WEBPACK_IMPORTED_MODULE_2__["pointByIndex"])(index, points);
        var explodePoints = true;
        var duration = this.accumulation.enableAnimation ? 300 : 0;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point)) {
            return null;
        }
        var clubPointsExploded = !explode &&
            (point.isSliced || (series.clubbedPoints.length &&
                points[points.length - 1].index === series.clubbedPoints[series.clubbedPoints.length - 1].index));
        if (series.type === 'Pie' && (clubPointsExploded || point.isClubbed)) {
            explodePoints = this.clubPointExplode(index, point, series, points, chart, duration, explode, clubPointsExploded);
        }
        if (explodePoints) {
            this.pointExplode(index, point, duration, explode);
        }
    };
    AccumulationBase.prototype.getSum = function (points) {
        var total = 0;
        points.map(function (point) {
            total += point.visible ? point.y : 0;
        });
        return total;
    };
    ;
    AccumulationBase.prototype.clubPointExplode = function (index, point, series, points, chart, duration, explode, clubPointsExploded) {
        if (explode === void 0) { explode = false; }
        if (clubPointsExploded === void 0) { clubPointsExploded = false; }
        if (point.isClubbed) {
            chart.animateSeries = false;
            points.splice(points.length - 1, 1);
            series.clubbedPoints.map(function (point) {
                point.visible = true;
                point.isExplode = true;
            });
            chart.visibleSeries[0].points = points.concat(series.clubbedPoints);
            this.deExplodeAll(index, duration);
            series.sumOfPoints = this.getSum(chart.visibleSeries[0].points);
            chart.refreshChart();
            return false;
        }
        else if (clubPointsExploded || point.isSliced) {
            chart.animateSeries = false;
            points.splice(points.length - series.clubbedPoints.length, series.clubbedPoints.length);
            var clubPoint = series.generateClubPoint();
            clubPoint.index = points.length;
            clubPoint.color = series.clubbedPoints[0].color;
            points.push(clubPoint);
            series.sumOfPoints = this.getSum(points);
            this.deExplodeAll(index, duration);
            clubPoint.isExplode = false;
            chart.visibleSeries[0].points = points;
            chart.refreshChart();
            this.pointExplode(clubPoint.index, points[clubPoint.index], 0, true);
            clubPoint.isExplode = false;
            this.deExplodeSlice(clubPoint.index, chart.element.id + '_Series_0_Point_', duration);
            if (point.isSliced) {
                return false;
            }
        }
        return true;
    };
    /**
     * To Explode points
     * @param index
     * @param point
     * @param explode
     */
    AccumulationBase.prototype.pointExplode = function (index, point, duration, explode) {
        var translate;
        var pointId = this.accumulation.element.id + '_Series_0_Point_';
        var chart = this.accumulation;
        if (!this.isCircular()) {
            translate = {
                x: ((point.labelRegion && point.labelRegion.x < point.region.x) ? -chart.explodeDistance :
                    chart.explodeDistance), y: 0
            };
        }
        else {
            translate = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["degreeToLocation"])(point.midAngle, chart.explodeDistance, this.center);
        }
        if (this.isExplode(pointId + index) || explode) {
            point.isExplode = true;
            this.explodeSlice(index, translate, pointId, this.center || { x: 0, y: 0 }, duration);
        }
        else {
            point.isExplode = false;
            this.deExplodeSlice(index, pointId, duration);
        }
    };
    /**
     * To check point is exploded by id
     */
    AccumulationBase.prototype.isExplode = function (id) {
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(id);
        var transform = element ? element.getAttribute('transform') : null;
        return (element && (transform === 'translate(0, 0)' || transform === null || transform === 'translate(0)'));
    };
    /**
     * To deExplode the point by index
     */
    AccumulationBase.prototype.deExplodeSlice = function (index, sliceId, animationDuration) {
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(sliceId + index);
        var transform = element ? element.getAttribute('transform') : null;
        if (this.accumulation.enableAnimation && element && transform &&
            transform !== 'translate(0, 0)' && transform !== 'translate(0)') {
            var result = /translate\((-?\d+\.?\d*),?\s*(-?\d+[.]?\d*)?\)/.exec(transform);
            this.performAnimation(index, sliceId, 0, 0, +result[1], +result[2] || 0, animationDuration, true);
        }
        else {
            this.performAnimation(index, sliceId, 0, 0, 0, 0, animationDuration, true);
        }
    };
    /**
     * To translate the point elements by index and position
     */
    AccumulationBase.prototype.setTranslate = function (index, sliceId, position) {
        this.setElementTransform(sliceId + index, position);
        if (this.accumulation.visibleSeries[0].dataLabel.visible) {
            sliceId = this.accumulation.element.id + '_datalabel_Series_0_';
            this.setElementTransform(sliceId + 'shape_' + index, position);
            this.setElementTransform(sliceId + 'text_' + index, position);
            this.setElementTransform(sliceId + 'connector_' + index, position);
        }
    };
    /**
     * To translate the point element by id and position
     */
    AccumulationBase.prototype.setElementTransform = function (id, position) {
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(id);
        if (element) {
            element.setAttribute('transform', position);
        }
    };
    /**
     * To translate the point elements by index position
     */
    AccumulationBase.prototype.explodeSlice = function (index, translate, sliceId, center, animationDuration) {
        this.performAnimation(index, sliceId, 0, 0, translate.x - center.x, translate.y - center.y, animationDuration);
    };
    /**
     * To Perform animation point explode
     * @param index
     * @param sliceId
     * @param start
     * @param endX
     * @param endY
     */
    AccumulationBase.prototype.performAnimation = function (index, sliceId, startX, startY, endX, endY, duration, isReverse) {
        var _this = this;
        if (duration <= 0) {
            this.setTranslate(index, sliceId, 'translate(' + (endX) + ', ' + (endY) + ')');
            return null;
        }
        var xValue;
        var yValue;
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div'), {
            duration: duration,
            progress: function (args) {
                xValue = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["linear"])(args.timeStamp, startX, endX, args.duration);
                yValue = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["linear"])(args.timeStamp, startY, endY, args.duration);
                _this.setTranslate(index, sliceId, 'translate(' + (isReverse ? endX - xValue : xValue) + ', ' + (isReverse ? endY - yValue : yValue) + ')');
            },
            end: function (model) {
                _this.setTranslate(index, sliceId, 'translate(' + (isReverse ? startX : endX) + ', ' + (isReverse ? startX : endY) + ')');
            }
        });
    };
    return AccumulationBase;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/dataLabel.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/dataLabel.js ***!
  \******************************************************************************************/
/*! exports provided: AccumulationDataLabel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationDataLabel", function() { return AccumulationDataLabel; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _model_acc_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/acc-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/model/acc-base.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _accumulation_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./accumulation-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/accumulation-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * AccumulationChart DataLabel module file
 */










/**
 * AccumulationDataLabel module used to render `dataLabel`.
 */
var AccumulationDataLabel = /** @class */ (function (_super) {
    __extends(AccumulationDataLabel, _super);
    function AccumulationDataLabel(accumulation) {
        var _this = _super.call(this, accumulation) || this;
        _this.id = accumulation.element.id + '_datalabel_Series_';
        if (accumulation.title) {
            var titleSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["measureText"])(accumulation.title, accumulation.titleStyle);
            _this.titleRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](accumulation.availableSize.width / 2 - titleSize.width / 2, accumulation.margin.top, titleSize.width, titleSize.height);
        }
        return _this;
    }
    /**
     * Method to get datalabel text location.
     * @private
     */
    AccumulationDataLabel.prototype.getDataLabelPosition = function (point, dataLabel, textSize, points, parent, id) {
        var radius = this.isCircular() ? (!this.isVariousRadius() ? this.accumulation.pieSeriesModule.labelRadius :
            this.accumulation.pieSeriesModule.getLabelRadius(this.accumulation.visibleSeries[0], point)) :
            this.getLabelDistance(point, dataLabel);
        //let radius: number = this.isCircular() ? this.labelRadius : this.getLabelDistance(point, dataLabel);
        this.getLabelRegion(point, dataLabel.position, textSize, radius, this.marginValue);
        point.labelAngle = point.midAngle;
        point.labelPosition = dataLabel.position;
        if (this.accumulation.enableSmartLabels) {
            this.getSmartLabel(point, dataLabel, textSize, points, parent, id);
        }
    };
    /**
     * Method to get datalabel bound.
     */
    AccumulationDataLabel.prototype.getLabelRegion = function (point, position, textSize, labelRadius, margin, endAngle) {
        if (endAngle === void 0) { endAngle = 0; }
        var labelAngle = endAngle || point.midAngle;
        var space = 10;
        var location = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["degreeToLocation"])(labelAngle, labelRadius, this.isCircular() ? this.center :
            this.getLabelLocation(point, position));
        location.y = (position === 'Inside') ? (location.y - textSize.height / 2) : location.y;
        location.x = (position === 'Inside') ? (location.x - textSize.width / 2) : location.x;
        point.labelRegion = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](location.x, location.y, textSize.width + (margin * 2), textSize.height + (margin * 2));
        if (position === 'Outside') {
            point.labelRegion.y -= point.labelRegion.height / 2;
            if (labelAngle >= 90 && labelAngle <= 270) {
                point.labelRegion.x -= (point.labelRegion.width + space);
            }
            else {
                point.labelRegion.x += space;
            }
        }
    };
    /**
     * Method to get datalabel smart position.
     */
    AccumulationDataLabel.prototype.getSmartLabel = function (point, dataLabel, textSize, points, parent, id) {
        var circular = this.isCircular();
        var labelRadius = circular ? this.radius : this.getLabelDistance(point, dataLabel);
        var connectorLength = circular ? (dataLabel.connectorStyle.length || '4%') :
            '0px';
        labelRadius += Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["stringToNumber"])(connectorLength, labelRadius);
        var previousPoint = this.findPreviousPoint(points, point.index, point.labelPosition);
        if (dataLabel.position === 'Inside') {
            if (previousPoint && previousPoint.labelRegion && (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isOverlap"])(point.labelRegion, previousPoint.labelRegion)
                || this.isOverlapping(point, points)) || !circular && !Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["containsRect"])(point.region, point.labelRegion)) {
                point.labelPosition = 'Outside';
                if (!circular) {
                    labelRadius = this.getLabelDistance(point, dataLabel);
                }
                this.getLabelRegion(point, point.labelPosition, textSize, labelRadius, this.marginValue);
                previousPoint = this.findPreviousPoint(points, point.index, point.labelPosition);
                if (previousPoint && (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isOverlap"])(point.labelRegion, previousPoint.labelRegion) ||
                    this.isConnectorLineOverlapping(point, previousPoint))) {
                    this.setOuterSmartLabel(previousPoint, point, dataLabel.border.width, labelRadius, textSize, this.marginValue);
                }
            }
        }
        else {
            if (previousPoint && previousPoint.labelRegion && (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isOverlap"])(point.labelRegion, previousPoint.labelRegion)
                || this.isOverlapping(point, points) || this.isConnectorLineOverlapping(point, previousPoint))) {
                this.setOuterSmartLabel(previousPoint, point, dataLabel.border.width, labelRadius, textSize, this.marginValue);
            }
        }
        if (this.isOverlapping(point, points) && (this.accumulation.type === 'Pyramid' || this.accumulation.type === 'Funnel')) {
            var position = 'OutsideLeft';
            var space = 10;
            var labelAngle = point.midAngle || 0;
            var labelRadius_1 = circular ? this.radius : this.getLabelDistance(point, dataLabel);
            var location_1 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["degreeToLocation"])(labelAngle, -labelRadius_1, this.isCircular() ? this.center :
                this.getLabelLocation(point, position));
            point.labelRegion = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](location_1.x, location_1.y, textSize.width + (this.marginValue * 2), textSize.height + (this.marginValue * 2));
            point.labelRegion.y -= point.labelRegion.height / 2;
            point.labelRegion.x = point.labelRegion.x - space - point.labelRegion.width;
            if (previousPoint && previousPoint.labelRegion && (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isOverlap"])(point.labelRegion, previousPoint.labelRegion)
                || this.isOverlapping(point, points) || this.isConnectorLineOverlapping(point, previousPoint))) {
                this.setOuterSmartLabel(previousPoint, point, dataLabel.border.width, labelRadius_1, textSize, this.marginValue);
            }
        }
        if (this.isOverlapping(point, points) ||
            (this.titleRect && point.labelRegion && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isOverlap"])(point.labelRegion, this.titleRect))) {
            this.setPointVisibileFalse(point);
        }
        if (this.accumulation.accumulationLegendModule && point.labelVisible && point.labelRegion) {
            var rect = this.accumulation.accumulationLegendModule.legendBounds;
            var padding = this.accumulation.legendSettings.border.width / 2;
            this.textTrimming(point, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](rect.x - padding, rect.y - padding, rect.width + (2 * padding), rect.height + (2 * padding)), dataLabel.font, this.accumulation.accumulationLegendModule.position);
        }
        if (point.labelVisible && point.labelRegion) {
            var position = this.isCircular() ? (point.labelRegion.x >= this.center.x) ? 'InsideRight' : 'InsideLeft' :
                (point.labelRegion.x >= point.region.x) ? 'InsideRight' : 'InsideLeft';
            this.textTrimming(point, this.areaRect, dataLabel.font, position);
        }
        if (point.labelVisible && point.labelRegion && ((point.labelRegion.y + point.labelRegion.height >
            this.areaRect.y + this.areaRect.height || point.labelRegion.y < this.areaRect.y) || (point.labelRegion.x < this.areaRect.x ||
            point.labelRegion.x + point.labelRegion.width > this.areaRect.x + this.areaRect.width))) {
            this.setPointVisibileFalse(point);
        }
    };
    /**
     * To find trimmed datalabel tooltip needed.
     * @return {void}
     * @private
     */
    AccumulationDataLabel.prototype.move = function (e, x, y, isTouch) {
        var _this = this;
        if (e.target.textContent.indexOf('...') > -1) {
            var targetId = e.target.id.split(this.id);
            if (targetId.length === 2) {
                var seriesIndex = parseInt(targetId[1].split('_text_')[0], 10);
                var pointIndex = parseInt(targetId[1].split('_text_')[1], 10);
                if (!isNaN(seriesIndex) && !isNaN(pointIndex)) {
                    if (isTouch) {
                        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["removeElement"])(this.accumulation.element.id + '_EJ2_Datalabel_Tooltip');
                    }
                    var point = Object(_model_acc_base__WEBPACK_IMPORTED_MODULE_3__["getSeriesFromIndex"])(seriesIndex, (this.accumulation).visibleSeries).points[pointIndex];
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["showTooltip"])(point.text || point.y.toString(), x, y, this.areaRect.width, this.accumulation.element.id + '_EJ2_Datalabel_Tooltip', Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(this.accumulation.element.id + '_Secondary_Element'));
                }
            }
        }
        else {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["removeElement"])(this.accumulation.element.id + '_EJ2_Datalabel_Tooltip');
        }
        if (isTouch) {
            clearTimeout(this.clearTooltip);
            this.clearTooltip = +setTimeout(function () { Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["removeElement"])(_this.accumulation.element.id + '_EJ2_Datalabel_Tooltip'); }, 1000);
        }
    };
    /**
     * To find previous valid label point
     */
    AccumulationDataLabel.prototype.findPreviousPoint = function (points, index, position) {
        var point = points[0];
        for (var i = index - 1; i >= 0; i--) {
            point = points[i];
            if (point.visible && point.labelVisible && point.labelRegion && point.labelPosition === position) {
                return point;
            }
        }
        return null;
    };
    /**
     * To find current point datalabel is overlapping with other points
     */
    AccumulationDataLabel.prototype.isOverlapping = function (currentPoint, points) {
        for (var i = currentPoint.index - 1; i >= 0; i--) {
            if (points[i].visible && points[i].labelVisible && points[i].labelRegion && currentPoint.labelRegion &&
                currentPoint.labelVisible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isOverlap"])(currentPoint.labelRegion, points[i].labelRegion)) {
                return true;
            }
        }
        return false;
    };
    /**
     * To get text trimmed while exceeds the accumulation chart area.
     */
    AccumulationDataLabel.prototype.textTrimming = function (point, rect, font, position) {
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isOverlap"])(point.labelRegion, rect)) {
            var size = point.labelRegion.width;
            if (position === 'Right') {
                size = rect.x - point.labelRegion.x;
            }
            else if (position === 'Left') {
                size = point.labelRegion.x - (rect.x + rect.width);
                if (size < 0) {
                    size += point.labelRegion.width;
                    point.labelRegion.x = rect.x + rect.width;
                }
            }
            else if (position === 'InsideRight') {
                size = (rect.x + rect.width) - point.labelRegion.x;
            }
            else if (position === 'InsideLeft') {
                size = (point.labelRegion.x + point.labelRegion.width) - rect.x;
                if (size < point.labelRegion.width) {
                    point.labelRegion.x = rect.x;
                }
            }
            else {
                this.setPointVisibileFalse(point);
            }
            if (point.labelVisible && point.labelRegion) {
                if (size < point.labelRegion.width) {
                    point.label = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textTrim"])(size - (this.marginValue * 2), point.label, font);
                    point.labelRegion.width = size;
                }
                if (point.label.length === 3 && point.label.indexOf('...') > -1) {
                    this.setPointVisibileFalse(point);
                }
            }
        }
    };
    /**
     * To set point label visible and region to disable.
     */
    AccumulationDataLabel.prototype.setPointVisibileFalse = function (point) {
        point.labelVisible = false;
        point.labelRegion = null;
    };
    /**
     * To set datalabel angle position for outside labels
     */
    AccumulationDataLabel.prototype.setOuterSmartLabel = function (previousPoint, point, border, labelRadius, textsize, margin) {
        if (!this.isCircular()) {
            this.setSmartLabelForSegments(point, previousPoint, labelRadius, textsize, margin);
        }
        else {
            var labelAngle = this.getOverlappedAngle(previousPoint.labelRegion, point.labelRegion, point.midAngle, border * 2);
            this.getLabelRegion(point, 'Outside', textsize, labelRadius, margin, labelAngle);
            if (labelAngle > point.endAngle) {
                this.setPointVisibileFalse(point);
            }
            point.labelAngle = labelAngle;
            while (point.labelVisible && (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isOverlap"])(previousPoint.labelRegion, point.labelRegion) || labelAngle <= previousPoint.labelAngle
                || this.isConnectorLineOverlapping(point, previousPoint))) {
                if (labelAngle > point.endAngle) {
                    this.setPointVisibileFalse(point);
                    break;
                }
                point.labelAngle = labelAngle;
                this.getLabelRegion(point, 'Outside', textsize, labelRadius, margin, labelAngle);
                labelAngle += 0.1;
            }
        }
    };
    /**
     * Sets smart label positions for funnel and pyramid series
     */
    AccumulationDataLabel.prototype.setSmartLabelForSegments = function (point, prevPoint, distance, textSize, margin) {
        var textRegion = point.labelRegion;
        //let overlapWidth: number = prevPoint.labelRegion.x + prevPoint.labelRegion.width - textRegion.x;
        var overlapHeight = this.accumulation.type === 'Funnel' ?
            prevPoint.labelRegion.y - (textRegion.y + textRegion.height) :
            point.labelRegion.y - (prevPoint.labelRegion.y + prevPoint.labelRegion.height);
        if (overlapHeight < 0) {
            point.labelRegion.y += this.accumulation.type === 'Funnel' ? overlapHeight : -overlapHeight;
        }
    };
    /**
     * To find connector line overlapping.
     */
    AccumulationDataLabel.prototype.isConnectorLineOverlapping = function (point, previous) {
        var position;
        if (!this.isCircular() && point.labelRegion.x < point.region.x) {
            position = 'outsideLeft';
        }
        var start = this.getLabelLocation(point, position);
        var end = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](0, 0);
        this.getEdgeOfLabel(point.labelRegion, point.labelAngle, end, 0, point);
        var previousstart = this.getLabelLocation(previous);
        var previousend = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](0, 0);
        this.getEdgeOfLabel(previous.labelRegion, previous.labelAngle, previousend, 0, point);
        return this.isLineRectangleIntersect(start, end, point.labelRegion) ||
            this.isLineRectangleIntersect(start, end, previous.labelRegion) ||
            this.isLineRectangleIntersect(previousstart, previousend, point.labelRegion);
    };
    /**
     * To find two rectangle intersect
     */
    AccumulationDataLabel.prototype.isLineRectangleIntersect = function (line1, line2, rect) {
        var rectPoints = [
            new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](Math.round(rect.x), Math.round(rect.y)),
            new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](Math.round((rect.x + rect.width)), Math.round(rect.y)),
            new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](Math.round((rect.x + rect.width)), Math.round((rect.y + rect.height))),
            new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](Math.round(rect.x), Math.round((rect.y + rect.height)))
        ];
        line1.x = Math.round(line1.x);
        line1.y = Math.round(line1.y);
        line2.x = Math.round(line2.x);
        line2.y = Math.round(line2.y);
        for (var i = 0; i < rectPoints.length; i++) {
            if (this.isLinesIntersect(line1, line2, rectPoints[i], rectPoints[(i + 1) % rectPoints.length])) {
                return true;
            }
        }
        return false;
    };
    /**
     * To find two line intersect
     */
    AccumulationDataLabel.prototype.isLinesIntersect = function (point1, point2, point11, point12) {
        var a1 = point2.y - point1.y;
        var b1 = point1.x - point2.x;
        var c1 = a1 * point1.x + b1 * point1.y;
        var a2 = point12.y - point11.y;
        var b2 = point11.x - point12.x;
        var c2 = a2 * point11.x + b2 * point11.y;
        var delta = a1 * b2 - a2 * b1;
        if (delta !== 0) {
            var x = (b2 * c1 - b1 * c2) / delta;
            var y = (a1 * c2 - a2 * c1) / delta;
            var lies = Math.min(point1.x, point2.x) <= x && x <= Math.max(point1.x, point2.x);
            lies = lies && Math.min(point1.y, point2.y) <= y && y <= Math.max(point1.y, point2.y);
            lies = lies && Math.min(point11.x, point12.x) <= x && x <= Math.max(point11.x, point12.x);
            lies = lies && Math.min(point11.y, point12.y) <= y && y <= Math.max(point11.y, point12.y);
            return lies;
        }
        return false;
    };
    /**
     * To get two rectangle overlapping angles.
     */
    AccumulationDataLabel.prototype.getOverlappedAngle = function (first, second, angle, padding) {
        var x = first.x;
        if (angle >= 90 && angle <= 270) {
            second.y = first.y - (padding + second.height / 2);
            x = first.x + first.width;
        }
        else {
            second.y = first.y + first.height + padding;
        }
        return Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getAngle"])(this.center, new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](x, second.y));
    };
    /**
     * To get connector line path
     */
    AccumulationDataLabel.prototype.getConnectorPath = function (label, point, dataLabel, end) {
        if (end === void 0) { end = 0; }
        var connector = dataLabel.connectorStyle;
        var labelRadius = this.isCircular() ? (!this.isVariousRadius() ? this.labelRadius :
            this.accumulation.pieSeriesModule.getLabelRadius(this.accumulation.visibleSeries[0], point)) :
            this.getLabelDistance(point, dataLabel);
        //let labelRadius: number = this.isCircular() ? this.labelRadius : this.getLabelDistance(point, dataLabel);
        var start = this.getConnectorStartPoint(point, connector);
        var labelAngle = end || point.midAngle;
        var middle = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](0, 0);
        var endPoint = this.getEdgeOfLabel(label, labelAngle, middle, connector.width, point);
        if (connector.type === 'Curve') {
            if (this.isCircular()) {
                var r = labelRadius - (this.isVariousRadius() ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["stringToNumber"])(point.sliceRadius, this.accumulation.pieSeriesModule.seriesRadius) :
                    this.radius);
                //let r: number = labelRadius - this.radius;
                middle = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["degreeToLocation"])(labelAngle, labelRadius - (r / 2), this.center);
                return 'M ' + start.x + ' ' + start.y + ' Q ' + middle.x + ' ' + middle.y + ' ' + endPoint.x + ' ' + endPoint.y;
            }
            else {
                return this.getPolyLinePath(start, endPoint);
            }
        }
        else {
            return 'M ' + start.x + ' ' + start.y + ' L ' + middle.x + ' ' + middle.y + ' L ' + endPoint.x + ' ' + endPoint.y;
        }
    };
    /**
     * Finds the curved path for funnel/pyramid data label connectors
     */
    AccumulationDataLabel.prototype.getPolyLinePath = function (start, end) {
        var controlPoints = [start, end];
        if (start.y === end.y) {
            return 'M ' + start.x + ' ' + start.y + ' L ' + end.x + ' ' + end.y;
        }
        var path = 'M';
        for (var i = 0; i <= 16; i++) {
            var t = i / 16;
            var points = this.getBezierPoint(t, controlPoints, 0, 2);
            path += points.x + ',' + points.y;
            if (i !== 16) {
                path += ' L';
            }
        }
        return path;
    };
    /**
     * Finds the bezier point for funnel/pyramid data label connectors
     */
    AccumulationDataLabel.prototype.getBezierPoint = function (t, controlPoints, index, count) {
        if (count === 1) {
            return controlPoints[index];
        }
        var p0 = this.getBezierPoint(t, controlPoints, index, count - 1);
        var p1 = this.getBezierPoint(t, controlPoints, index + 1, count - 1);
        var x = (p0.x) ? p0.x : p0.x;
        var y = (p0.y) ? p0.y : p0.y;
        var x1 = (p1.x) ? p1.x : p1.x;
        var y1 = (p1.y) ? p1.y : p1.y;
        var x2 = (1 - t) * x + t * x1;
        var y2 = (1 - t) * y + t * y1;
        if (p0.x) {
            return { x: x2, y: y2 };
        }
        else {
            return { x: x2, y: y2 };
        }
    };
    /**
     * To get label edges based on the center and label rect position.
     */
    AccumulationDataLabel.prototype.getEdgeOfLabel = function (labelshape, angle, middle, border, point) {
        if (border === void 0) { border = 1; }
        var edge = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](labelshape.x, labelshape.y);
        if (angle >= 90 && angle <= 270) {
            edge.x += labelshape.width + border / 2;
            edge.y += labelshape.height / 2;
            middle.x = edge.x + 10;
            middle.y = edge.y;
        }
        else if (point && point.region && point.region.x > point.labelRegion.x) {
            edge.x += border * 2 + labelshape.width;
            edge.y += labelshape.height / 2;
            middle.x = edge.x + 10;
            middle.y = edge.y;
        }
        else {
            edge.x -= border / 2;
            edge.y += labelshape.height / 2;
            middle.x = edge.x - 10;
            middle.y = edge.y;
        }
        return edge;
    };
    /**
     * Finds the distance between the label position and the edge/center of the funnel/pyramid
     */
    AccumulationDataLabel.prototype.getLabelDistance = function (point, dataLabel) {
        if (point.labelPosition && dataLabel.position !== point.labelPosition || dataLabel.connectorStyle.length) {
            var length_1 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["stringToNumber"])(dataLabel.connectorStyle.length || '70px', this.accumulation.initialClipRect.width);
            if (length_1 < this.accumulation.initialClipRect.width) {
                return length_1;
            }
        }
        var position = point.labelPosition || dataLabel.position;
        var series = this.accumulation.visibleSeries[0];
        var extraSpace = (this.accumulation.initialClipRect.width - series.triangleSize.width) / 2;
        var labelLocation;
        switch (position) {
            case 'Inside':
                return 0;
            case 'Outside':
                labelLocation = point.symbolLocation.x + point.labelOffset.x;
                return this.accumulation.initialClipRect.width - labelLocation - extraSpace;
        }
    };
    /**
     * Finds the label position / beginning of the connector(ouside funnel labels)
     */
    AccumulationDataLabel.prototype.getLabelLocation = function (point, position) {
        if (position === void 0) { position = 'Outside'; }
        if (this.accumulation.type !== 'Pie') {
            position = position === 'OutsideLeft' ? 'OutsideLeft' : point.labelPosition || position;
            var location_2 = {
                x: point.symbolLocation.x,
                y: point.symbolLocation.y - point.labelOffset.y
            };
            switch (position) {
                case 'Inside':
                    location_2.y = point.region.y + point.region.height / 2;
                    break;
                case 'Outside':
                    location_2.x += point.labelOffset.x;
                    break;
                case 'OutsideLeft':
                    location_2.x -= point.labelOffset.x;
            }
            return location_2;
        }
        else {
            //return degreeToLocation(point.midAngle, this.radius, this.center);
            return Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["degreeToLocation"])(point.midAngle, (this.isVariousRadius() ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["stringToNumber"])(point.sliceRadius, this.accumulation.pieSeriesModule.seriesRadius) :
                this.radius), this.center);
        }
    };
    /**
     * Finds the beginning of connector line
     */
    AccumulationDataLabel.prototype.getConnectorStartPoint = function (point, connector) {
        // return this.isCircular() ? degreeToLocation(point.midAngle, this.radius - connector.width, this.center) :
        //     this.getLabelLocation(point);
        var position;
        if (!this.isCircular() && point.region.x > point.labelRegion.x) {
            position = 'OutsideLeft';
        }
        return this.isCircular() ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["degreeToLocation"])(point.midAngle, (this.isVariousRadius() ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["stringToNumber"])(point.sliceRadius, this.accumulation.pieSeriesModule.seriesRadius) :
            this.radius) - connector.width, this.center) : this.getLabelLocation(point, position);
    };
    /**
     * To find area rect based on margin, available size.
     * @private
     */
    AccumulationDataLabel.prototype.findAreaRect = function () {
        this.areaRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](0, 0, this.accumulation.availableSize.width, this.accumulation.availableSize.height);
        var margin = this.accumulation.margin;
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["subtractThickness"])(this.areaRect, new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["Thickness"](margin.left, margin.right, margin.top, margin.bottom));
    };
    /**
     * To render the data labels from series points.
     */
    AccumulationDataLabel.prototype.renderDataLabel = function (point, dataLabel, parent, points, series, templateElement, redraw) {
        var id = this.accumulation.element.id + '_datalabel_Series_' + series + '_';
        var datalabelGroup = this.accumulation.renderer.createGroup({ id: id + 'g_' + point.index });
        point.label = point.originalText || point.y.toString();
        var border = { width: dataLabel.border.width, color: dataLabel.border.color };
        var argsFont = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('properties', dataLabel.font), null, true));
        var argsData = {
            cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["textRender"], series: this.accumulation.visibleSeries[0], point: point,
            text: point.label, border: border, color: dataLabel.fill, template: dataLabel.template, font: argsFont
        };
        this.accumulation.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["textRender"], argsData);
        var isTemplate = argsData.template !== null;
        point.labelVisible = !argsData.cancel;
        point.text = point.label = argsData.text;
        if (Number(point.label)) {
            point.label = this.accumulation.intl.formatNumber(+point.label, {
                useGrouping: this.accumulation.useGroupingSeparator
            });
        }
        this.marginValue = argsData.border.width ? (5 + argsData.border.width) : 1;
        // Template element
        var childElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            id: this.accumulation.element.id + '_Series_' + 0 + '_DataLabel_' + point.index,
            styles: 'position: absolute;background-color:' + argsData.color + ';' +
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getFontStyle"])(dataLabel.font) + ';border:' + argsData.border.width + 'px solid ' + argsData.border.color + ';'
        });
        var textSize = isTemplate ? this.getTemplateSize(childElement, point, argsData, redraw) :
            Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["measureText"])(point.label, dataLabel.font);
        textSize.height += 4; // 4 for calculation with padding for smart label shape
        textSize.width += 4;
        this.getDataLabelPosition(point, dataLabel, textSize, points, datalabelGroup, id);
        var dataLabelElement;
        var location;
        var element;
        if (point.labelVisible) {
            this.correctLabelRegion(point.labelRegion, textSize);
            if (isTemplate) {
                this.setTemplateStyle(childElement, point, templateElement, dataLabel.font.color, argsData.color, redraw);
            }
            else {
                location = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](point.labelRegion.x + this.marginValue, point.labelRegion.y + (textSize.height * 3 / 4) + this.marginValue);
                element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(id + 'shape_' + point.index);
                var startLocation = element ? new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["ChartLocation"](+element.getAttribute('x'), +element.getAttribute('y')) : null;
                dataLabelElement = this.accumulation.renderer.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["RectOption"](id + 'shape_' + point.index, argsData.color, argsData.border, 1, point.labelRegion, dataLabel.rx, dataLabel.ry));
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(false, datalabelGroup, dataLabelElement, redraw, true, 'x', 'y', startLocation, null, false, false, null, this.accumulation.duration);
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textElement"])(this.accumulation.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["TextOption"](id + 'text_' + point.index, location.x, location.y, 'start', point.label, '', 'auto'), argsData.font, argsData.font.color || this.getSaturatedColor(point, argsData.color), datalabelGroup, false, redraw, true, false, this.accumulation.duration);
                element = null;
            }
            if (this.accumulation.accumulationLegendModule && (dataLabel.position === 'Outside' || this.accumulation.enableSmartLabels)) {
                this.accumulation.visibleSeries[0].findMaxBounds(this.accumulation.visibleSeries[0].labelBound, point.labelRegion);
            }
            if (point.labelPosition === 'Outside') {
                var element_1 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(id + 'connector_' + point.index);
                var previousDirection = element_1 ? element_1.getAttribute('d') : '';
                var pathElement = this.accumulation.renderer.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](id + 'connector_' + point.index, 'transparent', dataLabel.connectorStyle.width, dataLabel.connectorStyle.color || point.color, 1, dataLabel.connectorStyle.dashArray, this.getConnectorPath(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, point.labelRegion, null, true), point, dataLabel, point.labelAngle)));
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(false, datalabelGroup, pathElement, redraw, true, null, null, null, previousDirection, false, false, null, this.accumulation.duration);
            }
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(false, parent, datalabelGroup, redraw);
        }
    };
    /**
     * To find the template element size
     * @param element
     * @param point
     * @param argsData
     */
    AccumulationDataLabel.prototype.getTemplateSize = function (element, point, argsData, redraw) {
        var clientRect;
        element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["createTemplate"])(element, point.index, argsData.template, this.accumulation, point, this.accumulation.visibleSeries[0]);
        clientRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["measureElementRect"])(element, redraw);
        return { width: clientRect.width, height: clientRect.height };
    };
    /**
     * To set the template element style
     * @param childElement
     * @param point
     * @param parent
     * @param labelColor
     * @param fill
     */
    AccumulationDataLabel.prototype.setTemplateStyle = function (childElement, point, parent, labelColor, fill, redraw) {
        childElement.style.left = (point.labelRegion.x) + 'px';
        childElement.style.top = (point.labelRegion.y) + 'px';
        childElement.style.color = labelColor ||
            this.getSaturatedColor(point, fill);
        if (childElement.childElementCount) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(false, parent, childElement, redraw, true, 'left', 'top');
            this.doTemplateAnimation(this.accumulation, childElement);
        }
    };
    /**
     * To find saturated color for datalabel
     */
    AccumulationDataLabel.prototype.getSaturatedColor = function (point, color) {
        var saturatedColor;
        if (this.marginValue >= 1) {
            saturatedColor = color === 'transparent' ? this.getLabelBackground(point) : color;
        }
        else {
            saturatedColor = this.getLabelBackground(point);
        }
        saturatedColor = (saturatedColor === 'transparent') ? window.getComputedStyle(document.body, null).backgroundColor : saturatedColor;
        var rgbValue = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["convertHexToColor"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["colorNameToHex"])(saturatedColor));
        var contrast = Math.round((rgbValue.r * 299 + rgbValue.g * 587 + rgbValue.b * 114) / 1000);
        return contrast >= 128 ? 'black' : 'white';
    };
    /**
     * Animates the data label template.
     * @return {void}.
     * @private
     */
    AccumulationDataLabel.prototype.doTemplateAnimation = function (accumulation, element) {
        var series = accumulation.visibleSeries[0];
        var delay = series.animation.delay + series.animation.duration;
        if (series.animation.enable && accumulation.animateSeries) {
            element.style.visibility = 'hidden';
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["templateAnimate"])(element, delay, 200, 'ZoomIn');
        }
    };
    /**
     * To find background color for the datalabel
     */
    AccumulationDataLabel.prototype.getLabelBackground = function (point) {
        return point.labelPosition === 'Outside' ?
            this.accumulation.background || this.accumulation.themeStyle.background : point.color;
    };
    /**
     * To correct the padding between datalabel regions.
     */
    AccumulationDataLabel.prototype.correctLabelRegion = function (labelRegion, textSize, padding) {
        if (padding === void 0) { padding = 4; }
        labelRegion.height -= padding;
        labelRegion.width -= padding;
        labelRegion.x += padding / 2;
        labelRegion.y += padding / 2;
        textSize.height -= padding;
        textSize.width -= padding;
    };
    /**
     * To get the dataLabel module name
     */
    AccumulationDataLabel.prototype.getModuleName = function () {
        return 'AccumulationDataLabel';
    };
    /**
     * To destroy the data label.
     * @return {void}
     * @private
     */
    AccumulationDataLabel.prototype.destroy = function (accumulation) {
        /**
         * Destroy method performed here
         */
    };
    return AccumulationDataLabel;
}(_accumulation_base__WEBPACK_IMPORTED_MODULE_5__["AccumulationBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/funnel-series.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/funnel-series.js ***!
  \**********************************************************************************************/
/*! exports provided: FunnelSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunnelSeries", function() { return FunnelSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _triangular_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./triangular-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/triangular-base.js");
/**
 * Defines the behavior of a funnel series
 */
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * FunnelSeries module used to render `Funnel` Series.
 */
var FunnelSeries = /** @class */ (function (_super) {
    __extends(FunnelSeries, _super);
    function FunnelSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the path of a funnel segment
     */
    FunnelSeries.prototype.getSegmentData = function (point, series, chart) {
        var lineWidth;
        var topRadius;
        var bottomRadius;
        var endTop;
        var endBottom;
        var minRadius;
        var endMin;
        var bottomY;
        var area = series.triangleSize;
        var offset = 0;
        var extraSpace = (chart.initialClipRect.width - series.triangleSize.width) / 2;
        var emptySpaceAtLeft = extraSpace + chart.initialClipRect.x;
        var seriesTop = chart.initialClipRect.y + (chart.initialClipRect.height - area.height) / 2;
        //defines the top and bottom of a segment
        var top = point.yRatio * area.height;
        var bottom = top + point.heightRatio * area.height;
        var neckSize = series.neckSize;
        lineWidth = neckSize.width + (area.width - neckSize.width) * ((area.height - neckSize.height - top) /
            (area.height - neckSize.height));
        topRadius = (area.width / 2) - lineWidth / 2;
        //Calculating the middle slope change and bottom
        endTop = topRadius + lineWidth;
        if (bottom > area.height - neckSize.height || area.height === neckSize.height) {
            lineWidth = neckSize.width;
        }
        else {
            lineWidth = neckSize.width + (area.width - neckSize.width) *
                ((area.height - neckSize.height - bottom) / (area.height - neckSize.height));
        }
        bottomRadius = (area.width / 2) - (lineWidth / 2);
        endBottom = bottomRadius + lineWidth;
        if (top >= area.height - neckSize.height) {
            topRadius = bottomRadius = minRadius = (area.width / 2) - neckSize.width / 2;
            endTop = endBottom = endMin = (area.width / 2) + neckSize.width / 2;
        }
        else if (bottom > (area.height - neckSize.height)) {
            minRadius = bottomRadius = (area.width / 2) - lineWidth / 2;
            endMin = endBottom = minRadius + lineWidth;
            bottomY = area.height - neckSize.height;
        }
        top += seriesTop;
        bottom += seriesTop;
        bottomY += seriesTop;
        var line1 = { x: emptySpaceAtLeft + offset + topRadius, y: top };
        var line2 = { x: emptySpaceAtLeft + offset + endTop, y: top };
        var line4 = { x: emptySpaceAtLeft + offset + endBottom, y: bottom };
        var line5 = { x: emptySpaceAtLeft + offset + bottomRadius, y: bottom };
        var line3 = { x: emptySpaceAtLeft + offset + endBottom, y: bottom };
        var line6 = { x: emptySpaceAtLeft + offset + bottomRadius, y: bottom };
        if (bottomY) {
            line3 = { x: emptySpaceAtLeft + offset + endMin, y: bottomY };
            line6 = { x: emptySpaceAtLeft + offset + minRadius, y: bottomY };
        }
        var polygon = [line1, line2, line3, line4, line5, line6];
        this.setLabelLocation(series, point, polygon);
        var direction = this.findPath(polygon);
        return direction;
    };
    /**
     * Renders a funnel segment
     * @private
     */
    FunnelSeries.prototype.renderPoint = function (point, series, chart, options, seriesGroup, redraw) {
        if (!point.visible) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["removeElement"])(options.id);
            return null;
        }
        var direction = this.getSegmentData(point, series, chart);
        point.midAngle = 0;
        options.d = direction;
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(false, seriesGroup, chart.renderer.drawPath(options), redraw);
        if (point.isExplode) {
            chart.accBaseModule.explodePoints(point.index, chart, true);
        }
    };
    /**
     * To get the module name of the funnel series.
     */
    FunnelSeries.prototype.getModuleName = function () {
        return 'FunnelSeries';
    };
    /**
     * To destroy the funnel series.
     * @return {void}
     * @private
     */
    FunnelSeries.prototype.destroy = function (accumulation) {
        /**
         * Destroys the funnel series
         */
    };
    return FunnelSeries;
}(_triangular_base__WEBPACK_IMPORTED_MODULE_1__["TriangularBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/legend.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/legend.js ***!
  \***************************************************************************************/
/*! exports provided: AccumulationLegend */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationLegend", function() { return AccumulationLegend; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _model_acc_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../model/acc-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/model/acc-base.js");
/* harmony import */ var _common_legend_legend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/legend/legend */ "./node_modules/@syncfusion/ej2-charts/src/common/legend/legend.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * AccumulationChart legend
 */





/**
 * AccumulationLegend module used to render `Legend` for Accumulation chart.
 */
var AccumulationLegend = /** @class */ (function (_super) {
    __extends(AccumulationLegend, _super);
    /**
     * Constructor for Accumulation Legend.
     * @param chart
     */
    function AccumulationLegend(chart) {
        var _this = _super.call(this, chart) || this;
        _this.library = _this;
        _this.titleRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Rect"](0, chart.margin.top, 0, 0);
        return _this;
    }
    /**
     * Get the legend options.
     * @return {void}
     * @private
     */
    AccumulationLegend.prototype.getLegendOptions = function (chart, series) {
        this.legendCollections = [];
        for (var i = 0; i < 1; i++) {
            var seriesType = series[i].type;
            if (seriesType === 'Pie' || seriesType === 'Doughnut') {
                seriesType = (series[i].innerRadius !== '0' && series[i].innerRadius !== '0%') ?
                    'Doughnut' : 'Pie';
            }
            for (var _i = 0, _a = series[i].points; _i < _a.length; _i++) {
                var point = _a[_i];
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.x) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.y)) {
                    this.legendCollections.push(new _common_legend_legend__WEBPACK_IMPORTED_MODULE_2__["LegendOptions"](point.x.toString(), point.color, series[i].legendShape, point.visible, seriesType, null, null, point.index, series[i].index));
                }
            }
        }
    };
    /**
     * To find legend bounds for accumulation chart.
     * @private
     */
    AccumulationLegend.prototype.getLegendBounds = function (availableSize, legendBounds, legend) {
        var extraWidth = 0;
        var extraHeight = 0;
        var padding = legend.padding;
        if (!this.isVertical) {
            extraHeight = !legend.height ? ((availableSize.height / 100) * 5) : 0;
        }
        else {
            extraWidth = !legend.width ? ((availableSize.width / 100) * 5) : 0;
        }
        legendBounds.width += extraWidth;
        legendBounds.height += extraHeight;
        var shapePadding = legend.shapePadding;
        var maximumWidth = 0;
        var shapeWidth = legend.shapeWidth;
        var rowWidth = 0;
        var rowCount = 0;
        var columnWidth = [];
        var columnHeight = 0;
        var legendWidth = 0;
        this.maxItemHeight = Math.max(Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])('MeasureText', legend.textStyle).height, legend.shapeHeight);
        var legendEventArgs;
        var render = false;
        for (var _i = 0, _a = this.legendCollections; _i < _a.length; _i++) {
            var legendOption = _a[_i];
            legendEventArgs = { fill: legendOption.fill, text: legendOption.text, shape: legendOption.shape,
                name: 'legendRender', cancel: false };
            this.chart.trigger('legendRender', legendEventArgs);
            legendOption.render = !legendEventArgs.cancel;
            legendOption.text = legendEventArgs.text;
            legendOption.fill = legendEventArgs.fill;
            legendOption.shape = legendEventArgs.shape;
            legendOption.textSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(legendOption.text, legend.textStyle);
            if (legendOption.render && legendOption.text !== '') {
                render = true;
                legendWidth = shapeWidth + shapePadding + legendOption.textSize.width + padding;
                if (this.isVertical) {
                    ++rowCount;
                    columnHeight = (rowCount * (this.maxItemHeight + padding)) + padding;
                    if ((rowCount * (this.maxItemHeight + padding)) + padding > legendBounds.height) {
                        columnHeight = Math.max(columnHeight, (rowCount * (this.maxItemHeight + padding)) + padding);
                        rowWidth = rowWidth + maximumWidth;
                        columnWidth.push(maximumWidth);
                        this.totalPages = Math.max(rowCount, this.totalPages || 1);
                        maximumWidth = 0;
                        rowCount = 1;
                    }
                    maximumWidth = Math.max(legendWidth, maximumWidth);
                }
                else {
                    rowWidth = rowWidth + legendWidth;
                    if (legendBounds.width < (padding + rowWidth)) {
                        maximumWidth = Math.max(maximumWidth, (rowWidth + padding - legendWidth));
                        if (rowCount === 0 && (legendWidth !== rowWidth)) {
                            rowCount = 1;
                        }
                        rowWidth = legendWidth;
                        rowCount++;
                        columnHeight = (rowCount * (this.maxItemHeight + padding)) + padding;
                    }
                }
            }
        }
        if (this.isVertical) {
            rowWidth = rowWidth + maximumWidth;
            this.isPaging = legendBounds.width < (rowWidth + padding);
            columnHeight = Math.max(columnHeight, ((this.totalPages || 1) * (this.maxItemHeight + padding)) + padding);
            this.isPaging = this.isPaging && (this.totalPages > 1);
            if (columnWidth[columnWidth.length - 1] !== maximumWidth) {
                columnWidth.push(maximumWidth);
            }
        }
        else {
            this.isPaging = legendBounds.height < columnHeight;
            this.totalPages = this.totalRowCount = rowCount;
            columnHeight = Math.max(columnHeight, (this.maxItemHeight + padding) + padding);
        }
        this.maxColumns = 0; // initialization for max columns
        var width = this.isVertical ? this.getMaxColumn(columnWidth, legendBounds.width, padding, rowWidth + padding) :
            Math.max(rowWidth + padding, maximumWidth);
        if (render) { // if any legends not skipped in event check
            this.setBounds(width, columnHeight, legend, legendBounds);
        }
        else {
            this.setBounds(0, 0, legend, legendBounds);
        }
    };
    /**
     * To find maximum column size for legend
     */
    AccumulationLegend.prototype.getMaxColumn = function (columns, width, padding, rowWidth) {
        var maxPageColumn = padding;
        this.maxColumnWidth = Math.max.apply(null, columns);
        for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
            var column = columns_1[_i];
            maxPageColumn += this.maxColumnWidth;
            this.maxColumns++;
            if (maxPageColumn + padding > width) {
                maxPageColumn -= this.maxColumnWidth;
                this.maxColumns--;
                break;
            }
        }
        this.isPaging = (maxPageColumn < rowWidth) && (this.totalPages > 1);
        if (maxPageColumn === padding) {
            maxPageColumn = width;
        }
        this.maxColumns = Math.max(1, this.maxColumns);
        this.maxWidth = maxPageColumn;
        return maxPageColumn;
    };
    /**
     * To find available width from legend x position.
     */
    AccumulationLegend.prototype.getAvailWidth = function (tx, width, legendX) {
        if (this.isVertical) {
            width = this.maxWidth;
        }
        return width - ((this.legend.padding * 2) + this.legend.shapeWidth + this.legend.shapePadding);
    };
    /**
     * To find legend rendering locations from legend options.
     * @private
     */
    AccumulationLegend.prototype.getRenderPoint = function (legendOption, start, textPadding, prevLegend, rect, count, firstLegend) {
        var padding = this.legend.padding;
        if (this.isVertical) {
            if (count === firstLegend || (prevLegend.location.y + (this.maxItemHeight * 1.5) + (padding * 2) > rect.y + rect.height)) {
                legendOption.location.x = prevLegend.location.x + ((count === firstLegend) ? 0 : this.maxColumnWidth);
                legendOption.location.y = start.y;
                this.pageXCollections.push(legendOption.location.x - (this.legend.shapeWidth / 2) - padding);
                this.totalPages++;
            }
            else {
                legendOption.location.x = prevLegend.location.x;
                legendOption.location.y = prevLegend.location.y + this.maxItemHeight + padding;
            }
        }
        else {
            var previousBound = (prevLegend.location.x + textPadding + prevLegend.textSize.width);
            if ((previousBound + (legendOption.textSize.width + textPadding)) > (rect.x + rect.width + this.legend.shapeWidth / 2)) {
                legendOption.location.y = (count === firstLegend) ? prevLegend.location.y :
                    prevLegend.location.y + this.maxItemHeight + padding;
                legendOption.location.x = start.x;
            }
            else {
                legendOption.location.y = prevLegend.location.y;
                legendOption.location.x = (count === firstLegend) ? prevLegend.location.x : previousBound;
            }
            this.totalPages = this.totalRowCount;
        }
        var availablewidth = this.getAvailWidth(legendOption.location.x, this.legendBounds.width, this.legendBounds.x);
        legendOption.text = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_4__["textTrim"])(+availablewidth.toFixed(4), legendOption.text, this.legend.textStyle);
    };
    /**
     * finding the smart legend place according to positions.
     * @return {void}
     * @private
     */
    AccumulationLegend.prototype.getSmartLegendLocation = function (labelBound, legendBound, margin) {
        var space;
        switch (this.position) {
            case 'Left':
                space = ((labelBound.x - legendBound.width) - margin.left) / 2;
                legendBound.x = (labelBound.x - legendBound.width) < margin.left ? legendBound.x :
                    (labelBound.x - legendBound.width) - space;
                break;
            case 'Right':
                space = ((this.chart.availableSize.width - margin.right) - (labelBound.x + labelBound.width + legendBound.width)) / 2;
                legendBound.x = (labelBound.x + labelBound.width + legendBound.width) > (this.chart.availableSize.width - margin.right) ?
                    legendBound.x : (labelBound.x + labelBound.width + space);
                break;
            case 'Top':
                this.getTitleRect(this.chart);
                space = ((labelBound.y - legendBound.height) - (this.titleRect.y + this.titleRect.height)) / 2;
                legendBound.y = (labelBound.y - legendBound.height) < margin.top ? legendBound.y :
                    (labelBound.y - legendBound.height) - space;
                break;
            case 'Bottom':
                space = ((this.chart.availableSize.height - margin.bottom) - (labelBound.y + labelBound.height + legendBound.height)) / 2;
                legendBound.y = labelBound.y + labelBound.height + legendBound.height > (this.chart.availableSize.height - margin.bottom) ?
                    legendBound.y : (labelBound.y + labelBound.height) + space;
                break;
        }
    };
    /**
     * To get title rect.
     */
    AccumulationLegend.prototype.getTitleRect = function (accumulation) {
        if (!accumulation.title) {
            return null;
        }
        var titleSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(accumulation.title, accumulation.titleStyle);
        this.titleRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Rect"](accumulation.availableSize.width / 2 - titleSize.width / 2, accumulation.margin.top, titleSize.width, titleSize.height);
    };
    /**
     * To get legend by index
     */
    AccumulationLegend.prototype.legendByIndex = function (index, legendCollections) {
        for (var _i = 0, legendCollections_1 = legendCollections; _i < legendCollections_1.length; _i++) {
            var legend = legendCollections_1[_i];
            if (legend.pointIndex === index) {
                return legend;
            }
        }
        return null;
    };
    /**
     * To show or hide the legend on clicking the legend.
     * @return {void}
     */
    AccumulationLegend.prototype.click = function (event) {
        var targetId = event.target.id;
        var chart = this.chart;
        var legendItemsId = [this.legendID + '_text_', this.legendID + '_shape_',
            this.legendID + '_shape_marker_'];
        var selectedDataIndexes = [];
        if (this.chart.accumulationSelectionModule) {
            selectedDataIndexes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], this.chart.accumulationSelectionModule.selectedDataIndexes, null, true);
        }
        this.chart.animateSeries = false;
        for (var _i = 0, legendItemsId_1 = legendItemsId; _i < legendItemsId_1.length; _i++) {
            var id = legendItemsId_1[_i];
            if (targetId.indexOf(id) > -1) {
                var pointIndex = parseInt(targetId.split(id)[1], 10);
                if (this.chart.legendSettings.toggleVisibility && !isNaN(pointIndex)) {
                    var currentSeries = this.chart.visibleSeries[0];
                    var point = Object(_model_acc_base__WEBPACK_IMPORTED_MODULE_1__["pointByIndex"])(pointIndex, currentSeries.points);
                    var legendOption = this.legendByIndex(pointIndex, this.legendCollections);
                    point.visible = !point.visible;
                    legendOption.visible = point.visible;
                    currentSeries.sumOfPoints += point.visible ? point.y : -point.y;
                    chart.redraw = chart.enableAnimation;
                    this.sliceVisibility(pointIndex, point.visible);
                    chart.removeSvg();
                    this.chart.refreshPoints(currentSeries.points);
                    this.chart.renderElements();
                }
                else if (this.chart.accumulationSelectionModule) {
                    this.chart.accumulationSelectionModule.legendSelection(this.chart, 0, pointIndex);
                }
            }
        }
        if (targetId.indexOf(this.legendID + '_pageup') > -1) {
            this.changePage(event, true);
        }
        else if (targetId.indexOf(this.legendID + '_pagedown') > -1) {
            this.changePage(event, false);
        }
        chart.redraw = false;
    };
    /**
     * To translate the point elements by index and position
     */
    AccumulationLegend.prototype.sliceVisibility = function (index, isVisible) {
        var sliceId = this.chart.element.id + '_Series_0_Point_';
        if (this.chart.visibleSeries[0].dataLabel.visible) {
            sliceId = this.chart.element.id + '_datalabel_Series_0_';
            this.sliceAnimate(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_4__["getElement"])(sliceId + 'g_' + index), isVisible);
        }
    };
    /**
     * Slice animation
     * @param element
     * @param name
     * @param isVisible
     */
    AccumulationLegend.prototype.sliceAnimate = function (element, isVisible) {
        if (!element) {
            return null;
        }
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(element, {
            duration: 300,
            delay: 0,
            name: isVisible ? 'FadeIn' : 'FadeOut',
            end: function (args) {
                args.element.style.visibility = isVisible ? 'visible' : 'hidden';
            },
        });
    };
    /**
     * Get module name
     */
    AccumulationLegend.prototype.getModuleName = function () {
        return 'AccumulationLegend';
    };
    /**
     * To destroy the Legend.
     * @return {void}
     * @private
     */
    AccumulationLegend.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    return AccumulationLegend;
}(_common_legend_legend__WEBPACK_IMPORTED_MODULE_2__["BaseLegend"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pie-base.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pie-base.js ***!
  \*****************************************************************************************/
/*! exports provided: PieBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PieBase", function() { return PieBase; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _accumulation_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./accumulation-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/accumulation-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * Accumulation charts base file
 */





/**
 * PieBase class used to do pie base calculations.
 */
var PieBase = /** @class */ (function (_super) {
    __extends(PieBase, _super);
    function PieBase() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * To initialize the property values.
     * @private
     */
    PieBase.prototype.initProperties = function (chart, series) {
        this.accumulation = chart;
        this.size = Math.min(chart.initialClipRect.width, chart.initialClipRect.height);
        this.initAngles(series);
        var r = parseInt(series.radius, 10);
        if ((series.radius.indexOf('%') !== -1 || typeof r === 'number') && !isNaN(r)) {
            this.isRadiusMapped = false;
            this.radius = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.radius, this.size / 2);
            this.innerRadius = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.innerRadius, this.radius);
            this.labelRadius = series.dataLabel.position === 'Inside' ? (((this.radius - this.innerRadius) / 2) + this.innerRadius) :
                (this.radius + Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.dataLabel.connectorStyle.length || '4%', this.size / 2));
        }
        else {
            var radiusCollection = [];
            this.isRadiusMapped = true;
            for (var i = 0; i < Object.keys(series.points).length; i++) {
                if (series.points[i].sliceRadius.indexOf('%') !== -1) {
                    radiusCollection[i] = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.points[i].sliceRadius, this.size / 2);
                }
                else {
                    radiusCollection[i] = parseInt(series.points[i].sliceRadius, 10);
                }
            }
            var minRadius = Math.min.apply(null, radiusCollection);
            var maxRadius = Math.max.apply(null, radiusCollection);
            this.radius = this.seriesRadius = maxRadius;
            this.innerRadius = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.innerRadius, this.seriesRadius);
            this.innerRadius = this.innerRadius > minRadius ? (this.innerRadius / 2) : this.innerRadius;
        }
        // this.radius = stringToNumber(series.radius, size / 2);
        // this.innerRadius = stringToNumber(series.innerRadius, this.radius);
        // this.labelRadius = series.dataLabel.position === 'Inside' ? (((this.radius - this.innerRadius) / 2) + this.innerRadius) :
        //     (this.radius + stringToNumber(series.dataLabel.connectorStyle.length || '4%', size / 2));
        chart.explodeDistance = series.explode ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.explodeOffset, this.radius) : 0;
        this.findCenter(chart, series);
        this.defaultLabelBound(series, series.dataLabel.visible, series.dataLabel.position);
        this.totalAngle -= 0.001;
    };
    /*
     * To get label radius of the pie.
     * @private
     */
    PieBase.prototype.getLabelRadius = function (series, point) {
        return series.dataLabel.position === 'Inside' ?
            ((((Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(point.sliceRadius, this.radius) - this.innerRadius)) / 2) + this.innerRadius) :
            (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(point.sliceRadius, this.seriesRadius) + Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.dataLabel.connectorStyle.length || '4%', this.size / 2));
    };
    /**
     * To find the center of the accumulation.
     * @private
     */
    PieBase.prototype.findCenter = function (accumulation, series) {
        this.accumulation = accumulation;
        this.center = {
            x: Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(accumulation.center.x, accumulation.initialClipRect.width) + (accumulation.initialClipRect.x),
            y: Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(accumulation.center.y, accumulation.initialClipRect.height) + (accumulation.initialClipRect.y)
        };
        var accumulationRect = this.getSeriesBound(series);
        var accumulationRectCenter = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](accumulationRect.x + accumulationRect.width / 2, accumulationRect.y + accumulationRect.height / 2);
        this.center.x += (this.center.x - accumulationRectCenter.x);
        this.center.y += (this.center.y - accumulationRectCenter.y);
        this.accumulation.origin = this.center;
    };
    /**
     * To find angles from series.
     */
    PieBase.prototype.initAngles = function (series) {
        var endAngle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(series.endAngle) ? series.startAngle : series.endAngle;
        this.totalAngle = (endAngle - series.startAngle) % 360;
        this.startAngle = series.startAngle - 90;
        this.totalAngle = this.totalAngle <= 0 ? (360 + this.totalAngle) : this.totalAngle;
        this.startAngle = (this.startAngle < 0 ? (this.startAngle + 360) : this.startAngle) % 360;
    };
    /**
     * To calculate data-label bound
     * @private
     */
    PieBase.prototype.defaultLabelBound = function (series, visible, position) {
        var accumulationBound = this.getSeriesBound(series);
        series.accumulationBound = accumulationBound;
        series.labelBound = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](accumulationBound.x, accumulationBound.y, accumulationBound.width + accumulationBound.x, accumulationBound.height + accumulationBound.y);
        if (visible && position === 'Outside') {
            series.labelBound = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](Infinity, Infinity, -Infinity, -Infinity);
        }
    };
    /**
     * To calculate series bound
     * @private
     */
    PieBase.prototype.getSeriesBound = function (series) {
        var rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](Infinity, Infinity, -Infinity, -Infinity);
        this.initAngles(series);
        var start = this.startAngle;
        var total = this.totalAngle;
        var end = (this.startAngle + total) % 360;
        end = (end === 0) ? 360 : end;
        series.findMaxBounds(rect, this.getRectFromAngle(start));
        series.findMaxBounds(rect, this.getRectFromAngle(end));
        series.findMaxBounds(rect, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](this.center.x, this.center.y, 0, 0));
        var nextQuandrant = (Math.floor(start / 90) * 90 + 90) % 360;
        var lastQuadrant = (Math.floor(end / 90) * 90) % 360;
        lastQuadrant = (lastQuadrant === 0) ? 360 : lastQuadrant;
        if (total >= 90 || lastQuadrant === nextQuandrant) {
            series.findMaxBounds(rect, this.getRectFromAngle(nextQuandrant));
            series.findMaxBounds(rect, this.getRectFromAngle(lastQuadrant));
        }
        if (start === 0 || (start + total >= 360)) {
            series.findMaxBounds(rect, this.getRectFromAngle(0));
        }
        var length = nextQuandrant === lastQuadrant ? 0 : Math.floor(total / 90);
        for (var i = 1; i < length; i++) {
            nextQuandrant = nextQuandrant + 90;
            if ((nextQuandrant < lastQuadrant || end < start) || total === 360) {
                series.findMaxBounds(rect, this.getRectFromAngle(nextQuandrant));
            }
        }
        rect.width -= rect.x;
        rect.height -= rect.y;
        return rect;
    };
    /**
     * To get rect location size from angle
     */
    PieBase.prototype.getRectFromAngle = function (angle) {
        var location = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["degreeToLocation"])(angle, this.radius, this.center);
        return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](location.x, location.y, 0, 0);
    };
    /**
     * To get path arc direction
     */
    PieBase.prototype.getPathArc = function (center, start, end, radius, innerRadius) {
        var degree = end - start;
        degree = degree < 0 ? (degree + 360) : degree;
        var flag = (degree < 180) ? 0 : 1;
        if (!innerRadius && innerRadius === 0) {
            return this.getPiePath(center, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["degreeToLocation"])(start, radius, center), Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["degreeToLocation"])(end, radius, center), radius, flag);
        }
        else {
            return this.getDoughnutPath(center, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["degreeToLocation"])(start, radius, center), Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["degreeToLocation"])(end, radius, center), radius, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["degreeToLocation"])(start, innerRadius, center), Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["degreeToLocation"])(end, innerRadius, center), innerRadius, flag);
        }
    };
    /**
     * To get pie direction
     */
    PieBase.prototype.getPiePath = function (center, start, end, radius, clockWise) {
        return 'M ' + center.x + ' ' + center.y + ' L ' + start.x + ' ' + start.y + ' A ' + radius + ' ' +
            radius + ' 0 ' + clockWise + ' 1 ' + end.x + ' ' + end.y + ' Z';
    };
    /**
     * To get doughnut direction
     */
    PieBase.prototype.getDoughnutPath = function (center, start, end, radius, innerStart, innerEnd, innerRadius, clockWise) {
        return 'M ' + start.x + ' ' + start.y + ' A ' + radius + ' ' + radius + ' 0 ' + clockWise +
            ' 1 ' + end.x + ' ' + end.y + ' L ' + innerEnd.x + ' ' + innerEnd.y + ' A ' + innerRadius +
            ' ' + innerRadius + ' 0 ' + clockWise + ',0 ' + innerStart.x + ' ' + innerStart.y + ' Z';
    };
    /**
     * Method to start animation for pie series.
     */
    PieBase.prototype.doAnimation = function (slice, series) {
        var _this = this;
        var startAngle = series.startAngle - 90;
        var duration = this.accumulation.duration ? this.accumulation.duration : series.animation.duration;
        var value;
        this.center.x += 1;
        var radius = Math.max(this.accumulation.availableSize.height, this.accumulation.availableSize.width) * 0.75;
        radius += radius * (0.414); // formula r + r / 2 * (1.414 -1)
        var effect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getAnimationFunction"])('Linear'); // need to check animation type
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(slice, {
            duration: duration,
            delay: series.animation.delay,
            progress: function (args) {
                value = effect(args.timeStamp, startAngle, _this.totalAngle, args.duration);
                slice.setAttribute('d', _this.getPathArc(_this.center, startAngle, value, radius, 0));
            },
            end: function (args) {
                _this.center.x -= 1;
                slice.setAttribute('d', _this.getPathArc(_this.center, 0, 359.99999, radius, 0));
                _this.accumulation.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_3__["animationComplete"], _this.accumulation.isBlazor ? {} :
                    { series: series, accumulation: _this.accumulation, chart: _this.accumulation });
                var datalabelGroup = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(_this.accumulation.element.id + '_datalabel_Series_' + series.index);
                datalabelGroup.style.visibility = _this.accumulation.isDestroyed ? 'hidden' : 'visible';
            }
        });
    };
    return PieBase;
}(_accumulation_base__WEBPACK_IMPORTED_MODULE_4__["AccumulationBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pie-series.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pie-series.js ***!
  \*******************************************************************************************/
/*! exports provided: PieSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PieSeries", function() { return PieSeries; });
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _renderer_pie_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../renderer/pie-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pie-base.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * PieSeries module used to render `Pie` Series.
 */
var PieSeries = /** @class */ (function (_super) {
    __extends(PieSeries, _super);
    function PieSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * To get path option, degree, symbolLocation from the point.
     * @private
     */
    PieSeries.prototype.renderPoint = function (point, series, chart, option, seriesGroup, redraw) {
        var sum = series.sumOfPoints;
        var yValue = point.visible ? point.y : 0;
        var degree = (sum) ? ((Math.abs(yValue) / sum) * (this.totalAngle)) : null;
        var start = Math.PI / 180 * ((90 - (360 - this.startAngle)) - 90);
        this.radius = this.isRadiusMapped ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(point.sliceRadius, this.seriesRadius) : this.radius;
        option.d = this.getPathOption(point, degree, this.startAngle % 360, yValue);
        point.midAngle = (this.startAngle - (degree / 2)) % 360;
        point.endAngle = this.startAngle % 360;
        point.symbolLocation = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["degreeToLocation"])(point.midAngle, (this.radius + this.innerRadius) / 2, this.center);
        if (!redraw) {
            seriesGroup.appendChild(chart.renderer.drawPath(option));
            point.degree = degree;
            point.start = start;
        }
        else {
            this.refresh(point, degree, start, chart, option, seriesGroup);
        }
    };
    PieSeries.prototype.refresh = function (point, degree, start, chart, option, seriesGroup) {
        var _this = this;
        var seriesElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(option.id);
        var duration = chart.duration ? chart.duration : 300;
        var currentStartAngle;
        var curentDegree;
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["Animation"]({}).animate(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["createElement"])('div'), {
            duration: duration,
            delay: 0,
            progress: function (args) {
                curentDegree = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["linear"])(args.timeStamp, point.degree, (degree - point.degree), args.duration);
                currentStartAngle = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["linear"])(args.timeStamp, point.start, start - point.start, args.duration);
                currentStartAngle = ((currentStartAngle / (Math.PI / 180)) + 360) % 360;
                seriesElement.setAttribute('d', _this.getPathOption(point, curentDegree, currentStartAngle, point.y));
                if (point.isExplode) {
                    chart.accBaseModule.explodePoints(point.index, chart, true);
                }
                seriesElement.style.visibility = 'visible';
            },
            end: function (args) {
                seriesElement.style.visibility = point.visible ? 'visible' : 'hidden';
                seriesElement.setAttribute('d', option.d);
                point.degree = degree;
                point.start = start;
            }
        });
    };
    /**
     * To get path option from the point.
     */
    PieSeries.prototype.getPathOption = function (point, degree, startAngle, yValue) {
        if (!degree) {
            return '';
        }
        var path = this.getPathArc(this.center, startAngle % 360, (startAngle + degree) % 360, this.isRadiusMapped ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(point.sliceRadius, this.seriesRadius) : this.radius, this.innerRadius);
        //let path: string = this.getPathArc(this.center, startAngle % 360, (startAngle + degree) % 360, this.radius, this.innerRadius);
        this.startAngle += degree;
        return path;
    };
    /**
     * To animate the pie series.
     * @private
     */
    PieSeries.prototype.animateSeries = function (accumulation, option, series, slice) {
        var groupId = accumulation.element.id + 'SeriesGroup' + series.index;
        if (series.animation.enable && accumulation.animateSeries) {
            var clippath = accumulation.renderer.createClipPath({ id: groupId + '_clipPath' });
            var path = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["PathOption"](groupId + '_slice', 'transparent', 1, 'transparent', 1, '', '');
            var clipslice = accumulation.renderer.drawPath(path);
            clippath.appendChild(clipslice);
            accumulation.svgObject.appendChild(clippath);
            slice.setAttribute('style', 'clip-path:url(#' + clippath.id + ')');
            this.doAnimation(clipslice, series);
        }
    };
    /**
     * To get the module name of the Pie series.
     */
    PieSeries.prototype.getModuleName = function () {
        return 'PieSeries';
    };
    /**
     * To destroy the pie series.
     * @return {void}
     * @private
     */
    PieSeries.prototype.destroy = function (accumulation) {
        /**
         * Destroy method calling here
         */
    };
    return PieSeries;
}(_renderer_pie_base__WEBPACK_IMPORTED_MODULE_2__["PieBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pyramid-series.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/pyramid-series.js ***!
  \***********************************************************************************************/
/*! exports provided: PyramidSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PyramidSeries", function() { return PyramidSeries; });
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _triangular_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./triangular-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/triangular-base.js");
/**
 * Defines the behavior of a pyramid series
 */
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * PyramidSeries module used to render `Pyramid` Series.
 */
var PyramidSeries = /** @class */ (function (_super) {
    __extends(PyramidSeries, _super);
    function PyramidSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the path of a pyramid segment
     */
    PyramidSeries.prototype.getSegmentData = function (point, series, chart) {
        var area = series.triangleSize;
        //top of th series
        var seriesTop = chart.initialClipRect.y + (chart.initialClipRect.height - area.height) / 2;
        var points = [];
        //consider, if the point is exploded
        var offset = 0;
        var extraSpace = (chart.initialClipRect.width - series.triangleSize.width) / 2;
        var emptySpaceAtLeft = extraSpace + chart.initialClipRect.x;
        //top and bottom
        var top = point.yRatio;
        var bottom = point.yRatio + point.heightRatio;
        //width of the top and bottom edge
        var topRadius = 0.5 * (1 - point.yRatio);
        var bottomRadius = 0.5 * (1 - bottom);
        top += seriesTop / area.height;
        bottom += seriesTop / area.height;
        var line1 = {
            x: emptySpaceAtLeft + offset + topRadius * area.width,
            y: top * area.height
        };
        var line2 = {
            x: emptySpaceAtLeft + offset + (1 - topRadius) * area.width,
            y: top * area.height
        };
        var line3 = {
            x: emptySpaceAtLeft + offset + (1 - bottomRadius) * area.width,
            y: bottom * area.height
        };
        var line4 = {
            x: emptySpaceAtLeft + offset + bottomRadius * area.width,
            y: bottom * area.height
        };
        var polygon = [line1, line2, line3, line4];
        this.setLabelLocation(series, point, polygon);
        var direction = this.findPath(polygon);
        return direction;
    };
    /**
     * Initializes the size of the pyramid segments
     * @private
     */
    PyramidSeries.prototype.initializeSizeRatio = function (points, series) {
        if (series.pyramidMode === 'Linear') {
            _super.prototype.initializeSizeRatio.call(this, points, series, true);
        }
        else {
            this.calculateSurfaceSegments(series);
        }
    };
    /**
     * Defines the size of the pyramid segments, the surface of that will reflect the values
     */
    PyramidSeries.prototype.calculateSurfaceSegments = function (series) {
        var count = series.points.length;
        var sumOfValues = series.sumOfPoints;
        var yRatio = 0;
        var y = [];
        var height = [];
        var gapRatio = Math.min(0, Math.max(series.gapRatio, 1));
        var gapHeight = gapRatio / (count - 1);
        var preSum = this.getSurfaceHeight(0, sumOfValues);
        var currY = 0;
        for (var i = 0; i < count; i++) {
            if (series.points[i].visible) {
                y[i] = currY;
                height[i] = this.getSurfaceHeight(currY, Math.abs(series.points[i].y));
                currY += height[i] + gapHeight * preSum;
            }
        }
        var coef = 1 / (currY - gapHeight * preSum);
        for (var i = 0; i < count; i++) {
            if (series.points[i].visible) {
                series.points[i].yRatio = coef * y[i];
                series.points[i].heightRatio = coef * height[i];
            }
        }
    };
    /**
     * Finds the height of pyramid segment
     */
    PyramidSeries.prototype.getSurfaceHeight = function (y, surface) {
        var result = this.solveQuadraticEquation(1, 2 * y, -surface);
        return result;
    };
    /**
     * Solves quadratic equation
     */
    PyramidSeries.prototype.solveQuadraticEquation = function (a, b, c) {
        var root1;
        var root2;
        var d = b * b - 4 * a * c;
        if (d >= 0) {
            var sd = Math.sqrt(d);
            root1 = (-b - sd) / (2 * a);
            root2 = (-b + sd) / (2 * a);
            return Math.max(root1, root2);
        }
        return 0;
    };
    /**
     * Renders a pyramid segment
     */
    PyramidSeries.prototype.renderPoint = function (point, series, chart, options, seriesGroup, redraw) {
        if (!point.visible) {
            Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["removeElement"])(options.id);
            return null;
        }
        options.d = this.getSegmentData(point, series, chart);
        point.midAngle = 0;
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(false, seriesGroup, chart.renderer.drawPath(options), redraw);
        if (point.isExplode) {
            chart.accBaseModule.explodePoints(point.index, chart, true);
        }
    };
    /**
     * To get the module name of the Pyramid series.
     */
    PyramidSeries.prototype.getModuleName = function () {
        return 'PyramidSeries';
    };
    /**
     * To destroy the pyramid series
     * @return {void}
     * @private
     */
    PyramidSeries.prototype.destroy = function (accumulation) {
        /**
         * Destroys the pyramid series
         */
    };
    return PyramidSeries;
}(_triangular_base__WEBPACK_IMPORTED_MODULE_2__["TriangularBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/triangular-base.js":
/*!************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/triangular-base.js ***!
  \************************************************************************************************/
/*! exports provided: TriangularBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TriangularBase", function() { return TriangularBase; });
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _accumulation_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./accumulation-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/renderer/accumulation-base.js");
/**
 * Defines the common behavior of funnel and pyramid series
 */
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * TriangularBase is used to calculate base functions for funnel/pyramid series.
 */
var TriangularBase = /** @class */ (function (_super) {
    __extends(TriangularBase, _super);
    function TriangularBase() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Initializes the properties of funnel/pyramid series
     * @private
     */
    TriangularBase.prototype.initProperties = function (chart, series) {
        var actualChartArea = chart.initialClipRect;
        series.triangleSize = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["Size"](Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.width, actualChartArea.width), Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.height, actualChartArea.height));
        series.neckSize = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["Size"](Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.neckWidth, actualChartArea.width), Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.neckHeight, actualChartArea.height));
        this.defaultLabelBound(series, series.dataLabel.visible, series.dataLabel.position, chart);
        if (series.explodeOffset === '30%') {
            series.explodeOffset = '25px';
        }
        chart.explodeDistance = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stringToNumber"])(series.explodeOffset, actualChartArea.width);
        var points = series.points;
        this.initializeSizeRatio(points, series);
    };
    /**
     * Initializes the size of the pyramid/funnel segments
     * @private
     */
    TriangularBase.prototype.initializeSizeRatio = function (points, series, reverse) {
        if (reverse === void 0) { reverse = false; }
        var sumOfPoints = series.sumOfPoints;
        //Limiting the ratio within the range of 0 to 1
        var gapRatio = Math.min(Math.max(series.gapRatio, 0), 1);
        //% equivalence of a value 1
        var coEff = 1 / (sumOfPoints * (1 + gapRatio / (1 - gapRatio)));
        var spacing = gapRatio / (points.length - 1);
        var y = 0;
        //starting from bottom
        for (var i = points.length - 1; i >= 0; i--) {
            var index = reverse ? points.length - 1 - i : i;
            if (points[index].visible) {
                var height = coEff * points[index].y;
                points[index].yRatio = y;
                points[index].heightRatio = height;
                y += height + spacing;
            }
        }
    };
    /**
     * Marks the label location from the set of points that forms a pyramid/funnel segment
     * @private
     */
    TriangularBase.prototype.setLabelLocation = function (series, point, points) {
        var last = points.length - 1;
        var bottom = series.type === 'Funnel' ? points.length - 2 : points.length - 1;
        var x = (points[0].x + points[bottom].x) / 2;
        var right = (points[1].x + points[bottom - 1].x) / 2;
        point.region = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["Rect"](x, points[0].y, right - x, points[bottom].y - points[0].y);
        point.symbolLocation = {
            x: point.region.x + point.region.width / 2,
            y: point.region.y + point.region.height / 2
        };
        point.labelOffset = {
            x: point.symbolLocation.x - (points[0].x + points[last].x) / 2,
            y: point.symbolLocation.y - (points[0].y + points[last].y) / 2
        };
    };
    /**
     * Finds the path to connect the list of points
     * @private
     */
    TriangularBase.prototype.findPath = function (locations) {
        var path = 'M';
        for (var i = 0; i < locations.length; i++) {
            path += locations[i].x + ' ' + locations[i].y;
            if (i !== locations.length - 1) {
                path += ' L';
            }
        }
        return path;
    };
    /**
     * To calculate data-label bounds
     * @private
     */
    TriangularBase.prototype.defaultLabelBound = function (series, visible, position, chart) {
        var x = (chart.initialClipRect.width - series.triangleSize.width) / 2;
        var y = (chart.initialClipRect.height - series.triangleSize.height) / 2;
        var accumulationBound = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["Rect"](x, y, series.triangleSize.width, series.triangleSize.height);
        series.labelBound = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["Rect"](accumulationBound.x, accumulationBound.y, accumulationBound.width + accumulationBound.x, accumulationBound.height + accumulationBound.y);
        series.accumulationBound = accumulationBound;
        if (visible && position === 'Outside') {
            series.labelBound = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["Rect"](Infinity, Infinity, -Infinity, -Infinity);
        }
    };
    return TriangularBase;
}(_accumulation_base__WEBPACK_IMPORTED_MODULE_2__["AccumulationBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/user-interaction/selection.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/user-interaction/selection.js ***!
  \**************************************************************************************************/
/*! exports provided: AccumulationSelection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationSelection", function() { return AccumulationSelection; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _model_acc_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/acc-base */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/model/acc-base.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _common_user_interaction_selection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/user-interaction/selection */ "./node_modules/@syncfusion/ej2-charts/src/common/user-interaction/selection.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * AccumulationChart Selection src file
 */





/**
 * `AccumulationSelection` module handles the selection for accumulation chart.
 */
var AccumulationSelection = /** @class */ (function (_super) {
    __extends(AccumulationSelection, _super);
    function AccumulationSelection(accumulation) {
        var _this = _super.call(this, accumulation) || this;
        _this.renderer = accumulation.renderer;
        return _this;
    }
    /**
     * To initialize the private variables
     */
    AccumulationSelection.prototype.initPrivateVariables = function (accumulation) {
        this.styleId = accumulation.element.id + '_ej2_chart_selection';
        this.unselected = accumulation.element.id + '_ej2_deselected';
        this.selectedDataIndexes = [];
        this.rectPoints = null;
    };
    /**
     * Invoke selection for rendered chart.
     * @param  {AccumulationChart} chart - Define the chart to invoke the selection.
     * @return {void}
     */
    AccumulationSelection.prototype.invokeSelection = function (accumulation) {
        this.initPrivateVariables(accumulation);
        this.series = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, accumulation.visibleSeries, null, true);
        this.seriesStyles();
        this.selectDataIndex(this.concatIndexes(accumulation.selectedDataIndexes, this.selectedDataIndexes), accumulation);
    };
    /**
     * To get series selection style by series.
     */
    AccumulationSelection.prototype.generateStyle = function (series) {
        return (series.selectionStyle || this.styleId + '_series_' + series.index);
    };
    /**
     * To get elements by index, series
     */
    AccumulationSelection.prototype.findElements = function (accumulation, series, index) {
        return [this.getElementByIndex(index)];
    };
    /**
     * To get series point element by index
     */
    AccumulationSelection.prototype.getElementByIndex = function (index) {
        var elementId = this.control.element.id + '_Series_' + index.series + '_Point_' + index.point;
        return document.getElementById(elementId);
    };
    /**
     * To calculate selected elements on mouse click or touch
     * @private
     */
    AccumulationSelection.prototype.calculateSelectedElements = function (accumulation, event) {
        if (event.target.id.indexOf(accumulation.element.id + '_') === -1) {
            return;
        }
        if (event.target.id.indexOf('_Series_') > -1 || event.target.id.indexOf('_datalabel_') > -1) {
            this.performSelection(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["indexFinder"])(event.target.id), accumulation, event.target);
        }
    };
    /**
     * To perform the selection process based on index and element.
     */
    AccumulationSelection.prototype.performSelection = function (index, accumulation, element) {
        element = element.id.indexOf('datalabel') > -1 ?
            accumulation.getSeriesElement().childNodes[index.series].childNodes[index.point]
            : element;
        switch (accumulation.selectionMode) {
            case 'Point':
                if (!isNaN(index.point)) {
                    this.selection(accumulation, index, [element]);
                    this.blurEffect(accumulation.element.id, accumulation.visibleSeries);
                }
                break;
        }
    };
    /**
     * To select the element by index. Adding or removing selection style class name.
     */
    AccumulationSelection.prototype.selection = function (accumulation, index, selectedElements) {
        if (!accumulation.isMultiSelect) {
            this.removeMultiSelectEelments(accumulation, this.selectedDataIndexes, index, accumulation.series);
        }
        var className = selectedElements[0] && (selectedElements[0].getAttribute('class') || '');
        if (selectedElements[0] && className.indexOf(this.getSelectionClass(selectedElements[0].id)) > -1) {
            this.removeStyles(selectedElements, index);
            this.addOrRemoveIndex(this.selectedDataIndexes, index);
        }
        else {
            this.applyStyles(selectedElements, index);
            this.addOrRemoveIndex(this.selectedDataIndexes, index, true);
        }
    };
    /**
     * To redraw the selection process on accumulation chart refresh.
     * @private
     */
    AccumulationSelection.prototype.redrawSelection = function (accumulation, oldMode) {
        var selectedDataIndexes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], this.selectedDataIndexes, null, true);
        this.removeSelectedElements(accumulation, this.selectedDataIndexes);
        this.blurEffect(accumulation.element.id, accumulation.visibleSeries);
        this.selectDataIndex(selectedDataIndexes, accumulation);
    };
    /**
     * To remove the selected elements style classes by indexes.
     */
    AccumulationSelection.prototype.removeSelectedElements = function (accumulation, indexes) {
        var seriesgroup = accumulation.getSeriesElement();
        for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
            var index = indexes_1[_i];
            this.removeStyles([this.getElementByIndex(index)], index);
        }
    };
    /**
     * To perform the selection for legend elements.
     * @private
     */
    AccumulationSelection.prototype.legendSelection = function (accumulation, series, pointIndex) {
        var element = accumulation.getSeriesElement().childNodes[series].childNodes[pointIndex];
        var seriesStyle = this.generateStyle(accumulation.visibleSeries[series]);
        var seriesElements = accumulation.getSeriesElement().childNodes[series].childNodes[pointIndex];
        this.selection(accumulation, new _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Index"](series, pointIndex), [seriesElements]);
        this.blurEffect(accumulation.element.id, accumulation.visibleSeries);
    };
    /**
     * To select the element by selected data indexes.
     */
    AccumulationSelection.prototype.selectDataIndex = function (indexes, accumulation) {
        var element;
        for (var _i = 0, indexes_2 = indexes; _i < indexes_2.length; _i++) {
            var index = indexes_2[_i];
            element = this.getElementByIndex(index);
            if (element) {
                this.performSelection(index, accumulation, element);
            }
        }
    };
    /**
     * To remove the selection styles for multi selection process.
     */
    AccumulationSelection.prototype.removeMultiSelectEelments = function (accumulation, index, currentIndex, seriesCollection) {
        var series;
        for (var i = 0; i < index.length; i++) {
            series = seriesCollection[index[i].series];
            if (!this.checkEquals(index[i], currentIndex)) {
                this.removeStyles(this.findElements(accumulation, series, index[i]), index[i]);
                index.splice(i, 1);
                i--;
            }
        }
    };
    /**
     * To apply the opacity effect for accumulation chart series elements.
     */
    AccumulationSelection.prototype.blurEffect = function (pieId, visibleSeries) {
        var visibility = this.checkPointVisibility(this.selectedDataIndexes); // legend click scenario
        for (var _i = 0, visibleSeries_1 = visibleSeries; _i < visibleSeries_1.length; _i++) {
            var series = visibleSeries_1[_i];
            if (series.visible) {
                this.checkSelectionElements(document.getElementById(pieId + '_SeriesCollection'), this.generateStyle(series), visibility);
            }
        }
    };
    /**
     * To check selection elements by style class name.
     */
    AccumulationSelection.prototype.checkSelectionElements = function (element, className, visibility) {
        var children = element.childNodes[0].childNodes;
        var legendShape;
        var elementClass;
        var parentClass;
        for (var i = 0; i < children.length; i++) {
            elementClass = children[i].getAttribute('class') || '';
            parentClass = children[i].parentNode.getAttribute('class') || '';
            if (elementClass.indexOf(className) === -1 && parentClass.indexOf(className) === -1 && visibility) {
                this.addSvgClass(children[i], this.unselected);
            }
            else {
                this.removeSvgClass(children[i], this.unselected);
            }
            if (this.control.accumulationLegendModule && this.control.legendSettings.visible) {
                legendShape = document.getElementById(this.control.element.id + '_chart_legend_shape_' + i);
                if (legendShape) {
                    if (elementClass.indexOf(className) === -1 && parentClass.indexOf(className) === -1 && visibility) {
                        this.addSvgClass(legendShape, this.unselected);
                    }
                    else {
                        this.removeSvgClass(legendShape, this.unselected);
                    }
                }
            }
        }
    };
    /**
     * To apply selection style for elements.
     */
    AccumulationSelection.prototype.applyStyles = function (elements, index) {
        for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
            var element = elements_1[_i];
            var legendShape = void 0;
            if (element) {
                if (this.control.accumulationLegendModule && this.control.legendSettings.visible) {
                    legendShape = document.getElementById(this.control.element.id + '_chart_legend_shape_' + index.point);
                    this.removeSvgClass(legendShape, this.unselected);
                    this.addSvgClass(legendShape, this.getSelectionClass(legendShape.id));
                }
                this.removeSvgClass(element.parentNode, this.unselected);
                this.removeSvgClass(element, this.unselected);
                this.addSvgClass(element, this.getSelectionClass(element.id));
            }
        }
    };
    /**
     * To get selection style class name by id
     */
    AccumulationSelection.prototype.getSelectionClass = function (id) {
        return this.generateStyle(this.control.series[Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["indexFinder"])(id).series]);
    };
    /**
     * To remove selection style for elements.
     */
    AccumulationSelection.prototype.removeStyles = function (elements, index) {
        var legendShape;
        for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
            var element = elements_2[_i];
            if (element) {
                if (this.control.accumulationLegendModule && this.control.legendSettings.visible) {
                    legendShape = document.getElementById(this.control.element.id + '_chart_legend_shape_' + index.point);
                    this.removeSvgClass(legendShape, this.getSelectionClass(legendShape.id));
                }
                this.removeSvgClass(element, this.getSelectionClass(element.id));
            }
        }
    };
    /**
     * To apply or remove selected elements index.
     */
    AccumulationSelection.prototype.addOrRemoveIndex = function (indexes, index, add) {
        for (var i = 0; i < indexes.length; i++) {
            if (this.checkEquals(indexes[i], index)) {
                indexes.splice(i, 1);
                i--;
            }
        }
        if (add) {
            indexes.push(index);
        }
    };
    /**
     * To check two index, point and series are equal
     */
    AccumulationSelection.prototype.checkEquals = function (first, second) {
        return ((first.point === second.point) && (first.series === second.series));
    };
    /**
     * To check selected points are visibility
     */
    AccumulationSelection.prototype.checkPointVisibility = function (selectedDataIndexes) {
        var visible = false;
        for (var _i = 0, selectedDataIndexes_1 = selectedDataIndexes; _i < selectedDataIndexes_1.length; _i++) {
            var data = selectedDataIndexes_1[_i];
            if (Object(_model_acc_base__WEBPACK_IMPORTED_MODULE_2__["pointByIndex"])(data.point, this.control.visibleSeries[0].points).visible) {
                visible = true;
                break;
            }
        }
        return visible;
    };
    /**
     * Get module name.
     */
    AccumulationSelection.prototype.getModuleName = function () {
        return 'AccumulationSelection';
    };
    /**
     * To destroy the selection.
     * @return {void}
     * @private
     */
    AccumulationSelection.prototype.destroy = function (accumulation) {
        // Destroy method performed here
    };
    return AccumulationSelection;
}(_common_user_interaction_selection__WEBPACK_IMPORTED_MODULE_4__["BaseSelection"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/user-interaction/tooltip.js":
/*!************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/user-interaction/tooltip.js ***!
  \************************************************************************************************/
/*! exports provided: AccumulationTooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationTooltip", function() { return AccumulationTooltip; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _common_user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/user-interaction/tooltip */ "./node_modules/@syncfusion/ej2-charts/src/common/user-interaction/tooltip.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * AccumulationChart Tooltip file
 */




/**
 * `AccumulationTooltip` module is used to render tooltip for accumulation chart.
 */
var AccumulationTooltip = /** @class */ (function (_super) {
    __extends(AccumulationTooltip, _super);
    function AccumulationTooltip(accumulation) {
        var _this = _super.call(this, accumulation) || this;
        _this.accumulation = accumulation;
        _this.addEventListener();
        return _this;
    }
    /**
     * @hidden
     */
    AccumulationTooltip.prototype.addEventListener = function () {
        if (this.accumulation.isDestroyed) {
            return;
        }
        this.accumulation.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave', this.mouseLeaveHandler, this);
        this.accumulation.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMoveHandler, this);
        this.accumulation.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpHandler, this);
    };
    AccumulationTooltip.prototype.mouseLeaveHandler = function (e) {
        this.removeTooltip(1000);
    };
    AccumulationTooltip.prototype.mouseUpHandler = function (e) {
        var control = this.accumulation;
        if (control.tooltip.enable && control.isTouch && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(control.mouseX, control.mouseY, control.initialClipRect)) {
            this.tooltip(e);
            this.removeTooltip(2000);
        }
    };
    AccumulationTooltip.prototype.mouseMoveHandler = function (e) {
        var control = this.accumulation;
        // Tooltip for chart series.    
        if (control.tooltip.enable && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(control.mouseX, control.mouseY, control.initialClipRect)) {
            this.tooltip(e);
        }
    };
    /**
     * Renders the tooltip.
     * @param  {PointerEvent} event - Mouse move event.
     * @return {void}
     */
    AccumulationTooltip.prototype.tooltip = function (event) {
        var svgElement = this.getElement(this.element.id + '_tooltip_svg');
        var isTooltip = svgElement && parseInt(svgElement.getAttribute('opacity'), 10) > 0;
        var tooltipDiv = this.getTooltipElement(isTooltip);
        this.renderSeriesTooltip(event, this.accumulation, !isTooltip, tooltipDiv);
    };
    AccumulationTooltip.prototype.renderSeriesTooltip = function (e, chart, isFirst, tooltipDiv) {
        var data = this.getPieData(e, chart, chart.mouseX, chart.mouseY);
        var rect = chart.initialClipRect;
        this.currentPoints = [];
        if (data.point && (!this.previousPoints[0] || (this.previousPoints[0].point !== data.point))) {
            if (this.pushData(data, isFirst, tooltipDiv, false)) {
                if (this.triggerEvent(data, isFirst, this.getTooltipText(data, chart.tooltip))) {
                    this.createTooltip(chart, isFirst, this.findHeader(data), data.point.symbolLocation, data.series.clipRect, data.point, ['Circle'], 0, rect, null, data.point);
                }
                else {
                    this.removeHighlight(this.control);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getElement(this.element.id + '_tooltip'));
                }
                this.isRemove = true;
            }
        }
        else {
            if (!data.point && this.isRemove) {
                this.removeTooltip(1000);
                this.isRemove = false;
            }
        }
    };
    AccumulationTooltip.prototype.getPieData = function (e, chart, x, y) {
        var target = e.target;
        var id = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["indexFinder"])(target.id, true);
        if (!isNaN(id.series)) {
            var seriesIndex = id.series;
            var pointIndex = id.point;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(seriesIndex) && !isNaN(seriesIndex) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(pointIndex) && !isNaN(pointIndex)) {
                var series = this.getSeriesFromIndex(seriesIndex, chart.visibleSeries);
                if (series.enableTooltip) {
                    return new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["AccPointData"](series.points[pointIndex], series);
                }
            }
        }
        return new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["AccPointData"](null, null);
    };
    /**
     * To get series from index
     */
    AccumulationTooltip.prototype.getSeriesFromIndex = function (index, visibleSeries) {
        return visibleSeries[0];
    };
    AccumulationTooltip.prototype.getTooltipText = function (data, tooltip) {
        var series = data.series;
        var format = this.accumulation.useGroupingSeparator ? '${point.x} : <b>${point.label}</b>'
            : '${point.x} : <b>${point.y}</b>';
        format = tooltip.format ? tooltip.format : format;
        return this.parseTemplate(data.point, series, format);
    };
    AccumulationTooltip.prototype.findHeader = function (data) {
        if (this.header === '') {
            return '';
        }
        this.header = this.parseTemplate(data.point, data.series, this.header);
        if (this.header.replace(/<b>/g, '').replace(/<\/b>/g, '').trim() !== '') {
            return this.header;
        }
        return '';
    };
    AccumulationTooltip.prototype.parseTemplate = function (point, series, format) {
        var value;
        var textValue;
        for (var _i = 0, _a = Object.keys(point); _i < _a.length; _i++) {
            var dataValue = _a[_i];
            value = new RegExp('${point' + '.' + dataValue + '}', 'gm');
            format = format.replace(value.source, point[dataValue]);
        }
        for (var _b = 0, _c = Object.keys(Object.getPrototypeOf(series)); _b < _c.length; _b++) {
            var dataValue = _c[_b];
            value = new RegExp('${series' + '.' + dataValue + '}', 'gm');
            textValue = series[dataValue];
            format = format.replace(value.source, textValue);
        }
        return format;
    };
    /**
     * Get module name
     */
    AccumulationTooltip.prototype.getModuleName = function () {
        return 'AccumulationTooltip';
    };
    /**
     * To destroy the Tooltip.
     * @return {void}
     * @private
     */
    AccumulationTooltip.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    return AccumulationTooltip;
}(_common_user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_2__["BaseTooltip"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/annotation/annotation.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/annotation/annotation.js ***!
  \********************************************************************************/
/*! exports provided: ChartAnnotation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartAnnotation", function() { return ChartAnnotation; });
/* harmony import */ var _common_annotation_annotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/annotation/annotation */ "./node_modules/@syncfusion/ej2-charts/src/common/annotation/annotation.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `ChartAnnotation` module handles the annotation for chart.
 */
var ChartAnnotation = /** @class */ (function (_super) {
    __extends(ChartAnnotation, _super);
    /**
     * Constructor for chart annotation.
     * @private.
     */
    function ChartAnnotation(control, annotations) {
        var _this = _super.call(this, control) || this;
        _this.chart = control;
        _this.annotations = annotations;
        return _this;
    }
    /**
     * Method to render the annotation for chart
     * @param element
     * @private
     */
    ChartAnnotation.prototype.renderAnnotations = function (element) {
        var _this = this;
        this.annotations = this.chart.annotations;
        this.parentElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["redrawElement"])(this.chart.redraw, this.chart.element.id + '_Annotation_Collections') ||
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["createElement"])('div', {
                id: this.chart.element.id + '_Annotation_Collections'
            });
        this.annotations.map(function (annotation, index) {
            _this.processAnnotation(annotation, index, _this.parentElement);
        });
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendElement"])(this.parentElement, element, this.chart.redraw);
    };
    /**
     * To destroy the annotation.
     * @return {void}
     * @private
     */
    ChartAnnotation.prototype.destroy = function (control) {
        // Destroy method performed here
    };
    /**
     * Get module name.
     */
    ChartAnnotation.prototype.getModuleName = function () {
        // Returns te module name
        return 'Annotation';
    };
    return ChartAnnotation;
}(_common_annotation_annotation__WEBPACK_IMPORTED_MODULE_0__["AnnotationBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis-helper.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis-helper.js ***!
  \***************************************************************************/
/*! exports provided: NiceInterval */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NiceInterval", function() { return NiceInterval; });
/* harmony import */ var _axis_double_axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../axis/double-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/double-axis.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * Common axis classes
 * @private
 */
var NiceInterval = /** @class */ (function (_super) {
    __extends(NiceInterval, _super);
    function NiceInterval() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Method to calculate numeric datetime interval
     */
    NiceInterval.prototype.calculateDateTimeNiceInterval = function (axis, size, start, end, isChart) {
        if (isChart === void 0) { isChart = true; }
        var oneDay = 24 * 60 * 60 * 1000;
        var startDate = new Date(start);
        var endDate = new Date(end);
        //var axisInterval ;
        var totalDays = (Math.abs((startDate.getTime() - endDate.getTime()) / (oneDay)));
        var interval;
        axis.actualIntervalType = axis.intervalType;
        var type = axis.intervalType;
        switch (type) {
            case 'Years':
                interval = this.calculateNumericNiceInterval(axis, totalDays / 365, size);
                break;
            case 'Quarter':
                interval = this.calculateNumericNiceInterval(axis, (totalDays / 365) * 4, size);
                break;
            case 'Months':
                interval = this.calculateNumericNiceInterval(axis, totalDays / 30, size);
                break;
            case 'Weeks':
                interval = this.calculateNumericNiceInterval(axis, totalDays / 7, size);
                break;
            case 'Days':
                interval = this.calculateNumericNiceInterval(axis, totalDays, size);
                break;
            case 'Hours':
                interval = this.calculateNumericNiceInterval(axis, totalDays * 24, size);
                break;
            case 'Minutes':
                interval = this.calculateNumericNiceInterval(axis, totalDays * 24 * 60, size);
                break;
            case 'Seconds':
                interval = this.calculateNumericNiceInterval(axis, totalDays * 24 * 60 * 60, size);
                break;
            case 'Auto':
                interval = this.calculateNumericNiceInterval(axis, totalDays / 365, size);
                if (interval >= 1) {
                    axis.actualIntervalType = 'Years';
                    return interval;
                }
                interval = this.calculateNumericNiceInterval(axis, (totalDays / 365) * 4, size);
                if (interval >= 1 && !isChart) {
                    axis.actualIntervalType = 'Quarter';
                    return interval;
                }
                interval = this.calculateNumericNiceInterval(axis, totalDays / 30, size);
                if (interval >= 1) {
                    axis.actualIntervalType = 'Months';
                    return interval;
                }
                interval = this.calculateNumericNiceInterval(axis, totalDays / 7, size);
                if (interval >= 1 && !isChart) {
                    axis.actualIntervalType = 'Weeks';
                    return interval;
                }
                interval = this.calculateNumericNiceInterval(axis, totalDays, size);
                if (interval >= 1) {
                    axis.actualIntervalType = 'Days';
                    return interval;
                }
                interval = this.calculateNumericNiceInterval(axis, totalDays * 24, size);
                if (interval >= 1) {
                    axis.actualIntervalType = 'Hours';
                    return interval;
                }
                interval = this.calculateNumericNiceInterval(axis, totalDays * 24 * 60, size);
                if (interval >= 1) {
                    axis.actualIntervalType = 'Minutes';
                    return interval;
                }
                interval = this.calculateNumericNiceInterval(axis, totalDays * 24 * 60 * 60, size);
                axis.actualIntervalType = 'Seconds';
                return interval;
        }
        return interval;
    };
    /**
     * To get the skeleton for the DateTime axis.
     * @return {string}
     * @private
     */
    NiceInterval.prototype.getSkeleton = function (axis, currentValue, previousValue) {
        var skeleton;
        var intervalType = axis.actualIntervalType;
        if (axis.skeleton) {
            return axis.skeleton;
        }
        if (intervalType === 'Years') {
            skeleton = axis.isChart ? (axis.valueType === 'DateTime' ? 'y' : 'yMMM') : 'y';
        }
        else if (intervalType === 'Quarter') {
            skeleton = 'yMMM';
        }
        else if (intervalType === 'Months') {
            skeleton = axis.isChart ? 'MMMd' : 'MMM';
        }
        else if (intervalType === 'Weeks') {
            skeleton = 'MEd';
        }
        else if (intervalType === 'Days') {
            skeleton = axis.isChart ? this.getDayFormat(axis, currentValue, previousValue) : 'MMMd';
        }
        else if (intervalType === 'Hours') {
            skeleton = axis.isChart ? (axis.valueType === 'DateTime' ? 'Hm' : 'EHm') : 'h';
        }
        else if (intervalType === 'Minutes') {
            skeleton = axis.isChart ? 'Hms' : 'hm';
        }
        else {
            skeleton = axis.isChart ? 'Hms' : 'hms';
        }
        return skeleton;
    };
    /**
     * Get intervalType month format
     * @param currentValue
     * @param previousValue
     */
    NiceInterval.prototype.getMonthFormat = function (currentValue, previousValue) {
        return ((new Date(currentValue).getFullYear() === new Date(previousValue).getFullYear()) ? 'MMM' : 'y MMM');
    };
    /**
     * Get intervalType day label format for the axis
     * @param axis
     * @param currentValue
     * @param previousValue
     */
    NiceInterval.prototype.getDayFormat = function (axis, currentValue, previousValue) {
        return (axis.valueType === 'DateTime' ?
            ((new Date(currentValue).getMonth() !== new Date(previousValue).getMonth()) ? 'MMMd' : 'd') : 'yMd');
    };
    /**
     * Find label format for axis
     * @param axis
     * @param currentValue
     * @param previousValue
     * @private
     */
    NiceInterval.prototype.findCustomFormats = function (axis, currentValue, previousValue) {
        var labelFormat = axis.labelFormat ? axis.labelFormat : '';
        if (axis.isChart && !axis.skeleton && axis.actualIntervalType === 'Months' && !labelFormat) {
            labelFormat = axis.valueType === 'DateTime' ? this.getMonthFormat(currentValue, previousValue) : 'yMMM';
        }
        return labelFormat;
    };
    return NiceInterval;
}(_axis_double_axis__WEBPACK_IMPORTED_MODULE_0__["Double"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis.js ***!
  \********************************************************************/
/*! exports provided: Row, Column, MajorGridLines, MinorGridLines, AxisLine, MajorTickLines, MinorTickLines, CrosshairTooltip, Axis, VisibleLabels */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return Row; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return Column; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MajorGridLines", function() { return MajorGridLines; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinorGridLines", function() { return MinorGridLines; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AxisLine", function() { return AxisLine; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MajorTickLines", function() { return MajorTickLines; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinorTickLines", function() { return MinorTickLines; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CrosshairTooltip", function() { return CrosshairTooltip; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Axis", function() { return Axis; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VisibleLabels", function() { return VisibleLabels; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _utils_double_range__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/double-range */ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/double-range.js");
/* harmony import */ var _axis_double_axis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../axis/double-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/double-axis.js");
/* harmony import */ var _common_model_theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _model_chart_base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../model/chart-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/model/chart-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 axisPadding = 10;
/**
 * Configures the `rows` of the chart.
 */
var Row = /** @class */ (function (_super) {
    __extends(Row, _super);
    function Row() {
        /**
         * The height of the row as a string accept input both as '100px' and '100%'.
         * If specified as '100%, row renders to the full height of its chart.
         * @default '100%'
         */
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /** @private */
        _this.axes = [];
        /** @private */
        _this.nearSizes = [];
        /** @private */
        _this.farSizes = [];
        return _this;
    }
    /**
     * Measure the row size
     * @return {void}
     * @private
     */
    Row.prototype.computeSize = function (axis, clipRect, scrollBarHeight) {
        var width = 0;
        var innerPadding = 5;
        if (axis.visible) {
            width += (axis.findTickSize(axis.crossInAxis) + scrollBarHeight +
                axis.findLabelSize(axis.crossInAxis, innerPadding) + axis.lineStyle.width * 0.5);
        }
        if (axis.opposedPosition) {
            this.farSizes.push(width);
        }
        else {
            this.nearSizes.push(width);
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')
    ], Row.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Border"])
    ], Row.prototype, "border", void 0);
    return Row;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the `columns` of the chart.
 */
var Column = /** @class */ (function (_super) {
    __extends(Column, _super);
    function Column() {
        /**
         * The width of the column as a string accepts input both as like '100px' or '100%'.
         * If specified as '100%, column renders to the full width of its chart.
         * @default '100%'
         */
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /** @private */
        _this.axes = [];
        /** @private */
        _this.nearSizes = [];
        /** @private */
        _this.farSizes = [];
        /** @private */
        _this.padding = 0;
        return _this;
    }
    /**
     * Measure the column size
     * @return {void}
     * @private
     */
    Column.prototype.computeSize = function (axis, clipRect, scrollBarHeight) {
        var height = 0;
        var innerPadding = 5;
        if (axis.visible) {
            height += (axis.findTickSize(axis.crossInAxis) + scrollBarHeight +
                axis.findLabelSize(axis.crossInAxis, innerPadding) + axis.lineStyle.width * 0.5);
        }
        if (axis.opposedPosition) {
            this.farSizes.push(height);
        }
        else {
            this.nearSizes.push(height);
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')
    ], Column.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Border"])
    ], Column.prototype, "border", void 0);
    return Column;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the major grid lines in the `axis`.
 */
var MajorGridLines = /** @class */ (function (_super) {
    __extends(MajorGridLines, _super);
    function MajorGridLines() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], MajorGridLines.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MajorGridLines.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MajorGridLines.prototype, "color", void 0);
    return MajorGridLines;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the minor grid lines in the `axis`.
 */
var MinorGridLines = /** @class */ (function (_super) {
    __extends(MinorGridLines, _super);
    function MinorGridLines() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0.7)
    ], MinorGridLines.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MinorGridLines.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MinorGridLines.prototype, "color", void 0);
    return MinorGridLines;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the axis line of a chart.
 */
var AxisLine = /** @class */ (function (_super) {
    __extends(AxisLine, _super);
    function AxisLine() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], AxisLine.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AxisLine.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AxisLine.prototype, "color", void 0);
    return AxisLine;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the major tick lines.
 */
var MajorTickLines = /** @class */ (function (_super) {
    __extends(MajorTickLines, _super);
    function MajorTickLines() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], MajorTickLines.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], MajorTickLines.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MajorTickLines.prototype, "color", void 0);
    return MajorTickLines;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the minor tick lines.
 */
var MinorTickLines = /** @class */ (function (_super) {
    __extends(MinorTickLines, _super);
    function MinorTickLines() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0.7)
    ], MinorTickLines.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], MinorTickLines.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MinorTickLines.prototype, "color", void 0);
    return MinorTickLines;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the crosshair ToolTip.
 */
var CrosshairTooltip = /** @class */ (function (_super) {
    __extends(CrosshairTooltip, _super);
    function CrosshairTooltip() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], CrosshairTooltip.prototype, "enable", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], CrosshairTooltip.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_6__["Theme"].crosshairLabelFont, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Font"])
    ], CrosshairTooltip.prototype, "textStyle", void 0);
    return CrosshairTooltip;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the axes in the chart.
 * @public
 */
var Axis = /** @class */ (function (_super) {
    __extends(Axis, _super);
    // tslint:disable-next-line:no-any
    function Axis(parent, propName, defaultValue, isArray) {
        var _this = _super.call(this, parent, propName, defaultValue, isArray) || this;
        /** @private */
        _this.visibleLabels = [];
        /** @private */
        _this.series = [];
        /** @private */
        _this.rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Rect"](undefined, undefined, 0, 0);
        /** @private */
        _this.axisBottomLine = null;
        /** @private */
        _this.intervalDivs = [10, 5, 2, 1];
        /** @private */
        _this.angle = _this.labelRotation;
        /** @private */
        _this.isStack100 = false;
        /** @private */
        _this.crossAt = null;
        /** @private */
        _this.updatedRect = null;
        /** @private */
        _this.multiLevelLabelHeight = 0;
        /** @private */
        _this.isChart = true;
        return _this;
    }
    /**
     * The function used to find tick size.
     * @return {number}
     * @private
     */
    Axis.prototype.findTickSize = function (crossAxis) {
        if (this.tickPosition === 'Inside') {
            return 0;
        }
        if (crossAxis && (!crossAxis.visibleRange || this.isInside(crossAxis.visibleRange))) {
            return 0;
        }
        return this.majorTickLines.height;
    };
    /**
     * The function used to find axis position.
     * @return {number}
     * @private
     */
    Axis.prototype.isInside = function (range) {
        return (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["inside"])(this.crossAt, range) ||
            (!this.opposedPosition && this.crossAt >= range.max) || (this.opposedPosition && this.crossAt <= range.min));
    };
    /**
     * The function used to find label Size.
     * @return {number}
     * @private
     */
    Axis.prototype.findLabelSize = function (crossAxis, innerPadding) {
        var titleSize = 0;
        if (this.title) {
            titleSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(this.title, this.titleStyle).height + innerPadding;
        }
        if (this.labelPosition === 'Inside') {
            return titleSize + innerPadding;
        }
        var diff;
        var value;
        var labelSize = titleSize + innerPadding + axisPadding +
            ((this.orientation === 'Vertical') ? this.maxLabelSize.width : this.maxLabelSize.height) + this.multiLevelLabelHeight;
        if (crossAxis && this.placeNextToAxisLine) {
            var range = crossAxis.visibleRange;
            var size = (crossAxis.orientation === 'Horizontal') ? crossAxis.rect.width : crossAxis.rect.height;
            if (!range || !size) {
                return 0;
            }
            else if (this.isInside(range)) {
                value = this.findDifference(crossAxis);
                diff = (value) * (size / range.delta);
                diff = (value) * ((size - (diff < labelSize ? (labelSize - diff) : 0)) / range.delta);
                labelSize = (diff < labelSize) ? (labelSize - diff) : 0;
            }
        }
        return labelSize;
    };
    /**
     * The function used to find axis position.
     * @return {number}
     * @private
     */
    Axis.prototype.updateCrossValue = function (chart) {
        var value = this.crossAt;
        if (value === null || !this.isInside(this.crossInAxis.visibleRange)) {
            this.updatedRect = this.rect;
            return null;
        }
        var range = this.crossInAxis.visibleRange;
        if (!this.opposedPosition) {
            if (this.crossAt > range.max) {
                value = range.max;
            }
        }
        else {
            if (this.crossAt < range.min) {
                value = range.min;
            }
        }
        this.updatedRect = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, this.rect, null, true);
        if (this.orientation === 'Horizontal') {
            value = this.crossInAxis.rect.height - (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(value, this.crossInAxis) * this.crossInAxis.rect.height);
            this.updatedRect.y = this.crossInAxis.rect.y + value;
        }
        else {
            value = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(value, this.crossInAxis) * this.crossInAxis.rect.width;
            this.updatedRect.x = this.crossInAxis.rect.x + value;
        }
    };
    Axis.prototype.findDifference = function (crossAxis) {
        var value = 0;
        if (this.opposedPosition) {
            value = crossAxis.isInversed ? crossAxis.visibleRange.min : crossAxis.visibleRange.max;
        }
        else {
            value = crossAxis.isInversed ? crossAxis.visibleRange.max : crossAxis.visibleRange.min;
        }
        return Math.abs(this.crossAt - value);
    };
    /**
     * Calculate visible range for axis.
     * @return {void}
     * @private
     */
    Axis.prototype.calculateVisibleRange = function (size) {
        if (this.zoomFactor < 1 || this.zoomPosition > 0) {
            var baseRange = this.actualRange;
            var start = void 0;
            var end = void 0;
            if (!this.isInversed) {
                start = this.actualRange.min + this.zoomPosition * this.actualRange.delta;
                end = start + this.zoomFactor * this.actualRange.delta;
            }
            else {
                start = this.actualRange.max - (this.zoomPosition * this.actualRange.delta);
                end = start - (this.zoomFactor * this.actualRange.delta);
            }
            if (start < baseRange.min) {
                end = end + (baseRange.min - start);
                start = baseRange.min;
            }
            if (end > baseRange.max) {
                start = start - (end - baseRange.max);
                end = baseRange.max;
            }
            this.doubleRange = new _utils_double_range__WEBPACK_IMPORTED_MODULE_4__["DoubleRange"](start, end);
            this.visibleRange = { min: this.doubleRange.start, max: this.doubleRange.end,
                delta: this.doubleRange.delta, interval: this.visibleRange.interval };
        }
    };
    /**
     * Triggers the event.
     * @return {void}
     * @private
     */
    Axis.prototype.triggerRangeRender = function (chart, minimum, maximum, interval) {
        var argsData;
        argsData = {
            cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_7__["axisRangeCalculated"], axis: this,
            minimum: minimum, maximum: maximum, interval: interval
        };
        chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_7__["axisRangeCalculated"], argsData);
        if (!argsData.cancel) {
            this.visibleRange = { min: argsData.minimum, max: argsData.maximum, interval: argsData.interval,
                delta: argsData.maximum - argsData.minimum };
        }
    };
    /**
     * Calculate padding for the axis.
     * @return {string}
     * @private
     */
    Axis.prototype.getRangePadding = function (chart) {
        var padding = this.rangePadding;
        if (padding !== 'Auto') {
            return padding;
        }
        switch (this.orientation) {
            case 'Horizontal':
                if (chart.requireInvertedAxis) {
                    padding = (this.isStack100 || this.baseModule.chart.stockChart ? 'Round' : 'Normal');
                }
                else {
                    padding = 'None';
                }
                break;
            case 'Vertical':
                if (!chart.requireInvertedAxis) {
                    padding = (this.isStack100 || this.baseModule.chart.stockChart ? 'Round' : 'Normal');
                }
                else {
                    padding = 'None';
                }
                break;
        }
        return padding;
    };
    /**
     * Calculate maximum label width for the axis.
     * @return {void}
     * @private
     */
    Axis.prototype.getMaxLabelWidth = function (chart) {
        var pointX;
        var previousEnd = 0;
        var isIntersect = false;
        var isAxisLabelBreak;
        this.angle = this.labelRotation;
        this.maxLabelSize = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](0, 0);
        var action = this.labelIntersectAction;
        var label;
        for (var i = 0, len = this.visibleLabels.length; i < len; i++) {
            label = this.visibleLabels[i];
            isAxisLabelBreak = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isBreakLabel"])(label.originalText);
            if (isAxisLabelBreak) {
                label.size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(label.originalText.replace(/<br>/g, ' '), this.labelStyle);
                label.breakLabelSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(this.enableTrim ? label.text.join('<br>') : label.originalText, this.labelStyle);
            }
            else {
                label.size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(label.text, this.labelStyle);
            }
            var width = isAxisLabelBreak ? label.breakLabelSize.width : label.size.width;
            if (width > this.maxLabelSize.width) {
                this.maxLabelSize.width = width;
                this.rotatedLabel = label.text;
            }
            var height = isAxisLabelBreak ? label.breakLabelSize.height : label.size.height;
            if (height > this.maxLabelSize.height) {
                this.maxLabelSize.height = height;
            }
            if (isAxisLabelBreak) {
                label.text = this.enableTrim ? label.text : label.originalText.split('<br>');
            }
            if (action === 'None' || action === 'Hide' || action === 'Trim') {
                continue;
            }
            if ((action !== 'None' || this.angle % 360 === 0) && this.orientation === 'Horizontal' &&
                this.rect.width > 0 && !isIntersect) {
                var width1 = isAxisLabelBreak ? label.breakLabelSize.width : label.size.width;
                var height1 = isAxisLabelBreak ? label.breakLabelSize.height : label.size.height;
                pointX = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(label.value, this) * this.rect.width) + this.rect.x;
                pointX -= width1 / 2;
                if (this.edgeLabelPlacement === 'Shift') {
                    if (i === 0 && pointX < this.rect.x) {
                        pointX = this.rect.x;
                    }
                    if (i === this.visibleLabels.length - 1 && ((pointX + width1) > (this.rect.x + this.rect.width))) {
                        pointX = this.rect.x + this.rect.width - width1;
                    }
                }
                switch (action) {
                    case 'MultipleRows':
                        if (i > 0) {
                            this.findMultiRows(i, pointX, label, isAxisLabelBreak);
                        }
                        break;
                    case 'Rotate45':
                    case 'Rotate90':
                        if (i > 0 && (!this.isInversed ? pointX <= previousEnd : pointX + width1 >= previousEnd)) {
                            this.angle = (action === 'Rotate45') ? 45 : 90;
                            isIntersect = true;
                        }
                        break;
                    default:
                        if (isAxisLabelBreak) {
                            var result = void 0;
                            var result1 = [];
                            var str = void 0;
                            for (var index = 0; index < label.text.length; index++) {
                                result = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textWrap"])(label.text[index], this.rect.width / this.visibleLabels.length, this.labelStyle);
                                if (result.length > 1) {
                                    for (var j = 0; j < result.length; j++) {
                                        str = result[j];
                                        result1.push(str);
                                    }
                                }
                                else {
                                    result1.push(result[0]);
                                }
                            }
                            label.text = result1;
                        }
                        else {
                            label.text = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textWrap"])(label.text, this.rect.width / this.visibleLabels.length, this.labelStyle);
                        }
                        var height_1 = (height1 * label.text.length);
                        if (height_1 > this.maxLabelSize.height) {
                            this.maxLabelSize.height = height_1;
                        }
                        break;
                }
                previousEnd = this.isInversed ? pointX : pointX + width1;
            }
        }
        if (this.angle !== 0 && this.orientation === 'Horizontal') {
            if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isBreakLabel"])(this.rotatedLabel)) {
                this.maxLabelSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(this.rotatedLabel, this.labelStyle);
            }
            else {
                this.maxLabelSize = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["rotateTextSize"])(this.labelStyle, this.rotatedLabel, this.angle, chart);
            }
        }
        if (chart.multiLevelLabelModule && this.multiLevelLabels.length > 0) {
            chart.multiLevelLabelModule.getMultilevelLabelsHeight(this);
        }
    };
    /**
     * Finds the multiple rows for axis.
     * @return {void}
     */
    Axis.prototype.findMultiRows = function (length, currentX, currentLabel, isBreakLabels) {
        var label;
        var pointX;
        var width2;
        var store = [];
        var isMultiRows;
        for (var i = length - 1; i >= 0; i--) {
            label = this.visibleLabels[i];
            width2 = isBreakLabels ? label.breakLabelSize.width : label.size.width;
            pointX = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(label.value, this) * this.rect.width) + this.rect.x;
            isMultiRows = !this.isInversed ? currentX < (pointX + width2 * 0.5) :
                currentX + currentLabel.size.width > (pointX - width2 * 0.5);
            if (isMultiRows) {
                store.push(label.index);
                currentLabel.index = (currentLabel.index > label.index) ? currentLabel.index : label.index + 1;
            }
            else {
                currentLabel.index = store.indexOf(label.index) > -1 ? currentLabel.index : label.index;
            }
        }
        var height = ((isBreakLabels ? currentLabel.breakLabelSize.height : currentLabel.size.height) * currentLabel.index) +
            (5 * (currentLabel.index - 1));
        if (height > this.maxLabelSize.height) {
            this.maxLabelSize.height = height;
        }
    };
    /**
     * Finds the default module for axis.
     * @return {void}
     * @private
     */
    Axis.prototype.getModule = function (chart) {
        if (this.valueType === 'Double') {
            this.baseModule = new _axis_double_axis__WEBPACK_IMPORTED_MODULE_5__["Double"](chart);
        }
        else {
            this.baseModule = chart[Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["firstToLowerCase"])(this.valueType) + 'Module'];
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_6__["Theme"].axisLabelFont, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Font"])
    ], Axis.prototype, "labelStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, CrosshairTooltip)
    ], Axis.prototype, "crosshairTooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Axis.prototype, "title", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_6__["Theme"].axisTitleFont, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Font"])
    ], Axis.prototype, "titleStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Axis.prototype, "labelFormat", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Axis.prototype, "skeleton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('DateTime')
    ], Axis.prototype, "skeletonType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Axis.prototype, "plotOffset", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Axis.prototype, "isIndexed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], Axis.prototype, "logBase", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Axis.prototype, "columnIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Axis.prototype, "rowIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Axis.prototype, "span", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Axis.prototype, "desiredIntervals", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], Axis.prototype, "maximumLabels", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Axis.prototype, "zoomFactor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Axis.prototype, "zoomPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Axis.prototype, "opposedPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Axis.prototype, "enableAutoIntervalOnZooming", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], Axis.prototype, "rangePadding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Double')
    ], Axis.prototype, "valueType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], Axis.prototype, "edgeLabelPlacement", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], Axis.prototype, "intervalType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('BetweenTicks')
    ], Axis.prototype, "labelPlacement", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Outside')
    ], Axis.prototype, "tickPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Outside')
    ], Axis.prototype, "labelPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Axis.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Axis.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Axis.prototype, "minorTicksPerInterval", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Axis.prototype, "labelRotation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Axis.prototype, "crossesAt", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Axis.prototype, "placeNextToAxisLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Axis.prototype, "crossesInAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Axis.prototype, "minimum", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Axis.prototype, "maximum", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Axis.prototype, "interval", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(34)
    ], Axis.prototype, "maximumLabelWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Axis.prototype, "enableTrim", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, MajorTickLines)
    ], Axis.prototype, "majorTickLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, MinorTickLines)
    ], Axis.prototype, "minorTickLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, MajorGridLines)
    ], Axis.prototype, "majorGridLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, MinorGridLines)
    ], Axis.prototype, "minorGridLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, AxisLine)
    ], Axis.prototype, "lineStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Trim')
    ], Axis.prototype, "labelIntersectAction", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Axis.prototype, "isInversed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(100)
    ], Axis.prototype, "coefficient", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Axis.prototype, "startAngle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Axis.prototype, "description", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], Axis.prototype, "tabIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _model_chart_base__WEBPACK_IMPORTED_MODULE_8__["StripLineSettings"])
    ], Axis.prototype, "stripLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _model_chart_base__WEBPACK_IMPORTED_MODULE_8__["MultiLevelLabels"])
    ], Axis.prototype, "multiLevelLabels", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: null, width: 0, type: 'Rectangle' }, _model_chart_base__WEBPACK_IMPORTED_MODULE_8__["LabelBorder"])
    ], Axis.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_chart_base__WEBPACK_IMPORTED_MODULE_8__["ScrollbarSettings"])
    ], Axis.prototype, "scrollbarSettings", void 0);
    return Axis;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/** @private */
var VisibleLabels = /** @class */ (function () {
    function VisibleLabels(text, value, labelStyle, originalText, size, breakLabelSize, index) {
        if (size === void 0) { size = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](0, 0); }
        if (breakLabelSize === void 0) { breakLabelSize = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](0, 0); }
        if (index === void 0) { index = 1; }
        this.text = text;
        this.originalText = originalText;
        this.value = value;
        this.labelStyle = labelStyle;
        this.size = size;
        this.breakLabelSize = breakLabelSize;
        this.index = 1;
    }
    return VisibleLabels;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/cartesian-panel.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/cartesian-panel.js ***!
  \*******************************************************************************/
/*! exports provided: CartesianAxisLayoutPanel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartesianAxisLayoutPanel", function() { return CartesianAxisLayoutPanel; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");







/**
 * Specifies the Cartesian Axis Layout.
 */
var axisPadding = 10;
var CartesianAxisLayoutPanel = /** @class */ (function () {
    /** @private */
    function CartesianAxisLayoutPanel(chartModule) {
        this.chart = chartModule;
        this.padding = 5;
    }
    /**
     * Measure the axis size.
     * @return {void}
     * @private
     */
    CartesianAxisLayoutPanel.prototype.measureAxis = function (rect) {
        var chart = this.chart;
        this.crossAt(chart);
        this.seriesClipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Rect"](rect.x, rect.y, rect.width, rect.height);
        this.initialClipRect = rect;
        this.leftSize = 0;
        this.rightSize = 0;
        this.topSize = 0;
        this.bottomSize = 0;
        //Measure Axis size with initial Rect
        this.measureRowAxis(chart, this.initialClipRect);
        this.initialClipRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["subtractThickness"])(this.initialClipRect, new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["Thickness"](this.leftSize, this.rightSize, 0, 0));
        this.measureColumnAxis(chart, this.initialClipRect);
        this.initialClipRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["subtractThickness"])(this.initialClipRect, new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["Thickness"](0, 0, this.topSize, this.bottomSize));
        if (!this.chart.delayRedraw) {
            this.calculateAxisSize(this.initialClipRect);
        }
        this.leftSize = 0;
        this.rightSize = 0;
        this.topSize = 0;
        this.bottomSize = 0;
        //Measure Axis size with series Rect
        this.measureRowAxis(chart, this.initialClipRect);
        this.seriesClipRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["subtractThickness"])(this.seriesClipRect, new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["Thickness"](this.leftSize, this.rightSize, 0, 0));
        this.measureColumnAxis(chart, this.initialClipRect);
        this.seriesClipRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["subtractThickness"])(this.seriesClipRect, new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["Thickness"](0, 0, this.topSize, this.bottomSize));
        if (!this.chart.delayRedraw) {
            chart.refreshAxis();
            this.calculateAxisSize(this.seriesClipRect);
        }
    };
    CartesianAxisLayoutPanel.prototype.measureRowAxis = function (chart, rect) {
        var row;
        this.calculateRowSize(rect);
        for (var _i = 0, _a = chart.rows; _i < _a.length; _i++) {
            var item = _a[_i];
            row = item;
            row.nearSizes = [];
            row.farSizes = [];
            this.arrangeAxis(row);
            this.measureDefinition(row, chart, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](chart.availableSize.width, row.computedHeight), rect);
            if (this.leftSize < Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(row.nearSizes)) {
                this.leftSize = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(row.nearSizes);
            }
            if (this.rightSize < Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(row.farSizes)) {
                this.rightSize = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(row.farSizes);
            }
        }
    };
    CartesianAxisLayoutPanel.prototype.measureColumnAxis = function (chart, rect) {
        var column;
        this.calculateColumnSize(rect);
        for (var _i = 0, _a = chart.columns; _i < _a.length; _i++) {
            var item = _a[_i];
            column = item;
            column.farSizes = [];
            column.nearSizes = [];
            this.arrangeAxis(column);
            this.measureDefinition(column, chart, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](column.computedWidth, chart.availableSize.height), rect);
            if (this.bottomSize < Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(column.nearSizes)) {
                this.bottomSize = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(column.nearSizes);
            }
            if (this.topSize < Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(column.farSizes)) {
                this.topSize = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(column.farSizes);
            }
        }
    };
    /**
     * Measure the column and row in chart.
     * @return {void}
     * @private
     */
    CartesianAxisLayoutPanel.prototype.measureDefinition = function (definition, chart, size, clipRect) {
        var ele = 16; // scrollbar element height is 16.
        for (var _i = 0, _a = definition.axes; _i < _a.length; _i++) {
            var axis = _a[_i];
            axis.scrollBarHeight = chart.scrollBarModule && chart.zoomSettings.enableScrollbar && chart.zoomModule.isZoomed
                && (axis.zoomFactor < 1 || axis.zoomPosition > 0) ? ele : 0;
            axis.scrollBarHeight = chart.scrollBarModule && (chart.zoomModule && chart.zoomSettings.enableScrollbar &&
                chart.zoomModule.isZoomed && (axis.zoomFactor < 1 || axis.zoomPosition > 0) || axis.scrollbarSettings.enable) ? ele : 0;
            axis.getModule(chart);
            axis.baseModule.calculateRangeAndInterval(size, axis);
            definition.computeSize(axis, clipRect, axis.scrollBarHeight);
        }
        if (definition.farSizes.length > 0) {
            definition.farSizes[definition.farSizes.length - 1] -= axisPadding;
        }
        if (definition.nearSizes.length > 0) {
            definition.nearSizes[definition.nearSizes.length - 1] -= axisPadding;
        }
    };
    /**
     * Measure the axis.
     * @return {void}
     * @private
     */
    CartesianAxisLayoutPanel.prototype.calculateAxisSize = function (rect) {
        var chart = this.chart;
        var row;
        var column;
        var definition;
        var axis;
        var nearCount = 0;
        var farCount = 0;
        var size = 0;
        var x;
        var y;
        this.calculateRowSize(rect);
        for (var i = 0, len = chart.rows.length; i < len; i++) {
            row = chart.rows[i];
            nearCount = 0;
            farCount = 0;
            for (var j = 0, len_1 = row.axes.length; j < len_1; j++) {
                axis = row.axes[j];
                if (axis.rect.height === 0) {
                    axis.rect.height = row.computedHeight;
                    size = 0;
                    for (var k = i + 1, len_2 = i + axis.span; k < len_2; k++) {
                        definition = chart.rows[k];
                        size += definition.computedHeight;
                    }
                    axis.rect.y = (row.computedTop - size) + axis.plotOffset;
                    axis.rect.height = (axis.rect.height + size) - (2 * axis.plotOffset);
                    axis.rect.width = 0;
                }
                if (axis.opposedPosition) {
                    x = rect.x + rect.width + Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["subArray"])(row.farSizes, farCount));
                    axis.rect.x = axis.rect.x >= x ? axis.rect.x : x;
                    farCount++;
                }
                else {
                    x = rect.x - Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["subArray"])(row.nearSizes, nearCount));
                    axis.rect.x = axis.rect.x <= x ? axis.rect.x : x;
                    nearCount++;
                }
            }
        }
        this.calculateColumnSize(rect);
        for (var i = 0, len = chart.columns.length; i < len; i++) {
            column = chart.columns[i];
            nearCount = 0;
            farCount = 0;
            for (var j = 0, len_3 = column.axes.length; j < len_3; j++) {
                axis = column.axes[j];
                if (axis.rect.width === 0) {
                    for (var k = i, len_4 = (i + axis.span); k < len_4; k++) {
                        definition = chart.columns[k];
                        axis.rect.width += definition.computedWidth;
                    }
                    axis.rect.x = column.computedLeft + axis.plotOffset;
                    axis.rect.width -= (2 * axis.plotOffset);
                    axis.rect.height = 0;
                }
                if (axis.opposedPosition) {
                    y = rect.y - Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["subArray"])(column.farSizes, farCount));
                    axis.rect.y = axis.rect.y <= y ? axis.rect.y : y;
                    farCount++;
                }
                else {
                    y = rect.y + rect.height + Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["sum"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["subArray"])(column.nearSizes, nearCount));
                    axis.rect.y = axis.rect.y >= y ? axis.rect.y : y;
                    nearCount++;
                }
            }
        }
    };
    /**
     * Measure the axis.
     * @return {void}
     * @private
     */
    CartesianAxisLayoutPanel.prototype.measure = function () {
        var chart = this.chart;
        var row;
        var column;
        var definition;
        var actualIndex;
        var span;
        for (var _i = 0, _a = chart.axisCollections; _i < _a.length; _i++) {
            var axis = _a[_i];
            //definition.Axes = axis;
            if (axis.orientation === 'Vertical') {
                chart.verticalAxes.push(axis);
                actualIndex = this.getActualRow(axis);
                row = chart.rows[actualIndex];
                this.pushAxis(row, axis);
                span = ((actualIndex + axis.span) > chart.rows.length ? chart.rows.length : (actualIndex + axis.span));
                for (var j = actualIndex + 1; j < span; j++) {
                    definition = chart.rows[j];
                    definition.axes[row.axes.length - 1] = axis;
                    chart.rows[j] = definition;
                }
                chart.rows[actualIndex] = row;
            }
            else {
                chart.horizontalAxes.push(axis);
                actualIndex = this.getActualColumn(axis);
                column = chart.columns[actualIndex];
                this.pushAxis(column, axis);
                span = ((actualIndex + axis.span) > chart.columns.length ? chart.columns.length : (actualIndex + axis.span));
                for (var j = actualIndex + 1; j < span; j++) {
                    definition = chart.columns[j];
                    definition.axes[column.axes.length - 1] = axis;
                    chart.columns[j] = definition;
                }
                chart.columns[actualIndex] = column;
            }
        }
    };
    CartesianAxisLayoutPanel.prototype.crossAt = function (chart) {
        for (var _i = 0, _a = chart.axisCollections; _i < _a.length; _i++) {
            var axis = _a[_i];
            if (axis.crossesAt === null) {
                continue;
            }
            if (!axis.crossesInAxis) {
                if (chart.requireInvertedAxis) {
                    axis.crossInAxis = ((axis.orientation === 'Horizontal')) ? chart.primaryXAxis : chart.primaryYAxis;
                }
                else {
                    axis.crossInAxis = ((axis.orientation === 'Horizontal')) ? chart.primaryYAxis : chart.primaryXAxis;
                }
                axis.crossAt = this.updateCrossAt(axis.crossInAxis, axis.crossesAt);
                continue;
            }
            else {
                for (var i = 2, len = chart.axisCollections.length; i < len; i++) {
                    if (axis.crossesInAxis === chart.axisCollections[i].name) {
                        axis.crossInAxis = chart.axisCollections[i];
                        axis.crossAt = this.updateCrossAt(axis.crossInAxis, axis.crossesAt);
                        continue;
                    }
                }
            }
        }
    };
    CartesianAxisLayoutPanel.prototype.updateCrossAt = function (axis, crossAt) {
        switch (axis.valueType) {
            case 'DateTime':
                var option = {
                    skeleton: 'full',
                    type: 'dateTime'
                };
                var dateParser = this.chart.intl.getDateParser(option);
                var dateFormatter = this.chart.intl.getDateFormat(option);
                return Date.parse(dateParser(dateFormatter(new Date(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.parseJson({ val: crossAt }).val))));
            case 'Category':
                return parseFloat(crossAt) ? parseFloat(crossAt) : axis.labels.indexOf(crossAt);
            case 'Logarithmic':
                return Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["logBase"])(crossAt, axis.logBase);
            default:
                return crossAt;
        }
    };
    CartesianAxisLayoutPanel.prototype.pushAxis = function (definition, axis) {
        for (var i = 0, len = definition.axes.length; i <= len; i++) {
            if (!definition.axes[i]) {
                definition.axes[i] = axis;
                break;
            }
        }
    };
    CartesianAxisLayoutPanel.prototype.arrangeAxis = function (definition) {
        var axisCollection = [];
        for (var i = 0, len = definition.axes.length; i <= len; i++) {
            if (definition.axes[i]) {
                axisCollection.push(definition.axes[i]);
            }
        }
        definition.axes = axisCollection;
    };
    CartesianAxisLayoutPanel.prototype.getActualColumn = function (axis) {
        var actualLength = this.chart.columns.length;
        var pos = axis.columnIndex;
        var result = pos >= actualLength ? actualLength - 1 : (pos < 0 ? 0 : pos);
        return result;
    };
    CartesianAxisLayoutPanel.prototype.getActualRow = function (axis) {
        var actualLength = this.chart.rows.length;
        var pos = axis.rowIndex;
        var result = pos >= actualLength ? actualLength - 1 : (pos < 0 ? 0 : pos);
        return result;
    };
    /**
     * Measure the row size.
     * @return {void}
     */
    CartesianAxisLayoutPanel.prototype.calculateRowSize = function (rect) {
        /*! Calculate row size */
        var chart = this.chart;
        var row;
        var rowTop = rect.y + rect.height;
        var height = 0;
        var remainingHeight = Math.max(0, rect.height);
        for (var i = 0, len = chart.rows.length; i < len; i++) {
            row = chart.rows[i];
            if (row.height.indexOf('%') !== -1) {
                height = Math.min(remainingHeight, (rect.height * parseInt(row.height, 10) / 100));
            }
            else {
                height = Math.min(remainingHeight, parseInt(row.height, 10));
            }
            height = (i !== (len - 1)) ? height : remainingHeight;
            row.computedHeight = height;
            rowTop -= height;
            row.computedTop = rowTop;
            remainingHeight -= height;
        }
    };
    /**
     * Measure the row size.
     * @param rect
     */
    CartesianAxisLayoutPanel.prototype.calculateColumnSize = function (rect) {
        /*! Calculate column size */
        var chart = this.chart;
        var column;
        var columnLeft = rect.x;
        var width = 0;
        var remainingWidth = Math.max(0, rect.width);
        for (var i = 0, len = chart.columns.length; i < len; i++) {
            column = chart.columns[i];
            if (column.width.indexOf('%') !== -1) {
                width = Math.min(remainingWidth, (rect.width * parseInt(column.width, 10) / 100));
            }
            else {
                width = Math.min(remainingWidth, parseInt(column.width, 10));
            }
            width = (i !== (len - 1)) ? width : remainingWidth;
            column.computedWidth = width;
            column.computedLeft = columnLeft;
            columnLeft += width;
            remainingWidth -= width;
        }
    };
    /**
     * To render the axis element.
     * @return {void}
     * @private
     */
    CartesianAxisLayoutPanel.prototype.renderAxes = function () {
        var chart = this.chart;
        var axis;
        var axisElement = chart.renderer.createGroup({ id: chart.element.id + 'AxisInsideCollection' });
        var axisLineElement = chart.renderer.createGroup({ id: chart.element.id + 'AxisOutsideCollection' });
        var outsideElement;
        var isInside;
        for (var i = 0, len = chart.axisCollections.length; i < len; i++) {
            axis = chart.axisCollections[i];
            this.element = chart.renderer.createGroup({ id: chart.element.id + 'AxisGroup' + i + 'Inside' });
            outsideElement = chart.renderer.createGroup({ id: chart.element.id + 'AxisGroup' + i + 'Outside' });
            isInside = this.findAxisPosition(axis);
            if (axis.orientation === 'Horizontal') {
                axis.updateCrossValue(chart);
                if (axis.visible && axis.lineStyle.width > 0) {
                    this.drawAxisLine(axis, i, axis.plotOffset, 0, isInside ? outsideElement : this.element, axis.updatedRect);
                }
                if (axis.majorGridLines.width > 0 || axis.majorTickLines.width > 0) {
                    this.drawXAxisGridLine(axis, i, (isInside || axis.tickPosition === 'Inside') ? outsideElement : this.element, axis.updatedRect);
                }
                if (axis.visible) {
                    this.drawXAxisLabels(axis, i, (isInside || axis.labelPosition === 'Inside') ? outsideElement : this.element, (axis.placeNextToAxisLine ? axis.updatedRect : axis.rect));
                    this.drawXAxisBorder(axis, i, (isInside || axis.labelPosition === 'Inside') ? outsideElement : this.element, (axis.placeNextToAxisLine ? axis.updatedRect : axis.rect));
                    this.drawXAxisTitle(axis, i, isInside ? outsideElement : this.element, (axis.placeNextToAxisLine ? axis.updatedRect : axis.rect));
                }
            }
            else {
                axis.updateCrossValue(chart);
                if (axis.visible && axis.lineStyle.width > 0) {
                    this.drawAxisLine(axis, i, 0, axis.plotOffset, isInside ? outsideElement : this.element, axis.updatedRect);
                }
                if (axis.majorGridLines.width > 0 || axis.majorTickLines.width > 0) {
                    this.drawYAxisGridLine(axis, i, (isInside || axis.tickPosition === 'Inside') ? outsideElement : this.element, axis.updatedRect);
                }
                if (axis.visible) {
                    this.drawYAxisLabels(axis, i, (isInside || axis.labelPosition === 'Inside') ? outsideElement : this.element, (axis.placeNextToAxisLine ? axis.updatedRect : axis.rect));
                    this.drawYAxisBorder(axis, i, (isInside || axis.labelPosition === 'Inside') ? outsideElement : this.element, (axis.placeNextToAxisLine ? axis.updatedRect : axis.rect));
                    this.drawYAxisTitle(axis, i, isInside ? outsideElement : this.element, (axis.placeNextToAxisLine ? axis.updatedRect : axis.rect));
                }
            }
            if (!this.chart.enableCanvas) {
                axisElement.appendChild(this.element);
                if (outsideElement && outsideElement.childNodes.length > 0) {
                    axisLineElement.appendChild(outsideElement);
                }
            }
            if (chart.scrollBarModule && (chart.zoomSettings.enableScrollbar || axis.scrollbarSettings.enable)) {
                this.renderScrollbar(chart, axis);
            }
        }
        this.element = chart.renderer.createGroup({ id: chart.element.id + 'DefinitionLine' });
        for (var j = 0, len = chart.rows.length; j < len; j++) {
            var row = chart.rows[j];
            if (row.border.color) {
                this.drawBottomLine(row, j, true);
            }
        }
        for (var j = 0, len = chart.columns.length; j < len; j++) {
            var column = chart.columns[j];
            if (column.border.color) {
                this.drawBottomLine(column, j, false);
            }
        }
        if (!this.chart.enableCanvas) {
            axisElement.appendChild(this.element);
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(chart.enableCanvas, chart.svgObject, axisElement, chart.redraw);
        return axisLineElement;
    };
    /**
     * To render the axis scrollbar
     * @param chart
     * @param axis
     */
    CartesianAxisLayoutPanel.prototype.renderScrollbar = function (chart, axis) {
        var isZoomed = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(chart.zoomModule) ? false : chart.zoomModule.isZoomed;
        if (((isZoomed && (axis.zoomFactor < 1 || axis.zoomPosition > 0)) || (axis.scrollbarSettings.enable &&
            (axis.zoomFactor <= 1 || axis.zoomPosition >= 0))) && !axis.zoomingScrollBar.isScrollUI) {
            if (!chart.scrollElement) {
                chart.scrollElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["redrawElement"])(chart.redraw, chart.element.id + '_scrollElement') || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { id: chart.element.id + '_scrollElement' });
            }
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(false, chart.scrollElement, axis.zoomingScrollBar.render(true), true);
        }
        else if (axis.zoomFactor === 1 && axis.zoomPosition === 0 && axis.zoomingScrollBar.svgObject && !axis.scrollbarSettings.enable) {
            axis.zoomingScrollBar.destroy();
        }
        if (axis.zoomingScrollBar.isScrollUI) {
            axis.zoomingScrollBar.isScrollUI = false;
        }
    };
    /**
     * To find the axis position
     * @param axis
     */
    CartesianAxisLayoutPanel.prototype.findAxisPosition = function (axis) {
        return axis.crossAt !== null && axis.isInside(axis.crossInAxis.visibleRange);
    };
    /**
     * To render the bootom line of the columns and rows
     * @param definition
     * @param index
     * @param isRow
     */
    CartesianAxisLayoutPanel.prototype.drawBottomLine = function (definition, index, isRow) {
        var chart = this.chart;
        var optionsLine = {};
        var x1;
        var x2;
        var y1;
        var y2;
        var definitionName;
        if (isRow) {
            definition = definition;
            y1 = y2 = definition.computedTop + definition.computedHeight;
            x1 = this.seriesClipRect.x;
            x2 = x1 + this.seriesClipRect.width;
            definitionName = 'Row';
        }
        else {
            definition = definition;
            x1 = x2 = definition.computedLeft;
            y1 = this.seriesClipRect.y;
            y2 = y1 + this.seriesClipRect.height;
            definitionName = 'Column';
        }
        optionsLine = {
            'id': chart.element.id + '_AxisBottom_' + definitionName + index,
            x1: x1,
            y1: y1,
            x2: x2,
            y2: y2,
            'stroke-width': definition.border.width,
            'stroke': definition.border.color,
        };
        this.htmlObject = chart.renderer.drawLine(optionsLine);
        this.element.appendChild(this.htmlObject);
    };
    /**
     * To render the axis line
     * @param axis
     * @param index
     * @param plotX
     * @param plotY
     * @param parent
     * @param rect
     */
    CartesianAxisLayoutPanel.prototype.drawAxisLine = function (axis, index, plotX, plotY, parent, rect) {
        var chart = this.chart;
        var optionsLine = {};
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(chart.element.id + 'AxisLine_' + index);
        var direction = element ? element.getAttribute('d') : '';
        element = null;
        optionsLine = {
            'id': chart.element.id + 'AxisLine_' + index,
            'd': 'M ' + (rect.x - plotX) + ' ' + (rect.y - plotY) +
                ' L ' + (rect.x + rect.width + plotX) + ' ' + (rect.y + rect.height + plotY),
            'stroke-dasharray': axis.lineStyle.dashArray,
            'stroke-width': axis.lineStyle.width,
            'stroke': axis.lineStyle.color || chart.themeStyle.axisLine
        };
        this.htmlObject = chart.renderer.drawPath(optionsLine);
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(chart.enableCanvas, parent, this.htmlObject, chart.redraw, true, 'x', 'y', null, direction);
    };
    /**
     * To render the yAxis grid line
     * @param axis
     * @param index
     * @param parent
     * @param rect
     */
    CartesianAxisLayoutPanel.prototype.drawYAxisGridLine = function (axis, index, parent, rect) {
        var tempInterval;
        var pointY = 0;
        var majorGrid = '';
        var majorTick = '';
        var minorGridDirection;
        var tickSize = axis.opposedPosition ? axis.majorTickLines.height : -axis.majorTickLines.height;
        var axisLineSize = (axis.opposedPosition) ? axis.lineStyle.width * 0.5 : -axis.lineStyle.width * 0.5;
        var ticksbwtLabel = (axis.valueType === 'Category' && axis.labelPlacement === 'BetweenTicks') ?
            0.5 : 0;
        var scrollBarHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.crossesAt) ? axis.opposedPosition ? axis.scrollBarHeight :
            -axis.scrollBarHeight : 0;
        var isTickInside = axis.tickPosition === 'Inside';
        var ticks = isTickInside ? (rect.x - tickSize - axisLineSize) : (rect.x + tickSize + axisLineSize + scrollBarHeight);
        var length = axis.visibleLabels.length;
        var chartThemeStyle = this.chart.themeStyle;
        if (axis.valueType.indexOf('Category') && axis.labelPlacement === 'BetweenTicks' && length > 0) {
            length += 1;
        }
        var minorGridLines = axis.minorGridLines;
        var minorTickLines = axis.minorTickLines;
        //Gridlines
        for (var i = 0; i < length; i++) {
            tempInterval = !axis.visibleLabels[i] ? (axis.visibleLabels[i - 1].value + axis.visibleRange.interval) - ticksbwtLabel
                : axis.visibleLabels[i].value - ticksbwtLabel;
            pointY = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(tempInterval, axis) * rect.height;
            pointY = (pointY * -1) + (rect.y + rect.height);
            if (pointY >= rect.y && (rect.y + rect.height) >= pointY) {
                if ((Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["inside"])(tempInterval, axis.visibleRange)) || this.isBorder(axis, i, pointY)) {
                    majorGrid = 'M ' + this.seriesClipRect.x + ' ' + (pointY) +
                        ' L ' + (this.seriesClipRect.x + this.seriesClipRect.width) + ' ' + pointY;
                    this.renderGridLine(axis, index, majorGrid, axis.majorGridLines, '_MajorGridLine_', i, this.element, chartThemeStyle.majorGridLine, axis.majorGridLines.dashArray);
                }
                majorTick = 'M ' + (rect.x + axisLineSize + (isTickInside ? scrollBarHeight : 0)) + ' ' + pointY +
                    ' L ' + (ticks) + ' ' + pointY;
                this.renderGridLine(axis, index, majorTick, axis.majorTickLines, '_MajorTickLine_', i, parent, chartThemeStyle.majorTickLine);
                if ((minorGridLines.width > 0 || minorTickLines.width > 0) && axis.minorTicksPerInterval > 0) {
                    minorGridDirection = this.drawAxisMinorLine(axis, tempInterval, rect, i);
                    this.renderGridLine(axis, index, minorGridDirection[0], minorGridLines, '_MinorGridLine_', i, this.element, chartThemeStyle.minorGridLine, minorGridLines.dashArray);
                    this.renderGridLine(axis, index, minorGridDirection[1], minorTickLines, '_MinorTickLine_', i, parent, chartThemeStyle.minorTickLine);
                }
            }
        }
    };
    /**
     * To check the border of the axis
     * @param axis
     * @param index
     * @param value
     */
    CartesianAxisLayoutPanel.prototype.isBorder = function (axis, index, value) {
        var border = this.chart.chartArea.border;
        var rect = this.seriesClipRect;
        var orientation = axis.orientation;
        var start = (orientation === 'Horizontal') ? rect.x : rect.y;
        var size = (orientation === 'Horizontal') ? rect.width : rect.height;
        var startIndex = (orientation === 'Horizontal') ? 0 : axis.visibleLabels.length - 1;
        var endIndex = (orientation === 'Horizontal') ? axis.visibleLabels.length - 1 : 0;
        if (axis.plotOffset > 0) {
            return true;
        }
        else if ((value === start || value === (start + size)) && (border.width <= 0 || border.color === 'transparent')) {
            return true;
        }
        else if ((value !== start && index === startIndex) || (value !== (start + size) && index === endIndex)) {
            return true;
        }
        return false;
    };
    /**
     * To render the yAxis label
     * @param axis
     * @param index
     * @param parent
     * @param rect
     * @private
     */
    CartesianAxisLayoutPanel.prototype.drawYAxisLabels = function (axis, index, parent, rect) {
        var chart = this.chart;
        var pointX = 0;
        var pointY = 0;
        var elementSize;
        var options;
        var isAxisBreakLabel;
        var isLabelInside = axis.labelPosition === 'Inside';
        var isOpposed = axis.opposedPosition;
        var tickSpace = axis.labelPosition === axis.tickPosition ? axis.majorTickLines.height : 0;
        var padding = tickSpace + this.padding + axis.lineStyle.width * 0.5;
        padding = (axis.opposedPosition) ? padding : -padding;
        var anchor = ((isOpposed && isLabelInside) || (!isOpposed && !isLabelInside)) ? 'end' : 'start';
        var labelElement = chart.renderer.createGroup({ id: chart.element.id + 'AxisLabels' + index });
        var scrollBarHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.crossesAt) ? axis.scrollBarHeight * (isOpposed ? 1 : -1) : 0;
        for (var i = 0, len = axis.visibleLabels.length; i < len; i++) {
            isAxisBreakLabel = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isBreakLabel"])(axis.visibleLabels[i].originalText);
            pointX = isLabelInside ? (rect.x - padding) : (rect.x + padding + scrollBarHeight);
            elementSize = isAxisBreakLabel ? axis.visibleLabels[i].breakLabelSize : axis.visibleLabels[i].size;
            pointY = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(axis.visibleLabels[i].value, axis) * rect.height) + (chart.stockChart ? 7 : 0);
            pointY = Math.floor((pointY * -1) + (rect.y + rect.height));
            pointY = isAxisBreakLabel ? pointY - ((elementSize.height / 8) * axis.visibleLabels[i].text.length / 2) :
                pointY + (elementSize.height / 4);
            options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](chart.element.id + index + '_AxisLabel_' + i, pointX, pointY, anchor, axis.visibleLabels[i].text);
            if (axis.edgeLabelPlacement) {
                switch (axis.edgeLabelPlacement) {
                    case 'None':
                        break;
                    case 'Hide':
                        if (((i === 0 || (axis.isInversed && i === len - 1)) && options.y > rect.y + rect.height) ||
                            (((i === len - 1) || (axis.isInversed && i === 0)) && options.y - elementSize.height * 0.5 < rect.y)) {
                            options.text = '';
                        }
                        break;
                    case 'Shift':
                        if ((i === 0 || (axis.isInversed && i === len - 1)) && options.y > rect.y + rect.height) {
                            options.y = pointY = rect.y + rect.height;
                        }
                        else if (((i === len - 1) || (axis.isInversed && i === 0)) && (options.y - elementSize.height * 0.5 < rect.y)) {
                            options.y = pointY = rect.y + elementSize.height * 0.5;
                        }
                        break;
                }
            }
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textElement"])(chart.renderer, options, axis.labelStyle, axis.labelStyle.color || chart.themeStyle.axisLabel, labelElement, false, chart.redraw, true, true);
        }
        if (!this.chart.enableCanvas) {
            if (!chart.delayRedraw) {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(chart.enableCanvas, parent, labelElement, chart.redraw);
            }
            else if (axis.visible) {
                this.createZoomingLabel(this.chart, labelElement, axis, index, rect);
            }
        }
    };
    /**
     * To render the yAxis label border.
     * @param axis
     * @param index
     * @param parent
     * @param rect
     */
    CartesianAxisLayoutPanel.prototype.drawYAxisBorder = function (axis, index, parent, rect) {
        if (axis.border.width > 0) {
            var startY = void 0;
            var pointY = void 0;
            var scrollBarHeight = axis.labelPosition === 'Outside' ? axis.scrollBarHeight : 0;
            scrollBarHeight = (axis.opposedPosition ? 1 : -1) * scrollBarHeight;
            var gap = (rect.height / axis.visibleRange.delta) * (axis.valueType === 'DateTime' ? axis.dateTimeInterval
                : axis.visibleRange.interval);
            var endY = void 0;
            var length_1 = axis.maxLabelSize.width + 10 + ((axis.tickPosition === axis.labelPosition) ?
                axis.majorTickLines.height : 0);
            var labelBorder = '';
            var ticksbwtLabel = (axis.valueType === 'Category' && axis.labelPlacement === 'BetweenTicks') ? -0.5 : 0;
            var endX = ((axis.opposedPosition && axis.labelPosition === 'Inside') || (!axis.opposedPosition
                && axis.labelPosition === 'Outside')) ? rect.x - length_1 + scrollBarHeight : rect.x + length_1 + scrollBarHeight;
            for (var i = 0, len = axis.visibleLabels.length; i < len; i++) {
                pointY = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(axis.visibleLabels[i].value + ticksbwtLabel, axis);
                pointY = (axis.isInversed ? (1 - pointY) : pointY) * rect.height;
                if (axis.valueType === 'Category' && axis.labelPlacement === 'BetweenTicks') {
                    startY = (pointY * -1) + (rect.y + rect.height);
                    endY = (pointY * -1) - (gap) + (rect.y + rect.height);
                }
                else {
                    startY = (pointY * -1) + gap / 2 + (rect.y + rect.height);
                    endY = (pointY * -1) - gap / 2 + (rect.y + rect.height);
                }
                switch (axis.border.type) {
                    case 'Rectangle':
                    case 'WithoutTopBorder':
                        if (startY > (rect.y + rect.height)) {
                            labelBorder += ('M' + ' ' + endX + ' ' + (rect.y + rect.height) + ' ' + 'L' + ' ' + endX + ' ' + endY + ' ');
                        }
                        else if (Math.floor(rect.y) > (endY)) {
                            labelBorder += ('M' + ' ' + (rect.x + scrollBarHeight) + ' ' + startY + ' ' + 'L' + ' ' + endX
                                + ' ' + startY + ' ' + 'L' + ' ' + endX + ' ' + (rect.y) + ' ');
                        }
                        else {
                            labelBorder += ('M' + ' ' + (rect.x + scrollBarHeight) + ' ' + startY + ' ' + 'L' + ' ' + endX +
                                ' ' + startY + ' ' + 'L' + ' ' + endX + ' ' + endY + ' ');
                            if (i === axis.visibleLabels.length - 1) {
                                labelBorder += ('M' + ' ' + (rect.x + scrollBarHeight) + ' ' + endY + ' ' + 'L' + ' ' +
                                    endX + ' ' + endY + ' ');
                            }
                        }
                        break;
                    case 'WithoutTopandBottomBorder':
                        if (!(startY > rect.y + rect.height) && !((endY) < Math.floor(rect.y))) {
                            labelBorder += ('M' + ' ' + (rect.x + scrollBarHeight) + ' ' + startY + ' ' + 'L' + ' ' + endX +
                                ' ' + startY + ' ' + 'M' + ' ' + endX + ' ' + endY + ' ' +
                                'L' + ' ' + (rect.x + scrollBarHeight) + ' ' + endY);
                        }
                        break;
                }
            }
            labelBorder += (axis.border.type === 'Rectangle') ? ('M' + ' ' + (rect.x + scrollBarHeight) + ' ' + rect.y + ' ' + 'L' + ' ' +
                (rect.x + scrollBarHeight) + ' ' + (rect.y + rect.height) + ' ') : '';
            if (labelBorder !== '') {
                this.createAxisBorderElement(axis, index, labelBorder, parent);
            }
        }
        if (axis.multiLevelLabels.length > 0 && this.chart.multiLevelLabelModule) {
            this.chart.multiLevelLabelModule.renderYAxisMultiLevelLabels(axis, index, parent, rect);
        }
    };
    /**
     * To render the yAxis title
     * @param axis
     * @param index
     * @param parent
     * @param rect
     */
    CartesianAxisLayoutPanel.prototype.drawYAxisTitle = function (axis, index, parent, rect) {
        var chart = this.chart;
        var labelRotation = (axis.opposedPosition) ? 90 : -90;
        var padding = (axis.tickPosition === 'Inside' ? 0 : axis.majorTickLines.height + this.padding) +
            (axis.labelPosition === 'Inside' ? 0 :
                (axis.maxLabelSize.width + axis.multiLevelLabelHeight + this.padding));
        padding = axis.opposedPosition ? padding + axis.scrollBarHeight : -padding - axis.scrollBarHeight;
        var x = rect.x + padding;
        var y = rect.y + rect.height * 0.5;
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](chart.element.id + '_AxisTitle_' + index, x, y - this.padding, 'middle', axis.title, 'rotate(' + labelRotation + ',' + (x) + ',' + (y) + ')', null, labelRotation);
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textElement"])(chart.renderer, options, axis.titleStyle, axis.titleStyle.color || chart.themeStyle.axisTitle, parent);
        element.setAttribute('tabindex', axis.tabIndex.toString());
        element.setAttribute('aria-label', axis.description || axis.title);
    };
    /**
     * xAxis grid line calculation performed here
     * @param axis
     * @param index
     * @param parent
     * @param rect
     */
    CartesianAxisLayoutPanel.prototype.drawXAxisGridLine = function (axis, index, parent, rect) {
        var tempInterval;
        var pointX = 0;
        var majorGrid = '';
        var majorTick = '';
        var minorDirection;
        var tickSize = (axis.opposedPosition) ? -axis.majorTickLines.height : axis.majorTickLines.height;
        var axisLineSize = (axis.opposedPosition) ? -axis.lineStyle.width * 0.5 : axis.lineStyle.width * 0.5;
        var scrollBarHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.crossesAt) ? axis.opposedPosition ? -axis.scrollBarHeight :
            axis.scrollBarHeight : 0;
        var ticksbwtLabel = (axis.valueType.indexOf('Category') > -1 && axis.labelPlacement === 'BetweenTicks') ?
            0.5 : 0;
        var length = axis.visibleLabels.length;
        var isTickInside = axis.tickPosition === 'Inside';
        var ticks = isTickInside ? (rect.y - tickSize - axisLineSize) : (rect.y + tickSize + axisLineSize + scrollBarHeight);
        var chartThemeStyle = this.chart.themeStyle;
        if (axis.valueType.indexOf('Category') > -1 && length > 0 && axis.labelPlacement === 'BetweenTicks') {
            length += 1;
        }
        //Gridlines
        for (var i = 0; i < length; i++) {
            if (axis.valueType !== 'DateTimeCategory') {
                tempInterval = axis.visibleLabels[i] ? axis.visibleLabels[i].value - ticksbwtLabel
                    : (axis.visibleLabels[i - 1].value + axis.visibleRange.interval) - ticksbwtLabel;
            }
            else {
                tempInterval = axis.visibleLabels[i] ?
                    axis.visibleLabels[i].value - ticksbwtLabel : axis.visibleRange.max;
            }
            pointX = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(tempInterval, axis) * rect.width) + rect.x;
            if (pointX >= rect.x && (rect.x + rect.width) >= pointX) {
                if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["inside"])(tempInterval, axis.visibleRange) || this.isBorder(axis, i, pointX)) {
                    majorGrid = 'M ' + pointX + ' ' + (this.seriesClipRect.y + this.seriesClipRect.height) +
                        ' L ' + pointX + ' ' + this.seriesClipRect.y;
                    this.renderGridLine(axis, index, majorGrid, axis.majorGridLines, '_MajorGridLine_', i, this.element, chartThemeStyle.majorGridLine, axis.majorGridLines.dashArray);
                }
                majorTick = 'M ' + (pointX) + ' ' + (rect.y + axisLineSize + (isTickInside ? scrollBarHeight : 0))
                    + ' L ' + (pointX) + ' ' + ticks;
                this.renderGridLine(axis, index, majorTick, axis.majorTickLines, '_MajorTickLine_', i, parent, chartThemeStyle.majorTickLine);
                if (axis.minorTicksPerInterval > 0 && (axis.minorGridLines.width > 0 || axis.minorTickLines.width > 0)) {
                    minorDirection = this.drawAxisMinorLine(axis, tempInterval, rect, i);
                    this.renderGridLine(axis, index, minorDirection[0], axis.minorGridLines, '_MinorGridLine_', i, this.element, chartThemeStyle.minorGridLine, axis.minorGridLines.dashArray);
                    this.renderGridLine(axis, index, minorDirection[1], axis.minorTickLines, '_MinorTickLine_', i, parent, chartThemeStyle.minorTickLine);
                }
            }
        }
    };
    /**
     * To calcualte the axis minor line
     * @param axis
     * @param tempInterval
     * @param rect
     * @param labelIndex
     */
    CartesianAxisLayoutPanel.prototype.drawAxisMinorLine = function (axis, tempInterval, rect, labelIndex) {
        var value = tempInterval;
        var coor = 0;
        var position = 0;
        var range = axis.visibleRange;
        var isTickInside = axis.tickPosition === 'Inside';
        var direction = [];
        var tickSize = axis.opposedPosition ? -axis.minorTickLines.height : axis.minorTickLines.height;
        var logStart;
        var logEnd;
        var logInterval = 1;
        var logPosition = 1;
        var ticksX = isTickInside ? (rect.y - tickSize) : (rect.y + tickSize);
        var ticksY = isTickInside ? (rect.x + tickSize) : (rect.x - tickSize);
        var minorGird = '';
        var minorTick = '';
        if (axis.valueType === 'Logarithmic') {
            logStart = Math.pow(axis.logBase, value - range.interval);
            logEnd = Math.pow(axis.logBase, value);
            logInterval = (logEnd - logStart) / (axis.minorTicksPerInterval + 1);
            logPosition = logStart + logInterval;
        }
        if (axis.orientation === 'Horizontal') {
            for (var j = 0; j < axis.minorTicksPerInterval; j++) {
                value = this.findLogNumeric(axis, logPosition, logInterval, value, labelIndex);
                logPosition += logInterval;
                if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["inside"])(value, range)) {
                    position = ((value - range.min) / (range.max - range.min));
                    position = Math.ceil((axis.isInversed ? (1 - position) : position) * rect.width);
                    coor = (Math.floor(position + rect.x));
                    minorGird = minorGird.concat('M' + ' ' + coor + ' ' + (this.seriesClipRect.y)
                        + 'L ' + coor + ' ' + (this.seriesClipRect.y + this.seriesClipRect.height));
                    coor = (Math.floor(position + rect.x));
                    minorTick = minorTick.concat('M' + ' ' + coor + ' ' + (rect.y)
                        + 'L ' + coor + ' ' + (ticksX + axis.scrollBarHeight));
                }
            }
        }
        else {
            tickSize = axis.opposedPosition ? axis.minorTickLines.height : -axis.minorTickLines.height;
            for (var j = 0; j < axis.minorTicksPerInterval; j++) {
                value = this.findLogNumeric(axis, logPosition, logInterval, value, labelIndex);
                if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["inside"])(value, range)) {
                    position = Math.ceil(((value - range.min) / (range.max - range.min)) * rect.height) * -1;
                    coor = (Math.floor(position + rect.y + rect.height));
                    minorGird = minorGird.concat('M' + ' ' + (this.seriesClipRect.x) + ' ' + coor
                        + 'L ' + (this.seriesClipRect.x + this.seriesClipRect.width) + ' ' + coor + ' ');
                    coor = (Math.floor(position + rect.y + rect.height));
                    minorTick = minorTick.concat('M' + ' ' + rect.x + ' ' + coor + 'L ' + (ticksY - axis.scrollBarHeight) +
                        ' ' + coor + ' ');
                }
                logPosition += logInterval;
            }
        }
        direction.push(minorGird);
        direction.push(minorTick);
        return direction;
    };
    /**
     * To find the numeric value of the log
     * @param axis
     * @param logPosition
     * @param logInterval
     * @param value
     * @param labelIndex
     */
    CartesianAxisLayoutPanel.prototype.findLogNumeric = function (axis, logPosition, logInterval, value, labelIndex) {
        var range = axis.visibleRange;
        if (axis.valueType === 'Logarithmic') {
            value = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["logBase"])(logPosition, axis.logBase);
        }
        else if (axis.valueType === 'DateTime') {
            value += axis.dateTimeInterval / (axis.minorTicksPerInterval + 1);
        }
        else if (axis.valueType === 'DateTimeCategory') {
            var padding = axis.labelPlacement === 'BetweenTicks' ? 0.5 : 0;
            value += ((axis.visibleLabels[labelIndex + 1] ?
                axis.visibleLabels[labelIndex + 1].value - padding : axis.visibleRange.max) -
                (axis.visibleLabels[labelIndex] ?
                    axis.visibleLabels[labelIndex].value - padding : axis.visibleRange.min)) /
                (axis.minorTicksPerInterval + 1);
        }
        else {
            value += range.interval / (axis.minorTicksPerInterval + 1);
        }
        return value;
    };
    /**
     * To render the xAxis Labels
     * @param axis
     * @param index
     * @param parent
     * @param rect
     * @private
     */
    CartesianAxisLayoutPanel.prototype.drawXAxisLabels = function (axis, index, parent, rect) {
        var chart = this.chart;
        var pointX = 0;
        var pointY = 0;
        var elementSize;
        var labelPadding;
        var xValue = 0;
        var labelElement = chart.renderer.createGroup({ id: chart.element.id + 'AxisLabels' + index });
        var islabelInside = axis.labelPosition === 'Inside';
        var isOpposed = axis.opposedPosition;
        var tickSpace = axis.labelPosition === axis.tickPosition ? axis.majorTickLines.height : 0;
        var padding = tickSpace + this.padding + axis.lineStyle.width * 0.5;
        var rotateSize;
        var diffHeight;
        var angle = axis.angle % 360;
        var anglePadding = ((angle === 90 || angle === -90)) ? -2 : 0;
        var options;
        var yLocation;
        var labelWidth;
        var previousEnd = axis.isInversed ? (rect.x + rect.width) : rect.x;
        var width = 0;
        var length = axis.visibleLabels.length;
        var intervalLength;
        var label;
        var isAxisBreakLabel;
        var scrollBarHeight = axis.scrollbarSettings.enable || (!islabelInside && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.crossesAt)
            && (axis.zoomFactor < 1 || axis.zoomPosition > 0)) ? axis.scrollBarHeight : 0;
        for (var i = 0, len = length; i < len; i++) {
            label = axis.visibleLabels[i];
            isAxisBreakLabel = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isBreakLabel"])(label.originalText);
            pointX = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(label.value, axis) * rect.width) + rect.x;
            elementSize = label.size;
            intervalLength = rect.width / length;
            labelWidth = isAxisBreakLabel ? label.breakLabelSize.width : elementSize.width;
            width = ((axis.labelIntersectAction === 'Trim' || axis.labelIntersectAction === 'Wrap') && angle === 0 &&
                labelWidth > intervalLength) ? intervalLength : labelWidth;
            pointX -= width / 2;
            if (islabelInside && angle) {
                pointY = isOpposed ? (rect.y + padding) : (rect.y - padding);
            }
            else {
                labelPadding = ((isOpposed && !islabelInside) || (!isOpposed && islabelInside)) ?
                    -(padding + scrollBarHeight + (angle ? ((elementSize.height * 0.5) + (2 * axis.maxLabelSize.height / 5)) :
                        (label.index > 1 ? (2 * (elementSize.height / 4)) : 0))) :
                    padding + scrollBarHeight + (angle ? (axis.maxLabelSize.height * 0.5) : (3 * (elementSize.height / 4)));
                pointY = (rect.y + (labelPadding * label.index));
            }
            options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](chart.element.id + index + '_AxisLabel_' + i, pointX, pointY, '');
            if (axis.edgeLabelPlacement) {
                switch (axis.edgeLabelPlacement) {
                    case 'None':
                        break;
                    case 'Hide':
                        if (((i === 0 || (axis.isInversed && i === len - 1)) && options.x < rect.x) ||
                            ((i === len - 1 || (axis.isInversed && i === 0)) && (options.x + width > rect.x + rect.width))) {
                            continue;
                        }
                        break;
                    case 'Shift':
                        if ((i === 0 || (axis.isInversed && i === len - 1)) && options.x < rect.x) {
                            intervalLength -= (rect.x - options.x);
                            options.x = pointX = rect.x;
                        }
                        else if ((i === len - 1 || (axis.isInversed && i === 0)) && ((options.x + width) > rect.x + rect.width)) {
                            if (elementSize.width > intervalLength && axis.labelIntersectAction === 'Trim') {
                                intervalLength -= (options.x + width - (rect.x + rect.width));
                            }
                            else {
                                intervalLength = width;
                            }
                            options.x = pointX = rect.x + rect.width - intervalLength;
                        }
                        break;
                }
            }
            options.text = this.getLabelText(label, axis, intervalLength);
            if (angle === 0 && axis.labelIntersectAction === 'Hide' && i !== 0 &&
                (!axis.isInversed ? options.x <= previousEnd : options.x + width >= previousEnd)) {
                continue;
            }
            previousEnd = axis.isInversed ? options.x : options.x + width;
            if (angle !== 0) {
                rotateSize = this.getRotateText(isAxisBreakLabel, axis, label, angle, chart);
                diffHeight = islabelInside ? rotateSize.height :
                    axis.maxLabelSize.height - Math.ceil(rotateSize.height);
                yLocation = axis.opposedPosition ? diffHeight * 0.5 : -diffHeight * 0.5;
                options.transform = 'rotate(' + angle + ',' + (pointX + width * 0.5 + anglePadding) + ','
                    + (pointY + yLocation) + ')';
                options.y = isAxisBreakLabel ? options.y +
                    (isOpposed ? (4 * label.text.length) : -(4 * label.text.length)) : options.y + yLocation;
            }
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textElement"])(chart.renderer, options, label.labelStyle, label.labelStyle.color || chart.themeStyle.axisLabel, labelElement, (axis.opposedPosition !== (axis.labelPosition === 'Inside')), chart.redraw, true);
        }
        if (!this.chart.enableCanvas) {
            if (!chart.delayRedraw) {
                parent.appendChild(labelElement);
            }
            else if (axis.visible) {
                this.createZoomingLabel(this.chart, labelElement, axis, index, rect);
            }
        }
    };
    /**
     * To get axis label text
     * @param breakLabels
     * @param label
     * @param axis
     * @param intervalLength
     */
    CartesianAxisLayoutPanel.prototype.getLabelText = function (label, axis, intervalLength) {
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["isBreakLabel"])(label.originalText)) {
            var result = [];
            var str = void 0;
            for (var index = 0; index < label.text.length; index++) {
                str = this.findAxisLabel(axis, label.text[index], intervalLength);
                result.push(str);
            }
            return result;
        }
        else {
            return this.findAxisLabel(axis, label.text, intervalLength);
        }
    };
    /**
     * To render the x-axis label border.
     * @param axis
     * @param index
     * @param parent
     * @param axisRect
     */
    CartesianAxisLayoutPanel.prototype.drawXAxisBorder = function (axis, index, parent, axisRect) {
        if (axis.border.width > 0) {
            var scrollBarHeight = axis.labelPosition === 'Outside' ? axis.scrollBarHeight : 0;
            var startX = void 0;
            var startY = axisRect.y + ((axis.opposedPosition ? -1 : 1) * scrollBarHeight);
            var padding = 10;
            var pointX = void 0;
            var gap = (axisRect.width / axis.visibleRange.delta) * (axis.valueType === 'DateTime' ? axis.dateTimeInterval
                : axis.visibleRange.interval);
            var endX = void 0;
            var length_2 = axis.maxLabelSize.height +
                ((axis.tickPosition === axis.labelPosition) ? axis.majorTickLines.height : 0);
            var labelBorder = '';
            var ticksbwtLabel = (axis.valueType === 'Category' && axis.labelPlacement === 'BetweenTicks') ? -0.5 : 0;
            var endY = ((axis.opposedPosition && axis.labelPosition === 'Inside') ||
                (!axis.opposedPosition && axis.labelPosition === 'Outside')) ?
                (axisRect.y + length_2 + padding + scrollBarHeight) : (axisRect.y - length_2 - padding - scrollBarHeight);
            for (var i = 0, len = axis.visibleLabels.length; i < len; i++) {
                pointX = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(axis.visibleLabels[i].value + ticksbwtLabel, axis);
                pointX = (axis.isInversed ? (1 - pointX) : pointX) * axisRect.width;
                if (axis.valueType === 'Category' && axis.labelPlacement === 'BetweenTicks') {
                    startX = pointX + axisRect.x;
                    endX = pointX + (gap) + axisRect.x;
                }
                else {
                    startX = pointX - gap * 0.5 + axisRect.x;
                    endX = pointX + gap * 0.5 + axisRect.x;
                }
                switch (axis.border.type) {
                    case 'Rectangle':
                    case 'WithoutTopBorder':
                        if (startX < axisRect.x) {
                            labelBorder += ('M' + ' ' + axisRect.x + ' ' + endY + ' ' + 'L' + ' ' + endX + ' ' + endY + ' ');
                        }
                        else if (Math.floor(endX) > axisRect.width + axisRect.x && !(axis.visibleLabels.length === 1)) {
                            labelBorder += ('M' + ' ' + startX + ' ' + startY + ' ' + 'L' + ' ' + startX + ' ' + endY + ' ' +
                                'L' + ' ' + (axisRect.width + axisRect.x) + ' ' + endY + ' ');
                        }
                        else {
                            labelBorder += ('M' + ' ' + startX + ' ' + startY + ' ' + 'L' + ' ' + startX + ' ' +
                                endY + ' ' + 'L' + ' ' + endX + ' ' + endY + ' ');
                            if (i === 0) {
                                labelBorder += ('M' + ' ' + startX + ' ' + startY + ' ' + 'L' + ' ' + startX + ' ' + endY + ' ' +
                                    'M ' + startX + ' ' + endY + ' L ' + (axisRect.x) + ' ' + endY);
                            }
                            if (i === axis.visibleLabels.length - 1) {
                                labelBorder += ('M' + ' ' + endX + ' ' + startY + ' ' + 'L' + ' ' + endX + ' ' + endY + ' ' +
                                    'M ' + endX + ' ' + endY + ' L ' + (axisRect.width + axisRect.x) + ' ' + endY);
                            }
                        }
                        break;
                    case 'WithoutTopandBottomBorder':
                        if (!(startX < axisRect.x) && !(Math.floor(endX) > axisRect.width + axisRect.x)) {
                            labelBorder += ('M' + ' ' + startX + ' ' + startY + ' ' + 'L' + ' ' + startX + ' ' + endY + ' ' +
                                'M ' + endX + ' ' + startY + ' L ' + endX + ' ' + endY);
                        }
                        break;
                }
            }
            labelBorder += (axis.border.type === 'Rectangle' ? ('M ' + ' ' + axisRect.x + ' ' + startY + 'L' + ' ' +
                (axisRect.x + axisRect.width) + ' ' + startY) : '');
            if (labelBorder !== '') {
                this.createAxisBorderElement(axis, index, labelBorder, parent);
            }
        }
        if (this.chart.multiLevelLabelModule && axis.multiLevelLabels.length > 0) {
            this.chart.multiLevelLabelModule.renderXAxisMultiLevelLabels(axis, index, parent, axisRect);
        }
    };
    /**
     * To create border element of the axis
     * @param axis
     * @param index
     * @param labelBorder
     * @param parent
     */
    CartesianAxisLayoutPanel.prototype.createAxisBorderElement = function (axis, index, labelBorder, parent) {
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(this.chart.element.id + '_BorderLine_' + index);
        var direction = element ? element.getAttribute('d') : '';
        var borderElement = this.chart.renderer.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](this.chart.element.id + '_BorderLine_' + index, 'transparent', axis.border.width, axis.border.color || this.chart.themeStyle.axisLine, 1, '', labelBorder));
        borderElement.setAttribute('style', 'pointer-events: none');
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(this.chart.enableCanvas, parent, borderElement, this.chart.redraw, true, 'x', 'y', null, direction, true);
    };
    /**
     * To find the axis label of the intersect action
     * @param axis
     * @param label
     * @param width
     */
    CartesianAxisLayoutPanel.prototype.findAxisLabel = function (axis, label, width) {
        return (axis.labelIntersectAction === 'Trim' ?
            ((axis.angle === 0 && !axis.enableTrim) ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textTrim"])(width, label, axis.labelStyle) : label) : label);
    };
    /**
     * X-Axis Title function performed
     * @param axis
     * @param index
     * @param parent
     * @param rect
     */
    CartesianAxisLayoutPanel.prototype.drawXAxisTitle = function (axis, index, parent, rect) {
        var chart = this.chart;
        var elementSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(axis.title, axis.titleStyle);
        var scrollBarHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.crossesAt) ? axis.scrollBarHeight : 0;
        var padding = (axis.tickPosition === 'Inside' ? 0 : axis.majorTickLines.height + this.padding) +
            (axis.labelPosition === 'Inside' ? 0 :
                axis.maxLabelSize.height + axis.multiLevelLabelHeight + this.padding);
        padding = axis.opposedPosition ? -(padding + elementSize.height / 4 + scrollBarHeight) : (padding + (3 *
            elementSize.height / 4) + scrollBarHeight);
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](chart.element.id + '_AxisTitle_' + index, rect.x + rect.width * 0.5, rect.y + padding, 'middle', axis.title);
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textElement"])(chart.renderer, options, axis.titleStyle, axis.titleStyle.color || chart.themeStyle.axisTitle, parent);
        element.setAttribute('aria-label', axis.description || axis.title);
        element.setAttribute('tabindex', axis.tabIndex.toString());
    };
    /**
     * To render the axis grid and tick lines(Both Major and Minor)
     * @param axis
     * @param index
     * @param gridDirection
     * @param gridModel
     * @param gridId
     * @param gridIndex
     * @param parent
     * @param themeColor
     * @param dashArray
     */
    CartesianAxisLayoutPanel.prototype.renderGridLine = function (axis, index, gridDirection, gridModel, gridId, gridIndex, parent, themeColor, dashArray) {
        if (dashArray === void 0) { dashArray = null; }
        var chart = this.chart;
        var direction;
        var element;
        if (gridModel.width > 0 && axis.visible && gridDirection) {
            element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(chart.element.id + gridId + index + '_' + gridIndex);
            direction = element ? element.getAttribute('d') : null;
            element = null;
            this.htmlObject = chart.renderer.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](chart.element.id + gridId + index + '_' + gridIndex, 'transparent', gridModel.width, gridModel.color || themeColor, null, dashArray, gridDirection));
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(chart.enableCanvas, parent, this.htmlObject, chart.redraw, true, 'x', 'y', null, direction, true);
        }
    };
    /**
     * To Find the parent node of the axis
     * @param chart
     * @param label
     * @param axis
     * @param index
     */
    CartesianAxisLayoutPanel.prototype.findParentNode = function (elementId, label, axis, index) {
        if (axis.crossAt === null) {
            return document.getElementById(elementId + 'AxisGroup' + index + 'Inside');
        }
        if (document.getElementById(elementId + 'AxisGroup' + index + 'Inside').contains(document.getElementById(label.id))) {
            return document.getElementById(elementId + 'AxisGroup' + index + 'Inside');
        }
        else {
            return document.getElementById(elementId + 'AxisGroup' + index + 'Outside');
        }
    };
    /**
     * Create Zooming Labels Function Called here
     * @param chart
     * @param labelElement
     * @param axis
     * @param index
     * @param rect
     */
    CartesianAxisLayoutPanel.prototype.createZoomingLabel = function (chart, labelElement, axis, index, rect) {
        var parentNode = this.findParentNode(chart.element.id, labelElement, axis, index);
        labelElement.setAttribute('opacity', '0.3');
        var zoomElement = chart.renderer.createGroup({
            id: chart.element.id + 'AxisLabels_Zoom' + index
        });
        zoomElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["createZoomingLabels"])(chart, axis, zoomElement, index, axis.orientation === 'Vertical', rect);
        parentNode.replaceChild(labelElement, document.getElementById(labelElement.id));
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(chart.element.id + 'AxisLabels_Zoom' + index)) {
            parentNode.replaceChild(zoomElement, document.getElementById(zoomElement.id));
        }
        else {
            parentNode.appendChild(zoomElement);
        }
    };
    /**
     * To get Rotate text size
     * @param isBreakLabel
     * @param axis
     * @param label
     * @param angle
     * @param chart
     */
    CartesianAxisLayoutPanel.prototype.getRotateText = function (isBreakLabel, axis, label, angle, chart) {
        if (isBreakLabel) {
            return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(label.originalText, axis.labelStyle).height, Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(label.originalText, axis.labelStyle).width);
        }
        else {
            return Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["rotateTextSize"])(axis.labelStyle, label.text, angle, chart);
        }
    };
    return CartesianAxisLayoutPanel;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/category-axis.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/category-axis.js ***!
  \*****************************************************************************/
/*! exports provided: Category */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Category", function() { return Category; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _utils_double_range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/double-range */ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/double-range.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _axis_axis_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../axis/axis-helper */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis-helper.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





/**
 * `Category` module is used to render category axis.
 */
var Category = /** @class */ (function (_super) {
    __extends(Category, _super);
    /**
     * Constructor for the category module.
     * @private
     */
    function Category(chart) {
        return _super.call(this, chart) || this;
    }
    /**
     * The function to calculate the range and labels for the axis.
     * @return {void}
     */
    Category.prototype.calculateRangeAndInterval = function (size, axis) {
        this.calculateRange(axis, size);
        this.getActualRange(axis, size);
        this.applyRangePadding(axis, size);
        this.calculateVisibleLabels(axis);
    };
    /**
     * Actual Range for the axis.
     * @private
     */
    Category.prototype.getActualRange = function (axis, size) {
        this.initializeDoubleRange(axis);
        // axis.doubleRange = new DoubleRange(<number>this.min, <number>this.max);
        axis.actualRange = {};
        if (!axis.interval) {
            axis.actualRange.interval = Math.max(1, Math.floor(axis.doubleRange.delta / Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getActualDesiredIntervalsCount"])(size, axis)));
        }
        else {
            axis.actualRange.interval = Math.ceil(axis.interval);
        }
        axis.actualRange.min = axis.doubleRange.start;
        axis.actualRange.max = axis.doubleRange.end;
        axis.actualRange.delta = axis.doubleRange.delta;
    };
    /**
     * Padding for the axis.
     * @private
     */
    Category.prototype.applyRangePadding = function (axis, size) {
        var ticks = (axis.labelPlacement === 'BetweenTicks' && this.chart.chartAreaType !== 'PolarRadar') ? 0.5 : 0;
        if (ticks > 0) {
            axis.actualRange.min -= ticks;
            axis.actualRange.max += ticks;
        }
        else {
            axis.actualRange.max += axis.actualRange.max ? 0 : 0.5;
        }
        axis.doubleRange = new _utils_double_range__WEBPACK_IMPORTED_MODULE_1__["DoubleRange"](axis.actualRange.min, axis.actualRange.max);
        axis.actualRange.delta = axis.doubleRange.delta;
        this.calculateVisibleRange(size, axis);
    };
    /**
     * Calculate label for the axis.
     * @private
     */
    Category.prototype.calculateVisibleLabels = function (axis) {
        /*! Generate axis labels */
        axis.visibleLabels = [];
        var tempInterval = Math.ceil(axis.visibleRange.min);
        var labelStyle;
        if (axis.zoomFactor < 1 || axis.zoomPosition > 0) {
            tempInterval = axis.visibleRange.min - (axis.visibleRange.min % axis.visibleRange.interval);
        }
        var position;
        axis.startLabel = axis.labels[Math.round(axis.visibleRange.min)];
        axis.endLabel = axis.labels[Math.floor(axis.visibleRange.max)];
        for (; tempInterval <= axis.visibleRange.max; tempInterval += axis.visibleRange.interval) {
            labelStyle = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])({}, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["getValue"])('properties', axis.labelStyle), null, true));
            if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withIn"])(tempInterval, axis.visibleRange) && axis.labels.length > 0) {
                position = Math.round(tempInterval);
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["triggerLabelRender"])(this.chart, position, axis.labels[position] ? axis.labels[position].toString() : position.toString(), labelStyle, axis);
            }
        }
        if (axis.getMaxLabelWidth) {
            axis.getMaxLabelWidth(this.chart);
        }
    };
    /**
     * Get module name
     */
    Category.prototype.getModuleName = function () {
        /**
         * Returns the module name
         */
        return 'Category';
    };
    /**
     * To destroy the category axis.
     * @return {void}
     * @private
     */
    Category.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return Category;
}(_axis_axis_helper__WEBPACK_IMPORTED_MODULE_3__["NiceInterval"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/date-time-axis.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/date-time-axis.js ***!
  \******************************************************************************/
/*! exports provided: DateTime */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateTime", function() { return DateTime; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _utils_double_range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/double-range */ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/double-range.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _axis_axis_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../axis/axis-helper */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis-helper.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * `DateTime` module is used to render datetime axis.
 */
var DateTime = /** @class */ (function (_super) {
    __extends(DateTime, _super);
    /**
     * Constructor for the dateTime module.
     * @private
     */
    function DateTime(chart) {
        return _super.call(this, chart) || this;
    }
    /**
     * The function to calculate the range and labels for the axis.
     * @return {void}
     */
    DateTime.prototype.calculateRangeAndInterval = function (size, axis) {
        this.calculateRange(axis, size);
        this.getActualRange(axis, size);
        this.applyRangePadding(axis, size);
        this.calculateVisibleLabels(axis, this.chart);
    };
    /**
     * Actual Range for the axis.
     * @private
     */
    DateTime.prototype.getActualRange = function (axis, size) {
        var option = {
            skeleton: 'full',
            type: 'dateTime'
        };
        var dateParser = this.chart.intl.getDateParser(option);
        var dateFormatter = this.chart.intl.getDateFormat(option);
        // Axis min
        if ((axis.minimum) !== null) {
            this.min = Date.parse(dateParser(dateFormatter(new Date(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].parse.parseJson({ val: axis.minimum }).val))));
        }
        else if (this.min === null || this.min === Number.POSITIVE_INFINITY) {
            this.min = Date.parse(dateParser(dateFormatter(new Date(1970, 1, 1))));
        }
        // Axis Max
        if ((axis.maximum) !== null) {
            this.max = Date.parse(dateParser(dateFormatter(new Date(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].parse.parseJson({ val: axis.maximum }).val))));
        }
        else if (this.max === null || this.max === Number.NEGATIVE_INFINITY) {
            this.max = Date.parse(dateParser(dateFormatter(new Date(1970, 5, 1))));
        }
        if (this.min === this.max) {
            this.max = this.max + 2592000000;
            this.min = this.min - 2592000000;
        }
        axis.actualRange = {};
        axis.doubleRange = new _utils_double_range__WEBPACK_IMPORTED_MODULE_1__["DoubleRange"](this.min, this.max);
        var datetimeInterval = this.calculateDateTimeNiceInterval(axis, size, axis.doubleRange.start, axis.doubleRange.end);
        if (!axis.interval) {
            axis.actualRange.interval = datetimeInterval;
        }
        else {
            axis.actualRange.interval = axis.interval;
        }
        axis.actualRange.min = axis.doubleRange.start;
        axis.actualRange.max = axis.doubleRange.end;
    };
    /**
     * Apply padding for the range.
     * @private
     */
    DateTime.prototype.applyRangePadding = function (axis, size) {
        this.min = (axis.actualRange.min);
        this.max = (axis.actualRange.max);
        var minimum;
        var maximum;
        var interval = axis.actualRange.interval;
        if (!Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["setRange"])(axis)) {
            var rangePadding = axis.getRangePadding(this.chart);
            minimum = new Date(this.min);
            maximum = new Date(this.max);
            var intervalType = axis.actualIntervalType;
            if (rangePadding === 'None') {
                this.min = minimum.getTime();
                this.max = maximum.getTime();
            }
            else if (rangePadding === 'Additional' || rangePadding === 'Round') {
                switch (intervalType) {
                    case 'Years':
                        this.getYear(minimum, maximum, rangePadding, interval);
                        break;
                    case 'Months':
                        this.getMonth(minimum, maximum, rangePadding, interval);
                        break;
                    case 'Days':
                        this.getDay(minimum, maximum, rangePadding, interval);
                        break;
                    case 'Hours':
                        this.getHour(minimum, maximum, rangePadding, interval);
                        break;
                    case 'Minutes':
                        var minute = (minimum.getMinutes() / interval) * interval;
                        var endMinute = maximum.getMinutes() + (minimum.getMinutes() - minute);
                        if (rangePadding === 'Round') {
                            this.min = (new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), minimum.getHours(), minute, 0)).getTime();
                            this.max = (new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), maximum.getHours(), endMinute, 59)).getTime();
                        }
                        else {
                            this.min = (new Date(minimum.getFullYear(), maximum.getMonth(), minimum.getDate(), minimum.getHours(), minute + (-interval), 0)).getTime();
                            this.max = (new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), maximum.getHours(), endMinute + (interval), 0)).getTime();
                        }
                        break;
                    case 'Seconds':
                        var second = (minimum.getSeconds() / interval) * interval;
                        var endSecond = maximum.getSeconds() + (minimum.getSeconds() - second);
                        if (rangePadding === 'Round') {
                            this.min = (new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), minimum.getHours(), minimum.getMinutes(), second, 0)).getTime();
                            this.max = (new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), maximum.getHours(), maximum.getMinutes(), endSecond, 0)).getTime();
                        }
                        else {
                            this.min = (new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), minimum.getHours(), minimum.getMinutes(), second + (-interval), 0)).getTime();
                            this.max = (new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), maximum.getHours(), maximum.getMinutes(), endSecond + (interval), 0)).getTime();
                        }
                        break;
                }
            }
        }
        axis.actualRange.min = (axis.minimum != null) ? this.min : this.min;
        axis.actualRange.max = (axis.maximum != null) ? this.max : this.max;
        axis.actualRange.delta = (axis.actualRange.max - axis.actualRange.min);
        axis.doubleRange = new _utils_double_range__WEBPACK_IMPORTED_MODULE_1__["DoubleRange"](axis.actualRange.min, axis.actualRange.max);
        this.calculateVisibleRange(size, axis);
    };
    DateTime.prototype.getYear = function (minimum, maximum, rangePadding, interval) {
        var startYear = minimum.getFullYear();
        var endYear = maximum.getFullYear();
        if (rangePadding === 'Additional') {
            this.min = (new Date(startYear - interval, 1, 1, 0, 0, 0)).getTime();
            this.max = (new Date(endYear + interval, 1, 1, 0, 0, 0)).getTime();
        }
        else {
            this.min = new Date(startYear, 0, 0, 0, 0, 0).getTime();
            this.max = new Date(endYear, 11, 30, 23, 59, 59).getTime();
        }
    };
    DateTime.prototype.getMonth = function (minimum, maximum, rangePadding, interval) {
        var month = minimum.getMonth();
        var endMonth = maximum.getMonth();
        if (rangePadding === 'Round') {
            this.min = (new Date(minimum.getFullYear(), month, 0, 0, 0, 0)).getTime();
            this.max = (new Date(maximum.getFullYear(), endMonth, new Date(maximum.getFullYear(), maximum.getMonth(), 0).getDate(), 23, 59, 59)).getTime();
        }
        else {
            this.min = (new Date(minimum.getFullYear(), month + (-interval), 1, 0, 0, 0)).getTime();
            this.max = (new Date(maximum.getFullYear(), endMonth + (interval), endMonth === 2 ? 28 : 30, 0, 0, 0)).getTime();
        }
    };
    DateTime.prototype.getDay = function (minimum, maximum, rangePadding, interval) {
        var day = minimum.getDate();
        var endDay = maximum.getDate();
        if (rangePadding === 'Round') {
            this.min = (new Date(minimum.getFullYear(), minimum.getMonth(), day, 0, 0, 0)).getTime();
            this.max = (new Date(maximum.getFullYear(), maximum.getMonth(), endDay, 23, 59, 59)).getTime();
        }
        else {
            this.min = (new Date(minimum.getFullYear(), minimum.getMonth(), day + (-interval), 0, 0, 0)).getTime();
            this.max = (new Date(maximum.getFullYear(), maximum.getMonth(), endDay + (interval), 0, 0, 0)).getTime();
        }
    };
    DateTime.prototype.getHour = function (minimum, maximum, rangePadding, interval) {
        var hour = (minimum.getHours() / interval) * interval;
        var endHour = maximum.getHours() + (minimum.getHours() - hour);
        if (rangePadding === 'Round') {
            this.min = (new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), hour, 0, 0)).getTime();
            this.max = (new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), endHour, 59, 59)).getTime();
        }
        else {
            this.min = (new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), hour + (-interval), 0, 0)).getTime();
            this.max = (new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), endHour + (interval), 0, 0)).getTime();
        }
    };
    /**
     * Calculate visible range for axis.
     * @private
     */
    DateTime.prototype.calculateVisibleRange = function (size, axis) {
        axis.visibleRange = {
            min: axis.actualRange.min,
            max: axis.actualRange.max,
            interval: axis.actualRange.interval,
            delta: axis.actualRange.delta,
        };
        var isLazyLoad = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__["isNullOrUndefined"])(axis.zoomingScrollBar) ? false : axis.zoomingScrollBar.isLazyLoad;
        if ((axis.zoomFactor < 1 || axis.zoomPosition > 0) && !isLazyLoad) {
            axis.calculateVisibleRange(size);
            axis.visibleRange.interval = (axis.enableAutoIntervalOnZooming) ?
                this.calculateDateTimeNiceInterval(axis, size, axis.visibleRange.min, axis.visibleRange.max)
                : axis.visibleRange.interval;
        }
        axis.dateTimeInterval = this.increaseDateTimeInterval(axis, axis.visibleRange.min, axis.visibleRange.interval).getTime()
            - axis.visibleRange.min;
        axis.triggerRangeRender(this.chart, axis.visibleRange.min, axis.visibleRange.max, axis.visibleRange.interval);
    };
    /**
     * Calculate visible labels for the axis.
     * @param axis
     * @param chart
     * @private
     */
    DateTime.prototype.calculateVisibleLabels = function (axis, chart) {
        axis.visibleLabels = [];
        var tempInterval = axis.visibleRange.min;
        var labelStyle;
        var previousValue;
        var axisLabels = axis.visibleLabels;
        if (!Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["setRange"])(axis)) {
            tempInterval = this.alignRangeStart(axis, tempInterval, axis.visibleRange.interval, axis.actualIntervalType).getTime();
        }
        while (tempInterval <= axis.visibleRange.max) {
            labelStyle = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__["extend"])({}, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__["getValue"])('properties', axis.labelStyle), null, true));
            previousValue = axisLabels.length ? axis.visibleLabels[axisLabels.length - 1].value : tempInterval;
            axis.format = chart.intl.getDateFormat({
                format: this.findCustomFormats(axis, tempInterval, previousValue),
                type: Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(axis.skeletonType),
                skeleton: this.getSkeleton(axis, tempInterval, previousValue)
            });
            axis.startLabel = axis.format(new Date(axis.visibleRange.min));
            axis.endLabel = axis.format(new Date(axis.visibleRange.max));
            if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withIn"])(tempInterval, axis.visibleRange)) {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["triggerLabelRender"])(chart, tempInterval, axis.format(new Date(tempInterval)), labelStyle, axis);
            }
            tempInterval = this.increaseDateTimeInterval(axis, tempInterval, axis.visibleRange.interval).getTime();
        }
        //tooltip and crosshair formats for 'Months' and 'Days' interval types
        if ((axis.actualIntervalType === 'Months' || axis.actualIntervalType === 'Days') && axis.isChart) {
            axis.format = chart.intl.getDateFormat({
                format: axis.labelFormat || (axis.actualIntervalType === 'Months' && !axis.skeleton ? 'y MMM' : ''),
                type: Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(axis.skeletonType), skeleton: axis.skeleton || (axis.actualIntervalType === 'Days' ? 'MMMd' : '')
            });
        }
        if (axis.getMaxLabelWidth) {
            axis.getMaxLabelWidth(this.chart);
        }
    };
    /** @private */
    DateTime.prototype.increaseDateTimeInterval = function (axis, value, interval) {
        var result = new Date(value);
        interval = Math.ceil(interval);
        axis.visibleRange.interval = interval;
        var intervalType = axis.actualIntervalType;
        switch (intervalType) {
            case 'Years':
                result.setFullYear(result.getFullYear() + interval);
                return result;
            case 'Quarter':
                result.setMonth(result.getMonth() + (3 * interval));
                return result;
            case 'Months':
                result.setMonth(result.getMonth() + interval);
                return result;
            case 'Weeks':
                result.setDate(result.getDate() + (interval * 7));
                return result;
            case 'Days':
                result.setDate(result.getDate() + interval);
                return result;
            case 'Hours':
                result.setHours(result.getHours() + interval);
                return result;
            case 'Minutes':
                result.setMinutes(result.getMinutes() + interval);
                return result;
            case 'Seconds':
                result.setSeconds(result.getSeconds() + interval);
                return result;
        }
        return result;
    };
    DateTime.prototype.alignRangeStart = function (axis, sDate, intervalSize, intervalType) {
        var sResult = new Date(sDate);
        switch (axis.actualIntervalType) {
            case 'Years':
                var year = Math.floor(Math.floor(sResult.getFullYear() / intervalSize) * intervalSize);
                sResult = new Date(year, sResult.getMonth(), sResult.getDate(), 0, 0, 0);
                return sResult;
            case 'Months':
                var month = Math.floor(Math.floor((sResult.getMonth()) / intervalSize) * intervalSize);
                sResult = new Date(sResult.getFullYear(), month, sResult.getDate(), 0, 0, 0);
                return sResult;
            case 'Days':
                var day = Math.floor(Math.floor((sResult.getDate()) / intervalSize) * intervalSize);
                sResult = new Date(sResult.getFullYear(), sResult.getMonth(), day, 0, 0, 0);
                return sResult;
            case 'Hours':
                var hour = Math.floor(Math.floor((sResult.getHours()) / intervalSize) * intervalSize);
                sResult = new Date(sResult.getFullYear(), sResult.getMonth(), sResult.getDate(), hour, 0, 0);
                return sResult;
            case 'Minutes':
                var minutes = Math.floor(Math.floor((sResult.getMinutes()) / intervalSize) * intervalSize);
                sResult = new Date(sResult.getFullYear(), sResult.getMonth(), sResult.getDate(), sResult.getHours(), minutes, 0, 0);
                return sResult;
            case 'Seconds':
                var seconds = Math.floor(Math.floor((sResult.getSeconds()) / intervalSize) * intervalSize);
                sResult = new Date(sResult.getFullYear(), sResult.getMonth(), sResult.getDate(), sResult.getHours(), sResult.getMinutes(), seconds, 0);
                return sResult;
        }
        return sResult;
    };
    /**
     * Get module name
     */
    DateTime.prototype.getModuleName = function () {
        /**
         * Returns the module name
         */
        return 'DateTime';
    };
    /**
     * To destroy the category axis.
     * @return {void}
     * @private
     */
    DateTime.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return DateTime;
}(_axis_axis_helper__WEBPACK_IMPORTED_MODULE_3__["NiceInterval"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/date-time-category-axis.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/date-time-category-axis.js ***!
  \***************************************************************************************/
/*! exports provided: DateTimeCategory */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateTimeCategory", function() { return DateTimeCategory; });
/* harmony import */ var _axis_category_axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../axis/category-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/category-axis.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * Category module is used to render category axis.
 */
var DateTimeCategory = /** @class */ (function (_super) {
    __extends(DateTimeCategory, _super);
    /**
     * Constructor for the category module.
     * @private
     */
    function DateTimeCategory(chart) {
        return _super.call(this, chart) || this;
    }
    /**
     * The function to calculate the range and labels for the axis.
     * @return {void}
     * @private
     */
    DateTimeCategory.prototype.calculateRangeAndInterval = function (size, axis) {
        this.axisSize = size;
        this.calculateRange(axis, size);
        this.getActualRange(axis, size);
        this.applyRangePadding(axis, size);
        this.calculateVisibleLabels(axis);
    };
    /**
     * Calculate label for the axis.
     * @private
     */
    DateTimeCategory.prototype.calculateVisibleLabels = function (axis) {
        /*! Generate axis labels */
        axis.visibleLabels = [];
        var labelStyle;
        var padding = axis.labelPlacement === 'BetweenTicks' ? 0.5 : 0;
        if (axis.intervalType === 'Auto') {
            this.calculateDateTimeNiceInterval(axis, this.axisSize, parseInt(axis.labels[0], 10), parseInt(axis.labels[axis.labels.length - 1], 10));
        }
        else {
            axis.actualIntervalType = axis.intervalType;
        }
        axis.format = this.chart.intl.getDateFormat({
            format: axis.labelFormat, type: Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["firstToLowerCase"])(axis.skeletonType), skeleton: this.getSkeleton(axis, null, null)
        });
        for (var i = 0; i < axis.labels.length; i++) {
            labelStyle = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])({}, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["getValue"])('properties', axis.labelStyle), null, true));
            if (!this.sameInterval(axis.labels.map(Number)[i], axis.labels.map(Number)[i - 1], axis.actualIntervalType, i)) {
                if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withIn"])(i - padding, axis.visibleRange)) {
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["triggerLabelRender"])(this.chart, i, axis.format(new Date(axis.labels.map(Number)[i])), labelStyle, axis);
                }
            }
        }
        if (axis.getMaxLabelWidth) {
            axis.getMaxLabelWidth(this.chart);
        }
    };
    /**
     * get same interval
     */
    DateTimeCategory.prototype.sameInterval = function (currentDate, previousDate, type, index) {
        var sameValue;
        if (index === 0) {
            sameValue = false;
        }
        else {
            switch (type) {
                case 'Years':
                    sameValue = new Date(currentDate).getFullYear() === new Date(previousDate).getFullYear();
                    break;
                case 'Months':
                    sameValue = new Date(currentDate).getFullYear() === new Date(previousDate).getFullYear() &&
                        new Date(currentDate).getMonth() === new Date(previousDate).getMonth();
                    break;
                case 'Days':
                    sameValue = (Math.abs(currentDate - previousDate) < 24 * 60 * 60 * 1000 &&
                        new Date(currentDate).getDay() === new Date(previousDate).getDay());
                    break;
                case 'Hours':
                    sameValue = (Math.abs(currentDate - previousDate) < 60 * 60 * 1000 &&
                        new Date(currentDate).getDay() === new Date(previousDate).getDay());
                    break;
                case 'Minutes':
                    sameValue = (Math.abs(currentDate - previousDate) < 60 * 1000 &&
                        new Date(currentDate).getMinutes() === new Date(previousDate).getMinutes());
                    break;
                case 'Seconds':
                    sameValue = (Math.abs(currentDate - previousDate) < 1000 &&
                        new Date(currentDate).getDay() === new Date(previousDate).getDay());
                    break;
            }
        }
        return sameValue;
    };
    /**
     * Get module name
     */
    DateTimeCategory.prototype.getModuleName = function () {
        /**
         * Returns the module name
         */
        return 'DateTimeCategory';
    };
    /**
     * To destroy the category axis.
     * @return {void}
     * @private
     */
    DateTimeCategory.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return DateTimeCategory;
}(_axis_category_axis__WEBPACK_IMPORTED_MODULE_0__["Category"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/double-axis.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/double-axis.js ***!
  \***************************************************************************/
/*! exports provided: Double */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Double", function() { return Double; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _utils_double_range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/double-range */ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/double-range.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");




/**
 * Numeric module is used to render numeric axis.
 */
var Double = /** @class */ (function () {
    /**
     * Constructor for the dateTime module.
     * @private
     */
    function Double(chart) {
        this.chart = chart;
    }
    /**
     * Numeric Nice Interval for the axis.
     * @private
     */
    Double.prototype.calculateNumericNiceInterval = function (axis, delta, size) {
        var actualDesiredIntervalsCount = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getActualDesiredIntervalsCount"])(size, axis);
        var niceInterval = delta / actualDesiredIntervalsCount;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(axis.desiredIntervals)) {
            return niceInterval;
        }
        var minInterval = Math.pow(10, Math.floor(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["logBase"])(niceInterval, 10)));
        for (var _i = 0, _a = axis.intervalDivs; _i < _a.length; _i++) {
            var interval = _a[_i];
            var currentInterval = minInterval * interval;
            if (actualDesiredIntervalsCount < (delta / currentInterval)) {
                break;
            }
            niceInterval = currentInterval;
        }
        return niceInterval;
    };
    /**
     * Actual Range for the axis.
     * @private
     */
    Double.prototype.getActualRange = function (axis, size) {
        this.initializeDoubleRange(axis);
        axis.actualRange.interval = axis.interval || this.calculateNumericNiceInterval(axis, axis.doubleRange.delta, size);
        axis.actualRange.min = axis.doubleRange.start;
        axis.actualRange.max = axis.doubleRange.end;
    };
    /**
     * Range for the axis.
     * @private
     */
    Double.prototype.initializeDoubleRange = function (axis) {
        //Axis Min
        if (axis.minimum !== null) {
            this.min = axis.minimum;
        }
        else if (this.min === null || this.min === Number.POSITIVE_INFINITY) {
            this.min = 0;
        }
        // Axis Max
        if (axis.maximum !== null) {
            this.max = axis.maximum;
        }
        else if (this.max === null || this.max === Number.NEGATIVE_INFINITY) {
            this.max = 5;
        }
        if (this.min === this.max) {
            this.max = axis.valueType.indexOf('Category') > -1 ? this.max : this.min + 1;
        }
        axis.doubleRange = new _utils_double_range__WEBPACK_IMPORTED_MODULE_1__["DoubleRange"](this.min, this.max);
        axis.actualRange = {};
    };
    /**
     * The function to calculate the range and labels for the axis.
     * @return {void}
     * @private
     */
    Double.prototype.calculateRangeAndInterval = function (size, axis) {
        this.calculateRange(axis, size);
        this.getActualRange(axis, size);
        this.applyRangePadding(axis, size);
        this.calculateVisibleLabels(axis, this.chart);
    };
    /**
     * Calculate Range for the axis.
     * @private
     */
    Double.prototype.calculateRange = function (axis, size) {
        /*! Generate axis range */
        var series;
        this.min = null;
        this.max = null;
        if (!Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["setRange"])(axis)) {
            for (var _i = 0, _a = axis.series; _i < _a.length; _i++) {
                var series_1 = _a[_i];
                if (!series_1.visible) {
                    continue;
                }
                this.paddingInterval = 0;
                axis.maxPointLength = series_1.points.length;
                if (((series_1.type.indexOf('Column') > -1 || series_1.type.indexOf('Histogram') > -1) && axis.orientation === 'Horizontal')
                    || (series_1.type.indexOf('Bar') > -1 && axis.orientation === 'Vertical')) {
                    if ((series_1.xAxis.valueType === 'Double' || series_1.xAxis.valueType === 'DateTime')
                        && series_1.xAxis.rangePadding === 'Auto') {
                        this.paddingInterval = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getMinPointsDelta"])(series_1.xAxis, axis.series) * 0.5;
                    }
                }
                //For xRange
                if (axis.orientation === 'Horizontal') {
                    if (this.chart.requireInvertedAxis) {
                        this.yAxisRange(axis, series_1);
                    }
                    else {
                        this.findMinMax(series_1.xMin - this.paddingInterval, series_1.xMax + this.paddingInterval);
                    }
                }
                // For yRange
                if (axis.orientation === 'Vertical') {
                    if (this.chart.requireInvertedAxis) {
                        this.findMinMax(series_1.xMin - this.paddingInterval, series_1.xMax + this.paddingInterval);
                    }
                    else {
                        this.yAxisRange(axis, series_1);
                    }
                }
            }
        }
    };
    Double.prototype.yAxisRange = function (axis, series) {
        if (series.dragSettings.enable && this.chart.dragY) {
            if (this.chart.dragY >= axis.visibleRange.max) {
                series.yMax = this.chart.dragY + axis.visibleRange.interval;
            }
            if (this.chart.dragY <= axis.visibleRange.min) {
                series.yMin = this.chart.dragY - axis.visibleRange.interval;
            }
        }
        this.findMinMax(series.yMin, series.yMax);
    };
    Double.prototype.findMinMax = function (min, max) {
        if (this.min === null || this.min > min) {
            this.min = min;
        }
        if (this.max === null || this.max < max) {
            this.max = max;
        }
    };
    /**
     * Apply padding for the range.
     * @private
     */
    Double.prototype.applyRangePadding = function (axis, size) {
        var range;
        var start = axis.actualRange.min;
        var end = axis.actualRange.max;
        if (!Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["setRange"])(axis)) {
            var interval = axis.actualRange.interval;
            var padding = axis.getRangePadding(this.chart);
            if (padding === 'Additional' || padding === 'Round') {
                this.findAdditional(axis, start, end, interval);
            }
            else if (padding === 'Normal') {
                this.findNormal(axis, start, end, interval, size);
            }
            else {
                this.updateActualRange(axis, start, end, interval);
            }
        }
        axis.actualRange.delta = axis.actualRange.max - axis.actualRange.min;
        this.calculateVisibleRange(size, axis);
    };
    Double.prototype.updateActualRange = function (axis, minimum, maximum, interval) {
        axis.actualRange = {
            min: axis.minimum != null ? axis.minimum : minimum,
            max: axis.maximum != null ? axis.maximum : maximum,
            interval: axis.interval != null ? axis.interval : interval,
            delta: axis.actualRange.delta
        };
    };
    Double.prototype.findAdditional = function (axis, start, end, interval) {
        var minimum;
        var maximum;
        minimum = Math.floor(start / interval) * interval;
        maximum = Math.ceil(end / interval) * interval;
        if (axis.rangePadding === 'Additional') {
            minimum -= interval;
            maximum += interval;
        }
        this.updateActualRange(axis, minimum, maximum, interval);
    };
    Double.prototype.findNormal = function (axis, start, end, interval, size) {
        var remaining;
        var minimum;
        var maximum;
        var startValue = start;
        if (start < 0) {
            startValue = 0;
            minimum = start + (start * 0.05);
            remaining = interval + (minimum % interval);
            if ((0.365 * interval) >= remaining) {
                minimum -= interval;
            }
            if (minimum % interval < 0) {
                minimum = (minimum - interval) - (minimum % interval);
            }
        }
        else {
            minimum = start < ((5.0 / 6.0) * end) ? 0 : (start - (end - start) * 0.5);
            if (minimum % interval > 0) {
                minimum -= (minimum % interval);
            }
        }
        maximum = (end > 0) ? (end + (end - startValue) * 0.05) : (end - (end - startValue) * 0.05);
        remaining = interval - (maximum % interval);
        if ((0.365 * interval) >= remaining) {
            maximum += interval;
        }
        if (maximum % interval > 0) {
            maximum = (maximum + interval) - (maximum % interval);
        }
        axis.doubleRange = new _utils_double_range__WEBPACK_IMPORTED_MODULE_1__["DoubleRange"](minimum, maximum);
        if (minimum === 0) {
            interval = this.calculateNumericNiceInterval(axis, axis.doubleRange.delta, size);
            maximum = Math.ceil(maximum / interval) * interval;
        }
        this.updateActualRange(axis, minimum, maximum, interval);
    };
    /**
     * Calculate visible range for axis.
     * @private
     */
    Double.prototype.calculateVisibleRange = function (size, axis) {
        axis.visibleRange = {
            max: axis.actualRange.max, min: axis.actualRange.min,
            delta: axis.actualRange.delta, interval: axis.actualRange.interval
        };
        var isLazyLoad = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(axis.zoomingScrollBar) ? false : axis.zoomingScrollBar.isLazyLoad;
        if ((axis.zoomFactor < 1 || axis.zoomPosition > 0) && !isLazyLoad) {
            axis.calculateVisibleRange(size);
            axis.visibleRange.interval = (axis.enableAutoIntervalOnZooming && axis.valueType !== 'Category') ?
                this.calculateNumericNiceInterval(axis, axis.doubleRange.delta, size)
                : axis.visibleRange.interval;
        }
        axis.triggerRangeRender(this.chart, axis.visibleRange.min, axis.visibleRange.max, axis.visibleRange.interval);
    };
    /**
     * Calculate label for the axis.
     * @private
     */
    Double.prototype.calculateVisibleLabels = function (axis, chart) {
        /*! Generate axis labels */
        axis.visibleLabels = [];
        var tempInterval = axis.visibleRange.min;
        var labelStyle;
        if (axis.zoomFactor < 1 || axis.zoomPosition > 0 || this.paddingInterval) {
            tempInterval = axis.visibleRange.min - (axis.visibleRange.min % axis.visibleRange.interval);
        }
        var format = this.getFormat(axis);
        var isCustom = format.match('{value}') !== null;
        var intervalDigits = 0;
        var formatDigits = 0;
        if (axis.labelFormat && axis.labelFormat.indexOf('n') > -1) {
            formatDigits = parseInt(axis.labelFormat.substring(1, axis.labelFormat.length), 10);
        }
        axis.format = chart.intl.getNumberFormat({
            format: isCustom ? '' : format,
            useGrouping: chart.useGroupingSeparator
        });
        axis.startLabel = axis.format(axis.visibleRange.min);
        axis.endLabel = axis.format(axis.visibleRange.max);
        if (axis.visibleRange.interval && (axis.visibleRange.interval + '').indexOf('.') >= 0) {
            intervalDigits = (axis.visibleRange.interval + '').split('.')[1].length;
        }
        labelStyle = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])({}, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["getValue"])('properties', axis.labelStyle), null, true));
        for (; tempInterval <= axis.visibleRange.max; tempInterval += axis.visibleRange.interval) {
            if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withIn"])(tempInterval, axis.visibleRange)) {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["triggerLabelRender"])(chart, tempInterval, this.formatValue(axis, isCustom, format, tempInterval), labelStyle, axis);
            }
        }
        if (tempInterval && (tempInterval + '').indexOf('.') >= 0 && (tempInterval + '').split('.')[1].length > 10) {
            tempInterval = (tempInterval + '').split('.')[1].length > (formatDigits || intervalDigits) ?
                +tempInterval.toFixed(formatDigits || intervalDigits) : tempInterval;
            if (tempInterval <= axis.visibleRange.max) {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["triggerLabelRender"])(chart, tempInterval, this.formatValue(axis, isCustom, format, tempInterval), labelStyle, axis);
            }
        }
        if (axis.getMaxLabelWidth) {
            axis.getMaxLabelWidth(this.chart);
        }
    };
    /**
     * Format of the axis label.
     * @private
     */
    Double.prototype.getFormat = function (axis) {
        if (axis.labelFormat) {
            return axis.labelFormat;
        }
        return axis.isStack100 ? '{value}%' : '';
    };
    /**
     * Formatted the axis label.
     * @private
     */
    Double.prototype.formatValue = function (axis, isCustom, format, tempInterval) {
        return isCustom ? format.replace('{value}', axis.format(tempInterval))
            : axis.format(tempInterval);
    };
    return Double;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/logarithmic-axis.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/logarithmic-axis.js ***!
  \********************************************************************************/
/*! exports provided: Logarithmic */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logarithmic", function() { return Logarithmic; });
/* harmony import */ var _axis_double_axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../axis/double-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/double-axis.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * `Logarithmic` module is used to render log axis.
 */
var Logarithmic = /** @class */ (function (_super) {
    __extends(Logarithmic, _super);
    /**
     * Constructor for the logerithmic module.
     * @private
     */
    function Logarithmic(chart) {
        return _super.call(this, chart) || this;
    }
    /**
     * The method to calculate the range and labels for the axis.
     * @return {void}
     */
    Logarithmic.prototype.calculateRangeAndInterval = function (size, axis) {
        this.calculateRange(axis, size);
        this.getActualRange(axis, size);
        this.calculateVisibleRange(size, axis);
        this.calculateVisibleLabels(axis, this.chart);
    };
    /**
     * Calculates actual range for the axis.
     * @private
     */
    Logarithmic.prototype.getActualRange = function (axis, size) {
        this.initializeDoubleRange(axis);
        this.min = this.min < 0 ? 0 : this.min;
        var logStart = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["logBase"])(this.min, axis.logBase);
        logStart = isFinite(logStart) ? logStart : this.min;
        var logEnd = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["logBase"])(this.max, axis.logBase);
        logEnd = isFinite(logStart) ? logEnd : this.max;
        this.min = Math.floor(logStart / 1);
        this.max = Math.ceil(logEnd / 1);
        axis.actualRange.interval = axis.interval || this.calculateLogNiceInterval(this.max - this.min, size, axis);
        axis.actualRange.min = this.min;
        axis.actualRange.max = this.max;
        axis.actualRange.delta = this.max - this.min;
    };
    /**
     * Calculates visible range for the axis.
     * @private
     */
    Logarithmic.prototype.calculateVisibleRange = function (size, axis) {
        axis.visibleRange = {
            interval: axis.actualRange.interval, max: axis.actualRange.max,
            min: axis.actualRange.min, delta: axis.actualRange.delta
        };
        var isLazyLoad = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(axis.zoomingScrollBar) ? false : axis.zoomingScrollBar.isLazyLoad;
        if ((axis.zoomFactor < 1 || axis.zoomPosition > 0) && !isLazyLoad) {
            axis.calculateVisibleRange(size);
            axis.visibleRange.interval = (axis.enableAutoIntervalOnZooming) ?
                this.calculateLogNiceInterval(axis.doubleRange.delta, size, axis)
                : axis.visibleRange.interval;
            axis.visibleRange.interval = Math.floor(axis.visibleRange.interval) === 0 ? 1 : Math.floor(axis.visibleRange.interval);
            axis.triggerRangeRender(this.chart, axis.visibleRange.min, axis.visibleRange.max, axis.visibleRange.interval);
        }
    };
    /**
     * Calculates log iInteval for the axis.
     * @private
     */
    Logarithmic.prototype.calculateLogNiceInterval = function (delta, size, axis) {
        var actualDesiredIntervalsCount = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getActualDesiredIntervalsCount"])(size, axis);
        var niceInterval = delta;
        var minInterval = Math.pow(10, Math.floor(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["logBase"])(niceInterval, 10)));
        for (var j = 0, len = axis.intervalDivs.length; j < len; j++) {
            var currentInterval = minInterval * axis.intervalDivs[j];
            if (actualDesiredIntervalsCount < (delta / currentInterval)) {
                break;
            }
            niceInterval = currentInterval;
        }
        return niceInterval;
    };
    /**
     * Calculates labels for the axis.
     * @private
     */
    Logarithmic.prototype.calculateVisibleLabels = function (axis, chart) {
        /*! Generate axis labels */
        var tempInterval = axis.visibleRange.min;
        axis.visibleLabels = [];
        var labelStyle;
        if (axis.zoomFactor < 1 || axis.zoomPosition > 0) {
            tempInterval = axis.visibleRange.min - (axis.visibleRange.min % axis.visibleRange.interval);
        }
        var axisFormat = this.getFormat(axis);
        var isCustomFormat = axisFormat.match('{value}') !== null;
        axis.format = chart.intl.getNumberFormat({
            format: isCustomFormat ? '' : axisFormat,
            useGrouping: chart.useGroupingSeparator
        });
        axis.startLabel = axis.format(Math.pow(axis.logBase, axis.visibleRange.min));
        axis.endLabel = axis.format(Math.pow(axis.logBase, axis.visibleRange.max));
        for (; tempInterval <= axis.visibleRange.max; tempInterval += axis.visibleRange.interval) {
            labelStyle = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])({}, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["getValue"])('properties', axis.labelStyle), null, true));
            if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withIn"])(tempInterval, axis.visibleRange)) {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["triggerLabelRender"])(this.chart, tempInterval, this.formatValue(axis, isCustomFormat, axisFormat, Math.pow(axis.logBase, tempInterval)), labelStyle, axis);
            }
        }
        if (axis.getMaxLabelWidth) {
            axis.getMaxLabelWidth(this.chart);
        }
    };
    /**
     * Get module name
     */
    Logarithmic.prototype.getModuleName = function () {
        /**
         * Returns the module name
         */
        return 'Logarithmic';
    };
    /**
     * To destroy the category axis.
     * @return {void}
     * @private
     */
    Logarithmic.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return Logarithmic;
}(_axis_double_axis__WEBPACK_IMPORTED_MODULE_0__["Double"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/multi-level-labels.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/multi-level-labels.js ***!
  \**********************************************************************************/
/*! exports provided: MultiLevelLabel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLevelLabel", function() { return MultiLevelLabel; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");





/**
 * `MultiLevelLabel` module is used to render the multi level label in chart.
 */
var MultiLevelLabel = /** @class */ (function () {
    /**
     * Constructor for the logerithmic module.
     * @private
     */
    function MultiLevelLabel(chart) {
        /** @private */
        this.xAxisPrevHeight = [];
        /** @private */
        this.xAxisMultiLabelHeight = [];
        /** @private */
        this.yAxisPrevHeight = [];
        /** @private */
        this.yAxisMultiLabelHeight = [];
        this.chart = chart;
        this.addEventListener();
    }
    /**
     * Binding events for multi level module.
     */
    MultiLevelLabel.prototype.addEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        this.chart.on('click', this.click, this);
    };
    /**
     * Finds multilevel label height
     * @return {void}
     */
    MultiLevelLabel.prototype.getMultilevelLabelsHeight = function (axis) {
        var value = 0;
        var multiLevelLabelsHeight = [];
        var prevHeight = [];
        var isVertical = axis.orientation === 'Vertical';
        var axisValue = isVertical ? axis.rect.height : axis.rect.width;
        var labelSize;
        var height;
        var padding = 10;
        var gap;
        axis.multiLevelLabels.map(function (multiLevel, index) {
            multiLevel.categories.map(function (categoryLabel) {
                if (categoryLabel.text !== '' && categoryLabel.start !== null && categoryLabel.end !== null) {
                    labelSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])(categoryLabel.text, multiLevel.textStyle);
                    height = isVertical ? labelSize.width : labelSize.height;
                    height += 2 * multiLevel.border.width +
                        (multiLevel.border.type === 'CurlyBrace' ? padding : 0);
                    gap = (categoryLabel.maximumTextWidth !== null) ? categoryLabel.maximumTextWidth :
                        (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])(typeof categoryLabel.end === 'string' ? Number(new Date(categoryLabel.end)) :
                            categoryLabel.end, axis) * axisValue) -
                            (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])(typeof categoryLabel.start === 'string' ? Number(new Date(categoryLabel.start)) :
                                categoryLabel.start, axis) * axisValue);
                    if ((labelSize.width > gap - padding) && gap > 0 && (multiLevel.overflow === 'Wrap') && !isVertical) {
                        height = (height * (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textWrap"])(categoryLabel.text, gap - padding, multiLevel.textStyle).length));
                    }
                    multiLevelLabelsHeight[index] = !multiLevelLabelsHeight[index] ? height :
                        ((multiLevelLabelsHeight[index] < height) ? height : multiLevelLabelsHeight[index]);
                }
            });
            prevHeight[index] = value;
            value += multiLevelLabelsHeight[index] ? (multiLevelLabelsHeight[index] + padding) : 0;
        });
        axis.multiLevelLabelHeight = value + ((axis.title !== '' || (this.chart.legendModule && this.chart.legendSettings.visible))
            ? padding / 2 : 0);
        if (isVertical) {
            this.yAxisMultiLabelHeight = multiLevelLabelsHeight;
            this.yAxisPrevHeight = prevHeight;
        }
        else {
            this.xAxisMultiLabelHeight = multiLevelLabelsHeight;
            this.xAxisPrevHeight = prevHeight;
        }
    };
    /**
     * render x axis multi level labels
     * @private
     * @return {void}
     */
    MultiLevelLabel.prototype.renderXAxisMultiLevelLabels = function (axis, index, parent, axisRect) {
        var _this = this;
        var x;
        var y;
        var padding = 10;
        var startX;
        var pointIndex;
        var startY = (axis.labelPosition === axis.tickPosition ? axis.majorTickLines.height : 0) +
            (axis.maxLabelSize.height) + padding;
        var endX;
        var endY;
        var pathRect = '';
        var start;
        var end;
        var labelSize;
        var clipY;
        var isOutside = axis.labelPosition === 'Outside';
        var gap;
        var anchor;
        var isInversed = axis.isInversed;
        var argsData;
        var opposedPosition = axis.opposedPosition;
        var scrollBarHeight = axis.scrollbarSettings.enable || (isOutside && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.crossesAt)) ?
            axis.scrollBarHeight : 0;
        clipY = ((opposedPosition && !isOutside) || (!opposedPosition && isOutside)) ?
            (axisRect.y + startY - axis.majorTickLines.width) : (axisRect.y - startY - axis.multiLevelLabelHeight);
        this.createClipRect(axisRect.x - axis.majorTickLines.width, clipY + scrollBarHeight, axis.multiLevelLabelHeight + padding, axisRect.width + 2 * axis.majorTickLines.width, this.chart.element.id + '_XAxis_Clippath_' + index, this.chart.element.id + 'XAxisMultiLevelLabel' + index);
        axis.multiLevelLabels.map(function (multiLevel, level) {
            pointIndex = 0;
            _this.labelElement = _this.chart.renderer.createGroup({ id: _this.chart.element.id + index + '_MultiLevelLabel' + level });
            multiLevel.categories.map(function (categoryLabel, i) {
                pathRect = '';
                start = typeof categoryLabel.start === 'string' ? Number(new Date(categoryLabel.start)) : categoryLabel.start;
                end = typeof categoryLabel.end === 'string' ? Number(new Date(categoryLabel.end)) : categoryLabel.end;
                argsData = _this.triggerMultiLabelRender(axis, categoryLabel.text, axis.multiLevelLabels[level].textStyle, axis.multiLevelLabels[level].alignment, categoryLabel.customAttributes);
                if (!argsData.cancel) {
                    startX = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])(start, axis) * axisRect.width;
                    endX = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])(end, axis) * axisRect.width;
                    endX = isInversed ? [startX, startX = endX][0] : endX;
                    labelSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])(argsData.text, argsData.textStyle);
                    gap = ((categoryLabel.maximumTextWidth === null) ? endX - startX : categoryLabel.maximumTextWidth) - padding;
                    x = startX + axisRect.x + padding;
                    y = (((opposedPosition && !isOutside) || (!opposedPosition && isOutside)) ? (startY + axisRect.y +
                        labelSize.height / 2 + padding + _this.xAxisPrevHeight[level]) : (axisRect.y - startY + labelSize.height / 2 -
                        _this.xAxisMultiLabelHeight[level] - _this.xAxisPrevHeight[level])) + scrollBarHeight;
                    if (argsData.alignment === 'Center') {
                        x += (endX - startX - padding) / 2;
                        anchor = 'middle';
                    }
                    else if (argsData.alignment === 'Far') {
                        x = x + (endX - startX - padding) - multiLevel.border.width / 2;
                        anchor = 'end';
                    }
                    else {
                        anchor = 'start';
                        x += multiLevel.border.width / 2;
                    }
                    y = multiLevel.border.type === 'CurlyBrace' ?
                        (((!opposedPosition && isOutside) || (opposedPosition && !isOutside)) ? y + padding : y - padding / 2) : y;
                    var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["TextOption"](_this.chart.element.id + index + '_Axis_MultiLevelLabel_Level_' + level + '_Text_' + i, x, y, anchor, argsData.text);
                    if (multiLevel.overflow !== 'None') {
                        options.text = (multiLevel.overflow === 'Wrap') ?
                            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textWrap"])(argsData.text, gap, argsData.textStyle) : Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textTrim"])(gap, argsData.text, argsData.textStyle);
                        options.x = options.x - padding / 2;
                    }
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(_this.chart.renderer, options, argsData.textStyle, argsData.textStyle.color || _this.chart.themeStyle.axisLabel, _this.labelElement, false, _this.chart.redraw, true);
                    if (multiLevel.border.width > 0 && multiLevel.border.type !== 'WithoutBorder') {
                        pathRect = _this.renderXAxisLabelBorder(level, endX - startX - padding, axis, startX, startY, labelSize, options, axisRect, argsData.alignment, pathRect, isOutside, opposedPosition, pointIndex);
                        // fix for generating seperate rect 
                        if (pathRect !== '') {
                            _this.createBorderElement(level, index, axis, pathRect, pointIndex);
                            pointIndex++;
                        }
                    }
                    _this.multiElements.appendChild(_this.labelElement);
                }
            });
        });
        parent.appendChild(this.multiElements);
    };
    /**
     * render x axis multi level labels border
     * @private
     * @return {void}
     */
    MultiLevelLabel.prototype.renderXAxisLabelBorder = function (labelIndex, gap, axis, startX, startY, labelSize, textOptions, axisRect, alignment, path, isOutside, opposedPosition, categoryIndex) {
        var padding = 10;
        var padding1;
        var padding2;
        var value;
        var value1;
        var groupLabel = axis.multiLevelLabels[labelIndex];
        var categoryType = groupLabel.categories[categoryIndex].type;
        var width = gap + padding;
        var height = this.xAxisMultiLabelHeight[labelIndex] + padding;
        var scrollBarHeight = axis.labelPosition === 'Outside' ? axis.scrollBarHeight : 0;
        var x = startX + axisRect.x;
        var y = ((!opposedPosition && isOutside) || (opposedPosition && !isOutside)) ? (startY + axisRect.y +
            this.xAxisPrevHeight[labelIndex] + scrollBarHeight) : (axisRect.y - startY -
            this.xAxisPrevHeight[labelIndex] - scrollBarHeight);
        var borderType = categoryType ? categoryType : groupLabel.border.type;
        switch (borderType) {
            case 'WithoutTopandBottomBorder':
            case 'Rectangle':
            case 'WithoutTopBorder':
                height = ((!opposedPosition && isOutside) || (opposedPosition && !isOutside)) ? height : -height;
                path += 'M ' + x + ' ' + y + ' L ' + x + ' ' + (y + height) + ' M ' + (x + width) + ' '
                    + y + ' L ' + (x + width) + ' ' + (y + height);
                path += (borderType !== 'WithoutTopandBottomBorder') ? (' L' + ' ' + (x) + ' ' + (y + height) + ' ') : ' ';
                path += (borderType === 'Rectangle') ? (' M ' + x + ' ' + y + ' L ' + (x + width) + ' ' + y) : ' ';
                break;
            case 'Brace':
                if (alignment === 'Near') {
                    value = textOptions.x;
                    value1 = textOptions.x + labelSize.width + 2;
                }
                else if (alignment === 'Center') {
                    value = textOptions.x - labelSize.width / 2 - 2;
                    value1 = textOptions.x + labelSize.width / 2 + 2;
                }
                else {
                    value = textOptions.x - labelSize.width - 2;
                    value1 = textOptions.x;
                }
                height = ((!opposedPosition && isOutside) || (opposedPosition && !isOutside)) ? height : -height;
                path += 'M ' + x + ' ' + y + ' L ' + x + ' ' + (y + height / 2) +
                    ' M ' + x + ' ' + (y + height / 2) + ' L ' + (value - 2) + ' ' + (y + height / 2) +
                    ' M ' + (value1) + ' ' + (y + height / 2) + ' L ' + (x + width) + ' ' + (y + height / 2) +
                    ' M ' + (x + width) + ' ' + (y + height / 2) + ' L ' + (x + width) + ' ' + (y);
                break;
            case 'CurlyBrace':
                if ((!opposedPosition && isOutside) || (opposedPosition && !isOutside)) {
                    padding = 10;
                    padding1 = 15;
                    padding2 = 5;
                }
                else {
                    padding = -10;
                    padding1 = -15;
                    padding2 = -5;
                }
                if (alignment === 'Center') {
                    path += 'M ' + x + ' ' + y + ' C ' + x + ' ' + y + ' ' + (x + 5) + ' ' + (y + padding) + ' ' + (x + 10) + ' ' +
                        (y + padding) + ' L ' + (x + width / 2 - 5) + ' ' + (y + padding) + ' L ' + (x + width / 2) + ' ' + (y + padding1) +
                        ' L ' + (x + width / 2 + 5) + ' ' + (y + padding) + ' L ' + (x + width - 10) + ' ' + (y + padding) + ' C ' +
                        (x + width - 10) + ' ' + (y + padding) + ' ' + (x + width) + ' ' + (y + padding2) + ' ' + (x + width) + ' ' + (y);
                }
                else if (alignment === 'Near') {
                    path += 'M ' + x + ' ' + y + ' C ' + x + ' ' + y + ' ' + (x + 5) + ' ' + (y + padding) + ' ' + (x + 10) + ' ' +
                        (y + padding) + ' L ' + (x + 15) + ' ' + (y + padding1) + ' L ' + (x + 20) + ' ' + (y + padding) + ' L ' +
                        (x + width - 10) + ' ' + (y + padding) + ' C ' + (x + width - 10) + ' ' + (y + padding) + ' ' + (x + width) + ' '
                        + (y + padding2) + ' ' + (x + width) + ' ' + (y);
                }
                else {
                    path += 'M ' + x + ' ' + y + ' C ' + x + ' ' + y + ' ' + (x + 5) + ' ' + (y + padding) + ' ' + (x + 10) + ' ' +
                        (y + padding) + ' L ' + (x + width - 20) + ' ' + (y + padding) + ' L ' + (x + width - 15) + ' ' + (y + padding1) +
                        ' L ' + (x + width - 10) + ' ' + (y + padding) + ' L ' + (x + width - 10) + ' ' + (y + padding) + ' C '
                        + (x + width - 10) + ' ' + (y + padding) + ' ' + (x + width) + ' ' + (y + padding2) + ' ' + (x + width) + ' ' + (y);
                }
                break;
        }
        return path;
    };
    /**
     * render y axis multi level labels
     * @private
     * @return {void}
     */
    MultiLevelLabel.prototype.renderYAxisMultiLevelLabels = function (axis, index, parent, rect) {
        var _this = this;
        var labelSize;
        var clipX;
        var isOutside = axis.labelPosition === 'Outside';
        var x;
        var y;
        var padding = 10;
        var startX = (axis.tickPosition === axis.labelPosition ? axis.majorTickLines.height : 0) +
            (axis.maxLabelSize.width) + padding;
        var startY;
        var path = '';
        var endY;
        var argsData;
        var pointIndex;
        var isInversed = axis.isInversed;
        var start;
        var end;
        var gap;
        var anchor = 'middle';
        var opposedPosition = axis.opposedPosition;
        var scrollBarHeight = isOutside && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.crossesAt) ? axis.scrollBarHeight : 0;
        scrollBarHeight = scrollBarHeight * (opposedPosition ? 1 : -1);
        clipX = ((opposedPosition && !isOutside) || (!opposedPosition && isOutside)) ?
            (rect.x - axis.multiLevelLabelHeight - startX - padding) : (rect.x + startX);
        this.createClipRect(clipX + scrollBarHeight, rect.y - axis.majorTickLines.width, rect.height + 2 * axis.majorTickLines.width, axis.multiLevelLabelHeight + padding, this.chart.element.id + '_YAxis_Clippath_' + index, this.chart.element.id
            + 'YAxisMultiLevelLabel' + index);
        axis.multiLevelLabels.map(function (multiLevel, level) {
            _this.labelElement = _this.chart.renderer.createGroup({ id: _this.chart.element.id + index + '_MultiLevelLabel' + level });
            pointIndex = 0;
            multiLevel.categories.map(function (categoryLabel, i) {
                path = '';
                end = typeof categoryLabel.end === 'string' ? Number(new Date(categoryLabel.end)) : categoryLabel.end;
                start = typeof categoryLabel.start === 'string' ? Number(new Date(categoryLabel.start)) : categoryLabel.start;
                startY = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])((start), axis) * (rect.height);
                endY = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])((end), axis) * (rect.height);
                endY = isInversed ? [startY, startY = endY][0] : endY;
                argsData = _this.triggerMultiLabelRender(axis, categoryLabel.text, multiLevel.textStyle, multiLevel.alignment, categoryLabel.customAttributes);
                if (!argsData.cancel) {
                    labelSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])(argsData.text, argsData.textStyle);
                    gap = endY - startY;
                    x = rect.x - startX - _this.yAxisPrevHeight[level] -
                        (_this.yAxisMultiLabelHeight[level] / 2) - padding / 2;
                    y = rect.height + rect.y - startY - (gap / 2);
                    if (opposedPosition) {
                        x = isOutside ? rect.x + startX + padding / 2 + (_this.yAxisMultiLabelHeight[level] / 2) +
                            _this.yAxisPrevHeight[level] + scrollBarHeight : rect.x - startX - (_this.yAxisMultiLabelHeight[level] / 2) -
                            _this.yAxisPrevHeight[level] - padding / 2;
                    }
                    else {
                        x = isOutside ? x + scrollBarHeight : rect.x + startX + padding / 2 + (_this.yAxisMultiLabelHeight[level] / 2) +
                            _this.yAxisPrevHeight[level];
                    }
                    if (argsData.alignment === 'Center') {
                        y += labelSize.height / 4;
                    }
                    else if (argsData.alignment === 'Far') {
                        y += gap / 2 - labelSize.height / 2;
                    }
                    else {
                        y = y - gap / 2 + labelSize.height;
                    }
                    x = multiLevel.border.type === 'CurlyBrace' ? (((!opposedPosition && isOutside) ||
                        (opposedPosition && !isOutside)) ? x - padding : x + padding) : x;
                    var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["TextOption"](_this.chart.element.id + index + '_Axis_MultiLevelLabel_Level_' + level + '_Text_' + i, x, y, anchor, argsData.text);
                    options.text = (multiLevel.overflow === 'Trim') ?
                        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textTrim"])((categoryLabel.maximumTextWidth === null ? _this.yAxisMultiLabelHeight[level] :
                            categoryLabel.maximumTextWidth), argsData.text, argsData.textStyle) : options.text;
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(_this.chart.renderer, options, argsData.textStyle, argsData.textStyle.color || _this.chart.themeStyle.axisLabel, _this.labelElement, _this.chart.redraw, true);
                    if (multiLevel.border.width > 0 && multiLevel.border.type !== 'WithoutBorder') {
                        path = _this.renderYAxisLabelBorder(level, gap, axis, endY, startX, startY, labelSize, options, rect, argsData.alignment, path, isOutside, opposedPosition, pointIndex);
                        if (path !== '') {
                            _this.createBorderElement(level, index, axis, path, pointIndex);
                            pointIndex++;
                        }
                    }
                    _this.multiElements.appendChild(_this.labelElement);
                }
            });
        });
        parent.appendChild(this.multiElements);
    };
    /**
     * render y axis multi level labels border
     * @private
     * @return {void}
     */
    MultiLevelLabel.prototype.renderYAxisLabelBorder = function (labelIndex, gap, axis, endY, startX, startY, labelSize, textOptions, rect, alignment, path, isOutside, opposedPosition, categoryIndex) {
        var height = endY - startY;
        var padding = 10;
        var padding1;
        var padding2;
        var groupLabel = axis.multiLevelLabels[labelIndex];
        var categoryType = groupLabel.categories[categoryIndex].type;
        var y = rect.y + rect.height - endY;
        var scrollBarHeight = isOutside && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.crossesAt) ? axis.scrollBarHeight : 0;
        scrollBarHeight = scrollBarHeight * (opposedPosition ? 1 : -1);
        var width = this.yAxisMultiLabelHeight[labelIndex] + padding;
        var x = (((!opposedPosition && isOutside) || (opposedPosition && !isOutside)) ? rect.x - startX -
            this.yAxisPrevHeight[labelIndex] : rect.x + startX + this.yAxisPrevHeight[labelIndex]) + scrollBarHeight;
        var borderType = categoryType ? categoryType : groupLabel.border.type;
        switch (borderType) {
            case 'WithoutTopandBottomBorder':
            case 'Rectangle':
            case 'WithoutTopBorder':
                width = ((!opposedPosition && isOutside) || (opposedPosition && !isOutside)) ? -width : width;
                path += 'M ' + x + ' ' + y + ' L ' + (x + width) + ' ' + y +
                    ' M ' + x + ' ' + (y + height) + ' L ' + (x + width) + ' ' + (y + height);
                path += (borderType !== 'WithoutTopandBottomBorder') ? (' L' + ' ' + (x + width) + ' ' + y + ' ') : ' ';
                path += (borderType === 'Rectangle') ? ('M ' + (x) + ' ' + (y + height) + 'L' + ' ' + (x) + ' ' + y + ' ') : ' ';
                break;
            case 'Brace':
                width = ((!opposedPosition && isOutside) || (opposedPosition && !isOutside)) ? width : -width;
                path += 'M ' + (x) + ' ' + y + ' L ' + (x - width / 2) + ' ' + y + ' L ' + (x - width / 2) + ' ' +
                    (textOptions.y - labelSize.height / 2 - 4) + ' M ' + (x - width / 2) + ' ' +
                    (textOptions.y + labelSize.height / 4 + 2) +
                    ' L ' + (x - width / 2) + ' ' + (y + height) + ' L ' + (x) + ' ' + (y + height);
                break;
            case 'CurlyBrace':
                if ((!opposedPosition && isOutside) || (opposedPosition && !isOutside)) {
                    padding = -10;
                    padding1 = -15;
                    padding2 = -5;
                }
                else {
                    padding = 10;
                    padding1 = 15;
                    padding2 = 5;
                }
                if (alignment === 'Center') {
                    path += 'M ' + x + ' ' + y + ' C ' + x + ' ' + y + ' ' + (x + padding) + ' ' + y + ' ' + (x + padding) + ' ' + (y + 10)
                        + ' L ' + (x + padding) + ' ' + (y + (height - 10) / 2) + ' L ' + (x + padding1) + ' ' + (y + (height - 10) / 2 + 5)
                        + ' L ' + (x + padding) + ' ' + (y + (height - 10) / 2 + 10) + ' L ' + (x + padding) + ' ' + (y + (height - 10)) +
                        ' C ' + (x + padding) + ' ' + (y + (height - 10)) + ' ' + (x + padding2) + ' ' + (y + height) + ' '
                        + x + ' ' + (y + height);
                }
                else if (alignment === 'Far') {
                    path += 'M ' + x + ' ' + y + ' C ' + x + ' ' + y + ' ' + (x + padding) + ' ' + y + ' ' + (x + padding) + ' ' + (y + 10)
                        + ' L ' + (x + padding) + ' ' + (y + height - 20) + ' ' + ' L ' + (x + padding1) + ' ' + (y + (height - 15)) +
                        ' L ' + (x + padding) + ' ' + (y + (height - 10)) + ' L ' + (x + padding) + ' ' + (y + (height - 10)) +
                        ' C ' + (x + padding) + ' ' + (y + (height - 10)) + ' ' + (x + padding) + ' ' + (y + height) + ' ' + x + ' '
                        + (y + height);
                }
                else {
                    path += 'M ' + x + ' ' + y + ' C ' + x + ' ' + y + ' ' + (x + padding) + ' ' + y + ' ' + (x + padding) + ' ' + (y + 10)
                        + ' L ' + (x + padding1) + ' ' + (y + 15) +
                        ' L ' + (x + padding) + ' ' + (y + 20) + ' L ' + (x + padding) + ' ' + (y + (height - 10)) +
                        ' C ' + (x + padding) + ' ' + (y + (height - 10)) + ' ' + (x + padding2) + ' ' + (y + height) + ' ' + x +
                        ' ' + (y + height);
                }
                break;
        }
        return path;
    };
    /**
     * create cliprect
     * @return {void}
     * @private
     */
    MultiLevelLabel.prototype.createClipRect = function (x, y, height, width, clipId, axisId) {
        this.multiElements = this.chart.renderer.createGroup({
            'id': axisId,
            'clip-path': 'url(#' + clipId + ')'
        });
        this.multiElements.appendChild(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendClipElement"])(this.chart.redraw, {
            'id': clipId,
            'x': x,
            'y': y,
            'width': width,
            'height': height,
            'fill': 'white',
            'stroke-width': 1, 'stroke': 'Gray'
        }, this.chart.renderer));
    };
    /**
     * create borer element
     * @return {void}
     * @private
     */
    MultiLevelLabel.prototype.createBorderElement = function (borderIndex, axisIndex, axis, path, pointIndex) {
        var direction = path;
        var borderElement = this.chart.renderer.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["PathOption"](this.chart.element.id + axisIndex + '_Axis_MultiLevelLabel_Rect_' + borderIndex + '_' + pointIndex, 'Transparent', axis.multiLevelLabels[borderIndex].border.width, axis.multiLevelLabels[borderIndex].border.color || this.chart.themeStyle.axisLine, 1, '', path));
        borderElement.setAttribute('style', 'pointer-events: none');
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.chart.enableCanvas, this.labelElement, borderElement, this.chart.redraw, true, 'x', 'y', null, direction);
    };
    /**
     * Triggers the event.
     * @return {void}
     * @private
     */
    MultiLevelLabel.prototype.triggerMultiLabelRender = function (axis, text, textStyle, textAlignment, customAttributes) {
        var argsData;
        argsData = {
            cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_3__["axisMultiLabelRender"], axis: axis,
            text: text, textStyle: textStyle, alignment: textAlignment, customAttributes: customAttributes
        };
        this.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_3__["axisMultiLabelRender"], argsData);
        return argsData;
    };
    /**
     * Triggers the event.
     * @return {void}
     * @private
     */
    MultiLevelLabel.prototype.MultiLevelLabelClick = function (labelIndex, axisIndex) {
        var level = parseInt(labelIndex.substr(0, 1), 10);
        var textElement = parseInt(labelIndex.substr(7), 10);
        var chart = this.chart;
        var axis = chart.axisCollections[axisIndex];
        var categories = axis.multiLevelLabels[level].categories;
        var text = categories[textElement].text;
        var start = categories[textElement].start;
        var end = categories[textElement].end;
        var customAttributes = categories[textElement].customAttributes;
        var multilevelclickArgs;
        multilevelclickArgs = {
            axis: axis, level: level, text: text, customAttributes: customAttributes,
            start: start, end: end, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_3__["multiLevelLabelClick"], cancel: false
        };
        this.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_3__["multiLevelLabelClick"], multilevelclickArgs);
        return multilevelclickArgs;
    };
    /**
     * To click the multi level label
     * @return {void}
     * @private
     */
    MultiLevelLabel.prototype.click = function (event) {
        var targetId = event.target.id;
        var multiLevelID = '_Axis_MultiLevelLabel_Level_';
        var textId;
        var elementId;
        var axisIndex;
        if (targetId.indexOf(multiLevelID) > -1) {
            textId = targetId.split(multiLevelID)[1];
            elementId = targetId.split(multiLevelID)[0];
            axisIndex = parseInt(elementId.charAt(elementId.length - 1), 10);
            this.MultiLevelLabelClick(textId, axisIndex);
        }
    };
    /**
     * To get the module name for `MultiLevelLabel`.
     * @private
     */
    MultiLevelLabel.prototype.getModuleName = function () {
        return 'MultiLevelLabel';
    };
    /**
     * To destroy the `MultiLevelLabel` module.
     * @private
     */
    MultiLevelLabel.prototype.destroy = function () {
        // destroy peform here
    };
    return MultiLevelLabel;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/polar-radar-panel.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/polar-radar-panel.js ***!
  \*********************************************************************************/
/*! exports provided: PolarRadarPanel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PolarRadarPanel", function() { return PolarRadarPanel; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _series_line_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../series/line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * Specifies the Polar Axis Layout.
 */
var axisPadding = 10;
var PolarRadarPanel = /** @class */ (function (_super) {
    __extends(PolarRadarPanel, _super);
    function PolarRadarPanel() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Measure the polar radar axis size.
     * @return {void}
     * @private
     */
    PolarRadarPanel.prototype.measureAxis = function (rect) {
        var chart = this.chart;
        this.initialClipRect = rect;
        this.seriesClipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](rect.x, rect.y, rect.width, rect.height);
        //Measure axis size calculation
        this.measureRowAxis(chart, this.initialClipRect);
        this.measureColumnAxis(chart, this.initialClipRect);
        this.calculateAxisSize();
    };
    PolarRadarPanel.prototype.measureRowAxis = function (chart, rect) {
        this.calculateRowSize(rect);
        var row = chart.rows[0];
        this.measureDefinition(row, chart, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](chart.availableSize.width, row.computedHeight), rect);
    };
    PolarRadarPanel.prototype.measureColumnAxis = function (chart, rect) {
        this.calculateColumnSize(rect);
        var column = chart.columns[0];
        this.measureDefinition(column, chart, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](column.computedWidth, chart.availableSize.height), rect);
    };
    /**
     * Measure the column and row in chart.
     * @return {void}
     * @private
     */
    PolarRadarPanel.prototype.measureDefinition = function (definition, chart, size, clipRect) {
        for (var _i = 0, _a = definition.axes; _i < _a.length; _i++) {
            var axis = _a[_i];
            axis.getModule(chart);
            axis.baseModule.calculateRangeAndInterval(size, axis);
        }
    };
    /**
     * Measure the axis.
     * @return {void}
     * @private
     */
    PolarRadarPanel.prototype.calculateAxisSize = function () {
        var chart = this.chart;
        var axis;
        var padding = 5;
        this.centerX = this.initialClipRect.width * 0.5 + this.initialClipRect.x;
        this.centerY = this.initialClipRect.height * 0.5 + this.initialClipRect.y;
        chart.radius = Math.min(this.initialClipRect.width, this.initialClipRect.height) / 2 - padding -
            chart.primaryXAxis.majorTickLines.height - chart.primaryXAxis.maxLabelSize.height;
        chart.radius = (chart.primaryXAxis.coefficient * chart.radius) / 100;
        this.seriesClipRect.y = this.centerY - chart.radius;
        this.seriesClipRect.x = this.centerX - chart.radius;
        this.seriesClipRect.height = 2 * chart.radius;
        this.seriesClipRect.width = 2 * chart.radius;
        this.calculateRowSize(this.seriesClipRect);
        axis = chart.primaryYAxis;
        axis.rect = this.seriesClipRect;
        this.calculateColumnSize(this.seriesClipRect);
        axis = chart.primaryXAxis;
        axis.rect = this.seriesClipRect;
    };
    /**
     * Measure the axis.
     * @return {void}
     * @private
     */
    PolarRadarPanel.prototype.measure = function () {
        var chart = this.chart;
        chart.verticalAxes.push(chart.primaryYAxis);
        var row = chart.rows[0];
        row.axes[0] = chart.primaryYAxis;
        chart.rows[0] = row;
        chart.horizontalAxes.push(chart.primaryXAxis);
        var column = chart.columns[0];
        column.axes[0] = chart.primaryXAxis;
        chart.columns[0] = column;
    };
    /**
     * Measure the row size.
     * @return {void}
     */
    PolarRadarPanel.prototype.calculateRowSize = function (rect) {
        /*! Calculate row size */
        var chart = this.chart;
        var row = chart.rows[0];
        row.computedHeight = rect.height / 2;
        row.computedTop = rect.y;
        chart.rows[0] = row;
    };
    /**
     * Measure the row size.
     * @return {void}
     */
    PolarRadarPanel.prototype.calculateColumnSize = function (rect) {
        /*! Calculate column size */
        var chart = this.chart;
        var column = chart.columns[0];
        column.computedLeft = rect.x;
        column.computedWidth = rect.width;
        chart.columns[0] = column;
    };
    /**
     * To render the axis element.
     * @return {void}
     * @private
     */
    PolarRadarPanel.prototype.renderAxes = function () {
        var axis;
        var chart = this.chart;
        this.startAngle = chart.primaryXAxis.startAngle;
        var axisElement = chart.renderer.createGroup({ id: chart.element.id + 'AxisCollection' });
        var axisLineElement = chart.renderer.createGroup({ id: chart.element.id + 'AxisOutsideCollection' });
        for (var i = 0, len = chart.axisCollections.length; i < len; i++) {
            this.element = chart.renderer.createGroup({ id: chart.element.id + 'AxisGroup' + i });
            axis = chart.axisCollections[i];
            if (axis.orientation === 'Horizontal') {
                if (axis.majorGridLines.width > 0 || axis.majorTickLines.width > 0) {
                    this.drawXAxisGridLine(axis, i);
                }
                if (axis.visible) {
                    this.drawXAxisLabels(axis, i);
                }
            }
            else {
                this.drawYAxisGridLine(axis, i);
                if (axis.lineStyle.width > 0) {
                    this.drawYAxisLine(axis, i, axis.plotOffset, 0);
                }
                if (axis.visible) {
                    this.drawYAxisLabels(axis, i);
                }
            }
            axisElement.appendChild(this.element);
        }
        axisElement.appendChild(this.element);
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(chart.enableCanvas, chart.svgObject, axisElement, chart.redraw);
        return axisLineElement;
    };
    PolarRadarPanel.prototype.drawYAxisLine = function (axis, index, plotX, plotY) {
        var chart = this.chart;
        var optionsLine = {};
        var vector = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"])(axis.visibleLabels[0].value, axis), this.startAngle);
        var axisLine = 'M ' + this.centerX + ' ' + this.centerY + 'L ' +
            (this.centerX + chart.radius * vector.x) + ' ' + (this.centerY + chart.radius * vector.y);
        optionsLine = {
            'id': chart.element.id + 'AxisLine_' + index,
            'd': axisLine,
            'stroke-dasharray': axis.lineStyle.dashArray,
            'stroke-width': axis.lineStyle.width,
            'stroke': axis.lineStyle.color || chart.themeStyle.axisLine
        };
        chart.yAxisElements.appendChild(chart.renderer.drawPath(optionsLine));
    };
    PolarRadarPanel.prototype.drawYAxisLabels = function (axis, index) {
        var chart = this.chart;
        var elementSize;
        var options;
        var pointX = 0;
        var pointY = 0;
        var vector;
        var angle = this.startAngle < 0 ? this.startAngle + 360 : this.startAngle;
        var anchor = 'middle';
        var radius;
        var padding = 5;
        var labelElement = chart.renderer.createGroup({ id: chart.element.id + 'AxisLabels' + index });
        vector = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"])(axis.visibleLabels[0].value, axis), this.startAngle);
        for (var i = 0, len = axis.visibleLabels.length; i < len; i++) {
            radius = chart.radius * Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])(axis.visibleLabels[i].value, axis);
            elementSize = axis.visibleLabels[i].size;
            radius = chart.radius * Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])(axis.visibleLabels[i].value, axis);
            pointX = (this.centerX + radius * vector.x) + ((axis.majorTickLines.height + elementSize.width / 2 + padding / 2)
                * (Math.cos(angle * Math.PI / 180)) * (axis.labelPosition === 'Inside' ? 1 : -1));
            pointY = (this.centerY + radius * vector.y) + ((axis.majorTickLines.height + elementSize.height / 2)
                * (Math.sin(angle * Math.PI / 180)) * (axis.labelPosition === 'Inside' ? 1 : -1));
            options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["TextOption"](chart.element.id + index + '_AxisLabel_' + i, pointX, pointY + (elementSize.height / 4), anchor, axis.visibleLabels[i].text);
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["textElement"])(chart.renderer, options, axis.labelStyle, axis.labelStyle.color || chart.themeStyle.axisLabel, labelElement, false, chart.redraw, true, true);
        }
        chart.yAxisElements.appendChild(labelElement);
    };
    PolarRadarPanel.prototype.drawYAxisGridLine = function (axis, index) {
        var chart = this.chart;
        var options;
        var radius;
        var majorTick = '';
        var majorGrid = '';
        var vector;
        var vector2;
        var angle = this.startAngle < 0 ? this.startAngle + 360 : this.startAngle;
        var rect = axis.rect;
        var x1;
        var y1;
        var x2;
        var y2;
        var border = {
            color: axis.majorGridLines.color || chart.themeStyle.majorGridLine,
            width: axis.majorGridLines.width
        };
        var previousValue;
        var element;
        if (axis.majorGridLines.width > 0) {
            if (chart.visibleSeries[0].type === 'Polar') {
                for (var j = 0; j < axis.visibleLabels.length; j++) {
                    element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(chart.element.id + '_MajorGridLine_' + index + '_' + j);
                    previousValue = element ? element.getAttribute('r') : null;
                    radius = chart.radius * Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])(axis.visibleLabels[j].value, axis);
                    options = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CircleOption"](chart.element.id + '_MajorGridLine_' + index + '_' + j, 'transparent', border, axis.majorGridLines.width, this.centerX, this.centerY, radius);
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(chart.enableCanvas, this.element, chart.renderer.drawCircle(options), chart.redraw, true, 'r', 'r', new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](+previousValue, +previousValue), null, true);
                }
            }
            else {
                for (var j = 0; j < axis.visibleLabels.length; j++) {
                    radius = chart.radius * Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])(axis.visibleLabels[j].value, axis);
                    majorGrid = '';
                    for (var i = 0, len = chart.primaryXAxis.visibleLabels.length; i < len; i++) {
                        vector = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"])(chart.primaryXAxis.visibleLabels[i].value, chart.primaryXAxis), this.startAngle);
                        if (i + 1 < len) {
                            vector2 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"])(chart.primaryXAxis.visibleLabels[i + 1].value, chart.primaryXAxis), this.startAngle);
                        }
                        else {
                            vector2 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"])(chart.primaryXAxis.visibleLabels[0].value, chart.primaryXAxis), this.startAngle);
                        }
                        x1 = this.centerX + radius * vector.x;
                        y1 = this.centerY + radius * vector.y;
                        x2 = this.centerX + radius * vector2.x;
                        y2 = this.centerY + radius * vector2.y;
                        majorGrid = majorGrid.concat((i ? 'L ' : 'M ') + ' ' + x1 + ' ' + y1 + ' ' + 'L ' + ' ' + x2 + ' ' + y2 + ' ');
                    }
                    element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(chart.element.id + '_MajorGridLine_' + index + '_' + j);
                    previousValue = element ? element.getAttribute('d') : null;
                    options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](chart.element.id + '_MajorGridLine_' + index + '_' + j, 'transparent', axis.majorGridLines.width, axis.majorGridLines.color || chart.themeStyle.majorGridLine, null, null, majorGrid);
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(chart.enableCanvas, this.element, chart.renderer.drawPath(options), chart.redraw, true, 'x', 'y', null, previousValue, true);
                }
            }
        }
        if (axis.majorTickLines.width > 0) {
            vector = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"])(axis.visibleLabels[0].value, axis), this.startAngle);
            for (var i = 0; i < axis.visibleLabels.length; i++) {
                radius = chart.radius * Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])(axis.visibleLabels[i].value, axis);
                x1 = this.centerX + radius * vector.x;
                y1 = this.centerY + radius * vector.y;
                x2 = x1 + (axis.majorTickLines.height * (Math.cos(angle * Math.PI / 180)) * (axis.tickPosition === 'Inside' ? 1 : -1));
                y2 = y1 + (axis.majorTickLines.height * (Math.sin(angle * Math.PI / 180)) * (axis.tickPosition === 'Inside' ? 1 : -1));
                majorTick = 'M ' + x1 + ' ' + y1 + ' L ' + x2 + ' ' + y2;
                this.renderTickLine(axis, index, majorTick, '', i);
            }
        }
    };
    PolarRadarPanel.prototype.drawXAxisGridLine = function (axis, index) {
        var chart = this.chart;
        var tempInterval;
        var vector;
        var majorGrid = '';
        var majorTick = '';
        var minorGirdLine = '';
        var minorTickLine = '';
        var x1 = this.centerX;
        var x2;
        var y1 = this.centerY;
        var y2;
        var minorDirection;
        var tickSize = axis.majorTickLines.height;
        var rect = axis.rect;
        var length = axis.visibleLabels.length;
        //Gridlines
        for (var i = 0; i < length; i++) {
            tempInterval = axis.visibleLabels[i].value;
            vector = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"])(axis.visibleLabels[i].value, axis), this.startAngle);
            x2 = this.centerX + chart.radius * vector.x;
            y2 = this.centerY + chart.radius * vector.y;
            var xLoc = x2 + (axis.majorTickLines.height * vector.x * (axis.tickPosition === 'Inside' ? -1 : 1));
            var yLoc = y2 + (axis.majorTickLines.height * vector.y * (axis.tickPosition === 'Inside' ? -1 : 1));
            majorGrid = 'M ' + x1 + ' ' + y1 + ' ' + 'L ' + x2 + ' ' + y2;
            majorTick = 'M ' + x2 + ' ' + y2 + ' L ' + xLoc + ' ' + yLoc;
            if (axis.minorTicksPerInterval > 0 && (axis.minorGridLines.width > 0 || axis.minorTickLines.width > 0)
                && axis.valueType !== 'Category' && chart.visibleSeries[0].type !== 'Radar') {
                minorDirection = this.drawAxisMinorLine(axis, tempInterval, minorGirdLine, minorTickLine);
                minorGirdLine = minorDirection[0];
                minorTickLine = minorDirection[1];
            }
            this.renderTickLine(axis, index, majorTick, minorTickLine, i);
            this.renderGridLine(axis, index, majorGrid, minorGirdLine, i);
        }
    };
    PolarRadarPanel.prototype.drawAxisMinorLine = function (axis, tempInterval, minorGird, minorTick) {
        var value = tempInterval;
        var x;
        var y;
        var vector;
        var range = axis.visibleRange;
        var direction = [];
        for (var j = 0; j < axis.minorTicksPerInterval; j++) {
            value += (axis.valueType === 'DateTime' ? axis.dateTimeInterval : axis.visibleRange.interval) /
                (axis.minorTicksPerInterval + 1);
            if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["inside"])(value, range)) {
                vector = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"])(value, axis), this.startAngle);
                x = this.centerX + this.chart.radius * vector.x;
                y = this.centerY + this.chart.radius * vector.y;
                var tickXSize = x + (axis.minorTickLines.height * vector.x * (axis.tickPosition === 'Inside' ? -1 : 1));
                var tickYSize = y + (axis.minorTickLines.height * vector.y * (axis.tickPosition === 'Inside' ? -1 : 1));
                minorGird = minorGird.concat('M' + ' ' + this.centerX + ' ' + this.centerY
                    + 'L ' + x + ' ' + y);
                minorTick = minorTick.concat('M' + ' ' + x + ' ' + y + 'L' + ' ' + (tickXSize) + ' ' +
                    (tickYSize));
            }
        }
        direction.push(minorGird);
        direction.push(minorTick);
        return direction;
    };
    /**
     * To render the axis label.
     * @return {void}
     * @private
     */
    PolarRadarPanel.prototype.drawXAxisLabels = function (axis, index) {
        var chart = this.chart;
        var pointX = 0;
        var pointY = 0;
        var labelElement = chart.renderer.createGroup({ id: chart.element.id + 'AxisLabels' + index });
        var options;
        var vector;
        var labelText;
        var firstLabelX;
        var islabelInside = axis.labelPosition === 'Inside';
        var padding = 5;
        var lastLabelX;
        var label;
        var textAnchor = '';
        var ticksbwtLabel = axis.valueType === 'Category' && axis.labelPlacement === 'BetweenTicks'
            && chart.visibleSeries[0].type !== 'Radar' ? 0.5 : 0;
        var radius = chart.radius + axis.majorTickLines.height;
        radius = (islabelInside) ? -radius : radius;
        for (var i = 0, len = axis.visibleLabels.length; i < len; i++) {
            vector = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"])(axis.visibleLabels[i].value + ticksbwtLabel, axis), this.startAngle);
            if (!isNaN(vector.x) && !isNaN(vector.y)) {
                pointX = this.centerX + (radius + axis.majorTickLines.height + padding) * vector.x;
                pointY = this.centerY + (radius + axis.majorTickLines.height + padding) * vector.y;
                textAnchor = parseFloat(pointX.toFixed(1)) === parseFloat(this.centerX.toFixed(1)) ? 'middle' :
                    ((pointX < this.centerX && !islabelInside) || (pointX > this.centerX && islabelInside)) ? 'end' : 'start';
            }
            labelText = axis.visibleLabels[i].text;
            // fix for label style not working in axisLabelRender event issue
            label = axis.visibleLabels[i];
            if (i === 0) {
                firstLabelX = pointX;
            }
            else if (i === axis.visibleLabels.length - 1 && axis.valueType !== 'Category') {
                lastLabelX = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["measureText"])(labelText, axis.labelStyle).height;
                lastLabelX += pointX;
                labelText = (lastLabelX > firstLabelX) ? '' : labelText;
            }
            options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["TextOption"](chart.element.id + index + '_AxisLabel_' + i, pointX, pointY, textAnchor, labelText, '', 'central');
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["textElement"])(chart.renderer, options, label.labelStyle, label.labelStyle.color || chart.themeStyle.axisLabel, labelElement, false, chart.redraw, true, true);
        }
        this.element.appendChild(labelElement);
    };
    PolarRadarPanel.prototype.renderTickLine = function (axis, index, majorTickLine, minorTickLine, gridIndex) {
        var tickOptions;
        var chart = this.chart;
        var direction;
        var element;
        if (axis.majorTickLines.width > 0) {
            element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(chart.element.id + '_MajorTickLine_' + index + '_' + gridIndex);
            direction = element ? element.getAttribute('d') : null;
            tickOptions = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](chart.element.id + '_MajorTickLine_' + index + '_' + gridIndex, 'transparent', axis.majorTickLines.width, axis.majorTickLines.color || chart.themeStyle.majorTickLine, null, null, majorTickLine);
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(chart.enableCanvas, chart.yAxisElements, chart.renderer.drawPath(tickOptions), chart.redraw, true, 'x', 'y', null, direction);
        }
        if (axis.minorTickLines.width > 0) {
            element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(chart.element.id + '_MinorTickLine_' + index + '_' + gridIndex);
            direction = element ? element.getAttribute('d') : null;
            tickOptions = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](chart.element.id + '_MinorTickLine_' + index + '_' + gridIndex, 'transparent', axis.minorTickLines.width, axis.minorTickLines.color || chart.themeStyle.minorTickLine, null, null, minorTickLine);
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(chart.enableCanvas, chart.yAxisElements, chart.renderer.drawPath(tickOptions), chart.redraw, true, 'x', 'y', null, direction);
        }
    };
    PolarRadarPanel.prototype.renderGridLine = function (axis, index, majorGrid, minorGird, gridIndex) {
        var chart = this.chart;
        var gridOptions;
        var direction;
        var element;
        if (axis.majorGridLines.width > 0) {
            element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(chart.element.id + '_MajorGridLine_' + index + '_' + gridIndex);
            direction = element ? element.getAttribute('d') : null;
            gridOptions = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](chart.element.id + '_MajorGridLine_' + index + '_' + gridIndex, 'transparent', axis.majorGridLines.width, axis.majorGridLines.color || chart.themeStyle.majorGridLine, null, axis.majorGridLines.dashArray, majorGrid);
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(chart.enableCanvas, this.element, chart.renderer.drawPath(gridOptions), chart.redraw, true, 'x', 'y', null, direction);
        }
        if (axis.minorGridLines.width > 0) {
            element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(chart.element.id + '_MinorGridLine_' + index + '_' + gridIndex);
            direction = element ? element.getAttribute('d') : null;
            gridOptions = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](chart.element.id + '_MinorGridLine_' + index + '_' + gridIndex, 'transparent', axis.minorGridLines.width, axis.minorGridLines.color || chart.themeStyle.minorGridLine, null, axis.minorGridLines.dashArray, minorGird);
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(chart.enableCanvas, this.element, chart.renderer.drawPath(gridOptions), chart.redraw, true, 'x', 'y', null, direction);
        }
    };
    return PolarRadarPanel;
}(_series_line_base__WEBPACK_IMPORTED_MODULE_2__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/strip-line.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/axis/strip-line.js ***!
  \**************************************************************************/
/*! exports provided: StripLine */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StripLine", function() { return StripLine; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/**
 * StripLine src
 */



/**
 * `StripLine` module is used to render the stripLine in chart.
 */
var StripLine = /** @class */ (function () {
    function StripLine() {
    }
    /**
     * Finding x, y, width and height of the strip line
     * @param axis
     * @param strip line
     * @param seriesClipRect
     * @param startValue
     * @param segmentAxis
     */
    StripLine.prototype.measureStripLine = function (axis, stripline, seriesClipRect, startValue, segmentAxis) {
        var actualStart;
        var actualEnd;
        var orientation = axis.orientation;
        if (stripline.isRepeat && stripline.size !== null) {
            actualStart = startValue;
            actualEnd = null;
        }
        else {
            if (axis.valueType === 'DateTimeCategory') {
                var start = stripline.start;
                var end = stripline.end;
                actualStart = (start != null && typeof start !== 'number') ? axis.labels.indexOf((start).getTime().toString()) :
                    start;
                actualEnd = (end != null && typeof end !== 'number') ? axis.labels.indexOf((end).getTime().toString()) : end;
            }
            else {
                actualStart = stripline.start === null ? null : +stripline.start;
                actualEnd = stripline.end === null ? null : +stripline.end;
            }
        }
        var rect = this.getFromTovalue(actualStart, actualEnd, stripline.size, stripline.startFromAxis, axis, stripline);
        var height = (orientation === 'Vertical') ? (rect.to - rect.from) * axis.rect.height : seriesClipRect.height;
        var width = (orientation === 'Horizontal') ? (rect.to - rect.from) * axis.rect.width : seriesClipRect.width;
        var x = (orientation === 'Vertical') ? seriesClipRect.x : ((rect.from * axis.rect.width) + axis.rect.x);
        var y = (orientation === 'Horizontal') ? seriesClipRect.y : (axis.rect.y + axis.rect.height -
            ((stripline.sizeType === 'Pixel' ? rect.from : rect.to) * axis.rect.height));
        if (stripline.isSegmented && stripline.segmentStart != null && stripline.segmentEnd != null && stripline.sizeType !== 'Pixel') {
            var segRect = this.getFromTovalue(+stripline.segmentStart, +stripline.segmentEnd, null, null, segmentAxis, stripline);
            if (segmentAxis.orientation === 'Vertical') {
                y = (segmentAxis.rect.y + segmentAxis.rect.height -
                    (segRect.to * segmentAxis.rect.height));
                height = (segRect.to - segRect.from) * segmentAxis.rect.height;
            }
            else {
                x = ((segRect.from * segmentAxis.rect.width) + segmentAxis.rect.x);
                width = (segRect.to - segRect.from) * segmentAxis.rect.width;
            }
        }
        if ((height !== 0 && width !== 0) || (stripline.sizeType === 'Pixel' && (stripline.start !== null || stripline.startFromAxis))) {
            return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](x, y, width, height);
        }
        return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, 0, 0);
    };
    /**
     * To get from to value from start, end, size, start from axis
     * @param start
     * @param end
     * @param size
     * @param startFromAxis
     * @param axis
     * @param strip line
     */
    StripLine.prototype.getFromTovalue = function (start, end, size, startFromAxis, axis, stripline) {
        var from = (!stripline.isRepeat && startFromAxis) ? axis.visibleRange.min : start;
        var to = this.getToValue(Math.max(start, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(end) ? start : end), from, size, axis, end, stripline);
        from = this.findValue(from, axis);
        to = this.findValue(to, axis);
        return { from: Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])(axis.isInversed ? to : from, axis), to: Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])(axis.isInversed ? from : to, axis) };
    };
    /**
     * Finding end value of the strip line
     * @param to
     * @param from
     * @param size
     * @param axis
     * @param end
     * @param strip line
     */
    StripLine.prototype.getToValue = function (to, from, size, axis, end, stripline) {
        var sizeType = stripline.sizeType;
        var isEnd = (end === null);
        if (axis.valueType === 'DateTime') {
            var fromValue = new Date(from);
            if (sizeType === 'Auto') {
                sizeType = axis.actualIntervalType;
                size *= axis.visibleRange.interval;
            }
            switch (sizeType) {
                case 'Years':
                    return (isEnd ? new Date(fromValue.setFullYear(fromValue.getFullYear() + size)) : to);
                case 'Months':
                    return (isEnd ? new Date(fromValue.setMonth(fromValue.getMonth() + size)) : to);
                case 'Days':
                    return (isEnd ? new Date(fromValue.setDate(fromValue.getDate() + size)) : to);
                case 'Hours':
                    return (isEnd ? new Date(fromValue.setHours(fromValue.getHours() + size)) : to);
                case 'Minutes':
                    return (isEnd ? new Date(fromValue.setMinutes(fromValue.getMinutes() + size)) : to);
                case 'Seconds':
                    return (isEnd ? new Date(fromValue.setSeconds(fromValue.getSeconds() + size)) : to);
                default:
                    return from;
            }
        }
        else {
            return stripline.sizeType === 'Pixel' ? from : (isEnd ? (from + size) : to);
        }
    };
    /**
     * To check the strip line values within range
     * @param value
     * @param axis
     */
    StripLine.prototype.findValue = function (value, axis) {
        if (value < axis.visibleRange.min) {
            value = axis.visibleRange.min;
        }
        else if (value > axis.visibleRange.max) {
            value = axis.visibleRange.max;
        }
        return value;
    };
    /**
     * To render strip lines based start and end.
     * @private
     * @param chart
     * @param position
     * @param axes
     */
    StripLine.prototype.renderStripLine = function (chart, position, axes) {
        var id = chart.element.id + '_stripline_' + position + '_';
        var seriesClipRect = chart.chartAxisLayoutPanel.seriesClipRect;
        var end = 0;
        var limit = 0;
        var startValue = 0;
        var segmentAxis = null;
        var range;
        var options = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](id + 'ClipRect', 'transparent', { width: 1, color: 'Gray' }, 1, {
            x: chart.initialClipRect.x, y: chart.initialClipRect.y,
            width: chart.initialClipRect.width,
            height: chart.initialClipRect.height
        });
        var striplineGroup = chart.renderer.createGroup({
            id: id + 'collections',
            'clip-path': 'url(#' + id + 'ClipRect' + ')'
        });
        striplineGroup.appendChild(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendClipElement"])(chart.redraw, options, chart.renderer));
        for (var _i = 0, axes_1 = axes; _i < axes_1.length; _i++) {
            var axis = axes_1[_i];
            var count = 0;
            for (var _a = 0, _b = axis.stripLines; _a < _b.length; _a++) {
                var stripline = _b[_a];
                if (stripline.visible && stripline.zIndex === position) {
                    if (stripline.isSegmented && stripline.segmentStart != null && stripline.segmentEnd != null &&
                        stripline.sizeType !== 'Pixel') {
                        segmentAxis = this.getSegmentAxis(axes, axis, stripline);
                    }
                    if (stripline.isRepeat && stripline.repeatEvery != null && stripline.size !== null && stripline.sizeType !== 'Pixel') {
                        limit = (stripline.repeatUntil != null) ? ((axis.valueType === 'DateTime') ?
                            stripline.repeatUntil.getTime() : +stripline.repeatUntil) : axis.actualRange.max;
                        startValue = stripline.start;
                        if ((stripline.startFromAxis && axis.valueType === 'DateTime' && stripline.sizeType === 'Auto') ||
                            (stripline.start < axis.visibleRange.min)) {
                            startValue = axis.visibleLabels[0].value === axis.visibleRange.min ? axis.visibleRange.min :
                                axis.visibleLabels[0].value - (axis.valueType === 'DateTime' ? axis.dateTimeInterval :
                                    axis.visibleRange.interval);
                        }
                        startValue = stripline.startFromAxis && axis.valueType !== 'DateTime' ? axis.visibleRange.min : startValue;
                        while (startValue < limit) {
                            end = (startValue + (axis.valueType === 'DateTime' ? axis.dateTimeInterval * +stripline.size : stripline.size));
                            range = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withIn"])(end, axis.visibleRange);
                            if ((startValue >= axis.visibleRange.min && startValue < axis.visibleRange.max) || range) {
                                this.renderStripLineElement(axis, stripline, seriesClipRect, id, striplineGroup, chart, startValue, segmentAxis, count);
                            }
                            count++;
                            startValue = this.getStartValue(axis, stripline, startValue);
                        }
                    }
                    else {
                        this.renderStripLineElement(axis, stripline, seriesClipRect, id, striplineGroup, chart, null, segmentAxis, count);
                        count++;
                    }
                }
            }
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(chart.enableCanvas, chart.svgObject, striplineGroup, chart.redraw);
    };
    /**
     * To draw the single line strip line
     * @param strip line
     * @param rect
     * @param id
     * @param parent
     * @param chart
     * @param axis
     */
    StripLine.prototype.renderPath = function (stripline, rect, id, parent, chart, axis) {
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(id);
        var direction = element ? element.getAttribute('d') : '';
        var d = (axis.orientation === 'Vertical') ? ('M' + rect.x + ' ' + rect.y + ' ' + 'L' + (rect.x + rect.width)
            + ' ' + rect.y) :
            ('M' + rect.x + ' ' + rect.y + ' ' + 'L' + rect.x + ' ' + (rect.y + rect.height));
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(chart.enableCanvas, parent, chart.renderer.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["PathOption"](id, '', stripline.size, stripline.color, stripline.opacity, stripline.dashArray, d)), chart.redraw, true, 'x', 'y', null, direction, true);
    };
    ;
    /**
     * To draw the rectangle
     * @param strip line
     * @param rect
     * @param id
     * @param parent
     * @param chart
     */
    StripLine.prototype.renderRectangle = function (stripline, rect, id, parent, chart) {
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(id);
        var previousRect = element ? new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](+element.getAttribute('x'), +element.getAttribute('y'), +element.getAttribute('width'), +element.getAttribute('height')) : null;
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(chart.enableCanvas, parent, chart.renderer.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](id, stripline.color, stripline.border, stripline.opacity, rect, 0, 0, '', stripline.dashArray)), chart.redraw, true, 'x', 'y', null, null, true, true, previousRect);
    };
    /**
     * To create the text on strip line
     * @param strip line
     * @param rect
     * @param id
     * @param parent
     * @param chart
     * @param axis
     */
    StripLine.prototype.renderText = function (stripline, rect, id, parent, chart, axis) {
        var textSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])(stripline.text, stripline.textStyle);
        var textMid = 3 * (textSize.height / 8);
        var ty = rect.y + (rect.height / 2) + textMid;
        var rotation = (stripline.rotation === null) ? ((axis.orientation === 'Vertical') ? 0 : -90) : stripline.rotation;
        var tx = rect.x + (rect.width / 2);
        var anchor;
        var padding = 5;
        if (axis.orientation === 'Horizontal') {
            tx = this.getTextStart(tx + (textMid * this.factor(stripline.horizontalAlignment)), rect.width, stripline.horizontalAlignment);
            ty = this.getTextStart(ty - textMid, rect.height, stripline.verticalAlignment);
            anchor = this.invertAlignment(stripline.verticalAlignment);
        }
        else {
            tx = this.getTextStart(tx, rect.width, stripline.horizontalAlignment);
            ty = this.getTextStart(ty + (textMid * this.factor(stripline.verticalAlignment)) - padding, rect.height, stripline.verticalAlignment);
            anchor = stripline.horizontalAlignment;
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(chart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["TextOption"](id, tx, ty, anchor, stripline.text, 'rotate(' + rotation + ' ' + tx + ',' + ty + ')', 'middle'), stripline.textStyle, stripline.textStyle.color, parent);
    };
    StripLine.prototype.invertAlignment = function (anchor) {
        switch (anchor) {
            case 'Start':
                anchor = 'End';
                break;
            case 'End':
                anchor = 'Start';
                break;
        }
        return anchor;
    };
    /**
     * To find the next value of the recurrence strip line
     * @param axis
     * @param stripline
     * @param startValue
     */
    StripLine.prototype.getStartValue = function (axis, stripline, startValue) {
        if (axis.valueType === 'DateTime') {
            return this.getToValue(null, startValue, +stripline.repeatEvery, axis, null, stripline);
        }
        else {
            return startValue + (+stripline.repeatEvery);
        }
    };
    /**
     * Finding segment axis for segmented strip line
     * @param axes
     * @param axis
     * @param strip line
     */
    StripLine.prototype.getSegmentAxis = function (axes, axis, stripline) {
        var segment;
        if (stripline.segmentAxisName == null) {
            return (axis.orientation === 'Horizontal') ? axes[1] : axes[0];
        }
        else {
            for (var i = 0; i < axes.length; i++) {
                if (stripline.segmentAxisName === axes[i].name) {
                    segment = axes[i];
                }
            }
            return segment;
        }
    };
    /**
     * To render strip line on chart
     * @param axis
     * @param stripline
     * @param seriesClipRect
     * @param id
     * @param striplineGroup
     * @param chart
     * @param startValue
     * @param segmentAxis
     * @param count
     */
    StripLine.prototype.renderStripLineElement = function (axis, stripline, seriesClipRect, id, striplineGroup, chart, startValue, segmentAxis, count) {
        var rect = this.measureStripLine(axis, stripline, seriesClipRect, startValue, segmentAxis);
        if (stripline.sizeType === 'Pixel') {
            this.renderPath(stripline, rect, id + 'path_' + axis.name + '_' + count, striplineGroup, chart, axis);
        }
        else {
            if (rect.height !== 0 && rect.width !== 0) {
                this.renderRectangle(stripline, rect, id + 'rect_' + axis.name + '_' + count, striplineGroup, chart);
            }
        }
        if (stripline.text !== '') {
            this.renderText(stripline, rect, id + 'text_' + axis.name + '_' + count, striplineGroup, chart, axis);
        }
    };
    /**
     * To find the factor of the text
     * @param anchor
     */
    StripLine.prototype.factor = function (anchor) {
        var factor = 0;
        switch (anchor) {
            case 'Start':
                factor = 1;
                break;
            case 'End':
                factor = -1;
                break;
        }
        return factor;
    };
    /**
     * To find the start value of the text
     * @param xy
     * @param size
     * @param textAlignment
     */
    StripLine.prototype.getTextStart = function (xy, size, textAlignment) {
        var padding = 5;
        switch (textAlignment) {
            case 'Start':
                xy = xy - (size / 2) + padding;
                break;
            case 'End':
                xy = xy + (size / 2) - padding;
                break;
        }
        return xy;
    };
    /**
     * To get the module name for `StripLine`.
     * @private
     */
    StripLine.prototype.getModuleName = function () {
        return 'StripLine';
    };
    /**
     * To destroy the `StripLine` module.
     * @private
     */
    StripLine.prototype.destroy = function () {
        // destroy peform here
    };
    return StripLine;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/chart.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/chart.js ***!
  \****************************************************************/
/*! exports provided: CrosshairSettings, ZoomSettings, Chart */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CrosshairSettings", function() { return CrosshairSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZoomSettings", function() { return ZoomSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Chart", function() { return Chart; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _common_model_theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _axis_axis__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./axis/axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis.js");
/* harmony import */ var _axis_cartesian_panel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./axis/cartesian-panel */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/cartesian-panel.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _utils_get_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/get-data */ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/get-data.js");
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _common_model_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/model/data */ "./node_modules/@syncfusion/ej2-charts/src/common/model/data.js");
/* harmony import */ var _series_marker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./series/marker */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/marker.js");
/* harmony import */ var _common_legend_legend__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../common/legend/legend */ "./node_modules/@syncfusion/ej2-charts/src/common/legend/legend.js");
/* harmony import */ var _technical_indicators_technical_indicator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./technical-indicators/technical-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/technical-indicator.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _model_chart_base__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./model/chart-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/model/chart-base.js");
/* harmony import */ var _common_utils_export__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../common/utils/export */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/export.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};

























/**
 * Configures the crosshair in the chart.
 */
var CrosshairSettings = /** @class */ (function (_super) {
    __extends(CrosshairSettings, _super);
    function CrosshairSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], CrosshairSettings.prototype, "enable", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], CrosshairSettings.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: null, width: 1 }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Border"])
    ], CrosshairSettings.prototype, "line", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Both')
    ], CrosshairSettings.prototype, "lineType", void 0);
    return CrosshairSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the zooming behavior for the chart.
 */
var ZoomSettings = /** @class */ (function (_super) {
    __extends(ZoomSettings, _super);
    function ZoomSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ZoomSettings.prototype, "enableSelectionZooming", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ZoomSettings.prototype, "enablePinchZooming", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ZoomSettings.prototype, "enableMouseWheelZooming", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], ZoomSettings.prototype, "enableDeferredZooming", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('XY')
    ], ZoomSettings.prototype, "mode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(['Zoom', 'ZoomIn', 'ZoomOut', 'Pan', 'Reset'])
    ], ZoomSettings.prototype, "toolbarItems", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ZoomSettings.prototype, "enablePan", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ZoomSettings.prototype, "enableScrollbar", void 0);
    return ZoomSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Represents the Chart control.
 * ```html
 * <div id="chart"/>
 * <script>
 *   var chartObj = new Chart({ isResponsive : true });
 *   chartObj.appendTo("#chart");
 * </script>
 * ```
 * @public
 */
var Chart = /** @class */ (function (_super) {
    __extends(Chart, _super);
    /**
     * Constructor for creating the widget
     * @hidden
     */
    function Chart(options, element) {
        var _this = _super.call(this, options, element) || this;
        /** @public */
        _this.animated = false;
        /** @private */
        _this.isPointMouseDown = false;
        /** @private */
        _this.isScrolling = false;
        /** @private */
        _this.chartAreaType = 'Cartesian';
        _this.chartid = 57723;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('mergePersistData', _this.mergePersistChartData, _this);
        return _this;
    }
    /**
     * To manage persist chart data
     */
    Chart.prototype.mergePersistChartData = function () {
        var data = window.localStorage.getItem(this.getModuleName() + this.element.id);
        if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data) || (data === ''))) {
            var dataObj = JSON.parse(data);
            var keys = Object.keys(dataObj);
            this.isProtectedOnChange = true;
            for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
                var key = keys_1[_i];
                if ((typeof this[key] === 'object') && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this[key])) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this[key], dataObj[key]);
                }
                else {
                    this[key] = dataObj[key];
                }
            }
            this.isProtectedOnChange = false;
        }
    };
    /**
     * Initialize the event handler.
     */
    Chart.prototype.preRender = function () {
        // It is used for checking blazor framework or not.
        var blazor = 'Blazor';
        this.isBlazor = window[blazor];
        this.unWireEvents();
        this.initPrivateVariable();
        this.setCulture();
        this.wireEvents();
    };
    Chart.prototype.initPrivateVariable = function () {
        this.animateSeries = true;
        this.delayRedraw = false;
        this.horizontalAxes = [];
        this.verticalAxes = [];
        this.refreshAxis();
        this.refreshDefinition(this.rows);
        this.refreshDefinition(this.columns);
        if (this.tooltipModule) {
            this.tooltipModule.previousPoints = [];
        }
        if (this.element.id === '') {
            var collection = document.getElementsByClassName('e-chart').length;
            this.element.id = 'chart_' + this.chartid + '_' + collection;
        }
        //seperate ID to differentiate chart and stock chart
        this.svgId = this.stockChart ? this.stockChart.element.id + '_stockChart_chart' :
            this.element.id + (this.enableCanvas ? '_canvas' : '_svg');
    };
    /**
     * To Initialize the control rendering.
     */
    Chart.prototype.render = function () {
        this.svgRenderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["SvgRenderer"](this.element.id);
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_13__["load"], { chart: this });
        this.createChartSvg();
        this.setTheme();
        this.markerRender = new _series_marker__WEBPACK_IMPORTED_MODULE_10__["Marker"](this);
        this.calculateAreaType();
        this.calculateVisibleSeries();
        this.initTechnicalIndicators();
        this.initTrendLines();
        this.calculateVisibleAxis();
        this.processData();
    };
    /**
     * Gets the localized label by locale keyword.
     * @param  {string} key
     * @return {string}
     */
    Chart.prototype.getLocalizedLabel = function (key) {
        return this.localeObject.getConstant(key);
    };
    /**
     * Animate the series bounds.
     * @private
     */
    Chart.prototype.animate = function (duration) {
        this.redraw = true;
        this.animated = true; //used to set duration as 1000 for animation at default 300
        this.duration = duration ? duration : 1000;
    };
    /**
     * Refresh the chart bounds.
     * @private
     */
    Chart.prototype.refreshBound = function () {
        if (this.legendModule && this.legendSettings.visible) {
            this.legendModule.getLegendOptions(this.visibleSeries, this);
        }
        this.calculateStackValues();
        this.calculateBounds();
        this.renderElements();
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])('chartmeasuretext');
    };
    /**
     * To calcualte the stack values
     */
    Chart.prototype.calculateStackValues = function () {
        var series;
        var isCalculateStacking = false;
        for (var i = 0, len = this.visibleSeries.length; i < len; i++) {
            series = this.visibleSeries[i];
            series.position = series.rectCount = undefined;
            if (((series.type.indexOf('Stacking') !== -1) || (series.drawType.indexOf('Stacking') !== -1
                && this.chartAreaType === 'PolarRadar')) && !isCalculateStacking) {
                series.calculateStackedValue(series.type.indexOf('100') > -1, this);
                isCalculateStacking = true;
            }
        }
    };
    Chart.prototype.renderElements = function () {
        this.renderBorder();
        this.renderTitle();
        this.renderAreaBorder();
        this.renderSeriesElements(this.renderAxes());
        this.renderLegend();
        this.applyZoomkit();
        this.performSelection();
        this.setSecondaryElementPosition();
        this.renderAnnotation();
    };
    /**
     * To render the legend
     * @private
     */
    Chart.prototype.renderAxes = function () {
        this.yAxisElements = this.renderer.createGroup({ id: this.element.id + 'yAxisCollection' });
        var axisElement;
        if (this.rows.length > 0 && this.columns.length > 0) {
            axisElement = this.chartAxisLayoutPanel.renderAxes();
        }
        if (this.stripLineModule) {
            this.stripLineModule.renderStripLine(this, 'Behind', this.axisCollections);
        }
        return axisElement;
    };
    /**
     * To render the legend
     */
    Chart.prototype.renderLegend = function () {
        if (this.legendModule && this.legendModule.legendCollections.length) {
            this.legendModule.calTotalPage = true;
            var borderWidth = this.legendSettings.border.width;
            var bounds = this.legendModule.legendBounds;
            var rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](bounds.x, bounds.y, bounds.width, bounds.height);
            if (this.enableCanvas) {
                rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](rect.x - borderWidth / 2, rect.y - borderWidth / 2, rect.width + borderWidth, rect.height + borderWidth);
                this.renderer.canvasClip(rect);
            }
            this.legendModule.renderLegend(this, this.legendSettings, bounds);
            if (this.enableCanvas) {
                this.renderer.canvasRestore();
            }
        }
        if (!this.redraw) {
            if (!this.stockChart) {
                this.element.appendChild(this.svgObject);
            }
            else {
                if (!Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.stockChart.chartObject.id)) {
                    this.stockChart.mainObject.appendChild(this.svgObject);
                }
            }
        }
    };
    /**
     * To set the left and top position for data label template for center aligned chart
     */
    Chart.prototype.setSecondaryElementPosition = function () {
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.element.id + '_Secondary_Element');
        if (!element) {
            return;
        }
        var rect = this.element.getBoundingClientRect();
        var svgRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.svgId).getBoundingClientRect();
        element.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
        element.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
    };
    Chart.prototype.initializeModuleElements = function () {
        this.dataLabelCollections = [];
        var elementId = this.element.id;
        if (this.series.length) {
            this.seriesElements = (this.series[0].type === 'Scatter' || this.series[0].type === 'Bubble') ?
                this.svgRenderer.createGroup({ id: elementId + 'SeriesCollection' }) :
                this.renderer.createGroup({ id: elementId + 'SeriesCollection' });
        }
        if (this.indicators.length) {
            this.indicatorElements = this.renderer.createGroup({ id: elementId + 'IndicatorCollection' });
        }
        if (this.hasTrendlines()) {
            this.trendLineElements = this.renderer.createGroup({ id: elementId + 'TrendLineCollection' });
        }
        this.dataLabelElements = this.renderer.createGroup({ id: elementId + 'DataLabelCollection' });
    };
    Chart.prototype.hasTrendlines = function () {
        var isTrendline;
        for (var _i = 0, _a = this.series; _i < _a.length; _i++) {
            var series = _a[_i];
            isTrendline = series.trendlines.length ? true : false;
            if (isTrendline) {
                break;
            }
        }
        return isTrendline;
    };
    Chart.prototype.renderSeriesElements = function (axisElement) {
        // Initialize the series elements values
        this.initializeModuleElements();
        var elementId = this.element.id;
        if (this.element.tagName !== 'g') {
            var tooltipDiv = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["redrawElement"])(this.redraw, elementId + '_Secondary_Element') ||
                this.createElement('div');
            tooltipDiv.id = elementId + '_Secondary_Element';
            tooltipDiv.setAttribute('style', 'position: relative');
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(false, this.element, tooltipDiv, this.redraw);
        }
        // For canvas
        if (this.enableCanvas) {
            var tooltipdiv = document.getElementById(elementId + '_Secondary_Element');
            tooltipdiv = !tooltipdiv ? this.createElement('div', { id: elementId + '_Secondary_Element',
                attrs: { 'style': 'position: relative; left:0px; top:0px' } }) : tooltipdiv;
            var svg = this.svgRenderer.createSvg({
                id: elementId + '_tooltip_svg',
                width: this.availableSize.width,
                height: this.availableSize.height
            });
            svg.setAttribute('style', 'position: absolute; pointer-events: none');
            tooltipdiv.appendChild(svg);
        }
        // For userInteraction
        if (this.tooltip.enable) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.enableCanvas, this.svgObject, this.renderer.createGroup({ id: elementId + '_UserInteraction', style: 'pointer-events:none;' }), this.redraw);
        }
        if (this.rows.length > 0 && this.columns.length > 0) {
            this.initializeIndicator();
            this.initializeTrendLine();
            this.renderSeries();
            this.appendElementsAfterSeries(axisElement);
        }
    };
    /**
     * @private
     */
    Chart.prototype.renderSeries = function () {
        for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.visible) {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["findClipRect"])(item);
                if (this.enableCanvas) {
                    // To render scatter and bubble series in canvas
                    this.renderCanvasSeries(item);
                    // To clip the series rect for canvas
                    this.renderer.canvasClip(this.chartAxisLayoutPanel.seriesClipRect);
                }
                item.renderSeries(this);
                if (this.enableCanvas) {
                    this.renderer.canvasRestore();
                }
            }
        }
        var options = {
            'id': this.element.id + '_ChartAreaClipRect_',
            'x': this.chartAxisLayoutPanel.seriesClipRect.x,
            'y': this.chartAxisLayoutPanel.seriesClipRect.y,
            'width': this.chartAxisLayoutPanel.seriesClipRect.width,
            'height': this.chartAxisLayoutPanel.seriesClipRect.height,
            'fill': 'transparent',
            'stroke-width': 1,
            'stroke': 'Gray'
        };
        if (!this.enableCanvas) {
            this.seriesElements.appendChild(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendClipElement"])(this.redraw, options, this.renderer));
        }
        var seriesSvg = document.getElementById(this.element.id + '_series_svg');
        seriesSvg ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(false, seriesSvg, this.seriesElements, this.redraw) :
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.enableCanvas, this.svgObject, this.seriesElements, this.redraw);
    };
    Chart.prototype.renderCanvasSeries = function (item) {
        var svgElement;
        var divElement;
        var canvas;
        if ((item.type === 'Bubble' || item.type === 'Scatter')) {
            svgElement = !svgElement ? this.svgRenderer.createSvg({ id: this.element.id + '_series_svg',
                width: this.availableSize.width, height: this.availableSize.height }) : svgElement;
            divElement = !divElement ? this.createElement('div', { id: this.element.id + '_series' }) : divElement;
            divElement.setAttribute('style', 'position: absolute');
            var mainElement = document.getElementById(this.element.id + '_Secondary_Element');
            divElement.appendChild(svgElement);
            mainElement.appendChild(divElement);
        }
        svgElement = (this.enableCanvas && (item.type === 'Bubble' || item.type === 'Scatter')) ?
            svgElement : this.svgObject;
        canvas = (this.enableCanvas && (item.type === 'Bubble' || item.type === 'Scatter')) ?
            false : this.enableCanvas;
    };
    Chart.prototype.initializeIndicator = function () {
        for (var _i = 0, _a = this.indicators; _i < _a.length; _i++) {
            var indicator = _a[_i];
            if (this[Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["firstToLowerCase"])(indicator.type) + 'IndicatorModule']) {
                this[Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["firstToLowerCase"])(indicator.type) + 'IndicatorModule'].createIndicatorElements(this, indicator, indicator.index);
            }
        }
        if (this.indicatorElements) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.enableCanvas, this.svgObject, this.indicatorElements, this.redraw);
        }
    };
    Chart.prototype.initializeTrendLine = function () {
        for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            if (series.trendlines.length) {
                this.trendLineModule.getTrendLineElements(series, this);
            }
        }
        if (this.trendLineElements) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.enableCanvas, this.svgObject, this.trendLineElements, this.redraw);
        }
    };
    Chart.prototype.appendElementsAfterSeries = function (axisElement) {
        if (this.chartAreaType === 'PolarRadar') {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.enableCanvas, this.svgObject, this.yAxisElements, this.redraw);
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.enableCanvas, this.svgObject, axisElement, this.redraw);
        if ((this.zoomModule && this.zoomSettings.enableScrollbar && this.scrollElement.childElementCount) ||
            (this.scrollElement && this.scrollElement.childElementCount)) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(false, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.element.id + '_Secondary_Element'), this.scrollElement, this.redraw);
        }
        if (this.stripLineModule) {
            this.stripLineModule.renderStripLine(this, 'Over', this.axisCollections);
        }
        if (!this.tooltip.enable) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.enableCanvas, this.svgObject, this.renderer.createGroup({ id: this.element.id + '_UserInteraction', style: 'pointer-events:none;' }), this.redraw);
        }
        if (this.stockChart) {
            this.stockChart.calculateStockEvents();
        }
    };
    Chart.prototype.applyZoomkit = function () {
        /**
         * Issue: Zoomkit not visible after performing refresh()
         * Fix: this method called without checking `zoomModule.isZoomed`
         */
        if (!this.redraw && this.zoomModule && (!this.zoomSettings.enablePan || this.zoomModule.performedUI)) {
            this.zoomModule.applyZoomToolkit(this, this.axisCollections);
        }
    };
    /**
     * Render annotation perform here
     * @param redraw
     * @private
     */
    Chart.prototype.renderAnnotation = function () {
        if (this.annotationModule) {
            this.annotationModule.renderAnnotations(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.element.id + '_Secondary_Element'));
        }
    };
    Chart.prototype.performSelection = function () {
        var selectedDataIndexes = [];
        if (this.selectionModule) {
            selectedDataIndexes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], this.selectionModule.selectedDataIndexes, null, true);
            this.selectionModule.invokeSelection(this);
        }
        if (selectedDataIndexes.length > 0) {
            this.selectionModule.selectedDataIndexes = selectedDataIndexes;
            this.selectionModule.redrawSelection(this, this.selectionMode);
        }
    };
    Chart.prototype.processData = function (render) {
        if (render === void 0) { render = true; }
        this.visibleSeriesCount = 0;
        var check = true;
        for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            if (!series.visible && !this.legendSettings.visible) {
                this.visibleSeriesCount++;
                continue;
            }
            if (series.category !== 'Indicator' && series.category !== 'TrendLine') {
                this.initializeDataModule(series);
            }
        }
        for (var _b = 0, _c = this.indicators; _b < _c.length; _b++) {
            var indicator = _c[_b];
            if (indicator.dataSource) {
                var techIndicator = indicator;
                this.initializeDataModule(techIndicator);
                check = false;
            }
        }
        if (render && (!this.visibleSeries.length || this.visibleSeriesCount === this.visibleSeries.length && check)) {
            this.refreshBound();
            this.trigger('loaded', { chart: this.isBlazor ? {} : this });
        }
    };
    Chart.prototype.initializeDataModule = function (series) {
        series.xData = [];
        series.yData = [];
        series.dataModule = new _common_model_data__WEBPACK_IMPORTED_MODULE_9__["Data"](series.dataSource || this.dataSource, series.query);
        series.points = [];
        series.refreshDataManager(this);
    };
    Chart.prototype.calculateBounds = function () {
        var margin = this.margin;
        // Title Height;
        var titleHeight = 0;
        var subTitleHeight = 0;
        var titleWidth = 0;
        var padding = 15;
        var left = margin.left;
        var width = this.availableSize.width - left - margin.right - this.border.width;
        this.titleCollection = [];
        this.subTitleCollection = [];
        if (this.title) {
            this.titleCollection = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getTitle"])(this.title, this.titleStyle, width);
            titleHeight = (Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["measureText"])(this.title, this.titleStyle).height * this.titleCollection.length) + padding;
            if (this.subTitle) {
                var maxWidth = 0;
                for (var _i = 0, _a = this.titleCollection; _i < _a.length; _i++) {
                    var titleText = _a[_i];
                    titleWidth = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["measureText"])(titleText, this.titleStyle).width;
                    maxWidth = titleWidth > maxWidth ? titleWidth : maxWidth;
                }
                this.subTitleCollection = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getTitle"])(this.subTitle, this.subTitleStyle, maxWidth);
                subTitleHeight = (Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["measureText"])(this.subTitle, this.subTitleStyle).height * this.subTitleCollection.length) +
                    padding;
            }
        }
        var top = margin.top + subTitleHeight + titleHeight + this.chartArea.border.width * 0.5;
        var height = this.availableSize.height - top - this.border.width - margin.bottom;
        this.initialClipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](left, top, width, height);
        if (this.legendModule) {
            this.legendModule.calculateLegendBounds(this.initialClipRect, this.availableSize);
        }
        this.chartAxisLayoutPanel.measureAxis(this.initialClipRect);
    };
    /**
     * Handles the print method for chart control.
     */
    Chart.prototype.print = function (id) {
        var exportChart = new _common_utils_export__WEBPACK_IMPORTED_MODULE_15__["ExportUtils"](this);
        exportChart.print(id);
    };
    /**
     * Defines the trendline initialization
     */
    Chart.prototype.initTrendLines = function () {
        for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            var trendIndex = 0;
            for (var _b = 0, _c = series.trendlines; _b < _c.length; _b++) {
                var trendline = _c[_b];
                var trendLine = trendline;
                var type = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["firstToLowerCase"])(trendLine.type);
                if (this.trendLineModule) {
                    trendLine.index = trendIndex;
                    trendLine.sourceIndex = series.index;
                    this.trendLineModule.initSeriesCollection(trendLine, this);
                    if (trendLine.targetSeries) {
                        trendLine.targetSeries.xAxisName = series.xAxisName;
                        trendLine.targetSeries.yAxisName = series.yAxisName;
                        this.visibleSeries.push(trendLine.targetSeries);
                    }
                }
                trendIndex++;
            }
        }
    };
    Chart.prototype.calculateAreaType = function () {
        var series = this.series[0];
        this.chartArea.border.width = this.stockChart ? 0 : this.chartArea.border.width;
        if (series) {
            this.requireInvertedAxis = ((series.type.indexOf('Bar') !== -1) && !this.isTransposed) ||
                ((series.type.indexOf('Bar') === -1) && this.isTransposed && this.chartAreaType !== 'PolarRadar');
        }
        this.chartAxisLayoutPanel = this.chartAreaType === 'PolarRadar' ? (this.polarSeriesModule || this.radarSeriesModule)
            : new _axis_cartesian_panel__WEBPACK_IMPORTED_MODULE_5__["CartesianAxisLayoutPanel"](this);
    };
    /**
     * Calculate the visible axis
     * @private
     */
    Chart.prototype.calculateVisibleAxis = function () {
        var axis;
        var series;
        var axes = [this.primaryXAxis, this.primaryYAxis];
        axes = this.chartAreaType === 'Cartesian' ? axes.concat(this.axes) : axes;
        if (this.paretoSeriesModule && this.series[0].type === 'Pareto') {
            axes = axes.concat(this.paretoSeriesModule.paretoAxes);
        }
        this.axisCollections = [];
        if (this.zoomModule) {
            this.zoomModule.isPanning = this.zoomModule.isAxisZoomed(axes) && this.zoomSettings.enablePan;
            this.svgObject.setAttribute('cursor', this.zoomModule.isPanning ? 'pointer' : 'auto');
            if (this.scrollBarModule) {
                this.scrollBarModule.axes = axes;
            }
        }
        if (this.scrollSettingEnabled) {
            if (this.scrollBarModule) {
                this.scrollBarModule.axes = axes;
            }
        }
        for (var i = 0, len = axes.length; i < len; i++) {
            axis = axes[i];
            axis.series = [];
            axis.labels = [];
            for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
                var series_1 = _a[_i];
                this.initAxis(series_1, axis, true);
            }
            for (var _b = 0, _c = this.indicators; _b < _c.length; _b++) {
                var indicator = _c[_b];
                this.initAxis(indicator, axis, false);
            }
            if (this.scrollBarModule && !axis.zoomingScrollBar) {
                this.scrollBarModule.injectTo(axis, this);
            }
            if (axis.orientation != null) {
                this.axisCollections.push(axis);
            }
        }
        if (this.rows.length > 0 && this.columns.length > 0) {
            this.chartAxisLayoutPanel.measure();
        }
    };
    Chart.prototype.initAxis = function (series, axis, isSeries) {
        if (series.xAxisName === axis.name || (series.xAxisName == null && axis.name === 'primaryXAxis')) {
            axis.orientation = this.requireInvertedAxis ? 'Vertical' : 'Horizontal';
            series.xAxis = axis;
            if (isSeries) {
                axis.series.push(series);
            }
        }
        else if (series.yAxisName === axis.name || (series.yAxisName == null && axis.name === 'primaryYAxis')) {
            axis.orientation = this.requireInvertedAxis ? 'Horizontal' : 'Vertical';
            series.yAxis = axis;
            if (isSeries) {
                axis.series.push(series);
            }
        }
    };
    Chart.prototype.initTechnicalIndicators = function () {
        var i = 0;
        for (var _i = 0, _a = this.indicators; _i < _a.length; _i++) {
            var indicator = _a[_i];
            var techIndicator = indicator;
            var type = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["firstToLowerCase"])(techIndicator.type);
            if (this[type + 'IndicatorModule']) {
                techIndicator.index = i;
                this[type + 'IndicatorModule'].initSeriesCollection(techIndicator, this);
                for (var _b = 0, _c = techIndicator.targetSeries; _b < _c.length; _b++) {
                    var targetSeries = _c[_b];
                    if (indicator.seriesName || indicator.dataSource) {
                        this.visibleSeries.push(targetSeries);
                    }
                }
            }
            i++;
        }
    };
    /** @private */
    Chart.prototype.refreshTechnicalIndicator = function (series) {
        if (this.indicators.length) {
            var targetIndicator = null;
            if (series instanceof _series_chart_series__WEBPACK_IMPORTED_MODULE_8__["Series"] && series.category !== 'Indicator') {
                for (var _i = 0, _a = this.indicators; _i < _a.length; _i++) {
                    var indicator = _a[_i];
                    if (indicator.seriesName === series.name && !indicator.dataSource) {
                        targetIndicator = indicator;
                        targetIndicator.setDataSource(series, this);
                    }
                }
            }
            else if (series instanceof _technical_indicators_technical_indicator__WEBPACK_IMPORTED_MODULE_12__["TechnicalIndicator"]) {
                targetIndicator = series;
                targetIndicator.setDataSource(series instanceof _series_chart_series__WEBPACK_IMPORTED_MODULE_8__["Series"] ? series : null, this);
            }
        }
    };
    Chart.prototype.calculateVisibleSeries = function () {
        var series;
        var seriesCollection;
        this.visibleSeries = [];
        var colors = this.palettes.length ? this.palettes : Object(_common_model_theme__WEBPACK_IMPORTED_MODULE_2__["getSeriesColor"])(this.theme);
        var count = colors.length;
        seriesCollection = this.series.sort(function (a, b) { return a.zOrder - b.zOrder; });
        for (var i = 0, len = seriesCollection.length; i < len; i++) {
            series = seriesCollection[i];
            // for y axis label issue during chart navigation
            series.category = seriesCollection[0].type === 'Pareto' ? 'Pareto' : 'Series';
            series.index = i;
            series.interior = series.fill || colors[i % count];
            switch (series.type) {
                case 'Bar':
                case 'StackingBar':
                case 'StackingBar100':
                    if (seriesCollection[0].type.indexOf('Bar') === -1) {
                        continue;
                    }
                    break;
                case 'Polar':
                case 'Radar':
                    if (this.chartAreaType !== 'PolarRadar') {
                        continue;
                    }
                    if (this.chartAreaType === 'PolarRadar' && ((series.xAxisName === null && series.yAxisName !== null) ||
                        (series.xAxisName !== null && series.yAxisName === null) ||
                        (series.xAxisName !== null && series.yAxisName !== null))) {
                        continue;
                    }
                    break;
                case 'Pareto':
                    this.visibleSeries.push(series);
                    this.paretoSeriesModule.initSeries(series, this);
                    continue;
                default:
                    if (this.chartAreaType === 'PolarRadar' || seriesCollection[0].type.indexOf('Bar') > -1) {
                        continue;
                    }
                    break;
            }
            this.visibleSeries.push(series);
            seriesCollection[i] = series;
        }
    };
    Chart.prototype.renderTitle = function () {
        var rect;
        var margin = this.margin;
        if (this.title) {
            var alignment = this.titleStyle.textAlignment;
            var getAnchor = alignment === 'Near' ? 'start' : alignment === 'Far' ? 'end' : 'middle';
            var elementSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["measureText"])(this.title, this.titleStyle);
            rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](margin.left, 0, this.availableSize.width - margin.left - margin.right, 0);
            var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["TextOption"](this.element.id + '_ChartTitle', Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["titlePositionX"])(rect, this.titleStyle), this.margin.top + ((elementSize.height) * 3 / 4), getAnchor, this.titleCollection, '', 'auto');
            var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["redrawElement"])(this.redraw, this.element.id + '_ChartTitle', options, this.renderer) ||
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(this.renderer, options, this.titleStyle, this.titleStyle.color || this.themeStyle.chartTitle, this.svgObject);
            if (element) {
                element.setAttribute('aria-label', this.description || this.title);
                element.setAttribute('tabindex', this.tabIndex.toString());
            }
            if (this.subTitle) {
                this.renderSubTitle(options);
            }
        }
    };
    Chart.prototype.renderSubTitle = function (options) {
        var maxWidth = 0;
        var titleWidth = 0;
        var padding = 10;
        var rect;
        var anchor = function (alignment) {
            return alignment === 'Near' ? 'start' : alignment === 'Far' ? 'end' : 'middle';
        };
        var alignment = this.titleStyle.textAlignment;
        for (var _i = 0, _a = this.titleCollection; _i < _a.length; _i++) {
            var titleText = _a[_i];
            titleWidth = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["measureText"])(titleText, this.titleStyle).width;
            maxWidth = titleWidth > maxWidth ? titleWidth : maxWidth;
        }
        var subTitleElementSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["measureText"])(this.subTitle, this.subTitleStyle);
        rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](alignment === 'Center' ? (options.x - maxWidth * 0.5) : alignment === 'Far' ? options.x - maxWidth : options.x, 0, maxWidth, 0);
        var subTitleOptions = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["TextOption"](this.element.id + '_ChartSubTitle', Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["titlePositionX"])(rect, this.subTitleStyle), options.y * options.text.length + ((subTitleElementSize.height) * 3 / 4) + padding, anchor(this.subTitleStyle.textAlignment), this.subTitleCollection, '', 'auto');
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["redrawElement"])(this.redraw, this.element.id + '_ChartSubTitle', subTitleOptions, this.renderer) ||
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(this.renderer, subTitleOptions, this.subTitleStyle, this.subTitleStyle.color || this.themeStyle.chartTitle, this.svgObject);
        if (element) {
            element.setAttribute('aria-label', this.description || this.subTitle);
            element.setAttribute('tabindex', this.tabIndex.toString());
        }
    };
    Chart.prototype.renderBorder = function () {
        var width = this.border.width;
        var rect = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.element.id + '_ChartBorder', this.background || this.themeStyle.background, this.border, 1, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](width * 0.5, width * 0.5, this.availableSize.width - width, this.availableSize.height - width));
        this.htmlObject = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["redrawElement"])(this.redraw, this.element.id + '_ChartBorder', rect, this.renderer)
            || this.renderer.drawRectangle(rect);
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.enableCanvas, this.svgObject, this.htmlObject, this.redraw);
    };
    /**
     * @private
     */
    Chart.prototype.renderAreaBorder = function () {
        if (this.chartAreaType === 'PolarRadar') {
            return null;
        }
        else {
            var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.element.id + '_ChartAreaBorder');
            var previousRect = element ?
                new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](+element.getAttribute('x'), +element.getAttribute('y'), +element.getAttribute('width'), +element.getAttribute('height')) : null;
            var rect = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.element.id + '_ChartAreaBorder', this.chartArea.background, { width: this.chartArea.border.width, color: this.chartArea.border.color || this.themeStyle.areaBorder }, this.chartArea.opacity, this.chartAxisLayoutPanel.seriesClipRect);
            this.htmlObject = this.renderer.drawRectangle(rect);
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(this.enableCanvas, this.svgObject, this.htmlObject, this.redraw, true, 'x', 'y', null, null, true, true, previousRect);
            this.htmlObject = null;
        }
    };
    /**
     * To add series for the chart
     * @param {SeriesModel[]} seriesCollection - Defines the series collection to be added in chart.
     * @return {void}.
     */
    Chart.prototype.addSeries = function (seriesCollection) {
        for (var _i = 0, seriesCollection_1 = seriesCollection; _i < seriesCollection_1.length; _i++) {
            var series = seriesCollection_1[_i];
            series = new _series_chart_series__WEBPACK_IMPORTED_MODULE_8__["Series"](this, 'series', series);
            this.series.push(series);
        }
        this.refresh();
    };
    /**
     * To Remove series for the chart
     * @param index - Defines the series index to be remove in chart series
     * @return {void}
     */
    Chart.prototype.removeSeries = function (index) {
        this.series.splice(index, 1);
        this.refresh();
    };
    /**
     * To destroy the widget
     * @method destroy
     * @return {void}.
     * @member of Chart
     */
    Chart.prototype.destroy = function () {
        if (this.scrollBarModule) {
            this.scrollBarModule.destroy();
        }
        if (this.markerRender) {
            this.markerRender.removeEventListener();
            this.markerRender = null;
        }
        this.unWireEvents();
        _super.prototype.destroy.call(this);
        if (!this.enableCanvas) {
            this.removeSvg();
            this.svgObject = null;
        }
        this.horizontalAxes = [];
        this.verticalAxes = [];
        this.visibleSeries = [];
        this.axisCollections = [];
        this.chartAxisLayoutPanel = null;
        this.dataLabelCollections = null;
        this.dataLabelElements = null;
        this.yAxisElements = null;
    };
    /**
     * Get component name
     */
    Chart.prototype.getModuleName = function () {
        return 'chart';
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @private
     */
    Chart.prototype.getPersistData = function () {
        var keyEntity = ['loaded', 'animationComplete', 'primaryXAxis', 'primaryYAxis'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Method to create SVG element.
     */
    Chart.prototype.createChartSvg = function () {
        this.removeSvg();
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["createSvg"])(this);
    };
    /**
     * Method to bind events for chart
     */
    Chart.prototype.unWireEvents = function () {
        /*! Find the Events type */
        var startEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent;
        var moveEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent;
        var stopEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent;
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        /*! UnBind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, startEvent, this.chartOnMouseDown);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, moveEvent, this.mouseMove);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, stopEvent, this.mouseEnd);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.chartOnMouseClick);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'contextmenu', this.chartRightClick);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, cancelEvent, this.mouseLeave);
        window.removeEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.resizeBound);
        /**
         * To fix memory issue
         */
        if (this.touchObject) {
            this.touchObject.destroy();
            this.touchObject = null;
        }
    };
    Chart.prototype.wireEvents = function () {
        /*! Find the Events type */
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        /*! Bind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.chartOnMouseDown, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMove, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseEnd, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.chartOnMouseClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'contextmenu', this.chartRightClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, cancelEvent, this.mouseLeave, this);
        this.resizeBound = this.chartResize.bind(this);
        window.addEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.resizeBound);
        this.longPressBound = this.longPress.bind(this);
        this.touchObject = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, { tapHold: this.longPressBound, tapHoldThreshold: 500 });
        /*! Apply the style for chart */
        this.setStyle(this.element);
    };
    Chart.prototype.chartRightClick = function (event) {
        if (this.crosshair.enable && this.crosshairModule &&
            (event.buttons === 2 || event.which === 0 || event.pointerType === 'touch')) {
            event.preventDefault();
            event.stopPropagation();
            return false;
        }
        return true;
    };
    Chart.prototype.setStyle = function (element) {
        var zooming = this.zoomSettings;
        var disableScroll = zooming.enableSelectionZooming || zooming.enablePinchZooming ||
            this.selectionMode !== 'None' || this.crosshair.enable;
        element.style.touchAction = disableScroll ? 'none' : 'element';
        element.style.msTouchAction = disableScroll ? 'none' : 'element';
        element.style.msContentZooming = 'none';
        element.style.msUserSelect = 'none';
        element.style.webkitUserSelect = 'none';
        element.style.position = 'relative';
        element.style.display = 'block';
        // To fix angular and react tooltip div scrollbar issue
        element.style.overflow = 'hidden';
    };
    /**
     * Finds the orientation.
     * @return {boolean}
     * @private
     */
    Chart.prototype.isOrientation = function () {
        return ('orientation' in window && 'onorientationchange' in window);
    };
    /**
     * Handles the long press on chart.
     * @return {boolean}
     * @private
     */
    Chart.prototype.longPress = function (e) {
        this.mouseX = (e && e.originalEvent.changedTouches) ? (e.originalEvent.changedTouches[0].clientX) : 0;
        this.mouseY = (e && e.originalEvent.changedTouches) ? (e.originalEvent.changedTouches[0].clientY) : 0;
        this.startMove = true;
        this.setMouseXY(this.mouseX, this.mouseY);
        this.notify('tapHold', e);
        return false;
    };
    /**
     * To find mouse x, y for aligned chart element svg position
     */
    Chart.prototype.setMouseXY = function (pageX, pageY) {
        var svgRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.svgId).getBoundingClientRect();
        var rect = this.element.getBoundingClientRect();
        this.mouseY = (pageY - rect.top) - Math.max(svgRect.top - rect.top, 0);
        this.mouseX = (pageX - rect.left) - Math.max(svgRect.left - rect.left, 0);
    };
    /**
     * Export method for the chart.
     */
    Chart.prototype.export = function (type, fileName) {
        if (this.exportModule) {
            this.exportModule.export(type, fileName);
        }
    };
    /**
     * Handles the chart resize.
     * @return {boolean}
     * @private
     */
    Chart.prototype.chartResize = function (e) {
        var _this = this;
        this.animateSeries = false;
        var arg = {
            chart: this.isBlazor ? {} : this,
            name: _common_model_constants__WEBPACK_IMPORTED_MODULE_13__["resized"],
            currentSize: new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Size"](0, 0),
            previousSize: new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Size"](this.availableSize.width, this.availableSize.height),
        };
        if (this.resizeTo) {
            clearTimeout(this.resizeTo);
        }
        this.resizeTo = setTimeout(function () {
            if (_this.isDestroyed || _this.stockChart) {
                clearTimeout(_this.resizeTo);
                return;
            }
            _this.createChartSvg();
            arg.currentSize = _this.availableSize;
            _this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_13__["resized"], arg);
            _this.refreshAxis();
            _this.refreshBound();
            _this.trigger('loaded', { chart: _this.isBlazor ? {} : _this });
        }, 500);
        return false;
    };
    /**
     * Handles the mouse move.
     * @return {boolean}
     * @private
     */
    Chart.prototype.mouseMove = function (e) {
        var pageX;
        var pageY;
        var touchArg;
        if (e.type === 'touchmove') {
            this.isTouch = true;
            touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            pageY = touchArg.changedTouches[0].clientY;
        }
        else {
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2' || this.isTouch;
            pageX = e.clientX;
            pageY = e.clientY;
        }
        this.setMouseXY(pageX, pageY);
        this.chartOnMouseMove(e);
        return false;
    };
    /**
     * Handles the mouse leave.
     * @return {boolean}
     * @private
     */
    Chart.prototype.mouseLeave = function (e) {
        var pageX;
        var pageY;
        var touchArg;
        if (e.type === 'touchleave') {
            this.isTouch = true;
            touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            pageY = touchArg.changedTouches[0].clientY;
        }
        else {
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2';
            pageX = e.clientX;
            pageY = e.clientY;
        }
        this.setMouseXY(pageX, pageY);
        this.chartOnMouseLeave(e);
        return false;
    };
    /**
     * Handles the mouse leave on chart.
     * @return {boolean}
     * @private
     */
    Chart.prototype.chartOnMouseLeave = function (e) {
        var element = e.target;
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_13__["chartMouseLeave"], { target: element.id, x: this.mouseX, y: this.mouseY });
        this.isChartDrag = this.isPointMouseDown = false;
        this.notify(cancelEvent, e);
        return false;
    };
    /**
     * Handles the mouse click on chart.
     * @return {boolean}
     * @private
     */
    Chart.prototype.chartOnMouseClick = function (e) {
        var element = e.target;
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_13__["chartMouseClick"], { target: element.id, x: this.mouseX, y: this.mouseY });
        if (this.pointClick) {
            this.triggerPointEvent(_common_model_constants__WEBPACK_IMPORTED_MODULE_13__["pointClick"]);
        }
        this.notify('click', e);
        return false;
    };
    Chart.prototype.triggerPointEvent = function (event) {
        var data = new _utils_get_data__WEBPACK_IMPORTED_MODULE_7__["ChartData"](this);
        var pointData = data.getData();
        if (pointData.series && pointData.point) {
            this.trigger(event, {
                series: this.isBlazor ? {} : pointData.series,
                point: pointData.point,
                seriesIndex: pointData.series.index, pointIndex: pointData.point.index,
                x: this.mouseX, y: this.mouseY
            });
        }
    };
    /**
     * Handles the mouse move on chart.
     * @return {boolean}
     * @private
     */
    Chart.prototype.chartOnMouseMove = function (e) {
        var element = e.target;
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_13__["chartMouseMove"], { target: element.id, x: this.mouseX, y: this.mouseY });
        if (this.pointMove) {
            this.triggerPointEvent(_common_model_constants__WEBPACK_IMPORTED_MODULE_13__["pointMove"]);
        }
        // Tooltip for chart series.
        if (!this.isTouch) {
            this.titleTooltip(e, this.mouseX, this.mouseY);
            this.axisTooltip(e, this.mouseX, this.mouseY);
        }
        if (this.dataEditingModule) {
            this.dataEditingModule.pointMouseMove(e);
        }
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, e);
        this.isTouch = false;
        return false;
    };
    Chart.prototype.titleTooltip = function (event, x, y, isTouch) {
        var targetId = event.target.id;
        var id = (targetId === (this.element.id + '_ChartTitle') || targetId === (this.element.id + '_ChartSubTitle'));
        if (id && (event.target.textContent.indexOf('...') > -1)) {
            var title = (targetId === (this.element.id + '_ChartTitle')) ? this.title : this.subTitle;
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["showTooltip"])(title, x, y, this.element.offsetWidth, this.element.id + '_EJ2_Title_Tooltip', Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.element.id + '_Secondary_Element'), isTouch);
        }
        else {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.element.id + '_EJ2_Title_Tooltip');
        }
    };
    Chart.prototype.axisTooltip = function (event, x, y, isTouch) {
        var targetId = event.target.id;
        if (((targetId.indexOf('AxisLabel') > -1) || targetId.indexOf('Axis_MultiLevelLabel') > -1) &&
            (event.target.textContent.indexOf('...') > -1)) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["showTooltip"])(this.findAxisLabel(targetId), x, y, this.element.offsetWidth, this.element.id + '_EJ2_AxisLabel_Tooltip', Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.element.id + '_Secondary_Element'), isTouch);
        }
        else {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.element.id + '_EJ2_AxisLabel_Tooltip');
        }
    };
    Chart.prototype.findAxisLabel = function (text) {
        var texts;
        if (text.indexOf('AxisLabel') > -1) {
            texts = ((text.replace(this.element.id, '')).replace('AxisLabel_', '')).split('_');
            return this.axisCollections[parseInt(texts[0], 10)].visibleLabels[parseInt(texts[1], 10)].originalText;
        }
        else {
            texts = ((text.replace(this.element.id, '')).replace('Axis_MultiLevelLabel_Level_', '').replace('Text_', '')).split('_');
            return (this.axisCollections[parseInt(texts[0], 10)].multiLevelLabels[parseInt(texts[1], 10)]
                .categories[parseInt(texts[2], 10)].text);
        }
    };
    /**
     * Handles the mouse down on chart.
     * @return {boolean}
     * @private
     */
    Chart.prototype.chartOnMouseDown = function (e) {
        var pageX;
        var pageY;
        var target;
        var touchArg;
        var offset = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 20 : 30;
        var rect = this.element.getBoundingClientRect();
        var element = e.target;
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_13__["chartMouseDown"], { target: element.id, x: this.mouseX, y: this.mouseY });
        if (e.type === 'touchstart') {
            this.isTouch = true;
            touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            pageY = touchArg.changedTouches[0].clientY;
            target = touchArg.target;
        }
        else {
            this.isTouch = e.pointerType === 'touch';
            pageX = e.clientX;
            pageY = e.clientY;
            target = e.target;
        }
        var svgRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.svgId).getBoundingClientRect();
        this.mouseDownX = this.previousMouseMoveX = (pageX - rect.left) - Math.max(svgRect.left - rect.left, 0);
        this.mouseDownY = this.previousMouseMoveY = (pageY - rect.top) - Math.max(svgRect.top - rect.top, 0);
        if (this.isTouch) {
            this.isDoubleTap = (new Date().getTime() < this.threshold && target.id.indexOf(this.element.id + '_Zooming_') === -1 &&
                (this.mouseDownX - offset >= this.mouseX || this.mouseDownX + offset >= this.mouseX) &&
                (this.mouseDownY - offset >= this.mouseY || this.mouseDownY + offset >= this.mouseY) &&
                (this.mouseX - offset >= this.mouseDownX || this.mouseX + offset >= this.mouseDownX) &&
                (this.mouseY - offset >= this.mouseDownY || this.mouseY + offset >= this.mouseDownY));
        }
        if (this.dataEditingModule) {
            this.dataEditingModule.pointMouseDown();
        }
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, e);
        return false;
    };
    /**
     * Handles the mouse up.
     * @return {boolean}
     * @private
     */
    Chart.prototype.mouseEnd = function (e) {
        var pageY;
        var pageX;
        var touchArg;
        if (e.type === 'touchend') {
            touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            this.isTouch = true;
            pageY = touchArg.changedTouches[0].clientY;
        }
        else {
            pageY = e.clientY;
            pageX = e.clientX;
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2';
        }
        this.setMouseXY(pageX, pageY);
        this.chartOnMouseUp(e);
        return false;
    };
    /**
     * Handles the mouse up.
     * @return {boolean}
     * @private
     */
    Chart.prototype.chartOnMouseUp = function (e) {
        var element = e.target;
        this.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_13__["chartMouseUp"], { target: element.id, x: this.mouseX, y: this.mouseY });
        this.isChartDrag = false;
        if (this.isTouch) {
            this.titleTooltip(e, this.mouseX, this.mouseY, this.isTouch);
            this.axisTooltip(e, this.mouseX, this.mouseY, this.isTouch);
            this.threshold = new Date().getTime() + 300;
        }
        if (this.dataEditingModule) {
            this.dataEditingModule.pointMouseUp();
        }
        if (!this.enableCanvas) {
            this.seriesElements.removeAttribute('clip-path');
        }
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, e);
        return false;
    };
    /**
     * Method to set culture for chart
     */
    Chart.prototype.setCulture = function () {
        this.intl = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"]();
        this.setLocaleConstants();
        this.localeObject = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName(), this.defaultLocalConstants, this.locale);
    };
    /**
     * Method to set the annotation content dynamically for chart.
     */
    Chart.prototype.setAnnotationValue = function (annotationIndex, content) {
        var parentNode = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.element.id + '_Annotation_Collections');
        var annotation = this.annotations[annotationIndex];
        var element;
        if (content !== null) {
            annotation.content = content;
            if (parentNode) {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.element.id + '_Annotation_' + annotationIndex);
                element = this.createElement('div');
                this.annotationModule.processAnnotation(annotation, annotationIndex, element);
                parentNode.appendChild(element.children[0]);
            }
            else {
                this.annotationModule.renderAnnotations(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.element.id + '_Secondary_Element'));
            }
        }
    };
    /**
     * Method to set locale constants
     */
    Chart.prototype.setLocaleConstants = function () {
        this.defaultLocalConstants = {
            ZoomIn: 'ZoomIn',
            Zoom: 'Zoom',
            ZoomOut: 'ZoomOut',
            Pan: 'Pan',
            Reset: 'Reset',
            ResetZoom: 'Reset Zoom'
        };
    };
    /**
     * Theming for chart
     */
    Chart.prototype.setTheme = function () {
        /*! Set theme */
        this.themeStyle = Object(_common_model_theme__WEBPACK_IMPORTED_MODULE_2__["getThemeColor"])(this.theme);
    };
    /**
     * To provide the array of modules needed for control rendering
     * @return {ModuleDeclaration[]}
     * @private
     */
    //tslint:disable:max-func-body-length
    Chart.prototype.requiredModules = function () {
        var _this = this;
        var modules = [];
        var series = this.series;
        var enableAnnotation = false;
        var moduleName;
        var errorBarVisible = false;
        var isPointDrag = false;
        var dataLabelEnable = false;
        var zooming = this.zoomSettings;
        this.chartAreaType = (series.length > 0 && (series[0].type === 'Polar' || series[0].type === 'Radar')) ? 'PolarRadar' : 'Cartesian';
        if (this.tooltip.enable) {
            modules.push({
                member: 'Tooltip',
                args: [this]
            });
        }
        series.map(function (value) {
            _this.isLegend = (_this.legendSettings.visible && ((value.name !== '') || !!_this.isLegend));
            moduleName = value.type.indexOf('100') !== -1 ? value.type.replace('100', '') + 'Series' : value.type + 'Series';
            errorBarVisible = value.errorBar.visible || errorBarVisible;
            dataLabelEnable = value.marker.dataLabel.visible || dataLabelEnable;
            isPointDrag = value.dragSettings.enable || isPointDrag;
            if (!modules.some(function (currentModule) {
                return currentModule.member === moduleName;
            })) {
                modules.push({
                    member: moduleName,
                    args: [_this, series]
                });
            }
            if (_this.chartAreaType === 'PolarRadar') {
                modules.push({
                    member: value.drawType + 'Series',
                    args: [_this, series]
                });
            }
            if (value.type === 'Pareto') {
                modules.push({
                    member: 'ColumnSeries',
                    args: [_this, series]
                });
                modules.push({
                    member: 'LineSeries',
                    args: [_this, series]
                });
            }
        });
        this.findIndicatorModules(modules);
        this.findTrendLineModules(modules);
        modules = this.findAxisModule(modules);
        enableAnnotation = this.annotations.some(function (value) {
            return (value.content !== null);
        });
        if (errorBarVisible) {
            modules.push({
                member: 'ErrorBar',
                args: [this, series]
            });
        }
        if (this.isLegend) {
            modules.push({
                member: 'Legend',
                args: [this]
            });
        }
        if (this.enableExport) {
            modules.push({
                member: 'Export',
                args: [this]
            });
        }
        if (this.chartAreaType !== 'PolarRadar' && !this.scrollSettingEnabled && (zooming.enableSelectionZooming
            || zooming.enableMouseWheelZooming || zooming.enablePinchZooming || zooming.enablePan)) {
            modules.push({
                member: 'Zoom',
                args: [this, this.zoomSettings]
            });
            if (zooming.enableScrollbar) {
                modules.push({
                    member: 'ScrollBar',
                    args: [this]
                });
            }
        }
        if (this.selectionMode !== 'None' && !(this.chartAreaType === 'PolarRadar' &&
            this.selectionMode.indexOf('Drag') > -1)) {
            modules.push({
                member: 'Selection',
                args: [this]
            });
        }
        if (dataLabelEnable) {
            modules.push({
                member: 'DataLabel',
                args: [this, series]
            });
        }
        if (isPointDrag) {
            modules.push({
                member: 'DataEditing',
                args: [this]
            });
        }
        if (enableAnnotation) {
            modules.push({
                member: 'Annotation',
                args: [this]
            });
        }
        if (this.chartAreaType !== 'PolarRadar' && this.crosshair.enable) {
            modules.push({
                member: 'Crosshair',
                args: [this]
            });
        }
        return modules;
    };
    Chart.prototype.findAxisModule = function (modules) {
        var axisCollections = [];
        axisCollections.push(this.primaryXAxis);
        axisCollections.push(this.primaryYAxis);
        axisCollections = axisCollections.concat(this.axes);
        var datetimeEnabled = false;
        var categoryEnabled = false;
        var logarithmicEnabled = false;
        var striplineEnabled = false;
        var dateTimeCategoryEnabled = false;
        var multiLevelEnabled = false;
        for (var _i = 0, axisCollections_1 = axisCollections; _i < axisCollections_1.length; _i++) {
            var axis = axisCollections_1[_i];
            datetimeEnabled = axis.valueType === 'DateTime' || datetimeEnabled;
            categoryEnabled = axis.valueType === 'Category' || categoryEnabled;
            logarithmicEnabled = axis.valueType === 'Logarithmic' || logarithmicEnabled;
            dateTimeCategoryEnabled = axis.valueType === 'DateTimeCategory' || dateTimeCategoryEnabled;
            striplineEnabled = this.findStriplineVisibility(axis.stripLines) || striplineEnabled;
            multiLevelEnabled = axis.multiLevelLabels.length > 0 || multiLevelEnabled;
            this.scrollSettingEnabled = axis.scrollbarSettings.enable ? true : this.scrollSettingEnabled;
        }
        if (datetimeEnabled) {
            modules.push({
                member: 'DateTime',
                args: [this]
            });
        }
        if (categoryEnabled) {
            modules.push({
                member: 'Category',
                args: [this]
            });
        }
        if (logarithmicEnabled) {
            modules.push({
                member: 'Logarithmic',
                args: [this]
            });
        }
        if (striplineEnabled) {
            modules.push({
                member: 'StripLine',
                args: [this]
            });
        }
        if (multiLevelEnabled) {
            modules.push({
                member: 'MultiLevelLabel',
                args: [this]
            });
        }
        if (dateTimeCategoryEnabled) {
            modules.push({
                member: 'DateTimeCategory',
                args: [this]
            });
        }
        if (this.scrollSettingEnabled) {
            modules.push({
                member: 'ScrollBar',
                args: [this]
            });
        }
        return modules;
    };
    Chart.prototype.findIndicatorModules = function (modules) {
        var macdEnable;
        var bandEnable;
        var indicators = this.indicators;
        if (this.indicators.length) {
            modules.push({
                member: 'LineSeries',
                args: [this]
            });
            indicators.map(function (indicator) {
                macdEnable = macdEnable || indicator.type === 'Macd';
                bandEnable = bandEnable || indicator.type === 'BollingerBands';
            });
            if (macdEnable) {
                modules.push({
                    member: 'ColumnSeries',
                    args: [this]
                });
            }
            if (bandEnable) {
                modules.push({
                    member: 'RangeAreaSeries',
                    args: [this]
                });
            }
            for (var _i = 0, _a = this.indicators; _i < _a.length; _i++) {
                var indicator = _a[_i];
                modules.push({
                    member: indicator.type + 'Indicator',
                    args: [this]
                });
            }
        }
    };
    Chart.prototype.findTrendLineModules = function (modules) {
        var isLine;
        var isSpline;
        var _loop_1 = function (series) {
            var markerEnable;
            series.trendlines.map(function (trendline) {
                markerEnable = markerEnable || trendline.marker.visible;
                isLine = isLine || (trendline.type === 'Linear' || trendline.type === 'MovingAverage') ? true : false;
                isSpline = isSpline || !isLine ? true : false;
            });
            if (markerEnable) {
                modules.push({
                    member: 'Marker',
                    args: [this_1, series]
                });
            }
        };
        var this_1 = this;
        for (var _i = 0, _a = this.series; _i < _a.length; _i++) {
            var series = _a[_i];
            _loop_1(series);
        }
        if (isLine || isSpline) {
            modules.push({
                member: 'TrendLine',
                args: [this]
            });
        }
        if (isLine) {
            modules.push({
                member: 'LineSeries',
                args: [this]
            });
        }
        if (isSpline) {
            modules.push({
                member: 'SplineSeries',
                args: [this]
            });
        }
    };
    Chart.prototype.findStriplineVisibility = function (striplines) {
        var visible = false;
        for (var _i = 0, striplines_1 = striplines; _i < striplines_1.length; _i++) {
            var stripline = striplines_1[_i];
            if (stripline.visible) {
                visible = true;
                break;
            }
        }
        return visible;
    };
    /**
     * To Remove the SVG.
     * @return {boolean}
     * @private
     */
    Chart.prototype.removeSvg = function () {
        if (this.redraw) {
            return null;
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["blazorTemplatesReset"])(this);
        if (this.enableCanvas && this.svgObject && this.svgObject.tagName === 'CANVAS') {
            this.renderer.clearRect(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](0, 0, this.availableSize.width, this.availableSize.height));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.svgObject);
            return null;
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.element.id + '_Secondary_Element');
        var removeLength = 0;
        if (this.zoomModule && this.zoomModule.pinchTarget) {
            this.zoomModule.pinchTarget.id = '';
            this.zoomModule.pinchTarget.setAttribute('opacity', '0');
            this.svgObject.appendChild(this.zoomModule.pinchTarget);
            removeLength = 1;
        }
        if (this.svgObject) {
            while (this.svgObject.childNodes.length > removeLength) {
                this.svgObject.removeChild(this.svgObject.firstChild);
            }
            if (!this.svgObject.hasChildNodes() && this.svgObject.parentNode && !(this.stockChart)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.svgObject);
            }
        }
    };
    Chart.prototype.refreshDefinition = function (definitions) {
        for (var _i = 0, definitions_1 = definitions; _i < definitions_1.length; _i++) {
            var item = definitions_1[_i];
            item.axes = [];
        }
    };
    /**
     * Refresh the axis default value.
     * @return {boolean}
     * @private
     */
    Chart.prototype.refreshAxis = function () {
        var axis = this.primaryXAxis;
        axis.rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](undefined, undefined, 0, 0);
        axis = this.primaryYAxis;
        axis.isStack100 = false;
        axis.rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](undefined, undefined, 0, 0);
        for (var _i = 0, _a = this.axes; _i < _a.length; _i++) {
            var item = _a[_i];
            axis = item;
            axis.rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](undefined, undefined, 0, 0);
            axis.isStack100 = false;
        }
        if (this.paretoSeriesModule && this.series[0].type === 'Pareto') {
            for (var _b = 0, _c = this.paretoSeriesModule.paretoAxes; _b < _c.length; _b++) {
                var item = _c[_b];
                axis = item;
                axis.rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_6__["Rect"](undefined, undefined, 0, 0);
                axis.isStack100 = false;
            }
        }
    };
    Chart.prototype.axisChange = function (axis) {
        if (!axis.name && !axis.valueType) {
            return false;
        }
        this.refreshDefinition(this.columns);
        this.refreshDefinition(this.rows);
        this.calculateVisibleAxis();
        this.processData();
        return true;
    };
    /**
     * Get visible series by index
     */
    Chart.prototype.getVisibleSeries = function (visibleSeries, index) {
        for (var _i = 0, visibleSeries_1 = visibleSeries; _i < visibleSeries_1.length; _i++) {
            var series = visibleSeries_1[_i];
            if (index === series.index) {
                return series;
            }
        }
        return null;
    };
    /**
     * Clear visible Axis labels
     */
    Chart.prototype.clearVisibleAxisLabels = function () {
        var axes = [this.primaryXAxis, this.primaryYAxis];
        axes = this.chartAreaType === 'Cartesian' ? axes.concat(this.axes) : axes;
        for (var i = 0, len = axes.length; i < len; i++) {
            axes[i].labels = [];
        }
    };
    /**
     * Called internally if any of the property value changed.
     * @private
     */
    // tslint:disable-next-line:max-func-body-length
    Chart.prototype.onPropertyChanged = function (newProp, oldProp) {
        var renderer = false;
        var refreshBounds = false;
        if (Object.keys(newProp).length === 1 && Object.keys(newProp)[0] === 'indicators') {
            //add valid check,it should happen only when property change is triggered for target series
            return;
        }
        this.animateSeries = false;
        if (!this.delayRedraw) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                    case 'primaryXAxis':
                        refreshBounds = this.axisChange(newProp.primaryXAxis);
                        if (newProp.primaryXAxis.edgeLabelPlacement) {
                            renderer = true;
                        }
                        if (!newProp.primaryXAxis.crosshairTooltip) {
                            refreshBounds = true;
                        }
                        break;
                    case 'primaryYAxis':
                        refreshBounds = this.axisChange(newProp.primaryYAxis);
                        if (newProp.primaryYAxis.edgeLabelPlacement) {
                            renderer = true;
                        }
                        if (!newProp.primaryYAxis.crosshairTooltip) {
                            refreshBounds = true;
                        }
                        break;
                    case 'axes':
                        for (var _b = 0, _c = Object.keys(newProp.axes); _b < _c.length; _b++) {
                            var index = _c[_b];
                            refreshBounds = refreshBounds || this.axisChange(newProp.axes[index]);
                            if (!newProp.axes[index].crosshairTooltip) {
                                refreshBounds = true;
                            }
                        }
                        break;
                    case 'height':
                    case 'width':
                        this.createChartSvg();
                        refreshBounds = true;
                        break;
                    case 'subTitle':
                    case 'title':
                        refreshBounds = true;
                        break;
                    case 'titleStyle':
                        if (newProp.titleStyle && (newProp.titleStyle.size || newProp.titleStyle.textOverflow)) {
                            refreshBounds = true;
                        }
                        else {
                            renderer = true;
                        }
                        break;
                    case 'subTitleStyle':
                        if (newProp.subTitleStyle && (newProp.subTitleStyle.size || newProp.subTitleStyle.textOverflow)) {
                            refreshBounds = true;
                        }
                        else {
                            renderer = true;
                        }
                        break;
                    case 'border':
                        renderer = true;
                        break;
                    case 'dataSource':
                        this.processData(false);
                        refreshBounds = true;
                        break;
                    case 'series':
                        var len = this.series.length;
                        var seriesRefresh = false;
                        var series = void 0;
                        for (var i = 0; i < len; i++) {
                            series = newProp.series[i];
                            if (series && (series.dataSource || series.xName || series.yName || series.size ||
                                series.high || series.low || series.open || series.close || series.fill || series.name)) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.getVisibleSeries(this.visibleSeries, i), series, null, true);
                                seriesRefresh = true;
                            }
                        }
                        if (seriesRefresh) {
                            this.calculateVisibleSeries();
                            this.initTechnicalIndicators();
                            this.initTrendLines();
                            this.refreshDefinition(this.columns);
                            this.refreshDefinition(this.rows);
                            this.calculateVisibleAxis();
                            this.processData(false);
                            refreshBounds = true;
                        }
                        break;
                    case 'zoomSettings':
                        if (newProp.zoomSettings.enableScrollbar || oldProp.zoomSettings.enableScrollbar) {
                            refreshBounds = true;
                        }
                        renderer = true;
                        break;
                    case 'background':
                        renderer = true;
                        break;
                    case 'chartArea':
                        if (newProp.chartArea.border && newProp.chartArea.border.width) {
                            refreshBounds = true;
                        }
                        renderer = true;
                        break;
                    case 'legendSettings':
                        if (!newProp.legendSettings.background || !newProp.legendSettings.opacity) {
                            refreshBounds = true;
                        }
                        renderer = true;
                        break;
                    case 'palettes':
                        this.calculateVisibleSeries();
                        renderer = true;
                        break;
                    case 'selectedDataIndexes':
                    case 'selectionMode':
                        if (this.selectionModule && newProp.selectionMode && newProp.selectionMode.indexOf('Drag') === -1) {
                            this.selectionModule.redrawSelection(this, oldProp.selectionMode);
                        }
                        break;
                    case 'isMultiSelect':
                        if (this.selectionModule && !newProp.isMultiSelect && this.selectionModule.selectedDataIndexes.length > 1) {
                            this.selectionModule.redrawSelection(this, oldProp.selectionMode);
                        }
                        break;
                    case 'theme':
                        this.animateSeries = true;
                        break;
                    case 'locale':
                    case 'currencyCode':
                        _super.prototype.refresh.call(this);
                        break;
                    case 'tooltip':
                        this.tooltipModule.previousPoints = [];
                        break;
                }
            }
            if (!refreshBounds && renderer) {
                this.removeSvg();
                this.renderElements();
                this.trigger('loaded', { chart: this.isBlazor ? {} : this });
            }
            if (refreshBounds) {
                this.enableCanvas ? this.createChartSvg() : this.removeSvg();
                this.refreshAxis();
                this.refreshBound();
                this.trigger('loaded', { chart: this.isBlazor ? {} : this });
                this.redraw = false;
                this.animated = false;
            }
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Chart.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Chart.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Chart.prototype, "title", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Chart.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"].chartTitleFont, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Font"])
    ], Chart.prototype, "titleStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Chart.prototype, "subTitle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"].chartSubTitleFont, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Font"])
    ], Chart.prototype, "subTitleStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Margin"])
    ], Chart.prototype, "margin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#DDDDDD', width: 0 }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Border"])
    ], Chart.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Chart.prototype, "background", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ border: { color: null, width: 0.5 }, background: 'transparent' }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["ChartArea"])
    ], Chart.prototype, "chartArea", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ name: 'primaryXAxis' }, _axis_axis__WEBPACK_IMPORTED_MODULE_4__["Axis"])
    ], Chart.prototype, "primaryXAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ name: 'primaryYAxis' }, _axis_axis__WEBPACK_IMPORTED_MODULE_4__["Axis"])
    ], Chart.prototype, "primaryYAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _axis_axis__WEBPACK_IMPORTED_MODULE_4__["Row"])
    ], Chart.prototype, "rows", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _axis_axis__WEBPACK_IMPORTED_MODULE_4__["Column"])
    ], Chart.prototype, "columns", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _axis_axis__WEBPACK_IMPORTED_MODULE_4__["Axis"])
    ], Chart.prototype, "axes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _series_chart_series__WEBPACK_IMPORTED_MODULE_8__["Series"])
    ], Chart.prototype, "series", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _model_chart_base__WEBPACK_IMPORTED_MODULE_14__["ChartAnnotationSettings"])
    ], Chart.prototype, "annotations", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], Chart.prototype, "palettes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Material')
    ], Chart.prototype, "theme", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["TooltipSettings"])
    ], Chart.prototype, "tooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, CrosshairSettings)
    ], Chart.prototype, "crosshair", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_legend_legend__WEBPACK_IMPORTED_MODULE_11__["LegendSettings"])
    ], Chart.prototype, "legendSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, ZoomSettings)
    ], Chart.prototype, "zoomSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], Chart.prototype, "selectionMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Chart.prototype, "isMultiSelect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Chart.prototype, "enableExport", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Indexes"])
    ], Chart.prototype, "selectedDataIndexes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Chart.prototype, "useGroupingSeparator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Chart.prototype, "isTransposed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Chart.prototype, "enableCanvas", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _technical_indicators_technical_indicator__WEBPACK_IMPORTED_MODULE_12__["TechnicalIndicator"])
    ], Chart.prototype, "indicators", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Chart.prototype, "enableAnimation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Chart.prototype, "description", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Chart.prototype, "tabIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Chart.prototype, "enableSideBySidePlacement", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "resized", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "annotationRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "beforePrint", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "loaded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "load", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "animationComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "legendRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "textRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "pointRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "seriesRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "axisLabelRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "axisRangeCalculated", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "axisMultiLabelRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "legendClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "multiLevelLabelClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "tooltipRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "chartMouseMove", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "chartMouseClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "pointClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "pointMove", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "chartMouseLeave", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "chartMouseDown", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "chartMouseUp", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "dragComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "zoomComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "scrollStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "scrollEnd", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "scrollChanged", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "dragStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "drag", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Chart.prototype, "dragEnd", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('USD')
    ], Chart.prototype, "currencyCode", void 0);
    Chart = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Chart);
    return Chart;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/index.js ***!
  \****************************************************************/
/*! exports provided: CrosshairSettings, ZoomSettings, Chart, Row, Column, MajorGridLines, MinorGridLines, AxisLine, MajorTickLines, MinorTickLines, CrosshairTooltip, Axis, VisibleLabels, DateTime, Category, Logarithmic, DateTimeCategory, NiceInterval, StripLine, Connector, Font, Border, ChartArea, Margin, Animation, Indexes, CornerRadius, Index, EmptyPointSettings, DragSettings, TooltipSettings, Periods, PeriodSelectorSettings, LineSeries, ColumnSeries, AreaSeries, BarSeries, PolarSeries, RadarSeries, StackingBarSeries, CandleSeries, StackingColumnSeries, StepLineSeries, StepAreaSeries, StackingAreaSeries, StackingLineSeries, ScatterSeries, RangeColumnSeries, WaterfallSeries, HiloSeries, HiloOpenCloseSeries, RangeAreaSeries, BubbleSeries, SplineSeries, HistogramSeries, SplineAreaSeries, TechnicalIndicator, SmaIndicator, EmaIndicator, TmaIndicator, AccumulationDistributionIndicator, AtrIndicator, MomentumIndicator, RsiIndicator, StochasticIndicator, BollingerBands, MacdIndicator, Trendlines, sort, isBreakLabel, rotateTextSize, removeElement, logBase, showTooltip, inside, withIn, logWithIn, withInRange, sum, subArraySum, subtractThickness, subtractRect, degreeToLocation, getAngle, subArray, valueToCoefficient, TransformToVisible, indexFinder, CoefficientToVector, valueToPolarCoefficient, Mean, PolarArc, createTooltip, createZoomingLabels, withInBounds, getValueXByPoint, getValueYByPoint, findClipRect, firstToLowerCase, getTransform, getMinPointsDelta, getAnimationFunction, linear, markerAnimate, animateRectElement, pathAnimation, appendClipElement, triggerLabelRender, setRange, getActualDesiredIntervalsCount, templateAnimate, drawSymbol, calculateShapes, getRectLocation, minMax, getElement, getTemplateFunction, createTemplate, getFontStyle, measureElementRect, findlElement, getPoint, appendElement, appendChildElement, getDraggedRectLocation, checkBounds, getLabelText, stopTimer, isCollide, isOverlap, containsRect, calculateRect, convertToHexCode, componentToHex, convertHexToColor, colorNameToHex, getSaturationColor, getMedian, calculateLegendShapes, textTrim, lineBreakLabelTrim, stringToNumber, redrawElement, animateRedrawElement, textElement, calculateSize, createSvg, getTitle, titlePositionX, textWrap, blazorTemplatesReset, CustomizeOption, StackValues, RectOption, CircleOption, PolygonOption, ChartLocation, Thickness, ColorValue, PointData, AccPointData, ControlPoints, Crosshair, Tooltip, Zoom, Selection, DataEditing, DataLabel, ErrorBar, DataLabelSettings, MarkerSettings, Points, Trendline, ErrorBarCapSettings, ChartSegment, ErrorBarSettings, SeriesBase, Series, Legend, ChartAnnotation, ChartAnnotationSettings, LabelBorder, MultiLevelCategories, StripLineSettings, MultiLevelLabels, ScrollbarSettingsRange, ScrollbarSettings, BoxAndWhiskerSeries, MultiColoredAreaSeries, MultiColoredLineSeries, MultiColoredSeries, MultiLevelLabel, ScrollBar, ParetoSeries, Export */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _chart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chart */ "./node_modules/@syncfusion/ej2-charts/src/chart/chart.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CrosshairSettings", function() { return _chart__WEBPACK_IMPORTED_MODULE_0__["CrosshairSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZoomSettings", function() { return _chart__WEBPACK_IMPORTED_MODULE_0__["ZoomSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Chart", function() { return _chart__WEBPACK_IMPORTED_MODULE_0__["Chart"]; });

/* harmony import */ var _axis_axis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./axis/axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["Row"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["Column"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MajorGridLines", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["MajorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MinorGridLines", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["MinorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AxisLine", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["AxisLine"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MajorTickLines", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["MajorTickLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MinorTickLines", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["MinorTickLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CrosshairTooltip", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["CrosshairTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Axis", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["Axis"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VisibleLabels", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["VisibleLabels"]; });

/* harmony import */ var _axis_date_time_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./axis/date-time-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/date-time-axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateTime", function() { return _axis_date_time_axis__WEBPACK_IMPORTED_MODULE_2__["DateTime"]; });

/* harmony import */ var _axis_category_axis__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./axis/category-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/category-axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Category", function() { return _axis_category_axis__WEBPACK_IMPORTED_MODULE_3__["Category"]; });

/* harmony import */ var _axis_logarithmic_axis__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./axis/logarithmic-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/logarithmic-axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logarithmic", function() { return _axis_logarithmic_axis__WEBPACK_IMPORTED_MODULE_4__["Logarithmic"]; });

/* harmony import */ var _axis_date_time_category_axis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./axis/date-time-category-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/date-time-category-axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateTimeCategory", function() { return _axis_date_time_category_axis__WEBPACK_IMPORTED_MODULE_5__["DateTimeCategory"]; });

/* harmony import */ var _axis_axis_helper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./axis/axis-helper */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis-helper.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NiceInterval", function() { return _axis_axis_helper__WEBPACK_IMPORTED_MODULE_6__["NiceInterval"]; });

/* harmony import */ var _axis_strip_line__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./axis/strip-line */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/strip-line.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StripLine", function() { return _axis_strip_line__WEBPACK_IMPORTED_MODULE_7__["StripLine"]; });

/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Connector", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["Connector"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Font", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["Font"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Border", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["Border"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartArea", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["ChartArea"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Margin", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["Margin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["Animation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Indexes", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["Indexes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CornerRadius", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["CornerRadius"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Index", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["Index"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyPointSettings", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["EmptyPointSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragSettings", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["DragSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipSettings", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["TooltipSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Periods", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["Periods"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PeriodSelectorSettings", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_8__["PeriodSelectorSettings"]; });

/* harmony import */ var _series_line_series__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./series/line-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSeries", function() { return _series_line_series__WEBPACK_IMPORTED_MODULE_9__["LineSeries"]; });

/* harmony import */ var _series_column_series__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./series/column-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnSeries", function() { return _series_column_series__WEBPACK_IMPORTED_MODULE_10__["ColumnSeries"]; });

/* harmony import */ var _series_area_series__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./series/area-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/area-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AreaSeries", function() { return _series_area_series__WEBPACK_IMPORTED_MODULE_11__["AreaSeries"]; });

/* harmony import */ var _series_bar_series__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./series/bar-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/bar-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BarSeries", function() { return _series_bar_series__WEBPACK_IMPORTED_MODULE_12__["BarSeries"]; });

/* harmony import */ var _series_polar_series__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./series/polar-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/polar-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolarSeries", function() { return _series_polar_series__WEBPACK_IMPORTED_MODULE_13__["PolarSeries"]; });

/* harmony import */ var _series_radar_series__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./series/radar-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/radar-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RadarSeries", function() { return _series_radar_series__WEBPACK_IMPORTED_MODULE_14__["RadarSeries"]; });

/* harmony import */ var _series_stacking_bar_series__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./series/stacking-bar-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-bar-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackingBarSeries", function() { return _series_stacking_bar_series__WEBPACK_IMPORTED_MODULE_15__["StackingBarSeries"]; });

/* harmony import */ var _series_candle_series__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./series/candle-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/candle-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CandleSeries", function() { return _series_candle_series__WEBPACK_IMPORTED_MODULE_16__["CandleSeries"]; });

/* harmony import */ var _series_stacking_column_series__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./series/stacking-column-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-column-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackingColumnSeries", function() { return _series_stacking_column_series__WEBPACK_IMPORTED_MODULE_17__["StackingColumnSeries"]; });

/* harmony import */ var _series_step_line_series__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./series/step-line-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/step-line-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepLineSeries", function() { return _series_step_line_series__WEBPACK_IMPORTED_MODULE_18__["StepLineSeries"]; });

/* harmony import */ var _series_step_area_series__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./series/step-area-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/step-area-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepAreaSeries", function() { return _series_step_area_series__WEBPACK_IMPORTED_MODULE_19__["StepAreaSeries"]; });

/* harmony import */ var _series_stacking_area_series__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./series/stacking-area-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-area-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackingAreaSeries", function() { return _series_stacking_area_series__WEBPACK_IMPORTED_MODULE_20__["StackingAreaSeries"]; });

/* harmony import */ var _series_stacking_line_series__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./series/stacking-line-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-line-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackingLineSeries", function() { return _series_stacking_line_series__WEBPACK_IMPORTED_MODULE_21__["StackingLineSeries"]; });

/* harmony import */ var _series_scatter_series__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./series/scatter-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/scatter-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScatterSeries", function() { return _series_scatter_series__WEBPACK_IMPORTED_MODULE_22__["ScatterSeries"]; });

/* harmony import */ var _series_range_column_series__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./series/range-column-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/range-column-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeColumnSeries", function() { return _series_range_column_series__WEBPACK_IMPORTED_MODULE_23__["RangeColumnSeries"]; });

/* harmony import */ var _series_waterfall_series__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./series/waterfall-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/waterfall-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WaterfallSeries", function() { return _series_waterfall_series__WEBPACK_IMPORTED_MODULE_24__["WaterfallSeries"]; });

/* harmony import */ var _series_hilo_series__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./series/hilo-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/hilo-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HiloSeries", function() { return _series_hilo_series__WEBPACK_IMPORTED_MODULE_25__["HiloSeries"]; });

/* harmony import */ var _series_hilo_open_close_series__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./series/hilo-open-close-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/hilo-open-close-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HiloOpenCloseSeries", function() { return _series_hilo_open_close_series__WEBPACK_IMPORTED_MODULE_26__["HiloOpenCloseSeries"]; });

/* harmony import */ var _series_range_area_series__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./series/range-area-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/range-area-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeAreaSeries", function() { return _series_range_area_series__WEBPACK_IMPORTED_MODULE_27__["RangeAreaSeries"]; });

/* harmony import */ var _series_bubble_series__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./series/bubble-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/bubble-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BubbleSeries", function() { return _series_bubble_series__WEBPACK_IMPORTED_MODULE_28__["BubbleSeries"]; });

/* harmony import */ var _series_spline_series__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./series/spline-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SplineSeries", function() { return _series_spline_series__WEBPACK_IMPORTED_MODULE_29__["SplineSeries"]; });

/* harmony import */ var _series_histogram_series__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./series/histogram-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/histogram-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistogramSeries", function() { return _series_histogram_series__WEBPACK_IMPORTED_MODULE_30__["HistogramSeries"]; });

/* harmony import */ var _series_spline_area_series__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./series/spline-area-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-area-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SplineAreaSeries", function() { return _series_spline_area_series__WEBPACK_IMPORTED_MODULE_31__["SplineAreaSeries"]; });

/* harmony import */ var _technical_indicators_technical_indicator__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./technical-indicators/technical-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/technical-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TechnicalIndicator", function() { return _technical_indicators_technical_indicator__WEBPACK_IMPORTED_MODULE_32__["TechnicalIndicator"]; });

/* harmony import */ var _technical_indicators_sma_indicator__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./technical-indicators/sma-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/sma-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmaIndicator", function() { return _technical_indicators_sma_indicator__WEBPACK_IMPORTED_MODULE_33__["SmaIndicator"]; });

/* harmony import */ var _technical_indicators_ema_indicator__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./technical-indicators/ema-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/ema-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmaIndicator", function() { return _technical_indicators_ema_indicator__WEBPACK_IMPORTED_MODULE_34__["EmaIndicator"]; });

/* harmony import */ var _technical_indicators_tma_indicator__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./technical-indicators/tma-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/tma-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TmaIndicator", function() { return _technical_indicators_tma_indicator__WEBPACK_IMPORTED_MODULE_35__["TmaIndicator"]; });

/* harmony import */ var _technical_indicators_ad_indicator__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./technical-indicators/ad-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/ad-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationDistributionIndicator", function() { return _technical_indicators_ad_indicator__WEBPACK_IMPORTED_MODULE_36__["AccumulationDistributionIndicator"]; });

/* harmony import */ var _technical_indicators_atr_indicator__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./technical-indicators/atr-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/atr-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AtrIndicator", function() { return _technical_indicators_atr_indicator__WEBPACK_IMPORTED_MODULE_37__["AtrIndicator"]; });

/* harmony import */ var _technical_indicators_momentum_indicator__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./technical-indicators/momentum-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/momentum-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MomentumIndicator", function() { return _technical_indicators_momentum_indicator__WEBPACK_IMPORTED_MODULE_38__["MomentumIndicator"]; });

/* harmony import */ var _technical_indicators_rsi_indicator__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./technical-indicators/rsi-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/rsi-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RsiIndicator", function() { return _technical_indicators_rsi_indicator__WEBPACK_IMPORTED_MODULE_39__["RsiIndicator"]; });

/* harmony import */ var _technical_indicators_stochastic_indicator__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./technical-indicators/stochastic-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/stochastic-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StochasticIndicator", function() { return _technical_indicators_stochastic_indicator__WEBPACK_IMPORTED_MODULE_40__["StochasticIndicator"]; });

/* harmony import */ var _technical_indicators_bollinger_bands__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./technical-indicators/bollinger-bands */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/bollinger-bands.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BollingerBands", function() { return _technical_indicators_bollinger_bands__WEBPACK_IMPORTED_MODULE_41__["BollingerBands"]; });

/* harmony import */ var _technical_indicators_macd_indicator__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./technical-indicators/macd-indicator */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/macd-indicator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MacdIndicator", function() { return _technical_indicators_macd_indicator__WEBPACK_IMPORTED_MODULE_42__["MacdIndicator"]; });

/* harmony import */ var _trend_lines_trend_line__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./trend-lines/trend-line */ "./node_modules/@syncfusion/ej2-charts/src/chart/trend-lines/trend-line.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Trendlines", function() { return _trend_lines_trend_line__WEBPACK_IMPORTED_MODULE_43__["Trendlines"]; });

/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["sort"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBreakLabel", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["isBreakLabel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rotateTextSize", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["rotateTextSize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["removeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "logBase", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["logBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showTooltip", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["showTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inside", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["inside"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withIn", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["withIn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "logWithIn", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["logWithIn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withInRange", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["withInRange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["sum"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subArraySum", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["subArraySum"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subtractThickness", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["subtractThickness"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subtractRect", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["subtractRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "degreeToLocation", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["degreeToLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getAngle", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getAngle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subArray", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["subArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valueToCoefficient", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["valueToCoefficient"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TransformToVisible", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["TransformToVisible"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexFinder", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["indexFinder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CoefficientToVector", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["CoefficientToVector"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valueToPolarCoefficient", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["valueToPolarCoefficient"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Mean", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["Mean"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolarArc", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["PolarArc"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTooltip", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["createTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createZoomingLabels", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["createZoomingLabels"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withInBounds", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["withInBounds"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getValueXByPoint", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getValueXByPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getValueYByPoint", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getValueYByPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findClipRect", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["findClipRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "firstToLowerCase", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["firstToLowerCase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTransform", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getTransform"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMinPointsDelta", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getMinPointsDelta"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getAnimationFunction", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getAnimationFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["linear"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "markerAnimate", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["markerAnimate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animateRectElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["animateRectElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pathAnimation", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["pathAnimation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendClipElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["appendClipElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "triggerLabelRender", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["triggerLabelRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setRange", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["setRange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualDesiredIntervalsCount", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getActualDesiredIntervalsCount"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "templateAnimate", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["templateAnimate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drawSymbol", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["drawSymbol"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateShapes", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["calculateShapes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRectLocation", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getRectLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minMax", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["minMax"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTemplateFunction", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getTemplateFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTemplate", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["createTemplate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFontStyle", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getFontStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "measureElementRect", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["measureElementRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findlElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["findlElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPoint", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["appendElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendChildElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["appendChildElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDraggedRectLocation", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getDraggedRectLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkBounds", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["checkBounds"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getLabelText", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getLabelText"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stopTimer", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["stopTimer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isCollide", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["isCollide"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isOverlap", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["isOverlap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "containsRect", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["containsRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateRect", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["calculateRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "convertToHexCode", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["convertToHexCode"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "componentToHex", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["componentToHex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "convertHexToColor", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["convertHexToColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorNameToHex", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["colorNameToHex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getSaturationColor", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getSaturationColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMedian", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getMedian"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateLegendShapes", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["calculateLegendShapes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textTrim", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["textTrim"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineBreakLabelTrim", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["lineBreakLabelTrim"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stringToNumber", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["stringToNumber"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "redrawElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["redrawElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animateRedrawElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["animateRedrawElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textElement", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["textElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateSize", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["calculateSize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["createSvg"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["getTitle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "titlePositionX", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["titlePositionX"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textWrap", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["textWrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blazorTemplatesReset", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["blazorTemplatesReset"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomizeOption", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["CustomizeOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackValues", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["StackValues"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RectOption", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["RectOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CircleOption", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["CircleOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolygonOption", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["PolygonOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartLocation", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["ChartLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Thickness", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["Thickness"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorValue", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["ColorValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PointData", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["PointData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccPointData", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["AccPointData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ControlPoints", function() { return _common_utils_helper__WEBPACK_IMPORTED_MODULE_44__["ControlPoints"]; });

/* harmony import */ var _user_interaction_crosshair__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./user-interaction/crosshair */ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/crosshair.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Crosshair", function() { return _user_interaction_crosshair__WEBPACK_IMPORTED_MODULE_45__["Crosshair"]; });

/* harmony import */ var _user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./user-interaction/tooltip */ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/tooltip.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_46__["Tooltip"]; });

/* harmony import */ var _user_interaction_zooming__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./user-interaction/zooming */ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/zooming.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Zoom", function() { return _user_interaction_zooming__WEBPACK_IMPORTED_MODULE_47__["Zoom"]; });

/* harmony import */ var _user_interaction_selection__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./user-interaction/selection */ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/selection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return _user_interaction_selection__WEBPACK_IMPORTED_MODULE_48__["Selection"]; });

/* harmony import */ var _user_interaction_data_editing__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./user-interaction/data-editing */ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/data-editing.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataEditing", function() { return _user_interaction_data_editing__WEBPACK_IMPORTED_MODULE_49__["DataEditing"]; });

/* harmony import */ var _series_data_label__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./series/data-label */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/data-label.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataLabel", function() { return _series_data_label__WEBPACK_IMPORTED_MODULE_50__["DataLabel"]; });

/* harmony import */ var _series_error_bar__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./series/error-bar */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/error-bar.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorBar", function() { return _series_error_bar__WEBPACK_IMPORTED_MODULE_51__["ErrorBar"]; });

/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataLabelSettings", function() { return _series_chart_series__WEBPACK_IMPORTED_MODULE_52__["DataLabelSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkerSettings", function() { return _series_chart_series__WEBPACK_IMPORTED_MODULE_52__["MarkerSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Points", function() { return _series_chart_series__WEBPACK_IMPORTED_MODULE_52__["Points"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Trendline", function() { return _series_chart_series__WEBPACK_IMPORTED_MODULE_52__["Trendline"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorBarCapSettings", function() { return _series_chart_series__WEBPACK_IMPORTED_MODULE_52__["ErrorBarCapSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartSegment", function() { return _series_chart_series__WEBPACK_IMPORTED_MODULE_52__["ChartSegment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorBarSettings", function() { return _series_chart_series__WEBPACK_IMPORTED_MODULE_52__["ErrorBarSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesBase", function() { return _series_chart_series__WEBPACK_IMPORTED_MODULE_52__["SeriesBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Series", function() { return _series_chart_series__WEBPACK_IMPORTED_MODULE_52__["Series"]; });

/* harmony import */ var _legend_legend__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./legend/legend */ "./node_modules/@syncfusion/ej2-charts/src/chart/legend/legend.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Legend", function() { return _legend_legend__WEBPACK_IMPORTED_MODULE_53__["Legend"]; });

/* harmony import */ var _annotation_annotation__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./annotation/annotation */ "./node_modules/@syncfusion/ej2-charts/src/chart/annotation/annotation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartAnnotation", function() { return _annotation_annotation__WEBPACK_IMPORTED_MODULE_54__["ChartAnnotation"]; });

/* harmony import */ var _model_chart_base__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./model/chart-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/model/chart-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartAnnotationSettings", function() { return _model_chart_base__WEBPACK_IMPORTED_MODULE_55__["ChartAnnotationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelBorder", function() { return _model_chart_base__WEBPACK_IMPORTED_MODULE_55__["LabelBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiLevelCategories", function() { return _model_chart_base__WEBPACK_IMPORTED_MODULE_55__["MultiLevelCategories"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StripLineSettings", function() { return _model_chart_base__WEBPACK_IMPORTED_MODULE_55__["StripLineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiLevelLabels", function() { return _model_chart_base__WEBPACK_IMPORTED_MODULE_55__["MultiLevelLabels"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollbarSettingsRange", function() { return _model_chart_base__WEBPACK_IMPORTED_MODULE_55__["ScrollbarSettingsRange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollbarSettings", function() { return _model_chart_base__WEBPACK_IMPORTED_MODULE_55__["ScrollbarSettings"]; });

/* harmony import */ var _series_box_and_whisker_series__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./series/box-and-whisker-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/box-and-whisker-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BoxAndWhiskerSeries", function() { return _series_box_and_whisker_series__WEBPACK_IMPORTED_MODULE_56__["BoxAndWhiskerSeries"]; });

/* harmony import */ var _series_multi_colored_area_series__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./series/multi-colored-area-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-area-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiColoredAreaSeries", function() { return _series_multi_colored_area_series__WEBPACK_IMPORTED_MODULE_57__["MultiColoredAreaSeries"]; });

/* harmony import */ var _series_multi_colored_line_series__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./series/multi-colored-line-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-line-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiColoredLineSeries", function() { return _series_multi_colored_line_series__WEBPACK_IMPORTED_MODULE_58__["MultiColoredLineSeries"]; });

/* harmony import */ var _series_multi_colored_base__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./series/multi-colored-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiColoredSeries", function() { return _series_multi_colored_base__WEBPACK_IMPORTED_MODULE_59__["MultiColoredSeries"]; });

/* harmony import */ var _axis_multi_level_labels__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./axis/multi-level-labels */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/multi-level-labels.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiLevelLabel", function() { return _axis_multi_level_labels__WEBPACK_IMPORTED_MODULE_60__["MultiLevelLabel"]; });

/* harmony import */ var _common_scrollbar_scrollbar__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../common/scrollbar/scrollbar */ "./node_modules/@syncfusion/ej2-charts/src/common/scrollbar/scrollbar.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollBar", function() { return _common_scrollbar_scrollbar__WEBPACK_IMPORTED_MODULE_61__["ScrollBar"]; });

/* harmony import */ var _series_pareto_series__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./series/pareto-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/pareto-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ParetoSeries", function() { return _series_pareto_series__WEBPACK_IMPORTED_MODULE_62__["ParetoSeries"]; });

/* harmony import */ var _print_export_export__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./print-export/export */ "./node_modules/@syncfusion/ej2-charts/src/chart/print-export/export.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Export", function() { return _print_export_export__WEBPACK_IMPORTED_MODULE_63__["Export"]; });

/**
 * Chart component exported items
 */


































































/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/legend/legend.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/legend/legend.js ***!
  \************************************************************************/
/*! exports provided: Legend */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Legend", function() { return Legend; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_legend_legend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/legend/legend */ "./node_modules/@syncfusion/ej2-charts/src/common/legend/legend.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * Chart legend
 */






/**
 * `Legend` module is used to render legend for the chart.
 */
var Legend = /** @class */ (function (_super) {
    __extends(Legend, _super);
    function Legend(chart) {
        var _this = _super.call(this, chart) || this;
        _this.library = _this;
        _this.addEventListener();
        return _this;
    }
    /**
     * Binding events for legend module.
     */
    Legend.prototype.addEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMove, this);
        this.chart.on('click', this.click, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseEnd, this);
    };
    /**
     * UnBinding events for legend module.
     */
    Legend.prototype.removeEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMove);
        this.chart.off('click', this.click);
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseEnd);
    };
    /**
     * To handle mosue move for legend module
     */
    Legend.prototype.mouseMove = function (e) {
        if (this.chart.legendSettings.visible && !this.chart.isTouch) {
            this.move(e);
        }
    };
    /**
     * To handle mosue end for legend module
     */
    Legend.prototype.mouseEnd = function (e) {
        if (this.chart.legendSettings.visible && this.chart.isTouch) {
            this.move(e);
        }
    };
    /**
     * Get the legend options.
     * @return {void}
     * @private
     */
    Legend.prototype.getLegendOptions = function (visibleSeriesCollection, chart) {
        this.legendCollections = [];
        var seriesType;
        for (var _i = 0, visibleSeriesCollection_1 = visibleSeriesCollection; _i < visibleSeriesCollection_1.length; _i++) {
            var series = visibleSeriesCollection_1[_i];
            if (series.category !== 'Indicator') {
                seriesType = (chart.chartAreaType === 'PolarRadar') ? series.drawType :
                    series.type;
                this.legendCollections.push(new _common_legend_legend__WEBPACK_IMPORTED_MODULE_1__["LegendOptions"](series.name, series.interior, series.legendShape, series.visible, seriesType, series.marker.shape, series.marker.visible));
            }
        }
    };
    /** @private */
    Legend.prototype.getLegendBounds = function (availableSize, legendBounds, legend) {
        var padding = legend.padding;
        var extraHeight = 0;
        var extraWidth = 0;
        if (!this.isVertical) {
            extraHeight = !legend.height ? ((availableSize.height / 100) * 5) : 0;
        }
        else {
            extraWidth = !legend.width ? ((availableSize.width / 100) * 5) : 0;
        }
        legendBounds.height += extraHeight;
        legendBounds.width += extraWidth;
        var shapeHeight = legend.shapeHeight;
        var shapeWidth = legend.shapeWidth;
        var shapePadding = legend.shapePadding;
        var maximumWidth = 0;
        var rowWidth = 0;
        var legendWidth = 0;
        var columnHeight = 0;
        var rowCount = 0;
        var legendEventArgs;
        this.maxItemHeight = Math.max(Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])('MeasureText', legend.textStyle).height, legend.shapeHeight);
        var render = false;
        for (var _i = 0, _a = this.legendCollections; _i < _a.length; _i++) {
            var legendOption = _a[_i];
            legendEventArgs = {
                fill: legendOption.fill, text: legendOption.text, shape: legendOption.shape,
                markerShape: legendOption.markerShape, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["legendRender"], cancel: false
            };
            this.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["legendRender"], legendEventArgs);
            legendOption.render = !legendEventArgs.cancel;
            legendOption.text = legendEventArgs.text;
            legendOption.fill = legendEventArgs.fill;
            legendOption.shape = legendEventArgs.shape;
            legendOption.markerShape = legendEventArgs.markerShape;
            legendOption.textSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(legendOption.text, legend.textStyle);
            if (legendOption.render && legendOption.text !== '') {
                render = true;
                legendWidth = shapeWidth + shapePadding + legendOption.textSize.width + padding;
                rowWidth = rowWidth + legendWidth;
                if (legendBounds.width < (padding + rowWidth) || this.isVertical) {
                    maximumWidth = Math.max(maximumWidth, (rowWidth + padding - (this.isVertical ? 0 : legendWidth)));
                    if (rowCount === 0 && (legendWidth !== rowWidth)) {
                        rowCount = 1;
                    }
                    rowWidth = this.isVertical ? 0 : legendWidth;
                    rowCount++;
                    columnHeight = (rowCount * (this.maxItemHeight + padding)) + padding;
                }
            }
        }
        columnHeight = Math.max(columnHeight, (this.maxItemHeight + padding) + padding);
        this.isPaging = legendBounds.height < columnHeight;
        this.totalPages = rowCount;
        if (render) {
            this.setBounds(Math.max((rowWidth + padding), maximumWidth), columnHeight, legend, legendBounds);
        }
        else {
            this.setBounds(0, 0, legend, legendBounds);
        }
    };
    /** @private */
    Legend.prototype.getRenderPoint = function (legendOption, start, textPadding, prevLegend, rect, count, firstLegend) {
        var padding = this.legend.padding;
        var previousBound = (prevLegend.location.x + textPadding + prevLegend.textSize.width);
        if ((previousBound + (legendOption.textSize.width + textPadding)) > (rect.x + rect.width + this.legend.shapeWidth / 2) ||
            this.isVertical) {
            legendOption.location.x = start.x;
            legendOption.location.y = (count === firstLegend) ? prevLegend.location.y :
                prevLegend.location.y + this.maxItemHeight + padding;
        }
        else {
            legendOption.location.x = (count === firstLegend) ? prevLegend.location.x : previousBound;
            legendOption.location.y = prevLegend.location.y;
        }
        var availwidth = (this.legendBounds.x + this.legendBounds.width) - (legendOption.location.x +
            textPadding - this.legend.shapeWidth / 2);
        legendOption.text = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["textTrim"])(+availwidth.toFixed(4), legendOption.text, this.legend.textStyle);
    };
    /** @private */
    Legend.prototype.LegendClick = function (seriesIndex) {
        var chart = this.chart;
        var series = chart.visibleSeries[seriesIndex];
        var legend = this.legendCollections[seriesIndex];
        var legendClickArgs = { legendText: legend.text, legendShape: legend.shape,
            chart: chart, series: series, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["legendClick"], cancel: false
        };
        this.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["legendClick"], legendClickArgs);
        series.legendShape = legendClickArgs.legendShape;
        if (series.fill !== null) {
            chart.visibleSeries[seriesIndex].interior = series.fill;
        }
        var selectedDataIndexes = [];
        if (chart.selectionModule) {
            selectedDataIndexes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], chart.selectionModule.selectedDataIndexes, null, true);
        }
        if (chart.legendSettings.toggleVisibility) {
            if (!series.visible) {
                series.visible = true;
            }
            else {
                series.visible = false;
            }
            legend.visible = (series.visible);
            if ((chart.svgObject.childNodes.length > 0) && !chart.enableAnimation && !chart.enableCanvas) {
                while (chart.svgObject.lastChild) {
                    chart.svgObject.removeChild(chart.svgObject.lastChild);
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(chart.svgObject);
            }
            chart.animateSeries = false;
            chart.redraw = chart.enableAnimation;
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["removeElement"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(chart.element.id + '_Secondary_Element').querySelectorAll('.ejSVGTooltip')[0]);
            this.redrawSeriesElements(series, chart);
            chart.removeSvg();
            chart.refreshAxis();
            series.refreshAxisLabel();
            this.refreshSeries(chart.visibleSeries);
            chart.refreshBound();
            chart.trigger('loaded', { chart: chart });
            if (selectedDataIndexes.length > 0) {
                chart.selectionModule.selectedDataIndexes = selectedDataIndexes;
                chart.selectionModule.redrawSelection(chart, chart.selectionMode);
            }
            chart.redraw = false;
        }
        else if (chart.selectionModule) {
            chart.selectionModule.legendSelection(chart, seriesIndex);
        }
    };
    Legend.prototype.redrawSeriesElements = function (series, chart) {
        if (!chart.redraw) {
            return null;
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["removeElement"])(chart.element.id + '_Series_' + (series.index === undefined ? series.category : series.index) +
            '_DataLabelCollections');
    };
    Legend.prototype.refreshSeries = function (seriesCollection) {
        for (var _i = 0, seriesCollection_1 = seriesCollection; _i < seriesCollection_1.length; _i++) {
            var series = seriesCollection_1[_i];
            series.position = undefined;
        }
    };
    /**
     * To show the tooltip for the trimmed text in legend.
     * @return {void}
     */
    Legend.prototype.click = function (event) {
        var _this = this;
        if (!this.chart.legendSettings.visible) {
            return;
        }
        var pageX = event.pageX;
        var pageY = event.pageY;
        var legendRegion = [];
        var targetId = event.target.id;
        var legendItemsId = [this.legendID + '_text_', this.legendID + '_shape_marker_',
            this.legendID + '_shape_'];
        var seriesIndex;
        for (var _i = 0, legendItemsId_1 = legendItemsId; _i < legendItemsId_1.length; _i++) {
            var id = legendItemsId_1[_i];
            if (targetId.indexOf(id) > -1) {
                seriesIndex = parseInt(targetId.split(id)[1], 10);
                this.LegendClick(seriesIndex);
                break;
            }
        }
        if (targetId.indexOf(this.legendID + '_pageup') > -1) {
            this.changePage(event, true);
        }
        else if (targetId.indexOf(this.legendID + '_pagedown') > -1) {
            this.changePage(event, false);
        }
        if (this.chart.enableCanvas && this.pagingRegions.length) {
            this.checkWithinBounds(pageX, pageY);
        }
        legendRegion = this.legendRegions.filter(function (region) {
            return (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["withInBounds"])(pageX, (pageY + (_this.isPaging ? (_this.currentPageNumber - 1) * _this.translatePage(null, 1, 2) : 0)), region.rect));
        });
        if (legendRegion.length && this.chart.enableCanvas) {
            this.LegendClick(legendRegion[0].index);
        }
    };
    /**
     * To check click position is within legend bounds
     */
    Legend.prototype.checkWithinBounds = function (pageX, pageY) {
        var cRender = this.chart.renderer;
        var bounds = this.legendBounds;
        var borderWidth = this.chart.legendSettings.border.width;
        var canvasRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Rect"](bounds.x, bounds.y, bounds.width, bounds.height);
        canvasRect.x = canvasRect.x - borderWidth / 2;
        canvasRect.y = canvasRect.y - borderWidth / 2;
        canvasRect.width = canvasRect.width + borderWidth;
        canvasRect.height = canvasRect.height + borderWidth;
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["withInBounds"])(pageX, pageY, this.pagingRegions[0])) {
            // pagedown calculations are performing here
            if (--this.currentPageNumber > 0) {
                this.legendRegions = [];
                cRender.clearRect(canvasRect);
                cRender.canvasClip(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["RectOption"]('legendClipPath', 'transparent', { width: 0, color: '' }, null, canvasRect));
                this.renderLegend(this.chart, this.legend, bounds);
                cRender.canvasRestore();
            }
            else {
                ++this.currentPageNumber;
            }
            return null;
        }
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["withInBounds"])(pageX, pageY, this.pagingRegions[1])) {
            // pageUp calculations are performing here
            if (++this.currentPageNumber > 0 && this.currentPageNumber <= this.totalNoOfPages) {
                this.legendRegions = [];
                cRender.clearRect(canvasRect);
                cRender.canvasClip(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["RectOption"]('legendClipPath', 'transpaent', { width: 0, color: '' }, null, canvasRect));
                this.renderLegend(this.chart, this.legend, bounds);
                cRender.canvasRestore();
            }
            else {
                --this.currentPageNumber;
            }
            return null;
        }
    };
    /**
     * Get module name
     */
    Legend.prototype.getModuleName = function () {
        return 'Legend';
    };
    /**
     * To destroy the Legend.
     * @return {void}
     * @private
     */
    Legend.prototype.destroy = function (chart) {
        this.removeEventListener();
    };
    return Legend;
}(_common_legend_legend__WEBPACK_IMPORTED_MODULE_1__["BaseLegend"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/model/chart-base.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/model/chart-base.js ***!
  \***************************************************************************/
/*! exports provided: ChartAnnotationSettings, LabelBorder, MultiLevelCategories, StripLineSettings, MultiLevelLabels, ScrollbarSettingsRange, ScrollbarSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartAnnotationSettings", function() { return ChartAnnotationSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LabelBorder", function() { return LabelBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLevelCategories", function() { return MultiLevelCategories; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StripLineSettings", function() { return StripLineSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLevelLabels", function() { return MultiLevelLabels; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollbarSettingsRange", function() { return ScrollbarSettingsRange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollbarSettings", function() { return ScrollbarSettings; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_model_theme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};



/**
 * Configures the Annotation for chart.
 */
var ChartAnnotationSettings = /** @class */ (function (_super) {
    __extends(ChartAnnotationSettings, _super);
    function ChartAnnotationSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], ChartAnnotationSettings.prototype, "x", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], ChartAnnotationSettings.prototype, "y", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ChartAnnotationSettings.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], ChartAnnotationSettings.prototype, "horizontalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Pixel')
    ], ChartAnnotationSettings.prototype, "coordinateUnits", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Chart')
    ], ChartAnnotationSettings.prototype, "region", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Middle')
    ], ChartAnnotationSettings.prototype, "verticalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ChartAnnotationSettings.prototype, "xAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ChartAnnotationSettings.prototype, "yAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ChartAnnotationSettings.prototype, "description", void 0);
    return ChartAnnotationSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * label border properties.
 */
var LabelBorder = /** @class */ (function (_super) {
    __extends(LabelBorder, _super);
    function LabelBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], LabelBorder.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], LabelBorder.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Rectangle')
    ], LabelBorder.prototype, "type", void 0);
    return LabelBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * categories for multi level labels
 */
var MultiLevelCategories = /** @class */ (function (_super) {
    __extends(MultiLevelCategories, _super);
    function MultiLevelCategories() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MultiLevelCategories.prototype, "start", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MultiLevelCategories.prototype, "end", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MultiLevelCategories.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MultiLevelCategories.prototype, "maximumTextWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MultiLevelCategories.prototype, "customAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MultiLevelCategories.prototype, "type", void 0);
    return MultiLevelCategories;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Strip line properties
 */
var StripLineSettings = /** @class */ (function (_super) {
    __extends(StripLineSettings, _super);
    function StripLineSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StripLineSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StripLineSettings.prototype, "startFromAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "start", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "end", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#808080')
    ], StripLineSettings.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], StripLineSettings.prototype, "sizeType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StripLineSettings.prototype, "isRepeat", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "repeatEvery", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "repeatUntil", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StripLineSettings.prototype, "isSegmented", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "segmentStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "segmentEnd", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "segmentAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'transparent', width: 1 }, _common_model_base__WEBPACK_IMPORTED_MODULE_2__["Border"])
    ], StripLineSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StripLineSettings.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StripLineSettings.prototype, "rotation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Middle')
    ], StripLineSettings.prototype, "horizontalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Middle')
    ], StripLineSettings.prototype, "verticalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_1__["Theme"].stripLineLabelFont, _common_model_base__WEBPACK_IMPORTED_MODULE_2__["Font"])
    ], StripLineSettings.prototype, "textStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Behind')
    ], StripLineSettings.prototype, "zIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StripLineSettings.prototype, "opacity", void 0);
    return StripLineSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * MultiLevelLabels properties
 */
var MultiLevelLabels = /** @class */ (function (_super) {
    __extends(MultiLevelLabels, _super);
    function MultiLevelLabels() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], MultiLevelLabels.prototype, "alignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Wrap')
    ], MultiLevelLabels.prototype, "overflow", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_1__["Theme"].axisLabelFont, _common_model_base__WEBPACK_IMPORTED_MODULE_2__["Font"])
    ], MultiLevelLabels.prototype, "textStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: null, width: 1, type: 'Rectangle' }, LabelBorder)
    ], MultiLevelLabels.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], MultiLevelCategories)
    ], MultiLevelLabels.prototype, "categories", void 0);
    return MultiLevelLabels;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Specifies range for scrollbarSettings property
 * @public
 */
var ScrollbarSettingsRange = /** @class */ (function (_super) {
    __extends(ScrollbarSettingsRange, _super);
    function ScrollbarSettingsRange() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ScrollbarSettingsRange.prototype, "minimum", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ScrollbarSettingsRange.prototype, "maximum", void 0);
    return ScrollbarSettingsRange;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Scrollbar Settings Properties for Lazy Loading
 */
var ScrollbarSettings = /** @class */ (function (_super) {
    __extends(ScrollbarSettings, _super);
    function ScrollbarSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ScrollbarSettings.prototype, "enable", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ScrollbarSettings.prototype, "pointsLength", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, ScrollbarSettingsRange)
    ], ScrollbarSettings.prototype, "range", void 0);
    return ScrollbarSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/print-export/export.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/print-export/export.js ***!
  \******************************************************************************/
/*! exports provided: Export */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Export", function() { return Export; });
/* harmony import */ var _common_utils_export__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/export */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/export.js");

/**
 * `ExportModule` module is used to print and export the rendered chart.
 */
var Export = /** @class */ (function () {
    /**
     * Constructor for export module.
     * @private
     */
    function Export(chart) {
        this.chart = chart;
    }
    /**
     * Handles the export method for chart control.
     * @param type
     * @param fileName
     */
    Export.prototype.export = function (type, fileName, orientation, controls, width, height, isVertical) {
        var exportChart = new _common_utils_export__WEBPACK_IMPORTED_MODULE_0__["ExportUtils"](this.chart);
        controls = controls ? controls : [this.chart];
        exportChart.export(type, fileName, orientation, controls, width, height, isVertical);
    };
    /**
     * Get module name.
     */
    Export.prototype.getModuleName = function () {
        // Returns the module name
        return 'Export';
    };
    /**
     * To destroy the chart.
     * @return {void}
     * @private
     */
    Export.prototype.destroy = function (chart) {
        // Destroy method performed here
    };
    return Export;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/area-series.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/area-series.js ***!
  \*****************************************************************************/
/*! exports provided: AreaSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AreaSeries", function() { return AreaSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _multi_colored_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./multi-colored-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `AreaSeries` module is used to render the area series.
 */
var AreaSeries = /** @class */ (function (_super) {
    __extends(AreaSeries, _super);
    function AreaSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Area series.
     * @return {void}
     * @private
     */
    AreaSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var _this = this;
        var startPoint = null;
        var direction = '';
        var origin = series.chart.chartAreaType === 'PolarRadar' ? series.points[0].yValue :
            Math.max(series.yAxis.visibleRange.min, 0);
        var currentXValue;
        var isPolar = (series.chart && series.chart.chartAreaType === 'PolarRadar');
        var isDropMode = (series.emptyPointSettings && series.emptyPointSettings.mode === 'Drop');
        var borderWidth = series.border ? series.border.width : 0;
        var borderColor = series.border ? series.border.color : 'transparent';
        var getCoordinate = series.chart.chartAreaType === 'PolarRadar' ? _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TransformToVisible"] : _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"];
        series.points.map(function (point, i, seriesPoints) {
            currentXValue = point.xValue;
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(seriesPoints[i - 1], point, seriesPoints[i + 1], series)) {
                direction += _this.getAreaPathDirection(currentXValue, origin, series, isInverted, getCoordinate, startPoint, 'M');
                startPoint = startPoint || new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](currentXValue, origin);
                // First Point to draw the area path
                direction += _this.getAreaPathDirection(currentXValue, point.yValue, series, isInverted, getCoordinate, null, 'L');
                if (seriesPoints[i + 1] && !seriesPoints[i + 1].visible && !isDropMode) {
                    direction += _this.getAreaEmptyDirection({ 'x': currentXValue, 'y': origin }, startPoint, series, isInverted, getCoordinate);
                    startPoint = null;
                }
                _this.storePointLocation(point, series, isInverted, getCoordinate);
            }
        });
        if (isPolar) {
            direction = direction.concat(direction + ' ' + 'Z');
        }
        this.appendLinePath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index, series.interior, borderWidth, borderColor, series.opacity, series.dashArray, ((series.points.length > 1 && direction !== '') ? (direction + this.getAreaPathDirection(series.points[series.points.length - 1].xValue, series.chart.chartAreaType === 'PolarRadar' ?
            series.points[series.points.length - 1].yValue : origin, series, isInverted, getCoordinate, null, 'L')) : '')), series, '');
        this.renderMarker(series);
    };
    /**
     * To destroy the area series.
     * @return {void}
     * @private
     */
    AreaSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    /**
     * Get module name
     */
    AreaSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'AreaSeries';
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    AreaSeries.prototype.doAnimation = function (series) {
        var option = series.animation;
        this.doLinearAnimation(series, option);
    };
    return AreaSeries;
}(_multi_colored_base__WEBPACK_IMPORTED_MODULE_2__["MultiColoredSeries"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/bar-series.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/bar-series.js ***!
  \****************************************************************************/
/*! exports provided: BarSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarSeries", function() { return BarSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `BarSeries` module is used to render the bar series.
 */
var BarSeries = /** @class */ (function (_super) {
    __extends(BarSeries, _super);
    function BarSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Bar series.
     * @return {void}
     * @private
     */
    BarSeries.prototype.render = function (series) {
        var origin = Math.max(series.yAxis.visibleRange.min, 0);
        var sideBySideInfo = this.getSideBySideInfo(series);
        var rect;
        var argsData;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var pointBar = _a[_i];
            pointBar.symbolLocations = [];
            pointBar.regions = [];
            if (pointBar.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[pointBar.index - 1], pointBar, series.points[pointBar.index + 1], series)) {
                rect = this.getRectangle(pointBar.xValue + sideBySideInfo.start, pointBar.yValue, pointBar.xValue + sideBySideInfo.end, origin, series);
                argsData = this.triggerEvent(series, pointBar, series.interior, { width: series.border.width, color: series.border.color });
                if (!argsData.cancel) {
                    this.updateSymbolLocation(pointBar, rect, series);
                    this.drawRectangle(series, pointBar, rect, argsData);
                }
            }
        }
        this.renderMarker(series);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    BarSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * To destroy the bar series.
     * @return {void}
     * @private
     */
    BarSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    /**
     * Get module name
     */
    BarSeries.prototype.getModuleName = function () {
        return 'BarSeries';
    };
    return BarSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_1__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/box-and-whisker-series.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/box-and-whisker-series.js ***!
  \****************************************************************************************/
/*! exports provided: BoxAndWhiskerSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BoxAndWhiskerSeries", function() { return BoxAndWhiskerSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * `BoxAndWhiskerSeries` module is used to render the box and whisker series.
 */
var BoxAndWhiskerSeries = /** @class */ (function (_super) {
    __extends(BoxAndWhiskerSeries, _super);
    function BoxAndWhiskerSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render BoxAndWhisker series.
     * @return {void}
     * @private
     */
    BoxAndWhiskerSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var sideBySideInfo = this.getSideBySideInfo(series);
        var argsData;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            point.symbolLocations = [];
            point.regions = [];
            var centerRegion = void 0;
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
                this.findBoxPlotValues(point.y, point, series.boxPlotMode);
                //region to cover the top and bottom ticks
                this.updateTipRegion(series, point, sideBySideInfo);
                //get middle rect
                centerRegion = this.getRectangle((point.xValue + sideBySideInfo.start), point.upperQuartile, (point.xValue + sideBySideInfo.end), point.lowerQuartile, series);
                point.regions.push(centerRegion);
                argsData = this.triggerEvent(series, point, series.interior, {
                    color: (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(series.border.color) && series.border.color !== 'transparent') ? series.border.color :
                        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getSaturationColor"])(series.interior, -0.6),
                    width: series.border.width ? series.border.width : 1
                });
                if (!argsData.cancel) {
                    this.renderBoxAndWhisker(series, point, centerRegion, argsData, this.getPathString(point, series, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.median, xAxis, yAxis, isInverted), Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue + sideBySideInfo.median, point.average, xAxis, yAxis, isInverted)), sideBySideInfo.median);
                }
            }
        }
        if (series.marker.visible) {
            series.chart.markerRender.render(series);
        }
    };
    /**
     * update the tip region fo box plot
     * @param series
     * @param point
     * @param sideBySideInfo
     */
    BoxAndWhiskerSeries.prototype.updateTipRegion = function (series, point, sideBySideInfo) {
        var tipRegion = this.getRectangle((point.xValue + sideBySideInfo.median), point.maximum, (point.xValue + sideBySideInfo.median), point.minimum, series);
        this.updateTipSize(series, point, tipRegion, series.chart.requireInvertedAxis);
    };
    /**
     * Update tip size to tip regions
     * @param series
     * @param point
     * @param region
     * @param isInverted
     */
    BoxAndWhiskerSeries.prototype.updateTipSize = function (series, point, region, isInverted) {
        var borderWidth = series.border.width || 1;
        if (!isInverted) {
            region.x -= borderWidth / 2;
            region.width = region.width || borderWidth;
        }
        else {
            region.y -= borderWidth / 2;
            region.height = region.height || borderWidth;
        }
        point.regions.push(region);
    };
    /**
     * Calculation for path direction performed here
     * @param point
     * @param series
     * @param median
     * @param average
     */
    BoxAndWhiskerSeries.prototype.getPathString = function (point, series, median, average) {
        var topRect = point.regions[0];
        var midRect = point.regions[1];
        var direction = '';
        var width = series.chart.requireInvertedAxis ? topRect.height : topRect.width;
        var center = series.chart.requireInvertedAxis ? topRect.y + topRect.height / 2 :
            topRect.x + topRect.width / 2;
        var midWidth = midRect.x + midRect.width;
        var midHeight = midRect.y + midRect.height;
        var topWidth = topRect.x + topRect.width;
        var topHeight = topRect.y + topRect.height;
        if (!series.chart.requireInvertedAxis) {
            this.updateTipSize(series, point, { x: midRect.x, y: topRect.y, width: midWidth - midRect.x, height: 0 }, true);
            this.updateTipSize(series, point, { x: midRect.x, y: topHeight, width: midWidth - midRect.x, height: 0 }, true);
            direction += 'M ' + midRect.x + ' ' + topRect.y + ' ' + ' L ' + midWidth + ' ' + topRect.y;
            direction += ' M ' + center + ' ' + topRect.y + ' ' + ' L ' + center + ' ' + midRect.y;
            direction += ' M ' + midRect.x + ' ' + midRect.y + ' ' + ' L ' + midWidth + ' ' + midRect.y +
                ' L ' + midWidth + ' ' + midHeight + ' L ' + midRect.x + ' ' + midHeight + ' Z';
            direction += ' M ' + center + ' ' + midHeight + ' L ' + center + ' ' + topHeight;
            direction += ' M ' + midRect.x + ' ' + topHeight + ' L ' + midWidth + ' ' + topHeight;
            direction += ' M ' + midRect.x + ' ' + median.y + ' L ' + midWidth + ' ' + median.y;
            direction += series.showMean ?
                ' M ' + (average.x - 5) + ' ' + (average.y - 5) + ' L ' + (average.x + 5) + ' ' + (average.y + 5) +
                    ' M ' + (average.x + 5) + ' ' + (average.y - 5) + ' L ' + (average.x - 5) + ' ' + (average.y + 5) : '';
        }
        else {
            this.updateTipSize(series, point, { x: topRect.x, y: midRect.y, width: 0, height: midHeight - midRect.y }, false);
            this.updateTipSize(series, point, { x: topWidth, y: midRect.y, width: 0, height: midHeight - midRect.y }, true);
            direction += 'M ' + topRect.x + ' ' + midRect.y + ' L ' + topRect.x + ' ' + midHeight;
            direction += 'M ' + topRect.x + ' ' + center + ' ' + ' L ' + midRect.x + ' ' + center;
            direction += ' M ' + midRect.x + ' ' + midRect.y + ' ' + ' L ' + midWidth + ' ' + midRect.y +
                ' L ' + midWidth + ' ' + midHeight + ' L ' + midRect.x + ' ' + midHeight + ' Z';
            direction += ' M ' + midWidth + ' ' + center + ' L ' + topWidth + ' ' + center;
            direction += ' M ' + topWidth + ' ' + midRect.y + ' L ' + topWidth + ' ' + midHeight;
            direction += ' M ' + median.x + ' ' + midRect.y + ' ' + ' L ' + median.x + ' ' + midHeight;
            direction += series.showMean ?
                'M ' + (average.x + 5) + ' ' + (average.y - 5) + ' L ' + (average.x - 5) + ' ' + (average.y + 5) +
                    'M ' + (average.x - 5) + ' ' + (average.y - 5) + ' L ' + (average.x + 5) + ' ' + (average.y + 5) : '';
        }
        return direction;
    };
    /**
     * Rendering for box and whisker append here.
     * @param series
     * @param point
     * @param rect
     * @param argsData
     * @param direction
     */
    BoxAndWhiskerSeries.prototype.renderBoxAndWhisker = function (series, point, rect, argsData, direction, median) {
        var location;
        var size;
        var symbolId = series.chart.element.id + '_Series_' + series.index + '_Point_' + point.index;
        var element = series.chart.renderer.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](symbolId + '_BoxPath', argsData.fill, argsData.border.width, argsData.border.color, series.opacity, series.dashArray, direction));
        element.setAttribute('aria-label', point.x.toString() + ':' + point.maximum.toString()
            + ':' + point.minimum.toString() + ':' + point.lowerQuartile.toString() + ':' + point.upperQuartile.toString());
        var parentElement = series.chart.renderer.createGroup({
            'id': symbolId
        });
        parentElement.appendChild(element);
        for (var i = 0; i < point.outliers.length; i++) {
            location = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])((point.xValue + median), point.outliers[i], series.xAxis, series.yAxis, series.chart.requireInvertedAxis);
            size = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](series.marker.width, series.marker.height);
            point.symbolLocations.push(location);
            this.updateTipSize(series, point, {
                x: location.x - (size.width / 2), y: location.y - (size.height / 2),
                width: size.width, height: size.height
            }, true);
        }
        series.seriesElement.appendChild(parentElement);
    };
    /**
     * To find the box plot values
     * @param yValues
     * @param point
     * @param mode
     */
    BoxAndWhiskerSeries.prototype.findBoxPlotValues = function (yValues, point, mode) {
        var yCount = yValues.length;
        var quartile = {
            average: Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["sum"])(yValues) / yCount,
            lowerQuartile: 0, upperQuartile: 0,
            maximum: 0, minimum: 0,
            median: 0, outliers: []
        };
        if (mode === 'Exclusive') {
            quartile.lowerQuartile = this.getExclusiveQuartileValue(yValues, yCount, 0.25);
            quartile.upperQuartile = this.getExclusiveQuartileValue(yValues, yCount, 0.75);
            quartile.median = this.getExclusiveQuartileValue(yValues, yCount, 0.5);
        }
        else if (mode === 'Inclusive') {
            quartile.lowerQuartile = this.getInclusiveQuartileValue(yValues, yCount, 0.25);
            quartile.upperQuartile = this.getInclusiveQuartileValue(yValues, yCount, 0.75);
            quartile.median = this.getInclusiveQuartileValue(yValues, yCount, 0.5);
        }
        else {
            quartile.median = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getMedian"])(yValues);
            this.getQuartileValues(yValues, yCount, quartile);
        }
        this.getMinMaxOutlier(yValues, yCount, quartile);
        point.minimum = quartile.minimum;
        point.maximum = quartile.maximum;
        point.lowerQuartile = quartile.lowerQuartile;
        point.upperQuartile = quartile.upperQuartile;
        point.median = quartile.median;
        point.outliers = quartile.outliers;
        point.average = quartile.average;
    };
    /**
     * to find the exclusive quartile values
     * @param yValues
     * @param count
     * @param percentile
     */
    BoxAndWhiskerSeries.prototype.getExclusiveQuartileValue = function (yValues, count, percentile) {
        if (count === 0) {
            return 0;
        }
        else if (count === 1) {
            return yValues[0];
        }
        var value = 0;
        var rank = percentile * (count + 1);
        var integerRank = Math.floor(Math.abs(rank));
        var fractionRank = rank - integerRank;
        if (integerRank === 0) {
            value = yValues[0];
        }
        else if (integerRank > count - 1) {
            value = yValues[count - 1];
        }
        else {
            value = fractionRank * (yValues[integerRank] - yValues[integerRank - 1]) + yValues[integerRank - 1];
        }
        return value;
    };
    /**
     * to find the inclusive quartile values
     * @param yValues
     * @param count
     * @param percentile
     */
    BoxAndWhiskerSeries.prototype.getInclusiveQuartileValue = function (yValues, count, percentile) {
        if (count === 0) {
            return 0;
        }
        else if (count === 1) {
            return yValues[0];
        }
        var value = 0;
        var rank = percentile * (count - 1);
        var integerRank = Math.floor(Math.abs(rank));
        var fractionRank = rank - integerRank;
        value = fractionRank * (yValues[integerRank + 1] - yValues[integerRank]) + yValues[integerRank];
        return value;
    };
    /**
     * To find the quartile values
     * @param yValues
     * @param count
     * @param lowerQuartile
     * @param upperQuartile
     */
    BoxAndWhiskerSeries.prototype.getQuartileValues = function (yValues, count, quartile) {
        if (count === 1) {
            quartile.lowerQuartile = yValues[0];
            quartile.upperQuartile = yValues[0];
            return null;
        }
        var isEvenList = count % 2 === 0;
        var halfLength = count / 2;
        var lowerQuartileArray = yValues.slice(0, halfLength);
        var upperQuartileArray = yValues.slice(isEvenList ? halfLength : halfLength + 1, count);
        quartile.lowerQuartile = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getMedian"])(lowerQuartileArray);
        quartile.upperQuartile = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getMedian"])(upperQuartileArray);
    };
    /**
     * To find the min, max and outlier values
     * @param yValues
     * @param lowerQuartile
     * @param upperQuartile
     * @param minimum
     * @param maximum
     * @param outliers
     */
    BoxAndWhiskerSeries.prototype.getMinMaxOutlier = function (yValues, count, quartile) {
        var interquartile = quartile.upperQuartile - quartile.lowerQuartile;
        var rangeIQR = 1.5 * interquartile;
        for (var i = 0; i < count; i++) {
            if (yValues[i] < quartile.lowerQuartile - rangeIQR) {
                quartile.outliers.push(yValues[i]);
            }
            else {
                quartile.minimum = yValues[i];
                break;
            }
        }
        for (var i = count - 1; i >= 0; i--) {
            if (yValues[i] > quartile.upperQuartile + rangeIQR) {
                quartile.outliers.push(yValues[i]);
            }
            else {
                quartile.maximum = yValues[i];
                break;
            }
        }
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    BoxAndWhiskerSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * Get module name.
     */
    BoxAndWhiskerSeries.prototype.getModuleName = function () {
        return 'BoxAndWhiskerSeries';
        /**
         * return the module name
         */
    };
    /**
     * To destroy the candle series.
     * @return {void}
     * @private
     */
    BoxAndWhiskerSeries.prototype.destroy = function (chart) {
        /**
         * Destroys the candle series.
         */
    };
    return BoxAndWhiskerSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_3__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/bubble-series.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/bubble-series.js ***!
  \*******************************************************************************/
/*! exports provided: BubbleSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BubbleSeries", function() { return BubbleSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");




/**
 * `BubbleSeries` module is used to render the bubble series.
 */
var BubbleSeries = /** @class */ (function () {
    function BubbleSeries() {
    }
    /**
     * Render the Bubble series.
     * @return {void}
     * @private
     */
    BubbleSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var marker = series.marker;
        var visiblePoints = series.points;
        var shapeOption;
        var argsData;
        //let bubbleMode: RadiusMode = bubbleOptions.radiusMode;
        var segmentRadius;
        var radius;
        var value = Math.max(series.chart.initialClipRect.height, series.chart.initialClipRect.width);
        var percentChange = value / 100;
        var maxRadius = series.maxRadius * percentChange;
        var minRadius = series.minRadius * percentChange;
        var maximumSize = null;
        var maxValue = null;
        var element;
        var startLocation;
        var redraw = series.chart.redraw;
        if ((series.maxRadius === null || series.minRadius === null)) {
            for (var _i = 0, _a = series.chart.visibleSeries; _i < _a.length; _i++) {
                var value_1 = _a[_i];
                if (value_1.type === 'Bubble' && value_1.visible === true && (value_1.maxRadius === null || value_1.minRadius === null)) {
                    maximumSize = value_1.sizeMax > maximumSize ? value_1.sizeMax : maximumSize;
                }
            }
            maxValue = (value / 5) / 2;
            minRadius = maxRadius = 1;
            radius = maxValue * maxRadius;
        }
        else {
            maximumSize = series.sizeMax;
            radius = maxRadius - minRadius;
        }
        for (var _b = 0, visiblePoints_1 = visiblePoints; _b < visiblePoints_1.length; _b++) {
            var bubblePoint = visiblePoints_1[_b];
            startLocation = redraw ? bubblePoint.symbolLocations[0] : null;
            bubblePoint.symbolLocations = [];
            bubblePoint.regions = [];
            if (bubblePoint.visible &&
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(visiblePoints[bubblePoint.index - 1], bubblePoint, visiblePoints[bubblePoint.index + 1], series)) {
                if ((series.maxRadius === null || series.minRadius === null)) {
                    segmentRadius = radius * Math.abs(+bubblePoint.size / maximumSize);
                }
                else {
                    segmentRadius = minRadius + radius * Math.abs(+bubblePoint.size / maximumSize);
                }
                segmentRadius = segmentRadius || minRadius;
                argsData = {
                    cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_2__["pointRender"], series: series, point: bubblePoint,
                    fill: series.setPointColor(bubblePoint, series.interior),
                    border: series.setBorderColor(bubblePoint, { width: series.border.width, color: series.border.color }),
                    height: 2 * segmentRadius, width: 2 * segmentRadius
                };
                series.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_2__["pointRender"], argsData);
                if (!argsData.cancel) {
                    bubblePoint.symbolLocations.push(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(bubblePoint.xValue, bubblePoint.yValue, xAxis, yAxis, isInverted));
                    bubblePoint.color = argsData.fill;
                    shapeOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index + '_Point_' + bubblePoint.index, argsData.fill, argsData.border.width, argsData.border.color, series.opacity, null);
                    element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"])(bubblePoint.symbolLocations[0], 'Circle', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](argsData.width, argsData.height), marker.imageUrl, shapeOption, bubblePoint.x.toString() + ':' + bubblePoint.yValue.toString(), series.chart.svgRenderer, series.clipRect);
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(false, series.seriesElement, element, redraw);
                    bubblePoint.regions.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](bubblePoint.symbolLocations[0].x - segmentRadius, bubblePoint.symbolLocations[0].y - segmentRadius, 2 * segmentRadius, 2 * segmentRadius));
                    bubblePoint.marker = {
                        border: argsData.border, fill: argsData.fill,
                        height: argsData.height, visible: true,
                        shape: 'Circle', width: argsData.width
                    };
                    if (redraw) {
                        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["animateRedrawElement"])(element, 300, startLocation, bubblePoint.symbolLocations[0], 'cx', 'cy');
                    }
                }
                else {
                    bubblePoint.marker = { visible: false };
                }
            }
        }
    };
    /**
     * To destroy the Bubble.
     * @return {void}
     * @private
     */
    BubbleSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    /**
     * Get module name.
     */
    BubbleSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'BubbleSeries';
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    BubbleSeries.prototype.doAnimation = function (series) {
        var duration = series.animation.duration;
        var delay = series.animation.delay;
        var rectElements = series.seriesElement.childNodes;
        var count = 1;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var bubblePoint = _a[_i];
            if (!bubblePoint.symbolLocations.length) {
                continue;
            }
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["markerAnimate"])(rectElements[count], delay, duration, series, bubblePoint.index, bubblePoint.symbolLocations[0], false);
            count++;
        }
    };
    return BubbleSeries;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/candle-series.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/candle-series.js ***!
  \*******************************************************************************/
/*! exports provided: CandleSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CandleSeries", function() { return CandleSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `CandleSeries` module is used to render the candle series.
 */
var CandleSeries = /** @class */ (function (_super) {
    __extends(CandleSeries, _super);
    function CandleSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Candle series.
     * @return {void}
     * @private
     */
    CandleSeries.prototype.render = function (series) {
        var sideBySideInfo = this.getSideBySideInfo(series);
        var argsData;
        var borderWidth = Math.max(series.border.width, 1);
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            var direction = '';
            var centerRegion = void 0;
            var tickRegion = void 0;
            var midPoint = void 0;
            midPoint = (sideBySideInfo.start + sideBySideInfo.end) / 2;
            //initializing after zooming and also normal initialization
            point.regions = [];
            point.symbolLocations = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
                //region to cover the top and bottom ticks
                tickRegion = this.getRectangle((point.xValue + sideBySideInfo.median), Math.max(point.high, point.low), (point.xValue + sideBySideInfo.median), Math.min(point.high, point.low), series);
                if (!series.chart.requireInvertedAxis) {
                    tickRegion.x -= borderWidth / 2;
                    tickRegion.width = borderWidth;
                }
                else {
                    tickRegion.y -= borderWidth / 2;
                    tickRegion.height = borderWidth;
                }
                //get middleRect
                centerRegion = this.getRectangle((point.xValue + sideBySideInfo.start), Math.max(point.open, point.close), (point.xValue + sideBySideInfo.end), Math.min(point.open, point.close), series);
                direction = this.getPathString(tickRegion, centerRegion, series);
                argsData = this.triggerPointRenderEvent(series, point);
                if (!argsData.cancel) {
                    this.drawCandle(series, point, centerRegion, argsData, direction);
                    this.updateSymbolLocation(point, tickRegion, series);
                    this.updateSymbolLocation(point, centerRegion, series);
                }
            }
        }
    };
    /**
     * Trigger point rendering event
     */
    CandleSeries.prototype.triggerPointRenderEvent = function (series, point) {
        var fill;
        fill = this.getCandleColor(point, series);
        var border = { color: series.border.color, width: Math.max(series.border.width, 1) };
        return this.triggerEvent(series, point, fill, border);
    };
    /**
     * Find the color of the candle
     * @param series
     * @private
     */
    CandleSeries.prototype.getCandleColor = function (point, series) {
        var currentPoint = point;
        var previousPoint = series.points[point.index - 1];
        if (series.enableSolidCandles === false) {
            if (!previousPoint) {
                return series.bearFillColor;
            }
            else {
                return previousPoint.close > point.close ? series.bullFillColor :
                    series.bearFillColor;
            }
        }
        else {
            return point.open > point.close ? series.bullFillColor :
                series.bearFillColor;
        }
    };
    /**
     * Finds the path of the candle shape
     * @param Series
     * @private
     */
    CandleSeries.prototype.getPathString = function (topRect, midRect, series) {
        var direction = '';
        var width = series.chart.requireInvertedAxis ? topRect.height : topRect.width;
        var center = series.chart.requireInvertedAxis ? topRect.y + topRect.height / 2 :
            topRect.x + topRect.width / 2;
        //tick 1 segment
        direction += !series.chart.requireInvertedAxis ?
            'M' + ' ' + (center) + ' ' + (topRect.y) + ' ' + 'L' + ' ' + (center) + ' ' + midRect.y :
            'M' + ' ' + (topRect.x) + ' ' + (center) + ' ' + 'L' + ' ' + (midRect.x) + ' ' + center;
        direction = direction.concat(' M' + ' ' + (midRect.x) + ' ' + (midRect.y) + ' ' +
            'L' + ' ' + (midRect.x + midRect.width) + ' ' + (midRect.y) + ' ' +
            'L' + ' ' + (midRect.x + midRect.width) + ' ' +
            (midRect.y + midRect.height) + ' ' +
            'L' + ' ' + (midRect.x) + ' ' + (midRect.y + midRect.height) +
            ' ' + 'Z');
        direction += !series.chart.requireInvertedAxis ?
            ' M' + ' ' + (center) + ' ' + (midRect.y + midRect.height) + ' ' + 'L' + ' ' + (center) + ' ' + (topRect.y +
                topRect.height) :
            ' M' + ' ' + (midRect.x + midRect.width) + ' ' + (center) + ' ' + 'L' + ' ' +
                (topRect.x + topRect.width) + ' ' + center;
        return direction;
    };
    /**
     * Draws the candle shape
     * @param series
     * @private
     */
    CandleSeries.prototype.drawCandle = function (series, point, rect, argsData, direction) {
        var check = series.chart.requireInvertedAxis ? rect.height : rect.width;
        if (check <= 0) {
            return null;
        }
        var fill = !series.enableSolidCandles ?
            (point.open > point.close ? argsData.fill : 'transparent') : argsData.fill;
        argsData.border.color = argsData.fill;
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index + '_Point_' + point.index, fill, argsData.border.width, argsData.border.color, series.opacity, series.dashArray, direction);
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(options.id);
        var previousDirection = element ? element.getAttribute('d') : null;
        var candleElement = series.chart.renderer.drawPath(options, new Int32Array([series.clipRect.x, series.clipRect.y]));
        candleElement.setAttribute('aria-label', point.x.toString() + ':' + point.high.toString()
            + ':' + point.low.toString() + ':' + point.close.toString() + ':' + point.open.toString());
        if (!series.chart.enableCanvas) {
            series.seriesElement.appendChild(candleElement);
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["pathAnimation"])(element, direction, series.chart.redraw, previousDirection);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    CandleSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * Get module name.
     */
    CandleSeries.prototype.getModuleName = function () {
        return 'CandleSeries';
        /**
         * return the module name
         */
    };
    /**
     * To destroy the candle series.
     * @return {void}
     * @private
     */
    CandleSeries.prototype.destroy = function (chart) {
        /**
         * Destroys the candle series.
         */
    };
    return CandleSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_2__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js ***!
  \******************************************************************************/
/*! exports provided: DataLabelSettings, MarkerSettings, Points, Trendline, ErrorBarCapSettings, ChartSegment, ErrorBarSettings, SeriesBase, Series */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataLabelSettings", function() { return DataLabelSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerSettings", function() { return MarkerSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Points", function() { return Points; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Trendline", function() { return Trendline; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorBarCapSettings", function() { return ErrorBarCapSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartSegment", function() { return ChartSegment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorBarSettings", function() { return ErrorBarSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesBase", function() { return SeriesBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Series", function() { return Series; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};










/**
 * Configures the data label in the series.
 */
var DataLabelSettings = /** @class */ (function (_super) {
    __extends(DataLabelSettings, _super);
    function DataLabelSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DataLabelSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DataLabelSettings.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('transparent')
    ], DataLabelSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], DataLabelSettings.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], DataLabelSettings.prototype, "position", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], DataLabelSettings.prototype, "rx", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], DataLabelSettings.prototype, "ry", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], DataLabelSettings.prototype, "alignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ width: null, color: null }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Border"])
    ], DataLabelSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ left: 5, right: 5, top: 5, bottom: 5 }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Margin"])
    ], DataLabelSettings.prototype, "margin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ size: '11px', color: '', fontStyle: 'Normal', fontWeight: 'Normal', fontFamily: 'Segoe UI' }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Font"])
    ], DataLabelSettings.prototype, "font", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DataLabelSettings.prototype, "template", void 0);
    return DataLabelSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 *  Configures the marker in the series.
 */
var MarkerSettings = /** @class */ (function (_super) {
    __extends(MarkerSettings, _super);
    function MarkerSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], MarkerSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Circle')
    ], MarkerSettings.prototype, "shape", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MarkerSettings.prototype, "imageUrl", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], MarkerSettings.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], MarkerSettings.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ width: 2, color: null }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Border"])
    ], MarkerSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MarkerSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], MarkerSettings.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, DataLabelSettings)
    ], MarkerSettings.prototype, "dataLabel", void 0);
    return MarkerSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Points model for the series.
 * @public
 */
var Points = /** @class */ (function () {
    function Points() {
        /** point symbol location */
        this.symbolLocations = null;
        /** point region */
        this.regions = null;
        /** point percentage value */
        this.percentage = null;
        /** point region data */
        this.regionData = null;
        /** point marker */
        this.marker = {
            visible: false
        };
    }
    return Points;
}());

/**
 * Defines the behavior of the Trendlines
 */
var Trendline = /** @class */ (function (_super) {
    __extends(Trendline, _super);
    function Trendline() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /** @private */
        _this.clipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, 0, 0);
        return _this;
    }
    /** @private */
    Trendline.prototype.setDataSource = function (series, chart) {
        if (series) {
            this.points = series.points;
        }
        var type = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["firstToLowerCase"])(this.type);
        chart.trendLineModule.initDataSource(this, chart);
        chart.visibleSeriesCount++;
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Trendline.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Linear')
    ], Trendline.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], Trendline.prototype, "period", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], Trendline.prototype, "polynomialOrder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Trendline.prototype, "backwardForecast", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Trendline.prototype, "forwardForecast", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Animation"])
    ], Trendline.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, MarkerSettings)
    ], Trendline.prototype, "marker", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Trendline.prototype, "enableTooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Trendline.prototype, "intercept", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Trendline.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Trendline.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SeriesType')
    ], Trendline.prototype, "legendShape", void 0);
    return Trendline;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures Error bar in series.
 */
var ErrorBarCapSettings = /** @class */ (function (_super) {
    __extends(ErrorBarCapSettings, _super);
    function ErrorBarCapSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], ErrorBarCapSettings.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], ErrorBarCapSettings.prototype, "length", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ErrorBarCapSettings.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], ErrorBarCapSettings.prototype, "opacity", void 0);
    return ErrorBarCapSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var ChartSegment = /** @class */ (function (_super) {
    __extends(ChartSegment, _super);
    function ChartSegment() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ChartSegment.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ChartSegment.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], ChartSegment.prototype, "dashArray", void 0);
    return ChartSegment;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Error bar settings
 * @public
 */
var ErrorBarSettings = /** @class */ (function (_super) {
    __extends(ErrorBarSettings, _super);
    function ErrorBarSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ErrorBarSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Fixed')
    ], ErrorBarSettings.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Both')
    ], ErrorBarSettings.prototype, "direction", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Vertical')
    ], ErrorBarSettings.prototype, "mode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ErrorBarSettings.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], ErrorBarSettings.prototype, "verticalError", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], ErrorBarSettings.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], ErrorBarSettings.prototype, "horizontalError", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], ErrorBarSettings.prototype, "verticalPositiveError", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], ErrorBarSettings.prototype, "verticalNegativeError", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], ErrorBarSettings.prototype, "horizontalPositiveError", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], ErrorBarSettings.prototype, "horizontalNegativeError", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, ErrorBarCapSettings)
    ], ErrorBarSettings.prototype, "errorBarCap", void 0);
    return ErrorBarSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Defines the common behavior of Series and Technical Indicators
 */
var SeriesBase = /** @class */ (function (_super) {
    __extends(SeriesBase, _super);
    function SeriesBase() {
        /**
         * The DataSource field that contains the x value.
         * It is applicable for series and technical indicators
         * @default ''
         */
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /** @private */
        _this.currentViewData = [];
        /** @private */
        _this.clipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, 0, 0);
        /** @private */
        _this.seriesType = 'XY';
        return _this;
    }
    /**
     * Process data for the series.
     * @hidden
     */
    SeriesBase.prototype.processJsonData = function () {
        var i = 0;
        var point = new Points();
        var xName = (this instanceof Series && this.type === 'Histogram') ? 'x' : this.xName;
        var textMappingName = this instanceof Series && this.marker.dataLabel.name ?
            this.marker.dataLabel.name : '';
        if (this instanceof Series) {
            if ((this.type === 'Waterfall' || this.type === 'Histogram')) {
                this.currentViewData = this.chart[Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["firstToLowerCase"])(this.type) + 'SeriesModule'].
                    processInternalData(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], this.currentViewData, null, true), this);
            }
            if (this.category === 'Pareto') {
                this.currentViewData = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["sort"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], this.currentViewData, null, true), [this.yName], true);
                if (this.type === 'Line') {
                    this.currentViewData = this.chart.paretoSeriesModule.performCumulativeCalculation(this.currentViewData, this);
                }
            }
        }
        var len = Object.keys(this.currentViewData).length;
        this.points = [];
        this.xMin = Infinity;
        this.xMax = -Infinity;
        this.yMin = Infinity;
        this.yMax = -Infinity;
        this.sizeMax = -Infinity;
        this.getSeriesType();
        if (this.xAxis.valueType === 'Category') {
            while (i < len) {
                point = this.dataPoint(i, textMappingName, xName);
                this.pushCategoryData(point, i, point.x);
                this.pushData(point, i);
                this.setEmptyPoint(point, i);
                i++;
            }
        }
        else if (this.xAxis.valueType.indexOf('DateTime') > -1) {
            var option = {
                skeleton: 'full',
                type: 'dateTime'
            };
            var dateParser = this.chart.intl.getDateParser(option);
            var dateFormatter = this.chart.intl.getDateFormat(option);
            while (i < len) {
                point = this.dataPoint(i, textMappingName, xName);
                point.x = new Date(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataUtil"].parse.parseJson({ val: point.x }).val);
                if (this.xAxis.valueType === 'DateTime') {
                    point.xValue = Date.parse(dateParser(dateFormatter(point.x)));
                }
                else {
                    this.pushCategoryData(point, i, Date.parse(dateParser(dateFormatter(point.x))).toString());
                }
                this.pushData(point, i);
                this.setEmptyPoint(point, i);
                i++;
            }
        }
        else {
            while (i < len) {
                point = this.dataPoint(i, textMappingName, xName);
                point.xValue = point.x;
                this.pushData(point, i);
                this.setEmptyPoint(point, i);
                i++;
            }
        }
        if (this instanceof Series) {
            if (this.type.indexOf('Spline') > -1 || (this.drawType.indexOf('Spline') > -1 && this.chart.chartAreaType === 'PolarRadar')) {
                var isArea = (this.type.indexOf('Area') > -1 || this.drawType === 'Area');
                this.chart['spline' + (isArea ? 'Area' : '') + 'SeriesModule'].findSplinePoint(this);
            }
        }
    };
    SeriesBase.prototype.pushData = function (point, i) {
        point.index = i;
        point.yValue = point.y;
        // To find the min, max for the axis range.
        this.xMin = Math.min(this.xMin, point.xValue);
        this.xMax = Math.max(this.xMax, point.xValue);
        this.xData.push(point.xValue);
    };
    /** @private */
    SeriesBase.prototype.dataPoint = function (i, textMappingName, xName) {
        var point;
        this.points[i] = new Points();
        point = this.points[i];
        var currentViewData = this.currentViewData;
        var getObjectValueByMappingString = this.enableComplexProperty ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"] : this.getObjectValue;
        point.x = getObjectValueByMappingString(xName, currentViewData[i]);
        point.high = getObjectValueByMappingString(this.high, currentViewData[i]);
        point.low = getObjectValueByMappingString(this.low, currentViewData[i]);
        point.open = getObjectValueByMappingString(this.open, currentViewData[i]);
        point.close = getObjectValueByMappingString(this.close, currentViewData[i]);
        point.volume = getObjectValueByMappingString(this.volume, currentViewData[i]);
        point.interior = getObjectValueByMappingString(this.pointColorMapping, currentViewData[i]);
        if (this instanceof Series) {
            point.y = getObjectValueByMappingString(this.yName, currentViewData[i]);
            point.size = getObjectValueByMappingString(this.size, currentViewData[i]);
            point.text = getObjectValueByMappingString(textMappingName, currentViewData[i]);
            point.tooltip = getObjectValueByMappingString(this.tooltipMappingName, currentViewData[i]);
        }
        return point;
    };
    SeriesBase.prototype.getObjectValue = function (mappingName, data) {
        return data[mappingName];
    };
    /**
     * To set empty point value based on empty point mode
     * @private
     */
    SeriesBase.prototype.setEmptyPoint = function (point, i) {
        if (!this.findVisibility(point)) {
            point.visible = true;
            return null;
        }
        point.isEmpty = true;
        var mode = this instanceof Series ? this.emptyPointSettings.mode : 'Drop';
        switch (mode) {
            case 'Zero':
                point.visible = true;
                if (this instanceof Series && this.seriesType.indexOf('HighLow') > -1) {
                    point.high = point.low = 0;
                    if (this.seriesType.indexOf('HighLowOpenClose') > -1) {
                        point.open = point.close = 0;
                    }
                }
                else {
                    point.y = point.yValue = this.yData[i] = 0;
                }
                break;
            case 'Average':
                if (this instanceof Series) {
                    if (this.seriesType.indexOf('HighLow') > -1) {
                        point.high = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.high) || isNaN(+point.high)) ? this.getAverage(this.high, i) : point.high;
                        point.low = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.low) || isNaN(+point.low)) ? this.getAverage(this.low, i) : point.low;
                        if (this.seriesType.indexOf('HighLowOpenClose') > -1) {
                            point.open = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.open) || isNaN(+point.open)) ? this.getAverage(this.open, i) : point.open;
                            point.close = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.close) || isNaN(+point.close)) ? this.getAverage(this.close, i) :
                                point.close;
                        }
                    }
                    else {
                        point.y = point.yValue = this.yData[i] = this.getAverage(this.yName, i);
                    }
                }
                point.visible = true;
                break;
            case 'Drop':
            case 'Gap':
                this.yData[i] = null;
                point.visible = false;
                break;
        }
    };
    SeriesBase.prototype.findVisibility = function (point) {
        var type = this instanceof Series ? this.seriesType : 'HighLowOpenClose';
        var yValues;
        switch (type) {
            case 'XY':
                this.setXYMinMax(point.yValue);
                this.yData.push(point.yValue);
                if (this instanceof Series && this.type === 'Bubble') {
                    this.sizeMax = Math.max(this.sizeMax, (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.size) || isNaN(+point.size)) ? this.sizeMax
                        : point.size);
                }
                return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.x) || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.y) || isNaN(+point.y));
            case 'HighLow':
                this.setHiloMinMax(point.high, point.low);
                return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.x) || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.low) || isNaN(+point.low)) ||
                    (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.high) || isNaN(+point.high));
            case 'HighLowOpenClose':
                this.setHiloMinMax(point.high, point.low);
                return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.x) || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.low) || isNaN(+point.low)) ||
                    (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.open) || isNaN(+point.open)) || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.close) || isNaN(+point.close))
                    || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(point.high) || isNaN(+point.high));
            case 'BoxPlot':
                yValues = (point.y || [null]).filter(function (value) {
                    return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && !isNaN(value);
                }).sort(function (a, b) {
                    return a - b;
                });
                point.y = yValues;
                this.yMin = Math.min(this.yMin, Math.min.apply(Math, yValues));
                this.yMax = Math.max(this.yMax, Math.max.apply(Math, yValues));
                return !yValues.length;
        }
    };
    /**
     * To get Y min max for the provided point seriesType XY
     */
    SeriesBase.prototype.setXYMinMax = function (yValue) {
        this.yMin = Math.min(this.yMin, (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(yValue) || isNaN(yValue)) ? this.yMin : yValue);
        this.yMax = Math.max(this.yMax, (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(yValue) || isNaN(yValue)) ? this.yMax : yValue);
    };
    /**
     * To get Y min max for the provided point seriesType XY
     */
    SeriesBase.prototype.setHiloMinMax = function (high, low) {
        this.yMin = Math.min(this.yMin, Math.min((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(low) || isNaN(low)) ? this.yMin : low, (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(high) || isNaN(high)) ? this.yMin : high));
        this.yMax = Math.max(this.yMax, Math.max((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(low) || isNaN(low)) ? this.yMax : low, (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(high) || isNaN(high)) ? this.yMax : high));
    };
    /**
     * Finds the type of the series
     * @private
     */
    SeriesBase.prototype.getSeriesType = function () {
        var type;
        if (this instanceof Series) {
            var seriesType = this.chart.chartAreaType === 'PolarRadar' ? this.drawType : this.type;
            if (seriesType) {
                switch (seriesType) {
                    case 'RangeColumn':
                    case 'RangeArea':
                    case 'Hilo':
                        type = 'HighLow';
                        break;
                    case 'HiloOpenClose':
                    case 'Candle':
                        type = 'HighLowOpenClose';
                        break;
                    case 'BoxAndWhisker':
                        type = 'BoxPlot';
                        break;
                    default:
                        type = 'XY';
                }
            }
        }
        this.seriesType = type;
    };
    /** @private */
    SeriesBase.prototype.pushCategoryData = function (point, index, pointX) {
        if (!this.xAxis.isIndexed) {
            if (this.xAxis.labels.indexOf(pointX) < 0) {
                this.xAxis.labels.push(pointX);
            }
            point.xValue = this.xAxis.labels.indexOf(pointX);
        }
        else {
            this.xAxis.labels[index] ? this.xAxis.labels[index] += ', ' + pointX :
                this.xAxis.labels.push(pointX);
            point.xValue = index;
        }
    };
    /**
     * To find average of given property
     */
    SeriesBase.prototype.getAverage = function (member, i, data) {
        if (data === void 0) { data = this.currentViewData; }
        var previous = data[i - 1] ? (data[i - 1][member] || 0) : 0;
        var next = data[i + 1] ? (data[i + 1][member] || 0) : 0;
        return (previous + next) / 2;
    };
    /**
     * To find the control points for spline.
     * @return {void}
     * @private
     */
    SeriesBase.prototype.refreshDataManager = function (chart) {
        var _this = this;
        this.chart = chart;
        var dateSource = this.dataSource || chart.dataSource;
        if (!(dateSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"]) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.query)) {
            this.dataManagerSuccess({ result: dateSource, count: dateSource.length }, chart, false);
            return;
        }
        var dataManager = this.dataModule.getData(this.dataModule.generateQuery().requiresCount());
        dataManager.then(function (e) { return _this.dataManagerSuccess(e, chart); });
    };
    SeriesBase.prototype.dataManagerSuccess = function (e, chart, isRemoteData) {
        if (isRemoteData === void 0) { isRemoteData = true; }
        this.currentViewData = e.result !== '' ? e.result : [];
        if (this instanceof Series) {
            var argsData = {
                name: _common_model_constants__WEBPACK_IMPORTED_MODULE_5__["seriesRender"], series: this, data: this.currentViewData, fill: this.interior
            };
            this.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_5__["seriesRender"], argsData);
            this.interior = argsData.fill;
            this.currentViewData = argsData.data;
        }
        this.processJsonData();
        this.recordsCount = e.count;
        this.refreshChart(isRemoteData);
        if (chart.stockChart) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(chart.stockChart.blazorDataSource[this.index])) {
                chart.stockChart.blazorDataSource.splice(this.index, 0, this.currentViewData);
            }
        }
        this.currentViewData = null;
    };
    SeriesBase.prototype.refreshChart = function (isRemoteData) {
        var chart = this.chart;
        if (this instanceof Series) {
            chart.visibleSeriesCount += isRemoteData ? 1 : 0;
        }
        chart.refreshTechnicalIndicator(this);
        if (this instanceof Series && this.category !== 'TrendLine') {
            for (var _i = 0, _a = this.trendlines; _i < _a.length; _i++) {
                var trendline = _a[_i];
                trendline.setDataSource(this, chart);
            }
        }
        //if (chart.visibleSeries.length === (chart.visibleSeriesCount - chart.indicators.length)) {
        if (chart.visibleSeries.length === (chart.visibleSeriesCount)) {
            chart.refreshBound();
            chart.trigger('loaded', { chart: chart });
            if (this.chart.stockChart && this.chart.stockChart.initialRender) {
                this.chart.stockChart.stockChartDataManagerSuccess();
                this.chart.stockChart.initialRender = false;
            }
        }
        if (this instanceof Series) {
            chart.visibleSeriesCount += isRemoteData ? 0 : 1;
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesBase.prototype, "xName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesBase.prototype, "high", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesBase.prototype, "low", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesBase.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesBase.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesBase.prototype, "volume", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesBase.prototype, "pointColorMapping", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SeriesBase.prototype, "xAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SeriesBase.prototype, "yAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Animation"])
    ], SeriesBase.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SeriesBase.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SeriesBase.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], SeriesBase.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesBase.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], SeriesBase.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], ChartSegment)
    ], SeriesBase.prototype, "segments", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('X')
    ], SeriesBase.prototype, "segmentAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SeriesBase.prototype, "enableComplexProperty", void 0);
    return SeriesBase;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the series in charts.
 * @public
 */
var Series = /** @class */ (function (_super) {
    __extends(Series, _super);
    // tslint:disable-next-line:no-any
    function Series(parent, propName, defaultValue, isArray) {
        var _this = _super.call(this, parent, propName, defaultValue, isArray) || this;
        _this.visibleSeriesCount = 0;
        /** @private */
        _this.category = 'Series';
        /** @private */
        _this.isRectSeries = false;
        /** @private */
        _this.drawPoints = [];
        /** @private */
        _this.delayedAnimation = false;
        return _this;
    }
    /**
     * Refresh the axis label.
     * @return {boolean}
     * @private
     */
    Series.prototype.refreshAxisLabel = function () {
        if (this.xAxis.valueType !== 'Category') {
            return null;
        }
        this.xAxis.labels = [];
        for (var _i = 0, _a = this.xAxis.series; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.visible) {
                item.xMin = Infinity;
                item.xMax = -Infinity;
                for (var _b = 0, _c = item.points; _b < _c.length; _b++) {
                    var point = _c[_b];
                    item.pushCategoryData(point, point.index, point.x);
                    item.xMin = Math.min(item.xMin, point.xValue);
                    item.xMax = Math.max(item.xMax, point.xValue);
                }
            }
        }
    };
    /**
     * To get the series collection.
     * @return {void}
     * @private
     */
    Series.prototype.findSeriesCollection = function (column, row, isStack) {
        var seriesCollection = [];
        for (var _i = 0, _a = row.axes; _i < _a.length; _i++) {
            var rowAxis = _a[_i];
            for (var _b = 0, _c = rowAxis.series; _b < _c.length; _b++) {
                var rowSeries = _c[_b];
                for (var _d = 0, _e = column.axes; _d < _e.length; _d++) {
                    var axis = _e[_d];
                    for (var _f = 0, _g = axis.series; _f < _g.length; _f++) {
                        var series = _g[_f];
                        if (series === rowSeries && series.visible && this.rectSeriesInChart(series, isStack)) {
                            seriesCollection.push(series);
                        }
                    }
                }
            }
        }
        return seriesCollection;
    };
    /**
     * To get the column type series.
     * @return {void}
     * @private
     */
    Series.prototype.rectSeriesInChart = function (series, isStack) {
        var type = (series.type).toLowerCase();
        return (type.indexOf('column') !== -1 || type.indexOf('bar') !== -1 || type.indexOf('histogram') !== -1 ||
            type.indexOf('hiloopenclose') !== -1 || type.indexOf('candle') !== -1 || type.indexOf('pareto') !== -1 ||
            type.indexOf('hilo') !== -1 || series.drawType.indexOf('Column') !== -1 ||
            type.indexOf('waterfall') !== -1 || type.indexOf('boxandwhisker') !== -1 || isStack);
    };
    /**
     * To calculate the stacked values.
     * @return {void}
     * @private
     */
    Series.prototype.calculateStackedValue = function (isStacking100, chart) {
        var axisSeries;
        for (var _i = 0, _a = chart.columns; _i < _a.length; _i++) {
            var columnItem = _a[_i];
            for (var _b = 0, _c = chart.rows; _b < _c.length; _b++) {
                var item = _c[_b];
                this.calculateStackingValues(this.findSeriesCollection(columnItem, item, true), isStacking100);
            }
        }
    };
    Series.prototype.calculateStackingValues = function (seriesCollection, isStacking100) {
        var startValues;
        var endValues;
        var yValues = [];
        var lastPositive = [];
        var lastNegative = [];
        var stackingGroup;
        var lastValue;
        var value;
        var frequencies = [];
        if (isStacking100) {
            frequencies = this.findFrequencies(seriesCollection);
        }
        var stackingSeies = [];
        var stackedValues = [];
        for (var _i = 0, seriesCollection_1 = seriesCollection; _i < seriesCollection_1.length; _i++) {
            var series = seriesCollection_1[_i];
            if (series.type.indexOf('Stacking') !== -1 || (series.drawType.indexOf('Stacking') !== -1 &&
                (series.chart.chartAreaType === 'PolarRadar'))) {
                stackingGroup = (series.type.indexOf('StackingArea') !== -1) ? 'StackingArea100' : series.stackingGroup;
                if (!lastPositive[stackingGroup]) {
                    lastPositive[stackingGroup] = [];
                    lastNegative[stackingGroup] = [];
                }
                yValues = series.yData;
                startValues = [];
                endValues = [];
                stackingSeies.push(series);
                for (var j = 0, pointsLength = series.points.length; j < pointsLength; j++) {
                    lastValue = 0;
                    value = +yValues[j]; // Fix for chart not rendering while y value is given as string issue
                    if (lastPositive[stackingGroup][series.points[j].xValue] === undefined) {
                        lastPositive[stackingGroup][series.points[j].xValue] = 0;
                    }
                    if (lastNegative[stackingGroup][series.points[j].xValue] === undefined) {
                        lastNegative[stackingGroup][series.points[j].xValue] = 0;
                    }
                    if (isStacking100) {
                        value = value / frequencies[stackingGroup][series.points[j].xValue] * 100;
                        value = !isNaN(value) ? value : 0;
                        series.points[j].percentage = +(value.toFixed(2));
                    }
                    else {
                        stackedValues[j] = stackedValues[j] ? stackedValues[j] + Math.abs(value) : Math.abs(value);
                    }
                    if (value >= 0) {
                        lastValue = lastPositive[stackingGroup][series.points[j].xValue];
                        lastPositive[stackingGroup][series.points[j].xValue] += value;
                    }
                    else {
                        lastValue = lastNegative[stackingGroup][series.points[j].xValue];
                        lastNegative[stackingGroup][series.points[j].xValue] += value;
                    }
                    startValues.push(lastValue);
                    endValues.push(value + lastValue);
                    if (isStacking100 && (endValues[j] > 100)) {
                        endValues[j] = 100;
                    }
                }
                series.stackedValues = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["StackValues"](startValues, endValues);
                series.yMin = Math.min.apply(0, startValues);
                series.yMax = Math.max.apply(0, endValues);
                if (series.yMin > Math.min.apply(0, endValues)) {
                    series.yMin = (isStacking100) ? -100 : Math.min.apply(0, endValues);
                }
                if (series.yMax < Math.max.apply(0, startValues)) {
                    series.yMax = 0;
                }
            }
        }
        this.findPercentageOfStacking(stackingSeies, stackedValues, isStacking100);
    };
    Series.prototype.findPercentageOfStacking = function (stackingSeies, values, isStacking100) {
        for (var _i = 0, stackingSeies_1 = stackingSeies; _i < stackingSeies_1.length; _i++) {
            var item = stackingSeies_1[_i];
            if (isStacking100) {
                return null;
            }
            for (var _a = 0, _b = item.points; _a < _b.length; _a++) {
                var point = _b[_a];
                point.percentage = Math.abs(+(point.y / values[point.index] * 100).toFixed(2));
            }
        }
    };
    Series.prototype.findFrequencies = function (seriesCollection) {
        var frequencies = [];
        var stackingGroup;
        for (var _i = 0, seriesCollection_2 = seriesCollection; _i < seriesCollection_2.length; _i++) {
            var series = seriesCollection_2[_i];
            series.yAxis.isStack100 = series.type.indexOf('100') !== -1 ? true : false;
            if (series.type.indexOf('Stacking') !== -1) {
                stackingGroup = (series.type.indexOf('StackingArea') !== -1) ? 'StackingArea100' : series.stackingGroup;
                if (!frequencies[stackingGroup]) {
                    frequencies[stackingGroup] = [];
                }
                for (var j = 0, pointsLength = series.points.length; j < pointsLength; j++) {
                    if (frequencies[stackingGroup][series.points[j].xValue] === undefined) {
                        frequencies[stackingGroup][series.points[j].xValue] = 0;
                    }
                    if (series.yData[j] > 0) {
                        frequencies[stackingGroup][series.points[j].xValue] += series.yData[j];
                    }
                    else {
                        frequencies[stackingGroup][series.points[j].xValue] -= series.yData[j];
                    }
                }
            }
        }
        return frequencies;
    };
    /* private dataManagerFailure(e: { result: Object[] }): void {
         this.currentViewData = [];
         this.refreshChart();
     }*/
    /** @private */
    Series.prototype.renderSeries = function (chart) {
        var seriesType = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["firstToLowerCase"])(this.type);
        seriesType = seriesType.replace('100', '');
        if (chart[seriesType + 'SeriesModule']) {
            if (this.category !== 'Indicator' && this.category !== 'TrendLine') {
                this.createSeriesElements(chart);
            }
            chart[seriesType + 'SeriesModule'].render(this, this.xAxis, this.yAxis, chart.requireInvertedAxis);
            if (this.category !== 'Indicator') {
                if (this.errorBar.visible) {
                    this.chart.errorBarModule.render(this);
                }
                if (this.marker.dataLabel.visible) {
                    chart.dataLabelModule.render(this, this.chart, this.marker.dataLabel);
                }
                this.appendSeriesElement(chart.seriesElements, chart);
            }
            if (!this.chart.enableCanvas) {
                this.performAnimation(chart, seriesType, this.errorBar, this.marker, this.marker.dataLabel);
            }
        }
    };
    /**
     * To create seris element.
     * @return {void}
     * @private
     */
    Series.prototype.createSeriesElements = function (chart) {
        if (this.category !== 'Indicator') {
            var elementId = chart.element.id;
            // 8 for extend border value 5 for extend size value
            var explodeValue = this.marker.border.width + 8 + 5;
            var render = (this.type === 'Scatter' || this.type === 'Bubble') ?
                chart.svgRenderer : chart.renderer;
            var index = this.index === undefined ? this.category : this.index;
            var markerHeight = (this.type === 'Scatter') ? (this.marker.height + explodeValue) / 2 : 0;
            var markerWidth = (this.type === 'Scatter') ? (this.marker.width + explodeValue) / 2 : 0;
            var options = void 0;
            if (chart.chartAreaType === 'PolarRadar') {
                var markerMaxValue = (this.drawType === 'Scatter') ? Math.max(this.marker.width, this.marker.height) : 0;
                options = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["CircleOption"](elementId + '_ChartSeriesClipRect_' + index, 'transparent', { width: 1, color: 'Gray' }, 1, this.clipRect.width / 2 + this.clipRect.x, this.clipRect.height / 2 + this.clipRect.y, chart.radius + markerMaxValue);
                this.clipRectElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendClipElement"])(chart.redraw, options, render, 'drawCircularClipPath');
            }
            else {
                options = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](elementId + '_ChartSeriesClipRect_' + index, 'transparent', { width: 1, color: 'Gray' }, 1, {
                    x: -markerWidth, y: -markerHeight,
                    width: this.clipRect.width + markerWidth * 2,
                    height: this.clipRect.height + markerHeight * 2
                });
                this.clipRectElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendClipElement"])(chart.redraw, options, render);
            }
            var transform = void 0;
            transform = chart.chartAreaType === 'Cartesian' ? 'translate(' + this.clipRect.x + ',' + (this.clipRect.y) + ')' : '';
            this.symbolElement = null;
            this.seriesElement = render.createGroup({
                'id': elementId + 'SeriesGroup' + index,
                'transform': transform,
                'clip-path': 'url(#' + elementId + '_ChartSeriesClipRect_' + index + ')'
            });
            if (!this.chart.enableCanvas || this.type === 'Scatter' || this.type === 'Bubble') {
                this.seriesElement.appendChild(this.clipRectElement);
            }
        }
    };
    /**
     * To append the series.
     * @return {void}
     * @private
     */
    Series.prototype.appendSeriesElement = function (element, chart) {
        var marker = this.marker;
        var dataLabel = marker.dataLabel;
        var redraw = chart.redraw;
        if (this.category !== 'TrendLine') {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(chart.enableCanvas, chart.seriesElements, this.seriesElement, redraw);
            var errorBar = this.errorBar;
            if (errorBar.visible) {
                if (chart.chartAreaType === 'PolarRadar') {
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(chart.enableCanvas, chart.seriesElements, this.seriesElement, redraw);
                }
                else {
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(chart.enableCanvas, chart.seriesElements, this.errorBarElement, redraw);
                }
            }
            if (this.type === 'Scatter' || this.type === 'Bubble') {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(false, chart.seriesElements, this.seriesElement, redraw);
            }
        }
        if (marker.visible && (chart.chartAreaType === 'Cartesian' ||
            ((this.drawType !== 'Scatter') && chart.chartAreaType === 'PolarRadar')) && this.type !== 'Scatter' &&
            this.type !== 'Bubble' && this.type !== 'Candle' && this.type !== 'Hilo' && this.type !== 'HiloOpenClose') {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(chart.enableCanvas, chart.seriesElements, this.symbolElement, redraw);
        }
        if (dataLabel.visible) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(chart.enableCanvas, chart.dataLabelElements, this.shapeElement, redraw);
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["appendChildElement"])(chart.enableCanvas, chart.dataLabelElements, this.textElement, redraw);
        }
        if (!chart.enableCanvas && chart.dataLabelElements.hasChildNodes()) {
            chart.seriesElements.appendChild(chart.dataLabelElements);
        }
    };
    /**
     * To perform animation for chart series.
     * @return {void}
     * @private
     */
    Series.prototype.performAnimation = function (chart, type, errorBar, marker, dataLabel) {
        if (this.animation.enable && chart.animateSeries) {
            chart[type + 'SeriesModule'].doAnimation(this);
            if (errorBar.visible) {
                chart.errorBarModule.doErrorBarAnimation(this);
            }
            if (marker.visible) {
                chart.markerRender.doMarkerAnimation(this);
            }
            //to datalabel animation disabled for edge and IE
            if (dataLabel.visible && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name !== 'edge' && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE) {
                chart.dataLabelModule.doDataLabelAnimation(this);
            }
        }
    };
    /**
     * To set border color for empty point
     * @private
     */
    Series.prototype.setPointColor = function (point, color) {
        color = point.interior || color;
        return point.isEmpty ? (this.emptyPointSettings.fill || color) : color;
    };
    /**
     * To set border color for empty point
     * @private
     */
    Series.prototype.setBorderColor = function (point, border) {
        border.width = point.isEmpty ? (this.emptyPointSettings.border.width || border.width) : border.width;
        border.color = point.isEmpty ? (this.emptyPointSettings.border.color || border.color) : border.color;
        return border;
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Series.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Series.prototype, "yName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Line')
    ], Series.prototype, "drawType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Series.prototype, "isClosed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#2ecd71')
    ], Series.prototype, "bearFillColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#e74c3d')
    ], Series.prototype, "bullFillColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Series.prototype, "enableSolidCandles", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Series.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Series.prototype, "binInterval", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Series.prototype, "showNormalDistribution", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Series.prototype, "stackingGroup", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Series.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'transparent', width: 0 }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Border"])
    ], Series.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Series.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Series.prototype, "zOrder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Line')
    ], Series.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, ErrorBarSettings)
    ], Series.prototype, "errorBar", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, MarkerSettings)
    ], Series.prototype, "marker", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["DragSettings"])
    ], Series.prototype, "dragSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], Trendline)
    ], Series.prototype, "trendlines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Series.prototype, "enableTooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Series.prototype, "tooltipMappingName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SeriesType')
    ], Series.prototype, "legendShape", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Series.prototype, "selectionStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Series.prototype, "minRadius", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], Series.prototype, "maxRadius", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Natural')
    ], Series.prototype, "splineType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0.5)
    ], Series.prototype, "cardinalSplineTension", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["EmptyPointSettings"])
    ], Series.prototype, "emptyPointSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Series.prototype, "showMean", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Normal')
    ], Series.prototype, "boxPlotMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Series.prototype, "columnWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Series.prototype, "columnSpacing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#C64E4A')
    ], Series.prototype, "negativeFillColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#4E81BC')
    ], Series.prototype, "summaryFillColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Series.prototype, "intermediateSumIndexes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Series.prototype, "sumIndexes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'black', width: 2 }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Connector"])
    ], Series.prototype, "connector", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["CornerRadius"])
    ], Series.prototype, "cornerRadius", void 0);
    return Series;
}(SeriesBase));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js ***!
  \*****************************************************************************/
/*! exports provided: ColumnBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnBase", function() { return ColumnBase; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _utils_double_range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/double-range */ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/double-range.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");






/**
 * Column Series Base
 */
var ColumnBase = /** @class */ (function () {
    function ColumnBase() {
    }
    /**
     * To get the position of the column series.
     * @return {DoubleRange}
     * @private
     */
    ColumnBase.prototype.getSideBySideInfo = function (series) {
        if (series.chart.enableSideBySidePlacement && !series.position) {
            this.getSideBySidePositions(series);
        }
        var position = !series.chart.enableSideBySidePlacement ? 0 : series.position;
        var rectCount = !series.chart.enableSideBySidePlacement ? 1 : series.rectCount;
        series.isRectSeries = true;
        var visibleSeries = series.chart.visibleSeries;
        var seriesSpacing = series.chart.enableSideBySidePlacement ? series.columnSpacing : 0; // Column Spacing
        var pointSpacing = (series.columnWidth === null) ? ((series.type === 'Histogram') ? 1 : 0.7) :
            series.columnWidth; // Column width
        var minimumPointDelta = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getMinPointsDelta"])(series.xAxis, visibleSeries);
        var width = minimumPointDelta * pointSpacing;
        var radius;
        var location = (position) / rectCount - 0.5;
        var doubleRange = new _utils_double_range__WEBPACK_IMPORTED_MODULE_1__["DoubleRange"](location, location + (1 / rectCount));
        if (!(isNaN(doubleRange.start) || isNaN(doubleRange.end))) {
            doubleRange = new _utils_double_range__WEBPACK_IMPORTED_MODULE_1__["DoubleRange"](doubleRange.start * width, doubleRange.end * width);
            radius = seriesSpacing * doubleRange.delta;
            doubleRange = new _utils_double_range__WEBPACK_IMPORTED_MODULE_1__["DoubleRange"](doubleRange.start + radius / 2, doubleRange.end - radius / 2);
        }
        return doubleRange;
    };
    /**
     * To get the rect values.
     * @return {Rect}
     * @private
     */
    ColumnBase.prototype.getRectangle = function (x1, y1, x2, y2, series) {
        var point1 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getPoint"])(x1, y1, series.xAxis, series.yAxis, series.chart.requireInvertedAxis);
        var point2 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getPoint"])(x2, y2, series.xAxis, series.yAxis, series.chart.requireInvertedAxis);
        return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Rect"](Math.min(point1.x, point2.x), Math.min(point1.y, point2.y), Math.abs(point2.x - point1.x), Math.abs(point2.y - point1.y));
    };
    /**
     * To get the position of each series.
     * @return {void}
     * @private
     */
    ColumnBase.prototype.getSideBySidePositions = function (series) {
        var chart = series.chart;
        for (var _i = 0, _a = chart.columns; _i < _a.length; _i++) {
            var columnItem = _a[_i];
            for (var _b = 0, _c = chart.rows; _b < _c.length; _b++) {
                var item = _c[_b];
                this.findRectPosition(series.findSeriesCollection(columnItem, item, false));
            }
        }
    };
    ColumnBase.prototype.findRectPosition = function (seriesCollection) {
        var stackingGroup = [];
        var vSeries = { rectCount: 0, position: null };
        seriesCollection.forEach(function (value) {
            if (value.type.indexOf('Stacking') !== -1) {
                if (value.stackingGroup) {
                    if (stackingGroup[value.stackingGroup] === undefined) {
                        value.position = vSeries.rectCount;
                        stackingGroup[value.stackingGroup] = vSeries.rectCount++;
                    }
                    else {
                        value.position = stackingGroup[value.stackingGroup];
                    }
                }
                else {
                    if (vSeries.position === null) {
                        value.position = vSeries.rectCount;
                        vSeries.position = vSeries.rectCount++;
                    }
                    else {
                        value.position = vSeries.position;
                    }
                }
            }
            else {
                value.position = vSeries.rectCount++;
            }
        });
        seriesCollection.forEach(function (value) {
            value.rectCount = vSeries.rectCount;
        });
    };
    /**
     * Updates the symbollocation for points
     * @return void
     * @private
     */
    ColumnBase.prototype.updateSymbolLocation = function (point, rect, series) {
        if (!series.chart.requireInvertedAxis) {
            this.updateXRegion(point, rect, series);
        }
        else {
            this.updateYRegion(point, rect, series);
        }
        if (series.type === 'Histogram') {
            point.minimum = +point.x - series.histogramValues.binWidth / 2;
            point.maximum = +point.x + series.histogramValues.binWidth / 2;
        }
    };
    /**
     * Update the region for the point.
     * @return {void}
     * @private
     */
    ColumnBase.prototype.updateXRegion = function (point, rect, series) {
        point.regions.push(rect);
        point.symbolLocations.push({
            x: rect.x + (rect.width) / 2,
            y: (series.seriesType === 'BoxPlot' || series.seriesType.indexOf('HighLow') !== -1 ||
                (point.yValue >= 0 === !series.yAxis.isInversed)) ? rect.y : (rect.y + rect.height)
        });
        if (series.type === 'RangeColumn') {
            point.symbolLocations.push({
                x: rect.x + (rect.width) / 2,
                y: rect.y + rect.height
            });
        }
    };
    /**
     * Update the region for the point in bar series.
     * @return {void}
     * @private
     */
    ColumnBase.prototype.updateYRegion = function (point, rect, series) {
        point.regions.push(rect);
        point.symbolLocations.push({
            x: (series.seriesType === 'BoxPlot' || series.seriesType.indexOf('HighLow') !== -1 ||
                (point.yValue >= 0 === !series.yAxis.isInversed)) ? rect.x + rect.width : rect.x,
            y: rect.y + rect.height / 2
        });
        if (series.type === 'RangeColumn') {
            point.symbolLocations.push({
                x: rect.x,
                y: rect.y + rect.height / 2
            });
        }
    };
    /**
     * To render the marker for the series.
     * @return {void}
     * @private
     */
    ColumnBase.prototype.renderMarker = function (series) {
        if (series.marker && series.marker.visible) {
            series.chart.markerRender.render(series);
        }
    };
    /**
     * To trigger the point rendering event.
     * @return {void}
     * @private
     */
    ColumnBase.prototype.triggerEvent = function (series, point, fill, border) {
        var argsData = {
            cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["pointRender"], series: series, point: point,
            fill: series.setPointColor(point, fill),
            border: series.setBorderColor(point, border)
        };
        series.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["pointRender"], argsData);
        point.color = argsData.fill;
        return argsData;
    };
    /**
     * To draw the rectangle for points.
     * @return {void}
     * @private
     */
    ColumnBase.prototype.drawRectangle = function (series, point, rect, argsData) {
        var chart = series.chart;
        var check = chart.requireInvertedAxis ? rect.height : rect.width;
        if (check <= 0) {
            return null;
        }
        var direction = this.calculateRoundedRectPath(rect, series.cornerRadius.topLeft, series.cornerRadius.topRight, series.cornerRadius.bottomLeft, series.cornerRadius.bottomRight);
        var name = series.category === 'Indicator' ? chart.element.id + '_Indicator_' + series.index + '_' + series.name +
            '_Point_' + point.index : chart.element.id + '_Series_' + series.index + '_Point_' + point.index;
        var previousElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["redrawElement"])(chart.redraw, name);
        var previousDirection = previousElement ? previousElement.getAttribute('d') : '';
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](name, argsData.fill, argsData.border.width, argsData.border.color, series.opacity, series.dashArray, direction);
        var element = chart.renderer.drawPath(options, new Int32Array([series.clipRect.x, series.clipRect.y]));
        switch (series.seriesType) {
            case 'XY':
                element.setAttribute('aria-label', point.x.toString() + ':' + point.yValue.toString());
                break;
            case 'HighLow':
                element.setAttribute('aria-label', point.x.toString() + ':' + point.high.toString() + ':' + point.low.toString());
                break;
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendChildElement"])(series.chart.enableCanvas, series.seriesElement, element, chart.redraw);
        if (!series.chart.enableCanvas) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["pathAnimation"])(element, direction, chart.redraw, previousDirection, chart.duration);
        }
    };
    /**
     * To animate the series.
     * @return {void}
     * @private
     */
    ColumnBase.prototype.animate = function (series) {
        var rectElements = series.seriesElement.childNodes;
        var count = series.category === 'Indicator' ? 0 : 1;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            if (!point.symbolLocations.length && !(series.type === 'BoxAndWhisker' && point.regions.length)) {
                continue;
            }
            this.animateRect(rectElements[count], series, point);
            count++;
        }
    };
    /**
     * To animate the series.
     * @return {void}
     * @private
     */
    ColumnBase.prototype.animateRect = function (element, series, point) {
        var option = series.animation;
        var duration = series.chart.animated ? series.chart.duration : option.duration;
        var effect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getAnimationFunction"])('Linear');
        var isPlot = point.yValue < 0;
        var x;
        var y;
        var elementHeight = +point.regions[0].height;
        var elementWidth = +point.regions[0].width;
        var centerX;
        var centerY;
        if (!series.chart.requireInvertedAxis) {
            x = +point.regions[0].x;
            if (series.type.indexOf('Stacking') > -1) {
                y = (1 - Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(0, series.yAxis)) * (series.yAxis.rect.height);
                centerX = x;
                centerY = y;
            }
            else {
                y = +point.regions[0].y;
                centerY = (series.seriesType.indexOf('HighLow') !== -1 || series.type.indexOf('Waterfall') !== -1) ? y + elementHeight / 2 :
                    (isPlot !== series.yAxis.isInversed) ? y : y + elementHeight;
                centerX = isPlot ? x : x + elementWidth;
            }
        }
        else {
            y = +point.regions[0].y;
            if (series.type.indexOf('Stacking') > -1) {
                x = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["valueToCoefficient"])(0, series.yAxis)) * series.yAxis.rect.width;
                centerX = x;
                centerY = y;
            }
            else {
                x = +point.regions[0].x;
                centerY = isPlot ? y : y + elementHeight;
                centerX = (series.seriesType.indexOf('HighLow') !== -1 || series.type.indexOf('Waterfall') !== -1) ? x + elementWidth / 2 :
                    (isPlot !== series.yAxis.isInversed) ? x + elementWidth : x;
            }
        }
        var value;
        element.style.visibility = 'hidden';
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(element, {
            duration: duration,
            delay: option.delay,
            progress: function (args) {
                if (args.timeStamp >= args.delay) {
                    element.style.visibility = 'visible';
                    if (!series.chart.requireInvertedAxis) {
                        elementHeight = elementHeight ? elementHeight : 1;
                        value = effect(args.timeStamp - args.delay, 0, elementHeight, args.duration);
                        element.setAttribute('transform', 'translate(' + centerX + ' ' + centerY +
                            ') scale(1,' + (value / elementHeight) + ') translate(' + (-centerX) + ' ' + (-centerY) + ')');
                    }
                    else {
                        elementWidth = elementWidth ? elementWidth : 1;
                        value = effect(args.timeStamp - args.delay, 0, elementWidth, args.duration);
                        element.setAttribute('transform', 'translate(' + centerX + ' ' + centerY +
                            ') scale(' + (value / elementWidth) + ', 1) translate(' + (-centerX) + ' ' + (-centerY) + ')');
                    }
                }
            },
            end: function (model) {
                element.setAttribute('transform', 'translate(0,0)');
                var seriesElement = series.seriesElement;
                if (element === seriesElement.lastElementChild || point.index === series.points.length - 1 ||
                    (series.type === 'Waterfall' && element === seriesElement.children[seriesElement.childElementCount - 2])) {
                    series.chart.trigger('animationComplete', { series: series.chart.isBlazor ? {} : series });
                    if (series.type === 'Waterfall') {
                        var rectElements = seriesElement.childNodes;
                        for (var i = 0; i < rectElements.length; i++) {
                            if (rectElements[i].id.indexOf('Connector') !== -1) {
                                rectElements[i].style.visibility = 'visible';
                                rectElements[i].setAttribute('transform', 'translate(0,0)');
                            }
                        }
                    }
                }
            }
        });
    };
    /**
     * To get rounded rect path direction
     */
    ColumnBase.prototype.calculateRoundedRectPath = function (rect, topLeft, topRight, bottomLeft, bottomRight) {
        return 'M' + ' ' + rect.x + ' ' + (topLeft + rect.y) +
            ' Q ' + rect.x + ' ' + rect.y + ' ' + (rect.x + topLeft) + ' ' +
            rect.y + ' ' + 'L' + ' ' + (rect.x + rect.width - topRight) + ' ' + rect.y +
            ' Q ' + (rect.x + rect.width) + ' ' + rect.y + ' ' +
            (rect.x + rect.width) + ' ' + (rect.y + topRight) + ' ' + 'L ' +
            (rect.x + rect.width) + ' ' + (rect.y + rect.height - bottomRight)
            + ' Q ' + (rect.x + rect.width) + ' ' + (rect.y + rect.height) + ' ' + (rect.x + rect.width - bottomRight) + ' ' +
            (rect.y + rect.height) + ' ' + 'L ' + (rect.x + bottomLeft) + ' ' + (rect.y + rect.height) + ' Q ' + rect.x + ' ' +
            (rect.y + rect.height) + ' ' + rect.x + ' ' + (rect.y + rect.height - bottomLeft) + ' ' + 'L' + ' ' + rect.x + ' ' +
            (topLeft + rect.y) + ' ' + 'Z';
    };
    return ColumnBase;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-series.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/column-series.js ***!
  \*******************************************************************************/
/*! exports provided: ColumnSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnSeries", function() { return ColumnSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `ColumnSeries` Module used to render the column series.
 */
var ColumnSeries = /** @class */ (function (_super) {
    __extends(ColumnSeries, _super);
    function ColumnSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Column series.
     * @return {void}
     * @private
     */
    ColumnSeries.prototype.render = function (series) {
        var rect;
        var sideBySideInfo = this.getSideBySideInfo(series);
        var origin = Math.max(series.yAxis.visibleRange.min, 0);
        var argsData;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var pointColumn = _a[_i];
            pointColumn.symbolLocations = [];
            pointColumn.regions = [];
            if (pointColumn.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[pointColumn.index - 1], pointColumn, series.points[pointColumn.index + 1], series)) {
                rect = this.getRectangle(pointColumn.xValue + sideBySideInfo.start, pointColumn.yValue, pointColumn.xValue + sideBySideInfo.end, origin, series);
                var color = series.category === 'Indicator' ? pointColumn.color : series.interior;
                argsData = this.triggerEvent(series, pointColumn, color, { width: series.border.width, color: series.border.color });
                if (!argsData.cancel) {
                    this.updateSymbolLocation(pointColumn, rect, series);
                    this.drawRectangle(series, pointColumn, rect, argsData);
                }
            }
        }
        this.renderMarker(series);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    ColumnSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * Get module name.
     */
    ColumnSeries.prototype.getModuleName = function () {
        return 'ColumnSeries';
        /**
         * return the module name
         */
    };
    /**
     * To destroy the column series.
     * @return {void}
     * @private
     */
    ColumnSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return ColumnSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_1__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/data-label.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/data-label.js ***!
  \****************************************************************************/
/*! exports provided: DataLabel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataLabel", function() { return DataLabel; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");








/**
 * `DataLabel` module is used to render data label for the data point.
 */
var DataLabel = /** @class */ (function () {
    /**
     * Constructor for the data label module.
     * @private
     */
    function DataLabel(chart) {
        this.errorHeight = 0;
        this.chart = chart;
    }
    DataLabel.prototype.initPrivateVariables = function (series, marker) {
        var transform;
        var render = series.chart.renderer;
        var index = (series.index === undefined) ? series.category : series.index;
        transform = series.chart.chartAreaType === 'Cartesian' ? 'translate(' + series.clipRect.x + ',' + (series.clipRect.y) + ')' : '';
        if (marker.dataLabel.visible) {
            series.shapeElement = render.createGroup({
                'id': this.chart.element.id + 'ShapeGroup' + index,
                'transform': transform,
                'clip-path': 'url(#' + this.chart.element.id + '_ChartSeriesClipRect_' + index + ')'
            });
            series.textElement = render.createGroup({
                'id': this.chart.element.id + 'TextGroup' + index,
                'transform': transform,
                'clip-path': 'url(#' + this.chart.element.id + '_ChartSeriesClipRect_' + index + ')'
            });
        }
        this.markerHeight = ((series.type === 'Scatter' || marker.visible)) ? (marker.height / 2) : 0;
        this.commonId = this.chart.element.id + '_Series_' + index + '_Point_';
        this.calculateErrorHeight(series, series.marker.dataLabel.position);
        this.chartBackground = this.chart.chartArea.background === 'trasparent' ?
            this.chart.background || this.chart.themeStyle.background : this.chart.chartArea.background;
    };
    DataLabel.prototype.calculateErrorHeight = function (series, position) {
        if (!series.errorBar.visible) {
            return null;
        }
        else if (series.errorBar.visible && this.chart.chartAreaType !== 'PolarRadar') {
            var direction = series.errorBar.direction;
            var positiveHeight = this.chart.errorBarModule.positiveHeight;
            var negativeHeight = this.chart.errorBarModule.negativeHeight;
            if (this.isRectSeries(series)) {
                if (position === 'Top' || position === 'Auto') {
                    if (direction === 'Both' || direction === 'Minus') {
                        this.errorHeight = negativeHeight;
                    }
                    else {
                        this.errorHeight = 0;
                    }
                }
                if (position === 'Outer' || position === 'Auto') {
                    if (direction === 'Both' || direction === 'Plus') {
                        this.errorHeight = positiveHeight;
                    }
                    else {
                        this.errorHeight = 0;
                    }
                }
            }
            else {
                if (position === 'Top' || position === 'Outer' || position === 'Auto') {
                    if ((direction === 'Both' || direction === 'Plus') && (!series.chart.isTransposed)) {
                        this.errorHeight = positiveHeight;
                    }
                    else {
                        this.errorHeight = 0;
                    }
                }
                if (position === 'Bottom' || position === 'Auto') {
                    if (direction === 'Both' || direction === 'Minus') {
                        this.errorHeight = negativeHeight;
                    }
                    else {
                        this.errorHeight = 0;
                    }
                }
            }
        }
        else {
            this.errorHeight = 0;
        }
    };
    DataLabel.prototype.isRectSeries = function (series) {
        return series.isRectSeries || series.type === 'RangeArea';
    };
    /**
     * Render the data label for series.
     * @return {void}
     */
    DataLabel.prototype.render = function (series, chart, dataLabel) {
        var _this = this;
        // initialize the private variable
        this.initPrivateVariables(series, series.marker);
        var rect;
        var rgbValue;
        var contrast;
        var argsData;
        var border;
        var textSize;
        this.inverted = chart.requireInvertedAxis;
        this.yAxisInversed = series.yAxis.isInversed;
        var redraw = chart.redraw;
        var templateId = chart.element.id + '_Series_' +
            (series.index === undefined ? series.category : series.index) + '_DataLabelCollections';
        var element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["createElement"])('div', {
            id: templateId
        });
        // Data label point iteration started
        series.points.map(function (point, index) {
            _this.margin = dataLabel.margin;
            var labelText = [];
            var labelLength;
            var clip = series.clipRect;
            var shapeRect;
            border = { width: dataLabel.border.width, color: dataLabel.border.color };
            var argsFont = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["extend"])({}, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["getValue"])('properties', dataLabel.font), null, true));
            if ((point.symbolLocations.length && point.symbolLocations[0]) ||
                (series.type === 'BoxAndWhisker' && point.regions.length)) {
                labelText = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getLabelText"])(point, series, chart);
                labelLength = labelText.length;
                for (var i = 0; i < labelLength; i++) {
                    argsData = {
                        cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_2__["textRender"], series: series,
                        point: point, text: labelText[i], border: border,
                        color: dataLabel.fill, template: dataLabel.template, font: argsFont
                    };
                    chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_2__["textRender"], argsData);
                    if (!argsData.cancel) {
                        _this.fontBackground = argsData.color;
                        _this.isDataLabelShape(argsData);
                        _this.markerHeight = series.type === 'Bubble' ? (point.regions[0].height / 2) : _this.markerHeight;
                        if (argsData.template !== null) {
                            _this.createDataLabelTemplate(element, series, dataLabel, point, argsData, i, redraw);
                        }
                        else {
                            textSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["measureText"])(argsData.text, dataLabel.font);
                            rect = _this.calculateTextPosition(point, series, textSize, dataLabel, i);
                            if (!Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["isCollide"])(rect, chart.dataLabelCollections, clip)) {
                                chart.dataLabelCollections.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](rect.x + clip.x, rect.y + clip.y, rect.width, rect.height));
                                if (_this.isShape) {
                                    shapeRect = chart.renderer.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["RectOption"](_this.commonId + index + '_TextShape_' + i, argsData.color, argsData.border, dataLabel.opacity, rect, dataLabel.rx, dataLabel.ry), new Int32Array([clip.x, clip.y]));
                                    if (series.shapeElement) {
                                        series.shapeElement.appendChild(shapeRect);
                                    }
                                }
                                // Checking the font color
                                rgbValue = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["convertHexToColor"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["colorNameToHex"])(_this.fontBackground));
                                contrast = Math.round((rgbValue.r * 299 + rgbValue.g * 587 + rgbValue.b * 114) / 1000);
                                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["textElement"])(chart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["TextOption"](_this.commonId + index + '_Text_' + i, rect.x + _this.margin.left + textSize.width / 2, rect.y + _this.margin.top + textSize.height * 3 / 4, 'middle', argsData.text, 'rotate(0,' + (rect.x) + ',' + (rect.y) + ')', 'auto'), argsData.font, argsData.font.color ||
                                    ((contrast >= 128 || series.type === 'Hilo') ? 'black' : 'white'), series.textElement, false, redraw, true, false, series.chart.duration, series.clipRect);
                            }
                        }
                    }
                }
            }
        });
        if (element.childElementCount) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(chart.enableCanvas, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(chart.element.id + '_Secondary_Element'), element, chart.redraw, false, 'x', 'y', null, '', false, false, null, chart.duration);
        }
    };
    /**
     * Render the data label template.
     * @return {void}
     * @private
     */
    DataLabel.prototype.createDataLabelTemplate = function (parentElement, series, dataLabel, point, data, labelIndex, redraw) {
        this.margin = { left: 0, right: 0, bottom: 0, top: 0 };
        var clip = series.clipRect;
        var childElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["createTemplate"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["createElement"])('div', {
            id: this.chart.element.id + '_Series_' + (series.index === undefined ? series.category : series.index) + '_DataLabel_'
                + point.index + (labelIndex ? ('_' + labelIndex) : ''),
            styles: 'position: absolute;background-color:' + data.color + ';' +
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getFontStyle"])(dataLabel.font) + ';border:' + data.border.width + 'px solid ' + data.border.color + ';'
        }), point.index, data.template, this.chart, point, series);
        var elementRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureElementRect"])(childElement, redraw);
        var rect = this.calculateTextPosition(point, series, { width: elementRect.width, height: elementRect.height }, dataLabel, labelIndex);
        childElement.style.left = ((this.chart.chartAreaType === 'PolarRadar' ? 0 : series.clipRect.x) + rect.x) + 'px';
        childElement.style.top = ((this.chart.chartAreaType === 'PolarRadar' ? 0 : series.clipRect.y) + rect.y) + 'px';
        var rgbValue = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["convertHexToColor"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["colorNameToHex"])(this.fontBackground));
        var vAxis = series.chart.requireInvertedAxis ? series.xAxis : series.yAxis;
        var hAxis = series.chart.requireInvertedAxis ? series.yAxis : series.xAxis;
        childElement.style.color = dataLabel.font.color ||
            ((Math.round((rgbValue.r * 299 + rgbValue.g * 587 + rgbValue.b * 114) / 1000)) >= 128 ? 'black' : 'white');
        if (childElement.childElementCount && !Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["isCollide"])(rect, this.chart.dataLabelCollections, clip)
            && (series.seriesType !== 'XY' || point.yValue === undefined || Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withIn"])(point.yValue, series.yAxis.visibleRange) ||
                (series.type.indexOf('100') > -1 && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withIn"])(series.stackedValues.endValues[point.index], series.yAxis.visibleRange)))
            && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withIn"])(point.xValue, series.xAxis.visibleRange) && parseFloat(childElement.style.top) >= vAxis.rect.y &&
            parseFloat(childElement.style.left) >= hAxis.rect.x && parseFloat(childElement.style.top) <= vAxis.rect.y + vAxis.rect.height &&
            parseFloat(childElement.style.left) <= hAxis.rect.x + hAxis.rect.width) {
            this.chart.dataLabelCollections.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](rect.x + clip.x, rect.y + clip.y, rect.width, rect.height));
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(this.chart.enableCanvas, parentElement, childElement, redraw, true, 'left', 'top');
            if (series.animation.enable && this.chart.animateSeries) {
                this.doDataLabelAnimation(series, childElement);
            }
        }
    };
    DataLabel.prototype.calculateTextPosition = function (point, series, textSize, dataLabel, labelIndex) {
        var labelRegion = labelIndex > 1 ? (series.type === 'Candle') ? point.regions[1] : point.regions[0] : point.regions[0];
        if (labelIndex > 1 && series.type === 'HiloOpenClose') {
            labelRegion = (labelIndex === 2) ? point.regions[1] : point.regions[2];
        }
        var location;
        location = this.getLabelLocation(point, series, textSize, labelIndex);
        var padding = 5;
        var clipRect = series.clipRect;
        var rect;
        // calculating alignment
        if (!this.chart.requireInvertedAxis || !this.isRectSeries(series) || series.type === 'BoxAndWhisker') {
            this.locationX = location.x;
            var alignmentValue = textSize.height + (this.borderWidth * 2) + this.markerHeight +
                this.margin.bottom + this.margin.top + padding;
            location.y = (dataLabel.position === 'Auto') ? location.y :
                this.calculateAlignment(alignmentValue, location.y, dataLabel.alignment, this.isRectSeries(series) ? point.yValue < 0 : false);
            // calculating position
            location.y = (!this.isRectSeries(series) || series.type === 'BoxAndWhisker') ?
                this.calculatePathPosition(location.y, dataLabel.position, series, point, textSize, labelIndex) :
                this.calculateRectPosition(location.y, labelRegion, point.yValue < 0 !== this.yAxisInversed, dataLabel.position, series, textSize, labelIndex, point);
            if (this.isRectSeries(series) && this.chart.chartAreaType === 'PolarRadar') {
                location = this.calculatePolarRectPosition(location, dataLabel.position, series, point, textSize, labelIndex);
            }
        }
        else {
            this.locationY = location.y;
            var alignmentValue = textSize.width + this.borderWidth + this.margin.left + this.margin.right - padding;
            location.x = dataLabel.position === 'Auto' ? location.x :
                this.calculateAlignment(alignmentValue, location.x, dataLabel.alignment, point.yValue < 0);
            location.x = this.calculateRectPosition(location.x, labelRegion, point.yValue < 0 !== this.yAxisInversed, dataLabel.position, series, textSize, labelIndex, point);
        }
        rect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["calculateRect"])(location, textSize, this.margin);
        // Checking the condition whether data Label has been exist the clip rect
        if (!((rect.y > clipRect.height) || (rect.x > clipRect.width) ||
            (rect.x + rect.width < 0) || (rect.y + rect.height < 0))) {
            rect.x = rect.x < 0 ? padding : rect.x;
            rect.y = rect.y < 0 ? padding : rect.y;
            rect.x -= (rect.x + rect.width) > clipRect.width ? (rect.x + rect.width) - clipRect.width + padding : 0;
            rect.y -= (rect.y + rect.height) > clipRect.height ? (rect.y + rect.height) - clipRect.height + padding : 0;
            this.fontBackground = this.fontBackground === 'transparent' ? this.chartBackground : this.fontBackground;
        }
        return rect;
    };
    // Calculation label location for polar column draw types
    DataLabel.prototype.calculatePolarRectPosition = function (location, position, series, point, size, labelIndex) {
        var padding = 5;
        var columnRadius;
        var angle = (point.regionData.startAngle - 0.5 * Math.PI) + (point.regionData.endAngle - point.regionData.startAngle) / 2;
        if (labelIndex === 0) {
            columnRadius = point.regionData.radius < point.regionData.innerRadius ? point.regionData.innerRadius
                : point.regionData.radius;
        }
        else {
            columnRadius = point.regionData.radius > point.regionData.innerRadius ? point.regionData.innerRadius
                : point.regionData.radius;
        }
        this.fontBackground = this.fontBackground === 'transparent' ? this.chartBackground : this.fontBackground;
        if (series.drawType.indexOf('Stacking') > -1) {
            position = position === 'Outer' ? 'Top' : position;
        }
        else if (series.drawType.indexOf('Range') > -1) {
            position = (position === 'Outer' || position === 'Top') ? position : 'Auto';
        }
        if (position === 'Outer') {
            columnRadius = labelIndex === 0 ? columnRadius + 2 * padding + this.markerHeight :
                columnRadius - 2 * padding - this.markerHeight;
        }
        else if (position === 'Middle') {
            columnRadius = columnRadius / 2 + padding;
        }
        else if (position === 'Top') {
            columnRadius = labelIndex === 0 ? columnRadius - 2 * padding - this.markerHeight :
                columnRadius + 2 * padding + this.markerHeight;
        }
        else if (position === 'Bottom') {
            columnRadius = padding;
        }
        else {
            if (labelIndex === 0) {
                columnRadius = columnRadius >= series.chart.radius ? columnRadius - padding :
                    series.drawType === 'StackingColumn' ? columnRadius - 2 * padding : columnRadius + 2 * padding;
            }
            else {
                columnRadius = columnRadius >= series.chart.radius ? columnRadius + padding : columnRadius - 2 * padding;
            }
        }
        location.x = series.clipRect.width / 2 + series.clipRect.x + columnRadius * Math.cos(angle);
        location.y = series.clipRect.height / 2 + series.clipRect.y + columnRadius * Math.sin(angle);
        return location;
    };
    /**
     * Get the label location
     */
    DataLabel.prototype.getLabelLocation = function (point, series, textSize, labelIndex) {
        var location = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](0, 0);
        var labelRegion = (series.type === 'Candle' && labelIndex > 1) ? point.regions[1] : point.regions[0];
        if (series.type === 'HiloOpenClose') {
            labelRegion = (labelIndex === 2) ? point.regions[1] : point.regions[2];
        }
        var xAxis = series.xAxis;
        var yAxis = series.yAxis;
        var isInverted = series.chart.requireInvertedAxis;
        if (series.type === 'BoxAndWhisker') {
            this.markerHeight = 0;
            switch (labelIndex) {
                case 0:
                    location = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.median, xAxis, yAxis, isInverted);
                    break;
                case 1:
                    location = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.maximum, xAxis, yAxis, isInverted);
                    break;
                case 2:
                    location = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.minimum, xAxis, yAxis, isInverted);
                    break;
                case 3:
                    location = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.upperQuartile, xAxis, yAxis, isInverted);
                    break;
                case 4:
                    location = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.lowerQuartile, xAxis, yAxis, isInverted);
                    break;
                default: {
                    location = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.outliers[labelIndex - 5], xAxis, yAxis, isInverted);
                    this.markerHeight = series.marker.height / 2;
                    break;
                }
            }
            if (isInverted) {
                location.y = point.regions[0].y + (point.regions[0].height / 2);
            }
            else {
                location.x = point.regions[0].x + (point.regions[0].width / 2);
            }
        }
        else if (labelIndex === 0 || labelIndex === 1) {
            location = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](point.symbolLocations[0].x, point.symbolLocations[0].y);
        }
        else if ((labelIndex === 2 || labelIndex === 3) && series.type === 'Candle') {
            location = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](point.symbolLocations[1].x, point.symbolLocations[1].y);
        }
        else if (isInverted) {
            location = { x: labelRegion.x + (labelRegion.width) / 2, y: labelRegion.y };
        }
        else {
            location = { x: labelRegion.x + labelRegion.width, y: labelRegion.y + (labelRegion.height) / 2 };
        }
        //Aligning the label at the beginning of the tick, when tick size is less than text size
        if (labelIndex > 1 && series.type === 'HiloOpenClose') {
            if (series.chart.requireInvertedAxis) {
                var height = labelRegion.height;
                location.y = labelRegion.y + height / 2 + 2 * (labelIndex === 2 ? 1 : -1);
            }
            else {
                var width = labelRegion.width;
                location.x = labelRegion.x + width / 2 + 2 * (labelIndex === 2 ? 1 : -1);
            }
        }
        return location;
    };
    DataLabel.prototype.calculateRectPosition = function (labelLocation, rect, isMinus, position, series, textSize, labelIndex, point) {
        if (series.chart.chartAreaType === 'PolarRadar') {
            return null;
        }
        var padding = 5;
        var margin = this.margin;
        var textLength = !this.inverted ? textSize.height : textSize.width;
        var extraSpace = this.borderWidth + textLength / 2 + padding;
        if (series.type.indexOf('Stacking') > -1) {
            position = position === 'Outer' ? 'Top' : position;
        }
        else if (series.type.indexOf('Range') > -1) {
            position = (position === 'Outer' || position === 'Top') ? position : 'Auto';
        }
        else if (series.type === 'Waterfall') {
            position = position === 'Auto' ? 'Middle' : position;
        }
        switch (position) {
            case 'Bottom':
                labelLocation = !this.inverted ?
                    isMinus ? (labelLocation - rect.height + extraSpace + margin.top) :
                        (labelLocation + rect.height - extraSpace - margin.bottom) :
                    isMinus ? (labelLocation + rect.width - extraSpace - margin.left) :
                        (labelLocation - rect.width + extraSpace + margin.right);
                break;
            case 'Middle':
                labelLocation = labelLocation = !this.inverted ?
                    (isMinus ? labelLocation - (rect.height / 2) : labelLocation + (rect.height / 2)) :
                    (isMinus ? labelLocation + (rect.width / 2) : labelLocation - (rect.width / 2));
                break;
            case 'Auto':
                labelLocation = this.calculateRectActualPosition(labelLocation, rect, isMinus, series, textSize, labelIndex, point);
                break;
            default:
                extraSpace += this.errorHeight;
                labelLocation = this.calculateTopAndOuterPosition(labelLocation, rect, position, series, labelIndex, extraSpace, isMinus);
                break;
        }
        var check = !this.inverted ? (labelLocation < rect.y || labelLocation > rect.y + rect.height) :
            (labelLocation < rect.x || labelLocation > rect.x + rect.width);
        this.fontBackground = check ?
            (this.fontBackground === 'transparent' ? this.chartBackground : this.fontBackground)
            : this.fontBackground === 'transparent' ? (point.color || series.interior) : this.fontBackground;
        return labelLocation;
    };
    DataLabel.prototype.calculatePathPosition = function (labelLocation, position, series, point, size, labelIndex) {
        var padding = 5;
        if ((series.type.indexOf('Area') > -1 && series.type !== 'RangeArea')
            && this.yAxisInversed && series.marker.dataLabel.position !== 'Auto') {
            position = position === 'Top' ? 'Bottom' : position === 'Bottom' ? 'Top' : position;
        }
        this.fontBackground = this.fontBackground === 'transparent' ? this.chartBackground : this.fontBackground;
        switch (position) {
            case 'Top':
            case 'Outer':
                labelLocation = labelLocation - this.markerHeight - this.borderWidth - size.height / 2 - this.margin.bottom - padding -
                    this.errorHeight;
                break;
            case 'Bottom':
                labelLocation = labelLocation + this.markerHeight + this.borderWidth + size.height / 2 + this.margin.top + padding +
                    this.errorHeight;
                break;
            case 'Auto':
                labelLocation = this.calculatePathActualPosition(labelLocation, this.markerHeight, series, point, size, labelIndex);
                break;
        }
        return labelLocation;
    };
    DataLabel.prototype.isDataLabelShape = function (style) {
        this.isShape = (style.color !== 'transparent' || style.border.width > 0);
        this.borderWidth = style.border.width;
        if (!this.isShape) {
            this.margin = { left: 0, right: 0, bottom: 0, top: 0 };
        }
    };
    DataLabel.prototype.calculateRectActualPosition = function (labelLocation, rect, isMinus, series, size, labelIndex, point) {
        var location;
        var labelRect;
        var isOverLap = true;
        var position = 0;
        var collection = this.chart.dataLabelCollections;
        var finalPosition = series.type.indexOf('Range') !== -1 || series.type === 'Hilo' ? 2 : 4;
        while (isOverLap && position < finalPosition) {
            location = this.calculateRectPosition(labelLocation, rect, isMinus, this.getPosition(position), series, size, labelIndex, point);
            if (!this.inverted) {
                labelRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["calculateRect"])(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](this.locationX, location), size, this.margin);
                isOverLap = labelRect.y < 0 || Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["isCollide"])(labelRect, collection, series.clipRect) || labelRect.y > series.clipRect.height;
            }
            else {
                labelRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["calculateRect"])(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](location, this.locationY), size, this.margin);
                isOverLap = labelRect.x < 0 || Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["isCollide"])(labelRect, collection, series.clipRect) ||
                    labelRect.x + labelRect.width > series.clipRect.width;
            }
            position++;
        }
        return location;
    };
    // alignment calculation assigned here
    DataLabel.prototype.calculateAlignment = function (value, labelLocation, alignment, isMinus) {
        switch (alignment) {
            case 'Far':
                labelLocation = !this.inverted ? (isMinus ? labelLocation + value : labelLocation - value) :
                    (isMinus ? labelLocation - value : labelLocation + value);
                break;
            case 'Near':
                labelLocation = !this.inverted ? (isMinus ? labelLocation - value : labelLocation + value) :
                    (isMinus ? labelLocation + value : labelLocation - value);
                break;
            case 'Center':
                labelLocation = labelLocation;
                break;
        }
        return labelLocation;
    };
    //calculation for top and outer position of datalabel for rect series
    DataLabel.prototype.calculateTopAndOuterPosition = function (location, rect, position, series, index, extraSpace, isMinus) {
        var margin = this.margin;
        var top;
        switch (series.type) {
            case 'RangeColumn':
            case 'RangeArea':
            case 'Hilo':
                top = (index === 0 && !this.yAxisInversed) || (index === 1 && this.yAxisInversed);
                location = this.updateLabelLocation(position, location, extraSpace, margin, rect, top);
                break;
            case 'Candle':
                top = (index === 0 || index === 2) && !this.yAxisInversed
                    || (index === 1 || index === 3) && this.yAxisInversed;
                location = this.updateLabelLocation(position, location, extraSpace, margin, rect, top, index > 1);
                break;
            case 'HiloOpenClose':
                if (index <= 1) {
                    top = (index === 0 && !this.yAxisInversed) || (index === 1 && this.yAxisInversed);
                    location = this.updateLabelLocation(position, location, extraSpace, margin, rect, top);
                }
                else {
                    if (this.yAxisInversed) {
                        location = !this.inverted ? location + extraSpace + margin.top : location - extraSpace - margin.right;
                    }
                    else {
                        location = !this.inverted ? location - extraSpace - margin.bottom : location + extraSpace + margin.left;
                    }
                }
                break;
            default:
                if ((isMinus && position === 'Top') || (!isMinus && position === 'Outer')) {
                    location = !this.inverted ? location - extraSpace - margin.bottom - this.markerHeight :
                        location + extraSpace + margin.left + this.markerHeight;
                }
                else {
                    location = !this.inverted ? location + extraSpace + margin.top + this.markerHeight :
                        location - extraSpace - margin.right - this.markerHeight;
                }
                break;
        }
        return location;
    };
    /**
     * Updates the label location
     */
    DataLabel.prototype.updateLabelLocation = function (position, location, extraSpace, margin, rect, top, inside) {
        if (inside === void 0) { inside = false; }
        if (!this.inverted) {
            if (top) {
                location = (position === 'Outer' && !inside) ? location - extraSpace - margin.bottom - this.markerHeight :
                    location + extraSpace + margin.top + this.markerHeight;
            }
            else {
                location = (position === 'Outer' && !inside) ? location + rect.height + extraSpace + margin.top + this.markerHeight :
                    location + rect.height - extraSpace - margin.bottom - this.markerHeight;
            }
        }
        else {
            if (top) {
                location = (position === 'Outer' && !inside) ? location + extraSpace + margin.left + this.markerHeight :
                    location - extraSpace - margin.right - this.markerHeight;
            }
            else {
                location = (position === 'Outer' && !inside) ? location - rect.width - extraSpace - margin.right - this.markerHeight :
                    location - rect.width + extraSpace + margin.left + this.markerHeight;
            }
        }
        return location;
    };
    DataLabel.prototype.calculatePathActualPosition = function (y, markerSize, series, point, size, labelIndex) {
        var points = series.points;
        var index = point.index;
        var yValue = points[index].yValue;
        var position;
        var nextPoint = points.length - 1 > index ? points[index + 1] : null;
        var previousPoint = index > 0 ? points[index - 1] : null;
        var yLocation;
        var isOverLap = true;
        var labelRect;
        var isBottom;
        var positionIndex;
        var collection = this.chart.dataLabelCollections;
        if (series.type === 'Bubble') {
            position = 'Top';
        }
        else if (series.type.indexOf('Step') > -1) {
            position = 'Top';
            if (index) {
                position = (!previousPoint || !previousPoint.visible || (yValue > previousPoint.yValue !== this.yAxisInversed)
                    || yValue === previousPoint.yValue) ? 'Top' : 'Bottom';
            }
        }
        else if (series.type === 'BoxAndWhisker') {
            if (labelIndex === 1 || labelIndex === 3 || labelIndex > 4) {
                position = series.yAxis.isInversed ? 'Bottom' : 'Top';
            }
            else if (labelIndex === 2 || labelIndex === 4) {
                position = series.yAxis.isInversed ? 'Top' : 'Bottom';
            }
            else {
                isOverLap = false;
                position = 'Middle';
                yLocation = this.calculatePathPosition(y, position, series, point, size, labelIndex);
            }
        }
        else {
            if (index === 0) {
                position = (!nextPoint || !nextPoint.visible || yValue > nextPoint.yValue ||
                    (yValue < nextPoint.yValue && this.yAxisInversed)) ? 'Top' : 'Bottom';
            }
            else if (index === points.length - 1) {
                position = (!previousPoint || !previousPoint.visible || yValue > previousPoint.yValue ||
                    (yValue < previousPoint.yValue && this.yAxisInversed)) ? 'Top' : 'Bottom';
            }
            else {
                if (!nextPoint.visible && !(previousPoint && previousPoint.visible)) {
                    position = 'Top';
                }
                else if (!nextPoint.visible || !previousPoint) {
                    position = (nextPoint.yValue > yValue || (previousPoint && previousPoint.yValue > yValue)) ?
                        'Bottom' : 'Top';
                }
                else {
                    var slope = (nextPoint.yValue - previousPoint.yValue) / 2;
                    var intersectY = (slope * index) + (nextPoint.yValue - (slope * (index + 1)));
                    position = !this.yAxisInversed ? intersectY < yValue ? 'Top' : 'Bottom' :
                        intersectY < yValue ? 'Bottom' : 'Top';
                }
            }
        }
        isBottom = position === 'Bottom';
        positionIndex = ['Outer', 'Top', 'Bottom', 'Middle', 'Auto'].indexOf(position);
        while (isOverLap && positionIndex < 4) {
            yLocation = this.calculatePathPosition(y, this.getPosition(positionIndex), series, point, size, labelIndex);
            labelRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["calculateRect"])(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](this.locationX, yLocation), size, this.margin);
            isOverLap = labelRect.y < 0 || Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["isCollide"])(labelRect, collection, series.clipRect)
                || (labelRect.y + labelRect.height) > series.clipRect.height;
            positionIndex = isBottom ? positionIndex - 1 : positionIndex + 1;
            isBottom = false;
        }
        return yLocation;
    };
    /**
     * Animates the data label.
     * @param  {Series} series - Data label of the series gets animated.
     * @return {void}
     */
    DataLabel.prototype.doDataLabelAnimation = function (series, element) {
        var shapeElements = series.shapeElement.childNodes;
        var textNode = series.textElement.childNodes;
        var delay = series.animation.delay + series.animation.duration;
        var duration = series.chart.animated ? series.chart.duration : 200;
        var location;
        var length = element ? 1 : textNode.length;
        var tempElement;
        for (var i = 0; i < length; i++) {
            tempElement = textNode[i];
            if (element) {
                element.style.visibility = 'hidden';
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["templateAnimate"])(element, delay, duration, 'ZoomIn');
            }
            else {
                location = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"]((+tempElement.getAttribute('x')) + ((+tempElement.getAttribute('width')) / 2), (+tempElement.getAttribute('y')) + ((+tempElement.getAttribute('height')) / 2));
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["markerAnimate"])(tempElement, delay, duration, series, null, location, true);
                if (shapeElements[i]) {
                    tempElement = shapeElements[i];
                    location = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"]((+tempElement.getAttribute('x')) + ((+tempElement.getAttribute('width')) / 2), (+tempElement.getAttribute('y')) + ((+tempElement.getAttribute('height')) / 2));
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["markerAnimate"])(tempElement, delay, duration, series, null, location, true);
                }
            }
        }
    };
    DataLabel.prototype.getPosition = function (index) {
        return (['Outer', 'Top', 'Bottom', 'Middle', 'Auto'][index]);
    };
    /**
     * Get module name.
     */
    DataLabel.prototype.getModuleName = function () {
        // Returns the module name
        return 'DataLabel';
    };
    /**
     * To destroy the dataLabel for series.
     * @return {void}
     * @private
     */
    DataLabel.prototype.destroy = function (chart) {
        // Destroy method performed here
    };
    return DataLabel;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/error-bar.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/error-bar.js ***!
  \***************************************************************************/
/*! exports provided: ErrorBar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorBar", function() { return ErrorBar; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");



/**
 * `ErrorBar` module is used to render the error bar for series.
 */
var ErrorBar = /** @class */ (function () {
    /**
     * Constructor for the error bar module.
     * @private
     */
    function ErrorBar(chart) {
        this.chart = chart;
    }
    /**
     * Render the error bar for series.
     * @return {void}
     */
    ErrorBar.prototype.render = function (series) {
        if (this.chart.chartAreaType === 'PolarRadar') {
            return null;
        }
        this.createElement(series, this.chart);
        this.renderErrorBar(series);
    };
    ErrorBar.prototype.renderErrorBar = function (series) {
        var seriesIndex = series.index;
        var symbolId;
        var capId;
        var errorbar = series.errorBar;
        var errorBarCap = series.errorBar.errorBarCap;
        var errorDirection = ['', ''];
        var redraw = series.chart.redraw;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            if (point.visible && point.symbolLocations[0]) {
                var errorX = 0;
                var errorY = 0;
                switch (errorbar.mode) {
                    case 'Vertical':
                        errorY = errorbar.verticalError;
                        break;
                    case 'Horizontal':
                        errorX = errorbar.horizontalError;
                        break;
                    case 'Both':
                        errorX = errorbar.horizontalError;
                        errorY = errorbar.verticalError;
                        break;
                }
                errorDirection = this['calculate' + errorbar.type + 'Value'](point, series, this.chart.requireInvertedAxis, errorX, errorY);
                symbolId = this.chart.element.id + '_Series_' + '_ErrorBarGroup_' + seriesIndex + '_Point_' + point.index;
                capId = this.chart.element.id + '_Series_' + '_ErrorBarCap_' + seriesIndex + '_Point_' + point.index;
                var shapeOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](symbolId, '', errorbar.width, errorbar.color || this.chart.themeStyle.errorBar, null, '', errorDirection[0]);
                var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(shapeOption.id);
                var previousDirection = element ? element.getAttribute('d') : null;
                series.errorBarElement.appendChild(this.chart.renderer.drawPath(shapeOption));
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["pathAnimation"])(element, errorDirection[0], redraw, previousDirection);
                var capOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](capId, '', errorBarCap.width, errorBarCap.color || this.chart.themeStyle.errorBar, null, '', errorDirection[1]);
                element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(capOption.id);
                previousDirection = element ? element.getAttribute('d') : null;
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(this.chart.enableCanvas, series.errorBarElement, this.chart.renderer.drawPath(capOption), redraw);
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["pathAnimation"])(element, errorDirection[1], redraw, previousDirection);
            }
        }
    };
    // path calculation for error bar
    ErrorBar.prototype.findLocation = function (point, series, isInverted, x1, y1) {
        var errorbar = series.errorBar;
        var direction = errorbar.direction;
        var location = [];
        var stackedValue = series.stackedValues;
        var yValue = series.type.indexOf('Stacking') > -1 ? series.stackedValues.endValues[point.index] :
            (series.seriesType === 'HighLow' || series.seriesType === 'HighLowOpenClose') ? (series.points[point.index].high) :
                point.yValue;
        var startPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue + ((direction === 'Plus' || direction === 'Both') ? (errorbar.type === 'Custom' &&
            (errorbar.mode === 'Horizontal' || errorbar.mode === 'Both')) ? x1 = errorbar.horizontalPositiveError : x1 : 0), yValue + ((direction === 'Plus' || direction === 'Both') ? (errorbar.type === 'Custom' &&
            (errorbar.mode === 'Vertical' || errorbar.mode === 'Both')) ? y1 = errorbar.verticalPositiveError : y1 : 0), series.xAxis, series.yAxis, isInverted);
        location.push(startPoint);
        if (series.isRectSeries) {
            var midPoint = point.symbolLocations[0];
            location.push(midPoint);
        }
        else {
            var midPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.yValue, series.xAxis, series.yAxis, isInverted);
            location.push(midPoint);
        }
        var endPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue - ((direction === 'Minus' || direction === 'Both') ? (errorbar.type === 'Custom' &&
            (errorbar.mode === 'Horizontal' || errorbar.mode === 'Both')) ? x1 = errorbar.horizontalNegativeError : x1 : 0), yValue - ((direction === 'Minus' || direction === 'Both') ? (errorbar.type === 'Custom' &&
            (errorbar.mode === 'Vertical' || errorbar.mode === 'Both')) ? y1 = errorbar.verticalNegativeError : y1 : 0), series.xAxis, series.yAxis, isInverted);
        location.push(endPoint);
        // calculate error height for datalabel position alignment
        point.error = (errorbar.mode === 'Vertical') ? errorbar.verticalError : errorbar.horizontalError;
        this.negativeHeight = (errorbar.mode === 'Vertical' || errorbar.mode === 'Both') ? (isInverted ? (location[1].x - location[2].x) :
            (location[2].y - location[1].y)) : 0;
        this.positiveHeight = (errorbar.mode === 'Vertical' || errorbar.mode === 'Both') ? (isInverted ? (location[0].x - location[1].x) :
            (location[1].y - location[0].y)) : 0;
        return this.getErrorDirection(location[0], location[1], location[2], series, isInverted);
    };
    // calculations for eror bar types
    ErrorBar.prototype.calculateFixedValue = function (point, series, isInverted, errorX, errorY, xAxis, yAxis) {
        var errorbar = series.errorBar;
        return this.findLocation(point, series, isInverted, errorX, errorY);
    };
    ErrorBar.prototype.calculatePercentageValue = function (point, series, isInverted, errorX, errorY, xAxis, yAxis) {
        errorX = (errorX / 100) * point.xValue;
        errorY = (errorY / 100) * point.yValue;
        return this.findLocation(point, series, isInverted, errorX, errorY);
    };
    ErrorBar.prototype.calculateStandardDeviationValue = function (point, series, isInverted, errorX, errorY, xAxis, yAxis) {
        var getMean = this.meanCalculation(series, series.errorBar.mode);
        errorX = errorX * (getMean.horizontalSquareRoot + getMean.horizontalMean);
        errorY = errorY * (getMean.verticalSquareRoot + getMean.verticalMean);
        return this.findLocation(point, series, isInverted, errorX, errorY);
    };
    ErrorBar.prototype.calculateStandardErrorValue = function (point, series, isInverted, errorX, errorY, xAxis, yAxis) {
        var length = series.points.length;
        var getMean = this.meanCalculation(series, series.errorBar.mode);
        errorX = ((errorX * getMean.horizontalSquareRoot) / Math.sqrt(length));
        errorY = ((errorY * getMean.verticalSquareRoot) / Math.sqrt(length));
        return this.findLocation(point, series, isInverted, errorX, errorY);
    };
    ErrorBar.prototype.calculateCustomValue = function (point, series, isInverted, errorX, errorY, xAxis, yAxis) {
        var errorbar = series.errorBar;
        return this.findLocation(point, series, isInverted, errorX, errorY);
    };
    ErrorBar.prototype.getHorizontalDirection = function (start, mid, end, direction, errorMode, capLength) {
        var path = '';
        var capDirection = '';
        path += 'M ' + start.x + ' ' + mid.y + ' L ' + end.x + ' ' + mid.y;
        capDirection += (direction === 'Plus' || direction === 'Both') ? 'M ' + (start.x) + ' ' + (mid.y - capLength) + ' L '
            + (start.x) + ' ' + (mid.y + capLength) : '';
        capDirection += (direction === 'Minus' || direction === 'Both') ? 'M ' + (end.x) + ' ' + (mid.y - capLength) + ' L '
            + (end.x) + ' ' + (mid.y + capLength) : ' ';
        return [path, capDirection];
    };
    ErrorBar.prototype.getVerticalDirection = function (start, mid, end, direction, errorMode, capLength) {
        var path = '';
        var capDirection = '';
        path += 'M ' + mid.x + ' ' + start.y + ' L ' + mid.x + ' ' + end.y;
        capDirection += (direction === 'Plus' || direction === 'Both') ? 'M ' + (mid.x - capLength) + ' ' + start.y + ' L '
            + (mid.x + capLength) + ' ' + start.y : '';
        capDirection += (direction === 'Minus' || direction === 'Both') ? 'M ' + (mid.x - capLength) + ' ' + end.y + ' L '
            + (mid.x + capLength) + ' ' + end.y : '';
        return [path, capDirection];
    };
    ErrorBar.prototype.getBothDirection = function (start, mid, end, direction, errorMode, capLength) {
        var capDirection = '';
        var path = '';
        var pathH = this.getHorizontalDirection(start, mid, end, direction, errorMode, capLength);
        var pathV = this.getVerticalDirection(start, mid, end, direction, errorMode, capLength);
        path = pathH[0].concat(pathV[0]);
        capDirection = pathH[1].concat(pathV[1]);
        return [path, capDirection];
    };
    ErrorBar.prototype.getErrorDirection = function (start, mid, end, series, isInverted) {
        var direction = series.errorBar.direction;
        var mode = series.errorBar.mode;
        var capLength = series.errorBar.errorBarCap.length;
        var path = '';
        var paths;
        var capDirection = '';
        var errorMode = mode;
        switch (mode) {
            case 'Both':
                errorMode = mode;
                break;
            case 'Horizontal':
                errorMode = (isInverted) ? 'Vertical' : mode;
                break;
            case 'Vertical':
                errorMode = (isInverted) ? 'Horizontal' : mode;
                break;
        }
        switch (errorMode) {
            case 'Horizontal':
                paths = this.getHorizontalDirection(start, mid, end, direction, errorMode, capLength);
                break;
            case 'Vertical':
                paths = this.getVerticalDirection(start, mid, end, direction, errorMode, capLength);
                break;
            case 'Both':
                paths = this.getBothDirection(start, mid, end, direction, errorMode, capLength);
                break;
        }
        return [paths[0], paths[1]];
    };
    // mean calculation for standard deviation and standard error
    ErrorBar.prototype.meanCalculation = function (series, mode) {
        var sumOfX = 0;
        var sumOfY = 0;
        var verticalMean = 0;
        var horizontalMean = 0;
        var verStandardMean;
        var horStandardMean;
        var verSquareRoot;
        var horSquareRoot;
        var length = series.points.length;
        switch (mode) {
            case 'Vertical':
                sumOfY = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["sum"])(series.yData);
                verticalMean = sumOfY / length;
                break;
            case 'Horizontal':
                sumOfX = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["sum"])(series.xData);
                horizontalMean = sumOfX / length;
                break;
            case 'Both':
                sumOfY = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["sum"])(series.yData);
                verticalMean = sumOfY / length;
                sumOfX = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["sum"])(series.xData);
                horizontalMean = sumOfX / length;
        }
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            if (mode === 'Vertical') {
                sumOfY = sumOfY + Math.pow((point.yValue - verticalMean), 2);
            }
            else if (mode === 'Horizontal') {
                sumOfX = sumOfX + Math.pow((point.xValue - horizontalMean), 2);
            }
            else {
                sumOfY = sumOfY + Math.pow((point.yValue - verticalMean), 2);
                sumOfX = sumOfX + Math.pow((point.xValue - horizontalMean), 2);
            }
        }
        verStandardMean = sumOfY / (length - 1);
        verSquareRoot = Math.sqrt(sumOfY / (length - 1));
        horStandardMean = sumOfX / (length - 1);
        horSquareRoot = Math.sqrt(sumOfX / (length - 1));
        return new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["Mean"](verStandardMean, verSquareRoot, horStandardMean, horSquareRoot, verticalMean, horizontalMean);
    };
    ErrorBar.prototype.createElement = function (series, chart) {
        var explodeValue = 5;
        var transform = chart.chartAreaType === 'Cartesian' ?
            'translate(' + series.clipRect.x + ',' + (series.clipRect.y) + ')' : '';
        var markerHeight = (series.marker.height + explodeValue) / 2;
        var markerWidth = (series.marker.width + explodeValue) / 2;
        if (chart.chartAreaType === 'Cartesian') {
            var options = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["RectOption"](chart.element.id + '_ChartErrorBarClipRect_' + series.index, 'transparent', { width: 1, color: 'Gray' }, 1, {
                x: -markerWidth, y: -markerHeight,
                width: series.clipRect.width + markerWidth * 2, height: series.clipRect.height + markerHeight * 2
            });
            series.errorBarElement = chart.renderer.createGroup({
                'id': chart.element.id + 'ErrorBarGroup' + series.index,
                'transform': transform,
                'clip-path': 'url(#' + chart.element.id + '_ChartErrorBarClipRect_' + series.index + ')'
            });
            series.errorBarElement.appendChild(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendClipElement"])(chart.redraw, options, chart.renderer));
        }
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    ErrorBar.prototype.doErrorBarAnimation = function (series) {
        var errorBarElements = series.errorBarElement.childNodes;
        if (!errorBarElements) {
            return null;
        }
        var delay = series.animation.delay + series.animation.duration;
        var j = 1;
        while (j < errorBarElements.length) {
            for (var i = 0; i < series.points.length; i++) {
                if (!series.points[i].symbolLocations[0]) {
                    continue;
                }
                errorBarElements[j].style.visibility = 'hidden';
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["templateAnimate"])(errorBarElements[j], delay, 350, series.chart.requireInvertedAxis ? 'SlideLeftIn' : 'SlideBottomIn', false);
            }
            j++;
        }
    };
    /**
     * Get module name.
     */
    ErrorBar.prototype.getModuleName = function () {
        // Returns the module name
        return 'ErrorBar';
    };
    /**
     * To destroy the errorBar for series.
     * @return {void}
     * @private
     */
    ErrorBar.prototype.destroy = function (chart) {
        // Destroy method performed here
    };
    return ErrorBar;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/hilo-open-close-series.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/hilo-open-close-series.js ***!
  \****************************************************************************************/
/*! exports provided: HiloOpenCloseSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HiloOpenCloseSeries", function() { return HiloOpenCloseSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `HiloOpenCloseSeries` module is used to render the hiloOpenClose series.
 */
var HiloOpenCloseSeries = /** @class */ (function (_super) {
    __extends(HiloOpenCloseSeries, _super);
    function HiloOpenCloseSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render HiloOpenCloseSeries series.
     * @return {void}
     * @private
     */
    HiloOpenCloseSeries.prototype.render = function (series) {
        var highLowRect;
        var open;
        var close;
        var sideBySideInfo = this.getSideBySideInfo(series);
        var argsData;
        var borderWidth = Math.max(series.border.width, 2);
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible &&
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
                //highlow
                highLowRect = this.getRectangle(point.xValue + sideBySideInfo.start, Math.max(point.high, point.low), point.xValue + sideBySideInfo.end, Math.min(point.high, point.low), series);
                point.regions.push(this.getRectangle(point.xValue + sideBySideInfo.median, Math.max(point.high, point.low), point.xValue + sideBySideInfo.median, Math.min(point.high, point.low), series));
                this.updateTickRegion(!series.chart.requireInvertedAxis, point.regions[0], borderWidth);
                //open
                point.regions.push(this.getRectangle(point.xValue + sideBySideInfo.start, Math.max(point.open, point.close), point.xValue + sideBySideInfo.median, Math.max(point.open, point.close), series));
                //close
                point.regions.push(this.getRectangle(point.xValue + sideBySideInfo.median, Math.min(point.open, point.close), point.xValue + sideBySideInfo.end, Math.min(point.open, point.close), series));
                argsData = this.triggerPointRenderEvent(series, point);
                if (!argsData.cancel) {
                    this.updateSymbolLocation(point, point.regions[0], series);
                    var open_1 = { x: point.regions[1].x, y: point.regions[1].y };
                    var close_1 = { x: point.regions[2].x, y: point.regions[2].y };
                    this.drawHiloOpenClosePath(series, point, open_1, close_1, highLowRect, argsData);
                }
                this.updateTickRegion(series.chart.requireInvertedAxis, point.regions[1], borderWidth);
                this.updateTickRegion(series.chart.requireInvertedAxis, point.regions[2], borderWidth);
            }
        }
    };
    /**
     * Updates the tick region
     */
    HiloOpenCloseSeries.prototype.updateTickRegion = function (horizontal, region, borderWidth) {
        if (horizontal) {
            region.x -= borderWidth / 2;
            region.width = borderWidth;
        }
        else {
            region.y -= borderWidth / 2;
            region.height = borderWidth;
        }
    };
    /**
     * Trigger point rendering event
     */
    HiloOpenCloseSeries.prototype.triggerPointRenderEvent = function (series, point) {
        var fill = (point.open <= point.close) ? series.bearFillColor : series.bullFillColor;
        var border = { color: series.border.color, width: Math.max(series.border.width, 1) };
        return this.triggerEvent(series, point, fill, border);
    };
    /**
     * To draw the rectangle for points.
     * @return {void}
     * @private
     */
    HiloOpenCloseSeries.prototype.drawHiloOpenClosePath = function (series, point, open, close, rect, argsData) {
        // region highlow
        var direction;
        var options;
        if (series.chart.requireInvertedAxis) {
            direction = ('M' + ' ' + (rect.x) + ' ' + (rect.y + rect.height / 2) + ' ' +
                'L' + ' ' + (rect.x + rect.width) + ' ' + (rect.y + rect.height / 2) + ' ');
            direction += ('M' + ' ' + (open.x) + ' ' + (rect.y + rect.height / 2) + ' ' +
                'L' + ' ' + (open.x) + ' ' + (rect.y + rect.height) + ' ');
            direction += ('M' + ' ' + (close.x) + ' ' + (rect.y + rect.height / 2) + ' ' +
                'L' + ' ' + (close.x) + ' ' + (rect.y) + ' ');
        }
        else {
            direction = ('M' + ' ' + (rect.x + rect.width / 2) + ' ' + (rect.y + rect.height) + ' ' +
                'L' + ' ' + (rect.x + rect.width / 2) + ' ' + (rect.y) + ' ');
            //region opentick
            direction += ('M' + ' ' + (rect.x) + ' ' + (open.y) + ' ' +
                'L' + ' ' + (rect.x + rect.width / 2) + ' ' + (open.y) + ' ');
            //region closetick
            direction += ('M' + ' ' + (rect.x + rect.width / 2) + ' ' + (close.y) + ' ' +
                'L' + ' ' + (rect.x + rect.width) + ' ' + (close.y) + ' ');
        }
        options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index + '_Point_' + point.index, argsData.fill, argsData.border.width, argsData.fill, series.opacity, series.dashArray, direction);
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["pathAnimation"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(options.id), direction, series.chart.redraw);
        var element = series.chart.renderer.drawPath(options, new Int32Array([series.clipRect.x, series.clipRect.y]));
        element.setAttribute('aria-label', point.x.toString() + ':' + point.high.toString()
            + ':' + point.low.toString() + ':' + point.close.toString() + ':' + point.open.toString());
        if (!series.chart.enableCanvas) {
            series.seriesElement.appendChild(element);
        }
    };
    /**
     * Get module name.
     */
    HiloOpenCloseSeries.prototype.getModuleName = function () {
        return 'HiloOpenCloseSeries';
        /**
         * return the module name
         */
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    HiloOpenCloseSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * To destroy the column series.
     * @return {void}
     * @private
     */
    HiloOpenCloseSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return HiloOpenCloseSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_2__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/hilo-series.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/hilo-series.js ***!
  \*****************************************************************************/
/*! exports provided: HiloSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HiloSeries", function() { return HiloSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `HiloSeries` module is used to render the hilo series.
 */
var HiloSeries = /** @class */ (function (_super) {
    __extends(HiloSeries, _super);
    function HiloSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Hiloseries.
     * @return {void}
     * @private
     */
    HiloSeries.prototype.render = function (series) {
        var region;
        var sideBySideInfo = this.getSideBySideInfo(series);
        var argsData;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible &&
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
                region = this.getRectangle(point.xValue + sideBySideInfo.median, point.high, point.xValue + sideBySideInfo.median, point.low, series);
                argsData = this.triggerPointRenderEvent(series, point);
                if (!argsData.cancel) {
                    if (!series.chart.requireInvertedAxis) {
                        region.width = argsData.border.width;
                        region.x = region.x - (region.width / 2);
                    }
                    else {
                        region.height = argsData.border.width;
                        region.y = region.y - (region.height / 2);
                    }
                    argsData.border.width = 0;
                    this.updateSymbolLocation(point, region, series);
                    this.drawRectangle(series, point, region, argsData);
                }
            }
        }
    };
    /**
     * To trigger the point rendering event.
     * @return {void}
     * @private
     */
    HiloSeries.prototype.triggerPointRenderEvent = function (series, point) {
        var border = { color: series.fill, width: Math.max(series.border.width, 2) };
        return _super.prototype.triggerEvent.call(this, series, point, series.interior, border);
    };
    /**
     * Get module name.
     */
    HiloSeries.prototype.getModuleName = function () {
        return 'HiloSeries';
        /**
         * return the module name
         */
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    HiloSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * To destroy the Hilo series.
     * @return {void}
     * @private
     */
    HiloSeries.prototype.destroy = function (chart) {
        /**
         * Destroys the Hilo Series
         */
    };
    return HiloSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_1__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/histogram-series.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/histogram-series.js ***!
  \**********************************************************************************/
/*! exports provided: HistogramSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HistogramSeries", function() { return HistogramSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _column_series__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./column-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-series.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `HistogramSeries` Module used to render the histogram series.
 */
var HistogramSeries = /** @class */ (function (_super) {
    __extends(HistogramSeries, _super);
    function HistogramSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Histogram series.
     * @return {void}
     * @private
     */
    HistogramSeries.prototype.render = function (series) {
        _super.prototype.render.call(this, series);
        if (series.showNormalDistribution) {
            this.renderNormalDistribution(series);
        }
    };
    /**
     * To calculate bin interval for Histogram series.
     * @return number
     * @private
     */
    HistogramSeries.prototype.calculateBinInterval = function (yValues, series) {
        var mean = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["sum"])(yValues) / yValues.length;
        var sumValue = 0;
        for (var _i = 0, yValues_1 = yValues; _i < yValues_1.length; _i++) {
            var value = yValues_1[_i];
            sumValue += (value - mean) * (value - mean);
        }
        series.histogramValues.mean = mean;
        series.histogramValues.sDValue = Math.round(Math.sqrt(sumValue / yValues.length - 1));
        series.histogramValues.binWidth = series.binInterval ||
            Math.round((3.5 * series.histogramValues.sDValue) / Math.pow(yValues.length, 1 / 3));
    };
    /**
     * Add data points for Histogram series.
     * @return {object[]}
     * @private
     */
    HistogramSeries.prototype.processInternalData = function (data, series) {
        var _a;
        var updatedData = [];
        var yValues = [];
        var binWidth;
        Object.keys(data).forEach(function (key) {
            yValues.push(data[key][series.yName]);
        });
        series.histogramValues = {
            yValues: yValues
        };
        var min = Math.min.apply(Math, series.histogramValues.yValues);
        this.calculateBinInterval(series.histogramValues.yValues, series);
        binWidth = series.histogramValues.binWidth;
        var yCount;
        for (var j = 0; j < data.length;) {
            yCount = yValues.filter(function (y) { return y >= min && y < (min + (binWidth)); }).length;
            updatedData.push((_a = {
                    'x': min + binWidth / 2
                },
                _a[series.yName] = yCount,
                _a));
            min = min + binWidth;
            j += yCount;
        }
        return updatedData;
    };
    /**
     * Render Normal Distribution for Histogram series.
     * @return {void}
     * @private
     */
    HistogramSeries.prototype.renderNormalDistribution = function (series) {
        var min = series.xAxis.actualRange.min;
        var max = series.xAxis.actualRange.max;
        var xValue;
        var pointLocation;
        var yValue;
        var direction = '';
        var startPoint = 'M';
        var yValuesCount = series.histogramValues.yValues.length;
        var binWidth = series.histogramValues.binWidth;
        var mean = series.histogramValues.mean;
        var sDValue = series.histogramValues.sDValue;
        var pointsCount = 500;
        var del = (max - min) / (pointsCount - 1);
        var distributionLine;
        for (var i = 0; i < pointsCount; i++) {
            xValue = min + i * del;
            yValue = Math.exp(-(xValue - mean) * (xValue - mean) / (2 * sDValue * sDValue)) /
                (sDValue * Math.sqrt(2 * Math.PI));
            pointLocation = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(xValue, yValue * binWidth * yValuesCount, series.xAxis, series.yAxis, series.chart.requireInvertedAxis, series);
            direction += startPoint + ' ' + (pointLocation.x) + ' ' + (pointLocation.y) + ' ';
            startPoint = 'L';
        }
        distributionLine = series.chart.renderer.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index + '_NDLine', 'transparent', 2, series.chart.themeStyle.errorBar, series.opacity, series.dashArray, direction), new Int32Array([series.clipRect.x, series.clipRect.y]));
        distributionLine.style.visibility = (!series.chart.enableCanvas) ? ((series.animation.enable &&
            series.chart.animateSeries) ? 'hidden' : 'visible') : null;
        if (!series.chart.enableCanvas) {
            series.seriesElement.appendChild(distributionLine);
        }
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    HistogramSeries.prototype.doAnimation = function (series) {
        _super.prototype.doAnimation.call(this, series);
        if (series.showNormalDistribution) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["templateAnimate"])(series.seriesElement.lastElementChild, series.animation.duration, 500, 'FadeIn');
        }
    };
    /**
     * Get module name.
     */
    HistogramSeries.prototype.getModuleName = function () {
        return 'HistogramSeries';
        /**
         * return the module name
         */
    };
    /**
     * To destroy the histogram series.
     * @return {void}
     * @private
     */
    HistogramSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return HistogramSeries;
}(_column_series__WEBPACK_IMPORTED_MODULE_2__["ColumnSeries"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js ***!
  \***************************************************************************/
/*! exports provided: LineBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineBase", function() { return LineBase; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");



/**
 * Base for line type series.
 */
var LineBase = /** @class */ (function () {
    /** @private */
    function LineBase(chartModule) {
        this.chart = chartModule;
    }
    /**
     * To improve the chart performance.
     * @return {void}
     * @private
     */
    LineBase.prototype.enableComplexProperty = function (series) {
        var tempPoints = [];
        var xVisibleRange = series.xAxis.visibleRange;
        var yVisibleRange = series.yAxis.visibleRange;
        var seriesPoints = series.points;
        var areaBounds = series.clipRect;
        var xTolerance = Math.abs(xVisibleRange.delta / areaBounds.width);
        var yTolerance = Math.abs(yVisibleRange.delta / areaBounds.height);
        var prevXValue = (seriesPoints[0] && seriesPoints[0].x > xTolerance) ? 0 : xTolerance;
        var prevYValue = (seriesPoints[0] && seriesPoints[0].y > yTolerance) ? 0 : yTolerance;
        var xVal = 0;
        var yVal = 0;
        for (var _i = 0, seriesPoints_1 = seriesPoints; _i < seriesPoints_1.length; _i++) {
            var currentPoint = seriesPoints_1[_i];
            currentPoint.symbolLocations = [];
            xVal = currentPoint.xValue ? currentPoint.xValue : xVisibleRange.min;
            yVal = currentPoint.yValue ? currentPoint.yValue : yVisibleRange.min;
            if (Math.abs(prevXValue - xVal) >= xTolerance || Math.abs(prevYValue - yVal) >= yTolerance) {
                tempPoints.push(currentPoint);
                prevXValue = xVal;
                prevYValue = yVal;
            }
        }
        return tempPoints;
    };
    /**
     * To generate the line path direction
     * @param firstPoint
     * @param secondPoint
     * @param series
     * @param isInverted
     * @param getPointLocation
     * @param startPoint
     */
    LineBase.prototype.getLineDirection = function (firstPoint, secondPoint, series, isInverted, getPointLocation, startPoint) {
        var direction = '';
        if (firstPoint != null) {
            var point1 = getPointLocation(firstPoint.xValue, firstPoint.yValue, series.xAxis, series.yAxis, isInverted, series);
            var point2 = getPointLocation(secondPoint.xValue, secondPoint.yValue, series.xAxis, series.yAxis, isInverted, series);
            direction = startPoint + ' ' + (point1.x) + ' ' + (point1.y) + ' ' +
                'L' + ' ' + (point2.x) + ' ' + (point2.y) + ' ';
        }
        return direction;
    };
    /**
     * To append the line path.
     * @return {void}
     * @private
     */
    LineBase.prototype.appendLinePath = function (options, series, clipRect) {
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(options.id);
        var chart = series.chart;
        var previousDirection = element ? element.getAttribute('d') : null;
        var htmlObject = series.chart.renderer.drawPath(options, new Int32Array([series.clipRect.x, series.clipRect.y]));
        if (htmlObject) {
            htmlObject.setAttribute('clip-path', clipRect);
        }
        series.pathElement = htmlObject;
        if (!series.chart.enableCanvas) {
            series.seriesElement.appendChild(htmlObject);
        }
        series.isRectSeries = false;
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["pathAnimation"])(element, options.d, series.chart.redraw, previousDirection, chart.duration);
    };
    /**
     * To render the marker for the series.
     * @return {void}
     * @private
     */
    LineBase.prototype.renderMarker = function (series) {
        if (series.marker && series.marker.visible) {
            series.chart.markerRender.render(series);
        }
    };
    /**
     * To do the progressive animation.
     * @return {void}
     * @private
     */
    LineBase.prototype.doProgressiveAnimation = function (series, option) {
        var animation = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Animation"]({});
        var path = series.pathElement;
        var strokeDashArray = path.getAttribute('stroke-dasharray');
        var pathLength = series.pathElement.getTotalLength();
        var currentTime;
        path.style.visibility = 'hidden';
        animation.animate(path, {
            duration: option.duration,
            delay: option.delay,
            progress: function (args) {
                if (args.timeStamp >= args.delay) {
                    path.style.visibility = 'visible';
                    currentTime = Math.abs(Math.round(((args.timeStamp - args.delay) * pathLength) / args.duration));
                    path.setAttribute('stroke-dasharray', currentTime + ',' + pathLength);
                }
            },
            end: function (model) {
                path.setAttribute('stroke-dasharray', strokeDashArray);
                series.chart.trigger('animationComplete', { series: series.chart.isBlazor ? {} : series });
            }
        });
    };
    /**
     * To store the symbol location and region
     * @param point
     * @param series
     * @param isInverted
     * @param getLocation
     */
    LineBase.prototype.storePointLocation = function (point, series, isInverted, getLocation) {
        var markerWidth = (series.marker && series.marker.width) ? series.marker.width : 0;
        var markerHeight = (series.marker && series.marker.height) ? series.marker.height : 0;
        point.symbolLocations.push(getLocation(point.xValue, point.yValue, series.xAxis, series.yAxis, isInverted, series));
        point.regions.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](point.symbolLocations[0].x - markerWidth, point.symbolLocations[0].y - markerHeight, 2 * markerWidth, 2 * markerHeight));
    };
    /**
     * To do the linear animation.
     * @return {void}
     * @private
     */
    LineBase.prototype.doLinearAnimation = function (series, animation) {
        var clipRect = series.clipRectElement.childNodes[0].childNodes[0];
        var duration = series.chart.animated ? series.chart.duration : animation.duration;
        var effect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getAnimationFunction"])('Linear');
        var elementHeight = +clipRect.getAttribute('height');
        var elementWidth = +clipRect.getAttribute('width');
        var xCenter = +clipRect.getAttribute('x');
        var yCenter = series.chart.requireInvertedAxis ? +clipRect.getAttribute('height') + +clipRect.getAttribute('y') :
            +clipRect.getAttribute('y');
        var value;
        clipRect.style.visibility = 'hidden';
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Animation"]({}).animate(clipRect, {
            duration: duration,
            delay: animation.delay,
            progress: function (args) {
                if (args.timeStamp >= args.delay) {
                    clipRect.style.visibility = 'visible';
                    if (series.chart.requireInvertedAxis) {
                        value = effect(args.timeStamp - args.delay, 0, elementHeight, args.duration);
                        clipRect.setAttribute('transform', 'translate(' + xCenter + ' ' + yCenter +
                            ') scale(1,' + (value / elementHeight) + ') translate(' + (-xCenter) + ' ' + (-yCenter) + ')');
                    }
                    else {
                        value = effect(args.timeStamp - args.delay, 0, elementWidth, args.duration);
                        clipRect.setAttribute('transform', 'translate(' + xCenter + ' ' + yCenter +
                            ') scale(' + (value / elementWidth) + ', 1) translate(' + (-xCenter) + ' ' + (-yCenter) + ')');
                    }
                }
            },
            end: function (model) {
                clipRect.setAttribute('transform', 'translate(0,0)');
                series.chart.trigger('animationComplete', { series: series.chart.isBlazor ? {} : series });
            }
        });
    };
    return LineBase;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-series.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/line-series.js ***!
  \*****************************************************************************/
/*! exports provided: LineSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineSeries", function() { return LineSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _line_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `LineSeries` module used to render the line series.
 */
var LineSeries = /** @class */ (function (_super) {
    __extends(LineSeries, _super);
    function LineSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Line Series.
     * @return {void}.
     * @private
     */
    LineSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var point1;
        var point2;
        var direction = '';
        var prevPoint = null;
        var startPoint = 'M';
        var options;
        var isPolar = (series.chart && series.chart.chartAreaType === 'PolarRadar');
        var isDrop = (series.emptyPointSettings && series.emptyPointSettings.mode === 'Drop');
        var getCoordinate = isPolar ? _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TransformToVisible"] : _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"];
        var visiblePoints = this.enableComplexProperty(series);
        for (var _i = 0, visiblePoints_1 = visiblePoints; _i < visiblePoints_1.length; _i++) {
            var point = visiblePoints_1[_i];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series)) {
                direction += this.getLineDirection(prevPoint, point, series, isInverted, getCoordinate, startPoint);
                startPoint = prevPoint ? 'L' : startPoint;
                prevPoint = point;
                this.storePointLocation(point, series, isInverted, getCoordinate);
            }
            else {
                prevPoint = isDrop ? prevPoint : null;
                startPoint = isDrop ? startPoint : 'M';
                point.symbolLocations = [];
            }
        }
        if (isPolar) {
            if (series.isClosed) {
                point2 = getCoordinate(visiblePoints[visiblePoints.length - 1].xValue, visiblePoints[visiblePoints.length - 1].yValue, xAxis, yAxis, isInverted, series);
                point1 = getCoordinate(visiblePoints[0].xValue, visiblePoints[0].yValue, xAxis, yAxis, isInverted, series);
                direction = direction.concat(startPoint + ' ' + point2.x + ' ' + point2.y + ' ' + 'L' + ' ' + point1.x + ' ' + point1.y);
            }
        }
        var name = series.category === 'Indicator' ? series.chart.element.id + '_Indicator_' + series.index + '_' + series.name :
            series.category === 'TrendLine' ? series.chart.element.id + '_Series_' + series.sourceIndex + '_TrendLine_' + series.index :
                series.chart.element.id + '_Series_' + (series.index === undefined ? series.category : series.index);
        options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](name, 'none', series.width, series.interior, series.opacity, series.dashArray, direction);
        this.appendLinePath(options, series, '');
        this.renderMarker(series);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    LineSeries.prototype.doAnimation = function (series) {
        var option = series.animation;
        this.doProgressiveAnimation(series, option);
    };
    /**
     * Get module name.
     */
    LineSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'LineSeries';
    };
    /**
     * To destroy the line series.
     * @return {void}
     * @private
     */
    LineSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return LineSeries;
}(_line_base__WEBPACK_IMPORTED_MODULE_2__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/marker-explode.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/marker-explode.js ***!
  \********************************************************************************/
/*! exports provided: MarkerExplode */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerExplode", function() { return MarkerExplode; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _chart_utils_get_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../chart/utils/get-data */ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/get-data.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * Marker Module used to render the marker for line type series.
 */
var MarkerExplode = /** @class */ (function (_super) {
    __extends(MarkerExplode, _super);
    /**
     * Constructor for the marker module.
     * @private
     */
    function MarkerExplode(chart) {
        var _this = _super.call(this, chart) || this;
        _this.elementId = chart.element.id;
        return _this;
    }
    /**
     * @hidden
     */
    MarkerExplode.prototype.addEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchMoveEvent, this.mouseMoveHandler, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchEndEvent, this.mouseUpHandler, this);
    };
    /**
     * @hidden
     */
    MarkerExplode.prototype.removeEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchMoveEvent, this.mouseMoveHandler);
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].touchEndEvent, this.mouseUpHandler);
    };
    /**
     * @hidden
     */
    MarkerExplode.prototype.mouseUpHandler = function () {
        var chart = this.chart;
        if (chart.isTouch && !chart.crosshair.enable && !this.isSelected(chart)) {
            this.markerMove(true);
        }
    };
    /**
     * @hidden
     */
    MarkerExplode.prototype.mouseMoveHandler = function () {
        var chart = this.chart;
        if ((!chart.crosshair.enable || (chart.tooltip.enable)) && (!chart.isTouch || chart.startMove) && !this.isSelected(chart)) {
            this.markerMove(false);
        }
    };
    MarkerExplode.prototype.markerMove = function (remove) {
        var _this = this;
        var chart = this.chart;
        this.currentPoints = [];
        var data;
        var previous;
        var explodeSeries;
        var series;
        if (!chart.tooltip.shared || !chart.tooltip.enable) {
            data = this.getData();
            series = data.series;
            previous = this.previousPoints[0];
            explodeSeries = series && ((series.type === 'Bubble' || series.drawType === 'Scatter' || series.type === 'Scatter') ||
                (((series.type !== 'Candle') && (series.type !== 'Hilo') && (series.type !== 'HiloOpenClose')) &&
                    (series.marker.visible && series.marker.width !== 0 && series.marker.height !== 0)));
            data.lierIndex = this.lierIndex;
            if (data.point && explodeSeries && ((!previous || (previous.point !== data.point)) ||
                (previous && previous.lierIndex > 3 && previous.lierIndex !== this.lierIndex))) {
                this.currentPoints.push(data);
            }
            if (data.point && explodeSeries && chart.isPointMouseDown) {
                this.currentPoints.push(data);
            }
        }
        else {
            if (!Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInBounds"])(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect)) {
                return null;
            }
            if (chart.tooltip.enable) {
                var pointData = chart.chartAreaType === 'PolarRadar' ? this.getData() : null;
                for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
                    var chartSeries = _a[_i];
                    if (!chartSeries.enableTooltip || chartSeries.category === 'Indicator') {
                        continue;
                    }
                    if (chart.chartAreaType === 'Cartesian' && chartSeries.visible) {
                        data = this.getClosestX(chart, chartSeries);
                    }
                    else if (chart.chartAreaType === 'PolarRadar' && chartSeries.visible && pointData.point !== null) {
                        data = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PointData"](chartSeries.points[pointData.point.index], chartSeries);
                    }
                    if (data) {
                        this.currentPoints.push(data);
                        data = null;
                    }
                }
            }
        }
        var length = this.previousPoints.length;
        if (this.currentPoints.length > 0) {
            if (length === 0 || chart.isPointMouseDown || (length > 0 && this.previousPoints[0].point !== this.currentPoints[0].point)) {
                if (this.previousPoints.length > 0) {
                    this.removeHighlightedMarker();
                }
                var _loop_1 = function (data_1) {
                    if ((data_1 && data_1.point) || ((series.type !== 'Candle') &&
                        (series.type !== 'Hilo') && (series.type !== 'HiloOpenClose'))) {
                        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["stopTimer"])(this_1.markerExplode);
                        this_1.isRemove = true;
                        data_1.point.symbolLocations.map(function (location, index) {
                            if (!data_1.series.isRectSeries || data_1.point.marker.visible) {
                                _this.drawTrackBall(data_1.series, data_1.point, location, index);
                            }
                        });
                    }
                };
                var this_1 = this;
                for (var _b = 0, _c = this.currentPoints; _b < _c.length; _b++) {
                    var data_1 = _c[_b];
                    _loop_1(data_1);
                }
                this.previousPoints = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])([], this.currentPoints, null, true);
            }
        }
        if (!chart.tooltip.enable && ((this.currentPoints.length === 0 && this.isRemove) || (remove && this.isRemove) ||
            !Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInBounds"])(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect))) {
            this.isRemove = false;
            this.markerExplode = setTimeout(function () {
                _this.removeHighlightedMarker();
            }, 2000);
        }
        this.currentPoints = [];
    };
    MarkerExplode.prototype.drawTrackBall = function (series, point, location, index) {
        var marker = point.marker;
        var seriesMarker = series.marker;
        var shape = marker.shape || seriesMarker.shape;
        var element = series.symbolElement || series.seriesElement;
        var symbolId = this.elementId + '_Series_' + series.index + '_Point_' + point.index + '_Trackball' +
            (index ? index : '');
        var size = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"]((marker.width || seriesMarker.width) + 5, (marker.height || seriesMarker.height) + 5);
        var border = (marker.border || series.border);
        var explodeSeries = (series.type === 'BoxAndWhisker' || series.type === 'Bubble' || series.type === 'Scatter');
        var borderColor = (border.color && border.color !== 'transparent') ? border.color :
            marker.fill || point.interior || (explodeSeries ? point.color : series.interior);
        var colorValue = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["convertHexToColor"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["colorNameToHex"])(borderColor));
        var borderWidth = marker.border ? marker.border.width : seriesMarker.border.width;
        var markerShadow = series.chart.themeStyle.markerShadow ||
            'rgba(' + colorValue.r + ',' + colorValue.g + ',' + colorValue.b + ',0.2)';
        for (var i = 0; i < 2; i++) {
            var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](symbolId + '_' + i, i ? (marker.fill || point.color || (explodeSeries ? series.interior : '#ffffff')) : 'transparent', borderWidth + (i ? 0 : 8), i ? borderColor : markerShadow, (marker.opacity || seriesMarker.opacity), null, null);
            var symbol = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"])(location, shape, size, seriesMarker.imageUrl, options, '', this.chart.svgRenderer, series.clipRect);
            symbol.setAttribute('style', 'pointer-events:none');
            symbol.setAttribute('class', 'EJ2-Trackball');
            element.appendChild(symbol);
        }
    };
    /**
     * @hidden
     */
    MarkerExplode.prototype.removeHighlightedMarker = function () {
        var elements = document.getElementsByClassName('EJ2-Trackball');
        for (var i = 0, len = elements.length; i < len; i++) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["remove"])(elements[0]);
        }
        this.previousPoints = [];
    };
    return MarkerExplode;
}(_chart_utils_get_data__WEBPACK_IMPORTED_MODULE_3__["ChartData"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/marker.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/marker.js ***!
  \************************************************************************/
/*! exports provided: Marker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Marker", function() { return Marker; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _marker_explode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./marker-explode */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/marker-explode.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







/**
 * Marker module used to render the marker for line type series.
 */
var Marker = /** @class */ (function (_super) {
    __extends(Marker, _super);
    /**
     * Constructor for the marker module.
     * @private
     */
    function Marker(chart) {
        var _this = _super.call(this, chart) || this;
        _this.addEventListener();
        return _this;
    }
    /**
     * Render the marker for series.
     * @return {void}
     * @private
     */
    Marker.prototype.render = function (series) {
        var _this = this;
        var redraw = series.chart.redraw;
        this.createElement(series, redraw);
        var _loop_1 = function (point) {
            if (point.visible && point.symbolLocations.length) {
                point.symbolLocations.map(function (location, index) {
                    _this.renderMarker(series, point, location, index, redraw);
                });
            }
        };
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            _loop_1(point);
        }
    };
    Marker.prototype.renderMarker = function (series, point, location, index, redraw) {
        var seriesIndex = series.index === undefined ? series.category : series.index;
        var marker = series.marker;
        var border = {
            color: marker.border.color,
            width: marker.border.width
        };
        var borderColor = marker.border.color;
        var symbolId;
        var previousLocation;
        var previousPath;
        var circlePath;
        var shapeOption;
        var isBoxPlot = series.type === 'BoxAndWhisker';
        var fill = marker.fill || (isBoxPlot ? point.interior || series.interior : '#ffffff');
        var argsData;
        var markerElement;
        var parentElement = isBoxPlot ?
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["findlElement"])(series.seriesElement.childNodes, 'Series_' + series.index + '_Point_' + point.index)
            : series.symbolElement;
        border.color = borderColor || series.setPointColor(point, series.interior);
        symbolId = this.elementId + '_Series_' + seriesIndex + '_Point_' + point.index + '_Symbol' +
            (index ? index : '');
        argsData = {
            cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_3__["pointRender"], series: series, point: point,
            fill: point.isEmpty ? (series.emptyPointSettings.fill || fill) : fill,
            border: {
                color: series.type === 'BoxAndWhisker' ?
                    (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(borderColor) && borderColor !== 'transparent') ? borderColor :
                        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getSaturationColor"])(fill, -0.6)
                    : border.color,
                width: border.width
            },
            height: marker.height,
            width: marker.width,
            shape: marker.shape
        };
        argsData.border = series.setBorderColor(point, { width: argsData.border.width, color: argsData.border.color });
        if (!series.isRectSeries || series.type === 'BoxAndWhisker') {
            this.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_3__["pointRender"], argsData);
            point.color = argsData.fill;
        }
        point.color = argsData.fill;
        if (!argsData.cancel) {
            var y = void 0;
            if (series.type === 'RangeArea' || series.type === 'RangeColumn') {
                y = index ? point.low : point.high;
            }
            else if (isBoxPlot) {
                y = point.outliers[index];
            }
            else {
                y = point.y;
            }
            shapeOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](symbolId, argsData.fill, argsData.border.width, argsData.border.color, marker.opacity, null);
            if ((parentElement !== undefined && parentElement !== null) || this.chart.enableCanvas) {
                if (redraw && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(shapeOption.id)) {
                    markerElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(shapeOption.id);
                    circlePath = argsData.shape === 'Circle' ? 'c' : '';
                    previousLocation = {
                        x: +markerElement.getAttribute(circlePath + 'x'), y: +markerElement.getAttribute(circlePath + 'y')
                    };
                    previousPath = markerElement.getAttribute('d');
                }
                markerElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"])(location, argsData.shape, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](argsData.width, argsData.height), marker.imageUrl, shapeOption, point.x.toString() + ':' + y.toString(), this.chart.renderer, series.clipRect);
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(this.chart.enableCanvas, parentElement, markerElement, redraw, true, circlePath + 'x', circlePath + 'y', previousLocation, previousPath, false, false, null, series.chart.duration);
            }
            point.marker = {
                border: argsData.border,
                fill: argsData.fill,
                height: argsData.height,
                visible: true,
                shape: argsData.shape,
                width: argsData.width
            };
        }
        else {
            location = null;
            point.marker = {
                visible: false
            };
        }
    };
    Marker.prototype.createElement = function (series, redraw) {
        var markerClipRect;
        var marker = series.marker;
        // 8 for extend border value 5 for extend size value
        var explodeValue = marker.border.width + 8 + 5;
        var render = series.chart.svgRenderer;
        var transform;
        var index = series.index === undefined ? series.category : series.index;
        var options;
        transform = series.chart.chartAreaType === 'Cartesian' ? 'translate(' + series.clipRect.x + ',' + (series.clipRect.y) + ')' : '';
        if (marker.visible) {
            var markerHeight = (marker.height + explodeValue) / 2;
            var markerWidth = (marker.width + explodeValue) / 2;
            if (series.chart.chartAreaType === 'Cartesian') {
                options = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["RectOption"](this.elementId + '_ChartMarkerClipRect_' + index, 'transparent', { width: 1, color: 'Gray' }, 1, {
                    x: -markerWidth, y: -markerHeight,
                    width: series.clipRect.width + markerWidth * 2,
                    height: series.clipRect.height + markerHeight * 2
                });
                markerClipRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendClipElement"])(redraw, options, render);
            }
            else {
                options = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CircleOption"](this.elementId + '_ChartMarkerClipRect_' + index, 'transparent', { width: 1, color: 'Gray' }, 1, series.clipRect.width / 2 + series.clipRect.x, series.clipRect.height / 2 + series.clipRect.y, series.chart.radius + Math.max(markerHeight, markerWidth));
                markerClipRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendClipElement"])(redraw, options, render, 'drawCircularClipPath');
            }
            options = {
                'id': this.elementId + 'SymbolGroup' + index,
                'transform': transform,
                'clip-path': 'url(#' + this.elementId + '_ChartMarkerClipRect_' + index + ')'
            };
            series.symbolElement = render.createGroup(options);
            series.symbolElement.appendChild(markerClipRect);
            if (this.chart.enableCanvas) {
                var element = document.getElementById(this.chart.element.id + '_tooltip_svg');
                element.appendChild(series.symbolElement);
            }
        }
    };
    Marker.prototype.getRangeLowPoint = function (region, series) {
        var x = region.x;
        var y = region.y;
        if (series.chart.requireInvertedAxis) {
            y += region.height / 2;
            x += series.yAxis.isInversed ? region.width : 0;
        }
        else {
            y += series.yAxis.isInversed ? 0 : region.height;
            x += region.width / 2;
        }
        return { x: x, y: y };
    };
    /**
     * Animates the marker.
     * @return {void}.
     * @private
     */
    Marker.prototype.doMarkerAnimation = function (series) {
        if (!(series.type === 'Scatter' || series.type === 'Bubble' || series.type === 'Candle' || series.type === 'Hilo' ||
            series.type === 'HiloOpenClose' || (series.chart.chartAreaType === 'PolarRadar' && (series.drawType === 'Scatter')))) {
            var markerElements = series.symbolElement.childNodes;
            var delay = series.animation.delay + series.animation.duration;
            var duration = series.chart.animated ? series.chart.duration : 200;
            var j = 1;
            var incFactor = (series.type === 'RangeArea' || series.type === 'RangeColumn') ? 2 : 1;
            for (var i = 0; i < series.points.length; i++) {
                if (!series.points[i].symbolLocations.length || !markerElements[j]) {
                    continue;
                }
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["markerAnimate"])(markerElements[j], delay, duration, series, i, series.points[i].symbolLocations[0], false);
                if (incFactor === 2) {
                    var lowPoint = this.getRangeLowPoint(series.points[i].regions[0], series);
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["markerAnimate"])(markerElements[j + 1], delay, duration, series, i, lowPoint, false);
                }
                j += incFactor;
            }
        }
    };
    return Marker;
}(_marker_explode__WEBPACK_IMPORTED_MODULE_4__["MarkerExplode"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-area-series.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-area-series.js ***!
  \*******************************************************************************************/
/*! exports provided: MultiColoredAreaSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiColoredAreaSeries", function() { return MultiColoredAreaSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _multi_colored_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./multi-colored-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `MultiColoredAreaSeries` module used to render the area series with multi color.
 */
var MultiColoredAreaSeries = /** @class */ (function (_super) {
    __extends(MultiColoredAreaSeries, _super);
    function MultiColoredAreaSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Area series.
     * @return {void}
     * @private
     */
    MultiColoredAreaSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var _this = this;
        var firstPoint;
        var startPoint = null;
        var direction = '';
        var origin = Math.max(series.yAxis.visibleRange.min, 0);
        var options = [];
        var startRegion;
        var previous;
        var rendered;
        var segments = this.sortSegments(series, series.segments);
        series.points.map(function (point, i, seriesPoints) {
            point.symbolLocations = [];
            point.regions = [];
            rendered = false;
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(seriesPoints[i - 1], point, seriesPoints[i + 1], series)) {
                direction += _this.getAreaPathDirection(point.xValue, origin, series, isInverted, _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"], startPoint, 'M');
                startPoint = startPoint || new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](point.xValue, origin);
                firstPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.yValue, xAxis, yAxis, isInverted, series);
                if (previous && _this.setPointColor(point, previous, series, series.segmentAxis === 'X', segments)) {
                    rendered = true;
                    startRegion = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(startPoint.x, origin, xAxis, yAxis, isInverted, series);
                    direction += ('L' + ' ' + (firstPoint.x) + ' ' + (firstPoint.y) + ' ');
                    direction += ('L' + ' ' + (firstPoint.x) + ' ' + (startRegion.y) + ' ');
                    _this.generatePathOption(options, series, previous, direction, '_Point_' + previous.index);
                    direction = 'M' + ' ' + (firstPoint.x) + ' ' + (startRegion.y) + ' ' + 'L' + ' ' +
                        (firstPoint.x) + ' ' + (firstPoint.y) + ' ';
                }
                else {
                    direction += ('L' + ' ' + (firstPoint.x) + ' ' + (firstPoint.y) + ' ');
                    _this.setPointColor(point, null, series, series.segmentAxis === 'X', segments);
                }
                if (seriesPoints[i + 1] && !seriesPoints[i + 1].visible && series.emptyPointSettings.mode !== 'Drop') {
                    direction += _this.getAreaEmptyDirection({ 'x': point.xValue, 'y': origin }, startPoint, series, isInverted, _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"]);
                    startPoint = null;
                }
                previous = point;
                _this.storePointLocation(point, series, isInverted, _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"]);
            }
        });
        if (!rendered) {
            direction = series.points.length > 1 ?
                (direction + this.getAreaPathDirection(previous.xValue, origin, series, isInverted, _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"], null, 'L')) : '';
            this.generatePathOption(options, series, previous, direction, '');
        }
        this.applySegmentAxis(series, options, segments);
        this.renderMarker(series);
    };
    /**
     * To Store the path directions of the area
     */
    MultiColoredAreaSeries.prototype.generatePathOption = function (options, series, point, direction, id) {
        options.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index + id, series.setPointColor(point, series.interior), series.border.width, series.border.color, series.opacity, series.dashArray, direction));
    };
    /**
     * To destroy the area series.
     * @return {void}
     * @private
     */
    MultiColoredAreaSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    /**
     * Get module name
     */
    MultiColoredAreaSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'MultiColoredAreaSeries';
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    MultiColoredAreaSeries.prototype.doAnimation = function (series) {
        this.doLinearAnimation(series, series.animation);
    };
    return MultiColoredAreaSeries;
}(_multi_colored_base__WEBPACK_IMPORTED_MODULE_2__["MultiColoredSeries"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-base.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-base.js ***!
  \************************************************************************************/
/*! exports provided: MultiColoredSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiColoredSeries", function() { return MultiColoredSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _line_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * Base class for multi colored series
 */
var MultiColoredSeries = /** @class */ (function (_super) {
    __extends(MultiColoredSeries, _super);
    function MultiColoredSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * To Generate the area path direction
     * @param xValue
     * @param yValue
     * @param series
     * @param isInverted
     * @param getPointLocation
     * @param startPoint
     * @param startPath
     */
    MultiColoredSeries.prototype.getAreaPathDirection = function (xValue, yValue, series, isInverted, getPointLocation, startPoint, startPath) {
        var direction = '';
        var firstPoint;
        if (startPoint === null) {
            firstPoint = getPointLocation(xValue, yValue, series.xAxis, series.yAxis, isInverted, series);
            direction += (startPath + ' ' + (firstPoint.x) + ' ' + (firstPoint.y) + ' ');
        }
        return direction;
    };
    /**
     * To Generate the empty point direction
     * @param firstPoint
     * @param secondPoint
     * @param series
     * @param isInverted
     * @param getPointLocation
     */
    MultiColoredSeries.prototype.getAreaEmptyDirection = function (firstPoint, secondPoint, series, isInverted, getPointLocation) {
        var direction = '';
        direction += this.getAreaPathDirection(firstPoint.x, firstPoint.y, series, isInverted, getPointLocation, null, 'L');
        direction += this.getAreaPathDirection(secondPoint.x, secondPoint.y, series, isInverted, getPointLocation, null, 'L');
        return direction;
    };
    /**
     * To set point color
     * @param points
     */
    MultiColoredSeries.prototype.setPointColor = function (currentPoint, previous, series, isXSegment, segments) {
        if (series.pointColorMapping === '') {
            var segment = void 0;
            var value = void 0;
            for (var i = 0; i < segments.length; i++) {
                segment = segments[i];
                value = isXSegment ? currentPoint.xValue : currentPoint.yValue;
                if (value <= this.getAxisValue(segment.value, isXSegment ? series.xAxis : series.yAxis, series.chart) || !segment.value) {
                    currentPoint.interior = segment.color;
                    break;
                }
            }
            if (currentPoint.interior == null) {
                currentPoint.interior = series.interior;
            }
            return false;
        }
        else {
            if (previous) {
                return series.setPointColor(currentPoint, series.interior) !== series.setPointColor(previous, series.interior);
            }
            else {
                return false;
            }
        }
    };
    MultiColoredSeries.prototype.sortSegments = function (series, chartSegments) {
        var axis = series.segmentAxis === 'X' ? series.xAxis : series.yAxis;
        var segments = [].concat(chartSegments);
        var access = this;
        return segments.sort(function (a, b) {
            return access.getAxisValue(a.value, axis, series.chart) - access.getAxisValue(b.value, axis, series.chart);
        });
    };
    /**
     * Segment calculation performed here
     * @param series
     * @param options
     * @param chartSegments
     */
    MultiColoredSeries.prototype.applySegmentAxis = function (series, options, segments) {
        var _this = this;
        if (series.pointColorMapping !== '') {
            options.map(function (option) {
                _this.appendLinePath(option, series, '');
            });
            return null;
        }
        var isXSegment = series.segmentAxis === 'X';
        var axis = isXSegment ? series.xAxis : series.yAxis;
        var chart = series.chart;
        var segment;
        this.includeSegment(segments, axis, series, segments.length);
        var length = segments.length;
        var value;
        var clipPath;
        var attributeOptions;
        var _loop_1 = function (index) {
            segment = segments[index];
            value = this_1.getAxisValue(segment.value, axis, series.chart);
            clipPath = this_1.createClipRect(index ? this_1.getAxisValue(segments[index - 1].value, axis, series.chart)
                : axis.visibleRange.min, value, series, index, isXSegment);
            if (clipPath) {
                options.map(function (option) {
                    attributeOptions = {
                        'clip-path': clipPath,
                        'stroke-dasharray': segment.dashArray,
                        'opacity': option.opacity,
                        'stroke': series.type.indexOf('Line') > -1 ? segment.color || series.interior : series.border.color,
                        'stroke-width': option['stroke-width'],
                        'fill': series.type.indexOf('Line') > -1 ? 'none' : segment.color || series.interior,
                        'id': option.id + '_Segment_' + index,
                        'd': option.d
                    };
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["pathAnimation"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(attributeOptions.id), attributeOptions.d, chart.redraw);
                    series.seriesElement.appendChild(chart.renderer.drawPath(attributeOptions));
                });
            }
        };
        var this_1 = this;
        for (var index = 0; index < length; index++) {
            _loop_1(index);
        }
    };
    MultiColoredSeries.prototype.includeSegment = function (segments, axis, series, length) {
        if (length <= 0) {
            segments.push({ value: axis.visibleRange.max, color: series.interior });
            return null;
        }
        if (this.getAxisValue(segments[length - 1].value, axis, series.chart) < axis.visibleRange.max) {
            segments.push({ value: axis.visibleRange.max, color: series.interior });
        }
    };
    /**
     * To create clip rect for segment axis
     * @param startValue
     * @param endValue
     * @param series
     * @param index
     * @param isX
     * @param chart
     */
    MultiColoredSeries.prototype.createClipRect = function (startValue, endValue, series, index, isX) {
        var isRequired = series.chart.requireInvertedAxis;
        var startPointLocation = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(isX ? startValue : series.xAxis.visibleRange.min, isX ? series.yAxis.visibleRange.max : endValue, series.xAxis, series.yAxis, isRequired);
        var endPointLocation = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(isX ? endValue : series.xAxis.visibleRange.max, isX ? series.yAxis.visibleRange.min : startValue, series.xAxis, series.yAxis, isRequired);
        endPointLocation = isRequired ?
            [startPointLocation, startPointLocation = endPointLocation][0] : endPointLocation;
        var options;
        if ((endPointLocation.x - startPointLocation.x > 0) && (endPointLocation.y - startPointLocation.y > 0)) {
            options = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["RectOption"](series.chart.element.id + '_ChartSegmentClipRect_' + index, 'transparent', { width: 1, color: 'Gray' }, 1, {
                x: startPointLocation.x,
                y: startPointLocation.y,
                width: endPointLocation.x - startPointLocation.x,
                height: endPointLocation.y - startPointLocation.y
            });
            series.seriesElement.appendChild(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendClipElement"])(series.chart.redraw, options, series.chart.renderer));
            return 'url(#' + series.chart.element.id + '_ChartSegmentClipRect_' + index + ')';
        }
        return null;
    };
    /**
     * To get exact value from segment value
     * @param segmentValue
     * @param axis
     * @param chart
     */
    MultiColoredSeries.prototype.getAxisValue = function (segmentValue, axis, chart) {
        if (segmentValue === null) {
            segmentValue = axis.visibleRange.max;
        }
        if (axis.valueType === 'DateTime') {
            var option = { skeleton: 'full', type: 'dateTime' };
            return Date.parse(chart.intl.getDateParser(option)(chart.intl.getDateFormat(option)(new Date(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].parse.parseJson({ val: segmentValue }).val))));
        }
        else if (axis.valueType.indexOf('Category') > -1) {
            var xValue = axis.valueType === 'DateTimeCategory' ?
                (segmentValue.getTime()).toString() :
                segmentValue;
            return (axis.labels.indexOf(xValue) < 0) ? +segmentValue : axis.labels.indexOf(xValue);
        }
        else {
            return +segmentValue;
        }
    };
    return MultiColoredSeries;
}(_line_base__WEBPACK_IMPORTED_MODULE_1__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-line-series.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-line-series.js ***!
  \*******************************************************************************************/
/*! exports provided: MultiColoredLineSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiColoredLineSeries", function() { return MultiColoredLineSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _multi_colored_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./multi-colored-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/multi-colored-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `MultiColoredLineSeries` used to render the line series with multi color.
 */
var MultiColoredLineSeries = /** @class */ (function (_super) {
    __extends(MultiColoredLineSeries, _super);
    function MultiColoredLineSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Line Series.
     * @return {void}.
     * @private
     */
    MultiColoredLineSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var previous = null;
        var startPoint = 'M';
        var visiblePoints = this.enableComplexProperty(series);
        var options = [];
        var direction = '';
        var segments = this.sortSegments(series, series.segments);
        for (var _i = 0, visiblePoints_1 = visiblePoints; _i < visiblePoints_1.length; _i++) {
            var point = visiblePoints_1[_i];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series)) {
                direction += this.getLineDirection(previous, point, series, isInverted, _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"], startPoint);
                if (previous != null) {
                    if (this.setPointColor(point, previous, series, series.segmentAxis === 'X', segments)) {
                        options.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index + '_Point_' + previous.index, 'none', series.width, series.setPointColor(previous, series.interior), series.opacity, series.dashArray, direction));
                        startPoint = 'M';
                        direction = '';
                    }
                    else {
                        startPoint = 'L';
                    }
                }
                else {
                    this.setPointColor(point, null, series, series.segmentAxis === 'X', segments);
                }
                previous = point;
                this.storePointLocation(point, series, isInverted, _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"]);
            }
            else {
                previous = (series.emptyPointSettings.mode === 'Drop') ? previous : null;
                startPoint = (series.emptyPointSettings.mode === 'Drop') ? startPoint : 'M';
                point.symbolLocations = [];
            }
        }
        if (direction !== '') {
            options.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index, 'none', series.width, series.setPointColor(visiblePoints[visiblePoints.length - 1], series.interior), series.opacity, series.dashArray, direction));
        }
        this.applySegmentAxis(series, options, segments);
        this.renderMarker(series);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    MultiColoredLineSeries.prototype.doAnimation = function (series) {
        this.doLinearAnimation(series, series.animation);
    };
    /**
     * Get module name.
     */
    MultiColoredLineSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'MultiColoredLineSeries';
    };
    /**
     * To destroy the line series.
     * @return {void}
     * @private
     */
    MultiColoredLineSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return MultiColoredLineSeries;
}(_multi_colored_base__WEBPACK_IMPORTED_MODULE_2__["MultiColoredSeries"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/pareto-series.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/pareto-series.js ***!
  \*******************************************************************************/
/*! exports provided: ParetoSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParetoSeries", function() { return ParetoSeries; });
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
/* harmony import */ var _axis_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../axis/axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `Pareto series` module used to render the Pareto series.
 */
var ParetoSeries = /** @class */ (function (_super) {
    __extends(ParetoSeries, _super);
    function ParetoSeries() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.paretoAxes = [];
        return _this;
    }
    /**
     * Defines the Line initialization
     */
    ParetoSeries.prototype.initSeries = function (targetSeries, chart) {
        var series = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](chart, 'series', targetSeries.properties, true);
        series.name = 'Pareto';
        series.yAxisName = targetSeries.yAxisName + '_CumulativeAxis';
        series.category = 'Pareto';
        targetSeries.category = 'Pareto';
        series.type = 'Line';
        series.interior = chart.themeStyle.errorBar;
        chart.visibleSeries.push(series);
        this.initAxis(targetSeries, series, chart);
    };
    /**
     * Defines the Axis initialization for Line
     */
    ParetoSeries.prototype.initAxis = function (paretoSeries, targetSeries, chart) {
        var isExist = this.paretoAxes.some(function (currentAxis) {
            return currentAxis.name === targetSeries.yAxisName;
        });
        if (!isExist) {
            var secondaryAxis = (paretoSeries.yAxisName ? chart.axes.filter(function (axis) {
                return axis.name === paretoSeries.yAxisName;
            })[0] : chart.primaryYAxis);
            var newAxis = new _axis_axis__WEBPACK_IMPORTED_MODULE_2__["Axis"](chart, 'axis', {
                name: targetSeries.yAxisName,
                majorGridLines: {
                    width: 0
                },
                majorTickLines: secondaryAxis.majorTickLines,
                lineStyle: secondaryAxis.lineStyle,
                minimum: 0,
                maximum: 100,
                rowIndex: secondaryAxis.rowIndex,
                opposedPosition: true,
                labelFormat: '{value}%'
            });
            this.paretoAxes.push(newAxis);
        }
    };
    /**
     * Render Pareto series.
     * @return {void}
     * @private
     */
    ParetoSeries.prototype.render = function (series) {
        series.chart.columnSeriesModule.render(series);
    };
    /**
     * To perform the cumulative calculation for pareto series.
     */
    ParetoSeries.prototype.performCumulativeCalculation = function (json, series) {
        var data = json;
        var sum = 0;
        var count = 0;
        var length = data.length;
        for (var i = 0; i < length; i++) {
            sum += data[i][series.yName];
        }
        for (var i = 0; i < length; i++) {
            count = count + data[i][series.yName];
            data[i][series.yName] = Math.round((count / sum) * 100);
        }
        return data;
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    ParetoSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * Get module name.
     */
    ParetoSeries.prototype.getModuleName = function () {
        return 'ParetoSeries';
        /**
         * return the module name
         */
    };
    /**
     * To destroy the pareto series.
     * @return {void}
     * @private
     */
    ParetoSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return ParetoSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_1__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/polar-series.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/polar-series.js ***!
  \******************************************************************************/
/*! exports provided: PolarSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PolarSeries", function() { return PolarSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _axis_polar_radar_panel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../axis/polar-radar-panel */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/polar-radar-panel.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





/**
 * `PolarSeries` module is used to render the polar series.
 */
var PolarSeries = /** @class */ (function (_super) {
    __extends(PolarSeries, _super);
    function PolarSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Polar Series.
     * @return {void}.
     * @private
     */
    PolarSeries.prototype.render = function (series, xAxis, yAxis, inverted) {
        var seriesType = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(series.drawType);
        if (series.drawType.indexOf('Column') > -1) {
            this.columnDrawTypeRender(series, xAxis, yAxis);
        }
        else {
            series.chart[seriesType + 'SeriesModule'].render(series, xAxis, yAxis, inverted);
        }
    };
    /**
     * Render Column DrawType.
     * @return {void}.
     * @private
     */
    PolarSeries.prototype.columnDrawTypeRender = function (series, xAxis, yAxis) {
        var options;
        var argsData;
        var startAngle;
        var endAngle;
        var itemCurrentXPos;
        var radius;
        var inversedValue;
        var pointStartAngle;
        var pointEndAngle;
        var x1;
        var x2;
        var y1;
        var y2;
        var startValue;
        var endValue;
        var innerRadius;
        var min = xAxis.actualRange.min;
        var centerX = (series.clipRect.width / 2) + series.clipRect.x;
        var dStartX;
        var dStartY;
        var centerY = (series.clipRect.height / 2) + series.clipRect.y;
        var dEndX;
        var dEndY;
        var isRangeColumn = series.drawType === 'RangeColumn';
        var isPolar = series.type === 'Polar';
        var isLogAxis = yAxis.valueType === 'Logarithmic';
        var isStacking = series.drawType === 'StackingColumn';
        var direction = '';
        var sumofYValues = 0;
        var interval = (series.points[1] ? series.points[1].xValue : 2 * series.points[0].xValue) - series.points[0].xValue;
        var ticks = xAxis.valueType === 'Category' && xAxis.labelPlacement === 'BetweenTicks' ? 0 : interval / 2;
        var rangeInterval = xAxis.valueType === 'DateTime' ? xAxis.dateTimeInterval : 1;
        this.getSeriesPosition(series);
        var position = xAxis.isInversed ? (series.rectCount - 1 - series.position) : series.position;
        do {
            sumofYValues += rangeInterval;
            min += rangeInterval;
        } while (min <= xAxis.actualRange.max - (xAxis.valueType === 'Category' ? 0 : 1));
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
                inversedValue = xAxis.isInversed ? (xAxis.visibleRange.max - point.xValue) :
                    point.xValue - xAxis.visibleRange.min;
                itemCurrentXPos = (inversedValue) +
                    ((interval / series.rectCount) * position - ticks) + (sumofYValues / 360 * xAxis.startAngle);
                itemCurrentXPos = (((itemCurrentXPos) / (sumofYValues)));
                startAngle = 2 * Math.PI * (itemCurrentXPos + xAxis.startAngle);
                endAngle = 2 * Math.PI * ((itemCurrentXPos + xAxis.startAngle) + (interval / series.rectCount) / (sumofYValues));
                pointStartAngle = startAngle;
                pointEndAngle = endAngle;
                startAngle = (startAngle - 0.5 * Math.PI);
                endAngle = (endAngle - 0.5 * Math.PI) - 0.000001;
                if (isStacking || isRangeColumn) {
                    startValue = isRangeColumn ? point.low : series.stackedValues.startValues[point.index];
                    endValue = isRangeColumn ? point.high : series.stackedValues.endValues[point.index];
                    endValue = (isLogAxis ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["logBase"])(endValue === 0 ? 1 : endValue, yAxis.logBase) : endValue);
                    endValue = endValue > yAxis.actualRange.max ? yAxis.actualRange.max : endValue;
                    radius = startValue === endValue ? 0 : series.chart.radius * Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])(endValue, yAxis);
                    x1 = centerX + radius * Math.cos(startAngle);
                    x2 = centerX + radius * Math.cos(endAngle);
                    y1 = centerY + radius * Math.sin(startAngle);
                    y2 = centerY + radius * Math.sin(endAngle);
                    innerRadius = series.chart.radius * Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])((startValue === 0 && yAxis.visibleRange.min !== 0) ? yAxis.visibleRange.min : startValue, yAxis);
                    dStartX = centerX + innerRadius * Math.cos(startAngle);
                    dStartY = centerY + innerRadius * Math.sin(startAngle);
                    dEndX = centerX + innerRadius * Math.cos(endAngle);
                    dEndY = centerY + innerRadius * Math.sin(endAngle);
                    if (isPolar) {
                        direction = ('M' + ' ' + x1 + ' ' + y1 + ' ' + 'A' + ' ' + radius + ' ' + radius + ' ' + '0' + ' '
                            + '0' + ' ' + 1 + ' ' + x2 + ' ' + y2 + ' ' + 'L' + ' ' + dEndX + ' ' + dEndY + ' ' +
                            'A' + ' ' + innerRadius + ' ' + innerRadius + ' ' + '1' + ' ' + '0' + ' ' + '0' + ' '
                            + dStartX + ' ' + dStartY + ' ' + 'Z');
                    }
                    else {
                        direction = ('M' + ' ' + x1 + ' ' + y1 + ' ' + 'L' + ' ' + x2 + ' ' + y2 + ' ' + 'L '
                            + dEndX + ' ' + dEndY + ' ' + 'L' + ' ' + dStartX + ' ' + dStartY + ' ' + 'Z');
                    }
                    point.regionData = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PolarArc"](pointStartAngle, pointEndAngle, innerRadius, radius, itemCurrentXPos);
                }
                else {
                    endValue = point.yValue > yAxis.actualRange.max ? yAxis.actualRange.max : point.yValue;
                    radius = series.chart.radius *
                        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])((isLogAxis ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["logBase"])(endValue, yAxis.logBase) : endValue), yAxis);
                    x1 = centerX + radius * Math.cos(startAngle);
                    x2 = centerX + radius * Math.cos(endAngle);
                    y1 = centerY + radius * Math.sin(startAngle);
                    y2 = centerY + radius * Math.sin(endAngle);
                    if (isPolar) {
                        direction = ('M' + ' ' + x1 + ' ' + y1 + ' ' + 'A' + ' ' + radius + ' ' + radius + ' ' + '0' + ' ' +
                            '0' + ' ' + 1 + ' ' + x2 + ' ' + y2 + ' ' + 'L' + ' ' + centerX + ' ' +
                            centerY + ' ' + 'Z');
                    }
                    else {
                        direction = ('M' + ' ' + x1 + ' ' + y1 + ' ' + 'L' + ' ' + x2 + ' ' + y2 + ' ' + 'L' + ' '
                            + centerX + ' ' + centerY + ' ' + 'Z');
                    }
                    point.regionData = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PolarArc"](pointStartAngle, pointEndAngle, 0, radius, itemCurrentXPos);
                }
                argsData = this.triggerEvent(series.chart, series, point);
                options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index + '_Point_' + point.index, argsData.fill, argsData.border.width, argsData.border.color, series.opacity, series.dashArray, direction);
                if (!argsData.cancel) {
                    this.appendLinePath(options, series, '');
                    if (isPolar) {
                        point.symbolLocations.push({
                            x: centerX + radius * Math.cos((startAngle + (endAngle - startAngle) / 2)),
                            y: centerY + radius * Math.sin((startAngle + (endAngle - startAngle) / 2))
                        });
                        if (isRangeColumn) {
                            point.symbolLocations.push({
                                x: centerX + innerRadius * Math.cos((startAngle + (endAngle - startAngle) / 2)),
                                y: centerY + innerRadius * Math.sin((startAngle + (endAngle - startAngle) / 2))
                            });
                        }
                    }
                    else {
                        point.symbolLocations.push({ x: (x1 + x2) / 2, y: (y1 + y2) / 2 });
                        if (isRangeColumn) {
                            point.symbolLocations.push({ x: (dEndX + dStartX) / 2, y: (dEndY + dStartY) / 2 });
                        }
                    }
                }
            }
        }
        this.renderMarker(series);
        series.isRectSeries = true;
    };
    /**
     * To trigger the point rendering event.
     * @return {void}
     * @private
     */
    PolarSeries.prototype.triggerEvent = function (chart, series, point) {
        var argsData = {
            cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_3__["pointRender"], series: series, point: point,
            fill: series.setPointColor(point, series.interior),
            border: series.setBorderColor(point, { width: series.border.width, color: series.border.color })
        };
        chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_3__["pointRender"], argsData);
        point.color = argsData.fill;
        return argsData;
    };
    /** get position for column drawtypes
     * @return {void}.
     * @private
     */
    PolarSeries.prototype.getSeriesPosition = function (series) {
        var chart = series.chart;
        var seriesCollection = [];
        var stackingGroup = [];
        var vSeries = { rectCount: 0, position: null };
        for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
            var series_1 = _a[_i];
            if (series_1.visible && (series_1.type === 'Polar' || series_1.type === 'Radar') && series_1.drawType.indexOf('Column') !== -1) {
                seriesCollection.push(series_1);
            }
        }
        seriesCollection.forEach(function (series) {
            if (series.drawType.indexOf('Stacking') !== -1) {
                if (series.stackingGroup) {
                    if (stackingGroup[series.stackingGroup] === undefined) {
                        series.position = vSeries.rectCount;
                        stackingGroup[series.stackingGroup] = vSeries.rectCount++;
                    }
                    else {
                        series.position = stackingGroup[series.stackingGroup];
                    }
                }
                else {
                    if (vSeries.position === null) {
                        series.position = vSeries.rectCount;
                        vSeries.position = vSeries.rectCount++;
                    }
                    else {
                        series.position = vSeries.position;
                    }
                }
            }
            else {
                series.position = vSeries.rectCount++;
            }
        });
        seriesCollection.forEach(function (value) {
            value.rectCount = vSeries.rectCount;
        });
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    PolarSeries.prototype.doAnimation = function (series) {
        var option = series.animation;
        var duration = series.animation.duration;
        var delay = series.animation.delay;
        var rectElements = series.seriesElement.childNodes;
        var count = 1;
        if (series.drawType === 'Scatter') {
            for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                if (!point.symbolLocations.length || !rectElements[count]) {
                    continue;
                }
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["markerAnimate"])(rectElements[count], delay, duration, series, point.index, point.symbolLocations[0], false);
                count++;
            }
        }
        else {
            for (count = 1; count < rectElements.length; count++) {
                this.doPolarRadarAnimation(rectElements[count], delay, duration, series);
            }
        }
    };
    /**
     * To do the Polar Radar draw type column animation.
     * @return {void}
     * @private
     */
    PolarSeries.prototype.doPolarRadarAnimation = function (animateElement, delay, duration, series) {
        var chartcenterX = series.clipRect.width / 2 + series.clipRect.x;
        var chartcenterY = series.clipRect.height / 2 + series.clipRect.y;
        var elementHeight = 0;
        animateElement.style.visibility = 'hidden';
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__["Animation"]({}).animate(animateElement, {
            duration: duration,
            delay: delay,
            progress: function (args) {
                if (args.timeStamp > args.delay) {
                    args.element.style.visibility = 'visible';
                    elementHeight = ((args.timeStamp - args.delay) / args.duration);
                    animateElement.setAttribute('transform', 'translate(' + chartcenterX
                        + ' ' + chartcenterY + ') scale(' + elementHeight + ') translate(' + (-chartcenterX) + ' ' + (-chartcenterY) + ')');
                }
            },
            end: function (model) {
                animateElement.style.visibility = 'visible';
                animateElement.removeAttribute('transform');
                series.chart.trigger('animationComplete', { series: series.chart.isBlazor ? {} : series });
            }
        });
    };
    /**
     * Get module name.
     */
    PolarSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'PolarSeries';
    };
    /**
     * To destroy the polar series.
     * @return {void}
     * @private
     */
    PolarSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return PolarSeries;
}(_axis_polar_radar_panel__WEBPACK_IMPORTED_MODULE_2__["PolarRadarPanel"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/radar-series.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/radar-series.js ***!
  \******************************************************************************/
/*! exports provided: RadarSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RadarSeries", function() { return RadarSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _series_polar_series__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../series/polar-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/polar-series.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `RadarSeries` module is used to render the radar series.
 */
var RadarSeries = /** @class */ (function (_super) {
    __extends(RadarSeries, _super);
    function RadarSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render radar Series.
     * @return {void}.
     * @private
     */
    RadarSeries.prototype.render = function (series, xAxis, yAxis, inverted) {
        var seriesType = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(series.drawType);
        if (series.drawType.indexOf('Column') === -1) {
            series.chart[seriesType + 'SeriesModule'].render(series, xAxis, yAxis, inverted);
        }
        else {
            this.columnDrawTypeRender(series, xAxis, yAxis);
        }
    };
    /**
     * Get module name.
     */
    RadarSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'RadarSeries';
    };
    /**
     * To destroy the radar series.
     * @return {void}
     * @private
     */
    RadarSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return RadarSeries;
}(_series_polar_series__WEBPACK_IMPORTED_MODULE_1__["PolarSeries"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/range-area-series.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/range-area-series.js ***!
  \***********************************************************************************/
/*! exports provided: RangeAreaSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeAreaSeries", function() { return RangeAreaSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _line_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `RangeAreaSeries` module is used to render the range area series.
 */
var RangeAreaSeries = /** @class */ (function (_super) {
    __extends(RangeAreaSeries, _super);
    function RangeAreaSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render RangeArea Series.
     * @return {void}.
     * @private
     */
    RangeAreaSeries.prototype.render = function (series, xAxis, yAxis, inverted) {
        var point;
        var direction = '';
        var command = 'M';
        var closed = undefined;
        var visiblePoints = this.enableComplexProperty(series);
        for (var i = 0, length_1 = visiblePoints.length; i < length_1; i++) {
            point = visiblePoints[i];
            point.symbolLocations = [];
            point.regions = [];
            var low = Math.min(point.low, point.high);
            var high = Math.max(point.low, point.high);
            if (yAxis.isInversed) {
                var temp = low;
                low = high;
                high = temp;
            }
            var lowPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, low, xAxis, yAxis, inverted);
            var highPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, high, xAxis, yAxis, inverted);
            point.symbolLocations.push(highPoint);
            point.symbolLocations.push(lowPoint);
            var rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](Math.min(lowPoint.x, highPoint.x), Math.min(lowPoint.y, highPoint.y), Math.max(Math.abs(highPoint.x - lowPoint.x), series.marker.width), Math.max(Math.abs(highPoint.y - lowPoint.y), series.marker.width));
            if (!inverted) {
                rect.x -= series.marker.width / 2;
            }
            else {
                rect.y -= series.marker.width / 2;
            }
            point.regions.push(rect);
            //Path to connect the high points
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series)) {
                direction = direction.concat(command + ' ' + (lowPoint.x) + ' ' + (lowPoint.y) + ' ');
                closed = false;
                if ((i + 1 < visiblePoints.length && !visiblePoints[i + 1].visible)
                    || i === visiblePoints.length - 1) {
                    // Path to connect the low points
                    direction = this.closeRangeAreaPath(visiblePoints, point, series, direction, i);
                    command = 'M';
                    direction = direction.concat(' ' + 'Z');
                    closed = true;
                }
                command = 'L';
            }
            else {
                if (closed === false && i !== 0) {
                    direction = this.closeRangeAreaPath(visiblePoints, point, series, direction, i);
                    closed = true;
                }
                command = 'M';
                point.symbolLocations = [];
            }
        }
        var name = series.category === 'Indicator' ? series.chart.element.id + '_Indicator_' + series.index + '_' + series.name :
            series.chart.element.id + '_Series_' + series.index;
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](name, series.interior, series.border.width, series.border.color, series.opacity, series.dashArray, direction);
        this.appendLinePath(options, series, '');
        this.renderMarker(series);
    };
    /**
     * path for rendering the low points
     * @return {void}.
     * @private
     */
    RangeAreaSeries.prototype.closeRangeAreaPath = function (visiblePoints, point, series, direction, i) {
        for (var j = i; j >= 0; j--) {
            if (visiblePoints[j].visible && visiblePoints[j].symbolLocations[0]) {
                point = visiblePoints[j];
                direction += 'L' + ' ' + (point.symbolLocations[0].x) + ' ' + ((point.symbolLocations[0].y)) + ' ';
            }
            else {
                break;
            }
        }
        return direction;
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    RangeAreaSeries.prototype.doAnimation = function (series) {
        var option = series.animation;
        this.doLinearAnimation(series, option);
    };
    /**
     * Get module name.
     */
    RangeAreaSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'RangeAreaSeries';
    };
    /**
     * To destroy the line series.
     * @return {void}
     * @private
     */
    RangeAreaSeries.prototype.destroy = function (chart) {
        /**
         * Destroys range area series
         */
    };
    return RangeAreaSeries;
}(_line_base__WEBPACK_IMPORTED_MODULE_2__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/range-column-series.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/range-column-series.js ***!
  \*************************************************************************************/
/*! exports provided: RangeColumnSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeColumnSeries", function() { return RangeColumnSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `RangeColumnSeries` module is used to render the range column series.
 */
var RangeColumnSeries = /** @class */ (function (_super) {
    __extends(RangeColumnSeries, _super);
    function RangeColumnSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render Range Column series.
     * @return {void}
     * @private
     */
    RangeColumnSeries.prototype.render = function (series) {
        var rect;
        var sideBySideInfo = this.getSideBySideInfo(series);
        //let origin: number = Math.max(<number>series.yAxis.visibleRange.min, 0);
        var argsData;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var rangePoint = _a[_i];
            rangePoint.symbolLocations = [];
            rangePoint.regions = [];
            if (rangePoint.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[rangePoint.index - 1], rangePoint, series.points[rangePoint.index + 1], series)) {
                rect = this.getRectangle(rangePoint.xValue + sideBySideInfo.start, rangePoint.high, rangePoint.xValue + sideBySideInfo.end, rangePoint.low, series);
                argsData = this.triggerEvent(series, rangePoint, series.interior, { width: series.border.width, color: series.border.color });
                if (!argsData.cancel) {
                    this.updateSymbolLocation(rangePoint, rect, series);
                    this.drawRectangle(series, rangePoint, rect, argsData);
                }
            }
        }
        this.renderMarker(series);
    };
    /**
     * Get module name.
     */
    RangeColumnSeries.prototype.getModuleName = function () {
        return 'RangeColumnSeries';
        /**
         * return the module name
         */
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    RangeColumnSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * To destroy the range column series.
     * @return {void}
     * @private
     */
    RangeColumnSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return RangeColumnSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_1__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/scatter-series.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/scatter-series.js ***!
  \********************************************************************************/
/*! exports provided: ScatterSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScatterSeries", function() { return ScatterSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");




/**
 * `ScatterSeries` module is used to render the scatter series.
 */
var ScatterSeries = /** @class */ (function () {
    function ScatterSeries() {
    }
    /**
     * Render the scatter series.
     * @return {void}
     * @private
     */
    ScatterSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var marker = series.marker;
        var visiblePoints = series.points;
        var argsData;
        var getCoordinate = series.chart.chartAreaType === 'PolarRadar' ? _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TransformToVisible"] : _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"];
        var startLocation;
        var redraw = series.chart.redraw;
        for (var _i = 0, visiblePoints_1 = visiblePoints; _i < visiblePoints_1.length; _i++) {
            var point = visiblePoints_1[_i];
            startLocation = (redraw && point.symbolLocations) ? point.symbolLocations[0] : null;
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series)) {
                argsData = {
                    cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_2__["pointRender"], series: series, point: point,
                    fill: series.setPointColor(point, series.interior),
                    border: series.setBorderColor(point, { width: series.border.width, color: series.border.color }),
                    height: marker.height, width: marker.width, shape: marker.shape
                };
                series.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_2__["pointRender"], argsData);
                if (!argsData.cancel) {
                    point.symbolLocations.push(getCoordinate(point.xValue, point.yValue, xAxis, yAxis, isInverted, series));
                    point.color = argsData.fill;
                    this.refresh(series, point, argsData, startLocation);
                }
                else {
                    point.marker = { visible: true };
                }
            }
        }
    };
    /**
     * To append scatter element
     * @param series
     * @param point
     * @param argsData
     * @param startLocation
     */
    ScatterSeries.prototype.refresh = function (series, point, argsData, startLocation) {
        var chart = series.chart;
        var circlePath;
        var previousPath;
        var marker = series.marker;
        var shapeOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](chart.element.id + '_Series_' + series.index + '_Point_' + point.index, argsData.fill, argsData.border.width, argsData.border.color, series.opacity, null);
        if (chart.redraw && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(shapeOption.id)) {
            circlePath = argsData.shape === 'Circle' ? 'c' : '';
            previousPath = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(shapeOption.id).getAttribute('d');
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(false, series.seriesElement, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"])(point.symbolLocations[0], argsData.shape, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](argsData.width, argsData.height), marker.imageUrl, shapeOption, point.x.toString() + ':' + point.yValue.toString(), series.chart.svgRenderer, series.clipRect), chart.redraw, true, circlePath + 'x', circlePath + 'y', startLocation, previousPath);
        point.regions.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](point.symbolLocations[0].x - marker.width, point.symbolLocations[0].y - marker.height, 2 * marker.width, 2 * marker.height));
        point.marker = {
            border: argsData.border, fill: argsData.fill,
            height: argsData.height, visible: true,
            width: argsData.width, shape: argsData.shape
        };
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    ScatterSeries.prototype.doAnimation = function (series) {
        var duration = series.animation.duration;
        var delay = series.animation.delay;
        var rectElements = series.seriesElement.childNodes;
        var count = 1;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            if (!point.symbolLocations.length || !rectElements[count]) {
                continue;
            }
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["markerAnimate"])(rectElements[count], delay, duration, series, point.index, point.symbolLocations[0], false);
            count++;
        }
    };
    /**
     * Get module name.
     */
    ScatterSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'ScatterSeries';
    };
    /**
     * To destroy the scatter.
     * @return {void}
     */
    ScatterSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    return ScatterSeries;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-area-series.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-area-series.js ***!
  \************************************************************************************/
/*! exports provided: SplineAreaSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplineAreaSeries", function() { return SplineAreaSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _spline_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./spline-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `SplineAreaSeries` module used to render the spline area series.
 */
var SplineAreaSeries = /** @class */ (function (_super) {
    __extends(SplineAreaSeries, _super);
    function SplineAreaSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render the splineArea series.
     * @return {void}
     * @private
     */
    SplineAreaSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var firstPoint = null;
        var direction = '';
        var startPoint = null;
        var startPoint1 = null;
        var pt1;
        var pt2;
        var bpt1;
        var bpt2;
        var controlPt1;
        var controlPt2;
        var points = this.filterEmptyPoints(series);
        var pointsLength = series.points.length;
        var point;
        var previous;
        var getCoordinate = series.chart.chartAreaType === 'PolarRadar' ? _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TransformToVisible"] : _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"];
        var origin = series.chart.chartAreaType === 'PolarRadar' ? series.points[0].yValue :
            Math.max(series.yAxis.visibleRange.min, 0);
        for (var i = 0; i < pointsLength; i++) {
            point = series.points[i];
            point.symbolLocations = [];
            point.regions = [];
            previous = this.getPreviousIndex(points, point.index - 1, series);
            if (point.visible &&
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(points[previous], point, points[this.getNextIndex(points, point.index - 1, series)], series)) {
                if (firstPoint) {
                    controlPt1 = series.drawPoints[previous].controlPoint1;
                    controlPt2 = series.drawPoints[previous].controlPoint2;
                    pt1 = getCoordinate(firstPoint.xValue, firstPoint.yValue, xAxis, yAxis, isInverted, series);
                    pt2 = getCoordinate(point.xValue, point.yValue, xAxis, yAxis, isInverted, series);
                    bpt1 = getCoordinate(controlPt1.x, controlPt1.y, xAxis, yAxis, isInverted, series);
                    bpt2 = getCoordinate(controlPt2.x, controlPt2.y, xAxis, yAxis, isInverted, series);
                    direction = direction.concat('C ' + bpt1.x + ' '
                        + bpt1.y + ' ' + bpt2.x + ' ' + bpt2.y + ' ' + pt2.x + ' ' + pt2.y + ' ');
                }
                else {
                    // Start point for the current path
                    startPoint = getCoordinate(point.xValue, origin, xAxis, yAxis, isInverted, series);
                    direction += ('M ' + startPoint.x + ' ' + startPoint.y + ' ');
                    // First Point to draw the area path
                    startPoint1 = getCoordinate(point.xValue, point.yValue, xAxis, yAxis, isInverted, series);
                    direction += ('L ' + startPoint1.x + ' ' + startPoint1.y + ' ');
                }
                this.storePointLocation(point, series, isInverted, getCoordinate);
                firstPoint = point;
            }
            else {
                firstPoint = null;
                point.symbolLocations = [];
            }
            if (((i + 1 < pointsLength && !series.points[i + 1].visible) || i === pointsLength - 1)
                && pt2 && startPoint) {
                startPoint = getCoordinate(point.xValue, origin, xAxis, yAxis, isInverted, series);
                direction = direction.concat('L ' + (startPoint.x) + ' ' + (startPoint.y));
            }
        }
        this.appendLinePath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index, series.interior, series.border.width, series.border.color, series.opacity, series.dashArray, direction), series, '');
        this.renderMarker(series);
    };
    /**
     * Get module name.
     */
    SplineAreaSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'SplineAreaSeries';
    };
    /**
     * To destroy the spline.
     * @return {void}
     * @private
     */
    SplineAreaSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    return SplineAreaSeries;
}(_spline_base__WEBPACK_IMPORTED_MODULE_2__["SplineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-base.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-base.js ***!
  \*****************************************************************************/
/*! exports provided: SplineBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplineBase", function() { return SplineBase; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _line_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * render Line series
 */
var SplineBase = /** @class */ (function (_super) {
    __extends(SplineBase, _super);
    /** @private */
    function SplineBase(chartModule) {
        var _this = _super.call(this, chartModule) || this;
        _this.splinePoints = [];
        return _this;
    }
    /**
     * To find the control points for spline.
     * @return {void}
     * @private
     */
    SplineBase.prototype.findSplinePoint = function (series) {
        var value;
        var points = this.filterEmptyPoints(series);
        this.splinePoints = this.findSplineCoefficients(points, series);
        if (points.length > 1) {
            series.drawPoints = [];
            for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
                var point = points_1[_i];
                if (point.index !== 0) {
                    var previous = this.getPreviousIndex(points, point.index - 1, series);
                    value = this.getControlPoints(points[previous], point, this.splinePoints[previous], this.splinePoints[point.index], series);
                    series.drawPoints.push(value);
                    if (point.yValue && value.controlPoint1.y && value.controlPoint2.y) {
                        series.yMin = Math.floor(Math.min(series.yMin, point.yValue, value.controlPoint1.y, value.controlPoint2.y));
                        series.yMax = Math.ceil(Math.max(series.yMax, point.yValue, value.controlPoint1.y, value.controlPoint2.y));
                    }
                }
            }
        }
    };
    SplineBase.prototype.getPreviousIndex = function (points, i, series) {
        if (series.emptyPointSettings.mode !== 'Drop') {
            return i;
        }
        while (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(points[i]) && i > -1) {
            i = i - 1;
        }
        return i;
    };
    SplineBase.prototype.getNextIndex = function (points, i, series) {
        if (series.emptyPointSettings.mode !== 'Drop') {
            return i;
        }
        while (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(points[i]) && i < points.length) {
            i = i + 1;
        }
        return i;
    };
    SplineBase.prototype.filterEmptyPoints = function (series) {
        if (series.emptyPointSettings.mode !== 'Drop') {
            return series.points;
        }
        var points = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])([], series.points, null, true);
        for (var i = 0; i < points.length; i++) {
            points[i].index = i;
            if (points[i].isEmpty) {
                points[i].symbolLocations = [];
                points[i].regions = [];
                points.splice(i, 1);
                i--;
            }
        }
        return points;
    };
    /**
     * To find the natural spline.
     * @return {void}
     * @private
     */
    SplineBase.prototype.findSplineCoefficients = function (points, series) {
        var count = points.length;
        var ySpline = [];
        var ySplineDuplicate = [];
        var coefficient1;
        var coefficient2;
        var coefficient3;
        var dy1;
        var dy2;
        var dx = [];
        var dy = [];
        var slope = [];
        var interPoint;
        var slopeLength;
        var cardinalSplineTension = series.cardinalSplineTension ? series.cardinalSplineTension : 0.5;
        cardinalSplineTension = cardinalSplineTension < 0 ? 0 : cardinalSplineTension > 1 ? 1 : cardinalSplineTension;
        switch (series.splineType) {
            case 'Monotonic':
                for (var i = 0; i < count - 1; i++) {
                    dx[i] = points[i + 1].xValue - points[i].xValue;
                    dy[i] = points[i + 1].yValue - points[i].yValue;
                    slope[i] = dy[i] / dx[i];
                }
                //interpolant points
                slopeLength = slope.length;
                // to find the first and last co-efficient value
                ySpline[0] = slope[0];
                ySpline[count - 1] = slope[slopeLength - 1];
                //to find the other co-efficient values
                for (var j = 0; j < dx.length; j++) {
                    if (slopeLength > j + 1) {
                        if (slope[j] * slope[j + 1] <= 0) {
                            ySpline[j + 1] = 0;
                        }
                        else {
                            interPoint = dx[j] + dx[j + 1];
                            ySpline[j + 1] = 3 * interPoint / ((interPoint + dx[j + 1]) / slope[j] + (interPoint + dx[j]) / slope[j + 1]);
                        }
                    }
                }
                break;
            case 'Cardinal':
                for (var i = 0; i < count; i++) {
                    if (i === 0) {
                        ySpline[i] = (count > 2) ? (cardinalSplineTension * (points[i + 2].xValue - points[i].xValue)) : 0;
                    }
                    else if (i === (count - 1)) {
                        ySpline[i] = (count > 2) ? (cardinalSplineTension * (points[count - 1].xValue - points[count - 3].xValue)) : 0;
                    }
                    else {
                        ySpline[i] = (cardinalSplineTension * (points[i + 1].xValue - points[i - 1].xValue));
                    }
                }
                break;
            default:
                if (series.splineType === 'Clamped') {
                    var firstIndex = (points[1].yValue - points[0].yValue) / (points[1].xValue - points[0].xValue);
                    var lastIndex = (points[count - 1].xValue - points[count - 2].xValue) /
                        (points[count - 1].yValue - points[count - 2].yValue);
                    ySpline[0] = (3 * (points[1].yValue - points[0].yValue)) / (points[1].xValue - points[0].xValue) - 3;
                    ySplineDuplicate[0] = 0.5;
                    ySpline[points.length - 1] = (3 * (points[points.length - 1].yValue - points[points.length - 2].yValue)) /
                        (points[points.length - 1].xValue - points[points.length - 2].xValue);
                    ySpline[0] = ySplineDuplicate[0] = Math.abs(ySpline[0]) === Infinity ? 0 : ySpline[0];
                    ySpline[points.length - 1] = ySplineDuplicate[points.length - 1] = Math.abs(ySpline[points.length - 1]) === Infinity ?
                        0 : ySpline[points.length - 1];
                }
                else {
                    // assigning the first and last value as zero
                    ySpline[0] = ySplineDuplicate[0] = 0;
                    ySpline[points.length - 1] = 0;
                }
                for (var i = 1; i < count - 1; i++) {
                    coefficient1 = points[i].xValue - points[i - 1].xValue;
                    coefficient2 = points[i + 1].xValue - points[i - 1].xValue;
                    coefficient3 = points[i + 1].xValue - points[i].xValue;
                    dy1 = points[i + 1].yValue - points[i].yValue || null;
                    dy2 = points[i].yValue - points[i - 1].yValue || null;
                    if (coefficient1 === 0 || coefficient2 === 0 || coefficient3 === 0) {
                        ySpline[i] = 0;
                        ySplineDuplicate[i] = 0;
                    }
                    else {
                        var p = 1 / (coefficient1 * ySpline[i - 1] + 2 * coefficient2);
                        ySpline[i] = -p * coefficient3;
                        ySplineDuplicate[i] = p * (6 * (dy1 / coefficient3 - dy2 / coefficient1) - coefficient1 * ySplineDuplicate[i - 1]);
                    }
                }
                for (var k = count - 2; k >= 0; k--) {
                    ySpline[k] = ySpline[k] * ySpline[k + 1] + ySplineDuplicate[k];
                }
                break;
        }
        return ySpline;
    };
    /**
     * To find the control points for spline.
     * @return {void}
     * @private
     */
    SplineBase.prototype.getControlPoints = function (point1, point2, ySpline1, ySpline2, series) {
        var controlPoint1;
        var controlPoint2;
        var point;
        var ySplineDuplicate1 = ySpline1;
        var ySplineDuplicate2 = ySpline2;
        switch (series.splineType) {
            case 'Cardinal':
                if (series.xAxis.valueType === 'DateTime') {
                    ySplineDuplicate1 = ySpline1 / this.dateTimeInterval(series);
                    ySplineDuplicate2 = ySpline2 / this.dateTimeInterval(series);
                }
                controlPoint1 = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](point1.xValue + ySpline1 / 3, point1.yValue + ySplineDuplicate1 / 3);
                controlPoint2 = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](point2.xValue - ySpline2 / 3, point2.yValue - ySplineDuplicate2 / 3);
                point = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ControlPoints"](controlPoint1, controlPoint2);
                break;
            case 'Monotonic':
                var value = (point2.xValue - point1.xValue) / 3;
                controlPoint1 = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](point1.xValue + value, point1.yValue + ySpline1 * value);
                controlPoint2 = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](point2.xValue - value, point2.yValue - ySpline2 * value);
                point = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ControlPoints"](controlPoint1, controlPoint2);
                break;
            default:
                var one3 = 1 / 3.0;
                var deltaX2 = (point2.xValue - point1.xValue);
                deltaX2 = deltaX2 * deltaX2;
                var y1 = one3 * (((2 * point1.yValue) + point2.yValue) - one3 * deltaX2 * (ySpline1 + 0.5 * ySpline2));
                var y2 = one3 * ((point1.yValue + (2 * point2.yValue)) - one3 * deltaX2 * (0.5 * ySpline1 + ySpline2));
                controlPoint1 = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"]((2 * (point1.xValue) + (point2.xValue)) * one3, y1);
                controlPoint2 = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](((point1.xValue) + 2 * (point2.xValue)) * one3, y2);
                point = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ControlPoints"](controlPoint1, controlPoint2);
                break;
        }
        return point;
    };
    /**
     * calculate datetime interval in hours
     *
     */
    SplineBase.prototype.dateTimeInterval = function (series) {
        var interval = series.xAxis.actualIntervalType;
        var intervalInMilliseconds;
        if (interval === 'Years') {
            intervalInMilliseconds = 365 * 24 * 60 * 60 * 1000;
        }
        else if (interval === 'Months') {
            intervalInMilliseconds = 30 * 24 * 60 * 60 * 1000;
        }
        else if (interval === 'Days') {
            intervalInMilliseconds = 24 * 60 * 60 * 1000;
        }
        else if (interval === 'Hours') {
            intervalInMilliseconds = 60 * 60 * 1000;
        }
        else if (interval === 'Minutes') {
            intervalInMilliseconds = 60 * 1000;
        }
        else if (interval === 'Seconds') {
            intervalInMilliseconds = 1000;
        }
        else {
            intervalInMilliseconds = 30 * 24 * 60 * 60 * 1000;
        }
        return intervalInMilliseconds;
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    SplineBase.prototype.doAnimation = function (series) {
        var option = series.animation;
        this.doLinearAnimation(series, option);
    };
    return SplineBase;
}(_line_base__WEBPACK_IMPORTED_MODULE_2__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-series.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-series.js ***!
  \*******************************************************************************/
/*! exports provided: SplineSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplineSeries", function() { return SplineSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _spline_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./spline-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/spline-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `SplineSeries` module is used to render the spline series.
 */
var SplineSeries = /** @class */ (function (_super) {
    __extends(SplineSeries, _super);
    function SplineSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render the spline series.
     * @return {void}
     * @private
     */
    SplineSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var chart = series.chart;
        var marker = series.marker;
        var ySpline;
        var options;
        var firstPoint = null;
        var secondPoint = null;
        var direction = '';
        var pt1;
        var pt2;
        var bpt1;
        var bpt2;
        var data;
        var controlPointCount = 0;
        var controlPoint1;
        var controlPoint2;
        var startPoint = 'M';
        var points = this.filterEmptyPoints(series);
        var previous;
        var getCoordinate = series.chart.chartAreaType === 'PolarRadar' ? _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TransformToVisible"] : _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"];
        for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
            var point = points_1[_i];
            previous = this.getPreviousIndex(points, point.index - 1, series);
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(points[previous], point, points[this.getNextIndex(points, point.index - 1, series)], series)) {
                if (firstPoint !== null) {
                    data = series.drawPoints[previous];
                    controlPoint1 = data.controlPoint1;
                    controlPoint2 = data.controlPoint2;
                    pt1 = getCoordinate(firstPoint.xValue, firstPoint.yValue, xAxis, yAxis, isInverted, series);
                    pt2 = getCoordinate(point.xValue, point.yValue, xAxis, yAxis, isInverted, series);
                    bpt1 = getCoordinate(controlPoint1.x, controlPoint1.y, xAxis, yAxis, isInverted, series);
                    bpt2 = getCoordinate(controlPoint2.x, controlPoint2.y, xAxis, yAxis, isInverted, series);
                    direction = direction.concat((startPoint + ' ' + (pt1.x) + ' ' + (pt1.y) + ' ' + 'C' + ' ' + (bpt1.x) + ' '
                        + (bpt1.y) + ' ' + (bpt2.x) + ' ' + (bpt2.y) + ' ' + (pt2.x) + ' ' + (pt2.y) + ' '));
                    startPoint = 'L';
                }
                firstPoint = point;
                this.storePointLocation(point, series, isInverted, getCoordinate);
            }
            else {
                startPoint = 'M';
                firstPoint = null;
                point.symbolLocations = [];
            }
        }
        var name = series.category === 'TrendLine' ? series.chart.element.id + '_Series_' + series.sourceIndex + '_TrendLine_' + series.index :
            series.chart.element.id + '_Series_' + series.index;
        options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](name, 'transparent', series.width, series.interior, series.opacity, series.dashArray, direction);
        this.appendLinePath(options, series, '');
        this.renderMarker(series);
    };
    /**
     * Get module name.
     */
    SplineSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'SplineSeries';
    };
    /**
     * To destroy the spline.
     * @return {void}
     * @private
     */
    SplineSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    return SplineSeries;
}(_spline_base__WEBPACK_IMPORTED_MODULE_2__["SplineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-area-series.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-area-series.js ***!
  \**************************************************************************************/
/*! exports provided: StackingAreaSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackingAreaSeries", function() { return StackingAreaSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _line_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `StackingAreaSeries` module used to render the Stacking Area series.
 */
var StackingAreaSeries = /** @class */ (function (_super) {
    __extends(StackingAreaSeries, _super);
    function StackingAreaSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render the Stacking area series.
     * @return {void}
     * @private
     */
    StackingAreaSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var polarAreaType = series.chart.chartAreaType === 'PolarRadar';
        var getCoordinate = polarAreaType ? _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TransformToVisible"] : _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"];
        var lineDirection = '';
        var visiblePoints = series.points;
        var pointsLength = visiblePoints.length;
        var stackedvalue = series.stackedValues;
        var origin = polarAreaType ?
            Math.max(series.yAxis.visibleRange.min, stackedvalue.endValues[0]) :
            Math.max(series.yAxis.visibleRange.min, stackedvalue.startValues[0]);
        var border = series.border;
        var options;
        var startPoint = 0;
        var point1 = getCoordinate(visiblePoints[0].xValue, origin, xAxis, yAxis, isInverted, series);
        var point2;
        lineDirection = lineDirection.concat('M' + ' ' + (point1.x) + ' ' + (point1.y) + ' ');
        for (var i = 0; i < pointsLength; i++) {
            visiblePoints[i].symbolLocations = [];
            visiblePoints[i].regions = [];
            if (visiblePoints[i].visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(visiblePoints[i - 1], visiblePoints[i], visiblePoints[i + 1], series)) {
                point1 = getCoordinate(visiblePoints[i].xValue, stackedvalue.endValues[i], xAxis, yAxis, isInverted, series);
                lineDirection = lineDirection.concat('L' + ' ' + (point1.x) + ' ' + (point1.y) + ' ');
                visiblePoints[i].symbolLocations.push(getCoordinate(visiblePoints[i].xValue, stackedvalue.endValues[i], xAxis, yAxis, isInverted, series));
                visiblePoints[i].regions.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](visiblePoints[i].symbolLocations[0].x - series.marker.width, visiblePoints[i].symbolLocations[0].y - series.marker.height, 2 * series.marker.width, 2 * series.marker.height));
            }
            else {
                if (series.emptyPointSettings.mode !== 'Drop') {
                    for (var j = i - 1; j >= startPoint; j--) {
                        point2 = getCoordinate(visiblePoints[j].xValue, stackedvalue.startValues[j], xAxis, yAxis, isInverted, series);
                        lineDirection = lineDirection.concat('L' + ' ' + (point2.x) + ' ' + (point2.y) + ' ');
                    }
                    if (visiblePoints[i + 1] && visiblePoints[i + 1].visible) {
                        point1 = getCoordinate(visiblePoints[i + 1].xValue, stackedvalue.startValues[i + 1], xAxis, yAxis, isInverted, series);
                        lineDirection = lineDirection.concat('M' + ' ' + (point1.x) + ' ' + (point1.y) + ' ');
                    }
                    startPoint = i + 1;
                }
            }
        }
        if (series.chart.chartAreaType === 'PolarRadar' && visiblePoints.length > 1) {
            point1 = { 'x': series.points[0].xValue, 'y': stackedvalue.endValues[0] };
            point2 = getCoordinate(point1.x, point1.y, xAxis, yAxis, isInverted, series);
            lineDirection += ('L' + ' ' + (point2.x) + ' ' + (point2.y) + ' ');
        }
        for (var j = pointsLength - 1; j >= startPoint; j--) {
            var previousSeries = this.getPreviousSeries(series);
            if (previousSeries.emptyPointSettings.mode !== 'Drop' || !previousSeries.points[j].isEmpty) {
                point2 = getCoordinate(visiblePoints[j].xValue, stackedvalue.startValues[j], xAxis, yAxis, isInverted, series);
                lineDirection = lineDirection.concat(((j === (pointsLength - 1) && polarAreaType) ? 'M' : 'L')
                    + ' ' + (point2.x) + ' ' + (point2.y) + ' ');
            }
        }
        options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index, series.interior, series.border.width, series.border.color, series.opacity, series.dashArray, lineDirection);
        this.appendLinePath(options, series, '');
        this.renderMarker(series);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    StackingAreaSeries.prototype.doAnimation = function (series) {
        var option = series.animation;
        this.doLinearAnimation(series, option);
    };
    /**
     * To destroy the stacking area.
     * @return {void}
     * @private
     */
    StackingAreaSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    /**
     * Get module name.
     */
    StackingAreaSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'StackingAreaSeries';
    };
    /**
     * To find previous visible series
     */
    StackingAreaSeries.prototype.getPreviousSeries = function (series) {
        var seriesCollection = series.chart.visibleSeries;
        for (var i = 0, length_1 = seriesCollection.length; i < length_1; i++) {
            if (series.index === seriesCollection[i].index && i !== 0) {
                return seriesCollection[i - 1];
            }
        }
        return seriesCollection[0];
    };
    return StackingAreaSeries;
}(_line_base__WEBPACK_IMPORTED_MODULE_2__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-bar-series.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-bar-series.js ***!
  \*************************************************************************************/
/*! exports provided: StackingBarSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackingBarSeries", function() { return StackingBarSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `StackingBarSeries` module is used to render the stacking bar series.
 */
var StackingBarSeries = /** @class */ (function (_super) {
    __extends(StackingBarSeries, _super);
    function StackingBarSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render the Stacking bar series.
     * @return {void}
     * @private
     */
    StackingBarSeries.prototype.render = function (series) {
        var sideBySideInfo = this.getSideBySideInfo(series);
        var stackedValue = series.stackedValues;
        var rect;
        var argsData;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var pointStack = _a[_i];
            pointStack.symbolLocations = [];
            pointStack.regions = [];
            if (pointStack.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[pointStack.index - 1], pointStack, series.points[pointStack.index + 1], series)) {
                rect = this.getRectangle(pointStack.xValue + sideBySideInfo.start, stackedValue.endValues[pointStack.index], pointStack.xValue + sideBySideInfo.end, stackedValue.startValues[pointStack.index], series);
                argsData = this.triggerEvent(series, pointStack, series.interior, { width: series.border.width, color: series.border.color });
                if (!argsData.cancel) {
                    this.drawRectangle(series, pointStack, rect, argsData);
                    this.updateSymbolLocation(pointStack, rect, series);
                }
            }
        }
        this.renderMarker(series);
    };
    /**
     * To destroy the stacking bar.
     * @return {void}
     * @private
     */
    StackingBarSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    /**
     * Get module name.
     */
    StackingBarSeries.prototype.getModuleName = function () {
        return 'StackingBarSeries';
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    StackingBarSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    return StackingBarSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_1__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-column-series.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-column-series.js ***!
  \****************************************************************************************/
/*! exports provided: StackingColumnSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackingColumnSeries", function() { return StackingColumnSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `StackingColumnSeries` module used to render the stacking column series.
 */
var StackingColumnSeries = /** @class */ (function (_super) {
    __extends(StackingColumnSeries, _super);
    function StackingColumnSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render the Stacking column series.
     * @return {void}
     * @private
     */
    StackingColumnSeries.prototype.render = function (series) {
        series.isRectSeries = true;
        var sideBySideInfo = this.getSideBySideInfo(series);
        var rect;
        var argsData;
        var stackedValue = series.stackedValues;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
                rect = this.getRectangle(point.xValue + sideBySideInfo.start, stackedValue.endValues[point.index], point.xValue + sideBySideInfo.end, stackedValue.startValues[point.index], series);
                argsData = this.triggerEvent(series, point, series.interior, { width: series.border.width, color: series.border.color });
                if (!argsData.cancel) {
                    this.drawRectangle(series, point, rect, argsData);
                    this.updateSymbolLocation(point, rect, series);
                }
            }
        }
        this.renderMarker(series);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    StackingColumnSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * To destroy the stacking column.
     * @return {void}
     * @private
     */
    StackingColumnSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    /**
     * Get module name.
     */
    StackingColumnSeries.prototype.getModuleName = function () {
        return 'StackingColumnSeries';
    };
    return StackingColumnSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_1__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-line-series.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/stacking-line-series.js ***!
  \**************************************************************************************/
/*! exports provided: StackingLineSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackingLineSeries", function() { return StackingLineSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _line_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `StackingLineSeries` module used to render the Stacking Line series.
 */
var StackingLineSeries = /** @class */ (function (_super) {
    __extends(StackingLineSeries, _super);
    function StackingLineSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render the Stacking line series.
     * @return {void}
     * @private
     */
    StackingLineSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var polarType = series.chart.chartAreaType === 'PolarRadar';
        var getCoordinate = polarType ? _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TransformToVisible"] : _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"];
        var direction = '';
        var visiblePts = series.points;
        var pointsLength = visiblePts.length;
        var stackedvalue = series.stackedValues;
        var startPoint = 0;
        var origin = polarType ?
            Math.max(series.yAxis.visibleRange.min, stackedvalue.endValues[0]) :
            Math.max(series.yAxis.visibleRange.min, stackedvalue.startValues[0]);
        var options;
        var point1;
        var point2;
        for (var i = 0; i < pointsLength; i++) {
            visiblePts[i].regions = [];
            visiblePts[i].symbolLocations = [];
            if (visiblePts[i].visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(visiblePts[i - 1], visiblePts[i], visiblePts[i + 1], series)) {
                point1 = getCoordinate(visiblePts[i].xValue, stackedvalue.endValues[i], xAxis, yAxis, isInverted, series);
                direction = direction.concat((i ? 'L' : 'M') + ' ' + (point1.x) + ' ' + (point1.y) + ' ');
                visiblePts[i].symbolLocations.push(getCoordinate(visiblePts[i].xValue, stackedvalue.endValues[i], xAxis, yAxis, isInverted, series));
                visiblePts[i].regions.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](visiblePts[i].symbolLocations[0].x - series.marker.width, visiblePts[i].symbolLocations[0].y - series.marker.height, 2 * series.marker.width, 2 * series.marker.height));
            }
            else {
                if (series.emptyPointSettings.mode !== 'Drop') {
                    if (visiblePts[i + 1] && visiblePts[i + 1].visible) {
                        point1 = getCoordinate(visiblePts[i + 1].xValue, stackedvalue.endValues[i + 1], xAxis, yAxis, isInverted, series);
                        direction = direction.concat('M' + ' ' + (point1.x) + ' ' + (point1.y) + ' ');
                    }
                    startPoint = i + 1;
                }
            }
        }
        if (series.chart.chartAreaType === 'PolarRadar' && visiblePts.length > 1) {
            point1 = { 'y': stackedvalue.endValues[0], 'x': series.points[0].xValue, };
            point2 = getCoordinate(point1.x, point1.y, xAxis, yAxis, isInverted, series);
            direction += ('L' + ' ' + (point2.x) + ' ' + (point2.y) + ' ');
        }
        options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index, 'none', series.width, series.interior, series.opacity, series.dashArray, direction);
        this.appendLinePath(options, series, '');
        this.renderMarker(series);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    StackingLineSeries.prototype.doAnimation = function (series) {
        var option = series.animation;
        this.doLinearAnimation(series, option);
    };
    /**
     * To destroy the stacking line.
     * @return {void}
     * @private
     */
    StackingLineSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    /**
     * Get module name.
     */
    StackingLineSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'StackingLineSeries';
    };
    return StackingLineSeries;
}(_line_base__WEBPACK_IMPORTED_MODULE_2__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/step-area-series.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/step-area-series.js ***!
  \**********************************************************************************/
/*! exports provided: StepAreaSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StepAreaSeries", function() { return StepAreaSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _line_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `StepAreaSeries` Module used to render the step area series.
 */
var StepAreaSeries = /** @class */ (function (_super) {
    __extends(StepAreaSeries, _super);
    function StepAreaSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render StepArea series.
     * @return {void}
     * @private
     */
    StepAreaSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var currentPoint;
        var secondPoint;
        var start = null;
        var direction = '';
        var pointsLength = series.points.length;
        var origin = Math.max(series.yAxis.visibleRange.min, 0);
        var options;
        var point;
        var xValue;
        var lineLength;
        var prevPoint = null;
        if (xAxis.valueType === 'Category' && xAxis.labelPlacement === 'BetweenTicks') {
            lineLength = 0.5;
        }
        else {
            lineLength = 0;
        }
        for (var i = 0; i < pointsLength; i++) {
            point = series.points[i];
            xValue = point.xValue;
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[i - 1], point, series.points[i + 1], series)) {
                if (start === null) {
                    start = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](xValue, 0);
                    // Start point for the current path
                    currentPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(xValue - lineLength, origin, xAxis, yAxis, isInverted);
                    direction += ('M' + ' ' + (currentPoint.x) + ' ' + (currentPoint.y) + ' ');
                    currentPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(xValue - lineLength, point.yValue, xAxis, yAxis, isInverted);
                    direction += ('L' + ' ' + (currentPoint.x) + ' ' + (currentPoint.y) + ' ');
                }
                // First Point to draw the Steparea path
                if (prevPoint != null) {
                    currentPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.yValue, xAxis, yAxis, isInverted);
                    secondPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(prevPoint.xValue, prevPoint.yValue, xAxis, yAxis, isInverted);
                    direction += ('L' + ' ' +
                        (currentPoint.x) + ' ' + (secondPoint.y) + ' L' + ' ' + (currentPoint.x) + ' ' + (currentPoint.y) + ' ');
                }
                else if (series.emptyPointSettings.mode === 'Gap') {
                    currentPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.yValue, xAxis, yAxis, isInverted);
                    direction += 'L' + ' ' + (currentPoint.x) + ' ' + (currentPoint.y) + ' ';
                }
                this.storePointLocation(point, series, isInverted, _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"]);
                prevPoint = point;
            }
            if (series.points[i + 1] && !series.points[i + 1].visible && series.emptyPointSettings.mode !== 'Drop') {
                // current start point
                currentPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(xValue + lineLength, origin, xAxis, yAxis, isInverted);
                direction += ('L' + ' ' + (currentPoint.x) + ' ' + (currentPoint.y));
                start = null;
                prevPoint = null;
            }
        }
        if ((pointsLength > 1) && direction !== '') {
            start = { 'x': series.points[pointsLength - 1].xValue + lineLength, 'y': series.points[pointsLength - 1].yValue };
            secondPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(start.x, start.y, xAxis, yAxis, isInverted);
            direction += ('L' + ' ' + (secondPoint.x) + ' ' + (secondPoint.y) + ' ');
            start = { 'x': series.points[pointsLength - 1].xValue + lineLength, 'y': origin };
            secondPoint = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(start.x, start.y, xAxis, yAxis, isInverted);
            direction += ('L' + ' ' + (secondPoint.x) + ' ' + (secondPoint.y) + ' ');
        }
        else {
            direction = '';
        }
        options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index, series.interior, series.border.width, series.border.color, series.opacity, series.dashArray, direction);
        this.appendLinePath(options, series, '');
        this.renderMarker(series);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    StepAreaSeries.prototype.doAnimation = function (series) {
        var option = series.animation;
        this.doLinearAnimation(series, option);
    };
    /**
     * To destroy the step Area series.
     * @return {void}
     * @private
     */
    StepAreaSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    /**
     * Get module name.
     */
    StepAreaSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'StepAreaSeries';
    };
    return StepAreaSeries;
}(_line_base__WEBPACK_IMPORTED_MODULE_2__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/step-line-series.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/step-line-series.js ***!
  \**********************************************************************************/
/*! exports provided: StepLineSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StepLineSeries", function() { return StepLineSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _line_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `StepLineSeries` module is used to render the step line series.
 */
var StepLineSeries = /** @class */ (function (_super) {
    __extends(StepLineSeries, _super);
    function StepLineSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render the Step line series.
     * @return {void}
     * @private
     */
    StepLineSeries.prototype.render = function (series, xAxis, yAxis, isInverted) {
        var direction = '';
        var startPoint = 'M';
        var prevPoint = null;
        var pathOptions;
        var lineLength;
        var point1;
        var point2;
        var visiblePoints = this.enableComplexProperty(series);
        if (xAxis.valueType === 'Category' && xAxis.labelPlacement === 'BetweenTicks') {
            lineLength = 0.5;
        }
        else {
            lineLength = 0;
        }
        for (var _i = 0, visiblePoints_1 = visiblePoints; _i < visiblePoints_1.length; _i++) {
            var point = visiblePoints_1[_i];
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series)) {
                if (prevPoint != null) {
                    point2 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue, point.yValue, xAxis, yAxis, isInverted);
                    point1 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(prevPoint.xValue, prevPoint.yValue, xAxis, yAxis, isInverted);
                    direction = direction.concat(startPoint + ' ' + (point1.x) + ' ' + (point1.y) + ' ' + 'L' + ' ' +
                        (point2.x) + ' ' + (point1.y) + ' L' + ' ' + (point2.x) + ' ' + (point2.y) + ' ');
                    startPoint = 'L';
                }
                else {
                    point1 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(point.xValue - lineLength, point.yValue, xAxis, yAxis, isInverted);
                    direction = direction.concat(startPoint + ' ' + (point1.x) + ' ' + (point1.y) + ' ');
                    startPoint = 'L';
                }
                this.storePointLocation(point, series, isInverted, _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"]);
                prevPoint = point;
            }
            else {
                prevPoint = series.emptyPointSettings.mode === 'Drop' ? prevPoint : null;
                startPoint = series.emptyPointSettings.mode === 'Drop' ? startPoint : 'M';
            }
        }
        point1 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(visiblePoints[visiblePoints.length - 1].xValue + lineLength, visiblePoints[visiblePoints.length - 1].yValue, xAxis, yAxis, isInverted);
        direction = direction.concat(startPoint + ' ' + (point1.x) + ' ' + (point1.y) + ' ');
        pathOptions = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index, 'transparent', series.width, series.interior, series.opacity, series.dashArray, direction);
        this.appendLinePath(pathOptions, series, '');
        this.renderMarker(series);
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    StepLineSeries.prototype.doAnimation = function (series) {
        var option = series.animation;
        this.doLinearAnimation(series, option);
    };
    /**
     * To destroy the step line series.
     * @return {void}
     * @private
     */
    StepLineSeries.prototype.destroy = function (chart) {
        /**
         * Destroy method calling here
         */
    };
    /**
     * Get module name.
     */
    StepLineSeries.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'StepLineSeries';
    };
    return StepLineSeries;
}(_line_base__WEBPACK_IMPORTED_MODULE_2__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/series/waterfall-series.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/series/waterfall-series.js ***!
  \**********************************************************************************/
/*! exports provided: WaterfallSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WaterfallSeries", function() { return WaterfallSeries; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _column_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./column-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/column-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * `WaterfallSeries` module is used to render the waterfall series.
 */
var WaterfallSeries = /** @class */ (function (_super) {
    __extends(WaterfallSeries, _super);
    function WaterfallSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Render waterfall series.
     * @return {void}
     * @private
     */
    WaterfallSeries.prototype.render = function (series) {
        var rect;
        var sideBySideInfo = this.getSideBySideInfo(series);
        var origin = Math.max(series.yAxis.visibleRange.min, 0);
        var argsData;
        var prevEndValue = 0;
        var direction = '';
        var currentEndValue = 0;
        var originValue;
        var prevRegion = null;
        var y;
        var isInversed = series.chart.requireInvertedAxis;
        var intermediateOrigin = 0;
        var redraw = series.chart.redraw;
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            point.symbolLocations = [];
            point.regions = [];
            if (point.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInRange"])(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
                //Calcute the current point value to render waterfall series.
                var isSum = this.isIntermediateSum(series, point.index);
                var totalSum = this.isSumIndex(series, point.index);
                currentEndValue += isSum || totalSum === true ? 0 : point.yValue;
                //Calcute the origin value for points
                originValue = (isSum === true ? intermediateOrigin : ((prevEndValue !== null && !totalSum) ? prevEndValue : origin));
                rect = this.getRectangle(point.xValue + sideBySideInfo.start, currentEndValue, point.xValue + sideBySideInfo.end, originValue, series);
                argsData = this.triggerPointRenderEvent(series, point);
                //intermediateOrigin is used only for imtermediate data 
                if (isSum) {
                    intermediateOrigin = currentEndValue;
                }
                prevEndValue = currentEndValue;
                if (!argsData.cancel) {
                    this.updateSymbolLocation(point, rect, series);
                    this.drawRectangle(series, point, rect, argsData);
                }
                var currentRegion = point.regions[0];
                if (prevRegion !== null) {
                    var prevLeft = isInversed ? prevRegion.x : prevRegion.y;
                    var currentLeft = isInversed ? currentRegion.x : currentRegion.y;
                    var prevBottom = isInversed ? prevRegion.x + prevRegion.width : prevRegion.y + prevRegion.height;
                    var currentBottom = isInversed ?
                        currentRegion.x + currentRegion.width : currentRegion.y + currentRegion.height;
                    if (Math.round(prevLeft) === Math.round(currentLeft) ||
                        Math.round(prevBottom) === Math.round(currentLeft)) {
                        y = isInversed ? currentRegion.x : currentRegion.y;
                    }
                    else {
                        y = currentBottom;
                    }
                    if (isInversed) {
                        direction = direction.concat('M' + ' ' + y + ' ' + (prevRegion.y + prevRegion.height) + ' ' +
                            'L' + ' ' + y + ' ' + currentRegion.y + ' ');
                    }
                    else {
                        direction = direction.concat('M' + ' ' + prevRegion.x + ' ' + y + ' ' +
                            'L' + ' ' + (currentRegion.x + currentRegion.width) + ' ' + y + ' ');
                    }
                }
                prevRegion = point.regions[0];
            }
        }
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](series.chart.element.id + '_Series_' + series.index + '_Connector_', 'none', series.connector.width, series.connector.color, series.opacity, series.connector.dashArray, direction);
        if (redraw && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(options.id)) {
            direction = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getElement"])(options.id).getAttribute('d');
        }
        var element = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["redrawElement"])(redraw, options.id, options, series.chart.renderer) ||
            series.chart.renderer.drawPath(options, new Int32Array([series.clipRect.x, series.clipRect.y])));
        element.style.visibility = (!series.chart.enableCanvas) ? ((series.animation.enable && series.chart.animateSeries) ?
            'hidden' : 'visible') : null;
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(series.chart.enableCanvas, series.seriesElement, element, redraw, true, null, null, null, direction);
        this.renderMarker(series);
    };
    /**
     * To check intermediateSumIndex in waterfall series.
     * @return boolean
     * @private
     */
    WaterfallSeries.prototype.isIntermediateSum = function (series, index) {
        if (series.intermediateSumIndexes !== undefined && series.intermediateSumIndexes.indexOf(index) !== -1) {
            return true;
        }
        return false;
    };
    /**
     * To check sumIndex in waterfall series.
     * @return boolean
     * @private
     */
    WaterfallSeries.prototype.isSumIndex = function (series, index) {
        if (series.sumIndexes !== undefined && series.sumIndexes.indexOf(index) !== -1) {
            return true;
        }
        return false;
    };
    /**
     * To trigger the point rendering event for waterfall series.
     * @return IPointRenderEventArgs
     * @private
     */
    WaterfallSeries.prototype.triggerPointRenderEvent = function (series, point) {
        var color;
        var isSum = this.isIntermediateSum(series, point.index);
        var totalSum = this.isSumIndex(series, point.index);
        if (isSum || totalSum) {
            color = series.summaryFillColor;
        }
        else if (point.y < 0) {
            color = series.negativeFillColor;
        }
        else {
            color = series.interior;
        }
        return this.triggerEvent(series, point, color, { color: series.border.color, width: series.border.width });
    };
    /**
     * Add sumIndex and intermediateSumIndex data.
     * @return {object[]}
     * @private
     */
    WaterfallSeries.prototype.processInternalData = function (json, series) {
        var data = json;
        var length = json.length;
        var index;
        var intermediateSum = series.intermediateSumIndexes;
        var sumIndex = series.sumIndexes;
        if (intermediateSum !== undefined && intermediateSum.length > 0) {
            for (var i = 0; i < intermediateSum.length; i++) {
                for (var j = 0; j < data.length; j++) {
                    if (j === intermediateSum[i]) {
                        if (i === 0) {
                            index = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["subArraySum"])(data, -1, intermediateSum[i], null, series);
                        }
                        else {
                            index = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["subArraySum"])(data, intermediateSum[i - 1], intermediateSum[i], null, series);
                        }
                        data[j][series.yName] = index;
                    }
                }
            }
        }
        if (sumIndex !== undefined && sumIndex.length > 0) {
            for (var k = 0; k < sumIndex.length; k++) {
                for (var j = 0; j < data.length; j++) {
                    if (j === sumIndex[k]) {
                        if (intermediateSum !== undefined) {
                            index = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["subArraySum"])(data, -1, sumIndex[k], sumIndex, series);
                        }
                        else {
                            index = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["subArraySum"])(data, -1, sumIndex[k], null, series);
                        }
                        data[j][series.yName] = index;
                    }
                }
            }
        }
        return data;
    };
    /**
     * Animates the series.
     * @param  {Series} series - Defines the series to animate.
     * @return {void}
     */
    WaterfallSeries.prototype.doAnimation = function (series) {
        this.animate(series);
    };
    /**
     * Get module name.
     */
    WaterfallSeries.prototype.getModuleName = function () {
        return 'WaterfallSeries';
        /**
         * return the module name
         */
    };
    /**
     * To destroy the waterfall series.
     * @return {void}
     * @private
     */
    WaterfallSeries.prototype.destroy = function (chart) {
        /**
         * Destroys the waterfall series.
         */
    };
    return WaterfallSeries;
}(_column_base__WEBPACK_IMPORTED_MODULE_2__["ColumnBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/ad-indicator.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/ad-indicator.js ***!
  \********************************************************************************************/
/*! exports provided: AccumulationDistributionIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccumulationDistributionIndicator", function() { return AccumulationDistributionIndicator; });
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * `AccumulationDistributionIndicator` module is used to render accumulation distribution indicator.
 */
var AccumulationDistributionIndicator = /** @class */ (function (_super) {
    __extends(AccumulationDistributionIndicator, _super);
    function AccumulationDistributionIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the predictions using accumulation distribution approach
     * @private
     */
    AccumulationDistributionIndicator.prototype.initDataSource = function (indicator, chart) {
        var sourceSeries = indicator.sourceSeries;
        var adPoints = [];
        var validData = indicator.points;
        if (validData.length > 0 && validData.length > indicator.period) {
            adPoints = this.calculateADPoints(indicator, validData);
        }
        this.setSeriesRange(adPoints, indicator);
    };
    /**
     *  Calculates the Accumulation Distribution values
     * @private
     */
    AccumulationDistributionIndicator.prototype.calculateADPoints = function (indicator, validData) {
        var temp = [];
        var sum = 0;
        var i = 0;
        var value = 0;
        var high = 0;
        var low = 0;
        var close = 0;
        var signalSeries = indicator.targetSeries[0];
        for (i = 0; i < validData.length; i++) {
            high = Number(validData[i].high);
            low = Number(validData[i].low);
            close = Number(validData[i].close);
            /**
             * Money Flow Multiplier = [(Close -  Low) - (High - Close)] /(High - Low)
             * Money Flow Volume = Money Flow Multiplier x Volume for the Period
             * ADL = Previous ADL + Current Period's Money Flow Volume
             */
            value = ((close - low) - (high - close)) / (high - low);
            /**
             * Sum is to calculate the Y values of the Accumulation distribution indicator
             */
            sum = sum + value * Number(validData[i].volume);
            /**
             * To calculate the x and y values for the Accumulation distribution indicator
             */
            temp[i] = this.getDataPoint(validData[i].x, sum, validData[i], signalSeries, temp.length);
        }
        return temp;
    };
    /**
     * To destroy the Accumulation Distribution Technical Indicator.
     * @return {void}
     * @private
     */
    AccumulationDistributionIndicator.prototype.destroy = function (chart) {
        /**
         * Destroys the Accumulation Distribution Technical indicator
         */
    };
    /**
     * Get module name.
     */
    AccumulationDistributionIndicator.prototype.getModuleName = function () {
        /**
         * Returns the module name of the Indicator
         */
        return 'AccumulationDistributionIndicator';
    };
    return AccumulationDistributionIndicator;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_0__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/atr-indicator.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/atr-indicator.js ***!
  \*********************************************************************************************/
/*! exports provided: AtrIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AtrIndicator", function() { return AtrIndicator; });
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * `AtrIndicator` module is used to render ATR indicator.
 */
var AtrIndicator = /** @class */ (function (_super) {
    __extends(AtrIndicator, _super);
    function AtrIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the predictions using Average True Range approach
     * @private
     */
    AtrIndicator.prototype.initDataSource = function (indicator, chart) {
        var validData = indicator.points;
        if (validData.length > 0 && validData.length > indicator.period) {
            this.calculateATRPoints(indicator, validData);
        }
    };
    /**
     *  To calculate Average True Range indicator points
     * @private
     */
    AtrIndicator.prototype.calculateATRPoints = function (indicator, validData) {
        var average = 0;
        var highLow = 0;
        var highClose = 0;
        var lowClose = 0;
        var trueRange = 0;
        var points = [];
        var temp = [];
        var period = indicator.period;
        var sum = 0;
        var y = 'y';
        var signalSeries = indicator.targetSeries[0];
        for (var i = 0; i < validData.length; i++) {
            /**
             * Current High less the current Low
             * Current High less the previous Close (absolute value)
             * Current Low less the previous Close (absolute value)
             */
            highLow = Number(validData[i].high) - Number(validData[i].low);
            if (i > 0) {
                //
                highClose = Math.abs(Number(validData[i].high) - Number(validData[i - 1].close));
                lowClose = Math.abs(Number(validData[i].low) - Number(validData[i - 1].close));
            }
            /**
             * To find the maximum of highLow, highClose, lowClose
             */
            trueRange = Math.max(highLow, highClose, lowClose);
            sum = sum + trueRange;
            /**
             * Push the x and y values for the Average true range indicator
             */
            if (i >= period) {
                average = (Number(temp[i - 1][y]) * (period - 1) + trueRange) / period;
                points.push(this.getDataPoint(validData[i].x, average, validData[i], signalSeries, points.length));
            }
            else {
                average = sum / period;
                if (i === period - 1) {
                    points.push(this.getDataPoint(validData[i].x, average, validData[i], signalSeries, points.length));
                }
            }
            temp[i] = { x: validData[i].x, y: average };
        }
        this.setSeriesRange(points, indicator);
    };
    /**
     * To destroy the Average true range indicator.
     * @return {void}
     * @private
     */
    AtrIndicator.prototype.destroy = function (chart) {
        /**
         * Destroy the Average true range indicator
         */
    };
    /**
     * Get module name.
     */
    AtrIndicator.prototype.getModuleName = function () {
        /**
         * Returns the module name of the Indicator
         */
        return 'AtrIndicator';
    };
    return AtrIndicator;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_0__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/bollinger-bands.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/bollinger-bands.js ***!
  \***********************************************************************************************/
/*! exports provided: BollingerBands */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BollingerBands", function() { return BollingerBands; });
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `BollingerBands` module is used to render bollinger band indicator.
 */
var BollingerBands = /** @class */ (function (_super) {
    __extends(BollingerBands, _super);
    function BollingerBands() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Initializes the series collection to represent bollinger band
     */
    BollingerBands.prototype.initSeriesCollection = function (indicator, chart) {
        indicator.targetSeries = [];
        var rangeArea = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
        rangeArea.type = 'RangeArea';
        if (indicator.bandColor !== 'transparent' && indicator.bandColor !== 'none') {
            this.setSeriesProperties(rangeArea, indicator, 'BollingerBand', indicator.bandColor, 0, chart);
        }
        var signalLine = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
        this.setSeriesProperties(signalLine, indicator, 'BollingerBand', indicator.fill, indicator.width, chart);
        var upperLine = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
        this.setSeriesProperties(upperLine, indicator, 'UpperLine', indicator.upperLine.color, indicator.upperLine.width, chart);
        var lowerLine = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
        this.setSeriesProperties(lowerLine, indicator, 'LowerLine', indicator.lowerLine.color, indicator.lowerLine.width, chart);
    };
    /**
     * Defines the predictions using Bollinger Band Approach
     * @private
     */
    BollingerBands.prototype.initDataSource = function (indicator, chart) {
        var enableBand = indicator.bandColor !== 'transparent' && indicator.bandColor !== 'none';
        var start = enableBand ? 1 : 0;
        var signalCollection = [];
        var upperCollection = [];
        var lowerCollection = [];
        var bandCollection = [];
        var upperSeries = indicator.targetSeries[start + 1];
        var lowerSeries = indicator.targetSeries[start + 2];
        var signalSeries = indicator.targetSeries[start];
        var rangeAreaSeries = enableBand ? indicator.targetSeries[0] : null;
        //prepare data
        var validData = indicator.points;
        if (validData.length && validData.length >= indicator.period) {
            var sum = 0;
            var deviationSum = 0;
            var multiplier = indicator.standardDeviation;
            var limit = validData.length;
            var length_1 = Math.round(indicator.period);
            var smaPoints = [];
            var deviations = [];
            var bollingerPoints = [];
            for (var i_1 = 0; i_1 < length_1; i_1++) {
                sum += Number(validData[i_1].close);
            }
            var sma = sum / indicator.period;
            for (var i_2 = 0; i_2 < limit; i_2++) {
                var y = Number(validData[i_2].close);
                if (i_2 >= length_1 - 1 && i_2 < limit) {
                    if (i_2 - indicator.period >= 0) {
                        var diff = y - Number(validData[i_2 - length_1].close);
                        sum = sum + diff;
                        sma = sum / (indicator.period);
                        smaPoints[i_2] = sma;
                        deviations[i_2] = Math.pow(y - sma, 2);
                        deviationSum += deviations[i_2] - deviations[i_2 - length_1];
                    }
                    else {
                        smaPoints[i_2] = sma;
                        deviations[i_2] = Math.pow(y - sma, 2);
                        deviationSum += deviations[i_2];
                    }
                    var range = Math.sqrt(deviationSum / (indicator.period));
                    var lowerBand = smaPoints[i_2] - (multiplier * range);
                    var upperBand = smaPoints[i_2] + (multiplier * range);
                    if (i_2 + 1 === length_1) {
                        for (var j_1 = 0; j_1 < length_1 - 1; j_1++) {
                            bollingerPoints[j_1] = {
                                'X': validData[j_1].x, 'mb': smaPoints[i_2],
                                'lb': lowerBand, 'ub': upperBand, visible: true
                            };
                        }
                    }
                    bollingerPoints[i_2] = {
                        'X': validData[i_2].x, 'mb': smaPoints[i_2],
                        'lb': lowerBand, 'ub': upperBand, visible: true
                    };
                }
                else {
                    if (i_2 < indicator.period - 1) {
                        smaPoints[i_2] = sma;
                        deviations[i_2] = Math.pow(y - sma, 2);
                        deviationSum += deviations[i_2];
                    }
                }
            }
            var i = -1;
            var j = -1;
            for (var k = 0; k < limit; k++) {
                if (k >= (length_1 - 1)) {
                    var ub = 'ub';
                    var lb = 'lb';
                    var mb = 'mb';
                    upperCollection.push(this.getDataPoint(validData[k].x, bollingerPoints[k][ub], validData[k], upperSeries, upperCollection.length));
                    lowerCollection.push(this.getDataPoint(validData[k].x, bollingerPoints[k][lb], validData[k], lowerSeries, lowerCollection.length));
                    signalCollection.push(this.getDataPoint(validData[k].x, bollingerPoints[k][mb], validData[k], signalSeries, signalCollection.length));
                    if (enableBand) {
                        bandCollection.push(this.getRangePoint(validData[k].x, upperCollection[++i].y, lowerCollection[++j].y, validData[k], rangeAreaSeries, bandCollection.length));
                    }
                }
            }
        }
        if (enableBand) {
            this.setSeriesRange(bandCollection, indicator, indicator.targetSeries[0]);
        }
        this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[start]);
        this.setSeriesRange(upperCollection, indicator, indicator.targetSeries[start + 1]);
        this.setSeriesRange(lowerCollection, indicator, indicator.targetSeries[start + 2]);
    };
    /**
     * To destroy the Bollinger Band.
     * @return {void}
     * @private
     */
    BollingerBands.prototype.destroy = function (chart) {
        /**
         * Destroys the bollinger band
         */
    };
    /**
     * Get module name.
     */
    BollingerBands.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'BollingerBandsIndicator';
    };
    return BollingerBands;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_1__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/ema-indicator.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/ema-indicator.js ***!
  \*********************************************************************************************/
/*! exports provided: EmaIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmaIndicator", function() { return EmaIndicator; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `EmaIndicator` module is used to render EMA indicator.
 */
var EmaIndicator = /** @class */ (function (_super) {
    __extends(EmaIndicator, _super);
    function EmaIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the predictions based on EMA approach
     * @private
     */
    EmaIndicator.prototype.initDataSource = function (indicator, chart) {
        var field = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(indicator.field);
        var xField = 'x';
        var emaPoints = [];
        var signalSeries = indicator.targetSeries[0];
        //prepare data
        var validData = indicator.points;
        if (validData && validData.length && validData.length >= indicator.period) {
            //find initial average
            var sum = 0;
            var average = 0;
            //smoothing factor
            var k = (2 / (indicator.period + 1));
            for (var i = 0; i < indicator.period; i++) {
                sum += validData[i][field];
            }
            average = sum / indicator.period;
            emaPoints.push(this.getDataPoint(validData[indicator.period - 1][xField], average, validData[indicator.period - 1], signalSeries, emaPoints.length));
            var index = indicator.period;
            while (index < validData.length) {
                //previous average
                var prevAverage = emaPoints[index - indicator.period][signalSeries.yName];
                var yValue = (validData[index][field] - prevAverage) * k + prevAverage;
                emaPoints.push(this.getDataPoint(validData[index][xField], yValue, validData[index], signalSeries, emaPoints.length));
                index++;
            }
        }
        this.setSeriesRange(emaPoints, indicator);
    };
    /**
     * To destroy the EMA Indicator
     * @return {void}
     * @private
     */
    EmaIndicator.prototype.destroy = function (chart) {
        /**
         * Destroys the EMA Indicator
         */
    };
    /**
     * Get module name.
     */
    EmaIndicator.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'EmaIndicator';
    };
    return EmaIndicator;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_1__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js ***!
  \**********************************************************************************************/
/*! exports provided: TechnicalAnalysis */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TechnicalAnalysis", function() { return TechnicalAnalysis; });
/* harmony import */ var _series_line_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/line-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-base.js");
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





/**
 * Technical Analysis module helps to predict the market trend
 */
var TechnicalAnalysis = /** @class */ (function (_super) {
    __extends(TechnicalAnalysis, _super);
    function TechnicalAnalysis() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the collection of series, that are used to represent the given technical indicator
     * @private
     */
    TechnicalAnalysis.prototype.initSeriesCollection = function (indicator, chart) {
        indicator.targetSeries = [];
        var signalLine = new _series_chart_series__WEBPACK_IMPORTED_MODULE_1__["Series"](indicator, 'targetSeries', {}, true);
        this.setSeriesProperties(signalLine, indicator, indicator.type, indicator.fill, indicator.width, chart);
    };
    /**
     * Initializes the properties of the given series
     * @private
     */
    TechnicalAnalysis.prototype.setSeriesProperties = function (series, indicator, name, fill, width, chart) {
        series.name = name.length <= 4 ? name.toLocaleUpperCase() : name;
        series.xName = 'x';
        series.yName = 'y';
        series.fill = fill || '#606eff';
        series.dashArray = indicator.dashArray;
        series.width = width;
        series.xAxisName = indicator.xAxisName;
        series.animation = indicator.animation;
        series.yAxisName = indicator.yAxisName;
        series.clipRectElement = indicator.clipRectElement;
        series.points = [];
        series.enableTooltip = true;
        series.interior = series.fill;
        series.category = 'Indicator';
        series.index = indicator.index;
        series.chart = chart;
        series.xMin = Infinity;
        series.xMax = -Infinity;
        series.yMin = Infinity;
        series.yMax = -Infinity;
        series.xData = [];
        series.yData = [];
        series.marker.visible = false;
        indicator.targetSeries.push(series);
    };
    /**
     * Creates the elements of a technical indicator
     * @private
     */
    TechnicalAnalysis.prototype.createIndicatorElements = function (chart, indicator, index) {
        if (indicator.seriesName || indicator.dataSource) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["findClipRect"])(indicator.targetSeries[0]);
        }
        var clipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Rect"](0, 0, 0, 0);
        if (indicator.seriesName || indicator.dataSource) {
            clipRect = indicator.targetSeries[0].clipRect;
        }
        var options = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["RectOption"](chart.element.id + '_ChartIndicatorClipRect_' + index, 'transparent', { width: 1, color: 'Gray' }, 1, {
            x: 0, y: 0, width: clipRect.width,
            height: clipRect.height,
        });
        var clipRectElement = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_2__["appendClipElement"])(chart.redraw, options, chart.renderer);
        //defines the clip rect element
        //creates the group for an indicator
        indicator.indicatorElement = chart.renderer.createGroup({
            'id': chart.element.id + 'IndicatorGroup' + index,
            'transform': 'translate(' + clipRect.x + ',' + clipRect.y + ')',
            'clip-path': 'url(#' + chart.element.id + '_ChartIndicatorClipRect_' + index + ')'
        });
        indicator.indicatorElement.appendChild(clipRectElement);
        //Defines a group for each series in a technical indicator
        for (var _i = 0, _a = indicator.targetSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            series.clipRectElement = clipRectElement;
            var element = series.chart.renderer.createGroup({
                'id': series.chart.element.id + '_Indicator_' +
                    indicator.index + '_' + series.name + '_Group'
            });
            indicator.indicatorElement.appendChild(element);
            series.seriesElement = element;
        }
        chart.indicatorElements.appendChild(indicator.indicatorElement);
    };
    TechnicalAnalysis.prototype.getDataPoint = function (x, y, sourcePoint, series, index, indicator) {
        if (indicator === void 0) { indicator = null; }
        var point = new _series_chart_series__WEBPACK_IMPORTED_MODULE_1__["Points"]();
        point.x = x;
        point.y = y;
        point.xValue = sourcePoint.xValue;
        point.color = series.fill;
        point.index = index;
        point.yValue = y;
        point.visible = true;
        series.xMin = Math.min(series.xMin, point.xValue);
        series.yMin = Math.min(series.yMin, point.yValue);
        series.xMax = Math.max(series.xMax, point.xValue);
        series.yMax = Math.max(series.yMax, point.yValue);
        series.xData.push(point.xValue);
        if (indicator && indicator.type === 'Macd' && series.type === 'Column') {
            if (point.y >= 0) {
                point.color = indicator.macdPositiveColor;
            }
            else {
                point.color = indicator.macdNegativeColor;
            }
        }
        return point;
    };
    TechnicalAnalysis.prototype.getRangePoint = function (x, high, low, sourcePoint, series, index, indicator) {
        if (indicator === void 0) { indicator = null; }
        var point = new _series_chart_series__WEBPACK_IMPORTED_MODULE_1__["Points"]();
        point.x = x;
        point.high = high;
        point.low = low;
        point.xValue = sourcePoint.xValue;
        point.color = series.fill;
        point.index = index;
        point.visible = true;
        series.xData.push(point.xValue);
        return point;
    };
    TechnicalAnalysis.prototype.setSeriesRange = function (points, indicator, series) {
        if (series === void 0) { series = null; }
        if (!series) {
            indicator.targetSeries[0].points = points;
        }
        else {
            series.points = points;
        }
    };
    return TechnicalAnalysis;
}(_series_line_base__WEBPACK_IMPORTED_MODULE_0__["LineBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/macd-indicator.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/macd-indicator.js ***!
  \**********************************************************************************************/
/*! exports provided: MacdIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MacdIndicator", function() { return MacdIndicator; });
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `MacdIndicator` module is used to render MACD indicator.
 */
var MacdIndicator = /** @class */ (function (_super) {
    __extends(MacdIndicator, _super);
    function MacdIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the collection of series to represent the MACD indicator
     * @private
     */
    MacdIndicator.prototype.initSeriesCollection = function (indicator, chart) {
        _super.prototype.initSeriesCollection.call(this, indicator, chart);
        if (indicator.macdType === 'Line' || indicator.macdType === 'Both') {
            var macdSeries = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
            this.setSeriesProperties(macdSeries, indicator, 'MacdLine', indicator.macdLine.color, indicator.macdLine.width, chart);
        }
        if (indicator.macdType === 'Histogram' || indicator.macdType === 'Both') {
            var histogramSeries = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
            histogramSeries.type = 'Column';
            this.setSeriesProperties(histogramSeries, indicator, 'Histogram', indicator.macdPositiveColor, indicator.width, chart);
        }
    };
    /**
     * Defines the predictions using MACD approach
     * @private
     */
    MacdIndicator.prototype.initDataSource = function (indicator, chart) {
        var signalCollection = [];
        var fastPeriod = indicator.fastPeriod;
        var slowPeriod = indicator.slowPeriod;
        var trigger = indicator.period;
        var length = fastPeriod + trigger;
        var macdCollection = [];
        var histogramCollection = [];
        var validData = indicator.points;
        var signalSeries = indicator.targetSeries[0];
        var histogramSeries;
        var macdLineSeries;
        if (indicator.macdType === 'Histogram') {
            histogramSeries = indicator.targetSeries[1];
        }
        else {
            macdLineSeries = indicator.targetSeries[1];
            if (indicator.macdType === 'Both') {
                histogramSeries = indicator.targetSeries[2];
            }
        }
        if (validData && length < validData.length && slowPeriod <= fastPeriod &&
            slowPeriod > 0 && (length - 2) >= 0) {
            var shortEMA = this.calculateEMAValues(slowPeriod, validData, 'close');
            var longEMA = this.calculateEMAValues(fastPeriod, validData, 'close');
            var macdValues = this.getMACDVales(indicator, shortEMA, longEMA);
            macdCollection = this.getMACDPoints(indicator, macdValues, validData, macdLineSeries || signalSeries);
            var signalEMA = this.calculateEMAValues(trigger, macdCollection, 'y');
            signalCollection = this.getSignalPoints(indicator, signalEMA, validData, signalSeries);
            if (histogramSeries) {
                histogramCollection = this.getHistogramPoints(indicator, macdValues, signalEMA, validData, histogramSeries);
            }
        }
        this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[0]);
        if (histogramSeries) {
            this.setSeriesRange(histogramCollection, indicator, histogramSeries);
        }
        if (macdLineSeries) {
            this.setSeriesRange(macdCollection, indicator, macdLineSeries);
        }
    };
    /**
     * Calculates the EMA values for the given period
     */
    MacdIndicator.prototype.calculateEMAValues = function (period, validData, field) {
        var sum = 0;
        var initialEMA = 0;
        var emaValues = [];
        var emaPercent = (2 / (period + 1));
        for (var i = 0; i < period; i++) {
            sum += Number(validData[i][field]);
        }
        initialEMA = (sum / period);
        emaValues.push(initialEMA);
        var emaAvg = initialEMA;
        for (var j = period; j < validData.length; j++) {
            emaAvg = (Number(validData[j][field]) - emaAvg) * emaPercent + emaAvg;
            emaValues.push(emaAvg);
        }
        return emaValues;
    };
    /**
     * Defines the MACD Points
     */
    MacdIndicator.prototype.getMACDPoints = function (indicator, macdPoints, validData, series) {
        var macdCollection = [];
        var dataMACDIndex = indicator.fastPeriod - 1;
        var macdIndex = 0;
        while (dataMACDIndex < validData.length) {
            macdCollection.push(this.getDataPoint(validData[dataMACDIndex].x, macdPoints[macdIndex], validData[dataMACDIndex], series, macdCollection.length));
            dataMACDIndex++;
            macdIndex++;
        }
        return macdCollection;
    };
    /**
     * Calculates the signal points
     */
    MacdIndicator.prototype.getSignalPoints = function (indicator, signalEma, validData, series) {
        var dataSignalIndex = indicator.fastPeriod + indicator.period - 2;
        var signalIndex = 0;
        var signalCollection = [];
        while (dataSignalIndex < validData.length) {
            signalCollection.push(this.getDataPoint(validData[dataSignalIndex].x, signalEma[signalIndex], validData[dataSignalIndex], series, signalCollection.length));
            dataSignalIndex++;
            signalIndex++;
        }
        return signalCollection;
    };
    /**
     * Calculates the MACD values
     */
    MacdIndicator.prototype.getMACDVales = function (indicator, shortEma, longEma) {
        var macdPoints = [];
        var diff = indicator.fastPeriod - indicator.slowPeriod;
        for (var i = 0; i < longEma.length; i++) {
            macdPoints.push((shortEma[i + diff] - longEma[i]));
        }
        return macdPoints;
    };
    /**
     * Calculates the Histogram Points
     */
    MacdIndicator.prototype.getHistogramPoints = function (indicator, macdPoints, signalEma, validData, series) {
        var dataHistogramIndex = indicator.fastPeriod + indicator.period - 2;
        var histogramIndex = 0;
        var histogramCollection = [];
        while (dataHistogramIndex < validData.length) {
            histogramCollection.push(this.getDataPoint(validData[dataHistogramIndex].x, macdPoints[histogramIndex + (indicator.period - 1)] - signalEma[histogramIndex], validData[dataHistogramIndex], series, histogramCollection.length, indicator));
            dataHistogramIndex++;
            histogramIndex++;
        }
        return histogramCollection;
    };
    /**
     * To destroy the MACD Indicator.
     * @return {void}
     * @private
     */
    MacdIndicator.prototype.destroy = function (chart) {
        /**
         * Destroys the MACD indicator
         */
    };
    /**
     * Get module name.
     */
    MacdIndicator.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'MacdIndicator';
    };
    return MacdIndicator;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_1__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/momentum-indicator.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/momentum-indicator.js ***!
  \**************************************************************************************************/
/*! exports provided: MomentumIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MomentumIndicator", function() { return MomentumIndicator; });
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `MomentumIndicator` module is used to render Momentum indicator.
 */
var MomentumIndicator = /** @class */ (function (_super) {
    __extends(MomentumIndicator, _super);
    function MomentumIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the collection of series to represent a momentum indicator
     * @private
     */
    MomentumIndicator.prototype.initSeriesCollection = function (indicator, chart) {
        _super.prototype.initSeriesCollection.call(this, indicator, chart);
        var upperLine = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
        _super.prototype.setSeriesProperties.call(this, upperLine, indicator, 'UpperLine', indicator.upperLine.color, indicator.upperLine.width, chart);
    };
    /**
     * Defines the predictions using momentum approach
     * @private
     */
    MomentumIndicator.prototype.initDataSource = function (indicator, chart) {
        var upperCollection = [];
        var signalCollection = [];
        var validData = indicator.points;
        if (validData && validData.length) {
            var upperSeries = indicator.targetSeries[1];
            var signalSeries = indicator.targetSeries[0];
            var length_1 = indicator.period;
            if (validData.length >= indicator.period) {
                for (var i = 0; i < validData.length; i++) {
                    upperCollection.push(this.getDataPoint(validData[i].x, 100, validData[i], upperSeries, upperCollection.length));
                    if (!(i < length_1)) {
                        signalCollection.push(this.getDataPoint(validData[i].x, (Number(validData[i].close) / Number(validData[i - length_1].close) * 100), validData[i], signalSeries, signalCollection.length));
                    }
                }
            }
            this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[0]);
            this.setSeriesRange(upperCollection, indicator, indicator.targetSeries[1]);
        }
    };
    /**
     * To destroy the momentum indicator
     * @return {void}
     * @private
     */
    MomentumIndicator.prototype.destroy = function (chart) {
        /**
         * Destroys the momentum indicator
         */
    };
    /**
     * Get module name.
     */
    MomentumIndicator.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'MomentumIndicator';
    };
    return MomentumIndicator;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_1__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/rsi-indicator.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/rsi-indicator.js ***!
  \*********************************************************************************************/
/*! exports provided: RsiIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RsiIndicator", function() { return RsiIndicator; });
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `RsiIndicator` module is used to render RSI indicator.
 */
var RsiIndicator = /** @class */ (function (_super) {
    __extends(RsiIndicator, _super);
    function RsiIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Initializes the series collection to represent the RSI Indicator
     * @private
     */
    RsiIndicator.prototype.initSeriesCollection = function (indicator, chart) {
        _super.prototype.initSeriesCollection.call(this, indicator, chart);
        if (indicator.showZones) {
            var lowerLine = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
            _super.prototype.setSeriesProperties.call(this, lowerLine, indicator, 'LowerLine', indicator.lowerLine.color, indicator.lowerLine.width, chart);
            var upperLine = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
            _super.prototype.setSeriesProperties.call(this, upperLine, indicator, 'UpperLine', indicator.upperLine.color, indicator.upperLine.width, chart);
        }
    };
    /**
     * Defines the predictions using RSI approach
     * @private
     */
    RsiIndicator.prototype.initDataSource = function (indicator, chart) {
        var signalCollection = [];
        var lowerCollection = [];
        var upperCollection = [];
        var signalSeries = indicator.targetSeries[0];
        //prepare data
        var validData = indicator.points;
        if (validData.length && validData.length >= indicator.period) {
            //Find upper band and lower band values
            if (indicator.showZones) {
                for (var i = 0; i < validData.length; i++) {
                    upperCollection.push(this.getDataPoint(validData[i].x, indicator.overBought, validData[i], indicator.targetSeries[1], upperCollection.length));
                    lowerCollection.push(this.getDataPoint(validData[i].x, indicator.overSold, validData[i], indicator.targetSeries[2], lowerCollection.length));
                }
            }
            //Find signal line value
            var prevClose = Number(validData[0].close);
            var gain = 0;
            var loss = 0;
            for (var i = 1; i <= indicator.period; i++) {
                var close_1 = Number(validData[i].close);
                if (close_1 > prevClose) {
                    gain += close_1 - prevClose;
                }
                else {
                    loss += prevClose - close_1;
                }
                prevClose = close_1;
            }
            gain = gain / indicator.period;
            loss = loss / indicator.period;
            signalCollection.push(this.getDataPoint(validData[indicator.period].x, 100 - (100 / (1 + gain / loss)), validData[indicator.period], signalSeries, signalCollection.length));
            for (var j = indicator.period + 1; j < validData.length; j++) {
                var close_2 = Number(validData[j].close);
                if (close_2 > prevClose) {
                    gain = (gain * (indicator.period - 1) + (close_2 - prevClose)) / indicator.period;
                    loss = (loss * (indicator.period - 1)) / indicator.period;
                }
                else if (close_2 < prevClose) {
                    loss = (loss * (indicator.period - 1) + (prevClose - close_2)) / indicator.period;
                    gain = (gain * (indicator.period - 1)) / indicator.period;
                }
                prevClose = close_2;
                signalCollection.push(this.getDataPoint(validData[j].x, 100 - (100 / (1 + gain / loss)), validData[j], signalSeries, signalCollection.length));
            }
        }
        this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[0]);
        if (indicator.showZones) {
            this.setSeriesRange(upperCollection, indicator, indicator.targetSeries[1]);
            this.setSeriesRange(lowerCollection, indicator, indicator.targetSeries[2]);
        }
    };
    /**
     * To destroy the RSI Indicator.
     * @return {void}
     * @private
     */
    RsiIndicator.prototype.destroy = function (chart) {
        /**
         * Destroys the RSI Indicator
         */
    };
    /**
     * Get module name.
     */
    RsiIndicator.prototype.getModuleName = function () {
        /**
         * Returns the module name of the indicator.
         */
        return 'RsiIndicator';
    };
    return RsiIndicator;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_1__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/sma-indicator.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/sma-indicator.js ***!
  \*********************************************************************************************/
/*! exports provided: SmaIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmaIndicator", function() { return SmaIndicator; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `SmaIndicator` module is used to render SMA indicator.
 */
var SmaIndicator = /** @class */ (function (_super) {
    __extends(SmaIndicator, _super);
    function SmaIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the predictions based on SMA approach
     * @private
     */
    SmaIndicator.prototype.initDataSource = function (indicator, chart) {
        var smaPoints = [];
        var points = indicator.points;
        if (points && points.length) {
            //prepare data
            var validData = points;
            var field = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(indicator.field);
            var xField = 'x';
            var signalSeries = indicator.targetSeries[0];
            if (validData && validData.length && validData.length >= indicator.period) {
                //find initial average
                var average = 0;
                var sum = 0;
                for (var i = 0; i < indicator.period; i++) {
                    sum += validData[i][field];
                }
                average = sum / indicator.period;
                smaPoints.push(this.getDataPoint(validData[indicator.period - 1][xField], average, validData[indicator.period - 1], signalSeries, smaPoints.length));
                var index = indicator.period;
                while (index < validData.length) {
                    sum -= validData[index - indicator.period][field];
                    sum += validData[index][field];
                    average = sum / indicator.period;
                    smaPoints.push(this.getDataPoint(validData[index][xField], average, validData[index], signalSeries, smaPoints.length));
                    index++;
                }
            }
            this.setSeriesRange(smaPoints, indicator);
        }
    };
    /**
     * To destroy the SMA indicator
     * @return {void}
     * @private
     */
    SmaIndicator.prototype.destroy = function (chart) {
        /**
         * Destroys the SMA indicator
         */
    };
    /**
     * Get module name.
     */
    SmaIndicator.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'SmaIndicator';
    };
    return SmaIndicator;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_1__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/stochastic-indicator.js":
/*!****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/stochastic-indicator.js ***!
  \****************************************************************************************************/
/*! exports provided: StochasticIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StochasticIndicator", function() { return StochasticIndicator; });
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `StochasticIndicator` module is used to render stochastic indicator.
 */
var StochasticIndicator = /** @class */ (function (_super) {
    __extends(StochasticIndicator, _super);
    function StochasticIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the collection of series that represents the stochastic indicator
     * @private
     */
    StochasticIndicator.prototype.initSeriesCollection = function (indicator, chart) {
        _super.prototype.initSeriesCollection.call(this, indicator, chart);
        var periodLine = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
        this.setSeriesProperties(periodLine, indicator, 'PeriodLine', indicator.periodLine.color, indicator.periodLine.width, chart);
        if (indicator.showZones) {
            var upperSeries = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
            this.setSeriesProperties(upperSeries, indicator, 'UpperLine', indicator.upperLine.color, indicator.upperLine.width, chart);
            var lowerSeries = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](indicator, 'targetSeries', {}, true);
            this.setSeriesProperties(lowerSeries, indicator, 'LowerLine', indicator.lowerLine.color, indicator.lowerLine.width, chart);
        }
    };
    /**
     * Defines the predictions based on stochastic approach
     * @private
     */
    StochasticIndicator.prototype.initDataSource = function (indicator, chart) {
        var signalCollection = [];
        var upperCollection = [];
        var lowerCollection = [];
        var periodCollection = [];
        var source = [];
        var sourceSeries = indicator.sourceSeries;
        var point = {};
        //prepare data
        var validData = indicator.points;
        if (validData.length && validData.length >= indicator.period) {
            if (indicator.showZones) {
                for (var i = 0; i < validData.length; i++) {
                    upperCollection.push(this.getDataPoint(validData[i].x, indicator.overBought, validData[i], indicator.targetSeries[2], upperCollection.length));
                    lowerCollection.push(this.getDataPoint(validData[i].x, indicator.overSold, validData[i], indicator.targetSeries[3], lowerCollection.length));
                }
            }
            source = this.calculatePeriod(indicator.period, indicator.kPeriod, validData, indicator.targetSeries[1]);
            periodCollection = this.smaCalculation(indicator.period, indicator.kPeriod, source, indicator.targetSeries[1]);
            signalCollection = this.smaCalculation(indicator.period + indicator.kPeriod - 1, indicator.dPeriod, source, indicator.targetSeries[0]);
        }
        this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[0]);
        this.setSeriesRange(periodCollection, indicator, indicator.targetSeries[1]);
        if (indicator.showZones) {
            this.setSeriesRange(upperCollection, indicator, indicator.targetSeries[2]);
            this.setSeriesRange(lowerCollection, indicator, indicator.targetSeries[3]);
        }
    };
    /**
     * Calculates the SMA Values
     * @private
     */
    StochasticIndicator.prototype.smaCalculation = function (period, kPeriod, data, sourceSeries) {
        var pointCollection = [];
        if (data.length >= period + kPeriod) {
            var count = period + (kPeriod - 1);
            var temp = [];
            var values = [];
            for (var i = 0; i < data.length; i++) {
                var value = Number(data[i].y);
                temp.push(value);
            }
            var length_1 = temp.length;
            while (length_1 >= count) {
                var sum = 0;
                for (var i = period - 1; i < (period + kPeriod - 1); i++) {
                    sum = sum + temp[i];
                }
                sum = sum / kPeriod;
                values.push(sum.toFixed(2));
                temp.splice(0, 1);
                length_1 = temp.length;
            }
            var len = count - 1;
            for (var i = 0; i < data.length; i++) {
                if (!(i < len)) {
                    pointCollection.push(this.getDataPoint(data[i].x, Number(values[i - len]), data[i], sourceSeries, pointCollection.length));
                    data[i].y = Number((values[i - len]));
                }
            }
        }
        return pointCollection;
    };
    /**
     * Calculates the period line values.
     * @private
     */
    StochasticIndicator.prototype.calculatePeriod = function (period, kPeriod, data, series) {
        var lowValues = [];
        var highValues = [];
        var closeValues = [];
        var modifiedSource = [];
        for (var j = 0; j < data.length; j++) {
            lowValues[j] = data[j].low;
            highValues[j] = data[j].high;
            closeValues[j] = data[j].close;
        }
        if (data.length > period) {
            var totalPeriod = period + kPeriod;
            var mins = [];
            var maxs = [];
            for (var i = 0; i < period - 1; ++i) {
                maxs.push(0);
                mins.push(0);
                modifiedSource.push(this.getDataPoint(data[i].x, data[i].close, data[i], series, modifiedSource.length));
            }
            for (var i = period - 1; i < data.length; ++i) {
                var min = Number.MAX_VALUE;
                var max = Number.MIN_VALUE;
                for (var j = 0; j < period; ++j) {
                    min = Math.min(min, lowValues[i - j]);
                    max = Math.max(max, highValues[i - j]);
                }
                maxs.push(max);
                mins.push(min);
            }
            for (var i = period - 1; i < data.length; ++i) {
                var top_1 = 0;
                var bottom = 0;
                top_1 += closeValues[i] - mins[i];
                bottom += maxs[i] - mins[i];
                modifiedSource.push(this.getDataPoint(data[i].x, (top_1 / bottom) * 100, data[i], series, modifiedSource.length));
            }
        }
        return modifiedSource;
    };
    /**
     * To destroy the Stocastic Indicator.
     * @return {void}
     * @private
     */
    StochasticIndicator.prototype.destroy = function (chart) {
        /**
         * Destroys the stochastic indicator
         */
    };
    /**
     * Get module name.
     */
    StochasticIndicator.prototype.getModuleName = function () {
        /**
         * Returns the module name of the indicator.
         */
        return 'StochasticIndicator';
    };
    return StochasticIndicator;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_1__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/technical-indicator.js":
/*!***************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/technical-indicator.js ***!
  \***************************************************************************************************/
/*! exports provided: TechnicalIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TechnicalIndicator", function() { return TechnicalIndicator; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <reference path='../series/chart-series-model.d.ts' />





/**
 * Defines how to represent the market trend using technical indicators
 */
var TechnicalIndicator = /** @class */ (function (_super) {
    __extends(TechnicalIndicator, _super);
    function TechnicalIndicator() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /** @private */
        _this.clipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](0, 0, 0, 0);
        return _this;
    }
    /** @private */
    TechnicalIndicator.prototype.setDataSource = function (series, chart) {
        if (series) {
            this.xData = series.xData;
            this.yData = series.yData;
            this.points = series.points;
        }
        var type = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_3__["firstToLowerCase"])(this.type);
        chart[type + 'IndicatorModule'].initDataSource(this, chart);
        chart.visibleSeriesCount += this.targetSeries.length;
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Sma')
    ], TechnicalIndicator.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(14)
    ], TechnicalIndicator.prototype, "period", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(14)
    ], TechnicalIndicator.prototype, "kPeriod", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], TechnicalIndicator.prototype, "dPeriod", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(80)
    ], TechnicalIndicator.prototype, "overBought", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(20)
    ], TechnicalIndicator.prototype, "overSold", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], TechnicalIndicator.prototype, "standardDeviation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Close')
    ], TechnicalIndicator.prototype, "field", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(12)
    ], TechnicalIndicator.prototype, "slowPeriod", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(26)
    ], TechnicalIndicator.prototype, "fastPeriod", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TechnicalIndicator.prototype, "showZones", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#ff9933', width: 2 }, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Connector"])
    ], TechnicalIndicator.prototype, "macdLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Both')
    ], TechnicalIndicator.prototype, "macdType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#2ecd71')
    ], TechnicalIndicator.prototype, "macdPositiveColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#e74c3d')
    ], TechnicalIndicator.prototype, "macdNegativeColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('rgba(211,211,211,0.25)')
    ], TechnicalIndicator.prototype, "bandColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#ffb735', width: 1 }, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Connector"])
    ], TechnicalIndicator.prototype, "upperLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#f2ec2f', width: 1 }, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Connector"])
    ], TechnicalIndicator.prototype, "lowerLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#f2ec2f', width: 1 }, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Connector"])
    ], TechnicalIndicator.prototype, "periodLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], TechnicalIndicator.prototype, "seriesName", void 0);
    return TechnicalIndicator;
}(_series_chart_series__WEBPACK_IMPORTED_MODULE_2__["SeriesBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/tma-indicator.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/tma-indicator.js ***!
  \*********************************************************************************************/
/*! exports provided: TmaIndicator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TmaIndicator", function() { return TmaIndicator; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _indicator_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indicator-base */ "./node_modules/@syncfusion/ej2-charts/src/chart/technical-indicators/indicator-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `TmaIndicator` module is used to render TMA indicator.
 */
var TmaIndicator = /** @class */ (function (_super) {
    __extends(TmaIndicator, _super);
    function TmaIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Defines the predictions based on TMA approach
     * @private
     */
    TmaIndicator.prototype.initDataSource = function (indicator, chart) {
        var tmaPoints = [];
        var field = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(indicator.field);
        var xField = 'x';
        var signalSeries = indicator.targetSeries[0];
        //prepare data
        var validData = indicator.points;
        if (validData && validData.length && validData.length >= indicator.period) {
            var signalSeries_1 = indicator.targetSeries[0];
            //prepare data
            var validData_1 = indicator.points;
            if (validData_1.length && validData_1.length >= indicator.period) {
                //smoothing factor
                var k = (2 / (indicator.period + 1));
                //find initial average
                var average = 0;
                var sum = 0;
                var sumOfSMA = 0;
                var averageSMA = 0;
                var smaValues = [];
                //sma values
                var index = 0;
                var length_1 = validData_1.length;
                var period = indicator.period;
                while (length_1 >= period) {
                    sum = 0;
                    index = validData_1.length - length_1;
                    for (var j = index; j < index + period; j++) {
                        sum = sum + validData_1[j][field];
                    }
                    sum = sum / period;
                    smaValues.push(sum);
                    length_1--;
                }
                //initial values
                for (var k_1 = 0; k_1 < period - 1; k_1++) {
                    sum = 0;
                    for (var j = 0; j < k_1 + 1; j++) {
                        sum = sum + validData_1[j][field];
                    }
                    sum = sum / (k_1 + 1);
                    smaValues.splice(k_1, 0, sum);
                }
                index = indicator.period;
                while (index <= smaValues.length) {
                    sum = 0;
                    for (var j = index - indicator.period; j < index; j++) {
                        sum = sum + smaValues[j];
                    }
                    sum = sum / indicator.period;
                    tmaPoints.push(this.getDataPoint(validData_1[index - 1][xField], sum, validData_1[index - 1], signalSeries_1, tmaPoints.length));
                    index++;
                }
            }
        }
        this.setSeriesRange(tmaPoints, indicator);
    };
    /**
     * To destroy the TMA indicator.
     * @return {void}
     * @private
     */
    TmaIndicator.prototype.destroy = function (chart) {
        /**
         * Destroys the TMA Indicator
         */
    };
    /**
     * Get module name.
     */
    TmaIndicator.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'TmaIndicator';
    };
    return TmaIndicator;
}(_indicator_base__WEBPACK_IMPORTED_MODULE_1__["TechnicalAnalysis"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/trend-lines/trend-line.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/trend-lines/trend-line.js ***!
  \*********************************************************************************/
/*! exports provided: Trendlines */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Trendlines", function() { return Trendlines; });
/* harmony import */ var _series_chart_series__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");


/**
 * `Trendline` module is used to render 6 types of trendlines in chart.
 */
var Trendlines = /** @class */ (function () {
    function Trendlines() {
    }
    /**
     * Defines the collection of series, that are used to represent a trendline
     * @private
     */
    Trendlines.prototype.initSeriesCollection = function (trendline, chart) {
        var trendLineSeries = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Series"](trendline, 'targetSeries', {}, true);
        if (trendline.type === 'Linear' || trendline.type === 'MovingAverage') {
            trendLineSeries.type = 'Line';
        }
        else {
            trendLineSeries.type = 'Spline';
        }
        this.setSeriesProperties(trendLineSeries, trendline, trendline.type, trendline.fill, trendline.width, chart);
    };
    /**
     * Initializes the properties of the trendline series
     */
    Trendlines.prototype.setSeriesProperties = function (series, trendline, name, fill, width, chart) {
        series.name = trendline.name;
        series.xName = 'x';
        series.yName = 'y';
        series.fill = fill || 'blue';
        series.width = width;
        series.clipRectElement = trendline.clipRectElement;
        series.points = [];
        series.enableTooltip = trendline.enableTooltip;
        series.index = trendline.index;
        series.sourceIndex = trendline.sourceIndex;
        series.interior = series.fill;
        series.animation = trendline.animation;
        series.legendShape = 'HorizontalLine';
        series.marker = trendline.marker;
        series.category = 'TrendLine';
        series.chart = chart;
        series.xMin = Infinity;
        series.xMax = -Infinity;
        series.yMin = Infinity;
        series.yMax = -Infinity;
        series.xData = [];
        series.yData = [];
        trendline.targetSeries = series;
    };
    /**
     * Creates the elements of a trendline
     */
    Trendlines.prototype.createTrendLineElements = function (chart, trendline, index, element, clipRectElement) {
        trendline.trendLineElement = element;
        trendline.targetSeries.clipRectElement = clipRectElement;
        trendline.targetSeries.seriesElement = element;
        if (chart.trendLineElements) {
            chart.trendLineElements.appendChild(trendline.trendLineElement);
        }
    };
    /**
     * Defines the data point of trendline
     */
    Trendlines.prototype.getDataPoint = function (x, y, sourcePoint, series, index) {
        var trendPoint = new _series_chart_series__WEBPACK_IMPORTED_MODULE_0__["Points"]();
        trendPoint.x = series.xAxis.valueType === 'DateTime' ? new Date(Number(x)) : x;
        trendPoint.y = y;
        trendPoint.xValue = Number(x);
        trendPoint.color = series.fill;
        trendPoint.index = index;
        trendPoint.yValue = Number(y);
        trendPoint.visible = true;
        series.xMin = Math.min(series.xMin, trendPoint.xValue);
        series.yMin = Math.min(series.yMin, trendPoint.yValue);
        series.xMax = Math.max(series.xMax, trendPoint.xValue);
        series.yMax = Math.max(series.yMax, trendPoint.yValue);
        series.xData.push(trendPoint.xValue);
        return trendPoint;
    };
    /**
     * Finds the slope and intercept of trendline
     */
    Trendlines.prototype.findSlopeIntercept = function (xValues, yValues, trendline, points) {
        var xAvg = 0;
        var yAvg = 0;
        var xyAvg = 0;
        var xxAvg = 0;
        var yyAvg = 0;
        var index = 0;
        var slope = 0;
        var intercept = 0;
        while (index < points.length) {
            // To fix trendline not rendered issue while Nan Value is provided for y values.
            if (isNaN(yValues[index])) {
                yValues[index] = ((yValues[index - 1] + yValues[index + 1]) / 2);
            }
            xAvg += xValues[index];
            yAvg += yValues[index];
            xyAvg += xValues[index] * yValues[index];
            xxAvg += xValues[index] * xValues[index];
            yyAvg += yValues[index] * yValues[index];
            index++;
        }
        var type = trendline.type;
        if (trendline.intercept && (type === 'Linear' || type === 'Exponential')) {
            intercept = trendline.intercept;
            switch (type) {
                case 'Linear':
                    slope = ((xyAvg) - (trendline.intercept * xAvg)) / xxAvg;
                    break;
                case 'Exponential':
                    slope = ((xyAvg) - (Math.log(Math.abs(trendline.intercept)) * xAvg)) / xxAvg;
                    break;
            }
        }
        else {
            slope = ((points.length * xyAvg) - (xAvg * yAvg)) / ((points.length * xxAvg) - (xAvg * xAvg));
            if (type === 'Exponential' || type === 'Power') {
                intercept = Math.exp((yAvg - (slope * xAvg)) / points.length);
            }
            else {
                intercept = (yAvg - (slope * xAvg)) / points.length;
            }
        }
        return { slope: slope, intercept: intercept };
    };
    /**
     * Defines the points to draw the trendlines
     */
    Trendlines.prototype.initDataSource = function (trendline, chart) {
        var points = trendline.points;
        if (points && points.length) {
            //prepare data
            var trendlineSeries = trendline.targetSeries;
            switch (trendline.type) {
                case 'Linear':
                    this.setLinearRange(points, trendline, trendlineSeries);
                    break;
                case 'Exponential':
                    this.setExponentialRange(points, trendline, trendlineSeries);
                    break;
                case 'MovingAverage':
                    this.setMovingAverageRange(points, trendline, trendlineSeries);
                    break;
                case 'Polynomial':
                    this.setPolynomialRange(points, trendline, trendlineSeries);
                    break;
                case 'Power':
                    this.setPowerRange(points, trendline, trendlineSeries);
                    break;
                case 'Logarithmic':
                    this.setLogarithmicRange(points, trendline, trendlineSeries);
                    break;
            }
            if (trendline.type !== 'Linear' && trendline.type !== 'MovingAverage') {
                trendlineSeries.chart.splineSeriesModule.findSplinePoint(trendlineSeries);
            }
        }
    };
    /**
     * Calculation of exponential points
     */
    Trendlines.prototype.setExponentialRange = function (points, trendline, series) {
        var xValue = [];
        var yValue = [];
        var index = 0;
        var slopeIntercept;
        while (index < points.length) {
            var point = points[index];
            xValue.push(point.xValue);
            yValue.push(Math.log(point.yValue));
            index++;
        }
        slopeIntercept = this.findSlopeIntercept(xValue, yValue, trendline, points);
        series.points = this.getExponentialPoints(trendline, points, xValue, yValue, series, slopeIntercept);
    };
    /**
     * Calculation of logarithmic points
     */
    Trendlines.prototype.setLogarithmicRange = function (points, trendline, series) {
        var xLogValue = [];
        var yLogValue = [];
        var xPointsLgr = [];
        var slopeIntercept;
        var index = 0;
        while (index < points.length) {
            var point = points[index];
            xPointsLgr.push(point.xValue);
            xLogValue.push(Math.log(point.xValue));
            yLogValue.push(point.yValue);
            index++;
        }
        slopeIntercept = this.findSlopeIntercept(xLogValue, yLogValue, trendline, points);
        series.points = this.getLogarithmicPoints(trendline, points, xPointsLgr, yLogValue, series, slopeIntercept);
    };
    /**
     * Calculation of polynomial points
     */
    Trendlines.prototype.setPolynomialRange = function (points, trendline, series) {
        var xPolyValues = [];
        var yPolyValues = [];
        var index = 0;
        while (index < points.length) {
            var point = points[index];
            xPolyValues.push(point.xValue);
            yPolyValues.push(point.yValue);
            index++;
        }
        series.points = this.getPolynomialPoints(trendline, points, xPolyValues, yPolyValues, series);
    };
    /**
     * Calculation of power points
     */
    Trendlines.prototype.setPowerRange = function (points, trendline, series) {
        var xValues = [];
        var yValues = [];
        var powerPoints = [];
        var slopeIntercept;
        var index = 0;
        while (index < points.length) {
            var point = points[index];
            powerPoints.push(point.xValue);
            xValues.push(Math.log(point.xValue));
            yValues.push(Math.log(point.yValue));
            index++;
        }
        slopeIntercept = this.findSlopeIntercept(xValues, yValues, trendline, points);
        series.points = this.getPowerPoints(trendline, points, powerPoints, yValues, series, slopeIntercept);
    };
    /**
     * Calculation of linear points
     */
    Trendlines.prototype.setLinearRange = function (points, trendline, series) {
        var xValues = [];
        var yValues = [];
        var slopeIntercept;
        var index = 0;
        while (index < points.length) {
            var point = points[index];
            xValues.push(point.xValue);
            yValues.push(point.yValue);
            index++;
        }
        slopeIntercept = this.findSlopeIntercept(xValues, yValues, trendline, points);
        series.points = this.getLinearPoints(trendline, points, xValues, yValues, series, slopeIntercept);
    };
    /**
     * Calculation of moving average points
     */
    Trendlines.prototype.setMovingAverageRange = function (points, trendline, series) {
        var xValues = [];
        var yValues = [];
        var xAvgValues = [];
        var index = 0;
        while (index < points.length) {
            var point = points[index];
            xAvgValues.push(point.xValue);
            xValues.push(index + 1);
            yValues.push(point.yValue);
            index++;
        }
        series.points = this.getMovingAveragePoints(trendline, points, xAvgValues, yValues, series);
    };
    /**
     * Calculation of logarithmic points
     */
    Trendlines.prototype.getLogarithmicPoints = function (trendline, points, xValues, yValues, series, slopeInterceptLog) {
        var midPoint = Math.round((points.length / 2));
        var pts = [];
        var x1Log = xValues[0] - trendline.backwardForecast;
        var y1Log = slopeInterceptLog.intercept + (slopeInterceptLog.slope * Math.log(x1Log));
        var x2Log = xValues[midPoint - 1];
        var y2Log = slopeInterceptLog.intercept + (slopeInterceptLog.slope * Math.log(x2Log));
        var x3Log = xValues[xValues.length - 1] + trendline.forwardForecast;
        var y3Log = slopeInterceptLog.intercept + (slopeInterceptLog.slope * Math.log(x3Log));
        pts.push(this.getDataPoint(x1Log, y1Log, points[0], series, pts.length));
        pts.push(this.getDataPoint(x2Log, y2Log, points[midPoint - 1], series, pts.length));
        pts.push(this.getDataPoint(x3Log, y3Log, points[points.length - 1], series, pts.length));
        return pts;
    };
    /**
     * Defines the points based on data point
     */
    Trendlines.prototype.getPowerPoints = function (trendline, points, xValues, yValues, series, slopeInterceptPower) {
        var midPoint = Math.round((points.length / 2));
        var pts = [];
        var x1 = xValues[0] - trendline.backwardForecast;
        x1 = x1 > -1 ? x1 : 0;
        var y1 = slopeInterceptPower.intercept * Math.pow(x1, slopeInterceptPower.slope);
        var x2 = xValues[midPoint - 1];
        var y2 = slopeInterceptPower.intercept * Math.pow(x2, slopeInterceptPower.slope);
        var x3 = xValues[xValues.length - 1] + trendline.forwardForecast;
        var y3 = slopeInterceptPower.intercept * Math.pow(x3, slopeInterceptPower.slope);
        pts.push(this.getDataPoint(x1, y1, points[0], series, pts.length));
        pts.push(this.getDataPoint(x2, y2, points[midPoint - 1], series, pts.length));
        pts.push(this.getDataPoint(x3, y3, points[points.length - 1], series, pts.length));
        return pts;
    };
    /**
     * Get the polynomial points based on polynomial slopes
     */
    Trendlines.prototype.getPolynomialPoints = function (trendline, points, xValues, yValues, series) {
        var midPoint = Math.round((points.length / 2));
        var pts = [];
        var polynomialOrder = points.length <= trendline.polynomialOrder ? points.length : trendline.polynomialOrder;
        polynomialOrder = Math.max(2, polynomialOrder);
        polynomialOrder = Math.min(6, polynomialOrder);
        trendline.polynomialOrder = polynomialOrder;
        trendline.polynomialSlopes = [];
        trendline.polynomialSlopes.length = trendline.polynomialOrder + 1;
        var index = 0;
        while (index < xValues.length) {
            var xVal = xValues[index];
            var yVal = yValues[index];
            var subIndex = 0;
            while (subIndex <= trendline.polynomialOrder) {
                if (!trendline.polynomialSlopes[subIndex]) {
                    trendline.polynomialSlopes[subIndex] = 0;
                }
                trendline.polynomialSlopes[subIndex] += Math.pow(xVal, subIndex) * yVal;
                ++subIndex;
            }
            index++;
        }
        var numArray = [];
        numArray.length = 1 + 2 * trendline.polynomialOrder;
        var matrix = [];
        matrix.length = trendline.polynomialOrder + 1;
        var newIndex = 0;
        while (newIndex < (trendline.polynomialOrder + 1)) {
            matrix[newIndex] = [];
            matrix[newIndex].length = 3;
            newIndex++;
        }
        var nIndex = 0;
        var num1 = 0;
        while (nIndex < xValues.length) {
            var d = xValues[nIndex];
            var num2 = 1.0;
            var nIndex2 = 0;
            while (nIndex2 < numArray.length) {
                if (!numArray[nIndex2]) {
                    numArray[nIndex2] = 0;
                }
                numArray[nIndex2] += num2;
                num2 *= d;
                ++num1;
                ++nIndex2;
            }
            ++nIndex;
        }
        var nnIndex = 0;
        while (nnIndex <= trendline.polynomialOrder) {
            var nnIndex2 = 0;
            while (nnIndex2 <= trendline.polynomialOrder) {
                matrix[nnIndex][nnIndex2] = numArray[nnIndex + nnIndex2];
                ++nnIndex2;
            }
            ++nnIndex;
        }
        if (!this.gaussJordanElimination(matrix, trendline.polynomialSlopes)) {
            trendline.polynomialSlopes = null;
        }
        pts = this.getPoints(trendline, points, xValues, yValues, series);
        return pts;
    };
    /**
     * Defines the moving average points
     */
    Trendlines.prototype.getMovingAveragePoints = function (trendline, points, xValues, yValues, series) {
        var pts = [];
        var period = trendline.period >= points.length ? points.length - 1 : trendline.period;
        period = Math.max(2, period);
        var index = 0;
        var y;
        var x;
        var count;
        var nullCount;
        while (index < points.length - 1) {
            y = count = nullCount = 0;
            for (var j = index; count < period; j++) {
                count++;
                if (!yValues[j]) {
                    nullCount++;
                }
                y += yValues[j];
            }
            y = period - nullCount <= 0 ? null : y / (period - nullCount);
            if (y && !isNaN(y)) {
                x = xValues[period - 1 + index];
                pts.push(this.getDataPoint(x, y, points[period - 1 + index], series, pts.length));
            }
            index++;
        }
        return pts;
    };
    /**
     * Defines the linear points
     */
    Trendlines.prototype.getLinearPoints = function (trendline, points, xValues, yValues, series, slopeInterceptLinear) {
        var pts = [];
        var x1Linear = xValues[0] - trendline.backwardForecast;
        var y1Linear = slopeInterceptLinear.slope * x1Linear + slopeInterceptLinear.intercept;
        var x2Linear = xValues[xValues.length - 1] + trendline.forwardForecast;
        var y2Linear = slopeInterceptLinear.slope * x2Linear + slopeInterceptLinear.intercept;
        pts.push(this.getDataPoint(x1Linear, y1Linear, points[0], series, pts.length));
        pts.push(this.getDataPoint(x2Linear, y2Linear, points[points.length - 1], series, pts.length));
        return pts;
    };
    /**
     * Defines the exponential points
     */
    Trendlines.prototype.getExponentialPoints = function (trendline, points, xValues, yValues, series, slopeInterceptExp) {
        var midPoint = Math.round((points.length / 2));
        var ptsExp = [];
        var x1 = xValues[0] - trendline.backwardForecast;
        var y1 = slopeInterceptExp.intercept * Math.exp(slopeInterceptExp.slope * x1);
        var x2 = xValues[midPoint - 1];
        var y2 = slopeInterceptExp.intercept * Math.exp(slopeInterceptExp.slope * x2);
        var x3 = xValues[xValues.length - 1] + trendline.forwardForecast;
        var y3 = slopeInterceptExp.intercept * Math.exp(slopeInterceptExp.slope * x3);
        ptsExp.push(this.getDataPoint(x1, y1, points[0], series, ptsExp.length));
        ptsExp.push(this.getDataPoint(x2, y2, points[midPoint - 1], series, ptsExp.length));
        ptsExp.push(this.getDataPoint(x3, y3, points[points.length - 1], series, ptsExp.length));
        return ptsExp;
    };
    /**
     * Defines the points based on data point
     */
    Trendlines.prototype.getPoints = function (trendline, points, xValues, yValues, series) {
        var midPoint = Math.round((points.length / 2));
        var polynomialSlopes = trendline.polynomialSlopes;
        var pts = [];
        var x1 = 1;
        var index = 1;
        var xValue;
        var yValue;
        while (index <= polynomialSlopes.length) {
            if (index === 1) {
                xValue = xValues[0] - trendline.backwardForecast;
                yValue = this.getPolynomialYValue(polynomialSlopes, xValue);
                pts.push(this.getDataPoint(xValue, yValue, points[0], series, pts.length));
            }
            else if (index === polynomialSlopes.length) {
                xValue = xValues[points.length - 1] + trendline.forwardForecast;
                yValue = this.getPolynomialYValue(polynomialSlopes, xValue);
                pts.push(this.getDataPoint(xValue, yValue, points[points.length - 1], series, pts.length));
            }
            else {
                x1 += (points.length + trendline.forwardForecast) / polynomialSlopes.length;
                xValue = xValues[parseInt(x1.toString(), 10) - 1];
                yValue = this.getPolynomialYValue(polynomialSlopes, xValue);
                pts.push(this.getDataPoint(xValue, yValue, points[parseInt(x1.toString(), 10) - 1], series, pts.length));
            }
            index++;
        }
        return pts;
    };
    /**
     * Defines the polynomial value of y
     */
    Trendlines.prototype.getPolynomialYValue = function (slopes, x) {
        var sum = 0;
        var index = 0;
        while (index < slopes.length) {
            sum += slopes[index] * Math.pow(x, index);
            index++;
        }
        return sum;
    };
    /**
     * Defines the gauss jordan elimination
     */
    Trendlines.prototype.gaussJordanElimination = function (matrix, polynomialSlopes) {
        var length = matrix.length;
        var numArray1 = [];
        var numArray2 = [];
        var numArray3 = [];
        numArray1.length = length;
        numArray2.length = length;
        numArray3.length = length;
        var index = 0;
        while (index < length) {
            numArray3[index] = 0;
            ++index;
        }
        var index1 = 0;
        while (index1 < length) {
            var num1 = 0;
            var index2 = 0;
            var index3 = 0;
            var index4 = 0;
            while (index4 < length) {
                if (numArray3[index4] !== 1) {
                    var index5 = 0;
                    while (index5 < length) {
                        if (numArray3[index5] === 0 && Math.abs(matrix[index4][index5]) >= num1) {
                            num1 = Math.abs(matrix[index4][index5]);
                            index2 = index4;
                            index3 = index5;
                        }
                        ++index5;
                    }
                }
                ++index4;
            }
            ++numArray3[index3];
            if (index2 !== index3) {
                var index4_1 = 0;
                while (index4_1 < length) {
                    var num2 = matrix[index2][index4_1];
                    matrix[index2][index4_1] = matrix[index3][index4_1];
                    matrix[index3][index4_1] = num2;
                    ++index4_1;
                }
                var num3 = polynomialSlopes[index2];
                polynomialSlopes[index2] = polynomialSlopes[index3];
                polynomialSlopes[index3] = num3;
            }
            numArray2[index1] = index2;
            numArray1[index1] = index3;
            if (matrix[index3][index3] === 0.0) {
                return false;
            }
            var num4 = 1.0 / matrix[index3][index3];
            matrix[index3][index3] = 1.0;
            var iindex4 = 0;
            while (iindex4 < length) {
                matrix[index3][iindex4] *= num4;
                ++iindex4;
            }
            polynomialSlopes[index3] *= num4;
            var iandex4 = 0;
            while (iandex4 < length) {
                if (iandex4 !== index3) {
                    var num2 = matrix[iandex4][index3];
                    matrix[iandex4][index3] = 0.0;
                    var index5 = 0;
                    while (index5 < length) {
                        matrix[iandex4][index5] -= matrix[index3][index5] * num2;
                        ++index5;
                    }
                    polynomialSlopes[iandex4] -= polynomialSlopes[index3] * num2;
                }
                ++iandex4;
            }
            ++index1;
        }
        var iindex1 = length - 1;
        while (iindex1 >= 0) {
            if (numArray2[iindex1] !== numArray1[iindex1]) {
                var iindex2 = 0;
                while (iindex2 < length) {
                    var num = matrix[iindex2][numArray2[iindex1]];
                    matrix[iindex2][numArray2[iindex1]] = matrix[iindex2][numArray1[iindex1]];
                    matrix[iindex2][numArray1[iindex1]] = num;
                    ++iindex2;
                }
            }
            --iindex1;
        }
        return true;
    };
    /**
     * Defines the trendline elements
     */
    Trendlines.prototype.getTrendLineElements = function (series, chart) {
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["findClipRect"])(series);
        var clipRect = series.clipRect;
        var clipRectElement = chart.renderer.drawClipPath(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](chart.element.id + '_ChartTrendlineClipRect_' + series.index, 'transparent', { width: 1, color: 'Gray' }, 1, {
            x: 0, y: 0, width: clipRect.width,
            height: clipRect.height,
        }));
        var element;
        element = chart.renderer.createGroup({
            'id': chart.element.id + 'TrendlineSeriesGroup' + series.index,
            'transform': 'translate(' + clipRect.x + ',' + clipRect.y + ')',
            'clip-path': 'url(#' + chart.element.id + '_ChartTrendlineClipRect_' + series.index + ')'
        });
        //defines the clip rect element
        if (element) {
            element.appendChild(clipRectElement);
        }
        for (var _i = 0, _a = series.trendlines; _i < _a.length; _i++) {
            var trendline = _a[_i];
            this.createTrendLineElements(chart, trendline, trendline.index, element, clipRectElement);
        }
    };
    /**
     * To destroy the trendline
     */
    Trendlines.prototype.destroy = function (chart) {
        /**
         * Destroys the Linear Trendline
         */
    };
    /**
     * Get module name
     */
    Trendlines.prototype.getModuleName = function () {
        /**
         * Returns the module name of the series
         */
        return 'TrendLine';
    };
    return Trendlines;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/crosshair.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/crosshair.js ***!
  \*************************************************************************************/
/*! exports provided: Crosshair */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Crosshair", function() { return Crosshair; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");



/**
 * `Crosshair` module is used to render the crosshair for chart.
 */
var Crosshair = /** @class */ (function () {
    /**
     * Constructor for crosshair module.
     * @private
     */
    function Crosshair(chart) {
        this.arrowLocation = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](0, 0);
        this.rx = 2;
        this.ry = 2;
        this.chart = chart;
        this.elementID = this.chart.element.id;
        this.svgRenderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["SvgRenderer"](this.chart.element.id);
        this.addEventListener();
    }
    /**
     * @hidden
     */
    Crosshair.prototype.addEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMoveHandler, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpHandler, this);
        this.chart.on(cancelEvent, this.mouseLeaveHandler, this);
        this.chart.on('tapHold', this.longPress, this);
    };
    Crosshair.prototype.mouseUpHandler = function () {
        if (this.chart.startMove) {
            this.removeCrosshair(2000);
        }
    };
    Crosshair.prototype.mouseLeaveHandler = function () {
        this.removeCrosshair(1000);
    };
    Crosshair.prototype.mouseMoveHandler = function (event) {
        var chart = this.chart;
        if (event.type === 'touchmove' && (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos7) && chart.startMove && event.preventDefault) {
            event.preventDefault();
        }
        // Tooltip for chart series.
        if (!chart.disableTrackTooltip) {
            if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect)) {
                if (chart.startMove || !chart.isTouch) {
                    this.crosshair();
                }
            }
            else {
                this.removeCrosshair(1000);
            }
        }
    };
    /**
     * Handles the long press on chart.
     * @return {boolean}
     * @private
     */
    Crosshair.prototype.longPress = function () {
        var chart = this.chart;
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect)) {
            this.crosshair();
        }
        return false;
    };
    /**
     * Renders the crosshair.
     * @return {void}
     */
    Crosshair.prototype.crosshair = function () {
        var chart = this.chart;
        var horizontalCross = '';
        var verticalCross = '';
        var options;
        var axisTooltipGroup = document.getElementById(this.elementID + '_crosshair_axis');
        var crosshair = chart.crosshair;
        var tooltipdiv = document.getElementById(this.elementID + '_tooltip');
        var chartRect = chart.chartAxisLayoutPanel.seriesClipRect;
        var crossGroup = chart.enableCanvas ? document.getElementById(this.elementID + '_Secondary_Element') :
            document.getElementById(this.elementID + '_UserInteraction');
        var crosshairsvg;
        var cross = document.getElementById(this.elementID + '_Crosshair');
        if (chart.enableCanvas) {
            if (!cross) {
                cross = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
                    id: this.elementID + '_Crosshair', styles: 'position: absolute; pointer-events: none'
                });
                crossGroup.appendChild(cross);
            }
        }
        this.stopAnimation();
        if (chart.tooltip.enable && !Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(chart.tooltipModule.valueX, chart.tooltipModule.valueY, chartRect)) {
            return null;
        }
        if (chart.stockChart && chart.stockChart.onPanning) {
            this.removeCrosshair(1000);
            return null;
        }
        this.valueX = chart.tooltip.enable ? chart.tooltipModule.valueX : chart.mouseX;
        this.valueY = chart.tooltip.enable ? chart.tooltipModule.valueY : chart.mouseY;
        if (!chart.enableCanvas) {
            crossGroup.setAttribute('opacity', '1');
        }
        if (crosshair.lineType === 'Both' || crosshair.lineType === 'Horizontal') {
            horizontalCross += 'M ' + chartRect.x + ' ' + this.valueY +
                ' L ' + (chartRect.x + chartRect.width) + ' ' + this.valueY;
        }
        if (crosshair.lineType === 'Both' || crosshair.lineType === 'Vertical') {
            verticalCross += 'M ' + this.valueX + ' ' + chartRect.y +
                ' L ' + this.valueX + ' ' + (chartRect.y + chartRect.height);
        }
        if (chart.enableCanvas) {
            if (!axisTooltipGroup) {
                axisTooltipGroup = this.svgRenderer.createGroup({ 'id': this.elementID + '_crosshair_axis' });
            }
            var elementID = chart.tooltip.enable ? chart.element.id + '_tooltip_svg' : chart.element.id + '_svg';
            crosshairsvg = this.svgRenderer.createSvg({
                id: elementID,
                width: chart.availableSize.width,
                height: chart.availableSize.height
            });
            if (chart.tooltip.enable) {
                tooltipdiv = !tooltipdiv ? chart.tooltipModule.createElement() : tooltipdiv;
                tooltipdiv.appendChild(crosshairsvg);
                crossGroup.appendChild(tooltipdiv);
            }
            options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["PathOption"](this.elementID + '_HorizontalLine', 'none', crosshair.line.width, crosshair.line.color || chart.themeStyle.crosshairLine, 1, crosshair.dashArray, horizontalCross);
            this.drawCrosshairLine(options, cross, chartRect.x, this.valueY, chartRect.width, 0, horizontalCross);
            options.d = verticalCross;
            options.id = this.elementID + '_VerticalLine';
            this.drawCrosshairLine(options, cross, this.valueX, chartRect.y, 0, chartRect.height, verticalCross);
            this.renderAxisTooltip(chart, chartRect, axisTooltipGroup);
            crosshairsvg.appendChild(axisTooltipGroup);
            if (!chart.tooltip.enable) {
                cross.appendChild(crosshairsvg);
            }
        }
        else {
            if (crossGroup.childNodes.length === 0) {
                axisTooltipGroup = chart.renderer.createGroup({ 'id': this.elementID + '_crosshair_axis' });
                options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["PathOption"](this.elementID + '_HorizontalLine', 'none', crosshair.line.width, crosshair.line.color || chart.themeStyle.crosshairLine, 1, crosshair.dashArray, horizontalCross);
                this.renderCrosshairLine(options, crossGroup);
                options.d = verticalCross;
                options.id = this.elementID + '_VerticalLine';
                this.renderCrosshairLine(options, crossGroup);
                crossGroup.appendChild(axisTooltipGroup);
                this.renderAxisTooltip(chart, chartRect, crossGroup.lastChild);
            }
            else {
                document.getElementById(this.elementID + '_HorizontalLine').setAttribute('d', horizontalCross);
                document.getElementById(this.elementID + '_VerticalLine').setAttribute('d', verticalCross);
                this.renderAxisTooltip(chart, chartRect, crossGroup.lastChild);
            }
        }
    };
    Crosshair.prototype.renderCrosshairLine = function (options, crossGroup) {
        var htmlObject = this.chart.renderer.drawPath(options);
        crossGroup.appendChild(htmlObject);
    };
    Crosshair.prototype.drawCrosshairLine = function (options, crossGroup, left, top, width, height, direction) {
        if (!document.getElementById(options.id) && direction) {
            var line = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
                id: options.id
            });
            crossGroup.appendChild(line);
        }
        if (document.getElementById(options.id)) {
            var style = 'top:' + top.toString() + 'px;' +
                'left:' + left.toString() + 'px;' +
                'width:' + width + 'px;' +
                'height:' + height + 'px;' +
                'fill:' + options.stroke + ';' +
                'border: 0.5px solid black;' +
                'position: absolute';
            var crosshairline = document.getElementById(options.id);
            var crosshairtooltip = document.getElementById(this.elementID + '_crosshair_axis');
            crosshairline.setAttribute('style', style);
            crossGroup.style.opacity = '1';
            if (crosshairtooltip) {
                crosshairtooltip.style.opacity = '1';
            }
        }
    };
    Crosshair.prototype.renderAxisTooltip = function (chart, chartRect, axisGroup) {
        var axis;
        var text;
        var rect;
        var pathElement;
        var textElem;
        var options;
        var padding = 5;
        var direction;
        var axisRect;
        for (var k = 0, length_1 = chart.axisCollections.length; k < length_1; k++) {
            axis = chart.axisCollections[k];
            axisRect = !axis.placeNextToAxisLine ? axis.rect : axis.updatedRect;
            if (axis.crosshairTooltip.enable) {
                if ((this.valueX <= (axisRect.x + axisRect.width) && axisRect.x <= this.valueX) ||
                    (this.valueY <= (axisRect.y + axisRect.height) && axisRect.y <= this.valueY)) {
                    pathElement = document.getElementById(this.elementID + '_axis_tooltip_' + k);
                    textElem = document.getElementById(this.elementID + '_axis_tooltip_text_' + k);
                    text = this.getAxisText(axis);
                    if (!text) {
                        continue;
                    }
                    rect = this.tooltipLocation(text, axis, chartRect, axisRect);
                    if (pathElement === null) {
                        if (chart.enableCanvas) {
                            pathElement = this.svgRenderer.drawPath({
                                'id': this.elementID + '_axis_tooltip_' + k,
                                'fill': axis.crosshairTooltip.fill || chart.themeStyle.crosshairFill
                            }, null);
                        }
                        else {
                            pathElement = chart.renderer.drawPath({
                                'id': this.elementID + '_axis_tooltip_' + k,
                                'fill': axis.crosshairTooltip.fill || chart.themeStyle.crosshairFill
                            }, null);
                        }
                        axisGroup.appendChild(pathElement);
                        options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["TextOption"](this.elementID + '_axis_tooltip_text_' + k, 0, 0, 'start', text);
                        var render = chart.enableCanvas ? this.svgRenderer : chart.renderer;
                        textElem = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(render, options, axis.crosshairTooltip.textStyle, axis.crosshairTooltip.textStyle.color || chart.themeStyle.crosshairLabel, axisGroup);
                    }
                    direction = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["findDirection"])(this.rx, this.ry, rect, this.arrowLocation, 10, this.isTop, this.isBottom, this.isLeft, this.valueX, this.valueY);
                    pathElement.setAttribute('d', direction);
                    textElem.textContent = text;
                    textElem.setAttribute('x', (rect.x + padding).toString());
                    textElem.setAttribute('y', (rect.y + padding + 3 * this.elementSize.height / 4).toString());
                }
                else {
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.elementID + '_axis_tooltip_' + k);
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.elementID + '_axis_tooltip_text_' + k);
                }
            }
        }
    };
    Crosshair.prototype.getAxisText = function (axis) {
        var value;
        this.isBottom = false;
        this.isTop = false;
        this.isLeft = false;
        this.isRight = false;
        var labelValue = (axis.valueType === 'Category' && axis.labelPlacement === 'BetweenTicks')
            ? 0.5 : 0;
        if (axis.orientation === 'Horizontal') {
            value = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getValueXByPoint"])(Math.abs(this.valueX - axis.rect.x), axis.rect.width, axis) + labelValue;
            this.isBottom = !axis.opposedPosition;
            this.isTop = axis.opposedPosition;
        }
        else {
            value = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getValueYByPoint"])(Math.abs(this.valueY - axis.rect.y), axis.rect.height, axis) + labelValue;
            this.isRight = axis.opposedPosition;
            this.isLeft = !axis.opposedPosition;
        }
        if (axis.valueType === 'DateTime') {
            return axis.format(new Date(value));
        }
        else if (axis.valueType === 'Category') {
            return axis.labels[Math.floor(value)];
        }
        else if (axis.valueType === 'Logarithmic') {
            return value = axis.format(Math.pow(axis.logBase, value));
        }
        else {
            var customLabelFormat = axis.labelFormat && axis.labelFormat.match('{value}') !== null;
            return customLabelFormat ? axis.labelFormat.replace('{value}', axis.format(value)) : axis.format(value);
        }
    };
    Crosshair.prototype.tooltipLocation = function (text, axis, bounds, axisRect) {
        var isBottom = false;
        var isLeft = false;
        var padding = 5;
        var arrowPadding = 10;
        var tooltipRect;
        var boundsX = bounds.x;
        var boundsY = bounds.y;
        var islabelInside = axis.labelPosition === 'Inside';
        var scrollBarHeight = axis.scrollbarSettings.enable || (axis.zoomingScrollBar && axis.zoomingScrollBar.svgObject)
            ? axis.scrollBarHeight : 0;
        this.elementSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])(text, axis.crosshairTooltip.textStyle);
        if (axis.orientation === 'Horizontal') {
            var yLocation = islabelInside ? axisRect.y - this.elementSize.height - (padding * 2 + arrowPadding) :
                axisRect.y + scrollBarHeight;
            var height = islabelInside ? axisRect.y - this.elementSize.height - arrowPadding : axisRect.y + arrowPadding;
            this.arrowLocation = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](this.valueX, yLocation);
            tooltipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"]((this.valueX - (this.elementSize.width / 2) - padding), height + (!islabelInside ? scrollBarHeight : 0), this.elementSize.width + padding * 2, this.elementSize.height + padding * 2);
            if (axis.opposedPosition) {
                tooltipRect.y = islabelInside ? axisRect.y : axisRect.y -
                    (this.elementSize.height + padding * 2 + arrowPadding) - scrollBarHeight;
            }
            if (tooltipRect.x < boundsX) {
                tooltipRect.x = boundsX;
            }
            if (tooltipRect.x + tooltipRect.width > boundsX + bounds.width) {
                tooltipRect.x -= ((tooltipRect.x + tooltipRect.width) - (boundsX + bounds.width));
            }
            if (this.arrowLocation.x + arrowPadding / 2 > tooltipRect.x + tooltipRect.width - this.rx) {
                this.arrowLocation.x = tooltipRect.x + tooltipRect.width - this.rx - arrowPadding / 2;
            }
            if (this.arrowLocation.x - arrowPadding / 2 < tooltipRect.x + this.rx) {
                this.arrowLocation.x = tooltipRect.x + this.rx + arrowPadding / 2;
            }
        }
        else {
            scrollBarHeight = scrollBarHeight * (axis.opposedPosition ? 1 : -1);
            this.arrowLocation = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](axisRect.x, this.valueY);
            var width = islabelInside ? axisRect.x - scrollBarHeight :
                axisRect.x - (this.elementSize.width) - (padding * 2 + arrowPadding);
            tooltipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](width + scrollBarHeight, this.valueY - (this.elementSize.height / 2) - padding, this.elementSize.width + (padding * 2), this.elementSize.height + padding * 2);
            if (axis.opposedPosition) {
                tooltipRect.x = islabelInside ? axisRect.x - this.elementSize.width - arrowPadding :
                    axisRect.x + arrowPadding + scrollBarHeight;
                if ((tooltipRect.x + tooltipRect.width) > this.chart.availableSize.width) {
                    this.arrowLocation.x -= ((tooltipRect.x + tooltipRect.width) - this.chart.availableSize.width);
                    tooltipRect.x -= ((tooltipRect.x + tooltipRect.width) - this.chart.availableSize.width);
                }
            }
            else {
                if (tooltipRect.x < 0) {
                    this.arrowLocation.x -= tooltipRect.x;
                    tooltipRect.x = 0;
                }
            }
            if (tooltipRect.y < boundsY) {
                tooltipRect.y = boundsY;
            }
            if (tooltipRect.y + tooltipRect.height >= boundsY + bounds.height) {
                tooltipRect.y -= ((tooltipRect.y + tooltipRect.height) - (boundsY + bounds.height));
            }
            if (this.arrowLocation.y + arrowPadding / 2 > tooltipRect.y + tooltipRect.height - this.ry) {
                this.arrowLocation.y = tooltipRect.y + tooltipRect.height - this.ry - arrowPadding / 2;
            }
            if (this.arrowLocation.y - arrowPadding / 2 < tooltipRect.y + this.ry) {
                this.arrowLocation.y = tooltipRect.y + this.ry + arrowPadding / 2;
            }
        }
        return tooltipRect;
    };
    Crosshair.prototype.stopAnimation = function () {
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stopTimer"])(this.crosshairInterval);
    };
    Crosshair.prototype.progressAnimation = function () {
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stopTimer"])(this.crosshairInterval);
    };
    /**
     * Removes the crosshair on mouse leave.
     * @return {void}
     * @private
     */
    Crosshair.prototype.removeCrosshair = function (duration) {
        var chart = this.chart;
        var crosshair = chart.enableCanvas ? document.getElementById(this.elementID + '_Crosshair') :
            document.getElementById(this.elementID + '_UserInteraction');
        var crosshairtooltip = chart.enableCanvas ? document.getElementById(this.elementID + '_crosshair_axis') : null;
        this.stopAnimation();
        if (crosshair && crosshair.getAttribute('opacity') !== '0') {
            this.crosshairInterval = setTimeout(function () {
                new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(crosshair, {
                    duration: 200,
                    progress: function (args) {
                        // crosshair.removeAttribute('e-animate');
                        crosshair.style.animation = '';
                        if (!chart.enableCanvas) {
                            crosshair.setAttribute('opacity', (1 - (args.timeStamp / args.duration)).toString());
                        }
                        else {
                            crosshair.style.opacity = (1 - (args.timeStamp / args.duration)).toString();
                            crosshairtooltip.style.opacity = (1 - (args.timeStamp / args.duration)).toString();
                        }
                    },
                    end: function (model) {
                        if (chart.enableCanvas) {
                            crosshair.style.opacity = '0';
                            crosshairtooltip.style.opacity = '0';
                        }
                        else {
                            crosshair.setAttribute('opacity', '0');
                        }
                        chart.startMove = false;
                        if (chart.tooltipModule) {
                            chart.tooltipModule.valueX = null;
                            chart.tooltipModule.valueY = null;
                        }
                    }
                });
            }, duration);
        }
    };
    /**
     * Get module name.
     */
    Crosshair.prototype.getModuleName = function () {
        /**
         * Returns the module name
         */
        return 'Crosshair';
    };
    /**
     * To destroy the crosshair.
     * @return {void}
     * @private
     */
    Crosshair.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return Crosshair;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/data-editing.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/data-editing.js ***!
  \****************************************************************************************/
/*! exports provided: DataEditing */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataEditing", function() { return DataEditing; });
/* harmony import */ var _utils_get_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/get-data */ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/get-data.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");




/**
 * `DataEditing` module handles data editing
 */
var DataEditing = /** @class */ (function () {
    /**
     * Constructor for DataEditing module.
     * @private.
     */
    function DataEditing(chart) {
        this.chart = chart;
    }
    /**
     * Point drag start here
     */
    DataEditing.prototype.pointMouseDown = function () {
        var chart = this.chart;
        var series;
        var data = new _utils_get_data__WEBPACK_IMPORTED_MODULE_0__["ChartData"](chart);
        var pointData = data.getData();
        if (pointData.point && (data.insideRegion || !pointData.series.isRectSeries)) {
            this.seriesIndex = pointData.series.index;
            this.pointIndex = pointData.point.index;
            series = chart.series[this.seriesIndex];
            if (series.dragSettings.enable && !chart.zoomModule) {
                chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_2__["dragStart"], {
                    series: pointData.series, seriesIndex: this.seriesIndex, pointIndex: this.pointIndex, point: pointData.point,
                    oldValue: chart.visibleSeries[this.seriesIndex].yData[this.pointIndex],
                    newValue: chart.visibleSeries[this.seriesIndex].points[this.pointIndex].yValue
                });
                chart.isPointMouseDown = true;
                chart.zoomSettings.enableDeferredZooming = false;
            }
        }
    };
    /**
     * Point dragging
     */
    DataEditing.prototype.pointMouseMove = function (event) {
        var chart = this.chart;
        var series;
        if (event.type === 'touchmove' && event.preventDefault) {
            event.preventDefault();
        }
        var data = new _utils_get_data__WEBPACK_IMPORTED_MODULE_0__["ChartData"](chart);
        var pointData = data.getData();
        if (pointData.series.dragSettings.enable && pointData.point && (data.insideRegion || !pointData.series.isRectSeries)) {
            this.getCursorStyle(pointData);
        }
        else {
            chart.svgObject.setAttribute('style', 'cursor: null');
        }
        if (chart.isPointMouseDown) {
            series = chart.series[this.seriesIndex];
            if (series.type.indexOf('Spline') > -1) {
                chart[Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["firstToLowerCase"])(series.type) + 'SeriesModule'].findSplinePoint(series);
            }
            this.pointDragging(this.seriesIndex, this.pointIndex);
        }
    };
    /**
     * Get cursor style
     */
    DataEditing.prototype.getCursorStyle = function (pointData) {
        var chart = this.chart;
        if (pointData.series.type === 'Bar' && chart.isTransposed) {
            chart.svgObject.setAttribute('style', 'cursor:ns-resize');
        }
        else if (chart.isTransposed || pointData.series.type === 'Bar') {
            chart.svgObject.setAttribute('style', 'cursor:ew-resize');
        }
        else {
            chart.svgObject.setAttribute('style', 'cursor:ns-resize');
        }
    };
    /**
     * Dragging calculation
     */
    DataEditing.prototype.pointDragging = function (si, pi) {
        var chart = this.chart;
        var yValueArray = [];
        var y;
        var ySize;
        var yValue;
        var series = chart.visibleSeries[si];
        var pointDrag = series.dragSettings;
        var xAxis = series.xAxis;
        var yAxis = series.yAxis;
        var minRange;
        var maxRange;
        // To get drag region for column and bar series
        var extra = series.isRectSeries ? 1 : 0;
        var axis = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getTransform"])(xAxis, yAxis, chart.requireInvertedAxis);
        if (series.type === 'Bar') {
            y = chart.isTransposed ? (axis.y + axis.height) - chart.mouseY : chart.mouseX - axis.x;
            ySize = chart.isTransposed ? axis.height : axis.width;
        }
        else {
            y = chart.isTransposed ? chart.mouseX - axis.x : (axis.y + axis.height) - chart.mouseY;
            ySize = chart.isTransposed ? axis.width : axis.height;
        }
        yValue = yAxis.isInversed ? (1 - (y / ySize)) : (y / ySize);
        yValue = (yValue * yAxis.visibleRange.delta) + yAxis.visibleRange.min;
        minRange = yAxis.minimum !== null ? yAxis.visibleRange.min + extra : (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["isNullOrUndefined"])(pointDrag.minY) ?
            (yValue) : pointDrag.minY);
        maxRange = yAxis.maximum !== null ? yAxis.visibleRange.max + extra : (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["isNullOrUndefined"])(pointDrag.maxY) ?
            (yValue) : pointDrag.maxY);
        if (maxRange >= yValue && minRange <= yValue) {
            series.points[pi].yValue = series.points[pi].y = chart.dragY = (yAxis.valueType === 'Logarithmic') ?
                Math.pow(yAxis.logBase, yValue) : parseFloat(yValue.toFixed(2));
            series.points[pi].interior = pointDrag.fill;
            for (var i = 0; i < series.points.length; i++) {
                yValueArray[i] = series.points[i].yValue;
            }
            series.yMin = Math.min.apply(null, yValueArray);
            series.yMax = Math.max.apply(null, yValueArray);
            chart.refreshBound();
            chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_2__["drag"], {
                seriesIndex: si, pointIndex: pi, series: series, point: series.points[pi],
                oldValue: chart.visibleSeries[this.seriesIndex].yData[this.pointIndex], newValue: series.points[pi].yValue
            });
        }
    };
    /**
     * Point drag ends here
     */
    DataEditing.prototype.pointMouseUp = function () {
        var chart = this.chart;
        if (chart.isPointMouseDown) {
            if (chart.series[this.seriesIndex].dragSettings.enable) {
                chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_2__["dragEnd"], {
                    series: chart.series[this.seriesIndex], point: chart.visibleSeries[this.seriesIndex].points[this.pointIndex],
                    seriesIndex: this.seriesIndex,
                    pointIndex: this.pointIndex, oldValue: chart.visibleSeries[this.seriesIndex].yData[this.pointIndex],
                    newValue: chart.visibleSeries[this.seriesIndex].points[this.pointIndex].yValue
                });
                chart.visibleSeries[this.seriesIndex].points[this.pointIndex].y =
                    chart.visibleSeries[this.seriesIndex].points[this.pointIndex].yValue;
                chart.isPointMouseDown = false;
                this.seriesIndex = this.pointIndex = undefined;
            }
        }
    };
    /**
     * Get module name.
     */
    DataEditing.prototype.getModuleName = function () {
        // Returns te module name
        return 'DataEditing';
    };
    /**
     * To destroy the DataEditing.
     * @return {void}
     * @private
     */
    DataEditing.prototype.destroy = function (chart) {
        // Destroy method performed here
    };
    return DataEditing;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/selection.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/selection.js ***!
  \*************************************************************************************/
/*! exports provided: Selection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _common_user_interaction_selection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/user-interaction/selection */ "./node_modules/@syncfusion/ej2-charts/src/common/user-interaction/selection.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * Selection src file
 */








/**
 * `Selection` module handles the selection for chart.
 * @private
 */
var Selection = /** @class */ (function (_super) {
    __extends(Selection, _super);
    /**
     * Constructor for selection module.
     * @private.
     */
    function Selection(chart) {
        var _this = _super.call(this, chart) || this;
        _this.chart = chart;
        _this.renderer = chart.renderer;
        _this.addEventListener();
        return _this;
    }
    /**
     * Binding events for selection module.
     */
    Selection.prototype.addEventListener = function () {
        if (this.chart.isDestroyed || (this.chart.stockChart && this.chart.stockChart.onPanning)) {
            return;
        }
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMove, this);
        this.chart.on(cancelEvent, this.completeSelection, this);
        this.chart.on('click', this.calculateSelectedElements, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mousedown, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.completeSelection, this);
    };
    /**
     * Chart mouse down
     */
    Selection.prototype.mousedown = function (e) {
        var chart = this.chart;
        if (chart.isPointMouseDown || chart.selectionMode === 'None' || chart.isChartDrag) {
            return;
        }
        if (chart.isDoubleTap || !chart.isTouch || this.rectPoints) {
            this.dragStart(chart, chart.chartAxisLayoutPanel.seriesClipRect, chart.mouseDownX, chart.mouseDownY, e);
        }
    };
    /**
     * UnBinding events for selection module.
     */
    Selection.prototype.removeEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMove);
        this.chart.off('pointerleave' || 'mouseleave', this.completeSelection);
        this.chart.off('click', this.calculateSelectedElements);
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mousedown);
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.completeSelection);
    };
    /**
     * To find private variable values
     */
    Selection.prototype.initPrivateVariables = function (chart) {
        this.styleId = chart.element.id + '_ej2_chart_selection';
        this.unselected = chart.element.id + '_ej2_deselected';
        this.closeIconId = chart.element.id + '_ej2_drag_close';
        this.draggedRectGroup = chart.element.id + '_ej2_drag_group';
        this.draggedRect = chart.element.id + '_ej2_drag_rect';
        this.selectedDataIndexes = [];
        this.rectPoints = null;
        this.isSeriesMode = chart.selectionMode === 'Series';
    };
    /**
     * Method to select the point and series.
     * @return {void}
     */
    Selection.prototype.invokeSelection = function (chart) {
        this.initPrivateVariables(chart);
        this.series = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, chart.visibleSeries, null, true);
        this.seriesStyles();
        if (!(chart.selectionMode.indexOf('Drag') > -1)) {
            this.selectDataIndex(chart, this.concatIndexes(chart.selectedDataIndexes, this.selectedDataIndexes));
        }
    };
    Selection.prototype.generateStyle = function (series) {
        if (series) {
            return (series.selectionStyle || this.styleId + '_series_' + series.index);
        }
        return 'undefined';
    };
    Selection.prototype.selectDataIndex = function (chart, indexes) {
        for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
            var index = indexes_1[_i];
            this.performSelection(index, chart, this.getElementByIndex(chart, index)[0]);
        }
    };
    Selection.prototype.getElementByIndex = function (chart, index, suffix) {
        if (suffix === void 0) { suffix = ''; }
        var elementId = chart.element.id + '_Series_' + index.series + '_Point' + '_' + index.point;
        var series = chart.series[index.series];
        elementId = (!series.isRectSeries && series.type !== 'Scatter' && series.type !== 'Bubble' &&
            series.marker.visible) ? (elementId + '_Symbol' + suffix) : elementId;
        return [Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(elementId), (series.type === 'RangeArea' && series.marker.visible) ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(elementId + '1') : null];
    };
    Selection.prototype.getClusterElements = function (chart, index) {
        var clusters = [];
        for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            index = new _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Index"](series.index, index.point);
            clusters.push(this.getElementByIndex(chart, index)[0]);
        }
        return clusters;
    };
    Selection.prototype.findElements = function (chart, series, index, suffix) {
        if (suffix === void 0) { suffix = ''; }
        if (this.isSeriesMode) {
            return this.getSeriesElements(series);
        }
        else if (chart.selectionMode === 'Cluster') {
            return this.getClusterElements(chart, index);
        }
        else {
            return this.getElementByIndex(chart, index, suffix);
        }
    };
    /**
     * To find the selected element.
     * @return {void}
     * @private
     */
    Selection.prototype.calculateSelectedElements = function (event) {
        if (this.chart.selectionMode === 'None' || event.target.id.indexOf(this.chart.element.id + '_') === -1) {
            return;
        }
        if (event.target.id.indexOf('_Series_') > -1) {
            this.performSelection(this.indexFinder(event.target.id), this.chart, event.target);
        }
    };
    Selection.prototype.performSelection = function (index, chart, element) {
        this.isSeriesMode = chart.selectionMode === 'Series';
        if (chart.series[index.series].type === 'BoxAndWhisker' &&
            element.id === chart.element.id + '_Series_' + index.series + '_Point_' + index.point + '_BoxPath') {
            element = element.parentElement;
        }
        switch (chart.selectionMode) {
            case 'Series':
                this.selection(chart, index, this.getSeriesElements(chart.series[index.series]));
                this.blurEffect(chart.element.id, chart.visibleSeries);
                break;
            case 'Point':
                if (!isNaN(index.point)) {
                    this.selection(chart, index, [element]);
                    this.blurEffect(chart.element.id, chart.visibleSeries);
                }
                break;
            case 'Cluster':
                if (!isNaN(index.point)) {
                    this.clusterSelection(chart, chart.series, index);
                    this.blurEffect(chart.element.id, chart.visibleSeries);
                }
                break;
        }
    };
    Selection.prototype.selection = function (chart, index, selectedElements) {
        if (!chart.isMultiSelect && (chart.selectionMode.indexOf('Drag') === -1)) {
            this.removeMultiSelectEelments(chart, this.selectedDataIndexes, index, chart.series);
        }
        var className = selectedElements[0] && (selectedElements[0].getAttribute('class') || '');
        if (selectedElements[0] && className.indexOf(this.getSelectionClass(selectedElements[0].id)) > -1) {
            this.removeStyles(selectedElements);
            this.addOrRemoveIndex(this.selectedDataIndexes, index);
        }
        else {
            this.applyStyles(selectedElements);
            this.addOrRemoveIndex(this.selectedDataIndexes, index, true);
        }
    };
    Selection.prototype.clusterSelection = function (chart, series, index) {
        this.selection(chart, index, this.getClusterElements(chart, new _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Index"](index.series, index.point)));
    };
    Selection.prototype.removeMultiSelectEelments = function (chart, index, currentIndex, seriesCollection) {
        var series;
        for (var i = 0; i < index.length; i++) {
            series = seriesCollection[index[i].series];
            if ((this.isSeriesMode && !this.toEquals(index[i], currentIndex, this.isSeriesMode)) ||
                (this.control.selectionMode === 'Cluster' && !this.toEquals(index[i], currentIndex, false)) ||
                (!this.isSeriesMode && this.toEquals(index[i], currentIndex, true) && !this.toEquals(index[i], currentIndex, false))) {
                this.removeStyles(this.findElements(chart, series, index[i]));
                index.splice(i, 1);
                i--;
            }
        }
    };
    Selection.prototype.blurEffect = function (chartId, visibleSeries) {
        var visibility = this.checkVisibility(this.selectedDataIndexes); // legend click scenario
        for (var _i = 0, visibleSeries_1 = visibleSeries; _i < visibleSeries_1.length; _i++) {
            var series = visibleSeries_1[_i];
            if (series.visible) {
                this.checkSelectionElements(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(chartId + 'SeriesGroup' + series.index), this.generateStyle(series), visibility);
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(chartId + 'SymbolGroup' + series.index))) {
                    this.checkSelectionElements(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(chartId + 'SymbolGroup' + series.index), this.generateStyle(series), visibility);
                }
            }
        }
    };
    Selection.prototype.checkSelectionElements = function (element, className, visibility) {
        var children = (this.isSeriesMode ? [element] : element.childNodes);
        var elementClassName;
        var parentClassName;
        var legendShape;
        var selectElement = element;
        for (var i = 0; i < children.length; i++) {
            elementClassName = children[i].getAttribute('class') || '';
            parentClassName = children[i].parentNode.getAttribute('class') || '';
            if (elementClassName.indexOf(className) === -1 &&
                parentClassName.indexOf(className) === -1 && visibility) {
                this.addSvgClass(children[i], this.unselected);
            }
            else {
                selectElement = children[i];
                this.removeSvgClass(children[i], this.unselected);
            }
        }
        if (this.control.legendModule && this.control.legendSettings.visible) {
            legendShape = document.getElementById(this.control.element.id + '_chart_legend_shape_' + className.split('_series_')[1]);
            if (legendShape) {
                elementClassName = selectElement.getAttribute('class') || '';
                parentClassName = selectElement.parentNode.getAttribute('class') || '';
                if (elementClassName.indexOf(className) === -1 && parentClassName.indexOf(className) === -1 && visibility) {
                    this.addSvgClass(legendShape, this.unselected);
                }
                else {
                    this.removeSvgClass(legendShape, this.unselected);
                }
            }
        }
    };
    Selection.prototype.applyStyles = function (elements) {
        for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
            var element = elements_1[_i];
            if (element) {
                this.removeSvgClass(element.parentNode, this.unselected);
                this.removeSvgClass(element, this.unselected);
                this.addSvgClass(element, this.getSelectionClass(element.id));
            }
        }
    };
    Selection.prototype.getSelectionClass = function (id) {
        return this.generateStyle(this.control.series[this.indexFinder(id).series]);
    };
    Selection.prototype.removeStyles = function (elements) {
        for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
            var element = elements_2[_i];
            if (element) {
                this.removeSvgClass(element, this.getSelectionClass(element.id));
            }
        }
    };
    Selection.prototype.addOrRemoveIndex = function (indexes, index, add) {
        for (var i = 0; i < indexes.length; i++) {
            if (this.toEquals(indexes[i], index, this.isSeriesMode)) {
                indexes.splice(i, 1);
                i--;
            }
        }
        if (add) {
            indexes.push(index);
        }
    };
    Selection.prototype.toEquals = function (first, second, checkSeriesOnly) {
        return ((first.series === second.series || (this.control.selectionMode === 'Cluster' && !checkSeriesOnly))
            && (checkSeriesOnly || (first.point === second.point)));
    };
    /**
     * To redraw the selected points.
     * @return {void}
     * @private
     */
    Selection.prototype.redrawSelection = function (chart, oldMode) {
        this.isSeriesMode = oldMode === 'Series';
        var selectedDataIndexes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], this.selectedDataIndexes, null, true);
        this.removeSelectedElements(chart, this.selectedDataIndexes, chart.series);
        this.blurEffect(chart.element.id, chart.visibleSeries);
        this.selectDataIndex(chart, selectedDataIndexes);
    };
    /** @private */
    Selection.prototype.legendSelection = function (chart, series) {
        var seriesStyle = this.generateStyle(chart.visibleSeries[series]);
        var selectedElements = document.getElementsByClassName(seriesStyle);
        this.isSeriesMode = chart.selectionMode === 'Series';
        var isBlurEffectNeeded = true;
        if (selectedElements.length > 0) {
            var elements = [];
            for (var i = 0; i < selectedElements.length; i++) {
                elements.push(selectedElements[i]);
            }
            this.removeStyles(elements);
            this.isSeriesMode = true;
            this.addOrRemoveIndex(this.selectedDataIndexes, new _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Index"](series, NaN));
            for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
                var series_1 = _a[_i];
                seriesStyle = this.generateStyle(series_1);
                if (document.getElementsByClassName(seriesStyle).length > 0) {
                    for (var _b = 0, elements_3 = elements; _b < elements_3.length; _b++) {
                        var element = elements_3[_b];
                        this.checkSelectionElements(element, seriesStyle, true);
                    }
                    isBlurEffectNeeded = false;
                    break;
                }
            }
            if (isBlurEffectNeeded) {
                this.isSeriesMode = chart.selectionMode === 'Series';
                this.blurEffect(chart.element.id, chart.visibleSeries);
            }
        }
        else {
            var seriesElements = this.getSeriesElements(chart.visibleSeries[series]);
            for (var _c = 0, seriesElements_1 = seriesElements; _c < seriesElements_1.length; _c++) {
                var seriesElement = seriesElements_1[_c];
                this.checkSelectionElements(seriesElement, seriesStyle, false);
            }
            this.isSeriesMode = true;
            this.selection(chart, new _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Index"](series, NaN), seriesElements);
            this.isSeriesMode = chart.selectionMode === 'Series';
            this.blurEffect(chart.element.id, chart.visibleSeries);
        }
    };
    Selection.prototype.getSeriesElements = function (series) {
        var seriesElements = [series.seriesElement];
        if (series.marker.visible && series.type !== 'Scatter' && series.type !== 'Bubble' && !series.isRectSeries) {
            seriesElements.push(series.symbolElement);
        }
        return seriesElements;
    };
    Selection.prototype.indexFinder = function (id) {
        var ids = ['NaN', 'NaN'];
        if (id.indexOf('SeriesGroup') > -1) {
            ids = id.split('SeriesGroup');
            ids[0] = ids[1];
        }
        else if (id.indexOf('SymbolGroup') > -1) {
            ids = id.split('SymbolGroup');
            ids[0] = ids[1];
        }
        else if (id.indexOf('_Point_') > -1) {
            ids = id.split('_Series_')[1].split('_Point_');
        }
        else if (id.indexOf('_Series_') > -1) {
            ids[0] = id.split('_Series_')[1];
        }
        return new _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Index"](parseInt(ids[0], 10), parseInt(ids[1], 10));
    };
    /**
     * Drag selection that returns the selected data.
     * @return {void}
     * @private
     */
    Selection.prototype.calculateDragSelectedElements = function (chart, dragRect) {
        this.removeSelectedElements(chart, this.selectedDataIndexes, chart.series);
        var rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](dragRect.x, dragRect.y, dragRect.width, dragRect.height);
        var axisOffset = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](chart.chartAxisLayoutPanel.seriesClipRect.x, chart.chartAxisLayoutPanel.seriesClipRect.y);
        this.removeOffset(rect, axisOffset);
        var points;
        var index;
        var selectedPointValues = [];
        var selectedSeriesValues = [];
        this.isSeriesMode = false;
        var symbolLocation;
        var _loop_1 = function (series) {
            if (series.visible) {
                points = series.points;
                selectedPointValues = [];
                var xAxisOffset_1;
                var yAxisOffset_1;
                if ((chart.isTransposed || series.type.indexOf('Bar') !== -1) &&
                    !(chart.isTransposed && series.type.indexOf('Bar') !== -1)) {
                    xAxisOffset_1 = series.xAxis.rect.y - axisOffset.y;
                    yAxisOffset_1 = series.yAxis.rect.x - axisOffset.x;
                }
                else {
                    xAxisOffset_1 = series.xAxis.rect.x - axisOffset.x;
                    yAxisOffset_1 = series.yAxis.rect.y - axisOffset.y;
                }
                for (var j = 0; j < points.length; j++) {
                    var yValue = series.type !== 'RangeArea' ? points[j].yValue :
                        points[j].regions[0].y;
                    var isCurrentPoint = void 0;
                    if (series.type === 'BoxAndWhisker') {
                        isCurrentPoint = points[j].regions.some(function (region) {
                            return Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(region.x + xAxisOffset_1, region.y + yAxisOffset_1, rect);
                        });
                    }
                    else {
                        isCurrentPoint = points[j].symbolLocations.some(function (location) {
                            return location && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(location.x + xAxisOffset_1, location.y + yAxisOffset_1, rect);
                        });
                    }
                    if (isCurrentPoint && series.category !== 'Indicator') {
                        index = new _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Index"](series.index, points[j].index);
                        this_1.selection(chart, index, this_1.findElements(chart, series, index));
                        selectedPointValues.push({ x: points[j].xValue.toString(), y: yValue });
                    }
                    if (isCurrentPoint && series.type === 'RangeArea') {
                        selectedPointValues.push({ x: points[j].xValue.toString(), y: points[j].regions[0].y });
                    }
                }
                selectedSeriesValues.push(selectedPointValues);
            }
        };
        var this_1 = this;
        for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            _loop_1(series);
        }
        this.blurEffect(chart.element.id, chart.visibleSeries);
        this.rectPoints = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](dragRect.x, dragRect.y, dragRect.width, dragRect.height);
        this.createCloseButton((dragRect.x + dragRect.width), dragRect.y);
        var args = {
            name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["dragComplete"],
            selectedDataValues: selectedSeriesValues,
            cancel: false
        };
        chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["dragComplete"], args);
    };
    Selection.prototype.removeOffset = function (rect, clip) {
        rect.x -= clip.x;
        rect.y -= clip.y;
    };
    /**
     * Method to draw dragging rect.
     * @return {void}
     * @private
     */
    Selection.prototype.drawDraggingRect = function (chart, dragRect) {
        var cartesianLayout = chart.chartAxisLayoutPanel.seriesClipRect;
        switch (chart.selectionMode) {
            case 'DragX':
                dragRect.y = cartesianLayout.y;
                dragRect.height = cartesianLayout.height;
                break;
            case 'DragY':
                dragRect.x = cartesianLayout.x;
                dragRect.width = cartesianLayout.width;
                break;
        }
        if (dragRect.width < 5 || dragRect.height < 5) {
            return null;
        }
        var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.draggedRect);
        if (this.closeIcon) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.closeIconId);
        }
        if (element) {
            this.setAttributes(element, dragRect);
        }
        else {
            var dragGroup = chart.svgRenderer.createGroup({ id: this.draggedRectGroup });
            var svgElement = document.getElementById(chart.element.id + '_series_svg');
            chart.enableCanvas ? svgElement.appendChild(dragGroup) : chart.svgObject.appendChild(dragGroup);
            element = chart.svgRenderer.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.draggedRect, chart.themeStyle.selectionRectFill, { color: chart.themeStyle.selectionRectStroke, width: 1 }, 1, dragRect));
            element.setAttribute('style', 'cursor:move;');
            dragGroup.appendChild(element);
        }
    };
    Selection.prototype.createCloseButton = function (x, y) {
        var closeIcon = this.chart.svgRenderer.createGroup({
            id: this.closeIconId,
            style: 'cursor:pointer; visibility: visible;'
        });
        closeIcon.appendChild(this.chart.svgRenderer.drawCircle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["CircleOption"](this.closeIconId + '_circle', '#FFFFFF', { color: this.chart.themeStyle.selectionCircleStroke, width: 1 }, 1, x, y, 10)));
        var direction = 'M ' + (x - 4) + ' ' + (y - 4) + ' L ' + (x + 4) + ' ' + (y + 4) + ' M ' + (x - 4) + ' ' + (y + 4) +
            ' L ' + (x + 4) + ' ' + (y - 4);
        closeIcon.appendChild(this.chart.svgRenderer.drawPath({
            id: this.closeIconId + '_cross', d: direction,
            stroke: this.chart.themeStyle.selectionCircleStroke,
            'stroke-width': 2, fill: this.chart.themeStyle.selectionCircleStroke
        }, null));
        this.closeIcon = closeIcon;
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.draggedRectGroup).appendChild(closeIcon);
    };
    /**
     * Method to remove dragged element.
     * @return {void}
     * @private
     */
    Selection.prototype.removeDraggedElements = function (chart, event) {
        if ((event.target.id.indexOf(this.closeIconId) > -1) && (event.type.indexOf('move') === -1)) {
            this.removeSelectedElements(chart, this.selectedDataIndexes, chart.series);
            this.blurEffect(chart.element.id, chart.visibleSeries);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.draggedRectGroup));
            this.changeCursorStyle(false, chart.svgObject, 'auto');
            this.rectPoints = null;
        }
    };
    /**
     * Method to resize the drag rect.
     * @return {void}
     * @private
     */
    Selection.prototype.resizingSelectionRect = function (chart, location, tapped) {
        var rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](this.rectPoints.x, this.rectPoints.y, this.rectPoints.width, this.rectPoints.height);
        var resize = this.findResizeMode(chart.svgObject, rect, location);
        if (this.resizing) {
            rect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getDraggedRectLocation"])(rect.x, rect.y, (rect.x + rect.width), (rect.y + rect.height), chart.chartAxisLayoutPanel.seriesClipRect);
            this.drawDraggingRect(chart, rect);
            this.dragRect = rect;
        }
        if (tapped) {
            this.resizing = resize;
        }
    };
    Selection.prototype.findResizeMode = function (chartSvgObject, rect, location) {
        var cursorStyle = 'se-resize';
        var resize = false;
        if (!this.resizing) {
            var resizeEdges = [new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](rect.x, (rect.y - 10), rect.width - 5, 20),
                new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"]((rect.x - 10), rect.y, 20, rect.height),
                new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](rect.x, (rect.y + rect.height - 10), rect.width - 10, 20),
                new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"]((rect.x + rect.width - 10), rect.y + 5, 20, rect.height - 15),
                new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"]((rect.x + rect.width - 10), (rect.y + rect.height - 10), 20, 20)]; //corner
            for (var i = 0; i < resizeEdges.length; i++) {
                if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(location.x, location.y, resizeEdges[i])) {
                    cursorStyle = (i === 4) ? cursorStyle : (i % 2 === 0) ? 'ns-resize' : 'ew-resize';
                    resize = true;
                    this.resizeMode = i;
                    break;
                }
            }
        }
        else {
            var x = rect.x;
            var y = rect.y;
            var width = (location.x - x);
            var height = (location.y - y);
            switch (this.resizeMode) {
                case 0:
                    height = Math.abs((rect.height + rect.y) - location.y);
                    rect.y = Math.min((rect.height + rect.y), location.y);
                    rect.height = height;
                    break;
                case 1:
                    width = Math.abs((rect.width + rect.x) - location.x);
                    rect.x = Math.min((rect.width + rect.x), location.x);
                    rect.width = width;
                    break;
                case 2:
                    rect.height = Math.abs(height);
                    rect.y = Math.min(location.y, y);
                    break;
                case 3:
                    rect.width = Math.abs(width);
                    rect.x = Math.min(location.x, x);
                    break;
                case 4:
                    rect.width = Math.abs(width);
                    rect.height = Math.abs(height);
                    rect.x = Math.min(location.x, x);
                    rect.y = Math.min(location.y, y);
                    break;
            }
        }
        this.changeCursorStyle(resize, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.draggedRect), cursorStyle);
        this.changeCursorStyle(resize, chartSvgObject, cursorStyle);
        return resize;
    };
    Selection.prototype.changeCursorStyle = function (isResize, rectelement, cursorStyle) {
        cursorStyle = isResize ? cursorStyle : (this.control.svgObject === rectelement) ? 'auto' : 'move';
        rectelement.setAttribute('style', 'cursor:' + cursorStyle + ';');
    };
    Selection.prototype.removeSelectedElements = function (chart, index, seriesCollection) {
        index.splice(0, index.length);
        var seriesElements;
        for (var _i = 0, seriesCollection_1 = seriesCollection; _i < seriesCollection_1.length; _i++) {
            var series = seriesCollection_1[_i];
            seriesElements = this.getSeriesElements(series);
            this.removeStyles(seriesElements);
            for (var _a = 0, seriesElements_2 = seriesElements; _a < seriesElements_2.length; _a++) {
                var seriesElement = seriesElements_2[_a];
                this.removeStyles(this.getChildren(seriesElement));
            }
        }
    };
    Selection.prototype.setAttributes = function (ele, object) {
        var keys = Object.keys(object);
        for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
            var key = keys_1[_i];
            ele.setAttribute(key, object[key]);
        }
    };
    /**
     * Method to move the dragged rect.
     * @return {void}
     * @private
     */
    Selection.prototype.draggedRectMoved = function (chart, grabbedPoint, doDrawing) {
        var rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](this.rectPoints.x, this.rectPoints.y, this.rectPoints.width, this.rectPoints.height);
        rect.x -= (grabbedPoint.x - chart.mouseX);
        rect.y -= (grabbedPoint.y - chart.mouseY);
        rect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getDraggedRectLocation"])(rect.x, rect.y, rect.x + rect.width, rect.height + rect.y, chart.chartAxisLayoutPanel.seriesClipRect);
        if (doDrawing) {
            this.drawDraggingRect(chart, rect);
        }
        else {
            this.calculateDragSelectedElements(chart, rect);
        }
    };
    /**
     * To complete the selection.
     * @return {void}
     * @private
     */
    Selection.prototype.completeSelection = function (e) {
        var chart = this.chart;
        if (chart.selectionMode === 'None') {
            return;
        }
        if ((this.dragging || this.resizing) && this.dragRect.width > 5 && this.dragRect.height > 5) {
            this.calculateDragSelectedElements(chart, this.dragRect);
        }
        else if (this.rectGrabbing && this.rectPoints.width && this.rectPoints.height) {
            this.draggedRectMoved(chart, this.dragRect);
        }
        this.dragging = false;
        this.rectGrabbing = false;
        this.resizing = false;
        this.removeDraggedElements(chart, e);
    };
    Selection.prototype.getDragRect = function (chart, seriesClipRect) {
        return Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getDraggedRectLocation"])(chart.mouseDownX, chart.mouseDownY, chart.mouseX, chart.mouseY, seriesClipRect);
    };
    /** @private */
    Selection.prototype.dragStart = function (chart, seriesClipRect, mouseDownX, mouseDownY, event) {
        this.dragging = (chart.selectionMode.indexOf('Drag') > -1) && (chart.isDoubleTap || !chart.isTouch) &&
            chart.chartAreaType !== 'PolarRadar';
        if (this.dragging) {
            this.dragRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](chart.mouseDownX, chart.mouseDownY, 0, 0);
            if (chart.mouseDownX < seriesClipRect.x || chart.mouseDownX > (seriesClipRect.x + seriesClipRect.width) ||
                chart.mouseDownY < seriesClipRect.y || chart.mouseDownY > (seriesClipRect.y + seriesClipRect.height)) {
                this.dragging = false;
            }
        }
        if (this.rectPoints) {
            this.dragRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](chart.mouseDownX, chart.mouseDownY, 0, 0);
            this.resizingSelectionRect(chart, new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](mouseDownX, mouseDownY), true);
            this.rectGrabbing = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(mouseDownX, mouseDownY, this.rectPoints);
        }
    };
    /** @private */
    Selection.prototype.mouseMove = function (event) {
        var chart = this.chart;
        if (chart.selectionMode === 'None') {
            return;
        }
        if (event.type === 'touchmove' && (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos7) && this.dragging && event.preventDefault) {
            event.preventDefault();
        }
        var insideMoving = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect);
        if (insideMoving) {
            if (this.rectGrabbing && !this.resizing) {
                this.draggedRectMoved(chart, this.dragRect, true);
            }
            else if (this.dragging && !this.resizing) {
                this.dragRect = this.getDragRect(chart, chart.chartAxisLayoutPanel.seriesClipRect);
                this.drawDraggingRect(chart, this.dragRect);
            }
            if (this.rectPoints) {
                this.resizingSelectionRect(chart, new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](chart.mouseX, chart.mouseY));
            }
        }
        else {
            this.completeSelection(event);
        }
    };
    /**
     * Get module name.
     * @private
     */
    Selection.prototype.getModuleName = function () {
        return 'Selection';
    };
    /**
     * To destroy the selection.
     * @return {void}
     * @private
     */
    Selection.prototype.destroy = function (chart) {
        this.removeEventListener();
        // Destroy method performed here
    };
    return Selection;
}(_common_user_interaction_selection__WEBPACK_IMPORTED_MODULE_5__["BaseSelection"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/tooltip.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/tooltip.js ***!
  \***********************************************************************************/
/*! exports provided: Tooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return Tooltip; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _common_user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/user-interaction/tooltip */ "./node_modules/@syncfusion/ej2-charts/src/common/user-interaction/tooltip.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * `Tooltip` module is used to render the tooltip for chart series.
 */
var Tooltip = /** @class */ (function (_super) {
    __extends(Tooltip, _super);
    /**
     * Constructor for tooltip module.
     * @private.
     */
    function Tooltip(chart) {
        var _this = _super.call(this, chart) || this;
        _this.addEventListener();
        return _this;
    }
    /**
     * @hidden
     */
    Tooltip.prototype.addEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        this.chart.on(cancelEvent, this.mouseLeaveHandler, this);
        this.chart.on('tapHold', this.longPress, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMoveHandler, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpHandler, this);
    };
    Tooltip.prototype.mouseUpHandler = function () {
        var chart = this.control;
        if (chart.isTouch && !this.isSelected(chart) &&
            ((Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect) && chart.tooltip.shared)
                || !chart.tooltip.shared)) {
            if (!chart.crosshair.enable) {
                this.tooltip();
                this.removeTooltip(2000);
            }
            else if (chart.startMove) {
                this.removeTooltip(2000);
            }
        }
    };
    Tooltip.prototype.mouseLeaveHandler = function () {
        this.removeTooltip(1000);
    };
    Tooltip.prototype.mouseMoveHandler = function () {
        var chart = this.chart;
        // Tooltip for chart series.
        if (!chart.disableTrackTooltip && !this.isSelected(chart)) {
            if (!chart.tooltip.shared && (!chart.isTouch || (chart.startMove))) {
                this.tooltip();
            }
            if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect)) {
                if (chart.tooltip.shared && (!chart.isTouch || (chart.startMove))) {
                    this.tooltip();
                }
            }
            else {
                if (chart.tooltip.shared) {
                    this.removeTooltip(1000);
                }
            }
        }
    };
    /**
     * Handles the long press on chart.
     * @return {boolean}
     * @private
     */
    Tooltip.prototype.longPress = function () {
        var chart = this.chart;
        if (chart.crosshair.enable && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect)) {
            this.tooltip();
        }
        return false;
    };
    /**
     * Renders the tooltip.
     * @return {void}
     */
    Tooltip.prototype.tooltip = function () {
        if ((this.chart.stockChart && this.chart.stockChart.onPanning)) {
            this.removeTooltip(1000);
            return null;
        }
        var svgElement;
        var elementId = this.chart.enableCanvas ? this.element.id + '_tooltip_group' : this.element.id + '_tooltip_svg';
        svgElement = this.getElement(elementId);
        var isTooltip = (svgElement && parseInt(svgElement.getAttribute('opacity'), 10) > 0);
        var tooltipDiv = this.getTooltipElement(isTooltip);
        if (this.chart.enableCanvas && tooltipDiv) {
            document.getElementById(this.chart.element.id + '_Secondary_Element').appendChild(tooltipDiv);
            tooltipDiv.appendChild(document.getElementById(this.chart.element.id + '_tooltip_svg'));
        }
        if (!this.chart.tooltip.shared) {
            this.renderSeriesTooltip(this.chart, !isTooltip, tooltipDiv);
        }
        else {
            this.renderGroupedTooltip(this.chart, !isTooltip, tooltipDiv);
        }
    };
    Tooltip.prototype.findHeader = function (data) {
        if (this.header === '') {
            return '';
        }
        this.header = this.parseTemplate(data.point, data.series, this.header, data.series.xAxis, data.series.yAxis);
        if (this.header.replace(/<b>/g, '').replace(/<\/b>/g, '').trim() !== '') {
            return this.header;
        }
        return '';
    };
    Tooltip.prototype.findShapes = function () {
        if (!this.chart.tooltip.enableMarker) {
            return [];
        }
        var marker = [];
        for (var _i = 0, _a = this.currentPoints; _i < _a.length; _i++) {
            var data = _a[_i];
            marker.push(data.point.marker.shape || data.series.marker.shape);
        }
        return marker;
    };
    Tooltip.prototype.renderSeriesTooltip = function (chart, isFirst, tooltipDiv) {
        var data = this.getData();
        data.lierIndex = this.lierIndex;
        var rect = chart.chartAxisLayoutPanel.seriesClipRect;
        this.currentPoints = [];
        var tool;
        if (this.findData(data, this.previousPoints[0])) {
            if (this.pushData(data, isFirst, tooltipDiv, true)) {
                if (this.triggerEvent(data, isFirst, this.getTooltipText(data))) {
                    this.createTooltip(chart, isFirst, this.findHeader(data), this.getSymbolLocation(data), data.series.clipRect, data.point, this.findShapes(), this.findMarkerHeight(this.currentPoints[0]), chart.chartAxisLayoutPanel.seriesClipRect, null, this.getTemplateText(data));
                }
                else {
                    this.removeHighlight(this.control);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getElement(this.element.id + '_tooltip'));
                }
                this.isRemove = true;
            }
        }
        else {
            if (!data.point && this.isRemove) {
                this.removeTooltip(1000);
                this.isRemove = false;
            }
            else {
                for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
                    var series = _a[_i];
                    if (series.visible) {
                        data = this.getClosestX(chart, series) || data;
                    }
                }
            }
        }
        if (data && data.point) {
            this.findMouseValue(data, chart);
        }
    };
    Tooltip.prototype.findMarkerHeight = function (pointData) {
        if (!this.chart.tooltip.enableMarker) {
            return 0;
        }
        var markerHeight = 0;
        var series = pointData.series;
        markerHeight = ((series.marker.visible || (this.chart.tooltip.shared &&
            (!series.isRectSeries || series.marker.visible)) || series.type === 'Scatter' || series.drawType === 'Scatter')
            && !(series.type === 'Candle' || series.type === 'Hilo' || series.type === 'HiloOpenClose')) ?
            ((series.marker.height + 2) / 2 + (2 * series.marker.border.width)) : 0;
        return markerHeight;
    };
    Tooltip.prototype.findData = function (data, previous) {
        return data.point && ((!previous || (previous.point !== data.point)) ||
            (previous && previous.lierIndex > 3 && previous.lierIndex !== this.lierIndex) || (previous.point === data.point));
    };
    Tooltip.prototype.getSymbolLocation = function (data) {
        var location;
        if (data.series.type !== 'BoxAndWhisker') {
            if (!data.point.symbolLocations[0]) {
                return null;
            }
            location = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](data.point.symbolLocations[0].x, data.point.symbolLocations[0].y);
        }
        switch (data.series.type) {
            case 'BoxAndWhisker':
                return this.getBoxLocation(data);
            case 'Waterfall':
                return this.getWaterfallRegion(data, location);
            case 'RangeArea':
                return this.getRangeArea(data, location);
            default:
                return location;
        }
    };
    Tooltip.prototype.getRangeArea = function (data, location) {
        if (data.point.regions[0]) {
            if (!this.inverted) {
                location.y = data.point.regions[0].y + data.point.regions[0].height / 2;
            }
            else {
                location.x = data.point.regions[0].x + data.point.regions[0].width / 2;
            }
        }
        return location;
    };
    Tooltip.prototype.getWaterfallRegion = function (data, location) {
        if (!this.inverted) {
            location.y = (data.point.y < 0) ?
                location.y - data.point.regions[0].height : location.y;
        }
        else {
            location.x = (data.point.y < 0) ?
                location.x + data.point.regions[0].width : location.x;
        }
        return location;
    };
    Tooltip.prototype.getTooltipText = function (pointData) {
        var series = pointData.series;
        return this.parseTemplate(pointData.point, series, this.getFormat(this.chart, series), series.xAxis, series.yAxis);
    };
    Tooltip.prototype.getTemplateText = function (data) {
        if (this.chart.tooltip.template) {
            var point = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, data.point);
            point.x = this.formatPointValue(data.point, data.series.xAxis, 'x', true, false);
            if ((data.series.seriesType === 'XY')) {
                point.y = this.formatPointValue(data.point, data.series.yAxis, 'y', false, true);
            }
            else {
                point.low = this.formatPointValue(data.point, data.series.yAxis, 'low', false, true);
                point.high = this.formatPointValue(data.point, data.series.yAxis, 'high', false, true);
            }
            return point;
        }
        else {
            return data.point;
        }
    };
    Tooltip.prototype.findMouseValue = function (data, chart) {
        if (!chart.requireInvertedAxis) {
            if (chart.chartAreaType === 'PolarRadar') {
                this.valueX = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToPolarCoefficient"])(data.point.xValue, data.series.xAxis) * data.series.xAxis.rect.width
                    + data.series.xAxis.rect.x;
            }
            else {
                this.valueX = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])(data.point.xValue, data.series.xAxis) * data.series.xAxis.rect.width
                    + data.series.xAxis.rect.x;
            }
            this.valueY = chart.mouseY;
        }
        else {
            this.valueY = (1 - Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["valueToCoefficient"])(data.point.xValue, data.series.xAxis)) * data.series.xAxis.rect.height
                + data.series.xAxis.rect.y;
            this.valueX = chart.mouseX;
        }
    };
    Tooltip.prototype.renderGroupedTooltip = function (chart, isFirst, tooltipDiv) {
        var data;
        var height = 0;
        var width = 0;
        var pointData = chart.chartAreaType === 'PolarRadar' ? this.getData() : null;
        this.stopAnimation();
        this.removeHighlight(chart);
        this.currentPoints = [];
        var extraPoints = [];
        var headerContent = '';
        if (isFirst) {
            if (!chart.stockChart) {
                if (tooltipDiv) {
                    document.getElementById(this.element.id + '_Secondary_Element').appendChild(tooltipDiv);
                }
            }
            else {
                document.getElementById(chart.stockChart.element.id + '_Secondary_Element').appendChild(tooltipDiv);
            }
        }
        this.removeText();
        for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
            var series = _a[_i];
            if (!series.enableTooltip) {
                continue;
            }
            if (chart.chartAreaType === 'Cartesian' && series.visible) {
                data = this.getClosestX(chart, series);
            }
            else if (chart.chartAreaType === 'PolarRadar' && series.visible && pointData.point !== null) {
                data = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["PointData"](series.points[pointData.point.index], series);
            }
            if (data && this.header !== '' && this.currentPoints.length === 0) {
                headerContent = this.findHeader(data);
            }
            if (data && this.triggerEvent(data, isFirst, this.getTooltipText(data))) {
                this.findMouseValue(data, chart);
                this.currentPoints.push(data);
                data = null;
            }
            else if (data) {
                extraPoints.push(data);
            }
        }
        if (this.currentPoints.length > 0) {
            this.createTooltip(chart, isFirst, headerContent, this.findSharedLocation(), this.currentPoints.length === 1 ? this.currentPoints[0].series.clipRect : null, null, this.findShapes(), this.findMarkerHeight(this.currentPoints[0]), chart.chartAxisLayoutPanel.seriesClipRect, extraPoints);
        }
        else if (this.getElement(this.element.id + '_tooltip_path')) {
            this.getElement(this.element.id + '_tooltip_path').setAttribute('d', '');
        }
    };
    Tooltip.prototype.findSharedLocation = function () {
        var stockChart = this.chart.stockChart;
        if (stockChart) {
            if (this.text.length === 1) {
                this.text.push('');
            }
            var toolbarHeight = stockChart.enablePeriodSelector ? stockChart.toolbarHeight : 0;
            var element = document.getElementById(stockChart.element.id + '_ChartTitle');
            var titleHeight = stockChart.title !== '' ? element.getBoundingClientRect().height + 10 : 0;
            return new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](this.chart.chartAxisLayoutPanel.seriesClipRect.x + 5, this.chart.chartAxisLayoutPanel.seriesClipRect.y + toolbarHeight + 5 + titleHeight);
        }
        else {
            if (this.currentPoints.length > 1) {
                return new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](this.valueX, this.valueY);
            }
            else {
                return this.getSymbolLocation(this.currentPoints[0]);
            }
        }
    };
    Tooltip.prototype.getBoxLocation = function (data) {
        var location;
        location = this.lierIndex > 3 ? data.point.symbolLocations[this.lierIndex - 4] :
            {
                x: data.point.regions[0].x + (data.point.regions[0].width / 2),
                y: data.point.regions[0].y + (data.point.regions[0].height / 2)
            };
        return location;
    };
    Tooltip.prototype.parseTemplate = function (point, series, format, xAxis, yAxis) {
        var val;
        var textValue;
        var xFormat;
        var customLabelFormat;
        var chart = this.chart;
        for (var _i = 0, _a = Object.keys(point); _i < _a.length; _i++) {
            var dataValue = _a[_i];
            val = new RegExp('${point' + '.' + dataValue + '}', 'gm');
            format = format.replace(val.source, this.formatPointValue(point, val.source === '${point.x}' ? xAxis : yAxis, dataValue, val.source === '${point.x}', (val.source === '${point.high}' ||
                val.source === '${point.open}' ||
                val.source === '${point.close}' ||
                val.source === '${point.low}' ||
                val.source === '${point.y}' ||
                val.source === '${point.minimum}' ||
                val.source === '${point.maximum}' ||
                val.source === '${point.outliers}' ||
                val.source === '${point.upperQuartile}' ||
                val.source === '${point.lowerQuartile}' ||
                val.source === '${point.median}')));
        }
        for (var _b = 0, _c = Object.keys(Object.getPrototypeOf(series)); _b < _c.length; _b++) {
            var dataValue = _c[_b];
            val = new RegExp('${series' + '.' + dataValue + '}', 'gm');
            textValue = series[dataValue];
            format = format.replace(val.source, textValue);
        }
        return format;
    };
    Tooltip.prototype.formatPointValue = function (point, axis, dataValue, isXPoint, isYPoint) {
        var textValue;
        var customLabelFormat;
        var value;
        if (axis.valueType !== 'Category' && isXPoint) {
            customLabelFormat = axis.labelFormat && axis.labelFormat.match('{value}') !== null;
            textValue = customLabelFormat ? axis.labelFormat.replace('{value}', axis.format(point[dataValue])) :
                axis.format(point[dataValue]);
        }
        else if (isYPoint) {
            customLabelFormat = axis.labelFormat && axis.labelFormat.match('{value}') !== null;
            value = dataValue === 'outliers' ? axis.format(point[dataValue][this.lierIndex - 4]) :
                axis.format(point[dataValue]);
            textValue = customLabelFormat ? axis.labelFormat.replace('{value}', value) : value;
        }
        else {
            textValue = point[dataValue];
        }
        return textValue;
    };
    Tooltip.prototype.getFormat = function (chart, series) {
        if (chart.tooltip.format) {
            if (series.seriesType === 'XY' && series.category === 'Indicator') {
                return this.getIndicatorTooltipFormat(series, chart, chart.tooltip.format);
            }
            return chart.tooltip.format;
        }
        var textX = (series.type === 'Histogram') ? '${point.minimum}' + '-' + '${point.maximum}' : '${point.x}';
        var format = !chart.tooltip.shared ? textX : '${series.name}';
        switch (series.seriesType) {
            case 'XY':
                if (series.category === 'Indicator') {
                    this.getIndicatorTooltipFormat(series, chart, chart.tooltip.format);
                }
                return format + ' : ' + ((series.type === 'Bubble') ? '<b>${point.y}</b>  Size : <b>${point.size}</b>' :
                    '<b>${point.y}</b>');
            case 'HighLow':
                return format + ('<br/>High : <b>${point.high}</b><br/>Low : <b>${point.low}</b>');
            case 'HighLowOpenClose':
                return format + ('<br/>High : <b>${point.high}</b><br/>Low : <b>${point.low}</b><br/>' +
                    'Open : <b>${point.open}</b><br/>Close : <b>${point.close}</b>');
            case 'BoxPlot': {
                return format + '<br/>' + (this.lierIndex > 3 ? 'Outliers : <b>${point.outliers}</b>' :
                    'Maximum : <b>${point.maximum}</b><br/>Q3 : <b>${point.upperQuartile}</b><br/>' +
                        'Median : <b>${point.median}</b><br/>Q1 : <b>${point.lowerQuartile}</b><br/>Minimum : <b>${point.minimum}</b>');
            }
        }
        return '';
    };
    Tooltip.prototype.getIndicatorTooltipFormat = function (series, chart, format) {
        var toolTip;
        var points = [];
        if (series.seriesType === 'XY') {
            toolTip = series.name + ' : <b>${point.y}</b>';
        }
        else {
            toolTip = format;
        }
        return toolTip;
    };
    /*
       * @hidden
       */
    Tooltip.prototype.removeHighlightedMarker = function (data) {
        for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {
            var item = data_1[_i];
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.element.id + '_Series_' + item.series.index +
                '_Point_' + item.point.index + '_Trackball');
        }
        if (this.chart.markerRender) {
            this.chart.markerRender.removeHighlightedMarker();
        }
        this.previousPoints = [];
    };
    /**
     * Get module name.
     */
    Tooltip.prototype.getModuleName = function () {
        /**
         * Returns the module name
         */
        return 'Tooltip';
    };
    /**
     * To destroy the tooltip.
     * @return {void}
     * @private
     */
    Tooltip.prototype.destroy = function (chart) {
        /**
         * Destroy method performed here
         */
    };
    return Tooltip;
}(_common_user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_2__["BaseTooltip"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/zooming-toolkit.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/zooming-toolkit.js ***!
  \*******************************************************************************************/
/*! exports provided: Toolkit */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Toolkit", function() { return Toolkit; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");






/**
 * Zooming Toolkit created here
 * @private
 */
var Toolkit = /** @class */ (function () {
    /** @private */
    function Toolkit(chart) {
        this.iconRectOverFill = 'transparent';
        this.iconRectSelectionFill = 'transparent';
        this.chart = chart;
        this.elementId = chart.element.id;
        this.chart.svgRenderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["SvgRenderer"](this.elementId);
        this.selectionColor = chart.theme === 'Bootstrap4' ? '#FFFFFF' : '#ff4081';
        this.fillColor = chart.theme === 'Bootstrap4' ? '#495057' : '#737373';
        this.iconRectOverFill = chart.theme === 'Bootstrap4' ? '#5A6268' : this.iconRectOverFill;
        this.iconRectSelectionFill = chart.theme === 'Bootstrap4' ? '#5B6269' : this.iconRectSelectionFill;
        this.iconRect = chart.theme === 'Bootstrap4' ? new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](-5, -5, 26, 26) : new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, 16, 16);
    }
    /**
     * To create the pan button.
     * @return {void}
     * @private
     */
    Toolkit.prototype.createPanButton = function (childElement, parentElement, chart) {
        var render = this.chart.svgRenderer;
        var fillColor = this.chart.zoomModule.isPanning ? this.selectionColor : this.fillColor;
        var direction = 'M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,';
        direction += '11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z';
        childElement.id = this.elementId + '_Zooming_Pan';
        childElement.setAttribute('aria-label', this.chart.getLocalizedLabel('Pan'));
        this.panElements = childElement;
        childElement.appendChild(render.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_Zooming_Pan_1', 'transparent', {}, 1, this.iconRect)));
        childElement.appendChild(render.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["PathOption"](this.elementId + '_Zooming_Pan_2', fillColor, null, null, 1, null, direction), null));
        parentElement.appendChild(childElement);
        this.wireEvents(childElement, this.pan);
    };
    /**
     * To create the zoom button.
     * @return {void}
     * @private
     */
    Toolkit.prototype.createZoomButton = function (childElement, parentElement, chart) {
        var render = this.chart.svgRenderer;
        var fillColor = this.chart.zoomModule.isPanning ? this.fillColor : this.selectionColor;
        var rectColor = this.chart.zoomModule.isPanning ? 'transparent' : this.iconRectSelectionFill;
        var direction = 'M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,';
        direction += '5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571';
        direction = direction + 'L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,';
        childElement.id = this.elementId + '_Zooming_Zoom';
        childElement.setAttribute('aria-label', this.chart.getLocalizedLabel('Zoom'));
        this.zoomElements = childElement;
        this.selectedID = this.chart.zoomModule.isPanning ? this.chart.element.id + '_Zooming_Pan_1' : this.elementId + '_Zooming_Zoom_1';
        childElement.appendChild(render.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_Zooming_Zoom_1', rectColor, {}, 1, this.iconRect)));
        childElement.appendChild(render.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["PathOption"](this.elementId + '_Zooming_Zoom_3', fillColor, null, null, 1, null, direction + '4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z')));
        parentElement.appendChild(childElement);
        this.wireEvents(childElement, this.zoom);
    };
    /**
     * To create the ZoomIn button.
     * @return {void}
     * @private
     */
    Toolkit.prototype.createZoomInButton = function (childElement, parentElement, chart) {
        var render = this.chart.svgRenderer;
        var fillColor = this.fillColor;
        var direction = 'M10.103,0C6.812,0,4.16,2.651,4.16,5.943c0,1.509,0.503,2.834,1.417,3.885l-0.274,0.229H4.571L0,';
        direction += '14.628l0,0L1.372,16l4.571-4.572v-0.685l0.228-0.275c1.052,0.868,2.423,1.417,3.885,1.417c3.291,0,5.943-2.651,';
        direction += '5.943-5.943C16,2.651,13.395,0,10.103,0z M10.058,10.058c-2.286,0-4.114-1.828-4.114-4.114c0-2.286,1.828-4.114,';
        childElement.id = this.elementId + '_Zooming_ZoomIn';
        childElement.setAttribute('aria-label', this.chart.getLocalizedLabel('ZoomIn'));
        var polygonDirection = '12.749,5.466 10.749,5.466 10.749,3.466 9.749,3.466 9.749,5.466 7.749,5.466 7.749,6.466';
        childElement.appendChild(render.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_Zooming_ZoomIn_1', 'transparent', {}, 1, this.iconRect)));
        childElement.appendChild(render.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["PathOption"](this.elementId + '_Zooming_ZoomIn_2', fillColor, null, null, 1, null, direction + '4.114-4.114c2.286,0,4.114,1.828,4.114,4.114C14.172,8.229,12.344,10.058,10.058,10.058z'), null));
        childElement.appendChild(render.drawPolygon(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["PolygonOption"](this.elementId + '_Zooming_ZoomIn_3', polygonDirection + ' 9.749,6.466 9.749,8.466 10.749,8.466 10.749,6.466 12.749,6.466', fillColor)));
        this.zoomInElements = childElement;
        this.elementOpacity = chart.zoomModule.isPanning ? '0.2' : '1';
        childElement.setAttribute('opacity', this.elementOpacity);
        parentElement.appendChild(childElement);
        this.wireEvents(childElement, this.zoomIn);
    };
    /**
     * To create the ZoomOut button.
     * @return {void}
     * @private
     */
    Toolkit.prototype.createZoomOutButton = function (childElement, parentElement, chart) {
        var render = this.chart.svgRenderer;
        var fillColor = this.fillColor;
        var direction = 'M0,14.622L1.378,16l4.533-4.533v-0.711l0.266-0.266c1.022,0.889,2.4,1.422,3.866,';
        direction += '1.422c3.289,0,5.955-2.666,5.955-5.955S13.333,0,10.044,0S4.089,2.667,4.134,5.911c0,1.466,0.533,2.844,';
        direction += '1.422,3.866l-0.266,0.266H4.578L0,14.622L0,14.622z M5.911,5.911c0-2.311,1.822-4.133,4.133-4.133s4.133,1.822,4.133,';
        childElement.id = this.elementId + '_Zooming_ZoomOut';
        childElement.setAttribute('aria-label', this.chart.getLocalizedLabel('ZoomOut'));
        childElement.appendChild(render.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_Zooming_ZoomOut_1', 'transparent', {}, 1, this.iconRect)));
        childElement.appendChild(render.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["PathOption"](this.elementId + '_Zooming_ZoomOut_2', fillColor, null, null, 1, null, direction + '4.133s-1.866,4.133-4.133,4.133S5.911,8.222,5.911,5.911z M12.567,6.466h-5v-1h5V6.466z'), null));
        this.zoomOutElements = childElement;
        this.elementOpacity = chart.zoomModule.isPanning ? '0.2' : '1';
        childElement.setAttribute('opacity', this.elementOpacity);
        parentElement.appendChild(childElement);
        this.wireEvents(childElement, this.zoomOut);
    };
    /**
     * To create the Reset button.
     * @return {void}
     * @private
     */
    Toolkit.prototype.createResetButton = function (childElement, parentElement, chart, isDevice) {
        var render = this.chart.svgRenderer;
        var fillColor = this.fillColor;
        var size;
        var direction = 'M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,';
        direction += '1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,';
        direction += '13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,';
        childElement.id = this.elementId + '_Zooming_Reset';
        childElement.setAttribute('aria-label', this.chart.getLocalizedLabel('Reset'));
        if (!isDevice) {
            childElement.appendChild(render.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_Zooming_Reset_1', 'transparent', {}, 1, this.iconRect)));
            childElement.appendChild(render.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["PathOption"](this.elementId + '_Zooming_Reset_2', fillColor, null, null, 1, null, direction + '3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z'), null));
        }
        else {
            size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])(this.chart.getLocalizedLabel('ResetZoom'), { size: '12px' });
            childElement.appendChild(render.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_Zooming_Reset_1', 'transparent', {}, 1, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, size.width, size.height))));
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(chart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["TextOption"](this.elementId + '_Zooming_Reset_2', 0 + size.width / 2, 0 + size.height * 3 / 4, 'middle', this.chart.getLocalizedLabel('ResetZoom'), 'rotate(0,' + (0) + ',' + (0) + ')', 'auto'), { size: '12px' }, 'black', childElement);
        }
        parentElement.appendChild(childElement);
        this.wireEvents(childElement, this.reset);
    };
    /**
     * To bind events.
     * @return {void}
     * @private
     */
    Toolkit.prototype.wireEvents = function (element, process) {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, 'mousedown touchstart', process, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, 'mouseover', this.showTooltip, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, 'mouseout', this.removeTooltip, this);
    };
    /**
     * To show tooltip.
     * @return {void}
     * @private
     */
    Toolkit.prototype.showTooltip = function (event) {
        var text = event.currentTarget.id.split('_Zooming_')[1];
        var left = (event.pageX - (Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])(text, { size: '10px' }).width + 5));
        var rect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(event.currentTarget.id + '_1');
        var icon2 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(event.currentTarget.id + '_2');
        var icon3 = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(event.currentTarget.id + '_3');
        if (rect) {
            this.hoveredID = rect.id;
            rect.setAttribute('fill', this.iconRectOverFill);
        }
        if (icon2) {
            icon2.setAttribute('fill', this.selectionColor);
        }
        if (icon3) {
            icon3.setAttribute('fill', this.selectionColor);
        }
        if (!this.chart.isTouch) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["createTooltip"])('EJ2_Chart_ZoomTip', this.chart.getLocalizedLabel(text), (event.pageY + 10), left, '10px');
        }
    };
    /** @private */
    // tslint:disable
    Toolkit.prototype.removeTooltip = function () {
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.hoveredID)) {
            var rectColor = this.chart.zoomModule.isPanning ? (this.hoveredID.indexOf('_Pan_') > -1) ? this.iconRectSelectionFill : 'transparent' : (this.hoveredID.indexOf('_Zoom_') > -1) ? this.iconRectSelectionFill : 'transparent';
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.hoveredID).setAttribute('fill', rectColor);
        }
        var icon2 = this.hoveredID ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.hoveredID.replace('_1', '_2')) : null;
        var icon3 = this.hoveredID ? Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.hoveredID.replace('_1', '_3')) : null;
        if (icon2) {
            var iconColor = this.chart.zoomModule.isPanning ? (this.hoveredID.indexOf('_Pan_') > -1) ? this.selectionColor : this.fillColor : (this.hoveredID.indexOf('_Zoom_') > -1) ? this.selectionColor : this.fillColor;
            icon2.setAttribute('fill', iconColor);
        }
        if (icon3) {
            var iconColor = this.chart.zoomModule.isPanning ? this.fillColor : (this.hoveredID.indexOf('_Zoom_') > -1) ? this.selectionColor : this.fillColor;
            icon3.setAttribute('fill', iconColor);
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])('EJ2_Chart_ZoomTip');
    };
    // Toolkit events function calculation here.
    /** @private */
    Toolkit.prototype.reset = function () {
        var chart = this.chart;
        if (!chart.zoomModule.isDevice) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(chart.zoomModule.toolkitElements);
        }
        var argsData;
        this.removeTooltip();
        chart.svgObject.setAttribute('cursor', 'auto');
        chart.axisCollections.forEach(function (axis) {
            argsData = {
                cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_3__["zoomComplete"], axis: axis, previousZoomFactor: axis.zoomFactor, previousZoomPosition: axis.zoomPosition,
                currentZoomFactor: 1, currentZoomPosition: 0
            };
            axis.zoomFactor = 1;
            axis.zoomPosition = 0;
            if (axis.zoomingScrollBar) {
                axis.zoomingScrollBar.isScrollUI = false;
            }
            chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_3__["zoomComplete"], argsData);
            if (!argsData.cancel) {
                axis.zoomFactor = argsData.currentZoomFactor;
                axis.zoomPosition = argsData.currentZoomPosition;
            }
        });
        chart.disableTrackTooltip = false;
        chart.zoomModule.isZoomed = chart.zoomModule.isPanning = chart.isChartDrag = chart.delayRedraw = false;
        chart.zoomModule.touchMoveList = chart.zoomModule.touchStartList = [];
        chart.zoomModule.pinchTarget = null;
        chart.removeSvg();
        chart.refreshAxis();
        chart.refreshBound();
        this.elementOpacity = '1';
        return false;
    };
    Toolkit.prototype.zoomIn = function (e) {
        this.zoomInOutCalculation(1, this.chart, this.chart.axisCollections, this.chart.zoomSettings.mode);
        return false;
    };
    Toolkit.prototype.zoomOut = function (e) {
        this.zoomInOutCalculation(-1, this.chart, this.chart.axisCollections, this.chart.zoomSettings.mode);
        return false;
    };
    Toolkit.prototype.zoom = function (e) {
        this.chart.zoomModule.isPanning = false;
        var zoomModule = this.chart.zoomModule;
        this.elementOpacity = '1';
        this.chart.svgObject.setAttribute('cursor', 'auto');
        this.zoomInElements.setAttribute('opacity', this.elementOpacity);
        this.zoomOutElements.setAttribute('opacity', this.elementOpacity);
        this.applySelection(this.zoomElements.childNodes, this.selectionColor);
        this.applySelection(this.panElements.childNodes, '#737373');
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.selectedID)) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.selectedID).setAttribute('fill', 'transparent');
        }
        this.selectedID = this.chart.element.id + '_Zooming_Zoom_1';
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.selectedID).setAttribute('fill', this.iconRectSelectionFill);
        return false;
    };
    /** @private */
    Toolkit.prototype.pan = function () {
        var element;
        this.chart.zoomModule.isPanning = true;
        this.chart.svgObject.setAttribute('cursor', 'pointer');
        this.elementOpacity = '0.2';
        element = this.zoomInElements ? this.zoomInElements.setAttribute('opacity', this.elementOpacity) : null;
        element = this.zoomOutElements ? this.zoomOutElements.setAttribute('opacity', this.elementOpacity) : null;
        element = this.panElements ? this.applySelection(this.panElements.childNodes, this.selectionColor) : null;
        element = this.zoomElements ? this.applySelection(this.zoomElements.childNodes, '#737373') : null;
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.selectedID)) {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.selectedID).setAttribute('fill', 'transparent');
        }
        this.selectedID = this.chart.element.id + '_Zooming_Pan_1';
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.selectedID).setAttribute('fill', this.iconRectSelectionFill);
        return false;
    };
    Toolkit.prototype.zoomInOutCalculation = function (scale, chart, axes, mode) {
        if (!chart.zoomModule.isPanning && this.elementOpacity !== '0.2') {
            var zoomFactor_1;
            var zoomPosition_1;
            var cumulative_1;
            chart.disableTrackTooltip = true;
            chart.delayRedraw = true;
            var argsData_1;
            axes.forEach(function (axis) {
                argsData_1 = {
                    cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_3__["zoomComplete"], axis: axis, previousZoomFactor: axis.zoomFactor,
                    previousZoomPosition: axis.zoomPosition, currentZoomFactor: axis.zoomFactor, currentZoomPosition: axis.zoomPosition
                };
                if ((axis.orientation === 'Horizontal' && mode !== 'Y') ||
                    (axis.orientation === 'Vertical' && mode !== 'X')) {
                    cumulative_1 = Math.max(Math.max(1 / Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["minMax"])(axis.zoomFactor, 0, 1), 1) + (0.25 * scale), 1);
                    zoomFactor_1 = (cumulative_1 === 1) ? 1 : Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["minMax"])(1 / cumulative_1, 0, 1);
                    zoomPosition_1 = (cumulative_1 === 1) ? 0 : axis.zoomPosition + ((axis.zoomFactor - zoomFactor_1) * 0.5);
                    if (axis.zoomPosition !== zoomPosition_1 || axis.zoomFactor !== zoomFactor_1) {
                        zoomFactor_1 = (zoomPosition_1 + zoomFactor_1) > 1 ? (1 - zoomPosition_1) : zoomFactor_1;
                    }
                    argsData_1.currentZoomFactor = zoomFactor_1;
                    argsData_1.currentZoomPosition = zoomPosition_1;
                    chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_3__["zoomComplete"], argsData_1);
                    if (!argsData_1.cancel) {
                        axis.zoomFactor = argsData_1.currentZoomFactor;
                        axis.zoomPosition = argsData_1.currentZoomPosition;
                    }
                }
            });
        }
    };
    Toolkit.prototype.applySelection = function (elements, color) {
        for (var i = 1, length_1 = elements.length; i < length_1; i++) {
            elements[i].setAttribute('fill', color);
        }
    };
    return Toolkit;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/zooming.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/zooming.js ***!
  \***********************************************************************************/
/*! exports provided: Zoom */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Zoom", function() { return Zoom; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _zooming_toolkit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./zooming-toolkit */ "./node_modules/@syncfusion/ej2-charts/src/chart/user-interaction/zooming-toolkit.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");






/**
 * `Zooming` module handles the zooming for chart.
 */
var Zoom = /** @class */ (function () {
    /**
     * Constructor for Zooming module.
     * @private.
     */
    function Zoom(chart) {
        this.chart = chart;
        this.isPointer = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer;
        this.browserName = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name;
        this.wheelEvent = this.browserName === 'mozilla' ? (this.isPointer ? 'mousewheel' : 'DOMMouseScroll') : 'mousewheel';
        this.cancelEvent = this.isPointer ? 'pointerleave' : 'mouseleave';
        this.addEventListener();
        this.isDevice = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice;
        var zooming = chart.zoomSettings;
        this.toolkit = new _zooming_toolkit__WEBPACK_IMPORTED_MODULE_3__["Toolkit"](chart);
        this.zooming = zooming;
        this.elementId = chart.element.id;
        this.zoomingRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, 0, 0);
        this.zoomAxes = [];
        this.zoomkitOpacity = 0.3;
        this.isIOS = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos7;
        this.isZoomed = this.performedUI = this.zooming.enablePan && this.zooming.enableSelectionZooming;
        if (zooming.enableScrollbar) {
            chart.scrollElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { id: chart.element.id + '_scrollElement' });
        }
    }
    /**
     * Function that handles the Rectangular zooming.
     * @return {void}
     */
    Zoom.prototype.renderZooming = function (e, chart, isTouch) {
        this.calculateZoomAxesRange(chart, chart.axisCollections);
        if (this.zooming.enableSelectionZooming && (!isTouch
            || (chart.isDoubleTap && this.touchStartList.length === 1)) && (!this.isPanning || chart.isDoubleTap)) {
            this.isPanning = this.isDevice ? true : this.isPanning;
            this.performedUI = true;
            this.drawZoomingRectangle(chart);
        }
        else if (this.isPanning && chart.isChartDrag) {
            if (!isTouch || (isTouch && this.touchStartList.length === 1)) {
                this.pinchTarget = isTouch ? e.target : null;
                this.doPan(chart, chart.axisCollections);
            }
        }
    };
    // Zooming rectangle drawn here
    Zoom.prototype.drawZoomingRectangle = function (chart) {
        var areaBounds = chart.chartAxisLayoutPanel.seriesClipRect;
        var startLocation = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](chart.previousMouseMoveX, chart.previousMouseMoveY);
        var endLocation = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](chart.mouseX, chart.mouseY);
        var rect = this.zoomingRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getRectLocation"])(startLocation, endLocation, areaBounds);
        if (rect.width > 0 && rect.height > 0) {
            this.isZoomed = true;
            chart.disableTrackTooltip = true;
            chart.svgObject.setAttribute('cursor', 'crosshair');
            if (this.zooming.mode === 'X') {
                rect.height = areaBounds.height;
                rect.y = areaBounds.y;
            }
            else if (this.zooming.mode === 'Y') {
                rect.width = areaBounds.width;
                rect.x = areaBounds.x;
            }
            var svg = chart.enableCanvas ? document.getElementById(this.elementId + '_tooltip_svg') : chart.svgObject;
            svg.appendChild(chart.svgRenderer.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_ZoomArea', chart.themeStyle.selectionRectFill, { color: chart.themeStyle.selectionRectStroke, width: 1 }, 1, rect, 0, 0, '', '3')));
        }
    };
    // Panning performed here
    Zoom.prototype.doPan = function (chart, axes) {
        if (chart.startMove && chart.crosshair.enable) {
            return null;
        }
        var currentScale;
        var offset;
        this.isZoomed = true;
        var translateX;
        var translateY;
        this.offset = !chart.delayRedraw ? chart.chartAxisLayoutPanel.seriesClipRect : this.offset;
        chart.delayRedraw = true;
        chart.disableTrackTooltip = true;
        var argsData;
        axes.forEach(function (axis) {
            argsData = {
                cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["zoomComplete"], axis: axis, previousZoomFactor: axis.zoomFactor, previousZoomPosition: axis.zoomPosition,
                currentZoomFactor: axis.zoomFactor, currentZoomPosition: axis.zoomPosition
            };
            currentScale = Math.max(1 / Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["minMax"])(axis.zoomFactor, 0, 1), 1);
            if (axis.orientation === 'Horizontal') {
                offset = (chart.previousMouseMoveX - chart.mouseX) / axis.rect.width / currentScale;
                argsData.currentZoomPosition = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["minMax"])(axis.zoomPosition + offset, 0, (1 - axis.zoomFactor));
            }
            else {
                offset = (chart.previousMouseMoveY - chart.mouseY) / axis.rect.height / currentScale;
                argsData.currentZoomPosition = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["minMax"])(axis.zoomPosition - offset, 0, (1 - axis.zoomFactor));
            }
            chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["zoomComplete"], argsData);
            if (!argsData.cancel) {
                axis.zoomFactor = argsData.currentZoomFactor;
                axis.zoomPosition = argsData.currentZoomPosition;
            }
        });
        if (this.zooming.enableDeferredZooming) {
            translateX = chart.mouseX - chart.mouseDownX;
            translateY = chart.mouseY - chart.mouseDownY;
            switch (this.zooming.mode) {
                case 'X':
                    translateY = 0;
                    break;
                case 'Y':
                    translateX = 0;
                    break;
            }
            this.setTransform(translateX, translateY, null, null, chart, false);
            this.refreshAxis(chart.chartAxisLayoutPanel, chart, chart.axisCollections);
            if (chart.enableCanvas) {
                this.performZoomRedraw(chart);
            }
        }
        else {
            this.performZoomRedraw(chart);
        }
        chart.previousMouseMoveX = chart.mouseX;
        chart.previousMouseMoveY = chart.mouseY;
    };
    /**
     * Redraw the chart on zooming.
     * @return {void}
     * @private
     */
    Zoom.prototype.performZoomRedraw = function (chart) {
        var rect = this.zoomingRect;
        chart.animateSeries = false;
        if (this.isZoomed) {
            if (rect.width > 0 && rect.height > 0) {
                this.performedUI = true;
                chart.svgObject.setAttribute('cursor', 'auto');
                this.doZoom(chart, chart.axisCollections, chart.chartAxisLayoutPanel.seriesClipRect);
                chart.isDoubleTap = false;
            }
            else if (chart.disableTrackTooltip) {
                chart.disableTrackTooltip = false;
                chart.delayRedraw = false;
                chart.enableCanvas ? chart.createChartSvg() : chart.removeSvg();
                chart.refreshAxis();
                chart.refreshBound();
            }
        }
    };
    Zoom.prototype.refreshAxis = function (layout, chart, axes) {
        var mode = chart.zoomSettings.mode;
        layout.measureAxis(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](chart.initialClipRect.x, chart.initialClipRect.y, chart.initialClipRect.width, chart.initialClipRect.height));
        axes.map(function (axis, index) {
            if (axis.orientation === 'Horizontal' && mode !== 'Y') {
                layout.drawXAxisLabels(axis, index, null, (axis.placeNextToAxisLine ? axis.updatedRect : axis.rect));
            }
            if (axis.orientation === 'Vertical' && mode !== 'X') {
                layout.drawYAxisLabels(axis, index, null, (axis.placeNextToAxisLine ? axis.updatedRect : axis.rect));
            }
        });
    };
    // Rectangular zoom calculated here performed here
    Zoom.prototype.doZoom = function (chart, axes, bounds) {
        var zoomRect = this.zoomingRect;
        var mode = this.zooming.mode;
        var argsData;
        this.isPanning = chart.zoomSettings.enablePan || this.isPanning;
        axes.forEach(function (axis) {
            argsData = {
                cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["zoomComplete"], axis: axis, previousZoomFactor: axis.zoomFactor, previousZoomPosition: axis.zoomPosition,
                currentZoomFactor: axis.zoomFactor, currentZoomPosition: axis.zoomPosition
            };
            if (axis.orientation === 'Horizontal') {
                if (mode !== 'Y') {
                    argsData.currentZoomPosition += Math.abs((zoomRect.x - bounds.x) / (bounds.width)) * axis.zoomFactor;
                    argsData.currentZoomFactor *= (zoomRect.width / bounds.width);
                    chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["zoomComplete"], argsData);
                }
            }
            else {
                if (mode !== 'X') {
                    argsData.currentZoomPosition += (1 - Math.abs((zoomRect.height + (zoomRect.y - bounds.y)) / (bounds.height)))
                        * axis.zoomFactor;
                    argsData.currentZoomFactor *= (zoomRect.height / bounds.height);
                    chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["zoomComplete"], argsData);
                }
            }
            if (!argsData.cancel) {
                axis.zoomFactor = argsData.currentZoomFactor;
                axis.zoomPosition = argsData.currentZoomPosition;
            }
        });
        this.zoomingRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, 0, 0);
        this.performZoomRedraw(chart);
    };
    /**
     * Function that handles the Mouse wheel zooming.
     * @return {void}
     * @private
     */
    Zoom.prototype.performMouseWheelZooming = function (e, mouseX, mouseY, chart, axes) {
        var direction = (this.browserName === 'mozilla' && !this.isPointer) ?
            -(e.detail) / 3 > 0 ? 1 : -1 : (e.wheelDelta / 120) > 0 ? 1 : -1;
        var mode = this.zooming.mode;
        var origin = 0.5;
        var cumulative;
        var zoomFactor;
        var zoomPosition;
        this.isZoomed = true;
        this.calculateZoomAxesRange(chart, chart.axisCollections);
        chart.disableTrackTooltip = true;
        this.performedUI = true;
        this.isPanning = chart.zoomSettings.enablePan || this.isPanning;
        var argsData;
        axes.forEach(function (axis) {
            argsData = {
                cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["zoomComplete"], axis: axis, previousZoomFactor: axis.zoomFactor, previousZoomPosition: axis.zoomPosition,
                currentZoomFactor: axis.zoomFactor, currentZoomPosition: axis.zoomPosition
            };
            if ((axis.orientation === 'Vertical' && mode !== 'X') ||
                (axis.orientation === 'Horizontal' && mode !== 'Y')) {
                cumulative = Math.max(Math.max(1 / Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["minMax"])(axis.zoomFactor, 0, 1), 1) + (0.25 * direction), 1);
                if (cumulative >= 1) {
                    origin = axis.orientation === 'Horizontal' ? mouseX / axis.rect.width : 1 - (mouseY / axis.rect.height);
                    origin = origin > 1 ? 1 : origin < 0 ? 0 : origin;
                    zoomFactor = (cumulative === 1) ? 1 : Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["minMax"])(1 / cumulative, 0, 1);
                    zoomPosition = (cumulative === 1) ? 0 : axis.zoomPosition + ((axis.zoomFactor - zoomFactor) * origin);
                    if (axis.zoomPosition !== zoomPosition || axis.zoomFactor !== zoomFactor) {
                        zoomFactor = (zoomPosition + zoomFactor) > 1 ? (1 - zoomPosition) : zoomFactor;
                    }
                    argsData.currentZoomFactor = zoomFactor;
                    argsData.currentZoomPosition = zoomPosition;
                    chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["zoomComplete"], argsData);
                }
                if (!argsData.cancel) {
                    axis.zoomFactor = argsData.currentZoomFactor;
                    axis.zoomPosition = argsData.currentZoomPosition;
                }
            }
        });
        this.performZoomRedraw(chart);
    };
    /**
     * Function that handles the Pinch zooming.
     * @return {void}
     * @private
     */
    Zoom.prototype.performPinchZooming = function (e, chart) {
        if ((this.zoomingRect.width > 0 && this.zoomingRect.height > 0) || (chart.startMove && chart.crosshair.enable)) {
            return false;
        }
        this.calculateZoomAxesRange(chart, chart.axisCollections);
        this.isZoomed = true;
        this.isPanning = true;
        this.performedUI = true;
        this.offset = !chart.delayRedraw ? chart.chartAxisLayoutPanel.seriesClipRect : this.offset;
        chart.delayRedraw = true;
        chart.disableTrackTooltip = true;
        var elementOffset = chart.element.getBoundingClientRect();
        var touchDown = this.touchStartList;
        var touchMove = this.touchMoveList;
        var touch0StartX = touchDown[0].pageX - elementOffset.left;
        var touch0StartY = touchDown[0].pageY - elementOffset.top;
        var touch0EndX = touchMove[0].pageX - elementOffset.left;
        var touch0EndY = touchMove[0].pageY - elementOffset.top;
        var touch1StartX = touchDown[1].pageX - elementOffset.left;
        var touch1StartY = touchDown[1].pageY - elementOffset.top;
        var touch1EndX = touchMove[1].pageX - elementOffset.left;
        var touch1EndY = touchMove[1].pageY - elementOffset.top;
        var scaleX;
        var scaleY;
        var translateXValue;
        var translateYValue;
        var pinchRect;
        var clipX;
        var clipY;
        scaleX = Math.abs(touch0EndX - touch1EndX) / Math.abs(touch0StartX - touch1StartX);
        scaleY = Math.abs(touch0EndY - touch1EndY) / Math.abs(touch0StartY - touch1StartY);
        clipX = ((this.offset.x - touch0EndX) / scaleX) + touch0StartX;
        clipY = ((this.offset.y - touch0EndY) / scaleY) + touch0StartY;
        pinchRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](clipX, clipY, this.offset.width / scaleX, this.offset.height / scaleY);
        translateXValue = (touch0EndX - (scaleX * touch0StartX));
        translateYValue = (touch0EndY - (scaleY * touch0StartY));
        if (!isNaN(scaleX - scaleX) && !isNaN(scaleY - scaleY)) {
            switch (this.zooming.mode) {
                case 'XY':
                    this.setTransform(translateXValue, translateYValue, scaleX, scaleY, chart, true);
                    break;
                case 'X':
                    this.setTransform(translateXValue, 0, scaleX, 1, chart, true);
                    break;
                case 'Y':
                    this.setTransform(0, translateYValue, 1, scaleY, chart, true);
                    break;
            }
        }
        this.calculatePinchZoomFactor(chart, pinchRect);
        this.refreshAxis(chart.chartAxisLayoutPanel, chart, chart.axisCollections);
        return true;
    };
    Zoom.prototype.calculatePinchZoomFactor = function (chart, pinchRect) {
        var _this = this;
        var mode = this.zooming.mode;
        var selectionMin;
        var selectionMax;
        var rangeMin;
        var rangeMax;
        var value;
        var axisTrans;
        var argsData;
        var currentZF;
        var currentZP;
        chart.axisCollections.forEach(function (axis, index) {
            if ((axis.orientation === 'Horizontal' && mode !== 'Y') ||
                (axis.orientation === 'Vertical' && mode !== 'X')) {
                currentZF = axis.zoomFactor;
                currentZP = axis.zoomPosition;
                argsData = {
                    cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_4__["zoomComplete"], axis: axis, previousZoomFactor: axis.zoomFactor,
                    previousZoomPosition: axis.zoomPosition, currentZoomFactor: currentZF, currentZoomPosition: currentZP
                };
                if (axis.orientation === 'Horizontal') {
                    value = pinchRect.x - _this.offset.x;
                    axisTrans = axis.rect.width / _this.zoomAxes[index].delta;
                    rangeMin = value / axisTrans + _this.zoomAxes[index].min;
                    value = pinchRect.x + pinchRect.width - _this.offset.x;
                    rangeMax = value / axisTrans + _this.zoomAxes[index].min;
                }
                else {
                    value = pinchRect.y - _this.offset.y;
                    axisTrans = axis.rect.height / _this.zoomAxes[index].delta;
                    rangeMin = (value * -1 + axis.rect.height) / axisTrans + _this.zoomAxes[index].min;
                    value = pinchRect.y + pinchRect.height - _this.offset.y;
                    rangeMax = (value * -1 + axis.rect.height) / axisTrans + _this.zoomAxes[index].min;
                }
                selectionMin = Math.min(rangeMin, rangeMax);
                selectionMax = Math.max(rangeMin, rangeMax);
                currentZP = (selectionMin - _this.zoomAxes[index].actualMin) / _this.zoomAxes[index].actualDelta;
                currentZF = (selectionMax - selectionMin) / _this.zoomAxes[index].actualDelta;
                argsData.currentZoomPosition = currentZP < 0 ? 0 : currentZP;
                argsData.currentZoomFactor = currentZF > 1 ? 1 : currentZF;
                chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_4__["zoomComplete"], argsData);
                if (!argsData.cancel) {
                    axis.zoomFactor = argsData.currentZoomFactor;
                    axis.zoomPosition = argsData.currentZoomPosition;
                }
            }
        });
    };
    // Series transformation style applied here.
    Zoom.prototype.setTransform = function (transX, transY, scaleX, scaleY, chart, isPinch) {
        if (!chart.enableCanvas) {
            chart.seriesElements.setAttribute('clip-path', 'url(#' + this.elementId + '_ChartAreaClipRect_)');
        }
        if (chart.indicatorElements) {
            chart.indicatorElements.setAttribute('clip-path', 'url(#' + this.elementId + '_ChartAreaClipRect_)');
        }
        var translate;
        var xAxisLoc;
        var yAxisLoc;
        var element;
        if (transX !== null && transY !== null) {
            chart.visibleSeries.forEach(function (value) {
                xAxisLoc = chart.requireInvertedAxis ? value.yAxis.rect.x : value.xAxis.rect.x;
                yAxisLoc = chart.requireInvertedAxis ? value.xAxis.rect.y : value.yAxis.rect.y;
                translate = 'translate(' + (transX + (isPinch ? (scaleX * xAxisLoc) : xAxisLoc)) +
                    ',' + (transY + (isPinch ? (scaleY * yAxisLoc) : yAxisLoc)) + ')';
                translate = (scaleX || scaleY) ? translate + ' scale(' + scaleX + ' ' + scaleY + ')' : translate;
                if (value.visible) {
                    if (value.category === 'Indicator') {
                        value.seriesElement.parentNode.setAttribute('transform', translate);
                    }
                    else {
                        if (!chart.enableCanvas) {
                            value.seriesElement.setAttribute('transform', translate);
                        }
                    }
                    element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(chart.element.id + '_Series_' + value.index + '_DataLabelCollections');
                    if (value.errorBarElement) {
                        value.errorBarElement.setAttribute('transform', translate);
                    }
                    if (value.symbolElement) {
                        value.symbolElement.setAttribute('transform', translate);
                    }
                    if (value.textElement) {
                        value.textElement.setAttribute('visibility', 'hidden');
                        value.shapeElement.setAttribute('visibility', 'hidden');
                    }
                    if (element) {
                        element.style.visibility = 'hidden';
                    }
                }
            });
        }
    };
    Zoom.prototype.calculateZoomAxesRange = function (chart, axes) {
        var _this = this;
        var range;
        var axisRange;
        chart.axisCollections.forEach(function (axis, index) {
            axisRange = axis.visibleRange;
            if (_this.zoomAxes[index]) {
                if (!chart.delayRedraw) {
                    _this.zoomAxes[index].min = axisRange.min;
                    _this.zoomAxes[index].delta = axisRange.delta;
                }
            }
            else {
                range = {
                    actualMin: axis.actualRange.min,
                    actualDelta: axis.actualRange.delta,
                    min: axisRange.min,
                    delta: axisRange.delta
                };
                _this.zoomAxes[index] = range;
            }
        });
    };
    // Zooming Toolkit created here
    Zoom.prototype.showZoomingToolkit = function (chart) {
        var toolboxItems = this.zooming.toolbarItems;
        var areaBounds = chart.chartAxisLayoutPanel.seriesClipRect;
        var spacing = 5;
        var render = chart.svgRenderer;
        var length = this.isDevice ? 1 : toolboxItems.length;
        var iconSize = this.isDevice ? Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])('Reset Zoom', { size: '12px' }).width : 16;
        var height = this.isDevice ? Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])('Reset Zoom', { size: '12px' }).height : 22;
        var width = (length * iconSize) + ((length + 1) * spacing) + ((length - 1) * spacing);
        var transX = areaBounds.x + areaBounds.width - width - spacing;
        var transY = (areaBounds.y + spacing);
        var xPosition = spacing;
        var outerElement;
        var toolkit = this.toolkit;
        var element;
        var shadowElement = '<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';
        shadowElement += '<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>';
        shadowElement += '</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';
        if (length === 0 || Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.elementId + '_Zooming_KitCollection')) {
            return false;
        }
        var defElement = render.createDefs();
        toolboxItems = this.isDevice ? ['Reset'] : toolboxItems;
        defElement.innerHTML = shadowElement;
        this.toolkitElements = render.createGroup({
            id: this.elementId + '_Zooming_KitCollection',
            transform: 'translate(' + transX + ',' + transY + ')'
        });
        this.toolkitElements.appendChild(defElement);
        this.toolkitElements.appendChild(render.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_Zooming_Rect', '#fafafa', { color: 'transparent', width: 1 }, 1, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, width, (height + (spacing * 2))), 0, 0)));
        outerElement = render.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_Zooming_Rect', '#fafafa', { color: 'transparent', width: 1 }, 0.1, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, width, (height + (spacing * 2))), 0, 0));
        outerElement.setAttribute('filter', 'url(#chart_shadow)');
        this.toolkitElements.appendChild(outerElement);
        var currentItem;
        for (var i = 1; i <= length; i++) {
            currentItem = toolboxItems[i - 1];
            element = render.createGroup({
                transform: 'translate(' + xPosition + ',' + (this.isDevice ? spacing : (spacing + 3)) + ')'
            });
            // for desktop toolkit hight is 32 and top padding is 8 icon size 16
            switch (currentItem) {
                case 'Pan':
                    toolkit.createPanButton(element, this.toolkitElements, chart);
                    break;
                case 'Zoom':
                    toolkit.createZoomButton(element, this.toolkitElements, chart);
                    break;
                case 'ZoomIn':
                    toolkit.createZoomInButton(element, this.toolkitElements, chart);
                    break;
                case 'ZoomOut':
                    toolkit.createZoomOutButton(element, this.toolkitElements, chart);
                    break;
                case 'Reset':
                    toolkit.createResetButton(element, this.toolkitElements, chart, this.isDevice);
                    break;
            }
            xPosition += iconSize + (spacing * 2);
        }
        this.toolkitElements.setAttribute('opacity', this.isDevice ? '1' : '' + this.zoomkitOpacity);
        this.toolkitElements.setAttribute('cursor', 'auto');
        if (chart.enableCanvas) {
            var zoomDiv = document.createElement('div');
            zoomDiv.id = chart.element.id + '_zoom';
            zoomDiv.setAttribute('style', 'position:absolute; z-index:1');
            var zoomheight = chart.availableSize.height / 2;
            var svg = chart.svgRenderer.createSvg({
                id: chart.element.id + '_zoomkit_svg',
                width: chart.availableSize.width,
                height: zoomheight
            });
            svg.setAttribute('style', 'position:absolute');
            svg.appendChild(this.toolkitElements);
            zoomDiv.appendChild(svg);
            document.getElementById(this.elementId + '_Secondary_Element').appendChild(zoomDiv);
        }
        else {
            chart.svgObject.appendChild(this.toolkitElements);
        }
        if (!this.isDevice) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.toolkitElements, 'mousemove touchstart', this.zoomToolkitMove, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.toolkitElements, 'mouseleave touchend', this.zoomToolkitLeave, this);
            if (this.isPanning) {
                toolkit.pan();
            }
        }
        return true;
    };
    /**
     * To the show the zooming toolkit.
     * @return {void}
     * @private
     */
    Zoom.prototype.applyZoomToolkit = function (chart, axes) {
        var showToolkit = this.isAxisZoomed(axes);
        if (showToolkit) {
            this.showZoomingToolkit(chart);
            this.isZoomed = true;
        }
        else {
            this.toolkit.removeTooltip();
            this.isPanning = false;
            this.isZoomed = false;
            chart.svgObject.setAttribute('cursor', 'auto');
        }
    };
    /**
     * Return boolean property to show zooming toolkit.
     * @return {void}
     * @private
     */
    Zoom.prototype.isAxisZoomed = function (axes) {
        var showToolkit = false;
        axes.forEach(function (axis) {
            showToolkit = (showToolkit || (axis.zoomFactor !== 1 || axis.zoomPosition !== 0));
        });
        return showToolkit;
    };
    Zoom.prototype.zoomToolkitMove = function (e) {
        var element = this.toolkitElements;
        var opacity = +element.getAttribute('opacity');
        this.zoomkitOpacity = 1;
        element.setAttribute('opacity', '' + this.zoomkitOpacity);
        return false;
    };
    Zoom.prototype.zoomToolkitLeave = function (e) {
        var element = this.toolkitElements;
        this.zoomkitOpacity = 0.3;
        element.setAttribute('opacity', '' + this.zoomkitOpacity);
        return false;
    };
    /**
     * @hidden
     */
    Zoom.prototype.addEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.chart.element, this.wheelEvent, this.chartMouseWheel, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMoveHandler, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mouseDownHandler, this);
        this.chart.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpHandler, this);
        this.chart.on(this.cancelEvent, this.mouseCancelHandler, this);
    };
    /**
     * @hidden
     */
    Zoom.prototype.removeEventListener = function () {
        if (this.chart.isDestroyed) {
            return;
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.chart.element, this.wheelEvent, this.chartMouseWheel);
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMoveHandler);
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mouseDownHandler);
        this.chart.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpHandler);
        this.chart.off(this.cancelEvent, this.mouseCancelHandler);
    };
    /**
     * Handles the mouse wheel on chart.
     * @return {boolean}
     * @private
     */
    Zoom.prototype.chartMouseWheel = function (e) {
        var chart = this.chart;
        var offset = chart.element.getBoundingClientRect();
        var svgRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(chart.svgId).getBoundingClientRect();
        var mouseX = (e.clientX - offset.left) - Math.max(svgRect.left - offset.left, 0);
        var mouseY = (e.clientY - offset.top) - Math.max(svgRect.top - offset.top, 0);
        if (this.zooming.enableMouseWheelZooming &&
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(mouseX, mouseY, chart.chartAxisLayoutPanel.seriesClipRect)) {
            e.preventDefault();
            this.performMouseWheelZooming(e, mouseX, mouseY, chart, chart.axisCollections);
        }
        return false;
    };
    /**
     * @hidden
     */
    Zoom.prototype.mouseMoveHandler = function (e) {
        //Zooming for chart
        var chart = this.chart;
        var touches = null;
        if (e.type === 'touchmove') {
            if (e.preventDefault && this.isIOS &&
                (this.isPanning || (chart.isDoubleTap)
                    || (this.zooming.enablePinchZooming && this.touchStartList.length > 1))) {
                e.preventDefault();
            }
            touches = e.touches;
        }
        if (chart.isChartDrag) {
            if (chart.isTouch) {
                this.touchMoveList = this.addTouchPointer(this.touchMoveList, e, touches);
                if (this.zooming.enablePinchZooming && this.touchMoveList.length > 1
                    && this.touchStartList.length > 1) {
                    this.performPinchZooming(e, chart);
                }
            }
            this.renderZooming(e, chart, chart.isTouch);
        }
    };
    /**
     * @hidden
     */
    Zoom.prototype.mouseDownHandler = function (e) {
        //Zooming for chart
        var chart = this.chart;
        var touches = null;
        var target;
        if (e.type === 'touchstart') {
            touches = e.touches;
            target = e.target;
        }
        else {
            target = e.target;
        }
        if (target.id.indexOf(chart.element.id + '_Zooming_') === -1 &&
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(chart.previousMouseMoveX, chart.previousMouseMoveY, chart.chartAxisLayoutPanel.seriesClipRect)) {
            chart.isChartDrag = true;
        }
        if (chart.isTouch) {
            this.touchStartList = this.addTouchPointer(this.touchStartList, e, touches);
        }
    };
    /**
     * @hidden
     */
    Zoom.prototype.mouseUpHandler = function (e) {
        var chart = this.chart;
        var performZoomRedraw = e.target.id.indexOf(chart.element.id + '_ZoomOut_') === -1 ||
            e.target.id.indexOf(chart.element.id + '_ZoomIn_') === -1;
        if (chart.isChartDrag || performZoomRedraw) {
            this.performZoomRedraw(chart);
        }
        if (chart.isTouch) {
            if (chart.isDoubleTap && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withInBounds"])(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect)
                && this.touchStartList.length === 1 && this.isZoomed) {
                this.toolkit.reset();
            }
            this.touchStartList = [];
            chart.isDoubleTap = false;
        }
    };
    /**
     * @hidden
     */
    Zoom.prototype.mouseCancelHandler = function (e) {
        if (this.isZoomed) {
            this.performZoomRedraw(this.chart);
        }
        this.pinchTarget = null;
        this.touchStartList = [];
        this.touchMoveList = [];
    };
    /**
     * Handles the touch pointer.
     * @return {boolean}
     * @private
     */
    Zoom.prototype.addTouchPointer = function (touchList, e, touches) {
        if (touches) {
            touchList = [];
            for (var i = 0, length_1 = touches.length; i < length_1; i++) {
                touchList.push({ pageX: touches[i].clientX, pageY: touches[i].clientY, pointerId: null });
            }
        }
        else {
            touchList = touchList ? touchList : [];
            if (touchList.length === 0) {
                touchList.push({ pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId });
            }
            else {
                for (var i = 0, length_2 = touchList.length; i < length_2; i++) {
                    if (touchList[i].pointerId === e.pointerId) {
                        touchList[i] = { pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId };
                    }
                    else {
                        touchList.push({ pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId });
                    }
                }
            }
        }
        return touchList;
    };
    /**
     * Get module name.
     */
    Zoom.prototype.getModuleName = function () {
        // Returns te module name
        return 'Zoom';
    };
    /**
     * To destroy the zooming.
     * @return {void}
     * @private
     */
    Zoom.prototype.destroy = function (chart) {
        // Destroy method performed here
        this.removeEventListener();
    };
    return Zoom;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/double-range.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/utils/double-range.js ***!
  \*****************************************************************************/
/*! exports provided: DoubleRange */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DoubleRange", function() { return DoubleRange; });
/**
 * Numeric Range.
 * @private
 */
var DoubleRange = /** @class */ (function () {
    function DoubleRange(start, end) {
        /*
          if (!isNaN(start) && !isNaN(end)) {
           this.mIsEmpty = true;
          } else {
              this.mIsEmpty = false;
          }*/
        if (start < end) {
            this.mStart = start;
            this.mEnd = end;
        }
        else {
            this.mStart = end;
            this.mEnd = start;
        }
    }
    Object.defineProperty(DoubleRange.prototype, "start", {
        //private mIsEmpty: boolean;
        /** @private */
        get: function () {
            return this.mStart;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DoubleRange.prototype, "end", {
        /** @private */
        get: function () {
            return this.mEnd;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DoubleRange.prototype, "delta", {
        /*
          get isEmpty(): boolean {
             return this.mIsEmpty;
         }*/
        /** @private */
        get: function () {
            return (this.mEnd - this.mStart);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DoubleRange.prototype, "median", {
        /** @private */
        get: function () {
            return this.mStart + (this.mEnd - this.mStart) / 2;
        },
        enumerable: true,
        configurable: true
    });
    return DoubleRange;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/get-data.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/chart/utils/get-data.js ***!
  \*************************************************************************/
/*! exports provided: ChartData */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartData", function() { return ChartData; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");


/**
 * To get the data on mouse move.
 * @private
 */
var ChartData = /** @class */ (function () {
    /**
     * Constructor for the data.
     * @private
     */
    function ChartData(chart) {
        /** @private */
        this.currentPoints = [];
        /** @private */
        this.previousPoints = [];
        this.insideRegion = false;
        this.chart = chart;
        this.lierIndex = 0;
    }
    /**
     * Method to get the Data.
     * @private
     */
    ChartData.prototype.getData = function () {
        var chart = this.chart;
        var point = null;
        var series = null;
        var width;
        var height;
        var mouseX;
        var mouseY;
        for (var len = chart.visibleSeries.length, i = len - 1; i >= 0; i--) {
            series = chart.visibleSeries[i];
            width = (series.type === 'Scatter' || series.drawType === 'Scatter' || (!series.isRectSeries && series.marker.visible))
                ? (series.marker.height + 5) / 2 : 0;
            height = (series.type === 'Scatter' || series.drawType === 'Scatter' || (!series.isRectSeries && series.marker.visible))
                ? (series.marker.width + 5) / 2 : 0;
            mouseX = chart.mouseX;
            mouseY = chart.mouseY;
            if (series.dragSettings.enable && series.isRectSeries) {
                if (!(series.type === 'Bar' && chart.isTransposed) && (chart.isTransposed || series.type === 'Bar')) {
                    var markerWidth = series.marker.width / 2;
                    mouseX = series.yAxis.isInversed ? mouseX + markerWidth : mouseX - markerWidth;
                }
                else {
                    var markerHeight = series.marker.height / 2;
                    mouseY = series.yAxis.isInversed ? mouseY - markerHeight : mouseY + markerHeight;
                }
            }
            if (series.visible && Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInBounds"])(mouseX, mouseY, series.clipRect, width, height)) {
                point = this.getRectPoint(series, series.clipRect, mouseX, mouseY);
            }
            if (point) {
                return new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PointData"](point, series);
            }
        }
        return new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PointData"](point, series);
    };
    ChartData.prototype.isSelected = function (chart) {
        return (chart.selectionMode.indexOf('Drag') > -1 && chart.selectionModule && chart.selectionModule.rectPoints !== null);
    };
    ChartData.prototype.getRectPoint = function (series, rect, x, y) {
        var currentRect;
        var chart = this.chart;
        var fromCenterX;
        var fromCenterY;
        var clickAngle;
        var arcAngle = 0;
        var startAngle;
        var endAngle;
        var distanceFromCenter;
        if (chart.isScrolling) {
            return null;
        }
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            if (!point.regionData) {
                if (!point.regions || !point.regions.length) {
                    continue;
                }
            }
            if (point.regionData && this.chart.chartAreaType === 'PolarRadar' && series.drawType.indexOf('Column') > -1) {
                fromCenterX = x - (series.clipRect.width / 2 + series.clipRect.x);
                fromCenterY = y - (series.clipRect.height / 2 + series.clipRect.y);
                arcAngle = 2 * Math.PI * (point.regionData.currentXPosition < 0 ? 1 + point.regionData.currentXPosition
                    : point.regionData.currentXPosition);
                clickAngle = (Math.atan2(fromCenterY, fromCenterX) + 0.5 * Math.PI - arcAngle) % (2 * Math.PI);
                clickAngle = clickAngle < 0 ? 2 * Math.PI + clickAngle : clickAngle;
                clickAngle = clickAngle + 2 * Math.PI * series.chart.primaryXAxis.startAngle;
                startAngle = point.regionData.startAngle;
                startAngle -= arcAngle;
                startAngle = startAngle < 0 ? 2 * Math.PI + startAngle : startAngle;
                endAngle = point.regionData.endAngle;
                endAngle -= arcAngle;
                endAngle = endAngle < 0 ? 2 * Math.PI + endAngle : endAngle;
                distanceFromCenter = Math.sqrt(Math.pow(Math.abs(fromCenterX), 2) + Math.pow(Math.abs(fromCenterY), 2));
                if (clickAngle >= startAngle && clickAngle <= endAngle &&
                    (((distanceFromCenter >= point.regionData.innerRadius && distanceFromCenter <= point.regionData.radius) ||
                        (distanceFromCenter <= point.regionData.innerRadius && distanceFromCenter >= point.regionData.radius))
                        && distanceFromCenter <= series.chart.radius)) {
                    return point;
                }
            }
            if (series.dragSettings.enable && series.isRectSeries) {
                if (this.rectRegion(x, y, point, rect, series)) {
                    this.insideRegion = true;
                    return point;
                }
            }
            if (!this.insideRegion && this.checkRegionContainsPoint(point.regions, rect, x, y)) {
                return point;
            }
            else if (this.insideRegion && this.checkRegionContainsPoint(point.regions, rect, x, y)) {
                return point;
            }
        }
        return null;
    };
    /**
     * Checks whether the region contains a point
     */
    ChartData.prototype.checkRegionContainsPoint = function (regionRect, rect, x, y) {
        var _this = this;
        return regionRect.some(function (region, index) {
            _this.lierIndex = index;
            return Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInBounds"])(x, y, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"]((_this.chart.chartAreaType === 'Cartesian' ? rect.x : 0) + region.x, (_this.chart.chartAreaType === 'Cartesian' ? rect.y : 0) + region.y, region.width, region.height));
        });
    };
    /**
     * To find drag region for column and bar series
     * @param x
     * @param y
     * @param point
     * @param rect
     * @param series
     */
    ChartData.prototype.rectRegion = function (x, y, point, rect, series) {
        var _this = this;
        var isBar = series.type === 'Bar';
        var isInversed = series.yAxis.isInversed;
        var isTransposed = series.chart.isTransposed;
        var heightValue = 10;
        var yValue = 0;
        var xValue = 0;
        var width;
        var height = width = 2 * heightValue;
        if (isInversed && isTransposed) {
            if (isBar) {
                yValue = point.regions[0].height - heightValue;
                width = point.regions[0].width;
            }
            else {
                xValue = -heightValue;
                height = point.regions[0].height;
            }
        }
        else if (isInversed || point.yValue < 0) {
            if (isBar) {
                xValue = -heightValue;
                height = point.regions[0].height;
            }
            else {
                yValue = point.regions[0].height - heightValue;
                width = point.regions[0].width;
            }
        }
        else if (isTransposed) {
            if (isBar) {
                yValue = -heightValue;
                width = point.regions[0].width;
            }
            else {
                xValue = point.regions[0].width - heightValue;
                height = point.regions[0].height;
            }
        }
        else {
            if (isBar) {
                xValue = point.regions[0].width - heightValue;
                height = point.regions[0].height;
            }
            else {
                yValue = -heightValue;
                width = point.regions[0].width;
            }
        }
        return point.regions.some(function (region) {
            return Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInBounds"])(x, y, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"]((_this.chart.chartAreaType === 'Cartesian' ? rect.x : 0) + region.x + xValue, (_this.chart.chartAreaType === 'Cartesian' ? rect.y : 0) + region.y + yValue, width, height));
        });
    };
    /**
     * @private
     */
    ChartData.prototype.getClosest = function (series, value) {
        var xData = series.xData;
        var closest;
        if (value >= series.xMin - 0.5 && value <= series.xMax + 0.5) {
            for (var _i = 0, xData_1 = xData; _i < xData_1.length; _i++) {
                var data = xData_1[_i];
                if (closest == null || Math.abs(data - value) < Math.abs(closest - value)) {
                    closest = data;
                }
            }
        }
        return closest;
    };
    ChartData.prototype.getClosestX = function (chart, series) {
        var value;
        var rect = series.clipRect;
        if (!chart.requireInvertedAxis) {
            value = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getValueXByPoint"])(chart.mouseX - rect.x, rect.width, series.xAxis);
        }
        else {
            value = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getValueYByPoint"])(chart.mouseY - rect.y, rect.height, series.xAxis);
        }
        var closest = this.getClosest(series, value);
        for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
            var point = _a[_i];
            if (closest === point.xValue && point.visible) {
                return new _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PointData"](point, series);
            }
        }
        return null;
    };
    return ChartData;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/annotation/annotation.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/annotation/annotation.js ***!
  \*********************************************************************************/
/*! exports provided: AnnotationBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnnotationBase", function() { return AnnotationBase; });
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _model_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");







/**
 * Annotation Module handles the Annotation for chart and accumulation series.
 */
var AnnotationBase = /** @class */ (function () {
    /**
     * Constructor for chart and accumulation annotation
     * @param control
     */
    function AnnotationBase(control) {
        this.control = control;
    }
    /**
     * Method to render the annotation for chart and accumulation series.
     * @private
     * @param annotation
     * @param index
     */
    AnnotationBase.prototype.render = function (annotation, index) {
        this.isChart = this.control.getModuleName() === 'chart';
        this.annotation = annotation;
        var childElement = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["createTemplate"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["createElement"])('div', {
            id: this.control.element.id + '_Annotation_' + index,
            styles: 'position: absolute;'
        }), index, annotation.content, this.control);
        return childElement;
    };
    /**
     * Method to calculate the location for annotation - coordinate unit as pixel.
     * @private
     * @param location
     */
    AnnotationBase.prototype.setAnnotationPixelValue = function (location) {
        var rect;
        rect = this.annotation.region === 'Chart' ?
            new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](0, 0, this.control.availableSize.width, this.control.availableSize.height) :
            this.isChart ?
                this.control.chartAxisLayoutPanel.seriesClipRect :
                this.control.series[0].accumulationBound;
        location.x = ((typeof this.annotation.x !== 'string') ?
            ((typeof this.annotation.x === 'number') ? this.annotation.x : 0) :
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["stringToNumber"])(this.annotation.x, rect.width)) + rect.x;
        location.y = ((typeof this.annotation.y === 'number') ? this.annotation.y :
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["stringToNumber"])(this.annotation.y, rect.height)) + rect.y;
        return true;
    };
    /**
     * Method to calculate the location for annotation - coordinate unit as point.
     * @private
     * @param location
     */
    AnnotationBase.prototype.setAnnotationPointValue = function (location) {
        var symbolLocation = new _utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](0, 0);
        if (this.isChart) {
            var xAxis = void 0;
            var yAxis = void 0;
            var chart = this.control;
            var annotation = this.annotation;
            var xValue = void 0;
            var isLog = false;
            var xAxisName = annotation.xAxisName;
            var yAxisName = annotation.yAxisName;
            var isInverted = chart.requireInvertedAxis;
            for (var _i = 0, _a = chart.axisCollections; _i < _a.length; _i++) {
                var axis = _a[_i];
                if (xAxisName === axis.name || (xAxisName == null && axis.name === 'primaryXAxis')) {
                    xAxis = axis;
                    if (xAxis.valueType.indexOf('Category') > -1) {
                        var xAnnotation = xAxis.valueType === 'DateTimeCategory' ? (annotation.x.getTime()).toString() :
                            annotation.x;
                        if (xAxis.labels.indexOf(xAnnotation) < 0) {
                            return false;
                        }
                        else {
                            xValue = xAxis.labels.indexOf(xAnnotation);
                        }
                    }
                    else if (xAxis.valueType === 'DateTime') {
                        var option = { skeleton: 'full', type: 'dateTime' };
                        xValue = (typeof this.annotation.x === 'object') ?
                            Date.parse(chart.intl.getDateParser(option)(chart.intl.getDateFormat(option)(new Date(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataUtil"].parse.parseJson({ val: annotation.x }).val)))) : 0;
                    }
                    else {
                        xValue = +annotation.x;
                    }
                }
                else if (yAxisName === axis.name || (yAxisName == null && axis.name === 'primaryYAxis')) {
                    yAxis = axis;
                    isLog = yAxis.valueType === 'Logarithmic';
                }
            }
            if (xAxis && yAxis && Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withIn"])(xAxis.valueType === 'Logarithmic' ? Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["logBase"])(xValue, xAxis.logBase) : xValue, xAxis.visibleRange) && Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withIn"])(yAxis.valueType === 'Logarithmic' ? Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["logBase"])(+annotation.y, yAxis.logBase) : +annotation.y, yAxis.visibleRange)) {
                symbolLocation = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getPoint"])(xValue, +annotation.y, xAxis, yAxis, isInverted);
                location.x = symbolLocation.x + (isInverted ? yAxis.rect.x : xAxis.rect.x);
                location.y = symbolLocation.y + (isInverted ? xAxis.rect.y : yAxis.rect.y);
            }
            else {
                return false;
            }
            return true;
        }
        else {
            return this.setAccumulationPointValue(location);
        }
    };
    /**
     * To process the annotation for accumulation chart
     * @param annotation
     * @param index
     * @param parentElement
     */
    AnnotationBase.prototype.processAnnotation = function (annotation, index, parentElement) {
        var annotationElement;
        var location;
        location = new _utils_helper__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](0, 0);
        annotationElement = this.render(annotation, index);
        if (this['setAnnotation' + annotation.coordinateUnits + 'Value'](location)) {
            this.setElementStyle(location, annotationElement, parentElement);
        }
        else if (this.control.redraw) {
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["removeElement"])(annotationElement.id);
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["updateBlazorTemplate"])((this.control.element.id + 'Annotation' + index), 'ContentTemplate', this.control.annotations[index]);
    };
    /**
     * Method to calculate the location for annotation - coordinate unit as point in accumulation chart.
     * @private
     * @param location
     */
    AnnotationBase.prototype.setAccumulationPointValue = function (location) {
        var accumulation = this.control;
        var point;
        for (var _i = 0, _a = accumulation.visibleSeries[0].points; _i < _a.length; _i++) {
            var accPoint = _a[_i];
            if (typeof accPoint.x === 'object') {
                if (Date.parse(accPoint.x) === Date.parse(this.annotation.x) &&
                    // tslint:disable-next-line    
                    accPoint.y == this.annotation.y) {
                    point = accPoint;
                    break;
                }
            }
            else {
                // tslint:disable-next-line
                if (accPoint.x == this.annotation.x && accPoint.y == this.annotation.y) {
                    point = accPoint;
                    break;
                }
            }
        }
        if (point && point.visible) {
            location.x = point.symbolLocation.x;
            location.y = point.symbolLocation.y;
            return true;
        }
        else {
            return false;
        }
    };
    /**
     * Method to set the element style for accumulation / chart annotation.
     * @private
     * @param location
     * @param element
     * @param parentElement
     */
    AnnotationBase.prototype.setElementStyle = function (location, element, parentElement) {
        var elementRect = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureElementRect"])(element, this.control.redraw);
        var argsData = {
            cancel: false, name: _model_constants__WEBPACK_IMPORTED_MODULE_3__["annotationRender"], content: element,
            location: location
        };
        this.control.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_3__["annotationRender"], argsData);
        if (!argsData.cancel) {
            argsData.content.style.left = this.setAlignmentValue(this.annotation.horizontalAlignment, elementRect.width, argsData.location.x) + 'px';
            argsData.content.style.top = this.setAlignmentValue(this.annotation.verticalAlignment, elementRect.height, argsData.location.y) + 'px';
            argsData.content.setAttribute('aria-label', this.annotation.description || 'Annotation');
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["appendElement"])(argsData.content, parentElement, this.control.redraw, true, 'left', 'top');
        }
    };
    /**
     * Method to calculate the alignment value for annotation.
     * @private
     * @param alignment
     * @param size
     * @param value
     */
    AnnotationBase.prototype.setAlignmentValue = function (alignment, size, value) {
        switch (alignment) {
            case 'Top':
            case 'Near':
                value -= size;
                break;
            case 'Bottom':
            case 'Far':
                value += 0;
                break;
            case 'Middle':
            case 'Center':
                value -= (size / 2);
                break;
        }
        return value;
    };
    return AnnotationBase;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/index.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/index.js ***!
  \*****************************************************************/
/*! exports provided: Connector, Font, Border, ChartArea, Margin, Animation, Indexes, CornerRadius, Index, EmptyPointSettings, DragSettings, TooltipSettings, Periods, PeriodSelectorSettings, loaded, legendClick, load, animationComplete, legendRender, textRender, pointRender, seriesRender, axisLabelRender, axisRangeCalculated, axisMultiLabelRender, tooltipRender, chartMouseMove, chartMouseClick, pointClick, pointMove, chartMouseLeave, chartMouseDown, chartMouseUp, zoomComplete, dragComplete, resized, beforePrint, annotationRender, scrollStart, scrollEnd, scrollChanged, stockEventRender, multiLevelLabelClick, dragStart, drag, dragEnd, Theme, getSeriesColor, getThemeColor, getScrollbarThemeColor, PeriodSelector */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _model_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Connector", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["Connector"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Font", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["Font"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Border", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["Border"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartArea", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["ChartArea"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Margin", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["Margin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Indexes", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["Indexes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CornerRadius", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["CornerRadius"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Index", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["Index"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyPointSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["EmptyPointSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["DragSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["TooltipSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Periods", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["Periods"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PeriodSelectorSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_0__["PeriodSelectorSettings"]; });

/* harmony import */ var _model_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "loaded", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["loaded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "legendClick", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["legendClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "load", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["load"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationComplete", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["animationComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "legendRender", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["legendRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textRender", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["textRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRender", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["pointRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "seriesRender", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["seriesRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLabelRender", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["axisLabelRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRangeCalculated", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["axisRangeCalculated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisMultiLabelRender", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["axisMultiLabelRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tooltipRender", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["tooltipRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseMove", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["chartMouseMove"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseClick", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["chartMouseClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointClick", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["pointClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointMove", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["pointMove"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseLeave", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["chartMouseLeave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseDown", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["chartMouseDown"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseUp", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["chartMouseUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomComplete", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["zoomComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragComplete", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["dragComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resized", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["resized"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePrint", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["beforePrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "annotationRender", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["annotationRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scrollStart", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["scrollStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scrollEnd", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["scrollEnd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scrollChanged", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["scrollChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stockEventRender", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["stockEventRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multiLevelLabelClick", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["multiLevelLabelClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragStart", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["dragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["drag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnd", function() { return _model_constants__WEBPACK_IMPORTED_MODULE_1__["dragEnd"]; });

/* harmony import */ var _model_theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Theme", function() { return _model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getSeriesColor", function() { return _model_theme__WEBPACK_IMPORTED_MODULE_2__["getSeriesColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getThemeColor", function() { return _model_theme__WEBPACK_IMPORTED_MODULE_2__["getThemeColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollbarThemeColor", function() { return _model_theme__WEBPACK_IMPORTED_MODULE_2__["getScrollbarThemeColor"]; });

/* harmony import */ var _period_selector_period_selector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./period-selector/period-selector */ "./node_modules/@syncfusion/ej2-charts/src/common/period-selector/period-selector.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PeriodSelector", function() { return _period_selector_period_selector__WEBPACK_IMPORTED_MODULE_3__["PeriodSelector"]; });

/**
 * Chart and accumulation common files
 */






/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/legend/legend.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/legend/legend.js ***!
  \*************************************************************************/
/*! exports provided: Location, LegendSettings, BaseLegend, LegendOptions */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LegendSettings", function() { return LegendSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseLegend", function() { return BaseLegend; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LegendOptions", function() { return LegendOptions; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _model_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _model_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};







/**
 * Configures the location for the legend.
 */
var Location = /** @class */ (function (_super) {
    __extends(Location, _super);
    function Location() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Location.prototype, "x", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Location.prototype, "y", void 0);
    return Location;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the legends in charts.
 */
var LegendSettings = /** @class */ (function (_super) {
    __extends(LegendSettings, _super);
    function LegendSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], LegendSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LegendSettings.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LegendSettings.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ x: 0, y: 0 }, Location)
    ], LegendSettings.prototype, "location", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], LegendSettings.prototype, "position", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(8)
    ], LegendSettings.prototype, "padding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], LegendSettings.prototype, "alignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_model_theme__WEBPACK_IMPORTED_MODULE_3__["Theme"].legendLabelFont, _model_base__WEBPACK_IMPORTED_MODULE_2__["Font"])
    ], LegendSettings.prototype, "textStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], LegendSettings.prototype, "shapeHeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], LegendSettings.prototype, "shapeWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_base__WEBPACK_IMPORTED_MODULE_2__["Border"])
    ], LegendSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ left: 0, right: 0, top: 0, bottom: 0 }, _model_base__WEBPACK_IMPORTED_MODULE_2__["Margin"])
    ], LegendSettings.prototype, "margin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], LegendSettings.prototype, "shapePadding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('transparent')
    ], LegendSettings.prototype, "background", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], LegendSettings.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], LegendSettings.prototype, "toggleVisibility", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LegendSettings.prototype, "description", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], LegendSettings.prototype, "tabIndex", void 0);
    return LegendSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Legend base class for Chart and Accumulation chart.
 * @private
 */
var BaseLegend = /** @class */ (function () {
    /**
     * Constructor for the dateTime module.
     * @private
     */
    function BaseLegend(chart) {
        this.rowCount = 0; // legend row counts per page
        this.columnCount = 0; // legend column counts per page
        this.pageButtonSize = 8;
        this.pageXCollections = []; // pages of x locations
        this.maxColumns = 0;
        this.isTrimmed = false;
        this.maxWidth = 0;
        this.currentPage = 1;
        this.currentPageNumber = 1;
        this.legendRegions = [];
        this.pagingRegions = [];
        this.chart = chart;
        this.legend = chart.legendSettings;
        this.legendID = chart.element.id + '_chart_legend';
        this.isChartControl = (chart.getModuleName() === 'chart');
    }
    /**
     * Calculate the bounds for the legends.
     * @return {void}
     * @private
     */
    BaseLegend.prototype.calculateLegendBounds = function (rect, availableSize) {
        var legend = this.legend;
        this.getPosition(legend.position, availableSize);
        this.legendBounds = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](rect.x, rect.y, 0, 0);
        this.isVertical = (this.position === 'Left' || this.position === 'Right');
        if (this.isVertical) {
            this.legendBounds.height = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["stringToNumber"])(legend.height, availableSize.height - (rect.y - this.chart.margin.top)) || rect.height;
            this.legendBounds.width = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["stringToNumber"])(legend.width || '20%', availableSize.width);
        }
        else {
            this.legendBounds.width = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["stringToNumber"])(legend.width, availableSize.width) || rect.width;
            this.legendBounds.height = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["stringToNumber"])(legend.height || '20%', availableSize.height);
        }
        this.library.getLegendBounds(availableSize, this.legendBounds, legend);
        this.getLocation(this.position, legend.alignment, this.legendBounds, rect, availableSize);
    };
    /**
     * To find legend position based on available size for chart and accumulation chart
     */
    BaseLegend.prototype.getPosition = function (position, availableSize) {
        if (this.isChartControl) {
            this.position = (position !== 'Auto') ? position : 'Bottom';
        }
        else {
            if (position === 'Auto' && this.chart.visibleSeries &&
                (this.chart.visibleSeries[0].type === 'Funnel' || this.chart.visibleSeries[0].type === 'Pyramid')) {
                position = 'Top';
            }
            this.position = (position !== 'Auto') ? position :
                (availableSize.width > availableSize.height ? 'Right' : 'Bottom');
        }
    };
    /**
     * To set bounds for chart and accumulation chart
     */
    BaseLegend.prototype.setBounds = function (computedWidth, computedHeight, legend, legendBounds) {
        computedWidth = computedWidth < legendBounds.width ? computedWidth : legendBounds.width;
        computedHeight = computedHeight < legendBounds.height ? computedHeight : legendBounds.height;
        legendBounds.width = !legend.width ? computedWidth : legendBounds.width;
        legendBounds.height = !legend.height ? computedHeight : legendBounds.height;
        this.rowCount = Math.max(1, Math.ceil((legendBounds.height - legend.padding) / (this.maxItemHeight + legend.padding)));
    };
    /**
     * To find legend location based on position, alignment for chart and accumulation chart
     */
    BaseLegend.prototype.getLocation = function (position, alignment, legendBounds, rect, availableSize) {
        var padding = this.legend.border.width;
        var legendHeight = legendBounds.height + padding + this.legend.margin.top + this.legend.margin.bottom;
        var legendWidth = legendBounds.width + padding + this.legend.margin.left + this.legend.margin.right;
        var marginBottom = this.chart.margin.bottom;
        if (position === 'Bottom') {
            legendBounds.x = this.alignLegend(legendBounds.x, availableSize.width, legendBounds.width, alignment);
            legendBounds.y = rect.y + (rect.height - legendHeight) + padding + this.legend.margin.top;
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["subtractThickness"])(rect, new _utils_helper__WEBPACK_IMPORTED_MODULE_4__["Thickness"](0, 0, 0, legendHeight));
        }
        else if (position === 'Top') {
            legendBounds.x = this.alignLegend(legendBounds.x, availableSize.width, legendBounds.width, alignment);
            legendBounds.y = rect.y + padding + this.legend.margin.top;
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["subtractThickness"])(rect, new _utils_helper__WEBPACK_IMPORTED_MODULE_4__["Thickness"](0, 0, legendHeight, 0));
        }
        else if (position === 'Right') {
            legendBounds.x = rect.x + (rect.width - legendBounds.width) - this.legend.margin.right;
            legendBounds.y = rect.y + this.alignLegend(0, availableSize.height - (rect.y + marginBottom), legendBounds.height, alignment);
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["subtractThickness"])(rect, new _utils_helper__WEBPACK_IMPORTED_MODULE_4__["Thickness"](0, legendWidth, 0, 0));
        }
        else if (position === 'Left') {
            legendBounds.x = legendBounds.x + this.legend.margin.left;
            legendBounds.y = rect.y + this.alignLegend(0, availableSize.height - (rect.y + marginBottom), legendBounds.height, alignment);
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["subtractThickness"])(rect, new _utils_helper__WEBPACK_IMPORTED_MODULE_4__["Thickness"](legendWidth, 0, 0, 0));
        }
        else {
            legendBounds.x = this.legend.location.x;
            legendBounds.y = this.legend.location.y;
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["subtractThickness"])(rect, new _utils_helper__WEBPACK_IMPORTED_MODULE_4__["Thickness"](0, 0, 0, 0));
        }
    };
    /**
     * To find legend alignment for chart and accumulation chart
     */
    BaseLegend.prototype.alignLegend = function (start, size, legendSize, alignment) {
        switch (alignment) {
            case 'Far':
                start = (size - legendSize) - start;
                break;
            case 'Center':
                start = ((size - legendSize) / 2);
                break;
        }
        return start;
    };
    /**
     * Renders the legend.
     * @return {void}
     * @private
     */
    BaseLegend.prototype.renderLegend = function (chart, legend, legendBounds, redraw) {
        var firstLegend = this.findFirstLegendPosition(this.legendCollections);
        var padding = legend.padding;
        this.legendRegions = [];
        this.maxItemHeight = Math.max(this.legendCollections[0].textSize.height, legend.shapeHeight);
        var legendGroup = chart.renderer.createGroup({ id: this.legendID + '_g' });
        var legendTranslateGroup = this.createLegendElements(chart, legendBounds, legendGroup, legend, this.legendID, redraw);
        if (firstLegend !== this.legendCollections.length) {
            var legendSeriesGroup = void 0; // legendItem group for each series group element
            var start = void 0; // starting shape center x,y position && to resolve lint error used new line for declaration
            start = new _utils_helper__WEBPACK_IMPORTED_MODULE_4__["ChartLocation"](legendBounds.x + padding + (legend.shapeWidth / 2), legendBounds.y + padding + this.maxItemHeight / 2);
            var textOptions = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["TextOption"]('', start.x, start.y, 'start');
            //  initialization for totalPages legend click totalpage again calculate
            this.totalPages = this.isChartControl ? this.totalPages : 0;
            var textPadding = legend.shapePadding + padding + legend.shapeWidth;
            var count = 0;
            this.pageXCollections = [];
            this.legendCollections[firstLegend].location = start;
            var previousLegend = this.legendCollections[firstLegend];
            for (var _i = 0, _a = this.legendCollections; _i < _a.length; _i++) {
                var legendOption = _a[_i];
                if (this.chart.getModuleName() === 'accumulationchart') {
                    legendOption.fill = this.chart.visibleSeries[0].points[legendOption.pointIndex].color;
                }
                if (legendOption.render && legendOption.text !== '') {
                    legendSeriesGroup = chart.renderer.createGroup({
                        id: this.legendID + this.generateId(legendOption, '_g_', count)
                    });
                    if (legendSeriesGroup) {
                        legendSeriesGroup.setAttribute('tabindex', legend.tabIndex.toString());
                        legendSeriesGroup.setAttribute('aria-label', legend.description ||
                            'Click to show or hide the ' + legendOption.text + ' series');
                    }
                    this.library.getRenderPoint(legendOption, start, textPadding, previousLegend, legendBounds, count, firstLegend);
                    this.renderSymbol(legendOption, legendSeriesGroup, count);
                    this.renderText(chart, legendOption, legendSeriesGroup, textOptions, count);
                    if (legendSeriesGroup) {
                        legendSeriesGroup.setAttribute('style', 'cursor: ' + ((!legend.toggleVisibility && chart.selectionMode === 'None') ? 'auto' : 'pointer'));
                    }
                    if (legendTranslateGroup) {
                        legendTranslateGroup.appendChild(legendSeriesGroup);
                    }
                    previousLegend = legendOption;
                }
                count++;
            }
            if (this.isPaging) {
                this.renderPagingElements(chart, legendBounds, textOptions, legendGroup);
            }
            else {
                this.totalPages = 1;
            }
        }
        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["appendChildElement"])(chart.enableCanvas, chart.svgObject, legendGroup, redraw);
    };
    /**
     * To find first valid legend text index for chart and accumulation chart
     */
    BaseLegend.prototype.findFirstLegendPosition = function (legendCollection) {
        var count = 0;
        for (var _i = 0, legendCollection_1 = legendCollection; _i < legendCollection_1.length; _i++) {
            var legend = legendCollection_1[_i];
            if (legend.render && legend.text !== '') {
                break;
            }
            count++;
        }
        return count;
    };
    /**
     * To create legend rendering elements for chart and accumulation chart
     */
    BaseLegend.prototype.createLegendElements = function (chart, legendBounds, legendGroup, legend, id, redraw) {
        var padding = legend.padding;
        var options = new _utils_helper__WEBPACK_IMPORTED_MODULE_4__["RectOption"](id + '_element', legend.background, legend.border, legend.opacity, legendBounds);
        legendGroup ? legendGroup.appendChild(chart.renderer.drawRectangle(options)) : chart.renderer.drawRectangle(options);
        var legendItemsGroup = chart.renderer.createGroup({ id: id + '_collections' });
        var isCanvas = chart.enableCanvas;
        if (!isCanvas) {
            legendGroup.appendChild(legendItemsGroup);
        }
        this.legendTranslateGroup = chart.renderer.createGroup({ id: id + '_translate_g' });
        if (!isCanvas) {
            legendItemsGroup.appendChild(this.legendTranslateGroup);
        }
        var clippath = chart.renderer.createClipPath({ id: id + '_clipPath' });
        options.y += padding;
        options.id += '_clipPath_rect';
        options.width = (!this.isChartControl && this.isVertical) ? this.maxWidth - padding : legendBounds.width;
        if (!isCanvas) {
            this.clipRect = chart.renderer.drawRectangle(options);
            clippath.appendChild(this.clipRect);
        }
        else {
            this.pagingClipRect = options;
        }
        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["appendChildElement"])(isCanvas, chart.svgObject, clippath, redraw);
        if (!isCanvas) {
            legendItemsGroup.setAttribute('style', 'clip-path:url(#' + clippath.id + ')');
        }
        return this.legendTranslateGroup;
    };
    /**
     * To render legend symbols for chart and accumulation chart
     */
    BaseLegend.prototype.renderSymbol = function (legendOption, group, i) {
        var symbolColor = legendOption.visible ? legendOption.fill : '#D3D3D3';
        var shape = (legendOption.shape === 'SeriesType') ? legendOption.type : legendOption.shape;
        shape = shape === 'Scatter' ? legendOption.markerShape : shape;
        var isStrokeWidth = (this.chart.getModuleName() === 'chart' && (legendOption.shape === 'SeriesType') &&
            (legendOption.type.toLowerCase().indexOf('line') > -1) && (legendOption.type.toLowerCase().indexOf('area') === -1));
        var strokewidth = isStrokeWidth ? this.chart.visibleSeries[i].width : 1;
        var symbolOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](this.legendID + this.generateId(legendOption, '_shape_', i), symbolColor, strokewidth, symbolColor, 1, '', '');
        var regionPadding;
        var isCanvas = this.chart.enableCanvas;
        if (!isCanvas) {
            group.appendChild(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["drawSymbol"])(legendOption.location, shape, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](this.legend.shapeWidth, this.legend.shapeHeight), '', symbolOption, 'Click to show or hide the ' + legendOption.text + ' series', this.chart.renderer));
        }
        else {
            regionPadding = -this.translatePage(null, this.currentPageNumber - 1, this.currentPageNumber);
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["drawSymbol"])(legendOption.location, shape, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](this.legend.shapeWidth, this.legend.shapeHeight), '', symbolOption, 'Click to show or hide the ' + legendOption.text + ' series', this.chart.renderer, this.currentPageNumber ? new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](0, regionPadding, 0, 0) : null);
            this.legendRegions.push({ rect: new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](legendOption.location.x, legendOption.location.y, this.legend.shapeWidth, this.legend.shapeHeight + regionPadding), index: i });
        }
        if (shape === 'Line' && legendOption.markerVisibility && legendOption.markerShape !== 'Image' ||
            legendOption.type === 'Doughnut') {
            symbolOption.id = this.legendID + this.generateId(legendOption, '_shape_marker_', i);
            shape = legendOption.type === 'Doughnut' ? 'Circle' : legendOption.markerShape;
            symbolOption.fill = legendOption.type === 'Doughnut' ? '#FFFFFF' : symbolOption.fill;
            if (!isCanvas) {
                group.appendChild(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["drawSymbol"])(legendOption.location, shape, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](this.legend.shapeWidth / 2, this.legend.shapeHeight / 2), '', symbolOption, 'Click to show or hide the ' + legendOption.text + ' series'));
            }
            else {
                Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["drawSymbol"])(legendOption.location, shape, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](this.legend.shapeWidth / 2, this.legend.shapeHeight / 2), '', symbolOption, 'Click to show or hide the ' + legendOption.text + ' series', this.chart.renderer, this.currentPageNumber ?
                    new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](0, -this.translatePage(null, this.currentPageNumber - 1, this.currentPageNumber), 0, 0) : null);
            }
        }
    };
    /**
     * To render legend text for chart and accumulation chart
     */
    BaseLegend.prototype.renderText = function (chart, legendOption, group, textOptions, i) {
        var legend = chart.legendSettings;
        var hiddenColor = '#D3D3D3';
        textOptions.id = this.legendID + this.generateId(legendOption, '_text_', i);
        var fontcolor = legendOption.visible ? legend.textStyle.color || chart.themeStyle.legendLabel : hiddenColor;
        textOptions.text = legendOption.text;
        textOptions.x = legendOption.location.x + (legend.shapeWidth / 2) + legend.shapePadding;
        textOptions.y = legendOption.location.y + this.maxItemHeight / 4;
        var isCanvas = this.chart.enableCanvas;
        var element = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["textElement"])(chart.renderer, textOptions, legend.textStyle, fontcolor, group, false, false, false, false, null, this.currentPageNumber && isCanvas ?
            new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](0, -this.translatePage(null, this.currentPageNumber - 1, this.currentPageNumber), 0, 0) : null);
        if (element) {
            element.setAttribute('aria-label', legend.description || 'Click to show or hide the ' + legendOption.text + ' series');
        }
        if (isCanvas) {
            var textSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["measureText"])(textOptions.text, legend.textStyle);
            this.legendRegions[i].rect.y = textOptions.y < this.legendRegions[i].rect.y ? textOptions.y : this.legendRegions[i].rect.y;
            this.legendRegions[i].rect.width += textSize.width;
            this.legendRegions[i].rect.height = textSize.height;
            this.legendRegions[i].rect.y -= textSize.height * 0.5;
        }
    };
    /**
     * To render legend paging elements for chart and accumulation chart
     */
    BaseLegend.prototype.renderPagingElements = function (chart, bounds, textOption, legendGroup) {
        var paginggroup = chart.renderer.createGroup({ id: this.legendID + '_navigation' });
        this.pagingRegions = [];
        var isCanvas = chart.enableCanvas;
        if (!isCanvas) {
            legendGroup.appendChild(paginggroup);
        }
        var grayColor = '#545454';
        var legend = chart.legendSettings; // to solve parameter lint error, legend declaration is here
        var padding = 8; // const padding for paging elements
        if (this.isChartControl || !this.isVertical) {
            this.totalPages = Math.ceil(this.totalPages / Math.max(1, this.rowCount - 1));
        }
        else {
            this.totalPages = Math.ceil(this.totalPages / this.maxColumns);
        }
        var symbolOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](this.legendID + '_pageup', 'transparent', 5, grayColor, 1, '', '');
        var iconSize = this.pageButtonSize;
        if (paginggroup) {
            paginggroup.setAttribute('style', 'cursor: pointer');
        }
        // Page left arrow drawing calculation started here
        this.clipPathHeight = (this.rowCount - 1) * (this.maxItemHeight + legend.padding);
        if (!isCanvas) {
            this.clipRect.setAttribute('height', this.clipPathHeight.toString());
        }
        else {
            //paging clipRect only for canvas mode
            this.pagingClipRect.height = this.legendBounds.height - this.clipPathHeight -
                (this.pagingClipRect.y - this.legendBounds.y) - legend.border.width;
            this.pagingClipRect.y = this.pagingClipRect.y + this.clipPathHeight;
            this.pagingClipRect.x += legend.border.width;
            this.pagingClipRect.width -= (legend.border.width + legend.border.width / 2);
            this.chart.renderer.clearRect(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](this.pagingClipRect.x, this.pagingClipRect.y, this.pagingClipRect.width, this.pagingClipRect.height));
        }
        var x = bounds.x + iconSize / 2;
        var y = bounds.y + this.clipPathHeight + ((bounds.height - this.clipPathHeight) / 2);
        var size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["measureText"])(this.totalPages + '/' + this.totalPages, legend.textStyle);
        if (!isCanvas) {
            paginggroup.appendChild(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["drawSymbol"])({ x: x, y: y }, 'LeftArrow', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](iconSize, iconSize), '', symbolOption, 'LeftArrow'));
        }
        else {
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["drawSymbol"])({ x: x, y: y }, 'LeftArrow', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](iconSize, iconSize), '', symbolOption, 'LeftArrow', this.chart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](bounds.width - (2 * (iconSize + padding) + padding + size.width), 0, 0, 0));
        }
        this.pagingRegions.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](x + bounds.width - (2 * (iconSize + padding) + padding + size.width) - iconSize * 0.5, y - iconSize * 0.5, iconSize, iconSize));
        // Page numbering rendering calculation started here
        textOption.x = x + (iconSize / 2) + padding;
        textOption.y = y + (size.height / 4);
        textOption.id = this.legendID + '_pagenumber';
        textOption.text = '1/' + this.totalPages;
        if (isCanvas && this.totalNoOfPages) {
            textOption.text = this.currentPageNumber + '/' + this.totalNoOfPages;
        }
        var pageTextElement = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["textElement"])(chart.renderer, textOption, legend.textStyle, legend.textStyle.color, paginggroup, false, false, false, false, null, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](bounds.width - (2 * (iconSize + padding) + padding + size.width), 0, 0, 0));
        // Page right arrow rendering calculation started here
        x = (textOption.x + padding + (iconSize / 2) + size.width);
        symbolOption.id = this.legendID + '_pagedown';
        if (!isCanvas) {
            paginggroup.appendChild(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["drawSymbol"])({ x: x, y: y }, 'RightArrow', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](iconSize, iconSize), '', symbolOption, 'RightArrow'));
        }
        else {
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["drawSymbol"])({ x: x, y: y }, 'RightArrow', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](iconSize, iconSize), '', symbolOption, 'RightArrow', this.chart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](bounds.width - (2 * (iconSize + padding) + padding + size.width), 0, 0, 0));
        }
        this.pagingRegions.push(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](x + (bounds.width - (2 * (iconSize + padding) + padding + size.width) - iconSize * 0.5), y - iconSize * 0.5, iconSize, iconSize));
        if (!isCanvas) {
            //placing the navigation buttons and page numbering in legend right corner
            paginggroup.setAttribute('transform', 'translate(' + (bounds.width - (2 * (iconSize + padding) +
                padding + size.width)) + ', ' + 0 + ')');
        }
        else {
            if (this.currentPageNumber === 1 && this.calTotalPage) {
                this.totalNoOfPages = this.totalPages;
                this.calTotalPage = false;
            }
        }
        this.translatePage(pageTextElement, this.currentPage - 1, this.currentPage);
    };
    /**
     * To translate legend pages for chart and accumulation chart
     */
    BaseLegend.prototype.translatePage = function (pagingText, page, pageNumber) {
        var size = (this.clipPathHeight) * page;
        var translate = 'translate(0,-' + size + ')';
        if (!this.isChartControl && this.isVertical) {
            var pageLength = page * this.maxColumns;
            size = this.pageXCollections[page * this.maxColumns] - this.legendBounds.x;
            size = size < 0 ? 0 : size; // to avoid small pixel variation
            translate = 'translate(-' + size + ',0)';
        }
        if (!this.chart.enableCanvas) {
            this.legendTranslateGroup.setAttribute('transform', translate);
        }
        if (!this.chart.enableCanvas) {
            pagingText.textContent = (pageNumber) + '/' + this.totalPages;
        }
        this.currentPage = pageNumber;
        return size;
    };
    /**
     * To change legend pages for chart and accumulation chart
     */
    BaseLegend.prototype.changePage = function (event, pageUp) {
        var pageText = document.getElementById(this.legendID + '_pagenumber');
        var page = parseInt(pageText.textContent.split('/')[0], 10);
        if (pageUp && page > 1) {
            this.translatePage(pageText, (page - 2), (page - 1));
        }
        else if (!pageUp && page < this.totalPages) {
            this.translatePage(pageText, page, (page + 1));
        }
    };
    /**
     * To find legend elements id based on chart or accumulation chart
     * @private
     */
    BaseLegend.prototype.generateId = function (option, prefix, count) {
        if (this.isChartControl) {
            return prefix + count;
        }
        else {
            return prefix + option.pointIndex;
        }
    };
    /**
     * To show or hide trimmed text tooltip for legend.
     * @return {void}
     * @private
     */
    BaseLegend.prototype.move = function (event) {
        var _this = this;
        var x = this.chart.mouseX;
        var y = this.chart.mouseY;
        if (event.target.textContent.indexOf('...') > -1) {
            var targetId = event.target.id.split(this.legendID + '_text_');
            if (targetId.length === 2) {
                var index = parseInt(targetId[1], 10);
                var element = this.chart.element;
                if (!isNaN(index)) {
                    if (this.chart.isTouch) {
                        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["removeElement"])(this.chart.element.id + '_EJ2_Legend_Tooltip');
                    }
                    if (this.isChartControl) {
                        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["showTooltip"])(this.chart.series[index].name, x, y, element.offsetWidth, element.id + '_EJ2_Legend_Tooltip', Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["getElement"])(this.chart.element.id + '_Secondary_Element'));
                    }
                    else {
                        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["showTooltip"])(this.chart.visibleSeries[0].points[index].x.toString(), x + 10, y + 10, element.offsetWidth, element.id + '_EJ2_Legend_Tooltip', Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["getElement"])(this.chart.element.id + '_Secondary_Element'));
                    }
                }
            }
        }
        else {
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["removeElement"])(this.chart.element.id + '_EJ2_Legend_Tooltip');
        }
        if (this.chart.isTouch) {
            clearTimeout(this.clearTooltip);
            this.clearTooltip = setTimeout(function () { Object(_utils_helper__WEBPACK_IMPORTED_MODULE_4__["removeElement"])(_this.chart.element.id + '_EJ2_Legend_Tooltip'); }, 1000);
        }
    };
    return BaseLegend;
}());

/**
 * Class for legend options
 * @private
 */
var LegendOptions = /** @class */ (function () {
    function LegendOptions(text, fill, shape, visible, type, markerShape, markerVisibility, pointIndex, seriesIndex) {
        this.location = { x: 0, y: 0 };
        this.text = text;
        this.fill = fill;
        this.shape = shape;
        this.visible = visible;
        this.type = type;
        this.markerVisibility = markerVisibility;
        this.markerShape = markerShape;
        this.pointIndex = pointIndex;
        this.seriesIndex = seriesIndex;
    }
    return LegendOptions;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/model/base.js ***!
  \**********************************************************************/
/*! exports provided: Connector, Font, Border, ChartArea, Margin, Animation, Indexes, CornerRadius, Index, EmptyPointSettings, DragSettings, TooltipSettings, Periods, PeriodSelectorSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Connector", function() { return Connector; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Font", function() { return Font; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Border", function() { return Border; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartArea", function() { return ChartArea; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Margin", function() { return Margin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return Animation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Indexes", function() { return Indexes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CornerRadius", function() { return CornerRadius; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Index", function() { return Index; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyPointSettings", function() { return EmptyPointSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragSettings", function() { return DragSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipSettings", function() { return TooltipSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Periods", function() { return Periods; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeriodSelectorSettings", function() { return PeriodSelectorSettings; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _model_theme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};


/**
 * Defines the appearance of the connectors
 */
var Connector = /** @class */ (function (_super) {
    __extends(Connector, _super);
    function Connector() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Line')
    ], Connector.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Connector.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Connector.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Connector.prototype, "length", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Connector.prototype, "dashArray", void 0);
    return Connector;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the fonts in charts.
 */
var Font = /** @class */ (function (_super) {
    __extends(Font, _super);
    function Font() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Normal')
    ], Font.prototype, "fontStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('16px')
    ], Font.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Normal')
    ], Font.prototype, "fontWeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Font.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], Font.prototype, "textAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Segoe UI')
    ], Font.prototype, "fontFamily", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Font.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Trim')
    ], Font.prototype, "textOverflow", void 0);
    return Font;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the borders in the chart.
 */
var Border = /** @class */ (function (_super) {
    __extends(Border, _super);
    function Border() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Border.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Border.prototype, "width", void 0);
    return Border;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the chart area.
 */
var ChartArea = /** @class */ (function (_super) {
    __extends(ChartArea, _super);
    function ChartArea() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, Border)
    ], ChartArea.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('transparent')
    ], ChartArea.prototype, "background", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], ChartArea.prototype, "opacity", void 0);
    return ChartArea;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the chart margins.
 */
var Margin = /** @class */ (function (_super) {
    __extends(Margin, _super);
    function Margin() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], Margin.prototype, "left", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], Margin.prototype, "right", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], Margin.prototype, "top", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], Margin.prototype, "bottom", void 0);
    return Margin;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the animation behavior for chart series.
 */
var Animation = /** @class */ (function (_super) {
    __extends(Animation, _super);
    function Animation() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Animation.prototype, "enable", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)
    ], Animation.prototype, "duration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Animation.prototype, "delay", void 0);
    return Animation;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Series and point index
 * @public
 */
var Indexes = /** @class */ (function (_super) {
    __extends(Indexes, _super);
    function Indexes() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Indexes.prototype, "series", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Indexes.prototype, "point", void 0);
    return Indexes;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Column series rounded corner options
 */
var CornerRadius = /** @class */ (function (_super) {
    __extends(CornerRadius, _super);
    function CornerRadius() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], CornerRadius.prototype, "topLeft", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], CornerRadius.prototype, "topRight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], CornerRadius.prototype, "bottomLeft", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], CornerRadius.prototype, "bottomRight", void 0);
    return CornerRadius;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * @private
 */
var Index = /** @class */ (function () {
    function Index(seriesIndex, pointIndex) {
        this.series = seriesIndex;
        this.point = pointIndex;
    }
    return Index;
}());

/**
 * Configures the Empty Points of series
 */
var EmptyPointSettings = /** @class */ (function (_super) {
    __extends(EmptyPointSettings, _super);
    function EmptyPointSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], EmptyPointSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'transparent', width: 0 }, Border)
    ], EmptyPointSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Gap')
    ], EmptyPointSettings.prototype, "mode", void 0);
    return EmptyPointSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the drag settings of series
 */
var DragSettings = /** @class */ (function (_super) {
    __extends(DragSettings, _super);
    function DragSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DragSettings.prototype, "enable", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DragSettings.prototype, "minY", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DragSettings.prototype, "maxY", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DragSettings.prototype, "fill", void 0);
    return DragSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the ToolTips in the chart.
 * @public
 */
var TooltipSettings = /** @class */ (function (_super) {
    __extends(TooltipSettings, _super);
    function TooltipSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TooltipSettings.prototype, "enable", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TooltipSettings.prototype, "enableMarker", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TooltipSettings.prototype, "shared", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TooltipSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TooltipSettings.prototype, "header", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0.75)
    ], TooltipSettings.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_model_theme__WEBPACK_IMPORTED_MODULE_1__["Theme"].tooltipLabelFont, Font)
    ], TooltipSettings.prototype, "textStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TooltipSettings.prototype, "format", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TooltipSettings.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TooltipSettings.prototype, "enableAnimation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#cccccc', width: 0.5 }, Border)
    ], TooltipSettings.prototype, "border", void 0);
    return TooltipSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * button settings in period selector
 */
var Periods = /** @class */ (function (_super) {
    __extends(Periods, _super);
    function Periods() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Years')
    ], Periods.prototype, "intervalType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Periods.prototype, "interval", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Periods.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Periods.prototype, "selected", void 0);
    return Periods;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Period Selector Settings
 */
var PeriodSelectorSettings = /** @class */ (function (_super) {
    __extends(PeriodSelectorSettings, _super);
    function PeriodSelectorSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(43)
    ], PeriodSelectorSettings.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Bottom')
    ], PeriodSelectorSettings.prototype, "position", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], Periods)
    ], PeriodSelectorSettings.prototype, "periods", void 0);
    return PeriodSelectorSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js ***!
  \***************************************************************************/
/*! exports provided: loaded, legendClick, load, animationComplete, legendRender, textRender, pointRender, seriesRender, axisLabelRender, axisRangeCalculated, axisMultiLabelRender, tooltipRender, chartMouseMove, chartMouseClick, pointClick, pointMove, chartMouseLeave, chartMouseDown, chartMouseUp, zoomComplete, dragComplete, resized, beforePrint, annotationRender, scrollStart, scrollEnd, scrollChanged, stockEventRender, multiLevelLabelClick, dragStart, drag, dragEnd */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loaded", function() { return loaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "legendClick", function() { return legendClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "load", function() { return load; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationComplete", function() { return animationComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "legendRender", function() { return legendRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textRender", function() { return textRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pointRender", function() { return pointRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "seriesRender", function() { return seriesRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisLabelRender", function() { return axisLabelRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisRangeCalculated", function() { return axisRangeCalculated; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisMultiLabelRender", function() { return axisMultiLabelRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tooltipRender", function() { return tooltipRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chartMouseMove", function() { return chartMouseMove; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chartMouseClick", function() { return chartMouseClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pointClick", function() { return pointClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pointMove", function() { return pointMove; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chartMouseLeave", function() { return chartMouseLeave; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chartMouseDown", function() { return chartMouseDown; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chartMouseUp", function() { return chartMouseUp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zoomComplete", function() { return zoomComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dragComplete", function() { return dragComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resized", function() { return resized; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforePrint", function() { return beforePrint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "annotationRender", function() { return annotationRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollStart", function() { return scrollStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollEnd", function() { return scrollEnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollChanged", function() { return scrollChanged; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stockEventRender", function() { return stockEventRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiLevelLabelClick", function() { return multiLevelLabelClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dragStart", function() { return dragStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return drag; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dragEnd", function() { return dragEnd; });
/**
 * Specifies the chart constant value
 */
/** @private */
var loaded = 'loaded';
/** @private */
var legendClick = 'legendClick';
/** @private */
var load = 'load';
/** @private */
var animationComplete = 'animationComplete';
/** @private */
var legendRender = 'legendRender';
/** @private */
var textRender = 'textRender';
/** @private */
var pointRender = 'pointRender';
/** @private */
var seriesRender = 'seriesRender';
/** @private */
var axisLabelRender = 'axisLabelRender';
/** @private */
var axisRangeCalculated = 'axisRangeCalculated';
/** @private */
var axisMultiLabelRender = 'axisMultiLabelRender';
/** @private */
var tooltipRender = 'tooltipRender';
/** @private */
var chartMouseMove = 'chartMouseMove';
/** @private */
var chartMouseClick = 'chartMouseClick';
/** @private */
var pointClick = 'pointClick';
/** @private */
var pointMove = 'pointMove';
/** @private */
var chartMouseLeave = 'chartMouseLeave';
/** @private */
var chartMouseDown = 'chartMouseDown';
/** @private */
var chartMouseUp = 'chartMouseUp';
/** @private */
var zoomComplete = 'zoomComplete';
/** @private */
var dragComplete = 'dragComplete';
/** @private */
var resized = 'resized';
/** @private */
var beforePrint = 'beforePrint';
/** @private */
var annotationRender = 'annotationRender';
/** @private */
var scrollStart = 'scrollStart';
/** @private */
var scrollEnd = 'scrollEnd';
/** @private */
var scrollChanged = 'scrollChanged';
/** @private */
var stockEventRender = 'stockEventRender';
/** @private */
var multiLevelLabelClick = 'multiLevelLabelClick';
/** @private */
var dragStart = 'dragStart';
/** @private */
var drag = 'drag';
/** @private */
var dragEnd = 'dragEnd';


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/model/data.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/model/data.js ***!
  \**********************************************************************/
/*! exports provided: Data */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Data", function() { return Data; });
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");

/**
 * data module is used to generate query and dataSource
 */
var Data = /** @class */ (function () {
    /**
     * Constructor for data module
     * @private
     */
    function Data(dataSource, query) {
        this.initDataManager(dataSource, query);
    }
    /**
     * The function used to initialize dataManager and query
     * @return {void}
     * @private
     */
    Data.prototype.initDataManager = function (dataSource, query) {
        this.dataManager = dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_0__["DataManager"] ? dataSource : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_0__["DataManager"](dataSource);
        this.query = query instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_0__["Query"] ? query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_0__["Query"]();
    };
    /**
     * The function used to generate updated Query from chart model
     * @return {void}
     * @private
     */
    Data.prototype.generateQuery = function () {
        var query = this.query.clone();
        return query;
    };
    /**
     * The function used to get dataSource by executing given Query
     * @param  {Query} query - A Query that specifies to generate dataSource
     * @return {void}
     * @private
     */
    Data.prototype.getData = function (query) {
        return this.dataManager.executeQuery(query);
    };
    return Data;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js ***!
  \***********************************************************************/
/*! exports provided: Theme, getSeriesColor, getThemeColor, getScrollbarThemeColor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Theme", function() { return Theme; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSeriesColor", function() { return getSeriesColor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeColor", function() { return getThemeColor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScrollbarThemeColor", function() { return getScrollbarThemeColor; });
/**
 * Specifies Chart Themes
 */
var Theme;
(function (Theme) {
    /** @private */
    Theme.axisLabelFont = {
        size: '12px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
    /** @private */
    Theme.axisTitleFont = {
        size: '14px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
    /** @private */
    Theme.chartTitleFont = {
        size: '15px',
        fontWeight: '500',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
    /** @private */
    Theme.chartSubTitleFont = {
        size: '11px',
        fontWeight: '500',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
    /** @private */
    Theme.crosshairLabelFont = {
        size: '13px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
    /** @private */
    Theme.tooltipLabelFont = {
        size: '13px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
    /** @private */
    Theme.legendLabelFont = {
        size: '13px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
    /** @private */
    Theme.stripLineLabelFont = {
        size: '12px',
        fontWeight: 'Regular',
        color: '#353535',
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
    /** @private */
    Theme.stockEventFont = {
        size: '13px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
})(Theme || (Theme = {}));
/** @private */
function getSeriesColor(theme) {
    var palette;
    switch (theme) {
        case 'Fabric':
            palette = ['#4472c4', '#ed7d31', '#ffc000', '#70ad47', '#5b9bd5',
                '#c1c1c1', '#6f6fe2', '#e269ae', '#9e480e', '#997300'];
            break;
        case 'Bootstrap4':
            palette = ['#a16ee5', '#f7ce69', '#55a5c2', '#7ddf1e', '#ff6ea6',
                '#7953ac', '#b99b4f', '#407c92', '#5ea716', '#b91c52'];
            break;
        case 'Bootstrap':
            palette = ['#a16ee5', '#f7ce69', '#55a5c2', '#7ddf1e', '#ff6ea6',
                '#7953ac', '#b99b4f', '#407c92', '#5ea716', '#b91c52'];
            break;
        case 'HighContrastLight':
        case 'Highcontrast':
        case 'HighContrast':
            palette = ['#79ECE4', '#E98272', '#DFE6B6', '#C6E773', '#BA98FF',
                '#FA83C3', '#00C27A', '#43ACEF', '#D681EF', '#D8BC6E'];
            break;
        case 'MaterialDark':
            palette = ['#00bdae', '#404041', '#357cd2', '#e56590', '#f8b883',
                '#70ad47', '#dd8abd', '#7f84e8', '#7bb4eb', '#ea7a57'];
            break;
        case 'FabricDark':
            palette = ['#4472c4', '#ed7d31', '#ffc000', '#70ad47', '#5b9bd5',
                '#c1c1c1', '#6f6fe2', '#e269ae', '#9e480e', '#997300'];
            break;
        case 'BootstrapDark':
            palette = ['#a16ee5', '#f7ce69', '#55a5c2', '#7ddf1e', '#ff6ea6',
                '#7953ac', '#b99b4f', '#407c92', '#5ea716', '#b91c52'];
            break;
        // palette = ['#B586FF', '#71F9A3', '#FF9572', '#5BD5FF', '#F9F871',
        //     '#B6F971', '#8D71F9', '#FF6F91', '#FFC75F', '#D55DB1'];
        // break;
        default:
            palette = ['#00bdae', '#404041', '#357cd2', '#e56590', '#f8b883',
                '#70ad47', '#dd8abd', '#7f84e8', '#7bb4eb', '#ea7a57'];
            break;
    }
    return palette;
}
/** @private */
function getThemeColor(theme) {
    var style;
    var darkBackground = theme === 'MaterialDark' ? '#303030' : (theme === 'FabricDark' ? '#201F1F' : '1A1A1A');
    switch (theme) {
        case 'HighContrastLight':
        case 'Highcontrast':
        case 'HighContrast':
            style = {
                axisLabel: '#ffffff',
                axisTitle: '#ffffff',
                axisLine: '#ffffff',
                majorGridLine: '#BFBFBF',
                minorGridLine: '#969696',
                majorTickLine: '#BFBFBF',
                minorTickLine: '#969696',
                chartTitle: '#ffffff',
                legendLabel: '#ffffff',
                background: '#000000',
                areaBorder: '#ffffff',
                errorBar: '#ffffff',
                crosshairLine: '#ffffff',
                crosshairFill: '#ffffff',
                crosshairLabel: '#000000',
                tooltipFill: '#ffffff',
                tooltipBoldLabel: '#000000',
                tooltipLightLabel: '#000000',
                tooltipHeaderLine: '#969696',
                markerShadow: '#BFBFBF',
                selectionRectFill: 'rgba(255, 217, 57, 0.3)',
                selectionRectStroke: '#ffffff',
                selectionCircleStroke: '#FFD939'
            };
            break;
        case 'MaterialDark':
        case 'FabricDark':
        case 'BootstrapDark':
            style = {
                axisLabel: '#DADADA', axisTitle: '#ffffff',
                axisLine: ' #6F6C6C',
                majorGridLine: '#414040',
                minorGridLine: '#514F4F',
                majorTickLine: '#414040',
                minorTickLine: ' #4A4848',
                chartTitle: '#ffffff',
                legendLabel: '#DADADA',
                background: darkBackground,
                areaBorder: ' #9A9A9A',
                errorBar: '#ffffff',
                crosshairLine: '#F4F4F4',
                crosshairFill: '#F4F4F4',
                crosshairLabel: '#282727',
                tooltipFill: '#F4F4F4',
                tooltipBoldLabel: '#282727',
                tooltipLightLabel: '#333232',
                tooltipHeaderLine: '#9A9A9A',
                markerShadow: null,
                selectionRectFill: 'rgba(56,169,255, 0.1)',
                selectionRectStroke: '#38A9FF',
                selectionCircleStroke: '#282727'
            };
            break;
        case 'Bootstrap4':
            style = {
                axisLabel: '#212529', axisTitle: '#ffffff', axisLine: '#CED4DA', majorGridLine: '#CED4DA',
                minorGridLine: '#DEE2E6', majorTickLine: '#ADB5BD', minorTickLine: '#CED4DA', chartTitle: '#212529', legendLabel: '#212529',
                background: '#FFFFFF', areaBorder: '#DEE2E6', errorBar: '#000000', crosshairLine: '#6C757D', crosshairFill: '#495057',
                crosshairLabel: '#FFFFFF', tooltipFill: 'rgba(0, 0, 0, 0.9)', tooltipBoldLabel: 'rgba(255,255,255)',
                tooltipLightLabel: 'rgba(255,255,255, 0.9)', tooltipHeaderLine: 'rgba(255,255,255, 0.2)', markerShadow: null,
                selectionRectFill: 'rgba(255,255,255, 0.1)', selectionRectStroke: 'rgba(0, 123, 255)', selectionCircleStroke: '#495057'
            };
            break;
        default:
            style = {
                axisLabel: '#686868',
                axisTitle: '#424242',
                axisLine: '#b5b5b5',
                majorGridLine: '#dbdbdb',
                minorGridLine: '#eaeaea',
                majorTickLine: '#b5b5b5',
                minorTickLine: '#d6d6d6',
                chartTitle: '#424242',
                legendLabel: '#353535',
                background: '#FFFFFF',
                areaBorder: 'Gray',
                errorBar: '#000000',
                crosshairLine: '#4f4f4f',
                crosshairFill: '#4f4f4f',
                crosshairLabel: '#e5e5e5',
                tooltipFill: 'rgba(0, 8, 22, 0.75)',
                tooltipBoldLabel: '#ffffff',
                tooltipLightLabel: '#dbdbdb',
                tooltipHeaderLine: '#ffffff',
                markerShadow: null,
                selectionRectFill: 'rgba(41, 171, 226, 0.1)',
                selectionRectStroke: '#29abe2',
                selectionCircleStroke: '#29abe2'
            };
            break;
    }
    return style;
}
/** @private */
function getScrollbarThemeColor(theme) {
    var scrollStyle;
    switch (theme) {
        case 'HighContrastLight':
            scrollStyle = {
                backRect: '#333',
                thumb: '#bfbfbf',
                circle: '#fff',
                circleHover: '#685708',
                arrow: '#333',
                grip: '#333',
                arrowHover: '#fff',
                backRectBorder: '#969696',
            };
            break;
        case 'Bootstrap':
            scrollStyle = {
                backRect: '#f5f5f5',
                thumb: '#e6e6e6',
                circle: '#fff',
                circleHover: '#eee',
                arrow: '#8c8c8c',
                grip: '#8c8c8c'
            };
            break;
        case 'Fabric':
            scrollStyle = {
                backRect: '#f8f8f8',
                thumb: '#eaeaea',
                circle: '#fff',
                circleHover: '#eaeaea',
                arrow: '#a6a6a6',
                grip: '#a6a6a6'
            };
            break;
        default:
            scrollStyle = {
                backRect: '#f5f5f5',
                thumb: '#e0e0e0',
                circle: '#fff',
                circleHover: '#eee',
                arrow: '#9e9e9e',
                grip: '#9e9e9e'
            };
            break;
    }
    return scrollStyle;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/period-selector/period-selector.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/period-selector/period-selector.js ***!
  \*******************************************************************************************/
/*! exports provided: PeriodSelector */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeriodSelector", function() { return PeriodSelector; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-navigations */ "./node_modules/@syncfusion/ej2-navigations/index.js");
/* harmony import */ var _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-calendars */ "./node_modules/@syncfusion/ej2-calendars/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");





/**
 * Period selector class
 */
var PeriodSelector = /** @class */ (function () {
    //constructor for period selector
    function PeriodSelector(control) {
        this.control = {};
        this.rootControl = control;
    }
    /**
     * To set the control values
     * @param control
     */
    PeriodSelector.prototype.setControlValues = function (control) {
        if (control.getModuleName() === 'rangeNavigator') {
            this.control.periods = this.rootControl.periodSelectorSettings.periods;
            this.control.seriesXMax = control.chartSeries.xMax;
            this.control.seriesXMin = control.chartSeries.xMin;
            this.control.rangeSlider = control.rangeSlider;
            this.control.rangeNavigatorControl = control;
            this.control.endValue = control.endValue;
            this.control.startValue = control.startValue;
        }
        else {
            this.control.periods = this.rootControl.periods;
            this.control.endValue = this.control.seriesXMax = control.seriesXMax;
            this.control.startValue = this.control.seriesXMin = control.seriesXMin;
            this.control.rangeNavigatorControl = this.rootControl.rangeNavigator;
            if (this.control.rangeNavigatorControl) {
                this.control.rangeSlider = this.rootControl.rangeNavigator.rangeSlider;
            }
        }
        this.control.element = control.element;
        this.control.disableRangeSelector = control.disableRangeSelector;
    };
    /**
     *  To initialize the period selector properties
     */
    PeriodSelector.prototype.appendSelector = function (options, x) {
        if (x === void 0) { x = 0; }
        this.renderSelectorElement(null, options, x);
        this.renderSelector();
    };
    /**
     * renderSelector div
     * @param control
     */
    PeriodSelector.prototype.renderSelectorElement = function (control, options, x) {
        //render border
        this.periodSelectorSize = control ? this.periodSelectorSize : new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](x, this.rootControl.titleSize.height, options.width, options.height);
        var thumbSize;
        var element;
        if (control) {
            thumbSize = control.themeStyle.thumbWidth;
            element = control.element;
        }
        else {
            thumbSize = options.thumbSize;
            element = options.element;
        }
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(element.id + '_Secondary_Element')) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(element.id + '_Secondary_Element'));
        }
        this.periodSelectorDiv = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            id: element.id + '_Secondary_Element',
            styles: 'width: ' + (this.periodSelectorSize.width - thumbSize) + 'px;height: ' +
                this.periodSelectorSize.height + 'px;top:' +
                this.periodSelectorSize.y + 'px;left:' +
                (this.periodSelectorSize.x + thumbSize / 2) + 'px; position: absolute'
        });
        element.appendChild(this.periodSelectorDiv);
    };
    /**
     * renderSelector elements
     */
    // tslint:disable-next-line:max-func-body-length
    PeriodSelector.prototype.renderSelector = function () {
        var _this = this;
        this.setControlValues(this.rootControl);
        var enableCustom = true;
        var selectorElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { id: this.control.element.id + '_selector' });
        this.periodSelectorDiv.appendChild(selectorElement);
        var buttons = this.control.periods;
        var selector = this.updateCustomElement();
        var buttonStyles = 'text-transform: none; text-overflow: unset';
        for (var i = 0; i < buttons.length; i++) {
            selector.push({ align: 'Left', text: buttons[i].text });
        }
        if (this.rootControl.getModuleName() === 'stockChart') {
            enableCustom = this.rootControl.enableCustomRange;
        }
        var selctorArgs;
        if (enableCustom) {
            this.calendarId = this.control.element.id + '_calendar';
            selector.push({ template: '<button id=' + this.calendarId + '></button>', align: 'Right' });
            selctorArgs = {
                selector: selector, name: 'RangeSelector', cancel: false, enableCustomFormat: true, content: 'Date Range'
            };
        }
        if (this.rootControl.getModuleName() === 'stockChart') {
            selector.push({ template: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('button', { id: 'resetClick', innerHTML: 'Reset',
                    styles: buttonStyles, className: 'e-dropdown-btn e-btn' }),
                align: 'Right' });
            if (this.rootControl.exportType.indexOf('Print') > -1) {
                selector.push({ template: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('button', { id: 'print', innerHTML: 'Print', styles: buttonStyles,
                        className: 'e-dropdown-btn e-btn' }),
                    align: 'Right' });
            }
            if (this.rootControl.exportType.length) {
                selector.push({ template: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('button', { id: 'export', innerHTML: 'Export', styles: buttonStyles,
                        className: 'e-dropdown-btn e-btn' }),
                    align: 'Right' });
            }
        }
        this.rootControl.trigger('selectorRender', selctorArgs);
        this.toolbar = new _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__["Toolbar"]({
            items: selctorArgs.selector, height: this.periodSelectorSize.height,
            clicked: function (args) {
                _this.buttonClick(args, _this.control);
            }, created: function () {
                _this.nodes = _this.toolbar.element.querySelectorAll('.e-toolbar-left')[0];
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.selectedIndex)) {
                    buttons.map(function (period, index) {
                        if (period.selected) {
                            _this.control.startValue = _this.changedRange(period.intervalType, _this.control.endValue, period.interval).getTime();
                            _this.selectedIndex = (_this.nodes.childNodes.length - buttons.length) + index;
                        }
                    });
                }
                _this.setSelectedStyle(_this.selectedIndex);
            }
        });
        var isStringTemplate = 'isStringTemplate';
        this.toolbar[isStringTemplate] = true;
        this.toolbar.appendTo(selectorElement);
        this.triggerChange = true;
        this.datePicker = new _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_2__["DateRangePicker"]({
            min: new Date(this.control.seriesXMin),
            max: new Date(this.control.seriesXMax),
            format: 'dd\'\/\'MM\'\/\'yyyy', placeholder: 'Select a range',
            showClearButton: false, startDate: new Date(this.control.startValue),
            endDate: new Date(this.control.endValue),
            created: function (args) {
                if (selctorArgs.enableCustomFormat) {
                    var datePickerElement = document.getElementsByClassName('e-date-range-wrapper')[0];
                    datePickerElement.style.display = 'none';
                    datePickerElement.insertAdjacentElement('afterend', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
                        id: 'customRange',
                        innerHTML: selctorArgs.content, className: 'e-btn e-dropdown-btn',
                        styles: 'font-family: "Segoe UI"; font-size: 14px; font-weight: 500; text-transform: none '
                    }));
                    Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])('customRange').insertAdjacentElement('afterbegin', (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('span', {
                        id: 'dateIcon', className: 'e-input-group-icon e-range-icon e-btn-icon e-icons',
                        styles: 'font-size: 16px; min-height: 0px; margin: -3px 0 0 0; outline: none; min-width: 30px'
                        // fix for date range icon alignment issue.
                    })));
                    document.getElementById('customRange').onclick = function () {
                        _this.datePicker.show(Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])('customRange'));
                    };
                }
            },
            change: function (args) {
                if (_this.triggerChange) {
                    if (_this.control.rangeSlider && args.event) {
                        _this.control.rangeSlider.performAnimation(args.startDate.getTime(), args.endDate.getTime(), _this.control.rangeNavigatorControl);
                    }
                    else if (args.event) {
                        _this.rootControl.rangeChanged(args.startDate.getTime(), args.endDate.getTime());
                    }
                    _this.nodes = _this.toolbar.element.querySelectorAll('.e-toolbar-left')[0];
                    if (!_this.rootControl.resizeTo && _this.control.rangeSlider && _this.control.rangeSlider.isDrag) {
                        /**
                         * Issue: While disabling range navigator console error throws
                         * Fix:Check with rangeSlider present or not. Then checked with isDrag.
                         */
                        for (var i = 0, length_1 = _this.nodes.childNodes.length; i < length_1; i++) {
                            _this.nodes.childNodes[i].childNodes[0].classList.remove('e-active');
                            _this.nodes.childNodes[i].childNodes[0].classList.remove('e-active');
                        }
                    }
                }
            }
        });
        this.datePicker.appendTo('#' + this.calendarId);
    };
    PeriodSelector.prototype.updateCustomElement = function () {
        var selector = [];
        var buttonStyles = 'text-transform: none; text-overflow: unset';
        if (this.rootControl.getModuleName() === 'stockChart') {
            if (this.rootControl.seriesType.length) {
                selector.push({ template: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('button', { id: 'seriesType', innerHTML: 'Series', styles: buttonStyles }),
                    align: 'Left' });
            }
            if (this.rootControl.indicatorType.length) {
                selector.push({ template: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('button', { id: 'indicatorType', innerHTML: 'Indicators', styles: buttonStyles }),
                    align: 'Left' });
            }
            if (this.rootControl.trendlineType.length) {
                selector.push({ template: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('button', { id: 'trendType', innerHTML: 'Trendline', styles: buttonStyles }),
                    align: 'Left' });
            }
        }
        return selector;
    };
    /**
     * To set and deselect the acrive style
     * @param buttons
     */
    PeriodSelector.prototype.setSelectedStyle = function (selectedIndex) {
        if (this.control.disableRangeSelector || this.rootControl.getModuleName() === 'stockChart') {
            for (var i = 0, length_2 = this.nodes.childNodes.length; i < length_2; i++) {
                this.nodes.childNodes[i].childNodes[0].classList.remove('e-active');
                this.nodes.childNodes[i].childNodes[0].classList.remove('e-active');
            }
            this.nodes.childNodes[selectedIndex].childNodes[0].classList.add('e-flat');
            this.nodes.childNodes[selectedIndex].childNodes[0].classList.add('e-active');
        }
    };
    /**
     * Button click handling
     */
    PeriodSelector.prototype.buttonClick = function (args, control) {
        var _this = this;
        var toolBarItems = this.toolbar.items;
        var clickedEle = args.item;
        var slider = this.control.rangeSlider;
        var updatedStart;
        var updatedEnd;
        var buttons = this.control.periods;
        var button = buttons.filter(function (btn) { return (btn.text === clickedEle.text); });
        buttons.map(function (period, index) {
            if (period.text === args.item.text) {
                _this.selectedIndex = (_this.nodes.childNodes.length - buttons.length) + index;
            }
        });
        if (args.item.text !== '') {
            this.setSelectedStyle(this.selectedIndex);
        }
        if (clickedEle.text.toLowerCase() === 'all') {
            updatedStart = control.seriesXMin;
            updatedEnd = control.seriesXMax;
            if (slider) {
                slider.performAnimation(updatedStart, updatedEnd, this.control.rangeNavigatorControl);
            }
            else {
                this.rootControl.rangeChanged(updatedStart, updatedEnd);
            }
        }
        else if (clickedEle.text.toLowerCase() === 'ytd') {
            if (slider) {
                updatedStart = new Date(new Date(slider.currentEnd).getFullYear().toString()).getTime();
                updatedEnd = slider.currentEnd;
                slider.performAnimation(updatedStart, updatedEnd, this.control.rangeNavigatorControl);
            }
            else {
                updatedStart = new Date(new Date(this.rootControl.currentEnd).getFullYear().toString()).getTime();
                updatedEnd = this.rootControl.currentEnd;
                this.rootControl.rangeChanged(updatedStart, updatedEnd);
            }
        }
        else if (clickedEle.text.toLowerCase() !== '') {
            if (slider) {
                updatedStart = this.changedRange(button[0].intervalType, slider.currentEnd, button[0].interval).getTime();
                updatedEnd = slider.currentEnd;
                slider.performAnimation(updatedStart, updatedEnd, this.control.rangeNavigatorControl);
            }
            else {
                updatedStart = this.changedRange(button[0].intervalType, this.rootControl.currentEnd, button[0].interval).getTime();
                updatedEnd = this.rootControl.currentEnd;
                this.rootControl.rangeChanged(updatedStart, updatedEnd);
            }
        }
        if (this.rootControl.getModuleName() === 'stockChart') {
            this.rootControl.zoomChange = false;
        }
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.calendarId + '_popup') && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            var element = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.calendarId + '_popup');
            element.querySelectorAll('.e-range-header')[0].style.display = 'none';
        }
    };
    /**
     *
     * @param type updatedRange for selector
     * @param end
     * @param interval
     */
    PeriodSelector.prototype.changedRange = function (type, end, interval) {
        var result = new Date(end);
        switch (type) {
            case 'Quarter':
                result.setMonth(result.getMonth() - (3 * interval));
                break;
            case 'Months':
                result.setMonth(result.getMonth() - interval);
                break;
            case 'Weeks':
                result.setDate(result.getDate() - (interval * 7));
                break;
            case 'Days':
                result.setDate(result.getDate() - interval);
                break;
            case 'Hours':
                result.setHours(result.getHours() - interval);
                break;
            case 'Minutes':
                result.setMinutes(result.getMinutes() - interval);
                break;
            case 'Seconds':
                result.setSeconds(result.getSeconds() - interval);
                break;
            default:
                result.setFullYear(result.getFullYear() - interval);
                break;
        }
        return result;
    };
    ;
    /**
     * Get module name
     */
    PeriodSelector.prototype.getModuleName = function () {
        return 'PeriodSelector';
    };
    /**
     * To destroy the period selector.
     * @return {void}
     * @private
     */
    PeriodSelector.prototype.destroy = function () {
        /**
         * destroy method
         */
    };
    return PeriodSelector;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/scrollbar/scrollbar-elements.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/scrollbar/scrollbar-elements.js ***!
  \****************************************************************************************/
/*! exports provided: createScrollSvg, ScrollElements */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createScrollSvg", function() { return createScrollSvg; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollElements", function() { return ScrollElements; });
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");


/**
 * Create scrollbar svg.
 * @return {void}
 */
function createScrollSvg(scrollbar, renderer) {
    var rect = scrollbar.axis.rect;
    var isHorizontalAxis = scrollbar.axis.orientation === 'Horizontal';
    scrollbar.svgObject = renderer.createSvg({
        id: scrollbar.component.element.id + '_' + 'scrollBar_svg' + scrollbar.axis.name,
        width: scrollbar.isVertical ? scrollbar.height : scrollbar.width,
        height: scrollbar.isVertical ? scrollbar.width : scrollbar.height,
        style: 'position: absolute;top: ' + ((scrollbar.axis.opposedPosition && isHorizontalAxis ? -16 : 0) + rect.y) + 'px;left: ' +
            (((scrollbar.axis.opposedPosition && !isHorizontalAxis ? 16 : 0) + rect.x) - (scrollbar.isVertical ? scrollbar.height : 0))
            + 'px;cursor:auto;'
    });
    scrollbar.elements.push(scrollbar.svgObject);
}
/**
 * Scrollbar elements renderer
 */
var ScrollElements = /** @class */ (function () {
    /**
     * Constructor for scroll elements
     * @param scrollObj
     */
    function ScrollElements(chart) {
        this.chartId = chart.element.id + '_';
    }
    /**
     * Render scrollbar elements.
     * @return {void}
     * @private
     */
    ScrollElements.prototype.renderElements = function (scroll, renderer) {
        var scrollGroup = renderer.createGroup({
            id: this.chartId + 'scrollBar_' + scroll.axis.name,
            transform: 'translate(' + ((scroll.isVertical && scroll.axis.isInversed) ? scroll.height : scroll.axis.isInversed ?
                scroll.width : '0') + ',' + (scroll.isVertical && scroll.axis.isInversed ? '0' : scroll.axis.isInversed ?
                scroll.height : scroll.isVertical ? scroll.width : '0') + ') rotate(' + (scroll.isVertical && scroll.axis.isInversed ?
                '90' : scroll.isVertical ? '270' : scroll.axis.isInversed ? '180' : '0') + ')'
        });
        var backRectGroup = renderer.createGroup({
            id: this.chartId + 'scrollBar_backRect_' + scroll.axis.name
        });
        var thumbGroup = renderer.createGroup({
            id: this.chartId + 'scrollBar_thumb_' + scroll.axis.name,
            transform: 'translate(0,0)'
        });
        this.backRect(scroll, renderer, backRectGroup);
        this.thumb(scroll, renderer, thumbGroup);
        this.renderCircle(scroll, renderer, thumbGroup);
        this.arrows(scroll, renderer, thumbGroup);
        this.thumbGrip(scroll, renderer, thumbGroup);
        scrollGroup.appendChild(backRectGroup);
        scrollGroup.appendChild(thumbGroup);
        return scrollGroup;
    };
    /**
     * Method to render back rectangle of scrollbar
     * @param scroll
     */
    ScrollElements.prototype.backRect = function (scroll, renderer, parent) {
        var style = scroll.scrollbarThemeStyle;
        var backRectEle = renderer.drawRectangle(new _utils_helper__WEBPACK_IMPORTED_MODULE_0__["RectOption"](this.chartId + 'scrollBarBackRect_' + scroll.axis.name, style.backRect, { width: 1, color: style.backRect }, 1, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](0, 0, scroll.width, scroll.height), 0, 0));
        parent.appendChild(backRectEle);
    };
    /**
     * Method to render arrows
     * @param scroll
     */
    ScrollElements.prototype.arrows = function (scroll, renderer, parent) {
        var style = scroll.scrollbarThemeStyle;
        var option = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](this.chartId + 'scrollBar_leftArrow_' + scroll.axis.name, style.arrow, 1, style.arrow, 1, '', '');
        this.leftArrowEle = renderer.drawPath(option);
        option.id = this.chartId + 'scrollBar_rightArrow_' + scroll.axis.name;
        this.rightArrowEle = renderer.drawPath(option);
        this.setArrowDirection(this.thumbRectX, this.thumbRectWidth, scroll.height);
        parent.appendChild(this.leftArrowEle);
        parent.appendChild(this.rightArrowEle);
    };
    /**
     * Methods to set the arrow width
     * @param thumbRectX
     * @param thumbRectWidth
     * @param height
     */
    ScrollElements.prototype.setArrowDirection = function (thumbRectX, thumbRectWidth, height) {
        var circleRadius = 8;
        var leftDirection = 'M ' + ((thumbRectX - circleRadius / 2) + 1) + ' ' + (height / 2) + ' ' + 'L ' +
            (thumbRectX - circleRadius / 2 + 6) + ' ' + 11 + ' ' + 'L ' + (thumbRectX - circleRadius / 2 + 6) + ' ' + 5 + ' Z';
        var rightDirection = 'M ' + ((thumbRectX + thumbRectWidth + circleRadius / 2) - 0.5) + ' ' + (height / 2)
            + ' ' + 'L ' + (thumbRectX + thumbRectWidth + circleRadius / 2 - 6) + ' ' + 11.5 + ' ' + 'L ' + (thumbRectX +
            thumbRectWidth + circleRadius / 2 - 6) + ' ' + 4.5 + ' Z';
        this.leftArrowEle.setAttribute('d', leftDirection);
        this.rightArrowEle.setAttribute('d', rightDirection);
    };
    /**
     * Method to render thumb
     * @param scroll
     * @param renderer
     * @param parent
     */
    ScrollElements.prototype.thumb = function (scroll, renderer, parent) {
        scroll.startX = this.thumbRectX;
        var style = scroll.scrollbarThemeStyle;
        this.slider = renderer.drawRectangle(new _utils_helper__WEBPACK_IMPORTED_MODULE_0__["RectOption"](this.chartId + 'scrollBarThumb_' + scroll.axis.name, style.thumb, { width: 1, color: '' }, 1, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](this.thumbRectX, 0, this.thumbRectWidth, scroll.height)));
        parent.appendChild(this.slider);
    };
    /**
     *  Method to render circles
     * @param scroll
     * @param renderer
     * @param parent
     */
    ScrollElements.prototype.renderCircle = function (scroll, renderer, parent) {
        var style = scroll.scrollbarThemeStyle;
        var option = new _utils_helper__WEBPACK_IMPORTED_MODULE_0__["CircleOption"](this.chartId + 'scrollBar_leftCircle_' + scroll.axis.name, style.circle, { width: 1, color: style.circle }, 1, this.thumbRectX, scroll.height / 2, 8);
        var scrollShadowEle = '<filter x="-25.0%" y="-20.0%" width="150.0%" height="150.0%" filterUnits="objectBoundingBox"' +
            'id="scrollbar_shadow"><feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>' +
            '<feGaussianBlur stdDeviation="1.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>' +
            '<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>' +
            '<feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.16 0" type="matrix" in="shadowBlurOuter1">' +
            '</feColorMatrix></filter>';
        var defElement = renderer.createDefs();
        defElement.innerHTML = scrollShadowEle;
        var shadowGroup = renderer.createGroup({
            id: this.chartId + scroll.axis.name + '_thumb_shadow'
        });
        shadowGroup.innerHTML = '<use fill="black" fill-opacity="1" filter="url(#scrollbar_shadow)" xlink:href="#' +
            this.chartId + 'scrollBar_leftCircle_' +
            scroll.axis.name + '"></use><use fill="black" fill-opacity="1" filter="url(#scrollbar_shadow)" xlink:href="#' +
            this.chartId + 'scrollBar_rightCircle_' + scroll.axis.name + '"></use>';
        this.leftCircleEle = renderer.drawCircle(option);
        option.id = this.chartId + 'scrollBar_rightCircle_' + scroll.axis.name;
        option.cx = this.thumbRectX + this.thumbRectWidth;
        this.rightCircleEle = renderer.drawCircle(option);
        parent.appendChild(defElement);
        parent.appendChild(this.leftCircleEle);
        parent.appendChild(this.rightCircleEle);
        parent.appendChild(shadowGroup);
    };
    /**
     * Method to render grip elements
     * @param scroll
     * @param renderer
     * @param parent
     */
    ScrollElements.prototype.thumbGrip = function (scroll, renderer, parent) {
        var sidePadding = 0;
        var topPadding = 0;
        var gripWidth = 14;
        var gripCircleDiameter = 2;
        var padding = gripWidth / 2 - gripCircleDiameter;
        var style = scroll.scrollbarThemeStyle;
        var option = new _utils_helper__WEBPACK_IMPORTED_MODULE_0__["CircleOption"](this.chartId + 'scrollBar_gripCircle0' + '_' + scroll.axis.name, style.grip, { width: 1, color: style.grip }, 1, 0, 0, 1);
        this.gripCircle = renderer.createGroup({
            id: this.chartId + 'scrollBar_gripCircle_' + scroll.axis.name,
            transform: 'translate(' + ((this.thumbRectX + this.thumbRectWidth / 2) + ((scroll.isVertical ? 1 : -1) * padding)) +
                ',' + (scroll.isVertical ? '10' : '5') + ') rotate(' + (scroll.isVertical ? '180' : '0') + ')'
        });
        for (var i = 1; i <= 6; i++) {
            option.id = this.chartId + 'scrollBar_gripCircle' + i + '_' + scroll.axis.name;
            option.cx = sidePadding;
            option.cy = topPadding;
            this.gripCircle.appendChild(renderer.drawCircle(option));
            sidePadding = i === 3 ? 0 : (sidePadding + 5);
            topPadding = i >= 3 ? 5 : 0;
        }
        parent.appendChild(this.gripCircle);
    };
    return ScrollElements;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/scrollbar/scrollbar.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/scrollbar/scrollbar.js ***!
  \*******************************************************************************/
/*! exports provided: ScrollBar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollBar", function() { return ScrollBar; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _scrollbar_elements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scrollbar-elements */ "./node_modules/@syncfusion/ej2-charts/src/common/scrollbar/scrollbar-elements.js");
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _model_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
/* harmony import */ var _model_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");





/**
 * Scrollbar Base
 */
var ScrollBar = /** @class */ (function () {
    /**
     * Constructor for creating scrollbar
     * @param component
     * @param axis
     */
    function ScrollBar(component, axis) {
        /** @private */
        this.scrollRange = { max: null, min: null, interval: null, delta: null };
        this.component = component;
        this.elements = [];
        this.scrollElements = new _scrollbar_elements__WEBPACK_IMPORTED_MODULE_1__["ScrollElements"](component);
        this.axis = axis;
        this.mouseMoveListener = this.scrollMouseMove.bind(this);
        this.mouseUpListener = this.scrollMouseUp.bind(this);
        this.animateDuration = 500;
        this.isPointer = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer;
        this.browserName = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name;
    }
    /**
     * To Mouse x and y position
     * @param e
     */
    ScrollBar.prototype.getMouseXY = function (e) {
        var pageX;
        var pageY;
        var touchArg;
        if (e.type.indexOf('touch') > -1) {
            touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            pageY = touchArg.changedTouches[0].clientY;
        }
        else {
            pageX = e.clientX;
            pageY = e.clientY;
        }
        var svgRect = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(this.component.element.id + '_scrollBar_svg' + this.axis.name).getBoundingClientRect();
        this.mouseX = pageX - Math.max(svgRect.left, 0);
        this.mouseY = pageY - Math.max(svgRect.top, 0);
    };
    /**
     * Method to bind events for scrollbar svg object
     * @param element
     */
    ScrollBar.prototype.wireEvents = function (element) {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.scrollMouseDown, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.scrollMouseMove, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.scrollMouseUp, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, 'mousewheel', this.scrollMouseWheel, this);
        window.addEventListener('mousemove', this.mouseMoveListener, false);
        window.addEventListener('mouseup', this.mouseUpListener, false);
    };
    /**
     * Method to remove events for srcollbar svg object
     * @param element
     */
    ScrollBar.prototype.unWireEvents = function (element) {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.scrollMouseDown);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.scrollMouseMove);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.scrollMouseUp);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(element, 'mousewheel', this.scrollMouseWheel);
        window.removeEventListener('mousemove', this.mouseMoveListener, false);
        window.removeEventListener('mouseup', this.mouseUpListener, false);
    };
    /**
     * Handles the mouse down on scrollbar
     * @param e
     */
    ScrollBar.prototype.scrollMouseDown = function (e) {
        var id = e.target.id;
        var elem = this.scrollElements;
        this.getMouseXY(e);
        this.isResizeLeft = this.isExist(id, '_leftCircle_') || this.isExist(id, '_leftArrow_');
        this.isResizeRight = this.isExist(id, '_rightCircle_') || this.isExist(id, '_rightArrow_');
        //  this.previousXY = this.isVertical ? this.mouseY : this.mouseX;
        this.previousXY = (this.isVertical && this.axis.isInversed) ? this.mouseY : this.isVertical ? this.width -
            this.mouseY : this.axis.isInversed ? this.width - this.mouseX : this.mouseX;
        this.previousWidth = elem.thumbRectWidth;
        this.previousRectX = elem.thumbRectX;
        this.startZoomPosition = this.axis.zoomPosition;
        this.startZoomFactor = this.axis.zoomFactor;
        this.startRange = this.axis.visibleRange;
        this.scrollStarted = true;
        this.component.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollStart"], this.getArgs(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollStart"]));
        if (this.isExist(id, 'scrollBarThumb_')) {
            this.isThumbDrag = true;
            this.svgObject.style.cursor = '-webkit-grabbing';
        }
        else if (this.isExist(id, 'scrollBarBackRect_')) {
            var currentX = this.moveLength(this.previousXY, this.previousRectX);
            elem.thumbRectX = this.isWithIn(currentX) ? currentX : elem.thumbRectX;
            this.positionThumb(elem.thumbRectX, elem.thumbRectWidth);
            this.setZoomFactorPosition(elem.thumbRectX, elem.thumbRectWidth);
            if (this.isLazyLoad) {
                var thumbMove = elem.thumbRectX > this.previousRectX ? 'RightMove' : 'LeftMove';
                var args = this.calculateLazyRange(elem.thumbRectX, elem.thumbRectWidth, thumbMove);
                if (args) {
                    this.component.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollEnd"], args);
                }
            }
        }
    };
    /**
     * To check the matched string
     * @param id
     * @param match
     */
    ScrollBar.prototype.isExist = function (id, match) {
        return id.indexOf(match) > -1;
    };
    /**
     * To check current poisition is within scrollbar region
     * @param currentX
     */
    ScrollBar.prototype.isWithIn = function (currentX) {
        var circleRadius = 8;
        return (currentX - circleRadius >= 0 &&
            currentX + this.scrollElements.thumbRectWidth + circleRadius <= this.width);
    };
    /**
     * Method to find move length of thumb
     * @param mouseXY
     * @param thumbX
     * @param circleRadius
     */
    ScrollBar.prototype.moveLength = function (mouseXY, thumbX, circleRadius) {
        if (circleRadius === void 0) { circleRadius = 8; }
        var moveLength = (10 / 100) * (this.width - circleRadius * 2);
        if (mouseXY < thumbX) {
            moveLength = thumbX - (thumbX - moveLength > circleRadius ? moveLength : circleRadius);
        }
        else {
            moveLength = thumbX + (thumbX + this.scrollElements.thumbRectWidth + moveLength < this.width - circleRadius ?
                moveLength : circleRadius);
        }
        return moveLength;
    };
    /**
     * Method to calculate zoom factor and position
     * @param currentX
     * @param currentWidth
     */
    ScrollBar.prototype.setZoomFactorPosition = function (currentX, currentWidth) {
        var axis = this.axis;
        this.isScrollUI = true;
        var circleRadius = 8;
        var circleWidth = 1;
        var currentScrollWidth = currentX + currentWidth + circleRadius + circleWidth;
        var currentZPWidth = circleRadius + (circleWidth / 2);
        this.zoomPosition = (currentX - (currentX - currentZPWidth <= 0 ? currentZPWidth : 0)) / (this.isVertical
            ? axis.rect.height : this.width);
        this.zoomFactor = (currentWidth + (currentScrollWidth >= this.width ? circleRadius + circleWidth : 0)) / (this.isVertical
            ? axis.rect.height : this.width);
        axis.zoomPosition = this.zoomPosition;
        axis.zoomFactor = this.zoomFactor;
    };
    /**
     * Handles the mouse move on scrollbar
     * @param e
     */
    ScrollBar.prototype.scrollMouseMove = function (e) {
        var target = e.target;
        var elem = this.scrollElements;
        this.getMouseXY(e);
        this.setCursor(target);
        this.setTheme(target);
        //let mouseXY: number = this.isVertical ? this.mouseY : this.mouseX;
        var mouseXY = (this.isVertical && this.axis.isInversed) ? this.width - this.mouseY : this.isVertical ?
            this.mouseY : this.mouseX;
        var range = this.axis.visibleRange;
        var zoomPosition = this.zoomPosition;
        var zoomFactor = this.zoomFactor;
        if (this.isThumbDrag) {
            this.component.isScrolling = this.isThumbDrag;
            mouseXY = (this.isVertical || this.axis.isInversed) ? this.width - mouseXY : mouseXY;
            var currentX = elem.thumbRectX + (mouseXY - this.previousXY);
            if (mouseXY >= currentX + elem.thumbRectWidth) {
                this.setCursor(target);
            }
            else {
                this.svgObject.style.cursor = '-webkit-grabbing';
            }
            if (mouseXY >= 0 && mouseXY <= currentX + elem.thumbRectWidth) {
                elem.thumbRectX = this.isWithIn(currentX) ? currentX : elem.thumbRectX;
                this.positionThumb(elem.thumbRectX, elem.thumbRectWidth);
                this.previousXY = mouseXY;
                this.setZoomFactorPosition(currentX, elem.thumbRectWidth);
            }
            this.component.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollChanged"], this.getArgs(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollChanged"], range, zoomPosition, zoomFactor));
        }
        else if (this.isResizeLeft || this.isResizeRight) {
            this.resizeThumb(e);
            this.component.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollChanged"], this.getArgs(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollChanged"], range, zoomPosition, zoomFactor));
        }
    };
    /**
     * Handles the mouse wheel on scrollbar
     * @param e
     */
    ScrollBar.prototype.scrollMouseWheel = function (e) {
        var svgRect = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(this.component.element.id + '_scrollBar_svg' + this.axis.name).getBoundingClientRect();
        this.mouseX = e.clientX - Math.max(svgRect.left, 0);
        this.mouseY = e.clientY - Math.max(svgRect.top, 0);
        var origin = 0.5;
        var elem = this.scrollElements;
        var axis = this.axis;
        var direction = (this.browserName === 'mozilla' && !this.isPointer) ?
            -(e.detail) / 3 > 0 ? 1 : -1 : (e.wheelDelta / 120) > 0 ? 1 : -1;
        var cumulative;
        cumulative = Math.max(Math.max(1 / Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["minMax"])(axis.zoomFactor, 0, 1), 1) + (0.25 * direction), 1);
        var range = this.axis.visibleRange;
        var zoomPosition = this.zoomPosition;
        var zoomFactor = this.zoomFactor;
        var args;
        if (cumulative >= 1) {
            origin = axis.orientation === 'Horizontal' ? this.mouseX / axis.rect.width : 1 - (this.mouseY / axis.rect.height);
            origin = origin > 1 ? 1 : origin < 0 ? 0 : origin;
            this.zoomFactor = (cumulative === 1) ? 1 : Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["minMax"])(1 / cumulative, 0, 1);
            this.zoomPosition = (cumulative === 1) ? 0 : axis.zoomPosition + ((axis.zoomFactor - this.zoomFactor) * origin);
        }
        elem.thumbRectX = this.isWithIn(this.zoomPosition * this.width) ? this.zoomPosition * this.width : elem.thumbRectX;
        this.isScrollUI = true;
        this.positionThumb(elem.thumbRectX, elem.thumbRectWidth);
        if (this.isLazyLoad) {
            this.setZoomFactorPosition(elem.thumbRectX, elem.thumbRectWidth);
        }
        axis.zoomFactor = this.zoomFactor;
        axis.zoomPosition = this.zoomPosition;
        if (this.isLazyLoad) {
            args = this.calculateMouseWheelRange(elem.thumbRectX, elem.thumbRectWidth);
            if (args) {
                if ((args.currentRange.minimum !== args.previousAxisRange.minimum) && (args.currentRange.maximum !==
                    args.previousAxisRange.maximum)) {
                    this.component.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollEnd"], args);
                    this.isScrollEnd = false;
                }
            }
        }
        if (!this.isLazyLoad) {
            this.component.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollChanged"], this.getArgs(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollChanged"], range, zoomPosition, zoomFactor));
        }
    };
    /**
     * Handles the mouse up on scrollbar
     * @param e
     */
    ScrollBar.prototype.scrollMouseUp = function (e) {
        var circleRadius = 8;
        var circleWidth = 1;
        var args;
        this.startX = this.scrollElements.thumbRectX;
        var currentScrollWidth = this.startX + this.scrollElements.thumbRectWidth + circleRadius + circleWidth;
        var currentZPWidth = circleRadius + (circleWidth / 2);
        if ((this.isResizeLeft || this.isResizeRight) && !this.isLazyLoad) {
            this.axis.zoomFactor = (currentScrollWidth >= this.width - 1 && (this.startX - currentZPWidth) <= 0) ? 1 : this.zoomFactor;
        }
        if (this.isLazyLoad) {
            var moveLength = this.previousRectX - this.startX;
            if ((moveLength > 0 || moveLength < 0) && this.isThumbDrag) {
                var thumbMove = moveLength < 0 ? 'RightMove' : 'LeftMove';
                if (thumbMove === 'RightMove') {
                    this.startX = (this.startX + Math.abs(moveLength)) < this.width - circleRadius ? this.startX :
                        this.width - circleRadius - this.scrollElements.thumbRectWidth;
                }
                else {
                    this.startX = (this.startX + this.scrollElements.thumbRectWidth - Math.abs(moveLength)) > circleRadius ?
                        this.startX : circleRadius;
                }
                args = this.calculateLazyRange(this.startX, this.scrollElements.thumbRectWidth, thumbMove);
                if (args) {
                    this.component.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollEnd"], args);
                    this.scrollStarted = false;
                }
            }
            if (this.isResizeLeft || this.isResizeRight) {
                args = this.calculateLazyRange(this.startX, this.scrollElements.thumbRectWidth);
                if (args) {
                    this.component.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollEnd"], args);
                    this.scrollStarted = false;
                }
            }
        }
        this.isThumbDrag = false;
        this.isResizeLeft = false;
        this.isResizeRight = false;
        this.isScrollEnd = false;
        this.component.isScrolling = false;
        if (this.scrollStarted && !this.isLazyLoad) {
            this.component.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollEnd"], this.getArgs(_model_constants__WEBPACK_IMPORTED_MODULE_4__["scrollChanged"], this.startRange, this.startZoomPosition, this.startZoomFactor));
            this.scrollStarted = false;
        }
    };
    ScrollBar.prototype.calculateMouseWheelRange = function (scrollThumbX, scrollThumbWidth) {
        var zoomFactor;
        var zoomPosition;
        var currentStart;
        var currentEnd;
        var args;
        var range = this.scrollRange;
        var previousRange = this.getStartEnd(this.previousStart, this.previousEnd, false);
        var circleRadius = 8;
        if ((scrollThumbX + scrollThumbWidth + circleRadius) <= this.width) {
            zoomPosition = (scrollThumbX - circleRadius) / this.width;
            zoomFactor = scrollThumbWidth / (this.width);
        }
        currentStart = range.min + zoomPosition * range.delta;
        currentEnd = currentStart + zoomFactor * range.delta;
        if (currentEnd) {
            args = { axis: this.axis, currentRange: this.getStartEnd(currentStart, currentEnd, true), previousAxisRange: previousRange };
        }
        return args;
    };
    ;
    /**
     * Range calculation for lazy loading
     */
    ScrollBar.prototype.calculateLazyRange = function (scrollThumbX, scrollThumbWidth, thumbMove) {
        var currentScrollWidth = scrollThumbWidth;
        var zoomFactor;
        var zoomPosition;
        var currentStart;
        var currentEnd;
        var args;
        var range = this.scrollRange;
        var previousRange = this.getStartEnd(this.previousStart, this.previousEnd, false);
        var circleRadius = 8;
        var circleWidth = 16;
        if (this.isResizeRight || thumbMove === 'RightMove') {
            currentScrollWidth = this.isResizeRight ? currentScrollWidth + circleWidth : currentScrollWidth;
            zoomFactor = currentScrollWidth / this.width;
            zoomPosition = thumbMove === 'RightMove' ? (scrollThumbX + circleRadius) / this.width : this.axis.zoomPosition;
            currentStart = thumbMove === 'RightMove' ? (range.min + zoomPosition * range.delta) : this.previousStart;
            currentEnd = currentStart + zoomFactor * range.delta;
        }
        else if (this.isResizeLeft || thumbMove === 'LeftMove') {
            zoomPosition = (scrollThumbX - circleRadius) / this.width;
            zoomFactor = currentScrollWidth / this.width;
            currentStart = range.min + zoomPosition * range.delta;
            currentStart = currentStart >= range.min ? currentStart : range.min;
            currentEnd = thumbMove === 'LeftMove' ? (currentStart + zoomFactor * range.delta) : this.previousEnd;
        }
        else if (this.isThumbDrag) {
            zoomPosition = thumbMove === 'RightMove' ? (scrollThumbX + circleRadius) / this.width : (scrollThumbX - circleRadius) / this.width;
            zoomFactor = (this.scrollElements.thumbRectWidth) / this.width;
            currentStart = range.min + zoomPosition * range.delta;
            currentStart = currentStart >= range.min ? currentStart : range.min;
            currentEnd = currentStart + zoomFactor * range.delta;
        }
        if (currentEnd) {
            args = { axis: (this.component.isBlazor ? {} : this.axis), currentRange: this.getStartEnd(currentStart, currentEnd, true),
                previousAxisRange: previousRange };
        }
        return args;
    };
    /**
     * Get start and end values
     */
    ScrollBar.prototype.getStartEnd = function (start, end, isCurrentStartEnd) {
        var range;
        var valueType = this.valueType;
        if ((valueType === 'DateTime' || valueType === 'DateTimeCategory') && isCurrentStartEnd) {
            this.previousStart = start;
            this.previousEnd = end;
        }
        else if (isCurrentStartEnd) {
            this.previousStart = Math.ceil(start);
            this.previousEnd = Math.ceil(end);
        }
        switch (valueType) {
            case 'Double':
            case 'Category':
            case 'Logarithmic':
                start = Math.ceil(start);
                end = Math.ceil(end);
                break;
            case 'DateTime':
            case 'DateTimeCategory':
                start = new Date(start);
                end = new Date(end);
                break;
        }
        return range = { minimum: start, maximum: end };
    };
    /**
     * To render scroll bar
     * @private
     */
    ScrollBar.prototype.render = function (isScrollExist) {
        if (this.component.zoomModule || (isScrollExist && this.axis.scrollbarSettings.enable)) {
            this.getDefaults();
        }
        this.getTheme();
        this.removeScrollSvg();
        Object(_scrollbar_elements__WEBPACK_IMPORTED_MODULE_1__["createScrollSvg"])(this, this.component.svgRenderer);
        this.wireEvents(this.svgObject);
        this.svgObject.appendChild(this.scrollElements.renderElements(this, this.component.svgRenderer));
        return this.svgObject;
    };
    /**
     * Theming for scrollabr
     */
    ScrollBar.prototype.getTheme = function () {
        this.scrollbarThemeStyle = Object(_model_theme__WEBPACK_IMPORTED_MODULE_3__["getScrollbarThemeColor"])(this.component.theme);
    };
    /**
     * Method to remove existing scrollbar
     */
    ScrollBar.prototype.removeScrollSvg = function () {
        if (document.getElementById(this.component.element.id + '_scrollBar_svg' + this.axis.name)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(document.getElementById(this.component.element.id + '_scrollBar_svg' + this.axis.name));
        }
    };
    /**
     * Method to set cursor fpr scrollbar
     * @param target
     */
    ScrollBar.prototype.setCursor = function (target) {
        var id = target.id;
        this.svgObject.style.cursor = id.indexOf('scrollBarThumb_') > -1 || id.indexOf('_gripCircle') > -1 ?
            '-webkit-grab' : (id.indexOf('Circle_') > -1 || id.indexOf('Arrow_') > -1) ? this.isVertical ? 'ns-resize' :
            'ew-resize' : 'auto';
    };
    /**
     * Method to set theme for sollbar
     * @param target
     */
    ScrollBar.prototype.setTheme = function (target) {
        var id = target.id;
        var isLeftHover = id.indexOf('_leftCircle_') > -1 || id.indexOf('_leftArrow_') > -1;
        var isRightHover = id.indexOf('_rightCircle_') > -1 || id.indexOf('_rightArrow_') > -1;
        var style = this.scrollbarThemeStyle;
        var leftArrowEle = this.scrollElements.leftArrowEle;
        var rightArrowEle = this.scrollElements.rightArrowEle;
        var leftCircleEle = this.scrollElements.leftCircleEle;
        var rightCircleEle = this.scrollElements.rightCircleEle;
        var isAxis = this.isCurrentAxis(target, leftArrowEle);
        leftCircleEle.style.fill = isLeftHover && isAxis ? style.circleHover : style.circle;
        rightCircleEle.style.fill = isRightHover && isAxis ? style.circleHover : style.circle;
        leftCircleEle.style.stroke = isLeftHover && isAxis ? style.circleHover : style.circle;
        rightCircleEle.style.stroke = isRightHover && isAxis ? style.circleHover : style.circle;
        if (this.component.theme === 'HighContrastLight') {
            leftArrowEle.style.fill = isLeftHover && isAxis ? style.arrowHover : style.arrow;
            leftArrowEle.style.stroke = isLeftHover && isAxis ? style.arrowHover : style.arrow;
            rightArrowEle.style.fill = isRightHover && isAxis ? style.arrowHover : style.arrow;
            rightArrowEle.style.stroke = isRightHover && isAxis ? style.arrowHover : style.arrow;
            leftCircleEle.style.stroke = isLeftHover && isAxis ? style.circleHover : style.circle;
            rightCircleEle.style.stroke = isRightHover && isAxis ? style.circleHover : style.circle;
        }
    };
    /**
     * To check current axis
     * @param target
     * @param ele
     */
    ScrollBar.prototype.isCurrentAxis = function (target, ele) {
        return (target.id.split('_')[2] === ele.id.split('_')[2]);
    };
    /**
     * Method to resize thumb
     * @param e
     */
    ScrollBar.prototype.resizeThumb = function (e) {
        var currentWidth;
        var circleRadius = 8;
        var padding = 5;
        var gripWidth = 14;
        var minThumbWidth = circleRadius * 2 + padding * 2 + gripWidth;
        var thumbX = this.previousRectX;
        // let mouseXY: number = this.isVertical ? this.mouseY : this.mouseX;
        var mouseXY = (this.isVertical && this.axis.isInversed) ? this.mouseY : this.isVertical ? this.width -
            this.mouseY : this.axis.isInversed ? this.width - this.mouseX : this.mouseX;
        var diff = Math.abs(this.previousXY - mouseXY);
        if (this.isResizeLeft && mouseXY >= 0) {
            var currentX = thumbX + (mouseXY > this.previousXY ? diff : -diff);
            currentWidth = currentX - circleRadius >= 0 ? this.previousWidth + (mouseXY > this.previousXY ? -diff : diff) :
                this.previousWidth;
            currentX = currentX - circleRadius >= 0 ? currentX : thumbX;
            if (currentWidth >= minThumbWidth && mouseXY < currentX + currentWidth) {
                this.scrollElements.thumbRectX = this.previousRectX = currentX;
                this.scrollElements.thumbRectWidth = this.previousWidth = currentWidth;
                this.previousXY = mouseXY;
                this.positionThumb(currentX, currentWidth);
                this.setZoomFactorPosition(currentX, currentWidth);
            }
        }
        else if (this.isResizeRight) {
            currentWidth = mouseXY >= minThumbWidth + this.scrollElements.thumbRectX && mouseXY <= this.width - circleRadius ?
                mouseXY - this.scrollElements.thumbRectX : this.previousWidth;
            this.scrollElements.thumbRectWidth = this.previousWidth = currentWidth;
            this.previousXY = mouseXY;
            this.positionThumb(this.startX, currentWidth);
            this.setZoomFactorPosition(this.startX, currentWidth);
            if (!this.isLazyLoad) {
                this.setZoomFactorPosition(this.startX, currentWidth);
            }
        }
    };
    /**
     * Method to position the scrollbar thumb
     * @param currentX
     * @param currentWidth
     */
    ScrollBar.prototype.positionThumb = function (currentX, currentWidth) {
        var circlePadding = 3;
        var elem = this.scrollElements;
        var gripWidth = 14;
        var gripCircleDiameter = 2;
        var padding = gripWidth / 2 - gripCircleDiameter;
        elem.slider.setAttribute('x', currentX.toString());
        elem.slider.setAttribute('width', currentWidth.toString());
        elem.leftCircleEle.setAttribute('cx', currentX.toString());
        elem.rightCircleEle.setAttribute('cx', (currentX + currentWidth).toString());
        elem.setArrowDirection(currentX, currentWidth, this.height);
        elem.gripCircle.setAttribute('transform', 'translate(' + (currentX + currentWidth / 2 + ((this.isVertical ? 1 : -1) * padding)) +
            ',' + (this.isVertical ? '10' : '5') + ') rotate(' + (this.isVertical ? '180' : '0') + ')');
    };
    /**
     * Method to get default values
     */
    ScrollBar.prototype.getDefaults = function () {
        var axis = this.axis;
        if (this.axis.scrollbarSettings.enable) {
            this.isLazyLoad = true;
            this.getLazyDefaults(axis);
        }
        var circleRadius = 8;
        var padding = 5;
        var gripWidth = 14;
        var minThumbWidth = circleRadius * 2 + padding * 2 + gripWidth;
        this.isVertical = axis.orientation === 'Vertical';
        var lazyRange = axis.scrollbarSettings.range;
        this.zoomFactor = this.isLazyLoad ? this.zoomFactor : axis.zoomFactor;
        this.zoomPosition = this.isLazyLoad ? this.zoomPosition : axis.zoomPosition;
        var currentWidth = this.zoomFactor * (this.isVertical ? axis.rect.height : axis.rect.width);
        currentWidth = currentWidth > minThumbWidth ? currentWidth : minThumbWidth;
        this.scrollX = axis.rect.x;
        this.scrollY = axis.rect.y;
        this.width = this.isVertical ? axis.rect.height : axis.rect.width;
        this.height = 16;
        var currentX = this.zoomPosition * (this.isVertical ? axis.rect.height : this.width);
        var minThumbX = (this.width - minThumbWidth - circleRadius);
        this.scrollElements.thumbRectX = currentX > minThumbX ? minThumbX : currentX < circleRadius ? circleRadius : currentX;
        this.scrollElements.thumbRectWidth = ((currentWidth + this.scrollElements.thumbRectX) < this.width - (circleRadius * 2))
            ? currentWidth : this.width - this.scrollElements.thumbRectX - circleRadius;
    };
    /**
     * Lazy load default values
     */
    ScrollBar.prototype.getLazyDefaults = function (axis) {
        var start;
        var end;
        var valueType = axis.valueType;
        var scrollbarSettings = axis.scrollbarSettings;
        this.valueType = valueType = (!scrollbarSettings.range.minimum || !scrollbarSettings.range.maximum) &&
            scrollbarSettings.pointsLength ? 'Double' : valueType;
        var range = axis.scrollbarSettings.range;
        var visibleRange = axis.visibleRange;
        var pointsLength = axis.scrollbarSettings.pointsLength;
        var zoomFactor;
        var zoomPosition;
        var option = {
            skeleton: 'full',
            type: 'dateTime'
        };
        var dateParser = this.component.intl.getDateParser(option);
        var dateFormatter = this.component.intl.getDateFormat(option);
        switch (valueType) {
            case 'Double':
            case 'Category':
            case 'Logarithmic':
                start = range.minimum ? range.minimum : pointsLength ? 0 : visibleRange.min;
                end = range.maximum ? range.maximum : pointsLength ? (pointsLength - 1) : visibleRange.max;
                break;
            case 'DateTime':
            case 'DateTimeCategory':
                start = range.minimum ? Date.parse(dateParser(dateFormatter(range.minimum))) : visibleRange.min;
                end = range.maximum ? Date.parse(dateParser(dateFormatter(range.maximum))) : visibleRange.max;
                break;
        }
        start = Math.min(start, visibleRange.min);
        end = Math.max(end, visibleRange.max);
        zoomFactor = (visibleRange.max - visibleRange.min) / (end - start);
        zoomPosition = (visibleRange.min - start) / (end - start);
        this.zoomFactor = range.minimum || range.maximum ? zoomFactor : (this.axis.maxPointLength / axis.scrollbarSettings.pointsLength);
        this.zoomPosition = range.minimum || range.maximum ? zoomPosition : axis.zoomPosition;
        this.scrollRange.min = start;
        this.scrollRange.max = end;
        this.scrollRange.delta = end - start;
        this.previousStart = visibleRange.min;
        this.previousEnd = visibleRange.max;
    };
    /**
     * Method to get log range
     */
    ScrollBar.prototype.getLogRange = function (axis) {
        var logRange;
        var range = axis.scrollbarSettings.range;
        var start = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["logBase"])(range.minimum, axis.logBase);
        start = isFinite(start) ? start : range.minimum;
        var end = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["logBase"])(range.maximum, axis.logBase);
        end = isFinite(start) ? end : range.maximum;
        logRange = { minimum: Math.floor(start / 1), maximum: Math.ceil(end / 1) };
        return logRange;
    };
    /**
     * Method for injecting scrollbar module
     * @param axis
     * @param component
     */
    ScrollBar.prototype.injectTo = function (axis, component) {
        axis.zoomingScrollBar = new ScrollBar(component, axis);
    };
    /**
     * Method to destroy scrollbar
     */
    ScrollBar.prototype.destroy = function () {
        var _this = this;
        if (this.axes) {
            this.axes.map(function (axis) {
                axis.zoomingScrollBar.destroy();
            });
        }
        else {
            this.elements.map(function (element) {
                _this.unWireEvents(element);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element.firstChild);
            });
            this.elements = [];
        }
    };
    /**
     * Method to get scrollbar module name
     */
    ScrollBar.prototype.getModuleName = function () {
        return 'ScrollBar';
    };
    ScrollBar.prototype.getArgs = function (eventName, range, zoomPosition, zoomFactor) {
        var scrollArgs = {
            axis: (this.component.isBlazor ? {} : this.axis),
            name: eventName,
            range: this.axis.visibleRange,
            zoomFactor: this.axis.zoomFactor,
            zoomPosition: this.axis.zoomPosition,
            previousRange: range,
            previousZoomFactor: zoomFactor,
            previousZoomPosition: zoomPosition,
        };
        return scrollArgs;
    };
    return ScrollBar;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/user-interaction/selection.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/user-interaction/selection.js ***!
  \**************************************************************************************/
/*! exports provided: BaseSelection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseSelection", function() { return BaseSelection; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");

/**
 * Selection Module handles the selection for chart.
 * @private
 */
var BaseSelection = /** @class */ (function () {
    function BaseSelection(control) {
        this.control = control;
    }
    /**
     * To create selection styles for series
     */
    BaseSelection.prototype.seriesStyles = function () {
        var seriesclass;
        var style = document.getElementById(this.styleId);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(style)) {
            style = document.createElement('style');
            style.setAttribute('id', this.styleId);
            for (var _i = 0, _a = this.control.visibleSeries; _i < _a.length; _i++) {
                var series = _a[_i];
                seriesclass = series.selectionStyle || this.styleId + '_series_' + series.index;
                style.innerHTML += series.selectionStyle ? '' : '.' + seriesclass + ' { } ';
            }
            style.innerHTML += '.' + this.unselected + ' { opacity:' + (0.3) + ';} ';
            document.body.appendChild(style);
        }
    };
    /**
     * To concat indexes
     */
    BaseSelection.prototype.concatIndexes = function (userIndexes, localIndexes) {
        return userIndexes.concat(localIndexes);
    };
    /**
     * Selected points series visibility checking on legend click
     */
    BaseSelection.prototype.checkVisibility = function (selectedIndexes) {
        var visible = false;
        var uniqueSeries = [];
        for (var _i = 0, selectedIndexes_1 = selectedIndexes; _i < selectedIndexes_1.length; _i++) {
            var index = selectedIndexes_1[_i];
            if (uniqueSeries.indexOf(index.series) === -1) {
                uniqueSeries.push(index.series);
            }
        }
        for (var _a = 0, uniqueSeries_1 = uniqueSeries; _a < uniqueSeries_1.length; _a++) {
            var index = uniqueSeries_1[_a];
            if (this.control.series[index].visible) {
                visible = true;
                break;
            }
        }
        return visible;
    };
    /**
     * To add svg element style class
     * @private
     */
    BaseSelection.prototype.addSvgClass = function (element, className) {
        var elementClassName = element.getAttribute('class') || '';
        elementClassName += ((elementClassName !== '') ? ' ' : '');
        if (elementClassName.indexOf(className) === -1) {
            element.setAttribute('class', elementClassName + className);
        }
    };
    /**
     * To remove svg element style class
     * @private
     */
    BaseSelection.prototype.removeSvgClass = function (element, className) {
        var elementClassName = element.getAttribute('class') || '';
        if (elementClassName.indexOf(className) > -1) {
            element.setAttribute('class', elementClassName.replace(className, ''));
        }
    };
    /**
     * To get children from parent element
     */
    BaseSelection.prototype.getChildren = function (parent) {
        var children = [];
        for (var i = 0; i < parent.childNodes.length; i++) {
            if (parent.childNodes[i].tagName !== 'defs') {
                children.push(parent.childNodes[i]);
            }
        }
        return children;
    };
    return BaseSelection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/user-interaction/tooltip.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/user-interaction/tooltip.js ***!
  \************************************************************************************/
/*! exports provided: BaseTooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseTooltip", function() { return BaseTooltip; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _chart_utils_get_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../chart/utils/get-data */ "./node_modules/@syncfusion/ej2-charts/src/chart/utils/get-data.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * Tooltip Module used to render the tooltip for series.
 */
var BaseTooltip = /** @class */ (function (_super) {
    __extends(BaseTooltip, _super);
    /**
     * Constructor for tooltip module.
     * @private.
     */
    function BaseTooltip(chart) {
        var _this = _super.call(this, chart) || this;
        _this.element = _this.chart.element;
        _this.textStyle = chart.tooltip.textStyle;
        _this.control = chart;
        return _this;
    }
    BaseTooltip.prototype.getElement = function (id) {
        return document.getElementById(id);
    };
    /**
     * Renders the tooltip.
     * @return {void}
     * @private
     */
    BaseTooltip.prototype.getTooltipElement = function (isTooltip) {
        this.inverted = this.chart.requireInvertedAxis;
        this.header = (this.control.tooltip.header === null) ?
            ((this.control.tooltip.shared) ? '<b>${point.x}</b>' : '<b>${series.name}</b>')
            : (this.control.tooltip.header);
        this.formattedText = [];
        var tooltipDiv = document.getElementById(this.chart.element.id + '_tooltip');
        var isStockChart = this.chart.element.id.indexOf('stockChart') > -1;
        if (!isTooltip && !tooltipDiv || isStockChart) {
            return this.createElement();
        }
        return null;
    };
    BaseTooltip.prototype.createElement = function () {
        var tooltipDiv = document.createElement('div');
        tooltipDiv.id = this.element.id + '_tooltip';
        tooltipDiv.className = 'ejSVGTooltip';
        tooltipDiv.setAttribute('style', 'pointer-events:none; position:absolute;z-index: 1');
        return tooltipDiv;
    };
    BaseTooltip.prototype.pushData = function (data, isFirst, tooltipDiv, isChart) {
        if (data.series.enableTooltip) {
            if (isChart) {
                this.currentPoints.push(data);
            }
            else {
                this.currentPoints.push(data);
            }
            this.stopAnimation();
            if (tooltipDiv && !document.getElementById(tooltipDiv.id)) {
                if (!this.chart.stockChart) {
                    document.getElementById(this.element.id + '_Secondary_Element').appendChild(tooltipDiv);
                }
                else {
                    document.getElementById(this.chart.stockChart.element.id + '_Secondary_Element').appendChild(tooltipDiv);
                }
            }
            return true;
        }
        return false;
    };
    BaseTooltip.prototype.removeHighlight = function (chart) {
        var item;
        var series;
        for (var i = 0, len = this.previousPoints.length; i < len; i++) {
            item = this.previousPoints[i];
            if (item.series.isRectSeries) {
                if (item.series.visible) {
                    this.highlightPoint(item.series, item.point.index, false);
                }
                continue;
            }
            series = item.series;
            if (!series.marker.visible && item.series.type !== 'Scatter' && item.series.type !== 'Bubble') {
                this.previousPoints.shift();
                len -= 1;
            }
        }
    };
    BaseTooltip.prototype.highlightPoint = function (series, pointIndex, highlight) {
        var element = this.getElement(this.element.id + '_Series_' + series.index + '_Point_' + pointIndex);
        if (element) {
            element.setAttribute('opacity', (highlight ? series.opacity / 2 : series.opacity).toString());
        }
    };
    BaseTooltip.prototype.highlightPoints = function () {
        for (var _i = 0, _a = this.currentPoints; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.series.isRectSeries && item.series.category === 'Series') {
                this.highlightPoint(item.series, item.point.index, true);
            }
        }
    };
    BaseTooltip.prototype.createTooltip = function (chart, isFirst, header, location, clipLocation, point, shapes, offset, bounds, extraPoints, templatePoint) {
        if (extraPoints === void 0) { extraPoints = null; }
        if (templatePoint === void 0) { templatePoint = null; }
        var series = this.currentPoints[0].series;
        var module = chart.tooltipModule || chart.accumulationTooltipModule;
        if (isFirst) {
            this.svgTooltip = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Tooltip"]({
                opacity: chart.tooltip.opacity,
                header: header, content: this.text, fill: chart.tooltip.fill, border: chart.tooltip.border,
                enableAnimation: chart.tooltip.enableAnimation, location: location, shared: chart.tooltip.shared,
                shapes: shapes, clipBounds: this.chart.chartAreaType === 'PolarRadar' ? new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](0, 0) : clipLocation,
                areaBounds: bounds, palette: this.findPalette(), template: chart.tooltip.template, data: templatePoint,
                theme: chart.theme, offset: offset, textStyle: chart.tooltip.textStyle,
                isNegative: (series.isRectSeries && series.type !== 'Waterfall' && point && point.y < 0),
                inverted: this.chart.requireInvertedAxis && series.isRectSeries,
                arrowPadding: this.text.length > 1 || this.chart.stockChart ? 0 : 12,
                availableSize: chart.availableSize,
                isCanvas: this.chart.enableCanvas,
                tooltipRender: function () {
                    module.removeHighlight(module.control);
                    module.highlightPoints();
                    module.updatePreviousPoint(extraPoints);
                },
                animationComplete: function (args) {
                    if (args.tooltip.fadeOuted) {
                        module.fadeOut(module.previousPoints, chart);
                    }
                }
            }, '#' + this.element.id + '_tooltip');
        }
        else {
            if (this.svgTooltip) {
                this.svgTooltip.location = location;
                this.svgTooltip.content = this.text;
                this.svgTooltip.header = header;
                this.svgTooltip.offset = offset;
                this.svgTooltip.palette = this.findPalette();
                this.svgTooltip.shapes = shapes;
                this.svgTooltip.data = templatePoint;
                this.svgTooltip.template = chart.tooltip.template;
                this.svgTooltip.textStyle = chart.tooltip.textStyle;
                this.svgTooltip.isNegative = (series.isRectSeries && series.type !== 'Waterfall' && point && point.y < 0);
                this.svgTooltip.clipBounds = this.chart.chartAreaType === 'PolarRadar' ? new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["ChartLocation"](0, 0) : clipLocation;
                this.svgTooltip.arrowPadding = this.text.length > 1 || this.chart.stockChart ? 0 : 12;
                this.svgTooltip.dataBind();
            }
        }
    };
    BaseTooltip.prototype.findPalette = function () {
        var colors = [];
        for (var _i = 0, _a = this.currentPoints; _i < _a.length; _i++) {
            var data = _a[_i];
            colors.push(this.findColor(data, data.series));
        }
        return colors;
    };
    BaseTooltip.prototype.findColor = function (data, series) {
        if (series.isRectSeries && (series.type === 'Candle' || series.type === 'Hilo' || series.type === 'HiloOpenClose')) {
            return data.point.color;
        }
        else {
            return (data.point.color && data.point.color !== '#ffffff' ? data.point.color
                : data.point.interior) ||
                series.marker.fill || series.interior;
        }
    };
    BaseTooltip.prototype.updatePreviousPoint = function (extraPoints) {
        if (extraPoints) {
            this.currentPoints = this.currentPoints.concat(extraPoints);
        }
        this.previousPoints = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], this.currentPoints, null, true);
    };
    BaseTooltip.prototype.fadeOut = function (data, chart) {
        var svgElement = this.chart.enableCanvas ? this.getElement(this.element.id + '_tooltip_group') :
            this.getElement(this.element.id + '_tooltip_svg');
        var isTooltip = (svgElement && parseInt(svgElement.getAttribute('opacity'), 10) > 0);
        if (!isTooltip) {
            this.valueX = null;
            this.valueY = null;
            this.currentPoints = [];
            this.removeHighlight(chart);
            this.removeHighlightedMarker(data);
            this.svgTooltip = null;
            this.control.trigger('animationComplete', {});
        }
    };
    /*
    * @hidden
    */
    BaseTooltip.prototype.removeHighlightedMarker = function (data) {
        if (this.chart.markerRender) {
            for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {
                var item = data_1[_i];
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.element.id + '_Series_' + item.series.index +
                    '_Point_' + item.point.index + '_Trackball');
            }
            this.chart.markerRender.removeHighlightedMarker();
        }
        this.previousPoints = [];
    };
    BaseTooltip.prototype.triggerEvent = function (point, isFirst, textCollection, firstText) {
        if (firstText === void 0) { firstText = true; }
        var argsData = {
            cancel: false, name: _common_model_constants__WEBPACK_IMPORTED_MODULE_3__["tooltipRender"], text: textCollection,
            point: point.point, series: point.series, textStyle: this.textStyle
        };
        this.chart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_3__["tooltipRender"], argsData);
        if (!argsData.cancel) {
            if (point.series.type === 'BoxAndWhisker') {
                this.removeText();
                isFirst = true;
            }
            this.formattedText = this.formattedText.concat(argsData.text);
            this.text = this.formattedText;
        }
        return !argsData.cancel;
    };
    BaseTooltip.prototype.removeText = function () {
        this.textElements = [];
        var element = this.getElement(this.element.id + '_tooltip_group');
        if (element && element.childNodes.length > 0) {
            while (element.lastChild && element.childNodes.length !== 1) {
                element.removeChild(element.lastChild);
            }
        }
    };
    BaseTooltip.prototype.stopAnimation = function () {
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stopTimer"])(this.toolTipInterval);
    };
    /**
     * Removes the tooltip on mouse leave.
     * @return {void}
     * @private
     */
    BaseTooltip.prototype.removeTooltip = function (duration) {
        var _this = this;
        var tooltipElement = this.getElement(this.element.id + '_tooltip');
        this.stopAnimation();
        if (tooltipElement && this.previousPoints.length > 0) {
            this.toolTipInterval = setTimeout(function () {
                if (_this.svgTooltip) {
                    _this.svgTooltip.fadeOut();
                }
            }, duration);
        }
    };
    return BaseTooltip;
}(_chart_utils_get_data__WEBPACK_IMPORTED_MODULE_2__["ChartData"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/utils/export.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/utils/export.js ***!
  \************************************************************************/
/*! exports provided: ExportUtils */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportUtils", function() { return ExportUtils; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _model_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-pdf-export */ "./node_modules/@syncfusion/ej2-pdf-export/index.js");





var ExportUtils = /** @class */ (function () {
    /**
     * Constructor for chart and accumulation annotation
     * @param control
     */
    function ExportUtils(control) {
        this.control = control;
    }
    /**
     * To print the accumulation and chart elements
     * @param elements
     */
    ExportUtils.prototype.print = function (elements) {
        this.printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
        this.printWindow.moveTo(0, 0);
        this.printWindow.resizeTo(screen.availWidth, screen.availHeight);
        var argsData = {
            cancel: false, htmlContent: this.getHTMLContent(elements), name: _model_constants__WEBPACK_IMPORTED_MODULE_3__["beforePrint"]
        };
        this.control.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_3__["beforePrint"], argsData);
        if (!argsData.cancel) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["print"])(argsData.htmlContent, this.printWindow);
        }
    };
    /**
     * To get the html string of the chart and accumulation
     * @param elements
     * @private
     */
    ExportUtils.prototype.getHTMLContent = function (elements) {
        var div = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div');
        if (elements) {
            if (elements instanceof Array) {
                elements.forEach(function (value) {
                    div.appendChild(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(value).cloneNode(true));
                });
            }
            else if (elements instanceof Element) {
                div.appendChild(elements.cloneNode(true));
            }
            else {
                div.appendChild(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getElement"])(elements).cloneNode(true));
            }
        }
        else {
            div.appendChild(this.control.element.cloneNode(true));
        }
        return div;
    };
    /**
     * To export the file as image/svg format
     * @param type
     * @param fileName
     */
    ExportUtils.prototype.export = function (type, fileName, orientation, controls, width, height, isVertical) {
        var _this = this;
        var controlValue = this.getControlsValue(controls, isVertical);
        width = width ? width : controlValue.width;
        height = height ? height : controlValue.height;
        var element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('canvas', {
            id: 'ej2-canvas',
            attrs: {
                'width': width.toString(),
                'height': height.toString()
            }
        });
        var isDownload = !(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].userAgent.toString().indexOf('HeadlessChrome') > -1);
        orientation = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(orientation) ? _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_4__["PdfPageOrientation"].Landscape : orientation;
        var svgData = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
            controlValue.svg.outerHTML +
            '</svg>';
        var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
            [(new XMLSerializer()).serializeToString(controlValue.svg)], { type: 'image/svg+xml' }));
        if (type === 'SVG') {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie') {
                var svg = new Blob([(new XMLSerializer()).serializeToString(controlValue.svg)], { type: 'application/octet-stream' });
                window.navigator.msSaveOrOpenBlob(svg, fileName + '.' + type.toLocaleLowerCase());
            }
            else {
                this.triggerDownload(fileName, type, url, isDownload);
            }
        }
        else {
            var image_1 = new Image();
            var ctx_1 = element.getContext('2d');
            image_1.onload = (function () {
                ctx_1.drawImage(image_1, 0, 0);
                window.URL.revokeObjectURL(url);
                if (type === 'PDF') {
                    var document_1 = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_4__["PdfDocument"]();
                    var margin = document_1.pageSettings.margins;
                    var pdfDefaultWidth = document_1.pageSettings.width;
                    var pdfDefaultHeight = document_1.pageSettings.height;
                    var exactWidth = void 0;
                    var exactHeight = void 0;
                    var imageString = element.toDataURL('image/jpeg').replace('image/jpeg', 'image/octet-stream');
                    document_1.pageSettings.orientation = orientation;
                    exactWidth = (pdfDefaultWidth < width) ? (width + margin.left + margin.right) : pdfDefaultWidth;
                    exactHeight = (pdfDefaultHeight < height) ? (height + margin.top + margin.bottom) : pdfDefaultHeight;
                    document_1.pageSettings.size = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_4__["SizeF"](exactWidth, exactHeight);
                    imageString = imageString.slice(imageString.indexOf(',') + 1);
                    document_1.pages.add().graphics.drawImage(new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_4__["PdfBitmap"](imageString), 0, 0, width, height);
                    if (isDownload) {
                        document_1.save(fileName + '.pdf');
                        document_1.destroy();
                    }
                }
                else {
                    if (window.navigator.msSaveOrOpenBlob) {
                        window.navigator.msSaveOrOpenBlob(element.msToBlob(), fileName + '.' + type.toLocaleLowerCase());
                    }
                    else {
                        _this.triggerDownload(fileName, type, element.toDataURL('image/png').replace('image/png', 'image/octet-stream'), isDownload);
                    }
                }
            });
            image_1.src = url;
        }
    };
    /**
     * To trigger the download element
     * @param fileName
     * @param type
     * @param url
     */
    ExportUtils.prototype.triggerDownload = function (fileName, type, url, isDownload) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('a', {
            attrs: {
                'download': fileName + '.' + type.toLocaleLowerCase(),
                'href': url
            }
        }).dispatchEvent(new MouseEvent(isDownload ? 'click' : 'move', {
            view: window,
            bubbles: false,
            cancelable: true
        }));
    };
    /**
     * To get the maximum size value
     * @param controls
     * @param name
     */
    ExportUtils.prototype.getControlsValue = function (controls, isVertical) {
        var width = 0;
        var height = 0;
        var content = '';
        var svgObject = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["SvgRenderer"]('').createSvg({
            id: 'Svg_Export_Element',
            width: 200, height: 200
        });
        controls.map(function (control) {
            var svg = control.svgObject.cloneNode(true);
            var groupEle = control.renderer.createGroup({
                style: (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isVertical) || isVertical) ? 'transform: translateY(' + height + 'px)' :
                    'transform: translateX(' + width + 'px)'
            });
            groupEle.appendChild(svg);
            width = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isVertical) || isVertical) ? Math.max(control.availableSize.width, width) :
                width + control.availableSize.width;
            height = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isVertical) || isVertical) ? height + control.availableSize.height :
                Math.max(control.availableSize.height, height);
            content += control.svgObject.outerHTML;
            svgObject.appendChild(groupEle);
        });
        svgObject.setAttribute('width', width + '');
        svgObject.setAttribute('height', height + '');
        return {
            'width': width,
            'height': height,
            'svg': svgObject
        };
    };
    return ExportUtils;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js ***!
  \************************************************************************/
/*! exports provided: sort, isBreakLabel, rotateTextSize, removeElement, logBase, showTooltip, inside, withIn, logWithIn, withInRange, sum, subArraySum, subtractThickness, subtractRect, degreeToLocation, getAngle, subArray, valueToCoefficient, TransformToVisible, indexFinder, CoefficientToVector, valueToPolarCoefficient, Mean, PolarArc, createTooltip, createZoomingLabels, withInBounds, getValueXByPoint, getValueYByPoint, findClipRect, firstToLowerCase, getTransform, getMinPointsDelta, getAnimationFunction, linear, markerAnimate, animateRectElement, pathAnimation, appendClipElement, triggerLabelRender, setRange, getActualDesiredIntervalsCount, templateAnimate, drawSymbol, calculateShapes, getRectLocation, minMax, getElement, getTemplateFunction, createTemplate, getFontStyle, measureElementRect, findlElement, getPoint, appendElement, appendChildElement, getDraggedRectLocation, checkBounds, getLabelText, stopTimer, isCollide, isOverlap, containsRect, calculateRect, convertToHexCode, componentToHex, convertHexToColor, colorNameToHex, getSaturationColor, getMedian, calculateLegendShapes, textTrim, lineBreakLabelTrim, stringToNumber, redrawElement, animateRedrawElement, textElement, calculateSize, createSvg, getTitle, titlePositionX, textWrap, blazorTemplatesReset, CustomizeOption, StackValues, RectOption, CircleOption, PolygonOption, ChartLocation, Thickness, ColorValue, PointData, AccPointData, ControlPoints */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return sort; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBreakLabel", function() { return isBreakLabel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotateTextSize", function() { return rotateTextSize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return removeElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logBase", function() { return logBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showTooltip", function() { return showTooltip; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inside", function() { return inside; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withIn", function() { return withIn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logWithIn", function() { return logWithIn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withInRange", function() { return withInRange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return sum; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subArraySum", function() { return subArraySum; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtractThickness", function() { return subtractThickness; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtractRect", function() { return subtractRect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "degreeToLocation", function() { return degreeToLocation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAngle", function() { return getAngle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subArray", function() { return subArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "valueToCoefficient", function() { return valueToCoefficient; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransformToVisible", function() { return TransformToVisible; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexFinder", function() { return indexFinder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CoefficientToVector", function() { return CoefficientToVector; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "valueToPolarCoefficient", function() { return valueToPolarCoefficient; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mean", function() { return Mean; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PolarArc", function() { return PolarArc; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTooltip", function() { return createTooltip; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createZoomingLabels", function() { return createZoomingLabels; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withInBounds", function() { return withInBounds; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getValueXByPoint", function() { return getValueXByPoint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getValueYByPoint", function() { return getValueYByPoint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findClipRect", function() { return findClipRect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstToLowerCase", function() { return firstToLowerCase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTransform", function() { return getTransform; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMinPointsDelta", function() { return getMinPointsDelta; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAnimationFunction", function() { return getAnimationFunction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "markerAnimate", function() { return markerAnimate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animateRectElement", function() { return animateRectElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pathAnimation", function() { return pathAnimation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendClipElement", function() { return appendClipElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triggerLabelRender", function() { return triggerLabelRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setRange", function() { return setRange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActualDesiredIntervalsCount", function() { return getActualDesiredIntervalsCount; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateAnimate", function() { return templateAnimate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawSymbol", function() { return drawSymbol; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateShapes", function() { return calculateShapes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRectLocation", function() { return getRectLocation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minMax", function() { return minMax; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return getElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTemplateFunction", function() { return getTemplateFunction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTemplate", function() { return createTemplate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFontStyle", function() { return getFontStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "measureElementRect", function() { return measureElementRect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findlElement", function() { return findlElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPoint", function() { return getPoint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendElement", function() { return appendElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendChildElement", function() { return appendChildElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDraggedRectLocation", function() { return getDraggedRectLocation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkBounds", function() { return checkBounds; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLabelText", function() { return getLabelText; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopTimer", function() { return stopTimer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCollide", function() { return isCollide; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isOverlap", function() { return isOverlap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "containsRect", function() { return containsRect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateRect", function() { return calculateRect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToHexCode", function() { return convertToHexCode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "componentToHex", function() { return componentToHex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertHexToColor", function() { return convertHexToColor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorNameToHex", function() { return colorNameToHex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSaturationColor", function() { return getSaturationColor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMedian", function() { return getMedian; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateLegendShapes", function() { return calculateLegendShapes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textTrim", function() { return textTrim; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineBreakLabelTrim", function() { return lineBreakLabelTrim; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringToNumber", function() { return stringToNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "redrawElement", function() { return redrawElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animateRedrawElement", function() { return animateRedrawElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textElement", function() { return textElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateSize", function() { return calculateSize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return createSvg; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "titlePositionX", function() { return titlePositionX; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textWrap", function() { return textWrap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blazorTemplatesReset", function() { return blazorTemplatesReset; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomizeOption", function() { return CustomizeOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackValues", function() { return StackValues; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RectOption", function() { return RectOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CircleOption", function() { return CircleOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PolygonOption", function() { return PolygonOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChartLocation", function() { return ChartLocation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Thickness", function() { return Thickness; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorValue", function() { return ColorValue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PointData", function() { return PointData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccPointData", function() { return AccPointData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControlPoints", function() { return ControlPoints; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _chart_axis_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../chart/axis/axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis.js");
/* harmony import */ var _model_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







/**
 * Function to sort the dataSource, by default it sort the data in ascending order.
 * @param  {Object} data
 * @param  {string} fields
 * @param  {boolean} isDescending
 * @returns Object
 */
function sort(data, fields, isDescending) {
    var sortData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], data, null);
    sortData.sort(function (a, b) {
        var first = 0;
        var second = 0;
        for (var i = 0; i < fields.length; i++) {
            first += a[fields[i]];
            second += b[fields[i]];
        }
        if ((!isDescending && first < second) || (isDescending && first > second)) {
            return -1;
        }
        else if (first === second) {
            return 0;
        }
        return 1;
    });
    return sortData;
}
/** @private */
function isBreakLabel(label) {
    return label.indexOf('<br>') !== -1;
}
/** @private */
function rotateTextSize(font, text, angle, chart) {
    var renderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["SvgRenderer"](chart.element.id);
    var box;
    var options;
    var htmlObject;
    options = {
        'font-size': font.size,
        'font-style': font.fontStyle,
        'font-family': font.fontFamily,
        'font-weight': font.fontWeight,
        'transform': 'rotate(' + angle + ', 0, 0)',
        'text-anchor': 'middle'
    };
    htmlObject = renderer.createText(options, text);
    if (!chart.delayRedraw && !chart.redraw) {
        chart.element.appendChild(chart.svgObject);
    }
    chart.svgObject.appendChild(htmlObject);
    box = htmlObject.getBoundingClientRect();
    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(htmlObject);
    if (!chart.delayRedraw && !chart.redraw) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(chart.svgObject);
    }
    return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Size"]((box.right - box.left), (box.bottom - box.top));
}
/** @private */
function removeElement(id) {
    if (!id) {
        return null;
    }
    var element = typeof id === 'string' ? getElement(id) : id;
    if (element) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element);
    }
}
/** @private */
function logBase(value, base) {
    return Math.log(value) / Math.log(base);
}
/** @private */
function showTooltip(text, x, y, areaWidth, id, element, isTouch) {
    //let id1: string = 'EJ2_legend_tooltip';
    var tooltip = document.getElementById(id);
    var width = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])(text, {
        fontFamily: 'Segoe UI', size: '12px',
        fontStyle: 'Normal', fontWeight: 'Regular'
    }).width + 5;
    x = (x + width > areaWidth) ? x - width : x;
    if (!tooltip) {
        tooltip = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            innerHTML: text,
            id: id,
            styles: 'top:' + (y + 15).toString() + 'px;left:' + (x + 15).toString() +
                'px;background-color: rgb(255, 255, 255) !important; color:black !important; ' +
                'position:absolute;border:1px solid rgb(112, 112, 112); padding-left : 3px; padding-right : 2px;' +
                'padding-bottom : 2px; padding-top : 2px; font-size:12px; font-family: "Segoe UI"'
        });
        element.appendChild(tooltip);
    }
    else {
        tooltip.innerHTML = text;
        tooltip.style.top = (y + 15).toString() + 'px';
        tooltip.style.left = (x + 15).toString() + 'px';
    }
    if (isTouch) {
        setTimeout(function () { removeElement(id); }, 1500);
    }
}
/** @private */
function inside(value, range) {
    return (value < range.max) && (value > range.min);
}
/** @private */
function withIn(value, range) {
    return (value <= range.max) && (value >= range.min);
}
/** @private */
function logWithIn(value, axis) {
    if (axis.valueType === 'Logarithmic') {
        value = logBase(value, axis.logBase);
    }
    else {
        value = value;
    }
    return value;
}
/** @private */
function withInRange(previousPoint, currentPoint, nextPoint, series) {
    var mX2 = logWithIn(currentPoint.xValue, series.xAxis);
    var mX1 = previousPoint ? logWithIn(previousPoint.xValue, series.xAxis) : mX2;
    var mX3 = nextPoint ? logWithIn(nextPoint.xValue, series.xAxis) : mX2;
    var xStart = Math.floor(series.xAxis.visibleRange.min);
    var xEnd = Math.ceil(series.xAxis.visibleRange.max);
    return ((mX1 >= xStart && mX1 <= xEnd) || (mX2 >= xStart && mX2 <= xEnd) ||
        (mX3 >= xStart && mX3 <= xEnd) || (xStart >= mX1 && xStart <= mX3));
}
/** @private */
function sum(values) {
    var sum = 0;
    for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
        var value = values_1[_i];
        sum += value;
    }
    return sum;
}
/** @private */
function subArraySum(values, first, last, index, series) {
    var sum = 0;
    if (index !== null) {
        for (var i = (first + 1); i < last; i++) {
            if (index.indexOf(i) === -1) {
                sum += values[i][series.yName];
            }
        }
    }
    else {
        for (var i = (first + 1); i < last; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(values[i][series.yName])) {
                sum += values[i][series.yName];
            }
        }
    }
    return sum;
}
/** @private */
function subtractThickness(rect, thickness) {
    rect.x += thickness.left;
    rect.y += thickness.top;
    rect.width -= thickness.left + thickness.right;
    rect.height -= thickness.top + thickness.bottom;
    return rect;
}
/** @private */
function subtractRect(rect, thickness) {
    rect.x += thickness.x;
    rect.y += thickness.y;
    rect.width -= thickness.x + thickness.width;
    rect.height -= thickness.y + thickness.height;
    return rect;
}
/** @private */
function degreeToLocation(degree, radius, center) {
    var radian = (degree * Math.PI) / 180;
    return new ChartLocation(Math.cos(radian) * radius + center.x, Math.sin(radian) * radius + center.y);
}
function getAccumulationLegend(locX, locY, r, height, width, mode) {
    var cartesianlarge = degreeToLocation(270, r, new ChartLocation(locX, locY));
    var cartesiansmall = degreeToLocation(270, r, new ChartLocation(locX + (width / 10), locY));
    return 'M' + ' ' + locX + ' ' + locY + ' ' + 'L' + ' ' + (locX + r) + ' ' + (locY) + ' ' + 'A' + ' ' + (r) + ' ' + (r) +
        ' ' + 0 + ' ' + 1 + ' ' + 1 + ' ' + cartesianlarge.x + ' ' + cartesianlarge.y + ' ' + 'Z' + ' ' + 'M' + ' ' + (locX +
        (width / 10)) + ' ' + (locY - (height / 10)) + ' ' + 'L' + (locX + (r)) + ' ' + (locY - height / 10) + ' ' + 'A' + ' '
        + (r) + ' ' + (r) + ' ' + 0 + ' ' + 0 + ' ' + 0 + ' ' + cartesiansmall.x + ' ' + cartesiansmall.y + ' ' + 'Z';
}
/** @private */
function getAngle(center, point) {
    var angle = Math.atan2((point.y - center.y), (point.x - center.x));
    angle = angle < 0 ? (6.283 + angle) : angle;
    return angle * (180 / Math.PI);
}
/** @private */
function subArray(values, index) {
    var subArray = [];
    for (var i = 0; i <= index - 1; i++) {
        subArray.push(values[i]);
    }
    return subArray;
}
/** @private */
function valueToCoefficient(value, axis) {
    var range = axis.visibleRange;
    var result = (value - range.min) / (range.delta);
    return axis.isInversed ? (1 - result) : result;
}
/** @private */
function TransformToVisible(x, y, xAxis, yAxis, isInverted, series) {
    x = (xAxis.valueType === 'Logarithmic' ? logBase(x > 1 ? x : 1, xAxis.logBase) : x);
    y = (yAxis.valueType === 'Logarithmic' ?
        logBase(y > 1 ? y : 1, yAxis.logBase) : y);
    x += xAxis.valueType === 'Category' && xAxis.labelPlacement === 'BetweenTicks' && series.type !== 'Radar' ? 0.5 : 0;
    var radius = series.chart.radius * valueToCoefficient(y, yAxis);
    var point = CoefficientToVector(valueToPolarCoefficient(x, xAxis), series.chart.primaryXAxis.startAngle);
    return {
        x: (series.clipRect.width / 2 + series.clipRect.x) + radius * point.x,
        y: (series.clipRect.height / 2 + series.clipRect.y) + radius * point.y
    };
}
/**
 * method to find series, point index by element id
 * @private
 */
function indexFinder(id, isPoint) {
    if (isPoint === void 0) { isPoint = false; }
    var ids = ['NaN', 'NaN'];
    if (id.indexOf('_Point_') > -1) {
        ids = id.split('_Series_')[1].split('_Point_');
    }
    else if (id.indexOf('_shape_') > -1 && (!isPoint || (isPoint && id.indexOf('_legend_') === -1))) {
        ids = id.split('_shape_');
        ids[0] = '0';
    }
    else if (id.indexOf('_text_') > -1 && (!isPoint || (isPoint && id.indexOf('_legend_') === -1))) {
        ids = id.split('_text_');
        ids[0] = '0';
    }
    return new _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Index"](parseInt(ids[0], 10), parseInt(ids[1], 10));
}
/** @private */
function CoefficientToVector(coefficient, startAngle) {
    startAngle = startAngle < 0 ? startAngle + 360 : startAngle;
    var angle = Math.PI * (1.5 - 2 * coefficient);
    angle = angle + (startAngle * Math.PI) / 180;
    return { x: Math.cos(angle), y: Math.sin(angle) };
}
/** @private */
function valueToPolarCoefficient(value, axis) {
    var range = axis.visibleRange;
    var delta;
    var length;
    if (axis.valueType !== 'Category') {
        delta = (range.max - (axis.valueType === 'DateTime' ? axis.dateTimeInterval : range.interval)) - range.min;
        length = axis.visibleLabels.length - 1;
        delta = delta === 0 ? 1 : delta;
    }
    else {
        delta = range.delta;
        length = axis.visibleLabels.length;
    }
    return axis.isInversed ? ((value - range.min) / delta) * (1 - 1 / (length)) :
        1 - ((value - range.min) / delta) * (1 - 1 / (length));
}
/** @private */
var Mean = /** @class */ (function () {
    function Mean(verticalStandardMean, verticalSquareRoot, horizontalStandardMean, horizontalSquareRoot, verticalMean, horizontalMean) {
        this.verticalStandardMean = verticalStandardMean;
        this.horizontalStandardMean = horizontalStandardMean;
        this.verticalSquareRoot = verticalSquareRoot;
        this.horizontalSquareRoot = horizontalSquareRoot;
        this.verticalMean = verticalMean;
        this.horizontalMean = horizontalMean;
    }
    return Mean;
}());

/** @private */
var PolarArc = /** @class */ (function () {
    function PolarArc(startAngle, endAngle, innerRadius, radius, currentXPosition) {
        this.startAngle = startAngle;
        this.endAngle = endAngle;
        this.innerRadius = innerRadius;
        this.radius = radius;
        this.currentXPosition = currentXPosition;
    }
    return PolarArc;
}());

/** @private */
function createTooltip(id, text, top, left, fontSize) {
    var tooltip = getElement(id);
    var style = 'top:' + top.toString() + 'px;' +
        'left:' + left.toString() + 'px;' +
        'color:black !important; ' +
        'background:#FFFFFF !important; ' +
        'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px; z-index:1';
    if (!tooltip) {
        tooltip = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            id: id, innerHTML: '&nbsp;' + text + '&nbsp;', styles: style
        });
        document.body.appendChild(tooltip);
    }
    else {
        tooltip.setAttribute('innerHTML', '&nbsp;' + text + '&nbsp;');
        tooltip.setAttribute('styles', style);
    }
}
/** @private */
function createZoomingLabels(chart, axis, parent, index, isVertical, rect) {
    var margin = 5;
    var opposedPosition = axis.opposedPosition;
    var anchor = isVertical ? 'start' : 'auto';
    var size;
    var chartRect = chart.availableSize.width;
    var x;
    var y;
    var rx = 3;
    var arrowLocation;
    var direction;
    var scrollBarHeight = axis.scrollbarSettings.enable || (axis.zoomingScrollBar && axis.zoomingScrollBar.svgObject)
        ? axis.scrollBarHeight : 0;
    for (var i = 0; i < 2; i++) {
        size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])(i ? axis.endLabel : axis.startLabel, axis.labelStyle);
        if (isVertical) {
            arrowLocation = i ? new ChartLocation(rect.x - scrollBarHeight, rect.y + rx) :
                new ChartLocation(axis.rect.x - scrollBarHeight, (rect.y + rect.height - rx));
            x = (rect.x + (opposedPosition ? (rect.width + margin + scrollBarHeight) : -(size.width + margin + margin + scrollBarHeight)));
            y = (rect.y + (i ? 0 : rect.height - size.height - margin));
            x += (x < 0 || ((chartRect) < (x + size.width + margin))) ? (opposedPosition ? -(size.width / 2) : size.width / 2) : 0;
            direction = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["findDirection"])(rx, rx, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](x, y, size.width + margin, size.height + margin), arrowLocation, margin, false, false, !opposedPosition, arrowLocation.x, arrowLocation.y + (i ? -rx : rx));
        }
        else {
            arrowLocation = i ? new ChartLocation((rect.x + rect.width - rx), (rect.y + rect.height + scrollBarHeight)) :
                new ChartLocation(rect.x + rx, (rect.y + rect.height + scrollBarHeight));
            x = (rect.x + (i ? (rect.width - size.width - margin) : 0));
            y = (opposedPosition ? (rect.y - size.height - 10 - scrollBarHeight) : (rect.y + rect.height + margin + scrollBarHeight));
            direction = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["findDirection"])(rx, rx, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](x, y, size.width + margin, size.height + margin), arrowLocation, margin, opposedPosition, !opposedPosition, false, arrowLocation.x + (i ? rx : -rx), arrowLocation.y);
        }
        x = x + (margin / 2);
        y = y + (3 * (size.height / 4)) + (margin / 2);
        parent.appendChild(chart.renderer.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["PathOption"](chart.element.id + '_Zoom_' + index + '_AxisLabel_Shape_' + i, chart.themeStyle.crosshairFill, 2, chart.themeStyle.crosshairFill, 1, null, direction)));
        textElement(chart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["TextOption"](chart.element.id + '_Zoom_' + index + '_AxisLabel_' + i, x, y, anchor, i ? axis.endLabel : axis.startLabel), { color: chart.themeStyle.crosshairLabel, fontFamily: 'Segoe UI', fontWeight: 'Regular', size: '11px' }, chart.themeStyle.crosshairLabel, parent);
    }
    return parent;
}
//Within bounds
/** @private */
function withInBounds(x, y, bounds, width, height) {
    if (width === void 0) { width = 0; }
    if (height === void 0) { height = 0; }
    return (x >= bounds.x - width && x <= bounds.x + bounds.width + width && y >= bounds.y - height
        && y <= bounds.y + bounds.height + height);
}
/** @private */
function getValueXByPoint(value, size, axis) {
    var actualValue = !axis.isInversed ? value / size : (1 - (value / size));
    return actualValue * (axis.visibleRange.delta) + axis.visibleRange.min;
}
/** @private */
function getValueYByPoint(value, size, axis) {
    var actualValue = axis.isInversed ? value / size : (1 - (value / size));
    return actualValue * (axis.visibleRange.delta) + axis.visibleRange.min;
}
/** @private */
function findClipRect(series) {
    var rect = series.clipRect;
    if (series.chart.requireInvertedAxis) {
        rect.x = series.yAxis.rect.x;
        rect.y = series.xAxis.rect.y;
        rect.width = series.yAxis.rect.width;
        rect.height = series.xAxis.rect.height;
    }
    else {
        rect.x = series.xAxis.rect.x;
        rect.y = series.yAxis.rect.y;
        rect.width = series.xAxis.rect.width;
        rect.height = series.yAxis.rect.height;
    }
}
/** @private */
function firstToLowerCase(str) {
    return str.substr(0, 1).toLowerCase() + str.substr(1);
}
/** @private */
function getTransform(xAxis, yAxis, invertedAxis) {
    var x;
    var y;
    var width;
    var height;
    if (invertedAxis) {
        x = yAxis.rect.x;
        y = xAxis.rect.y;
        width = yAxis.rect.width;
        height = xAxis.rect.height;
    }
    else {
        x = xAxis.rect.x;
        y = yAxis.rect.y;
        width = xAxis.rect.width;
        height = yAxis.rect.height;
    }
    return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](x, y, width, height);
}
/** @private */
function getMinPointsDelta(axis, seriesCollection) {
    var minDelta = Number.MAX_VALUE;
    var xValues;
    var minVal;
    var seriesMin;
    seriesCollection.forEach(function (series, index) {
        xValues = [];
        if (series.visible &&
            (axis.name === series.xAxisName || (axis.name === 'primaryXAxis' && series.xAxisName === null)
                || (axis.name === series.chart.primaryXAxis.name && !series.xAxisName))) {
            xValues = series.points.map(function (point, index) {
                return point.xValue;
            });
            xValues.sort(function (first, second) { return first - second; });
            if (xValues.length === 1) {
                seriesMin = (axis.valueType === 'DateTime' && series.xMin === series.xMax) ? (series.xMin - 2592000000) : series.xMin;
                minVal = xValues[0] - (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(seriesMin) ?
                    seriesMin : axis.visibleRange.min);
                if (minVal !== 0) {
                    minDelta = Math.min(minDelta, minVal);
                }
            }
            else {
                xValues.forEach(function (value, index, xValues) {
                    if (index > 0 && value) {
                        minVal = value - xValues[index - 1];
                        if (minVal !== 0) {
                            minDelta = Math.min(minDelta, minVal);
                        }
                    }
                });
            }
        }
    });
    if (minDelta === Number.MAX_VALUE) {
        minDelta = 1;
    }
    return minDelta;
}
/** @private */
function getAnimationFunction(effect) {
    var functionName;
    switch (effect) {
        case 'Linear':
            functionName = linear;
            break;
    }
    return functionName;
}
/**
 * Animation Effect Calculation Started Here
 * @param currentTime
 * @param startValue
 * @param endValue
 * @param duration
 * @private
 */
function linear(currentTime, startValue, endValue, duration) {
    return -endValue * Math.cos(currentTime / duration * (Math.PI / 2)) + endValue + startValue;
}
/**
 * Animation Effect Calculation End
 * @private
 */
function markerAnimate(element, delay, duration, series, pointIndex, point, isLabel) {
    var centerX = point.x;
    var centerY = point.y;
    var height = 0;
    element.style.visibility = 'hidden';
    new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(element, {
        duration: duration,
        delay: delay,
        progress: function (args) {
            if (args.timeStamp > args.delay) {
                args.element.style.visibility = 'visible';
                height = ((args.timeStamp - args.delay) / args.duration);
                element.setAttribute('transform', 'translate(' + centerX
                    + ' ' + centerY + ') scale(' + height + ') translate(' + (-centerX) + ' ' + (-centerY) + ')');
            }
        },
        end: function (model) {
            element.style.visibility = '';
            element.removeAttribute('transform');
            if ((series.type === 'Scatter' || series.type === 'Bubble') && !isLabel && (pointIndex === series.points.length - 1)) {
                series.chart.trigger('animationComplete', { series: series.chart.isBlazor ? {} : series });
            }
        }
    });
}
/**
 * Animate the rect element
 */
function animateRectElement(element, delay, duration, currentRect, previousRect) {
    var setStyle = function (rect) {
        element.setAttribute('x', rect.x + '');
        element.setAttribute('y', rect.y + '');
        element.setAttribute('width', rect.width + '');
        element.setAttribute('height', rect.height + '');
    };
    new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div'), {
        duration: duration,
        delay: delay,
        name: name,
        progress: function (args) {
            setStyle(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](linear(args.timeStamp, previousRect.x, currentRect.x - previousRect.x, args.duration), linear(args.timeStamp, previousRect.y, currentRect.y - previousRect.y, args.duration), linear(args.timeStamp, previousRect.width, currentRect.width - previousRect.width, args.duration), linear(args.timeStamp, previousRect.height, currentRect.height - previousRect.height, args.duration)));
        },
        end: function () {
            setStyle(currentRect);
        },
    });
}
/**
 * Animation after legend click a path
 * @param element element to be animated
 * @param direction current direction of the path
 * @param previousDirection previous direction of the path
 */
function pathAnimation(element, direction, redraw, previousDirection, animateDuration) {
    if (!redraw || (!previousDirection && !element)) {
        return null;
    }
    var duration = 300;
    if (animateDuration) {
        duration = animateDuration;
    }
    var startDirections = previousDirection || element.getAttribute('d');
    var splitDirections = startDirections.split(/(?=[LMCZAQ])/);
    var endDirections = direction.split(/(?=[LMCZAQ])/);
    var currentDireciton;
    var startPath = [];
    var endPath = [];
    var c;
    var end;
    element.setAttribute('d', startDirections);
    new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div'), {
        duration: duration,
        progress: function (args) {
            currentDireciton = '';
            splitDirections.map(function (directions, index) {
                startPath = directions.split(' ');
                endPath = endDirections[index] ? endDirections[index].split(' ') : startPath;
                if (startPath[0] === 'Z') {
                    currentDireciton += 'Z' + ' ';
                }
                else {
                    currentDireciton += startPath[0] + ' ' +
                        linear(args.timeStamp, +startPath[1], (+endPath[1] - +startPath[1]), args.duration) + ' ' +
                        linear(args.timeStamp, +startPath[2], (+endPath[2] - +startPath[2]), args.duration) + ' ';
                }
                if (startPath[0] === 'C' || startPath[0] === 'Q') {
                    c = 3;
                    end = startPath[0] === 'Q' ? 4 : 6;
                    while (c < end) {
                        currentDireciton += linear(args.timeStamp, +startPath[c], (+endPath[c] - +startPath[c]), args.duration) + ' ' +
                            linear(args.timeStamp, +startPath[++c], (+endPath[c] - +startPath[c]), args.duration) + ' ';
                        ++c;
                    }
                }
                if (startPath[0] === 'A') {
                    currentDireciton += 0 + ' ' + 0 + ' ' + 1 + ' ' +
                        linear(args.timeStamp, +startPath[6], (+endPath[6] - +startPath[6]), args.duration) + ' ' +
                        linear(args.timeStamp, +startPath[7], (+endPath[7] - +startPath[7]), args.duration) + ' ';
                }
            });
            element.setAttribute('d', currentDireciton);
        },
        end: function () {
            element.setAttribute('d', direction);
        }
    });
}
/**
 * To append the clip rect element
 * @param redraw
 * @param options
 * @param renderer
 * @param clipPath
 */
function appendClipElement(redraw, options, renderer, clipPath) {
    if (clipPath === void 0) { clipPath = 'drawClipPath'; }
    var clipElement = redrawElement(redraw, options.id, options, renderer);
    if (clipElement) {
        var def = renderer.createDefs();
        def.appendChild(clipElement);
        return def;
    }
    else {
        return renderer[clipPath](options);
    }
}
/**
 * Triggers the event.
 * @return {void}
 * @private
 */
function triggerLabelRender(chart, tempInterval, text, labelStyle, axis) {
    var argsData;
    argsData = {
        cancel: false, name: _model_constants__WEBPACK_IMPORTED_MODULE_3__["axisLabelRender"], axis: axis,
        text: text, value: tempInterval, labelStyle: labelStyle
    };
    chart.trigger(_model_constants__WEBPACK_IMPORTED_MODULE_3__["axisLabelRender"], argsData);
    if (!argsData.cancel) {
        var isLineBreakLabels = argsData.text.indexOf('<br>') !== -1;
        var text_1 = (axis.enableTrim) ? (isLineBreakLabels ?
            lineBreakLabelTrim(axis.maximumLabelWidth, argsData.text, axis.labelStyle) :
            textTrim(axis.maximumLabelWidth, argsData.text, axis.labelStyle)) : argsData.text;
        axis.visibleLabels.push(new _chart_axis_axis__WEBPACK_IMPORTED_MODULE_2__["VisibleLabels"](text_1, argsData.value, argsData.labelStyle, argsData.text));
    }
}
/**
 * The function used to find whether the range is set.
 * @return {boolean}
 * @private
 */
function setRange(axis) {
    return (axis.minimum != null && axis.maximum != null);
}
/**
 * Calculate desired interval for the axis.
 * @return {void}
 * @private
 */
function getActualDesiredIntervalsCount(availableSize, axis) {
    var size = axis.orientation === 'Horizontal' ? availableSize.width : availableSize.height;
    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.desiredIntervals)) {
        var desiredIntervalsCount = (axis.orientation === 'Horizontal' ? 0.533 : 1) * axis.maximumLabels;
        desiredIntervalsCount = Math.max((size * (desiredIntervalsCount / 100)), 1);
        return desiredIntervalsCount;
    }
    else {
        return axis.desiredIntervals;
    }
}
/**
 * Animation for template
 * @private
 */
function templateAnimate(element, delay, duration, name, isRemove) {
    new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(element, {
        duration: duration,
        delay: delay,
        name: name,
        progress: function (args) {
            args.element.style.visibility = 'visible';
        },
        end: function (args) {
            if (isRemove) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(args.element);
            }
            else {
                args.element.style.visibility = 'visible';
            }
        },
    });
}
/** @private */
function drawSymbol(location, shape, size, url, options, label, renderer, clipRect) {
    var chartRenderer = renderer ? renderer : new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["SvgRenderer"]('');
    var shapeOption = calculateShapes(location, size, shape, options, url);
    var drawElement = chartRenderer['draw' + shapeOption.functionName](shapeOption.renderOption, clipRect ? new Int32Array([clipRect.x, clipRect.y]) : null);
    //drawElement.setAttribute('aria-label', label);
    return drawElement;
}
/** @private */
function calculateShapes(location, size, shape, options, url) {
    var dir;
    var functionName = 'Path';
    var width = size.width;
    var height = size.height;
    var lx = location.x;
    var ly = location.y;
    var y = location.y + (-height / 2);
    var x = location.x + (-width / 2);
    switch (shape) {
        case 'Bubble':
        case 'Circle':
            functionName = 'Ellipse';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'rx': width / 2, 'ry': height / 2, 'cx': lx, 'cy': ly });
            break;
        case 'Cross':
            dir = 'M' + ' ' + x + ' ' + ly + ' ' + 'L' + ' ' + (lx + (width / 2)) + ' ' + ly + ' ' +
                'M' + ' ' + lx + ' ' + (ly + (height / 2)) + ' ' + 'L' + ' ' + lx + ' ' +
                (ly + (-height / 2));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'HorizontalLine':
            dir = 'M' + ' ' + x + ' ' + ly + ' ' + 'L' + ' ' + (lx + (width / 2)) + ' ' + ly;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'VerticalLine':
            dir = 'M' + ' ' + lx + ' ' + (ly + (height / 2)) + ' ' + 'L' + ' ' + lx + ' ' + (ly + (-height / 2));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Diamond':
            dir = 'M' + ' ' + x + ' ' + ly + ' ' +
                'L' + ' ' + lx + ' ' + (ly + (-height / 2)) + ' ' +
                'L' + ' ' + (lx + (width / 2)) + ' ' + ly + ' ' +
                'L' + ' ' + lx + ' ' + (ly + (height / 2)) + ' ' +
                'L' + ' ' + x + ' ' + ly + ' z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Rectangle':
        case 'Hilo':
        case 'HiloOpenClose':
        case 'Candle':
        case 'Waterfall':
        case 'BoxAndWhisker':
        case 'StepArea':
        case 'Square':
        case 'Flag':
            dir = 'M' + ' ' + x + ' ' + (ly + (-height / 2)) + ' ' +
                'L' + ' ' + (lx + (width / 2)) + ' ' + (ly + (-height / 2)) + ' ' +
                'L' + ' ' + (lx + (width / 2)) + ' ' + (ly + (height / 2)) + ' ' +
                'L' + ' ' + x + ' ' + (ly + (height / 2)) + ' ' +
                'L' + ' ' + x + ' ' + (ly + (-height / 2)) + ' z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Pyramid':
        case 'Triangle':
            dir = 'M' + ' ' + x + ' ' + (ly + (height / 2)) + ' ' +
                'L' + ' ' + lx + ' ' + (ly + (-height / 2)) + ' ' +
                'L' + ' ' + (lx + (width / 2)) + ' ' + (ly + (height / 2)) + ' ' +
                'L' + ' ' + x + ' ' + (ly + (height / 2)) + ' z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Funnel':
        case 'InvertedTriangle':
            dir = 'M' + ' ' + (lx + (width / 2)) + ' ' + (ly - (height / 2)) + ' ' +
                'L' + ' ' + lx + ' ' + (ly + (height / 2)) + ' ' +
                'L' + ' ' + (lx - (width / 2)) + ' ' + (ly - (height / 2)) + ' ' +
                'L' + ' ' + (lx + (width / 2)) + ' ' + (ly - (height / 2)) + ' z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Pentagon':
            var eq = 72;
            var xVal = void 0;
            var yVal = void 0;
            for (var i = 0; i <= 5; i++) {
                xVal = (width / 2) * Math.cos((Math.PI / 180) * (i * eq));
                yVal = (height / 2) * Math.sin((Math.PI / 180) * (i * eq));
                if (i === 0) {
                    dir = 'M' + ' ' + (lx + xVal) + ' ' + (ly + yVal) + ' ';
                }
                else {
                    dir = dir.concat('L' + ' ' + (lx + xVal) + ' ' + (ly + yVal) + ' ');
                }
            }
            dir = dir.concat('Z');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Image':
            functionName = 'Image';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'href': url, 'height': height, 'width': width, x: x, y: y });
            break;
    }
    options = calculateLegendShapes(location, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Size"](width, height), shape, options).renderOption;
    return { renderOption: options, functionName: functionName };
}
/** @private */
function getRectLocation(startLocation, endLocation, outerRect) {
    var x;
    var y;
    x = (endLocation.x < outerRect.x) ? outerRect.x :
        (endLocation.x > (outerRect.x + outerRect.width)) ? outerRect.x + outerRect.width : endLocation.x;
    y = (endLocation.y < outerRect.y) ? outerRect.y :
        (endLocation.y > (outerRect.y + outerRect.height)) ? outerRect.y + outerRect.height : endLocation.y;
    return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"]((x > startLocation.x ? startLocation.x : x), (y > startLocation.y ? startLocation.y : y), Math.abs(x - startLocation.x), Math.abs(y - startLocation.y));
}
/** @private */
function minMax(value, min, max) {
    return value > max ? max : (value < min ? min : value);
}
/** @private */
function getElement(id) {
    return document.getElementById(id);
}
/** @private */
function getTemplateFunction(template) {
    var templateFn = null;
    var e;
    try {
        if (document.querySelectorAll(template).length) {
            templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(template).innerHTML.trim());
        }
    }
    catch (e) {
        templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
    }
    return templateFn;
}
/** @private */
function createTemplate(childElement, pointIndex, content, chart, point, series) {
    var templateFn;
    var templateElement;
    templateFn = getTemplateFunction(content);
    try {
        var blazor = 'Blazor';
        var tempObject = window[blazor] ? {} : { chart: chart, series: series, point: point };
        var elementData = templateFn ? templateFn(tempObject, null, null, childElement.id.replace(/[^a-zA-Z0-9]/g, '')) : [];
        if (elementData.length) {
            templateElement = Array.prototype.slice.call(elementData);
            var len = templateElement.length;
            for (var i = 0; i < len; i++) {
                childElement.appendChild(templateElement[i]);
            }
        }
    }
    catch (e) {
        return childElement;
    }
    return childElement;
}
/** @private */
function getFontStyle(font) {
    var style = '';
    style = 'font-size:' + font.size +
        '; font-style:' + font.fontStyle + '; font-weight:' + font.fontWeight +
        '; font-family:' + font.fontFamily + ';opacity:' + font.opacity +
        '; color:' + font.color + ';';
    return style;
}
/** @private */
function measureElementRect(element, redraw) {
    if (redraw === void 0) { redraw = false; }
    var bounds;
    document.body.appendChild(element);
    bounds = element.getBoundingClientRect();
    if (redraw) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element);
    }
    else {
        removeElement(element.id);
    }
    return bounds;
}
/** @private */
function findlElement(elements, id) {
    var element;
    for (var i = 0, length_1 = elements.length; i < length_1; i++) {
        if (elements[i].id.indexOf(id) > -1) {
            element = elements[i];
            continue;
        }
    }
    return element;
}
/** @private */
function getPoint(x, y, xAxis, yAxis, isInverted, series) {
    x = ((xAxis.valueType === 'Logarithmic') ? logBase(((x > 1) ? x : 1), xAxis.logBase) : x);
    y = ((yAxis.valueType === 'Logarithmic') ? logBase(((y > 1) ? y : 1), yAxis.logBase) : y);
    x = valueToCoefficient(x, xAxis);
    y = valueToCoefficient(y, yAxis);
    var xLength = (isInverted ? xAxis.rect.height : xAxis.rect.width);
    var yLength = (isInverted ? yAxis.rect.width : yAxis.rect.height);
    var locationX = isInverted ? y * (yLength) : x * (xLength);
    var locationY = isInverted ? (1 - x) * (xLength) : (1 - y) * (yLength);
    return new ChartLocation(locationX, locationY);
}
/** @private */
function appendElement(child, parent, redraw, animate, x, y) {
    if (redraw === void 0) { redraw = false; }
    if (animate === void 0) { animate = false; }
    if (x === void 0) { x = 'x'; }
    if (y === void 0) { y = 'y'; }
    if (child && child.hasChildNodes() && parent) {
        appendChildElement(false, parent, child, redraw, animate, x, y);
    }
    else {
        return null;
    }
}
/**
 * Method to append child element
 * @param parent
 * @param childElement
 * @param isReplace
 */
function appendChildElement(isCanvas, parent, childElement, redraw, isAnimate, x, y, start, direction, forceAnimate, isRect, previousRect, animateDuration) {
    if (isAnimate === void 0) { isAnimate = false; }
    if (x === void 0) { x = 'x'; }
    if (y === void 0) { y = 'y'; }
    if (forceAnimate === void 0) { forceAnimate = false; }
    if (isRect === void 0) { isRect = false; }
    if (previousRect === void 0) { previousRect = null; }
    if (isCanvas) {
        return null;
    }
    var existChild = parent.querySelector('#' + childElement.id);
    var element = (existChild || getElement(childElement.id));
    var child = childElement;
    var duration = animateDuration ? animateDuration : 300;
    if (redraw && isAnimate && element) {
        start = start || (element.tagName === 'DIV' ?
            new ChartLocation(+(element.style[x].split('px')[0]), +(element.style[y].split('px')[0])) :
            new ChartLocation(+element.getAttribute(x), +element.getAttribute(y)));
        if (direction && direction !== 'undefined') {
            pathAnimation(childElement, childElement.getAttribute('d'), redraw, direction, duration);
        }
        else if (isRect && previousRect) {
            animateRectElement(child, 0, duration, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](+element.getAttribute('x'), +element.getAttribute('y'), +element.getAttribute('width'), +element.getAttribute('height')), previousRect);
        }
        else {
            var end = child.tagName === 'DIV' ?
                new ChartLocation(+(child.style[x].split('px')[0]), +(child.style[y].split('px')[0])) :
                new ChartLocation(+child.getAttribute(x), +child.getAttribute(y));
            animateRedrawElement(child, duration, start, end, x, y);
        }
    }
    else if (redraw && isAnimate && !element && forceAnimate) {
        templateAnimate(child, 0, 600, 'FadeIn');
    }
    if (existChild) {
        parent.replaceChild(child, element);
    }
    else {
        parent.appendChild(child);
    }
}
/** @private */
function getDraggedRectLocation(x1, y1, x2, y2, outerRect) {
    var width = Math.abs(x1 - x2);
    var height = Math.abs(y1 - y2);
    var x = Math.max(checkBounds(Math.min(x1, x2), width, outerRect.x, outerRect.width), outerRect.x);
    var y = Math.max(checkBounds(Math.min(y1, y2), height, outerRect.y, outerRect.height), outerRect.y);
    return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](x, y, Math.min(width, outerRect.width), Math.min(height, outerRect.height));
}
/** @private */
function checkBounds(start, size, min, max) {
    if (start < min) {
        start = min;
    }
    else if ((start + size) > (max + min)) {
        start = (max + min) - size;
    }
    return start;
}
/** @private */
function getLabelText(currentPoint, series, chart) {
    var labelFormat = series.yAxis.labelFormat;
    var text = [];
    var customLabelFormat = labelFormat.match('{value}') !== null;
    switch (series.seriesType) {
        case 'XY':
            text.push(currentPoint.text || currentPoint.yValue.toString());
            break;
        case 'HighLow':
            text.push(currentPoint.text || Math.max(currentPoint.high, currentPoint.low).toString());
            text.push(currentPoint.text || Math.min(currentPoint.high, currentPoint.low).toString());
            break;
        case 'HighLowOpenClose':
            text.push(currentPoint.text || Math.max(currentPoint.high, currentPoint.low).toString());
            text.push(currentPoint.text || Math.min(currentPoint.high, currentPoint.low).toString());
            text.push(currentPoint.text || Math.max(currentPoint.open, currentPoint.close).toString());
            text.push(currentPoint.text || Math.min(currentPoint.open, currentPoint.close).toString());
            break;
        case 'BoxPlot':
            text.push(currentPoint.text || currentPoint.median.toString());
            text.push(currentPoint.text || currentPoint.maximum.toString());
            text.push(currentPoint.text || currentPoint.minimum.toString());
            text.push(currentPoint.text || currentPoint.upperQuartile.toString());
            text.push(currentPoint.text || currentPoint.lowerQuartile.toString());
            for (var _i = 0, _a = currentPoint.outliers; _i < _a.length; _i++) {
                var liers = _a[_i];
                text.push(currentPoint.text || liers.toString());
            }
            break;
    }
    if (labelFormat && !currentPoint.text) {
        for (var i = 0; i < text.length; i++) {
            text[i] = customLabelFormat ? labelFormat.replace('{value}', series.yAxis.format(parseFloat(text[i]))) :
                series.yAxis.format(parseFloat(text[i]));
        }
    }
    return text;
}
/** @private */
function stopTimer(timer) {
    window.clearInterval(timer);
}
/** @private */
function isCollide(rect, collections, clipRect) {
    var isCollide;
    var currentRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](rect.x + clipRect.x, rect.y + clipRect.y, rect.width, rect.height);
    isCollide = collections.some(function (rect) {
        return (currentRect.x < rect.x + rect.width && currentRect.x + currentRect.width > rect.x &&
            currentRect.y < rect.y + rect.height && currentRect.height + currentRect.y > rect.y);
    });
    return isCollide;
}
/** @private */
function isOverlap(currentRect, rect) {
    return (currentRect.x < rect.x + rect.width && currentRect.x + currentRect.width > rect.x &&
        currentRect.y < rect.y + rect.height && currentRect.height + currentRect.y > rect.y);
}
/** @private */
function containsRect(currentRect, rect) {
    return (currentRect.x <= rect.x && currentRect.x + currentRect.width >= rect.x + rect.width &&
        currentRect.y <= rect.y && currentRect.height + currentRect.y >= rect.y + rect.height);
}
/** @private */
function calculateRect(location, textSize, margin) {
    return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"]((location.x - (textSize.width / 2) - margin.left), (location.y - (textSize.height / 2) - margin.top), textSize.width + margin.left + margin.right, textSize.height + margin.top + margin.bottom);
}
/** @private */
function convertToHexCode(value) {
    return '#' + componentToHex(value.r) + componentToHex(value.g) + componentToHex(value.b);
}
/** @private */
function componentToHex(value) {
    var hex = value.toString(16);
    return hex.length === 1 ? '0' + hex : hex;
}
/** @private */
function convertHexToColor(hex) {
    var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
    return result ? new ColorValue(parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)) :
        new ColorValue(255, 255, 255);
}
/** @private */
function colorNameToHex(color) {
    var element;
    color = color === 'transparent' ? 'white' : color;
    document.body.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('text', { id: 'chartmeasuretext' }));
    element = document.getElementById('chartmeasuretext');
    element.style.color = color;
    color = window.getComputedStyle(element).color;
    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element);
    var exp = /^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/;
    var isRGBValue = exp.exec(color);
    return convertToHexCode(new ColorValue(parseInt(isRGBValue[3], 10), parseInt(isRGBValue[4], 10), parseInt(isRGBValue[5], 10)));
}
/** @private */
function getSaturationColor(color, factor) {
    color = colorNameToHex(color);
    color = color.replace(/[^0-9a-f]/gi, '');
    if (color.length < 6) {
        color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
    }
    factor = factor || 0;
    // convert to decimal and change luminosity
    var rgb = '#';
    var colorCode;
    for (var i = 0; i < 3; i++) {
        colorCode = parseInt(color.substr(i * 2, 2), 16);
        colorCode = Math.round(Math.min(Math.max(0, colorCode + (colorCode * factor)), 255));
        rgb += ('00' + colorCode.toString(16)).substr(colorCode.toString(16).length);
    }
    return rgb;
}
/** @private */
function getMedian(values) {
    var half = Math.floor(values.length / 2);
    return values.length % 2 ? values[half] : ((values[half - 1] + values[half]) / 2.0);
}
/** @private */
// tslint:disable-next-line:max-func-body-length
function calculateLegendShapes(location, size, shape, options) {
    var padding = 10;
    var dir = '';
    var height = size.height;
    var width = size.width;
    var lx = location.x;
    var ly = location.y;
    switch (shape) {
        case 'MultiColoredLine':
        case 'Line':
        case 'StackingLine':
        case 'StackingLine100':
            dir = 'M' + ' ' + (lx + (-width / 2)) + ' ' + (ly) + ' ' +
                'L' + ' ' + (lx + (width / 2)) + ' ' + (ly);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'StepLine':
            options.fill = 'transparent';
            dir = 'M' + ' ' + (lx + (-width / 2) - (padding / 4)) + ' ' + (ly + (height / 2)) + ' ' + 'L' + ' ' + (lx +
                (-width / 2) + (width / 10)) + ' ' + (ly + (height / 2)) + ' ' + 'L' + ' ' + (lx + (-width / 2) + (width / 10))
                + ' ' + (ly) + ' ' + 'L' + ' ' + (lx + (-width / 10)) + ' ' + (ly) + ' ' + 'L' + ' ' + (lx + (-width / 10))
                + ' ' + (ly + (height / 2)) + ' ' + 'L' + ' ' + (lx + (width / 5)) + ' ' + (ly + (height / 2)) + ' ' + 'L' +
                ' ' + (lx + (width / 5)) + ' ' + (ly + (-height / 2)) + ' ' + 'L' + ' ' + (lx + (width / 2)) + ' ' + (ly +
                (-height / 2)) + 'L' + ' ' + (lx + (width / 2)) + ' ' + (ly + (height / 2)) + ' ' + 'L' + '' + (lx + (width / 2)
                + (padding / 4)) + ' ' + (ly + (height / 2));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'RightArrow':
            var space = 2;
            dir = 'M' + ' ' + (lx + (-width / 2)) + ' ' + (ly - (height / 2)) + ' ' +
                'L' + ' ' + (lx + (width / 2)) + ' ' + (ly) + ' ' + 'L' + ' ' +
                (lx + (-width / 2)) + ' ' + (ly + (height / 2)) + ' L' + ' ' + (lx + (-width / 2)) + ' ' +
                (ly + (height / 2) - space) + ' ' + 'L' + ' ' + (lx + (width / 2) - (2 * space)) + ' ' + (ly) +
                ' L' + (lx + (-width / 2)) + ' ' + (ly - (height / 2) + space) + ' Z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'LeftArrow':
            options.fill = options.stroke;
            options.stroke = 'transparent';
            space = 2;
            dir = 'M' + ' ' + (lx + (width / 2)) + ' ' + (ly - (height / 2)) + ' ' +
                'L' + ' ' + (lx + (-width / 2)) + ' ' + (ly) + ' ' + 'L' + ' ' +
                (lx + (width / 2)) + ' ' + (ly + (height / 2)) + ' ' + 'L' + ' ' +
                (lx + (width / 2)) + ' ' + (ly + (height / 2) - space) + ' L' + ' ' + (lx + (-width / 2) + (2 * space))
                + ' ' + (ly) + ' L' + (lx + (width / 2)) + ' ' + (ly - (height / 2) + space) + ' Z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Column':
        case 'Pareto':
        case 'StackingColumn':
        case 'StackingColumn100':
        case 'RangeColumn':
        case 'Histogram':
            dir = 'M' + ' ' + (lx - 3 * (width / 5)) + ' ' + (ly - (height / 5)) + ' ' + 'L' + ' ' +
                (lx + 3 * (-width / 10)) + ' ' + (ly - (height / 5)) + ' ' + 'L' + ' ' +
                (lx + 3 * (-width / 10)) + ' ' + (ly + (height / 2)) + ' ' + 'L' + ' ' + (lx - 3 *
                (width / 5)) + ' ' + (ly + (height / 2)) + ' ' + 'Z' + ' ' + 'M' + ' ' +
                (lx + (-width / 10) - (width / 20)) + ' ' + (ly - (height / 4) - (padding / 2))
                + ' ' + 'L' + ' ' + (lx + (width / 10) + (width / 20)) + ' ' + (ly - (height / 4) -
                (padding / 2)) + ' ' + 'L' + ' ' + (lx + (width / 10) + (width / 20)) + ' ' + (ly
                + (height / 2)) + ' ' + 'L' + ' ' + (lx + (-width / 10) - (width / 20)) + ' ' + (ly +
                (height / 2)) + ' ' + 'Z' + ' ' + 'M' + ' ' + (lx + 3 * (width / 10)) + ' ' + (ly) + ' ' +
                'L' + ' ' + (lx + 3 * (width / 5)) + ' ' + (ly) + ' ' + 'L' + ' '
                + (lx + 3 * (width / 5)) + ' ' + (ly + (height / 2)) + ' ' + 'L' + ' '
                + (lx + 3 * (width / 10)) + ' ' + (ly + (height / 2)) + ' ' + 'Z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Bar':
        case 'StackingBar':
        case 'StackingBar100':
            dir = 'M' + ' ' + (lx + (-width / 2) + (-padding / 4)) + ' ' + (ly - 3 * (height / 5)) + ' '
                + 'L' + ' ' + (lx + 3 * (width / 10)) + ' ' + (ly - 3 * (height / 5)) + ' ' + 'L' + ' ' +
                (lx + 3 * (width / 10)) + ' ' + (ly - 3 * (height / 10)) + ' ' + 'L' + ' ' +
                (lx - (width / 2) + (-padding / 4)) + ' ' + (ly - 3 * (height / 10)) + ' ' + 'Z' + ' '
                + 'M' + ' ' + (lx + (-width / 2) + (-padding / 4)) + ' ' + (ly - (height / 5)
                + (padding / 20)) + ' ' + 'L' + ' ' + (lx + (width / 2) + (padding / 4)) + ' ' + (ly
                - (height / 5) + (padding / 20)) + ' ' + 'L' + ' ' + (lx + (width / 2) + (padding / 4))
                + ' ' + (ly + (height / 10) + (padding / 20)) + ' ' + 'L' + ' ' + (lx - (width / 2)
                + (-padding / 4)) + ' ' + (ly + (height / 10) + (padding / 20)) + ' ' + 'Z' + ' ' + 'M'
                + ' ' + (lx - (width / 2) + (-padding / 4)) + ' ' + (ly + (height / 5)
                + (padding / 10)) + ' ' + 'L' + ' ' + (lx + (-width / 4)) + ' ' + (ly + (height / 5)
                + (padding / 10)) + ' ' + 'L' + ' ' + (lx + (-width / 4)) + ' ' + (ly + (height / 2)
                + (padding / 10)) + ' ' + 'L' + ' ' + (lx - (width / 2) + (-padding / 4))
                + ' ' + (ly + (height / 2) + (padding / 10)) + ' ' + 'Z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Spline':
            options.fill = 'transparent';
            dir = 'M' + ' ' + (lx - (width / 2)) + ' ' + (ly + (height / 5)) + ' ' + 'Q' + ' '
                + lx + ' ' + (ly - height) + ' ' + lx + ' ' + (ly + (height / 5))
                + ' ' + 'M' + ' ' + lx + ' ' + (ly + (height / 5)) + ' ' + 'Q' + ' ' + (lx
                + (width / 2)) + ' ' + (ly + (height / 2)) + ' ' + (lx + (width / 2)) + ' '
                + (ly - (height / 2));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Area':
        case 'MultiColoredArea':
        case 'RangeArea':
        case 'StackingArea':
        case 'StackingArea100':
            dir = 'M' + ' ' + (lx - (width / 2) - (padding / 4)) + ' ' + (ly + (height / 2))
                + ' ' + 'L' + ' ' + (lx + (-width / 4) + (-padding / 8)) + ' ' + (ly - (height / 2))
                + ' ' + 'L' + ' ' + (lx) + ' ' + (ly + (height / 4)) + ' ' + 'L' + ' ' + (lx
                + (width / 4) + (padding / 8)) + ' ' + (ly + (-height / 2) + (height / 4)) + ' '
                + 'L' + ' ' + (lx + (height / 2) + (padding / 4)) + ' ' + (ly + (height / 2)) + ' ' + 'Z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'SplineArea':
            dir = 'M' + ' ' + (lx - (width / 2)) + ' ' + (ly + (height / 5)) + ' ' + 'Q' + ' ' + lx
                + ' ' + (ly - height) + ' ' + lx + ' ' + (ly + (height / 5)) + ' ' + 'Z' + ' ' + 'M'
                + ' ' + lx + ' ' + (ly + (height / 5)) + ' ' + 'Q' + ' ' + (lx + (width / 2)) + ' '
                + (ly + (height / 2)) + ' ' + (lx + (width / 2)) + ' '
                + (ly - (height / 2)) + ' ' + ' Z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
        case 'Pie':
        case 'Doughnut':
            options.stroke = 'transparent';
            var r = Math.min(height, width) / 2;
            dir = getAccumulationLegend(lx, ly, r, height, width, shape);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(options, { 'd': dir });
            break;
    }
    return { renderOption: options };
}
/** @private */
function textTrim(maxWidth, text, font) {
    var label = text;
    var size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])(text, font).width;
    if (size > maxWidth) {
        var textLength = text.length;
        for (var i = textLength - 1; i >= 0; --i) {
            label = text.substring(0, i) + '...';
            size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])(label, font).width;
            if (size <= maxWidth) {
                return label;
            }
        }
    }
    return label;
}
/**
 * To trim the line break label
 * @param maxWidth
 * @param text
 * @param font
 */
function lineBreakLabelTrim(maxWidth, text, font) {
    var labelCollection = [];
    var breakLabels = text.split('<br>');
    for (var i = 0; i < breakLabels.length; i++) {
        text = breakLabels[i];
        var size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])(text, font).width;
        if (size > maxWidth) {
            var textLength = text.length;
            for (var i_1 = textLength - 1; i_1 >= 0; --i_1) {
                text = text.substring(0, i_1) + '...';
                size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])(text, font).width;
                if (size <= maxWidth) {
                    labelCollection.push(text);
                    break;
                }
            }
        }
        else {
            labelCollection.push(text);
        }
    }
    return labelCollection;
}
/** @private */
function stringToNumber(value, containerSize) {
    if (value !== null && value !== undefined) {
        return value.indexOf('%') !== -1 ? (containerSize / 100) * parseInt(value, 10) : parseInt(value, 10);
    }
    return null;
}
/** @private */
function redrawElement(redraw, id, options, renderer) {
    if (!redraw) {
        return null;
    }
    var element = getElement(id);
    if (element && options) {
        renderer.setElementAttributes(options, element.tagName === 'clipPath' ? element.childNodes[0] : element);
    }
    return element;
}
/** @private */
function animateRedrawElement(element, duration, start, end, x, y) {
    if (x === void 0) { x = 'x'; }
    if (y === void 0) { y = 'y'; }
    var isDiv = element.tagName === 'DIV';
    var setStyle = function (xValue, yValue) {
        if (isDiv) {
            element.style[x] = xValue + 'px';
            element.style[y] = yValue + 'px';
        }
        else {
            element.setAttribute(x, xValue + '');
            element.setAttribute(y, yValue + '');
        }
    };
    setStyle(start.x, start.y);
    new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div'), {
        duration: duration,
        progress: function (args) {
            setStyle(linear(args.timeStamp, start.x, end.x - start.x, args.duration), linear(args.timeStamp, start.y, end.y - start.y, args.duration));
        },
        end: function () {
            setStyle(end.x, end.y);
        }
    });
}
/** @private */
function textElement(renderer, option, font, color, parent, isMinus, redraw, isAnimate, forceAnimate, animateDuration, seriesClipRect) {
    if (isMinus === void 0) { isMinus = false; }
    if (forceAnimate === void 0) { forceAnimate = false; }
    var renderOptions = {};
    var htmlObject;
    var tspanElement;
    //let renderer: SvgRenderer = new SvgRenderer('');
    var text;
    var height;
    renderOptions = {
        'id': option.id,
        'x': option.x,
        'y': option.y,
        'fill': color ? color : 'black',
        'font-size': font.size,
        'font-style': font.fontStyle,
        'font-family': font.fontFamily,
        'font-weight': font.fontWeight,
        'text-anchor': option.anchor,
        'labelRotation': option.labelRotation,
        'transform': option.transform,
        'opacity': font.opacity,
        'dominant-baseline': option.baseLine
    };
    text = typeof option.text === 'string' ? option.text : isMinus ? option.text[option.text.length - 1] : option.text[0];
    htmlObject = renderer.createText(renderOptions, text, seriesClipRect ? seriesClipRect.x : 0, seriesClipRect ? seriesClipRect.y : 0);
    if (typeof option.text !== 'string' && option.text.length > 1) {
        for (var i = 1, len = option.text.length; i < len; i++) {
            height = (Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])(option.text[i], font).height);
            tspanElement = renderer.createTSpan({
                'x': option.x, 'id': option.id,
                'y': (option.y) + ((isMinus) ? -(i * height) : (i * height))
            }, isMinus ? option.text[option.text.length - (i + 1)] : option.text[i]);
            htmlObject.appendChild(tspanElement);
        }
    }
    appendChildElement(renderer instanceof _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["CanvasRenderer"], parent, htmlObject, redraw, isAnimate, 'x', 'y', null, null, forceAnimate, false, null, animateDuration);
    return htmlObject;
}
/**
 * Method to calculate the width and height of the chart
 */
function calculateSize(chart) {
    // fix for Chart rendered with default width in IE issue
    var containerWidth = chart.element.clientWidth || chart.element.offsetWidth;
    var containerHeight = chart.element.clientHeight;
    if (chart.stockChart) {
        containerWidth = chart.stockChart.element.clientWidth;
    }
    var height = 450;
    var marginHeight;
    if (chart.getModuleName() === 'rangeNavigator') {
        var range = chart;
        var tooltipSpace = range.tooltip.enable ? 35 : 0;
        var periodHeight = range.periodSelectorSettings.periods.length ?
            range.periodSelectorSettings.height : 0;
        marginHeight = range.margin.top + range.margin.bottom + tooltipSpace;
        var labelSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])('tempString', range.labelStyle).height;
        var labelPadding = 15;
        height = (chart.series.length ? (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 80 : 120) : ((range.enableGrouping ? (40 + labelPadding + labelSize) : 40)
            + marginHeight)) + periodHeight;
        if (range.disableRangeSelector) {
            height = periodHeight;
        }
    }
    chart.availableSize = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Size"](stringToNumber(chart.width, containerWidth) || containerWidth || 600, stringToNumber(chart.height, containerHeight) || containerHeight || height);
}
function createSvg(chart) {
    chart.canvasRender = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["CanvasRenderer"](chart.element.id);
    chart.renderer = chart.enableCanvas ? chart.canvasRender : new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["SvgRenderer"](chart.element.id);
    calculateSize(chart);
    if (chart.stockChart && chart.getModuleName() === 'chart') {
        chart.svgObject = chart.stockChart.chartObject;
    }
    else if (chart.stockChart && chart.getModuleName() === 'rangeNavigator') {
        chart.svgObject = chart.stockChart.selectorObject;
    }
    else {
        if (chart.enableCanvas) {
            chart.svgObject = chart.renderer.createCanvas({
                id: chart.element.id + '_canvas',
                width: chart.availableSize.width,
                height: chart.availableSize.height
            });
        }
        else {
            chart.svgObject = chart.renderer.createSvg({
                id: chart.element.id + '_svg',
                width: chart.availableSize.width,
                height: chart.availableSize.height
            });
        }
    }
}
/**
 * To calculate chart title and height
 * @param title
 * @param style
 * @param width
 */
function getTitle(title, style, width) {
    var titleCollection = [];
    switch (style.textOverflow) {
        case 'Wrap':
            titleCollection = textWrap(title, width, style);
            break;
        case 'Trim':
            titleCollection.push(textTrim(width, title, style));
            break;
        default:
            titleCollection.push(title);
            break;
    }
    return titleCollection;
}
/**
 * Method to calculate x position of title
 */
function titlePositionX(rect, titleStyle) {
    var positionX;
    if (titleStyle.textAlignment === 'Near') {
        positionX = rect.x;
    }
    else if (titleStyle.textAlignment === 'Center') {
        positionX = rect.x + rect.width / 2;
    }
    else {
        positionX = rect.x + rect.width;
    }
    return positionX;
}
/**
 * Method to find new text and element size based on textOverflow
 */
function textWrap(currentLabel, maximumWidth, font) {
    var textCollection = currentLabel.split(' ');
    var label = '';
    var labelCollection = [];
    var text;
    for (var i = 0, len = textCollection.length; i < len; i++) {
        text = textCollection[i];
        if (Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])(label.concat(text), font).width < maximumWidth) {
            label = label.concat((label === '' ? '' : ' ') + text);
        }
        else {
            if (label !== '') {
                labelCollection.push(textTrim(maximumWidth, label, font));
                label = text;
            }
            else {
                labelCollection.push(textTrim(maximumWidth, text, font));
                text = '';
            }
        }
        if (label && i === len - 1) {
            labelCollection.push(textTrim(maximumWidth, label, font));
        }
    }
    return labelCollection;
}
/**
 * Method to reset the blazor templates
 */
function blazorTemplatesReset(control) {
    for (var i = 0; i < control.annotations.length; i++) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])((control.element.id + '_Annotation_' + i).replace(/[^a-zA-Z0-9]/g, ''), 'ContentTemplate');
    }
}
/** @private */
var CustomizeOption = /** @class */ (function () {
    function CustomizeOption(id) {
        this.id = id;
    }
    return CustomizeOption;
}());

/** @private */
var StackValues = /** @class */ (function () {
    function StackValues(startValue, endValue) {
        this.startValues = startValue;
        this.endValues = endValue;
    }
    return StackValues;
}());

/** @private */
var RectOption = /** @class */ (function (_super) {
    __extends(RectOption, _super);
    function RectOption(id, fill, border, opacity, rect, rx, ry, transform, dashArray) {
        var _this = _super.call(this, id, fill, border.width, border.color, opacity, dashArray) || this;
        _this.y = rect.y;
        _this.x = rect.x;
        _this.height = rect.height;
        _this.width = rect.width;
        _this.rx = rx ? rx : 0;
        _this.ry = ry ? ry : 0;
        _this.transform = transform ? transform : '';
        _this.stroke = (border.width !== 0 && _this.stroke !== '') ? border.color : 'transparent';
        return _this;
    }
    return RectOption;
}(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["PathOption"]));

/** @private */
var CircleOption = /** @class */ (function (_super) {
    __extends(CircleOption, _super);
    function CircleOption(id, fill, border, opacity, cx, cy, r) {
        var _this = _super.call(this, id, fill, border.width, border.color, opacity) || this;
        _this.cy = cy;
        _this.cx = cx;
        _this.r = r;
        return _this;
    }
    return CircleOption;
}(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["PathOption"]));

/** @private */
var PolygonOption = /** @class */ (function () {
    function PolygonOption(id, points, fill) {
        this.id = id;
        this.points = points;
        this.fill = fill;
    }
    return PolygonOption;
}());

/** @private */
var ChartLocation = /** @class */ (function () {
    function ChartLocation(x, y) {
        this.x = x;
        this.y = y;
    }
    return ChartLocation;
}());

/** @private */
var Thickness = /** @class */ (function () {
    function Thickness(left, right, top, bottom) {
        this.left = left;
        this.right = right;
        this.top = top;
        this.bottom = bottom;
    }
    return Thickness;
}());

/** @private */
var ColorValue = /** @class */ (function () {
    function ColorValue(r, g, b) {
        this.r = r;
        this.g = g;
        this.b = b;
    }
    return ColorValue;
}());

/** @private */
var PointData = /** @class */ (function () {
    function PointData(point, series, index) {
        if (index === void 0) { index = 0; }
        this.point = point;
        this.series = series;
        this.lierIndex = index;
    }
    return PointData;
}());

/** @private */
var AccPointData = /** @class */ (function () {
    function AccPointData(point, series, index) {
        if (index === void 0) { index = 0; }
        this.point = point;
        this.series = series;
    }
    return AccPointData;
}());

/** @private */
var ControlPoints = /** @class */ (function () {
    function ControlPoints(controlPoint1, controlPoint2) {
        this.controlPoint1 = controlPoint1;
        this.controlPoint2 = controlPoint2;
    }
    return ControlPoints;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/index.js ***!
  \**********************************************************/
/*! exports provided: CrosshairSettings, ZoomSettings, Chart, Row, Column, MajorGridLines, MinorGridLines, AxisLine, MajorTickLines, MinorTickLines, CrosshairTooltip, Axis, VisibleLabels, DateTime, Category, Logarithmic, DateTimeCategory, NiceInterval, StripLine, Connector, Font, Border, ChartArea, Margin, Animation, Indexes, CornerRadius, Index, EmptyPointSettings, DragSettings, TooltipSettings, Periods, PeriodSelectorSettings, LineSeries, ColumnSeries, AreaSeries, BarSeries, PolarSeries, RadarSeries, StackingBarSeries, CandleSeries, StackingColumnSeries, StepLineSeries, StepAreaSeries, StackingAreaSeries, StackingLineSeries, ScatterSeries, RangeColumnSeries, WaterfallSeries, HiloSeries, HiloOpenCloseSeries, RangeAreaSeries, BubbleSeries, SplineSeries, HistogramSeries, SplineAreaSeries, TechnicalIndicator, SmaIndicator, EmaIndicator, TmaIndicator, AccumulationDistributionIndicator, AtrIndicator, MomentumIndicator, RsiIndicator, StochasticIndicator, BollingerBands, MacdIndicator, Trendlines, sort, isBreakLabel, rotateTextSize, removeElement, logBase, showTooltip, inside, withIn, logWithIn, withInRange, sum, subArraySum, subtractThickness, subtractRect, degreeToLocation, getAngle, subArray, valueToCoefficient, TransformToVisible, indexFinder, CoefficientToVector, valueToPolarCoefficient, Mean, PolarArc, createTooltip, createZoomingLabels, withInBounds, getValueXByPoint, getValueYByPoint, findClipRect, firstToLowerCase, getTransform, getMinPointsDelta, getAnimationFunction, linear, markerAnimate, animateRectElement, pathAnimation, appendClipElement, triggerLabelRender, setRange, getActualDesiredIntervalsCount, templateAnimate, drawSymbol, calculateShapes, getRectLocation, minMax, getElement, getTemplateFunction, createTemplate, getFontStyle, measureElementRect, findlElement, getPoint, appendElement, appendChildElement, getDraggedRectLocation, checkBounds, getLabelText, stopTimer, isCollide, isOverlap, containsRect, calculateRect, convertToHexCode, componentToHex, convertHexToColor, colorNameToHex, getSaturationColor, getMedian, calculateLegendShapes, textTrim, lineBreakLabelTrim, stringToNumber, redrawElement, animateRedrawElement, textElement, calculateSize, createSvg, getTitle, titlePositionX, textWrap, blazorTemplatesReset, CustomizeOption, StackValues, RectOption, CircleOption, PolygonOption, ChartLocation, Thickness, ColorValue, PointData, AccPointData, ControlPoints, Crosshair, Tooltip, Zoom, Selection, DataEditing, DataLabel, ErrorBar, DataLabelSettings, MarkerSettings, Points, Trendline, ErrorBarCapSettings, ChartSegment, ErrorBarSettings, SeriesBase, Series, Legend, ChartAnnotation, ChartAnnotationSettings, LabelBorder, MultiLevelCategories, StripLineSettings, MultiLevelLabels, ScrollbarSettingsRange, ScrollbarSettings, BoxAndWhiskerSeries, MultiColoredAreaSeries, MultiColoredLineSeries, MultiColoredSeries, MultiLevelLabel, ScrollBar, ParetoSeries, Export, AccumulationChart, AccumulationAnnotationSettings, AccumulationDataLabelSettings, PieCenter, AccPoints, AccumulationSeries, getSeriesFromIndex, pointByIndex, PieSeries, FunnelSeries, PyramidSeries, AccumulationLegend, AccumulationDataLabel, AccumulationTooltip, AccumulationSelection, AccumulationAnnotation, StockChart, StockChartFont, StockChartBorder, StockChartArea, StockMargin, StockChartStripLineSettings, StockEmptyPointSettings, StockChartConnector, StockSeries, StockChartIndicator, StockChartAxis, StockChartRow, StockChartTrendline, StockChartAnnotationSettings, StockChartIndexes, StockEventsSettings, loaded, legendClick, load, animationComplete, legendRender, textRender, pointRender, seriesRender, axisLabelRender, axisRangeCalculated, axisMultiLabelRender, tooltipRender, chartMouseMove, chartMouseClick, pointClick, pointMove, chartMouseLeave, chartMouseDown, chartMouseUp, zoomComplete, dragComplete, resized, beforePrint, annotationRender, scrollStart, scrollEnd, scrollChanged, stockEventRender, multiLevelLabelClick, dragStart, drag, dragEnd, Theme, getSeriesColor, getThemeColor, getScrollbarThemeColor, PeriodSelector, RangeNavigator, rangeValueToCoefficient, getXLocation, getRangeValueXByPoint, getExactData, getNearestValue, DataPoint, RangeNavigatorTheme, getRangeThemeColor, RangeNavigatorAxis, RangeSeries, RangeSlider, RangeNavigatorSeries, ThumbSettings, StyleSettings, RangeTooltipSettings, Double, RangeTooltip, Smithchart, SmithchartMajorGridLines, SmithchartMinorGridLines, SmithchartAxisLine, SmithchartAxis, LegendTitle, LegendLocation, LegendItemStyleBorder, LegendItemStyle, LegendBorder, SmithchartLegendSettings, SeriesTooltipBorder, SeriesTooltip, SeriesMarkerBorder, SeriesMarkerDataLabelBorder, SeriesMarkerDataLabelConnectorLine, SeriesMarkerDataLabel, SeriesMarker, SmithchartSeries, TooltipRender, Subtitle, Title, SmithchartFont, SmithchartMargin, SmithchartBorder, SmithchartRect, LabelCollection, LegendSeries, LabelRegion, HorizontalLabelCollection, RadialLabelCollections, LineSegment, PointRegion, Point, ClosestPoint, MarkerOptions, SmithchartLabelPosition, Direction, DataLabelTextOptions, LabelOption, SmithchartSize, GridArcPoints, smithchartBeforePrint, SmithchartLegend, Sparkline, SparklineTooltip, SparklineBorder, SparklineFont, TrackLineSettings, SparklineTooltipSettings, ContainerArea, LineSettings, RangeBandSettings, AxisSettings, Padding, SparklineMarkerSettings, LabelOffset, SparklineDataLabelSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _chart_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chart/index */ "./node_modules/@syncfusion/ej2-charts/src/chart/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CrosshairSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["CrosshairSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZoomSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ZoomSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Chart", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Chart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Row"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Column"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MajorGridLines", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MajorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MinorGridLines", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MinorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AxisLine", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["AxisLine"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MajorTickLines", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MajorTickLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MinorTickLines", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MinorTickLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CrosshairTooltip", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["CrosshairTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Axis", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Axis"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VisibleLabels", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["VisibleLabels"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateTime", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["DateTime"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Category", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Category"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logarithmic", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Logarithmic"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateTimeCategory", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["DateTimeCategory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NiceInterval", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["NiceInterval"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StripLine", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StripLine"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Connector", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Connector"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Font", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Font"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Border", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Border"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartArea", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartArea"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Margin", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Margin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Animation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Indexes", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Indexes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CornerRadius", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["CornerRadius"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Index", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Index"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyPointSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["EmptyPointSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["DragSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["TooltipSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Periods", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Periods"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PeriodSelectorSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["PeriodSelectorSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["LineSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ColumnSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AreaSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["AreaSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BarSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["BarSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolarSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["PolarSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RadarSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["RadarSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackingBarSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StackingBarSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CandleSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["CandleSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackingColumnSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StackingColumnSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepLineSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StepLineSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepAreaSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StepAreaSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackingAreaSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StackingAreaSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackingLineSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StackingLineSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScatterSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ScatterSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeColumnSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["RangeColumnSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WaterfallSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["WaterfallSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HiloSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["HiloSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HiloOpenCloseSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["HiloOpenCloseSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeAreaSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["RangeAreaSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BubbleSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["BubbleSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SplineSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["SplineSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistogramSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["HistogramSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SplineAreaSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["SplineAreaSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TechnicalIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["TechnicalIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmaIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["SmaIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmaIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["EmaIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TmaIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["TmaIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationDistributionIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["AccumulationDistributionIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AtrIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["AtrIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MomentumIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MomentumIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RsiIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["RsiIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StochasticIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StochasticIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BollingerBands", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["BollingerBands"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MacdIndicator", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MacdIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Trendlines", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Trendlines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["sort"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBreakLabel", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["isBreakLabel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rotateTextSize", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["rotateTextSize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["removeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "logBase", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["logBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showTooltip", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["showTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inside", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["inside"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withIn", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["withIn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "logWithIn", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["logWithIn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withInRange", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["withInRange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["sum"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subArraySum", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["subArraySum"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subtractThickness", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["subtractThickness"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subtractRect", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["subtractRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "degreeToLocation", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["degreeToLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getAngle", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getAngle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subArray", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["subArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valueToCoefficient", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TransformToVisible", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["TransformToVisible"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexFinder", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["indexFinder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CoefficientToVector", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["CoefficientToVector"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valueToPolarCoefficient", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["valueToPolarCoefficient"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Mean", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Mean"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolarArc", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["PolarArc"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTooltip", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["createTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createZoomingLabels", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["createZoomingLabels"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withInBounds", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["withInBounds"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getValueXByPoint", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getValueXByPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getValueYByPoint", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getValueYByPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findClipRect", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["findClipRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "firstToLowerCase", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTransform", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getTransform"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMinPointsDelta", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getMinPointsDelta"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getAnimationFunction", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getAnimationFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["linear"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "markerAnimate", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["markerAnimate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animateRectElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["animateRectElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pathAnimation", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["pathAnimation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendClipElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["appendClipElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "triggerLabelRender", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["triggerLabelRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setRange", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["setRange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualDesiredIntervalsCount", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getActualDesiredIntervalsCount"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "templateAnimate", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["templateAnimate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drawSymbol", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateShapes", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["calculateShapes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRectLocation", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getRectLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minMax", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["minMax"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTemplateFunction", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getTemplateFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTemplate", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["createTemplate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFontStyle", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getFontStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "measureElementRect", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["measureElementRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findlElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["findlElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPoint", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["appendElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendChildElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDraggedRectLocation", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getDraggedRectLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkBounds", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["checkBounds"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getLabelText", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getLabelText"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stopTimer", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["stopTimer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isCollide", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["isCollide"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isOverlap", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["isOverlap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "containsRect", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["containsRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateRect", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["calculateRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "convertToHexCode", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["convertToHexCode"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "componentToHex", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["componentToHex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "convertHexToColor", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["convertHexToColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorNameToHex", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["colorNameToHex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getSaturationColor", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getSaturationColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMedian", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getMedian"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateLegendShapes", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["calculateLegendShapes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textTrim", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["textTrim"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineBreakLabelTrim", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["lineBreakLabelTrim"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stringToNumber", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["stringToNumber"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "redrawElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["redrawElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animateRedrawElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["animateRedrawElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textElement", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["textElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateSize", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["calculateSize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["createSvg"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["getTitle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "titlePositionX", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["titlePositionX"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textWrap", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["textWrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blazorTemplatesReset", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["blazorTemplatesReset"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomizeOption", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["CustomizeOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackValues", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StackValues"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RectOption", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["RectOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CircleOption", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["CircleOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolygonOption", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["PolygonOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartLocation", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Thickness", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Thickness"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorValue", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ColorValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PointData", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["PointData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccPointData", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["AccPointData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ControlPoints", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ControlPoints"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Crosshair", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Crosshair"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Tooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Zoom", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Zoom"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataEditing", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["DataEditing"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataLabel", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["DataLabel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorBar", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ErrorBar"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataLabelSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["DataLabelSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkerSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MarkerSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Points", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Points"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Trendline", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Trendline"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorBarCapSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ErrorBarCapSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartSegment", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartSegment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorBarSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ErrorBarSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesBase", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["SeriesBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Series", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Series"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Legend", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Legend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartAnnotation", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartAnnotation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartAnnotationSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartAnnotationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelBorder", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["LabelBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiLevelCategories", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MultiLevelCategories"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StripLineSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["StripLineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiLevelLabels", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MultiLevelLabels"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollbarSettingsRange", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ScrollbarSettingsRange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollbarSettings", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ScrollbarSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BoxAndWhiskerSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["BoxAndWhiskerSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiColoredAreaSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MultiColoredAreaSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiColoredLineSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MultiColoredLineSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiColoredSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MultiColoredSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiLevelLabel", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["MultiLevelLabel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollBar", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ScrollBar"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ParetoSeries", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["ParetoSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Export", function() { return _chart_index__WEBPACK_IMPORTED_MODULE_0__["Export"]; });

/* harmony import */ var _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./accumulation-chart/index */ "./node_modules/@syncfusion/ej2-charts/src/accumulation-chart/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationChart", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccumulationChart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationAnnotationSettings", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccumulationAnnotationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationDataLabelSettings", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccumulationDataLabelSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PieCenter", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["PieCenter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccPoints", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccPoints"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationSeries", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccumulationSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getSeriesFromIndex", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["getSeriesFromIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointByIndex", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["pointByIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PieSeries", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["PieSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunnelSeries", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["FunnelSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PyramidSeries", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["PyramidSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationLegend", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccumulationLegend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationDataLabel", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccumulationDataLabel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationTooltip", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccumulationTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationSelection", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccumulationSelection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccumulationAnnotation", function() { return _accumulation_chart_index__WEBPACK_IMPORTED_MODULE_1__["AccumulationAnnotation"]; });

/* harmony import */ var _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stock-chart/index */ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChart", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartFont", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartBorder", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartArea", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartArea"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockMargin", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockMargin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartStripLineSettings", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartStripLineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockEmptyPointSettings", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockEmptyPointSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartConnector", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartConnector"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockSeries", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartIndicator", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartAxis", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartAxis"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartRow", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartTrendline", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartTrendline"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartAnnotationSettings", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartAnnotationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartIndexes", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockChartIndexes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockEventsSettings", function() { return _stock_chart_index__WEBPACK_IMPORTED_MODULE_2__["StockEventsSettings"]; });

/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./common/index */ "./node_modules/@syncfusion/ej2-charts/src/common/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "loaded", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["loaded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "legendClick", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["legendClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "load", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["load"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationComplete", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["animationComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "legendRender", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["legendRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textRender", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["textRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRender", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["pointRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "seriesRender", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["seriesRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLabelRender", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["axisLabelRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRangeCalculated", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["axisRangeCalculated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisMultiLabelRender", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["axisMultiLabelRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tooltipRender", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["tooltipRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseMove", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["chartMouseMove"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseClick", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["chartMouseClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointClick", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["pointClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointMove", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["pointMove"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseLeave", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["chartMouseLeave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseDown", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["chartMouseDown"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chartMouseUp", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["chartMouseUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomComplete", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["zoomComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragComplete", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["dragComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resized", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["resized"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePrint", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["beforePrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "annotationRender", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["annotationRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scrollStart", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["scrollStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scrollEnd", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["scrollEnd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scrollChanged", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["scrollChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stockEventRender", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["stockEventRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multiLevelLabelClick", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["multiLevelLabelClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragStart", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["dragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["drag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnd", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["dragEnd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Theme", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["Theme"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getSeriesColor", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["getSeriesColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getThemeColor", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["getThemeColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollbarThemeColor", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["getScrollbarThemeColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PeriodSelector", function() { return _common_index__WEBPACK_IMPORTED_MODULE_3__["PeriodSelector"]; });

/* harmony import */ var _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./range-navigator/index */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigator", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["RangeNavigator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rangeValueToCoefficient", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["rangeValueToCoefficient"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getXLocation", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["getXLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRangeValueXByPoint", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["getRangeValueXByPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getExactData", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["getExactData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getNearestValue", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["getNearestValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataPoint", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["DataPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorTheme", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["RangeNavigatorTheme"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRangeThemeColor", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["getRangeThemeColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorAxis", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["RangeNavigatorAxis"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeSeries", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["RangeSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeSlider", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["RangeSlider"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorSeries", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["RangeNavigatorSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ThumbSettings", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["ThumbSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StyleSettings", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["StyleSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeTooltipSettings", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["RangeTooltipSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Double", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["Double"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeTooltip", function() { return _range_navigator_index__WEBPACK_IMPORTED_MODULE_4__["RangeTooltip"]; });

/* harmony import */ var _smithchart_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./smithchart/index */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Smithchart", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["Smithchart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartMajorGridLines", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartMajorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartMinorGridLines", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartMinorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartAxisLine", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartAxisLine"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartAxis", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartAxis"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendTitle", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LegendTitle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendLocation", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LegendLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendItemStyleBorder", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LegendItemStyleBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendItemStyle", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LegendItemStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendBorder", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LegendBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartLegendSettings", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartLegendSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesTooltipBorder", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SeriesTooltipBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesTooltip", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SeriesTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerBorder", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SeriesMarkerBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabelBorder", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SeriesMarkerDataLabelBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabelConnectorLine", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SeriesMarkerDataLabelConnectorLine"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabel", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SeriesMarkerDataLabel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarker", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SeriesMarker"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartSeries", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipRender", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["TooltipRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subtitle", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["Subtitle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Title", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["Title"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartFont", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartMargin", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartMargin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartBorder", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartRect", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelCollection", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LabelCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendSeries", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LegendSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelRegion", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LabelRegion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalLabelCollection", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["HorizontalLabelCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RadialLabelCollections", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["RadialLabelCollections"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSegment", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LineSegment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PointRegion", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["PointRegion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Point", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["Point"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClosestPoint", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["ClosestPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkerOptions", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["MarkerOptions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartLabelPosition", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartLabelPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Direction", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["Direction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataLabelTextOptions", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["DataLabelTextOptions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelOption", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["LabelOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartSize", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartSize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridArcPoints", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["GridArcPoints"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "smithchartBeforePrint", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["smithchartBeforePrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartLegend", function() { return _smithchart_index__WEBPACK_IMPORTED_MODULE_5__["SmithchartLegend"]; });

/* harmony import */ var _sparkline_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sparkline/index */ "./node_modules/@syncfusion/ej2-charts/src/sparkline/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sparkline", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["Sparkline"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineTooltip", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["SparklineTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineBorder", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["SparklineBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineFont", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["SparklineFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TrackLineSettings", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["TrackLineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineTooltipSettings", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["SparklineTooltipSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContainerArea", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["ContainerArea"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSettings", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["LineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeBandSettings", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["RangeBandSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AxisSettings", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["AxisSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Padding", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["Padding"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineMarkerSettings", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["SparklineMarkerSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelOffset", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["LabelOffset"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineDataLabelSettings", function() { return _sparkline_index__WEBPACK_IMPORTED_MODULE_6__["SparklineDataLabelSettings"]; });

/**
 * Chart components exported.
 */









/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/index.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/range-navigator/index.js ***!
  \**************************************************************************/
/*! exports provided: RangeNavigator, Connector, Font, Border, ChartArea, Margin, Animation, Indexes, CornerRadius, Index, EmptyPointSettings, DragSettings, TooltipSettings, Periods, PeriodSelectorSettings, PeriodSelector, rangeValueToCoefficient, getXLocation, getRangeValueXByPoint, getExactData, getNearestValue, DataPoint, RangeNavigatorTheme, getRangeThemeColor, RangeNavigatorAxis, RangeSeries, RangeSlider, RangeNavigatorSeries, ThumbSettings, StyleSettings, RangeTooltipSettings, LineSeries, AreaSeries, DateTime, Double, Logarithmic, RangeTooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _range_navigator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./range-navigator */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/range-navigator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigator", function() { return _range_navigator__WEBPACK_IMPORTED_MODULE_0__["RangeNavigator"]; });

/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Connector", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Connector"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Font", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Font"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Border", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Border"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChartArea", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["ChartArea"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Margin", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Margin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Animation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Indexes", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Indexes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CornerRadius", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["CornerRadius"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Index", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Index"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyPointSettings", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["EmptyPointSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragSettings", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["DragSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipSettings", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["TooltipSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Periods", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Periods"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PeriodSelectorSettings", function() { return _common_model_base__WEBPACK_IMPORTED_MODULE_1__["PeriodSelectorSettings"]; });

/* harmony import */ var _common_period_selector_period_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/period-selector/period-selector */ "./node_modules/@syncfusion/ej2-charts/src/common/period-selector/period-selector.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PeriodSelector", function() { return _common_period_selector_period_selector__WEBPACK_IMPORTED_MODULE_2__["PeriodSelector"]; });

/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/helper.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rangeValueToCoefficient", function() { return _utils_helper__WEBPACK_IMPORTED_MODULE_3__["rangeValueToCoefficient"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getXLocation", function() { return _utils_helper__WEBPACK_IMPORTED_MODULE_3__["getXLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRangeValueXByPoint", function() { return _utils_helper__WEBPACK_IMPORTED_MODULE_3__["getRangeValueXByPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getExactData", function() { return _utils_helper__WEBPACK_IMPORTED_MODULE_3__["getExactData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getNearestValue", function() { return _utils_helper__WEBPACK_IMPORTED_MODULE_3__["getNearestValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataPoint", function() { return _utils_helper__WEBPACK_IMPORTED_MODULE_3__["DataPoint"]; });

/* harmony import */ var _utils_theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/theme */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/theme.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorTheme", function() { return _utils_theme__WEBPACK_IMPORTED_MODULE_4__["RangeNavigatorTheme"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRangeThemeColor", function() { return _utils_theme__WEBPACK_IMPORTED_MODULE_4__["getRangeThemeColor"]; });

/* harmony import */ var _renderer_range_axis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./renderer/range-axis */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/range-axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorAxis", function() { return _renderer_range_axis__WEBPACK_IMPORTED_MODULE_5__["RangeNavigatorAxis"]; });

/* harmony import */ var _renderer_chart_render__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./renderer/chart-render */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/chart-render.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeSeries", function() { return _renderer_chart_render__WEBPACK_IMPORTED_MODULE_6__["RangeSeries"]; });

/* harmony import */ var _renderer_slider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./renderer/slider */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/slider.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeSlider", function() { return _renderer_slider__WEBPACK_IMPORTED_MODULE_7__["RangeSlider"]; });

/* harmony import */ var _model_range_base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./model/range-base */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/model/range-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorSeries", function() { return _model_range_base__WEBPACK_IMPORTED_MODULE_8__["RangeNavigatorSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ThumbSettings", function() { return _model_range_base__WEBPACK_IMPORTED_MODULE_8__["ThumbSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StyleSettings", function() { return _model_range_base__WEBPACK_IMPORTED_MODULE_8__["StyleSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeTooltipSettings", function() { return _model_range_base__WEBPACK_IMPORTED_MODULE_8__["RangeTooltipSettings"]; });

/* harmony import */ var _chart_series_line_series__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../chart/series/line-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/line-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSeries", function() { return _chart_series_line_series__WEBPACK_IMPORTED_MODULE_9__["LineSeries"]; });

/* harmony import */ var _chart_series_area_series__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../chart/series/area-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/area-series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AreaSeries", function() { return _chart_series_area_series__WEBPACK_IMPORTED_MODULE_10__["AreaSeries"]; });

/* harmony import */ var _chart_axis_date_time_axis__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../chart/axis/date-time-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/date-time-axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateTime", function() { return _chart_axis_date_time_axis__WEBPACK_IMPORTED_MODULE_11__["DateTime"]; });

/* harmony import */ var _chart_axis_double_axis__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../chart/axis/double-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/double-axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Double", function() { return _chart_axis_double_axis__WEBPACK_IMPORTED_MODULE_12__["Double"]; });

/* harmony import */ var _chart_axis_logarithmic_axis__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../chart/axis/logarithmic-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/logarithmic-axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logarithmic", function() { return _chart_axis_logarithmic_axis__WEBPACK_IMPORTED_MODULE_13__["Logarithmic"]; });

/* harmony import */ var _range_navigator_user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../range-navigator/user-interaction/tooltip */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/user-interaction/tooltip.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeTooltip", function() { return _range_navigator_user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_14__["RangeTooltip"]; });

/**
 * Range Navigator component export methods
 */

















/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/model/range-base.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/range-navigator/model/range-base.js ***!
  \*************************************************************************************/
/*! exports provided: RangeNavigatorSeries, ThumbSettings, StyleSettings, RangeTooltipSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorSeries", function() { return RangeNavigatorSeries; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThumbSettings", function() { return ThumbSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StyleSettings", function() { return StyleSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeTooltipSettings", function() { return RangeTooltipSettings; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _utils_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/theme */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/theme.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};




/**
 * Series class for the range navigator
 */
var RangeNavigatorSeries = /** @class */ (function (_super) {
    __extends(RangeNavigatorSeries, _super);
    function RangeNavigatorSeries() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /** @private */
        _this.clipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, 0, 0);
        return _this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigatorSeries.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigatorSeries.prototype, "xName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigatorSeries.prototype, "yName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], RangeNavigatorSeries.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Line')
    ], RangeNavigatorSeries.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ enable: false }, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Animation"])
    ], RangeNavigatorSeries.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'transparent', width: 2 }, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Border"])
    ], RangeNavigatorSeries.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigatorSeries.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], RangeNavigatorSeries.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], RangeNavigatorSeries.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], RangeNavigatorSeries.prototype, "dashArray", void 0);
    return RangeNavigatorSeries;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Thumb settings
 */
var ThumbSettings = /** @class */ (function (_super) {
    __extends(ThumbSettings, _super);
    function ThumbSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ThumbSettings.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ThumbSettings.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ width: 1, color: null }, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Border"])
    ], ThumbSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ThumbSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Circle')
    ], ThumbSettings.prototype, "type", void 0);
    return ThumbSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Style settings
 */
var StyleSettings = /** @class */ (function (_super) {
    __extends(StyleSettings, _super);
    function StyleSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, ThumbSettings)
    ], StyleSettings.prototype, "thumb", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StyleSettings.prototype, "selectedRegionColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StyleSettings.prototype, "unselectedRegionColor", void 0);
    return StyleSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/*
 * Configures the ToolTips in the chart.
 */
var RangeTooltipSettings = /** @class */ (function (_super) {
    __extends(RangeTooltipSettings, _super);
    function RangeTooltipSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], RangeTooltipSettings.prototype, "enable", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0.85)
    ], RangeTooltipSettings.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeTooltipSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeTooltipSettings.prototype, "format", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_utils_theme__WEBPACK_IMPORTED_MODULE_3__["RangeNavigatorTheme"].tooltipLabelFont, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Font"])
    ], RangeTooltipSettings.prototype, "textStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeTooltipSettings.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#cccccc', width: 0.5 }, _common_model_base__WEBPACK_IMPORTED_MODULE_1__["Border"])
    ], RangeTooltipSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('OnDemand')
    ], RangeTooltipSettings.prototype, "displayMode", void 0);
    return RangeTooltipSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/range-navigator.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/range-navigator/range-navigator.js ***!
  \************************************************************************************/
/*! exports provided: RangeNavigator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeNavigator", function() { return RangeNavigator; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _renderer_chart_render__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./renderer/chart-render */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/chart-render.js");
/* harmony import */ var _renderer_range_axis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./renderer/range-axis */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/range-axis.js");
/* harmony import */ var _model_range_base__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./model/range-base */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/model/range-base.js");
/* harmony import */ var _renderer_slider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./renderer/slider */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/slider.js");
/* harmony import */ var _chart_index__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../chart/index */ "./node_modules/@syncfusion/ej2-charts/src/chart/index.js");
/* harmony import */ var _utils_theme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/theme */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/theme.js");
/* harmony import */ var _chart_axis_axis__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../chart/axis/axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis.js");
/* harmony import */ var _chart_axis_double_axis__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../chart/axis/double-axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/double-axis.js");
/* harmony import */ var _common_utils_export__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../common/utils/export */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/export.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};


















/**
 * Range Navigator
 */
var RangeNavigator = /** @class */ (function (_super) {
    __extends(RangeNavigator, _super);
    /**
     * Constructor for creating the widget
     * @hidden
     */
    function RangeNavigator(options, element) {
        var _this = _super.call(this, options, element) || this;
        /** @private */
        _this.animateSeries = true;
        _this.chartid = 57725;
        return _this;
    }
    /**
     * Starting point of the control initialization
     */
    RangeNavigator.prototype.preRender = function () {
        this.unWireEvents();
        this.setCulture();
        if (this.element.id === '') {
            var collection = document.getElementsByClassName('e-rangenavigator').length;
            this.element.id = 'rangenavigator_' + this.chartid + '_' + collection;
        }
        this.wireEvents();
    };
    /**
     * To initialize the private variables
     */
    RangeNavigator.prototype.initPrivateVariables = function () {
        this.doubleModule = new _chart_axis_double_axis__WEBPACK_IMPORTED_MODULE_11__["Double"]();
        this.labels = [];
        this.rangeSlider = new _renderer_slider__WEBPACK_IMPORTED_MODULE_7__["RangeSlider"](this);
        this.chartSeries = new _renderer_chart_render__WEBPACK_IMPORTED_MODULE_4__["RangeSeries"](this);
        this.lineSeriesModule = new _chart_index__WEBPACK_IMPORTED_MODULE_8__["LineSeries"]();
        this.rangeAxis = new _renderer_range_axis__WEBPACK_IMPORTED_MODULE_5__["RangeNavigatorAxis"](this);
    };
    /**
     * Method to set culture for chart
     */
    RangeNavigator.prototype.setCulture = function () {
        this.intl = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"]();
    };
    /**
     * to initialize the slider
     */
    RangeNavigator.prototype.setSliderValue = function () {
        var isDateTime = this.valueType === 'DateTime';
        var range = this.chartSeries.xAxis.actualRange;
        this.startValue = this.startValue ? this.startValue : (!this.value[0] ? range.min :
            (isDateTime ? this.value[0].getTime() : +this.value[0]));
        this.endValue = this.endValue ? this.endValue : (!this.value[1] ? range.max :
            (isDateTime ? this.value[1].getTime() : +this.value[1]));
    };
    /**
     * To render the range navigator
     */
    RangeNavigator.prototype.render = function () {
        this.trigger('load', { rangeNavigator: this });
        this.setTheme();
        this.initPrivateVariables();
        this.createRangeSvg();
        this.calculateBounds();
        this.chartSeries.renderChart(this);
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])('chartmeasuretext');
    };
    /**
     * Theming for rangeNavigator
     */
    RangeNavigator.prototype.setTheme = function () {
        /*! Set theme */
        this.themeStyle = Object(_utils_theme__WEBPACK_IMPORTED_MODULE_9__["getRangeThemeColor"])(this.theme, this);
    };
    /**
     * Method to create SVG for Range Navigator
     */
    RangeNavigator.prototype.createRangeSvg = function () {
        this.removeSvg();
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["createSvg"])(this);
        this.renderChartBackground();
    };
    /**
     * Bounds calculation for widget performed.
     */
    RangeNavigator.prototype.calculateBounds = function () {
        var labelPadding = this.enableGrouping ? 15 : 8;
        var thumb = this.navigatorStyleSettings.thumb;
        var labelSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["measureText"])('tempString', this.labelStyle).height;
        var margin = this.margin;
        var isLeightWeight = !this.series.length;
        var tooltipSpace = (!this.disableRangeSelector) &&
            isLeightWeight && this.tooltip.enable ? 35 : 0;
        var selector = this.periodSelectorModule;
        if (this.periodSelectorModule && this.periodSelectorSettings.periods.length > 0) {
            selector.periodSelectorSize = { x: 0, y: 0, height: 0, width: 0 };
            selector.periodSelectorSize.width = this.availableSize.width;
            selector.periodSelectorSize.height = this.periodSelectorSettings.height;
            selector.periodSelectorSize.y = this.periodSelectorSettings.position === 'Bottom' ?
                this.availableSize.height - selector.periodSelectorSize.height : 0;
        }
        var periodSelectorY = this.periodSelectorSettings.position === 'Top' && selector ?
            selector.periodSelectorSize.y + selector.periodSelectorSize.height : 0;
        this.bounds = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"]((this.themeStyle.thumbWidth / 2 + thumb.border.width + margin.left), margin.top + tooltipSpace + periodSelectorY, this.availableSize.width - this.themeStyle.thumbWidth - (thumb.border.width * 2) - margin.left - margin.right, this.availableSize.height - margin.top - margin.bottom - tooltipSpace - (selector ? selector.periodSelectorSize.height : 0));
        var deductHeight = ((this.labelPosition === 'Outside' || isLeightWeight) ?
            (labelSize + labelPadding) : 0) + ((this.tickPosition === 'Outside' || isLeightWeight) ?
            (this.majorTickLines.height) : 0);
        this.bounds.height -= deductHeight;
        if (isLeightWeight) {
            var height = this.enableGrouping ? this.bounds.height - ((labelSize) + labelPadding) : this.bounds.height;
            this.bounds.y += (this.themeStyle.thumbHeight > height ? (this.themeStyle.thumbHeight - height) / 2 : 0);
        }
        if (this.disableRangeSelector) {
            this.bounds.y = 0;
            this.bounds.height = this.periodSelectorSettings.height;
        }
    };
    /**
     * Creating Chart for range navigator
     */
    RangeNavigator.prototype.renderChart = function () {
        this.chartSeries.renderSeries(this);
        this.rangeAxis.renderGridLines();
        this.rangeAxis.renderAxisLabels();
        this.chartSeries.appendSeriesElements(this);
        this.createSecondaryElement();
        this.setSliderValue();
        this.renderPeriodSelector();
        this.renderSlider();
        if (!this.stockChart) {
            this.element.appendChild(this.svgObject);
        }
        var blazor = 'Blazor';
        this.trigger('loaded', { rangeNavigator: window[blazor] ? {} : this });
        this.rangeSlider.setSlider(this.startValue, this.endValue, false, this.tooltip.enable && this.tooltip.displayMode === 'Always');
    };
    /**
     * To render period selector value
     */
    RangeNavigator.prototype.renderPeriodSelector = function () {
        if (this.periodSelectorModule) {
            this.periodSelectorModule.renderSelectorElement(this);
            this.periodSelectorModule.renderSelector();
        }
    };
    /**
     * Creating secondary range navigator
     */
    RangeNavigator.prototype.createSecondaryElement = function () {
        // For userInteraction
        if (this.tooltip.enable) {
            var tooltipDiv = this.createElement('div');
            tooltipDiv.id = this.element.id + '_Secondary_Element';
            tooltipDiv.setAttribute('style', 'position: relative');
            this.element.appendChild(tooltipDiv);
        }
    };
    /**
     * Slider Calculation ane rendering performed here
     */
    RangeNavigator.prototype.renderSlider = function () {
        this.rangeSlider.render(this);
        this.rangeSlider.setSlider(this.startValue, this.endValue, true, this.tooltip.enable && this.tooltip.displayMode === 'Always');
    };
    /**
     * To Remove the SVG.
     * @return {boolean}
     * @private
     */
    RangeNavigator.prototype.removeSvg = function () {
        if (Object(_chart_index__WEBPACK_IMPORTED_MODULE_8__["getElement"])(this.element.id + '_Secondary_Element')) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_chart_index__WEBPACK_IMPORTED_MODULE_8__["getElement"])(this.element.id + '_Secondary_Element'));
        }
        var removeLength = 0;
        if (this.svgObject) {
            while (this.svgObject.childNodes.length > removeLength) {
                this.svgObject.removeChild(this.svgObject.firstChild);
            }
            if (!this.svgObject.hasChildNodes() && this.svgObject.parentNode && !this.stockChart) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.svgObject);
            }
        }
    };
    /** Wire, UnWire and Event releated calculation Started here */
    /**
     * Method to un-bind events for range navigator
     */
    RangeNavigator.prototype.unWireEvents = function () {
        /*! Find the Events type */
        var startEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent;
        var moveEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent;
        var stopEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent;
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        /*! UnBind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, startEvent, this.rangeOnMouseDown);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, moveEvent, this.mouseMove);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, stopEvent, this.mouseEnd);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.rangeOnMouseClick);
        //EventHandler.remove(this.element, 'contextmenu', this.rangeRightClick);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, cancelEvent, this.mouseLeave);
        window.removeEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.rangeResize);
    };
    /**
     * Method to bind events for range navigator
     */
    RangeNavigator.prototype.wireEvents = function () {
        /*! Find the Events type */
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        /*! Bind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.rangeOnMouseDown, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMove, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseEnd, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.rangeOnMouseClick, this);
        //EventHandler.add(this.element, 'contextmenu', this.rangeRightClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, cancelEvent, this.mouseLeave, this);
        window.addEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.rangeResize.bind(this));
        var element = this.element;
        element.style.touchAction = 'none';
        element.style.msTouchAction = 'none';
        element.style.msContentZooming = 'none';
        element.style.msUserSelect = 'none';
        element.style.webkitUserSelect = 'none';
        element.style.position = 'relative';
        element.style.display = 'block';
    };
    /**
     * Handles the widget resize.
     * @return {boolean}
     * @private
     */
    RangeNavigator.prototype.rangeResize = function (e) {
        var _this = this;
        this.animateSeries = false;
        if (this.resizeTo) {
            clearTimeout(this.resizeTo);
        }
        var arg = {
            rangeNavigator: this,
            name: 'resized',
            currentSize: new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Size"](0, 0),
            previousSize: new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Size"](this.availableSize.width, this.availableSize.height),
        };
        this.resizeTo = setTimeout(function () {
            if (_this.isDestroyed) {
                clearTimeout(_this.resizeTo);
                return;
            }
            if (_this.stockChart) {
                for (var i = 0; i < arg.rangeNavigator.series.length; i++) {
                    arg.rangeNavigator.series[i].dataSource = _this.stockChart.tempDataSource[i] || _this.stockChart.blazorDataSource[i];
                }
                if (_this.stockChart.dataSource) {
                    arg.rangeNavigator.dataSource = _this.stockChart.tempDataSource[0];
                }
            }
            _this.createRangeSvg();
            arg.currentSize = _this.availableSize;
            _this.trigger('resized', arg);
            _this.calculateBounds();
            _this.chartSeries.renderChart(_this);
        }, 500);
        return false;
    };
    /**
     * Handles the mouse move.
     * @return {boolean}
     * @private
     */
    RangeNavigator.prototype.mouseMove = function (e) {
        this.mouseX = this.setMouseX(e);
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, e);
        return false;
    };
    /**
     * Handles the mouse leave.
     * @return {boolean}
     * @private
     */
    RangeNavigator.prototype.mouseLeave = function (e) {
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        this.mouseX = this.setMouseX(e);
        this.notify(cancelEvent, e);
        return false;
    };
    /**
     * Handles the mouse click on range navigator.
     * @return {boolean}
     * @private
     */
    RangeNavigator.prototype.rangeOnMouseClick = function (e) {
        this.notify('click', e);
        return false;
    };
    /**
     * Handles the print method for range navigator control.
     */
    RangeNavigator.prototype.print = function (id) {
        new _common_utils_export__WEBPACK_IMPORTED_MODULE_12__["ExportUtils"](this).print(id);
    };
    /**
     * Handles the export method for range navigator control.
     * @param type
     * @param fileName
     */
    RangeNavigator.prototype.export = function (type, fileName, orientation, controls, width, height, isVertical) {
        controls = controls ? controls : [this];
        new _common_utils_export__WEBPACK_IMPORTED_MODULE_12__["ExportUtils"](this).export(type, fileName, orientation, controls, width, height, isVertical);
    };
    /**
     * Creating a background element to the svg object
     */
    RangeNavigator.prototype.renderChartBackground = function () {
        var rect = new _chart_index__WEBPACK_IMPORTED_MODULE_8__["RectOption"](this.element.id + '_ChartBorder', this.themeStyle.background, { width: 0, color: 'transparent' }, 1, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, this.availableSize.width, this.availableSize.height));
        this.svgObject.appendChild(this.renderer.drawRectangle(rect));
    };
    /**
     * Handles the mouse down on range navigator.
     * @return {boolean}
     * @private
     */
    RangeNavigator.prototype.rangeOnMouseDown = function (e) {
        this.mouseDownX = this.setMouseX(e);
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, e);
        return false;
    };
    /**
     * Handles the mouse up.
     * @return {boolean}
     * @private
     */
    RangeNavigator.prototype.mouseEnd = function (e) {
        this.mouseX = this.setMouseX(e);
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, e);
        return false;
    };
    // private rangeRightClick(event: MouseEvent | PointerEvent): boolean {
    //     if (event.buttons === 2 || event.which === 0 || (<PointerEvent>event).pointerType === 'touch') {
    //         event.preventDefault();
    //         event.stopPropagation();
    //         return false;
    //     }
    //     return true;
    // }
    /**
     * To find mouse x, y for aligned range navigator element svg position
     */
    RangeNavigator.prototype.setMouseX = function (e) {
        var pageX = e.type.indexOf('touch') > -1 ?
            e.changedTouches[0].clientX : e.clientX;
        var rect = this.element.getBoundingClientRect();
        var svgRect = !this.stockChart ? Object(_chart_index__WEBPACK_IMPORTED_MODULE_8__["getElement"])(this.element.id + '_svg').getBoundingClientRect() :
            Object(_chart_index__WEBPACK_IMPORTED_MODULE_8__["getElement"])(this.element.id).getBoundingClientRect();
        return (pageX - rect.left) - Math.max(svgRect.left - rect.left, 0);
    };
    /** Wire, UnWire and Event releated calculation End here */
    /**
     * Get the properties to be maintained in the persisted state.
     * @private
     */
    RangeNavigator.prototype.getPersistData = function () {
        var keyEntity = ['loaded'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * OnProperty change method calling here
     * @param newProp
     * @param oldProp
     */
    RangeNavigator.prototype.onPropertyChanged = function (newProp, oldProp) {
        var renderer = false;
        var refreshBounds = false;
        var refreshRange = false;
        this.animateSeries = false;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'width':
                case 'height':
                case 'navigatorBorder':
                case 'enableGrouping':
                case 'labelPosition':
                case 'tickPosition':
                case 'labelStyle':
                    refreshBounds = true;
                    break;
                case 'series':
                case 'enableRtl':
                case 'dataSource':
                case 'xName':
                case 'yName':
                case 'query':
                case 'minimum':
                case 'maximum':
                case 'interval':
                case 'intervalType':
                case 'logBase':
                case 'valueType':
                case 'majorGridLines':
                case 'minorGridLines':
                case 'navigatorStyleSettings':
                case 'labelFormat':
                case 'skeleton':
                case 'skeletonType':
                case 'secondaryLabelAlignment':
                    renderer = true;
                    break;
                case 'theme':
                    this.animateSeries = true;
                    break;
                case 'locale':
                    _super.prototype.refresh.call(this);
                    break;
                case 'value':
                    this.startValue = null;
                    this.endValue = null;
                    refreshRange = true;
                    break;
            }
        }
        if (!refreshBounds && renderer) {
            this.removeSvg();
            this.chartSeries.xMin = Infinity;
            this.chartSeries.xMax = -Infinity;
            this.chartSeries.renderChart(this);
        }
        if (refreshBounds) {
            this.removeSvg();
            this.calculateBounds();
            this.chartSeries.renderChart(this);
        }
        if (!refreshBounds && !renderer && refreshRange) {
            this.setSliderValue();
            this.rangeSlider.setSlider(this.startValue, this.endValue, true, this.tooltip.enable && this.tooltip.displayMode === 'Always');
        }
    };
    /**
     * To provide the array of modules needed for control rendering
     * @return {ModuleDeclaration[]}
     * @private
     */
    RangeNavigator.prototype.requiredModules = function () {
        var _this = this;
        var modules = [];
        this.series.map(function (series) {
            modules.push({
                member: series.type + 'Series',
                args: [_this]
            });
        });
        if (this.periodSelectorSettings.periods.length > 0) {
            modules.push({
                member: 'PeriodSelector',
                args: [this]
            });
        }
        if (this.valueType !== 'Double') {
            modules.push({
                member: this.valueType,
                args: [this]
            });
        }
        if (this.tooltip.enable) {
            modules.push({
                member: 'RangeTooltip',
                args: [this]
            });
        }
        return modules;
    };
    /**
     * To get the module name of the widget
     */
    RangeNavigator.prototype.getModuleName = function () {
        return 'rangeNavigator';
    };
    /**
     * To destroy the widget
     * @method destroy
     * @return {void}.
     * @member of rangeNavigator
     */
    RangeNavigator.prototype.destroy = function () {
        this.unWireEvents();
        this.rangeSlider.destroy();
        _super.prototype.destroy.call(this);
        this.element.classList.remove('e-rangenavigator');
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigator.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigator.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigator.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigator.prototype, "xName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigator.prototype, "yName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], RangeNavigator.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _model_range_base__WEBPACK_IMPORTED_MODULE_6__["RangeNavigatorSeries"])
    ], RangeNavigator.prototype, "series", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_range_base__WEBPACK_IMPORTED_MODULE_6__["RangeTooltipSettings"])
    ], RangeNavigator.prototype, "tooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigator.prototype, "minimum", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigator.prototype, "maximum", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeNavigator.prototype, "interval", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], RangeNavigator.prototype, "intervalType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Hide')
    ], RangeNavigator.prototype, "labelIntersectAction", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], RangeNavigator.prototype, "logBase", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Double')
    ], RangeNavigator.prototype, "valueType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Outside')
    ], RangeNavigator.prototype, "labelPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(500)
    ], RangeNavigator.prototype, "animationDuration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], RangeNavigator.prototype, "enableGrouping", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], RangeNavigator.prototype, "enableDeferredUpdate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], RangeNavigator.prototype, "disableRangeSelector", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], RangeNavigator.prototype, "allowSnapping", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], RangeNavigator.prototype, "useGroupingSeparator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], RangeNavigator.prototype, "groupBy", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Outside')
    ], RangeNavigator.prototype, "tickPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_utils_theme__WEBPACK_IMPORTED_MODULE_9__["RangeNavigatorTheme"].axisLabelFont, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Font"])
    ], RangeNavigator.prototype, "labelStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_axis_axis__WEBPACK_IMPORTED_MODULE_10__["MajorGridLines"])
    ], RangeNavigator.prototype, "majorGridLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_axis_axis__WEBPACK_IMPORTED_MODULE_10__["MajorTickLines"])
    ], RangeNavigator.prototype, "majorTickLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_range_base__WEBPACK_IMPORTED_MODULE_6__["StyleSettings"])
    ], RangeNavigator.prototype, "navigatorStyleSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["PeriodSelectorSettings"])
    ], RangeNavigator.prototype, "periodSelectorSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#DDDDDD', width: 1 }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Border"])
    ], RangeNavigator.prototype, "navigatorBorder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Material')
    ], RangeNavigator.prototype, "theme", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], RangeNavigator.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], RangeNavigator.prototype, "labelFormat", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], RangeNavigator.prototype, "skeleton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('DateTime')
    ], RangeNavigator.prototype, "skeletonType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Middle')
    ], RangeNavigator.prototype, "secondaryLabelAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ top: 5, bottom: 5, right: 5, left: 5 }, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["Margin"])
    ], RangeNavigator.prototype, "margin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RangeNavigator.prototype, "load", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RangeNavigator.prototype, "loaded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RangeNavigator.prototype, "resized", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RangeNavigator.prototype, "labelRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RangeNavigator.prototype, "changed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RangeNavigator.prototype, "tooltipRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RangeNavigator.prototype, "selectorRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], RangeNavigator.prototype, "beforePrint", void 0);
    RangeNavigator = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], RangeNavigator);
    return RangeNavigator;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/chart-render.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/chart-render.js ***!
  \******************************************************************************************/
/*! exports provided: RangeSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeSeries", function() { return RangeSeries; });
/* harmony import */ var _chart_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../chart/index */ "./node_modules/@syncfusion/ej2-charts/src/chart/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_model_theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/model/data */ "./node_modules/@syncfusion/ej2-charts/src/common/model/data.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();








/**
 * To render Chart series
 */
var RangeSeries = /** @class */ (function (_super) {
    __extends(RangeSeries, _super);
    function RangeSeries(range) {
        var _this = _super.call(this) || this;
        _this.dataSource = range.dataSource;
        _this.xName = range.xName;
        _this.yName = range.yName;
        _this.query = range.query;
        _this.xMin = Infinity;
        _this.xMax = -Infinity;
        _this.yMin = Infinity;
        _this.yMax = -Infinity;
        return _this;
    }
    /**
     * To render light weight and data manager process
     * @param control
     */
    RangeSeries.prototype.renderChart = function (control) {
        var _this = this;
        var dataSource;
        var query;
        this.seriesLength = 0;
        control.rangeSlider.points = [];
        if (control.series.length) {
            control.series.map(function (series) {
                dataSource = series.dataSource || control.dataSource;
                query = series.query || control.query;
                series.points = [];
                _this.processDataSource(dataSource, query, control, series);
            });
        }
        else {
            this.processDataSource(control.dataSource, control.query, control);
        }
    };
    RangeSeries.prototype.processDataSource = function (dataSource, query, control, series) {
        var _this = this;
        if (!(dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["isNullOrUndefined"])(dataSource) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["isNullOrUndefined"])(query)) {
            this.dataManagerSuccess({ result: dataSource, count: dataSource.length }, control, series);
            return;
        }
        control.dataModule = new _common_model_data__WEBPACK_IMPORTED_MODULE_6__["Data"](dataSource, query);
        var dataManager = control.dataModule.getData(control.dataModule.generateQuery().requiresCount());
        dataManager.then(function (e) { return _this.dataManagerSuccess(e, control, series); });
    };
    /**
     * data manager process calculated here
     * @param e
     */
    RangeSeries.prototype.dataManagerSuccess = function (e, control, series) {
        var viewData = e.result !== '' ? e.result : [];
        this.processJsonData(viewData, control, Object.keys(viewData).length, series);
        this.seriesLength += series ? 1 : this.seriesLength;
        if (!series || this.seriesLength === control.series.length) {
            this.processXAxis(control);
            this.calculateGroupingBounds(control);
            this.processYAxis(control);
            control.renderChart();
        }
    };
    /**
     * Process JSON data from data source
     * @param control
     * @param len
     */
    RangeSeries.prototype.processJsonData = function (viewData, control, len, series) {
        var i = 0;
        var point;
        var xName = (series && series.xName) || control.xName;
        var yName = (series && series.yName) || control.yName;
        while (i < len) {
            point = new _utils_helper__WEBPACK_IMPORTED_MODULE_2__["DataPoint"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["getValue"])(xName, viewData[i]), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["getValue"])(yName, viewData[i]));
            point.yValue = +point.y;
            if (control.valueType === 'DateTime') {
                var dateParser = control.intl.getDateParser({ skeleton: 'full', type: 'dateTime' });
                var dateFormatter = control.intl.getDateFormat({ skeleton: 'full', type: 'dateTime' });
                point.x = new Date(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.parseJson({ val: point.x }).val);
                point.xValue = Date.parse(dateParser(dateFormatter(point.x)));
            }
            else {
                point.xValue = +point.x;
            }
            if (series) {
                series.points.push(point);
            }
            this.xMin = Math.min(this.xMin, point.xValue);
            this.yMin = Math.min(this.yMin, point.yValue);
            this.xMax = Math.max(this.xMax, point.xValue);
            this.yMax = Math.max(this.yMax, point.yValue);
            control.rangeSlider.points.push(point);
            i++;
        }
    };
    RangeSeries.prototype.processXAxis = function (control) {
        var axisModule;
        var axis = {
            minimum: control.minimum, maximum: control.maximum,
            interval: control.interval, valueType: control.valueType,
            isInversed: control.enableRtl, labelFormat: control.labelFormat,
            logBase: control.logBase, skeleton: control.skeleton, skeletonType: control.skeletonType
        };
        this.xAxis = axis;
        this.xAxis.intervalType = control.intervalType;
        this.xAxis.maximumLabels = 3;
        this.xAxis.skeleton = control.skeleton;
        this.xAxis.intervalDivs = [10, 5, 2, 1];
        this.xAxis.rect = control.bounds;
        this.xAxis.visibleLabels = [];
        this.xAxis.orientation = 'Horizontal';
        axisModule = control[Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(control.valueType) + 'Module'];
        axisModule.min = this.xMin;
        axisModule.max = this.xMax;
        axisModule.getActualRange(this.xAxis, control.bounds);
        if (this.xAxis.valueType !== 'Logarithmic') {
            axisModule.updateActualRange(this.xAxis, this.xAxis.actualRange.min, this.xAxis.actualRange.max, this.xAxis.actualRange.interval);
        }
        this.xAxis.actualRange.delta = this.xAxis.actualRange.max - this.xAxis.actualRange.min;
        this.xAxis.visibleRange = this.xAxis.actualRange;
        axisModule.calculateVisibleLabels(this.xAxis, control);
    };
    /**
     * Process yAxis for range navigator
     * @param control
     */
    RangeSeries.prototype.processYAxis = function (control) {
        var axis = {
            majorGridLines: { width: 0 }, rangePadding: 'None',
            majorTickLines: { width: 0 }, labelStyle: { size: '0' },
            visible: false, valueType: 'Double', minimum: null, maximum: null,
            interval: null
        };
        this.yAxis = axis;
        this.yAxis.rect = control.bounds;
        this.yAxis.maximumLabels = 3;
        this.yAxis.intervalDivs = [10, 5, 2, 1];
        this.yAxis.orientation = 'Vertical';
        control.doubleModule.min = this.yMin;
        control.doubleModule.max = this.yMax;
        control.doubleModule.getActualRange(this.yAxis, control.bounds);
        control.doubleModule.updateActualRange(this.yAxis, this.yAxis.actualRange.min, this.yAxis.actualRange.max, this.yAxis.actualRange.interval);
        this.yAxis.actualRange.delta = this.yAxis.actualRange.max - this.yAxis.actualRange.min;
        this.yAxis.visibleRange = this.yAxis.actualRange;
    };
    /**
     * Process Light weight control
     * @param control
     * @private
     */
    RangeSeries.prototype.renderSeries = function (control) {
        var _this = this;
        this.chartGroup = control.renderer.createGroup({ id: control.element.id + '_chart' });
        var colors = Object(_common_model_theme__WEBPACK_IMPORTED_MODULE_4__["getSeriesColor"])(control.theme);
        control.series.map(function (series, index) {
            series.xAxis = _this.xAxis;
            series.yAxis = _this.yAxis;
            series.chart = control;
            series.index = index;
            series.xAxis.isInversed = control.enableRtl;
            series.interior = series.fill || colors[index % colors.length];
            _this.createSeriesElement(control, series, index);
            if (control[Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(series.type) + 'SeriesModule']) {
                control[Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(series.type) + 'SeriesModule'].render(series, _this.xAxis, _this.yAxis, false);
            }
            else {
                control['line' + 'SeriesModule'].render(series, _this.xAxis, _this.yAxis, false);
            }
            _this.chartGroup.appendChild(series.seriesElement);
            if (series.animation.enable && control.animateSeries) {
                if (control[Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(series.type) + 'SeriesModule']) {
                    control[Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(series.type) + 'SeriesModule'].doAnimation(series);
                }
                else {
                    //control['line' + 'SeriesModule'].doAnimation(series);
                }
            }
        });
    };
    /**
     * Append series elements in element
     */
    RangeSeries.prototype.appendSeriesElements = function (control) {
        control.svgObject.appendChild(this.chartGroup);
        if (control.series.length) {
            this.drawSeriesBorder(control, this.chartGroup);
        }
    };
    RangeSeries.prototype.createSeriesElement = function (control, series, index) {
        var elementId = control.element.id;
        series.clipRect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_5__["Rect"](this.xAxis.rect.x, this.yAxis.rect.y, this.xAxis.rect.width, this.yAxis.rect.height);
        series.clipRectElement = control.renderer.drawClipPath(new _chart_index__WEBPACK_IMPORTED_MODULE_0__["RectOption"](elementId + '_RangeSeriesClipRect_' + index, 'transparent', { width: 1, color: 'Gray' }, 1, {
            x: 0, y: 0,
            width: series.clipRect.width,
            height: series.clipRect.height
        }));
        series.seriesElement = control.renderer.createGroup({
            'id': elementId + 'SeriesGroup' + index,
            'transform': 'translate(' + series.clipRect.x + ',' + (series.clipRect.y) + ')',
            'clip-path': 'url(#' + elementId + '_RangeSeriesClipRect_' + index + ')'
        });
        series.seriesElement.appendChild(series.clipRectElement);
    };
    RangeSeries.prototype.calculateGroupingBounds = function (control) {
        var padding = control.margin.bottom;
        var labelHeight = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_5__["measureText"])('string', control.labelStyle).height;
        this.calculateDateTimeNiceInterval(this.xAxis, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_5__["Size"](control.bounds.width, control.bounds.height), this.xMin, this.xMax, false);
        if (control.enableGrouping && control.valueType === 'DateTime'
            && (this.xAxis.actualIntervalType !== 'Years' || !control.series.length)) {
            control.bounds.height -= (control.labelPosition === 'Outside' || control.series.length === 0) ? padding + labelHeight :
                (labelHeight + 2 * padding);
        }
        if (!control.series.length) {
            control.bounds.y += control.bounds.height / 4;
            control.bounds.height = control.bounds.height / 2;
        }
    };
    RangeSeries.prototype.drawSeriesBorder = function (control, chartElement) {
        var start = control.stockChart ? 'M' : 'L';
        var close = control.stockChart ? '' : 'Z';
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_5__["PathOption"](control.element.id + '_SeriesBorder', 'transparent', control.navigatorBorder.width, control.navigatorBorder.color, 1, '', ('M ' + (control.bounds.x) + ' ' + (control.bounds.y) +
            ' L ' + (control.bounds.x + control.bounds.width) + ' ' + control.bounds.y +
            start + (control.bounds.x + control.bounds.width) + ' ' + (control.bounds.y + control.bounds.height) +
            ' L ' + (control.bounds.x) + ' ' + (control.bounds.y + control.bounds.height) + close));
        var htmlObject = control.renderer.drawPath(options);
        control.svgObject.appendChild(htmlObject);
    };
    return RangeSeries;
}(_chart_index__WEBPACK_IMPORTED_MODULE_0__["NiceInterval"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/range-axis.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/range-axis.js ***!
  \****************************************************************************************/
/*! exports provided: RangeNavigatorAxis */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorAxis", function() { return RangeNavigatorAxis; });
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _chart_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../chart/index */ "./node_modules/@syncfusion/ej2-charts/src/chart/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * class for axis
 */
var RangeNavigatorAxis = /** @class */ (function (_super) {
    __extends(RangeNavigatorAxis, _super);
    function RangeNavigatorAxis(range) {
        var _this = _super.call(this) || this;
        _this.firstLevelLabels = [];
        _this.secondLevelLabels = [];
        _this.rangeNavigator = range;
        return _this;
    }
    /**
     * To render grid lines of axis
     */
    RangeNavigatorAxis.prototype.renderGridLines = function () {
        var pointX = 0;
        var control = this.rangeNavigator;
        var majorGridLines = control.majorGridLines;
        var majorTickLines = control.majorTickLines;
        var majorGrid = '';
        var majorTick = '';
        var rect = control.bounds;
        var chartAxis = control.chartSeries.xAxis;
        var labelLength;
        var range = chartAxis.visibleRange;
        var disabledColor = (control.disableRangeSelector) ? 'transparent' : null;
        this.gridLines = control.renderer.createGroup({ id: control.element.id + '_GridLines' });
        var tick = (control.tickPosition === 'Outside' || control.series.length === 0) ?
            rect.y + rect.height + majorTickLines.height : rect.y + rect.height - majorTickLines.height;
        //Gridlines
        this.firstLevelLabels = [];
        chartAxis.labelStyle = control.labelStyle;
        chartAxis.skeleton = control.skeleton;
        chartAxis.skeletonType = control.skeletonType;
        chartAxis.isChart = false;
        if (control.valueType === 'DateTime') {
            this.calculateDateTimeNiceInterval(chartAxis, rect, chartAxis.doubleRange.start, chartAxis.doubleRange.end, chartAxis.isChart);
            this.actualIntervalType = chartAxis.actualIntervalType;
            this.findAxisLabels(chartAxis);
        }
        this.firstLevelLabels = chartAxis.visibleLabels;
        this.lowerValues = [];
        labelLength = chartAxis.visibleLabels.length;
        for (var i = 0; i < labelLength; i++) {
            this.lowerValues.push(this.firstLevelLabels[i].value);
            pointX = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])(this.firstLevelLabels[i].value, chartAxis) * rect.width) + rect.x;
            if (pointX >= rect.x && (rect.x + rect.width) >= pointX) {
                majorGrid = majorGrid.concat('M ' + pointX + ' ' + (control.bounds.y + control.bounds.height) +
                    ' L ' + pointX + ' ' + control.bounds.y + ' ');
                majorTick = majorTick.concat('M ' + (pointX) + ' ' + (rect.y + rect.height) +
                    ' L ' + (pointX) + ' ' + tick + ' ');
            }
        }
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](control.element.id + '_MajorGridLine', 'transparent', majorGridLines.width, control.series.length ? disabledColor || majorGridLines.color || control.themeStyle.gridLineColor : 'transparent', 1, majorGridLines.dashArray, majorGrid);
        this.gridLines.appendChild(control.renderer.drawPath(options));
        options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](control.element.id + '_MajorTickLine', 'transparent', majorTickLines.width, disabledColor || majorTickLines.color || control.themeStyle.gridLineColor, 1, majorGridLines.dashArray, majorTick);
        this.gridLines.appendChild(control.renderer.drawPath(options));
    };
    /**
     * To render of axis labels
     */
    RangeNavigatorAxis.prototype.renderAxisLabels = function () {
        var axis = this.rangeNavigator.chartSeries.xAxis;
        var control = this.rangeNavigator;
        var pointY;
        var rect = control.bounds;
        var labelElement = control.renderer.createGroup({ id: control.element.id + '_AxisLabels' });
        var firstLevelElement = control.renderer.createGroup({ id: control.element.id + '_FirstLevelAxisLabels' });
        var secondLevelElement = control.renderer.createGroup({ id: control.element.id + '_SecondLevelAxisLabels' });
        var secondaryAxis = axis;
        pointY = this.findLabelY(control, false);
        this.placeAxisLabels(axis, pointY, '_AxisLabel_', control, firstLevelElement);
        secondaryAxis.intervalType = secondaryAxis.actualIntervalType = (control.groupBy ||
            this.getSecondaryLabelType(axis.actualIntervalType));
        if (control.enableGrouping && control.valueType === 'DateTime' && this.actualIntervalType !== 'Years') {
            secondaryAxis.visibleRange.interval = 1;
            secondaryAxis.visibleLabels = [];
            this.findAxisLabels(secondaryAxis);
            this.secondLevelLabels = secondaryAxis.visibleLabels;
            pointY = this.findLabelY(control, true);
            var border = this.placeAxisLabels(secondaryAxis, pointY, '_SecondaryLabel_', control, secondLevelElement);
            var path = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["PathOption"](control.element.id + '_SecondaryMajorLines', 'transparent', control.majorTickLines.width, control.majorTickLines.color || control.themeStyle.gridLineColor, 1, control.majorGridLines.dashArray, border);
            this.gridLines.appendChild(control.renderer.drawPath(path));
        }
        control.chartSeries.xAxis.visibleLabels = control.chartSeries.xAxis.visibleLabels.concat(secondaryAxis.visibleLabels);
        labelElement.appendChild(firstLevelElement);
        labelElement.appendChild(secondLevelElement);
        //gridlines and axis label append to element
        control.svgObject.appendChild(this.gridLines);
        control.svgObject.appendChild(labelElement);
    };
    /**
     * To find secondary level label type
     * @param type
     */
    RangeNavigatorAxis.prototype.getSecondaryLabelType = function (type) {
        var types = ['Years', 'Quarter', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'];
        return (type === 'Years' ? 'Years' : types[types.indexOf(type) - 1]);
    };
    /**
     * To find labels for date time axis
     * @param axis
     */
    RangeNavigatorAxis.prototype.findAxisLabels = function (axis) {
        axis.visibleLabels = [];
        var start = new Date(axis.visibleRange.min);
        var nextInterval;
        var text;
        var interval = this.rangeNavigator.interval ? this.rangeNavigator.interval : 1;
        switch (axis.actualIntervalType) {
            case 'Years':
                start = new Date(start.getFullYear().toString());
                break;
            case 'Quarter':
                if (start.getMonth() <= 2) {
                    start = new Date(start.getFullYear(), 0, 1);
                }
                else if (start.getMonth() <= 5) {
                    start = new Date(start.getFullYear(), 3, 1);
                }
                else if (start.getMonth() <= 8) {
                    start = new Date(start.getFullYear(), 6, 1);
                }
                else {
                    start = new Date(start.getFullYear(), 9, 1);
                }
                break;
            case 'Months':
                start = new Date(start.getFullYear(), start.getMonth());
                break;
            case 'Weeks':
                start = new Date(start.getFullYear(), start.getMonth(), start.getDate() - start.getDay());
                break;
            case 'Days':
                start = new Date(start.getFullYear(), start.getMonth(), start.getDate());
                break;
            case 'Hours':
                start = new Date(start.getFullYear(), start.getMonth(), start.getDate(), start.getHours());
                break;
            case 'Minutes':
                start = new Date(start.getFullYear(), start.getMonth(), start.getDate(), start.getHours(), start.getMinutes());
                break;
            case 'Seconds':
                start = new Date(start.getFullYear(), start.getMonth(), start.getDate(), start.getHours(), start.getMinutes(), start.getSeconds());
                break;
        }
        nextInterval = start.getTime();
        this.rangeNavigator.format = this.rangeNavigator.intl.getDateFormat({
            format: axis.labelFormat, type: Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["firstToLowerCase"])(axis.skeletonType), skeleton: this.getSkeleton(axis, null, null)
        });
        while (nextInterval < axis.visibleRange.max) {
            text = this.dateFormats(this.rangeNavigator.format(new Date(nextInterval)), axis, axis.visibleLabels.length);
            axis.visibleLabels.push(new _chart_index__WEBPACK_IMPORTED_MODULE_2__["VisibleLabels"](text, nextInterval, this.rangeNavigator.labelStyle, text));
            nextInterval = this.increaseDateTimeInterval(axis, nextInterval, interval).getTime();
        }
    };
    /**
     * To find date time formats for Quarter and week interval type
     * @param text
     * @param axis
     * @param index
     */
    RangeNavigatorAxis.prototype.dateFormats = function (text, axis, index) {
        var changedText = text;
        var isFirstLevel = this.rangeNavigator.enableGrouping && this.firstLevelLabels.length === 0;
        switch (axis.actualIntervalType) {
            case 'Quarter':
                if (text.indexOf('Jan') > -1) {
                    changedText = !isFirstLevel ? text.replace('Jan', 'Quarter1') : 'Quarter1';
                }
                else if (text.indexOf('Apr') > -1) {
                    changedText = !isFirstLevel ? text.replace('Apr', 'Quarter2') : 'Quarter2';
                }
                else if (text.indexOf('Jul') > -1) {
                    changedText = !isFirstLevel ? text.replace('Jul', 'Quarter3') : 'Quarter3';
                }
                else if (text.indexOf('Oct') > -1) {
                    changedText = !isFirstLevel ? text.replace('Oct', 'Quarter4') : 'Quarter4';
                }
                break;
            case 'Weeks':
                changedText = 'Week' + ++index;
                break;
            default:
                changedText = text;
                break;
        }
        return changedText;
    };
    /**
     * To find the y co-ordinate for axis labels
     * @param control - rangeNavigator
     * @param isSecondary sets true if the axis is secondary axis
     */
    RangeNavigatorAxis.prototype.findLabelY = function (control, isSecondary) {
        var pointY;
        var reference = control.bounds.y + control.bounds.height;
        var tickHeight = control.majorTickLines.height;
        var textHeight = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["measureText"])('Quarter1 2011', control.labelStyle).height;
        var padding = 8;
        if ((control.labelPosition === 'Outside' && control.tickPosition === 'Outside') || control.series.length === 0) {
            pointY = reference + tickHeight + padding + textHeight * 0.75;
        }
        else if (control.labelPosition === 'Inside' && control.tickPosition === 'Inside') {
            pointY = reference - tickHeight - padding;
        }
        else if (control.labelPosition === 'Inside' && control.tickPosition === 'Outside') {
            pointY = reference - padding;
        }
        else {
            pointY = reference + padding + (textHeight * 0.75);
        }
        if (isSecondary) {
            padding = 15;
            if (control.labelPosition === 'Outside' || control.series.length === 0) {
                pointY += padding + textHeight * 0.75;
            }
            else {
                pointY = (control.tickPosition === 'Outside' || control.series.length === 0) ?
                    reference + tickHeight + padding + textHeight * 0.75 : reference + padding + textHeight * 0.75;
            }
        }
        return pointY;
    };
    /**
     * It places the axis labels and returns border for secondary axis labels
     * @param axis axis for the lables placed
     * @param pointY y co-ordinate for axis labels
     * @param id id for the axis elements
     * @param control range navigator
     * @param labelElement parent element in which axis labels appended
     */
    RangeNavigatorAxis.prototype.placeAxisLabels = function (axis, pointY, id, control, labelElement) {
        var maxLabels = axis.visibleLabels.length;
        var label;
        var prevLabel;
        var pointX;
        var rect = control.bounds;
        var border = '';
        var pointXGrid;
        var disabledColor = (control.disableRangeSelector) ? 'transparent' : null;
        var prevX = control.enableRtl ? (rect.x + rect.width) : rect.x;
        var intervalType = axis.actualIntervalType;
        var intervalInTime = control.valueType === 'DateTime' ?
            maxLabels > 1 ? (axis.visibleLabels[1].value - axis.visibleLabels[0].value) :
                (axis.visibleRange.max - axis.visibleLabels[0].value) / 2 : 0;
        if (control.valueType === 'DateTime' && (intervalType === 'Quarter' || intervalType === 'Weeks')) {
            this.findSuitableFormat(axis, control);
        }
        for (var i = 0, len = maxLabels; i < len; i++) {
            label = axis.visibleLabels[i];
            label.size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["measureText"])(label.text, axis.labelStyle);
            if (control.secondaryLabelAlignment === 'Middle') {
                pointX = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])((label.value + intervalInTime / 2), axis) * rect.width) + rect.x;
            }
            else if ((id.indexOf('Secondary') > -1)) {
                pointX = this.findAlignment(axis, i);
            }
            pointXGrid = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])((label.value), axis) * rect.width) + rect.x;
            //edgelabelPlacements
            if ((i === 0 || (i === axis.visibleLabels.length - 1 && control.enableRtl)) && pointX < rect.x) {
                pointX = rect.x + label.size.width / 2;
            }
            if ((i === axis.visibleLabels.length - 1 || (i === 0 && control.enableRtl)) &&
                ((pointX + label.size.width) > (rect.x + rect.width))) {
                pointX = rect.x + rect.width - label.size.width / 2;
            }
            //secondary axis grid lines
            if (id.indexOf('_SecondaryLabel_') > -1) {
                if (pointX >= rect.x && (rect.x + rect.width) >= pointX) {
                    border = border.concat('M ' + pointXGrid + ' ' + pointY +
                        ' L ' + pointXGrid + ' ' + (pointY - label.size.height));
                }
            }
            //smart axis label position,
            if (control.labelIntersectAction === 'Hide' &&
                i !== 0 && this.isIntersect(axis, pointX, label.size.width, prevX, prevLabel.size.width)) {
                continue;
            }
            //labelrender event
            var argsData = void 0;
            var labelStyle = control.labelStyle;
            var style = {
                size: labelStyle.size, color: disabledColor || labelStyle.color || control.themeStyle.labelFontColor,
                fontFamily: labelStyle.fontFamily,
                fontStyle: labelStyle.fontStyle || control.labelStyle.fontStyle,
                fontWeight: labelStyle.fontWeight || control.labelStyle.fontWeight,
                opacity: labelStyle.opacity || control.labelStyle.opacity,
                textAlignment: labelStyle.textAlignment || control.labelStyle.textAlignment,
                textOverflow: labelStyle.textOverflow || control.labelStyle.textOverflow
            };
            argsData = {
                cancel: false, name: 'labelRender',
                text: label.text, value: label.value, labelStyle: style,
                region: new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Rect"](pointX, pointY, label.size.width, label.size.height)
            };
            control.trigger('labelRender', argsData);
            if (!argsData.cancel) {
                control.labels.push(argsData);
            }
            else {
                continue;
            }
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["textElement"])(this.rangeNavigator.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["TextOption"](this.rangeNavigator.element.id + id + i, pointX, pointY, 'middle', argsData.text), argsData.labelStyle, argsData.labelStyle.color || control.themeStyle.labelFontColor, labelElement).setAttribute('style', axis.valueType === 'DateTime' ? 'cursor: pointer' : 'cursor: default');
            prevX = pointX;
            prevLabel = label;
        }
        return border;
    };
    /**
     * To check label is intersected with successive label or not
     */
    RangeNavigatorAxis.prototype.isIntersect = function (axis, currentX, currentWidth, prevX, prevWidth) {
        return (axis.isInversed) ? (currentX + currentWidth / 2 > prevX - prevWidth / 2) :
            (currentX - currentWidth / 2 < prevX + prevWidth / 2);
    };
    /**
     * To find suitable label format for Quarter and week Interval types
     * @param axis
     * @param control
     */
    RangeNavigatorAxis.prototype.findSuitableFormat = function (axis, control) {
        var labels = axis.visibleLabels;
        var labelLength = labels.length;
        var bounds = control.bounds;
        var prevX;
        var currentX;
        var interval = control.valueType === 'DateTime' ?
            labelLength > 1 ? (labels[1].value - labels[0].value) : axis.visibleRange.interval
            : 0;
        for (var i = 0; i < labelLength; i++) {
            currentX = (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])((labels[i].value + interval / 2), axis) * bounds.width) + bounds.x;
            labels[i].size = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["measureText"])(labels[i].text, axis.labelStyle);
            //edgelabelPlacements
            if (i === 0 && currentX < bounds.x) {
                currentX = bounds.x + labels[i].size.width / 2;
            }
            if (axis.actualIntervalType === 'Quarter') {
                if (i !== 0) {
                    if ((labels[i].text.indexOf('Quarter') > -1) &&
                        (this.isIntersect(axis, currentX, labels[i].size.width, prevX, labels[i - 1].size.width))) {
                        labels.every(function (label) {
                            label.text = label.text.toString().replace('Quarter', 'QTR');
                            return true;
                        });
                        axis.visibleLabels = labels;
                        this.findSuitableFormat(axis, control);
                    }
                    else {
                        if (this.isIntersect(axis, currentX, labels[i].size.width, prevX, labels[i - 1].size.width)) {
                            labels.every(function (label) {
                                label.text = label.text.toString().replace('QTR', 'Q');
                                return true;
                            });
                            axis.visibleLabels = labels;
                        }
                    }
                }
            }
            else if (axis.actualIntervalType === 'Weeks') {
                if ((i !== 0) && ((labels[i].text.indexOf('Week') > -1) &&
                    (this.isIntersect(axis, currentX, labels[i].size.width, prevX, labels[i - 1].size.width)))) {
                    labels.every(function (label) {
                        label.text = label.text.toString().replace('Week', 'W');
                        return true;
                    });
                    axis.visibleLabels = labels;
                }
            }
            prevX = currentX;
        }
    };
    /**
     * Alignment position for secondary level labels in date time axis
     * @param axis
     * @param index
     */
    RangeNavigatorAxis.prototype.findAlignment = function (axis, index) {
        var label = axis.visibleLabels[index];
        var nextLabel = axis.visibleLabels[index + 1];
        var bounds = this.rangeNavigator.bounds;
        return (this.rangeNavigator.secondaryLabelAlignment === 'Near' ?
            (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])((label.value), axis) * bounds.width) + bounds.x + label.size.width / 2 :
            (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])((nextLabel ? nextLabel.value : axis.visibleRange.max), axis) * bounds.width) + bounds.x - label.size.width);
    };
    return RangeNavigatorAxis;
}(_chart_index__WEBPACK_IMPORTED_MODULE_2__["DateTime"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/slider.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/range-navigator/renderer/slider.js ***!
  \************************************************************************************/
/*! exports provided: RangeSlider */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeSlider", function() { return RangeSlider; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/helper.js");
/* harmony import */ var _chart_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../chart/index */ "./node_modules/@syncfusion/ej2-charts/src/chart/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");






/**
 * Class for slider
 */
var RangeSlider = /** @class */ (function () {
    function RangeSlider(range) {
        this.control = range;
        this.points = [];
        this.isIOS = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos7;
        var thumb = range.navigatorStyleSettings.thumb;
        this.thumbVisible = (range.themeStyle.thumbWidth !== 0 && range.themeStyle.thumbHeight !== 0);
        this.elementId = range.element.id;
        this.thumpPadding = range.themeStyle.thumbWidth / 2;
        this.addEventListener();
        this.thumbColor = range.disableRangeSelector ? 'transparent' :
            (thumb.fill || range.themeStyle.thumbBackground);
    }
    /**
     * Render Slider elements for range navigator
     * @param range
     */
    RangeSlider.prototype.render = function (range) {
        var renderer = range.renderer;
        var style = range.navigatorStyleSettings;
        var disabledColor = (range.disableRangeSelector) ? 'transparent' : null;
        var sliderGroup = renderer.createGroup({
            'id': this.elementId + '_sliders',
            style: (range.disableRangeSelector) ? 'pointer-events:none;' : ''
        });
        var option = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.elementId + '_leftUnSelectedArea', disabledColor || style.unselectedRegionColor || range.themeStyle.unselectedRectColor, { width: 0 }, 1, {
            x: range.bounds.x, y: range.bounds.y,
            width: range.bounds.width / 3,
            height: range.bounds.height
        });
        this.leftUnSelectedElement = renderer.drawRectangle(option);
        option.id = this.elementId + '_rightUnSelectedArea';
        this.rightUnSelectedElement = renderer.drawRectangle(option);
        option.id = this.elementId + '_SelectedArea';
        option.fill = disabledColor || style.selectedRegionColor || range.themeStyle.selectedRegionColor;
        this.selectedElement = renderer.drawRectangle(option);
        this.selectedElement.setAttribute('style', 'cursor: -webkit-grab');
        this.leftSlider = renderer.createGroup({
            'id': this.elementId + '_LeftSlider', 'style': 'cursor: ew-resize'
        });
        this.rightSlider = renderer.createGroup({
            'id': this.elementId + '_RightSlider', 'style': 'cursor: ew-resize'
        });
        this.createThump(renderer, range.bounds, this.leftSlider, this.elementId + '_LeftSlider', sliderGroup);
        this.createThump(renderer, range.bounds, this.rightSlider, this.elementId + '_RightSlider');
        sliderGroup.appendChild(this.leftUnSelectedElement);
        sliderGroup.appendChild(this.rightUnSelectedElement);
        sliderGroup.appendChild(this.selectedElement);
        sliderGroup.appendChild(this.leftSlider);
        sliderGroup.appendChild(this.rightSlider);
        range.svgObject.appendChild(sliderGroup);
    };
    /**
     * Thumb creation performed
     * @param render
     * @param bounds
     * @param parent
     * @param id
     */
    RangeSlider.prototype.createThump = function (render, bounds, parent, id, sliderGroup) {
        var control = this.control;
        var thump = control.navigatorStyleSettings.thumb;
        var style = control.themeStyle;
        var y = bounds.y + bounds.height / 2;
        var x = this.thumpPadding;
        var tickLength = (control.themeStyle.thumbHeight / 2) - 5;
        var disabledColor = control.disableRangeSelector ? 'transparent' : null;
        var lineColor = disabledColor || thump.border.color || style.thumpLineColor;
        var shadowElement;
        parent.appendChild(render.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["PathOption"](id + '_ThumpLine', 'transparent', thump.border.width, control.series.length ? lineColor : 'transparent', 1, null, 'M' + ' ' + (x) + ' ' + (bounds.y) + ' ' + 'L' + ' ' + (x) + ' ' + (bounds.y + bounds.height) + ' ')));
        this.thumpY = y - (control.themeStyle.thumbHeight / 2);
        this.sliderY = bounds.y > this.thumpY ? this.thumpY : bounds.y;
        if (sliderGroup && !control.disableRangeSelector) {
            shadowElement = render.createDefs();
            shadowElement.innerHTML = '<rect xmlns="http://www.w3.org/2000/svg" id="path-1" x="0" ' +
                'y="' + this.thumpY + '" width="' + control.themeStyle.thumbWidth + '" height="' + control.themeStyle.thumbHeight + '"' +
                ' rx="' + (thump.type === 'Circle' ? '50%' : '0%') + '"/>' +
                '<filter xmlns="http://www.w3.org/2000/svg" x="-25.0%" y="-20.0%" width="150.0%" height="150.0%"' +
                ' filterUnits="objectBoundingBox" id="ej2-range-shadow"><feOffset dx="0" dy="1" in="SourceAlpha"' +
                'result="shadowOffsetOuter1"/><feGaussianBlur stdDeviation="1.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"/>' +
                '<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"/>' +
                '<feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.16 0" type="matrix" in="shadowBlurOuter1"/>' +
                '</filter>';
            sliderGroup.appendChild(shadowElement);
        }
        parent.innerHTML += '<use xmlns="http://www.w3.org/2000/svg" fill="black" fill-opacity="1" filter="url(#ej2-range-shadow)"' +
            ' xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#path-1"/>';
        if (thump.type === 'Circle') {
            parent.appendChild(Object(_chart_index__WEBPACK_IMPORTED_MODULE_3__["drawSymbol"])({ x: x, y: y }, 'Circle', { width: control.themeStyle.thumbWidth, height: control.themeStyle.thumbHeight }, '', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["PathOption"](id + '_ThumpSymbol', disabledColor || this.thumbColor, thump.border.width, lineColor, 1, null), 'Thumb'));
        }
        else {
            parent.appendChild(render.drawRectangle(new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](id + '_ThumpSymbol', disabledColor || this.thumbColor, { width: thump.border.width, color: lineColor }, 1, {
                x: x - (control.themeStyle.thumbWidth / 2), y: y - (control.themeStyle.thumbHeight / 2),
                width: control.themeStyle.thumbWidth,
                height: control.themeStyle.thumbHeight
            }, 2, 2)));
        }
        if (this.thumbVisible) {
            parent.appendChild(render.drawPath(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["PathOption"](id + '_ThumpGrip', 'transparent', 1, disabledColor || control.themeStyle.gripColor, 1, null, 'M' + ' ' + (x + 2) + ' ' + (y + tickLength) + ' ' + 'L' + ' ' + (x + 2) + ' ' + (y - tickLength) + ' ' +
                'M' + ' ' + (x) + ' ' + (y + tickLength) + ' ' + 'L' + ' ' + (x) + ' ' + (y - tickLength) + ' ' +
                'M' + ' ' + (x - 2) + ' ' + (y + tickLength) + ' ' + 'L' + ' ' + (x - 2) + ' ' + (y - tickLength) + ' ')));
        }
    };
    /**
     * Set slider value for range navigator
     * @param start
     * @param end
     */
    RangeSlider.prototype.setSlider = function (start, end, trigger, showTooltip) {
        var range = this.control;
        var padding = range.bounds.x;
        var axisRange = range.chartSeries.xAxis.actualRange;
        var isLeightWeight = range.series.length === 0;
        if (!(end >= start)) {
            start = [end, end = start][0];
        }
        start = end >= start ? start : [end, end = start][0];
        start = Math.max(start, axisRange.min);
        end = Math.min(end, axisRange.max);
        this.startX = padding + Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getXLocation"])(start, axisRange, range.bounds.width, range.enableRtl);
        this.endX = padding + Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getXLocation"])(end, axisRange, range.bounds.width, range.enableRtl);
        var selectedX = range.enableRtl ? this.endX : this.startX;
        var rightPadding = range.enableRtl ? this.startX : this.endX;
        this.sliderWidth = Math.abs(this.endX - this.startX);
        this.selectedElement.setAttribute('x', (selectedX) + '');
        this.selectedElement.setAttribute('width', this.sliderWidth + '');
        this.leftUnSelectedElement.setAttribute('width', (selectedX - padding) + '');
        this.rightUnSelectedElement.setAttribute('x', rightPadding + '');
        this.rightUnSelectedElement.setAttribute('width', (range.bounds.width - (rightPadding - padding)) + '');
        this.leftSlider.setAttribute('transform', 'translate(' + (this.startX - this.thumpPadding) + ', 0)');
        this.rightSlider.setAttribute('transform', 'translate(' + (this.endX - this.thumpPadding) + ', 0)');
        var left = this.control.svgObject.getBoundingClientRect().left -
            this.control.element.getBoundingClientRect().left;
        var leftX = this.control.enableRtl ? this.endX : this.startX;
        var rightX = this.control.enableRtl ? this.startX : this.endX;
        this.leftRect = {
            x: isLeightWeight ? left + padding : padding,
            y: isLeightWeight ? 0 : range.bounds.y,
            width: isLeightWeight ? leftX - padding : leftX,
            height: isLeightWeight ? this.thumpY : range.bounds.height
        };
        this.rightRect = {
            x: isLeightWeight ? left + rightX : rightX,
            y: isLeightWeight ? 0 : range.bounds.y,
            width: (range.bounds.width - (rightPadding - padding)),
            height: isLeightWeight ? this.thumpY : range.bounds.height
        };
        this.midRect = {
            x: isLeightWeight ? leftX + left : 0,
            y: isLeightWeight ? 0 : range.bounds.y,
            width: isLeightWeight ? Math.abs(this.endX - this.startX) : rightX,
            height: isLeightWeight ? this.thumpY : range.bounds.height
        };
        this.currentStart = start;
        this.currentEnd = end;
        if (showTooltip) {
            this.control.rangeTooltipModule.renderLeftTooltip(this);
            this.control.rangeTooltipModule.renderRightTooltip(this);
        }
        if (trigger) {
            this.triggerEvent(axisRange);
        }
    };
    /**
     * Trigger changed event
     * @param range
     */
    RangeSlider.prototype.triggerEvent = function (range) {
        var argsData;
        var xAxis = this.control.chartSeries.xAxis;
        var valueType = xAxis.valueType;
        argsData = {
            cancel: false,
            start: valueType === 'DateTime' ? new Date(this.currentStart) :
                (valueType === 'Logarithmic' ? Math.pow(xAxis.logBase, this.currentStart) : this.currentStart),
            end: valueType === 'DateTime' ? new Date(this.currentEnd) :
                (valueType === 'Logarithmic' ? Math.pow(xAxis.logBase, this.currentEnd) : this.currentEnd),
            name: 'changed',
            selectedData: Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getExactData"])(this.points, this.currentStart, this.currentEnd),
            zoomPosition: (this.control.enableRtl ? range.max - this.currentEnd :
                this.currentStart - range.min) / range.delta,
            zoomFactor: (this.currentEnd - this.currentStart) / range.delta
        };
        this.control.trigger('changed', argsData);
    };
    /**
     * @hidden
     */
    RangeSlider.prototype.addEventListener = function () {
        if (this.control.isDestroyed) {
            return;
        }
        this.control.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMoveHandler, this);
        this.control.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mouseDownHandler, this);
        this.control.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpHandler, this);
        this.control.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave', this.mouseCancelHandler, this);
    };
    /**
     * @hidden
     */
    RangeSlider.prototype.removeEventListener = function () {
        if (this.control.isDestroyed) {
            return;
        }
        this.control.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMoveHandler);
        this.control.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mouseDownHandler);
        this.control.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpHandler);
        this.control.off(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave', this.mouseCancelHandler);
    };
    /**
     * Move move handler perfomed here
     * @hidden
     * @param e
     */
    RangeSlider.prototype.mouseMoveHandler = function (e) {
        var control = this.control;
        var axisRange = control.chartSeries.xAxis.actualRange;
        var bounds = control.bounds;
        var start;
        var end;
        this.getCurrentSlider(e.target.id);
        if (this.isDrag && control.mouseX >= bounds.x) {
            switch (this.currentSlider) {
                case 'Left':
                    control.startValue = this.getRangeValue(Math.abs(control.mouseX - bounds.x));
                    break;
                case 'Right':
                    control.endValue = this.getRangeValue(Math.abs(control.mouseX - bounds.x));
                    break;
                case 'Middle':
                    start = Math.max(this.getRangeValue(Math.abs(this.startX - (this.previousMoveX - control.mouseX) - bounds.x)), axisRange.min);
                    end = Math.min(this.getRangeValue(Math.abs(this.endX - (this.previousMoveX - control.mouseX) - bounds.x)), axisRange.max);
                    var currentWidth = Math.floor(Math.abs(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getXLocation"])(end, axisRange, control.bounds.width, control.enableRtl) -
                        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getXLocation"])(start, axisRange, control.bounds.width, control.enableRtl)));
                    if (currentWidth === Math.floor(this.sliderWidth)) {
                        control.startValue = start;
                        control.endValue = end;
                    }
                    break;
            }
            if (e.preventDefault && this.isIOS) {
                e.preventDefault();
            }
            this.setSlider(control.startValue, control.endValue, !control.enableDeferredUpdate, (control.rangeTooltipModule && control.tooltip.enable));
            this.previousMoveX = control.mouseX;
        }
    };
    /**
     * To get the range value
     * @param x
     */
    RangeSlider.prototype.getRangeValue = function (x) {
        var control = this.control;
        var axisRange = control.chartSeries.xAxis.actualRange;
        var bounds = control.bounds;
        return Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getRangeValueXByPoint"])(x, bounds.width, axisRange, control.enableRtl);
    };
    /**
     * Moused down handler for slider perform here
     * @param e
     */
    RangeSlider.prototype.mouseDownHandler = function (e) {
        this.currentSlider = this.getCurrentSlider(e.target.id);
        this.selectedElement.setAttribute('style', 'cursor: -webkit-grabbing');
        this.isDrag = !(this.currentSlider === 'UnSelectedArea' || !this.currentSlider);
        this.previousMoveX = this.control.mouseDownX;
    };
    /**
     * To get the current slider element
     * @param id
     */
    RangeSlider.prototype.getCurrentSlider = function (id) {
        var hoverColor = this.control.themeStyle.thumbHoverColor;
        if (id.indexOf(this.elementId + '_LeftSlider') > -1) {
            this.leftSlider.childNodes[2].setAttribute('fill', hoverColor);
            return 'Left';
        }
        else if (id.indexOf(this.elementId + '_RightSlider') > -1) {
            this.rightSlider.childNodes[2].setAttribute('fill', hoverColor);
            return 'Right';
        }
        else if (id.indexOf(this.elementId + '_SelectedArea') > -1) {
            return 'Middle';
        }
        else if (id.indexOf('UnSelectedArea') > -1) {
            this.leftSlider.childNodes[2].setAttribute('fill', this.thumbColor);
            this.rightSlider.childNodes[2].setAttribute('fill', this.thumbColor);
            return 'UnSelectedArea';
        }
        else if (id.indexOf(this.elementId + '_AxisLabel_') > -1 && this.control.valueType === 'DateTime') {
            this.labelIndex = +id.substring(id.lastIndexOf('_') + 1, id.length);
            return 'firstLevelLabels';
        }
        else if (id.indexOf(this.elementId + '_SecondaryLabel') > -1 && this.control.valueType === 'DateTime') {
            this.labelIndex = +id.substring(id.lastIndexOf('_') + 1, id.length);
            return 'secondLevelLabels';
        }
        else {
            this.leftSlider.childNodes[2].setAttribute('fill', this.thumbColor);
            this.rightSlider.childNodes[2].setAttribute('fill', this.thumbColor);
            if (this.control.periodSelectorModule) {
                this.control.periodSelectorModule.triggerChange = true;
            }
            return null;
        }
    };
    /**
     * Mouse up handler performed here
     * @param e
     */
    RangeSlider.prototype.mouseUpHandler = function (e) {
        var control = this.control;
        var range = control.chartSeries.xAxis.actualRange;
        var trigger = control.enableDeferredUpdate;
        var endbledTooltip = control.tooltip.enable;
        if (control.stockChart) {
            control.stockChart.zoomChange = false;
        }
        if (this.currentSlider === 'UnSelectedArea') {
            var value = void 0;
            var start = void 0;
            var end = void 0;
            var isRtl = control.enableRtl;
            var difference = control.endValue - control.startValue;
            if (control.mouseDownX < this.startX) {
                value = Math.max(this.getRangeValue((control.mouseDownX - (this.sliderWidth / 2) - control.bounds.x)), range.min);
                end = isRtl ? value : (value + difference);
                start = isRtl ? (value - difference) : value;
            }
            else {
                value = Math.min(this.getRangeValue((control.mouseDownX + (this.sliderWidth / 2) - control.bounds.x)), range.max);
                start = isRtl ? value : (value - difference);
                end = isRtl ? (value + difference) : value;
            }
            this.performAnimation(start, end, control);
            trigger = false;
        }
        else if (this.currentSlider === 'firstLevelLabels' || this.currentSlider === 'secondLevelLabels') {
            var secondLabel = control.rangeAxis[this.currentSlider][this.labelIndex + 1];
            this.performAnimation(control.rangeAxis[this.currentSlider][this.labelIndex].value, (secondLabel ? secondLabel.value : range.max), control);
            trigger = false;
        }
        if (this.isDrag && control.allowSnapping) {
            this.setAllowSnapping(control, this.currentStart, this.currentEnd, trigger, endbledTooltip);
            trigger = false;
        }
        if (trigger) {
            this.setSlider(this.currentStart, this.currentEnd, true, endbledTooltip);
        }
        if (this.currentSlider !== null) {
            if (this.control.periodSelectorSettings.periods.length > 0) {
                this.control.periodSelectorModule.triggerChange = false;
                this.control.periodSelectorModule.datePicker.startDate = new Date(this.currentStart);
                this.control.periodSelectorModule.datePicker.endDate = new Date(this.currentEnd);
            }
        }
        this.selectedElement.setAttribute('style', 'cursor: -webkit-grab');
        control.startValue = this.currentStart;
        control.endValue = this.currentEnd;
        this.isDrag = false;
        this.labelIndex = null;
        this.currentSlider = null;
    };
    /**
     * Allow Snapping perfomed here
     * @param control
     * @param start
     * @param end
     */
    RangeSlider.prototype.setAllowSnapping = function (control, start, end, trigger, tooltip) {
        var values = control.rangeAxis.lowerValues;
        values.push(control.chartSeries.xAxis.actualRange.max);
        this.setSlider(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getNearestValue"])(values, start), Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getNearestValue"])(values, end), trigger, tooltip);
        control.startValue = this.currentStart;
        control.endValue = this.currentEnd;
    };
    /**
     * Animation Calculation for slider navigation
     * @param start
     * @param end
     */
    RangeSlider.prototype.performAnimation = function (start, end, control, animationDuration) {
        var _this = this;
        var currentStart = this.currentStart;
        var currentEnd = this.currentEnd;
        var isDeffered = control.enableDeferredUpdate;
        var enableTooltip = control.tooltip.enable;
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div'), {
            duration: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(animationDuration) ? animationDuration : this.control.animationDuration,
            progress: function (args) {
                _this.setSlider(Object(_chart_index__WEBPACK_IMPORTED_MODULE_3__["linear"])(args.timeStamp, 0, start - currentStart, args.duration) + currentStart, Object(_chart_index__WEBPACK_IMPORTED_MODULE_3__["linear"])(args.timeStamp, 0, end - currentEnd, args.duration) + currentEnd, !isDeffered, enableTooltip);
            },
            end: function (model) {
                if (control.allowSnapping) {
                    _this.setAllowSnapping(control, start, end, true, enableTooltip);
                }
                else {
                    _this.setSlider(start, end, true, enableTooltip);
                }
                _this.control.startValue = _this.currentStart;
                _this.control.endValue = _this.currentEnd;
                if (_this.control.periodSelectorSettings.periods.length > 0) {
                    _this.control.periodSelectorModule.triggerChange = false;
                    _this.control.periodSelectorModule.datePicker.startDate = new Date(_this.currentStart);
                    _this.control.periodSelectorModule.datePicker.endDate = new Date(_this.currentEnd);
                }
            }
        });
    };
    /**
     * Mouse Cancel Handler
     */
    RangeSlider.prototype.mouseCancelHandler = function () {
        this.isDrag = false;
        this.currentSlider = null;
        this.control.startValue = this.currentStart;
        this.control.endValue = this.currentEnd;
    };
    /**
     * Destroy Method Calling here
     */
    RangeSlider.prototype.destroy = function () {
        this.removeEventListener();
    };
    return RangeSlider;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/user-interaction/tooltip.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/range-navigator/user-interaction/tooltip.js ***!
  \*********************************************************************************************/
/*! exports provided: RangeTooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeTooltip", function() { return RangeTooltip; });
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../index */ "./node_modules/@syncfusion/ej2-charts/src/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");







/**
 * `Tooltip` module is used to render the tooltip for chart series.
 */
var RangeTooltip = /** @class */ (function () {
    /**
     * Constructor for tooltip module.
     * @private.
     */
    function RangeTooltip(range) {
        this.control = range;
        this.elementId = range.element.id;
    }
    /**
     * Left tooltip method called here
     * @param rangeSlider
     */
    RangeTooltip.prototype.renderLeftTooltip = function (rangeSlider) {
        this.fadeOutTooltip();
        var content = this.getTooltipContent(rangeSlider.currentStart);
        var contentWidth = this.getContentSize(content);
        var rect = this.control.enableRtl ? rangeSlider.rightRect : rangeSlider.leftRect;
        if (contentWidth > rect.width) {
            rect = rangeSlider.midRect;
        }
        this.leftTooltip = this.renderTooltip(rect, this.createElement('_leftTooltip'), rangeSlider.startX, content);
    };
    /**
     * get the content size
     * @param value
     */
    RangeTooltip.prototype.getContentSize = function (value) {
        var width;
        var font = this.control.tooltip.textStyle;
        if (this.control.tooltip.template) {
            width = Object(_index__WEBPACK_IMPORTED_MODULE_2__["createTemplate"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["createElement"])('div', {
                id: 'measureElement',
                styles: 'position: absolute;'
            }), 0, this.control.tooltip.template, this.control).getBoundingClientRect().width;
        }
        else {
            // 20 for tooltip padding
            width = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["measureText"])(value[0], font).width + 20;
        }
        return width;
    };
    /**
     * Right tooltip method called here
     * @param rangeSlider
     */
    RangeTooltip.prototype.renderRightTooltip = function (rangeSlider) {
        this.fadeOutTooltip();
        var content = this.getTooltipContent(rangeSlider.currentEnd);
        var contentWidth = this.getContentSize(content);
        var rect = this.control.enableRtl ? rangeSlider.leftRect : rangeSlider.rightRect;
        if (contentWidth > rect.width) {
            rect = rangeSlider.midRect;
            rect.x = !this.control.series.length ? rect.x : 0;
        }
        this.rightTooltip = this.renderTooltip(rect, this.createElement('_rightTooltip'), rangeSlider.endX, content);
    };
    /**
     * Tooltip element creation
     * @param id
     */
    RangeTooltip.prototype.createElement = function (id) {
        if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.elementId + id)) {
            return Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.elementId + id);
        }
        else {
            var element = document.createElement('div');
            element.id = this.elementId + id;
            element.className = 'ejSVGTooltip';
            element.setAttribute('style', 'pointer-events:none; position:absolute;z-index: 1');
            if (!this.control.stockChart) {
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(this.elementId + '_Secondary_Element').appendChild(element);
            }
            else {
                var stockChart = this.control.stockChart;
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(stockChart.element.id + '_Secondary_Element').appendChild(element);
                element.style.transform = 'translateY(' + (((stockChart.availableSize.height - stockChart.toolbarHeight - 80) +
                    stockChart.toolbarHeight) + stockChart.titleSize.height) + 'px)';
            }
            return element;
        }
    };
    /**
     * Tooltip render called here
     * @param bounds
     * @param parent
     * @param pointX
     * @param value
     */
    RangeTooltip.prototype.renderTooltip = function (bounds, parent, pointX, content) {
        var control = this.control;
        var tooltip = control.tooltip;
        var argsData = {
            cancel: false, name: 'tooltipRender', text: content,
            textStyle: tooltip.textStyle
        };
        this.control.trigger('tooltipRender', argsData);
        var left = control.svgObject.getBoundingClientRect().left -
            control.element.getBoundingClientRect().left;
        if (!argsData.cancel) {
            return new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_0__["Tooltip"]({
                location: { x: pointX, y: control.rangeSlider.sliderY },
                content: argsData.text, marginX: 2,
                enableShadow: false,
                marginY: 2, arrowPadding: 8, rx: 0, ry: 0,
                inverted: control.series.length > 0,
                areaBounds: bounds, fill: tooltip.fill,
                theme: this.control.theme,
                //enableShadow: false,
                clipBounds: { x: left },
                border: tooltip.border, opacity: tooltip.opacity,
                template: tooltip.template,
                textStyle: argsData.textStyle,
                availableSize: control.availableSize,
                data: {
                    'start': this.getTooltipContent(this.control.startValue)[0],
                    'end': this.getTooltipContent(this.control.endValue)[0],
                    'value': content[0]
                }
            }, parent);
        }
        else {
            return null;
        }
    };
    /**
     * Tooltip content processed here
     * @param value
     */
    RangeTooltip.prototype.getTooltipContent = function (value) {
        var control = this.control;
        var tooltip = control.tooltip;
        var xAxis = control.chartSeries.xAxis;
        var text;
        var format = tooltip.format || xAxis.labelFormat;
        var isCustom = format.match('{value}') !== null;
        var valueType = xAxis.valueType;
        if (valueType === 'DateTime') {
            text = (control.intl.getDateFormat({
                format: format || 'MM/dd/yyyy',
                type: Object(_index__WEBPACK_IMPORTED_MODULE_2__["firstToLowerCase"])(control.skeletonType),
                skeleton: control.dateTimeModule.getSkeleton(xAxis, null, null)
            }))(new Date(value));
        }
        else {
            xAxis.format = control.intl.getNumberFormat({
                format: isCustom ? '' : format,
                useGrouping: control.useGroupingSeparator
            });
            text = control.doubleModule.formatValue(xAxis, isCustom, format, valueType === 'Logarithmic' ? Math.pow(xAxis.logBase, value) : value);
        }
        return [text];
    };
    /**
     * Fadeout animation performed here
     */
    RangeTooltip.prototype.fadeOutTooltip = function () {
        var _this = this;
        var tooltip = this.control.tooltip;
        if (tooltip.displayMode === 'OnDemand') {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["stopTimer"])(this.toolTipInterval);
            if (this.rightTooltip) {
                this.toolTipInterval = setTimeout(function () {
                    _this.leftTooltip.fadeOut();
                    _this.rightTooltip.fadeOut();
                }, 1000);
            }
        }
    };
    /**
     * Get module name.
     */
    RangeTooltip.prototype.getModuleName = function () {
        return 'RangeTooltip';
    };
    /**
     * To destroy the tooltip.
     * @return {void}
     * @private
     */
    RangeTooltip.prototype.destroy = function (chart) {
        // Destroy method called here
    };
    return RangeTooltip;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/helper.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/helper.js ***!
  \*********************************************************************************/
/*! exports provided: rangeValueToCoefficient, getXLocation, getRangeValueXByPoint, getExactData, getNearestValue, DataPoint */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rangeValueToCoefficient", function() { return rangeValueToCoefficient; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getXLocation", function() { return getXLocation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRangeValueXByPoint", function() { return getRangeValueXByPoint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getExactData", function() { return getExactData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNearestValue", function() { return getNearestValue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataPoint", function() { return DataPoint; });
/**
 * Methods for calculating coefficient.
 */
/** @private */
function rangeValueToCoefficient(value, range, inversed) {
    var result = (value - range.min) / (range.delta);
    return inversed ? (1 - result) : result;
}
/** @private */
function getXLocation(x, range, size, inversed) {
    x = rangeValueToCoefficient(x, range, inversed);
    return x * size;
}
/** @private */
function getRangeValueXByPoint(value, size, range, inversed) {
    var actualValue = !inversed ? value / size : (1 - (value / size));
    return actualValue * (range.delta) + range.min;
}
/** @private */
function getExactData(points, start, end) {
    var selectedData = [];
    points.map(function (point) {
        if (point.xValue >= start && point.xValue <= end) {
            selectedData.push({
                'x': point.x,
                'y': point.y
            });
        }
    });
    return selectedData;
}
/** @private */
function getNearestValue(values, point) {
    return values.reduce(function (prev, curr) {
        return (Math.abs(curr - point) < Math.abs(prev - point) ? curr : prev);
    });
}
/**
 * Data point
 * @public
 */
var DataPoint = /** @class */ (function () {
    function DataPoint(x, y, xValue, yValue, visible) {
        if (visible === void 0) { visible = true; }
        this.x = x;
        this.y = y;
        this.xValue = xValue;
        this.visible = visible;
    }
    return DataPoint;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/theme.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/range-navigator/utils/theme.js ***!
  \********************************************************************************/
/*! exports provided: RangeNavigatorTheme, getRangeThemeColor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeNavigatorTheme", function() { return RangeNavigatorTheme; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRangeThemeColor", function() { return getRangeThemeColor; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");

/**
 *
 */
var RangeNavigatorTheme;
(function (RangeNavigatorTheme) {
    /** @private */
    RangeNavigatorTheme.axisLabelFont = {
        size: '12px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
    /** @private */
    RangeNavigatorTheme.tooltipLabelFont = {
        size: '12px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Segoe UI'
    };
})(RangeNavigatorTheme || (RangeNavigatorTheme = {}));
/** @private */
// tslint:disable-next-line:max-func-body-length
function getRangeThemeColor(theme, range) {
    var thumbSize = range.navigatorStyleSettings.thumb;
    var thumbWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(thumbSize.width) ? (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 15 : 20) : thumbSize.width;
    var thumbHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(thumbSize.height) ? (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 15 : 20) : thumbSize.height;
    var darkAxisColor = (theme === 'HighContrast') ? '#969696' : '#6F6C6C';
    var darkGridlineColor = (theme === 'HighContrast') ? '#4A4848' : '#414040';
    var darkBackground = theme === 'MaterialDark' ? '#303030' : (theme === 'FabricDark' ? '#201F1F' : '1A1A1A');
    var style = {
        gridLineColor: '#E0E0E0',
        axisLineColor: '#000000',
        labelFontColor: '#686868',
        unselectedRectColor: range.series.length ? 'rgba(255, 255, 255, 0.6)' : '#EEEEEE',
        thumpLineColor: 'rgba(189, 189, 189, 1)',
        thumbBackground: 'rgba(250, 250, 250, 1)',
        gripColor: '#757575',
        background: '#FFFFFF',
        thumbHoverColor: '#EEEEEE',
        selectedRegionColor: range.series.length ? 'transparent' : '#FF4081',
        tooltipBackground: 'rgb(0, 8, 22)',
        tooltipFontColor: '#dbdbdb',
        thumbWidth: thumbWidth,
        thumbHeight: thumbHeight
    };
    switch (theme) {
        case 'Fabric':
            style.selectedRegionColor = range.series.length ? 'transparent' : '#007897';
            break;
        case 'Bootstrap':
            style.selectedRegionColor = range.series.length ? 'transparent' : '#428BCA';
            break;
        case 'HighContrastLight':
            style = {
                gridLineColor: '#bdbdbd',
                axisLineColor: '#969696',
                labelFontColor: '#ffffff',
                unselectedRectColor: range.series.length ? 'rgba(255, 255, 255, 0.3)' : '#EEEEEE',
                thumpLineColor: '#ffffff',
                thumbBackground: '#262626',
                gripColor: '#ffffff',
                background: darkBackground,
                thumbHoverColor: '#BFBFBF',
                selectedRegionColor: range.series.length ? 'transparent' : '#FFD939',
                tooltipBackground: '#ffffff',
                tooltipFontColor: '#000000',
                thumbWidth: thumbWidth,
                thumbHeight: thumbHeight
            };
            break;
        case 'Highcontrast':
        case 'HighContrast':
            style = {
                gridLineColor: darkGridlineColor,
                axisLineColor: darkAxisColor,
                labelFontColor: '#DADADA',
                unselectedRectColor: range.series.length ? 'rgba(43, 43, 43, 0.6)' : '#514F4F',
                thumpLineColor: '#969696',
                thumbBackground: '#333232',
                gripColor: '#DADADA',
                background: '#000000',
                thumbHoverColor: '#BFBFBF',
                selectedRegionColor: range.series.length ? 'rgba(22, 22, 22, 0.6)' : '#FFD939',
                tooltipBackground: '#F4F4F4',
                tooltipFontColor: '#282727',
                thumbWidth: thumbWidth,
                thumbHeight: thumbHeight
            };
            break;
        case 'MaterialDark':
        case 'FabricDark':
        case 'BootstrapDark':
            style = {
                labelFontColor: '#DADADA',
                axisLineColor: ' #6F6C6C',
                gridLineColor: '#414040',
                tooltipBackground: '#F4F4F4',
                tooltipFontColor: '#333232',
                unselectedRectColor: range.series.length ? 'rgba(43, 43, 43, 0.6)' : '#514F4F',
                thumpLineColor: '#969696',
                thumbBackground: '#333232',
                gripColor: '#DADADA',
                background: darkBackground,
                thumbHoverColor: '#BFBFBF',
                selectedRegionColor: range.series.length ? 'rgba(22, 22, 22, 0.6)' :
                    theme === 'FabricDark' ? '#007897' : theme === 'BootstrapDark' ? '#428BCA' : '#FF4081',
                thumbWidth: thumbWidth,
                thumbHeight: thumbHeight
            };
            break;
        case 'Bootstrap4':
            style = {
                gridLineColor: '#E0E0E0',
                axisLineColor: '#CED4DA',
                labelFontColor: '#212529',
                unselectedRectColor: range.series.length ? 'rgba(255, 255, 255, 0.6)' : '#514F4F',
                thumpLineColor: 'rgba(189, 189, 189, 1)',
                thumbBackground: '#FFFFFF',
                gripColor: '#495057',
                background: 'rgba(255, 255, 255, 0.6)',
                thumbHoverColor: '#EEEEEE',
                selectedRegionColor: range.series.length ? 'transparent' : '#FFD939',
                tooltipBackground: 'rgba(0, 0, 0, 0.9)',
                tooltipFontColor: 'rgba(255, 255, 255)',
                thumbWidth: thumbWidth,
                thumbHeight: thumbHeight
            };
            break;
        default:
            style.selectedRegionColor = range.series.length ? 'transparent' : '#FF4081';
            break;
    }
    return style;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/axis/axis.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/axis/axis.js ***!
  \*************************************************************************/
/*! exports provided: SmithchartMajorGridLines, SmithchartMinorGridLines, SmithchartAxisLine, SmithchartAxis */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartMajorGridLines", function() { return SmithchartMajorGridLines; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartMinorGridLines", function() { return SmithchartMinorGridLines; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartAxisLine", function() { return SmithchartAxisLine; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartAxis", function() { return SmithchartAxis; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
/* harmony import */ var _model_theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/theme */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/model/theme.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};



/**
 * Configures the major Grid lines in the `axis`.
 */
var SmithchartMajorGridLines = /** @class */ (function (_super) {
    __extends(SmithchartMajorGridLines, _super);
    function SmithchartMajorGridLines() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SmithchartMajorGridLines.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SmithchartMajorGridLines.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], SmithchartMajorGridLines.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SmithchartMajorGridLines.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SmithchartMajorGridLines.prototype, "opacity", void 0);
    return SmithchartMajorGridLines;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the major grid lines in the `axis`.
 */
var SmithchartMinorGridLines = /** @class */ (function (_super) {
    __extends(SmithchartMinorGridLines, _super);
    function SmithchartMinorGridLines() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SmithchartMinorGridLines.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SmithchartMinorGridLines.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SmithchartMinorGridLines.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SmithchartMinorGridLines.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(8)
    ], SmithchartMinorGridLines.prototype, "count", void 0);
    return SmithchartMinorGridLines;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the axis lines in the `axis`.
 */
var SmithchartAxisLine = /** @class */ (function (_super) {
    __extends(SmithchartAxisLine, _super);
    function SmithchartAxisLine() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], SmithchartAxisLine.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SmithchartAxisLine.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SmithchartAxisLine.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SmithchartAxisLine.prototype, "dashArray", void 0);
    return SmithchartAxisLine;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SmithchartAxis = /** @class */ (function (_super) {
    __extends(SmithchartAxis, _super);
    function SmithchartAxis() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], SmithchartAxis.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Outside')
    ], SmithchartAxis.prototype, "labelPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Hide')
    ], SmithchartAxis.prototype, "labelIntersectAction", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SmithchartMajorGridLines)
    ], SmithchartAxis.prototype, "majorGridLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SmithchartMinorGridLines)
    ], SmithchartAxis.prototype, "minorGridLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SmithchartAxisLine)
    ], SmithchartAxis.prototype, "axisLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"].axisLabelFont, _utils_utils__WEBPACK_IMPORTED_MODULE_1__["SmithchartFont"])
    ], SmithchartAxis.prototype, "labelStyle", void 0);
    return SmithchartAxis;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/axis/axisrender.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/axis/axisrender.js ***!
  \*******************************************************************************/
/*! exports provided: AxisRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AxisRender", function() { return AxisRender; });
/* harmony import */ var _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../smithchart/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js");
/* harmony import */ var _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../smithchart/utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");




/* tslint:disable:no-string-literal */
var AxisRender = /** @class */ (function () {
    function AxisRender() {
        this.radialLabels = [-50, -20, -10, -5, -4, -3, -2, -1.5, -1, -0.8, -0.6, -0.4, -0.2,
            0, 0.2, 0.4, 0.6, 0.8, 1, 1.5, 2, 3, 4, 5, 10, 20, 50];
        this.radialLabelCollections = [];
        this.horizontalLabelCollections = [];
        this.labelCollections = [];
        this.direction = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["Direction"]();
    }
    AxisRender.prototype.renderArea = function (smithchart, bounds) {
        this.calculateChartArea(smithchart, bounds);
        this.calculateCircleMargin(smithchart, bounds);
        this.calculateXAxisRange(smithchart);
        this.calculateRAxisRange(smithchart);
        this.measureHorizontalAxis(smithchart);
        this.measureRadialAxis(smithchart);
        if (smithchart.horizontalAxis.visible) {
            this.updateHAxis(smithchart);
        }
        if (smithchart.radialAxis.visible) {
            this.updateRAxis(smithchart);
        }
        if (smithchart.horizontalAxis.visible) {
            this.drawHAxisLabels(smithchart);
        }
        if (smithchart.radialAxis.visible) {
            this.drawRAxisLabels(smithchart);
        }
    };
    AxisRender.prototype.updateHAxis = function (smithchart) {
        var majorGridLines = smithchart.horizontalAxis.majorGridLines;
        var minorGridLines = smithchart.horizontalAxis.minorGridLines;
        var axisLine = smithchart.horizontalAxis.axisLine;
        if (majorGridLines.visible) {
            this.updateHMajorGridLines(smithchart);
        }
        if (minorGridLines.visible) {
            this.updateHMinorGridLines(smithchart);
        }
        if (axisLine.visible) {
            this.updateHAxisLine(smithchart);
        }
    };
    AxisRender.prototype.updateRAxis = function (smithchart) {
        var majorGridLines = smithchart.radialAxis.majorGridLines;
        var minorGridLines = smithchart.radialAxis.minorGridLines;
        var axisLine = smithchart.radialAxis.axisLine;
        if (majorGridLines.visible) {
            this.updateRMajorGridLines(smithchart);
        }
        if (minorGridLines.visible) {
            this.updateRMinorGridLines(smithchart);
        }
        if (axisLine.visible) {
            this.updateRAxisLine(smithchart);
        }
    };
    AxisRender.prototype.measureHorizontalAxis = function (smithchart) {
        var majorGridLines = smithchart.horizontalAxis.majorGridLines;
        var minorGridLines = smithchart.horizontalAxis.minorGridLines;
        this.measureHMajorGridLines(smithchart);
        if (minorGridLines.visible) {
            this.measureHMinorGridLines(smithchart);
        }
    };
    AxisRender.prototype.measureRadialAxis = function (smithchart) {
        var majorGridLines = smithchart.radialAxis.majorGridLines;
        var minorGridLines = smithchart.radialAxis.minorGridLines;
        this.measureRMajorGridLines(smithchart);
        if (minorGridLines.visible) {
            this.measureRMinorGridLines(smithchart);
        }
    };
    AxisRender.prototype.calculateChartArea = function (smithchart, bounds) {
        var chartAreaWidth;
        var chartAreaHeight;
        var width = smithchart.availableSize.width;
        var height = smithchart.availableSize.height;
        var x;
        var y;
        width = bounds.width;
        height = bounds.height;
        chartAreaWidth = Math.min(width, height);
        chartAreaHeight = Math.min(width, height);
        x = bounds.x + (bounds.width / 2 - chartAreaWidth / 2);
        y = bounds.y + ((height - chartAreaHeight) / 2 > 0 ? (height - chartAreaHeight) / 2 : 0);
        smithchart.chartArea = { x: x, y: y, width: chartAreaWidth, height: chartAreaHeight };
    };
    AxisRender.prototype.calculateCircleMargin = function (smithchart, bounds) {
        var padding = 10;
        var maxLabelWidth = 0;
        var width = smithchart.chartArea.width;
        var radius = smithchart.radius;
        maxLabelWidth = this.maximumLabelLength(smithchart);
        var labelMargin = (smithchart.radialAxis.labelPosition === 'Outside') ? (maxLabelWidth + padding) : padding;
        var diameter = width - labelMargin * 2 > 0 ? width - labelMargin * 2 : 0;
        var actualRadius = diameter / 2;
        var circleCoefficient = radius > 1 ? 1 : (radius < 0.1 ? 0.1 : radius);
        this.areaRadius = actualRadius * circleCoefficient;
        this.circleLeftX = smithchart.chartArea.x + labelMargin + (actualRadius * (1 - circleCoefficient));
        this.circleTopY = smithchart.chartArea.y + labelMargin + (actualRadius * (1 - circleCoefficient));
        this.circleCenterX = this.circleLeftX + this.areaRadius;
        this.circleCenterY = bounds.y + bounds.height / 2;
    };
    AxisRender.prototype.maximumLabelLength = function (smithchart) {
        var maximumLabelLength = 0;
        var font = smithchart.horizontalAxis.labelStyle;
        var label;
        var textSize;
        for (var i = 0; i < this.radialLabels.length; i++) {
            label = this.radialLabels[i].toString();
            textSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(label, font);
            if (maximumLabelLength < textSize.width) {
                maximumLabelLength = textSize.width;
            }
        }
        return maximumLabelLength;
    };
    AxisRender.prototype.calculateAxisLabels = function () {
        var spacingBetweenGridLines = 30;
        var previousR = 0;
        var j = 0;
        var labels = [];
        var diameter = this.areaRadius * 2;
        for (var i = 0; i < 2; i = i + 0.1) {
            i = Math.round(i * 10) / 10;
            var coeff = 1 / (i + 1);
            var isOverlap1 = false;
            var isOverlap2 = false;
            var radius = ((diameter * coeff) / 2) * 2;
            if (previousR === 0.0 || i === 1) {
                previousR = radius;
                labels[j] = i;
                j++;
                continue;
            }
            if (i < 1) {
                isOverlap1 = this.isOverlap(1, diameter, radius, spacingBetweenGridLines);
            }
            if (i > 1) {
                isOverlap2 = this.isOverlap(2, diameter, radius, spacingBetweenGridLines);
            }
            if (isOverlap1 || isOverlap2) {
                continue;
            }
            if (previousR - radius >= spacingBetweenGridLines) {
                labels[j] = i;
                j++;
                previousR = radius;
            }
        }
        var staticlabels = [2, 3, 4, 5, 10, 20, 50];
        for (var k = 0; k < staticlabels.length; k++) {
            labels[j] = staticlabels[k];
            j++;
        }
        return labels;
    };
    AxisRender.prototype.isOverlap = function (x, d, previousR, spacingBetweenGridLines) {
        var coeff;
        var radius;
        coeff = 1 / (x + 1); // (1 / 1+r) find the radius for the x value
        radius = ((d * coeff) / 2) * 2;
        return previousR - radius < spacingBetweenGridLines;
    };
    AxisRender.prototype.calculateXAxisRange = function (smithchart) {
        var previousR = 0;
        var x;
        var coeff;
        var radius;
        var cx;
        var diameter = this.areaRadius * 2;
        var horizontalAxisLabels = this.calculateAxisLabels();
        var cy = this.circleCenterY;
        var circleStartX = this.circleLeftX;
        var leftX = this.circleLeftX;
        for (var i = 0; i < horizontalAxisLabels.length; i++) {
            x = horizontalAxisLabels[i];
            coeff = 1 / (x + 1);
            radius = (diameter * coeff) / 2;
            if (smithchart.renderType === 'Impedance') {
                leftX = circleStartX + diameter - (radius * 2);
            }
            cx = leftX + radius;
            this.horizontalLabelCollections.push({
                centerX: cx, centerY: cy, radius: radius, value: x, region: null
            });
        }
    };
    AxisRender.prototype.calculateRAxisRange = function (smithchart) {
        var arcCy;
        var arcRadius;
        var diameter = this.areaRadius * 2;
        var y;
        var point = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["Point"]();
        if (smithchart.renderType === 'Impedance') {
            point.x = this.circleLeftX + diameter;
            point.y = this.circleTopY + this.areaRadius;
        }
        else {
            point.x = this.circleLeftX;
            point.y = this.circleTopY + this.areaRadius;
        }
        for (var i = 0; i < this.radialLabels.length; i++) {
            y = this.radialLabels[i];
            arcRadius = Math.abs(((1 / y) * diameter) / 2);
            if (smithchart.renderType === 'Impedance') {
                arcCy = y > 0 ? point.y - arcRadius : point.y + arcRadius;
            }
            else {
                arcCy = y < 0 ? point.y - arcRadius : point.y + arcRadius;
            }
            this.radialLabelCollections.push({
                centerX: point.x, centerY: arcCy, radius: arcRadius, value: y
            });
        }
    };
    AxisRender.prototype.measureHMajorGridLines = function (smithchart) {
        var arcPoints = [];
        var startPoint;
        var endPoint;
        var radialPoint1;
        var radialPoint2;
        var size;
        this.majorHGridArcPoints = [];
        for (var i = 0; i < this.horizontalLabelCollections.length; i++) {
            var circlePoint = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["HorizontalLabelCollection"]();
            circlePoint = this.horizontalLabelCollections[i];
            arcPoints = this.calculateHMajorArcStartEndPoints(circlePoint.value);
            if (smithchart.renderType === 'Impedance') {
                radialPoint1 = arcPoints[0];
                radialPoint2 = arcPoints[1];
            }
            else {
                radialPoint1 = arcPoints[1];
                radialPoint2 = arcPoints[0];
            }
            size = { width: circlePoint.radius, height: circlePoint.radius };
            if (circlePoint.value !== 0.0 && circlePoint.value !== 50.0) {
                startPoint = this.intersectingCirclePoints(radialPoint1[0].centerX, radialPoint1[0].centerY, radialPoint1[0].radius, circlePoint.centerX, circlePoint.centerY, circlePoint.radius, smithchart.renderType);
                endPoint = this.intersectingCirclePoints(radialPoint2[0].centerX, radialPoint2[0].centerY, radialPoint2[0].radius, circlePoint.centerX, circlePoint.centerY, circlePoint.radius, smithchart.renderType);
                this.majorHGridArcPoints.push({
                    startPoint: startPoint,
                    endPoint: endPoint,
                    rotationAngle: 2 * Math.PI,
                    sweepDirection: (smithchart.renderType === 'Impedance') ?
                        this.direction['counterclockwise'] : this.direction['clockwise'],
                    isLargeArc: true,
                    size: size
                });
            }
            else {
                startPoint = { x: circlePoint.centerX + circlePoint.radius, y: circlePoint.centerY };
                endPoint = { x: circlePoint.centerX + circlePoint.radius, y: circlePoint.centerY - 0.05 };
                this.majorHGridArcPoints.push({
                    startPoint: startPoint,
                    endPoint: endPoint,
                    rotationAngle: 2 * Math.PI,
                    sweepDirection: this.direction['clockwise'],
                    isLargeArc: true,
                    size: size
                });
            }
        }
    };
    AxisRender.prototype.measureRMajorGridLines = function (smithchart) {
        var epsilon;
        var radialPoint;
        var y;
        var arcPoints = [];
        var innerInterSectPoint;
        var outerInterSectPoint;
        var outterInterSectRadian;
        var outterInterSectAngle;
        var startPoint;
        var endPoint;
        var size;
        var sweepDirection;
        this.majorRGridArcPoints = [];
        this.labelCollections = [];
        epsilon = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["_getEpsilonValue"])();
        for (var i = 0; i < this.radialLabelCollections.length; i++) {
            radialPoint = this.radialLabelCollections[i];
            if (radialPoint.radius <= epsilon) {
                continue;
            }
            y = radialPoint.value;
            arcPoints = this.calculateMajorArcStartEndPoints(radialPoint, Math.abs(y), smithchart);
            innerInterSectPoint = arcPoints[0];
            outerInterSectPoint = arcPoints[1];
            outterInterSectRadian = this.circleXYRadianValue(this.circleCenterX, this.circleCenterY, outerInterSectPoint.x, outerInterSectPoint.y);
            outterInterSectAngle = outterInterSectRadian * (180 / Math.PI);
            if (y !== 0.0) {
                startPoint = { x: innerInterSectPoint.x, y: innerInterSectPoint.y };
                endPoint = { x: outerInterSectPoint.x, y: outerInterSectPoint.y };
                size = { width: radialPoint.radius, height: radialPoint.radius };
                sweepDirection = y > 0 ? this.direction['clockwise'] : this.direction['counterclockwise'];
                this.majorRGridArcPoints.push({
                    startPoint: startPoint,
                    endPoint: endPoint,
                    size: size,
                    rotationAngle: 2 * Math.PI,
                    isLargeArc: false,
                    sweepDirection: sweepDirection
                });
                this.labelCollections.push({
                    centerX: outerInterSectPoint.x,
                    centerY: outerInterSectPoint.y,
                    angle: outterInterSectAngle,
                    value: y,
                    radius: this.areaRadius,
                    region: null
                });
            }
            else {
                startPoint = { x: this.circleLeftX, y: this.circleCenterY };
                endPoint = { x: this.circleCenterX + this.areaRadius, y: this.circleCenterY };
                this.majorRGridArcPoints.push({
                    startPoint: startPoint,
                    endPoint: endPoint,
                    size: null,
                    rotationAngle: null,
                    isLargeArc: null,
                    sweepDirection: null
                });
                this.labelCollections.push({
                    centerX: (smithchart.renderType === 'Impedance') ?
                        (this.circleCenterX - this.areaRadius) : (this.circleCenterX + this.areaRadius),
                    centerY: this.circleCenterY,
                    angle: (smithchart.renderType === 'Impedance') ?
                        180 : 360,
                    value: y,
                    radius: this.areaRadius,
                    region: null
                });
            }
        }
    };
    AxisRender.prototype.circleXYRadianValue = function (centerX, centerY, outterX, outterY) {
        var radian;
        radian = Math.atan2(outterY - centerY, outterX - centerX);
        radian = radian < 0 ? (radian + (360 * Math.PI / 180)) : radian;
        return radian;
    };
    AxisRender.prototype.calculateMajorArcStartEndPoints = function (radialPoint, value, smithchart) {
        var arcPoints = [];
        var circlePoint = [];
        var cx;
        var cy;
        cx = this.circleCenterX;
        cy = this.circleCenterY;
        if (value >= 10) {
            arcPoints[0] = (smithchart.renderType === 'Impedance') ?
                { x: cx + this.areaRadius, y: cy } : { x: cx - this.areaRadius, y: cy };
        }
        else if (value >= 3) {
            circlePoint = this.horizontalLabelCollections.filter(function (c) { return c.value === 10; });
        }
        else if (value >= 1) {
            circlePoint = this.horizontalLabelCollections.filter(function (c) { return c.value === 5; });
        }
        else {
            circlePoint = this.horizontalLabelCollections.filter(function (c) { return c.value === 3; });
        }
        if (circlePoint.length > 0) {
            arcPoints[0] = this.intersectingCirclePoints(radialPoint.centerX, radialPoint.centerY, radialPoint.radius, circlePoint[0].centerX, circlePoint[0].centerY, circlePoint[0].radius, smithchart.renderType);
        }
        arcPoints[1] = this.intersectingCirclePoints(radialPoint.centerX, radialPoint.centerY, radialPoint.radius, cx, cy, this.areaRadius, smithchart.renderType);
        return arcPoints;
    };
    AxisRender.prototype.calculateHMajorArcStartEndPoints = function (value) {
        var arcHPoints = [];
        var calValue1;
        var calValue2;
        if (value <= 0.3) {
            calValue1 = 2.0;
            calValue2 = -2.0;
        }
        else if (value <= 1.0) {
            calValue1 = 3.0;
            calValue2 = -3.0;
        }
        else if (value <= 2.0) {
            calValue1 = 5.0;
            calValue2 = -5.0;
        }
        else if (value <= 5.0) {
            calValue1 = 10.0;
            calValue2 = -10.0;
        }
        else {
            calValue1 = 50.0;
            calValue2 = -50.0;
        }
        arcHPoints[0] = this.radialLabelCollections.filter(function (c) { return c.value === calValue1; });
        arcHPoints[1] = this.radialLabelCollections.filter(function (c) { return c.value === calValue2; });
        return arcHPoints;
    };
    AxisRender.prototype.calculateMinorArcStartEndPoints = function (value) {
        var calValue1;
        var calValue2;
        var marcHPoints = [];
        if (value <= 0.1) {
            calValue1 = 1.0;
            calValue2 = -1.0;
        }
        else if (value <= 0.2) {
            calValue1 = 0.8;
            calValue2 = -0.8;
        }
        else if (value <= 0.3) {
            calValue1 = 0.4;
            calValue2 = -0.4;
        }
        else if (value <= 0.6) {
            calValue1 = 1.0;
            calValue2 = -1.0;
        }
        else if (value <= 1.0) {
            calValue1 = 1.5;
            calValue2 = -1.5;
        }
        else if (value <= 1.5) {
            calValue1 = 2.0;
            calValue2 = -2.0;
        }
        else if (value <= 2.0) {
            calValue1 = 1.0;
            calValue2 = -1.0;
        }
        else if (value <= 5.0) {
            calValue1 = 3.0;
            calValue2 = -3.0;
        }
        else {
            calValue1 = 10.0;
            calValue2 = -10.0;
        }
        marcHPoints[0] = this.radialLabelCollections.filter(function (c) { return c['value'] === calValue1; });
        marcHPoints[1] = this.radialLabelCollections.filter(function (c) { return c['value'] === calValue2; });
        return marcHPoints;
    };
    AxisRender.prototype.intersectingCirclePoints = function (x1, y1, r1, x2, y2, r2, renderType) {
        var cx;
        var cy;
        var midRadius;
        var radiusSquare;
        var a;
        var radiusSquare2;
        var c;
        var fx;
        var gx;
        var ix1;
        var ix2;
        var fy;
        var gy;
        var iy1;
        var iy2;
        var point = { x: 0, y: 0 };
        cx = x1 - x2;
        cy = y1 - y2;
        midRadius = Math.sqrt(cx * cx + cy * cy);
        radiusSquare = midRadius * midRadius;
        a = (r1 * r1 - r2 * r2) / (2 * radiusSquare);
        radiusSquare2 = (r1 * r1 - r2 * r2);
        c = Math.sqrt(2 * (r1 * r1 + r2 * r2) / radiusSquare - (radiusSquare2 * radiusSquare2) / (radiusSquare * radiusSquare) - 1);
        fx = (x1 + x2) / 2 + a * (x2 - x1);
        gx = c * (y2 - y1) / 2;
        ix1 = fx + gx;
        ix2 = fx - gx;
        fy = (y1 + y2) / 2 + a * (y2 - y1);
        gy = c * (x1 - x2) / 2;
        iy1 = fy + gy;
        iy2 = fy - gy;
        if (renderType === 'Impedance') {
            if (ix2 < ix1) {
                point.x = ix2;
                point.y = iy2;
            }
            else {
                point.x = ix1;
                point.y = iy1;
            }
        }
        else {
            if (ix1 > ix2) {
                point.x = ix1;
                point.y = iy1;
            }
            else {
                point.x = ix2;
                point.y = iy2;
            }
        }
        return { x: point.x, y: point.y };
    };
    AxisRender.prototype.updateHMajorGridLines = function (smithchart) {
        var majorGridLine = smithchart.horizontalAxis.majorGridLines;
        var groupElement;
        var element;
        var path;
        groupElement = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' + '_horizontalAxisMajorGridLines' });
        path = this.calculateGridLinesPath(this.majorHGridArcPoints);
        var haxismgoptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_horizontalAxisMajorGridLines', 'none', majorGridLine['width'], majorGridLine.color ? majorGridLine.color : smithchart.themeStyle.majorGridLine, majorGridLine['opacity'], majorGridLine['dashArray'], path);
        element = smithchart.renderer.drawPath(haxismgoptions);
        groupElement.appendChild(element);
        smithchart.svgObject.appendChild(groupElement);
    };
    AxisRender.prototype.updateRMajorGridLines = function (smithchart) {
        var majorGridLine = smithchart.radialAxis.majorGridLines;
        var groupElement;
        var element;
        var path;
        groupElement = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' + '_radialAxisMajorGridLines' });
        path = this.calculateGridLinesPath(this.majorRGridArcPoints);
        var raxismgoptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_radialAxisMajorGridLines', 'none', majorGridLine['width'], majorGridLine.color ? majorGridLine.color : smithchart.themeStyle.majorGridLine, majorGridLine['opacity'], majorGridLine['dashArray'], path);
        element = smithchart.renderer.drawPath(raxismgoptions);
        groupElement.appendChild(element);
        smithchart.svgObject.appendChild(groupElement);
    };
    AxisRender.prototype.updateHAxisLine = function (smithchart) {
        var radius = this.areaRadius;
        var point1;
        var point2;
        var size;
        var sweep;
        var isLargeArc;
        var angle;
        var axisLine = smithchart.horizontalAxis.axisLine;
        var direction;
        var groupElement = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' + '_hAxisLine' });
        point1 = { x: this.circleCenterX + radius, y: this.circleCenterY };
        point2 = { x: this.circleCenterX + radius, y: (this.circleCenterY - 0.05) };
        size = { width: radius, height: radius };
        sweep = this.direction['clockwise'];
        isLargeArc = 1;
        angle = Math.PI * 2;
        direction = 'M' + '' + point1.x + ' ' + point1.y + ' ' + 'A' + ' ' + size.width +
            ' ' + size.height + ' ' + angle + ' ' + isLargeArc + ' ' + sweep + ' ' + point2.x + ' ' + point2.y + '';
        var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_horizontalAxisLine', 'none', axisLine.width, axisLine.color ? axisLine.color : smithchart.themeStyle.axisLine, 1, axisLine.dashArray, direction);
        var element = smithchart.renderer.drawPath(options);
        groupElement.appendChild(element);
        smithchart.svgObject.appendChild(groupElement);
    };
    AxisRender.prototype.updateRAxisLine = function (smithchart) {
        var radius = this.areaRadius;
        var point1;
        var point2;
        var size;
        var sweep;
        var isLargeArc;
        var angle;
        var axisLine = smithchart.radialAxis.axisLine;
        var direction;
        point1 = { x: this.circleCenterX - radius, y: this.circleCenterY };
        point2 = { x: this.circleCenterX + radius, y: this.circleCenterY };
        size = { width: 0, height: 0 };
        sweep = this.direction['counterclockwise'];
        isLargeArc = 0;
        angle = 0;
        direction = 'M' + ' ' + point1.x + ' ' + point1.y + ' ' + 'A' + ' ' +
            size.width + ' ' + size.height + ' ' + angle + ' ' + isLargeArc + ' ' + sweep + ' ' +
            point2.x + ' ' + point2.y + '';
        var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_radialAxisLine', 'none', axisLine.width, axisLine.color ? axisLine.color : smithchart.themeStyle.axisLine, 1, axisLine.dashArray, direction);
        var groupElement = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' + '_rAxisLine' });
        var element = smithchart.renderer.drawPath(options);
        groupElement.appendChild(element);
        smithchart.svgObject.appendChild(groupElement);
    };
    AxisRender.prototype.drawHAxisLabels = function (smithchart) {
        var hAxis = smithchart.horizontalAxis;
        smithchart.radialAxis.labelStyle.fontFamily = smithchart.themeStyle.fontFamily || smithchart.radialAxis.labelStyle.fontFamily;
        var font = smithchart.horizontalAxis.labelStyle;
        var circleAxis;
        var label;
        var x;
        var y;
        var textSize;
        var curLabel;
        var curLabelBounds;
        var curWidth;
        var curX;
        var preLabel;
        var preLabelBounds;
        var preWidth;
        var preX;
        var groupEle = smithchart.renderer.createGroup({ id: smithchart.element.id + '_HAxisLabels' });
        for (var i = 0; i < this.horizontalLabelCollections.length; i++) {
            circleAxis = this.horizontalLabelCollections[i];
            label = this.horizontalLabelCollections[i].value.toString();
            if (circleAxis.value !== 0.0) {
                x = (smithchart.renderType === 'Impedance') ?
                    circleAxis.centerX - circleAxis.radius : circleAxis.centerX + circleAxis.radius;
                y = circleAxis.centerY;
                textSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(label, font);
                x = (smithchart.renderType === 'Impedance') ? x - textSize.width : x;
                if (hAxis.labelPosition === 'Outside') {
                    y -= textSize.height / 4;
                }
                else {
                    y += textSize.height;
                }
                this.horizontalLabelCollections[i].region = this.calculateRegion(label, textSize, x, y);
                if (hAxis.labelIntersectAction === 'Hide') {
                    curLabel = this.horizontalLabelCollections[i];
                    curLabelBounds = curLabel.region.bounds;
                    curWidth = curLabelBounds.width;
                    curX = curLabelBounds.x;
                    for (var j = 1; j < i; j++) {
                        preLabel = this.horizontalLabelCollections[j];
                        preLabelBounds = preLabel.region.bounds;
                        preWidth = preLabelBounds.width;
                        preX = preLabelBounds.x;
                        if ((smithchart.renderType === 'Impedance') &&
                            (preX + preWidth) > (curX)) {
                            label = '';
                        }
                        if ((smithchart.renderType === 'Admittance') &&
                            (preX) < curX + curWidth) {
                            label = '';
                        }
                    }
                }
                var axisLabelRenderEventArgs = { text: label.toString(), x: x, y: y,
                    name: 'axisLabelRender', cancel: false };
                smithchart.trigger('axisLabelRender', axisLabelRenderEventArgs);
                var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TextOption"](smithchart.element.id + '_HLabel_' + i, axisLabelRenderEventArgs.x, axisLabelRenderEventArgs.y, 'none', axisLabelRenderEventArgs.text);
                var color = font.color ? font.color : smithchart.themeStyle.axisLabel;
                font.fontFamily = font.fontFamily || smithchart.themeStyle.labelFontFamily;
                var element = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["renderTextElement"])(options, font, color, groupEle);
                groupEle.appendChild(element);
            }
        }
        smithchart.svgObject.appendChild(groupEle);
    };
    AxisRender.prototype.drawRAxisLabels = function (smithchart) {
        var paddingRadius = 2;
        smithchart.radialAxis.labelStyle.fontFamily = smithchart.themeStyle.fontFamily || smithchart.radialAxis.labelStyle.fontFamily;
        var font = smithchart.radialAxis.labelStyle;
        var interSectPoint = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["RadialLabelCollections"]();
        var label;
        var textSize;
        var angle;
        var position;
        var textPosition;
        var curX;
        var curY;
        var curWidth;
        var curHeight;
        var curLabel;
        var curLabelBounds;
        var preX;
        var preY;
        var preWidth;
        var preHeight;
        var preLabel;
        var preLabelBounds;
        var rAxis = smithchart.radialAxis;
        var groupEle = smithchart.renderer.createGroup({ id: smithchart.element.id + '_RAxisLabels' });
        for (var i = 0; i < this.labelCollections.length; i++) {
            interSectPoint = this.labelCollections[i];
            label = interSectPoint.value.toString();
            textSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(label, font);
            angle = Math.round(interSectPoint.angle * 100) / 100;
            if (rAxis.labelPosition === 'Outside') {
                position = this.circlePointPosition(this.circleCenterX, this.circleCenterY, interSectPoint['angle'], this.areaRadius + paddingRadius);
                textPosition = this.setLabelsOutsidePosition(angle, position.x, position.y, textSize);
            }
            else {
                position = this.circlePointPosition(this.circleCenterX, this.circleCenterY, interSectPoint['angle'], this.areaRadius - paddingRadius);
                textPosition = this.setLabelsInsidePosition(angle, position.x, position.y, textSize);
            }
            this.labelCollections[i]['region'] = this.calculateRegion(label, textSize, textPosition.x, textPosition.y);
            if (rAxis.labelIntersectAction === 'Hide') {
                curLabel = this.labelCollections[i];
                curLabelBounds = curLabel['region']['bounds'];
                curWidth = curLabelBounds['width'];
                curHeight = curLabelBounds['height'];
                curX = curLabelBounds['x'];
                curY = curLabelBounds['y'];
                for (var j = 0; j < i; j++) {
                    preLabel = this.labelCollections[j];
                    preLabelBounds = preLabel['region']['bounds'];
                    preWidth = preLabelBounds['width'];
                    preHeight = preLabelBounds['height'];
                    preX = preLabelBounds['x'];
                    preY = preLabelBounds['y'];
                    if ((preX <= curX + curWidth) && (curX <= preX + preWidth) && (preY <= curY + curHeight)
                        && (curY <= preY + preHeight)) {
                        label = ' ';
                    }
                }
            }
            var axisLabelRenderEventArgs = { text: label.toString(), x: textPosition.x,
                y: textPosition.y, name: 'axisLabelRender', cancel: false };
            smithchart.trigger('axisLabelRender', axisLabelRenderEventArgs);
            var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TextOption"](smithchart.element.id + '_RLabel_' + i, axisLabelRenderEventArgs.x, axisLabelRenderEventArgs.y, 'none', axisLabelRenderEventArgs.text);
            var color = font.color ? font.color : smithchart.themeStyle.axisLabel;
            font.fontFamily = smithchart.themeStyle.labelFontFamily ? smithchart.themeStyle.labelFontFamily : font.fontFamily;
            var element = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["renderTextElement"])(options, font, color, groupEle);
            groupEle.appendChild(element);
        }
        smithchart.svgObject.appendChild(groupEle);
    };
    AxisRender.prototype.calculateRegion = function (label, textSize, textPositionX, textPositionY) {
        var xAxisLabelRegions = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["LabelRegion"]();
        var bounds = { x: textPositionX, y: textPositionY, width: textSize.width, height: textSize.height };
        xAxisLabelRegions = { bounds: bounds, labelText: label };
        return xAxisLabelRegions;
    };
    AxisRender.prototype.updateHMinorGridLines = function (smithchart) {
        var minorGridLine = smithchart.horizontalAxis.minorGridLines;
        var groupElement;
        var element;
        var path;
        groupElement = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' + '_horizontalAxisMinorGridLines' });
        path = this.calculateGridLinesPath(this.minorHGridArcPoints);
        var haxismioptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_horizontalAxisMinorGridLines', 'none', minorGridLine['width'], minorGridLine.color ? minorGridLine.color : smithchart.themeStyle.minorGridLine, minorGridLine['opacity'], minorGridLine['dashArray'], path);
        element = smithchart.renderer.drawPath(haxismioptions);
        groupElement.appendChild(element);
        smithchart.svgObject.appendChild(groupElement);
    };
    AxisRender.prototype.updateRMinorGridLines = function (smithchart) {
        var minorGridLine = smithchart.radialAxis.minorGridLines;
        var groupElement;
        var element;
        var path;
        groupElement = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' + '_radialAxisMinorGridLines' });
        path = this.calculateGridLinesPath(this.minorGridArcPoints);
        var raxismioptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_radialAxisMinorGridLines', 'none', minorGridLine['width'], minorGridLine.color ? minorGridLine.color : smithchart.themeStyle.minorGridLine, minorGridLine['opacity'], minorGridLine['dashArray'], path);
        element = smithchart.renderer.drawPath(raxismioptions);
        groupElement.appendChild(element);
        smithchart.svgObject.appendChild(groupElement);
    };
    AxisRender.prototype.calculateGridLinesPath = function (points) {
        var x1;
        var y1;
        var x2;
        var y2;
        var r1;
        var r2;
        var pathSegment = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["GridArcPoints"]();
        var angle;
        var isLargeArc;
        var sweep;
        var sb = '';
        var path;
        for (var i = 0; i < points.length; i++) {
            pathSegment = points[i];
            x1 = pathSegment.startPoint.x;
            y1 = pathSegment.startPoint.y;
            x2 = pathSegment.endPoint.x;
            y2 = pathSegment.endPoint.y;
            r1 = pathSegment.size ? pathSegment.size.width : 0;
            r2 = pathSegment.size ? pathSegment.size.height : 0;
            angle = pathSegment.rotationAngle ? pathSegment.rotationAngle : 0;
            isLargeArc = pathSegment.isLargeArc ? 1 : 0;
            sweep = pathSegment.sweepDirection ? pathSegment.sweepDirection : 0;
            sb = sb + ('M' + ' ' + x1 + ' ' + y1 + ' ' + 'A' + ' ' + r1 + ' ' + r2 + ' ' +
                angle + ' ' + isLargeArc + ' ' + sweep + ' ' + x2 + ' ' + y2 + ' ');
        }
        path = sb.toString();
        return path;
    };
    AxisRender.prototype.measureHMinorGridLines = function (smithchart) {
        var radialPoint1;
        var radialPoint2;
        var k = 0;
        var arcPoints = [];
        var isLargeArc;
        var startPoint;
        var endPoint;
        var size;
        var cx;
        var maxCount = smithchart.horizontalAxis.minorGridLines.count;
        var diameter;
        var previous;
        var next;
        var space;
        var count;
        var interval;
        var radius;
        var leftX;
        this.minorHGridArcPoints = [];
        diameter = this.areaRadius * 2;
        for (var i = 0; i < this.horizontalLabelCollections.length - 3; i++) {
            previous = this.horizontalLabelCollections[i];
            next = this.horizontalLabelCollections[i + 1];
            space = (previous['radius'] - next['radius']) * 2;
            count = Math.floor((maxCount / 100) * space);
            interval = space / count;
            for (var j = 0; j < count; j++) {
                radius = next['radius'] + (j * interval) / 2;
                leftX = (smithchart.renderType === 'Impedance') ?
                    (this.circleLeftX + diameter) - (radius * 2) : this.circleLeftX;
                cx = leftX + radius;
                isLargeArc = next['value'] > 5;
                arcPoints = this.calculateMinorArcStartEndPoints(next['value']);
                if (smithchart.renderType === 'Impedance') {
                    radialPoint1 = arcPoints[0];
                    radialPoint2 = arcPoints[1];
                }
                else {
                    radialPoint1 = arcPoints[1];
                    radialPoint2 = arcPoints[0];
                }
                startPoint = this.intersectingCirclePoints(radialPoint1[0].centerX, radialPoint1[0].centerY, radialPoint1[0].radius, cx, previous['centerY'], radius, smithchart.renderType);
                endPoint = this.intersectingCirclePoints(radialPoint2[0].centerX, radialPoint2[0].centerY, radialPoint2[0].radius, cx, previous['centerY'], radius, smithchart.renderType);
                size = { width: radius, height: radius };
                this.minorHGridArcPoints.push({
                    startPoint: startPoint,
                    endPoint: endPoint,
                    rotationAngle: 2 * Math.PI,
                    sweepDirection: (smithchart.renderType === 'Impedance') ?
                        this.direction['counterclockwise'] : this.direction['clockwise'],
                    isLargeArc: isLargeArc,
                    size: size
                });
                k++;
            }
        }
    };
    AxisRender.prototype.measureRMinorGridLines = function (smithchart) {
        var maxCount = smithchart.radialAxis.minorGridLines.count;
        var arcCx;
        var nextAngle;
        var k = 0;
        var betweenAngle;
        var circlePoint;
        var circumference;
        var arcStartX;
        var arcStartY;
        var arcStartPoint;
        var previous;
        var next;
        var size;
        var distance;
        var count;
        var interval;
        var centerValue;
        circumference = Math.PI * (this.areaRadius * 2);
        arcStartX = arcCx = (smithchart.renderType === 'Impedance') ?
            this.circleCenterX + this.areaRadius : this.circleCenterX - this.areaRadius;
        arcStartY = this.circleCenterY;
        this.minorGridArcPoints = [];
        arcStartPoint = { x: arcStartX, y: arcStartY };
        for (var i = 2; i < this.labelCollections.length - 3; i++) {
            previous = this.labelCollections[i];
            next = this.labelCollections[i + 1];
            if (smithchart.renderType === 'Impedance') {
                nextAngle = next['angle'] === 360 ? 0 : next['angle'];
                betweenAngle = Math.abs(nextAngle - previous['angle']);
            }
            else {
                nextAngle = previous['angle'] === 360 ? 0 : previous['angle'];
                betweenAngle = Math.abs(nextAngle - next['angle']);
            }
            distance = (circumference / 360) * betweenAngle;
            count = Math.floor((maxCount / 100) * distance);
            interval = betweenAngle / count;
            centerValue = next['value'] > 0 ? next['value'] : previous['value'];
            circlePoint = this.minorGridLineArcIntersectCircle(Math.abs(centerValue));
            for (var j = 1; j < count; j++) {
                var outterInterSectAngle = (interval * j) + (previous['angle'] === 360 ? nextAngle : previous['angle']);
                var outerInterSectPoint = this.circlePointPosition(this.circleCenterX, this.circleCenterY, outterInterSectAngle, this.areaRadius);
                var radius = this.arcRadius(arcStartPoint, outerInterSectPoint, outterInterSectAngle);
                var arcCy = outterInterSectAngle > 180 ? this.circleCenterY - radius : this.circleCenterY + radius;
                var innerInterSectPoint = this.intersectingCirclePoints(arcCx, arcCy, radius, circlePoint[0].centerX, circlePoint[0].centerY, circlePoint[0].radius, smithchart.renderType);
                var startPoint = { x: innerInterSectPoint.x, y: innerInterSectPoint.y };
                var endPoint = { x: outerInterSectPoint.x, y: outerInterSectPoint.y };
                size = { width: radius, height: radius };
                var sweepDirection = previous['value'] >= 0 ? this.direction['clockwise'] : this.direction['counterclockwise'];
                this.minorGridArcPoints.push({
                    startPoint: startPoint,
                    endPoint: endPoint,
                    rotationAngle: 2 * Math.PI,
                    sweepDirection: sweepDirection,
                    isLargeArc: false,
                    size: size
                });
                k++;
            }
        }
    };
    AxisRender.prototype.minorGridLineArcIntersectCircle = function (centerValue) {
        var circlePoint;
        var calValue;
        if (centerValue >= 3) {
            calValue = 20;
        }
        else if (centerValue >= 1.5) {
            calValue = 10;
        }
        else if (centerValue >= 0.6) {
            calValue = 3;
        }
        else {
            calValue = 2;
        }
        circlePoint = this.horizontalLabelCollections.filter(function (c) { return c['value'] === calValue; });
        return circlePoint;
    };
    AxisRender.prototype.circlePointPosition = function (cx, cy, angle, r) {
        var pointX;
        var pointY;
        var radian;
        radian = angle * (Math.PI / 180);
        pointX = cx + r * Math.cos(radian);
        pointY = cy + r * Math.sin(radian);
        return { x: pointX, y: pointY };
    };
    AxisRender.prototype.setLabelsInsidePosition = function (angle, px, py, textSize) {
        var x = px;
        var y = py;
        if (angle === 0 || angle === 360) {
            x -= textSize.width;
            y -= textSize.height / 2;
        }
        else if (angle === 90) {
            x -= textSize.width;
            y += textSize.height / 8;
        }
        else if (angle === 180) {
            y += textSize.height;
        }
        else if (angle === 270) {
            y += textSize.height / 2;
        }
        else if (angle > 0 && angle <= 20) {
            x -= (textSize.width);
        }
        else if (angle > 20 && angle <= 60) {
            x -= (textSize.width + textSize.width / 2);
            y += textSize.height / 2;
        }
        else if (angle > 60 && angle < 90) {
            x -= (textSize.width + textSize.width / 4);
            y += textSize.height / 4;
        }
        else if (angle > 90 && angle <= 135) {
            x -= (textSize.width / 2);
            y += (textSize.height) / 16;
        }
        else if (angle > 135 && angle <= 150) {
            x += (textSize.width / 2);
            y += (textSize.height / 2);
        }
        else if (angle > 150 && angle < 180) {
            x += (textSize.width / 2);
            y += (textSize.height);
        }
        else if (angle > 180 && angle <= 210) {
            x += (textSize.width / 6);
            y += (textSize.height / 6);
        }
        else if (angle > 210 && angle < 240) {
            y += (textSize.height / 4);
        }
        else if (angle > 225 && angle < 270) {
            y += (textSize.height / 3);
        }
        else if (angle > 270 && angle <= 300) {
            x -= (textSize.width + textSize.width / 4);
            y += (textSize.height / 4);
        }
        else if (angle > 300 && angle <= 330) {
            x -= (textSize.width + textSize.width / 3);
            y += (textSize.height / 4);
        }
        else if (angle > 330 && angle <= 340) {
            x -= (textSize.width + textSize.width / 2);
            y += textSize.height / 4;
        }
        else if (angle > 340) {
            x -= textSize.width;
            y += textSize.height / 8;
        }
        return { x: x, y: y };
    };
    AxisRender.prototype.setLabelsOutsidePosition = function (angle, px, py, textSize) {
        var x = px;
        var y = py;
        if (angle === 90) {
            x -= textSize.width / 2;
            y += textSize.height;
        }
        else if (angle === 180) {
            x -= (textSize.width + 5);
            y -= textSize.height / 4;
        }
        else if (angle === 270) {
            x -= textSize.width / 2;
            y -= textSize.height / 4;
        }
        else if (angle === 360) {
            x += 5;
            y -= textSize.height / 2;
        }
        else if (angle > 0 && angle <= 30) {
            x += textSize.width / 4;
            y += textSize.height / 8;
        }
        else if (angle > 30 && angle <= 60) {
            x += textSize.width / 2;
            y += textSize.height / 4;
        }
        else if (angle > 60 && angle <= 90) {
            x -= textSize.width / 2;
            y += textSize.height;
        }
        else if (angle > 90 && angle <= 135) {
            x -= textSize.width;
            y += textSize.height;
        }
        else if (angle > 135 && angle <= 180) {
            x -= (textSize.width + textSize.width / 4);
            y += textSize.height / 4;
        }
        else if (angle > 180 && angle <= 210) {
            x -= textSize.width + textSize.width / 4;
            y -= textSize.height / 4;
        }
        else if (angle > 210 && angle <= 270) {
            x -= textSize.width;
            y -= textSize.height / 4;
        }
        else if (angle > 270 && angle <= 340) {
            y -= textSize.height / 4;
        }
        else if (angle > 340) {
            y += textSize.height / 4;
            x += textSize.width / 6;
        }
        return { x: x, y: y };
    };
    AxisRender.prototype.arcRadius = function (startPoint, endPoint, angle) {
        var mx;
        var my;
        var u;
        var t;
        var cy;
        var radius;
        var radian;
        radian = angle > 180 ? (90 * Math.PI / 180) : (270 * Math.PI / 180); // Angle 90 and 270 used for calculating upper and lower circle
        mx = (endPoint.x - startPoint.x) / 2;
        my = (endPoint.y - startPoint.y) / 2;
        u = (Math.cos(radian) * my - Math.sin(radian) * mx) / (Math.cos(radian) * mx + Math.sin(radian) * my);
        t = (my - mx * u) / Math.sin(radian);
        cy = startPoint.y + Math.sin(radian) * t;
        radius = Math.abs(startPoint.y - cy);
        return radius;
    };
    return AxisRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/index.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/index.js ***!
  \*********************************************************************/
/*! exports provided: Smithchart, SmithchartMajorGridLines, SmithchartMinorGridLines, SmithchartAxisLine, SmithchartAxis, LegendTitle, LegendLocation, LegendItemStyleBorder, LegendItemStyle, LegendBorder, SmithchartLegendSettings, SeriesTooltipBorder, SeriesTooltip, SeriesMarkerBorder, SeriesMarkerDataLabelBorder, SeriesMarkerDataLabelConnectorLine, SeriesMarkerDataLabel, SeriesMarker, SmithchartSeries, TooltipRender, Subtitle, Title, SmithchartFont, SmithchartMargin, SmithchartBorder, SmithchartRect, LabelCollection, LegendSeries, LabelRegion, HorizontalLabelCollection, RadialLabelCollections, LineSegment, PointRegion, Point, ClosestPoint, MarkerOptions, SmithchartLabelPosition, Direction, DataLabelTextOptions, LabelOption, SmithchartSize, GridArcPoints, smithchartBeforePrint, SmithchartLegend */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _smithchart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./smithchart */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/smithchart.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Smithchart", function() { return _smithchart__WEBPACK_IMPORTED_MODULE_0__["Smithchart"]; });

/* harmony import */ var _axis_axis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./axis/axis */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/axis/axis.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartMajorGridLines", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["SmithchartMajorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartMinorGridLines", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["SmithchartMinorGridLines"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartAxisLine", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["SmithchartAxisLine"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartAxis", function() { return _axis_axis__WEBPACK_IMPORTED_MODULE_1__["SmithchartAxis"]; });

/* harmony import */ var _legend_legend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./legend/legend */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/legend/legend.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendTitle", function() { return _legend_legend__WEBPACK_IMPORTED_MODULE_2__["LegendTitle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendLocation", function() { return _legend_legend__WEBPACK_IMPORTED_MODULE_2__["LegendLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendItemStyleBorder", function() { return _legend_legend__WEBPACK_IMPORTED_MODULE_2__["LegendItemStyleBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendItemStyle", function() { return _legend_legend__WEBPACK_IMPORTED_MODULE_2__["LegendItemStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendBorder", function() { return _legend_legend__WEBPACK_IMPORTED_MODULE_2__["LegendBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartLegendSettings", function() { return _legend_legend__WEBPACK_IMPORTED_MODULE_2__["SmithchartLegendSettings"]; });

/* harmony import */ var _series_series__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./series/series */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/series.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesTooltipBorder", function() { return _series_series__WEBPACK_IMPORTED_MODULE_3__["SeriesTooltipBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesTooltip", function() { return _series_series__WEBPACK_IMPORTED_MODULE_3__["SeriesTooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerBorder", function() { return _series_series__WEBPACK_IMPORTED_MODULE_3__["SeriesMarkerBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabelBorder", function() { return _series_series__WEBPACK_IMPORTED_MODULE_3__["SeriesMarkerDataLabelBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabelConnectorLine", function() { return _series_series__WEBPACK_IMPORTED_MODULE_3__["SeriesMarkerDataLabelConnectorLine"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabel", function() { return _series_series__WEBPACK_IMPORTED_MODULE_3__["SeriesMarkerDataLabel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeriesMarker", function() { return _series_series__WEBPACK_IMPORTED_MODULE_3__["SeriesMarker"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartSeries", function() { return _series_series__WEBPACK_IMPORTED_MODULE_3__["SmithchartSeries"]; });

/* harmony import */ var _series_tooltip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./series/tooltip */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/tooltip.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipRender", function() { return _series_tooltip__WEBPACK_IMPORTED_MODULE_4__["TooltipRender"]; });

/* harmony import */ var _title_title__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./title/title */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/title/title.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subtitle", function() { return _title_title__WEBPACK_IMPORTED_MODULE_5__["Subtitle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Title", function() { return _title_title__WEBPACK_IMPORTED_MODULE_5__["Title"]; });

/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartFont", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["SmithchartFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartMargin", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["SmithchartMargin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartBorder", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["SmithchartBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartRect", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["SmithchartRect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelCollection", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["LabelCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LegendSeries", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["LegendSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelRegion", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["LabelRegion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HorizontalLabelCollection", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["HorizontalLabelCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RadialLabelCollections", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["RadialLabelCollections"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSegment", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["LineSegment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PointRegion", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["PointRegion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Point", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["Point"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClosestPoint", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["ClosestPoint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkerOptions", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["MarkerOptions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartLabelPosition", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["SmithchartLabelPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Direction", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["Direction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataLabelTextOptions", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["DataLabelTextOptions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelOption", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["LabelOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartSize", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["SmithchartSize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridArcPoints", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["GridArcPoints"]; });

/* harmony import */ var _utils_enum__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/enum */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/enum.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "smithchartBeforePrint", function() { return _utils_enum__WEBPACK_IMPORTED_MODULE_7__["smithchartBeforePrint"]; });

/* harmony import */ var _legend_legendrender__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./legend/legendrender */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/legend/legendrender.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SmithchartLegend", function() { return _legend_legendrender__WEBPACK_IMPORTED_MODULE_8__["SmithchartLegend"]; });

/**
 *
 */











/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/legend/legend.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/legend/legend.js ***!
  \*****************************************************************************/
/*! exports provided: LegendTitle, LegendLocation, LegendItemStyleBorder, LegendItemStyle, LegendBorder, SmithchartLegendSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LegendTitle", function() { return LegendTitle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LegendLocation", function() { return LegendLocation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LegendItemStyleBorder", function() { return LegendItemStyleBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LegendItemStyle", function() { return LegendItemStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LegendBorder", function() { return LegendBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartLegendSettings", function() { return SmithchartLegendSettings; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
/* harmony import */ var _model_theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/theme */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/model/theme.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 LegendTitle = /** @class */ (function (_super) {
    __extends(LegendTitle, _super);
    function LegendTitle() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], LegendTitle.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], LegendTitle.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], LegendTitle.prototype, "description", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], LegendTitle.prototype, "textAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"].legendLabelFont, _utils_utils__WEBPACK_IMPORTED_MODULE_1__["SmithchartFont"])
    ], LegendTitle.prototype, "textStyle", void 0);
    return LegendTitle;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var LegendLocation = /** @class */ (function (_super) {
    __extends(LegendLocation, _super);
    function LegendLocation() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], LegendLocation.prototype, "x", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], LegendLocation.prototype, "y", void 0);
    return LegendLocation;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var LegendItemStyleBorder = /** @class */ (function (_super) {
    __extends(LegendItemStyleBorder, _super);
    function LegendItemStyleBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], LegendItemStyleBorder.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LegendItemStyleBorder.prototype, "color", void 0);
    return LegendItemStyleBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var LegendItemStyle = /** @class */ (function (_super) {
    __extends(LegendItemStyle, _super);
    function LegendItemStyle() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], LegendItemStyle.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], LegendItemStyle.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, LegendItemStyleBorder)
    ], LegendItemStyle.prototype, "border", void 0);
    return LegendItemStyle;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var LegendBorder = /** @class */ (function (_super) {
    __extends(LegendBorder, _super);
    function LegendBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], LegendBorder.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LegendBorder.prototype, "color", void 0);
    return LegendBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SmithchartLegendSettings = /** @class */ (function (_super) {
    __extends(SmithchartLegendSettings, _super);
    function SmithchartLegendSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SmithchartLegendSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('bottom')
    ], SmithchartLegendSettings.prototype, "position", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], SmithchartLegendSettings.prototype, "alignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SmithchartLegendSettings.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SmithchartLegendSettings.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('circle')
    ], SmithchartLegendSettings.prototype, "shape", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SmithchartLegendSettings.prototype, "rowCount", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SmithchartLegendSettings.prototype, "columnCount", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(8)
    ], SmithchartLegendSettings.prototype, "itemPadding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], SmithchartLegendSettings.prototype, "shapePadding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SmithchartLegendSettings.prototype, "description", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], SmithchartLegendSettings.prototype, "toggleVisibility", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, LegendTitle)
    ], SmithchartLegendSettings.prototype, "title", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, LegendLocation)
    ], SmithchartLegendSettings.prototype, "location", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, LegendItemStyle)
    ], SmithchartLegendSettings.prototype, "itemStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, LegendBorder)
    ], SmithchartLegendSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"].legendLabelFont, _utils_utils__WEBPACK_IMPORTED_MODULE_1__["SmithchartFont"])
    ], SmithchartLegendSettings.prototype, "textStyle", void 0);
    return SmithchartLegendSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/legend/legendrender.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/legend/legendrender.js ***!
  \***********************************************************************************/
/*! exports provided: SmithchartLegend */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartLegend", function() { return SmithchartLegend; });
/* harmony import */ var _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../smithchart/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js");
/* harmony import */ var _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../smithchart/utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");


/* tslint:disable:no-string-literal */
var SmithchartLegend = /** @class */ (function () {
    function SmithchartLegend() {
        this.legendSeries = [];
    }
    SmithchartLegend.prototype.renderLegend = function (smithchart) {
        this.calculateLegendBounds(smithchart);
        this._drawLegend(smithchart);
        return this.legendActualBounds;
    };
    SmithchartLegend.prototype.calculateLegendBounds = function (smithchart) {
        var legendSeries = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["LegendSeries"]();
        this.legendSeries = [];
        var padding = 10;
        var legend = smithchart.legendSettings;
        var legendSizeHeight = legend.height;
        var legendSizeWidth = legend.width;
        var itemPadding = legend.itemPadding > 0 ? legend.itemPadding : 0;
        var position = legend.position.toLowerCase();
        var font = legend.title.textStyle;
        var width = 0;
        var height = 0;
        var legendItemWidth = 0;
        var legendItemHeight = 0;
        var legendHeight = 0;
        var svgObjectWidth = smithchart.availableSize.width - ((smithchart.elementSpacing * 4) - (legend.border.width * 2)
            + (smithchart.border.width * 2));
        var svgObjectHeight = smithchart.availableSize.height - ((smithchart.elementSpacing * 4) - (legend.border.width * 2)
            + (smithchart.border.width * 2));
        var rowCount = legend.rowCount;
        var columnCount = legend.columnCount;
        var titleSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(smithchart.legendSettings['title']['text'], font);
        var maxRowWidth = 0;
        var totalRowHeight = 0;
        var curRowWidth = 0;
        var curRowHeight = 0;
        var allowItems;
        var itemsCountRow = 0;
        var length = smithchart.series.length;
        var legendBounds;
        if (smithchart.legendSettings.visible && length !== 0) {
            if (position === 'bottom' || position === 'top' || position === 'custom') {
                if ((rowCount && columnCount) && (rowCount <= columnCount)) {
                    rowCount = length / columnCount;
                }
                else if (rowCount == null && columnCount != null) {
                    rowCount = length / columnCount;
                }
                else if (rowCount == null && columnCount == null) {
                    rowCount = 1;
                }
                if (rowCount) {
                    allowItems = Math.ceil(length / rowCount);
                }
            }
            else {
                if ((rowCount && columnCount) && (rowCount <= columnCount)) {
                    columnCount = length / rowCount;
                }
                else if (rowCount != null && columnCount == null) {
                    columnCount = length / rowCount;
                }
                else if (rowCount == null && columnCount == null) {
                    columnCount = 1;
                }
                if (columnCount) {
                    allowItems = columnCount;
                }
            }
            for (var i = 0; i < length; i++) {
                this.legendSeries.push({
                    text: smithchart.series[i]['name'] ? smithchart.series[i]['name'] : 'series' + i,
                    seriesIndex: i,
                    shape: smithchart.legendSettings.shape,
                    fill: smithchart.series[i].fill || smithchart.seriesColors[i % smithchart.seriesColors.length],
                    bounds: null
                });
                var legendsize = this._getLegendSize(smithchart, this.legendSeries[i]);
                legendItemWidth = Math.max(legendsize['width'], legendItemWidth);
                legendItemHeight = Math.max(legendsize['height'], legendItemHeight);
                this.legendSeries[i]['bounds'] = { width: legendItemWidth, height: legendItemHeight };
                itemsCountRow = itemsCountRow + 1;
                curRowWidth = curRowWidth + legendItemWidth + itemPadding;
                curRowHeight = Math.max(legendItemHeight, curRowHeight);
                if (position === 'top' || position === 'bottom' || position === 'custom') {
                    if (curRowWidth > svgObjectWidth) {
                        curRowWidth -= legendsize.width + itemPadding;
                        maxRowWidth = Math.max(maxRowWidth, curRowWidth);
                        curRowWidth = legendsize.width + itemPadding;
                        totalRowHeight = totalRowHeight + curRowHeight + itemPadding;
                    }
                }
                if (itemsCountRow === allowItems || i === length - 1) {
                    maxRowWidth = Math.max(maxRowWidth, curRowWidth);
                    totalRowHeight = totalRowHeight + curRowHeight + itemPadding;
                    legendHeight = totalRowHeight;
                    itemsCountRow = 0;
                    curRowHeight = 0;
                    curRowWidth = 0;
                }
            }
            width = (titleSize.width) > maxRowWidth - itemPadding ? (titleSize.width + padding * 2 + itemPadding) :
                maxRowWidth + padding * 2 - (smithchart.border.width * 2);
            height = legendHeight + smithchart.elementSpacing;
            legendBounds = { x: 0, y: 0, width: width, height: height };
        }
        this.legendActualBounds = legendBounds;
        if (legendSizeWidth != null) {
            this.legendActualBounds.width = legendSizeWidth;
        }
        if (legendSizeHeight != null) {
            this.legendActualBounds.height = legendSizeHeight;
        }
    };
    SmithchartLegend.prototype._getLegendSize = function (smithchart, series) {
        var legend = smithchart.legendSettings;
        var symbolWidth = legend.itemStyle.width;
        var symbolHeight = legend.itemStyle.height;
        var textSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(series.text, legend.textStyle);
        var width = symbolWidth + textSize.width + legend.shapePadding;
        var height = Math.max(symbolHeight, textSize.height);
        return { width: width, height: height };
    };
    // tslint:disable:max-func-body-length
    SmithchartLegend.prototype._drawLegend = function (smithchart) {
        var legend = smithchart.legendSettings;
        var legendPosition = legend.position.toLowerCase();
        var alignment = legend.alignment;
        var legendBounds = this.legendActualBounds;
        var maxWidth = 0;
        var startX;
        var startY;
        var titleFont = smithchart.title.font ? smithchart.title.font : smithchart.title.textStyle;
        var smithchartTitleHeight = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(smithchart.title.text, titleFont).height;
        var smithchartSubtitleHeight = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(smithchart.title.subtitle.text, smithchart.title.subtitle.textStyle).height;
        var elementSpacing = smithchart.elementSpacing;
        var offset = smithchartTitleHeight + smithchartSubtitleHeight + elementSpacing + smithchart.margin.top;
        var itemPadding = legend.itemPadding > 0 ? legend.itemPadding : 0;
        var svgObjectWidth = smithchart.availableSize.width;
        var svgObjectHeight = smithchart.availableSize.height;
        var legendBorder = legend.border.width;
        var legendWidth = 0;
        var titleSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(legend['title']['text'], legend.title.textStyle);
        var legendTitleHeight = titleSize.height;
        var borderSize = smithchart.border.width;
        var svgWidth = svgObjectWidth - ((borderSize * 2));
        var svgHeight = svgObjectHeight - ((borderSize * 2));
        legendBounds.height += legendTitleHeight;
        if (legendPosition !== 'custom') {
            switch (legendPosition) {
                case 'bottom':
                    legendBounds.y = svgHeight - (legendBounds.height + (legendBorder) + elementSpacing);
                    break;
                case 'top':
                    legendBounds.y = borderSize + offset;
                    break;
                case 'right':
                    legendBounds.x = svgWidth - legendBounds.width - (elementSpacing * 2);
                    break;
                case 'left':
                    legendBounds.x = borderSize + (elementSpacing * 2);
                    break;
            }
            if (legendPosition === 'left' || legendPosition === 'right') {
                switch (alignment) {
                    case 'Center':
                        legendBounds.y = (svgHeight / 2) - ((legendBounds.height + legendBorder * 2) / 2) + (elementSpacing / 2);
                        break;
                    case 'Near':
                        legendBounds.y = borderSize + (elementSpacing * 2) + offset;
                        break;
                    case 'Far':
                        legendBounds.y = svgHeight - (legendBounds.height + (legendBorder)) - (elementSpacing * 2);
                        break;
                }
            }
            else {
                switch (alignment) {
                    case 'Center':
                        legendBounds.x = (svgWidth / 2) - ((legendBounds.width + legendBorder * 2) / 2) + (elementSpacing / 2);
                        break;
                    case 'Near':
                        legendBounds.x = borderSize + (elementSpacing * 2);
                        break;
                    case 'Far':
                        legendBounds.x = svgWidth - (legendBounds.width + (legendBorder)) - (elementSpacing * 2);
                        break;
                }
            }
        }
        else {
            legendBounds.y = (legend.location.y < svgHeight) ? legend.location.y : 0;
            legendBounds.x = (legend.location.x < svgWidth) ? legend.location.x : 0;
        }
        if (legendPosition === 'bottom' || legendPosition === 'top') {
            for (var i = 0; i < this.legendSeries.length; i++) {
                legendWidth += this.legendSeries[i].bounds.width + itemPadding;
                if (legendWidth > svgWidth) {
                    legendBounds.x = (svgWidth / 2) - ((legendBounds.width + legendBorder * 2) / 2) + (elementSpacing / 2);
                    break;
                }
            }
        }
        var gLegendEle = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_legend_group' });
        smithchart.svgObject.appendChild(gLegendEle);
        this.legendItemGroup = smithchart.renderer.createGroup({ 'id': smithchart.element.id + 'legendItem_Group' });
        var currentX = startX = elementSpacing;
        var currentY = startY = elementSpacing;
        if (legend.title.text !== '' && legend.title.visible) {
            gLegendEle.appendChild(this.drawLegendTitle(smithchart, legend, legendBounds, gLegendEle));
            currentY = startY = elementSpacing + legendTitleHeight;
        }
        for (var k = 0; k < this.legendSeries.length; k++) {
            if ((legend.rowCount < legend.columnCount || legend.rowCount === legend.columnCount) &&
                (legendPosition === 'top' || legendPosition === 'bottom' || legendPosition === 'custom')) {
                if ((currentX + this.legendSeries[k]['bounds'].width) > legendBounds.width + startX) {
                    currentX = elementSpacing;
                    currentY += this.legendSeries[k]['bounds'].height + itemPadding;
                }
                this.legendGroup = this.drawLegendItem(smithchart, legend, this.legendSeries[k], k, currentX, (currentY), legendBounds);
                gLegendEle.appendChild(this.legendGroup);
                currentX += this.legendSeries[k]['bounds'].width + itemPadding;
            }
            else {
                if (((currentY + this.legendSeries[k]['bounds'].height + itemPadding) +
                    legendTitleHeight + borderSize > legendBounds.height + startY)) {
                    currentY = startY;
                    currentX += maxWidth + (itemPadding);
                }
                this.legendGroup = this.drawLegendItem(smithchart, legend, this.legendSeries[k], k, (currentX), (currentY), legendBounds);
                gLegendEle.appendChild(this.legendGroup);
                currentY += this.legendSeries[k]['bounds'].height + itemPadding;
                maxWidth = Math.max(maxWidth, this.legendSeries[k]['bounds'].width);
            }
        }
        gLegendEle.setAttribute('transform', 'translate(' + legendBounds.x.toString() + ',' + legendBounds.y.toString() + ')');
        this.drawLegendBorder(gLegendEle, smithchart, legend, legendBounds);
    };
    SmithchartLegend.prototype.drawLegendBorder = function (gLegendEle, smithchart, legend, legendBounds) {
        var borderRect = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["RectOption"](smithchart.element.id + '_svg' + '_legendRect', 'none', legend.border, 1, new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["SmithchartRect"](0, 0, legendBounds.width, legendBounds.height));
        gLegendEle.appendChild(smithchart.renderer.drawRectangle(borderRect));
    };
    SmithchartLegend.prototype.drawLegendTitle = function (smithchart, legend, legendBounds, gLegendEle) {
        var elementSpacing = smithchart.elementSpacing;
        var titleSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(legend.title.text, legend.title.textStyle);
        var titleWidth = titleSize.width;
        var titleHeight = titleSize.height;
        var textAlignment = legend.title.textAlignment;
        var startX = 0;
        var legendBoundsWidth = legendBounds.width;
        var startY = elementSpacing + (titleHeight / 2);
        switch (textAlignment) {
            case 'Far':
                startX = legendBoundsWidth - titleWidth - startX;
                break;
            case 'Center':
                startX = legendBoundsWidth / 2 - (titleWidth) / 2;
                break;
        }
        if (startX < 0) {
            startX = 0;
            legendBoundsWidth = titleWidth;
        }
        if (legendBoundsWidth < titleWidth + startX) {
            legendBoundsWidth = titleWidth + startX;
        }
        var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TextOption"](smithchart.element.id + '_LegendTitleText', startX, startY, 'start', legend.title.text);
        var element = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["renderTextElement"])(options, legend.title.textStyle, smithchart.themeStyle.legendLabel, gLegendEle);
        element.setAttribute('aria-label', legend.title.description || legend.title.text);
        return element;
    };
    SmithchartLegend.prototype.drawLegendItem = function (smithchart, legend, legendSeries, k, x, y, legendBounds) {
        var location;
        var radius;
        var symbol = legend.itemStyle;
        var itemPadding = legend.itemPadding;
        var textHeight;
        radius = Math.sqrt(symbol['width'] * symbol['width'] + symbol['height'] * symbol['height']) / 2;
        textHeight = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(legendSeries['text'], legend.textStyle).height;
        location = {
            x: x + symbol['width'] / 2,
            y: (y + (textHeight > symbol['height'] ? textHeight : symbol['height']) / 2)
        };
        var legendGroup = smithchart.renderer.createGroup({ id: smithchart.element.id + '_svg' + '_Legend' + k.toString() });
        legendGroup['style']['cursor'] = legend.toggleVisibility ? 'pointer' : 'default';
        var legendEventArgs = { text: legendSeries['text'], fill: legendSeries['fill'],
            shape: legendSeries['shape'], name: 'legendRender', cancel: false };
        smithchart.trigger('legendRender', legendEventArgs);
        var shape = this.drawLegendShape(smithchart, legendSeries, location.x, location.y, k, legend, legendEventArgs);
        legendGroup.appendChild(shape);
        var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["TextOption"](smithchart.element.id + '_LegendItemText' + k.toString(), location.x + symbol['width'] / 2 + legend.shapePadding, location.y + textHeight / 4, 'start', legendEventArgs.text);
        legend.textStyle.fontFamily = smithchart.themeStyle.fontFamily || legend.textStyle.fontFamily;
        legend.textStyle.size = smithchart.themeStyle.fontSize || legend.textStyle.size;
        var element = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["renderTextElement"])(options, legend.textStyle, smithchart.themeStyle.legendLabel, legendGroup);
        element.setAttribute('aria-label', legend.description || 'Click to show or hide the ' + options.text + ' series');
        legendGroup.appendChild(element);
        this.legendItemGroup.appendChild(legendGroup);
        return this.legendItemGroup;
    };
    SmithchartLegend.prototype.drawLegendShape = function (smithchart, legendSeries, locX, locY, index, legend, legendEventArgs) {
        var element;
        var circleOptions;
        var pathOptions;
        var path;
        var symbol = legend.itemStyle;
        var width = symbol['width'];
        var height = symbol['height'];
        var x = locX + (-width / 2);
        var y = locY + (-height / 2);
        var border = { color: symbol.border.color, width: symbol.border.width };
        var opacity = 1;
        var fill = (smithchart.series[index].visibility === 'visible') ? legendEventArgs.fill : 'grey';
        var shape = legendEventArgs.shape.toLowerCase();
        var radius = Math.sqrt(height * height + width * width) / 2;
        switch (shape) {
            case 'circle':
                circleOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CircleOption"](smithchart.element.id + '_svg' + '_LegendItemShape' + index.toString(), fill, border, opacity, locX, locY, radius, null);
                element = smithchart.renderer.drawCircle(circleOptions);
                break;
            case 'rectangle':
                path = 'M' + ' ' + x + ' ' + (locY + (-height / 2)) + ' ' +
                    'L' + ' ' + ((width / 2) + locX) + ' ' + (locY + (-height / 2)) + ' ' +
                    'L' + ' ' + (locX + (width / 2)) + ' ' + (locY + (height / 2)) + ' ' +
                    'L' + ' ' + x + ' ' + (locY + (height / 2)) + ' ' +
                    'L' + ' ' + x + ' ' + (locY + (-height / 2)) + ' z';
                pathOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_svg' + '_LegendItemShape' + index.toString(), fill, border.width, border.color, 1, '', path);
                element = smithchart.renderer.drawPath(pathOptions);
                break;
            case 'diamond':
                path = 'M' + ' ' + x + ' ' + locY + ' ' +
                    'L' + ' ' + locX + ' ' + (locY + (-height / 2)) + ' ' +
                    'L' + ' ' + ((width / 2) + locX) + ' ' + locY + ' ' +
                    'L' + ' ' + locX + ' ' + (locY + (height / 2)) + ' ' +
                    'L' + ' ' + x + ' ' + locY + ' z';
                pathOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_svg' + '_LegendItemShape' + index.toString(), fill, border.width, border.color, 1, '', path);
                element = smithchart.renderer.drawPath(pathOptions);
                break;
            case 'pentagon':
                var eq = 72;
                for (var j = 0; j <= 5; j++) {
                    var xValue = radius * Math.cos((Math.PI / 180) * (j * eq));
                    var yValue = radius * Math.sin((Math.PI / 180) * (j * eq));
                    if (j === 0) {
                        path = 'M' + ' ' + (xValue + locX) + ' ' + (locY + yValue) + ' ';
                    }
                    else {
                        path = path.concat('L' + ' ' + (locX + xValue) + ' ' + (locY + yValue) + ' ');
                    }
                }
                path = path.concat('Z');
                pathOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_svg' + '_LegendItemShape' + index.toString(), fill, border.width, border.color, 1, '', path);
                element = smithchart.renderer.drawPath(pathOptions);
                break;
            case 'triangle':
                path = 'M' + ' ' + x + ' ' + ((height / 2) + locY) + ' ' +
                    'L' + ' ' + locX + ' ' + (locY + (-height / 2)) + ' ' +
                    'L' + ' ' + (locX + (width / 2)) + ' ' + (locY + (height / 2)) + ' ' +
                    'L' + ' ' + x + ' ' + (locY + (height / 2)) + ' Z';
                pathOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](smithchart.element.id + '_svg' + '_LegendItemShape' + index.toString(), fill, border.width, border.color, 1, '', path);
                element = smithchart.renderer.drawPath(pathOptions);
                break;
        }
        return element;
    };
    /**
     * Get module name.
     */
    SmithchartLegend.prototype.getModuleName = function () {
        return 'SmithchartLegend';
    };
    /**
     * To destroy the legend.
     * @return {void}
     * @private
     */
    SmithchartLegend.prototype.destroy = function (smithchart) {
        /**
         * Destroy method performed here
         */
    };
    return SmithchartLegend;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/model/constant.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/model/constant.js ***!
  \******************************************************************************/
/*! exports provided: animationComplete, legendRender, titleRender, subtitleRender, textRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationComplete", function() { return animationComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "legendRender", function() { return legendRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "titleRender", function() { return titleRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtitleRender", function() { return subtitleRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textRender", function() { return textRender; });
/**
 * Specifies smithchart animationComplete event name.
 * @private
 */
var animationComplete = 'animationComplete';
/**
 * Specifies smithchart legendRender event name.
 * @private
 */
var legendRender = 'legendRender';
/**
 * Specifies smithchart titleRender event name.
 * @private
 */
var titleRender = 'titleRender';
/**
 * Specifies smithchart subtitleRender event name.
 * @private
 */
var subtitleRender = 'subtitleRender';
/**
 * Specifies smithchart textRender event name.
 * @private
 */
var textRender = 'textRender';


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/model/theme.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/model/theme.js ***!
  \***************************************************************************/
/*! exports provided: Theme, getSeriesColor, getThemeColor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Theme", function() { return Theme; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSeriesColor", function() { return getSeriesColor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeColor", function() { return getThemeColor; });
var Theme;
(function (Theme) {
    /** @private */
    Theme.axisLabelFont = {
        size: '12px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
    };
    /** @private */
    Theme.smithchartTitleFont = {
        size: '15px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
    };
    /** @private */
    Theme.smithchartSubtitleFont = {
        size: '13px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
    };
    /** @private */
    Theme.dataLabelFont = {
        size: '12px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
    };
    /** @private */
    Theme.legendLabelFont = {
        size: '13px',
        fontWeight: 'Normal',
        color: null,
        fontStyle: 'Normal',
        fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
    };
})(Theme || (Theme = {}));
/** @private */
function getSeriesColor(theme) {
    var palette;
    switch (theme.toLowerCase()) {
        case 'highcontrastlight':
            palette = ['#79ECE4', '#E98272', '#DFE6B6', '#C6E773', '#BA98FF',
                '#FA83C3', '#00C27A', '#43ACEF', '#D681EF', '#D8BC6E'];
            break;
        case 'fabric':
            palette = ['#4472c4', '#ed7d31', '#ffc000', '#70ad47', '#5b9bd5',
                '#c1c1c1', '#6f6fe2', '#e269ae', '#9e480e', '#997300'];
            break;
        case 'bootstrap':
            palette = ['#a16ee5', '#f7ce69', '#55a5c2', '#7ddf1e', '#ff6ea6',
                '#7953ac', '#b99b4f', '#407c92', '#5ea716', '#b91c52'];
            break;
        default:
            palette = ['#00bdae', '#404041', '#357cd2', '#e56590', '#f8b883',
                '#70ad47', '#dd8abd', '#7f84e8', '#7bb4eb', '#ea7a57'];
            break;
    }
    return palette;
}
/** @private */
function getThemeColor(theme) {
    var style;
    var themes = theme.toLowerCase();
    switch (themes) {
        case 'highcontrast':
            style = {
                axisLabel: '#ffffff',
                axisLine: '#ffffff',
                majorGridLine: '#BFBFBF',
                minorGridLine: '#969696',
                chartTitle: '#ffffff',
                legendLabel: '#ffffff',
                background: '#000000',
                areaBorder: '#ffffff',
                tooltipFill: '#ffffff',
                dataLabel: '#ffffff',
                tooltipBoldLabel: '#000000',
                tooltipLightLabel: '#000000',
                tooltipHeaderLine: '#969696',
            };
            break;
        case 'materialdark':
        case 'bootstrapdark':
        case 'fabricdark':
            style = {
                axisLabel: '#DADADA',
                axisLine: ' #6F6C6C',
                majorGridLine: '#414040',
                minorGridLine: '#514F4F',
                chartTitle: '#ffffff',
                legendLabel: '#DADADA',
                background: '#000000',
                areaBorder: ' #9A9A9A',
                tooltipFill: '#F4F4F4',
                dataLabel: '#DADADA',
                tooltipBoldLabel: '#282727',
                tooltipLightLabel: '#333232',
                tooltipHeaderLine: '#9A9A9A'
            };
            break;
        case 'bootstrap4':
            style = {
                axisLabel: '#212529',
                axisLine: '#ADB5BD',
                majorGridLine: '#CED4DA',
                minorGridLine: '#DEE2E6',
                chartTitle: '#212529',
                legendLabel: '#212529',
                background: '#FFFFFF',
                areaBorder: '#DEE2E6',
                tooltipFill: '#000000',
                dataLabel: '#212529',
                tooltipBoldLabel: '#FFFFFF',
                tooltipLightLabel: '#FFFFFF',
                tooltipHeaderLine: '#FFFFFF',
                fontFamily: 'HelveticaNeue-Medium',
                fontSize: '16px',
                labelFontFamily: 'HelveticaNeue',
                tooltipFillOpacity: 1,
                tooltipTextOpacity: 0.9
            };
            break;
        default:
            style = {
                axisLabel: '#686868',
                axisLine: '#b5b5b5',
                majorGridLine: '#dbdbdb',
                minorGridLine: '#eaeaea',
                chartTitle: '#424242',
                legendLabel: '#353535',
                background: '#FFFFFF',
                areaBorder: 'Gray',
                tooltipFill: 'rgba(0, 8, 22, 0.75)',
                dataLabel: '#424242',
                tooltipBoldLabel: '#ffffff',
                tooltipLightLabel: '#dbdbdb',
                tooltipHeaderLine: '#ffffff'
            };
            break;
    }
    return style;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/datalabel.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/series/datalabel.js ***!
  \********************************************************************************/
/*! exports provided: DataLabel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataLabel", function() { return DataLabel; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../smithchart/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js");
/* harmony import */ var _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../smithchart/utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
/**
 *
 */





/* tslint:disable:no-string-literal */
var DataLabel = /** @class */ (function () {
    function DataLabel() {
        this.textOptions = [];
        this.labelOptions = [];
        this.allPoints = [];
    }
    DataLabel.prototype.drawDataLabel = function (smithchart, seriesindex, groupElement, pointsRegion, bounds) {
        this.textOptions = [];
        this.allPoints = [];
        var margin = smithchart.margin;
        var pointIndex;
        var marker = smithchart.series[seriesindex].marker;
        var region;
        var labelPosition;
        var labelText;
        var textSize;
        var dataLabel = marker.dataLabel;
        var font = dataLabel.textStyle;
        var count = pointsRegion.length;
        for (var i = 0; i < count; i++) {
            labelText = smithchart.series[seriesindex].points[i].reactance.toString();
            textSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["measureText"])(labelText, font);
            region = pointsRegion[i]['point'];
            var xPos = region.x - textSize.width / 2;
            var yPos = region.y - (textSize.height + marker['height'] + (margin.top));
            var width = textSize.width + (margin.left / 2) + (margin.right / 2);
            var height = textSize.height + (margin.top / 2) + (margin.bottom / 2);
            pointIndex = i;
            labelPosition = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["SmithchartLabelPosition"]();
            labelPosition = { textX: xPos + (margin.left / 2), textY: yPos + (height / 2) + margin.top / 2, x: xPos, y: yPos };
            this.textOptions[i] = {
                id: smithchart.element.id + '_Series' + seriesindex + '_Points' + pointIndex + '_dataLabel' + '_displayText' + i,
                x: labelPosition['textX'],
                y: labelPosition['textY'],
                fill: 'black',
                text: labelText,
                font: font,
                xPosition: xPos,
                yPosition: yPos,
                width: width,
                height: height,
                location: region,
                labelOptions: labelPosition,
                visible: true,
                connectorFlag: null
            };
        }
        var labelOption = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["LabelOption"]();
        labelOption.textOptions = this.textOptions;
        this.labelOptions.push(labelOption);
        this.drawDatalabelSymbol(smithchart, seriesindex, dataLabel, groupElement, bounds, pointsRegion);
    };
    DataLabel.prototype.calculateSmartLabels = function (points, seriesIndex) {
        var length = points['textOptions'].length;
        var count = 0;
        for (var k = 0; k < length; k++) {
            this.allPoints[this.allPoints.length] = points['textOptions'][k];
            this.connectorFlag = false;
            this.compareDataLabels(k, points, count, seriesIndex);
            this.labelOptions[seriesIndex]['textOptions'][k] = points['textOptions'][k];
            this.labelOptions[seriesIndex]['textOptions'][k].connectorFlag = this.connectorFlag;
        }
    };
    DataLabel.prototype.compareDataLabels = function (i, points, count, m) {
        var length = this.allPoints.length;
        var padding = 10;
        var collide;
        var currentLabel;
        var prevLabel;
        for (var j = 0; j < length; j++) {
            prevLabel = this.allPoints[j];
            currentLabel = this.allPoints[length - 1];
            collide = this.isCollide(prevLabel, currentLabel);
            if (collide) {
                this.connectorFlag = true;
                switch (count) {
                    case 0:
                        // Right
                        this.resetValues(currentLabel);
                        this.prevLabel = prevLabel;
                        currentLabel['xPosition'] = this.prevLabel['xPosition'] + (this.prevLabel['width'] / 2 +
                            currentLabel['width'] / 2 + padding);
                        currentLabel['x'] = currentLabel['xPosition'] + padding / 2;
                        count += 1;
                        this.compareDataLabels(i, points, count, m);
                        break;
                    case 1:
                        // Right Bottom
                        this.resetValues(currentLabel);
                        currentLabel['xPosition'] = this.prevLabel['xPosition'] + this.prevLabel['width'] / 2 +
                            currentLabel['width'] / 2 + padding;
                        currentLabel['x'] = currentLabel['xPosition'] + padding / 2;
                        currentLabel['yPosition'] = currentLabel['location'].y + currentLabel['height'] / 2 + padding / 2;
                        currentLabel['y'] = currentLabel['yPosition'] + ((currentLabel['height'] / 2)) + padding / 2;
                        count += 1;
                        this.compareDataLabels(i, points, count, m);
                        break;
                    case 2:
                        // Bottom
                        this.resetValues(currentLabel);
                        currentLabel['yPosition'] = currentLabel['location'].y + currentLabel['height'] / 2 + padding / 2;
                        currentLabel['y'] = currentLabel['yPosition'] + (currentLabel['height'] / 2) + padding / 2;
                        count += 1;
                        this.compareDataLabels(i, points, count, m);
                        break;
                    case 3:
                        // Left Bottom
                        this.resetValues(currentLabel);
                        currentLabel['xPosition'] = this.prevLabel['xPosition'] - this.prevLabel['width'] / 2
                            - currentLabel['width'] / 2 - padding;
                        currentLabel['x'] = currentLabel['xPosition'] + padding / 2;
                        currentLabel['yPosition'] = currentLabel['height'] / 2 + currentLabel['location'].y + padding / 2;
                        currentLabel['y'] = currentLabel['yPosition'] + ((currentLabel['height'] / 2)) + padding / 2;
                        count += 1;
                        this.compareDataLabels(i, points, count, m);
                        break;
                    case 4:
                        // Left
                        this.resetValues(currentLabel);
                        currentLabel['xPosition'] = (this.prevLabel['xPosition'] - this.prevLabel['width'] / 2 -
                            currentLabel['width'] / 2 - padding);
                        currentLabel['x'] = currentLabel['xPosition'] + padding / 2;
                        count += 1;
                        this.compareDataLabels(i, points, count, m);
                        break;
                    case 5:
                        //Left Top
                        this.resetValues(currentLabel);
                        currentLabel['xPosition'] = this.prevLabel['xPosition'] - this.prevLabel['width'] / 2 -
                            currentLabel['width'] / 2 - padding;
                        currentLabel['x'] = currentLabel['xPosition'] + padding / 2;
                        currentLabel['yPosition'] = this.prevLabel['yPosition'] - currentLabel['height'] - padding;
                        currentLabel['y'] = currentLabel['yPosition'] + currentLabel['height'] / 2 + padding / 2;
                        count += 1;
                        this.compareDataLabels(i, points, count, m);
                        break;
                    case 6:
                        // Top
                        this.resetValues(currentLabel);
                        currentLabel['yPosition'] = (this.prevLabel['yPosition']) - (currentLabel['height'] + padding);
                        currentLabel['y'] = currentLabel['yPosition'] + (currentLabel['height'] / 2) + padding / 2;
                        count += 1;
                        this.compareDataLabels(i, points, count, m);
                        break;
                    case 7:
                        // Right Top
                        this.resetValues(currentLabel);
                        currentLabel['xPosition'] = this.prevLabel['xPosition'] + this.prevLabel['width'] / 2 +
                            currentLabel['width'] / 2 + padding;
                        currentLabel['x'] = currentLabel['xPosition'] + padding / 2;
                        currentLabel['yPosition'] = this.prevLabel['yPosition'] - currentLabel['height'] - padding;
                        currentLabel['y'] = currentLabel['yPosition'] + (currentLabel['height'] / 2) + padding / 2;
                        count += 1;
                        this.compareDataLabels(i, points, count, m);
                        break;
                    case 8:
                        count = 0;
                        this.compareDataLabels(i, points, count, m);
                        break;
                }
            }
        }
    };
    DataLabel.prototype.isCollide = function (dataLabel1, dataLabel2) {
        var state = false;
        if (dataLabel1 !== dataLabel2) {
            state = !( // to compare data labels
            ((dataLabel1['y'] + dataLabel1['height']) < (dataLabel2['y'])) ||
                (dataLabel1['y'] > (dataLabel2['y'] + dataLabel2['height'])) ||
                ((dataLabel1['x'] + dataLabel1['width'] / 2) < dataLabel2['x'] - dataLabel2['width'] / 2) ||
                (dataLabel1['x'] - dataLabel1['width'] / 2 > (dataLabel2['x'] + dataLabel2['width'] / 2)));
        }
        return state;
    };
    DataLabel.prototype.resetValues = function (currentPoint) {
        currentPoint['xPosition'] = currentPoint['labelOptions']['x'];
        currentPoint['yPosition'] = currentPoint['labelOptions']['y'];
        currentPoint['x'] = currentPoint['labelOptions']['textX'];
        currentPoint['y'] = currentPoint['labelOptions']['textY'];
    };
    DataLabel.prototype.drawConnectorLines = function (smithchart, seriesIndex, index, currentPoint, groupElement) {
        var xPos = currentPoint['xPosition'];
        var yPos = currentPoint['yPosition'];
        var location = currentPoint['location'];
        var endY;
        if (location.y > currentPoint['y']) {
            endY = (currentPoint['y']);
        }
        else {
            endY = (currentPoint['y'] - currentPoint['height'] / 2); // bottom
        }
        var connectorDirection = 'M' + ' ' + (location.x) + ' ' + (location.y) + ' ' + 'L' + ' ' +
            (currentPoint['x']) + ' ' + (endY);
        var connectorLineValues = smithchart.series[seriesIndex].marker.dataLabel.connectorLine;
        var stroke = connectorLineValues.color ? connectorLineValues.color :
            (smithchart.series[seriesIndex].fill ||
                smithchart.seriesColors[seriesIndex % smithchart.seriesColors.length]);
        var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["PathOption"](smithchart.element.id + '_dataLabelConnectorLine' + '_series' + seriesIndex + '_point' + index, 'none', connectorLineValues.width, stroke, 1, 'none', connectorDirection);
        var element = smithchart.renderer.drawPath(options);
        groupElement.appendChild(element);
    };
    DataLabel.prototype.drawDatalabelSymbol = function (smithchart, seriesindex, dataLabel, groupElement, bounds, pointsRegion) {
        for (var i = 0; i < smithchart.series[seriesindex].points.length; i++) {
            if (dataLabel.template) {
                var labelTemplateElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
                    id: smithchart.element.id + '_seriesIndex_' + seriesindex + '_Label_Template_Group',
                    className: 'template',
                    styles: 'position: absolute;'
                    /* 'top:' + bounds['x'] + 'px;' +
                     'left:' + bounds['y'] + 'px;' +
                     'height:' + smithchart.availableSize.height + 'px;' +
                     'width:' + smithchart.availableSize.width + 'px;'*/
                });
                document.getElementById(smithchart.element.id + '_Secondary_Element').appendChild(labelTemplateElement);
                var templateFn = void 0;
                var labelElement = void 0;
                var id = dataLabel.template + '_seriesIndex' + seriesindex + '_pointIndex' + i + smithchart.element.id;
                var data = { point: smithchart.series[seriesindex].points[i].reactance };
                templateFn = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getTemplateFunction"])(dataLabel.template);
                var templateElement = templateFn(smithchart);
                labelElement = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["convertElementFromLabel"])(templateElement, id, data, seriesindex, smithchart);
                labelTemplateElement.appendChild(labelElement);
                labelElement.style.left = pointsRegion[i].point.x - labelElement.offsetWidth / 2 + 'px';
                labelElement.style.top = pointsRegion[i].point.y - labelElement.offsetHeight -
                    smithchart.series[seriesindex].marker.height / 2 + 'px';
                var blazorId = '_seriesIndex' + seriesindex + '_pointIndex' + i + smithchart.element.id;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(blazorId + 'Template', 'Template');
                var left = parseInt(labelElement.style.left, 10);
                var top_1 = parseInt(labelElement.style.top, 10);
                var width = labelElement.offsetWidth;
                var height = labelElement.offsetHeight;
                var region = pointsRegion[i]['point'];
                var labelPosition = { textX: left, textY: top_1,
                    x: left, y: top_1 };
                this.labelOptions[seriesindex]['textOptions'][i] = {
                    id: id,
                    x: left,
                    y: top_1,
                    fill: 'black',
                    text: '',
                    font: dataLabel.textStyle,
                    xPosition: left,
                    yPosition: top_1,
                    width: width,
                    height: height,
                    location: region,
                    labelOptions: labelPosition,
                    visible: true,
                    connectorFlag: null
                };
            }
        }
    };
    return DataLabel;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/marker.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/series/marker.js ***!
  \*****************************************************************************/
/*! exports provided: Marker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Marker", function() { return Marker; });
/* harmony import */ var _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../smithchart/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js");
/* harmony import */ var _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../smithchart/utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");


/* tslint:disable:no-string-literal */
var Marker = /** @class */ (function () {
    function Marker() {
    }
    Marker.prototype.drawMarker = function (smithchart, seriesindex, groupElement, pointsRegion) {
        if (smithchart.series[seriesindex].marker.visible) {
            var marker = smithchart.series[seriesindex].marker;
            var count = smithchart.series[seriesindex].points.length - 1;
            var width = marker.width;
            var height = marker.height;
            var symbolName = marker.shape;
            var gmEle = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' +
                    '_series' + seriesindex + '_Marker' });
            groupElement.appendChild(gmEle);
            var borderWidth = marker.border.width;
            var borderColor = marker.border.color;
            var opacity = marker.opacity;
            var fill = marker.fill ? marker.fill : (smithchart.series[seriesindex].fill ||
                smithchart.seriesColors[seriesindex % smithchart.seriesColors.length]);
            for (var i = 0; i < count + 1; i++) {
                var location_1 = pointsRegion[i]['point'];
                var pointIndex = i;
                var options = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["MarkerOptions"](smithchart.element.id + '_Series' + seriesindex + '_Points' + pointIndex + '_Marker' + pointIndex, fill, borderColor, borderWidth, opacity);
                gmEle.appendChild(this.drawSymbol(symbolName, marker.imageUrl, location_1, new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_1__["SmithchartSize"](width, height), options, smithchart));
            }
        }
    };
    Marker.prototype.drawSymbol = function (symbolName, url, location, size, options, smithchart) {
        var markerEle;
        var shape = symbolName.toLowerCase();
        var circleOptions;
        var pathOptions;
        var path;
        var border = { color: options['borderColor'], width: options['borderWidth'] };
        var opacity = options.opacity;
        var startX = location.x;
        var startY = location.y;
        var radius = Math.sqrt(size.height * size.height + size.width * size.width) / 2;
        switch (shape) {
            case 'circle':
                circleOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["CircleOption"](options['id'], options['fill'], border, opacity, location.x, location.y, radius, null);
                markerEle = smithchart.renderer.drawCircle(circleOptions);
                break;
            case 'rectangle':
                path = 'M' + ' ' + (startX + (-size.width / 2)) + ' ' + (startY + (-size.height / 2)) +
                    ' ' + 'L' + ' ' + (startX + (size.width / 2)) + ' ' + (startY + (-size.height / 2)) + ' ' +
                    'L' + ' ' + (startX + (size.width / 2)) + ' ' + (startY + (size.height / 2)) +
                    ' ' + 'L' + ' ' + (startX + (-size.width / 2)) +
                    ' ' + (startY + (size.height / 2)) + ' ' + 'L' + ' ' +
                    (startX + (-size.width / 2)) + ' ' + (startY + (-size.height / 2)) + 'z';
                pathOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](options['id'], options['fill'], border.width, border.color, opacity, '', path);
                markerEle = smithchart.renderer.drawPath(pathOptions);
                break;
            case 'triangle':
                path = 'M' + ' ' + (startX + (-size.width / 2)) + ' ' + (startY + (size.height / 2)) + ' ' + 'L' + ' ' + (startX) + ' ' +
                    (startY + (-size.height / 2)) + ' ' + 'L' + ' ' + (startX + (size.width / 2)) + ' ' +
                    (startY + (size.height / 2)) + ' ' + 'L' + ' ' +
                    (startX + (-size.width / 2)) + ' ' + (startY + (size.height / 2)) + 'z';
                pathOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](options['id'], options['fill'], border.width, border.color, opacity, '', path);
                markerEle = smithchart.renderer.drawPath(pathOptions);
                break;
            case 'diamond':
                path = 'M' + ' ' + (startX + (-size.width / 2)) + ' ' + (startY) + ' ' + 'L' + ' ' +
                    (startX) + ' ' + (startY + (-size.height / 2)) + ' ' + 'L' + ' ' + (startX + (size.width / 2)) + ' ' +
                    (startY) + ' ' + 'L' + ' ' + (startX) + ' ' + (startY + (size.height / 2)) + ' ' + 'L' + ' ' +
                    (startX + (-size.width / 2)) + ' ' + (startY) + 'z';
                pathOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](options['id'], options['fill'], border.width, border.color, opacity, '', path);
                markerEle = smithchart.renderer.drawPath(pathOptions);
                break;
            case 'pentagon':
                var eq = 72;
                for (var i = 0; i <= 5; i++) {
                    var xValue = radius * Math.cos((Math.PI / 180) * (i * eq));
                    var yValue = radius * Math.sin((Math.PI / 180) * (i * eq));
                    if (i === 0) {
                        path = 'M' + ' ' + (startX + xValue) + ' ' + (startY + yValue) + ' ';
                    }
                    else {
                        path = path.concat('L' + ' ' + (startX + xValue) + ' ' + (startY + yValue) + ' ');
                    }
                }
                path = path.concat('Z');
                pathOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](options['id'], options['fill'], border.width, border.color, opacity, '', path);
                markerEle = smithchart.renderer.drawPath(pathOptions);
                break;
        }
        return markerEle;
    };
    return Marker;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/series.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/series/series.js ***!
  \*****************************************************************************/
/*! exports provided: SeriesTooltipBorder, SeriesTooltip, SeriesMarkerBorder, SeriesMarkerDataLabelBorder, SeriesMarkerDataLabelConnectorLine, SeriesMarkerDataLabel, SeriesMarker, SmithchartSeries */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesTooltipBorder", function() { return SeriesTooltipBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesTooltip", function() { return SeriesTooltip; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerBorder", function() { return SeriesMarkerBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabelBorder", function() { return SeriesMarkerDataLabelBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabelConnectorLine", function() { return SeriesMarkerDataLabelConnectorLine; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesMarkerDataLabel", function() { return SeriesMarkerDataLabel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesMarker", function() { return SeriesMarker; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartSeries", function() { return SmithchartSeries; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
/* harmony import */ var _model_theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/theme */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/model/theme.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 SeriesTooltipBorder = /** @class */ (function (_super) {
    __extends(SeriesTooltipBorder, _super);
    function SeriesTooltipBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SeriesTooltipBorder.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SeriesTooltipBorder.prototype, "color", void 0);
    return SeriesTooltipBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SeriesTooltip = /** @class */ (function (_super) {
    __extends(SeriesTooltip, _super);
    function SeriesTooltip() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SeriesTooltip.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SeriesTooltip.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0.95)
    ], SeriesTooltip.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesTooltip.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SeriesTooltipBorder)
    ], SeriesTooltip.prototype, "border", void 0);
    return SeriesTooltip;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SeriesMarkerBorder = /** @class */ (function (_super) {
    __extends(SeriesMarkerBorder, _super);
    function SeriesMarkerBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], SeriesMarkerBorder.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('white')
    ], SeriesMarkerBorder.prototype, "color", void 0);
    return SeriesMarkerBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SeriesMarkerDataLabelBorder = /** @class */ (function (_super) {
    __extends(SeriesMarkerDataLabelBorder, _super);
    function SeriesMarkerDataLabelBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0.1)
    ], SeriesMarkerDataLabelBorder.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('white')
    ], SeriesMarkerDataLabelBorder.prototype, "color", void 0);
    return SeriesMarkerDataLabelBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SeriesMarkerDataLabelConnectorLine = /** @class */ (function (_super) {
    __extends(SeriesMarkerDataLabelConnectorLine, _super);
    function SeriesMarkerDataLabelConnectorLine() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SeriesMarkerDataLabelConnectorLine.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SeriesMarkerDataLabelConnectorLine.prototype, "color", void 0);
    return SeriesMarkerDataLabelConnectorLine;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SeriesMarkerDataLabel = /** @class */ (function (_super) {
    __extends(SeriesMarkerDataLabel, _super);
    function SeriesMarkerDataLabel() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SeriesMarkerDataLabel.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesMarkerDataLabel.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SeriesMarkerDataLabel.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SeriesMarkerDataLabel.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SeriesMarkerDataLabelBorder)
    ], SeriesMarkerDataLabel.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SeriesMarkerDataLabelConnectorLine)
    ], SeriesMarkerDataLabel.prototype, "connectorLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"].dataLabelFont, _utils_utils__WEBPACK_IMPORTED_MODULE_1__["SmithchartFont"])
    ], SeriesMarkerDataLabel.prototype, "textStyle", void 0);
    return SeriesMarkerDataLabel;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SeriesMarker = /** @class */ (function (_super) {
    __extends(SeriesMarker, _super);
    function SeriesMarker() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SeriesMarker.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('circle')
    ], SeriesMarker.prototype, "shape", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(6)
    ], SeriesMarker.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(6)
    ], SeriesMarker.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesMarker.prototype, "imageUrl", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SeriesMarker.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SeriesMarker.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SeriesMarkerBorder)
    ], SeriesMarker.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SeriesMarkerDataLabel)
    ], SeriesMarker.prototype, "dataLabel", void 0);
    return SeriesMarker;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SmithchartSeries = /** @class */ (function (_super) {
    __extends(SmithchartSeries, _super);
    function SmithchartSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('visible')
    ], SmithchartSeries.prototype, "visibility", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], SmithchartSeries.prototype, "points", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SmithchartSeries.prototype, "resistance", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SmithchartSeries.prototype, "reactance", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SmithchartSeries.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SmithchartSeries.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SmithchartSeries.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SmithchartSeries.prototype, "enableAnimation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('2000ms')
    ], SmithchartSeries.prototype, "animationDuration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SmithchartSeries.prototype, "enableSmartLabels", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SmithchartSeries.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SmithchartSeries.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SeriesMarker)
    ], SmithchartSeries.prototype, "marker", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SeriesTooltip)
    ], SmithchartSeries.prototype, "tooltip", void 0);
    return SmithchartSeries;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/seriesrender.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/series/seriesrender.js ***!
  \***********************************************************************************/
/*! exports provided: SeriesRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeriesRender", function() { return SeriesRender; });
/* harmony import */ var _marker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./marker */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/marker.js");
/* harmony import */ var _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../smithchart/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js");
/* harmony import */ var _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../smithchart/utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
/* harmony import */ var _smithchart_model_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../smithchart/model/constant */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/model/constant.js");
/* harmony import */ var _smithchart_series_datalabel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../smithchart/series/datalabel */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/datalabel.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");







/* tslint:disable:no-string-literal */
var SeriesRender = /** @class */ (function () {
    function SeriesRender() {
        this.xValues = [];
        this.yValues = [];
        this.pointsRegion = [];
        this.lineSegments = [];
        this.location = [];
        this.dataLabel = new _smithchart_series_datalabel__WEBPACK_IMPORTED_MODULE_4__["DataLabel"]();
    }
    SeriesRender.prototype.processData = function (series) {
        var dataArray = series.dataSource;
        var resistance = series.resistance;
        var reactance = series.reactance;
        series.points = [];
        for (var i = 0; i < dataArray.length; i++) {
            series.points.push({ resistance: dataArray[i][resistance],
                reactance: dataArray[i][reactance] });
        }
    };
    // tslint:disable:max-func-body-length
    SeriesRender.prototype.draw = function (smithchart, axisRender, bounds) {
        var groupElement = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' + '_seriesCollections' });
        var resistantCx;
        var reactanceCy;
        var series = smithchart.series;
        var seriesLength = series.length;
        var chartAreaRadius = axisRender.areaRadius;
        var interSectPoint;
        var index;
        for (var m = 0; m < seriesLength; m++) {
            var seriesIndex = m;
            if (series[m].dataSource && series[m].resistance && series[m].reactance) {
                this.processData(series[m]);
            }
            this.pointsRegion[m] = [];
            this.location[m] = [];
            for (var j = 0; j < series[m].points.length; j++) {
                this.xValues[j] = series[m].points[j]['resistance'];
                this.yValues[j] = series[m].points[j]['reactance'];
            }
            var chartAreaCx = axisRender.circleCenterX;
            var chartAreaCy = axisRender.circleCenterY;
            var diameter = axisRender.areaRadius * 2;
            var reactanceStartPoint = { x: chartAreaCx + ((smithchart.renderType === 'Impedance') ?
                    chartAreaRadius : -chartAreaRadius), y: chartAreaCy };
            var resistantCy = chartAreaCy;
            var reactanceCx = reactanceStartPoint.x;
            for (var k = 0; k < series[m].points.length; k++) {
                var resistance = this.xValues[k];
                var resistantR = (diameter * (1 / (resistance + 1))) / 2;
                var reactance = this.yValues[k];
                var reactanceR = Math.abs(((1 / reactance) * diameter) / 2);
                if (smithchart.renderType === 'Impedance') {
                    reactanceCy = reactance > 0 ? chartAreaCy - reactanceR : chartAreaCy + reactanceR;
                    resistantCx = (axisRender.circleLeftX + diameter - resistantR);
                }
                else {
                    reactanceCy = reactance < 0 ? chartAreaCy - reactanceR : chartAreaCy + reactanceR;
                    resistantCx = (axisRender.circleLeftX + resistantR);
                }
                interSectPoint = axisRender.intersectingCirclePoints(reactanceCx, reactanceCy, reactanceR, resistantCx, resistantCy, resistantR, smithchart.renderType);
                var epsilon = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["_getEpsilonValue"])();
                if (Math.abs(reactance) < epsilon) {
                    interSectPoint.x = (smithchart.renderType === 'Impedance') ?
                        resistantCx - resistantR : resistantCx + resistantR;
                    interSectPoint.y = chartAreaCy;
                }
                this.pointsRegion[m][k] = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["PointRegion"]();
                this.pointsRegion[m][k] = { point: interSectPoint, x: resistance, y: reactance };
                this.location[m][k] = { x: interSectPoint.x, y: interSectPoint.y };
            }
            for (var i = 0; i < series[m].points.length - 1; i++) {
                index = i + 1;
                this.lineSegments[i] = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["LineSegment"]();
                this.lineSegments[i] = { x1: this.xValues[i], y1: this.yValues[i], x2: this.xValues[index], y2: this.yValues[index] };
            }
            smithchart.svgObject.appendChild(groupElement);
            this.drawSeries(smithchart, seriesIndex, groupElement, bounds);
        }
        for (var j = 0; j < smithchart.series.length; j++) {
            if (smithchart.series[j].enableSmartLabels && smithchart.series[j].marker.dataLabel.visible) {
                var gdlcEle = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg'
                        + '_series' + j + '_Datalabel' + '_connectorLines' });
                var element = document.getElementById(smithchart.element.id + '_svg' + '_seriesCollection' + j);
                if (element) {
                    element.appendChild(gdlcEle);
                }
                this.dataLabel.calculateSmartLabels(this.dataLabel.labelOptions[j], j);
                for (var k = 0; k < smithchart.series[j].points.length; k++) {
                    var currentPoint = this.dataLabel.labelOptions[j]['textOptions'][k];
                    if ((currentPoint.xPosition + currentPoint.width) > (smithchart.chartArea.x + smithchart.chartArea.width)
                        || currentPoint.xPosition < smithchart.chartArea.x || currentPoint.yPosition < smithchart.chartArea.y ||
                        currentPoint.yPosition + currentPoint.height > smithchart.chartArea.y + smithchart.chartArea.height) {
                        this.dataLabel.labelOptions[j].textOptions[k].connectorFlag = false;
                        this.dataLabel.labelOptions[j].textOptions[k].visible = false;
                    }
                    if (currentPoint['connectorFlag']) {
                        this.dataLabel.drawConnectorLines(smithchart, j, k, currentPoint, gdlcEle);
                    }
                }
            }
        }
        for (var j = 0; j < smithchart.series.length; j++) {
            var dataLabel = smithchart.series[j].marker.dataLabel;
            if (smithchart.series[j].marker.dataLabel.visible) {
                var element = document.getElementById(smithchart.element.id + '_svg' + '_seriesCollection' + j);
                var gdEle = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg'
                        + '_series' + j + '_Datalabel' });
                if (element) {
                    element.appendChild(gdEle);
                }
                for (var k = 0; k < smithchart.series[j].points.length; k++) {
                    var currentPoint = this.dataLabel.labelOptions[j]['textOptions'][k];
                    if (!dataLabel.template && currentPoint.visible) {
                        var options = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["DataLabelTextOptions"]();
                        options = this.dataLabel.labelOptions[j]['textOptions'][k];
                        var font = dataLabel.textStyle;
                        var x = options['xPosition'];
                        var y = options['yPosition'];
                        var id = smithchart.element.id + '_Series' + j + '_Points' + k + '_dataLabel' + '_symbol' + k;
                        var fill = dataLabel['fill'] ? dataLabel['fill'] : (smithchart.series[j].fill ||
                            smithchart.seriesColors[j % smithchart.seriesColors.length]);
                        var border = smithchart.series[j].marker.dataLabel.border;
                        var rectOptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](id, fill, border, options['opacity'], new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["SmithchartRect"](x, y, options['width'], options['height']));
                        var dataEle = smithchart.renderer.drawRectangle(rectOptions);
                        gdEle.appendChild(dataEle);
                        var textRenderEventArgs = { text: options['text'], x: options['x'], y: options['y'], seriesIndex: j,
                            pointIndex: k, name: 'textRender', cancel: false };
                        smithchart.trigger('textRender', textRenderEventArgs);
                        var textoptions = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["TextOption"](options['id'], textRenderEventArgs.x, textRenderEventArgs.y, 'start', textRenderEventArgs.text);
                        var color = font.color ? font.color : smithchart.themeStyle.dataLabel;
                        var element_1 = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["renderTextElement"])(textoptions, font, color, gdEle);
                        gdEle.appendChild(element_1);
                    }
                    else if (dataLabel.template) {
                        var element_2 = document.getElementById(dataLabel.template + '_seriesIndex' + j + '_pointIndex' +
                            k + smithchart.element.id);
                        element_2.style.left = this.dataLabel.labelOptions[j]['textOptions'][k].xPosition + 'px';
                        element_2.style.top = this.dataLabel.labelOptions[j]['textOptions'][k].yPosition + 'px';
                    }
                }
            }
        }
        for (var i = 0; i < smithchart.series.length; i++) {
            if (smithchart.series[i].enableAnimation && smithchart.animateSeries) {
                if (smithchart.series[i].marker.dataLabel.template) {
                    this.animateDataLabelTemplate(i, smithchart);
                }
                var element = document.getElementById(smithchart.element.id + '_svg' + '_seriesCollection' + i);
                this.performAnimation(smithchart, element, i);
            }
        }
    };
    SeriesRender.prototype.drawSeries = function (smithchart, seriesindex, groupElement, bounds) {
        var gsEle = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' + '_seriesCollection' + seriesindex,
            'clip-path': 'url(#' + smithchart.element.id + '_ChartSeriesClipRect_' +
                seriesindex + ')' });
        gsEle.setAttribute('visibility', smithchart.series[seriesindex].visibility);
        groupElement.appendChild(gsEle);
        var sb = '';
        var path;
        var marker = smithchart.series[seriesindex].marker;
        var element;
        var count = smithchart.series[seriesindex].points.length - 1;
        for (var i = 0; i < count; i++) {
            var point1 = this.pointsRegion[seriesindex][i]['point'];
            var point2 = this.pointsRegion[seriesindex][i + 1]['point'];
            sb = sb + ('M' + ' ' + (point1.x) + ' ' + (point1.y) + ' ' + 'L' +
                ' ' + (point2.x) + ' ' + (point2.y) + ' ');
        }
        path = sb.toString();
        var fill = smithchart.series[seriesindex].fill || smithchart.seriesColors[seriesindex % smithchart.seriesColors.length];
        var seriesEventArgs = { text: smithchart.series[seriesindex].name, fill: fill,
            name: 'seriesRender', cancel: false };
        smithchart.trigger('seriesRender', seriesEventArgs);
        var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["PathOption"](smithchart.element.id + '_series' + seriesindex + '_points', 'none', smithchart.series[seriesindex].width, seriesEventArgs.fill, smithchart.series[seriesindex].opacity, 'none', path);
        this.clipRectElement = smithchart.renderer.drawClipPath(new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](smithchart.element.id + '_ChartSeriesClipRect_' + seriesindex, 'transparent', { width: 1, color: 'Gray' }, 1, {
            x: bounds.x, y: bounds.y,
            width: smithchart.availableSize.width,
            height: smithchart.availableSize.height
        }));
        gsEle.appendChild(this.clipRectElement);
        var gspEle = smithchart.renderer.createGroup({ 'id': smithchart.element.id + '_svg' + seriesindex });
        element = smithchart.renderer.drawPath(options);
        gspEle.appendChild(element);
        gsEle.appendChild(gspEle);
        var markerrender = new _marker__WEBPACK_IMPORTED_MODULE_0__["Marker"]();
        markerrender.drawMarker(smithchart, seriesindex, gsEle, this.pointsRegion[seriesindex]);
        this.dataLabel.drawDataLabel(smithchart, seriesindex, gsEle, this.pointsRegion[seriesindex], bounds);
    };
    SeriesRender.prototype.animateDataLabelTemplate = function (seriesindex, smithchart) {
        var length = smithchart.series[seriesindex].points.length;
        var opacity = 0;
        var delay = 0;
        var duration = parseFloat(smithchart.series[seriesindex].animationDuration);
        for (var i = 0; i < length; i++) {
            var element = document.getElementById(smithchart.series[seriesindex].marker.dataLabel.template +
                '_seriesIndex' + seriesindex + '_pointIndex' + i + smithchart.element.id);
            element.style.visibility = 'hidden';
            Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["templateAnimate"])(smithchart, element, delay, duration, 'FadeIn');
            // this.fadein(element);
        }
    };
    /*private fadein(element: HTMLElement): void {
      let op: number = 0.1;
      element.style.display = 'block';
      let timer: number = setInterval( (): void => {
            if (op >= 1) {
                clearInterval(timer);
            }
            element.style.opacity = op.toString();
            element.style.filter = 'alpha(opacity=' + op * 100 + ')';
            op += op * 0.1;
    }, 50);
    
    }*/
    SeriesRender.prototype.performAnimation = function (smithchart, gsEle, seriesIndex) {
        var animation = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["Animation"]({});
        var element = document.getElementById('container_svg_seriesCollections');
        var clipRect = gsEle.childNodes[0].childNodes[0].childNodes[0];
        var effect = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getAnimationFunction"])('Linear');
        var reveffect = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getAnimationFunction"])('Reverse');
        var width = +clipRect.getAttribute('width');
        var x = +clipRect.getAttribute('x');
        var value;
        animation.animate(clipRect, {
            duration: parseFloat(smithchart.series[seriesIndex].animationDuration),
            progress: function (args) {
                if (smithchart.renderType === 'Impedance') {
                    value = effect(args.timeStamp - args.delay, 0, width, args.duration);
                    clipRect.setAttribute('width', value.toString());
                }
                else {
                    value = reveffect(args.timeStamp - args.delay, width, 0, args.duration);
                    clipRect.setAttribute('x', value.toString());
                }
            },
            end: function (model) {
                if (smithchart.renderType === 'Impedance') {
                    clipRect.setAttribute('width', width.toString());
                }
                else {
                    clipRect.setAttribute('x', x.toString());
                }
                var event = {
                    cancel: false, name: _smithchart_model_constant__WEBPACK_IMPORTED_MODULE_3__["animationComplete"], smithchart: smithchart
                };
                var blazorEvent = {
                    cancel: false, name: _smithchart_model_constant__WEBPACK_IMPORTED_MODULE_3__["animationComplete"], smithchart: smithchart
                };
                smithchart.trigger(_smithchart_model_constant__WEBPACK_IMPORTED_MODULE_3__["animationComplete"], smithchart.isBlazor ? blazorEvent : event);
            }
        });
    };
    SeriesRender.prototype.getLocation = function (seriesindex, pointIndex) {
        var x;
        var y;
        x = this.location[seriesindex][pointIndex].x;
        y = this.location[seriesindex][pointIndex].y;
        return { x: x, y: y };
    };
    return SeriesRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/tooltip.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/series/tooltip.js ***!
  \******************************************************************************/
/*! exports provided: TooltipRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipRender", function() { return TooltipRender; });
/* harmony import */ var _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../smithchart/utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");



/**
 * To render tooltip
 */
var TooltipRender = /** @class */ (function () {
    function TooltipRender() {
    }
    TooltipRender.prototype.smithchartMouseMove = function (smithchart, e) {
        var touchArg;
        var pageX;
        var pageY;
        if (e.type === 'touchend' || e.type === 'touchmove') {
            touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            pageY = touchArg.changedTouches[0].clientY;
            this.tooltipElement = undefined;
        }
        else {
            pageY = e.clientY;
            pageX = e.clientX;
        }
        this.setMouseXY(smithchart, pageX, pageY);
        for (var i = 0; i < smithchart.series.length; i++) {
            var series = smithchart.series[i];
            var seriesIndex = i;
            var closestPoint = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_0__["ClosestPoint"]();
            closestPoint = this.closestPointXY(smithchart, this.mouseX, this.mouseY, series, seriesIndex);
            if (closestPoint.location && series.tooltip.visible && series.visibility === 'visible') {
                this.createTooltip(smithchart, e, closestPoint.index, seriesIndex, series);
                break;
            }
            else if (this.tooltipElement && this.tooltipElement.enable && !series.tooltip.template) {
                this.tooltipElement.fadeOut();
                this.tooltipElement.enable = false;
            }
            else if (series.tooltip.template) {
                this.tooltipElement.fadeOut();
            }
        }
        return this.tooltipElement;
    };
    TooltipRender.prototype.setMouseXY = function (smithchart, pageX, pageY) {
        var rect = smithchart.element.getBoundingClientRect();
        var svgRect = document.getElementById(smithchart.element.id + '_svg').getBoundingClientRect();
        this.mouseX = (pageX - rect.left) - Math.max(svgRect.left - rect.left, 0);
        this.mouseY = (pageY - rect.top) - Math.max(svgRect.top - rect.top, 0);
    };
    TooltipRender.prototype.createTooltip = function (smithchart, e, pointindex, seriesindex, series) {
        var pointX = series.points[pointindex].resistance;
        var pointY = series.points[pointindex].reactance;
        var tooltipText = [pointX + ' ' + ':' + ' ' + '<b>' + pointY + '</b>'];
        var markerHeight = smithchart.series[seriesindex].marker.height / 2;
        var div = document.getElementById(smithchart.element.id + '_smithchart_tooltip_div');
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(div)) {
            div = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["createElement"])('div', { id: smithchart.element.id + '_smithchart_tooltip_div',
                styles: 'pointer-events: none; position: absolute;z-index:1;' });
            document.getElementById(smithchart.element.id + '_Secondary_Element').appendChild(div);
        }
        this.tooltipElement = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Tooltip"]({
            enable: true,
            header: '<b>' + series.name + '</b>',
            content: tooltipText,
            border: series.tooltip.border,
            fill: smithchart.themeStyle.tooltipFill,
            data: { reactance: pointY },
            template: series.tooltip.template,
            location: { x: this.locationX + smithchart.element.offsetLeft,
                y: this.locationY - markerHeight + smithchart.element.offsetTop },
            shared: false,
            areaBounds: new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_0__["SmithchartRect"](smithchart.bounds.x, smithchart.bounds.y, smithchart.bounds.width, smithchart.bounds.height),
            palette: [series.fill || smithchart.seriesColors[seriesindex % smithchart.seriesColors.length]],
            shapes: ['Circle'],
            availableSize: smithchart.availableSize,
            theme: smithchart.theme
        });
        this.tooltipElement.opacity = smithchart.themeStyle.tooltipFillOpacity || this.tooltipElement.opacity;
        this.tooltipElement.textStyle.fontFamily = smithchart.themeStyle.fontFamily || 'Roboto, Segoe UI, Noto, Sans-serif';
        this.tooltipElement.textStyle.opacity = smithchart.themeStyle.tooltipTextOpacity || this.tooltipElement.textStyle.opacity;
        this.tooltipElement.appendTo(div);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["updateBlazorTemplate"])(div.id + 'Template', 'Template');
    };
    TooltipRender.prototype.closestPointXY = function (smithchart, x, y, series, seriesindex) {
        var pointIndex;
        var chartPoint;
        var closePoint;
        for (var j = 0; j < series.points.length; j++) {
            chartPoint = smithchart.seriesrender.getLocation(seriesindex, j);
            this.locationX = chartPoint.x;
            this.locationY = chartPoint.y;
            pointIndex = j;
            var a = x - chartPoint.x;
            var b = y - chartPoint.y;
            var distance = Math.abs(Math.sqrt((a * a) + (b * b)));
            if (distance < series.marker.width) {
                closePoint = chartPoint;
                pointIndex = j;
                break;
            }
        }
        return { location: closePoint, index: pointIndex };
    };
    /**
     * Get module name.
     */
    TooltipRender.prototype.getModuleName = function () {
        return 'TooltipRender';
    };
    /**
     * To destroy the legend.
     * @return {void}
     * @private
     */
    TooltipRender.prototype.destroy = function (smithchart) {
        /**
         * Destroy method performed here
         */
    };
    return TooltipRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/smithchart.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/smithchart.js ***!
  \**************************************************************************/
/*! exports provided: Smithchart */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Smithchart", function() { return Smithchart; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../smithchart/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js");
/* harmony import */ var _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../smithchart/utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
/* harmony import */ var _smithchart_model_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../smithchart/model/theme */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/model/theme.js");
/* harmony import */ var _smithchart_legend_legend__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../smithchart/legend/legend */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/legend/legend.js");
/* harmony import */ var _smithchart_axis_axis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../smithchart/axis/axis */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/axis/axis.js");
/* harmony import */ var _smithchart_title_title__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../smithchart/title/title */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/title/title.js");
/* harmony import */ var _smithchart_series_series__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../smithchart/series/series */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/series.js");
/* harmony import */ var _smithchart_utils_area__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../smithchart/utils/area */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/area.js");
/* harmony import */ var _smithchart_axis_axisrender__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../smithchart/axis/axisrender */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/axis/axisrender.js");
/* harmony import */ var _smithchart_series_seriesrender__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../smithchart/series/seriesrender */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/series/seriesrender.js");
/* harmony import */ var _smithchart_utils_export__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../smithchart/utils/export */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/export.js");
/* harmony import */ var _smithchart_model_constant__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../smithchart/model/constant */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/model/constant.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};



















/* tslint:disable:no-string-literal */
/**
 * Represents the Smithchart control.
 * ```html
 * <div id="smithchart"/>
 * <script>
 *   var chartObj = new Smithchart({ isResponsive : true });
 *   chartObj.appendTo("#smithchart");
 * </script>
 * ```
 */
var Smithchart = /** @class */ (function (_super) {
    __extends(Smithchart, _super);
    /**
     * Constructor for creating the Smithchart widget
     */
    function Smithchart(options, element) {
        return _super.call(this, options, element) || this;
    }
    /**
     * Get component name
     */
    Smithchart.prototype.getModuleName = function () {
        return 'smithchart';
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @private
     */
    Smithchart.prototype.getPersistData = function () {
        return '';
    };
    /**
     * Method to create SVG element.
     */
    Smithchart.prototype.createChartSvg = function () {
        this.removeSvg();
        Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["createSvg"])(this);
    };
    Smithchart.prototype.renderTitle = function (title, type, groupEle) {
        var font = title.font ? title.font : title.textStyle;
        var textSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["measureText"])(title.text, font);
        var x;
        var y;
        var textAlignment = title.textAlignment;
        var titleText = title.text;
        var maxTitleWidth = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(title.maximumWidth)) ?
            Math.abs(this.margin.left + this.margin.right - (this.availableSize.width)) :
            title.maximumWidth;
        var titleWidthEnable = textSize.width > maxTitleWidth ? true : false;
        if (textSize.width > this.availableSize.width) {
            x = this.margin.left + this.border.width;
        }
        else {
            x = textAlignment === 'Center' ? (this.availableSize.width / 2 - textSize['width'] / 2) :
                (textAlignment === 'Near' ? (this.margin.left + this.elementSpacing + this.border.width) : (this.availableSize.width
                    - textSize['width'] - (this.margin.right + this.elementSpacing + this.border.width)));
        }
        y = this.margin.top + textSize['height'] / 2 + this.elementSpacing;
        if (title.enableTrim && titleWidthEnable) {
            titleText = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textTrim"])(maxTitleWidth, title.text, font);
            textSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["measureText"])(titleText, font);
        }
        groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
        var titleEventArgs = { text: titleText, x: x, y: y, name: 'titleRender', cancel: false };
        this.trigger(_smithchart_model_constant__WEBPACK_IMPORTED_MODULE_12__["titleRender"], titleEventArgs);
        var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["TextOption"](this.element.id + '_Smithchart_' + type, titleEventArgs.x, titleEventArgs.y, 'start', titleEventArgs.text);
        font.fontFamily = this.themeStyle.fontFamily || title.textStyle.fontFamily;
        font.size = this.themeStyle.fontSize || title.textStyle.size;
        var element = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["renderTextElement"])(options, font, this.themeStyle.chartTitle, groupEle);
        element.setAttribute('aria-label', title.description || title.text);
        var titleLocation = { x: x, y: y, textSize: textSize };
        this.svgObject.appendChild(groupEle);
        if (title.subtitle.text !== '' && title.subtitle.visible) {
            this.renderSubtitle(title, type, textSize, this.availableSize, titleLocation, groupEle);
        }
    };
    Smithchart.prototype.renderSubtitle = function (title, type, textSize, size, titleLocation, groupEle) {
        var x;
        var y;
        var font = title.subtitle.textStyle;
        var subTitle = title.subtitle;
        var subTitleSize = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["measureText"])(subTitle.text, font);
        var textAnchor;
        var subTitleText = subTitle.text;
        var maxSubTitleWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(subTitle.maximumWidth) ?
            (this.bounds.width * 0.75) : subTitle.maximumWidth;
        if (subTitle.enableTrim && subTitleSize.width > maxSubTitleWidth) {
            subTitleText = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textTrim"])(maxSubTitleWidth, subTitle.text, font);
        }
        x = title['subtitle'].textAlignment === 'Far' ? (titleLocation.x + (titleLocation.textSize.width)) :
            (title['subtitle'].textAlignment === 'Near') ? titleLocation.x :
                (titleLocation.x + (titleLocation.textSize.width / 2));
        y = titleLocation.y + (2 * this.elementSpacing);
        textAnchor = title['subtitle'].textAlignment === 'Far' ? 'end' :
            (title['subtitle'].textAlignment === 'Near') ? 'start' : 'middle';
        var subtitleEventArgs = { text: subTitleText, x: x, y: y, name: 'subtitleRender', cancel: false };
        this.trigger(_smithchart_model_constant__WEBPACK_IMPORTED_MODULE_12__["subtitleRender"], subtitleEventArgs);
        var options = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["TextOption"](this.element.id + '_Smithchart_' + type, subtitleEventArgs.x, subtitleEventArgs.y, textAnchor, subtitleEventArgs.text);
        var element = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["renderTextElement"])(options, font, this.themeStyle.chartTitle, groupEle);
        element.setAttribute('aria-label', subTitle.description || subTitle.text);
        groupEle.appendChild(element);
    };
    /**
     * @private
     * Render the smithchart border
     */
    Smithchart.prototype.renderBorder = function () {
        var border = this.border;
        var color = this.theme.toLowerCase() === 'highcontrast' ? '#000000' : '#FFFFFF';
        this.background = this.background ? this.background : this.themeStyle.background;
        var borderRect = new _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](this.element.id + '_SmithchartBorder', this.background, border, 1, new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["SmithchartRect"](border.width / 2, border.width / 2, this.availableSize.width - border.width, this.availableSize.height - border.width));
        this.svgObject.appendChild(this.renderer.drawRectangle(borderRect));
    };
    /**
     * Called internally if any of the property value changed.
     * @private
     */
    Smithchart.prototype.onPropertyChanged = function (newProp, oldProp) {
        this.animateSeries = false;
        var renderer = false;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'background':
                    renderer = true;
                    break;
                case 'size':
                    this.createChartSvg();
                    renderer = true;
                    break;
                case 'theme':
                    this.animateSeries = true;
                    renderer = true;
                    break;
                case 'border':
                    renderer = true;
                    break;
            }
        }
        if (renderer) {
            this.render();
        }
    };
    /**
     * Initialize the event handler.
     */
    Smithchart.prototype.preRender = function () {
        var blazor = 'Blazor';
        this.isBlazor = window[blazor];
        this.trigger('load', { smithchart: this });
        this.unWireEVents();
        this.initPrivateVariable();
        this.wireEVents();
    };
    Smithchart.prototype.initPrivateVariable = function () {
        this.animateSeries = true;
    };
    /**
     * To Initialize the control rendering.
     */
    Smithchart.prototype.setTheme = function () {
        /*! Set theme */
        this.themeStyle = Object(_smithchart_model_theme__WEBPACK_IMPORTED_MODULE_3__["getThemeColor"])(this.theme);
        this.seriesColors = Object(_smithchart_model_theme__WEBPACK_IMPORTED_MODULE_3__["getSeriesColor"])(this.theme);
        // let count: number = colors.length;
        // for (let i: number = 0; i < this.series.length; i++) {
        //     this.series[i].fill = this.series[i].fill ? this.series[i].fill : colors[i % count];
        // }
    };
    Smithchart.prototype.render = function () {
        this.createChartSvg();
        this.element.appendChild(this.svgObject);
        this.setTheme();
        this.createSecondaryElement();
        this.renderBorder();
        if (this.smithchartLegendModule && this.legendSettings.visible) {
            this.legendBounds = this.smithchartLegendModule.renderLegend(this);
        }
        this.legendBounds = this.legendBounds ? this.legendBounds : { x: 0, y: 0, width: 0, height: 0 };
        var areaBounds = new _smithchart_utils_area__WEBPACK_IMPORTED_MODULE_8__["AreaBounds"]();
        this.bounds = areaBounds.calculateAreaBounds(this, this.title, this.legendBounds);
        if (this.title.text !== '' && this.title.visible) {
            this.renderTitle(this.title, 'title', null);
        }
        var axisRender = new _smithchart_axis_axisrender__WEBPACK_IMPORTED_MODULE_9__["AxisRender"]();
        axisRender.renderArea(this, this.bounds);
        this.seriesrender = new _smithchart_series_seriesrender__WEBPACK_IMPORTED_MODULE_10__["SeriesRender"]();
        this.seriesrender.draw(this, axisRender, this.bounds);
        this.trigger('loaded', this.isBlazor ? {} : { smithchart: this });
    };
    Smithchart.prototype.createSecondaryElement = function () {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(document.getElementById(this.element.id + '_Secondary_Element'))) {
            var secondaryElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
                id: this.element.id + '_Secondary_Element',
                styles: 'position: absolute;z-index:1;'
            });
            this.element.appendChild(secondaryElement);
            var rect = this.element.getBoundingClientRect();
            var svgRect = document.getElementById(this.element.id + '_svg');
            if (svgRect) {
                var svgClientRect = svgRect.getBoundingClientRect();
                secondaryElement.style.left = Math.max(svgClientRect.left - rect.left, 0) + 'px';
                secondaryElement.style.top = Math.max(svgClientRect.top - rect.top, 0) + 'px';
            }
        }
        else {
            Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.element.id + '_Secondary_Element');
        }
    };
    /**
     * To destroy the widget
     * @method destroy
     * @return {void}.
     * @member of smithChart
     */
    Smithchart.prototype.destroy = function () {
        this.unWireEVents();
        _super.prototype.destroy.call(this);
        this.element.classList.remove('e-smithchart');
    };
    /**
     * To bind event handlers for smithchart.
     */
    Smithchart.prototype.wireEVents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.smithchartOnClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMove, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseEnd, this);
        window.addEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.smithchartOnResize.bind(this));
    };
    Smithchart.prototype.mouseMove = function (e) {
        if (e.type === 'touchmove') {
            this.isTouch = true;
        }
        else {
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2' || this.isTouch;
        }
        if (this.tooltipRenderModule && !this.isTouch) {
            this.tooltipRenderModule.smithchartMouseMove(this, e);
        }
    };
    Smithchart.prototype.mouseEnd = function (e) {
        if (e.type === 'touchend') {
            this.isTouch = true;
        }
        else {
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2';
        }
        if (this.tooltipRenderModule && this.isTouch) {
            var tooltipElement_1 = this.tooltipRenderModule.smithchartMouseMove(this, e);
            if (tooltipElement_1) {
                this.fadeoutTo = setTimeout(function () {
                    tooltipElement_1.fadeOut();
                }, 2000);
            }
        }
    };
    /**
     * To handle the click event for the smithchart.
     */
    /* tslint:disable:no-string-literal */
    Smithchart.prototype.smithchartOnClick = function (e) {
        var targetEle = e.target;
        var targetId = targetEle.id;
        var parentElement = document.getElementById(targetId).parentElement;
        var grpElement = document.getElementById(parentElement.id).parentElement;
        if (grpElement.id === 'containerlegendItem_Group' && this.legendSettings.toggleVisibility) {
            var childElement = parentElement.childNodes[1];
            var circleElement = parentElement.childNodes[0];
            var legendText = childElement.textContent;
            var seriesIndex = void 0;
            var fill = void 0;
            for (var i = 0; i < this.smithchartLegendModule.legendSeries.length; i++) {
                if (legendText === this.smithchartLegendModule.legendSeries[i]['text']) {
                    seriesIndex = this.smithchartLegendModule.legendSeries[i].seriesIndex;
                    fill = this.smithchartLegendModule.legendSeries[i].fill;
                }
            }
            var seriesElement = document.getElementById(this.element.id + '_svg' + '_seriesCollection' + seriesIndex);
            if (seriesElement.getAttribute('visibility') === 'visible') {
                circleElement.setAttribute('fill', 'gray');
                seriesElement.setAttribute('visibility', 'hidden');
                this.series[seriesIndex].visibility = 'hidden';
            }
            else {
                circleElement.setAttribute('fill', fill);
                seriesElement.setAttribute('visibility', 'visible');
                this.series[seriesIndex].visibility = 'visible';
            }
        }
    };
    /**
     * To unbind event handlers from smithchart.
     */
    Smithchart.prototype.unWireEVents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.smithchartOnClick);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.mouseMove);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseEnd);
        window.removeEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.smithchartOnResize);
    };
    Smithchart.prototype.print = function (id) {
        var exportChart = new _smithchart_utils_export__WEBPACK_IMPORTED_MODULE_11__["ExportUtils"](this);
        exportChart.print(id);
    };
    /**
     * Handles the export method for chart control.
     * @param type
     * @param fileName
     */
    Smithchart.prototype.export = function (type, fileName, orientation) {
        var exportMap = new _smithchart_utils_export__WEBPACK_IMPORTED_MODULE_11__["ExportUtils"](this);
        exportMap.export(type, fileName, orientation);
    };
    /**
     * To handle the window resize event on smithchart.
     */
    Smithchart.prototype.smithchartOnResize = function (e) {
        var _this = this;
        this.animateSeries = false;
        if (this.resizeTo) {
            clearTimeout(this.resizeTo);
        }
        this.resizeTo = setTimeout(function () {
            _this.render();
        }, 500);
        return false;
    };
    /**
     * To provide the array of modules needed for smithchart rendering
     * @return {ModuleDeclaration[]}
     * @private
     */
    Smithchart.prototype.requiredModules = function () {
        var modules = [];
        if (this.legendSettings.visible) {
            modules.push({
                member: 'SmithchartLegend',
                args: [this]
            });
        }
        for (var i = 0; i < this.series.length; i++) {
            if (this.series[i].tooltip.visible) {
                modules.push({
                    member: 'TooltipRender',
                    args: [this]
                });
                break;
            }
        }
        return modules;
    };
    /**
     * To Remove the SVG.
     * @return {boolean}
     * @private
     */
    Smithchart.prototype.removeSvg = function () {
        Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(this.element.id + '_Secondary_Element');
        var removeLength = 0;
        if (this.svgObject) {
            while (this.svgObject.childNodes.length > removeLength) {
                this.svgObject.removeChild(this.svgObject.firstChild);
            }
            if (!this.svgObject.hasChildNodes() && this.svgObject.parentNode) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.svgObject);
            }
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Impedance')
    ], Smithchart.prototype, "renderType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Smithchart.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Smithchart.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Material')
    ], Smithchart.prototype, "theme", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["SmithchartMargin"])
    ], Smithchart.prototype, "margin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["SmithchartFont"])
    ], Smithchart.prototype, "font", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["SmithchartBorder"])
    ], Smithchart.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _smithchart_title_title__WEBPACK_IMPORTED_MODULE_6__["Title"])
    ], Smithchart.prototype, "title", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _smithchart_series_series__WEBPACK_IMPORTED_MODULE_7__["SmithchartSeries"])
    ], Smithchart.prototype, "series", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _smithchart_legend_legend__WEBPACK_IMPORTED_MODULE_4__["SmithchartLegendSettings"])
    ], Smithchart.prototype, "legendSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _smithchart_axis_axis__WEBPACK_IMPORTED_MODULE_5__["SmithchartAxis"])
    ], Smithchart.prototype, "horizontalAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _smithchart_axis_axis__WEBPACK_IMPORTED_MODULE_5__["SmithchartAxis"])
    ], Smithchart.prototype, "radialAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Smithchart.prototype, "background", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], Smithchart.prototype, "elementSpacing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Smithchart.prototype, "radius", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "beforePrint", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "animationComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "load", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "loaded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "legendRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "titleRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "subtitleRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "textRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "axisLabelRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Smithchart.prototype, "seriesRender", void 0);
    Smithchart = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Smithchart);
    return Smithchart;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/title/title.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/title/title.js ***!
  \***************************************************************************/
/*! exports provided: Subtitle, Title */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subtitle", function() { return Subtitle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Title", function() { return Title; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
/* harmony import */ var _model_theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/theme */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/model/theme.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 Subtitle = /** @class */ (function (_super) {
    __extends(Subtitle, _super);
    function Subtitle() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Subtitle.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Subtitle.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Subtitle.prototype, "description", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Far')
    ], Subtitle.prototype, "textAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Subtitle.prototype, "enableTrim", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Subtitle.prototype, "maximumWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"].smithchartSubtitleFont, _utils_utils__WEBPACK_IMPORTED_MODULE_1__["SmithchartFont"])
    ], Subtitle.prototype, "textStyle", void 0);
    return Subtitle;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var Title = /** @class */ (function (_super) {
    __extends(Title, _super);
    function Title() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Title.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Title.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Title.prototype, "description", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], Title.prototype, "textAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Title.prototype, "enableTrim", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Title.prototype, "maximumWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, Subtitle)
    ], Title.prototype, "subtitle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"].smithchartTitleFont, _utils_utils__WEBPACK_IMPORTED_MODULE_1__["SmithchartFont"])
    ], Title.prototype, "font", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_model_theme__WEBPACK_IMPORTED_MODULE_2__["Theme"].smithchartTitleFont, _utils_utils__WEBPACK_IMPORTED_MODULE_1__["SmithchartFont"])
    ], Title.prototype, "textStyle", void 0);
    return Title;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/area.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/area.js ***!
  \**************************************************************************/
/*! exports provided: AreaBounds */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AreaBounds", function() { return AreaBounds; });
/* harmony import */ var _smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../smithchart/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js");

/* tslint:disable:no-string-literal */
var AreaBounds = /** @class */ (function () {
    function AreaBounds() {
    }
    AreaBounds.prototype.calculateAreaBounds = function (smithchart, title, bounds) {
        var x;
        var y;
        var width;
        var height;
        var rightSpace;
        var margin = smithchart.margin;
        var border = smithchart.border;
        var spaceValue = this.getLegendSpace(smithchart, bounds);
        x = spaceValue['leftLegendWidth'] + margin.left + border.width;
        rightSpace = spaceValue['rightLegendWidth'] + margin.left + margin.right + (2 * border.width);
        width = smithchart.availableSize['width'] - (x + rightSpace);
        y = margin['top'] + (2 * smithchart.elementSpacing) + spaceValue['modelTitleHeight'] +
            spaceValue['modelsubTitleHeight'] + spaceValue['topLegendHeight'] + border.width;
        height = smithchart.availableSize['height'] - (spaceValue['modelTitleHeight'] +
            (2 * smithchart.elementSpacing) + spaceValue['modelsubTitleHeight'] + margin['top'] +
            spaceValue['topLegendHeight'] + spaceValue['bottomLegendHeight']);
        return { x: x, y: y, width: width, height: height };
    };
    AreaBounds.prototype.getLegendSpace = function (smithchart, bounds) {
        var title = smithchart.title;
        var legend = smithchart.legendSettings;
        var position = legend.position.toLowerCase();
        var subtitleHeight = 0;
        var modelsubTitleHeight = 0;
        var titleHeight = 0;
        var font = smithchart.font;
        var modelTitleHeight = 0;
        var itemPadding = 10;
        var legendBorder = legend.border.width;
        var leftLegendWidth = 0;
        var rightLegendWidth = 0;
        var topLegendHeight = 0;
        var bottomLegendHeight = 0;
        var ltheight = 0;
        var space;
        if (legend['visible']) {
            space = (bounds.width + (itemPadding / 2) + smithchart.elementSpacing + (2 * legendBorder));
            leftLegendWidth = position === 'left' ? space : 0;
            rightLegendWidth = position === 'right' ? space : 0;
            ltheight = legend['title'].visible ? Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(legend['title'].text, font)['height'] : 0;
            topLegendHeight = position === 'top' ? smithchart.elementSpacing + bounds.height + ltheight : 0;
            bottomLegendHeight = position === 'bottom' ? smithchart.elementSpacing + bounds.height + ltheight : 0;
        }
        subtitleHeight = Object(_smithchart_utils_helper__WEBPACK_IMPORTED_MODULE_0__["measureText"])(title.subtitle.text, font)['height'];
        modelTitleHeight = (title.text === '' || !title['visible']) ? 0 : (titleHeight);
        modelsubTitleHeight = (title['subtitle'].text === '' || !title['subtitle'].visible) ? 0 : (subtitleHeight);
        return {
            leftLegendWidth: leftLegendWidth, rightLegendWidth: rightLegendWidth,
            topLegendHeight: topLegendHeight, bottomLegendHeight: bottomLegendHeight,
            modelTitleHeight: modelTitleHeight, modelsubTitleHeight: modelsubTitleHeight
        };
    };
    return AreaBounds;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/enum.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/enum.js ***!
  \**************************************************************************/
/*! exports provided: smithchartBeforePrint */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "smithchartBeforePrint", function() { return smithchartBeforePrint; });
/**
 * Specifies TreeMap beforePrint event name.
 * @private
 */
var smithchartBeforePrint = 'beforePrint';


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/export.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/export.js ***!
  \****************************************************************************/
/*! exports provided: ExportUtils */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportUtils", function() { return ExportUtils; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js");
/* harmony import */ var _utils_enum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/enum */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/enum.js");
/* harmony import */ var _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-pdf-export */ "./node_modules/@syncfusion/ej2-pdf-export/index.js");




/**
 * Annotation Module handles the Annotation for Maps
 */
var ExportUtils = /** @class */ (function () {
    /**
     * Constructor for Maps
     * @param control
     */
    function ExportUtils(control) {
        this.control = control;
    }
    /**
     * To print the Maps
     * @param elements
     */
    ExportUtils.prototype.print = function (elements) {
        this.smithchartPrint = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
        this.smithchartPrint.moveTo(0, 0);
        this.smithchartPrint.resizeTo(screen.availWidth, screen.availHeight);
        var argsData = {
            cancel: false, htmlContent: this.getHTMLContent(elements), name: _utils_enum__WEBPACK_IMPORTED_MODULE_2__["smithchartBeforePrint"]
        };
        this.control.trigger(_utils_enum__WEBPACK_IMPORTED_MODULE_2__["smithchartBeforePrint"], argsData);
        if (!argsData.cancel) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["print"])(argsData.htmlContent, this.smithchartPrint);
        }
    };
    /**
     * To get the html string of the Maps
     * @param svgElements
     * @private
     */
    ExportUtils.prototype.getHTMLContent = function (svgElements) {
        var div = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div');
        if (svgElements) {
            if (svgElements instanceof Array) {
                svgElements.forEach(function (value) {
                    div.appendChild(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(value).cloneNode(true));
                });
            }
            else if (svgElements instanceof Element) {
                div.appendChild(svgElements.cloneNode(true));
            }
            else {
                div.appendChild(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["getElement"])(svgElements).cloneNode(true));
            }
        }
        else {
            div.appendChild(this.control.element.cloneNode(true));
        }
        return div;
    };
    /**
     * To export the file as image/svg format
     * @param type
     * @param fileName
     */
    ExportUtils.prototype.export = function (exportType, fileName, orientation) {
        var _this = this;
        var canvas = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('canvas', {
            id: 'ej2-canvas',
            attrs: {
                'width': this.control.availableSize.width.toString(),
                'height': this.control.availableSize.height.toString()
            }
        });
        var isDownload = !(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].userAgent.toString().indexOf('HeadlessChrome') > -1);
        orientation = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(orientation) ? _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_3__["PdfPageOrientation"].Landscape : orientation;
        var svgData = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
            this.control.svgObject.outerHTML +
            '</svg>';
        var url = window.URL.createObjectURL(new Blob(exportType === 'SVG' ? [svgData] :
            [(new XMLSerializer()).serializeToString(this.control.svgObject)], { type: 'image/svg+xml' }));
        if (exportType === 'SVG') {
            this.triggerDownload(fileName, exportType, url, isDownload);
        }
        else {
            var image_1 = new Image();
            var ctx_1 = canvas.getContext('2d');
            image_1.onload = (function () {
                ctx_1.drawImage(image_1, 0, 0);
                window.URL.revokeObjectURL(url);
                if (exportType === 'PDF') {
                    var document_1 = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_3__["PdfDocument"]();
                    var imageString = canvas.toDataURL('image/jpeg').replace('image/jpeg', 'image/octet-stream');
                    document_1.pageSettings.orientation = orientation;
                    imageString = imageString.slice(imageString.indexOf(',') + 1);
                    document_1.pages.add().graphics.drawImage(new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_3__["PdfBitmap"](imageString), 0, 0, (_this.control.availableSize.width - 60), _this.control.availableSize.height);
                    if (isDownload) {
                        document_1.save(fileName + '.pdf');
                        document_1.destroy();
                    }
                }
                else {
                    _this.triggerDownload(fileName, exportType, canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream'), isDownload);
                }
            });
            image_1.src = url;
        }
    };
    /**
     * To trigger the download element
     * @param fileName
     * @param type
     * @param url
     */
    ExportUtils.prototype.triggerDownload = function (fileName, exportType, url, isDownload) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('a', {
            attrs: {
                'download': fileName + '.' + exportType.toLocaleLowerCase(),
                'href': url
            }
        }).dispatchEvent(new MouseEvent(isDownload ? 'click' : 'move', {
            view: window,
            bubbles: false,
            cancelable: true
        }));
    };
    return ExportUtils;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/helper.js ***!
  \****************************************************************************/
/*! exports provided: createSvg, getElement, textTrim, getTemplateFunction, convertElementFromLabel, _getEpsilonValue, calculateSize, templateAnimate, stringToNumber, PathOption, RectOption, CircleOption, measureText, TextOption, removeElement, linear, reverselinear, getAnimationFunction, renderTextElement */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return createSvg; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return getElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textTrim", function() { return textTrim; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTemplateFunction", function() { return getTemplateFunction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertElementFromLabel", function() { return convertElementFromLabel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getEpsilonValue", function() { return _getEpsilonValue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateSize", function() { return calculateSize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateAnimate", function() { return templateAnimate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringToNumber", function() { return stringToNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PathOption", function() { return PathOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RectOption", function() { return RectOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CircleOption", function() { return CircleOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "measureText", function() { return measureText; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextOption", function() { return TextOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return removeElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reverselinear", function() { return reverselinear; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAnimationFunction", function() { return getAnimationFunction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderTextElement", function() { return renderTextElement; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../smithchart/utils/utils */ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




function createSvg(smithchart) {
    smithchart.renderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["SvgRenderer"](smithchart.element.id);
    calculateSize(smithchart);
    smithchart.svgObject = smithchart.renderer.createSvg({
        id: smithchart.element.id + '_svg',
        width: smithchart.availableSize.width,
        height: smithchart.availableSize.height
    });
}
function getElement(id) {
    return document.getElementById(id);
}
/**
 * @private
 * Trim the title text
 */
function textTrim(maxwidth, text, font) {
    var label = text;
    var size = measureText(text, font).width;
    if (size > maxwidth) {
        var textLength = text.length;
        for (var i = textLength - 1; i >= 0; --i) {
            label = text.substring(0, i) + '...';
            size = measureText(label, font).width;
            if (size <= maxwidth || label.length < 4) {
                if (label.length < 4) {
                    label = ' ';
                }
                return label;
            }
        }
    }
    return label;
}
/**
 * Function     to compile the template function for maps.
 * @returns Function
 * @private
 */
function getTemplateFunction(templateString) {
    var templateFn = null;
    var e;
    try {
        if (document.querySelectorAll(templateString).length) {
            templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(templateString).innerHTML.trim());
        }
    }
    catch (e) {
        templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(templateString);
    }
    return templateFn;
}
function convertElementFromLabel(element, labelId, data, index, smithchart) {
    var labelEle = element[0];
    var templateHtml = labelEle.outerHTML;
    var properties = Object.keys(data);
    for (var i = 0; i < properties.length; i++) {
        templateHtml = templateHtml.replace(new RegExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
    }
    return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
        id: labelId,
        innerHTML: templateHtml,
        styles: 'position: absolute'
    });
}
function _getEpsilonValue() {
    var e = 1.0;
    while ((1.0 + 0.5 * e) !== 1.0) {
        e *= 0.5;
    }
    return e;
}
/**
 * Method to calculate the width and height of the smithchart
 */
function calculateSize(smithchart) {
    var containerWidth = smithchart.element.clientWidth;
    var containerHeight = smithchart.element.clientHeight;
    smithchart.availableSize = new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["SmithchartSize"](stringToNumber(smithchart.width, containerWidth) || containerWidth || 600, stringToNumber(smithchart.height, containerHeight) || containerHeight || 450);
}
/**
 * Animation for template
 * @private
 */
function templateAnimate(smithchart, element, delay, duration, name) {
    var opacity = 0;
    var delta;
    var value;
    new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(element, {
        duration: duration,
        delay: delay,
        name: name,
        progress: function (args) {
            delta = ((args.timeStamp - args.delay) / args.duration);
            value = opacity + (delta * 1);
            args.element.style.opacity = value.toString();
        },
        end: function (args) {
            var opacity = 1;
            args.element.style.opacity = opacity.toString();
            smithchart.trigger('animationComplete', event);
        },
    });
}
/** @private */
function stringToNumber(value, containerSize) {
    if (value !== null && value !== undefined) {
        return value.indexOf('%') !== -1 ? (containerSize / 100) * parseInt(value, 10) : parseInt(value, 10);
    }
    return null;
}
/**
 * Internal use of path options
 * @private
 */
var PathOption = /** @class */ (function () {
    function PathOption(id, fill, width, color, opacity, dashArray, d) {
        this.id = id;
        this.opacity = opacity;
        this.fill = fill;
        this.stroke = color;
        this['stroke-width'] = width;
        this['stroke-dasharray'] = dashArray;
        this.d = d;
    }
    return PathOption;
}());

/**
 * Internal use of rectangle options
 * @private
 */
var RectOption = /** @class */ (function (_super) {
    __extends(RectOption, _super);
    function RectOption(id, fill, border, opacity, rect) {
        var _this = _super.call(this, id, fill, border.width, border.color, opacity) || this;
        _this.y = rect.y;
        _this.x = rect.x;
        _this.height = rect.height;
        _this.width = rect.width;
        return _this;
    }
    return RectOption;
}(PathOption));

/**
 * Internal use of circle options
 * @private
 */
var CircleOption = /** @class */ (function (_super) {
    __extends(CircleOption, _super);
    function CircleOption(id, fill, border, opacity, cx, cy, r, dashArray) {
        var _this = _super.call(this, id, fill, border.width, border.color, opacity) || this;
        _this.cy = cy;
        _this.cx = cx;
        _this.r = r;
        _this['stroke-dasharray'] = dashArray;
        return _this;
    }
    return CircleOption;
}(PathOption));

function measureText(text, font) {
    var htmlObject = document.getElementById('smithchartmeasuretext');
    if (htmlObject === null) {
        htmlObject = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('text', { id: 'smithchartmeasuretext' });
        document.body.appendChild(htmlObject);
    }
    htmlObject.innerHTML = text;
    htmlObject.style.position = 'absolute';
    htmlObject.style.visibility = 'hidden';
    htmlObject.style.left = '0';
    htmlObject.style.top = '-100';
    htmlObject.style.whiteSpace = 'nowrap';
    htmlObject.style.fontSize = font.size;
    htmlObject.style.fontWeight = font.fontWeight;
    htmlObject.style.fontStyle = font.fontStyle;
    htmlObject.style.fontFamily = font.fontFamily;
    // For bootstrap line height issue
    htmlObject.style.lineHeight = 'normal';
    return new _smithchart_utils_utils__WEBPACK_IMPORTED_MODULE_2__["SmithchartSize"](htmlObject.clientWidth, htmlObject.clientHeight);
}
/**
 * Internal use of text options
 * @private
 */
var TextOption = /** @class */ (function () {
    function TextOption(id, x, y, anchor, text) {
        this.id = id;
        this.x = x;
        this.y = y;
        this.anchor = anchor;
        this.text = text;
    }
    return TextOption;
}());

/**
 * To remove element by id
 */
function removeElement(id) {
    var element = document.getElementById(id);
    return element ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element) : null;
}
/**
 * Animation Effect Calculation Started Here
 * @param currentTime
 * @param startValue
 * @param endValue
 * @param duration
 * @private
 */
function linear(currentTime, startValue, endValue, duration) {
    return -endValue * Math.cos(currentTime / duration * (Math.PI / 2)) + endValue + startValue;
}
function reverselinear(currentTime, startValue, endValue, duration) {
    return -startValue * Math.sin(currentTime / duration * (Math.PI / 2)) + endValue + startValue;
}
/** @private */
function getAnimationFunction(effect) {
    var functionName;
    switch (effect) {
        case 'Linear':
            functionName = linear;
            break;
        case 'Reverse':
            functionName = reverselinear;
            break;
    }
    return functionName;
}
/**
 * Internal rendering of text
 * @private
 */
function renderTextElement(options, font, color, parent) {
    var renderOptions = {
        'id': options.id,
        'x': options.x,
        'y': options.y,
        'fill': color,
        'font-size': font.size,
        'font-style': font.fontStyle,
        'font-family': font.fontFamily,
        'font-weight': font.fontWeight,
        'text-anchor': options.anchor,
        'opacity': font.opacity
    };
    var text = options.text;
    var renderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["SvgRenderer"]('');
    var height;
    var htmlObject = renderer.createText(renderOptions, text);
    parent.appendChild(htmlObject);
    return htmlObject;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/smithchart/utils/utils.js ***!
  \***************************************************************************/
/*! exports provided: SmithchartFont, SmithchartMargin, SmithchartBorder, SmithchartRect, LabelCollection, LegendSeries, LabelRegion, HorizontalLabelCollection, RadialLabelCollections, LineSegment, PointRegion, Point, ClosestPoint, MarkerOptions, SmithchartLabelPosition, Direction, DataLabelTextOptions, LabelOption, SmithchartSize, GridArcPoints */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartFont", function() { return SmithchartFont; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartMargin", function() { return SmithchartMargin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartBorder", function() { return SmithchartBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartRect", function() { return SmithchartRect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LabelCollection", function() { return LabelCollection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LegendSeries", function() { return LegendSeries; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LabelRegion", function() { return LabelRegion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalLabelCollection", function() { return HorizontalLabelCollection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RadialLabelCollections", function() { return RadialLabelCollections; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineSegment", function() { return LineSegment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PointRegion", function() { return PointRegion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Point", function() { return Point; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClosestPoint", function() { return ClosestPoint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerOptions", function() { return MarkerOptions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartLabelPosition", function() { return SmithchartLabelPosition; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Direction", function() { return Direction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataLabelTextOptions", function() { return DataLabelTextOptions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LabelOption", function() { return LabelOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmithchartSize", function() { return SmithchartSize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridArcPoints", function() { return GridArcPoints; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 SmithchartFont = /** @class */ (function (_super) {
    __extends(SmithchartFont, _super);
    function SmithchartFont() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Segoe UI')
    ], SmithchartFont.prototype, "fontFamily", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Normal')
    ], SmithchartFont.prototype, "fontStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Regular')
    ], SmithchartFont.prototype, "fontWeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SmithchartFont.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('12px')
    ], SmithchartFont.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SmithchartFont.prototype, "opacity", void 0);
    return SmithchartFont;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SmithchartMargin = /** @class */ (function (_super) {
    __extends(SmithchartMargin, _super);
    function SmithchartMargin() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], SmithchartMargin.prototype, "top", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], SmithchartMargin.prototype, "bottom", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], SmithchartMargin.prototype, "right", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], SmithchartMargin.prototype, "left", void 0);
    return SmithchartMargin;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var SmithchartBorder = /** @class */ (function (_super) {
    __extends(SmithchartBorder, _super);
    function SmithchartBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], SmithchartBorder.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SmithchartBorder.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('transparent')
    ], SmithchartBorder.prototype, "color", void 0);
    return SmithchartBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Internal use of type rect
 */
var SmithchartRect = /** @class */ (function () {
    function SmithchartRect(x, y, width, height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }
    return SmithchartRect;
}());

var LabelCollection = /** @class */ (function () {
    function LabelCollection() {
    }
    return LabelCollection;
}());

var LegendSeries = /** @class */ (function () {
    function LegendSeries() {
    }
    return LegendSeries;
}());

var LabelRegion = /** @class */ (function () {
    function LabelRegion() {
    }
    return LabelRegion;
}());

var HorizontalLabelCollection = /** @class */ (function (_super) {
    __extends(HorizontalLabelCollection, _super);
    function HorizontalLabelCollection() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return HorizontalLabelCollection;
}(LabelCollection));

var RadialLabelCollections = /** @class */ (function (_super) {
    __extends(RadialLabelCollections, _super);
    function RadialLabelCollections() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return RadialLabelCollections;
}(HorizontalLabelCollection));

var LineSegment = /** @class */ (function () {
    function LineSegment() {
    }
    return LineSegment;
}());

var PointRegion = /** @class */ (function () {
    function PointRegion() {
    }
    return PointRegion;
}());

/**
 * Smithchart internal class for point
 */
var Point = /** @class */ (function () {
    function Point() {
    }
    return Point;
}());

var ClosestPoint = /** @class */ (function () {
    function ClosestPoint() {
    }
    return ClosestPoint;
}());

var MarkerOptions = /** @class */ (function () {
    function MarkerOptions(id, fill, borderColor, borderWidth, opacity) {
        this.id = id;
        this.fill = fill;
        this.borderColor = borderColor;
        this.borderWidth = borderWidth;
        this.opacity = opacity;
    }
    return MarkerOptions;
}());

var SmithchartLabelPosition = /** @class */ (function () {
    function SmithchartLabelPosition() {
    }
    return SmithchartLabelPosition;
}());

var Direction = /** @class */ (function () {
    function Direction() {
        this.counterclockwise = 0;
        this.clockwise = 1;
    }
    return Direction;
}());

var DataLabelTextOptions = /** @class */ (function () {
    function DataLabelTextOptions() {
    }
    return DataLabelTextOptions;
}());

var LabelOption = /** @class */ (function () {
    function LabelOption() {
    }
    return LabelOption;
}());

/** @private */
var SmithchartSize = /** @class */ (function () {
    function SmithchartSize(width, height) {
        this.width = width;
        this.height = height;
    }
    return SmithchartSize;
}());

var GridArcPoints = /** @class */ (function () {
    function GridArcPoints() {
    }
    return GridArcPoints;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/sparkline/index.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/sparkline/index.js ***!
  \********************************************************************/
/*! exports provided: Sparkline, SparklineTooltip, SparklineBorder, SparklineFont, TrackLineSettings, SparklineTooltipSettings, ContainerArea, LineSettings, RangeBandSettings, AxisSettings, Padding, SparklineMarkerSettings, LabelOffset, SparklineDataLabelSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _sparkline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparkline */ "./node_modules/@syncfusion/ej2-charts/src/sparkline/sparkline.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sparkline", function() { return _sparkline__WEBPACK_IMPORTED_MODULE_0__["Sparkline"]; });

/* harmony import */ var _rendering_sparkline_tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rendering/sparkline-tooltip */ "./node_modules/@syncfusion/ej2-charts/src/sparkline/rendering/sparkline-tooltip.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineTooltip", function() { return _rendering_sparkline_tooltip__WEBPACK_IMPORTED_MODULE_1__["SparklineTooltip"]; });

/* harmony import */ var _model_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model/base */ "./node_modules/@syncfusion/ej2-charts/src/sparkline/model/base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineBorder", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["SparklineBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineFont", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["SparklineFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TrackLineSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["TrackLineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineTooltipSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["SparklineTooltipSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContainerArea", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["ContainerArea"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["LineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeBandSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["RangeBandSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AxisSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["AxisSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Padding", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["Padding"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineMarkerSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["SparklineMarkerSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LabelOffset", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["LabelOffset"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SparklineDataLabelSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_2__["SparklineDataLabelSettings"]; });

/**
 * Exporting all modules from Sparkline Component
 */





/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/sparkline/model/base.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/sparkline/model/base.js ***!
  \*************************************************************************/
/*! exports provided: SparklineBorder, SparklineFont, TrackLineSettings, SparklineTooltipSettings, ContainerArea, LineSettings, RangeBandSettings, AxisSettings, Padding, SparklineMarkerSettings, LabelOffset, SparklineDataLabelSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineBorder", function() { return SparklineBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineFont", function() { return SparklineFont; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TrackLineSettings", function() { return TrackLineSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineTooltipSettings", function() { return SparklineTooltipSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContainerArea", function() { return ContainerArea; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineSettings", function() { return LineSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeBandSettings", function() { return RangeBandSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AxisSettings", function() { return AxisSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Padding", function() { return Padding; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineMarkerSettings", function() { return SparklineMarkerSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LabelOffset", function() { return LabelOffset; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineDataLabelSettings", function() { return SparklineDataLabelSettings; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/**
 * Sparkline base API Class declarations.
 */

/**
 * Configures the borders in the Sparkline.
 */
var SparklineBorder = /** @class */ (function (_super) {
    __extends(SparklineBorder, _super);
    function SparklineBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SparklineBorder.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], SparklineBorder.prototype, "width", void 0);
    return SparklineBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the fonts in sparklines.
 */
var SparklineFont = /** @class */ (function (_super) {
    __extends(SparklineFont, _super);
    function SparklineFont() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SparklineFont.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SparklineFont.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Roboto, Segoe UI, Noto, Sans-serif')
    ], SparklineFont.prototype, "fontFamily", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SparklineFont.prototype, "fontWeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], SparklineFont.prototype, "fontStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SparklineFont.prototype, "opacity", void 0);
    return SparklineFont;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure the tracker line settings.
 */
var TrackLineSettings = /** @class */ (function (_super) {
    __extends(TrackLineSettings, _super);
    function TrackLineSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TrackLineSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TrackLineSettings.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], TrackLineSettings.prototype, "width", void 0);
    return TrackLineSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure the tooltip settings for sparkline.
 */
var SparklineTooltipSettings = /** @class */ (function (_super) {
    __extends(SparklineTooltipSettings, _super);
    function SparklineTooltipSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SparklineTooltipSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SparklineTooltipSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SparklineTooltipSettings.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SparklineTooltipSettings.prototype, "format", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#cccccc', width: 0.5 }, SparklineBorder)
    ], SparklineTooltipSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ size: '13px', fontWeight: 'Normal', fontStyle: 'Normal', fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif' }, SparklineFont)
    ], SparklineTooltipSettings.prototype, "textStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, TrackLineSettings)
    ], SparklineTooltipSettings.prototype, "trackLineSettings", void 0);
    return SparklineTooltipSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure the sparkline container area customization
 */
var ContainerArea = /** @class */ (function (_super) {
    __extends(ContainerArea, _super);
    function ContainerArea() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('transparent')
    ], ContainerArea.prototype, "background", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SparklineBorder)
    ], ContainerArea.prototype, "border", void 0);
    return ContainerArea;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure axis line settings
 */
var LineSettings = /** @class */ (function (_super) {
    __extends(LineSettings, _super);
    function LineSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], LineSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LineSettings.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], LineSettings.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], LineSettings.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], LineSettings.prototype, "opacity", void 0);
    return LineSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure the sparkline rangeband
 */
var RangeBandSettings = /** @class */ (function (_super) {
    __extends(RangeBandSettings, _super);
    function RangeBandSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeBandSettings.prototype, "startRange", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeBandSettings.prototype, "endRange", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeBandSettings.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], RangeBandSettings.prototype, "opacity", void 0);
    return RangeBandSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure the sparkline axis
 */
var AxisSettings = /** @class */ (function (_super) {
    __extends(AxisSettings, _super);
    function AxisSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AxisSettings.prototype, "minX", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AxisSettings.prototype, "maxX", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AxisSettings.prototype, "minY", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AxisSettings.prototype, "maxY", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], AxisSettings.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, LineSettings)
    ], AxisSettings.prototype, "lineSettings", void 0);
    return AxisSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure the sparkline padding.
 */
var Padding = /** @class */ (function (_super) {
    __extends(Padding, _super);
    function Padding() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], Padding.prototype, "left", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], Padding.prototype, "right", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], Padding.prototype, "bottom", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], Padding.prototype, "top", void 0);
    return Padding;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure the sparkline marker options.
 */
var SparklineMarkerSettings = /** @class */ (function (_super) {
    __extends(SparklineMarkerSettings, _super);
    function SparklineMarkerSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], SparklineMarkerSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SparklineMarkerSettings.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], SparklineMarkerSettings.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#00bdae')
    ], SparklineMarkerSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ width: 1 }, SparklineBorder)
    ], SparklineMarkerSettings.prototype, "border", void 0);
    return SparklineMarkerSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure the datalabel offset
 */
var LabelOffset = /** @class */ (function (_super) {
    __extends(LabelOffset, _super);
    function LabelOffset() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], LabelOffset.prototype, "x", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], LabelOffset.prototype, "y", void 0);
    return LabelOffset;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * To configure the sparkline dataLabel options.
 */
var SparklineDataLabelSettings = /** @class */ (function (_super) {
    __extends(SparklineDataLabelSettings, _super);
    function SparklineDataLabelSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], SparklineDataLabelSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], SparklineDataLabelSettings.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('transparent')
    ], SparklineDataLabelSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SparklineDataLabelSettings.prototype, "format", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'transparent', width: 0 }, SparklineBorder)
    ], SparklineDataLabelSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ size: '14px', fontWeight: 'Medium', fontStyle: 'Medium', fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif' }, SparklineFont)
    ], SparklineDataLabelSettings.prototype, "textStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, LabelOffset)
    ], SparklineDataLabelSettings.prototype, "offset", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], SparklineDataLabelSettings.prototype, "edgeLabelMode", void 0);
    return SparklineDataLabelSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/sparkline/rendering/sparkline-renderer.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/sparkline/rendering/sparkline-renderer.js ***!
  \*******************************************************************************************/
/*! exports provided: SparklineRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineRenderer", function() { return SparklineRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/sparkline/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");




/**
 * Sparkline rendering calculation file
 */
var SparklineRenderer = /** @class */ (function () {
    /**
     * Sparkline data calculations
     * @param sparkline
     */
    function SparklineRenderer(sparkline) {
        this.sparkline = sparkline;
    }
    /**
     * To process the sparkline data
     */
    SparklineRenderer.prototype.processData = function () {
        var data = this.sparkline.dataSource;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data) || !data.length) {
            return;
        }
        else if (!isNaN(this.sparkline.dataSource[0]) || this.sparkline.valueType === 'Numeric') {
            data = (this.sparkline.enableRtl) ? data.reverse() : data;
            this.sparkline.sparklineData = data; // extend([], data) as Object[];
        }
        else {
            this['process' + this.sparkline.valueType]();
        }
        this.axisCalculation();
    };
    /* tslint:disable:no-string-literal */
    /* tslint:disable:no-eval */
    SparklineRenderer.prototype.processDataManager = function () {
        var _this = this;
        var dataModule;
        var queryModule;
        if (this.sparkline.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"]) {
            dataModule = this.sparkline.dataSource;
            queryModule = this.sparkline.query instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"] ? this.sparkline.query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]();
            var dataManager = dataModule.executeQuery(queryModule);
            dataManager.then(function (e) {
                _this.sparkline.dataSource = e['result'];
                _this.sparkline.sparklineData = _this.sparkline.dataSource;
            });
        }
    };
    /**
     * To process sparkline category data.
     */
    SparklineRenderer.prototype.processCategory = function (data, x, y) {
        var _this = this;
        if (data === void 0) { data = this.sparkline.dataSource; }
        if (x === void 0) { x = this.sparkline.xName; }
        if (y === void 0) { y = this.sparkline.yName; }
        var temp = [];
        var xValues = [];
        data.forEach(function (value, index) {
            if (xValues.indexOf(value[x]) === -1) {
                xValues.push(value[x]);
            }
            var currentData = {};
            currentData[_this.sparkline.xName] = xValues.indexOf(value[x]);
            currentData[_this.sparkline.yName] = value[y];
            temp.push(currentData);
        });
        this.sparkline.sparklineData = temp;
    };
    /**
     * To process sparkline DateTime data.
     */
    SparklineRenderer.prototype.processDateTime = function (data, x, y) {
        if (data === void 0) { data = this.sparkline.dataSource; }
        if (x === void 0) { x = this.sparkline.xName; }
        if (y === void 0) { y = this.sparkline.yName; }
        var temp = [];
        data.forEach(function (value, index) {
            var currentData = {};
            currentData[x] = value[x].getTime();
            currentData[y] = value[y];
            temp.push(currentData);
        });
        this.sparkline.sparklineData = temp;
    };
    /**
     * To render sparkline series.
     * @private
     */
    SparklineRenderer.prototype.renderSeries = function () {
        var spark = this.sparkline;
        this.clipId = spark.element.id + '_sparkline_clip_path';
        this.drawAxis();
        var args = {
            name: 'seriesRendering', cancel: false, lineWidth: spark.lineWidth, border: spark.border, fill: spark.fill, sparkline: spark
        };
        spark.trigger(args.name, args);
        if (!this.visiblePoints || args.cancel) {
            return;
        }
        if (spark.type !== 'Pie' && spark.type !== 'WinLoss' && spark.rangeBandSettings.length) {
            var group = this.sparkline.renderer.createGroup({ id: this.sparkline.element.id + '_sparkline_rangeband_g' });
            for (var i = 0; i < spark.rangeBandSettings.length; i++) {
                if ((spark.axisSettings.minY <= spark.rangeBandSettings[i].startRange) ||
                    (spark.axisSettings.maxY >= spark.rangeBandSettings[i].endRange)) {
                    this.rangeBand(spark.rangeBandSettings[i], group, i);
                }
            }
            this.sparkline.svgObject.appendChild(group);
        }
        this['render' + spark.type](this.visiblePoints, args);
        this.renderMarker(this.visiblePoints);
        this.renderLabel(this.visiblePoints);
    };
    /**
     * To render a range band
     */
    SparklineRenderer.prototype.rangeBand = function (rangeBandSettings, group, index) {
        var model = this.sparkline;
        var height = (model.availableSize.height) - model.padding.top * 2;
        var width = (model.availableSize.width) - model.padding.left * 2;
        var stValue = rangeBandSettings.startRange;
        var edValue = rangeBandSettings.endRange;
        var stHeight = (height - ((height / this.unitY) * (stValue - this.min))) + model.padding.top;
        var edHeight = (height - ((height / this.unitY) * (edValue - this.min))) + model.padding.top;
        var color = rangeBandSettings.color || this.sparkline.sparkTheme.rangeBandColor;
        if (edHeight > (height + model.padding.top)) {
            edHeight = (height + model.padding.top);
        }
        else if (edHeight < (0 + model.padding.top)) {
            edHeight = (0 + model.padding.top);
        }
        if (stHeight > (height + model.padding.top)) {
            stHeight = (height + model.padding.top);
        }
        else if (stHeight < (0 + model.padding.top)) {
            stHeight = (0 + model.padding.top);
        }
        var path = 'M ' + (model.padding.left) + ' ' + stHeight + ' L ' + (width + (model.padding.left)) + ' ' + stHeight +
            ' L ' + (width + (model.padding.left)) + ' ' + edHeight + ' L ' + (model.padding.left) + ' ' + edHeight + ' Z ';
        var pathOption = {
            'id': model.element.id + '_rangeBand_' + index,
            'fill': color,
            'opacity': rangeBandSettings.opacity,
            'stroke': 'transparent',
            'stroke-width': model.lineWidth,
            'd': path,
            'stroke-dasharray': ''
        };
        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["drawPath"])(this.sparkline, pathOption, group);
    };
    /**
     * To render line series
     */
    SparklineRenderer.prototype.renderLine = function (points, args) {
        var spark = this.sparkline;
        var g = this.sparkline.renderer.createGroup({
            id: spark.element.id + '_sparkline_g',
            'clip-path': 'url(#' + this.clipId + ')'
        });
        var color = this.sparkline.fill;
        color = (this.sparkline.fill === '#00bdae' && this.sparkline.theme === 'Bootstrap4')
            ? this.sparkline.sparkTheme.axisLineColor : color;
        var pathOption = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["PathOption"](spark.element.id + '_sparkline_line', 'transparent', args.lineWidth, color, spark.opacity);
        var d = '';
        for (var i = 0, len = points.length; i < len; i++) {
            if (i === 0) {
                d = 'M ' + points[0].x + ' ' + points[i].y + ' ';
            }
            d += 'L ' + points[i].x + ' ' + points[i].y + ' ';
        }
        pathOption.d = d;
        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["drawPath"])(this.sparkline, pathOption, g);
        this.sparkline.svgObject.appendChild(g);
    };
    /**
     * To render pie series
     */
    /* tslint:disable:no-string-literal */
    SparklineRenderer.prototype.renderPie = function (points, args) {
        var spark = this.sparkline;
        var height = spark.availableSize.height - (spark.padding.top + spark.padding.bottom);
        var width = spark.availableSize.width - (spark.padding.left + spark.padding.right);
        var area = (height <= width) ? height / 2 : width / 2;
        var X = spark.availableSize.width / 2; // center position of x
        var Y = spark.availableSize.height / 2; // center position of y
        var deg = 0;
        var stRad;
        var edRad;
        var stroke = args.border.color;
        var opacity = spark.opacity;
        var strokeWidth = args.border.width;
        var colors = (spark.palette.length) ? spark.palette : ['#00bdae', '#404041', '#357cd2', '#e56590', '#f8b883',
            '#70ad47', '#dd8abd', '#7f84e8', '#7bb4eb', '#ea7a57'];
        var group = this.sparkline.renderer.createGroup({ id: spark.element.id + '_sparkline_g' });
        var low;
        var high;
        var locations = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], [], points);
        if (spark.highPointColor || spark.lowPointColor) {
            var pointsYvalues = locations.map(function (a) { return a.yVal; });
            low = Math.min.apply(null, pointsYvalues);
            high = Math.max.apply(null, pointsYvalues);
        }
        this.negativePointIndexes = [];
        for (var i = 0, stDeg = 90, edDeg = void 0, flag = void 0; i < points.length; i++) {
            stDeg += deg;
            deg = points[i]['degree'];
            edDeg = stDeg + deg;
            stRad = (stDeg - 90) * Math.PI / 180.0;
            edRad = (edDeg - 90) * Math.PI / 180.0;
            points[i]['stAng'] = stRad;
            points[i]['endAng'] = edRad;
            flag = (deg < 180) ? '0' : '1';
            var temp = points[i]['coordinates'] = {
                sX: X + (area * Math.cos(stRad)), sY: Y +
                    (area * Math.sin(stRad)), eX: X + (area * Math.cos(edRad)), eY: Y + (area * Math.sin(edRad))
            };
            var pathArc = 'M ' + X + ' ' + Y + ' L ' + temp['eX'] + ' ' + temp['eY'] + ' A ' + area + ' ' +
                area + ' 0 ' + flag + ',0 ' + temp['sX'] + ' ' + temp['sY'] + ' Z';
            var pathOption = {
                'id': spark.element.id + '_sparkline_pie_' + i,
                'opacity': opacity,
                'fill': colors[i % colors.length],
                'stroke': stroke,
                'stroke-width': strokeWidth,
                'd': pathArc,
                'stroke-dasharray': ''
            };
            this.getPieSpecialPoint(points[i], spark, pathOption, i, high, low, points.length);
            var pointArgs = this.triggerPointRender('pointRendering', i, pathOption.fill, { color: stroke, width: strokeWidth });
            pathOption.fill = pointArgs.fill;
            pathOption.stroke = pointArgs.border.color;
            pathOption['stroke-width'] = pointArgs.border.width;
            if (!pointArgs.cancel) {
                var element = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["drawPath"])(this.sparkline, pathOption, group);
                element.setAttribute('aria-label', spark.dataSource[i][spark.xName] + ' : ' + points[i].yVal);
            }
            var diffRadian = edRad - stRad;
            var mid = {
                x: X + ((area / 2) * Math.cos(stRad + (diffRadian / 2))),
                y: Y + ((area / 2) * Math.sin(stRad + (diffRadian / 2)))
            };
            points[i].location.x = mid.x;
            points[i].location.y = mid.y;
        }
        this.sparkline.svgObject.appendChild(group);
    };
    /**
     * To get special point color and option for Pie series.
     */
    SparklineRenderer.prototype.getPieSpecialPoint = function (temp, spark, option, i, high, low, length) {
        if (temp.yVal < 0 && spark.negativePointColor) {
            option.fill = spark.negativePointColor;
            this.negativePointIndexes.push(i);
        }
        if (i === 0 && spark.startPointColor) {
            option.fill = spark.startPointColor;
            this.startPointIndex = i;
        }
        else if ((i === (length - 1)) && spark.endPointColor) {
            option.fill = spark.endPointColor;
            this.endPointIndex = i;
        }
        if (temp.yVal === high && spark.highPointColor) {
            option.fill = spark.highPointColor;
            this.highPointIndex = i;
        }
        else if (temp.yVal === low && spark.lowPointColor) {
            option.fill = spark.lowPointColor;
            this.lowPointIndex = i;
        }
    };
    /**
     * To render area series
     */
    SparklineRenderer.prototype.renderArea = function (points, args) {
        var spark = this.sparkline;
        var group = this.sparkline.renderer.createGroup({
            id: spark.element.id + '_sparkline_g',
            'clip-path': 'url(#' + this.clipId + ')'
        });
        var pathOption = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["PathOption"](spark.element.id + '_sparkline_area', args.fill, 0, 'transparent', spark.opacity);
        var d = '';
        var str = '';
        for (var i = 0, len = points.length; i < len; i++) {
            if (i !== 0) {
                str += 'L ' + points[i].x + ' ' + points[i].y + ' ';
            }
            else {
                d = 'M ' + points[i].x + ' ' + this.axisHeight + ' ';
                str = 'M ' + points[i].x + ' ' + points[i].y + ' ';
            }
            d += 'L ' + points[i].x + ' ' + points[i].y + ' ';
            if (i === (len - 1)) {
                d += 'L ' + points[i].x + ' ' + this.axisHeight + ' Z';
            }
        }
        pathOption.d = d;
        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["drawPath"])(this.sparkline, pathOption, group);
        pathOption = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["PathOption"](spark.element.id + '_sparkline_area_str', 'transparent', args.border.width, args.border.color, spark.opacity, '', str);
        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["drawPath"])(this.sparkline, pathOption, group);
        this.sparkline.svgObject.appendChild(group);
    };
    /**
     * To render column series
     */
    SparklineRenderer.prototype.renderColumn = function (points, args) {
        var spark = this.sparkline;
        var locations = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], [], points);
        var group = this.sparkline.renderer.createGroup({
            id: spark.element.id + '_sparkline_g',
            'clip-path': 'url(#' + this.clipId + ')'
        });
        var lowPos;
        var highPos;
        if (this.sparkline.highPointColor || this.sparkline.lowPointColor) {
            var pointsYPos = locations.map(function (a) { return a.markerPosition; });
            highPos = Math.min.apply(null, pointsYPos);
            lowPos = Math.max.apply(null, pointsYPos);
        }
        var id = spark.element.id + '_sparkline_column_';
        var rectOptions = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](id, '', args.border, spark.opacity, null);
        var paletteLength = spark.palette.length;
        var temp;
        var len = points.length;
        this.negativePointIndexes = [];
        for (var i = 0; i < len; i++) {
            temp = points[i];
            rectOptions.id = id + i;
            rectOptions.fill = (paletteLength) ? spark.palette[i % paletteLength] : args.fill;
            rectOptions.rect = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["Rect"](temp.x, temp.y, temp.width, temp.height);
            this.getSpecialPoint(true, temp, spark, rectOptions, i, highPos, lowPos, len);
            temp.location.y = (temp.markerPosition <= this.axisHeight) ? temp.y : (temp.y + temp.height);
            temp.location.x = temp.x + (temp.width / 2);
            rectOptions.stroke = args.border.color ? (args.border.color) : rectOptions.fill;
            var pointArgs = this.triggerPointRender('pointRendering', i, rectOptions.fill, { color: rectOptions.stroke, width: args.border.width });
            rectOptions.fill = pointArgs.fill;
            rectOptions.stroke = pointArgs.border.color;
            rectOptions['stroke-width'] = pointArgs.border.width;
            if (!pointArgs.cancel) {
                var element = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["drawRectangle"])(spark, rectOptions, group);
                element.setAttribute('aria-label', spark.dataSource[i][spark.xName] + ' : ' + points[i].yVal);
            }
        }
        this.sparkline.svgObject.appendChild(group);
    };
    /**
     * To render WinLoss series
     */
    SparklineRenderer.prototype.renderWinLoss = function (points, args) {
        var spark = this.sparkline;
        var group = this.sparkline.renderer.createGroup({
            id: spark.element.id + '_sparkline_g',
            'clip-path': 'url(#' + this.clipId + ')'
        });
        var id = spark.element.id + '_sparkline_winloss_';
        var options = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"](id, '', args.border, spark.opacity, null);
        var temp;
        var len = points.length;
        var paletteLength = spark.palette.length;
        for (var i = 0; i < len; i++) {
            temp = points[i];
            options.id = id + i;
            options.fill = (paletteLength) ? spark.palette[i % paletteLength] : ((temp.yVal === this.axisValue) ?
                (this.sparkline.tiePointColor || '#a216f3') : ((temp.yVal > this.axisValue) ? args.fill :
                (spark.negativePointColor || '#e20f07')));
            options.stroke = (args.border.color) ? (args.border.color) : options.fill;
            options.rect = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["Rect"](temp.x, temp.y, temp.width, temp.height);
            temp.location.x = temp.x + (temp.width / 2);
            temp.location.y = (temp.yVal >= this.axisValue) ? (temp.y) : (temp.y + temp.height);
            var pointArgs = this.triggerPointRender('pointRendering', i, options.fill, { color: options.stroke, width: args.border.width });
            options.fill = pointArgs.fill;
            options.stroke = pointArgs.border.color;
            options['stroke-width'] = pointArgs.border.width;
            if (!pointArgs.cancel) {
                var element = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["drawRectangle"])(spark, options, group);
                element.setAttribute('aria-label', spark.dataSource[i][spark.xName] + ' : ' + points[i].yVal);
            }
        }
        this.sparkline.svgObject.appendChild(group);
    };
    SparklineRenderer.prototype.renderMarker = function (points) {
        var spark = this.sparkline;
        var marker = spark.markerSettings;
        if ((spark.type === 'Pie' || spark.type === 'WinLoss' || !marker.visible.length)) {
            return;
        }
        var locations = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], [], points);
        var group = this.sparkline.renderer.createGroup({
            id: spark.element.id + '_sparkline_marker_g',
            'clip-path': 'url(#' + this.clipId + ')'
        });
        var temp;
        var id = spark.element.id + '_sparkline_marker_';
        var option = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["CircleOption"]('', marker.fill, marker.border, marker.opacity, 0, 0, marker.size / 2, '');
        var highPos;
        var lowPos;
        var visible = marker.visible.join();
        if ((visible.toLowerCase().indexOf('high') > -1) || (visible.toLowerCase().indexOf('low') > -1)) {
            var pointsYPos = locations.map(function (a) { return a.markerPosition; });
            highPos = Math.min.apply(null, pointsYPos);
            lowPos = Math.max.apply(null, pointsYPos);
        }
        this.negativePointIndexes = [];
        for (var i = 0, length_1 = points.length; i < length_1; i++) {
            temp = points[i];
            option.id = id + i;
            option.cx = temp.location.x;
            option.cy = temp.location.y;
            option.fill = marker.fill;
            var render = (visible.toLowerCase().indexOf('all') > -1);
            render = this.getSpecialPoint(render, temp, spark, option, i, highPos, lowPos, length_1, visible.toLowerCase());
            option.stroke = marker.border.color || option.fill;
            var markerArgs = {
                name: 'markerRendering', cancel: false, border: { color: option.stroke, width: marker.border.width }, fill: option.fill,
                pointIndex: i, sparkline: this.sparkline, x: option.cx, y: option.cy, size: marker.size
            };
            this.sparkline.trigger(markerArgs.name, markerArgs);
            if (render && !markerArgs.cancel) {
                option.fill = markerArgs.fill;
                option.stroke = markerArgs.border.color;
                option['stroke-width'] = markerArgs.border.width;
                option.r = markerArgs.size / 2;
                var element = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["drawCircle"])(spark, option, group);
                element.setAttribute('aria-label', spark.dataSource[i][spark.xName] + ' : ' + points[i].yVal);
            }
        }
        this.sparkline.svgObject.appendChild(group);
    };
    /**
     * To get special point color and option.
     */
    SparklineRenderer.prototype.getSpecialPoint = function (render, temp, spark, option, i, highPos, lowPos, length, visible) {
        if (visible === void 0) { visible = ''; }
        if (temp.markerPosition > this.axisHeight) {
            option.fill = spark.negativePointColor || option.fill;
            this.negativePointIndexes.push(i);
            render = render || (visible.indexOf('negative') > -1);
        }
        if (i === 0) {
            option.fill = spark.startPointColor || option.fill;
            this.startPointIndex = i;
            render = render || (visible.indexOf('start') > -1);
        }
        else if ((i === (length - 1))) {
            option.fill = spark.endPointColor || option.fill;
            this.endPointIndex = i;
            render = render || (visible.indexOf('end') > -1);
        }
        if (temp.markerPosition === highPos) {
            option.fill = spark.highPointColor || option.fill;
            this.highPointIndex = i;
            render = render || (visible.indexOf('high') > -1);
        }
        else if (temp.markerPosition === lowPos) {
            option.fill = spark.lowPointColor || option.fill;
            this.lowPointIndex = i;
            render = render || (visible.indexOf('low') > -1);
        }
        return render;
    };
    /**
     * To render data label for sparkline.
     */
    SparklineRenderer.prototype.renderLabel = function (points) {
        var spark = this.sparkline;
        var dataLabel = spark.dataLabelSettings;
        var color = dataLabel.textStyle.color || spark.sparkTheme.dataLabelColor;
        if ((spark.type === 'WinLoss' || !dataLabel.visible.length)) {
            return;
        }
        var locations = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], [], points);
        var id = spark.element.id + '_sparkline_label_';
        var group = this.sparkline.renderer.createGroup({
            id: spark.element.id + '_sparkline_label_g',
            style: 'pointer-events: none;'
        });
        var g;
        var temp;
        var textId = id + 'text_';
        var rectId = id + 'rect_';
        var option = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["TextOption"]('', 0, 0, 'middle', '', 'middle');
        var labelStyle = dataLabel.textStyle;
        var pointsYPos = locations.map(function (a) { return a.markerPosition; });
        var highPos = Math.min.apply(null, pointsYPos);
        var lowPos = Math.max.apply(null, pointsYPos);
        var space = 1;
        var padding = (dataLabel.fill !== 'transparent' || dataLabel.border.width) ? 2 : 0;
        var size = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["measureText"])('sparkline_measure_text', labelStyle);
        var rectOptions = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["RectOption"]('', dataLabel.fill, dataLabel.border, dataLabel.opacity, null);
        var edgeLabelOption;
        labelStyle.fontFamily = spark.sparkTheme.labelFontFamily || labelStyle.fontFamily;
        for (var i = 0, length_2 = points.length; i < length_2; i++) {
            temp = points[i];
            option.id = textId + i;
            option.x = temp.location.x + dataLabel.offset.x;
            option.y = ((spark.type === 'Pie') ? temp.location.y : ((temp.markerPosition > this.axisHeight) ? (temp.location.y +
                (size.height / 2) + space + padding) : (temp.location.y - (size.height / 2) - space - padding))) + dataLabel.offset.y;
            option.text = (dataLabel.format !== '') ? this.formatter(dataLabel.format, this.sparkline.dataSource[i]) :
                temp.yVal.toString();
            var labelArgs = {
                name: 'dataLabelRendering', cancel: false, border: dataLabel.border, fill: dataLabel.fill, pointIndex: i,
                sparkline: this.sparkline, x: option.x, y: option.y, text: option.text, color: color
            };
            this.sparkline.trigger(labelArgs.name, labelArgs);
            size = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["measureText"])(labelArgs.text, labelStyle);
            option.text = labelArgs.text;
            var render = (dataLabel.visible.join().toLowerCase().indexOf('all') > -1);
            render = this.getLabelVisible(render, temp, i, dataLabel, length_2, highPos, lowPos);
            edgeLabelOption = this.arrangeLabelPosition(dataLabel.edgeLabelMode, render, labelArgs.x, i, length_2, size, padding);
            if (render && !labelArgs.cancel && edgeLabelOption.render) {
                rectOptions.id = rectId + i;
                rectOptions.fill = labelArgs.fill;
                rectOptions.stroke = labelArgs.border.color;
                rectOptions['stroke-width'] = labelArgs.border.width;
                option.x = edgeLabelOption.x;
                option.y = labelArgs.y;
                rectOptions.rect = new _utils_helper__WEBPACK_IMPORTED_MODULE_1__["Rect"](option.x - ((size.width / 2) + padding), (option.y - padding - (size.height / 1.75)), size.width + (padding * 2), size.height + (padding * 2));
                g = this.sparkline.renderer.createGroup({ id: id + 'g' + i });
                Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["drawRectangle"])(spark, rectOptions, g);
                Object(_utils_helper__WEBPACK_IMPORTED_MODULE_1__["renderTextElement"])(option, labelStyle, labelArgs.color, g);
                group.appendChild(g);
            }
        }
        this.sparkline.svgObject.appendChild(group);
    };
    SparklineRenderer.prototype.arrangeLabelPosition = function (edgeLabel, render, x, index, length, size, padding) {
        if (edgeLabel === 'None') {
            return { x: x, render: render };
        }
        if (index === 0 && ((x - (size.width / 2) - padding) <= 0)) {
            if (edgeLabel === 'Hide') {
                render = false;
            }
            else {
                x = this.sparkline.padding.left + padding + (size.width / 2);
            }
        }
        else if (index === length - 1 && ((x + (size.width / 2) + padding) >= this.sparkline.availableSize.width)) {
            if (edgeLabel === 'Hide') {
                render = false;
            }
            else {
                x -= (size.width / 2 + padding);
            }
        }
        return { x: x, render: render };
    };
    /**
     * To get special point color and option.
     */
    SparklineRenderer.prototype.getLabelVisible = function (render, temp, i, label, length, highPos, lowPos) {
        var labelVisible = label.visible.join().toLowerCase();
        if (temp.markerPosition > this.axisHeight) {
            render = render || (labelVisible.indexOf('negative') > -1);
        }
        if (i === 0) {
            render = render || (labelVisible.indexOf('start') > -1);
        }
        else if ((i === (length - 1))) {
            render = render || (labelVisible.indexOf('end') > -1);
        }
        if (temp.markerPosition === highPos) {
            render = render || (labelVisible.indexOf('high') > -1);
        }
        else if (temp.markerPosition === lowPos) {
            render = render || (labelVisible.indexOf('low') > -1);
        }
        return render;
    };
    /**
     * To format text
     */
    SparklineRenderer.prototype.formatter = function (format, data) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(format)) {
            return null;
        }
        var keys = Object.keys(data);
        for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
            var key = keys_1[_i];
            format = format.split('${' + key + '}').join(data[key]);
        }
        return format;
    };
    /**
     * To calculate min max for x and y axis
     */
    SparklineRenderer.prototype.axisCalculation = function () {
        this.findRanges(this.sparkline.sparklineData);
    };
    /**
     * To find x axis interval.
     */
    SparklineRenderer.prototype.getInterval = function (data, x, type) {
        var interval = 1;
        var x1 = data[0][x];
        var x2 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[1]) ? undefined : data[1][x];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(x1) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(x2)) {
            var temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], data);
            var validData_1 = [];
            temp.forEach(function (value) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value[x])) {
                    validData_1.push(value);
                }
            });
            validData_1.sort(function (a, b) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(a[x]) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(b[x])) {
                    return 0;
                }
                return a[x] - b[x];
            });
            validData_1 = (this.sparkline.enableRtl) ? validData_1.reverse() : validData_1;
            interval = validData_1[1][x] - validData_1[0][x];
        }
        return interval;
    };
    /**
     * To calculate axis ranges internally.
     */
    // tslint:disable-next-line:max-func-body-length
    SparklineRenderer.prototype.findRanges = function (data) {
        var model = this.sparkline;
        var max;
        var min;
        var minX;
        var maxX;
        var maxPointsLength = data.length;
        var temp;
        var sumofValues = 0;
        var isNumericArray = Array.isArray(data) && typeof data[0] !== 'object';
        if (isNumericArray) {
            if (model.type === 'Pie') {
                for (var i = 0; i < maxPointsLength; i++) {
                    sumofValues += Math.abs(data[i]);
                }
            }
            else {
                max = Math.max.apply(null, data);
                min = Math.min.apply(null, data);
                minX = 0;
                maxX = maxPointsLength - 1;
            }
        }
        else {
            if (model.type === 'Pie') {
                for (var i = 0; i < maxPointsLength; i++) {
                    sumofValues += Math.abs(data[i][model.yName]);
                }
            }
            else {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[0][model.xName])) {
                    var x_1 = data.map(function (z) { return z[model.yName]; });
                    max = Math.max.apply(null, x_1);
                    min = Math.min.apply(null, x_1);
                }
                else {
                    temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], data);
                    temp = temp.sort(function (a, b) { return a[model.yName] - b[model.yName]; });
                    max = temp[temp.length - 1][model.yName];
                    min = temp[0][model.yName];
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[0][model.xName])) {
                    temp = temp.sort(function (a, b) { return a[model.xName] - b[model.xName]; });
                    temp = (this.sparkline.enableRtl) ? temp.reverse() : temp;
                    maxX = temp[temp.length - 1][model.xName];
                    minX = temp[0][model.xName];
                }
                else {
                    minX = 0;
                    maxX = maxPointsLength - 1;
                }
            }
        }
        var y2;
        var height;
        var width;
        var x1 = 0;
        var y1;
        var padding = model.padding;
        var point;
        var axis = model.axisSettings;
        var value = axis.value;
        var theme = model.theme.toLowerCase();
        if (model.type !== 'Pie') {
            this.maxLength = maxPointsLength;
            height = model.availableSize.height - (padding.bottom + padding.top);
            width = model.availableSize.width - (padding.left + padding.right);
            maxX = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.maxX) ? maxX : axis.maxX;
            minX = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.minX) ? minX : axis.minX;
            max = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.maxY) ? max : axis.maxY;
            min = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(axis.minY) ? min : axis.minY;
            var color = axis.lineSettings.color || this.sparkline.sparkTheme.axisLineColor;
            var eventArgs = {
                name: 'axisRendering', cancel: false, sparkline: model, maxX: maxX, minX: minX, maxY: max, minY: min,
                value: axis.value, lineColor: color, lineWidth: axis.lineSettings.width
            };
            model.trigger('axisRendering', eventArgs);
            if (eventArgs.cancel) {
                this.visiblePoints = [];
                return;
            }
            maxX = eventArgs.maxX;
            minX = eventArgs.minX;
            max = eventArgs.maxY;
            min = eventArgs.minY;
            value = this.axisValue = eventArgs.value;
            this.axisColor = eventArgs.lineColor;
            this.axisWidth = eventArgs.lineWidth;
            var unitX = maxX - minX;
            var unitY = max - min;
            unitX = (unitX === 0) ? 1 : unitX;
            unitY = (unitY === 0) ? 1 : unitY;
            this.unitX = unitX;
            this.unitY = unitY;
            this.min = min;
            x1 = 0;
            y1 = height - ((height / unitY) * (-min));
            y1 = (min < 0 && max <= 0) ? 0 : (min < 0 && max > 0) ? y1 : height;
            if (value >= min && value <= max) {
                y1 = height - Math.round(height * ((value - min) / this.unitY));
            }
            this.axisHeight = y1 + padding.top;
        }
        var percent;
        var x;
        var y;
        var visiblePoints = [];
        var interval = this.getInterval(data, model.xName, model.valueType);
        for (var i = 0; i < maxPointsLength; i++) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[i][model.xName]) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[i][model.yName]) && ((data[i][model.yName]) !== 0)
                && isNumericArray) {
                x = i;
                y = data[i];
            }
            else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[i][model.xName])) {
                x = i;
                y = data[i][model.yName];
            }
            else {
                x = data[i][model.xName];
                y = data[i][model.yName];
            }
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(x) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(y)) {
                continue;
            }
            if (model.type === 'Line' || model.type === 'Area') {
                y2 = (min !== max && maxPointsLength !== 1) ? height - Math.round(height * ((y - min) / this.unitY)) : padding.top;
                point = { x: (minX !== maxX) ? Math.round(width * ((x - minX) / this.unitX)) : width / 2, y: y2, markerPosition: y2 };
            }
            else if (model.type === 'Column' || model.type === 'WinLoss') {
                var colWidth = width / (((maxX - minX) / interval) + 1);
                var calSpace = 0.5;
                var space = (calSpace * 2); //calspace is default space for column and winloss
                colWidth -= (space);
                x1 = (((x - minX) / interval) * (colWidth + space)) + (space / 2);
                if (model.type === 'WinLoss') {
                    // win or gain column height half of the height , draw(zero) height factor
                    var winLossFactor = 0.5;
                    var drawHeightFactor = 40;
                    y2 = (y > value) ? (height / 4) : (y < value) ? (height * winLossFactor) :
                        ((height * winLossFactor) - (height / drawHeightFactor));
                    point = {
                        x: x1, y: y2, height: (y !== value) ? (height / 4) : height / 20, width: colWidth,
                        markerPosition: (y2 > y1) ? (y1 + Math.abs(y2 - y1)) : y2
                    };
                }
                else {
                    var z = ((height / this.unitY) * (y - min));
                    var z1 = (y === min && y > value) ? ((maxPointsLength !== 1 && this.unitY !== 1) ?
                        (height / this.unitY) * (min / 2) : (z | 1)) :
                        (y === max && y < value && maxPointsLength !== 1 && this.unitY !== 1) ? (height / this.unitY) * (-max / 2) : z;
                    y2 = Math.abs(height - z1);
                    point = {
                        x: x1, y: (y2 > y1) ? y1 : y2, height: Math.abs(y2 - y1),
                        width: colWidth, markerPosition: (y2 > y1) ? (y1 + Math.abs(y2 - y1)) : y2
                    };
                }
            }
            else if (model.type === 'Pie') {
                percent = (Math.abs(y) / sumofValues) * 100;
                point = {
                    percent: percent, degree: ((Math.abs(y) / sumofValues) * 360)
                };
            }
            if (model.type !== 'Pie') {
                point.x += padding.left;
                point.y += padding.top;
            }
            if (model.type !== 'WinLoss') {
                point.markerPosition += padding.top;
            }
            point.location = { x: point.x, y: point.y };
            point.xVal = x;
            point.yVal = y;
            visiblePoints.push(point);
        }
        visiblePoints.sort(function (a, b) {
            return a.x - b.x;
        });
        this.visiblePoints = visiblePoints;
    };
    /**
     * To render the sparkline axis
     */
    SparklineRenderer.prototype.drawAxis = function () {
        var spark = this.sparkline;
        var height = this.axisHeight;
        if ((spark.type !== 'WinLoss') && (spark.type !== 'Pie') && spark.axisSettings.lineSettings.visible) {
            var xAxis = {
                'id': spark.element.id + '_Sparkline_XAxis',
                'x1': spark.padding.left, 'y1': height,
                'x2': spark.availableSize.width - spark.padding.right, 'y2': height,
                'stroke': this.axisColor,
                'opacity': spark.axisSettings.lineSettings.opacity,
                'stroke-dasharray': spark.axisSettings.lineSettings.dashArray,
                'stroke-width': this.axisWidth,
                'clip-path': 'url(#' + this.clipId + ')'
            };
            spark.svgObject.appendChild(spark.renderer.drawLine(xAxis));
        }
    };
    /**
     * To trigger point render event
     */
    SparklineRenderer.prototype.triggerPointRender = function (name, i, fill, border) {
        var args = {
            name: name, cancel: false, border: border, fill: fill, sparkline: this.sparkline, pointIndex: i
        };
        var blazorArgs = {
            name: name, cancel: false, border: border, fill: fill, pointIndex: i
        };
        this.sparkline.trigger(name, this.sparkline.isBlazor ? blazorArgs : args);
        return args;
    };
    return SparklineRenderer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/sparkline/rendering/sparkline-tooltip.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/sparkline/rendering/sparkline-tooltip.js ***!
  \******************************************************************************************/
/*! exports provided: SparklineTooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparklineTooltip", function() { return SparklineTooltip; });
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/sparkline/utils/helper.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");



/**
 * Sparkline Tooltip Module
 */
var SparklineTooltip = /** @class */ (function () {
    function SparklineTooltip(sparkline) {
        this.sparkline = sparkline;
        this.addEventListener();
    }
    /**
     * @hidden
     */
    SparklineTooltip.prototype.addEventListener = function () {
        if (this.sparkline.isDestroyed) {
            return;
        }
        // this.sparkline.on('mouseleave', this.mouseLeaveHandler, this);
        this.sparkline.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Browser"].isPointer ? 'pointerleave' : 'mouseleave', this.mouseLeaveHandler, this);
        this.sparkline.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchMoveEvent, this.mouseMoveHandler, this);
        this.sparkline.on(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Browser"].touchEndEvent, this.mouseUpHandler, this);
    };
    SparklineTooltip.prototype.mouseLeaveHandler = function (e) {
        this.removeTooltipElements();
    };
    SparklineTooltip.prototype.mouseUpHandler = function (e) {
        if (!this.sparkline.isTouch) {
            return;
        }
        this.processTooltip(e);
        this.fadeOut();
    };
    SparklineTooltip.prototype.fadeOut = function () {
        clearTimeout(this.clearTooltip);
        this.clearTooltip = setTimeout(this.removeTooltipElements.bind(this), 5000);
    };
    /**
     * To remove tooltip and tracker elements.
     * @private
     */
    SparklineTooltip.prototype.removeTooltipElements = function () {
        this.removeTooltip();
        this.removeTracker();
    };
    SparklineTooltip.prototype.mouseMoveHandler = function (e) {
        this.processTooltip(e);
    };
    SparklineTooltip.prototype.processTooltip = function (e) {
        var pointIndex;
        var spark = this.sparkline;
        var visiblePoints = spark.sparklineRenderer.visiblePoints;
        var mouseX = spark.mouseX;
        var mouseY = spark.mouseY;
        if (spark.type !== 'Pie') {
            var locations = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])([], [], visiblePoints);
            var trackerPositions = locations.map(function (point) { return point.location.x; });
            var temp = Infinity;
            var mousePosition = void 0;
            for (var i = 0, diff = void 0, len = trackerPositions.length; i < len; i++) {
                diff = Math.abs(mouseX - trackerPositions[i]);
                if (temp > diff) {
                    temp = diff;
                    mousePosition = trackerPositions[i];
                    pointIndex = i;
                }
            }
        }
        else {
            var target = e.target.id;
            pointIndex = parseInt(target.split('_pie_')[1], 10);
        }
        if (isNaN(pointIndex) || !Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["withInBounds"])(mouseX, mouseY, new _utils_helper__WEBPACK_IMPORTED_MODULE_0__["Rect"](0, 0, spark.availableSize.width, spark.availableSize.height))) {
            this.removeTracker();
            this.removeTooltip();
            return;
        }
        if (this.pointIndex === pointIndex) {
            return;
        }
        this.pointIndex = pointIndex;
        this.renderTrackerLine(visiblePoints[pointIndex]);
        this.renderTooltip(visiblePoints[pointIndex]);
    };
    /**
     * To render tracker line
     */
    SparklineTooltip.prototype.renderTrackerLine = function (points) {
        var spark = this.sparkline;
        var theme = spark.theme.toLowerCase();
        var tracker = spark.tooltipSettings.trackLineSettings;
        var color = spark.sparkTheme.trackerLineColor ? spark.sparkTheme.trackerLineColor : tracker.color;
        if (!tracker.visible || spark.type === 'Pie') {
            return;
        }
        var group = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getIdElement"])(spark.element.id + '_sparkline_tracker_g');
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(group)) {
            group = spark.renderer.createGroup({ id: spark.element.id + '_sparkline_tracker_g' });
            spark.svgObject.appendChild(group);
        }
        var pathEle = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getIdElement"])(spark.element.id + '_sparkline_tracker');
        var d = 'M ' + points.location.x + ' ' + spark.padding.top + ' L ' + points.location.x + ' ' +
            (spark.availableSize.height - spark.padding.bottom);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(pathEle)) {
            var pathOption = new _utils_helper__WEBPACK_IMPORTED_MODULE_0__["PathOption"](spark.element.id + '_sparkline_tracker', 'transparent', tracker.width, color, 1);
            pathOption.d = d;
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["drawPath"])(spark, pathOption, group);
        }
        else {
            pathEle.setAttribute('d', d);
            pathEle.setAttribute('stroke-width', tracker.width.toString());
            pathEle.setAttribute('stroke', color);
        }
    };
    /**
     * To render line series
     */
    SparklineTooltip.prototype.renderTooltip = function (points) {
        var spark = this.sparkline;
        var tooltip = spark.tooltipSettings;
        if (!tooltip.visible) {
            return;
        }
        var div = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getIdElement"])(spark.element.id + '_sparkline_tooltip_div');
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(div)) {
            div = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["createElement"])('div', {
                id: spark.element.id + '_sparkline_tooltip_div',
                styles: 'pointer-events: none; position: absolute;z-index:1;'
            });
            Object(_utils_helper__WEBPACK_IMPORTED_MODULE_0__["getIdElement"])(spark.element.id + '_Secondary_Element').appendChild(div);
        }
        var size = (spark.markerSettings.visible.length) ? spark.markerSettings.size : 0;
        var x = points.xVal.toString();
        if (spark.valueType === 'Category') {
            x = spark.dataSource[points.xVal][spark.xName];
        }
        else if (spark.valueType === 'DateTime') {
            x = new Date(points.xVal).toDateString();
        }
        var y = points.yVal.toString();
        var text = this.getFormat(spark.tooltipSettings.format, spark, x, this.formatValue(points.yVal, spark).toString());
        var location = { x: points.location.x, y: points.location.y };
        location = spark.type === 'Pie' ? { x: points.location.x, y: points.location.y } : location;
        var textColor = tooltip.textStyle.color || spark.sparkTheme.tooltipFontColor;
        var backgroundColor = tooltip.fill === '' ? spark.sparkTheme.tooltipFill : tooltip.fill;
        var tooltipEvent = {
            name: 'tooltipInitialize', cancel: false, text: text,
            textStyle: {
                size: tooltip.textStyle.size,
                opacity: spark.sparkTheme.tooltipTextOpacity || tooltip.textStyle.opacity,
                fontWeight: tooltip.textStyle.fontWeight,
                fontStyle: tooltip.textStyle.fontStyle,
                fontFamily: spark.sparkTheme.fontFamily || tooltip.textStyle.fontFamily,
                color: textColor
            }
        };
        spark.trigger(tooltipEvent.name, tooltipEvent);
        if (tooltipEvent.cancel) {
            return;
        }
        var element = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Tooltip"]({
            content: tooltipEvent.text,
            border: tooltip.border,
            template: tooltip.template,
            data: spark.dataSource[this.pointIndex],
            fill: backgroundColor,
            textStyle: tooltipEvent.textStyle,
            enableAnimation: false,
            location: { x: location.x, y: location.y },
            shared: false,
            availableSize: this.sparkline.availableSize,
            areaBounds: new _utils_helper__WEBPACK_IMPORTED_MODULE_0__["Rect"](0, 0, spark.availableSize.width, spark.availableSize.height),
            theme: spark.theme
        });
        element.opacity = spark.sparkTheme.tooltipFillOpacity || element.opacity;
        element.appendTo(div);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["updateBlazorTemplate"])(div.id + 'Template', 'Template');
    };
    /**
     * To get tooltip format.
     */
    SparklineTooltip.prototype.getFormat = function (format, spark, x, y) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(format) || format === '') {
            return [y];
        }
        var text = format;
        text = text.split('${' + spark.xName + '}').join(x).split('${' + spark.yName + '}').join(y);
        return [text];
    };
    SparklineTooltip.prototype.formatValue = function (value, sparkline) {
        var formatValue;
        var formatFunction;
        if (sparkline.format && !isNaN(Number(value))) {
            formatFunction = sparkline.intl.getNumberFormat({ format: sparkline.format, useGrouping: sparkline.useGroupingSeparator });
            formatValue = formatFunction(value);
        }
        else {
            formatValue = value;
        }
        return formatValue;
    };
    /**
     * To remove tracker line.
     */
    SparklineTooltip.prototype.removeTracker = function () {
        var tracker = this.sparkline.element.querySelector('#' + this.sparkline.element.id + '_sparkline_tracker_g');
        return tracker ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["remove"])(tracker) : null;
    };
    /**
     * To remove tooltip element.
     */
    SparklineTooltip.prototype.removeTooltip = function () {
        this.pointIndex = null;
        var tooltip = this.sparkline.element.querySelector('#' + this.sparkline.element.id + '_sparkline_tooltip_div');
        return tooltip ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["remove"])(tooltip) : null;
    };
    /**
     * Get module name.
     */
    SparklineTooltip.prototype.getModuleName = function () {
        return 'SparklineTooltip';
    };
    /**
     * To destroy the tooltip.
     */
    SparklineTooltip.prototype.destroy = function (sparkline) {
        // To remove tooltip module
    };
    return SparklineTooltip;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/sparkline/sparkline.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/sparkline/sparkline.js ***!
  \************************************************************************/
/*! exports provided: Sparkline */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sparkline", function() { return Sparkline; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _model_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./model/base */ "./node_modules/@syncfusion/ej2-charts/src/sparkline/model/base.js");
/* harmony import */ var _utils_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/sparkline/utils/helper.js");
/* harmony import */ var _rendering_sparkline_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rendering/sparkline-renderer */ "./node_modules/@syncfusion/ej2-charts/src/sparkline/rendering/sparkline-renderer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};








//tslint:disable: no-duplicate-lines
/**
 * Represents the Sparkline control.
 * ```html
 * <div id="sparkline"/>
 * <script>
 *   var sparkline = new Sparkline();
 *   sparkline.appendTo("#sparkline");
 * </script>
 * ```
 */
var Sparkline = /** @class */ (function (_super) {
    __extends(Sparkline, _super);
    // Sparkline rendering starts from here.
    /**
     * Constructor for creating the Sparkline widget
     */
    function Sparkline(options, element) {
        var _this = _super.call(this, options, element) || this;
        /** @private */
        _this.isDevice = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice;
        return _this;
    }
    /**
     * Initializing pre-required values for sparkline.
     */
    Sparkline.prototype.preRender = function () {
        var blazor = 'Blazor';
        this.isBlazor = window[blazor];
        this.unWireEvents();
        this.trigger('load', { sparkline: this });
        this.sparkTheme = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getThemeColor"])(this.theme);
        this.sparklineRenderer = new _rendering_sparkline_renderer__WEBPACK_IMPORTED_MODULE_3__["SparklineRenderer"](this);
        this.createSVG();
        this.wireEvents();
        this.setCulture();
    };
    /**
     * Sparkline Elements rendering starting.
     */
    Sparkline.prototype.render = function () {
        // Sparkline rendering splitted into rendering and calculations
        this.sparklineRenderer.processDataManager();
        this.sparklineRenderer.processData();
        this.renderSparkline();
        this.element.appendChild(this.svgObject);
        this.setSecondaryElementPosition();
        this.trigger('loaded', this.isBlazor ? {} : { sparkline: this });
    };
    /**
     * To render sparkline elements
     */
    Sparkline.prototype.renderSparkline = function () {
        // To render the sparkline elements
        this.renderBorder();
        this.createDiv();
        this.sparklineRenderer.renderSeries();
    };
    /**
     * Create secondary element for the tooltip
     */
    Sparkline.prototype.createDiv = function () {
        var tooltipDiv = document.createElement('div');
        tooltipDiv.id = this.element.id + '_Secondary_Element';
        tooltipDiv.setAttribute('style', 'position: relative');
        this.element.appendChild(tooltipDiv);
        this.element.style.display = 'block';
        this.element.style.position = 'relative';
    };
    /**
     * To set the left and top position for data label template for sparkline
     */
    Sparkline.prototype.setSecondaryElementPosition = function () {
        var element = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getIdElement"])(this.element.id + '_Secondary_Element');
        if (!element) {
            return;
        }
        var rect = this.element.getBoundingClientRect();
        var svgRect = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getIdElement"])(this.element.id + '_svg').getBoundingClientRect();
        element.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
        element.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
    };
    /**
     * @private
     * Render the sparkline border
     */
    Sparkline.prototype.renderBorder = function () {
        var width = this.containerArea.border.width;
        var borderRect;
        if (width > 0 || this.containerArea.background !== 'transparent') {
            borderRect = new _utils_helper__WEBPACK_IMPORTED_MODULE_2__["RectOption"](this.element.id + '_SparklineBorder', this.sparkTheme.background, this.containerArea.border, 1, new _utils_helper__WEBPACK_IMPORTED_MODULE_2__["Rect"](width / 2, width / 2, this.availableSize.width - width, this.availableSize.height - width));
            this.svgObject.appendChild(Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["drawRectangle"])(this, borderRect));
        }
        // Used to create clip path sparkline
        var padding = this.padding;
        borderRect = new _utils_helper__WEBPACK_IMPORTED_MODULE_2__["RectOption"](this.element.id + '_sparkline_clip_rect', 'transparent', { color: 'transparent', width: 0 }, 1, new _utils_helper__WEBPACK_IMPORTED_MODULE_2__["Rect"](padding.left, padding.top, this.availableSize.width - (padding.left + padding.right), this.availableSize.height - (padding.top + padding.bottom)));
        var clipPath = this.renderer.createClipPath({ id: this.element.id + '_sparkline_clip_path' });
        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["drawRectangle"])(this, borderRect, clipPath);
        this.svgObject.appendChild(clipPath);
    };
    /**
     * To create svg element for sparkline
     */
    Sparkline.prototype.createSVG = function () {
        this.removeSvg();
        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["createSvg"])(this);
    };
    /**
     * To Remove the Sparkline SVG object
     */
    Sparkline.prototype.removeSvg = function () {
        if (this.svgObject) {
            while (this.svgObject.childNodes.length > 0) {
                this.svgObject.removeChild(this.svgObject.firstChild);
            }
            if (!this.svgObject.hasChildNodes() && this.svgObject.parentNode) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.svgObject);
            }
        }
        Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["removeElement"])(this.element.id + '_Secondary_Element');
        if (this.sparklineTooltipModule) {
            this.sparklineTooltipModule.removeTooltipElements();
        }
    };
    /**
     * Method to set culture for sparkline
     */
    Sparkline.prototype.setCulture = function () {
        this.intl = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"]();
        this.localeObject = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName(), this.defaultLocalConstants, this.locale);
    };
    /**
     * To provide the array of modules needed for sparkline rendering
     * @return {ModuleDeclaration[]}
     * @private
     */
    Sparkline.prototype.requiredModules = function () {
        var modules = [];
        if (this.tooltipSettings.visible || this.tooltipSettings.trackLineSettings.visible) {
            modules.push({
                member: 'SparklineTooltip',
                args: [this]
            });
        }
        return modules;
    };
    /**
     * Method to unbind events for sparkline chart
     */
    Sparkline.prototype.unWireEvents = function () {
        var move = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent;
        var cancel = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        /*! UnBind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.sparklineMove);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, cancel, this.sparklineMouseLeave);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.sparklineMouseEnd);
        window.removeEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.sparklineResize);
    };
    /**
     * Method to bind events for the sparkline
     */
    Sparkline.prototype.wireEvents = function () {
        var cancel = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        /*! Bind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.sparklineMove, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.sparklineClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, cancel, this.sparklineMouseLeave, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.sparklineMouseEnd, this);
        window.addEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.sparklineResize.bind(this));
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element);
    };
    /**
     * Sparkline resize event.
     * @private
     */
    Sparkline.prototype.sparklineResize = function (e) {
        var _this = this;
        var args = {
            name: 'resize',
            previousSize: this.availableSize,
            sparkline: this,
            currentSize: new _utils_helper__WEBPACK_IMPORTED_MODULE_2__["Size"](0, 0)
        };
        if (this.resizeTo) {
            clearTimeout(this.resizeTo);
        }
        this.resizeTo = setTimeout(function () {
            if (_this.isDestroyed) {
                clearTimeout(_this.resizeTo);
                return;
            }
            _this.unWireEvents();
            _this.createSVG();
            _this.refreshing = true;
            _this.wireEvents();
            args.currentSize = _this.availableSize;
            _this.trigger('resize', _this.isBlazor ? {} : args);
            _this.render();
        }, 500);
        return false;
    };
    /**
     * Handles the mouse move on sparkline.
     * @return {boolean}
     * @private
     */
    Sparkline.prototype.sparklineMove = function (e) {
        this.setSparklineMouseXY(e);
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, e);
        var args = {
            name: 'sparklineMouseMove', cancel: false, sparkline: this, event: e
        };
        var blazorArgs = {
            name: 'sparklineMouseMove', cancel: false, event: e
        };
        this.trigger(args.name, this.isBlazor ? blazorArgs : args);
        var pointClick = this.isPointRegion(e);
        if (pointClick.isPointRegion) {
            var pointArgs = {
                name: 'pointRegionMouseMove', cancel: false, event: e, sparkline: this, pointIndex: pointClick.pointIndex
            };
            var pointBlazorArgs = {
                name: 'pointRegionMouseMove', cancel: false, event: e, pointIndex: pointClick.pointIndex
            };
            this.trigger(pointArgs.name, this.isBlazor ? pointBlazorArgs : pointArgs);
        }
        return false;
    };
    /**
     * Handles the mouse click on sparkline.
     * @return {boolean}
     * @private
     */
    Sparkline.prototype.sparklineClick = function (e) {
        this.setSparklineMouseXY(e);
        var args = {
            name: 'sparklineMouseClick', cancel: false, sparkline: this, event: e
        };
        var blazorArgs = {
            name: 'sparklineMouseClick', cancel: false, event: e
        };
        this.trigger(args.name, this.isBlazor ? blazorArgs : args);
        var pointClick = this.isPointRegion(e);
        if (pointClick.isPointRegion) {
            var pointArgs = {
                name: 'pointRegionMouseClick', cancel: false, event: e, sparkline: this, pointIndex: pointClick.pointIndex
            };
            var pointBlazorArgs = {
                name: 'pointRegionMouseClick', cancel: false, event: e, pointIndex: pointClick.pointIndex
            };
            this.trigger(pointArgs.name, this.isBlazor ? pointBlazorArgs : pointArgs);
        }
        return false;
    };
    /**
     * To check mouse event target is point region or not.
     */
    Sparkline.prototype.isPointRegion = function (e) {
        var _this = this;
        var startId = this.element.id + '_';
        var id = e.target.id.replace(startId, '').split('_');
        if (id[1] === this.type.toLowerCase()) {
            var index_1 = parseInt(id[2], 10);
            if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index_1) || isNaN(index_1)) && (this.type === 'Line' || this.type === 'Area')) {
                this.sparklineRenderer.visiblePoints.forEach(function (point, i) {
                    if (Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["withInBounds"])(_this.mouseX, _this.mouseY, new _utils_helper__WEBPACK_IMPORTED_MODULE_2__["Rect"](point.x - 5, point.y - 5, 10, 10))) {
                        index_1 = i;
                        return;
                    }
                });
            }
            return { isPointRegion: true, pointIndex: index_1 };
        }
        return { isPointRegion: false, pointIndex: null };
    };
    /**
     * Handles the mouse end.
     * @return {boolean}
     * @private
     */
    Sparkline.prototype.sparklineMouseEnd = function (e) {
        this.setSparklineMouseXY(e);
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, e);
        return false;
    };
    /**
     * Handles the mouse leave on sparkline.
     * @return {boolean}
     * @private
     */
    Sparkline.prototype.sparklineMouseLeave = function (e) {
        this.setSparklineMouseXY(e);
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave', e);
        return false;
    };
    /**
     * Method to set mouse x, y from events
     */
    Sparkline.prototype.setSparklineMouseXY = function (e) {
        var pageY;
        var pageX;
        if (e.type.indexOf('touch') > -1) {
            this.isTouch = true;
            var touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            pageY = touchArg.changedTouches[0].clientY;
        }
        else {
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2';
            pageY = e.clientY;
            pageX = e.clientX;
        }
        var rect = this.element.getBoundingClientRect();
        var svgRect = Object(_utils_helper__WEBPACK_IMPORTED_MODULE_2__["getIdElement"])(this.element.id + '_svg').getBoundingClientRect();
        this.mouseY = (pageY - rect.top) - Math.max(svgRect.top - rect.top, 0);
        this.mouseX = (pageX - rect.left) - Math.max(svgRect.left - rect.left, 0);
    };
    /**
     * To change rendering while property value modified.
     * @private
     */
    Sparkline.prototype.onPropertyChanged = function (newProp, oldProp) {
        var render = false;
        var refresh = false;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'xName':
                case 'yName':
                case 'dataSource':
                case 'axisSettings':
                case 'type':
                case 'valueType':
                    refresh = true;
                    break;
                case 'border':
                case 'markerSettings':
                case 'dataLabelSettings':
                case 'tooltipSettings':
                case 'startPointColor':
                case 'highPointColor':
                case 'lowPointColor':
                case 'endPointColor':
                case 'negativePointColor':
                case 'theme':
                    render = true;
                    break;
            }
        }
        if (refresh) {
            this.createSVG();
            this.sparklineRenderer.processData();
            this.refreshSparkline();
        }
        else if (render) {
            this.createSVG();
            this.refreshSparkline();
        }
    };
    /**
     * To render sparkline series and appending.
     */
    Sparkline.prototype.refreshSparkline = function () {
        // Issue fix. React had native render method. So OnProperty change used render method won't wrok. 
        this.renderSparkline();
        this.element.appendChild(this.svgObject);
        this.setSecondaryElementPosition();
    };
    /**
     * Get component name
     */
    Sparkline.prototype.getModuleName = function () {
        return 'sparkline';
    };
    /**
     * Destroy the component
     */
    Sparkline.prototype.destroy = function () {
        _super.prototype.destroy.call(this);
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @private
     */
    Sparkline.prototype.getPersistData = function () {
        return '';
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sparkline.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sparkline.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_base__WEBPACK_IMPORTED_MODULE_1__["SparklineBorder"])
    ], Sparkline.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Line')
    ], Sparkline.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sparkline.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sparkline.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Numeric')
    ], Sparkline.prototype, "valueType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sparkline.prototype, "xName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sparkline.prototype, "yName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#00bdae')
    ], Sparkline.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Sparkline.prototype, "highPointColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Sparkline.prototype, "lowPointColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Sparkline.prototype, "startPointColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Sparkline.prototype, "endPointColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Sparkline.prototype, "negativePointColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Sparkline.prototype, "tiePointColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], Sparkline.prototype, "palette", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Sparkline.prototype, "lineWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Sparkline.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sparkline.prototype, "format", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Sparkline.prototype, "useGroupingSeparator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_base__WEBPACK_IMPORTED_MODULE_1__["SparklineTooltipSettings"])
    ], Sparkline.prototype, "tooltipSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_base__WEBPACK_IMPORTED_MODULE_1__["ContainerArea"])
    ], Sparkline.prototype, "containerArea", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _model_base__WEBPACK_IMPORTED_MODULE_1__["RangeBandSettings"])
    ], Sparkline.prototype, "rangeBandSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_base__WEBPACK_IMPORTED_MODULE_1__["AxisSettings"])
    ], Sparkline.prototype, "axisSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_base__WEBPACK_IMPORTED_MODULE_1__["SparklineMarkerSettings"])
    ], Sparkline.prototype, "markerSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_base__WEBPACK_IMPORTED_MODULE_1__["SparklineDataLabelSettings"])
    ], Sparkline.prototype, "dataLabelSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_base__WEBPACK_IMPORTED_MODULE_1__["Padding"])
    ], Sparkline.prototype, "padding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Material')
    ], Sparkline.prototype, "theme", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "loaded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "load", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "tooltipInitialize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "seriesRendering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "axisRendering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "pointRendering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "pointRegionMouseMove", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "pointRegionMouseClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "sparklineMouseMove", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "sparklineMouseClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "dataLabelRendering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "markerRendering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sparkline.prototype, "resize", void 0);
    Sparkline = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Sparkline);
    return Sparkline;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/sparkline/utils/helper.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/sparkline/utils/helper.js ***!
  \***************************************************************************/
/*! exports provided: Size, getThemeColor, stringToNumber, calculateSize, createSvg, Rect, PathOption, RectOption, CircleOption, appendShape, drawCircle, calculateRoundedRectPath, drawRectangle, drawPath, measureText, TextOption, renderTextElement, removeElement, getIdElement, withInBounds */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Size", function() { return Size; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeColor", function() { return getThemeColor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringToNumber", function() { return stringToNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateSize", function() { return calculateSize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSvg", function() { return createSvg; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return Rect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PathOption", function() { return PathOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RectOption", function() { return RectOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CircleOption", function() { return CircleOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendShape", function() { return appendShape; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawCircle", function() { return drawCircle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateRoundedRectPath", function() { return calculateRoundedRectPath; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawRectangle", function() { return drawRectangle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawPath", function() { return drawPath; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "measureText", function() { return measureText; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextOption", function() { return TextOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderTextElement", function() { return renderTextElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return removeElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getIdElement", function() { return getIdElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withInBounds", function() { return withInBounds; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * Sparkline control helper file
 */
/**
 * sparkline internal use of `Size` type
 */
var Size = /** @class */ (function () {
    function Size(width, height) {
        this.width = width;
        this.height = height;
    }
    return Size;
}());

/**
 * To find the default colors based on theme.
 * @private
 */
function getThemeColor(theme) {
    var themeColors;
    switch (theme.toLowerCase()) {
        case 'bootstrapdark':
        case 'fabricdark':
        case 'materialdark':
        case 'highcontrast':
            themeColors = {
                axisLineColor: '#ffffff',
                dataLabelColor: '#ffffff',
                rangeBandColor: '#ffffff',
                tooltipFill: '#ffffff',
                background: '#000000',
                tooltipFontColor: '#363F4C',
                trackerLineColor: '#ffffff'
            };
            break;
        case 'bootstrap4':
            themeColors = {
                axisLineColor: '#6C757D',
                dataLabelColor: '#212529',
                rangeBandColor: '#212529',
                tooltipFill: '#000000',
                background: '#FFFFFF',
                tooltipFontColor: '#FFFFFF',
                trackerLineColor: '#212529',
                fontFamily: 'HelveticaNeue-Medium',
                tooltipFillOpacity: 1,
                tooltipTextOpacity: 0.9,
                labelFontFamily: 'HelveticaNeue'
            };
            break;
        default: {
            themeColors = {
                axisLineColor: '#000000',
                dataLabelColor: '#424242',
                rangeBandColor: '#000000',
                background: '#FFFFFF',
                tooltipFill: '#363F4C',
                tooltipFontColor: '#ffffff',
                trackerLineColor: '#000000'
            };
            break;
        }
    }
    return themeColors;
}
/**
 * To find number from string
 * @private
 */
function stringToNumber(value, containerSize) {
    if (value !== null && value !== undefined) {
        return value.indexOf('%') !== -1 ? (containerSize / 100) * parseInt(value, 10) : parseInt(value, 10);
    }
    return null;
}
/**
 * Method to calculate the width and height of the sparkline
 */
function calculateSize(sparkline) {
    var containerWidth = sparkline.element.clientWidth;
    var containerHeight = sparkline.element.clientHeight;
    sparkline.availableSize = new Size(stringToNumber(sparkline.width, containerWidth) || containerWidth || 100, stringToNumber(sparkline.height, containerHeight) || containerHeight || (sparkline.isDevice ?
        Math.min(window.innerWidth, window.innerHeight) : 50));
}
/**
 * Method to create svg for sparkline.
 */
function createSvg(sparkline) {
    sparkline.renderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["SvgRenderer"](sparkline.element.id);
    calculateSize(sparkline);
    sparkline.svgObject = sparkline.renderer.createSvg({
        id: sparkline.element.id + '_svg',
        width: sparkline.availableSize.width,
        height: sparkline.availableSize.height
    });
}
/**
 * Internal use of type rect
 * @private
 */
var Rect = /** @class */ (function () {
    function Rect(x, y, width, height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }
    return Rect;
}());

/**
 * Internal use of path options
 * @private
 */
var PathOption = /** @class */ (function () {
    function PathOption(id, fill, width, color, opacity, dashArray, d) {
        this.id = id;
        this.fill = fill;
        this.opacity = opacity;
        this['stroke-width'] = width;
        this.stroke = color;
        this.d = d;
        this['stroke-dasharray'] = dashArray;
    }
    return PathOption;
}());

/**
 * Internal use of rectangle options
 * @private
 */
var RectOption = /** @class */ (function (_super) {
    __extends(RectOption, _super);
    function RectOption(id, fill, border, opacity, rect, tl, tr, bl, br) {
        if (tl === void 0) { tl = 0; }
        if (tr === void 0) { tr = 0; }
        if (bl === void 0) { bl = 0; }
        if (br === void 0) { br = 0; }
        var _this = _super.call(this, id, fill, border.width, border.color, opacity) || this;
        _this.rect = rect;
        _this.topLeft = tl;
        _this.topRight = tr;
        _this.bottomLeft = bl;
        _this.bottomRight = br;
        return _this;
    }
    return RectOption;
}(PathOption));

/**
 * Internal use of circle options
 * @private
 */
var CircleOption = /** @class */ (function (_super) {
    __extends(CircleOption, _super);
    function CircleOption(id, fill, border, opacity, cx, cy, r, dashArray) {
        var _this = _super.call(this, id, fill, border.width, border.color, opacity) || this;
        _this.cy = cy;
        _this.cx = cx;
        _this.r = r;
        _this['stroke-dasharray'] = dashArray;
        return _this;
    }
    return CircleOption;
}(PathOption));

/**
 * Internal use of append shape element
 * @private
 */
function appendShape(shape, element) {
    if (element) {
        element.appendChild(shape);
    }
    return shape;
}
/**
 * Internal rendering of Circle
 * @private
 */
function drawCircle(sparkline, options, element) {
    return appendShape(sparkline.renderer.drawCircle(options), element);
}
/**
 * To get rounded rect path direction
 */
function calculateRoundedRectPath(r, topLeft, topRight, bottomLeft, bottomRight) {
    return 'M' + ' ' + r.x + ' ' + (topLeft + r.y) +
        ' Q ' + r.x + ' ' + r.y + ' ' + (r.x + topLeft) + ' ' +
        r.y + ' ' + 'L' + ' ' + (r.x + r.width - topRight) + ' ' + r.y +
        ' Q ' + (r.x + r.width) + ' ' + r.y + ' ' +
        (r.x + r.width) + ' ' + (r.y + topRight) + ' ' + 'L ' +
        (r.x + r.width) + ' ' + (r.y + r.height - bottomRight)
        + ' Q ' + (r.x + r.width) + ' ' + (r.y + r.height) + ' ' + (r.x + r.width - bottomRight) + ' ' +
        (r.y + r.height) + ' ' + 'L ' + (r.x + bottomLeft) + ' ' + (r.y + r.height) + ' Q ' + r.x + ' ' +
        (r.y + r.height) + ' ' + r.x + ' ' + (r.y + r.height - bottomLeft) + ' ' + 'L' + ' ' + r.x + ' ' +
        (topLeft + r.y) + ' ' + 'Z';
}
/**
 * Internal rendering of Rectangle
 * @private
 */
function drawRectangle(sparkline, options, element) {
    options.d = calculateRoundedRectPath(options.rect, options.topLeft, options.topRight, options.bottomLeft, options.bottomRight);
    return appendShape(sparkline.renderer.drawPath(options), element);
}
/**
 * Internal rendering of Path
 * @private
 */
function drawPath(sparkline, options, element) {
    return appendShape(sparkline.renderer.drawPath(options), element);
}
/**
 * Function to measure the height and width of the text.
 * @param  {string} text
 * @param  {SparklineFontModel} font
 * @param  {string} id
 * @returns no
 * @private
 */
function measureText(text, font) {
    var htmlObject = document.getElementById('sparklinesmeasuretext');
    if (htmlObject === null) {
        htmlObject = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('text', { id: 'sparklinesmeasuretext' });
        document.body.appendChild(htmlObject);
    }
    htmlObject.innerHTML = text;
    htmlObject.style.fontStyle = font.fontStyle;
    htmlObject.style.fontFamily = font.fontFamily;
    htmlObject.style.visibility = 'hidden';
    htmlObject.style.top = '-100';
    htmlObject.style.left = '0';
    htmlObject.style.position = 'absolute';
    htmlObject.style.fontSize = font.size;
    htmlObject.style.fontWeight = font.fontWeight;
    htmlObject.style.whiteSpace = 'nowrap';
    // For bootstrap line height issue
    htmlObject.style.lineHeight = 'normal';
    return new Size(htmlObject.clientWidth, htmlObject.clientHeight);
}
/**
 * Internal use of text options
 * @private
 */
var TextOption = /** @class */ (function () {
    function TextOption(id, x, y, anchor, text, baseLine, transform) {
        if (transform === void 0) { transform = ''; }
        this.transform = '';
        this.baseLine = 'auto';
        this.id = id;
        this.x = x;
        this.y = y;
        this.anchor = anchor;
        this.text = text;
        this.transform = transform;
        this.baseLine = baseLine;
    }
    return TextOption;
}());

/**
 * Internal rendering of text
 * @private
 */
function renderTextElement(options, font, color, parent) {
    var textOptions = {
        'id': options.id,
        'x': options.x,
        'y': options.y,
        'transform': options.transform,
        'opacity': font.opacity,
        'fill': color,
        'font-family': font.fontFamily,
        'font-weight': font.fontWeight,
        'font-size': font.size,
        'font-style': font.fontStyle,
        'text-anchor': options.anchor,
        'dominant-baseline': options.baseLine
    };
    var renderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["SvgRenderer"]('');
    var htmlObject = renderer.createText(textOptions, options.text);
    htmlObject.style['user-select'] = 'none';
    htmlObject.style['-moz-user-select'] = 'none';
    htmlObject.style['-webkit-touch-callout'] = 'none';
    htmlObject.style['-webkit-user-select'] = 'none';
    htmlObject.style['-khtml-user-select'] = 'none';
    htmlObject.style['-ms-user-select'] = 'none';
    htmlObject.style['-o-user-select'] = 'none';
    parent.appendChild(htmlObject);
    return htmlObject;
}
/**
 * To remove element by id
 */
function removeElement(id) {
    var element = document.getElementById(id);
    return element ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element) : null;
}
/**
 * To find the element by id
 */
function getIdElement(id) {
    return document.getElementById(id);
}
/**
 * To find point within the bounds.
 */
function withInBounds(x, y, bounds) {
    return (x >= bounds.x && x <= bounds.x + bounds.width && y >= bounds.y && y <= bounds.y + bounds.height);
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/index.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/stock-chart/index.js ***!
  \**********************************************************************/
/*! exports provided: StockChart, StockChartFont, StockChartBorder, StockChartArea, StockMargin, StockChartStripLineSettings, StockEmptyPointSettings, StockChartConnector, StockSeries, StockChartIndicator, StockChartAxis, StockChartRow, StockChartTrendline, StockChartAnnotationSettings, StockChartIndexes, StockEventsSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _stock_chart__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stock-chart */ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/stock-chart.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChart", function() { return _stock_chart__WEBPACK_IMPORTED_MODULE_0__["StockChart"]; });

/* harmony import */ var _model_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./model/base */ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/model/base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartFont", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartBorder", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartArea", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartArea"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockMargin", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockMargin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartStripLineSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartStripLineSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockEmptyPointSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockEmptyPointSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartConnector", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartConnector"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockSeries", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockSeries"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartIndicator", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartIndicator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartAxis", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartAxis"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartRow", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartTrendline", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartTrendline"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartAnnotationSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartAnnotationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockChartIndexes", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockChartIndexes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StockEventsSettings", function() { return _model_base__WEBPACK_IMPORTED_MODULE_1__["StockEventsSettings"]; });

/**
 * Financial chart exports
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/model/base.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/stock-chart/model/base.js ***!
  \***************************************************************************/
/*! exports provided: StockChartFont, StockChartBorder, StockChartArea, StockMargin, StockChartStripLineSettings, StockEmptyPointSettings, StockChartConnector, StockSeries, StockChartIndicator, StockChartAxis, StockChartRow, StockChartTrendline, StockChartAnnotationSettings, StockChartIndexes, StockEventsSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartFont", function() { return StockChartFont; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartBorder", function() { return StockChartBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartArea", function() { return StockChartArea; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockMargin", function() { return StockMargin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartStripLineSettings", function() { return StockChartStripLineSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockEmptyPointSettings", function() { return StockEmptyPointSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartConnector", function() { return StockChartConnector; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockSeries", function() { return StockSeries; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartIndicator", function() { return StockChartIndicator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartAxis", function() { return StockChartAxis; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartRow", function() { return StockChartRow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartTrendline", function() { return StockChartTrendline; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartAnnotationSettings", function() { return StockChartAnnotationSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChartIndexes", function() { return StockChartIndexes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockEventsSettings", function() { return StockEventsSettings; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _chart_series_chart_series__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../chart/series/chart-series */ "./node_modules/@syncfusion/ej2-charts/src/chart/series/chart-series.js");
/* harmony import */ var _chart_axis_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../chart/axis/axis */ "./node_modules/@syncfusion/ej2-charts/src/chart/axis/axis.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _common_model_theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 StockChartFont = /** @class */ (function (_super) {
    __extends(StockChartFont, _super);
    function StockChartFont() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartFont.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('16px')
    ], StockChartFont.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Segoe UI')
    ], StockChartFont.prototype, "fontFamily", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Normal')
    ], StockChartFont.prototype, "fontStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Normal')
    ], StockChartFont.prototype, "fontWeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockChartFont.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Trim')
    ], StockChartFont.prototype, "textOverflow", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], StockChartFont.prototype, "textAlignment", void 0);
    return StockChartFont;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Border
 */
var StockChartBorder = /** @class */ (function (_super) {
    __extends(StockChartBorder, _super);
    function StockChartBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartBorder.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockChartBorder.prototype, "width", void 0);
    return StockChartBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the chart area.
 */
var StockChartArea = /** @class */ (function (_super) {
    __extends(StockChartArea, _super);
    function StockChartArea() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, StockChartBorder)
    ], StockChartArea.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('transparent')
    ], StockChartArea.prototype, "background", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockChartArea.prototype, "opacity", void 0);
    return StockChartArea;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the chart margins.
 */
var StockMargin = /** @class */ (function (_super) {
    __extends(StockMargin, _super);
    function StockMargin() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], StockMargin.prototype, "left", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], StockMargin.prototype, "right", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], StockMargin.prototype, "top", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], StockMargin.prototype, "bottom", void 0);
    return StockMargin;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * StockChart strip line settings
 */
var StockChartStripLineSettings = /** @class */ (function (_super) {
    __extends(StockChartStripLineSettings, _super);
    function StockChartStripLineSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockChartStripLineSettings.prototype, "startFromAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockChartStripLineSettings.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "start", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#808080')
    ], StockChartStripLineSettings.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "end", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], StockChartStripLineSettings.prototype, "sizeType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockChartStripLineSettings.prototype, "isRepeat", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "repeatEvery", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockChartStripLineSettings.prototype, "isSegmented", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "repeatUntil", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "segmentStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "segmentAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "segmentEnd", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockChartStripLineSettings.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartStripLineSettings.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'transparent', width: 1 }, StockChartBorder)
    ], StockChartStripLineSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartStripLineSettings.prototype, "rotation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Behind')
    ], StockChartStripLineSettings.prototype, "zIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Middle')
    ], StockChartStripLineSettings.prototype, "horizontalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Middle')
    ], StockChartStripLineSettings.prototype, "verticalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_4__["Theme"].stripLineLabelFont, StockChartFont)
    ], StockChartStripLineSettings.prototype, "textStyle", void 0);
    return StockChartStripLineSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var Animation = /** @class */ (function (_super) {
    __extends(Animation, _super);
    function Animation() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Animation.prototype, "delay", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Animation.prototype, "enable", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)
    ], Animation.prototype, "duration", void 0);
    return Animation;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));
var StockEmptyPointSettings = /** @class */ (function (_super) {
    __extends(StockEmptyPointSettings, _super);
    function StockEmptyPointSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockEmptyPointSettings.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Gap')
    ], StockEmptyPointSettings.prototype, "mode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'transparent', width: 0 }, StockChartBorder)
    ], StockEmptyPointSettings.prototype, "border", void 0);
    return StockEmptyPointSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var StockChartConnector = /** @class */ (function (_super) {
    __extends(StockChartConnector, _super);
    function StockChartConnector() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Line')
    ], StockChartConnector.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartConnector.prototype, "length", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartConnector.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartConnector.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockChartConnector.prototype, "width", void 0);
    return StockChartConnector;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the Annotation for chart.
 */
var StockSeries = /** @class */ (function (_super) {
    __extends(StockSeries, _super);
    function StockSeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('date')
    ], StockSeries.prototype, "xName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('close')
    ], StockSeries.prototype, "yName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('open')
    ], StockSeries.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('close')
    ], StockSeries.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('high')
    ], StockSeries.prototype, "high", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('low')
    ], StockSeries.prototype, "low", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('volume')
    ], StockSeries.prototype, "volume", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockSeries.prototype, "pointColorMapping", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, Animation)
    ], StockSeries.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockSeries.prototype, "xAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockSeries.prototype, "yAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockSeries.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], StockSeries.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockSeries.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockSeries.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockSeries.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], StockSeries.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#e74c3d')
    ], StockSeries.prototype, "bullFillColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#2ecd71')
    ], StockSeries.prototype, "bearFillColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockSeries.prototype, "enableSolidCandles", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockSeries.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'transparent', width: 0 }, StockChartBorder)
    ], StockSeries.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockSeries.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Candle')
    ], StockSeries.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, _chart_series_chart_series__WEBPACK_IMPORTED_MODULE_1__["MarkerSettings"])
    ], StockSeries.prototype, "marker", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _chart_series_chart_series__WEBPACK_IMPORTED_MODULE_1__["Trendline"])
    ], StockSeries.prototype, "trendlines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockSeries.prototype, "enableTooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockSeries.prototype, "tooltipMappingName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockSeries.prototype, "selectionStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0.5)
    ], StockSeries.prototype, "cardinalSplineTension", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, _common_model_base__WEBPACK_IMPORTED_MODULE_3__["CornerRadius"])
    ], StockSeries.prototype, "cornerRadius", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, StockEmptyPointSettings)
    ], StockSeries.prototype, "emptyPointSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockSeries.prototype, "columnWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockSeries.prototype, "columnSpacing", void 0);
    return StockSeries;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var StockChartIndicator = /** @class */ (function (_super) {
    __extends(StockChartIndicator, _super);
    function StockChartIndicator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Sma')
    ], StockChartIndicator.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(14)
    ], StockChartIndicator.prototype, "period", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], StockChartIndicator.prototype, "dPeriod", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(14)
    ], StockChartIndicator.prototype, "kPeriod", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(80)
    ], StockChartIndicator.prototype, "overBought", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(20)
    ], StockChartIndicator.prototype, "overSold", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Close')
    ], StockChartIndicator.prototype, "field", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], StockChartIndicator.prototype, "standardDeviation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(12)
    ], StockChartIndicator.prototype, "slowPeriod", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockChartIndicator.prototype, "showZones", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(26)
    ], StockChartIndicator.prototype, "fastPeriod", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#ff9933', width: 2 }, StockChartConnector)
    ], StockChartIndicator.prototype, "macdLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Both')
    ], StockChartIndicator.prototype, "macdType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#e74c3d')
    ], StockChartIndicator.prototype, "macdNegativeColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#2ecd71')
    ], StockChartIndicator.prototype, "macdPositiveColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('rgba(211,211,211,0.25)')
    ], StockChartIndicator.prototype, "bandColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#ffb735', width: 1 }, StockChartConnector)
    ], StockChartIndicator.prototype, "upperLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartIndicator.prototype, "seriesName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#f2ec2f', width: 1 }, StockChartConnector)
    ], StockChartIndicator.prototype, "periodLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#f2ec2f', width: 1 }, StockChartConnector)
    ], StockChartIndicator.prototype, "lowerLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartIndicator.prototype, "high", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartIndicator.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartIndicator.prototype, "low", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartIndicator.prototype, "xName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartIndicator.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartIndicator.prototype, "pointColorMapping", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartIndicator.prototype, "volume", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartIndicator.prototype, "xAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartIndicator.prototype, "yAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(null, Animation)
    ], StockChartIndicator.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartIndicator.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], StockChartIndicator.prototype, "dashArray", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockChartIndicator.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], StockChartIndicator.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartIndicator.prototype, "dataSource", void 0);
    return StockChartIndicator;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var StockChartAxis = /** @class */ (function (_super) {
    __extends(StockChartAxis, _super);
    function StockChartAxis() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_axis_axis__WEBPACK_IMPORTED_MODULE_2__["CrosshairTooltip"])
    ], StockChartAxis.prototype, "crosshairTooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_4__["Theme"].axisLabelFont, StockChartFont)
    ], StockChartAxis.prototype, "labelStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartAxis.prototype, "title", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_4__["Theme"].axisTitleFont, StockChartFont)
    ], StockChartAxis.prototype, "titleStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartAxis.prototype, "labelFormat", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('DateTime')
    ], StockChartAxis.prototype, "skeletonType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartAxis.prototype, "skeleton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartAxis.prototype, "plotOffset", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], StockChartAxis.prototype, "logBase", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartAxis.prototype, "rowIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockChartAxis.prototype, "span", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], StockChartAxis.prototype, "maximumLabels", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAxis.prototype, "desiredIntervals", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockChartAxis.prototype, "zoomFactor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartAxis.prototype, "zoomPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockChartAxis.prototype, "opposedPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockChartAxis.prototype, "enableAutoIntervalOnZooming", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Double')
    ], StockChartAxis.prototype, "valueType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], StockChartAxis.prototype, "rangePadding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], StockChartAxis.prototype, "edgeLabelPlacement", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('BetweenTicks')
    ], StockChartAxis.prototype, "labelPlacement", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], StockChartAxis.prototype, "intervalType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Outside')
    ], StockChartAxis.prototype, "tickPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartAxis.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Outside')
    ], StockChartAxis.prototype, "labelPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockChartAxis.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartAxis.prototype, "labelRotation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartAxis.prototype, "minorTicksPerInterval", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAxis.prototype, "crossesAt", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAxis.prototype, "crossesInAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockChartAxis.prototype, "placeNextToAxisLine", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAxis.prototype, "minimum", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAxis.prototype, "interval", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAxis.prototype, "maximum", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(34)
    ], StockChartAxis.prototype, "maximumLabelWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_axis_axis__WEBPACK_IMPORTED_MODULE_2__["MajorTickLines"])
    ], StockChartAxis.prototype, "majorTickLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockChartAxis.prototype, "enableTrim", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_axis_axis__WEBPACK_IMPORTED_MODULE_2__["MinorTickLines"])
    ], StockChartAxis.prototype, "minorTickLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_axis_axis__WEBPACK_IMPORTED_MODULE_2__["MinorGridLines"])
    ], StockChartAxis.prototype, "minorGridLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_axis_axis__WEBPACK_IMPORTED_MODULE_2__["MajorGridLines"])
    ], StockChartAxis.prototype, "majorGridLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_axis_axis__WEBPACK_IMPORTED_MODULE_2__["AxisLine"])
    ], StockChartAxis.prototype, "lineStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockChartAxis.prototype, "isInversed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Trim')
    ], StockChartAxis.prototype, "labelIntersectAction", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(100)
    ], StockChartAxis.prototype, "coefficient", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartAxis.prototype, "startAngle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], StockChartAxis.prototype, "tabIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], StockChartStripLineSettings)
    ], StockChartAxis.prototype, "stripLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAxis.prototype, "description", void 0);
    return StockChartAxis;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * StockChart row
 */
var StockChartRow = /** @class */ (function (_super) {
    __extends(StockChartRow, _super);
    function StockChartRow() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')
    ], StockChartRow.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, StockChartBorder)
    ], StockChartRow.prototype, "border", void 0);
    return StockChartRow;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var StockChartTrendline = /** @class */ (function (_super) {
    __extends(StockChartTrendline, _super);
    function StockChartTrendline() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], StockChartTrendline.prototype, "period", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartTrendline.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Linear')
    ], StockChartTrendline.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], StockChartTrendline.prototype, "polynomialOrder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartTrendline.prototype, "forwardForecast", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartTrendline.prototype, "backwardForecast", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, Animation)
    ], StockChartTrendline.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockChartTrendline.prototype, "enableTooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_series_chart_series__WEBPACK_IMPORTED_MODULE_1__["MarkerSettings"])
    ], StockChartTrendline.prototype, "marker", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartTrendline.prototype, "intercept", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChartTrendline.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SeriesType')
    ], StockChartTrendline.prototype, "legendShape", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], StockChartTrendline.prototype, "width", void 0);
    return StockChartTrendline;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var StockChartAnnotationSettings = /** @class */ (function (_super) {
    __extends(StockChartAnnotationSettings, _super);
    function StockChartAnnotationSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], StockChartAnnotationSettings.prototype, "y", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('0')
    ], StockChartAnnotationSettings.prototype, "x", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAnnotationSettings.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Chart')
    ], StockChartAnnotationSettings.prototype, "region", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Center')
    ], StockChartAnnotationSettings.prototype, "horizontalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Pixel')
    ], StockChartAnnotationSettings.prototype, "coordinateUnits", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Middle')
    ], StockChartAnnotationSettings.prototype, "verticalAlignment", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAnnotationSettings.prototype, "yAxisName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAnnotationSettings.prototype, "description", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChartAnnotationSettings.prototype, "xAxisName", void 0);
    return StockChartAnnotationSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var StockChartIndexes = /** @class */ (function (_super) {
    __extends(StockChartIndexes, _super);
    function StockChartIndexes() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartIndexes.prototype, "point", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], StockChartIndexes.prototype, "series", void 0);
    return StockChartIndexes;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the Stock events for stock chart.
 */
var StockEventsSettings = /** @class */ (function (_super) {
    __extends(StockEventsSettings, _super);
    function StockEventsSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Circle')
    ], StockEventsSettings.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockEventsSettings.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockEventsSettings.prototype, "description", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], StockEventsSettings.prototype, "date", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: 'black', width: 1 }, StockChartBorder)
    ], StockEventsSettings.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('transparent')
    ], StockEventsSettings.prototype, "background", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockEventsSettings.prototype, "showOnSeries", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('close')
    ], StockEventsSettings.prototype, "placeAt", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(_common_model_theme__WEBPACK_IMPORTED_MODULE_4__["Theme"].stockEventFont, StockChartFont)
    ], StockEventsSettings.prototype, "textStyle", void 0);
    return StockEventsSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/cartesian-chart.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/cartesian-chart.js ***!
  \*****************************************************************************************/
/*! exports provided: CartesianChart */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartesianChart", function() { return CartesianChart; });
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../index */ "./node_modules/@syncfusion/ej2-charts/src/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/**
 * Cartesian chart renderer for financial chart
 */




/** @private */
var CartesianChart = /** @class */ (function () {
    function CartesianChart(chart) {
        this.stockChart = chart;
    }
    CartesianChart.prototype.initializeChart = function () {
        var _this = this;
        var stockChart = this.stockChart;
        if (!stockChart.chartObject) {
            stockChart.chartObject = stockChart.renderer.createGroup({
                id: stockChart.element.id + '_stockChart_chart'
            });
            stockChart.mainObject.appendChild(stockChart.chartObject);
        }
        else {
            var chartElement = document.getElementById(stockChart.chartObject.id);
            while (chartElement.firstChild) {
                chartElement.removeChild(chartElement.firstChild);
            }
            if (Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockChart.chartObject + '_tooltip')) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["remove"])(Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockChart.chartObject + '_tooltip'));
            }
        }
        this.cartesianChartSize = this.calculateChartSize();
        stockChart.chart = new _index__WEBPACK_IMPORTED_MODULE_0__["Chart"]({
            load: function (args) {
                if (stockChart.tooltip.header === null) {
                    args.chart.tooltip.header = '<b>${point.x}</b>';
                }
                if (stockChart.tooltip.format === null) {
                    args.chart.tooltip.format = 'High : <b>${point.high}</b><br/>Low :' +
                        ' <b>${point.low}</b><br/>Open : <b>${point.open}</b><br/>Close : <b>${point.close}</b>';
                    if (stockChart.series[0].volume !== '') {
                        args.chart.tooltip.format += '<br/>Volume : <b>${point.volume}</b>';
                    }
                }
            },
            chartArea: stockChart.chartArea,
            margin: this.findMargin(stockChart),
            primaryXAxis: this.copyObject(stockChart.primaryXAxis),
            primaryYAxis: this.copyObject(stockChart.primaryYAxis),
            rows: stockChart.rows,
            indicators: stockChart.indicators,
            axes: stockChart.axes,
            tooltipRender: function (args) {
                _this.stockChart.trigger('tooltipRender', args);
            },
            axisLabelRender: function (args) {
                _this.stockChart.trigger('axisLabelRender', args);
            },
            seriesRender: function (args) {
                _this.stockChart.trigger('seriesRender', args);
            },
            pointClick: function (args) {
                _this.stockChart.trigger('pointClick', args);
            },
            pointMove: function (args) {
                _this.stockChart.trigger('pointMove', args);
            },
            dataSource: stockChart.dataSource,
            series: this.findSeriesCollection(stockChart.series),
            zoomSettings: this.copyObject(stockChart.zoomSettings),
            tooltip: stockChart.tooltip,
            crosshair: stockChart.crosshair,
            height: this.cartesianChartSize.height.toString(),
            selectedDataIndexes: stockChart.selectedDataIndexes,
            selectionMode: stockChart.selectionMode,
            isMultiSelect: stockChart.isMultiSelect,
            annotations: stockChart.annotations,
            theme: stockChart.theme,
            legendSettings: { visible: false },
            zoomComplete: function (args) {
                if (args.axis.valueType === 'DateTime' && stockChart.rangeNavigator) {
                    _this.stockChart.zoomChange = true;
                    var newRange = _this.calculateUpdatedRange(args.currentZoomFactor, args.currentZoomPosition, args.axis);
                    stockChart.rangeSelector.sliderChange(newRange.start, newRange.end);
                }
            },
        });
        if (stockChart.indicators.length !== 0) {
            if (stockChart.isSelect) {
                for (var i = 0; i < stockChart.indicators.length; i++) {
                    stockChart.chart.indicators[i].animation.enable = false;
                    stockChart.chart.indicators[i].dataSource = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])([], stockChart.chart.series[0].dataSource, null, true);
                }
            }
            stockChart.isSelect = true;
        }
        stockChart.chart.stockChart = stockChart;
        stockChart.chart.appendTo(stockChart.chartObject);
    };
    CartesianChart.prototype.findMargin = function (stockChart) {
        var margin = {};
        margin.top = stockChart.margin.top * 2;
        margin.left = stockChart.margin.left;
        margin.right = stockChart.margin.right;
        margin.bottom = stockChart.margin.bottom;
        return margin;
    };
    CartesianChart.prototype.findSeriesCollection = function (series) {
        var chartSeries = [];
        for (var i = 0, len = series.length; i < len; i++) {
            chartSeries.push(series[i]);
            chartSeries[i].high = series[i].high;
            chartSeries[i].low = series[i].low;
            chartSeries[i].open = series[i].open;
            chartSeries[i].close = series[i].close;
            chartSeries[i].xName = series[i].xName;
            chartSeries[i].volume = series[i].volume;
            if (chartSeries[i].type !== 'HiloOpenClose' && chartSeries[i].type !== 'Candle' && chartSeries[i].yName === 'volume') {
                chartSeries[i].enableTooltip = false;
            }
        }
        return chartSeries;
    };
    CartesianChart.prototype.calculateChartSize = function () {
        var stockChart = this.stockChart;
        return (new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_1__["Size"](stockChart.availableSize.width, (stockChart.enablePeriodSelector && stockChart.enableSelector) ?
            ((stockChart.availableSize.height - stockChart.toolbarHeight - 80)) :
            (stockChart.enableSelector && !stockChart.enablePeriodSelector) ? (stockChart.availableSize.height - 80) :
                (stockChart.enablePeriodSelector && !stockChart.enableSelector) ?
                    stockChart.availableSize.height - stockChart.toolbarHeight : stockChart.availableSize.height));
    };
    CartesianChart.prototype.calculateUpdatedRange = function (zoomFactor, zoomPosition, axis) {
        var start;
        var end;
        //if (zoomFactor < 1 || zoomPosition > 0) {
        var chartRange = axis.actualRange;
        var inversed = false;
        if (!inversed) {
            start = chartRange.min + zoomPosition * chartRange.delta;
            end = start + zoomFactor * chartRange.delta;
        }
        else {
            start = chartRange.max - (zoomPosition * chartRange.delta);
            end = start - (zoomFactor * chartRange.delta);
        }
        //}
        var result = { start: start, end: end };
        return result;
    };
    /**
     * Cartesian chart refreshes based on start and end value
     * @param stockChart
     * @param start
     * @param end
     */
    CartesianChart.prototype.cartesianChartRefresh = function (stockChart, start, end, data) {
        var _this = this;
        stockChart.chart.series.forEach(function (series) {
            series.dataSource = data ? data : (stockChart.blazorDataSource[series.index] ||
                _this.checkDataSource(stockChart.tempDataSource[series.index]) || _this.checkDataSource(stockChart.dataSource))
                .filter(function (data) {
                return (new Date(Date.parse(data[series.xName])).getTime() >= start &&
                    new Date(Date.parse(data[series.xName])).getTime() <= end);
            });
            series.animation.enable = false;
            if (series.trendlines.length !== 0) {
                for (var _i = 0, _a = series.trendlines; _i < _a.length; _i++) {
                    var trendLine = _a[_i];
                    trendLine.animation.enable = false;
                }
            }
        });
        stockChart.cartesianChart.initializeChart();
    };
    CartesianChart.prototype.checkDataSource = function (data) {
        if (data instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_3__["DataManager"]) {
            return (data.dataSource.json);
        }
        else {
            return data;
        }
    };
    CartesianChart.prototype.copyObject = function (originalObject) {
        return (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])({}, originalObject, {}, true));
    };
    return CartesianChart;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/range-selector.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/range-selector.js ***!
  \****************************************************************************************/
/*! exports provided: RangeSelector */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeSelector", function() { return RangeSelector; });
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../index */ "./node_modules/@syncfusion/ej2-charts/src/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/**
 * Render range navigator for financial chart
 */



/** @private */
var RangeSelector = /** @class */ (function () {
    function RangeSelector(stockChart) {
        this.stockChart = stockChart;
    }
    RangeSelector.prototype.initializeRangeNavigator = function () {
        var _this = this;
        var stockChart = this.stockChart;
        if (!stockChart.selectorObject) {
            stockChart.selectorObject = stockChart.renderer.createGroup({
                id: stockChart.element.id + '_stockChart_rangeSelector',
                transform: 'translate(' + 0 + ',' + stockChart.cartesianChart.cartesianChartSize.height + ')'
            });
            stockChart.mainObject.appendChild(stockChart.selectorObject);
        }
        else {
            var chartElement = document.getElementById(stockChart.selectorObject.id);
            while (chartElement.firstChild) {
                chartElement.removeChild(chartElement.firstChild);
            }
            if (Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockChart.selectorObject.id + '_leftTooltip')) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["remove"])(Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockChart.selectorObject.id + '_leftTooltip'));
            }
            if (Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockChart.selectorObject.id + '_rightTooltip')) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["remove"])(Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockChart.selectorObject.id + '_rightTooltip'));
            }
        }
        stockChart.rangeNavigator = new _index__WEBPACK_IMPORTED_MODULE_0__["RangeNavigator"]({
            locale: 'en',
            valueType: stockChart.primaryXAxis.valueType,
            theme: this.stockChart.theme,
            series: this.findSeriesCollection(stockChart.series),
            height: this.calculateChartSize().height.toString(),
            value: [new Date(stockChart.startValue), new Date(stockChart.endValue)],
            margin: this.findMargin(stockChart),
            tooltip: { enable: stockChart.tooltip.enable, displayMode: 'Always' },
            dataSource: stockChart.dataSource,
            changed: function (args) {
                var arg = {
                    name: 'rangeChange',
                    end: args.end,
                    selectedData: args.selectedData,
                    start: args.start,
                    zoomFactor: args.zoomFactor,
                    zoomPosition: args.zoomPosition,
                    data: undefined
                };
                _this.stockChart.trigger('rangeChange', arg);
                _this.stockChart.startValue = args.start;
                _this.stockChart.endValue = args.end;
                if (!_this.stockChart.zoomChange) {
                    _this.stockChart.cartesianChart.cartesianChartRefresh(_this.stockChart, args.start, args.end, arg.data);
                }
                if (stockChart.periodSelector && stockChart.periodSelector.datePicker) {
                    stockChart.periodSelector.datePicker.startDate = new Date(args.start);
                    stockChart.periodSelector.datePicker.endDate = new Date(args.end);
                    stockChart.periodSelector.datePicker.dataBind();
                }
            }
        });
        stockChart.rangeNavigator.stockChart = stockChart;
        stockChart.rangeNavigator.appendTo(stockChart.selectorObject);
    };
    RangeSelector.prototype.findMargin = function (stockChart) {
        var margin = {};
        margin.top = 5;
        margin.left = 0;
        margin.right = 0;
        margin.bottom = 0;
        return margin;
    };
    RangeSelector.prototype.findSeriesCollection = function (series) {
        var chartSeries = [];
        for (var i = 0, len = series.length; i < len; i++) {
            chartSeries.push(series[i]);
            chartSeries[i].xName = series[i].xName;
            chartSeries[i].yName = series[i].yName === '' ? series[i].close : series[i].yName;
        }
        return chartSeries;
    };
    RangeSelector.prototype.calculateChartSize = function () {
        var stockChart = this.stockChart;
        return (new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_2__["Size"](stockChart.availableSize.width, (stockChart.enableSelector) ? 80 : 0));
    };
    /**
     * Performs slider change
     * @param start
     * @param end
     */
    RangeSelector.prototype.sliderChange = function (start, end) {
        this.stockChart.rangeNavigator.rangeSlider.performAnimation(start, end, this.stockChart.rangeNavigator, 0);
    };
    return RangeSelector;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/stock-events.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/stock-events.js ***!
  \**************************************************************************************/
/*! exports provided: StockEvents */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockEvents", function() { return StockEvents; });
/* harmony import */ var _chart_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../chart/index */ "./node_modules/@syncfusion/ej2-charts/src/chart/index.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _common_user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/user-interaction/tooltip */ "./node_modules/@syncfusion/ej2-charts/src/common/user-interaction/tooltip.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _common_model_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/model/constants */ "./node_modules/@syncfusion/ej2-charts/src/common/model/constants.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







/**
 * @private
 */
var StockEvents = /** @class */ (function (_super) {
    __extends(StockEvents, _super);
    function StockEvents(stockChart) {
        var _this = _super.call(this, stockChart.chart) || this;
        /** @private */
        _this.symbolLocations = [];
        _this.stockChart = stockChart;
        _this.chartId = _this.stockChart.element.id;
        return _this;
    }
    /**
     * @private
     * To render stock events in chart
     */
    StockEvents.prototype.renderStockEvents = function () {
        var sChart = this.stockChart;
        var stockEvent;
        var stockEventElement;
        var symbolLocation;
        var textSize;
        // Creation of group elements for stock events
        var stockEventsElementGroup = sChart.renderer.createGroup({ id: this.chartId + '_StockEvents' });
        this.symbolLocations = initialArray(sChart.series.length, sChart.stockEvents.length, new _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](0, 0));
        for (var i = 0; i < sChart.stockEvents.length; i++) {
            stockEvent = this.stockChart.stockEvents[i];
            for (var _i = 0, _a = sChart.chart.series; _i < _a.length; _i++) {
                var series = _a[_i];
                var argsData = {
                    name: _common_model_constants__WEBPACK_IMPORTED_MODULE_6__["stockEventRender"], stockChart: sChart, text: stockEvent.text,
                    type: stockEvent.type, cancel: false, series: series
                };
                sChart.trigger(_common_model_constants__WEBPACK_IMPORTED_MODULE_6__["stockEventRender"], argsData);
                stockEvent.text = argsData.text;
                stockEvent.type = argsData.type;
                textSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(stockEvent.text + 'W', stockEvent.textStyle);
                if (!argsData.cancel) {
                    stockEventElement = sChart.renderer.createGroup({ id: this.chartId + '_Series_' + series.index + '_StockEvents_' + i });
                    if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["withIn"])(this.dateParse(stockEvent.date).getTime(), series.xAxis.visibleRange)) {
                        symbolLocation = this.findClosePoint(series, stockEvent);
                        if (!stockEvent.showOnSeries) {
                            symbolLocation.y = series.yAxis.rect.y + series.yAxis.rect.height;
                        }
                        this.symbolLocations[series.index][i] = symbolLocation;
                        this.createStockElements(stockEventElement, stockEvent, series, i, symbolLocation, textSize);
                        stockEventsElementGroup.appendChild(stockEventElement);
                    }
                }
            }
        }
        return stockEventsElementGroup;
    };
    StockEvents.prototype.findClosePoint = function (series, sEvent) {
        var closeIndex = this.getClosest(series, this.dateParse(sEvent.date).getTime());
        var pointData;
        var point;
        var xPixel;
        var yPixel;
        for (var k = 0; k < series.points.length; k++) {
            point = series.points[k];
            if (closeIndex === point.xValue && point.visible) {
                pointData = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["PointData"](point, series);
            }
            else if (k !== 0 && k !== series.points.length) {
                if (closeIndex > series.points[k - 1].xValue && closeIndex < series.points[k + 1].xValue) {
                    pointData = new _common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["PointData"](point, series);
                }
            }
        }
        xPixel = series.xAxis.rect.x + Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])(pointData.point.xValue, series.xAxis) * series.xAxis.rect.width;
        yPixel = Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["valueToCoefficient"])(pointData.point[sEvent.placeAt], series.yAxis) * series.yAxis.rect.height;
        yPixel = (yPixel * -1) + (series.yAxis.rect.y + series.yAxis.rect.height);
        return new _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](xPixel, yPixel);
    };
    StockEvents.prototype.createStockElements = function (stockEventElement, stockEve, series, i, symbolLocation, textSize) {
        var result = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](textSize.width > 20 ? textSize.width : 20, textSize.height > 20 ? textSize.height : 20);
        var pathString;
        var pathOption;
        var lx = symbolLocation.x;
        var ly = symbolLocation.y;
        var stockId = this.chartId + '_Series_' + series.index + '_StockEvents_' + i;
        var border = stockEve.border;
        switch (stockEve.type) {
            case 'Flag':
            case 'Circle':
            case 'Square':
                stockEventElement.appendChild(Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"])(new _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](lx, ly), 'Circle', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](2, 2), '', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](stockId + '_Circle', 'transparent', border.width, border.color), this.dateParse(stockEve.date).toISOString()));
                stockEventElement.appendChild(Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"])(new _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](lx, ly - 5), 'VerticalLine', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](9, 9), '', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](stockId + '_Path', border.color, border.width, border.color), this.dateParse(stockEve.date).toISOString()));
                stockEventElement.appendChild(Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"])(new _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](stockEve.type !== 'Flag' ? lx : lx + result.width / 2, ly - result.height), stockEve.type, result, '', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](stockId + '_Shape', stockEve.background, border.width, border.color), this.dateParse(stockEve.date).toISOString()));
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(this.stockChart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](stockId + '_Text', stockEve.type !== 'Flag' ? symbolLocation.x : symbolLocation.x + result.width / 2, (symbolLocation.y - result.height), 'middle', stockEve.text, '', 'middle'), stockEve.textStyle, stockEve.textStyle.color, stockEventElement);
                break;
            case 'ArrowUp':
            case 'ArrowDown':
            case 'ArrowRight':
            case 'ArrowLeft':
                pathString = 'M' + ' ' + lx + ' ' + ly + ' ' + this.findArrowpaths(stockEve.type);
                pathOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](stockId + '_Shape', stockEve.background, border.width, border.color, 1, '', pathString);
                stockEventElement.appendChild(this.stockChart.renderer.drawPath(pathOption));
                break;
            case 'Triangle':
            case 'InvertedTriangle':
                result.height = 3 * textSize.height;
                result.width = textSize.width + (1.5 * textSize.width);
                stockEventElement.appendChild(Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"])(new _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](symbolLocation.x, symbolLocation.y), stockEve.type, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Size"](20, 20), '', new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](stockId + '_Shape', stockEve.background, border.width, border.color), this.dateParse(stockEve.date).toISOString()));
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(this.stockChart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](stockId + '_Text', symbolLocation.x, symbolLocation.y, 'middle', stockEve.text, '', 'middle'), stockEve.textStyle, stockEve.textStyle.color, stockEventElement);
                break;
            case 'Text':
                textSize.height += 8; //padding for text height
                pathString = 'M' + ' ' + (lx) + ' ' + (ly) + ' ' +
                    'L' + ' ' + (lx - 5) + ' ' + (ly - 5) + ' ' +
                    'L' + ' ' + (lx - ((textSize.width) / 2)) + ' ' + (ly - 5) + ' ' +
                    'L' + ' ' + (lx - ((textSize.width) / 2)) + ' ' + (ly - textSize.height) + ' ' +
                    'L' + ' ' + (lx + ((textSize.width) / 2)) + ' ' + (ly - textSize.height) + ' ' +
                    'L' + ' ' + (lx + ((textSize.width) / 2)) + ' ' + (ly - 5) + ' ' +
                    'L' + ' ' + (lx + 5) + ' ' + (ly - 5) + ' ' + 'Z';
                pathOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](stockId + '_Shape', stockEve.background, border.width, border.color, 1, '', pathString);
                stockEventElement.appendChild(this.stockChart.renderer.drawPath(pathOption));
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(this.stockChart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](stockId + '_Text', lx, ly - (textSize.height / 2), 'middle', stockEve.text, '', 'middle'), stockEve.textStyle, stockEve.textStyle.color, stockEventElement);
                break;
            default:
                //pin type calculation.
                pathString = 'M' + ' ' + lx + ' ' + ly + ' ' +
                    'L' + ' ' + (lx - ((textSize.width) / 2)) + ' ' + (ly - textSize.height / 3) + ' ' +
                    'L' + ' ' + (lx - ((textSize.width) / 2)) + ' ' + (ly - textSize.height) + ' ' +
                    'L' + ' ' + (lx + ((textSize.width) / 2)) + ' ' + (ly - textSize.height) + ' ' +
                    'L' + ' ' + (lx + ((textSize.width) / 2)) + ' ' + (ly - textSize.height / 3) + ' ' + 'Z';
                pathOption = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["PathOption"](stockId + '_Shape', stockEve.background, border.width, border.color, 1, '', pathString);
                stockEventElement.appendChild(this.stockChart.renderer.drawPath(pathOption));
                //append text element
                Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_1__["textElement"])(this.stockChart.renderer, new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](stockId + '_Text', lx, ly - (textSize.height / 2), 'middle', stockEve.text, '', 'middle'), stockEve.textStyle, stockEve.textStyle.color, stockEventElement);
        }
    };
    StockEvents.prototype.renderStockEventTooltip = function (targetId) {
        var seriesIndex = parseInt(targetId.split('_StockEvents_')[0].replace(/\D+/g, ''), 10);
        var pointIndex = parseInt(targetId.split('_StockEvents_')[1].replace(/\D+/g, ''), 10);
        var updatedLocation = this.symbolLocations[seriesIndex][pointIndex];
        var pointLocation = new _chart_index__WEBPACK_IMPORTED_MODULE_0__["ChartLocation"](updatedLocation.x, updatedLocation.y + this.stockChart.toolbarHeight + this.stockChart.titleSize.height);
        this.applyHighLights(pointIndex, seriesIndex);
        //title size and toolbar height is added location for placing tooltip
        var svgElement = this.getElement(this.chartId + '_StockEvents_Tooltip_svg');
        var isTooltip = (svgElement && parseInt(svgElement.getAttribute('opacity'), 10) > 0);
        if (!isTooltip) {
            if (Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(this.chartId + '_StockEvents_Tooltip_svg')) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__["remove"])(Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(this.chartId + '_StockEvents_Tooltip'));
            }
            var tooltipElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__["createElement"])('div', {
                id: this.chartId + '_StockEvents_Tooltip', className: 'ejSVGTooltip',
                attrs: { 'style': 'pointer-events:none; position:absolute;z-index: 1' }
            });
            Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(this.chartId + '_Secondary_Element').appendChild(tooltipElement);
            this.stockEventTooltip = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Tooltip"]({
                opacity: 1,
                header: '', content: [(this.stockChart.stockEvents[pointIndex].description)],
                enableAnimation: true, location: pointLocation,
                theme: this.stockChart.theme,
                inverted: true,
                areaBounds: this.stockChart.chart.chartAxisLayoutPanel.seriesClipRect
            });
            this.stockEventTooltip.areaBounds.y += this.stockChart.toolbarHeight + this.stockChart.titleSize.height;
            this.stockEventTooltip.appendTo('#' + tooltipElement.id);
        }
        else {
            this.stockEventTooltip.content = [(this.stockChart.stockEvents[pointIndex].description)];
            this.stockEventTooltip.location = pointLocation;
            this.stockEventTooltip.dataBind();
        }
    };
    /**
     * Remove the stock event tooltip
     * @param duration
     */
    StockEvents.prototype.removeStockEventTooltip = function (duration) {
        var _this = this;
        var tooltipElement = this.getElement(this.chartId + '_StockEvents_Tooltip');
        this.stopAnimation();
        if (tooltipElement && this.stockEventTooltip) {
            this.toolTipInterval = setTimeout(function () {
                _this.stockEventTooltip.fadeOut();
                _this.removeHighLights();
            }, duration);
        }
    };
    StockEvents.prototype.findArrowpaths = function (type) {
        var arrowString = '';
        switch (type) {
            case 'ArrowUp':
                arrowString = 'l -10 10 l 5 0 l 0 10 l 10 0 l 0 -10 l 5 0 z';
                break;
            case 'ArrowDown':
                arrowString = 'l -10 -10 l 5 0 l 0 -10 l 10 0 l 0 10 l 5 0 z';
                break;
            case 'ArrowLeft':
                arrowString = 'l -10 -10 l 0 5 l -10 0 l 0 10 l 10 0 l 0 5 z';
                break;
            case 'ArrowRight':
                arrowString = 'l 10 -10 l 0 5 l 10 0 l 0 10 l -10 0 l 0 5 z';
                break;
        }
        return arrowString;
    };
    StockEvents.prototype.applyHighLights = function (pointIndex, seriesIndex) {
        if (this.pointIndex !== pointIndex || this.seriesIndex !== seriesIndex) {
            this.removeHighLights();
        }
        this.pointIndex = pointIndex;
        this.seriesIndex = seriesIndex;
        var stockId = this.chartId + '_Series_' + seriesIndex + '_StockEvents_' + pointIndex;
        this.setOpacity(stockId + '_Shape', 0.5);
        this.setOpacity(stockId + '_Text', 0.5);
    };
    StockEvents.prototype.removeHighLights = function () {
        var stockId = this.chartId + '_Series_' + this.seriesIndex + '_StockEvents_' + this.pointIndex;
        this.setOpacity(stockId + '_Shape', 1);
        this.setOpacity(stockId + '_Text', 1);
    };
    StockEvents.prototype.setOpacity = function (elementId, opacity) {
        if (Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(elementId)) {
            Object(_chart_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(elementId).setAttribute('opacity', opacity.toString());
        }
    };
    /**
     * @param value
     * To convert the c# or javascript date formats into js format
     * refer chart control's dateTime processing.
     */
    StockEvents.prototype.dateParse = function (value) {
        var dateParser = this.chart.intl.getDateParser({ skeleton: 'full', type: 'dateTime' });
        var dateFormatter = this.chart.intl.getDateFormat({ skeleton: 'full', type: 'dateTime' });
        return new Date((Date.parse(dateParser(dateFormatter(new Date(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataUtil"].parse.parseJson({ val: value }).val))))));
    };
    return StockEvents;
}(_common_user_interaction_tooltip__WEBPACK_IMPORTED_MODULE_2__["BaseTooltip"]));

function initialArray(numrows, numcols, initial) {
    var arr = [];
    for (var i = 0; i < numrows; ++i) {
        var columns = [];
        for (var j = 0; j < numcols; ++j) {
            columns[j] = initial;
        }
        arr[i] = columns;
    }
    return arr;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/toolbar-selector.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/toolbar-selector.js ***!
  \******************************************************************************************/
/*! exports provided: ToolBarSelector */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToolBarSelector", function() { return ToolBarSelector; });
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../index */ "./node_modules/@syncfusion/ej2-charts/src/index.js");
/* harmony import */ var _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-splitbuttons */ "./node_modules/@syncfusion/ej2-splitbuttons/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");






/**
 * Period selector for range navigator
 */
/** @private */
var ToolBarSelector = /** @class */ (function () {
    function ToolBarSelector(chart) {
        this.selectedSeries = '';
        this.selectedIndicator = '';
        this.selectedTrendLine = '';
        this.indicators = [];
        this.secondayIndicators = [];
        this.stockChart = chart;
        this.selectedSeries = this.stockChart.series[0].type;
    }
    ToolBarSelector.prototype.initializePeriodSelector = function () {
        var periods = this.stockChart.periods.length ? this.stockChart.periods : this.calculateAutoPeriods();
        this.stockChart.periods = periods;
        this.stockChart.periodSelector.rootControl = this.stockChart;
        var rect = this.stockChart.chart.chartAxisLayoutPanel.seriesClipRect;
        var htmlElement = Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(this.stockChart.element.id + '_Secondary_Element');
        var height = this.stockChart.toolbarHeight;
        this.stockChart.periodSelector.appendSelector({ thumbSize: 0, element: htmlElement, width: rect.width, height: height }, rect.x);
        this.initializeSeriesSelector();
        this.initializeIndicatorSelector();
        this.initializeTrendlineSelector();
        this.exportButton();
        this.printButton();
        this.resetButton();
    };
    /**
     * This method returns itemModel for dropdown button
     * @param type
     */
    ToolBarSelector.prototype.getDropDownItems = function (type) {
        var result = [];
        if (type === this.stockChart.seriesType) {
            for (var i = 0; i < type.length; i++) {
                result.push({ text: '&nbsp;&nbsp;&nbsp;' + type[i].toString() });
            }
            for (var i = 0; i < this.stockChart.series.length; i++) {
                for (var j = 0; j < result.length; j++) {
                    var text = result[j].text.replace('&nbsp;&nbsp;&nbsp;', '');
                    text = (text === 'OHLC') ? 'HiloOpenClose' : text;
                    if (text === this.stockChart.series[i].type) {
                        result[j].text = result[j].text.replace('&nbsp;&nbsp;&nbsp;', '&#10004&nbsp;');
                    }
                }
            }
        }
        else if (type === this.stockChart.exportType) {
            for (var i = 0; i < type.length; i++) {
                result.push({ text: type[i].toString() });
            }
        }
        else {
            for (var i = 0; i < type.length; i++) {
                if (type[i].toString() !== 'Print') {
                    result.push({ text: '&nbsp;&nbsp;&nbsp;' + type[i].toString() });
                }
            }
        }
        return result;
    };
    /**
     * This method changes the type of series while selectind series in dropdown button
     */
    ToolBarSelector.prototype.addedSeries = function (seriesType) {
        var series = this.stockChart.series;
        for (var i = 0; i < series.length; i++) {
            if (series[i].yName === 'volume') {
                continue;
            }
            series[i].type = (seriesType.indexOf('Candle') > -1 ? 'Candle' :
                (seriesType.indexOf('OHLC') > -1 ? 'HiloOpenClose' : seriesType));
            series[i].enableSolidCandles = seriesType === 'Candle';
            series[i].trendlines.forEach(function (trendLine) {
                trendLine.animation.enable = false;
                trendLine.enableTooltip = false;
            });
        }
    };
    ToolBarSelector.prototype.initializeSeriesSelector = function () {
        var _this = this;
        var seriesType = new _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_1__["DropDownButton"]({
            items: this.getDropDownItems(this.stockChart.seriesType),
            select: function (args) {
                _this.selectedSeries = args.item.text;
                var text = _this.tickMark(args);
                _this.addedSeries(text);
                _this.stockChart.cartesianChart.initializeChart();
            },
        });
        seriesType.appendTo('#seriesType');
    };
    ToolBarSelector.prototype.resetButton = function () {
        var _this = this;
        var reset = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__["Button"]();
        reset.appendTo('#resetClick');
        document.getElementById('resetClick').onclick = function () {
            var indicatorlength = _this.indicators.length;
            while (indicatorlength) {
                _this.stockChart.indicators.pop();
                indicatorlength--;
            }
            _this.indicators = [];
            _this.secondayIndicators = [];
            if (!_this.stockChart.isSingleAxis) {
                if (_this.stockChart.rows.length > 2) {
                    _this.stockChart.rows.splice(2, _this.stockChart.rows.length - 1);
                }
                if (_this.stockChart.axes.length > 2) {
                    _this.stockChart.axes.splice(1, _this.stockChart.axes.length - 1);
                    _this.stockChart.axes[0].rowIndex = 1;
                }
            }
            else {
                _this.stockChart.rows = [{}];
            }
            for (var i = 0; i < _this.stockChart.series.length; i++) {
                if (_this.stockChart.series[i].yName === 'volume') {
                    continue;
                }
                _this.stockChart.series[i].type = _this.stockChart.tempSeriesType[i];
                if (_this.stockChart.series[i].trendlines.length !== 0) {
                    _this.stockChart.series[i].trendlines[0].width = 0;
                }
            }
            _this.stockChart.indicatorElements = null;
            _this.stockChart.resizeTo = null;
            _this.stockChart.zoomChange = false;
            for (var j = 0; j < _this.stockChart.series.length; j++) {
                _this.stockChart.series[j].dataSource = _this.stockChart.tempDataSource[j] || _this.stockChart.blazorDataSource[j];
            }
            _this.stockChart.refresh();
        };
    };
    ToolBarSelector.prototype.initializeTrendlineSelector = function () {
        var _this = this;
        this.trendlineDropDown = new _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_1__["DropDownButton"]({
            items: this.stockChart.resizeTo ? this.trendlineDropDown.items :
                this.getDropDownItems(this.stockChart.trendlineType),
            select: function (args) {
                var text = _this.tickMark(args);
                text = text.split(' ')[0].toLocaleLowerCase() + (text.split(' ')[1] ? text.split(' ')[1] : '');
                text = text.substr(0, 1).toUpperCase() + text.substr(1);
                var type = text;
                _this.selectedTrendLine = _this.selectedTrendLine === '' ? type : _this.selectedTrendLine + ',' + type;
                if (_this.trendline !== type) {
                    _this.trendline = type;
                    for (var i = 0; i < _this.stockChart.series.length; i++) {
                        if (_this.stockChart.series[i].yName === 'volume') {
                            continue;
                        }
                        if (_this.stockChart.series[0].trendlines.length === 0) {
                            var trendlines = void 0;
                            if (_this.stockChart.trendlinetriggered) {
                                trendlines = [{ type: type, width: 1, enableTooltip: false }];
                                _this.stockChart.trendlinetriggered = false;
                            }
                            _this.stockChart.series[0].trendlines = trendlines;
                        }
                        else {
                            _this.stockChart.series[0].trendlines[0].width = 1;
                            _this.stockChart.series[0].trendlines[0].type = type;
                            _this.stockChart.series[0].trendlines[0].animation.enable = _this.stockChart.trendlinetriggered ? true : false;
                        }
                    }
                    _this.stockChart.cartesianChart.initializeChart();
                }
                else {
                    args.item.text = '&nbsp;&nbsp;&nbsp;' + args.item.text.replace('&#10004&nbsp;', '');
                    _this.stockChart.series[0].trendlines[0].width = 0;
                    _this.trendline = null;
                    _this.stockChart.cartesianChart.initializeChart();
                }
            },
        });
        this.trendlineDropDown.appendTo('#trendType');
    };
    ToolBarSelector.prototype.initializeIndicatorSelector = function () {
        var _this = this;
        this.indicatorDropDown = new _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_1__["DropDownButton"]({
            items: this.stockChart.resizeTo ? this.indicatorDropDown.items :
                this.getDropDownItems(this.stockChart.indicatorType),
            select: function (args) {
                for (var l = 0; l < _this.stockChart.series.length; l++) {
                    if (_this.stockChart.series[l].trendlines.length !== 0) {
                        _this.stockChart.series[l].trendlines[0].animation.enable = false;
                    }
                }
                args.item.text = args.item.text.indexOf('&#10004&nbsp;') >= 0 ? args.item.text.substr(args.item.text.indexOf(';') + 1) :
                    args.item.text;
                var text = args.item.text.replace('&nbsp;&nbsp;&nbsp;', '');
                text = text.split(' ')[0].toLocaleLowerCase() + (text.split(' ')[1] ? text.split(' ')[1] : '');
                text = text.substr(0, 1).toUpperCase() + text.substr(1);
                var type = text;
                _this.selectedIndicator = _this.selectedIndicator.indexOf(type) === -1 ? _this.selectedIndicator + ' ' + type :
                    _this.selectedIndicator.replace(type, '');
                if (type === 'Tma' || type === 'BollingerBands' || type === 'Sma' || type === 'Ema') {
                    if (_this.indicators.indexOf(type) === -1) {
                        args.item.text = '&#10004&nbsp;' + args.item.text.replace('&nbsp;&nbsp;&nbsp;', '');
                        var indicator = _this.getIndicator(type, _this.stockChart.series[0].yAxisName);
                        _this.indicators.push(type);
                        _this.stockChart.indicators = _this.stockChart.indicators.concat(indicator);
                        _this.stockChart.cartesianChart.initializeChart();
                    }
                    else {
                        args.item.text = '&nbsp;&nbsp;&nbsp;' + args.item.text;
                        for (var z = 0; z < _this.stockChart.indicators.length; z++) {
                            if (_this.stockChart.indicators[z].type === type) {
                                _this.stockChart.indicators.splice(z, 1);
                            }
                        }
                        _this.indicators.splice(_this.indicators.indexOf(type), 1);
                        _this.stockChart.cartesianChart.initializeChart();
                    }
                }
                else {
                    _this.createIndicatorAxes(type, args);
                }
            },
        });
        this.indicatorDropDown.appendTo('#indicatorType');
    };
    ToolBarSelector.prototype.getIndicator = function (type, yAxisName) {
        var indicator = [{
                type: type, period: 3, yAxisName: yAxisName,
                dataSource: this.stockChart.series[0].dataSource,
                xName: this.stockChart.series[0].xName,
                open: this.stockChart.series[0].open,
                close: this.stockChart.series[0].close,
                high: this.stockChart.series[0].high,
                low: this.stockChart.series[0].low,
                volume: this.stockChart.series[0].volume,
                fill: type === 'Sma' ? '#32CD32' : '#6063ff',
                animation: { enable: false }, upperLine: { color: '#FFE200', width: 1 },
                periodLine: { width: 2 }, lowerLine: { color: '#FAA512', width: 1 },
                fastPeriod: 8, slowPeriod: 5, macdType: 'Both', width: 1,
                macdPositiveColor: '#6EC992', macdNegativeColor: '#FF817F',
                bandColor: 'rgba(245, 203, 35, 0.12)',
            }];
        return indicator;
    };
    ToolBarSelector.prototype.createIndicatorAxes = function (type, args) {
        if (this.indicators.indexOf(type) === -1) {
            args.item.text = '&#10004&nbsp;' + args.item.text.replace('&nbsp;&nbsp;&nbsp;', '');
            this.indicators.push(type);
            var axis = void 0;
            var row = void 0;
            var indicator = void 0;
            var len = this.stockChart.rows.length;
            this.stockChart.rows[this.stockChart.rows.length - 1].height = '15%';
            row = [{ height: '' + (100 - len * 15) + 'px' }];
            if (this.stockChart.rows.length === 1) {
                this.stockChart.isSingleAxis = true;
            }
            this.stockChart.rows = this.stockChart.rows.concat(row);
            if (!this.stockChart.isSingleAxis) {
                this.stockChart.axes[0].rowIndex += 1;
            }
            else {
                for (var i = 0; i < this.stockChart.axes.length; i++) {
                    this.stockChart.axes[i].rowIndex += 1;
                }
            }
            axis = [{
                    plotOffset: 10, opposedPosition: true,
                    rowIndex: (!this.stockChart.isSingleAxis ? this.stockChart.axes.length : 0),
                    desiredIntervals: 1,
                    labelFormat: 'n2',
                    majorGridLines: this.stockChart.primaryYAxis.majorGridLines,
                    lineStyle: this.stockChart.primaryYAxis.lineStyle,
                    labelPosition: this.stockChart.primaryYAxis.labelPosition,
                    majorTickLines: this.stockChart.primaryYAxis.majorTickLines,
                    rangePadding: 'None', name: type.toString(),
                }];
            this.stockChart.axes = this.stockChart.axes.concat(axis);
            this.stockChart.primaryYAxis.rowIndex = (!this.stockChart.isSingleAxis ? 0 : len + 1);
            indicator = this.getIndicator(type, type.toString());
            this.stockChart.indicators = this.stockChart.indicators.concat(indicator);
            this.stockChart.cartesianChart.initializeChart();
        }
        else {
            args.item.text = '&nbsp;&nbsp;&nbsp;' + args.item.text;
            for (var i = 0; i < this.stockChart.indicators.length; i++) {
                if (this.stockChart.indicators[i].type === type) {
                    this.stockChart.indicators.splice(i, 1);
                }
            }
            this.indicators.splice(this.indicators.indexOf(type), 1);
            var removedIndex = 0;
            for (var z = 0; z < this.stockChart.axes.length; z++) {
                if (this.stockChart.axes[z].name === type) {
                    removedIndex = this.stockChart.axes[z].rowIndex;
                    this.stockChart.rows.splice(z, 1);
                    this.stockChart.axes.splice(z, 1);
                }
            }
            for (var z = 0; z < this.stockChart.axes.length; z++) {
                if (this.stockChart.axes[z].rowIndex !== 0 && this.stockChart.axes[z].rowIndex > removedIndex) {
                    this.stockChart.axes[z].rowIndex = this.stockChart.axes[z].rowIndex - 1;
                }
            }
            this.stockChart.cartesianChart.initializeChart();
        }
    };
    ToolBarSelector.prototype.tickMark = function (args) {
        var text;
        // tslint:disable-next-line:no-string-literal
        var items = args.item['parentObj'].items;
        for (var i = 0; i < items.length; i++) {
            items[i].text = items[i].text.indexOf('&#10004&nbsp;') >= 0 ?
                items[i].text.substr(items[i].text.indexOf(';') + 1) :
                items[i].text;
            if (!(items[i].text.indexOf('&nbsp;&nbsp;&nbsp;') >= 0)) {
                items[i].text = '&nbsp;&nbsp;&nbsp;' + items[i].text;
            }
        }
        if (args.item.text.indexOf('&nbsp;&nbsp;&nbsp;') >= 0) {
            text = args.item.text.replace('&nbsp;&nbsp;&nbsp;', '');
            args.item.text = args.item.text.replace('&nbsp;&nbsp;&nbsp;', '&#10004&nbsp;');
        }
        else {
            text = args.item.text.replace('&#10004&nbsp;', '');
        }
        return text;
    };
    ToolBarSelector.prototype.printButton = function () {
        var _this = this;
        if (this.stockChart.exportType.indexOf('Print') > -1) {
            var print_1 = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__["Button"]();
            print_1.appendTo('#print');
            document.getElementById('print').onclick = function () {
                _this.stockChart.chart.print(_this.stockChart.element.id);
            };
        }
    };
    ToolBarSelector.prototype.exportButton = function () {
        var _this = this;
        var exportChart = new _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_1__["DropDownButton"]({
            items: this.getDropDownItems(this.stockChart.exportType),
            select: function (args) {
                var type = args.item.text;
                var stockChart = _this.stockChart;
                var stockID = stockChart.element.id + '_stockChart_';
                var additionalRect;
                var svgHeight = stockChart.svgObject.getBoundingClientRect();
                if (stockChart.chart.exportModule) {
                    _this.stockChart.svgObject.insertAdjacentElement('afterbegin', _this.addExportSettings());
                    additionalRect = stockChart.svgObject.firstElementChild.getBoundingClientRect();
                    _this.stockChart.svgObject.setAttribute('height', (svgHeight.height + additionalRect.height).toString());
                    Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockID + 'chart').style.transform = 'translateY(' + additionalRect.height + 'px)';
                    if (stockChart.enableSelector) {
                        Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockID + 'rangeSelector').setAttribute('transform', 
                        // tslint:disable-next-line:align
                        'translate(' + 0 + ',' + (stockChart.cartesianChart.cartesianChartSize.height + additionalRect.height) + ')');
                    }
                    stockChart.chart.exportModule.export(type, 'StockChart', null, [stockChart], null, stockChart.svgObject.clientHeight);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_4__["remove"])(Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(_this.stockChart.element.id + '_additionalExport'));
                    Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockID + 'chart').style.transform = 'translateY(0px)';
                    if (stockChart.enableSelector) {
                        Object(_index__WEBPACK_IMPORTED_MODULE_0__["getElement"])(stockID + 'rangeSelector').setAttribute('transform', 
                        // tslint:disable-next-line:align
                        'translate(' + 0 + ',' + (stockChart.cartesianChart.cartesianChartSize.height) + ')');
                    }
                    _this.stockChart.svgObject.setAttribute('height', (svgHeight.height).toString());
                }
            }
        });
        exportChart.appendTo('#export');
    };
    ToolBarSelector.prototype.calculateAutoPeriods = function () {
        var defaultPeriods = [];
        var chart = this.stockChart.chart;
        var axisMin = Infinity;
        var axisMax = -Infinity;
        for (var _i = 0, _a = chart.axisCollections; _i < _a.length; _i++) {
            var axis = _a[_i];
            if (axis.orientation === 'Horizontal') {
                axisMin = Math.min(axisMin, axis.visibleRange.min);
                axisMax = Math.max(axisMax, axis.visibleRange.max);
            }
        }
        defaultPeriods = this.findRange(axisMin, axisMax);
        defaultPeriods.push({ text: 'YTD', selected: true }, { text: 'All' });
        return defaultPeriods;
    };
    ToolBarSelector.prototype.findRange = function (min, max) {
        var defaultPeriods = [];
        if (((max - min) / 3.154e+10) >= 1) {
            defaultPeriods.push({ text: '1M', interval: 1, intervalType: 'Months' }, { text: '3M', interval: 3, intervalType: 'Months' }, { text: '6M', interval: 6, intervalType: 'Months' }, { text: '1Y', interval: 1, intervalType: 'Years' });
        }
        else if ((max - min) / 1.577e+10 >= 1) {
            defaultPeriods.push({ text: '1M', interval: 1, intervalType: 'Months' }, { text: '3M', interval: 3, intervalType: 'Months' }, { text: '6M', interval: 6, intervalType: 'Months' });
        }
        else if ((max - min) / 2.628e+9 >= 1) {
            defaultPeriods.push({ text: '1D', interval: 1, intervalType: 'Days' }, { text: '3W', interval: 3, intervalType: 'Weeks' }, { text: '1M', interval: 1, intervalType: 'Months' });
        }
        else if ((max - min) / 8.64e+7 >= 1) {
            defaultPeriods.push({ text: '1H', interval: 1, intervalType: 'Hours' }, { text: '12H', interval: 12, intervalType: 'Hours' }, { text: '1D', interval: 1, intervalType: 'Days' });
        }
        return defaultPeriods;
    };
    /**
     * Text elements added to while export the chart
     * It details about the seriesTypes, indicatorTypes and Trendlines selected in chart.
     */
    ToolBarSelector.prototype.addExportSettings = function () {
        var exportElement = this.stockChart.renderer.createGroup({
            id: this.stockChart.element.id + '_additionalExport',
            width: this.stockChart.availableSize.width,
        });
        var titleHeight = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(this.stockChart.title, this.stockChart.titleStyle).height;
        var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](exportElement.id + '_Title', Object(_index__WEBPACK_IMPORTED_MODULE_0__["titlePositionX"])(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["Rect"](0, 0, this.stockChart.availableSize.width, 0), this.stockChart.titleStyle), 0, 'middle', this.stockChart.title, '', 'text-before-edge');
        Object(_index__WEBPACK_IMPORTED_MODULE_0__["textElement"])(this.stockChart.renderer, options, this.stockChart.titleStyle, this.stockChart.titleStyle.color, exportElement);
        var style = { size: '15px', fontWeight: '500', color: null, fontStyle: 'Normal', fontFamily: 'Segoe UI' };
        var x = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])('Series: ' + this.selectedSeries, style).width / 2;
        var y = titleHeight;
        this.textElementSpan(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](exportElement.id + '_Series', x, y, 'start', ['Series : ', this.selectedSeries], '', 'text-before-edge'), style, 'black', exportElement);
        x += Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])('Series: ' + this.selectedSeries + ' Z', style).width;
        if (this.selectedIndicator !== '') {
            this.textElementSpan(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](exportElement.id + '_Indicator', x, y, 'start', ['Indicator :', this.selectedIndicator], '', 'text-before-edge'), style, 'black', exportElement);
            x += Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])('Indicator: ' + this.selectedIndicator + ' Z', style).width;
        }
        if (this.selectedTrendLine !== '') {
            this.textElementSpan(new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["TextOption"](exportElement.id + '_TrendLine', x, y, 'start', ['Trendline :', this.selectedTrendLine], '', 'text-before-edge'), style, 'black', exportElement);
        }
        return exportElement;
    };
    /** @private */
    ToolBarSelector.prototype.textElementSpan = function (options, font, color, parent, isMinus, redraw, isAnimate, forceAnimate, animateDuration) {
        if (isMinus === void 0) { isMinus = false; }
        if (forceAnimate === void 0) { forceAnimate = false; }
        var renderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["SvgRenderer"]('');
        var renderOptions = {};
        var htmlObject;
        var text;
        var tspanElement;
        renderOptions = {
            'id': options.id,
            'font-style': font.fontStyle,
            'font-family': font.fontFamily,
            'font-weight': font.fontWeight,
            'text-anchor': options.anchor,
            'x': options.x,
            'y': options.y,
            'fill': color,
            'font-size': font.size,
            'transform': options.transform,
            'opacity': font.opacity,
            'dominant-baseline': options.baseLine,
        };
        text = typeof options.text === 'string' ? options.text : isMinus ? options.text[options.text.length - 1] : options.text[0];
        htmlObject = renderer.createText(renderOptions, text);
        if (typeof options.text !== 'string' && options.text.length > 1) {
            for (var i = 1, len = options.text.length; i < len; i++) {
                options.text[i] = ' ' + options.text[i];
                tspanElement = renderer.createTSpan({
                    'x': options.x + Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_3__["measureText"])(text, font).width + 5, 'id': options.id,
                    'y': (options.y), opacity: 0.5
                }, options.text[i]);
                htmlObject.appendChild(tspanElement);
            }
        }
        Object(_index__WEBPACK_IMPORTED_MODULE_0__["appendChildElement"])(false, parent, htmlObject, redraw, isAnimate, 'x', 'y', null, null, forceAnimate, false, null, animateDuration);
        return htmlObject;
    };
    return ToolBarSelector;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/stock-chart.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-charts/src/stock-chart/stock-chart.js ***!
  \****************************************************************************/
/*! exports provided: StockChart */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockChart", function() { return StockChart; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _chart_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../chart/index */ "./node_modules/@syncfusion/ej2-charts/src/chart/index.js");
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../index */ "./node_modules/@syncfusion/ej2-charts/src/index.js");
/* harmony import */ var _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-svg-base */ "./node_modules/@syncfusion/ej2-svg-base/index.js");
/* harmony import */ var _common_model_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/model/base */ "./node_modules/@syncfusion/ej2-charts/src/common/model/base.js");
/* harmony import */ var _common_utils_helper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/utils/helper */ "./node_modules/@syncfusion/ej2-charts/src/common/utils/helper.js");
/* harmony import */ var _range_navigator_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../range-navigator/index */ "./node_modules/@syncfusion/ej2-charts/src/range-navigator/index.js");
/* harmony import */ var _common_period_selector_period_selector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/period-selector/period-selector */ "./node_modules/@syncfusion/ej2-charts/src/common/period-selector/period-selector.js");
/* harmony import */ var _renderer_cartesian_chart__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./renderer/cartesian-chart */ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/cartesian-chart.js");
/* harmony import */ var _renderer_range_selector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./renderer/range-selector */ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/range-selector.js");
/* harmony import */ var _renderer_toolbar_selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./renderer/toolbar-selector */ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/toolbar-selector.js");
/* harmony import */ var _model_base__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./model/base */ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/model/base.js");
/* harmony import */ var _common_model_theme__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/model/theme */ "./node_modules/@syncfusion/ej2-charts/src/common/model/theme.js");
/* harmony import */ var _renderer_stock_events__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./renderer/stock-events */ "./node_modules/@syncfusion/ej2-charts/src/stock-chart/renderer/stock-events.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};






















/**
 * Stock Chart
 */
var StockChart = /** @class */ (function (_super) {
    __extends(StockChart, _super);
    /**
     * Constructor for creating the widget
     * @hidden
     */
    function StockChart(options, element) {
        var _this = _super.call(this, options, element) || this;
        /** @private */
        _this.isSingleAxis = false;
        _this.chartid = 57723;
        /** @private */
        _this.tempDataSource = [];
        /** @private */
        _this.blazorDataSource = [];
        /** @private */
        _this.tempSeriesType = [];
        /** private */
        _this.zoomChange = false;
        /** @private */
        _this.allowPan = false;
        /** @private  */
        _this.onPanning = false;
        /** @private */
        _this.trendlinetriggered = true;
        /** @private */
        _this.toolbarHeight = _this.enablePeriodSelector ? (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 56 : 42) : 0;
        /** @private */
        _this.initialRender = true;
        return _this;
    }
    /**
     * Called internally if any of the property value changed.
     * @private
     */
    // tslint:disable-next-line:max-func-body-length
    StockChart.prototype.onPropertyChanged = function (newProp, oldProp) {
        // on property changes
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var property = _a[_i];
            switch (property) {
                case 'series':
                    this.tempDataSource = this.blazorDataSource = [];
                    this.render();
                    break;
            }
        }
    };
    /**
     * To change the range for chart
     */
    StockChart.prototype.rangeChanged = function (updatedStart, updatedEnd) {
        var _this = this;
        // manage chart refresh
        this.chart.series.forEach(function (series) {
            series.dataSource = _this.tempDataSource[series.index].filter(function (data) {
                return (new Date(Date.parse(data[series.xName])).getTime() >= updatedStart &&
                    new Date(Date.parse(data[series.xName])).getTime() <= updatedEnd);
            });
            series.animation.enable = false;
        });
        var chartElement = document.getElementById(this.chartObject.id);
        if (chartElement) {
            while (chartElement.firstChild) {
                chartElement.removeChild(chartElement.firstChild);
            }
        }
        this.startValue = updatedStart;
        this.endValue = updatedEnd;
        this.cartesianChart.initializeChart();
        this.periodSelector.datePicker.startDate = new Date(updatedStart);
        this.periodSelector.datePicker.endDate = new Date(updatedEnd);
        this.periodSelector.datePicker.dataBind();
    };
    /**
     * Pre render for financial Chart
     */
    StockChart.prototype.preRender = function () {
        this.unWireEvents();
        this.initPrivateVariable();
        this.setCulture();
        this.stockChartTheme = Object(_common_model_theme__WEBPACK_IMPORTED_MODULE_13__["getThemeColor"])(this.theme);
        this.wireEvents();
    };
    /**
     * Method to bind events for chart
     */
    StockChart.prototype.unWireEvents = function () {
        /*! Find the Events type */
        var startEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent;
        var moveEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent;
        var stopEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent;
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        /*! UnBind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, startEvent, this.stockChartOnMouseDown);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, moveEvent, this.stockChartOnMouseMove);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, stopEvent, this.stockChartMouseEnd);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.stockChartOnMouseClick);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'contextmenu', this.stockChartRightClick);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, cancelEvent, this.stockChartOnMouseLeave);
        window.removeEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.stockChartResize);
    };
    StockChart.prototype.wireEvents = function () {
        /*! Find the Events type */
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        /*! Bind the Event handler */
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.stockChartOnMouseDown, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.stockChartOnMouseMove, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.stockChartMouseEnd, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.stockChartOnMouseClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'contextmenu', this.stockChartRightClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, cancelEvent, this.stockChartOnMouseLeave, this);
        window.addEventListener((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.stockChartResize.bind(this));
        this.setStyle(this.element);
    };
    StockChart.prototype.initPrivateVariable = function () {
        if (this.element.id === '') {
            var collection = document.getElementsByClassName('e-stockChart').length;
            this.element.id = 'stockChart_' + this.chartid + '_' + collection;
        }
    };
    /**
     * Method to set culture for chart
     */
    StockChart.prototype.setCulture = function () {
        this.intl = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"]();
    };
    StockChart.prototype.storeDataSource = function () {
        var _this = this;
        this.series.forEach(function (series) {
            _this.tempDataSource.push(series.dataSource);
            _this.tempSeriesType.push(series.type);
        });
    };
    /**
     * To Initialize the control rendering.
     */
    StockChart.prototype.render = function () {
        this.trigger('load', { stockChart: this });
        this.storeDataSource();
        this.drawSVG();
        this.renderTitle();
        this.chartModuleInjection();
        this.chartRender();
        if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) || !(this.series[0].dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"])) {
            this.stockChartDataManagerSuccess();
            this.initialRender = false;
        }
    };
    /**
     * DataManager Success
     */
    StockChart.prototype.stockChartDataManagerSuccess = function () {
        this.findRange();
        this.renderRangeSelector();
        this.renderPeriodSelector();
        this.trigger('loaded', { stockChart: this });
    };
    /**
     * To set styles to resolve mvc width issue.
     * @param element
     */
    StockChart.prototype.setStyle = function (element) {
        var zooming = this.zoomSettings;
        var disableScroll = zooming.enableSelectionZooming || zooming.enablePinchZooming ||
            this.selectionMode !== 'None' || this.crosshair.enable;
        element.style.msTouchAction = disableScroll ? 'none' : 'element';
        element.style.touchAction = disableScroll ? 'none' : 'element';
        element.style.msUserSelect = 'none';
        element.style.msContentZooming = 'none';
        element.style.position = 'relative';
        element.style.display = 'block';
        element.style.webkitUserSelect = 'none';
    };
    StockChart.prototype.drawSVG = function () {
        this.removeSvg();
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["calculateSize"])(this);
        this.renderer = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["SvgRenderer"](this.element.id);
        this.renderBorder();
        this.createSecondaryElements();
        //overall svg in which chart and selector appened
        this.mainObject = this.renderer.createSvg({
            id: this.element.id + '_stockChart_svg',
            width: this.availableSize.width,
            height: this.availableSize.height - (this.enablePeriodSelector ? this.toolbarHeight : 0) - this.titleSize.height
        });
        this.svgObject = this.mainObject;
        this.element.appendChild(this.mainObject);
    };
    StockChart.prototype.createSecondaryElements = function () {
        var tooltipDiv = Object(_index__WEBPACK_IMPORTED_MODULE_3__["redrawElement"])(false, this.element.id + '_Secondary_Element') ||
            this.createElement('div');
        tooltipDiv.id = this.element.id + '_Secondary_Element';
        if (this.title) {
            this.titleSize = Object(_syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["measureText"])(this.title, this.titleStyle);
            this.titleSize.height += 15; // for title padding
        }
        else {
            this.titleSize = { height: null, width: null };
        }
        var height = (this.enablePeriodSelector ? this.toolbarHeight : 0) + this.titleSize.height;
        tooltipDiv.setAttribute('style', 'position: relative; height:' + height + 'px');
        Object(_index__WEBPACK_IMPORTED_MODULE_3__["appendChildElement"])(false, this.element, tooltipDiv, false);
    };
    /**
     * Render period selector
     */
    StockChart.prototype.renderPeriodSelector = function () {
        if (this.enablePeriodSelector) {
            this.toolbarSelector.initializePeriodSelector();
            this.periodSelector.toolbar.refreshOverflow(); //to avoid overlapping toolbar elements
            if (!this.enableSelector) {
                this.cartesianChart.cartesianChartRefresh(this, this.startValue, this.endValue);
            }
        }
    };
    StockChart.prototype.chartRender = function () {
        this.cartesianChart = new _renderer_cartesian_chart__WEBPACK_IMPORTED_MODULE_9__["CartesianChart"](this);
        this.cartesianChart.initializeChart();
    };
    /**
     * To render range Selector
     */
    StockChart.prototype.renderRangeSelector = function () {
        //SVG in which range navigator is going to append
        if (this.enableSelector) {
            this.rangeSelector = new _renderer_range_selector__WEBPACK_IMPORTED_MODULE_10__["RangeSelector"](this);
            this.rangeSelector.initializeRangeNavigator();
        }
    };
    /**
     * Get component name
     */
    StockChart.prototype.getModuleName = function () {
        return 'stockChart';
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @private
     */
    StockChart.prototype.getPersistData = function () {
        return '';
    };
    /**
     * To Remove the SVG.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.removeSvg = function () {
        if (document.getElementById(this.element.id + '_Secondary_Element')) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(document.getElementById(this.element.id + '_Secondary_Element'));
        }
        var removeLength = 0;
        if (this.mainObject) {
            while (this.mainObject.childNodes.length > removeLength) {
                this.mainObject.removeChild(this.mainObject.firstChild);
            }
            if (!this.mainObject.hasChildNodes() && this.mainObject.parentNode) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.mainObject);
                this.mainObject = null;
                this.selectorObject = null;
                this.chartObject = null;
            }
        }
    };
    /**
     * Module Injection for components
     */
    StockChart.prototype.chartModuleInjection = function () {
        var moduleName;
        for (var _i = 0, _a = this.getInjectedModules(); _i < _a.length; _i++) {
            var modules = _a[_i];
            moduleName = modules.prototype.getModuleName().toLowerCase();
            if (moduleName.indexOf('rangetooltip') === -1) {
                _chart_index__WEBPACK_IMPORTED_MODULE_2__["Chart"].Inject(modules);
            }
            else {
                _index__WEBPACK_IMPORTED_MODULE_3__["RangeNavigator"].Inject(modules);
            }
            if (moduleName === 'datetime' || moduleName === 'areaseries' || moduleName === 'steplineseries') {
                _index__WEBPACK_IMPORTED_MODULE_3__["RangeNavigator"].Inject(modules);
            }
        }
    };
    /**
     * find range for financal chart
     */
    StockChart.prototype.findRange = function () {
        var _this = this;
        this.seriesXMin = Infinity;
        this.seriesXMax = -Infinity;
        for (var _i = 0, _a = this.chart.axisCollections; _i < _a.length; _i++) {
            var axis = _a[_i];
            if (axis.orientation === 'Horizontal') {
                this.seriesXMin = Math.min(this.seriesXMin, axis.visibleRange.min);
                this.seriesXMax = Math.max(this.seriesXMax, axis.visibleRange.max);
            }
            this.endValue = this.currentEnd = this.seriesXMax;
            if (this.enablePeriodSelector) {
                this.toolbarSelector = new _renderer_toolbar_selector__WEBPACK_IMPORTED_MODULE_11__["ToolBarSelector"](this);
                this.periodSelector = new _common_period_selector_period_selector__WEBPACK_IMPORTED_MODULE_8__["PeriodSelector"](this);
                this.periods = this.periods.length ? this.periods : this.toolbarSelector.calculateAutoPeriods();
                this.periods.map(function (period, index) {
                    if (period.selected && period.text.toLowerCase() === 'ytd') {
                        _this.startValue = new Date(new Date(_this.currentEnd).getFullYear().toString()).getTime();
                    }
                    else if (period.selected && period.text.toLowerCase() === 'all') {
                        _this.startValue = _this.seriesXMin;
                    }
                    else if (period.selected) {
                        _this.startValue = _this.periodSelector.changedRange(period.intervalType, _this.endValue, period.interval).getTime();
                    }
                });
            }
            else {
                this.startValue = this.seriesXMin;
            }
        }
    };
    /**
     * Handles the chart resize.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.stockChartResize = function (e) {
        var _this = this;
        this.animateSeries = false;
        if (this.resizeTo) {
            clearTimeout(this.resizeTo);
        }
        this.resizeTo = setTimeout(function () {
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["calculateSize"])(_this);
            _this.renderBorder();
            _this.renderTitle();
            _this.cartesianChart.cartesianChartRefresh(_this, _this.startValue, _this.endValue);
            _this.mainObject.setAttribute('width', _this.availableSize.width.toString());
            if (_this.enablePeriodSelector) {
                _this.renderPeriodSelector();
            }
        }, 500);
        return false;
    };
    /**
     * Handles the mouse down on chart.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.stockChartOnMouseDown = function (e) {
        var pageX;
        var pageY;
        var target;
        var touchArg;
        var offset = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 20 : 30;
        var rect = this.chart.element.getBoundingClientRect();
        var element = e.target;
        this.trigger('stockChartMouseDown', { target: element.id, x: this.mouseX, y: this.mouseY });
        if (e.type === 'touchstart') {
            this.isTouch = true;
            touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            target = touchArg.target;
            pageY = touchArg.changedTouches[0].clientY;
        }
        else {
            this.isTouch = e.pointerType === 'touch';
            pageX = e.clientX;
            pageY = e.clientY;
            target = e.target;
        }
        if (target.id.indexOf(this.element.id + '_stockChart_chart') > -1) {
            var svgRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_stockChart_chart').getBoundingClientRect();
            this.mouseDownY = this.previousMouseMoveY = (pageY - rect.top) - Math.max(svgRect.top - rect.top, 0);
            this.mouseDownX = this.previousMouseMoveX = (pageX - rect.left) - Math.max(svgRect.left - rect.left, 0);
            this.setMouseXY(this.mouseDownX, this.mouseDownY);
            this.referenceXAxis = this.chart.primaryXAxis;
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_stockChart_chart').setAttribute('cursor', 'pointer');
            this.mouseDownXPoint = Object(_range_navigator_index__WEBPACK_IMPORTED_MODULE_7__["getRangeValueXByPoint"])(this.mouseX - this.referenceXAxis.rect.x, this.referenceXAxis.rect.width, this.referenceXAxis.visibleRange, this.referenceXAxis.isInversed);
            this.allowPan = true;
            this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, e);
        }
        return false;
    };
    /**
     * Handles the mouse up.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.stockChartMouseEnd = function (e) {
        var pageY;
        var pageX;
        var touchArg;
        if (e.type === 'touchend') {
            touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            pageY = touchArg.changedTouches[0].clientY;
            this.isTouch = true;
        }
        else {
            pageY = e.clientY;
            pageX = e.clientX;
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2';
        }
        Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_stockChart_chart').setAttribute('cursor', 'auto');
        this.onPanning = false;
        this.setMouseXY(pageX, pageY);
        this.stockChartOnMouseUp(e);
        return false;
    };
    /**
     * Handles the mouse up.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.stockChartOnMouseUp = function (e) {
        var element = e.target;
        this.trigger('stockChartMouseUp', { target: element.id, x: this.mouseX, y: this.mouseY });
        this.isChartDrag = false;
        this.allowPan = false;
        if (this.isTouch) {
            this.threshold = new Date().getTime() + 300;
        }
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, e);
        if (this.stockEvent) {
            this.stockEvent.removeStockEventTooltip(0);
        }
        return false;
    };
    /**
     * To find mouse x, y for aligned chart element svg position
     */
    StockChart.prototype.setMouseXY = function (pageX, pageY) {
        var svgRect = Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_stockChart_chart').getBoundingClientRect();
        var rect = this.element.getBoundingClientRect();
        this.mouseX = (pageX - rect.left) - Math.max(svgRect.left - rect.left, 0);
        this.mouseY = (pageY - rect.top) - Math.max(svgRect.top - rect.top, 0);
    };
    /**
     * Handles the mouse move.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.stockChartOnMouseMove = function (e) {
        var pageX;
        var touchArg;
        var pageY;
        if (e.type === 'touchmove') {
            this.isTouch = true;
            touchArg = e;
            pageY = touchArg.changedTouches[0].clientY;
            pageX = touchArg.changedTouches[0].clientX;
        }
        else {
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2' || this.isTouch;
            pageX = e.clientX;
            pageY = e.clientY;
        }
        this.trigger('stockChartMouseMove', { target: e.target.id, x: this.mouseX, y: this.mouseY });
        this.setMouseXY(pageX, pageY);
        this.chartOnMouseMove(e);
        return false;
    };
    /**
     * Handles the mouse move on chart.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.chartOnMouseMove = function (e) {
        if (this.allowPan && this.mouseDownXPoint && this.mouseX !== this.previousMouseMoveX && this.zoomSettings.enablePan) {
            this.onPanning = true;
            Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_stockChart_chart').setAttribute('cursor', 'pointer');
            this.mouseUpXPoint = Object(_range_navigator_index__WEBPACK_IMPORTED_MODULE_7__["getRangeValueXByPoint"])(this.mouseX - this.referenceXAxis.rect.x, this.referenceXAxis.rect.width, this.referenceXAxis.visibleRange, this.referenceXAxis.isInversed);
            var diff = Math.abs(this.mouseUpXPoint - this.mouseDownXPoint);
            if (this.mouseDownXPoint < this.mouseUpXPoint) {
                if (this.seriesXMin <= this.referenceXAxis.visibleRange.min - diff) {
                    this.cartesianChart.cartesianChartRefresh(this, this.referenceXAxis.visibleRange.min - diff, this.referenceXAxis.visibleRange.max - diff);
                    this.rangeSelector.sliderChange(this.referenceXAxis.visibleRange.min - diff, this.referenceXAxis.visibleRange.max - diff);
                }
            }
            else {
                if (this.seriesXMax >= this.referenceXAxis.visibleRange.max + diff) {
                    this.cartesianChart.cartesianChartRefresh(this, this.referenceXAxis.visibleRange.min + diff, this.referenceXAxis.visibleRange.max + diff);
                    this.rangeSelector.sliderChange(this.referenceXAxis.visibleRange.min + diff, this.referenceXAxis.visibleRange.max + diff);
                }
            }
        }
        this.notify(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, e);
        if (e.target.id === '') { //to remove the tooltip when hover on mouse move
            var element = void 0;
            if (this.chart.tooltip.enable || this.crosshair.enable) {
                element = document.getElementById(this.element.id + '_stockChart_chart_tooltip');
                if (element) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element);
                }
            }
            if (Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_StockEvents_Tooltip')) {
                this.stockEvent.removeStockEventTooltip(0);
            }
        }
        if (e.target.id.indexOf('StockEvents') !== -1) {
            clearInterval(this.stockEvent.toolTipInterval);
            this.stockEvent.renderStockEventTooltip(e.target.id);
        }
        else {
            if (this.stockEvent) {
                this.stockEvent.removeStockEventTooltip(1000);
            }
        }
        this.isTouch = false;
        return false;
    };
    /**
     * Handles the mouse click on chart.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.stockChartOnMouseClick = function (e) {
        var element = e.target;
        this.trigger('stockChartMouseClick', { target: element.id, x: this.mouseX, y: this.mouseY });
        this.notify('click', e);
        return false;
    };
    StockChart.prototype.stockChartRightClick = function (event) {
        if (this.crosshair.enable &&
            (event.buttons === 2 || event.which === 0 || event.pointerType === 'touch')) {
            event.preventDefault();
            event.stopPropagation();
            return false;
        }
        return true;
    };
    /**
     * Handles the mouse leave.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.stockChartOnMouseLeave = function (e) {
        var touchArg;
        var pageX;
        var pageY;
        if (e.type === 'touchleave') {
            this.isTouch = true;
            touchArg = e;
            pageX = touchArg.changedTouches[0].clientX;
            pageY = touchArg.changedTouches[0].clientY;
        }
        else {
            pageX = e.clientX;
            pageY = e.clientY;
            this.isTouch = e.pointerType === 'touch' || e.pointerType === '2';
        }
        this.setMouseXY(pageX, pageY);
        this.allowPan = false;
        this.stockChartOnMouseLeaveEvent(e);
        return false;
    };
    /**
     * Handles the mouse leave on chart.
     * @return {boolean}
     * @private
     */
    StockChart.prototype.stockChartOnMouseLeaveEvent = function (e) {
        var element = e.target;
        var cancelEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isPointer ? 'pointerleave' : 'mouseleave';
        //this.trigger(chartMouseLeave, { target: element.id, x: this.mouseX, y: this.mouseY });
        this.isChartDrag = false;
        this.notify(cancelEvent, e);
        if (this.stockEvent) {
            this.stockEvent.removeStockEventTooltip(1000);
        }
        return false;
    };
    /**
     * Destroy method
     */
    StockChart.prototype.destroy = function () {
        //Perform destroy here
    };
    StockChart.prototype.renderBorder = function () {
        if (this.border.width) {
            var border = this.createElement('div');
            border.id = this.element.id + '_stock_border';
            border.style.width = (this.availableSize.width) + 'px';
            border.style.height = (this.availableSize.height) + 'px';
            border.style.position = 'absolute';
            border.style.border = this.border.width + 'px solid ' + this.border.color;
            border.style.pointerEvents = 'none';
            Object(_index__WEBPACK_IMPORTED_MODULE_3__["appendChildElement"])(false, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id), border);
        }
    };
    /**
     * Render title for chart
     */
    StockChart.prototype.renderTitle = function () {
        var rect;
        if (this.title) {
            Object(_index__WEBPACK_IMPORTED_MODULE_3__["appendChildElement"])(false, Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_Secondary_Element'), this.renderer.createSvg({
                id: this.element.id + '_stockChart_Title',
                width: this.availableSize.width,
                height: this.titleSize.height,
                fill: this.background || this.stockChartTheme.background
            }), false);
            var alignment = this.titleStyle.textAlignment;
            var getAnchor = alignment === 'Near' ? 'start' : alignment === 'Far' ? 'end' : 'middle';
            rect = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["Rect"](0, 0, this.availableSize.width, 0);
            var options = new _syncfusion_ej2_svg_base__WEBPACK_IMPORTED_MODULE_4__["TextOption"](this.element.id + '_ChartTitle', Object(_index__WEBPACK_IMPORTED_MODULE_3__["titlePositionX"])(rect, this.titleStyle), ((this.titleSize.height - 10)), getAnchor, this.title, '', 'auto');
            var element = Object(_index__WEBPACK_IMPORTED_MODULE_3__["textElement"])(this.renderer, options, this.titleStyle, this.titleStyle.color || this.findTitleColor(), Object(_common_utils_helper__WEBPACK_IMPORTED_MODULE_6__["getElement"])(this.element.id + '_stockChart_Title'), false, false);
            this.availableSize.height -= (this.titleSize.height + 5);
        }
    };
    StockChart.prototype.findTitleColor = function () {
        if (this.theme.indexOf('Highcontrast') > -1 || this.theme.indexOf('Dark') > -1) {
            return '#ffffff';
        }
        return '#424242';
    };
    /**
     * @private
     */
    StockChart.prototype.calculateStockEvents = function () {
        if (this.stockEvents.length) {
            this.stockEvent = new _renderer_stock_events__WEBPACK_IMPORTED_MODULE_14__["StockEvents"](this);
            Object(_index__WEBPACK_IMPORTED_MODULE_3__["appendChildElement"])(false, this.chartObject, this.stockEvent.renderStockEvents());
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChart.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChart.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChart.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _model_base__WEBPACK_IMPORTED_MODULE_12__["StockMargin"])
    ], StockChart.prototype, "margin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#DDDDDD', width: 1 }, _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartBorder"])
    ], StockChart.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], StockChart.prototype, "background", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Material')
    ], StockChart.prototype, "theme", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ name: 'primaryXAxis', valueType: 'DateTime' }, _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartAxis"])
    ], StockChart.prototype, "primaryXAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ border: { color: null, width: 0.5 }, background: 'transparent' }, _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartArea"])
    ], StockChart.prototype, "chartArea", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ name: 'primaryYAxis', opposedPosition: true, labelPosition: 'Inside' }, _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartAxis"])
    ], StockChart.prototype, "primaryYAxis", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartRow"])
    ], StockChart.prototype, "rows", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{ opposedPosition: true }], _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartAxis"])
    ], StockChart.prototype, "axes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _model_base__WEBPACK_IMPORTED_MODULE_12__["StockSeries"])
    ], StockChart.prototype, "series", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _model_base__WEBPACK_IMPORTED_MODULE_12__["StockEventsSettings"])
    ], StockChart.prototype, "stockEvents", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockChart.prototype, "isTransposed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], StockChart.prototype, "title", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ size: '15px', fontWeight: '500', color: null, fontStyle: 'Normal', fontFamily: 'Segoe UI' }, _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartFont"])
    ], StockChart.prototype, "titleStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartIndicator"])
    ], StockChart.prototype, "indicators", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ shared: true, enableMarker: false }, _chart_index__WEBPACK_IMPORTED_MODULE_2__["TooltipSettings"])
    ], StockChart.prototype, "tooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ dashArray: '5' }, _chart_index__WEBPACK_IMPORTED_MODULE_2__["CrosshairSettings"])
    ], StockChart.prototype, "crosshair", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _chart_index__WEBPACK_IMPORTED_MODULE_2__["ZoomSettings"])
    ], StockChart.prototype, "zoomSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockChart.prototype, "enablePeriodSelector", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockChart.prototype, "enableCustomRange", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockChart.prototype, "isSelect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], StockChart.prototype, "enableSelector", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _common_model_base__WEBPACK_IMPORTED_MODULE_5__["Periods"])
    ], StockChart.prototype, "periods", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartAnnotationSettings"])
    ], StockChart.prototype, "annotations", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "selectorRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "stockChartMouseMove", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "stockChartMouseLeave", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "stockChartMouseDown", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "stockChartMouseUp", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "stockChartMouseClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "pointClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "pointMove", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], StockChart.prototype, "selectionMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], StockChart.prototype, "isMultiSelect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "load", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "loaded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "rangeChange", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "axisLabelRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "tooltipRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "seriesRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], StockChart.prototype, "stockEventRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _model_base__WEBPACK_IMPORTED_MODULE_12__["StockChartIndexes"])
    ], StockChart.prototype, "selectedDataIndexes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(['Line', 'Hilo', 'OHLC', 'Hollow Candle', 'Spline', 'Candle'])
    ], StockChart.prototype, "seriesType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(['EMA', 'TMA', 'SMA', 'Momentum', 'ATR', 'Accumulation Distribution', 'Bollinger Bands', 'MACD', 'Stochastic', 'RSI'])
    ], StockChart.prototype, "indicatorType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(['PNG', 'JPEG', 'SVG', 'PDF', 'Print'])
    ], StockChart.prototype, "exportType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(['Linear', 'Exponential', 'Polynomial', 'Logarithmic', 'Moving Average'])
    ], StockChart.prototype, "trendlineType", void 0);
    return StockChart;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-compression/index.js":
/*!***********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-compression/index.js ***!
  \***********************************************************/
/*! exports provided: ZipArchive, ZipArchiveItem, CompressedStreamWriter, CompressorHuffmanTree, ChecksumCalculator */
/***/ (function(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-compression/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZipArchive", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ZipArchive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZipArchiveItem", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ZipArchiveItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompressedStreamWriter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CompressedStreamWriter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompressorHuffmanTree", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CompressorHuffmanTree"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChecksumCalculator", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ChecksumCalculator"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-compression/src/compression-writer.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-compression/src/compression-writer.js ***!
  \****************************************************************************/
/*! exports provided: CompressedStreamWriter, CompressorHuffmanTree, ChecksumCalculator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompressedStreamWriter", function() { return CompressedStreamWriter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompressorHuffmanTree", function() { return CompressorHuffmanTree; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChecksumCalculator", function() { return ChecksumCalculator; });
/* harmony import */ var _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-file-utils */ "./node_modules/@syncfusion/ej2-file-utils/index.js");

/**
 * array literal codes
 */
var ARR_LITERAL_CODES = new Int16Array(286);
var ARR_LITERAL_LENGTHS = new Uint8Array(286);
var ARR_DISTANCE_CODES = new Int16Array(30);
var ARR_DISTANCE_LENGTHS = new Uint8Array(30);
/**
 * represent compression stream writer
 * ```typescript
 * let compressedWriter = new CompressedStreamWriter();
 * let text: string = 'Hello world!!!';
 * compressedWriter.write(text, 0, text.length);
 * compressedWriter.close();
 * ```
 */
var CompressedStreamWriter = /** @class */ (function () {
    /**
     * Initializes compressor and writes ZLib header if needed.
     * @param {boolean} noWrap - optional if true, ZLib header and checksum will not be written.
     */
    function CompressedStreamWriter(noWrap) {
        this.pendingBuffer = new Uint8Array(1 << 16);
        this.pendingBufLength = 0;
        this.pendingBufCache = 0;
        this.pendingBufBitsInCache = 0;
        this.bufferPosition = 0;
        this.extraBits = 0;
        this.currentHash = 0;
        this.matchStart = 0;
        this.matchLength = 0;
        this.matchPrevAvail = false;
        this.blockStart = 0;
        this.stringStart = 0;
        this.lookAhead = 0;
        this.totalBytesIn = 0;
        this.inputOffset = 0;
        this.inputEnd = 0;
        this.windowSize = 1 << 15;
        this.windowMask = this.windowSize - 1;
        this.hashSize = 1 << 15;
        this.hashMask = this.hashSize - 1;
        this.hashShift = Math.floor((15 + 3 - 1) / 3);
        this.maxDist = this.windowSize - 262;
        this.checkSum = 1;
        this.noWrap = false;
        if (!CompressedStreamWriter.isHuffmanTreeInitiated) {
            CompressedStreamWriter.initHuffmanTree();
            CompressedStreamWriter.isHuffmanTreeInitiated = true;
        }
        this.treeLiteral = new CompressorHuffmanTree(this, 286, 257, 15);
        this.treeDistances = new CompressorHuffmanTree(this, 30, 1, 15);
        this.treeCodeLengths = new CompressorHuffmanTree(this, 19, 4, 7);
        this.arrDistances = new Uint16Array((1 << 14));
        this.arrLiterals = new Uint8Array((1 << 14));
        this.stream = [];
        this.dataWindow = new Uint8Array(2 * this.windowSize);
        this.hashHead = new Int16Array(this.hashSize);
        this.hashPrevious = new Int16Array(this.windowSize);
        this.blockStart = this.stringStart = 1;
        this.noWrap = noWrap;
        if (!noWrap) {
            this.writeZLibHeader();
        }
    }
    Object.defineProperty(CompressedStreamWriter.prototype, "compressedData", {
        /**
         * get compressed data
         */
        get: function () {
            return this.stream;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CompressedStreamWriter.prototype, "getCompressedString", {
        get: function () {
            var compressedString = '';
            if (this.stream !== undefined) {
                for (var i = 0; i < this.stream.length; i++) {
                    compressedString += String.fromCharCode.apply(null, this.stream[i]);
                }
            }
            return compressedString;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Compresses data and writes it to the stream.
     * @param {Uint8Array} data - data to compress
     * @param {number} offset - offset in data
     * @param {number} length - length of the data
     * @returns {void}
     */
    CompressedStreamWriter.prototype.write = function (data, offset, length) {
        if (data === undefined || data === null) {
            throw new Error('ArgumentException: data cannot null or undefined');
        }
        var end = offset + length;
        if (0 > offset || offset > end || end > data.length) {
            throw new Error('ArgumentOutOfRangeException: Offset or length is incorrect');
        }
        if (typeof data === 'string') {
            var encode = new _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_0__["Encoding"](false);
            encode.type = 'Utf8';
            data = new Uint8Array(encode.getBytes(data, 0, data.length));
            end = offset + data.length;
        }
        this.inputBuffer = data;
        this.inputOffset = offset;
        this.inputEnd = end;
        if (!this.noWrap) {
            this.checkSum = ChecksumCalculator.checksumUpdate(this.checkSum, this.inputBuffer, this.inputOffset, end);
        }
        while (!(this.inputEnd === this.inputOffset) || !(this.pendingBufLength === 0)) {
            this.pendingBufferFlush();
            this.compressData(false);
        }
    };
    /**
     * write ZLib header to the compressed data
     * @return {void}
     */
    CompressedStreamWriter.prototype.writeZLibHeader = function () {
        /* Initialize header.*/
        var headerDate = (8 + (7 << 4)) << 8;
        /* Save compression level.*/
        headerDate |= ((5 >> 2) & 3) << 6;
        /* Align header.*/
        headerDate += 31 - (headerDate % 31);
        /* Write header to stream.*/
        this.pendingBufferWriteShortBytes(headerDate);
    };
    /**
     *  Write Most Significant Bytes in to stream
     * @param {number} s - check sum value
     */
    CompressedStreamWriter.prototype.pendingBufferWriteShortBytes = function (s) {
        this.pendingBuffer[this.pendingBufLength++] = s >> 8;
        this.pendingBuffer[this.pendingBufLength++] = s;
    };
    CompressedStreamWriter.prototype.compressData = function (finish) {
        var success;
        do {
            this.fillWindow();
            var canFlush = (finish && this.inputEnd === this.inputOffset);
            success = this.compressSlow(canFlush, finish);
        } while (this.pendingBufLength === 0 && success);
        return success;
    };
    CompressedStreamWriter.prototype.compressSlow = function (flush, finish) {
        if (this.lookAhead < 262 && !flush) {
            return false;
        }
        while (this.lookAhead >= 262 || flush) {
            if (this.lookAhead === 0) {
                return this.lookAheadCompleted(finish);
            }
            if (this.stringStart >= 2 * this.windowSize - 262) {
                this.slideWindow();
            }
            var prevMatch = this.matchStart;
            var prevLen = this.matchLength;
            if (this.lookAhead >= 3) {
                this.discardMatch();
            }
            if (prevLen >= 3 && this.matchLength <= prevLen) {
                prevLen = this.matchPreviousBest(prevMatch, prevLen);
            }
            else {
                this.matchPreviousAvailable();
            }
            if (this.bufferPosition >= (1 << 14)) {
                return this.huffmanIsFull(finish);
            }
        }
        return true;
    };
    CompressedStreamWriter.prototype.discardMatch = function () {
        var hashHead = this.insertString();
        if (hashHead !== 0 && this.stringStart - hashHead <= this.maxDist && this.findLongestMatch(hashHead)) {
            if (this.matchLength <= 5 && (this.matchLength === 3 && this.stringStart - this.matchStart > 4096)) {
                this.matchLength = 3 - 1;
            }
        }
    };
    CompressedStreamWriter.prototype.matchPreviousAvailable = function () {
        if (this.matchPrevAvail) {
            this.huffmanTallyLit(this.dataWindow[this.stringStart - 1] & 0xff);
        }
        this.matchPrevAvail = true;
        this.stringStart++;
        this.lookAhead--;
    };
    CompressedStreamWriter.prototype.matchPreviousBest = function (prevMatch, prevLen) {
        this.huffmanTallyDist(this.stringStart - 1 - prevMatch, prevLen);
        prevLen -= 2;
        do {
            this.stringStart++;
            this.lookAhead--;
            if (this.lookAhead >= 3) {
                this.insertString();
            }
        } while (--prevLen > 0);
        this.stringStart++;
        this.lookAhead--;
        this.matchPrevAvail = false;
        this.matchLength = 3 - 1;
        return prevLen;
    };
    CompressedStreamWriter.prototype.lookAheadCompleted = function (finish) {
        if (this.matchPrevAvail) {
            this.huffmanTallyLit(this.dataWindow[this.stringStart - 1] & 0xff);
        }
        this.matchPrevAvail = false;
        this.huffmanFlushBlock(this.dataWindow, this.blockStart, this.stringStart - this.blockStart, finish);
        this.blockStart = this.stringStart;
        return false;
    };
    CompressedStreamWriter.prototype.huffmanIsFull = function (finish) {
        var len = this.stringStart - this.blockStart;
        if (this.matchPrevAvail) {
            len--;
        }
        var lastBlock = (finish && this.lookAhead === 0 && !this.matchPrevAvail);
        this.huffmanFlushBlock(this.dataWindow, this.blockStart, len, lastBlock);
        this.blockStart += len;
        return !lastBlock;
    };
    CompressedStreamWriter.prototype.fillWindow = function () {
        if (this.stringStart >= this.windowSize + this.maxDist) {
            this.slideWindow();
        }
        while (this.lookAhead < 262 && this.inputOffset < this.inputEnd) {
            var more = 2 * this.windowSize - this.lookAhead - this.stringStart;
            if (more > this.inputEnd - this.inputOffset) {
                more = this.inputEnd - this.inputOffset;
            }
            this.dataWindow.set(this.inputBuffer.subarray(this.inputOffset, this.inputOffset + more), this.stringStart + this.lookAhead);
            this.inputOffset += more;
            this.totalBytesIn += more;
            this.lookAhead += more;
        }
        if (this.lookAhead >= 3) {
            this.updateHash();
        }
    };
    CompressedStreamWriter.prototype.slideWindow = function () {
        this.dataWindow.set(this.dataWindow.subarray(this.windowSize, this.windowSize + this.windowSize), 0);
        this.matchStart -= this.windowSize;
        this.stringStart -= this.windowSize;
        this.blockStart -= this.windowSize;
        for (var i = 0; i < this.hashSize; ++i) {
            var m = this.hashHead[i] & 0xffff;
            this.hashHead[i] = (((m >= this.windowSize) ? (m - this.windowSize) : 0));
        }
        for (var i = 0; i < this.windowSize; i++) {
            var m = this.hashPrevious[i] & 0xffff;
            this.hashPrevious[i] = ((m >= this.windowSize) ? (m - this.windowSize) : 0);
        }
    };
    CompressedStreamWriter.prototype.insertString = function () {
        var match;
        var hash = ((this.currentHash << this.hashShift) ^ this.dataWindow[this.stringStart + (3 - 1)]) & this.hashMask;
        this.hashPrevious[this.stringStart & this.windowMask] = match = this.hashHead[hash];
        this.hashHead[hash] = this.stringStart;
        this.currentHash = hash;
        return match & 0xffff;
    };
    CompressedStreamWriter.prototype.findLongestMatch = function (curMatch) {
        var chainLen = 4096;
        var niceLen = 258;
        var scan = this.stringStart;
        var match;
        var bestEnd = this.stringStart + this.matchLength;
        var bestLength = Math.max(this.matchLength, 3 - 1);
        var limit = Math.max(this.stringStart - this.maxDist, 0);
        var stringEnd = this.stringStart + 258 - 1;
        var scanEnd1 = this.dataWindow[bestEnd - 1];
        var scanEnd = this.dataWindow[bestEnd];
        var data = this.dataWindow;
        if (bestLength >= 32) {
            chainLen >>= 2;
        }
        if (niceLen > this.lookAhead) {
            niceLen = this.lookAhead;
        }
        do {
            if (data[curMatch + bestLength] !== scanEnd ||
                data[curMatch + bestLength - 1] !== scanEnd1 ||
                data[curMatch] !== data[scan] ||
                data[curMatch + 1] !== data[scan + 1]) {
                continue;
            }
            match = curMatch + 2;
            scan += 2;
            /* tslint:disable */
            while (data[++scan] === data[++match] && data[++scan] === data[++match] &&
                data[++scan] === data[++match] && data[++scan] === data[++match] &&
                data[++scan] === data[++match] && data[++scan] === data[++match] &&
                data[++scan] === data[++match] && data[++scan] === data[++match] && scan < stringEnd) {
                /* tslint:disable */
            }
            if (scan > bestEnd) {
                this.matchStart = curMatch;
                bestEnd = scan;
                bestLength = scan - this.stringStart;
                if (bestLength >= niceLen) {
                    break;
                }
                scanEnd1 = data[bestEnd - 1];
                scanEnd = data[bestEnd];
            }
            scan = this.stringStart;
        } while ((curMatch = (this.hashPrevious[curMatch & this.windowMask] & 0xffff)) > limit && --chainLen !== 0);
        this.matchLength = Math.min(bestLength, this.lookAhead);
        return this.matchLength >= 3;
    };
    CompressedStreamWriter.prototype.updateHash = function () {
        this.currentHash = (this.dataWindow[this.stringStart] << this.hashShift) ^ this.dataWindow[this.stringStart + 1];
    };
    CompressedStreamWriter.prototype.huffmanTallyLit = function (literal) {
        this.arrDistances[this.bufferPosition] = 0;
        this.arrLiterals[this.bufferPosition++] = literal;
        this.treeLiteral.codeFrequencies[literal]++;
        return this.bufferPosition >= (1 << 14);
    };
    CompressedStreamWriter.prototype.huffmanTallyDist = function (dist, len) {
        this.arrDistances[this.bufferPosition] = dist;
        this.arrLiterals[this.bufferPosition++] = (len - 3);
        var lc = this.huffmanLengthCode(len - 3);
        this.treeLiteral.codeFrequencies[lc]++;
        if (lc >= 265 && lc < 285) {
            this.extraBits += Math.floor((lc - 261) / 4);
        }
        var dc = this.huffmanDistanceCode(dist - 1);
        this.treeDistances.codeFrequencies[dc]++;
        if (dc >= 4) {
            this.extraBits += Math.floor((dc / 2 - 1));
        }
        return this.bufferPosition >= (1 << 14);
    };
    CompressedStreamWriter.prototype.huffmanFlushBlock = function (stored, storedOffset, storedLength, lastBlock) {
        this.treeLiteral.codeFrequencies[256]++;
        this.treeLiteral.buildTree();
        this.treeDistances.buildTree();
        this.treeLiteral.calculateBLFreq(this.treeCodeLengths);
        this.treeDistances.calculateBLFreq(this.treeCodeLengths);
        this.treeCodeLengths.buildTree();
        var blTreeCodes = 4;
        for (var i = 18; i > blTreeCodes; i--) {
            if (this.treeCodeLengths.codeLengths[CompressorHuffmanTree.huffCodeLengthOrders[i]] > 0) {
                blTreeCodes = i + 1;
            }
        }
        var opt_len = 14 + blTreeCodes * 3 + this.treeCodeLengths.getEncodedLength() +
            this.treeLiteral.getEncodedLength() + this.treeDistances.getEncodedLength() + this.extraBits;
        var static_len = this.extraBits;
        for (var i = 0; i < 286; i++) {
            static_len += this.treeLiteral.codeFrequencies[i] * ARR_LITERAL_LENGTHS[i];
        }
        for (var i = 0; i < 30; i++) {
            static_len += this.treeDistances.codeFrequencies[i] * ARR_DISTANCE_LENGTHS[i];
        }
        if (opt_len >= static_len) {
            // Force static trees.
            opt_len = static_len;
        }
        if (storedOffset >= 0 && storedLength + 4 < opt_len >> 3) {
            this.huffmanFlushStoredBlock(stored, storedOffset, storedLength, lastBlock);
        }
        else if (opt_len == static_len) {
            // Encode with static tree.
            this.pendingBufferWriteBits((1 << 1) + (lastBlock ? 1 : 0), 3);
            this.treeLiteral.setStaticCodes(ARR_LITERAL_CODES, ARR_LITERAL_LENGTHS);
            this.treeDistances.setStaticCodes(ARR_DISTANCE_CODES, ARR_DISTANCE_LENGTHS);
            this.huffmanCompressBlock();
            this.huffmanReset();
        }
        else {
            this.pendingBufferWriteBits((2 << 1) + (lastBlock ? 1 : 0), 3);
            this.huffmanSendAllTrees(blTreeCodes);
            this.huffmanCompressBlock();
            this.huffmanReset();
        }
    };
    CompressedStreamWriter.prototype.huffmanFlushStoredBlock = function (stored, storedOffset, storedLength, lastBlock) {
        this.pendingBufferWriteBits((0 << 1) + (lastBlock ? 1 : 0), 3);
        this.pendingBufferAlignToByte();
        this.pendingBufferWriteShort(storedLength);
        this.pendingBufferWriteShort(~storedLength);
        this.pendingBufferWriteByteBlock(stored, storedOffset, storedLength);
        this.huffmanReset();
    };
    CompressedStreamWriter.prototype.huffmanLengthCode = function (len) {
        if (len === 255) {
            return 285;
        }
        var code = 257;
        while (len >= 8) {
            code += 4;
            len >>= 1;
        }
        return code + len;
    };
    CompressedStreamWriter.prototype.huffmanDistanceCode = function (distance) {
        var code = 0;
        while (distance >= 4) {
            code += 2;
            distance >>= 1;
        }
        return code + distance;
    };
    CompressedStreamWriter.prototype.huffmanSendAllTrees = function (blTreeCodes) {
        this.treeCodeLengths.buildCodes();
        this.treeLiteral.buildCodes();
        this.treeDistances.buildCodes();
        this.pendingBufferWriteBits(this.treeLiteral.treeLength - 257, 5);
        this.pendingBufferWriteBits(this.treeDistances.treeLength - 1, 5);
        this.pendingBufferWriteBits(blTreeCodes - 4, 4);
        for (var rank = 0; rank < blTreeCodes; rank++) {
            this.pendingBufferWriteBits(this.treeCodeLengths.codeLengths[CompressorHuffmanTree.huffCodeLengthOrders[rank]], 3);
        }
        this.treeLiteral.writeTree(this.treeCodeLengths);
        this.treeDistances.writeTree(this.treeCodeLengths);
    };
    CompressedStreamWriter.prototype.huffmanReset = function () {
        this.bufferPosition = 0;
        this.extraBits = 0;
        this.treeLiteral.reset();
        this.treeDistances.reset();
        this.treeCodeLengths.reset();
    };
    CompressedStreamWriter.prototype.huffmanCompressBlock = function () {
        for (var i = 0; i < this.bufferPosition; i++) {
            var literalLen = this.arrLiterals[i] & 255;
            var dist = this.arrDistances[i];
            if (dist-- !== 0) {
                var lc = this.huffmanLengthCode(literalLen);
                this.treeLiteral.writeCodeToStream(lc);
                var bits = Math.floor((lc - 261) / 4);
                if (bits > 0 && bits <= 5) {
                    this.pendingBufferWriteBits(literalLen & ((1 << bits) - 1), bits);
                }
                var dc = this.huffmanDistanceCode(dist);
                this.treeDistances.writeCodeToStream(dc);
                bits = Math.floor(dc / 2 - 1);
                if (bits > 0) {
                    this.pendingBufferWriteBits(dist & ((1 << bits) - 1), bits);
                }
            }
            else {
                this.treeLiteral.writeCodeToStream(literalLen);
            }
        }
        this.treeLiteral.writeCodeToStream(256);
    };
    /**
     * write bits in to internal buffer
     * @param {number} b - source of bits
     * @param {number} count - count of bits to write
     */
    CompressedStreamWriter.prototype.pendingBufferWriteBits = function (b, count) {
        var uint = new Uint32Array(1);
        uint[0] = this.pendingBufCache | (b << this.pendingBufBitsInCache);
        this.pendingBufCache = uint[0];
        this.pendingBufBitsInCache += count;
        this.pendingBufferFlushBits();
    };
    CompressedStreamWriter.prototype.pendingBufferFlush = function (isClose) {
        this.pendingBufferFlushBits();
        if (this.pendingBufLength > 0) {
            var array = new Uint8Array(this.pendingBufLength);
            array.set(this.pendingBuffer.subarray(0, this.pendingBufLength), 0);
            this.stream.push(array);
        }
        this.pendingBufLength = 0;
    };
    CompressedStreamWriter.prototype.pendingBufferFlushBits = function () {
        var result = 0;
        while (this.pendingBufBitsInCache >= 8 && this.pendingBufLength < (1 << 16)) {
            this.pendingBuffer[this.pendingBufLength++] = this.pendingBufCache;
            this.pendingBufCache >>= 8;
            this.pendingBufBitsInCache -= 8;
            result++;
        }
        return result;
    };
    CompressedStreamWriter.prototype.pendingBufferWriteByteBlock = function (data, offset, length) {
        var array = data.subarray(offset, offset + length);
        this.pendingBuffer.set(array, this.pendingBufLength);
        this.pendingBufLength += length;
    };
    CompressedStreamWriter.prototype.pendingBufferWriteShort = function (s) {
        this.pendingBuffer[this.pendingBufLength++] = s;
        this.pendingBuffer[this.pendingBufLength++] = (s >> 8);
    };
    CompressedStreamWriter.prototype.pendingBufferAlignToByte = function () {
        if (this.pendingBufBitsInCache > 0) {
            this.pendingBuffer[this.pendingBufLength++] = this.pendingBufCache;
        }
        this.pendingBufCache = 0;
        this.pendingBufBitsInCache = 0;
    };
    /**
     * Huffman Tree literal calculation
     * @private
     */
    CompressedStreamWriter.initHuffmanTree = function () {
        var i = 0;
        while (i < 144) {
            ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x030 + i) << 8);
            ARR_LITERAL_LENGTHS[i++] = 8;
        }
        while (i < 256) {
            ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x190 - 144 + i) << 7);
            ARR_LITERAL_LENGTHS[i++] = 9;
        }
        while (i < 280) {
            ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x000 - 256 + i) << 9);
            ARR_LITERAL_LENGTHS[i++] = 7;
        }
        while (i < 286) {
            ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x0c0 - 280 + i) << 8);
            ARR_LITERAL_LENGTHS[i++] = 8;
        }
        for (i = 0; i < 30; i++) {
            ARR_DISTANCE_CODES[i] = CompressorHuffmanTree.bitReverse(i << 11);
            ARR_DISTANCE_LENGTHS[i] = 5;
        }
    };
    /**
     * close the stream and write all pending buffer in to stream
     * @returns {void}
     */
    CompressedStreamWriter.prototype.close = function () {
        do {
            this.pendingBufferFlush(true);
            if (!this.compressData(true)) {
                this.pendingBufferFlush(true);
                this.pendingBufferAlignToByte();
                if (!this.noWrap) {
                    this.pendingBufferWriteShortBytes(this.checkSum >> 16);
                    this.pendingBufferWriteShortBytes(this.checkSum & 0xffff);
                }
                this.pendingBufferFlush(true);
            }
        } while (!(this.inputEnd === this.inputOffset) ||
            !(this.pendingBufLength === 0));
    };
    /**
     * release allocated un-managed resource
     * @returns {void}
     */
    CompressedStreamWriter.prototype.destroy = function () {
        this.stream = [];
        this.stream = undefined;
        this.pendingBuffer = undefined;
        this.treeLiteral = undefined;
        this.treeDistances = undefined;
        this.treeCodeLengths = undefined;
        this.arrLiterals = undefined;
        this.arrDistances = undefined;
        this.hashHead = undefined;
        this.hashPrevious = undefined;
        this.dataWindow = undefined;
        this.inputBuffer = undefined;
        this.pendingBufLength = undefined;
        this.pendingBufCache = undefined;
        this.pendingBufBitsInCache = undefined;
        this.bufferPosition = undefined;
        this.extraBits = undefined;
        this.currentHash = undefined;
        this.matchStart = undefined;
        this.matchLength = undefined;
        this.matchPrevAvail = undefined;
        this.blockStart = undefined;
        this.stringStart = undefined;
        this.lookAhead = undefined;
        this.totalBytesIn = undefined;
        this.inputOffset = undefined;
        this.inputEnd = undefined;
        this.windowSize = undefined;
        this.windowMask = undefined;
        this.hashSize = undefined;
        this.hashMask = undefined;
        this.hashShift = undefined;
        this.maxDist = undefined;
        this.checkSum = undefined;
        this.noWrap = undefined;
    };
    CompressedStreamWriter.isHuffmanTreeInitiated = false;
    return CompressedStreamWriter;
}());

/**
 * represent the Huffman Tree
 */
var CompressorHuffmanTree = /** @class */ (function () {
    /**
     * Create new Huffman Tree
     * @param {CompressedStreamWriter} writer instance
     * @param {number} elementCount - element count
     * @param {number} minCodes - minimum count
     * @param {number} maxLength - maximum count
     */
    function CompressorHuffmanTree(writer, elementCount, minCodes, maxLength) {
        this.writer = writer;
        this.codeMinCount = minCodes;
        this.maxLength = maxLength;
        this.codeFrequency = new Uint16Array(elementCount);
        this.lengthCount = new Int32Array(maxLength);
    }
    Object.defineProperty(CompressorHuffmanTree.prototype, "treeLength", {
        get: function () {
            return this.codeCount;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CompressorHuffmanTree.prototype, "codeLengths", {
        get: function () {
            return this.codeLength;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CompressorHuffmanTree.prototype, "codeFrequencies", {
        get: function () {
            return this.codeFrequency;
        },
        enumerable: true,
        configurable: true
    });
    CompressorHuffmanTree.prototype.setStaticCodes = function (codes, lengths) {
        var temp = new Int16Array(codes.length);
        temp.set(codes, 0);
        this.codes = temp;
        var lengthTemp = new Uint8Array(lengths.length);
        lengthTemp.set(lengths, 0);
        this.codeLength = lengthTemp;
    };
    /**
     * reset all code data in tree
     * @returns {void}
     */
    CompressorHuffmanTree.prototype.reset = function () {
        for (var i = 0; i < this.codeFrequency.length; i++) {
            this.codeFrequency[i] = 0;
        }
        this.codes = undefined;
        this.codeLength = undefined;
    };
    /**
     * write code to the compressor output stream
     * @param {number} code - code to be written
     * @returns {void}
     */
    CompressorHuffmanTree.prototype.writeCodeToStream = function (code) {
        this.writer.pendingBufferWriteBits(this.codes[code] & 0xffff, this.codeLength[code]);
    };
    /**
     * calculate code from their frequencies
     * @returns {void}
     */
    CompressorHuffmanTree.prototype.buildCodes = function () {
        var nextCode = new Int32Array(this.maxLength);
        this.codes = new Int16Array(this.codeCount);
        var code = 0;
        for (var bitsCount = 0; bitsCount < this.maxLength; bitsCount++) {
            nextCode[bitsCount] = code;
            code += this.lengthCount[bitsCount] << (15 - bitsCount);
        }
        for (var i = 0; i < this.codeCount; i++) {
            var bits = this.codeLength[i];
            if (bits > 0) {
                this.codes[i] = CompressorHuffmanTree.bitReverse(nextCode[bits - 1]);
                nextCode[bits - 1] += 1 << (16 - bits);
            }
        }
    };
    CompressorHuffmanTree.bitReverse = function (value) {
        return (CompressorHuffmanTree.reverseBits[value & 15] << 12
            | CompressorHuffmanTree.reverseBits[(value >> 4) & 15] << 8
            | CompressorHuffmanTree.reverseBits[(value >> 8) & 15] << 4
            | CompressorHuffmanTree.reverseBits[value >> 12]);
    };
    /**
     * calculate length of compressed data
     * @returns {number}
     */
    CompressorHuffmanTree.prototype.getEncodedLength = function () {
        var len = 0;
        for (var i = 0; i < this.codeFrequency.length; i++) {
            len += this.codeFrequency[i] * this.codeLength[i];
        }
        return len;
    };
    /**
     * calculate code frequencies
     * @param {CompressorHuffmanTree} blTree
     * @returns {void}
     */
    CompressorHuffmanTree.prototype.calculateBLFreq = function (blTree) {
        var maxCount;
        var minCount;
        var count;
        var curLen = -1;
        var i = 0;
        while (i < this.codeCount) {
            count = 1;
            var nextLen = this.codeLength[i];
            if (nextLen === 0) {
                maxCount = 138;
                minCount = 3;
            }
            else {
                maxCount = 6;
                minCount = 3;
                if (curLen !== nextLen) {
                    blTree.codeFrequency[nextLen]++;
                    count = 0;
                }
            }
            curLen = nextLen;
            i++;
            while (i < this.codeCount && curLen === this.codeLength[i]) {
                i++;
                if (++count >= maxCount) {
                    break;
                }
            }
            if (count < minCount) {
                blTree.codeFrequency[curLen] += count;
            }
            else if (curLen !== 0) {
                blTree.codeFrequency[16]++;
            }
            else if (count <= 10) {
                blTree.codeFrequency[17]++;
            }
            else {
                blTree.codeFrequency[18]++;
            }
        }
    };
    /**
     * @param {CompressorHuffmanTree} blTree - write tree to output stream
     * @returns {void}
     */
    CompressorHuffmanTree.prototype.writeTree = function (blTree) {
        var maxRepeatCount;
        var minRepeatCount;
        var currentRepeatCount;
        var currentCodeLength = -1;
        var i = 0;
        while (i < this.codeCount) {
            currentRepeatCount = 1;
            var nextLen = this.codeLength[i];
            if (nextLen === 0) {
                maxRepeatCount = 138;
                minRepeatCount = 3;
            }
            else {
                maxRepeatCount = 6;
                minRepeatCount = 3;
                if (currentCodeLength !== nextLen) {
                    blTree.writeCodeToStream(nextLen);
                    currentRepeatCount = 0;
                }
            }
            currentCodeLength = nextLen;
            i++;
            while (i < this.codeCount && currentCodeLength === this.codeLength[i]) {
                i++;
                if (++currentRepeatCount >= maxRepeatCount) {
                    break;
                }
            }
            if (currentRepeatCount < minRepeatCount) {
                while (currentRepeatCount-- > 0) {
                    blTree.writeCodeToStream(currentCodeLength);
                }
            }
            else if (currentCodeLength !== 0) {
                blTree.writeCodeToStream(16);
                this.writer.pendingBufferWriteBits(currentRepeatCount - 3, 2);
            }
            else if (currentRepeatCount <= 10) {
                blTree.writeCodeToStream(17);
                this.writer.pendingBufferWriteBits(currentRepeatCount - 3, 3);
            }
            else {
                blTree.writeCodeToStream(18);
                this.writer.pendingBufferWriteBits(currentRepeatCount - 11, 7);
            }
        }
    };
    /**
     * Build huffman tree
     * @returns {void}
     */
    CompressorHuffmanTree.prototype.buildTree = function () {
        var codesCount = this.codeFrequency.length;
        var arrTree = new Int32Array(codesCount);
        var treeLength = 0;
        var maxCount = 0;
        for (var n = 0; n < codesCount; n++) {
            var freq = this.codeFrequency[n];
            if (freq !== 0) {
                var pos = treeLength++;
                var pPos = 0;
                while (pos > 0 && this.codeFrequency[arrTree[pPos = Math.floor((pos - 1) / 2)]] > freq) {
                    arrTree[pos] = arrTree[pPos];
                    pos = pPos;
                }
                arrTree[pos] = n;
                maxCount = n;
            }
        }
        while (treeLength < 2) {
            arrTree[treeLength++] =
                (maxCount < 2) ? ++maxCount : 0;
        }
        this.codeCount = Math.max(maxCount + 1, this.codeMinCount);
        var leafsCount = treeLength;
        var nodesCount = leafsCount;
        var child = new Int32Array(4 * treeLength - 2);
        var values = new Int32Array(2 * treeLength - 1);
        for (var i = 0; i < treeLength; i++) {
            var node = arrTree[i];
            var iIndex = 2 * i;
            child[iIndex] = node;
            child[iIndex + 1] = -1;
            values[i] = (this.codeFrequency[node] << 8);
            arrTree[i] = i;
        }
        this.constructHuffmanTree(arrTree, treeLength, values, nodesCount, child);
        this.buildLength(child);
    };
    CompressorHuffmanTree.prototype.constructHuffmanTree = function (arrTree, treeLength, values, nodesCount, child) {
        do {
            var first = arrTree[0];
            var last = arrTree[--treeLength];
            var lastVal = values[last];
            var pPos = 0;
            var path = 1;
            while (path < treeLength) {
                if (path + 1 < treeLength && values[arrTree[path]] > values[arrTree[path + 1]]) {
                    path++;
                }
                arrTree[pPos] = arrTree[path];
                pPos = path;
                path = pPos * 2 + 1;
            }
            while ((path = pPos) > 0 && values[arrTree[pPos = Math.floor((path - 1) / 2)]] > lastVal) {
                arrTree[path] = arrTree[pPos];
            }
            arrTree[path] = last;
            var second = arrTree[0];
            last = nodesCount++;
            child[2 * last] = first;
            child[2 * last + 1] = second;
            var minDepth = Math.min(values[first] & 0xff, values[second] & 0xff);
            values[last] = lastVal = values[first] + values[second] - minDepth + 1;
            pPos = 0;
            path = 1;
            /* tslint:disable */
            while (path < treeLength) {
                if (path + 1 < treeLength && values[arrTree[path]] > values[arrTree[path + 1]]) {
                    path++;
                }
                arrTree[pPos] = arrTree[path];
                pPos = path;
                path = pPos * 2 + 1;
            } /* tslint:disable */
            while ((path = pPos) > 0 && values[arrTree[pPos = Math.floor((path - 1) / 2)]] > lastVal) {
                arrTree[path] = arrTree[pPos];
            }
            arrTree[path] = last;
        } while (treeLength > 1);
    };
    CompressorHuffmanTree.prototype.buildLength = function (child) {
        this.codeLength = new Uint8Array(this.codeFrequency.length);
        var numNodes = Math.floor(child.length / 2);
        var numLeafs = Math.floor((numNodes + 1) / 2);
        var overflow = 0;
        for (var i = 0; i < this.maxLength; i++) {
            this.lengthCount[i] = 0;
        }
        overflow = this.calculateOptimalCodeLength(child, overflow, numNodes);
        if (overflow === 0) {
            return;
        }
        var iIncreasableLength = this.maxLength - 1;
        do {
            while (this.lengthCount[--iIncreasableLength] === 0) {
                /* tslint:disable */
            }
            do {
                this.lengthCount[iIncreasableLength]--;
                this.lengthCount[++iIncreasableLength]++;
                overflow -= (1 << (this.maxLength - 1 - iIncreasableLength));
            } while (overflow > 0 && iIncreasableLength < this.maxLength - 1);
        } while (overflow > 0);
        this.recreateTree(child, overflow, numLeafs);
    };
    CompressorHuffmanTree.prototype.recreateTree = function (child, overflow, numLeafs) {
        this.lengthCount[this.maxLength - 1] += overflow;
        this.lengthCount[this.maxLength - 2] -= overflow;
        var nodePtr = 2 * numLeafs;
        for (var bits = this.maxLength; bits !== 0; bits--) {
            var n = this.lengthCount[bits - 1];
            while (n > 0) {
                var childPtr = 2 * child[nodePtr++];
                if (child[childPtr + 1] === -1) {
                    this.codeLength[child[childPtr]] = bits;
                    n--;
                }
            }
        }
    };
    CompressorHuffmanTree.prototype.calculateOptimalCodeLength = function (child, overflow, numNodes) {
        var lengths = new Int32Array(numNodes);
        lengths[numNodes - 1] = 0;
        for (var i = numNodes - 1; i >= 0; i--) {
            var childIndex = 2 * i + 1;
            if (child[childIndex] !== -1) {
                var bitLength = lengths[i] + 1;
                if (bitLength > this.maxLength) {
                    bitLength = this.maxLength;
                    overflow++;
                }
                lengths[child[childIndex - 1]] = lengths[child[childIndex]] = bitLength;
            }
            else {
                var bitLength = lengths[i];
                this.lengthCount[bitLength - 1]++;
                this.codeLength[child[childIndex - 1]] = lengths[i];
            }
        }
        return overflow;
    };
    CompressorHuffmanTree.reverseBits = [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15];
    CompressorHuffmanTree.huffCodeLengthOrders = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
    return CompressorHuffmanTree;
}());

/**
 * Checksum calculator, based on Adler32 algorithm.
 */
var ChecksumCalculator = /** @class */ (function () {
    function ChecksumCalculator() {
    }
    /**
     * Updates checksum by calculating checksum of the
     * given buffer and adding it to current value.
     * @param {number} checksum - current checksum.
     * @param {Uint8Array} buffer - data byte array.
     * @param {number} offset - offset in the buffer.
     * @param {number} length - length of data to be used from the stream.
     * @returns {number}
     */
    ChecksumCalculator.checksumUpdate = function (checksum, buffer, offset, length) {
        var uint = new Uint32Array(1);
        uint[0] = checksum;
        var checksum_uint = uint[0];
        var s1 = uint[0] = checksum_uint & 65535;
        var s2 = uint[0] = checksum_uint >> ChecksumCalculator.checkSumBitOffset;
        while (length > 0) {
            var steps = Math.min(length, ChecksumCalculator.checksumIterationCount);
            length -= steps;
            while (--steps >= 0) {
                s1 = s1 + (uint[0] = (buffer[offset++] & 255));
                s2 = s2 + s1;
            }
            s1 %= ChecksumCalculator.checksumBase;
            s2 %= ChecksumCalculator.checksumBase;
        }
        checksum_uint = (s2 << ChecksumCalculator.checkSumBitOffset) | s1;
        return checksum_uint;
    };
    ChecksumCalculator.checkSumBitOffset = 16;
    ChecksumCalculator.checksumBase = 65521;
    ChecksumCalculator.checksumIterationCount = 3800;
    return ChecksumCalculator;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-compression/src/index.js":
/*!***************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-compression/src/index.js ***!
  \***************************************************************/
/*! exports provided: ZipArchive, ZipArchiveItem, CompressedStreamWriter, CompressorHuffmanTree, ChecksumCalculator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _zip_archive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zip-archive */ "./node_modules/@syncfusion/ej2-compression/src/zip-archive.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZipArchive", function() { return _zip_archive__WEBPACK_IMPORTED_MODULE_0__["ZipArchive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ZipArchiveItem", function() { return _zip_archive__WEBPACK_IMPORTED_MODULE_0__["ZipArchiveItem"]; });

/* harmony import */ var _compression_writer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compression-writer */ "./node_modules/@syncfusion/ej2-compression/src/compression-writer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompressedStreamWriter", function() { return _compression_writer__WEBPACK_IMPORTED_MODULE_1__["CompressedStreamWriter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompressorHuffmanTree", function() { return _compression_writer__WEBPACK_IMPORTED_MODULE_1__["CompressorHuffmanTree"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChecksumCalculator", function() { return _compression_writer__WEBPACK_IMPORTED_MODULE_1__["ChecksumCalculator"]; });

/**
 * export ZipArchive class
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-compression/src/zip-archive.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-compression/src/zip-archive.js ***!
  \*********************************************************************/
/*! exports provided: ZipArchive, ZipArchiveItem */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipArchive", function() { return ZipArchive; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipArchiveItem", function() { return ZipArchiveItem; });
/* harmony import */ var _compression_writer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compression-writer */ "./node_modules/@syncfusion/ej2-compression/src/compression-writer.js");
/* harmony import */ var _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-file-utils */ "./node_modules/@syncfusion/ej2-file-utils/index.js");


var CRC32TABLE = [];
/**
 * class provide compression library
 * ```typescript
 * let archive = new ZipArchive();
 * archive.compressionLevel = 'Normal';
 * let archiveItem = new ZipArchiveItem(archive, 'directoryName\fileName.txt');
 * archive.addItem(archiveItem);
 * archive.save(fileName.zip);
 * ```
 */
var ZipArchive = /** @class */ (function () {
    /**
     * constructor for creating ZipArchive instance
     */
    function ZipArchive() {
        if (CRC32TABLE.length === 0) {
            ZipArchive.initCrc32Table();
        }
        this.files = [];
        this.level = 'Normal';
        _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_1__["Save"].isMicrosoftBrowser = !(!navigator.msSaveBlob);
    }
    Object.defineProperty(ZipArchive.prototype, "compressionLevel", {
        /**
         * gets compression level
         */
        get: function () {
            return this.level;
        },
        /**
         * sets compression level
         */
        set: function (level) {
            this.level = level;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZipArchive.prototype, "length", {
        /**
         * gets items count
         */
        get: function () {
            if (this.files === undefined) {
                return 0;
            }
            return this.files.length;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * add new item to archive
     * @param {ZipArchiveItem} item - item to be added
     * @returns {void}
     */
    ZipArchive.prototype.addItem = function (item) {
        if (item === null || item === undefined) {
            throw new Error('ArgumentException: item cannot be null or undefined');
        }
        for (var i = 0; i < this.files.length; i++) {
            var file = this.files[i];
            if (file instanceof ZipArchiveItem) {
                if (file.name === item.name) {
                    throw new Error('item with same name already exist');
                }
            }
        }
        this.files.push(item);
    };
    /**
     * add new directory to archive
     * @param directoryName directoryName to be created
     * @returns {void}
     */
    ZipArchive.prototype.addDirectory = function (directoryName) {
        if (directoryName === null || directoryName === undefined) {
            throw new Error('ArgumentException: string cannot be null or undefined');
        }
        if (directoryName.length === 0) {
            throw new Error('ArgumentException: string cannot be empty');
        }
        if (directoryName.slice(-1) !== '/') {
            directoryName += '/';
        }
        if (this.files.indexOf(directoryName) !== -1) {
            throw new Error('item with same name already exist');
        }
        this.files.push(directoryName);
    };
    /**
     * gets item at specified index
     * @param {number} index - item index
     * @returns {ZipArchiveItem}
     */
    ZipArchive.prototype.getItem = function (index) {
        if (index >= 0 && index < this.files.length) {
            return this.files[index];
        }
        return undefined;
    };
    /**
     * determines whether an element is in the collection
     * @param {string | ZipArchiveItem} item - item to search
     * @returns {boolean}
     */
    ZipArchive.prototype.contains = function (item) {
        return this.files.indexOf(item) !== -1 ? true : false;
    };
    /**
     * save archive with specified file name
     * @param {string} fileName save archive with specified file name
     * @returns {Promise<ZipArchive>}
     */
    ZipArchive.prototype.save = function (fileName) {
        if (fileName === null || fileName === undefined || fileName.length === 0) {
            throw new Error('ArgumentException: fileName cannot be null or undefined');
        }
        if (this.files.length === 0) {
            throw new Error('InvalidOperation');
        }
        var zipArchive = this;
        var promise;
        return promise = new Promise(function (resolve, reject) {
            zipArchive.saveInternal(fileName, false).then(function () {
                resolve(zipArchive);
            });
        });
    };
    /**
     * Save archive as blob
     * @return {Promise<Blob>}
     */
    ZipArchive.prototype.saveAsBlob = function () {
        var zipArchive = this;
        var promise;
        return promise = new Promise(function (resolve, reject) {
            zipArchive.saveInternal('', true).then(function (blob) {
                resolve(blob);
            });
        });
    };
    ZipArchive.prototype.saveInternal = function (fileName, skipFileSave) {
        var _this = this;
        var zipArchive = this;
        var promise;
        return promise = new Promise(function (resolve, reject) {
            var zipData = [];
            var dirLength = 0;
            for (var i = 0; i < zipArchive.files.length; i++) {
                var compressedObject = _this.getCompressedData(_this.files[i]);
                compressedObject.then(function (data) {
                    dirLength = zipArchive.constructZippedObject(zipData, data, dirLength, data.isDirectory);
                    if (zipData.length === zipArchive.files.length) {
                        var blob = zipArchive.writeZippedContent(fileName, zipData, dirLength, skipFileSave);
                        resolve(blob);
                    }
                });
            }
        });
    };
    /**
     * release allocated un-managed resource
     * @returns {void}
     */
    ZipArchive.prototype.destroy = function () {
        if (this.files !== undefined && this.files.length > 0) {
            for (var i = 0; i < this.files.length; i++) {
                var file = this.files[i];
                if (file instanceof ZipArchiveItem) {
                    file.destroy();
                }
                file = undefined;
            }
            this.files = [];
        }
        this.files = undefined;
        this.level = undefined;
    };
    ZipArchive.prototype.getCompressedData = function (item) {
        var zipArchive = this;
        var promise = new Promise(function (resolve, reject) {
            if (item instanceof ZipArchiveItem) {
                var reader_1 = new FileReader();
                reader_1.onload = function () {
                    var input = new Uint8Array(reader_1.result);
                    var data = {
                        fileName: item.name, crc32Value: 0, compressedData: [],
                        compressedSize: undefined, uncompressedDataSize: input.length, compressionType: undefined,
                        isDirectory: false
                    };
                    if (zipArchive.level === 'Normal') {
                        zipArchive.compressData(input, data, CRC32TABLE);
                        var length_1 = 0;
                        for (var i = 0; i < data.compressedData.length; i++) {
                            length_1 += data.compressedData[i].length;
                        }
                        data.compressedSize = length_1;
                        data.compressionType = '\x08\x00'; //Deflated = 8
                    }
                    else {
                        data.compressedSize = input.length;
                        data.crc32Value = zipArchive.calculateCrc32Value(0, input, CRC32TABLE);
                        data.compressionType = '\x00\x00'; // Stored = 0
                        data.compressedData.push(input);
                    }
                    resolve(data);
                };
                reader_1.readAsArrayBuffer(item.data);
            }
            else {
                var data = {
                    fileName: item, crc32Value: 0, compressedData: '', compressedSize: 0, uncompressedDataSize: 0,
                    compressionType: '\x00\x00', isDirectory: true
                };
                resolve(data);
            }
        });
        return promise;
    };
    ZipArchive.prototype.compressData = function (input, data, crc32Table) {
        var compressor = new _compression_writer__WEBPACK_IMPORTED_MODULE_0__["CompressedStreamWriter"](true);
        var currentIndex = 0;
        var nextIndex = 0;
        do {
            if (currentIndex >= input.length) {
                compressor.close();
                break;
            }
            nextIndex = Math.min(input.length, currentIndex + 16384);
            var subArray = input.subarray(currentIndex, nextIndex);
            data.crc32Value = this.calculateCrc32Value(data.crc32Value, subArray, crc32Table);
            compressor.write(subArray, 0, nextIndex - currentIndex);
            currentIndex = nextIndex;
        } while (currentIndex <= input.length);
        data.compressedData = compressor.compressedData;
        compressor.destroy();
    };
    ZipArchive.prototype.constructZippedObject = function (zipParts, data, dirLength, isDirectory) {
        var extFileAttr = 0;
        var date = new Date();
        if (isDirectory) {
            extFileAttr = extFileAttr | 0x00010; // directory flag
        }
        extFileAttr = extFileAttr | (0 & 0x3F);
        var header = this.writeHeader(data, date);
        var localHeader = 'PK\x03\x04' + header + data.fileName;
        var centralDir = this.writeCentralDirectory(data, header, dirLength, extFileAttr);
        zipParts.push({ localHeader: localHeader, centralDir: centralDir, compressedData: data });
        return dirLength + localHeader.length + data.compressedSize;
    };
    ZipArchive.prototype.writeHeader = function (data, date) {
        var zipHeader = '';
        zipHeader += '\x0A\x00' + '\x00\x00'; // version needed to extract & general purpose bit flag
        zipHeader += data.compressionType; // compression method Deflate=8,Stored=0
        zipHeader += this.getBytes(this.getModifiedTime(date), 2); // last modified Time
        zipHeader += this.getBytes(this.getModifiedDate(date), 2); // last modified date
        zipHeader += this.getBytes(data.crc32Value, 4); // crc-32 value
        zipHeader += this.getBytes(data.compressedSize, 4); // compressed file size
        zipHeader += this.getBytes(data.uncompressedDataSize, 4); // uncompressed file size
        zipHeader += this.getBytes(data.fileName.length, 2); // file name length
        zipHeader += this.getBytes(0, 2); // extra field length
        return zipHeader;
    };
    ZipArchive.prototype.writeZippedContent = function (fileName, zipData, localDirLen, skipFileSave) {
        var cenDirLen = 0;
        var buffer = [];
        for (var i = 0; i < zipData.length; i++) {
            var item = zipData[i];
            cenDirLen += item.centralDir.length;
            buffer.push(this.getArrayBuffer(item.localHeader));
            while (item.compressedData.compressedData.length) {
                buffer.push(item.compressedData.compressedData.shift().buffer);
            }
        }
        for (var i = 0; i < zipData.length; i++) {
            buffer.push(this.getArrayBuffer(zipData[i].centralDir));
        }
        buffer.push(this.getArrayBuffer(this.writeFooter(zipData, cenDirLen, localDirLen)));
        var blob = new Blob(buffer, { type: 'application/zip' });
        if (!skipFileSave) {
            _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_1__["Save"].save(fileName, blob);
        }
        return blob;
    };
    ZipArchive.prototype.writeCentralDirectory = function (data, localHeader, offset, externalFileAttribute) {
        var directoryHeader = 'PK\x01\x02' +
            this.getBytes(0x0014, 2) + localHeader + // inherit from file header
            this.getBytes(0, 2) + // comment length
            '\x00\x00' + '\x00\x00' + // internal file attributes 
            this.getBytes(externalFileAttribute, 4) + // external file attributes
            this.getBytes(offset, 4) + // local fileHeader relative offset
            data.fileName;
        return directoryHeader;
    };
    ZipArchive.prototype.writeFooter = function (zipData, centralLength, localLength) {
        var dirEnd = 'PK\x05\x06' + '\x00\x00' + '\x00\x00' +
            this.getBytes(zipData.length, 2) + this.getBytes(zipData.length, 2) +
            this.getBytes(centralLength, 4) + this.getBytes(localLength, 4) +
            this.getBytes(0, 2);
        return dirEnd;
    };
    ZipArchive.prototype.getArrayBuffer = function (input) {
        var a = new Uint8Array(input.length);
        for (var j = 0; j < input.length; ++j) {
            a[j] = input.charCodeAt(j) & 0xFF;
        }
        return a.buffer;
    };
    ZipArchive.prototype.getBytes = function (value, offset) {
        var bytes = '';
        for (var i = 0; i < offset; i++) {
            bytes += String.fromCharCode(value & 0xff);
            value = value >>> 8;
        }
        return bytes;
    };
    ZipArchive.prototype.getModifiedTime = function (date) {
        var modTime = date.getHours();
        modTime = modTime << 6;
        modTime = modTime | date.getMinutes();
        modTime = modTime << 5;
        return modTime = modTime | date.getSeconds() / 2;
    };
    ZipArchive.prototype.getModifiedDate = function (date) {
        var modiDate = date.getFullYear() - 1980;
        modiDate = modiDate << 4;
        modiDate = modiDate | (date.getMonth() + 1);
        modiDate = modiDate << 5;
        return modiDate = modiDate | date.getDate();
    };
    ZipArchive.prototype.calculateCrc32Value = function (crc32Value, input, crc32Table) {
        crc32Value ^= -1;
        for (var i = 0; i < input.length; i++) {
            crc32Value = (crc32Value >>> 8) ^ crc32Table[(crc32Value ^ input[i]) & 0xFF];
        }
        return (crc32Value ^ (-1));
    };
    /**
     * construct cyclic redundancy code table
     * @private
     */
    ZipArchive.initCrc32Table = function () {
        var i;
        for (var j = 0; j < 256; j++) {
            i = j;
            for (var k = 0; k < 8; k++) {
                i = ((i & 1) ? (0xEDB88320 ^ (i >>> 1)) : (i >>> 1));
            }
            CRC32TABLE[j] = i;
        }
    };
    return ZipArchive;
}());

/**
 * Class represent unique ZipArchive item
 * ```typescript
 * let archiveItem = new ZipArchiveItem(archive, 'directoryName\fileName.txt');
 * ```
 */
var ZipArchiveItem = /** @class */ (function () {
    /**
     * constructor for creating {ZipArchiveItem} instance
     * @param {Blob|ArrayBuffer} data file data
     * @param {itemName} itemName absolute file path
     */
    function ZipArchiveItem(data, itemName) {
        if (data === null || data === undefined) {
            throw new Error('ArgumentException: data cannot be null or undefined');
        }
        if (itemName === null || itemName === undefined) {
            throw new Error('ArgumentException: string cannot be null or undefined');
        }
        if (itemName.length === 0) {
            throw new Error('string cannot be empty');
        }
        this.data = data;
        this.name = itemName;
    }
    Object.defineProperty(ZipArchiveItem.prototype, "name", {
        /**
         * Get the name of archive item
         * @returns string
         */
        get: function () {
            return this.fileName;
        },
        /**
         * Set the name of archive item
         * @param  {string} value
         */
        set: function (value) {
            this.fileName = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * release allocated un-managed resource
     * @returns {void}
     */
    ZipArchiveItem.prototype.destroy = function () {
        this.fileName = undefined;
        this.data = undefined;
    };
    return ZipArchiveItem;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-data/index.js":
/*!****************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-data/index.js ***!
  \****************************************************/
/*! exports provided: DataManager, Deferred, Query, Predicate, Adaptor, JsonAdaptor, UrlAdaptor, ODataAdaptor, ODataV4Adaptor, WebApiAdaptor, WebMethodAdaptor, RemoteSaveAdaptor, CacheAdaptor, DataUtil */
/***/ (function(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-data/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataManager", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DataManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Deferred", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Deferred"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Query", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Query"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Predicate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Predicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Adaptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Adaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonAdaptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["JsonAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UrlAdaptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["UrlAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ODataAdaptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ODataAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ODataV4Adaptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ODataV4Adaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WebApiAdaptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["WebApiAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WebMethodAdaptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["WebMethodAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RemoteSaveAdaptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RemoteSaveAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CacheAdaptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CacheAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataUtil", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DataUtil"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-data/src/adaptors.js":
/*!***********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-data/src/adaptors.js ***!
  \***********************************************************/
/*! exports provided: Adaptor, JsonAdaptor, UrlAdaptor, ODataAdaptor, ODataV4Adaptor, WebApiAdaptor, WebMethodAdaptor, RemoteSaveAdaptor, CacheAdaptor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-data/src/util.js");
/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query */ "./node_modules/@syncfusion/ej2-data/src/query.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * 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 = /** @class */ (function () {
    /**
     * Constructor for Adaptor class
     * @param  {DataOptions} ds?
     * @hidden
     * @returns aggregates
     */
    function Adaptor(ds) {
        // 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'
        };
        /**
         * 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
     */
    Adaptor.prototype.processResponse = function (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 = /** @class */ (function (_super) {
    __extends(JsonAdaptor, _super);
    function JsonAdaptor() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Process the JSON data based on the provided queries.
     * @param  {DataManager} dataManager
     * @param  {Query} query
     * @returns Object
     */
    JsonAdaptor.prototype.processQuery = function (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
     */
    JsonAdaptor.prototype.batchRequest = function (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
     */
    JsonAdaptor.prototype.onWhere = function (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
     */
    JsonAdaptor.prototype.onAggregates = function (ds, e) {
        var fn = _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    JsonAdaptor.prototype.onSearch = function (ds, e) {
        if (!ds || !ds.length) {
            return ds;
        }
        if (e.fieldNames.length === 0) {
            _util__WEBPACK_IMPORTED_MODULE_1__["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, _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    JsonAdaptor.prototype.onSortBy = function (ds, e, query) {
        if (!ds || !ds.length) {
            return ds;
        }
        var fnCompare;
        var field = _util__WEBPACK_IMPORTED_MODULE_1__["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 (_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].endsWith(field[i], ' desc')) {
                    fnCompare = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].fnSort('descending');
                    field[i] = field[i].replace(' desc', '');
                }
                ds = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].sort(ds, field[i], fnCompare);
            }
            return ds;
        }
        return _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].sort(ds, field, e.comparer);
    };
    /**
     * Group the data based on the given query.
     * @param  {Object[]} ds
     * @param  {QueryOptions} e
     * @param  {Query} query
     */
    JsonAdaptor.prototype.onGroup = function (ds, e, query) {
        if (!ds || !ds.length) {
            return ds;
        }
        var aggQuery = _query__WEBPACK_IMPORTED_MODULE_2__["Query"].filterQueries(query.queries, 'onAggregates');
        var agg = [];
        if (aggQuery.length) {
            var tmp = void 0;
            for (var i = 0; i < aggQuery.length; i++) {
                tmp = aggQuery[i].e;
                agg.push({ type: tmp.type, field: _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(tmp.field, query) });
            }
        }
        return _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].group(ds, _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    JsonAdaptor.prototype.onPage = function (ds, e, query) {
        var size = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(e.pageSize, query);
        var start = (_util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    JsonAdaptor.prototype.onRange = function (ds, e) {
        if (!ds || !ds.length) {
            return ds;
        }
        return ds.slice(_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(e.start), _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(e.end));
    };
    /**
     * Picks the given count of records from the top of the datasource.
     * @param  {Object[]} ds
     * @param  {{nos:number}} e
     */
    JsonAdaptor.prototype.onTake = function (ds, e) {
        if (!ds || !ds.length) {
            return ds;
        }
        return ds.slice(0, _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(e.nos));
    };
    /**
     * Skips the given count of records from the data source.
     * @param  {Object[]} ds
     * @param  {{nos:number}} e
     */
    JsonAdaptor.prototype.onSkip = function (ds, e) {
        if (!ds || !ds.length) {
            return ds;
        }
        return ds.slice(_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(e.nos));
    };
    /**
     * Selects specified columns from the data source.
     * @param  {Object[]} ds
     * @param  {{fieldNames:string}} e
     */
    JsonAdaptor.prototype.onSelect = function (ds, e) {
        if (!ds || !ds.length) {
            return ds;
        }
        return _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].select(ds, _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(e.fieldNames));
    };
    /**
     * Inserts new record in the table.
     * @param  {DataManager} dm
     * @param  {Object} data
     * @param  {number} position
     */
    JsonAdaptor.prototype.insert = function (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
     */
    JsonAdaptor.prototype.remove = function (dm, keyField, value, tableName) {
        var ds = dm.dataSource.json;
        var i;
        if (typeof value === 'object' && !(value instanceof Date)) {
            value = value[keyField];
        }
        for (i = 0; i < ds.length; i++) {
            if (ds[i][keyField] === 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
     */
    JsonAdaptor.prototype.update = function (dm, keyField, value, tableName) {
        var ds = dm.dataSource.json;
        var i;
        var key = value[keyField];
        for (i = 0; i < ds.length; i++) {
            if (ds[i][keyField] === 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 = /** @class */ (function (_super) {
    __extends(UrlAdaptor, _super);
    function UrlAdaptor() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Process the query to generate request body.
     * @param  {DataManager} dm
     * @param  {Query} query
     * @param  {Object[]} hierarchyFilters?
     * @returns p
     */
    UrlAdaptor.prototype.processQuery = function (dm, query, hierarchyFilters) {
        var queries = this.getQueryRequest(query);
        var singles = _query__WEBPACK_IMPORTED_MODULE_2__["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 = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(temp.pageIndex, query);
            take = _util__WEBPACK_IMPORTED_MODULE_1__["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 = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(queries.sorts[i].e.fieldName, query);
            request.sorts.push(_util__WEBPACK_IMPORTED_MODULE_1__["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(_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onEachWhere', temp.toJson(), query));
            }
        }
        // Filters
        for (var i = 0; i < queries.filters.length; i++) {
            request.filters.push(_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onEachWhere', queries.filters[i].e.toJson(), query));
            var keys_3 = typeof request.filters[i] === 'object' ? Object.keys(request.filters[i]) : [];
            for (var _i = 0, keys_1 = keys_3; _i < keys_1.length; _i++) {
                var prop = keys_1[_i];
                if (_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].isNull((request)[prop])) {
                    delete request[prop];
                }
            }
        }
        // Searches
        for (var i = 0; i < queries.searches.length; i++) {
            temp = queries.searches[i].e;
            request.searches.push(_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onEachSearch', {
                fields: temp.fieldNames,
                operator: temp.operator,
                key: temp.searchKey,
                ignoreCase: temp.ignoreCase
            }, query));
        }
        // Grouping
        for (var i = 0; i < queries.groups.length; i++) {
            request.groups.push(_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(queries.groups[i].e.fieldName, query));
        }
        // aggregates
        for (var i = 0; i < queries.aggregates.length; i++) {
            temp = queries.aggregates[i].e;
            request.aggregates.push({ type: temp.type, field: _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(temp.field, query) });
        }
        var req = {};
        this.getRequestQuery(options, query, singles, request, req);
        // Params
        _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'addParams', { dm: dm, query: query, params: params, reqParams: req });
        // cleanup
        var keys = Object.keys(req);
        for (var _a = 0, keys_2 = keys; _a < keys_2.length; _a++) {
            var prop = keys_2[_a];
            if (_util__WEBPACK_IMPORTED_MODULE_1__["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] = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onSkip', skip, query);
            req[options.take] = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onTake', take, query);
        }
        var p = this.pvt;
        this.pvt = {};
        if (this.options.requestType === 'json') {
            return {
                data: JSON.stringify(req, _util__WEBPACK_IMPORTED_MODULE_1__["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
        };
    };
    UrlAdaptor.prototype.getRequestQuery = function (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 ? _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onDistinct', query.distincts) : '';
        }
        if (!query.distincts.length && options.expand) {
            req[options.expand] = 'onExpand' in this && 'onSelect' in singles ?
                _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onExpand', { selects: _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(singles.onSelect.fieldNames, query), expands: query.expands }, query) : query.expands;
        }
        req[options.select] = 'onSelect' in singles && !query.distincts.length ?
            _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onSelect', _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(singles.onSelect.fieldNames, query), query) : '';
        req[options.count] = query.isCountRequired ? _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onCount', query.isCountRequired, query) : '';
        req[options.search] = request.searches.length ? _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onSearch', request.searches, query) : '';
        req[options.skip] = 'onSkip' in singles ?
            _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onSkip', _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(singles.onSkip.nos, query), query) : '';
        req[options.take] = 'onTake' in singles ?
            _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onTake', _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getValue(singles.onTake.nos, query), query) : '';
        req[options.where] = request.filters.length || request.searches.length ?
            _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onWhere', request.filters, query) : '';
        req[options.sortBy] = request.sorts.length ? _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onSortBy', request.sorts, query) : '';
        req[options.group] = request.groups.length ? _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].callAdaptorFunction(this, 'onGroup', request.groups, query) : '';
        req[options.aggregates] = request.aggregates.length ?
            _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    UrlAdaptor.prototype.convertToQueryString = function (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?
     */
    UrlAdaptor.prototype.processResponse = function (data, ds, query, xhr, request, changes) {
        if (xhr && xhr.getResponseHeader('Content-Type') &&
            xhr.getResponseHeader('Content-Type').indexOf('application/json') !== -1) {
            data = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.parseJson(data);
        }
        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 _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    UrlAdaptor.prototype.onGroup = function (e) {
        this.pvt.groups = e;
        return e;
    };
    /**
     * Add the aggregate query to the adaptor`s option.
     * @param  {Aggregates[]} e
     * @returns void
     */
    UrlAdaptor.prototype.onAggregates = function (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
     */
    UrlAdaptor.prototype.batchRequest = function (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]
            }, _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    UrlAdaptor.prototype.beforeSend = function (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
     */
    UrlAdaptor.prototype.insert = function (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'
            }, _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    UrlAdaptor.prototype.remove = function (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'
            }, _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    UrlAdaptor.prototype.update = function (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: value[keyField],
                table: tableName
            }, _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getAddParams(this, dm, query)))
        };
    };
    /**
     * To generate the predicate based on the filtered query.
     * @param  {Object[]|string[]|number[]} data
     * @param  {Query} query
     * @hidden
     */
    UrlAdaptor.prototype.getFiltersFrom = function (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 = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getObject(pKey || prop, data[i]);
            }
            else {
                value = data[i];
            }
            predicats.push(new _query__WEBPACK_IMPORTED_MODULE_2__["Predicate"](key, 'equal', value));
        }
        return _query__WEBPACK_IMPORTED_MODULE_2__["Predicate"].or(predicats);
    };
    UrlAdaptor.prototype.getAggregateResult = function (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 = void 0;
            var aggregateData = pData;
            var res = {};
            if (data.aggregate) {
                aggregateData = data.aggregate;
            }
            for (var i = 0; i < agg.length; i++) {
                fn = _util__WEBPACK_IMPORTED_MODULE_1__["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 i = 0; i < groups.length; i++) {
                var level = null;
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(groupDs)) {
                    groupDs = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].group(groupDs, groups[i]);
                }
                var groupQuery = _query__WEBPACK_IMPORTED_MODULE_2__["Query"].filterQueries(query.queries, 'onGroup')[i].e;
                pData = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].group(pData, groups[i], pvt.aggregates, level, groupDs, groupQuery.comparer);
            }
            args.result = pData;
        }
        return args;
    };
    UrlAdaptor.prototype.getQueryRequest = function (query) {
        var req = { sorts: [], groups: [], filters: [], searches: [], aggregates: [] };
        req.sorts = _query__WEBPACK_IMPORTED_MODULE_2__["Query"].filterQueries(query.queries, 'onSortBy');
        req.groups = _query__WEBPACK_IMPORTED_MODULE_2__["Query"].filterQueries(query.queries, 'onGroup');
        req.filters = _query__WEBPACK_IMPORTED_MODULE_2__["Query"].filterQueries(query.queries, 'onWhere');
        req.searches = _query__WEBPACK_IMPORTED_MODULE_2__["Query"].filterQueries(query.queries, 'onSearch');
        req.aggregates = _query__WEBPACK_IMPORTED_MODULE_2__["Query"].filterQueries(query.queries, 'onAggregates');
        return req;
    };
    UrlAdaptor.prototype.addParams = function (options) {
        var req = options.reqParams;
        if (options.params.length) {
            req.params = {};
        }
        for (var _i = 0, _a = options.params; _i < _a.length; _i++) {
            var tmp = _a[_i];
            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];
        }
    };
    return UrlAdaptor;
}(Adaptor));

/**
 * OData Adaptor that is extended from URL Adaptor, is used for consuming data through OData Service.
 * @hidden
 */
var ODataAdaptor = /** @class */ (function (_super) {
    __extends(ODataAdaptor, _super);
    function ODataAdaptor(props) {
        var _this = _super.call(this) || this;
        // options replaced the default adaptor options
        _this.options = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, _this.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"])(_this.options, props || {});
        return _this;
    }
    ODataAdaptor.prototype.getModuleName = function () {
        return 'ODataAdaptor';
    };
    /**
     * Generate request string based on the filter criteria from query.
     * @param  {Predicate} pred
     * @param  {boolean} requiresCast?
     */
    ODataAdaptor.prototype.onPredicate = function (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\'' + _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.replacer(val) + '\'';
        }
        if (type === 'string') {
            val = encodeURIComponent(val);
            val = '\'' + val + '\'';
            if (requiresCast) {
                field = 'cast(' + field + ', \'Edm.String\')';
            }
            if (_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.isGuid(val)) {
                guid = 'guid';
            }
            if (predicate.ignoreCase) {
                if (!guid) {
                    field = 'tolower(' + field + ')';
                }
                val = val.toLowerCase();
            }
        }
        operator = _util__WEBPACK_IMPORTED_MODULE_1__["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 = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].odv4UniOperator[predicate.operator];
        }
        else {
            operator = _util__WEBPACK_IMPORTED_MODULE_1__["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;
    };
    ODataAdaptor.prototype.addParams = function (options) {
        _super.prototype.addParams.call(this, options);
        delete options.reqParams.params;
    };
    /**
     * Generate request string based on the multiple filter criteria from query.
     * @param  {Predicate} pred
     * @param  {boolean} requiresCast?
     */
    ODataAdaptor.prototype.onComplexPredicate = function (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?
     */
    ODataAdaptor.prototype.onEachWhere = function (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
     */
    ODataAdaptor.prototype.onWhere = function (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
     */
    ODataAdaptor.prototype.onEachSearch = function (e) {
        if (e.fields && e.fields.length === 0) {
            _util__WEBPACK_IMPORTED_MODULE_1__["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 _query__WEBPACK_IMPORTED_MODULE_2__["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
     */
    ODataAdaptor.prototype.onSearch = function (e) {
        this.pvt.search = _query__WEBPACK_IMPORTED_MODULE_2__["Predicate"].or(this.pvt.search);
        return '';
    };
    /**
     * Generate query string based on multiple sort criteria from query.
     * @param  {QueryOptions} e
     */
    ODataAdaptor.prototype.onEachSort = function (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
     */
    ODataAdaptor.prototype.onSortBy = function (e) {
        return e.reverse().join(',');
    };
    /**
     * Adds the group query to the adaptor option.
     * @param  {Object[]} e
     * @returns string
     */
    ODataAdaptor.prototype.onGroup = function (e) {
        this.pvt.groups = e;
        return [];
    };
    /**
     * Returns the select query string.
     * @param  {string[]} e
     */
    ODataAdaptor.prototype.onSelect = function (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
     */
    ODataAdaptor.prototype.onAggregates = function (e) {
        this.pvt.aggregates = e;
        return '';
    };
    /**
     * Returns the query string which requests total count from the data source.
     * @param  {boolean} e
     * @returns string
     */
    ODataAdaptor.prototype.onCount = function (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?
     */
    ODataAdaptor.prototype.beforeSend = function (dm, request, settings) {
        if (_util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    ODataAdaptor.prototype.processResponse = function (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 _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    ODataAdaptor.prototype.convertToQueryString = function (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 _i = 0, keys_4 = keys; _i < keys_4.length; _i++) {
            var prop = keys_4[_i];
            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 || '';
    };
    ODataAdaptor.prototype.localTimeReplacer = function (key, convertObj) {
        for (var _i = 0, _a = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(convertObj) ? Object.keys(convertObj) : []; _i < _a.length; _i++) {
            var prop = _a[_i];
            if ((convertObj[prop] instanceof Date)) {
                convertObj[prop] = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].dateParse.toLocalTime(convertObj[prop]);
            }
        }
        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?
     */
    ODataAdaptor.prototype.insert = function (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?
     */
    ODataAdaptor.prototype.remove = function (dm, keyField, value, tableName) {
        var url;
        if (typeof value === 'string' && !_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.isGuid(value)) {
            url = "('" + value + "')";
        }
        else {
            url = "(" + 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
     */
    ODataAdaptor.prototype.update = function (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' && !_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.isGuid(value[keyField])) {
            url = "('" + value[keyField] + "')";
        }
        else {
            url = "(" + 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}
     */
    ODataAdaptor.prototype.batchRequest = function (dm, changes, e, query, original) {
        var initialGuid = e.guid = _util__WEBPACK_IMPORTED_MODULE_1__["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: _util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    ODataAdaptor.prototype.generateDeleteRequest = function (arr, e, dm) {
        if (!arr) {
            return '';
        }
        var req = '';
        var stat = {
            'method': 'DELETE ',
            'url': function (data, i, key) { return '(' + data[i][key] + ')'; },
            'data': function (data, 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
     */
    ODataAdaptor.prototype.generateInsertRequest = function (arr, e, dm) {
        if (!arr) {
            return '';
        }
        var req = '';
        var stat = {
            'method': 'POST ',
            'url': function (data, i, key) { return ''; },
            'data': function (data, i) { return JSON.stringify(data[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
     */
    ODataAdaptor.prototype.generateUpdateRequest = function (arr, e, dm, org) {
        var _this = this;
        if (!arr) {
            return '';
        }
        var req = '';
        arr.forEach(function (change) { return change = _this.compareAndRemove(change, org.filter(function (o) { return _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getObject(e.key, o) === _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getObject(e.key, change); })[0], e.key); });
        var stat = {
            'method': this.options.updateType + ' ',
            'url': function (data, i, key) { return '(' + data[i][key] + ')'; },
            'data': function (data, i) { return JSON.stringify(data[i]) + '\n\n'; }
        };
        req = this.generateBodyContent(arr, e, stat, dm);
        return req;
    };
    ODataAdaptor.getField = function (prop) {
        return prop.replace(/\./g, '/');
    };
    ODataAdaptor.prototype.generateBodyContent = function (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;
    };
    ODataAdaptor.prototype.processBatchResponse = function (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 && _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].endsWith(request.url, this.options.batch) && request.type.toLowerCase() === 'post') {
            var guid = xhr.getResponseHeader('Content-Type');
            var cIdx = void 0;
            var jsonObj = void 0;
            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 = _util__WEBPACK_IMPORTED_MODULE_1__["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;
    };
    ODataAdaptor.prototype.compareAndRemove = function (data, original, key) {
        var _this = 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 (_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].isPlainObject(data[prop])) {
                    _this.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;
    };
    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 = /** @class */ (function (_super) {
    __extends(ODataV4Adaptor, _super);
    function ODataV4Adaptor(props) {
        var _this = _super.call(this, props) || this;
        // options replaced the default adaptor options
        _this.options = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, _this.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"])(_this.options, props || {});
        return _this;
    }
    /**
     * @hidden
     */
    ODataV4Adaptor.prototype.getModuleName = function () {
        return 'ODataV4Adaptor';
    };
    /**
     * Returns the query string which requests total count from the data source.
     * @param  {boolean} e
     * @returns string
     */
    ODataV4Adaptor.prototype.onCount = function (e) {
        return e === true ? 'true' : '';
    };
    /**
     * Generate request string based on the filter criteria from query.
     * @param  {Predicate} pred
     * @param  {boolean} requiresCast?
     */
    ODataV4Adaptor.prototype.onPredicate = function (predicate, query, requiresCast) {
        var returnValue = '';
        var val = predicate.value;
        var isDate = val instanceof Date;
        returnValue = _super.prototype.onPredicate.call(this, predicate, query, requiresCast);
        if (isDate) {
            returnValue = returnValue.replace(/datetime'(.*)'$/, '$1');
        }
        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
     */
    ODataV4Adaptor.prototype.onEachSearch = function (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
     */
    ODataV4Adaptor.prototype.onSearch = function (e) {
        return this.pvt.searches.join(' OR ');
    };
    /**
     * Returns the expand query string.
     * @param  {string} e
     */
    ODataV4Adaptor.prototype.onExpand = function (e) {
        var _this = 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 ? expand + "(" + _this.options.select + "=" + 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
     */
    ODataV4Adaptor.prototype.onDistinct = function (distinctFields) {
        var fields = distinctFields.map(function (field) { return ODataAdaptor.getField(field); }).join(',');
        return "groupby((" + fields + "))";
    };
    /**
     * Returns the select query string.
     * @param  {string[]} e
     */
    ODataV4Adaptor.prototype.onSelect = function (e) {
        return _super.prototype.onSelect.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
     */
    ODataV4Adaptor.prototype.beforeSend = function (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
     */
    ODataV4Adaptor.prototype.processResponse = function (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 = _super.prototype.processBatchResponse.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 _util__WEBPACK_IMPORTED_MODULE_1__["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 = /** @class */ (function (_super) {
    __extends(WebApiAdaptor, _super);
    function WebApiAdaptor() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    WebApiAdaptor.prototype.getModuleName = function () {
        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?
     */
    WebApiAdaptor.prototype.insert = function (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?
     */
    WebApiAdaptor.prototype.remove = function (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?
     */
    WebApiAdaptor.prototype.update = function (dm, keyField, value, tableName) {
        return {
            type: 'PUT',
            url: dm.dataSource.url,
            data: JSON.stringify(value)
        };
    };
    /**
     * 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
     */
    WebApiAdaptor.prototype.beforeSend = function (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
     */
    WebApiAdaptor.prototype.processResponse = function (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 (!_util__WEBPACK_IMPORTED_MODULE_1__["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 _util__WEBPACK_IMPORTED_MODULE_1__["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 = /** @class */ (function (_super) {
    __extends(WebMethodAdaptor, _super);
    function WebMethodAdaptor() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * 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
     */
    WebMethodAdaptor.prototype.processQuery = function (dm, query, hierarchyFilters) {
        var obj = new UrlAdaptor().processQuery(dm, query, hierarchyFilters);
        var getData = 'data';
        var data = _util__WEBPACK_IMPORTED_MODULE_1__["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 = /** @class */ (function (_super) {
    __extends(RemoteSaveAdaptor, _super);
    /**
     * @hidden
     */
    function RemoteSaveAdaptor() {
        var _this = _super.call(this) || this;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('beforeSend', UrlAdaptor.prototype.beforeSend, _this);
        return _this;
    }
    RemoteSaveAdaptor.prototype.insert = function (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'
            }, _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getAddParams(this, dm, query)))
        };
    };
    RemoteSaveAdaptor.prototype.remove = function (dm, keyField, val, tableName, query) {
        _super.prototype.remove.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'
            }, _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getAddParams(this, dm, query)))
        };
    };
    RemoteSaveAdaptor.prototype.update = function (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
            }, _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getAddParams(this, dm, query)))
        };
    };
    RemoteSaveAdaptor.prototype.processResponse = function (data, ds, query, xhr, request, changes, e) {
        var i;
        if (this.updateType === 'add') {
            _super.prototype.insert.call(this, ds, data, null, null, this.pvt.position);
        }
        if (this.updateType === 'update') {
            _super.prototype.update.call(this, ds, this.updateKey, data);
        }
        this.updateType = undefined;
        if (data.added) {
            for (i = 0; i < data.added.length; i++) {
                _super.prototype.insert.call(this, ds, data.added[i]);
            }
        }
        if (data.changed) {
            for (i = 0; i < data.changed.length; i++) {
                _super.prototype.update.call(this, ds, e.key, data.changed[i]);
            }
        }
        if (data.deleted) {
            for (i = 0; i < data.deleted.length; i++) {
                _super.prototype.remove.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
     */
    RemoteSaveAdaptor.prototype.batchRequest = function (dm, changes, e) {
        return {
            type: 'POST',
            url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.url,
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            data: JSON.stringify({
                changed: changes.changedRecords,
                added: changes.addedRecords,
                deleted: changes.deletedRecords,
                action: 'batch',
                table: e.url,
                key: e.key
            })
        };
    };
    RemoteSaveAdaptor.prototype.addParams = function (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 = /** @class */ (function (_super) {
    __extends(CacheAdaptor, _super);
    /**
     * Constructor for CacheAdaptor class.
     * @param  {CacheAdaptor} adaptor?
     * @param  {number} timeStamp?
     * @param  {number} pageSize?
     * @hidden
     */
    function CacheAdaptor(adaptor, timeStamp, pageSize) {
        var _this = _super.call(this) || this;
        _this.isCrudAction = false;
        _this.isInsertAction = false;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(adaptor)) {
            _this.cacheAdaptor = adaptor;
        }
        _this.pageSize = pageSize;
        _this.guidId = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getGuid('cacheAdaptor');
        var obj = { keys: [], results: [] };
        window.localStorage.setItem(_this.guidId, JSON.stringify(obj));
        var guid = _this.guidId;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(timeStamp)) {
            setInterval(function () {
                var data;
                data = _util__WEBPACK_IMPORTED_MODULE_1__["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 i = 0; i < forDel.length; i++) {
                    data.results.splice(forDel[i], 1);
                    data.keys.splice(forDel[i], 1);
                }
                window.localStorage.removeItem(guid);
                window.localStorage.setItem(guid, JSON.stringify(data));
            }, timeStamp);
        }
        return _this;
    }
    /**
     * It will generate the key based on the URL when we send a request to server.
     * @param  {string} url
     * @param  {Query} query?
     * @hidden
     */
    CacheAdaptor.prototype.generateKey = function (url, query) {
        var queries = this.getQueryRequest(query);
        var singles = _query__WEBPACK_IMPORTED_MODULE_2__["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?
     */
    CacheAdaptor.prototype.processQuery = function (dm, query, hierarchyFilters) {
        var key = this.generateKey(dm.dataSource.url, query);
        var cachedItems;
        cachedItems = _util__WEBPACK_IMPORTED_MODULE_1__["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?
     */
    CacheAdaptor.prototype.processResponse = function (data, ds, query, xhr, request, changes) {
        if (this.isInsertAction || (request && this.cacheAdaptor.options.batch &&
            _util__WEBPACK_IMPORTED_MODULE_1__["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 = _util__WEBPACK_IMPORTED_MODULE_1__["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?
     */
    CacheAdaptor.prototype.beforeSend = function (dm, request, settings) {
        if (_util__WEBPACK_IMPORTED_MODULE_1__["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
     */
    CacheAdaptor.prototype.update = function (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?
     */
    CacheAdaptor.prototype.insert = function (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?
     */
    CacheAdaptor.prototype.remove = function (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
     */
    CacheAdaptor.prototype.batchRequest = function (dm, changes, e) {
        return this.cacheAdaptor.batchRequest(dm, changes, e);
    };
    return CacheAdaptor;
}(UrlAdaptor));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-data/src/index.js":
/*!********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-data/src/index.js ***!
  \********************************************************/
/*! exports provided: DataManager, Deferred, Query, Predicate, Adaptor, JsonAdaptor, UrlAdaptor, ODataAdaptor, ODataV4Adaptor, WebApiAdaptor, WebMethodAdaptor, RemoteSaveAdaptor, CacheAdaptor, DataUtil */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _manager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./manager */ "./node_modules/@syncfusion/ej2-data/src/manager.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataManager", function() { return _manager__WEBPACK_IMPORTED_MODULE_0__["DataManager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Deferred", function() { return _manager__WEBPACK_IMPORTED_MODULE_0__["Deferred"]; });

/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query */ "./node_modules/@syncfusion/ej2-data/src/query.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Query", function() { return _query__WEBPACK_IMPORTED_MODULE_1__["Query"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Predicate", function() { return _query__WEBPACK_IMPORTED_MODULE_1__["Predicate"]; });

/* harmony import */ var _adaptors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./adaptors */ "./node_modules/@syncfusion/ej2-data/src/adaptors.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Adaptor", function() { return _adaptors__WEBPACK_IMPORTED_MODULE_2__["Adaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JsonAdaptor", function() { return _adaptors__WEBPACK_IMPORTED_MODULE_2__["JsonAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UrlAdaptor", function() { return _adaptors__WEBPACK_IMPORTED_MODULE_2__["UrlAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ODataAdaptor", function() { return _adaptors__WEBPACK_IMPORTED_MODULE_2__["ODataAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ODataV4Adaptor", function() { return _adaptors__WEBPACK_IMPORTED_MODULE_2__["ODataV4Adaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WebApiAdaptor", function() { return _adaptors__WEBPACK_IMPORTED_MODULE_2__["WebApiAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WebMethodAdaptor", function() { return _adaptors__WEBPACK_IMPORTED_MODULE_2__["WebMethodAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RemoteSaveAdaptor", function() { return _adaptors__WEBPACK_IMPORTED_MODULE_2__["RemoteSaveAdaptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CacheAdaptor", function() { return _adaptors__WEBPACK_IMPORTED_MODULE_2__["CacheAdaptor"]; });

/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-data/src/util.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataUtil", function() { return _util__WEBPACK_IMPORTED_MODULE_3__["DataUtil"]; });

/**
 * Data modules
 */






/***/ }),

/***/ "./node_modules/@syncfusion/ej2-data/src/manager.js":
/*!**********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-data/src/manager.js ***!
  \**********************************************************/
/*! exports provided: DataManager, Deferred */
/***/ (function(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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-data/src/util.js");
/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query */ "./node_modules/@syncfusion/ej2-data/src/query.js");
/* harmony import */ var _adaptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./adaptors */ "./node_modules/@syncfusion/ej2-data/src/adaptors.js");





/**
 * DataManager is used to manage and manipulate relational data.
 */
var DataManager = /** @class */ (function () {
    /**
     * Constructor for DataManager class
     * @param  {DataOptions|JSON[]} dataSource?
     * @param  {Query} query?
     * @param  {AdaptorOptions|string} adaptor?
     * @hidden
     */
    function DataManager(dataSource, query, adaptor) {
        var _this = this;
        /** @hidden */
        this.dateParse = true;
        this.requests = [];
        if (!dataSource && !this.dataSource) {
            dataSource = [];
        }
        adaptor = adaptor || dataSource.adaptor;
        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 _adaptors__WEBPACK_IMPORTED_MODULE_3__["RemoteSaveAdaptor"] ? false : dataSource.url ? false : true,
                requiresFormat: dataSource.requiresFormat
            };
        }
        else {
            _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].throwError('DataManager: Invalid arguments');
        }
        if (data.requiresFormat === undefined && !_util__WEBPACK_IMPORTED_MODULE_1__["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 _adaptors__WEBPACK_IMPORTED_MODULE_3__["ODataAdaptor"]();
            this.dataSource.offline = false;
            this.ready = this.executeQuery(query || new _query__WEBPACK_IMPORTED_MODULE_2__["Query"]());
            this.ready.then(function (e) {
                _this.dataSource.offline = true;
                _this.isDataAvailable = true;
                data.json = e.result;
                _this.adaptor = new _adaptors__WEBPACK_IMPORTED_MODULE_3__["JsonAdaptor"]();
            });
        }
        else {
            this.adaptor = data.offline ? new _adaptors__WEBPACK_IMPORTED_MODULE_3__["JsonAdaptor"]() : new _adaptors__WEBPACK_IMPORTED_MODULE_3__["ODataAdaptor"]();
        }
        if (!data.jsonp && this.adaptor instanceof _adaptors__WEBPACK_IMPORTED_MODULE_3__["ODataAdaptor"]) {
            data.jsonp = 'callback';
        }
        this.adaptor = adaptor || this.adaptor;
        if (data.enableCaching) {
            this.adaptor = new _adaptors__WEBPACK_IMPORTED_MODULE_3__["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.
     */
    DataManager.prototype.setDefaultQuery = function (query) {
        this.defaultQuery = query;
        return this;
    };
    /**
     * Executes the given query with local data source.
     * @param  {Query} query - Defines the query to retrieve data.
     */
    DataManager.prototype.executeLocal = function (query) {
        if (!this.defaultQuery && !(query instanceof _query__WEBPACK_IMPORTED_MODULE_2__["Query"])) {
            _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].throwError('DataManager - executeLocal() : A query is required to execute');
        }
        if (!this.dataSource.json) {
            _util__WEBPACK_IMPORTED_MODULE_1__["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) {
                _util__WEBPACK_IMPORTED_MODULE_1__["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.
     */
    DataManager.prototype.executeQuery = function (query, done, fail, always) {
        var _this = 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__WEBPACK_IMPORTED_MODULE_2__["Query"])) {
            _util__WEBPACK_IMPORTED_MODULE_1__["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 {
                this.makeRequest(result, deffered, args, query);
            }
        }
        else {
            DataManager.nextTick(function () {
                var res = _this.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;
    };
    DataManager.getDeferedArgs = function (query, result, args) {
        if (query.isCountRequired) {
            args.result = result.result;
            args.count = result.count;
            args.aggregates = result.aggregates;
        }
        else {
            args.result = result;
        }
        return args;
    };
    DataManager.nextTick = function (fn) {
        (window.setImmediate || window.setTimeout)(fn, 0);
    };
    DataManager.prototype.extendRequest = function (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);
    };
    DataManager.prototype.makeRequest = function (url, deffered, args, query) {
        var _this = this;
        var isSelector = !!query.subQuerySelector;
        var fnFail = function (e) {
            args.error = e;
            deffered.reject(args);
        };
        var process = function (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 (data, selector) {
            var subDeffer = new Deferred();
            var childArgs = { parent: args };
            query.subQuery.isChild = true;
            var subUrl = _this.adaptor.processQuery(_this, query.subQuery, data ? _this.adaptor.processResponse(data) : selector);
            var childReq = _this.makeRequest(subUrl, subDeffer, childArgs, query.subQuery);
            if (!isSelector) {
                subDeffer.then(function (subData) {
                    if (data) {
                        _util__WEBPACK_IMPORTED_MODULE_1__["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 (data, request) {
            if (request.httpRequest.getResponseHeader('Content-Type').indexOf('xml') === -1 && _this.dateParse) {
                data = _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.parseJson(data);
            }
            var result = _this.adaptor.processResponse(data, _this, 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 () {
            _this.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 = void 0;
            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 args = [];
                    for (var _i = 0; _i < arguments.length; _i++) {
                        args[_i] = arguments[_i];
                    }
                    var result = args[0];
                    var pResult = _this.adaptor.processResponse(result[0], _this, query, _this.requests[0].httpRequest, _this.requests[0]);
                    var count = 0;
                    if (query.isCountRequired) {
                        count = pResult.count;
                        pResult = pResult.result;
                    }
                    var cResult = _this.adaptor.processResponse(result[1], _this, query.subQuery, _this.requests[1].httpRequest, _this.requests[1]);
                    count = 0;
                    if (query.subQuery.isCountRequired) {
                        count = cResult.count;
                        cResult = cResult.result;
                    }
                    _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, pResult, cResult, query.subQuery.key);
                    isSelector = false;
                    process(pResult, count, _this.requests[0].httpRequest);
                });
            }
            else {
                isSelector = false;
            }
        }
        return req;
    };
    DataManager.prototype.beforeSend = function (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 _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
                var prop = keys_1[_i];
                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.
     */
    DataManager.prototype.saveChanges = function (changes, key, tableName, query, original) {
        var _this = this;
        if (tableName instanceof _query__WEBPACK_IMPORTED_MODULE_2__["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__WEBPACK_IMPORTED_MODULE_2__["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_1 = new Deferred();
            var ajax_1 = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](req);
            ajax_1.beforeSend = function () {
                _this.beforeSend(ajax_1.httpRequest, ajax_1);
            };
            ajax_1.onSuccess = function (data, request) {
                deff_1.resolve(_this.adaptor.processResponse(data, _this, null, request.httpRequest, request, changes, args));
            };
            ajax_1.onFailure = function (e) {
                deff_1.reject([{ error: e }]);
            };
            ajax_1.send().catch(function (e) { return true; }); // to handle the failure requests.        
            return deff_1.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.
     */
    DataManager.prototype.insert = function (data, tableName, query, position) {
        if (tableName instanceof _query__WEBPACK_IMPORTED_MODULE_2__["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.
     */
    DataManager.prototype.remove = function (keyField, value, tableName, query) {
        if (typeof value === 'object') {
            value = value[keyField];
        }
        if (tableName instanceof _query__WEBPACK_IMPORTED_MODULE_2__["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.
     */
    DataManager.prototype.update = function (keyField, value, tableName, query, original) {
        if (tableName instanceof _query__WEBPACK_IMPORTED_MODULE_2__["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);
        }
    };
    DataManager.prototype.doAjaxRequest = function (res) {
        var _this = 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 () {
            _this.beforeSend(ajax.httpRequest, ajax);
        };
        ajax.onSuccess = function (record, request) {
            try {
                _util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.parseJson(record);
            }
            catch (e) {
                record = [];
            }
            record = _this.adaptor.processResponse(_util__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].parse.parseJson(record), _this, 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;
    };
    return DataManager;
}());

/**
 * Deferred is used to handle asynchronous operation.
 */
var Deferred = /** @class */ (function () {
    function Deferred() {
        var _this = this;
        /**
         * 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) {
            _this.resolve = resolve;
            _this.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);
    }
    return Deferred;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-data/src/query.js":
/*!********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-data/src/query.js ***!
  \********************************************************/
/*! exports provided: Query, Predicate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-data/src/util.js");

/**
 * Query class is used to build query which is used by the DataManager to communicate with datasource.
 */
var Query = /** @class */ (function () {
    /**
     * Constructor for Query class.
     * @param  {string|string[]} from?
     * @hidden
     */
    function Query(from) {
        /** @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.
     */
    Query.prototype.setKey = function (field) {
        this.key = field;
        return this;
    };
    /**
     * Sets default DataManager to execute query.
     * @param  {DataManager} dataManager - Defines the DataManager.
     */
    Query.prototype.using = function (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>
     */
    Query.prototype.execute = function (dataManager, done, fail, always) {
        dataManager = dataManager || this.dataManager;
        if (dataManager) {
            return dataManager.executeQuery(this, done, fail, always);
        }
        return _util__WEBPACK_IMPORTED_MODULE_0__["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.
     */
    Query.prototype.executeLocal = function (dataManager) {
        dataManager = dataManager || this.dataManager;
        if (dataManager) {
            return dataManager.executeLocal(this);
        }
        return _util__WEBPACK_IMPORTED_MODULE_0__["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.
     */
    Query.prototype.clone = function () {
        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.
     */
    Query.prototype.from = function (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.
     */
    Query.prototype.addParams = function (key, value) {
        if (typeof value === 'function') {
            this.params.push({ key: key, fn: value });
        }
        else {
            this.params.push({ key: key, value: value });
        }
        return this;
    };
    /**
     * @hidden
     */
    Query.prototype.distinct = function (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
     */
    Query.prototype.expand = function (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.
     */
    Query.prototype.where = function (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.
     */
    Query.prototype.search = function (searchKey, fieldNames, operator, ignoreCase, ignoreAccent) {
        if (typeof fieldNames === 'string') {
            fieldNames = [fieldNames];
        }
        operator = operator || 'contains';
        var comparer = _util__WEBPACK_IMPORTED_MODULE_0__["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.
     */
    Query.prototype.sortBy = function (fieldName, comparer, isFromGroup) {
        var order = 'ascending';
        var sorts;
        var temp;
        if (typeof fieldName === 'string' && _util__WEBPACK_IMPORTED_MODULE_0__["DataUtil"].endsWith(fieldName.toLowerCase(), ' desc')) {
            fieldName = fieldName.replace(/ desc$/i, '');
            comparer = 'descending';
        }
        if (!comparer || typeof comparer === 'string') {
            order = comparer ? comparer.toLowerCase() : 'ascending';
            comparer = _util__WEBPACK_IMPORTED_MODULE_0__["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.
     */
    Query.prototype.sortByDesc = function (fieldName) {
        return this.sortBy(fieldName, 'descending');
    };
    /**
     * Groups data with the given field name.
     * @param  {string} fieldName - Defines the column field.
     */
    Query.prototype.group = function (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.
     */
    Query.prototype.page = function (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.
     */
    Query.prototype.range = function (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.
     */
    Query.prototype.take = function (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.
     */
    Query.prototype.skip = function (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.
     */
    Query.prototype.select = function (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.
     */
    Query.prototype.hierarchy = function (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.
     */
    Query.prototype.foreignKey = function (key) {
        this.fKey = key;
        return this;
    };
    /**
     * It is used to get total number of records in the DataManager execution result.
     */
    Query.prototype.requiresCount = function () {
        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.
     */
    Query.prototype.aggregate = function (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
     */
    Query.filterQueries = function (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
     */
    Query.filterQueryLists = function (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 = /** @class */ (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, ignoreCase, ignoreAccent) {
        if (ignoreCase === void 0) { ignoreCase = false; }
        /** @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 = _util__WEBPACK_IMPORTED_MODULE_0__["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.
     */
    Predicate.and = function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        return Predicate.combinePredicates([].slice.call(args, 0), '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.
     */
    Predicate.prototype.and = function (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.
     */
    Predicate.or = function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        return Predicate.combinePredicates([].slice.call(args, 0), '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.
     */
    Predicate.prototype.or = function (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.
     */
    Predicate.fromJson = function (json) {
        if (json instanceof Array) {
            var res = [];
            for (var i = 0, len = json.length; i < len; i++) {
                res.push(this.fromJSONData(json[i]));
            }
            return res;
        }
        var pred = json;
        return this.fromJSONData(pred);
    };
    /**
     * Validate the record based on the predicates.
     * @param  {Object} record - Defines the datasource record.
     */
    Predicate.prototype.validate = function (record) {
        var predicate = this.predicates ? this.predicates : [];
        var isAnd;
        var ret;
        if (!this.isComplex && this.comparer) {
            return this.comparer.call(this, _util__WEBPACK_IMPORTED_MODULE_0__["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.
     */
    Predicate.prototype.toJson = function () {
        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
        };
    };
    Predicate.combinePredicates = function (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));
    };
    Predicate.combine = function (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 _util__WEBPACK_IMPORTED_MODULE_0__["DataUtil"].throwError('Predicate - ' + condition + ' : invalid arguments');
    };
    Predicate.fromJSONData = function (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;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-data/src/util.js":
/*!*******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-data/src/util.js ***!
  \*******************************************************/
/*! exports provided: DataUtil */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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/index.js");
/* harmony import */ var _manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./manager */ "./node_modules/@syncfusion/ej2-data/src/manager.js");
/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query */ "./node_modules/@syncfusion/ej2-data/src/query.js");



var consts = { GroupGuid: '{271bbba0-1ee7}' };
/**
 * Data manager common utility methods.
 * @hidden
 */
var DataUtil = /** @class */ (function () {
    function DataUtil() {
    }
    /**
     * 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
     */
    DataUtil.getValue = function (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
     */
    DataUtil.endsWith = function (input, substr) {
        return input.slice(-substr.length) === substr;
    };
    /**
     * Returns true if the input string starts with given string.
     * @param  {string} str
     * @param  {string} startstr
     */
    DataUtil.startsWith = function (input, start) {
        return input.slice(0, start.length) === start;
    };
    /**
     * To return the sorting function based on the string.
     * @param  {string} order
     * @hidden
     */
    DataUtil.fnSort = function (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
     */
    DataUtil.fnAscending = function (x, y) {
        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
     */
    DataUtil.fnDescending = function (x, y) {
        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;
    };
    DataUtil.extractFields = function (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
     */
    DataUtil.select = function (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?
     */
    DataUtil.group = function (jsonArray, field, aggregates, level, groupDs, format) {
        level = level || 1;
        var jsonData = jsonArray;
        var guid = 'GroupGuid';
        if (jsonData.GroupGuid === consts[guid]) {
            var _loop_1 = function (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 = this_1.group(jsonData[j].items, field, aggregates, jsonData.level + 1, groupDs[indx].items, format);
                    jsonData[j].count = groupDs[indx].count;
                }
                else {
                    jsonData[j].items = this_1.group(jsonData[j].items, field, aggregates, jsonData.level + 1, null, format);
                    jsonData[j].count = jsonData[j].items.length;
                }
            };
            var this_1 = this;
            for (var j = 0; j < jsonData.length; j++) {
                _loop_1(j);
            }
            jsonData.childLevels += 1;
            return jsonData;
        }
        var grouped = {};
        var groupedArray = [];
        groupedArray.GroupGuid = consts[guid];
        groupedArray.level = level;
        groupedArray.childLevels = 0;
        groupedArray.records = jsonData;
        var _loop_2 = function (i) {
            var val = this_2.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]);
        };
        var this_2 = this;
        for (var i = 0; i < jsonData.length; i++) {
            _loop_2(i);
        }
        if (aggregates && aggregates.length) {
            var _loop_3 = function (i) {
                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[i].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[i].items, aggs[j].field);
                        }
                    }
                }
                groupedArray[i].aggregates = res;
            };
            for (var i = 0; i < groupedArray.length; i++) {
                _loop_3(i);
            }
        }
        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
     */
    DataUtil.buildHierarchy = function (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
     */
    DataUtil.getFieldList = function (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 _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
            var prop = keys_1[_i];
            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.
     */
    DataUtil.getObject = function (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
     */
    DataUtil.setValue = function (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.
     */
    DataUtil.sort = function (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);
    };
    DataUtil.ignoreDiacritics = function (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('');
    };
    DataUtil.merge = function (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;
    };
    DataUtil.getVal = function (array, index, field) {
        return field ? this.getObject(field, array[index]) : array[index];
    };
    DataUtil.toLowerCase = function (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
     */
    DataUtil.callAdaptorFunction = function (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;
    };
    DataUtil.getAddParams = function (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
     */
    DataUtil.isPlainObject = function (obj) {
        return (!!obj) && (obj.constructor === Object);
    };
    /**
     * Returns true when the browser cross origin request.
     */
    DataUtil.isCors = function () {
        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
     */
    DataUtil.getGuid = function (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
     */
    DataUtil.isNull = function (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
     */
    DataUtil.getItemFromComparer = function (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
     */
    DataUtil.distinct = function (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 = DataUtil.getVal(json, index, fieldName);
            if (!(val in tmp)) {
                result.push(!requiresCompleteRecord ? val : json[index]);
                tmp[val] = 1;
            }
        });
        return result;
    };
    /**
     * Specifies the value which will be used to adjust the date value to server timezone.
     * @default null
     */
    DataUtil.serverTimezoneOffset = null;
    /**
     * 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 (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 (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 (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 (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 (ds, field) {
            return new _manager__WEBPACK_IMPORTED_MODULE_1__["DataManager"](ds).executeLocal(new _query__WEBPACK_IMPORTED_MODULE_2__["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 (ds, field) {
            return new _manager__WEBPACK_IMPORTED_MODULE_1__["DataManager"](ds).executeLocal(new _query__WEBPACK_IMPORTED_MODULE_2__["Query"]().where(field, 'equal', false, true)).length;
        },
        /**
         * Returns the length of the given data.
         * @param  {Object[]} ds
         * @param  {string} field?
         * @returns number
         */
        count: function (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',
        '\u00C0': 'A',
        '\u00C1': 'A',
        '\u00C2': 'A',
        '\u1EA6': 'A',
        '\u1EA4': 'A',
        '\u1EAA': 'A',
        '\u1EA8': 'A',
        '\u00C3': 'A',
        '\u0100': 'A',
        '\u0102': 'A',
        '\u1EB0': 'A',
        '\u1EAE': 'A',
        '\u1EB4': 'A',
        '\u1EB2': 'A',
        '\u0226': 'A',
        '\u01E0': 'A',
        '\u00C4': 'A',
        '\u01DE': 'A',
        '\u1EA2': 'A',
        '\u00C5': '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',
        '\u00C6': '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',
        '\u00C7': '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',
        '\u00C8': 'E',
        '\u00C9': 'E',
        '\u00CA': 'E',
        '\u1EC0': 'E',
        '\u1EBE': 'E',
        '\u1EC4': 'E',
        '\u1EC2': 'E',
        '\u1EBC': 'E',
        '\u0112': 'E',
        '\u1E14': 'E',
        '\u1E16': 'E',
        '\u0114': 'E',
        '\u0116': 'E',
        '\u00CB': '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',
        '\u00CC': 'I',
        '\u00CD': 'I',
        '\u00CE': 'I',
        '\u0128': 'I',
        '\u012A': 'I',
        '\u012C': 'I',
        '\u0130': 'I',
        '\u00CF': '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',
        '\u00D1': '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',
        '\u00D2': 'O',
        '\u00D3': 'O',
        '\u00D4': 'O',
        '\u1ED2': 'O',
        '\u1ED0': 'O',
        '\u1ED6': 'O',
        '\u1ED4': 'O',
        '\u00D5': 'O',
        '\u1E4C': 'O',
        '\u022C': 'O',
        '\u1E4E': 'O',
        '\u014C': 'O',
        '\u1E50': 'O',
        '\u1E52': 'O',
        '\u014E': 'O',
        '\u022E': 'O',
        '\u0230': 'O',
        '\u00D6': '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',
        '\u00D8': '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',
        '\u00D9': 'U',
        '\u00DA': 'U',
        '\u00DB': 'U',
        '\u0168': 'U',
        '\u1E78': 'U',
        '\u016A': 'U',
        '\u1E7A': 'U',
        '\u016C': 'U',
        '\u00DC': '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',
        '\u00DD': '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',
        '\u00E0': 'a',
        '\u00E1': 'a',
        '\u00E2': 'a',
        '\u1EA7': 'a',
        '\u1EA5': 'a',
        '\u1EAB': 'a',
        '\u1EA9': 'a',
        '\u00E3': 'a',
        '\u0101': 'a',
        '\u0103': 'a',
        '\u1EB1': 'a',
        '\u1EAF': 'a',
        '\u1EB5': 'a',
        '\u1EB3': 'a',
        '\u0227': 'a',
        '\u01E1': 'a',
        '\u00E4': 'a',
        '\u01DF': 'a',
        '\u1EA3': 'a',
        '\u00E5': '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',
        '\u00E6': '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',
        '\u00E7': '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',
        '\u00E8': 'e',
        '\u00E9': 'e',
        '\u00EA': 'e',
        '\u1EC1': 'e',
        '\u1EBF': 'e',
        '\u1EC5': 'e',
        '\u1EC3': 'e',
        '\u1EBD': 'e',
        '\u0113': 'e',
        '\u1E15': 'e',
        '\u1E17': 'e',
        '\u0115': 'e',
        '\u0117': 'e',
        '\u00EB': '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',
        '\u00EC': 'i',
        '\u00ED': 'i',
        '\u00EE': 'i',
        '\u0129': 'i',
        '\u012B': 'i',
        '\u012D': 'i',
        '\u00EF': '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',
        '\u00F1': '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',
        '\u00F2': 'o',
        '\u00F3': 'o',
        '\u00F4': 'o',
        '\u1ED3': 'o',
        '\u1ED1': 'o',
        '\u1ED7': 'o',
        '\u1ED5': 'o',
        '\u00F5': 'o',
        '\u1E4D': 'o',
        '\u022D': 'o',
        '\u1E4F': 'o',
        '\u014D': 'o',
        '\u1E51': 'o',
        '\u1E53': 'o',
        '\u014F': 'o',
        '\u022F': 'o',
        '\u0231': 'o',
        '\u00F6': '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',
        '\u00F8': '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',
        '\u00DF': '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',
        '\u00F9': 'u',
        '\u00FA': 'u',
        '\u00FB': 'u',
        '\u0169': 'u',
        '\u1E79': 'u',
        '\u016B': 'u',
        '\u1E7B': 'u',
        '\u016D': 'u',
        '\u00FC': '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',
        '\u00FD': 'y',
        '\u0177': 'y',
        '\u1EF9': 'y',
        '\u0233': 'y',
        '\u1E8F': 'y',
        '\u00FF': '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 (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 (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 (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 (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 (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 (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 (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 (actual) {
            return actual !== null;
        },
        /**
         * Returns true when the given input value is null.
         * @param  {string|number} actual
         * @returns boolean
         */
        isnull: function (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 (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 (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 (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 (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 (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 (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 (json) {
            var value;
            var keys = Object.keys(json);
            for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {
                var prop = keys_2[_i];
                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 (field, value) {
            var dupValue = value;
            if (typeof value === 'string') {
                var ms = /^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(value);
                if (ms) {
                    return DataUtil.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), DataUtil.serverTimezoneOffset, true);
                }
                else if (/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(value)) {
                    var arr = dupValue.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)), DataUtil.serverTimezoneOffset, true);
                }
            }
            return value;
        },
        /**
         * Check wheather the given value is JSON or not.
         * @param  {Object[]} jsonData
         */
        isJson: function (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 (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 (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 (val, stringify) {
            var value;
            var keys = Object.keys(val);
            for (var _i = 0, keys_3 = keys; _i < keys_3.length; _i++) {
                var prop = keys_3[_i];
                value = val[prop];
                if (!(value instanceof Date)) {
                    continue;
                }
                var d = value;
                val[prop] = DataUtil.dateParse.toTimeZone(DataUtil.dateParse.addSelfOffset(d), DataUtil.serverTimezoneOffset).toJSON();
            }
            return val;
        },
        /**
         * It will replace the Array of value.
         * @param  {string} key
         * @param  {Object[]} val
         * @hidden
         */
        arrayReplacer: function (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 (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 (input) {
            return new Date(+input - (input.getTimezoneOffset() * 60000));
        },
        toUTC: function (input) {
            return new Date(+input + (input.getTimezoneOffset() * 60000));
        },
        toTimeZone: function (input, offset, utc) {
            if (offset === null) {
                return input;
            }
            var unix = utc ? DataUtil.dateParse.toUTC(input) : input;
            return new Date(+unix - (offset * 3600000));
        },
        toLocalTime: function (input) {
            var datefn = input;
            var timeZone = -datefn.getTimezoneOffset();
            var differenceString = timeZone >= 0 ? '+' : '-';
            var localtimefn = function (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;
        }
    };
    return DataUtil;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/index.js":
/*!*********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/index.js ***!
  \*********************************************************/
/*! exports provided: incrementalSearch, Search, highlightSearch, revertHighlightSearch, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, SelectionSettings, ToolbarSettings, ListBox */
/***/ (function(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-dropdowns/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "incrementalSearch", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["incrementalSearch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Search", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Search"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "highlightSearch", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["highlightSearch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "revertHighlightSearch", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["revertHighlightSearch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FieldSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropDownBaseClasses", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownBase", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DropDownBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropDownListClasses", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dropDownListClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownList", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DropDownList"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComboBox", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ComboBox"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AutoComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelect", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["MultiSelect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckBoxSelection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CheckBoxSelection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SelectionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolbarSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ToolbarSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListBox", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ListBox"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/auto-complete/auto-complete.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/auto-complete/auto-complete.js ***!
  \***********************************************************************************/
/*! exports provided: AutoComplete */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoComplete", function() { return AutoComplete; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../drop-down-list/drop-down-list */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/drop-down-list.js");
/* harmony import */ var _combo_box_combo_box__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../combo-box/combo-box */ "./node_modules/@syncfusion/ej2-dropdowns/src/combo-box/combo-box.js");
/* harmony import */ var _common_highlight_search__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/highlight-search */ "./node_modules/@syncfusion/ej2-dropdowns/src/common/highlight-search.js");
/* harmony import */ var _common_incremental_search__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/incremental-search */ "./node_modules/@syncfusion/ej2-dropdowns/src/common/incremental-search.js");
/* harmony import */ var _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../drop-down-base/drop-down-base */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <reference path='../combo-box/combo-box-model.d.ts'/>








/* tslint:disable */


/* tslint:enable */
_drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].root = 'e-autocomplete';
_drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["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 = /** @class */ (function (_super) {
    __extends(AutoComplete, _super);
    /**
     * * Constructor for creating the widget
     */
    function AutoComplete(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.isFiltered = false;
        return _this;
    }
    ;
    /**
     * Initialize the event handler
     * @private
     */
    AutoComplete.prototype.preRender = function () {
        _super.prototype.preRender.call(this);
    };
    AutoComplete.prototype.getLocaleName = function () {
        return 'auto-complete';
    };
    ;
    AutoComplete.prototype.getNgDirective = function () {
        return 'EJS-AUTOCOMPLETE';
    };
    AutoComplete.prototype.getQuery = function (query) {
        var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__["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) {
            var dataType = this.typeOfData(this.dataSource).typeof;
            if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__["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)) {
            filterQuery.take(this.suggestionCount);
        }
        return filterQuery;
    };
    AutoComplete.prototype.searchLists = function (e) {
        var _this = this;
        this.isTyped = true;
        this.isDataFetched = this.isSelectCustom = false;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
            _super.prototype.renderList.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 (dataSource, query, fields) {
                if (eventArgs.cancel) {
                    return;
                }
                _this.isFiltered = true;
                _this.filterAction(dataSource, query, fields);
            },
            cancel: false
        };
        this.trigger('filtering', eventArgs, function (eventArgs) {
            if (!eventArgs.cancel && !_this.isFiltered && !eventArgs.preventDefaultAction) {
                _this.filterAction(_this.dataSource, null, _this.fields);
            }
        });
    };
    AutoComplete.prototype.filterAction = function (dataSource, query, fields) {
        this.beforePopupOpen = true;
        if (this.queryString !== '' && (this.queryString.length >= this.minLength)) {
            this.resetList(dataSource, fields, query);
        }
        else {
            this.hidePopup();
        }
    };
    AutoComplete.prototype.clear = function (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))) {
            _super.prototype.clear.call(this, e);
        }
        if (this.beforePopupOpen) {
            this.hidePopup();
        }
    };
    AutoComplete.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
        this.fixedHeaderElement = null;
        _super.prototype.onActionComplete.call(this, ulElement, list, e);
        var item = this.list.querySelector('.' + _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].li);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([item], _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].focus);
        }
        this.postBackAction();
    };
    AutoComplete.prototype.postBackAction = function () {
        if (this.autofill && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.liCollections[0])) {
            var items = [this.liCollections[0]];
            var searchItem = Object(_common_incremental_search__WEBPACK_IMPORTED_MODULE_4__["Search"])(this.inputElement.value, items, 'StartsWith', this.ignoreCase);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(searchItem.item)) {
                _super.prototype.setAutoFill.call(this, this.liCollections[0], true);
            }
        }
    };
    AutoComplete.prototype.setSelection = function (li, e) {
        if (!this.isValidLI(li)) {
            return;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) && e.type === 'keydown' && e.action !== 'enter' && this.isValidLI(li)) {
            var value = this.getFormattedValue(li.getAttribute('data-value'));
            this.activeIndex = this.getIndexByValue(value);
            this.setHoverList(li);
            this.selectedLI = li;
            this.setScrollPosition(e);
            if (this.autofill) {
                this.preventAutoFill = false;
                _super.prototype.setAutoFill.call(this, li);
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
        }
        else {
            _super.prototype.setSelection.call(this, li, e);
        }
    };
    AutoComplete.prototype.listOption = function (dataSource, fieldsSettings) {
        var _this = this;
        var fields = _super.prototype.listOption.call(this, dataSource, fieldsSettings);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields.itemCreated)) {
            fields.itemCreated = function (e) {
                if (_this.highlight) {
                    Object(_common_highlight_search__WEBPACK_IMPORTED_MODULE_3__["highlightSearch"])(e.item, _this.queryString, _this.ignoreCase, _this.filterType);
                }
            };
        }
        else {
            var itemCreated_1 = fields.itemCreated;
            fields.itemCreated = function (e) {
                if (_this.highlight) {
                    Object(_common_highlight_search__WEBPACK_IMPORTED_MODULE_3__["highlightSearch"])(e.item, _this.queryString, _this.ignoreCase, _this.filterType);
                }
                itemCreated_1.apply(_this, [e]);
            };
        }
        return fields;
    };
    ;
    AutoComplete.prototype.isFiltering = function () {
        return true;
    };
    AutoComplete.prototype.renderPopup = function () {
        this.list.scrollTop = 0;
        _super.prototype.renderPopup.call(this);
    };
    AutoComplete.prototype.isEditTextBox = function () {
        return true && this.inputElement.value.trim() !== '';
    };
    AutoComplete.prototype.isPopupButton = function () {
        return this.showPopupButton;
    };
    AutoComplete.prototype.isSelectFocusItem = function (element) {
        return false;
    };
    /**
     * Search the entered text and show it in the suggestion list if available.
     * @returns void.
     */
    AutoComplete.prototype.showPopup = function () {
        if (!this.enabled) {
            return;
        }
        if (this.beforePopupOpen) {
            this.refreshPopup();
            return;
        }
        this.beforePopupOpen = true;
        this.preventAutoFill = true;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
            this.renderList();
        }
        else {
            this.resetList(this.dataSource, this.fields);
        }
    };
    /**
     * Hides the popup if it is in open state.
     * @returns void.
     */
    AutoComplete.prototype.hidePopup = function () {
        this.DropDownBaseresetBlazorTemplates(true, false, false, false);
        _super.prototype.hidePopup.call(this);
        this.activeIndex = -1;
    };
    /**
     * Dynamically change the value of properties.
     * @private
     */
    AutoComplete.prototype.onPropertyChanged = function (newProp, oldProp) {
        if (this.getModuleName() === 'autocomplete') {
            this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
        }
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'showPopupButton':
                    if (this.showPopupButton) {
                        var button = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_6__["Input"].appendSpan(_drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].icon, this.inputWrapper.container, this.createElement);
                        this.inputWrapper.buttons[0] = button;
                        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.buttons[0], 'click', this.dropDownClick, this);
                    }
                    else {
                        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);
                    _super.prototype.onPropertyChanged.call(this, atcProps.newProperty, atcProps.oldProperty);
                    break;
            }
        }
    };
    /**
     * Return the module name of this component.
     * @private
     */
    AutoComplete.prototype.getModuleName = function () {
        return 'autocomplete';
    };
    /**
     * To initialize the control rendering
     * @private
     */
    AutoComplete.prototype.render = function () {
        _super.prototype.render.call(this);
    };
    ;
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ value: null, iconCss: null, groupBy: null }, _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_5__["FieldSettings"])
    ], AutoComplete.prototype, "fields", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], AutoComplete.prototype, "ignoreCase", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], AutoComplete.prototype, "showPopupButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], AutoComplete.prototype, "highlight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(20)
    ], AutoComplete.prototype, "suggestionCount", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], AutoComplete.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AutoComplete.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], AutoComplete.prototype, "minLength", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Contains')
    ], AutoComplete.prototype, "filterType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], AutoComplete.prototype, "filtering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AutoComplete.prototype, "index", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')
    ], AutoComplete.prototype, "floatLabelType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AutoComplete.prototype, "valueTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AutoComplete.prototype, "filterBarPlaceholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], AutoComplete.prototype, "allowFiltering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AutoComplete.prototype, "text", void 0);
    AutoComplete = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], AutoComplete);
    return AutoComplete;
}(_combo_box_combo_box__WEBPACK_IMPORTED_MODULE_2__["ComboBox"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/auto-complete/index.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/auto-complete/index.js ***!
  \***************************************************************************/
/*! exports provided: AutoComplete */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _auto_complete__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./auto-complete */ "./node_modules/@syncfusion/ej2-dropdowns/src/auto-complete/auto-complete.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoComplete", function() { return _auto_complete__WEBPACK_IMPORTED_MODULE_0__["AutoComplete"]; });

/**
 * export all modules from current location
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/combo-box/combo-box.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/combo-box/combo-box.js ***!
  \***************************************************************************/
/*! exports provided: ComboBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComboBox", function() { return ComboBox; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../drop-down-list/drop-down-list */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/drop-down-list.js");
/* harmony import */ var _common_incremental_search__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/incremental-search */ "./node_modules/@syncfusion/ej2-dropdowns/src/common/incremental-search.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <reference path='../drop-down-list/drop-down-list-model.d.ts'/>





/* tslint:disable */

/* tslint:enable */
var SPINNER_CLASS = 'e-atc-spinner-icon';
_drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].root = 'e-combobox';
var inputObject = {
    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 = /** @class */ (function (_super) {
    __extends(ComboBox, _super);
    /**
     * *Constructor for creating the component
     */
    function ComboBox(options, element) {
        return _super.call(this, options, element) || this;
    }
    ;
    /**
     * Initialize the event handler
     * @private
     */
    ComboBox.prototype.preRender = function () {
        _super.prototype.preRender.call(this);
    };
    ComboBox.prototype.getLocaleName = function () {
        return 'combo-box';
    };
    ;
    ComboBox.prototype.wireEvent = function () {
        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);
        }
        this.bindCommonEvent();
    };
    ComboBox.prototype.preventBlur = function (e) {
        if ((!this.allowFiltering && document.activeElement !== this.inputElement &&
            !document.activeElement.classList.contains(_drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].input) && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice || !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice)) {
            e.preventDefault();
        }
    };
    ComboBox.prototype.onBlur = function (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();
        }
        _super.prototype.onBlur.call(this, e);
    };
    ComboBox.prototype.targetElement = function () {
        return this.inputElement;
    };
    ComboBox.prototype.setOldText = function (text) {
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
        this.customValue();
        this.removeSelection();
    };
    ComboBox.prototype.setOldValue = function (value) {
        if (this.allowCustom) {
            this.valueMuteChange(this.value);
        }
        else {
            this.valueMuteChange(null);
        }
        this.removeSelection();
        this.setHiddenValue();
    };
    ComboBox.prototype.valueMuteChange = function (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);
        }
    };
    ComboBox.prototype.updateValues = function () {
        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);
    };
    ComboBox.prototype.updateIconState = function () {
        if (this.showClearButton) {
            if (this.inputElement.value !== '' && !this.readonly) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.clearButton], _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].clearIconHide);
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.clearButton], _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].clearIconHide);
            }
        }
    };
    ComboBox.prototype.getAriaAttributes = function () {
        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;
    };
    ComboBox.prototype.searchLists = function (e) {
        this.isTyped = true;
        if (this.isFiltering()) {
            _super.prototype.searchLists.call(this, e);
            if (this.filterInput.value.trim() === '') {
                this.setHoverList(this.ulElement.querySelector('.' + _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].li));
            }
        }
        else {
            if (this.ulElement && this.inputElement.value === '' && this.preventAutoFill) {
                this.setHoverList(this.ulElement.querySelector('.' + _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].li));
            }
            this.incrementalSearch(e);
        }
    };
    ComboBox.prototype.getNgDirective = function () {
        return 'EJS-COMBOBOX';
    };
    ComboBox.prototype.setSearchBox = function () {
        this.filterInput = this.inputElement;
        return (this.isFiltering() ? this.inputWrapper : inputObject);
    };
    ComboBox.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
        _super.prototype.onActionComplete.call(this, ulElement, list, e);
        if (this.isSelectCustom) {
            this.removeSelection();
        }
        if (!this.preventAutoFill && this.getModuleName() === 'combobox' && this.isTyped) {
            this.inlineSearch();
        }
    };
    ComboBox.prototype.getFocusElement = function () {
        var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();
        var selected = this.list.querySelector('.' + _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["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 = Object(_common_incremental_search__WEBPACK_IMPORTED_MODULE_2__["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], _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].focus);
                }
            }
            else {
                if (this.isSelectCustom && this.inputElement.value.trim() !== '') {
                    this.removeFocus();
                    this.list.scrollTop = 0;
                }
            }
            return activeElement;
        }
        else {
            return null;
        }
    };
    ComboBox.prototype.setValue = function (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 _super.prototype.setValue.call(this, e);
        }
    };
    ComboBox.prototype.checkCustomValue = function () {
        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 });
        }
    };
    /**
     * Shows the spinner loader.
     * @returns void.
     */
    ComboBox.prototype.showSpinner = function () {
        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], _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["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.
     */
    ComboBox.prototype.hideSpinner = function () {
        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], _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["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;
        }
    };
    ComboBox.prototype.setAutoFill = function (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);
            }
        }
    };
    ComboBox.prototype.isAndroidAutoFill = function (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;
        }
    };
    ComboBox.prototype.clear = function (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))) {
            _super.prototype.clear.call(this, e);
        }
    };
    ComboBox.prototype.isSelectFocusItem = function (element) {
        return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element);
    };
    ComboBox.prototype.inlineSearch = function (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('.' + _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].li);
            this.setHoverList(focusItem);
        }
        else {
            this.activeIndex = null;
            this.removeSelection();
            this.removeFocus();
        }
    };
    ComboBox.prototype.incrementalSearch = function (e) {
        this.showPopup();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listData)) {
            this.inlineSearch(e);
            e.preventDefault();
        }
    };
    ;
    ComboBox.prototype.setAutoFillSelection = function (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);
        }
    };
    ;
    ComboBox.prototype.getValueByText = function (text) {
        return _super.prototype.getValueByText.call(this, text, true, this.ignoreAccent);
    };
    ComboBox.prototype.unWireEvent = function () {
        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);
        }
        this.unBindCommonEvent();
    };
    ComboBox.prototype.setSelection = function (li, e) {
        _super.prototype.setSelection.call(this, li, e);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) && !this.autofill && !this.isDropDownClick) {
            this.removeFocus();
        }
    };
    ComboBox.prototype.selectCurrentItem = function (e) {
        var li;
        if (this.isPopupOpen) {
            li = this.list.querySelector('.' + _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["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.clear(e);
        }
        else if (this.isTyped && !this.isSelected && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
            this.customValue();
        }
        this.hidePopup();
    };
    ComboBox.prototype.setHoverList = function (li) {
        this.removeSelection();
        if (this.isValidLI(li) && !li.classList.contains(_drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].selected)) {
            this.removeFocus();
            li.classList.add(_drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].focus);
        }
    };
    ;
    ComboBox.prototype.targetFocus = function (e) {
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.allowFiltering) {
            this.preventFocus = false;
        }
        this.onFocus();
    };
    ComboBox.prototype.dropDownClick = function (e) {
        e.preventDefault();
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.allowFiltering) {
            this.preventFocus = true;
        }
        _super.prototype.dropDownClick.call(this, e);
    };
    ComboBox.prototype.customValue = function () {
        var _this = 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_1 = this.value;
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
                var value_1 = this.inputElement.value === '' ? null : this.inputElement.value;
                var eventArgs = void 0;
                eventArgs = { text: value_1, item: {} };
                if (!this.initial) {
                    this.trigger('customValueSpecifier', eventArgs, function (eventArgs) {
                        _this.updateCustomValueCallback(value_1, eventArgs, previousValue_1);
                    });
                }
                else {
                    this.updateCustomValueCallback(value_1, eventArgs, previousValue_1);
                }
            }
            else {
                this.isSelectCustom = false;
                this.setProperties({ value: value });
                if (previousValue_1 !== this.value) {
                    this.onChangeEvent(null);
                }
            }
        }
        else if (this.allowCustom) {
            this.isSelectCustom = true;
        }
    };
    ComboBox.prototype.updateCustomValueCallback = function (value, eventArgs, previousValue) {
        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(null);
        }
    };
    /**
     * Dynamically change the value of properties.
     * @private
     */
    ComboBox.prototype.onPropertyChanged = function (newProp, oldProp) {
        if (this.getModuleName() === 'combobox') {
            this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
        }
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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)) {
                        _super.prototype.renderList.call(this);
                    }
                    break;
                case 'allowCustom':
                    break;
                default:
                    var comboProps = void 0;
                    comboProps = this.getPropObject(prop, newProp, oldProp);
                    _super.prototype.onPropertyChanged.call(this, comboProps.newProperty, comboProps.oldProperty);
                    break;
            }
        }
    };
    /**
     * To initialize the control rendering.
     * @private
     */
    ComboBox.prototype.render = function () {
        _super.prototype.render.call(this);
        this.setSearchBox();
        if (this.isFiltering() && this.getModuleName() === 'combobox' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
            _super.prototype.renderList.call(this);
        }
    };
    ;
    /**
     * Return the module name of this component.
     * @private
     */
    ComboBox.prototype.getModuleName = function () {
        return 'combobox';
    };
    /**
     * Hides the popup if it is in open state.
     * @returns void.
     */
    ComboBox.prototype.hidePopup = function () {
        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('.' + _drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["dropDownListClasses"].selected);
            if (dataItem.text === this.inputElement.value && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selected)) {
                if (this.isSelected) {
                    this.onChangeEvent(null);
                    this.isSelectCustom = false;
                }
                _super.prototype.hidePopup.call(this);
                return;
            }
            if (this.getModuleName() === 'combobox' && this.inputElement.value.trim() !== '') {
                var searchItem = Object(_common_incremental_search__WEBPACK_IMPORTED_MODULE_2__["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 = Object(_common_incremental_search__WEBPACK_IMPORTED_MODULE_2__["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();
            }
        }
        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();
        }
        _super.prototype.hidePopup.call(this);
    };
    /**
     * Sets the focus to the component for interaction.
     * @returns void.
     */
    ComboBox.prototype.focusIn = function () {
        if (!this.enabled) {
            return;
        }
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.allowFiltering) {
            this.preventFocus = true;
        }
        _super.prototype.focusIn.call(this);
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ComboBox.prototype, "autofill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], ComboBox.prototype, "allowCustom", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], ComboBox.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ComboBox.prototype, "allowFiltering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ComboBox.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ComboBox.prototype, "index", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], ComboBox.prototype, "showClearButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ComboBox.prototype, "customValueSpecifier", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ComboBox.prototype, "filtering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ComboBox.prototype, "valueTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')
    ], ComboBox.prototype, "floatLabelType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ComboBox.prototype, "filterBarPlaceholder", void 0);
    ComboBox = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], ComboBox);
    return ComboBox;
}(_drop_down_list_drop_down_list__WEBPACK_IMPORTED_MODULE_1__["DropDownList"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/combo-box/index.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/combo-box/index.js ***!
  \***********************************************************************/
/*! exports provided: ComboBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _combo_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./combo-box */ "./node_modules/@syncfusion/ej2-dropdowns/src/combo-box/combo-box.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComboBox", function() { return _combo_box__WEBPACK_IMPORTED_MODULE_0__["ComboBox"]; });

/**
 * export all modules from current location
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/common/highlight-search.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/common/highlight-search.js ***!
  \*******************************************************************************/
/*! exports provided: highlightSearch, revertHighlightSearch */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "highlightSearch", function() { return highlightSearch; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "revertHighlightSearch", function() { return revertHighlightSearch; });
/**
 * 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) {
    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));
    }
}
function findTextNode(element, pattern) {
    for (var index = 0; element.childNodes && (index < element.childNodes.length); index++) {
        if (element.childNodes[index].nodeType === 3) {
            element.innerHTML = element.innerHTML.replace(pattern, '<span class="e-highlight">$1</span>');
            break;
        }
        else {
            findTextNode(element.childNodes[index], pattern);
        }
    }
}
/**
 * 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_1 = contentElement[i].parentNode;
        var text = document.createTextNode(contentElement[i].textContent);
        parent_1.replaceChild(text, contentElement[i]);
    }
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/common/incremental-search.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/common/incremental-search.js ***!
  \*********************************************************************************/
/*! exports provided: incrementalSearch, Search */
/***/ (function(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; });
/**
 * IncrementalSearch module file
 */
var queryString = '';
var prevString = '';
var matches = [];
var activeClass = 'e-active';
/**
 * 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) {
    queryString += String.fromCharCode(keyCode);
    setTimeout(function () { queryString = ''; }, 1000);
    var index;
    queryString = ignoreCase ? queryString.toLowerCase() : queryString;
    if (prevString === queryString) {
        for (var i = 0; i < matches.length; i++) {
            if (matches[i].classList.contains(activeClass)) {
                index = i;
                break;
            }
        }
        index = index + 1;
        return matches[index];
    }
    else {
        var listItems = items;
        var strLength = queryString.length;
        var text = void 0;
        var item = void 0;
        selectedIndex = selectedIndex ? selectedIndex + 1 : 0;
        var i = selectedIndex;
        matches = [];
        do {
            if (i === listItems.length) {
                i = -1;
            }
            i === -1 ? index = 0 : index = i;
            item = listItems[index];
            text = ignoreCase ? item.innerText.toLowerCase() : item.innerText;
            if (text.substr(0, strLength) === queryString) {
                matches.push(listItems[index]);
            }
            i++;
        } while (i !== selectedIndex);
        prevString = queryString;
        return matches[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;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/common/index.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/common/index.js ***!
  \********************************************************************/
/*! exports provided: incrementalSearch, Search, highlightSearch, revertHighlightSearch */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _incremental_search__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./incremental-search */ "./node_modules/@syncfusion/ej2-dropdowns/src/common/incremental-search.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "incrementalSearch", function() { return _incremental_search__WEBPACK_IMPORTED_MODULE_0__["incrementalSearch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Search", function() { return _incremental_search__WEBPACK_IMPORTED_MODULE_0__["Search"]; });

/* harmony import */ var _highlight_search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./highlight-search */ "./node_modules/@syncfusion/ej2-dropdowns/src/common/highlight-search.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "highlightSearch", function() { return _highlight_search__WEBPACK_IMPORTED_MODULE_1__["highlightSearch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "revertHighlightSearch", function() { return _highlight_search__WEBPACK_IMPORTED_MODULE_1__["revertHighlightSearch"]; });

/**
 * Common source
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js ***!
  \*************************************************************************************/
/*! exports provided: FieldSettings, dropDownBaseClasses, DropDownBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-lists */ "./node_modules/@syncfusion/ej2-lists/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 = /** @class */ (function (_super) {
    __extends(FieldSettings, _super);
    function FieldSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __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);
    return FieldSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

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: _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li,
    group: _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].group,
    disabled: _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].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 = /** @class */ (function (_super) {
    __extends(DropDownBase, _super);
    /**
     * * Constructor for DropDownBase class
     */
    function DropDownBase(options, element) {
        return _super.call(this, options, element) || this;
    }
    ;
    DropDownBase.prototype.getPropObject = function (prop, newProp, oldProp) {
        var newProperty = new Object();
        var oldProperty = new Object();
        // tslint:disable-next-line:no-function-constructor-with-string-args
        var propName = function (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;
    };
    DropDownBase.prototype.getValueByText = function (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;
    };
    ;
    DropDownBase.prototype.checkValueCase = function (text, ignoreCase, ignoreAccent, isTextByValue) {
        var _this = 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') {
            for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {
                var item = dataSource_1[_i];
                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);
                            }
                        }
                    }
                }
            }
        }
        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) && _this.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 (_this.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;
    };
    DropDownBase.prototype.checkingAccent = function (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;
    };
    DropDownBase.prototype.checkIgnoreCase = function (item, text) {
        return String(item).toLowerCase() === text.toString().toLowerCase() ? true : false;
    };
    DropDownBase.prototype.checkNonIgnoreCase = function (item, text) {
        return String(item) === text.toString() ? true : false;
    };
    DropDownBase.prototype.getItemValue = function (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;
    };
    DropDownBase.prototype.l10nUpdate = function (actionFailure) {
        var ele = this.getModuleName() === 'listbox' ? this.ulElement : this.list;
        if (this.noRecordsTemplate !== 'No Records Found' || this.actionFailureTemplate !== 'The Request Failed') {
            this.DropDownBaseresetBlazorTemplates(false, false, true, true);
            var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
            var compiledString = void 0;
            var templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;
            ele.innerHTML = '';
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
            for (var _i = 0, _a = compiledString({}, null, null, templateId, this.isStringTemplate); _i < _a.length; _i++) {
                var item = _a[_i];
                ele.appendChild(item);
            }
            this.DropDownBaseupdateBlazorTemplates(false, false, !actionFailure, actionFailure);
        }
        else {
            var l10nLocale = { noRecordsTemplate: 'No Records Found', actionFailureTemplate: 'The 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);
            }
            ele.innerHTML = actionFailure ?
                this.l10n.getConstant('actionFailureTemplate') : this.l10n.getConstant('noRecordsTemplate');
        }
    };
    DropDownBase.prototype.getLocaleName = function () {
        return 'drop-down-base';
    };
    ;
    DropDownBase.prototype.getTextByValue = function (value) {
        var text;
        text = this.checkValueCase(value, false, false, true);
        return text;
    };
    DropDownBase.prototype.getFormattedValue = function (value) {
        if (this.listData && this.listData.length) {
            var item = this.typeOfData(this.listData);
            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 parseInt(value, 10);
            }
            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
     */
    DropDownBase.prototype.setEnableRtl = function () {
        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);
    };
    ;
    /**
     * Initialize the Component.
     */
    DropDownBase.prototype.initialize = function () {
        this.bindEvent = true;
        this.actionFailureTemplateId = "" + this.element.id + 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);
        }
    };
    ;
    DropDownBase.prototype.DropDownBaseupdateBlazorTemplates = function (item, group, noRecord, action, value, header, footer) {
        if (!this.isStringTemplate) {
            if (this.itemTemplate && item) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.itemTemplateId, ITEMTEMPLATE_PROPERTY, this);
            }
            if (this.groupTemplate && group) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.groupTemplateId, GROUPTEMPLATE_PROPERTY, this);
            }
            if (this.noRecordsTemplate && noRecord) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.noRecordsTemplateId, NORECORDSTEMPLATE_PROPERTY, this);
            }
            if (this.actionFailureTemplate && action) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.actionFailureTemplateId, ACTIONFAILURETEMPLATE_PROPERTY, this);
            }
            if (value) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.valueTemplateId, VALUETEMPLATE_PROPERTY, this);
            }
            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);
            }
        }
    };
    DropDownBase.prototype.DropDownBaseresetBlazorTemplates = function (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.
     */
    DropDownBase.prototype.getPersistData = function () {
        return this.addOnPersist([]);
    };
    ;
    /**
     * Sets the enabled state to DropDownBase.
     */
    DropDownBase.prototype.setEnabled = function () {
        this.element.setAttribute('aria-disabled', (this.enabled) ? 'false' : 'true');
    };
    ;
    /**
     * Sets the enabled state to DropDownBase.
     */
    DropDownBase.prototype.updateDataAttribute = function (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);
    };
    DropDownBase.prototype.renderItemsBySelect = function () {
        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);
    };
    DropDownBase.prototype.getJSONfromOption = function (items, options, fields) {
        for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
            var option = options_1[_i];
            var json = {};
            json[fields.text] = option.innerText;
            json[fields.value] = option.getAttribute(fields.value) ? option.getAttribute(fields.value) : option.innerText;
            items.push(json);
        }
    };
    /**
     * Execute before render the list items
     * @private
     */
    DropDownBase.prototype.preRender = function () {
        // there is no event handler
        this.scrollTimer = -1;
        this.enableRtlElements = [];
        this.isRequested = false;
        this.isDataFetched = false;
        this.itemTemplateId = "" + this.element.id + ITEMTEMPLATE_PROPERTY;
        this.valueTemplateId = "" + this.element.id + VALUETEMPLATE_PROPERTY;
        this.groupTemplateId = "" + this.element.id + GROUPTEMPLATE_PROPERTY;
        this.headerTemplateId = "" + this.element.id + HEADERTEMPLATE_PROPERTY;
        this.footerTemplateId = "" + this.element.id + FOOTERTEMPLATE_PROPERTY;
        this.noRecordsTemplateId = "" + this.element.id + NORECORDSTEMPLATE_PROPERTY;
    };
    /**
     * Creates the list items of DropDownBase component.
     */
    DropDownBase.prototype.setListData = function (dataSource, fields, query) {
        var _this = 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) {
                _this.showSpinner();
                if (dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
                    _this.isRequested = true;
                    if (_this.isDataFetched) {
                        _this.emptyDataRequest(fields);
                        return;
                    }
                    eventArgs.data.executeQuery(_this.getQuery(eventArgs.query)).then(function (e) {
                        _this.trigger('actionComplete', e, function (e) {
                            if (!e.cancel) {
                                var listItems = e.result;
                                if (listItems.length === 0) {
                                    _this.isDataFetched = true;
                                }
                                ulElement = _this.renderItems(listItems, fields);
                                _this.onActionComplete(ulElement, listItems, e);
                                if (_this.groupTemplate) {
                                    _this.renderGroupTemplate(ulElement);
                                }
                                _this.isRequested = false;
                                _this.bindChildItems(listItems, ulElement, fields, e);
                            }
                        });
                    }).catch(function (e) {
                        _this.isRequested = false;
                        _this.onActionFailure(e);
                        _this.hideSpinner();
                    });
                }
                else {
                    var dataManager = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](eventArgs.data);
                    var listItems = (_this.getQuery(eventArgs.query)).executeLocal(dataManager);
                    var localDataArgs = { cancel: false, result: listItems };
                    _this.trigger('actionComplete', localDataArgs, function (localDataArgs) {
                        if (!localDataArgs.cancel) {
                            ulElement = _this.renderItems(localDataArgs.result, fields);
                            _this.onActionComplete(ulElement, localDataArgs.result);
                            if (_this.groupTemplate) {
                                _this.renderGroupTemplate(ulElement);
                            }
                            _this.bindChildItems(localDataArgs.result, ulElement, fields);
                        }
                    });
                }
            }
        });
    };
    DropDownBase.prototype.bindChildItems = function (listItems, ulElement, fields, e) {
        var _this = this;
        if (listItems.length >= 100 && this.getModuleName() === 'autocomplete') {
            setTimeout(function () {
                var childNode = _this.remainingItems(_this.sortedData, fields);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(childNode, ulElement);
                _this.DropDownBaseupdateBlazorTemplates(true, false, false, false);
                _this.liCollections = _this.list.querySelectorAll('.' + dropDownBaseClasses.li);
                _this.updateListValues();
                _this.raiseDataBound(listItems, e);
            }, 0);
        }
        else {
            this.raiseDataBound(listItems, e);
        }
    };
    DropDownBase.prototype.updateListValues = function () {
        // Used this method in component side.
    };
    DropDownBase.prototype.findListElement = function (list, findNode, attribute, value) {
        var liElement = null;
        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;
    };
    DropDownBase.prototype.raiseDataBound = function (listItems, e) {
        this.hideSpinner();
        var dataBoundEventArgs = {
            items: listItems,
            e: e
        };
        this.trigger('dataBound', dataBoundEventArgs);
    };
    DropDownBase.prototype.remainingItems = function (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);
    };
    DropDownBase.prototype.emptyDataRequest = function (fields) {
        var listItems = [];
        this.onActionComplete(this.renderItems(listItems, fields), listItems);
        this.isRequested = false;
        this.hideSpinner();
    };
    DropDownBase.prototype.showSpinner = function () {
        // Used this method in component side.
    };
    DropDownBase.prototype.hideSpinner = function () {
        // Used this method in component side.
    };
    DropDownBase.prototype.onActionFailure = function (e) {
        this.liCollections = [];
        this.trigger('actionFailure', e);
        this.l10nUpdate(true);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.list], dropDownBaseClasses.noData);
    };
    DropDownBase.prototype.onActionComplete = function (ulElement, list, e) {
        this.listData = list;
        this.list.innerHTML = '';
        this.list.appendChild(ulElement);
        this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
        this.ulElement = this.list.querySelector('ul');
        this.postRender(this.list, list, this.bindEvent);
    };
    DropDownBase.prototype.postRender = function (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.
     */
    DropDownBase.prototype.getQuery = function (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.
     */
    DropDownBase.prototype.renderGroupTemplate = function (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 tempHeaders = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].renderGroupTemplate(this.groupTemplate, dataSource, this.fields.properties, headerItems, option);
            this.DropDownBaseupdateBlazorTemplates(false, true, false, false);
        }
    };
    /**
     * To create the ul li list items
     */
    DropDownBase.prototype.createListItems = function (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);
    };
    ;
    DropDownBase.prototype.listOption = function (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);
    };
    ;
    DropDownBase.prototype.setFloatingHeader = function (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);
    };
    DropDownBase.prototype.scrollStop = function (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.ulElement.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
     */
    DropDownBase.prototype.renderItems = function (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);
            this.DropDownBaseupdateBlazorTemplates(true, false, false, false);
        }
        else {
            ulElement = this.createListItems(listData, fields);
        }
        return ulElement;
    };
    ;
    DropDownBase.prototype.templateListItem = function (dataSource, fields) {
        this.DropDownBaseresetBlazorTemplates(true, false, false, false);
        var option = this.listOption(dataSource, fields);
        option.templateID = this.itemTemplateId;
        option.isStringTemplate = this.isStringTemplate;
        return _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].renderContentTemplate(this.createElement, this.itemTemplate, dataSource, fields.properties, option);
    };
    DropDownBase.prototype.typeOfData = function (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])) {
                return item = { typeof: typeof items[i], item: items[i] };
            }
        }
        return item;
    };
    DropDownBase.prototype.setFixedHeader = function () {
        this.list.parentElement.style.display = 'block';
        var liWidth = this.liCollections[0].offsetWidth;
        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;
    };
    DropDownBase.prototype.getSortedDataSource = function (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
     */
    DropDownBase.prototype.getIndexByValue = function (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;
    };
    ;
    /**
     * To dispatch the event manually
     */
    DropDownBase.prototype.dispatchEvent = function (element, type) {
        var evt = document.createEvent('HTMLEvents');
        evt.initEvent(type, false, true);
        element.dispatchEvent(evt);
    };
    /**
     * To set the current fields
     */
    DropDownBase.prototype.setFields = function () {
        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.
     */
    DropDownBase.prototype.resetList = function (dataSource, fields, query) {
        if (this.list) {
            this.setListData(dataSource, fields, query);
        }
    };
    DropDownBase.prototype.updateSelection = function () {
        // This is for after added the item, need to update the selected index values.
    };
    DropDownBase.prototype.renderList = function () {
        // This is for render the list items.
        this.render();
    };
    DropDownBase.prototype.updateDataSource = function (props) {
        this.resetList(this.dataSource);
    };
    DropDownBase.prototype.setUpdateInitial = function (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
     */
    DropDownBase.prototype.onPropertyChanged = function (newProp, oldProp) {
        if (this.getModuleName() === 'dropdownbase') {
            this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
        }
        this.setUpdateInitial(['sortOrder', 'itemTemplate'], newProp);
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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;
            }
        }
    };
    ;
    /**
     * Build and render the component
     * @private
     */
    DropDownBase.prototype.render = function (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();
        }
    };
    ;
    /**
     * Return the module name of this component.
     * @private
     */
    DropDownBase.prototype.getModuleName = function () {
        return 'dropdownbase';
    };
    ;
    /**
     * Gets all the list items bound on this component.
     * @returns Element[].
     */
    DropDownBase.prototype.getItems = function () {
        return this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li);
    };
    ;
    /**
     * 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}.
     */
    DropDownBase.prototype.addItem = function (items, itemIndex) {
        if (!this.list || this.list.textContent === this.noRecordsTemplate) {
            this.renderList();
        }
        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, null, null, 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);
        }
        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);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(liCollections, this.ulElement);
        }
        else {
            for (var i = 0; i < items.length; i++) {
                if (this.liCollections[index]) {
                    this.liCollections[index].parentNode.insertBefore(liCollections[i], this.liCollections[index]);
                }
                else {
                    this.ulElement.appendChild(liCollections[i]);
                }
                var tempLi = [].slice.call(this.liCollections);
                tempLi.splice(index, 0, liCollections[i]);
                this.liCollections = tempLi;
                index += 1;
            }
        }
        if (selectedItemValue || itemIndex === 0) {
            this.updateSelection();
        }
    };
    DropDownBase.prototype.validationAttribute = function (target, hidden) {
        var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
        hidden.setAttribute('name', name);
        target.removeAttribute('name');
        var attributes = ['required', 'aria-required', 'form'];
        for (var i = 0; i < attributes.length; i++) {
            if (!target.getAttribute(attributes[i])) {
                continue;
            }
            var attr = target.getAttribute(attributes[i]);
            hidden.setAttribute(attributes[i], attr);
            target.removeAttribute(attributes[i]);
        }
    };
    DropDownBase.prototype.setZIndex = function () {
        // this is for component wise
    };
    DropDownBase.prototype.updateActionCompleteData = function (li, item) {
        // this is for ComboBox custom value
    };
    /**
     * Gets the data Object that matches the given value.
     * @param { string | number } value - Specifies the value of the list item.
     * @returns Object.
     * @isGenericType true
     */
    DropDownBase.prototype.getDataByValue = function (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') {
                for (var _i = 0, _a = this.listData; _i < _a.length; _i++) {
                    var item = _a[_i];
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item) && item === value) {
                        return item;
                    }
                }
            }
            else {
                for (var _b = 0, _c = this.listData; _b < _c.length; _b++) {
                    var item = _c[_b];
                    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;
                    }
                }
            }
        }
        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}.
     */
    DropDownBase.prototype.destroy = function () {
        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);
        }
        _super.prototype.destroy.call(this);
    };
    ;
    __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"])('The 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"])(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);
    return DropDownBase;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/index.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/index.js ***!
  \****************************************************************************/
/*! exports provided: FieldSettings, dropDownBaseClasses, DropDownBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _drop_down_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drop-down-base */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldSettings", function() { return _drop_down_base__WEBPACK_IMPORTED_MODULE_0__["FieldSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropDownBaseClasses", function() { return _drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownBase", function() { return _drop_down_base__WEBPACK_IMPORTED_MODULE_0__["DropDownBase"]; });

/**
 * export all modules from current location
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/drop-down-list.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/drop-down-list.js ***!
  \*************************************************************************************/
/*! exports provided: dropDownListClasses, DropDownList */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _common_incremental_search__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/incremental-search */ "./node_modules/@syncfusion/ej2-dropdowns/src/common/incremental-search.js");
/* harmony import */ var _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../drop-down-base/drop-down-base */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <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: _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].hover,
    selected: _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].selected,
    rtl: _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].rtl,
    li: _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].li,
    disable: _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].disabled,
    base: _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].root,
    focus: _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["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 = /** @class */ (function (_super) {
    __extends(DropDownList, _super);
    /**
     * * Constructor for creating the DropDownList component.
     */
    function DropDownList(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.previousValue = null;
        return _this;
    }
    ;
    /**
     * Initialize the event handler.
     * @private
     */
    DropDownList.prototype.preRender = function () {
        this.element.style.opacity = '0';
        this.initializeData();
        _super.prototype.preRender.call(this);
        this.activeIndex = this.index;
        this.queryString = '';
    };
    DropDownList.prototype.initializeData = function () {
        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.filterVal = 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'
        };
    };
    DropDownList.prototype.setZIndex = function () {
        if (this.popupObj) {
            this.popupObj.setProperties({ 'zIndex': this.zIndex });
        }
    };
    DropDownList.prototype.renderList = function (isEmptyData) {
        _super.prototype.render.call(this, isEmptyData);
        this.wireListEvents();
    };
    DropDownList.prototype.floatLabelChange = function () {
        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']);
            }
        }
    };
    DropDownList.prototype.resetHandler = function (e) {
        e.preventDefault();
        this.clear(e);
    };
    DropDownList.prototype.resetFocusElement = function () {
        this.removeHover();
        this.removeSelection();
        this.removeFocus();
        this.list.scrollTop = 0;
        if (this.getModuleName() !== 'autocomplete') {
            var li = this.ulElement.querySelector('.' + dropDownListClasses.li);
            if (li) {
                li.classList.add(dropDownListClasses.focus);
            }
        }
    };
    DropDownList.prototype.clear = function (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_5__["DataManager"]) && properties.dataSource.length === 0)))) {
            this.isActive = true;
            this.resetSelection(properties);
        }
        var dataItem = this.getItemData();
        if (this.previousValue === dataItem.value) {
            return;
        }
        this.onChangeEvent(e);
    };
    DropDownList.prototype.resetSelection = function (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_5__["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)) {
                    this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(true), this.actionCompleteData.list);
                }
                this.resetFocusElement();
            }
        }
        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();
    };
    DropDownList.prototype.setHTMLAttributes = function () {
        if (Object.keys(this.htmlAttributes).length) {
            for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
                var htmlAttr = _a[_i];
                if (htmlAttr === 'class') {
                    this.inputWrapper.container.classList.add(this.htmlAttributes[htmlAttr]);
                }
                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 (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_2__["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');
        }
    };
    DropDownList.prototype.getAriaAttributes = function () {
        return {
            'aria-disabled': 'false',
            'aria-owns': this.element.id + '_options',
            'role': 'listbox',
            'aria-haspopup': 'true',
            'aria-expanded': 'false',
            'aria-activedescendant': 'null',
            'aria-labelledby': this.hiddenElement.id
        };
    };
    DropDownList.prototype.setEnableRtl = function () {
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setEnableRtl(this.enableRtl, [this.inputElement.parentElement]);
        if (this.popupObj) {
            this.popupObj.enableRtl = this.enableRtl;
            this.popupObj.dataBind();
        }
    };
    DropDownList.prototype.setEnable = function () {
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["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.
     */
    DropDownList.prototype.getPersistData = function () {
        return this.addOnPersist(['value']);
    };
    ;
    DropDownList.prototype.getLocaleName = function () {
        return 'drop-down-list';
    };
    ;
    DropDownList.prototype.preventTabIndex = function (element) {
        if (this.getModuleName() === 'dropdownlist') {
            element.tabIndex = -1;
        }
    };
    DropDownList.prototype.targetElement = function () {
        return this.inputWrapper.container;
    };
    DropDownList.prototype.getNgDirective = function () {
        return 'EJS-DROPDOWNLIST';
    };
    DropDownList.prototype.getElementByText = function (text) {
        var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');
        if (formElement && this.filterVal) {
            this.listData = this.actionCompleteData.list;
        }
        return this.getElementByValue(this.getValueByText(text));
    };
    DropDownList.prototype.getElementByValue = function (value) {
        var item;
        var listItems;
        var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');
        if (formElement && this.filterVal) {
            listItems = this.actionCompleteData.ulElement.childNodes;
        }
        else {
            listItems = this.getItems();
        }
        for (var _i = 0, listItems_1 = listItems; _i < listItems_1.length; _i++) {
            var liItem = listItems_1[_i];
            if (this.getFormattedValue(liItem.getAttribute('data-value')) === value) {
                item = liItem;
                break;
            }
        }
        return item;
    };
    ;
    DropDownList.prototype.initValue = function () {
        this.renderList();
        if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"]) {
            this.initRemoteRender = true;
        }
        else {
            this.updateValues();
        }
    };
    DropDownList.prototype.updateValues = function () {
        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_2__["Input"].setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
    };
    DropDownList.prototype.onBlur = function (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();
            this.isTabKey = false;
        }
        if (this.isRequested && !this.isPopupOpen && !this.isPreventBlur) {
            this.isActive = false;
            this.beforePopupOpen = false;
        }
    };
    DropDownList.prototype.focusOutAction = function () {
        this.isInteracted = false;
        this.focusOut();
        this.onFocusOut();
    };
    DropDownList.prototype.onFocusOut = function () {
        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');
    };
    DropDownList.prototype.onFocus = function (e) {
        if (!this.isInteracted) {
            this.isInteracted = true;
            var args = { isInteracted: e ? true : false, event: e };
            this.trigger('focus', args);
        }
        this.updateIconState();
    };
    DropDownList.prototype.resetValueHandler = function (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;
        }
    };
    DropDownList.prototype.wireEvent = function () {
        _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();
    };
    DropDownList.prototype.bindCommonEvent = function () {
        _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'
            });
        }
        this.bindClearEvent();
    };
    DropDownList.prototype.bindClearEvent = function () {
        if (this.showClearButton) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
        }
    };
    DropDownList.prototype.unBindCommonEvent = function () {
        _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);
        }
    };
    DropDownList.prototype.updateIconState = function () {
        if (this.showClearButton) {
            if (this.inputElement.value !== '') {
                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
     */
    DropDownList.prototype.wireListEvents = function () {
        _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);
    };
    ;
    DropDownList.prototype.onSearch = function (e) {
        if (e.charCode !== 32 && e.charCode !== 13) {
            if (this.list === undefined) {
                this.renderList();
            }
            this.searchKeyEvent = e;
            if (!this.isRequested && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list.querySelector('li')) && this.enabled) {
                this.incrementalSearch(e);
            }
        }
    };
    DropDownList.prototype.onMouseClick = function (e) {
        var target = e.target;
        var classList = target.classList;
        var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["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);
        }
    };
    DropDownList.prototype.onMouseOver = function (e) {
        var currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].li);
        this.setHover(currentLi);
    };
    ;
    DropDownList.prototype.setHover = function (li) {
        if (this.enabled && this.isValidLI(li) && !li.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].hover)) {
            this.removeHover();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].hover);
        }
    };
    ;
    DropDownList.prototype.onMouseLeave = function (e) {
        this.removeHover();
    };
    ;
    DropDownList.prototype.removeHover = function () {
        var hoveredItem = this.list.querySelectorAll('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].hover);
        if (hoveredItem && hoveredItem.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(hoveredItem, _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].hover);
        }
    };
    ;
    DropDownList.prototype.isValidLI = function (li) {
        return (li && li.hasAttribute('role') && li.getAttribute('role') === 'option');
    };
    ;
    DropDownList.prototype.incrementalSearch = function (e) {
        if (this.liCollections.length > 0) {
            var li = Object(_common_incremental_search__WEBPACK_IMPORTED_MODULE_3__["incrementalSearch"])(e.charCode, this.liCollections, this.activeIndex, true);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
                this.setSelection(li, e);
                this.setScrollPosition();
            }
        }
    };
    ;
    /**
     * Hides the spinner loader.
     * @returns void.
     */
    DropDownList.prototype.hideSpinner = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.spinnerElement)) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["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.
     */
    DropDownList.prototype.showSpinner = function () {
        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_1__["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_1__["showSpinner"])(this.spinnerElement);
        }
    };
    DropDownList.prototype.keyActionHandler = function (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 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 (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) {
                return;
            }
            if (isTabAction && 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':
                    var focusEle = this.list.querySelector('.' + dropDownListClasses.focus);
                    if (this.isSelectFocusItem(focusEle)) {
                        this.setSelection(focusEle, e);
                    }
                    else {
                        var nextItem = void 0;
                        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];
                        this.setSelection(nextItem, e);
                    }
                    e.preventDefault();
                    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':
                    if (this.getModuleName() === 'dropdownlist') {
                        e.preventDefault();
                        if (this.activeIndex === 0) {
                            return;
                        }
                        this.setSelection(this.liCollections[0], e);
                    }
                    break;
                case 'end':
                    if (this.getModuleName() === 'dropdownlist') {
                        e.preventDefault();
                        var lastLi = this.getItems().length - 1;
                        if (this.activeIndex === lastLi) {
                            return;
                        }
                        this.setSelection(this.liCollections[lastLi], 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();
                    this.focusDropDown(e);
                    break;
                case 'enter':
                    this.selectCurrentItem(e);
                    break;
                case 'escape':
                case 'tab':
                case 'close':
                    if (this.isPopupOpen) {
                        this.hidePopup();
                        this.focusDropDown(e);
                    }
                    break;
            }
        }
    };
    DropDownList.prototype.selectCurrentItem = function (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();
        }
    };
    DropDownList.prototype.isSelectFocusItem = function (element) {
        return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element);
    };
    DropDownList.prototype.getPageCount = function () {
        var liHeight = this.list.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].noData) ? null :
            getComputedStyle(this.getItems()[0], null).getPropertyValue('height');
        return Math.round(this.list.getBoundingClientRect().height / parseInt(liHeight, 10));
    };
    DropDownList.prototype.pageUpSelection = function (steps, event) {
        var previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];
        this.setSelection(previousItem, event);
    };
    ;
    DropDownList.prototype.pageDownSelection = function (steps, event) {
        var list = this.getItems();
        var previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
        this.setSelection(previousItem, event);
    };
    ;
    DropDownList.prototype.unWireEvent = function () {
        _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.
     */
    DropDownList.prototype.unWireListEvents = function () {
        _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);
    };
    ;
    DropDownList.prototype.onDocumentClick = function (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.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();
                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();
        }
    };
    DropDownList.prototype.activeStateChange = function () {
        if (this.isDocumentClick) {
            this.hidePopup();
            this.onFocusOut();
            this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);
        }
    };
    DropDownList.prototype.focusDropDown = function (e) {
        if (!this.initial && this.isFilterLayout()) {
            this.focusIn(e);
        }
    };
    DropDownList.prototype.dropDownClick = function (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_1 = this;
            if (!this.isSecondClick) {
                setTimeout(function () { proxy_1.cloneElements(); proxy_1.isSecondClick = true; }, 100);
            }
        }
        else {
            this.focusIn(e);
        }
    };
    DropDownList.prototype.cloneElements = function () {
        if (this.list) {
            var ulElement = this.list.querySelector('ul');
            if (ulElement) {
                ulElement = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
                this.actionCompleteData.ulElement = ulElement;
            }
        }
    };
    DropDownList.prototype.updateSelectedItem = function (li, e, preventSelect, isSelection) {
        var _this = this;
        this.removeSelection();
        li.classList.add(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["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(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].selected);
                }
                else {
                    _this.selectEventCallback(li, e, preventSelect, selectedData, value);
                    if (isSelection) {
                        _this.setSelectOptions(li, e);
                    }
                }
            });
        }
        else {
            this.selectEventCallback(li, e, preventSelect, selectedData, value);
            if (isSelection) {
                this.setSelectOptions(li, e);
            }
        }
    };
    DropDownList.prototype.selectEventCallback = function (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('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].focus);
        if (focusedItem) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([focusedItem], _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].focus);
        }
        li.setAttribute('aria-selected', 'true');
        this.activeIndex = this.getIndexByValue(value);
    };
    DropDownList.prototype.activeItem = function (li) {
        if (this.isValidLI(li) && !li.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].selected)) {
            this.removeSelection();
            li.classList.add(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].selected);
            this.removeHover();
            li.setAttribute('aria-selected', 'true');
        }
    };
    DropDownList.prototype.setValue = function (e) {
        var dataItem = this.getItemData();
        if (dataItem.value === null) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(null, this.inputElement, this.floatLabelType, this.showClearButton);
        }
        else {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(dataItem.text, this.inputElement, this.floatLabelType, this.showClearButton);
        }
        if (this.valueTemplate && this.itemData !== null) {
            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;
        }
    };
    DropDownList.prototype.setSelection = function (li, e) {
        if (this.isValidLI(li) && !li.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].selected)) {
            this.updateSelectedItem(li, e, false, true);
        }
        else {
            this.setSelectOptions(li, e);
        }
    };
    DropDownList.prototype.setSelectOptions = function (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()) {
                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);
        }
    };
    DropDownList.prototype.setValueTemplate = function () {
        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 = '';
        compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.valueTemplate);
        for (var _i = 0, _a = compiledString(this.itemData, null, null, this.valueTemplateId, this.isStringTemplate); _i < _a.length; _i++) {
            var item = _a[_i];
            this.valueTempElement.appendChild(item);
        }
        this.DropDownBaseupdateBlazorTemplates(false, false, false, false, true, true, true);
    };
    DropDownList.prototype.removeSelection = function () {
        var selectedItems = this.list.querySelectorAll('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].selected);
        if (selectedItems.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(selectedItems, _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].selected);
            selectedItems[0].removeAttribute('aria-selected');
        }
    };
    ;
    DropDownList.prototype.getItemData = function () {
        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.
     */
    DropDownList.prototype.onChangeEvent = function (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);
    };
    ;
    DropDownList.prototype.detachChanges = function (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;
    };
    DropDownList.prototype.detachChangeEvent = function (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 = void 0;
            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);
        }
    };
    DropDownList.prototype.setHiddenValue = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.hiddenElement.innerHTML = '<option selected>' + this.text + '</option>';
            var selectedElement = this.hiddenElement.querySelector('option');
            selectedElement.setAttribute('value', this.value.toString());
        }
        else {
            this.hiddenElement.innerHTML = '';
        }
    };
    /**
     * Filter bar implementation
     */
    DropDownList.prototype.onFilterUp = function (e) {
        if (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.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;
        }
    };
    DropDownList.prototype.onFilterDown = function (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) {
                    e.preventDefault();
                }
                break;
            default:
                this.prevSelectPoints = this.getSelectionPoints();
                this.queryString = this.filterInput.value;
                break;
        }
    };
    DropDownList.prototype.removeFillSelection = function () {
        if (this.isInteracted) {
            var selection = this.getSelectionPoints();
            this.inputElement.setSelectionRange(selection.end, selection.end);
        }
    };
    DropDownList.prototype.getSelectionPoints = function () {
        var input = this.inputElement;
        return { start: Math.abs(input.selectionStart), end: Math.abs(input.selectionEnd) };
    };
    DropDownList.prototype.searchLists = function (e) {
        var _this = 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()) {
            var eventArgs_1 = {
                preventDefaultAction: false,
                text: this.filterInput.value,
                updateData: function (dataSource, query, fields) {
                    if (eventArgs_1.cancel) {
                        return;
                    }
                    _this.isCustomFilter = true;
                    _this.filteringAction(dataSource, query, fields);
                },
                baseEventArgs: e,
                cancel: false
            };
            this.trigger('filtering', eventArgs_1, function (eventArgs) {
                if (!eventArgs.cancel && !_this.isCustomFilter && !eventArgs.preventDefaultAction) {
                    var filterQuery = _this.query ? _this.query.clone() : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["Query"]();
                    var dataType = _this.typeOfData(_this.dataSource).typeof;
                    if (!(_this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"]) && dataType === 'string' || dataType === 'number') {
                        filterQuery.where('', 'startswith', _this.filterInput.value, true, _this.ignoreAccent);
                    }
                    else {
                        var fields = _this.fields;
                        filterQuery.where(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields.text) ? fields.text : '', 'startswith', _this.filterInput.value, true, _this.ignoreAccent);
                    }
                    _this.filteringAction(_this.dataSource, filterQuery, _this.fields);
                }
            });
        }
    };
    DropDownList.prototype.filteringAction = function (dataSource, query, fields) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.filterInput)) {
            this.beforePopupOpen = true;
            if (this.filterInput.value.trim() !== '') {
                this.filterVal = 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;
                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.listData.length > 0) {
                        dataSource = this.listData;
                    }
                }
                query = (this.filterInput.value.trim() === '') ? null : query;
                this.resetList(dataSource, fields, query);
            }
        }
    };
    DropDownList.prototype.setSearchBox = function (popupElement) {
        if (this.isFiltering()) {
            var parentElement = this.createElement('span', {
                className: dropDownListClasses.filterParent
            });
            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_2__["Input"].createInput({
                element: this.filterInput,
                buttons: backIcon ?
                    [dropDownListClasses.backIcon, dropDownListClasses.filterBarClearIcon] : [dropDownListClasses.filterBarClearIcon],
                properties: { placeholder: this.filterBarPlaceholder }
            }, this.createElement);
            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'
                });
            }
            _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);
            return this.filterInputObj;
        }
        else {
            return inputObject;
        }
    };
    ;
    DropDownList.prototype.onInput = function () {
        this.isValidKey = true;
    };
    DropDownList.prototype.onActionFailure = function (e) {
        _super.prototype.onActionFailure.call(this, e);
        if (this.beforePopupOpen) {
            this.renderPopup();
        }
    };
    DropDownList.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
        var _this = this;
        if (this.isNotSearchList) {
            this.isNotSearchList = false;
            return;
        }
        if (this.isActive) {
            var selectedItem = this.selectedLI ? this.selectedLI.cloneNode(true) : null;
            _super.prototype.onActionComplete.call(this, ulElement, list, e);
            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_5__["DataManager"]) {
                    var checkField_1 = 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_1] === _this.value; });
                    if (!checkVal) {
                        this.dataSource.executeQuery(this.getQuery(this.query).where(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["Predicate"](checkField_1, 'equal', this.value)))
                            .then(function (e) {
                            if (e.result.length > 0) {
                                _this.addItem(e.result, list.length);
                                _this.updateValues();
                            }
                        });
                    }
                }
            }
            if (this.getModuleName() !== 'autocomplete' && this.isFiltering() && !this.isTyped) {
                if (!this.actionCompleteData.isUpdated || ((!this.isCustomFilter
                    && !this.isFilterFocus)
                    && ((this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["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();
            }
        }
    };
    DropDownList.prototype.addNewItem = function (listData, newElement) {
        var _this = 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_1 = this.getItemData().value;
            var isExist = listData.some(function (data) {
                return (((typeof data === 'string' || typeof data === 'number') && data === value_1) ||
                    (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(_this.fields.value, data) === value_1));
            });
            if (!isExist) {
                this.addItem(this.itemData);
            }
        }
    };
    DropDownList.prototype.updateActionCompleteData = function (li, item) {
        if (this.getModuleName() !== 'autocomplete' && this.actionCompleteData.ulElement) {
            this.actionCompleteData.ulElement.appendChild(li.cloneNode(true));
            if (this.isFiltering() && this.actionCompleteData.list.indexOf(item) > 0) {
                this.actionCompleteData.list.push(item);
            }
        }
    };
    DropDownList.prototype.focusIndexItem = function () {
        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();
    };
    DropDownList.prototype.updateSelection = function () {
        var selectedItem = this.list.querySelector('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].selected);
        if (selectedItem) {
            this.setProperties({ 'index': this.getIndexByValue(selectedItem.getAttribute('data-value')) });
            this.activeIndex = this.index;
        }
        else {
            this.removeFocus();
            this.list.querySelector('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].li).classList.add(dropDownListClasses.focus);
        }
    };
    DropDownList.prototype.removeFocus = function () {
        var highlightedItem = this.list.querySelectorAll('.' + dropDownListClasses.focus);
        if (highlightedItem && highlightedItem.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(highlightedItem, dropDownListClasses.focus);
        }
    };
    ;
    DropDownList.prototype.renderPopup = function () {
        var _this = 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 = _this.createElement('div', {
                    id: _this.element.id + '_popup', className: 'e-ddl e-popup ' + (_this.cssClass != null ? _this.cssClass : '')
                });
                var searchBox = _this.setSearchBox(popupEle);
                _this.listHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this.popupHeight);
                if (_this.headerTemplate) {
                    _this.setHeaderTemplate(popupEle);
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([_this.list], popupEle);
                if (_this.footerTemplate) {
                    _this.setFooterTemplate(popupEle);
                }
                document.body.appendChild(popupEle);
                popupEle.style.visibility = 'hidden';
                if (_this.popupHeight !== 'auto') {
                    _this.searchBoxHeight = 0;
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(searchBox.container)) {
                        _this.searchBoxHeight = (searchBox.container.parentElement).getBoundingClientRect().height;
                        _this.listHeight = (parseInt(_this.listHeight, 10) - (_this.searchBoxHeight)).toString() + 'px';
                    }
                    if (_this.headerTemplate) {
                        var height = Math.round(_this.header.getBoundingClientRect().height);
                        _this.listHeight = (parseInt(_this.listHeight, 10) - (height + _this.searchBoxHeight)).toString() + 'px';
                    }
                    if (_this.footerTemplate) {
                        var height = Math.round(_this.footer.getBoundingClientRect().height);
                        _this.listHeight = (parseInt(_this.listHeight, 10) - (height + _this.searchBoxHeight)).toString() + 'px';
                    }
                    _this.list.style.maxHeight = (parseInt(_this.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property
                    popupEle.style.maxHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this.popupHeight);
                }
                else {
                    popupEle.style.height = 'auto';
                }
                var offsetValue = 0;
                var left = void 0;
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.selectedLI) && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.activeIndex) && _this.activeIndex >= 0)) {
                    _this.setScrollPosition();
                }
                else {
                    _this.list.scrollTop = 0;
                }
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && (!_this.allowFiltering && (_this.getModuleName() === 'dropdownlist' ||
                    (_this.isDropDownClick && _this.getModuleName() === 'combobox')))) {
                    offsetValue = _this.getOffsetValue(popupEle);
                    var firstItem = _this.isEmptyList() ? _this.list : _this.liCollections[0];
                    left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -
                        parseInt(getComputedStyle(_this.inputElement).paddingLeft, 10) +
                        parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
                }
                _this.getFocusElement();
                _this.createPopup(popupEle, offsetValue, left);
                _this.checkCollision(popupEle);
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                    _this.popupObj.element.classList.add(dropDownListClasses.device);
                    if (_this.getModuleName() === 'dropdownlist' || (_this.getModuleName() === 'combobox'
                        && !_this.allowFiltering && _this.isDropDownClick)) {
                        _this.popupObj.collision = { X: 'fit', Y: 'fit' };
                    }
                    if (_this.isFilterLayout()) {
                        _this.popupObj.element.classList.add(dropDownListClasses.mobileFilter);
                        _this.popupObj.position = { X: 0, Y: 0 };
                        _this.popupObj.dataBind();
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this.popupObj.element, { style: 'left:0px;right:0px;top:0px;bottom:0px;' });
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([document.body, _this.popupObj.element], dropDownListClasses.popupFullScreen);
                        _this.setSearchBoxPosition();
                        _this.backIconElement = searchBox.container.querySelector('.e-back-icon');
                        _this.clearIconElement = searchBox.container.querySelector('.' + dropDownListClasses.clearIcon);
                        _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);
                    }
                }
                popupEle.style.visibility = 'visible';
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([popupEle], 'e-popup-close');
                var scrollParentElements = _this.popupObj.getScrollableParent(_this.inputWrapper.container);
                for (var _i = 0, scrollParentElements_1 = scrollParentElements; _i < scrollParentElements_1.length; _i++) {
                    var element = scrollParentElements_1[_i];
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, 'scroll', _this.scrollHandler, _this);
                }
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _this.isFilterLayout()) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(_this.list, 'scroll', _this.listScroll, _this);
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this.targetElement(), { 'aria-expanded': 'true' });
                var inputParent = _this.isFiltering() ? _this.filterInput.parentElement : _this.inputWrapper.container;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([inputParent], [dropDownListClasses.inputFocus]);
                var animModel = { name: 'FadeIn', duration: 100 };
                _this.beforePopupOpen = true;
                var eventArgs = { popup: _this.popupObj, cancel: false, animation: animModel };
                _this.trigger('open', eventArgs, function (eventArgs) {
                    if (!eventArgs.cancel) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.inputWrapper.container], [dropDownListClasses.iconAnimation]);
                        _this.popupObj.show(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
                    }
                });
            }
        });
    };
    DropDownList.prototype.checkCollision = function (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_1__["isCollide"])(popupEle);
            if (collision.length > 0) {
                popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
            }
        }
    };
    DropDownList.prototype.getOffsetValue = function (popupEle) {
        var popupStyles = getComputedStyle(popupEle);
        var borderTop = parseInt(popupStyles.borderTop, 10);
        var borderBottom = parseInt(popupStyles.borderBottom, 10);
        return this.setPopupPosition(borderTop + borderBottom);
    };
    DropDownList.prototype.createPopup = function (element, offsetValue, left) {
        var _this = this;
        this.popupObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["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 () {
                if (!_this.isDocumentClick) {
                    _this.focusDropDown();
                }
                _this.isNotSearchList = false;
                _this.isDocumentClick = false;
                _this.destroyPopup();
            },
            open: function () {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown', _this.onDocumentClick, _this);
                _this.isPopupOpen = true;
                if (_this.isFilterLayout()) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.inputWrapper.container], [dropDownListClasses.inputFocus]);
                    _this.isFilterFocus = true;
                    _this.filterInput.focus();
                    if (_this.inputWrapper.clearButton) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
                    }
                }
                _this.activeStateChange();
            }
        });
    };
    DropDownList.prototype.isEmptyList = function () {
        return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.liCollections) && this.liCollections.length === 0;
    };
    DropDownList.prototype.getFocusElement = function () {
        // combo-box used this method
    };
    DropDownList.prototype.isFilterLayout = function () {
        return this.getModuleName() === 'dropdownlist' && this.allowFiltering;
    };
    DropDownList.prototype.scrollHandler = function () {
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && ((this.getModuleName() === 'dropdownlist' &&
            !this.isFilterLayout()) || (this.getModuleName() === 'combobox' && !this.allowFiltering && this.isDropDownClick))) {
            this.hidePopup();
        }
    };
    DropDownList.prototype.setSearchBoxPosition = function () {
        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);
    };
    DropDownList.prototype.setPopupPosition = function (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;
    };
    DropDownList.prototype.setWidth = function () {
        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;
    };
    DropDownList.prototype.scrollBottom = function (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;
            }
        }
    };
    DropDownList.prototype.scrollTop = function () {
        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);
            }
        }
    };
    DropDownList.prototype.isEditTextBox = function () {
        return false;
    };
    DropDownList.prototype.isFiltering = function () {
        return this.allowFiltering;
    };
    DropDownList.prototype.isPopupButton = function () {
        return true;
    };
    DropDownList.prototype.setScrollPosition = function (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);
        }
    };
    DropDownList.prototype.clearText = function () {
        this.filterInput.value = '';
        this.searchLists(null);
    };
    DropDownList.prototype.listScroll = function () {
        this.filterInput.blur();
    };
    DropDownList.prototype.closePopup = function (delay) {
        var _this = this;
        this.isTyped = false;
        if (!(this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen)) {
            return;
        }
        var isResetItem = (this.getModuleName() === 'autocomplete') ? true : false;
        this.DropDownBaseresetBlazorTemplates(isResetItem, isResetItem, true, true, false, true, true);
        _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);
        for (var _i = 0, scrollableParentElements_1 = scrollableParentElements; _i < scrollableParentElements_1.length; _i++) {
            var element = scrollableParentElements_1[_i];
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(element, 'scroll', this.scrollHandler);
        }
        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);
            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 eventArgs = { popup: this.popupObj, cancel: false, animation: animModel };
        this.trigger('close', eventArgs, function (eventArgs) {
            if (!eventArgs.cancel) {
                if (_this.getModuleName() === 'autocomplete') {
                    _this.rippleFun();
                }
                if (_this.isPopupOpen) {
                    _this.popupObj.hide(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](eventArgs.animation));
                }
                else {
                    _this.destroyPopup();
                }
            }
        });
    };
    DropDownList.prototype.destroyPopup = function () {
        this.isPopupOpen = false;
        this.isFilterFocus = false;
        this.popupObj.destroy();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.popupObj.element);
    };
    DropDownList.prototype.clickOnBackIcon = function () {
        this.hidePopup();
        this.focusIn();
    };
    /**
     * To Initialize the control rendering
     * @private
     */
    DropDownList.prototype.render = function () {
        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);
        }
        this.inputWrapper = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["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: this.cssClass,
                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);
        }
    };
    ;
    DropDownList.prototype.setFooterTemplate = function (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);
        }
        compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.footerTemplate);
        for (var _i = 0, _a = compiledString({}, null, null, this.footerTemplateId, this.isStringTemplate); _i < _a.length; _i++) {
            var item = _a[_i];
            this.footer.appendChild(item);
        }
        this.DropDownBaseupdateBlazorTemplates(false, false, false, false, false, false, true);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.footer], popupEle);
    };
    DropDownList.prototype.setHeaderTemplate = function (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);
        }
        compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.headerTemplate);
        for (var _i = 0, _a = compiledString({}, null, null, this.headerTemplateId, this.isStringTemplate); _i < _a.length; _i++) {
            var item = _a[_i];
            this.header.appendChild(item);
        }
        this.DropDownBaseupdateBlazorTemplates(false, false, false, false, false, true, false);
        var contentEle = popupEle.querySelector('div.e-content');
        popupEle.insertBefore(this.header, contentEle);
    };
    DropDownList.prototype.setOldText = function (text) {
        this.text = text;
    };
    DropDownList.prototype.setOldValue = function (value) {
        this.value = value;
    };
    DropDownList.prototype.refreshPopup = function () {
        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);
        }
    };
    DropDownList.prototype.checkDatasource = function (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 };
        }
    };
    DropDownList.prototype.updateDataSource = function (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_5__["DataManager"]) && props.dataSource.length === 0)))) {
            this.clear(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_5__["DataManager"]) && props.dataSource.length === 0)))) {
            this.resetList(this.dataSource);
        }
        if (!this.isCustomFilter && !this.isFilterFocus && document.activeElement !== this.filterInput) {
            this.checkCustomValue();
        }
    };
    DropDownList.prototype.checkCustomValue = function () {
        this.itemData = this.getDataByValue(this.value);
        var dataItem = this.getItemData();
        this.setProperties({ 'value': dataItem.value, 'text': dataItem.text });
    };
    DropDownList.prototype.updateInputFields = function () {
        if (this.getModuleName() === 'dropdownlist') {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
        }
    };
    /**
     * Dynamically change the value of properties.
     * @private
     */
    DropDownList.prototype.onPropertyChanged = function (newProp, oldProp) {
        if (this.getModuleName() === 'dropdownlist') {
            this.checkDatasource(newProp);
            this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
        }
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'query':
                case 'dataSource':
                    break;
                case 'htmlAttributes':
                    this.setHTMLAttributes();
                    break;
                case 'width':
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.inputWrapper.container, { 'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.width) });
                    break;
                case 'placeholder':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setPlaceholder(newProp.placeholder, this.inputElement);
                    break;
                case 'filterBarPlaceholder':
                    if (this.filterInput) {
                        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setPlaceholder(newProp.filterBarPlaceholder, this.filterInput);
                    }
                    break;
                case 'readonly':
                    if (this.getModuleName() !== 'dropdownlist') {
                        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setReadonly(newProp.readonly, this.inputElement);
                    }
                    break;
                case 'cssClass':
                    this.setCssClass(newProp, oldProp);
                    break;
                case 'enableRtl':
                    this.setEnableRtl();
                    break;
                case 'enabled':
                    this.setEnable();
                    break;
                case 'text':
                    if (newProp.text === null) {
                        this.clear();
                        break;
                    }
                    if (!this.list) {
                        if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"]) {
                            this.initRemoteRender = true;
                        }
                        this.renderList();
                    }
                    if (!this.initRemoteRender) {
                        var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');
                        var li = this.getElementByText(newProp.text);
                        if (formElement && this.filterVal) {
                            li.classList.remove('e-active');
                        }
                        if (!this.checkValidLi(li)) {
                            if (this.liCollections.length === 100 &&
                                this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
                                this.setSelectionData(newProp.text, oldProp.text, 'text');
                            }
                            else {
                                this.setOldText(oldProp.text);
                            }
                        }
                        this.updateInputFields();
                    }
                    break;
                case 'value':
                    if (newProp.value === null) {
                        this.clear();
                        break;
                    }
                    this.notify('beforeValueChange', { newProp: newProp }); // gird component value type change
                    if (!this.list) {
                        if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"]) {
                            this.initRemoteRender = true;
                        }
                        this.renderList();
                    }
                    if (!this.initRemoteRender) {
                        var item = this.getElementByValue(newProp.value);
                        if (!this.checkValidLi(item)) {
                            if (this.liCollections.length === 100 &&
                                this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
                                this.setSelectionData(newProp.value, oldProp.value, 'value');
                            }
                            else {
                                this.setOldValue(oldProp.value);
                            }
                        }
                        this.updateInputFields();
                    }
                    break;
                case 'index':
                    if (newProp.index === null) {
                        this.clear();
                        break;
                    }
                    if (!this.list) {
                        if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"]) {
                            this.initRemoteRender = true;
                        }
                        this.renderList();
                    }
                    if (!this.initRemoteRender) {
                        var element = this.liCollections[newProp.index];
                        if (!this.checkValidLi(element)) {
                            if (this.liCollections.length === 100 &&
                                this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
                                this.setSelectionData(newProp.index, oldProp.index, 'index');
                            }
                            else {
                                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 };
                    }
                    break;
                case 'floatLabelType':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].removeFloating(this.inputWrapper);
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].addFloating(this.inputElement, newProp.floatLabelType, this.placeholder, this.createElement);
                    break;
                case 'showClearButton':
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["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);
                    _super.prototype.onPropertyChanged.call(this, ddlProps.newProperty, ddlProps.oldProperty);
                    break;
            }
        }
    };
    DropDownList.prototype.checkValidLi = function (element) {
        if (this.isValidLI(element)) {
            this.setSelection(element, null);
            return true;
        }
        return false;
    };
    DropDownList.prototype.setSelectionData = function (newProp, oldProp, prop) {
        var _this = this;
        var li;
        this.updateListValues = function () {
            if (prop === 'text') {
                li = _this.getElementByText(newProp);
                if (!_this.checkValidLi(li)) {
                    _this.setOldText(oldProp);
                }
            }
            else if (prop === 'value') {
                li = _this.getElementByValue(newProp);
                if (!_this.checkValidLi(li)) {
                    _this.setOldValue(oldProp);
                }
            }
            else if (prop === 'index') {
                li = _this.liCollections[newProp];
                if (!_this.checkValidLi(li)) {
                    _this.index = oldProp;
                }
            }
        };
    };
    DropDownList.prototype.setCssClass = function (newProp, oldProp) {
        this.inputWrapper.container.classList.remove(oldProp.cssClass);
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].setCssClass(newProp.cssClass, [this.inputWrapper.container]);
        if (this.popupObj) {
            this.popupObj.element.classList.remove(oldProp.cssClass);
            this.popupObj.element.classList.add(newProp.cssClass);
        }
    };
    /**
     * Return the module name.
     * @private
     */
    DropDownList.prototype.getModuleName = function () {
        return 'dropdownlist';
    };
    /**
     * Opens the popup that displays the list of items.
     * @returns void.
     */
    DropDownList.prototype.showPopup = function () {
        this.filterVal = false;
        if (!this.enabled) {
            return;
        }
        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(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].noData)) {
            this.renderList();
        }
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.isFilterLayout()) {
            var proxy_2 = this;
            window.onpopstate = function () {
                proxy_2.hidePopup();
            };
            history.pushState({}, '');
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list.children[0]) || this.list.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["dropDownBaseClasses"].noData)) {
            this.renderPopup();
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.targetElement(), { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
    };
    /**
     * Hides the popup if it is in an open state.
     * @returns void.
     */
    DropDownList.prototype.hidePopup = function () {
        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_2__["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)) {
                this.selectedLI = this.liCollections[this.index];
                this.updateSelectedItem(this.selectedLI, null, true);
                if (this.valueTemplate && this.itemData !== null) {
                    this.setValueTemplate();
                }
            }
            else {
                this.resetSelection();
            }
        }
        this.closePopup();
        var dataItem = this.getItemData();
        if (this.inputElement.value.trim() === '' && !this.isInteracted && (this.isSelectCustom ||
            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedLI) && this.inputElement.value !== dataItem.text)) {
            this.isSelectCustom = false;
            this.clear();
        }
    };
    /**
     * Sets the focus on the component for interaction.
     * @returns void.
     */
    DropDownList.prototype.focusIn = function (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.
     */
    DropDownList.prototype.focusOut = function () {
        if (!this.enabled) {
            return;
        }
        this.isTyped = true;
        this.hidePopup();
        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}.
     */
    DropDownList.prototype.destroy = function () {
        var _this = this;
        this.isActive = false;
        this.hidePopup();
        this.unWireEvent();
        if (this.list) {
            this.unWireListEvents();
        }
        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'];
        attrArray.forEach(function (value) {
            _this.inputElement.removeAttribute(value);
        });
        this.inputElement.setAttribute('tabindex', this.tabIndex);
        this.inputElement.classList.remove('e-input');
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["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);
        }
        _super.prototype.destroy.call(this);
    };
    ;
    /**
     * Gets all the list items bound on this component.
     * @returns Element[].
     */
    DropDownList.prototype.getItems = function () {
        if (!this.list) {
            if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"]) {
                this.initRemoteRender = true;
            }
            this.renderList();
        }
        return this.ulElement ? _super.prototype.getItems.call(this) : [];
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')
    ], DropDownList.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('300px')
    ], DropDownList.prototype, "popupHeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')
    ], DropDownList.prototype, "popupWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "placeholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "filterBarPlaceholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], DropDownList.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "valueTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "headerTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "footerTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DropDownList.prototype, "allowFiltering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DropDownList.prototype, "readonly", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], DropDownList.prototype, "index", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')
    ], DropDownList.prototype, "floatLabelType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DropDownList.prototype, "showClearButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownList.prototype, "filtering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownList.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownList.prototype, "beforeOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownList.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownList.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownList.prototype, "blur", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownList.prototype, "focus", void 0);
    DropDownList = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], DropDownList);
    return DropDownList;
}(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_4__["DropDownBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/index.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/index.js ***!
  \****************************************************************************/
/*! exports provided: dropDownListClasses, DropDownList */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _drop_down_list__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drop-down-list */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/drop-down-list.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropDownListClasses", function() { return _drop_down_list__WEBPACK_IMPORTED_MODULE_0__["dropDownListClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownList", function() { return _drop_down_list__WEBPACK_IMPORTED_MODULE_0__["DropDownList"]; });

/**
 * export all modules from current location
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/index.js":
/*!*************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/index.js ***!
  \*************************************************************/
/*! exports provided: incrementalSearch, Search, highlightSearch, revertHighlightSearch, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, SelectionSettings, ToolbarSettings, ListBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/index */ "./node_modules/@syncfusion/ej2-dropdowns/src/common/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "incrementalSearch", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["incrementalSearch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Search", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["Search"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "highlightSearch", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["highlightSearch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "revertHighlightSearch", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["revertHighlightSearch"]; });

/* harmony import */ var _drop_down_base_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./drop-down-base/index */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldSettings", function() { return _drop_down_base_index__WEBPACK_IMPORTED_MODULE_1__["FieldSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropDownBaseClasses", function() { return _drop_down_base_index__WEBPACK_IMPORTED_MODULE_1__["dropDownBaseClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownBase", function() { return _drop_down_base_index__WEBPACK_IMPORTED_MODULE_1__["DropDownBase"]; });

/* harmony import */ var _drop_down_list_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./drop-down-list/index */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropDownListClasses", function() { return _drop_down_list_index__WEBPACK_IMPORTED_MODULE_2__["dropDownListClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownList", function() { return _drop_down_list_index__WEBPACK_IMPORTED_MODULE_2__["DropDownList"]; });

/* harmony import */ var _combo_box_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./combo-box/index */ "./node_modules/@syncfusion/ej2-dropdowns/src/combo-box/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComboBox", function() { return _combo_box_index__WEBPACK_IMPORTED_MODULE_3__["ComboBox"]; });

/* harmony import */ var _auto_complete_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./auto-complete/index */ "./node_modules/@syncfusion/ej2-dropdowns/src/auto-complete/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoComplete", function() { return _auto_complete_index__WEBPACK_IMPORTED_MODULE_4__["AutoComplete"]; });

/* harmony import */ var _multi_select_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./multi-select/index */ "./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelect", function() { return _multi_select_index__WEBPACK_IMPORTED_MODULE_5__["MultiSelect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckBoxSelection", function() { return _multi_select_index__WEBPACK_IMPORTED_MODULE_5__["CheckBoxSelection"]; });

/* harmony import */ var _list_box_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./list-box/index */ "./node_modules/@syncfusion/ej2-dropdowns/src/list-box/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionSettings", function() { return _list_box_index__WEBPACK_IMPORTED_MODULE_6__["SelectionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolbarSettings", function() { return _list_box_index__WEBPACK_IMPORTED_MODULE_6__["ToolbarSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListBox", function() { return _list_box_index__WEBPACK_IMPORTED_MODULE_6__["ListBox"]; });

/**
 * export all modules from current location
 */









/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/list-box/index.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/list-box/index.js ***!
  \**********************************************************************/
/*! exports provided: SelectionSettings, ToolbarSettings, ListBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _list_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list-box */ "./node_modules/@syncfusion/ej2-dropdowns/src/list-box/list-box.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionSettings", function() { return _list_box__WEBPACK_IMPORTED_MODULE_0__["SelectionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolbarSettings", function() { return _list_box__WEBPACK_IMPORTED_MODULE_0__["ToolbarSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListBox", function() { return _list_box__WEBPACK_IMPORTED_MODULE_0__["ListBox"]; });

/**
 * export all modules from current location
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/list-box/list-box.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/list-box/list-box.js ***!
  \*************************************************************************/
/*! exports provided: SelectionSettings, ToolbarSettings, ListBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../drop-down-base/drop-down-base */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-lists */ "./node_modules/@syncfusion/ej2-lists/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>







var ITEMTEMPLATE_PROPERTY = 'ItemTemplate';
var SelectionSettings = /** @class */ (function (_super) {
    __extends(SelectionSettings, _super);
    function SelectionSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('Multiple')
    ], SelectionSettings.prototype, "mode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(false)
    ], SelectionSettings.prototype, "showCheckbox", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(false)
    ], SelectionSettings.prototype, "showSelectAll", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('Left')
    ], SelectionSettings.prototype, "checkboxPosition", void 0);
    return SelectionSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["ChildProperty"]));

var ToolbarSettings = /** @class */ (function (_super) {
    __extends(ToolbarSettings, _super);
    function ToolbarSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])([])
    ], ToolbarSettings.prototype, "items", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('Right')
    ], ToolbarSettings.prototype, "position", void 0);
    return ToolbarSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["ChildProperty"]));

/**
 * 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 = /** @class */ (function (_super) {
    __extends(ListBox, _super);
    /**
     * Constructor for creating the ListBox component.
     */
    function ListBox(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.isValidKey = false;
        _this.keyDownStatus = false;
        return _this;
    }
    ;
    /**
     * Build and render the component
     * @private
     */
    ListBox.prototype.render = function () {
        this.initLoad = true;
        this.initialSelectedOptions = this.value;
        _super.prototype.render.call(this);
    };
    ListBox.prototype.initWrapper = function () {
        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-listbox-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';
        }
        if (this.itemTemplate) {
            var listBoxProxy_1 = this;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["resetBlazorTemplate"])(this.element.id + ITEMTEMPLATE_PROPERTY, ITEMTEMPLATE_PROPERTY);
            this.isStringTemplate = true;
            setTimeout(function () {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["updateBlazorTemplate"])(listBoxProxy_1.element.id + ITEMTEMPLATE_PROPERTY, ITEMTEMPLATE_PROPERTY, listBoxProxy_1);
            }, 500);
        }
        this.list.insertBefore(hiddenSelect, this.list.firstChild);
        if (this.list.getElementsByClassName(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li)[0]) {
            this.list.getElementsByClassName(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li)[0].classList.remove(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["removeClass"])([this.list], [_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].content, _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].root]);
        this.validationAttribute(this.element, hiddenSelect);
        this.list.setAttribute('role', 'listbox');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["attributes"])(this.list, { 'role': 'listbox', 'aria-multiselectable': this.selectionSettings.mode === 'Multiple' ? 'true' : 'false' });
        if (this.selectionSettings.showCheckbox && this.selectionSettings.showSelectAll && this.liCollections.length) {
            this.showSelectAll = true;
            this.selectAllText = 'Select All';
            this.unSelectAllText = 'Unselect All';
            this.popupWrapper = this.list;
            this.checkBoxSelectionModule.checkAllParent = null;
            this.notify('selectAll', {});
        }
    };
    ListBox.prototype.initDraggable = function () {
        var _this = this;
        if (this.allowDragAndDrop) {
            new _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["Sortable"](this.ulElement, {
                scope: this.scope,
                itemClass: _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li,
                dragStart: this.triggerDragStart.bind(this),
                drag: this.triggerDrag.bind(this),
                drop: this.dragEnd.bind(this),
                placeHolder: function () { return _this.createElement('span', { className: 'e-placeholder' }); },
                helper: function (e) {
                    var ele = e.sender.cloneNode(true);
                    ele.style.width = _this.getItems()[0].offsetWidth + 'px';
                    if (_this.value.length > 1 && _this.isSelected(ele)) {
                        ele.appendChild(_this.createElement('span', {
                            className: 'e-list-badge', innerHTML: _this.value.length + ''
                        }));
                    }
                    return ele;
                }
            });
        }
    };
    ListBox.prototype.initToolbar = function () {
        var scope;
        var pos = this.toolbarSettings.position;
        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_1__["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 (scope) {
            this.tBListBox = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["getComponent"])(document.getElementById(scope), this.getModuleName());
            this.tBListBox.updateToolBarState();
        }
    };
    ListBox.prototype.createButtons = function (toolElem) {
        var _this = this;
        var btn;
        var ele;
        var title;
        var l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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 = _this.createElement('button', {
                attrs: {
                    'type': 'button',
                    'data-value': value,
                    'title': title,
                    'aria-label': title
                }
            });
            toolElem.appendChild(ele);
            btn = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["Button"]({ iconCss: 'e-icons e-' + value.toLowerCase() }, ele);
            btn.createElement = _this.createElement;
        });
    };
    ListBox.prototype.validationAttribute = function (input, hiddenSelect) {
        _super.prototype.validationAttribute.call(this, input, hiddenSelect);
        hiddenSelect.required = input.required;
        input.required = false;
    };
    ListBox.prototype.setHeight = function () {
        var ele = this.toolbarSettings.items.length ? this.list.parentElement : this.list;
        ele.style.height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["formatUnit"])(this.height);
    };
    ListBox.prototype.setCssClass = function () {
        var wrap = this.toolbarSettings.items.length ? this.list.parentElement : this.list;
        if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["addClass"])([wrap], this.cssClass.split(' '));
        }
        if (this.enableRtl) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["addClass"])([wrap], 'e-rtl');
        }
    };
    ListBox.prototype.setEnable = function () {
        var ele = this.toolbarSettings.items.length ? this.list.parentElement : this.list;
        if (this.enabled) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["removeClass"])([ele], _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["addClass"])([ele], _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled);
        }
    };
    ListBox.prototype.showSpinner = function () {
        if (!this.spinner) {
            this.spinner = this.createElement('div', { className: 'e-listbox-wrapper', styles: 'height:' + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["formatUnit"])(this.height) });
        }
        this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_4__["createSpinner"])({ target: this.spinner }, this.createElement);
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_4__["showSpinner"])(this.spinner);
    };
    ListBox.prototype.hideSpinner = function () {
        if (this.spinner.querySelector('.e-spinner-pane')) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_4__["hideSpinner"])(this.spinner);
        }
        if (this.spinner.parentElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["detach"])(this.spinner);
        }
    };
    ListBox.prototype.onInput = function () {
        if (this.keyDownStatus) {
            this.isValidKey = true;
        }
        else {
            this.isValidKey = false;
        }
        this.keyDownStatus = false;
    };
    ListBox.prototype.onActionComplete = function (ulElement, list, e) {
        var searchEle;
        if (this.allowFiltering) {
            searchEle = this.list.getElementsByClassName('e-filter-parent')[0];
        }
        _super.prototype.onActionComplete.call(this, ulElement, list, e);
        if (this.allowFiltering && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(searchEle)) {
            this.list.insertBefore(searchEle, this.list.firstElementChild);
        }
        this.initWrapper();
        this.setSelection();
        this.initDraggable();
        if (this.initLoad) {
            this.initToolbarAndStyles();
            this.wireEvents();
            this.mainList = this.ulElement;
            if (this.showCheckbox) {
                this.setCheckboxPosition();
            }
            if (this.allowFiltering) {
                this.setFiltering();
                this.checkBoxSelectionModule.clearIconElement.style.display = 'none';
            }
        }
        this.initLoad = false;
    };
    ListBox.prototype.initToolbarAndStyles = function () {
        this.initToolbar();
        this.setCssClass();
        this.setEnable();
        this.setHeight();
    };
    ListBox.prototype.triggerDragStart = function (args) {
        var _this = this;
        var badge;
        args = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])(this.getDragArgs(args), { dragSelected: true });
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Browser"].isIos) {
            this.list.style.overflow = 'hidden';
        }
        this.trigger('dragStart', args, function (args) {
            _this.allowDragAll = args.dragSelected;
            if (!_this.allowDragAll) {
                badge = _this.ulElement.getElementsByClassName('e-list-badge')[0];
                if (badge) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["detach"])(badge);
                }
            }
        });
    };
    ListBox.prototype.triggerDrag = function (args) {
        this.trigger('drag', this.getDragArgs(args));
        var listObj = this.getComponent(args.target);
        if (listObj && listObj.listData.length === 0) {
            listObj.ulElement.innerHTML = '';
        }
    };
    ListBox.prototype.dragEnd = function (args) {
        var _this = this;
        var listData;
        var selectedOptions;
        var dropValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
        var droppedData;
        var listObj = this.getComponent(args.droppedElement);
        var dragArgs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])({}, this.getDragArgs({ target: args.droppedElement }, true), { target: args.target });
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Browser"].isIos) {
            this.list.style.overflow = '';
        }
        if (listObj === this) {
            var ul_1 = this.ulElement;
            listData = [].slice.call(this.listData);
            var toIdx_1 = args.currentIndex = this.getCurIdx(this, args.currentIndex);
            listData.splice(toIdx_1, 0, listData.splice(listData.indexOf(this.getDataByValue(dropValue)), 1)[0]);
            if (this.allowDragAll) {
                selectedOptions = Array.prototype.indexOf.call(this.value, dropValue) > -1 ? this.value : [dropValue];
                selectedOptions.forEach(function (value) {
                    if (value !== dropValue) {
                        var idx = listData.indexOf(_this.getDataByValue(value));
                        if (idx > toIdx_1) {
                            toIdx_1++;
                        }
                        listData.splice(toIdx_1, 0, listData.splice(idx, 1)[0]);
                        ul_1.insertBefore(_this.getItems()[_this.getIndexByValue(value)], ul_1.getElementsByClassName('e-placeholder')[0]);
                    }
                });
            }
            this.listData = listData;
            this.setProperties({ dataSource: listData }, true);
        }
        else {
            var li_1;
            var currIdx_1 = args.currentIndex = this.getCurIdx(listObj, args.currentIndex);
            var ul_2 = listObj.ulElement;
            listData = [].slice.call(listObj.listData);
            selectedOptions = (Array.prototype.indexOf.call(this.value, dropValue) > -1 && this.allowDragAll) ? this.value : [dropValue];
            selectedOptions.forEach(function (value) {
                droppedData = _this.getDataByValue(value);
                _this.listData.splice(_this.listData.indexOf(droppedData), 1);
                listData.splice(value === dropValue ? args.currentIndex : currIdx_1, 0, droppedData);
                li_1 = _this.getItems()[_this.getIndexByValue(value)];
                _this.removeSelected(_this, value === dropValue ? [args.droppedElement] : [li_1]);
                ul_2.insertBefore(li_1, ul_2.getElementsByClassName('e-placeholder')[0]);
                currIdx_1++;
            });
            this.updateSelectedOptions();
            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_1__["getComponent"])(ul_2, 'sortable');
                ul_2.innerHTML = listObj.renderItems(listData, listObj.fields).innerHTML;
                ul_2.appendChild(sortabale.placeHolderElement);
                ul_2.appendChild(args.helper);
                listObj.setSelection();
            }
            this.setProperties({ dataSource: this.listData }, true);
            listObj.listData = listData;
            listObj.setProperties({ dataSource: listObj.listData }, true);
            if (this.listData.length === 0) {
                this.l10nUpdate();
            }
        }
        this.trigger('drop', dragArgs);
    };
    ListBox.prototype.removeSelected = function (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_1__["removeClass"])(elems, _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
        }
    };
    ListBox.prototype.getCurIdx = function (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;
    };
    ListBox.prototype.getComponent = function (li) {
        var listObj;
        var ele = (this.element.tagName === 'EJS-LISTBOX' ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["closest"])(li, '.e-listbox')
            : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["closest"])(li, '.e-listbox-wrapper') && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["closest"])(li, '.e-listbox-wrapper').querySelector('.e-listbox'));
        if (ele) {
            listObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["getComponent"])(ele, this.getModuleName());
        }
        return listObj;
    };
    ListBox.prototype.listOption = function (dataSource, fields) {
        this.listCurrentOptions = _super.prototype.listOption.call(this, dataSource, fields);
        this.listCurrentOptions = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])({}, this.listCurrentOptions, { itemCreated: this.triggerBeforeItemRender.bind(this) }, true);
        this.notify('listoption', { module: 'CheckBoxSelection' });
        return this.listCurrentOptions;
    };
    ListBox.prototype.triggerBeforeItemRender = function (e) {
        e.item.setAttribute('tabindex', '-1');
        this.trigger('beforeItemRender', { element: e.item, item: e.curData });
    };
    ListBox.prototype.requiredModules = function () {
        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.
     * @returns void
     */
    ListBox.prototype.enableItems = function (items, enable) {
        var _this = this;
        if (enable === void 0) { enable = true; }
        var li;
        items.forEach(function (item) {
            li = _this.findListElement(_this.list, 'li', 'data-value', _this.getValueByText(item));
            if (enable) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["removeClass"])([li], _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled);
                li.removeAttribute('aria-disabled');
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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.
     * @returns void
     */
    ListBox.prototype.selectItems = function (items, state) {
        if (state === void 0) { state = true; }
        this.setSelection(items, state, true);
        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
     */
    ListBox.prototype.selectAll = function (state) {
        if (state === void 0) { state = 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}.
     */
    ListBox.prototype.addItems = function (items, itemIndex) {
        _super.prototype.addItem.call(this, items, itemIndex);
    };
    ListBox.prototype.selectAllItems = function (state, event) {
        var _this = this;
        [].slice.call(this.getItems()).forEach(function (li) {
            if (!li.classList.contains(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled)) {
                if (_this.selectionSettings.showCheckbox) {
                    var ele = li.getElementsByClassName('e-check')[0];
                    if ((!ele && state) || (ele && !state)) {
                        _this.notify('updatelist', { li: li });
                    }
                }
                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) {
            var liEle = this.list.getElementsByTagName('li');
            var index = 0;
            if (state) {
                var _loop_1 = function () {
                    var dataValue1 = this_1.getFormattedValue(liEle[index].getAttribute('data-value'));
                    if (!this_1.value.some(function (e) { return e === dataValue1; })) {
                        this_1.value.push(this_1.getFormattedValue(liEle[index].getAttribute('data-value')));
                    }
                };
                var this_1 = this;
                for (index = 0; index < liEle.length; index++) {
                    _loop_1();
                }
            }
            else {
                var _loop_2 = function () {
                    var dataValue2 = this_2.getFormattedValue(liEle[index].getAttribute('data-value'));
                    this_2.value = this_2.value.filter(function (e) { return e !== dataValue2; });
                };
                var this_2 = this;
                for (index = 0; index < liEle.length; index++) {
                    _loop_2();
                }
            }
            this.updateMainList();
        }
        this.triggerChange(this.getSelectedItems(), event);
    };
    ListBox.prototype.updateMainList = function () {
        var listindex = 0;
        var valueindex = 0;
        var count = 0;
        for (listindex; listindex < this.mainList.childElementCount; listindex++) {
            for (valueindex; valueindex < this.value.length; valueindex++) {
                if (this.mainList.getElementsByTagName('li')[listindex].getAttribute('data-value') === this.value[valueindex]) {
                    count++;
                }
            }
            if (!count) {
                this.mainList.getElementsByTagName('li')[listindex].getElementsByClassName('e-frame')[0].classList.remove('e-check');
            }
            count = 0;
            valueindex = 0;
        }
    };
    ListBox.prototype.wireEvents = function () {
        var form = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["closest"])(this.element, 'form');
        var wrapper = this.element.tagName === 'EJS-LISTBOX' ? this.element : this.list;
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].add(this.list, 'click', this.clickHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].add(wrapper, 'keydown', this.keyDownHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].add(wrapper, 'focusout', this.focusOutHandler, this);
        this.wireToolbarEvent();
        if (this.selectionSettings.showCheckbox) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].remove(document, 'mousedown', this.checkBoxSelectionModule.onDocumentClick);
        }
        if (this.fields.groupBy || this.element.querySelector('select>optgroup')) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].remove(this.list, 'scroll', this.setFloatingHeader);
        }
        if (form) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].add(form, 'reset', this.formResetHandler, this);
        }
    };
    ListBox.prototype.wireToolbarEvent = function () {
        if (this.toolbarSettings.items.length) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].add(this.getToolElem(), 'click', this.toolbarClickHandler, this);
        }
    };
    ListBox.prototype.unwireEvents = function () {
        var form = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["closest"])(this.element, 'form');
        var wrapper = this.element.tagName === 'EJS-LISTBOX' ? this.element : this.list;
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].remove(this.list, 'click', this.clickHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].remove(wrapper, 'keydown', this.keyDownHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].remove(wrapper, 'focusout', this.focusOutHandler);
        if (this.toolbarSettings.items.length) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].remove(this.getToolElem(), 'click', this.toolbarClickHandler);
        }
        if (form) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].remove(form, 'reset', this.formResetHandler);
        }
    };
    ListBox.prototype.clickHandler = function (e) {
        this.selectHandler(e);
    };
    ;
    ListBox.prototype.checkSelectAll = function () {
        var searchCount = this.list.querySelectorAll('li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li).length;
        var len = this.getSelectedItems().length;
        if (this.showSelectAll && searchCount) {
            this.notify('checkSelectAll', { module: 'CheckBoxSelection', value: (searchCount === len) ? 'check' : 'uncheck' });
        }
    };
    ListBox.prototype.setFiltering = function () {
        var args = {
            module: 'CheckBoxSelection',
            enable: this.showCheckbox,
            popupElement: this.popupWrapper
        };
        if (this.allowFiltering) {
            this.notify('searchBox', args);
        }
    };
    ListBox.prototype.selectHandler = function (e, isKey) {
        var isSelect = true;
        var currSelIdx;
        var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["closest"])(e.target, '.' + _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li);
        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_1__["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_1__["Browser"].isDevice))) {
                    this.getSelectedItems().forEach(function (ele) {
                        ele.removeAttribute('aria-selected');
                    });
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li); });
            }
            else {
                this.prevSelIdx = [].slice.call(li.parentElement.children).indexOf(li);
            }
            if (isSelect) {
                if (!this.selectionSettings.showCheckbox) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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.notify('updatelist', { li: li, e: e });
            }
            this.updateSelectedOptions();
            if (this.allowFiltering && !isKey) {
                var liDataValue_1 = this.getFormattedValue(li.getAttribute('data-value'));
                if (!isSelect) {
                    this.value = this.value.filter(function (value1) {
                        return value1 !== liDataValue_1;
                    });
                }
                else {
                    this.value.push(liDataValue_1);
                }
                this.updateMainList();
            }
            this.triggerChange(this.getSelectedItems(), e);
        }
    };
    ListBox.prototype.triggerChange = function (selectedLis, event) {
        this.trigger('change', { elements: selectedLis, items: this.getDataByElems(selectedLis), value: this.value, event: event });
    };
    ListBox.prototype.getDataByElems = function (elems) {
        var _this = this;
        var data = [];
        elems.forEach(function (ele) {
            data.push(_this.getDataByValue(ele.getAttribute('data-value')));
        });
        return data;
    };
    ListBox.prototype.toolbarClickHandler = function (e) {
        var btn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["closest"])(e.target, 'button');
        if (btn) {
            switch (btn.getAttribute('data-value')) {
                case 'moveUp':
                    this.moveUpDown(true);
                    break;
                case 'moveDown':
                    this.moveUpDown();
                    break;
                case 'moveTo':
                    this.moveTo();
                    break;
                case 'moveFrom':
                    this.moveFrom();
                    break;
                case 'moveAllTo':
                    this.moveAllTo();
                    break;
                case 'moveAllFrom':
                    this.moveAllFrom();
                    break;
            }
        }
    };
    ListBox.prototype.moveUpDown = function (isUp, isKey) {
        var _this = this;
        var elems = this.getSelectedItems();
        if ((isUp && this.isSelected(this.ulElement.firstElementChild))
            || (!isUp && this.isSelected(this.ulElement.lastElementChild))) {
            return;
        }
        (isUp ? elems : elems.reverse()).forEach(function (ele) {
            var idx = Array.prototype.indexOf.call(_this.ulElement.children, ele);
            Object(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["moveTo"])(_this.ulElement, _this.ulElement, [idx], isUp ? idx - 1 : idx + 2);
            _this.changeData(idx, isUp ? idx - 1 : idx + 1);
        });
        elems[0].focus();
        if (!isKey && this.toolbarSettings.items.length) {
            this.getToolElem().querySelector('[data-value=' + (isUp ? 'moveUp' : 'moveDown') + ']').focus();
        }
        this.updateToolBarState();
    };
    ListBox.prototype.moveTo = function () {
        this.moveData(this, this.getScopedListBox());
    };
    ListBox.prototype.moveFrom = function () {
        this.moveData(this.getScopedListBox(), this);
    };
    ListBox.prototype.moveData = function (fListBox, tListBox, isKey) {
        var idx = [];
        var dataIdx = [];
        var listData = [].slice.call(fListBox.listData);
        var tListData = [].slice.call(tListBox.listData);
        var data = [];
        var elems = fListBox.getSelectedItems();
        var isRefresh = tListBox.sortOrder !== 'None' ||
            (tListBox.selectionSettings.showCheckbox !== fListBox.selectionSettings.showCheckbox) || tListBox.fields.groupBy;
        if (elems.length) {
            this.removeSelected(fListBox, elems);
            elems.forEach(function (ele, i) {
                idx.push(Array.prototype.indexOf.call(fListBox.ulElement.children, ele));
                dataIdx.push(Array.prototype.indexOf.call(listData, fListBox.sortedData[idx[i]]));
            });
            if (tListBox.listData.length === 0) {
                tListBox.ulElement.innerHTML = '';
            }
            dataIdx.sort().reverse().forEach(function (i) {
                listData.splice(i, 1)[0];
            });
            idx.slice().reverse().forEach(function (i) {
                data.push(fListBox.sortedData.splice(i, 1)[0]);
            });
            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_1__["detach"])(ele); });
                }
            }
            else {
                Object(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["moveTo"])(fListBox.ulElement, tListBox.ulElement, idx);
            }
            var childCnt = fListBox.ulElement.childElementCount;
            var ele = void 0;
            var liIdx = void 0;
            if (elems.length === 1 && childCnt && !fListBox.selectionSettings.showCheckbox) {
                liIdx = childCnt <= idx[0] ? childCnt - 1 : idx[0];
                ele = fListBox.ulElement.children[liIdx];
                fListBox.ulElement.children[fListBox.getValidIndex(ele, liIdx, childCnt === idx[0]
                    ? 38 : 40)].classList.add(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
            }
            if (isKey) {
                this.list.focus();
            }
            fListBox.listData = listData;
            fListBox.setProperties({ dataSource: listData }, true);
            tListData = tListData.concat(data.reverse());
            tListBox.listData = tListData;
            tListBox.setProperties({ dataSource: tListData }, true);
            if (isRefresh) {
                tListBox.ulElement.innerHTML = tListBox.renderItems(tListData, tListBox.fields).innerHTML;
                tListBox.setSelection();
            }
            else {
                tListBox.sortedData = tListData;
            }
            fListBox.updateSelectedOptions();
            if (fListBox.listData.length === 0) {
                fListBox.l10nUpdate();
            }
        }
    };
    ListBox.prototype.moveAllTo = function () {
        this.moveAllData(this, this.getScopedListBox());
    };
    ListBox.prototype.moveAllFrom = function () {
        this.moveAllData(this.getScopedListBox(), this);
    };
    ListBox.prototype.moveAllData = function (fListBox, tListBox, isKey) {
        var listData = [].slice.call(tListBox.listData);
        var isRefresh = tListBox.sortOrder !== 'None' ||
            (tListBox.selectionSettings.showCheckbox !== fListBox.selectionSettings.showCheckbox) || tListBox.fields.groupBy;
        this.removeSelected(fListBox, fListBox.getSelectedItems());
        if (tListBox.listData.length === 0) {
            tListBox.ulElement.innerHTML = '';
        }
        if (isRefresh) {
            fListBox.ulElement.innerHTML = '';
        }
        else {
            Object(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["moveTo"])(fListBox.ulElement, tListBox.ulElement, Array.apply(null, { length: fListBox.ulElement.childElementCount }).map(Number.call, Number));
        }
        if (isKey) {
            this.list.focus();
        }
        listData = listData.concat(fListBox.sortedData
            .filter(function (data) { return data.isHeader !== true; }));
        tListBox.listData = listData;
        fListBox.listData = fListBox.sortedData = [];
        tListBox.setProperties({ dataSource: listData }, true);
        fListBox.setProperties({ dataSource: [] }, true);
        if (isRefresh) {
            tListBox.ulElement.innerHTML = tListBox.renderItems(listData, tListBox.fields).innerHTML;
        }
        else {
            tListBox.sortedData = listData;
        }
        fListBox.updateSelectedOptions();
        if (fListBox.listData.length === 0) {
            fListBox.l10nUpdate();
        }
    };
    ListBox.prototype.changeData = function (fromIdx, toIdx) {
        var listData = [].slice.call(this.listData);
        listData.splice(toIdx, 0, listData.splice(fromIdx, 1)[0]);
        this.listData = listData;
        this.setProperties({ dataSource: listData }, true);
    };
    ListBox.prototype.getSelectedItems = function () {
        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_1__["closest"])(cbox, '.' + _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li));
            });
        }
        else {
            ele = [].slice.call(this.ulElement.getElementsByClassName(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected));
        }
        return ele;
    };
    ListBox.prototype.getScopedListBox = function () {
        var _this = this;
        var listObj;
        if (this.scope) {
            [].slice.call(document.querySelectorAll(this.scope)).forEach(function (ele) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["getComponent"])(ele, _this.getModuleName())) {
                    listObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["getComponent"])(ele, _this.getModuleName());
                }
            });
        }
        return listObj;
    };
    ListBox.prototype.getDragArgs = function (args, isDragEnd) {
        var elems = this.getSelectedItems();
        if (elems.length) {
            elems.pop();
            if (isDragEnd) {
                elems.push(args.target);
            }
        }
        else {
            elems = [args.target];
        }
        return { elements: elems, items: this.getDataByElems(elems) };
    };
    ListBox.prototype.onKeyDown = function (e) {
        this.keyDownHandler(e);
    };
    ListBox.prototype.keyDownHandler = function (e) {
        if ([32, 35, 36, 37, 38, 39, 40, 65].indexOf(e.keyCode) > -1 && !this.allowFiltering) {
            e.preventDefault();
            if (e.keyCode === 32) {
                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);
            }
        }
    };
    ListBox.prototype.upDownKeyHandler = function (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_1__["removeClass"])([fli], 'e-focused');
        }
        var cli = ul.children[fliIdx];
        fliIdx = this.getValidIndex(cli, fliIdx, e.keyCode);
        if (fliIdx === -1) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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);
        }
    };
    ListBox.prototype.KeyUp = function (e) {
        var _this = this;
        if (this.selectionSettings.showCheckbox) {
            var char = String.fromCharCode(e.keyCode);
            var isWordCharacter = char.match(/\w/);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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_1 = {
                            preventDefaultAction: false,
                            text: this.targetElement(),
                            updateData: function (dataSource, query, fields) {
                                if (eventArgsData_1.cancel) {
                                    return;
                                }
                                _this.isFiltered = true;
                                _this.remoteFilterAction = true;
                                _this.dataUpdater(dataSource, query, fields);
                            },
                            event: e,
                            cancel: false
                        };
                        this.trigger('filtering', eventArgsData_1);
                        if (eventArgsData_1.cancel) {
                            return;
                        }
                        if (!this.isFiltered && !eventArgsData_1.preventDefaultAction) {
                            this.dataUpdater(this.dataSource, null, this.fields);
                        }
                        this.list.getElementsByClassName('e-input-filter')[0].focus();
                        this.checkBoxSelectionModule.clearIconElement.style.display = 'none';
                    }
            }
        }
    };
    ListBox.prototype.targetElement = function () {
        this.targetInputElement = this.list.getElementsByClassName('e-input-filter')[0];
        if (this.selectionSettings.showCheckbox && this.allowFiltering) {
            this.notify('targetElement', { module: 'CheckBoxSelection', enable: this.selectionSettings.showCheckbox });
        }
        return this.targetInputElement.value;
    };
    ListBox.prototype.dataUpdater = function (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.dataSource);
                this.notify('reOrder', { module: 'CheckBoxSelection', enable: this.selectionSettings.showCheckbox, e: this });
            }
        }
        else {
            this.resetList(dataSource, fields, query);
        }
    };
    ListBox.prototype.focusOutHandler = function () {
        var ele = this.list.getElementsByClassName('e-focused')[0];
        if (ele) {
            ele.classList.remove('e-focused');
        }
    };
    ListBox.prototype.getValidIndex = function (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.children[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;
    };
    ListBox.prototype.updateSelectedOptions = function () {
        var _this = this;
        var selectedOptions = [];
        this.getSelectedItems().forEach(function (ele) {
            if (!ele.classList.contains('e-grabbed')) {
                selectedOptions.push(_this.getFormattedValue(ele.getAttribute('data-value')));
            }
        });
        if (this.mainList.childElementCount === this.ulElement.childElementCount) {
            this.setProperties({ value: selectedOptions }, true);
        }
        this.updateSelectTag();
        this.updateToolBarState();
        if (this.tBListBox) {
            this.tBListBox.updateToolBarState();
        }
        if (this.allowFiltering) {
            this.list.getElementsByClassName('e-input-filter')[0].focus();
        }
    };
    ListBox.prototype.clearSelection = function (values) {
        var _this = this;
        if (values === void 0) { values = this.value; }
        if (this.selectionSettings.showCheckbox) {
            var dvalue_1;
            this.getSelectedItems().forEach(function (li) {
                dvalue_1 = _this.getFormattedValue(li.getAttribute('data-value'));
                if (values.indexOf(dvalue_1) < 0) {
                    li.getElementsByClassName('e-check')[0].classList.remove('e-check');
                    li.getElementsByClassName('e-checkbox-wrapper')[0].removeAttribute('aria-checked');
                    li.removeAttribute('aria-selected');
                }
            });
        }
    };
    ;
    ListBox.prototype.setSelection = function (values, isSelect, isText) {
        var _this = this;
        if (values === void 0) { values = this.value; }
        if (isSelect === void 0) { isSelect = true; }
        if (isText === void 0) { isText = false; }
        var li;
        var liselect;
        if (values) {
            values.forEach(function (value) {
                li = _this.list.querySelector('[data-value="' + (isText ? _this.getValueByText(value) : value) + '"]');
                if (li) {
                    if (_this.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 (_this.selectionSettings.showCheckbox) {
                            _this.notify('updatelist', { li: li });
                        }
                        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();
    };
    ListBox.prototype.updateSelectTag = function () {
        var ele = this.getSelectTag();
        ele.innerHTML = '';
        if (this.value) {
            Array.prototype.forEach.call(this.value, function (value) {
                ele.innerHTML += '<option selected value="' + value + '"></option>';
            });
        }
        this.checkSelectAll();
    };
    ListBox.prototype.updateToolBarState = function () {
        var _this = this;
        if (this.toolbarSettings.items.length) {
            var listObj_1 = this.getScopedListBox();
            var wrap_1 = this.list.parentElement.getElementsByClassName('e-listbox-tool')[0];
            this.toolbarSettings.items.forEach(function (value) {
                var btn = wrap_1.querySelector('[data-value="' + value + '"]');
                switch (value) {
                    case 'moveAllTo':
                        btn.disabled = _this.ulElement.childElementCount ? false : true;
                        break;
                    case 'moveAllFrom':
                        btn.disabled = listObj_1.ulElement.childElementCount ? false : true;
                        break;
                    case 'moveFrom':
                        btn.disabled = listObj_1.value && listObj_1.value.length ? false : true;
                        break;
                    case 'moveUp':
                        btn.disabled = _this.value && _this.value.length
                            && !_this.isSelected(_this.ulElement.children[0]) ? false : true;
                        break;
                    case 'moveDown':
                        btn.disabled = _this.value && _this.value.length
                            && !_this.isSelected(_this.ulElement.children[_this.ulElement.childElementCount - 1]) ? false : true;
                        break;
                    default:
                        btn.disabled = _this.value && _this.value.length ? false : true;
                        break;
                }
            });
        }
    };
    ListBox.prototype.setCheckboxPosition = function () {
        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');
        }
    };
    ListBox.prototype.showCheckbox = function (showCheckbox) {
        var index = 0;
        var liColl = this.list.lastElementChild.querySelectorAll('li');
        var liCollLen = this.list.lastElementChild.getElementsByClassName('e-list-item').length;
        if (showCheckbox) {
            if (this.selectionSettings.showSelectAll) {
                this.notify('selectAll', {});
                this.checkSelectAll();
            }
            for (index; index < liCollLen; index++) {
                liColl[index].firstElementChild.classList.add('e-checkbox-wrapper');
            }
        }
        else {
            if (this.selectionSettings.showSelectAll) {
                this.list.removeChild(this.list.getElementsByClassName('e-selectall-parent')[0]);
            }
            for (index; index < liCollLen; index++) {
                liColl[index].firstElementChild.classList.remove('e-checkbox-wrapper');
            }
        }
    };
    ListBox.prototype.isSelected = function (ele) {
        return ele.classList.contains(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected) || ele.querySelector('.e-check') !== null;
    };
    ListBox.prototype.getSelectTag = function () {
        return this.list.getElementsByClassName('e-hidden-select')[0];
    };
    ListBox.prototype.getToolElem = function () {
        return this.list.parentElement.getElementsByClassName('e-listbox-tool')[0];
    };
    ListBox.prototype.formResetHandler = function () {
        this.value = this.initialSelectedOptions;
    };
    /**
     * Return the module name.
     * @private
     */
    ListBox.prototype.getModuleName = function () {
        return 'listbox';
    };
    /**
     * Get the properties to be maintained in the persisted state.
     */
    ListBox.prototype.getPersistData = function () {
        return this.addOnPersist(['value']);
    };
    ListBox.prototype.getLocaleName = function () {
        return 'listbox';
    };
    ;
    ListBox.prototype.destroy = function () {
        this.unwireEvents();
        if (this.element.tagName === 'EJS-LISTBOX') {
            this.element.innerHTML = '';
        }
        else {
            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_1__["detach"])(this.list.nextElementSibling);
            }
            this.list.parentElement.insertBefore(this.element, this.list);
        }
        _super.prototype.destroy.call(this);
    };
    /**
     * Called internally if any of the property value changed.
     * @returns void
     * @private
     */
    // tslint:disable-next-line:max-func-body-length
    ListBox.prototype.onPropertyChanged = function (newProp, oldProp) {
        var wrap = this.toolbarSettings.items.length ? this.list.parentElement : this.list;
        _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
        this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'cssClass':
                    if (oldProp.cssClass) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["removeClass"])([wrap], oldProp.cssClass.split(' '));
                    }
                    if (newProp.cssClass) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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_1__["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_1__["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;
                    }
                    break;
                case 'scope':
                    if (this.allowDragAndDrop) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["getComponent"])(this.ulElement, 'sortable').scope = newProp.scope;
                    }
                    if (this.toolbarSettings.items.length) {
                        if (oldProp.scope) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["getComponent"])(document.querySelector(oldProp.scope), this.getModuleName())
                                .tBListBox = null;
                        }
                        if (newProp.scope) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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_1__["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_1__["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_1__["isNullOrUndefined"])(showSelectAll)) {
                        this.showSelectAll = showSelectAll;
                        if (this.showSelectAll) {
                            this.checkBoxSelectionModule.checkAllParent = null;
                        }
                        this.notify('selectAll', {});
                        this.checkSelectAll();
                    }
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(showCheckbox)) {
                        this.showCheckbox(showCheckbox);
                    }
                    if (this.selectionSettings.showCheckbox) {
                        this.setCheckboxPosition();
                    }
                    break;
            }
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('')
    ], ListBox.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])([])
    ], ListBox.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('')
    ], ListBox.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(false)
    ], ListBox.prototype, "allowDragAndDrop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(false)
    ], ListBox.prototype, "allowFiltering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('')
    ], ListBox.prototype, "scope", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ListBox.prototype, "beforeItemRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ListBox.prototype, "filtering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ListBox.prototype, "select", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ListBox.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ListBox.prototype, "dragStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ListBox.prototype, "drag", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ListBox.prototype, "drop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ListBox.prototype, "dataBound", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(null)
    ], ListBox.prototype, "groupTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('No Records Found')
    ], ListBox.prototype, "noRecordsTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('The Request Failed')
    ], ListBox.prototype, "actionFailureTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(1000)
    ], ListBox.prototype, "zIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(false)
    ], ListBox.prototype, "ignoreAccent", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Complex"])({}, ToolbarSettings)
    ], ListBox.prototype, "toolbarSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Complex"])({}, SelectionSettings)
    ], ListBox.prototype, "selectionSettings", void 0);
    ListBox = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["NotifyPropertyChanges"]
    ], ListBox);
    return ListBox;
}(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["DropDownBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/checkbox-selection.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/checkbox-selection.js ***!
  \***************************************************************************************/
/*! exports provided: CheckBoxSelection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckBoxSelection", function() { return CheckBoxSelection; });
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../drop-down-base/drop-down-base */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js");





var ICON = 'e-icons';
var CHECKBOXFRAME = 'e-frame';
var CHECK = 'e-check';
var CHECKBOXWRAP = 'e-checkbox-wrapper';
var CHECKBOXRIPPLE = 'e-ripple-container';
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 = 'e-input-focus';
/**
 * The Multiselect enable CheckBoxSelection call this inject module.
 */
var CheckBoxSelection = /** @class */ (function () {
    function CheckBoxSelection(parent) {
        this.activeLi = [];
        this.activeEle = [];
        this.parent = parent;
        this.addEventListener();
    }
    CheckBoxSelection.prototype.getModuleName = function () {
        return 'CheckBoxSelection';
    };
    CheckBoxSelection.prototype.addEventListener = function () {
        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_2__["EventHandler"].add(document, 'mousedown', this.onDocumentClick, this);
        this.parent.on('addItem', this.checboxCreate, this);
    };
    CheckBoxSelection.prototype.removeEventListener = function () {
        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_2__["EventHandler"].remove(document, 'mousedown', this.onDocumentClick);
    };
    CheckBoxSelection.prototype.listOption = function (args) {
        var _this = this;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.parent.listCurrentOptions.itemCreated)) {
            this.parent.listCurrentOptions.itemCreated = function (e) {
                _this.checboxCreate(e);
            };
        }
        else {
            var itemCreated_1 = this.parent.listCurrentOptions.itemCreated;
            this.parent.listCurrentOptions.itemCreated = function (e) {
                _this.checboxCreate(e);
                itemCreated_1.apply(_this, [e]);
            };
        }
    };
    ;
    CheckBoxSelection.prototype.setPlaceholder = function (props) {
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_1__["Input"].setPlaceholder(props.filterBarPlaceholder, this.filterInput);
    };
    CheckBoxSelection.prototype.checboxCreate = function (e) {
        var item;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_0__["createCheckBox"])(this.parent.createElement, true);
            var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["select"])('div.' + ICON, item);
            var id = item.getAttribute('data-uid');
            item.insertBefore(checkboxEle, item.childNodes[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(icon) ? 0 : 1]);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["select"])('.' + CHECKBOXFRAME, checkboxEle);
            var frame = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["select"])('.' + CHECKBOXFRAME, checkboxEle);
            if (this.parent.enableGroupCheckBox) {
                this.parent.popupWrapper.classList.add('e-multiselect-group');
            }
            return item;
        }
        else {
            return item;
        }
    };
    CheckBoxSelection.prototype.setSelectAll = function () {
        if (this.parent.showSelectAll) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["isNullOrUndefined"])(this.parent.filterParent)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["append"])([this.checkAllParent], this.parent.filterParent);
                    }
                    else {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["append"])([this.checkAllParent], this.parent.popupWrapper);
                    }
                }
                if (!this.parent.headerTemplate) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.parent.filterParent)) {
                        this.parent.filterParent.parentNode.insertBefore(this.checkAllParent, this.parent.filterParent.nextSibling);
                    }
                    else {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["prepend"])([this.checkAllParent], this.parent.popupWrapper);
                    }
                }
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.checkAllParent, 'mousedown', this.clickHandler, this);
            }
            if (this.parent.list.classList.contains('e-nodata') || 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_2__["isNullOrUndefined"])(this.checkAllParent)) {
            this.checkAllParent.parentElement.removeChild(this.checkAllParent);
            this.checkAllParent = null;
        }
    };
    CheckBoxSelection.prototype.destroy = function () {
        this.removeEventListener();
    };
    CheckBoxSelection.prototype.listSelection = function (args) {
        var target;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(args.e)) {
            target = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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 : args.li.querySelector('.e-checkbox-wrapper').childNodes[1]
                : args.li.querySelector('.e-checkbox-wrapper').childNodes[1];
        }
        else {
            target = 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_2__["isNullOrUndefined"])(target)) {
            this.checkWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(target, '.' + CHECKBOXWRAP);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.checkWrapper)) {
            var checkElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["select"])('.' + CHECKBOXFRAME, this.checkWrapper);
            var selectAll = false;
            this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK), args.li, args.e, selectAll);
        }
    };
    CheckBoxSelection.prototype.validateCheckNode = function (checkWrap, isCheck, li, e, selectAll) {
        this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll);
    };
    CheckBoxSelection.prototype.clickHandler = function (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_2__["closest"])(target, '.' + CHECKBOXWRAP);
        var selectAll = true;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.checkWrapper)) {
            var checkElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["select"])('.' + CHECKBOXFRAME, this.checkWrapper);
            this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK), null, e, selectAll);
        }
        e.preventDefault();
    };
    CheckBoxSelection.prototype.changeState = function (wrapper, state, e, isPrevent, selectAll) {
        var ariaState;
        var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME)[0];
        if (state === 'check' && !frameSpan.classList.contains(CHECK)) {
            frameSpan.classList.remove(INDETERMINATE);
            frameSpan.classList.add(CHECK);
            ariaState = 'true';
            if (selectAll) {
                this.parent.selectAllItems(true, e);
                this.setLocale(true);
            }
        }
        else if (state === 'uncheck' && (frameSpan.classList.contains(CHECK) || frameSpan.classList.contains(INDETERMINATE))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([frameSpan], [CHECK, INDETERMINATE]);
            ariaState = 'false';
            if (selectAll) {
                this.parent.selectAllItems(false, e);
                this.setLocale();
            }
        }
        ariaState = state === 'check' ? 'true' : state === 'uncheck' ? 'false' : ariaState;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(ariaState)) {
            wrapper.setAttribute('aria-checked', ariaState);
        }
    };
    CheckBoxSelection.prototype.setSearchBox = function (args) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["Browser"].isDevice) {
                backIcon = true;
                this.parent.mobFilter = false;
            }
            this.filterInputObj = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_1__["Input"].createInput({
                element: this.filterInput,
                buttons: backIcon ? [searchBackIcon, filterBarClearIcon] : [filterBarClearIcon],
                properties: { placeholder: this.parent.filterBarPlaceholder }
            }, this.parent.createElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["append"])([this.filterInputObj.container], this.parent.filterParent);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["prepend"])([this.parent.filterParent], args.popupElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["Browser"].isDevice && this.clearIconElement) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.clearIconElement, 'mousedown', this.clearText, this);
                this.clearIconElement.style.visibility = 'hidden';
            }
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.filterInput, 'input', this.parent.onInput, this.parent);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.filterInput, 'keyup', this.parent.KeyUp, this.parent);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.filterInput, 'keydown', this.parent.onKeyDown, this.parent);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.filterInput, 'blur', this.onBlur, this);
            this.parent.searchBoxHeight = (this.filterInputObj.container.parentElement).getBoundingClientRect().height;
            return this.filterInputObj;
        }
    };
    ;
    CheckBoxSelection.prototype.clickOnBackIcon = function (e) {
        this.parent.hidePopup();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([document.body, this.parent.popupObj.element], popupFullScreen);
        this.parent.inputElement.focus();
    };
    CheckBoxSelection.prototype.clearText = function (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();
    };
    CheckBoxSelection.prototype.setDeviceSearchBox = function () {
        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();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["attributes"])(this.parent.popupObj.element, { style: 'left:0px;right:0px;top:0px;bottom:0px;' });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([document.body, this.parent.popupObj.element], popupFullScreen);
        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_2__["EventHandler"].add(this.backIconElement, 'click', this.clickOnBackIcon, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.clearIconElement, 'click', this.clearText, this);
    };
    CheckBoxSelection.prototype.setSearchBoxPosition = function () {
        var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
        this.parent.popupObj.element.style.maxHeight = '100%';
        this.parent.popupObj.element.style.width = '100%';
        this.parent.list.style.maxHeight = (window.innerHeight - searchBoxHeight) + 'px';
        this.parent.list.style.height = (window.innerHeight - searchBoxHeight) + 'px';
        var clearElement = this.filterInput.parentElement.querySelector('.' + clearIcon);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["detach"])(this.filterInput);
        clearElement.parentElement.insertBefore(this.filterInput, clearElement);
    };
    CheckBoxSelection.prototype.targetElement = function () {
        this.parent.targetInputElement = this.filterInput;
        this.clearIconElement.style.visibility = this.parent.targetInputElement.value === '' ? 'hidden' : 'visible';
        return this.parent.targetInputElement.value;
    };
    CheckBoxSelection.prototype.onBlur = function (e) {
        if (!this.parent.element.classList.contains('e-listbox')) {
            var target = void 0;
            if (this.parent.keyAction) {
                return;
            }
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isIE) {
                target = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(e) && e.target;
            }
            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isIE) {
                target = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(e) && e.relatedTarget;
            }
            if (document.body.contains(this.parent.popupObj.element) && this.parent.popupObj.element.contains(target) && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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 (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 (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);
                this.parent.trigger('blur');
                this.parent.focused = true;
            }
            if (document.body.contains(this.parent.popupObj.element) &&
                !this.parent.popupObj.element.classList.contains('e-popup-close') && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isDevice) {
                this.parent.hidePopup();
            }
        }
    };
    CheckBoxSelection.prototype.onDocumentClick = function (e) {
        var target = e.target;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.parent.popupObj) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(target, '#' + this.parent.popupObj.element.id)) {
            e.preventDefault();
        }
        if (!(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.parent.popupObj) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(target, '#' + this.parent.popupObj.element.id)) &&
            !this.parent.overAllWrapper.contains(e.target)) {
            if (this.parent.overAllWrapper.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_3__["dropDownBaseClasses"].focus) || this.parent.isPopupOpen()) {
                this.parent.inputFocus = false;
                this.parent.scrollFocusStatus = false;
                this.parent.hidePopup();
                this.parent.onBlur();
                this.parent.focused = true;
            }
        }
        else {
            this.parent.scrollFocusStatus = (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isIE || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["Browser"].isIE) {
                this.parent.onBlur();
            }
            else {
                this.parent.onBlur(e);
            }
        }
        if (this.filterInput === target) {
            this.filterInput.focus();
        }
    };
    CheckBoxSelection.prototype.getFocus = function (e) {
        this.parent.overAllWrapper.classList.remove(FOCUS);
        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_2__["EventHandler"].remove(this.parent.list, 'keydown', this.parent.onKeyDown);
        }
        if (e.value === 'clear') {
            this.filterInput.value = '';
            this.clearIconElement.style.visibility = 'hidden';
        }
    };
    CheckBoxSelection.prototype.checkSelectAll = function (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();
        }
    };
    CheckBoxSelection.prototype.setLocale = function (unSelect) {
        if (this.parent.selectAllText !== 'Select All' || this.parent.unSelectAllText !== 'Unselect All') {
            var template = unSelect ? this.parent.unSelectAllText : this.parent.selectAllText;
            var compiledString = void 0;
            this.selectAllSpan.textContent = '';
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["compile"])(template);
            for (var _i = 0, _a = compiledString({}); _i < _a.length; _i++) {
                var item = _a[_i];
                this.selectAllSpan.textContent = item.textContent;
            }
        }
        else {
            var l10nLocale = { selectAllText: 'Select All', unSelectAllText: 'Unselect All' };
            var l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["L10n"](this.parent.getLocaleName(), {}, this.parent.locale);
            if (l10n.getConstant('selectAllText') === '') {
                l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["L10n"]('dropdowns', l10nLocale, this.parent.locale);
            }
            this.selectAllSpan.textContent = unSelect ? l10n.getConstant('unSelectAllText') : l10n.getConstant('selectAllText');
        }
    };
    CheckBoxSelection.prototype.getActiveList = function (args) {
        if (args.li.classList.contains('e-active')) {
            this.activeLi.push(args.li.cloneNode(true));
        }
        else {
            this.activeLi.splice(args.index, 1);
        }
    };
    CheckBoxSelection.prototype.setReorder = function (args) {
        if (this.parent.enableSelectionOrder && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.parent.value)) {
            var activeLiCount = this.parent.ulElement.querySelectorAll('li.e-active').length;
            var remLi = void 0;
            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_2__["append"])(this.parent.ulElement.querySelectorAll('li.e-active'), ulEle);
                remLi = this.parent.ulElement.querySelectorAll('li.e-active');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])(remLi, 'e-reorder-hide');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["prepend"])([ulEle], this.parent.list);
            }
            this.parent.focusAtFirstListItem();
        }
    };
    return CheckBoxSelection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/float-label.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/float-label.js ***!
  \********************************************************************************/
/*! exports provided: createFloatLabel, updateFloatLabelState, removeFloating, setPlaceHolder, floatLabelFocus, floatLabelBlur */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/**
 * 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.innerHTML = inputElement.placeholder;
        inputElement.removeAttribute('placeholder');
    }
    floatLabelElement.innerHTML = 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);
    }
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/index.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/index.js ***!
  \**************************************************************************/
/*! exports provided: MultiSelect, CheckBoxSelection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _multi_select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multi-select */ "./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/multi-select.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelect", function() { return _multi_select__WEBPACK_IMPORTED_MODULE_0__["MultiSelect"]; });

/* harmony import */ var _checkbox_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./checkbox-selection */ "./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/checkbox-selection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckBoxSelection", function() { return _checkbox_selection__WEBPACK_IMPORTED_MODULE_1__["CheckBoxSelection"]; });

/**
 * export all modules from current location
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/multi-select.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/multi-select.js ***!
  \*********************************************************************************/
/*! exports provided: MultiSelect */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiSelect", function() { return MultiSelect; });
/* harmony import */ var _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../drop-down-base/drop-down-base */ "./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_incremental_search__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/incremental-search */ "./node_modules/@syncfusion/ej2-dropdowns/src/common/incremental-search.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _float_label__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./float-label */ "./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/float-label.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>









/* tslint:disable */


/* tslint:enable */
var FOCUS = 'e-input-focus';
var DISABLED = 'e-disabled';
var OVER_ALL_WRAPPER = 'e-multiselect e-input-group';
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 = 'e-chips-collection';
var CHIP = 'e-chips';
var CHIP_CONTENT = 'e-chipcontent';
var CHIP_CLOSE = '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 = 'e-remain';
var CLOSEICON_CLASS = '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 = 'e-ddl-footer';
var HEADER = 'e-ddl-header';
var DISABLE_ICON = 'e-ddl-disable-icon';
var SPINNER_CLASS = 'e-ms-spinner-icon';
var HIDDEN_ELEMENT = 'e-multi-hidden';
var destroy = 'destroy';
var dropdownIcon = 'e-input-group-icon e-ddl-icon';
var iconAnimation = 'e-icon-anim';
var TOTAL_COUNT_WRAPPER = 'e-delim-total';
var BOX_ELEMENT = 'e-multiselect-box';
var FILTERPARENT = 'e-filter-parent';
/**
 * 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 = /** @class */ (function (_super) {
    __extends(MultiSelect, _super);
    /**
     * Constructor for creating the DropDownList widget.
     */
    function MultiSelect(option, element) {
        var _this = _super.call(this, option, element) || this;
        _this.isValidKey = false;
        _this.selectAllEventData = [];
        _this.selectAllEventEle = [];
        _this.scrollFocusStatus = false;
        _this.keyDownStatus = false;
        return _this;
    }
    ;
    MultiSelect.prototype.enableRTL = function (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();
        }
    };
    MultiSelect.prototype.requiredModules = function () {
        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;
    };
    MultiSelect.prototype.updateHTMLAttribute = function () {
        if (Object.keys(this.htmlAttributes).length) {
            for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
                var htmlAttr = _a[_i];
                switch (htmlAttr) {
                    case 'class':
                        this.overAllWrapper.classList.add(this.htmlAttributes[htmlAttr]);
                        this.popupWrapper.classList.add(this.htmlAttributes[htmlAttr]);
                        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;
                }
            }
        }
    };
    MultiSelect.prototype.updateReadonly = function (state) {
        if (state || this.mode === 'CheckBox') {
            this.inputElement.setAttribute('readonly', 'true');
        }
        else {
            this.inputElement.removeAttribute('readonly');
        }
    };
    MultiSelect.prototype.updateClearButton = function (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);
        }
    };
    MultiSelect.prototype.updateCssClass = function () {
        if (this.cssClass) {
            this.popupWrapper.classList.add(this.cssClass);
            this.overAllWrapper.classList.add(this.cssClass);
        }
    };
    MultiSelect.prototype.onPopupShown = function () {
        var _this = this;
        var listItems;
        var mainListItems;
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isDevice && (this.mode === 'CheckBox' && this.allowFiltering)) {
            var proxy_1 = this;
            window.onpopstate = function () {
                proxy_1.hidePopup();
                proxy_1.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) {
                _this.focusAtFirstListItem();
                document.body.appendChild(_this.popupObj.element);
                if (_this.mode === 'CheckBox' || _this.showDropDownIcon) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([_this.overAllWrapper], [iconAnimation]);
                }
                _this.refreshPopup();
                _this.popupObj.show(eventArgs.animation, (_this.zIndex === 1000) ? _this.element : null);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["attributes"])(_this.inputElement, { 'aria-expanded': 'true' });
                if (_this.isFirstClick) {
                    _this.loadTemplate();
                }
            }
        });
    };
    MultiSelect.prototype.updateListItems = function (listItems, mainListItems) {
        for (var i = 0; i < listItems.length; i++) {
            this.findGroupStart(listItems[i]);
            this.findGroupStart(mainListItems[i]);
        }
    };
    MultiSelect.prototype.loadTemplate = function () {
        this.refreshListItems(null);
        if (this.mode === 'CheckBox') {
            this.removeFocus();
        }
        this.notify('reOrder', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', e: this });
    };
    MultiSelect.prototype.setScrollPosition = function () {
        if (((!this.hideSelectedItem && this.mode !== 'CheckBox') || (this.mode === 'CheckBox' && !this.enableSelectionOrder)) &&
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["isNullOrUndefined"])(valueEle)) {
                this.scrollBottom(valueEle);
            }
        }
    };
    MultiSelect.prototype.focusAtFirstListItem = function () {
        if (this.ulElement && this.ulElement.querySelector('li.'
            + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li)) {
            var element = void 0;
            if (this.mode === 'CheckBox') {
                this.removeFocus();
                return;
            }
            else {
                element = this.ulElement.querySelector('li.'
                    + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li + ':not(.'
                    + HIDE_LIST + ')');
            }
            if (element !== null) {
                this.removeFocus();
                this.addListFocus(element);
            }
        }
    };
    MultiSelect.prototype.focusAtLastListItem = function (data) {
        var activeElement;
        if (data) {
            activeElement = Object(_common_incremental_search__WEBPACK_IMPORTED_MODULE_3__["Search"])(data, this.liCollections, 'StartsWith', this.ignoreCase);
        }
        else {
            if (this.value && this.value.length) {
                Object(_common_incremental_search__WEBPACK_IMPORTED_MODULE_3__["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);
        }
    };
    MultiSelect.prototype.getAriaAttributes = function () {
        var ariaAttributes = {
            'aria-disabled': 'false',
            'aria-owns': this.element.id + '_options',
            'role': 'textbox',
            'aria-multiselectable': 'true',
            'aria-activedescendant': 'null',
            'aria-haspopup': 'true',
            'aria-expanded': 'false'
        };
        return ariaAttributes;
    };
    MultiSelect.prototype.updateListARIA = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["attributes"])(this.inputElement, this.getAriaAttributes());
        if (disableStatus) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["attributes"])(this.inputElement, { 'aria-disabled': 'true' });
        }
        this.ensureAriaDisabled((disableStatus) ? 'true' : 'false');
    };
    MultiSelect.prototype.ensureAriaDisabled = function (status) {
        if (this.htmlAttributes && this.htmlAttributes['aria-disabled']) {
            var attr = this.htmlAttributes;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])(attr, { 'aria-disabled': status }, attr);
            this.setProperties({ htmlAttributes: attr }, true);
        }
    };
    MultiSelect.prototype.removelastSelection = function (e) {
        var elements;
        elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP);
        var value = elements[elements.length - 1].getAttribute('data-value');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.value)) {
            this.tempValues = this.value.slice();
        }
        this.removeValue(value, e);
        this.removeChipSelection();
        this.updateDelimeter(this.delimiterChar);
        this.makeTextBoxEmpty();
        if (this.mainList && this.listData) {
            this.refreshSelection();
        }
        this.checkPlaceholderSize();
    };
    MultiSelect.prototype.onActionFailure = function (e) {
        _super.prototype.onActionFailure.call(this, e);
        this.renderPopup();
        this.onPopupShown();
    };
    MultiSelect.prototype.targetElement = function () {
        this.targetInputElement = this.inputElement;
        if (this.mode === 'CheckBox' && this.allowFiltering) {
            this.notify('targetElement', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
        }
        return this.targetInputElement.value;
    };
    MultiSelect.prototype.getForQuery = function (valuecheck) {
        var predicate;
        var field = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_4__["Predicate"](field, 'equal', valuecheck[i]);
            }
            else {
                predicate = predicate.or(field, 'equal', valuecheck[i]);
            }
        }
        return this.getQuery(this.query).where(predicate);
    };
    MultiSelect.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
        _super.prototype.onActionComplete.call(this, ulElement, list, e);
        var proxy = this;
        var valuecheck = [];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["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_4__["DataManager"] && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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);
        }
    };
    MultiSelect.prototype.updateActionList = function (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_2__["isNullOrUndefined"])(this.mainData) && this.mainData.length === 0) {
            this.mainData = list;
        }
        if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering) {
            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_2__["isNullOrUndefined"])(this.setInitialValue)) {
            this.setInitialValue();
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.selectAllAction)) {
            this.selectAllAction();
        }
        if (this.setDynValue) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.text) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.value) || this.value.length === 0)) {
                this.initialTextUpdate();
            }
            this.initialValueUpdate();
            this.initialUpdate();
            this.refreshPlaceHolder();
            this.updateValueState(null, this.value, null);
        }
        this.renderPopup();
        if (this.beforePopupOpen) {
            this.beforePopupOpen = false;
            this.onPopupShown();
        }
    };
    MultiSelect.prototype.refreshSelection = function () {
        var value;
        var element;
        var className = this.hideSelectedItem ?
            HIDE_LIST :
            _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].selected;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.value)) {
            for (var index = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["addClass"])([element], className);
                    if (this.hideSelectedItem && element.previousSibling
                        && element.previousElementSibling.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].group)
                        && (!element.nextElementSibling ||
                            element.nextElementSibling.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].group))) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus)) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([element], _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
                        var listEle = element.parentElement.querySelectorAll('.' +
                            _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li + ':not(.' + HIDE_LIST + ')');
                        if (listEle.length > 0) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([listEle[0]], _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
                        }
                        else {
                            this.ulElement = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
                            this.l10nUpdate();
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([this.list], _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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_2__["isNullOrUndefined"])(ariaValue) || ariaValue === 'false') {
                            var args = {
                                module: 'CheckBoxSelection',
                                enable: this.mode === 'CheckBox',
                                li: element,
                                e: null
                            };
                            this.notify('updatelist', args);
                        }
                    }
                }
            }
        }
        this.checkSelectAll();
        this.checkMaxSelection();
    };
    MultiSelect.prototype.hideGroupItem = function (value) {
        var element;
        var element1;
        var className = this.hideSelectedItem ?
            HIDE_LIST :
            _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li))) {
                temp = false;
            }
            if (!temp || !element || (element.previousElementSibling
                && element.previousElementSibling.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].group))) {
                i = 10;
            }
            else {
                element = element.previousElementSibling;
            }
            if (element1 && element1.nextElementSibling
                && (!element1.nextElementSibling.classList.contains(HIDE_LIST) &&
                    element1.nextElementSibling.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li))) {
                temp1 = false;
            }
            if (!temp1 || !element1 || (element1.nextElementSibling
                && element1.nextElementSibling.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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_2__["addClass"])([element.previousElementSibling], className);
        }
        else if (temp && temp1 && element.previousElementSibling.classList.contains(HIDE_LIST)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([element.previousElementSibling], className);
        }
    };
    MultiSelect.prototype.checkSelectAll = function () {
        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.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li).length;
        var searchActiveCount = this.list.querySelectorAll('li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].selected).length;
        if (this.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.fields.groupBy)) {
            searchActiveCount = searchActiveCount - groupItemLength;
        }
        if ((searchCount === searchActiveCount) && (this.mode === 'CheckBox' && this.showSelectAll)) {
            this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'check' });
        }
        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]);
            }
        }
    };
    MultiSelect.prototype.openClick = function (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();
        }
    };
    MultiSelect.prototype.KeyUp = function (e) {
        var _this = this;
        if (this.mode === 'CheckBox' && !this.openOnClick) {
            var char = String.fromCharCode(e.keyCode);
            var isWordCharacter = char.match(/\w/);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(isWordCharacter)) {
                this.isValidKey = true;
            }
        }
        this.isValidKey = (this.isPopupOpen() && e.keyCode === 8) || this.isValidKey;
        if (this.isValidKey) {
            this.isValidKey = false;
            this.expandTextbox();
            this.showOverAllClear();
            switch (e.keyCode) {
                default:
                    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_1 = {
                                preventDefaultAction: false,
                                text: this.targetElement(),
                                updateData: function (dataSource, query, fields) {
                                    if (eventArgs_1.cancel) {
                                        return;
                                    }
                                    _this.isFiltered = true;
                                    _this.remoteFilterAction = true;
                                    _this.dataUpdater(dataSource, query, fields);
                                },
                                event: e,
                                cancel: false
                            };
                            this.trigger('filtering', eventArgs_1, function (eventArgs) {
                                if (!eventArgs.cancel) {
                                    if (!_this.isFiltered && !eventArgs.preventDefaultAction) {
                                        _this.filterAction = true;
                                        _this.dataUpdater(_this.dataSource, null, _this.fields);
                                    }
                                }
                            });
                        }
                        else if (this.allowCustomValue) {
                            var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]();
                            query = (text !== '') ? query.where(this.fields.text, 'startswith', text, this.ignoreCase, this.ignoreAccent) : query;
                            this.dataUpdater(this.mainData, query, this.fields);
                            break;
                        }
                        else {
                            var liCollections = void 0;
                            liCollections = this.list.querySelectorAll('li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li + ':not(.e-hide-listitem)');
                            var activeElement = Object(_common_incremental_search__WEBPACK_IMPORTED_MODULE_3__["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();
                            }
                        }
                    }
            }
        }
    };
    MultiSelect.prototype.getQuery = function (query) {
        var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["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_4__["DataManager"]) && dataType === 'string' || dataType === 'number') {
                    filterQuery.where('', 'startswith', this.targetElement(), this.ignoreCase, this.ignoreAccent);
                }
                else {
                    var fields = this.fields;
                    filterQuery.where(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(fields.text) ? fields.text : '', 'startswith', this.targetElement(), this.ignoreCase, this.ignoreAccent);
                }
            }
            return filterQuery;
        }
        else {
            return query ? query : this.query ? this.query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]();
        }
    };
    MultiSelect.prototype.dataUpdater = function (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_4__["DataManager"])) {
                    this.checkForCustomValue(query, fields);
                }
                else {
                    this.remoteCustomValue = true;
                    this.tempQuery = query;
                }
            }
        }
        this.refreshPopup();
        if (this.mode === 'CheckBox') {
            this.removeFocus();
        }
    };
    MultiSelect.prototype.checkForCustomValue = function (query, fields) {
        var dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase);
        if (this.allowCustomValue && dataChecks) {
            var value = this.inputElement.value;
            var customData = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["setValue"])(fields.text, value, dataItem);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["setValue"])(fields.value, value, dataItem);
                var tempData = JSON.parse(JSON.stringify(this.listData));
                tempData.splice(0, 0, dataItem);
                this.resetList(tempData, fields ? fields : this.fields, query);
            }
            else {
                var tempData = [this.inputElement.value];
                this.resetList(tempData, fields ? fields : this.fields);
            }
        }
        if (this.value && this.value.length) {
            this.refreshSelection();
        }
    };
    MultiSelect.prototype.getNgDirective = function () {
        return 'EJS-MULTISELECT';
    };
    MultiSelect.prototype.wrapperClick = function (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) {
                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);
                    }
                }
            }
        }
        e.preventDefault();
    };
    MultiSelect.prototype.enable = function (state) {
        if (state) {
            this.overAllWrapper.classList.remove(DISABLED);
            this.inputElement.removeAttribute('disabled');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["attributes"])(this.inputElement, { 'aria-disabled': 'false' });
            this.ensureAriaDisabled('false');
        }
        else {
            this.overAllWrapper.classList.add(DISABLED);
            this.inputElement.setAttribute('disabled', 'true');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["attributes"])(this.inputElement, { 'aria-disabled': 'true' });
            this.ensureAriaDisabled('true');
        }
        if (this.enabled !== state) {
            this.enabled = state;
        }
        this.hidePopup();
    };
    MultiSelect.prototype.onBlur = function (eve) {
        var target;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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();
            }
            return;
        }
        if (this.mode === 'CheckBox' && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isIE && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(eve)) {
            this.inputFocus = false;
            this.overAllWrapper.classList.remove(FOCUS);
            return;
        }
        if (this.scrollFocusStatus) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(eve)) {
                eve.preventDefault();
            }
            this.inputElement.focus();
            this.scrollFocusStatus = false;
            return;
        }
        this.inputFocus = false;
        this.overAllWrapper.classList.remove(FOCUS);
        if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
            this.refreshListItems(null);
            this.updateDelimView();
        }
        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_2__["Browser"].isDevice && this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {
            this.removeChipFocus();
        }
        this.removeChipSelection();
        this.refreshInputHight();
        Object(_float_label__WEBPACK_IMPORTED_MODULE_5__["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_2__["isNullOrUndefined"])(this.mainList)) {
            this.ulElement = this.mainList;
        }
        this.checkPlaceholderSize();
    };
    MultiSelect.prototype.checkPlaceholderSize = function () {
        if (this.showDropDownIcon) {
            var downIconWidth = this.dropIcon.offsetWidth +
                parseInt(window.getComputedStyle(this.dropIcon).marginRight, 10);
            this.setPlaceholderSize(downIconWidth);
        }
    };
    MultiSelect.prototype.setPlaceholderSize = function (downIconWidth) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.value) || this.value.length === 0) {
            this.searchWrapper.style.width = ('calc(100% - ' + (downIconWidth + 10)) + 'px';
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.value)) {
            this.searchWrapper.removeAttribute('style');
        }
    };
    MultiSelect.prototype.refreshInputHight = function () {
        if ((!this.value || !this.value.length) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.text) || this.text === '')) {
            this.searchWrapper.classList.remove(ZERO_SIZE);
        }
        else {
            this.searchWrapper.classList.add(ZERO_SIZE);
        }
    };
    MultiSelect.prototype.validateValues = function (newValue, oldValue) {
        return JSON.stringify(newValue.slice().sort()) !== JSON.stringify(oldValue.slice().sort());
    };
    MultiSelect.prototype.updateValueState = function (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();
        }
    };
    MultiSelect.prototype.updateTempValue = function () {
        if (!this.value) {
            this.tempValues = this.value;
        }
        else {
            this.tempValues = this.value.slice();
        }
    };
    MultiSelect.prototype.getPagingCount = function () {
        var height = this.list.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].noData) ? null :
            getComputedStyle(this.getItems()[0], null).getPropertyValue('height');
        return Math.round(this.list.offsetHeight / parseInt(height, 10));
    };
    MultiSelect.prototype.pageUpSelection = function (steps) {
        var collection = this.list.querySelectorAll('li.'
            + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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')));
    };
    ;
    MultiSelect.prototype.pageDownSelection = function (steps) {
        var list = this.getItems();
        var collection = this.list.querySelectorAll('li.'
            + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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')));
    };
    MultiSelect.prototype.getItems = function () {
        if (!this.list) {
            _super.prototype.render.call(this);
        }
        return this.ulElement ? (this.ulElement.querySelectorAll('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li).length > 0 &&
            this.ulElement.querySelectorAll('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li
                + ':not(.' + HIDE_LIST + ')')) : null;
    };
    MultiSelect.prototype.focusInHandler = function (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);
            }
            Object(_float_label__WEBPACK_IMPORTED_MODULE_5__["floatLabelFocus"])(this.overAllWrapper, this.componentWrapper);
            if (this.isPopupOpen()) {
                this.refreshPopup();
            }
            return true;
        }
        else {
            return false;
        }
    };
    MultiSelect.prototype.showDelimWrapper = function () {
        if (this.mode === 'CheckBox') {
            this.viewWrapper.style.display = '';
        }
        else {
            this.delimiterWrapper.style.display = '';
        }
        this.componentWrapper.classList.add(DELIMITER_VIEW_WRAPPER);
    };
    MultiSelect.prototype.hideDelimWrapper = function () {
        this.delimiterWrapper.style.display = 'none';
        this.componentWrapper.classList.remove(DELIMITER_VIEW_WRAPPER);
    };
    MultiSelect.prototype.expandTextbox = function () {
        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;
        }
    };
    MultiSelect.prototype.isPopupOpen = function () {
        return ((this.popupWrapper !== null) && (this.popupWrapper.parentElement !== null));
    };
    MultiSelect.prototype.refreshPopup = function () {
        if (this.popupObj && this.mobFilter) {
            this.popupObj.setProperties({ width: this.calcPopupWidth() });
            this.popupObj.refreshPosition(this.overAllWrapper);
        }
    };
    MultiSelect.prototype.checkTextLength = function () {
        return this.targetElement().length < 1;
    };
    MultiSelect.prototype.popupKeyActions = function (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;
        }
    };
    MultiSelect.prototype.updateAriaAttribute = function () {
        var focusedItem = this.list.querySelector('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(focusedItem)) {
            this.inputElement.setAttribute('aria-activedescendant', focusedItem.id);
        }
    };
    MultiSelect.prototype.homeNavigation = function (isHome) {
        this.removeFocus();
        var scrollEle = this.ulElement.querySelectorAll('li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li
            + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
        if (scrollEle.length > 0) {
            var element = scrollEle[(isHome) ? 0 : (scrollEle.length - 1)];
            element.classList.add(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
            this.scrollBottom(element);
        }
    };
    MultiSelect.prototype.onKeyDown = function (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('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
            var activeIndex = void 0;
            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();
    };
    MultiSelect.prototype.arrowDown = function (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_2__["EventHandler"].add(this.list, 'keydown', this.onKeyDown, this);
        }
        this.updateAriaAttribute();
    };
    MultiSelect.prototype.arrowUp = function (e) {
        e.preventDefault();
        this.keyAction = true;
        var list = this.list.querySelectorAll('li.'
            + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li
            + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
        if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.fields.groupBy)) {
            list = this.list.querySelectorAll('li.'
                + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li + ',li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].group
                + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
        }
        var focuseElem = this.list.querySelector('li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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();
    };
    MultiSelect.prototype.spaceKeySelection = function (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();
    };
    MultiSelect.prototype.checkBackCommand = function (e) {
        if (e.keyCode === 8 && this.targetElement() === '') {
            this.backCommand = false;
        }
        else {
            this.backCommand = true;
        }
    };
    MultiSelect.prototype.keyNavigation = function (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);
                this.focusAtLastListItem(temp);
            }
        }
    };
    MultiSelect.prototype.selectByKey = function (e) {
        this.removeChipSelection();
        this.selectListByKey(e);
        if (this.hideSelectedItem) {
            this.focusAtFirstListItem();
        }
    };
    MultiSelect.prototype.escapeAction = function () {
        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();
    };
    MultiSelect.prototype.scrollBottom = function (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_2__["isUndefined"])(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;
        }
    };
    MultiSelect.prototype.scrollTop = function (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_2__["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_2__["isUndefined"])(this.fixedHeaderElement) ?
                this.fixedHeaderElement.offsetHeight : 0);
        }
    };
    MultiSelect.prototype.selectListByKey = function (e) {
        var li = this.list.querySelector('li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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);
                    this.refreshInputHight();
                    if (this.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.fields.groupBy)) {
                        target = li.firstElementChild.lastElementChild;
                        this.findGroupStart(target);
                    }
                }
                else {
                    this.updateDelimeter(this.delimiterChar);
                }
                this.makeTextBoxEmpty();
                if (this.mode !== 'CheckBox') {
                    this.refreshListItems(li.textContent);
                }
                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();
    };
    MultiSelect.prototype.refreshListItems = function (data) {
        if ((this.allowFiltering || (this.mode === 'CheckBox' && this.enableSelectionOrder === true)
            || this.allowCustomValue) && this.mainList && this.listData) {
            var list = void 0;
            if (this.sortOrder === 'Descending' || this.sortOrder === 'Ascending') {
                list = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
            }
            else {
                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();
            }
        }
    };
    MultiSelect.prototype.removeSelectedChip = function (e) {
        var selectedElem = this.chipCollectionWrapper.querySelector('span.' + CHIP_SELECTED);
        var temp;
        if (selectedElem !== null) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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();
    };
    MultiSelect.prototype.moveByTop = function (state) {
        var elements = this.list.querySelectorAll('li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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();
    };
    MultiSelect.prototype.moveByList = function (position) {
        if (this.list) {
            var elements = this.list.querySelectorAll('li.'
                + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li
                + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
            if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.fields.groupBy)) {
                elements = this.list.querySelectorAll('li.'
                    + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li + ',li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].group
                    + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
            }
            var selectedElem = this.list.querySelector('li.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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);
                    }
                }
            }
        }
    };
    MultiSelect.prototype.updateCheck = function (element) {
        if (this.mode === 'CheckBox' && this.enableGroupCheckBox &&
            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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');
            }
        }
    };
    MultiSelect.prototype.moveBy = function (position, e) {
        var elements;
        var selectedElem;
        var temp;
        elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP);
        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);
                }
            }
        }
    };
    MultiSelect.prototype.chipClick = function (e) {
        if (this.enabled) {
            var elem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(e.target, '.' + CHIP);
            this.removeChipSelection();
            this.addChipSelection(elem, e);
        }
    };
    MultiSelect.prototype.removeChipSelection = function () {
        if (this.chipCollectionWrapper) {
            this.removeChipFocus();
        }
    };
    MultiSelect.prototype.addChipSelection = function (element, e) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([element], CHIP_SELECTED);
        this.trigger('chipSelection', e);
    };
    MultiSelect.prototype.onChipRemove = function (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_2__["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_2__["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);
            if (this.placeholder && this.floatLabelType === 'Never') {
                this.makeTextBoxEmpty();
                this.checkPlaceholderSize();
            }
            else {
                this.inputElement.value = '';
            }
            e.preventDefault();
        }
    };
    MultiSelect.prototype.makeTextBoxEmpty = function () {
        this.inputElement.value = '';
        this.refreshPlaceHolder();
    };
    MultiSelect.prototype.refreshPlaceHolder = function () {
        if (this.placeholder && this.floatLabelType === 'Never') {
            if ((this.value && this.value.length) || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.text) && this.text !== '')) {
                this.inputElement.placeholder = '';
            }
            else {
                this.inputElement.placeholder = this.placeholder;
            }
        }
        else {
            this.setFloatLabelType();
        }
        this.expandTextbox();
    };
    MultiSelect.prototype.removeValue = function (value, eve, length, isClearAll) {
        var _this = this;
        var index = this.value.indexOf(this.getFormattedValue(value));
        var isValueTemp = (this.valueTemplate) ? true : false;
        this.DropDownBaseresetBlazorTemplates(false, false, false, false, isValueTemp, false, false);
        if (index === -1 && this.allowCustomValue && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(value)) {
            index = this.value.indexOf(value.toString());
        }
        var className = this.hideSelectedItem ?
            HIDE_LIST :
            _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].selected;
        if (index !== -1) {
            var element_1 = this.findListElement(this.list, 'li', 'data-value', value);
            var val_1 = this.getDataByValue(value);
            var eventArgs = {
                e: eve,
                item: element_1,
                itemData: val_1,
                isInteracted: eve ? true : false,
                cancel: false
            };
            this.trigger('removing', eventArgs, function (eventArgs) {
                if (eventArgs.cancel) {
                    _this.removeIndex++;
                }
                else {
                    var removeVal = _this.value.slice(0);
                    removeVal.splice(index, 1);
                    _this.setProperties({ value: [].concat([], removeVal) }, true);
                    if (element_1 !== null) {
                        var hideElement = _this.findListElement(_this.mainList, 'li', 'data-value', value);
                        element_1.setAttribute('aria-selected', 'false');
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([element_1], className);
                        if (hideElement) {
                            hideElement.setAttribute('aria-selected', 'false');
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([element_1, hideElement], className);
                        }
                        _this.notify('activeList', {
                            module: 'CheckBoxSelection',
                            enable: _this.mode === 'CheckBox', li: element_1,
                            e: _this, index: index
                        });
                        _this.notify('updatelist', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', li: element_1, e: eve });
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["attributes"])(_this.inputElement, { 'aria-activedescendant': element_1.id });
                        if ((_this.value.length !== _this.mainData.length) && (_this.mode === 'CheckBox' && _this.showSelectAll)) {
                            _this.notify('checkSelectAll', { module: 'CheckBoxSelection',
                                enable: _this.mode === 'CheckBox',
                                value: 'uncheck' });
                        }
                    }
                    if (_this.hideSelectedItem && _this.fields.groupBy) {
                        _this.hideGroupItem(value);
                    }
                    _this.updateMainList(true, value);
                    _this.removeChip(value);
                    _this.updateChipStatus();
                    var limit = _this.value && _this.value.length ? _this.value.length : 0;
                    if (limit < _this.maximumSelectionLength) {
                        var collection = _this.list.querySelectorAll('li.'
                            + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li + ':not(.e-active)');
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])(collection, 'e-disable');
                    }
                    _this.trigger('removed', eventArgs);
                    if (length) {
                        _this.selectAllEventData.push(val_1);
                        _this.selectAllEventEle.push(element_1);
                    }
                    if (length === 1) {
                        var args = {
                            event: eve,
                            items: _this.selectAllEventEle,
                            itemData: _this.selectAllEventData,
                            isInteracted: eve ? true : false,
                            isChecked: false
                        };
                        _this.trigger('selectedAll', args);
                        _this.selectAllEventData = [];
                        _this.selectAllEventEle = [];
                    }
                    if (isClearAll) {
                        _this.clearAllCallback(eve);
                    }
                }
            });
        }
    };
    MultiSelect.prototype.updateMainList = function (state, value) {
        if (this.allowFiltering) {
            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_2__["removeClass"])([element2], this.hideSelectedItem ?
                        HIDE_LIST :
                        _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].selected);
                    if (this.mode === 'CheckBox') {
                        element2.firstElementChild.setAttribute('aria-checked', 'false');
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([element2.firstElementChild.lastElementChild], 'e-check');
                    }
                }
                else {
                    element2.setAttribute('aria-selected', 'true');
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([element2], this.hideSelectedItem ?
                        HIDE_LIST :
                        _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].selected);
                    if (this.mode === 'CheckBox') {
                        element2.firstElementChild.setAttribute('aria-checked', 'true');
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([element2.firstElementChild.lastElementChild], 'e-check');
                    }
                }
            }
        }
    };
    MultiSelect.prototype.removeChip = function (value) {
        if (this.chipCollectionWrapper) {
            var element = this.findListElement(this.chipCollectionWrapper, 'span', 'data-value', value);
            if (element) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["remove"])(element);
            }
        }
    };
    MultiSelect.prototype.updateChipStatus = function () {
        if (this.value.length) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["isNullOrUndefined"])(this.chipCollectionWrapper)) {
                this.chipCollectionWrapper.style.display = 'none';
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.delimiterWrapper)) {
                (this.delimiterWrapper.style.display = 'none');
            }
            this.hideOverAllClear();
        }
    };
    MultiSelect.prototype.addValue = function (value, text, eve) {
        if (!this.value) {
            this.value = [];
        }
        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();
    };
    MultiSelect.prototype.checkMaxSelection = function () {
        var limit = this.value && this.value.length ? this.value.length : 0;
        if (limit === this.maximumSelectionLength) {
            var collection = this.list.querySelectorAll('li.'
                + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li + ':not(.e-active)');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])(collection, 'e-disable');
        }
    };
    MultiSelect.prototype.dispatchSelect = function (value, eve, element, isNotTrigger, length) {
        var _this = this;
        if (this.initStatus && !isNotTrigger) {
            var val_2 = this.getDataByValue(value);
            var eventArgs = {
                e: eve,
                item: element,
                itemData: val_2,
                isInteracted: eve ? true : false,
                cancel: false
            };
            this.trigger('select', eventArgs, function (eventArgs) {
                if (!eventArgs.cancel) {
                    if (length) {
                        _this.selectAllEventData.push(val_2);
                        _this.selectAllEventEle.push(element);
                    }
                    if (length === 1) {
                        var args = {
                            event: eve,
                            items: _this.selectAllEventEle,
                            itemData: _this.selectAllEventData,
                            isInteracted: eve ? true : false,
                            isChecked: true
                        };
                        _this.trigger('selectedAll', args);
                        _this.selectAllEventData = [];
                    }
                    _this.updateListSelectEventCallback(value, element, eve);
                }
            });
        }
    };
    MultiSelect.prototype.addChip = function (text, value, e) {
        if (this.chipCollectionWrapper) {
            this.getChip(text, value, e);
        }
    };
    MultiSelect.prototype.removeChipFocus = function () {
        var elements;
        var closeElements;
        elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP);
        closeElements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP_CLOSE.split(' ')[0]);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])(elements, CHIP_SELECTED);
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isDevice) {
            for (var index = 0; index < closeElements.length; index++) {
                closeElements[index].style.display = 'none';
            }
        }
    };
    MultiSelect.prototype.onMobileChipInteraction = function (e) {
        var chipElem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(e.target, '.' + CHIP);
        var chipClose = chipElem.querySelector('span.' + CHIP_CLOSE.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();
        }
    };
    MultiSelect.prototype.getChip = function (data, value, e) {
        var _this = this;
        var itemData = { text: value, value: value };
        var chip = this.createElement('span', {
            className: CHIP,
            attrs: { 'data-value': value, 'title': data }
        });
        var chipContent = this.createElement('span', { className: CHIP_CONTENT });
        var chipClose = this.createElement('span', { className: CHIP_CLOSE });
        if (this.mainData) {
            itemData = this.getDataByValue(value);
        }
        if (this.valueTemplate && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(itemData)) {
            this.DropDownBaseresetBlazorTemplates(false, false, false, false, true, false, false);
            var compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["compile"])(this.valueTemplate);
            for (var _i = 0, _a = compiledString(itemData, null, null, this.valueTemplateId, this.isStringTemplate); _i < _a.length; _i++) {
                var item = _a[_i];
                chipContent.appendChild(item);
            }
            this.DropDownBaseupdateBlazorTemplates(false, false, false, false, true, false, false);
        }
        else {
            chipContent.innerHTML = data;
        }
        chip.appendChild(chipContent);
        var eventArgs = {
            isInteracted: e ? true : false,
            itemData: itemData,
            e: e,
            setClass: function (classes) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([chip], classes);
            },
            cancel: false
        };
        this.trigger('tagging', eventArgs, function (eventArgs) {
            if (!eventArgs.cancel) {
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isDevice) {
                    chip.classList.add(MOBILE_CHIP);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["append"])([chipClose], chip);
                    chipClose.style.display = 'none';
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(chip, 'click', _this.onMobileChipInteraction, _this);
                }
                else {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(chip, 'mousedown', _this.chipClick, _this);
                    if (_this.showClearButton) {
                        chip.appendChild(chipClose);
                    }
                }
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(chipClose, 'mousedown', _this.onChipRemove, _this);
                _this.chipCollectionWrapper.appendChild(chip);
            }
        });
    };
    MultiSelect.prototype.calcPopupWidth = function () {
        var width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["formatUnit"])(this.popupWidth);
        if (width.indexOf('%') > -1) {
            var inputWidth = (this.componentWrapper.offsetWidth) * parseFloat(width) / 100;
            width = inputWidth.toString() + 'px';
        }
        return width;
    };
    MultiSelect.prototype.mouseIn = function () {
        if (this.enabled && !this.readonly) {
            this.showOverAllClear();
        }
    };
    MultiSelect.prototype.mouseOut = function () {
        if (!this.inputFocus) {
            this.overAllClear.style.display = 'none';
        }
    };
    MultiSelect.prototype.listOption = function (dataSource, fields) {
        var iconCss = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(fields.iconCss) ? false : true;
        var fieldProperty = 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_2__["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;
    };
    MultiSelect.prototype.renderPopup = function () {
        var _this = this;
        if (!this.list) {
            _super.prototype.render.call(this);
        }
        if (!this.popupObj) {
            var args = { cancel: false };
            this.trigger('beforeOpen', args, function (args) {
                if (!args.cancel) {
                    document.body.appendChild(_this.popupWrapper);
                    var checkboxFilter = _this.popupWrapper.querySelector('.' + FILTERPARENT);
                    if (_this.mode === 'CheckBox' && !_this.allowFiltering && checkboxFilter && _this.filterParent) {
                        checkboxFilter.remove();
                        _this.filterParent = null;
                    }
                    var overAllHeight = parseInt(_this.popupHeight, 10);
                    _this.popupWrapper.style.visibility = 'hidden';
                    if (_this.headerTemplate) {
                        _this.setHeaderTemplate();
                        overAllHeight -= _this.header.offsetHeight;
                    }
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["append"])([_this.list], _this.popupWrapper);
                    if (_this.footerTemplate) {
                        _this.setFooterTemplate();
                        overAllHeight -= _this.footer.offsetHeight;
                    }
                    if (_this.mode === 'CheckBox' && _this.showSelectAll) {
                        _this.notify('selectAll', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox' });
                        overAllHeight -= _this.selectAllHeight;
                    }
                    else if (_this.mode === 'CheckBox' && !_this.showSelectAll && (!_this.headerTemplate || !_this.footerTemplate)) {
                        _this.notify('selectAll', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox' });
                        overAllHeight = parseInt(_this.popupHeight, 10);
                    }
                    else if (_this.mode === 'CheckBox' && !_this.showSelectAll) {
                        _this.notify('selectAll', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox' });
                        overAllHeight = parseInt(_this.popupHeight, 10);
                        if (_this.headerTemplate && _this.header) {
                            overAllHeight -= _this.header.offsetHeight;
                        }
                        if (_this.footerTemplate && _this.footer) {
                            overAllHeight -= _this.footer.offsetHeight;
                        }
                    }
                    if (_this.mode === 'CheckBox') {
                        var args_1 = {
                            module: 'CheckBoxSelection',
                            enable: _this.mode === 'CheckBox',
                            popupElement: _this.popupWrapper
                        };
                        if (_this.allowFiltering) {
                            _this.notify('searchBox', args_1);
                            overAllHeight -= _this.searchBoxHeight;
                        }
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([_this.popupWrapper], 'e-checkbox');
                    }
                    if (_this.popupHeight !== 'auto') {
                        _this.list.style.maxHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["formatUnit"])(overAllHeight);
                        _this.popupWrapper.style.maxHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["formatUnit"])(_this.popupHeight);
                    }
                    else {
                        _this.list.style.maxHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["formatUnit"])(_this.popupHeight);
                    }
                    _this.popupObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["Popup"](_this.popupWrapper, {
                        width: _this.calcPopupWidth(), targetType: 'relative', position: { X: 'left', Y: 'bottom' },
                        relateTo: _this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
                        enableRtl: _this.enableRtl, zIndex: _this.zIndex,
                        close: function () {
                            if (_this.popupObj.element.parentElement) {
                                _this.popupObj.unwireScrollEvents();
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["detach"])(_this.popupObj.element);
                            }
                        },
                        open: function () {
                            if (!_this.isFirstClick) {
                                var ulElement = _this.list.querySelector('ul');
                                if (ulElement) {
                                    var isBlazor = Object.keys(window).indexOf('Blazor') >= 0;
                                    if (_this.itemTemplate && (_this.mode === 'CheckBox') && isBlazor) {
                                        setTimeout(function () {
                                            _this.mainList = _this.ulElement;
                                        }, 0);
                                    }
                                    else {
                                        _this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
                                    }
                                }
                                _this.isFirstClick = true;
                            }
                            _this.popupObj.wireScrollEvents();
                            _this.loadTemplate();
                            _this.setScrollPosition();
                            if (_this.allowFiltering) {
                                _this.notify('inputFocus', {
                                    module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', value: 'focus'
                                });
                            }
                        }
                    });
                    _this.popupObj.close();
                    _this.popupWrapper.style.visibility = '';
                    if (_this.mode === 'CheckBox' && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isDevice && _this.allowFiltering) {
                        _this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox' });
                    }
                }
            });
        }
    };
    MultiSelect.prototype.setHeaderTemplate = function () {
        var compiledString;
        if (this.header) {
            this.header.remove();
        }
        this.header = this.createElement('div');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([this.header], HEADER);
        compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["compile"])(this.headerTemplate);
        var elements = compiledString({}, null, null, 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_2__["prepend"])([this.header], this.popupWrapper);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["append"])([this.header], this.popupWrapper);
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.header, 'mousedown', this.onListMouseDown, this);
    };
    MultiSelect.prototype.setFooterTemplate = function () {
        var compiledString;
        if (this.footer) {
            this.footer.remove();
        }
        this.footer = this.createElement('div');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([this.footer], FOOTER);
        compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["compile"])(this.footerTemplate);
        var elements = compiledString({}, null, null, 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_2__["append"])([this.footer], this.popupWrapper);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.footer, 'mousedown', this.onListMouseDown, this);
    };
    MultiSelect.prototype.ClearAll = function (e) {
        if (this.enabled && !this.readonly) {
            var temp = void 0;
            if (this.value) {
                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);
                }
            }
            else {
                this.clearAllCallback(e);
            }
        }
    };
    MultiSelect.prototype.clearAllCallback = function (e) {
        var tempValues = this.value ? this.value.slice() : [];
        if (this.mainList && this.listData && this.allowFiltering) {
            var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
            this.onActionComplete(list, this.mainData);
        }
        this.focusAtFirstListItem();
        this.updateDelimeter(this.delimiterChar);
        if (this.mode !== 'Box' && (!this.inputFocus || this.mode === 'CheckBox')) {
            this.updateDelimView();
        }
        this.makeTextBoxEmpty();
        this.checkPlaceholderSize();
        if (this.isPopupOpen()) {
            this.refreshPopup();
        }
        if (!this.inputFocus) {
            this.updateValueState(e, this.value, tempValues);
            if (this.mode !== 'CheckBox') {
                this.inputElement.focus();
            }
        }
        if (this.mode === 'CheckBox') {
            this.refreshPlaceHolder();
            this.refreshInputHight();
        }
        if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.fields.groupBy)) {
            this.updateListItems(this.list.querySelectorAll('li.e-list-item'), this.mainList.querySelectorAll('li.e-list-item'));
        }
        e.preventDefault();
    };
    MultiSelect.prototype.windowResize = function () {
        this.refreshPopup();
        if ((!this.inputFocus || this.mode === 'CheckBox') && this.viewWrapper && this.viewWrapper.parentElement) {
            this.updateDelimView();
        }
    };
    MultiSelect.prototype.resetValueHandler = function (e) {
        var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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;
        }
    };
    MultiSelect.prototype.wireEvent = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.componentWrapper, 'mousedown', this.wrapperClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(window, 'resize', this.windowResize, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.inputElement, 'focus', this.focusInHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.inputElement, 'keydown', this.onKeyDown, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.inputElement, 'keyup', this.KeyUp, this);
        if (this.mode !== 'CheckBox') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.inputElement, 'input', this.onInput, this);
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.inputElement, 'blur', this.onBlur, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.componentWrapper, 'mousemove', this.mouseIn, this);
        var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(this.inputElement, 'form');
        if (formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(formElement, 'reset', this.resetValueHandler, this);
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.componentWrapper, 'mouseout', this.mouseOut, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.overAllClear, 'mouseup', this.ClearAll, this);
    };
    MultiSelect.prototype.onInput = function () {
        if (this.keyDownStatus) {
            this.isValidKey = true;
        }
        else {
            this.isValidKey = false;
        }
        this.keyDownStatus = false;
    };
    MultiSelect.prototype.preRender = function () {
        if (this.allowFiltering === null) {
            this.allowFiltering = (this.mode === 'CheckBox') ? true : false;
        }
        this.initializeData();
        this.updateDataAttribute(this.htmlAttributes);
        _super.prototype.preRender.call(this);
    };
    MultiSelect.prototype.getLocaleName = function () {
        return 'multi-select';
    };
    ;
    MultiSelect.prototype.initializeData = function () {
        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;
    };
    MultiSelect.prototype.updateData = function (delimiterChar) {
        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_2__["isNullOrUndefined"])(this.value)) {
            for (var index = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.value[index]); index++) {
                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.delimiterWrapper.innerHTML = data;
        }
        this.listData = tempData;
    };
    MultiSelect.prototype.initialTextUpdate = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["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);
        }
    };
    MultiSelect.prototype.renderList = function (isEmptyData) {
        _super.prototype.render.call(this, isEmptyData);
        this.wireListEvents();
    };
    MultiSelect.prototype.initialValueUpdate = function () {
        if (this.list) {
            var text = void 0;
            var textField = void 0;
            var valueField = void 0;
            var element = void 0;
            var value = void 0;
            if (this.chipCollectionWrapper) {
                this.chipCollectionWrapper.innerHTML = '';
            }
            this.removeListSelection();
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.value)) {
                for (var index = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["setValue"])(this.fields.text, value, newValue);
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["setValue"])(this.fields.value, value, newValue);
                        var noDataEle = this.popupWrapper.querySelector('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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();
                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_2__["isNullOrUndefined"])(this.value) || !this.value.length)) {
                this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });
            }
            if (!this.inputFocus) {
                if (this.mode === 'Box') {
                    this.chipCollectionWrapper.style.display = '';
                }
                else if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {
                    this.showDelimWrapper();
                }
            }
        }
    };
    MultiSelect.prototype.updateActionCompleteData = function (li, item) {
        if (this.value && this.value.indexOf(li.getAttribute('data-value')) > -1) {
            this.mainList = this.ulElement;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([li], HIDE_LIST);
        }
    };
    MultiSelect.prototype.isValidLI = function (li) {
        return (li && !li.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].disabled) && !li.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].group) &&
            li.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li));
    };
    ;
    MultiSelect.prototype.updateListSelection = function (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_2__["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);
        }
    };
    MultiSelect.prototype.updateListSelectEventCallback = function (value, li, e) {
        var _this = 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);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["append"])([temp], this.mainList);
            this.mainData.push(data);
            var eventArgs = {
                newData: data,
                cancel: false
            };
            this.trigger('customValueSelection', eventArgs, function (eventArgs) {
                if (!eventArgs.cancel) {
                    _this.remoteCustomValue = false;
                    _this.addValue(value, text, e);
                }
            });
        }
        else {
            this.remoteCustomValue = false;
            this.addValue(value, text, e);
        }
    };
    MultiSelect.prototype.removeListSelection = function () {
        var className = this.hideSelectedItem ?
            HIDE_LIST :
            _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].selected;
        var selectedItems = this.list.querySelectorAll('.' + className);
        var temp = selectedItems.length;
        if (selectedItems && selectedItems.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])(selectedItems, className);
            while (temp > 0) {
                selectedItems[temp - 1].setAttribute('aria-selected', 'false');
                temp--;
            }
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.mainList)) {
            var selectItems = this.mainList.querySelectorAll('.' + className);
            var temp1 = selectItems.length;
            if (selectItems && selectItems.length) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["removeClass"])([selectedItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
                        }
                        selectItems[temp1 - 1].firstElementChild.setAttribute('aria-checked', 'false');
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([selectItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
                    }
                    temp1--;
                }
            }
        }
    };
    ;
    MultiSelect.prototype.removeHover = function () {
        var hoveredItem = this.list.querySelectorAll('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].hover);
        if (hoveredItem && hoveredItem.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])(hoveredItem, _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].hover);
        }
    };
    ;
    MultiSelect.prototype.removeFocus = function () {
        if (this.list) {
            var hoveredItem = this.list.querySelectorAll('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
            var mainlist = this.mainList.querySelectorAll('.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
            if (hoveredItem && hoveredItem.length) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])(hoveredItem, _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])(mainlist, _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
            }
        }
    };
    ;
    MultiSelect.prototype.addListHover = function (li) {
        if (this.enabled && this.isValidLI(li)) {
            this.removeHover();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([li], _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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_2__["isNullOrUndefined"])(this.fields.groupBy)) {
                this.removeHover();
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([li], _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].hover);
            }
        }
    };
    ;
    MultiSelect.prototype.addListFocus = function (element) {
        if (this.enabled && this.isValidLI(element)) {
            this.removeFocus();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([element], _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
        }
        else {
            if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.fields.groupBy)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([element], _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].focus);
            }
        }
    };
    MultiSelect.prototype.addListSelection = function (element) {
        var className = this.hideSelectedItem ?
            HIDE_LIST :
            _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].selected;
        if (this.isValidLI(element) && !element.classList.contains(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].hover)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["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_2__["attributes"])(this.inputElement, { 'aria-activedescendant': element.id });
        }
    };
    MultiSelect.prototype.updateDelimeter = function (delimChar) {
        this.updateData(delimChar);
    };
    MultiSelect.prototype.onMouseClick = function (e) {
        this.scrollFocusStatus = false;
        var target = e.target;
        var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(target, '.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li);
        var listElement;
        if (!li && 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');
                target.setAttribute('aria-selected', 'false');
            }
            else {
                this.selectAllItem(true, e);
                target.classList.remove('e-stop');
                target.classList.add('e-check');
                target.setAttribute('aria-selected', 'true');
            }
            this.refreshSelection();
        }
        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.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);
                    this.refreshInputHight();
                }
                else {
                    this.updateDelimeter(this.delimiterChar);
                }
                this.checkSelectAll();
                this.refreshPopup();
                if (this.hideSelectedItem) {
                    this.focusAtFirstListItem();
                }
                if (this.closePopupOnSelect) {
                    this.hidePopup();
                }
                else {
                    e.preventDefault();
                }
                this.makeTextBoxEmpty();
            }
            else {
                e.preventDefault();
            }
            if (this.mode !== 'CheckBox') {
                this.refreshListItems(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(li) ? null : li.textContent);
            }
            this.refreshPlaceHolder();
            this.checkPlaceholderSize();
            this.findGroupStart(target);
        }
    };
    MultiSelect.prototype.findGroupStart = function (target) {
        if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.fields.groupBy)) {
            var count = 0;
            var liChecked = 0;
            var liUnchecked = 0;
            var groupValues = void 0;
            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]);
        }
    };
    MultiSelect.prototype.findGroupAttrtibutes = function (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];
    };
    MultiSelect.prototype.updateCheckBox = function (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');
            groupHeader.setAttribute('aria-selected', 'true');
        }
        else if (count === unChecked) {
            checkBoxElement.classList.remove('e-check');
            checkBoxElement.classList.remove('e-stop');
            groupHeader.setAttribute('aria-selected', 'false');
        }
        else {
            checkBoxElement.classList.remove('e-check');
            checkBoxElement.classList.add('e-stop');
            groupHeader.setAttribute('aria-selected', 'false');
        }
    };
    MultiSelect.prototype.onMouseOver = function (e) {
        var currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(e.target, '.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].li);
        if (currentLi === null && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.fields.groupBy)
            && this.enableGroupCheckBox) {
            currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(e.target, '.' + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["dropDownBaseClasses"].group);
        }
        this.addListHover(currentLi);
    };
    MultiSelect.prototype.onMouseLeave = function (e) {
        this.removeHover();
    };
    MultiSelect.prototype.onListMouseDown = function (e) {
        e.preventDefault();
        this.scrollFocusStatus = true;
    };
    MultiSelect.prototype.onDocumentClick = function (e) {
        if (this.mode !== 'CheckBox') {
            var target = e.target;
            if (!(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.popupObj) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(target, '#' + this.popupObj.element.id)) &&
                !this.overAllWrapper.contains(e.target)) {
                this.scrollFocusStatus = false;
            }
            else {
                this.scrollFocusStatus = (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isIE || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].info.name === 'edge') && (document.activeElement === this.inputElement);
            }
        }
    };
    MultiSelect.prototype.wireListEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(document, 'mousedown', this.onDocumentClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.list, 'mousedown', this.onListMouseDown, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.list, 'mouseup', this.onMouseClick, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.list, 'mouseover', this.onMouseOver, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].add(this.list, 'mouseout', this.onMouseLeave, this);
    };
    ;
    MultiSelect.prototype.unwireListEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(document, 'mousedown', this.onDocumentClick);
        if (this.list) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.list, 'mousedown', this.onListMouseDown);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.list, 'mouseup', this.onMouseClick);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.list, 'mouseover', this.onMouseOver);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.list, 'mouseout', this.onMouseLeave);
        }
    };
    ;
    MultiSelect.prototype.hideOverAllClear = function () {
        if (!this.value || !this.value.length || this.inputElement.value === '') {
            this.overAllClear.style.display = 'none';
        }
    };
    MultiSelect.prototype.showOverAllClear = function () {
        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
     */
    MultiSelect.prototype.focusIn = function () {
        if (document.activeElement !== this.inputElement && this.enabled) {
            this.inputElement.focus();
        }
    };
    /**
     * Remove the focus from widget, if the widget is in focus state.
     * @returns void
     */
    MultiSelect.prototype.focusOut = function () {
        if (document.activeElement === this.inputElement && this.enabled) {
            this.inputElement.blur();
        }
    };
    /**
     * Shows the spinner loader.
     * @returns void.
     */
    MultiSelect.prototype.showSpinner = function () {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.spinnerElement)) {
            if (this.overAllClear.style.display !== 'none') {
                this.spinnerElement = this.overAllClear;
            }
            else {
                this.spinnerElement = this.createElement('span', { className: CLOSEICON_CLASS + ' ' + SPINNER_CLASS });
                this.componentWrapper.appendChild(this.spinnerElement);
            }
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["createSpinner"])({ target: this.spinnerElement, width: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isDevice ? '16px' : '14px' }, this.createElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([this.spinnerElement], DISABLE_ICON);
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["showSpinner"])(this.spinnerElement);
        }
    };
    /**
     * Hides the spinner loader.
     * @returns void.
     */
    MultiSelect.prototype.hideSpinner = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.spinnerElement)) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["hideSpinner"])(this.spinnerElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([this.spinnerElement], DISABLE_ICON);
            if (this.spinnerElement.classList.contains(SPINNER_CLASS)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["detach"])(this.spinnerElement);
            }
            else {
                this.spinnerElement.innerHTML = '';
            }
            this.spinnerElement = null;
        }
    };
    MultiSelect.prototype.updateDelimView = function () {
        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);
        if (this.value && this.value.length) {
            var data = '';
            var temp = void 0;
            var tempData = void 0;
            var tempIndex = 1;
            var wrapperleng = void 0;
            var remaining = void 0;
            var downIconWidth = 0;
            var overAllContainer = void 0;
            this.viewWrapper.innerHTML = '';
            var l10nLocale = {
                noRecordsTemplate: 'No Records Found',
                actionFailureTemplate: 'The Request Failed',
                overflowCountTemplate: '+${count} more..',
                totalCountTemplate: '${count} selected'
            };
            var l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["L10n"](this.getLocaleName(), {}, this.locale);
            if (l10n.getConstant('actionFailureTemplate') === '') {
                l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["L10n"]('dropdowns', l10nLocale, this.locale);
            }
            var remainContent = l10n.getConstant('overflowCountTemplate');
            var raminElement = this.createElement('span', {
                className: REMAIN_WRAPPER
            });
            var compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["compile"])(remainContent);
            var totalCompiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["compile"])(l10n.getConstant('totalCountTemplate'));
            raminElement.appendChild(compiledString({ 'count': this.value.length })[0]);
            this.viewWrapper.appendChild(raminElement);
            var remainSize = raminElement.offsetWidth;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["remove"])(raminElement);
            if (this.showDropDownIcon) {
                downIconWidth = this.dropIcon.offsetWidth +
                    parseInt(window.getComputedStyle(this.dropIcon).marginRight, 10);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.value)) {
                for (var index = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.value[index]); index++) {
                    data += (index === 0) ? '' : this.delimiterChar + ' ';
                    temp = this.getOverflowVal(index);
                    data += temp;
                    temp = this.viewWrapper.innerHTML;
                    this.viewWrapper.innerHTML = 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.viewWrapper.innerHTML = 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);
                            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';
        }
    };
    MultiSelect.prototype.updateRemainWidth = function (viewWrapper, totalWidth) {
        if (viewWrapper.classList.contains(TOTAL_COUNT_WRAPPER) && totalWidth < (viewWrapper.offsetWidth +
            parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10)
            + parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10))) {
            viewWrapper.style.width = totalWidth + 'px';
        }
    };
    MultiSelect.prototype.updateRemainTemplate = function (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 })[0] :
            totalCompiledString({ 'count': remaining })[0]);
        if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) {
            viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER);
        }
        else {
            viewWrapper.classList.add(TOTAL_COUNT_WRAPPER);
            this.updateRemainWidth(viewWrapper, totalWidth);
        }
        return raminElement;
    };
    MultiSelect.prototype.updateRemainingText = function (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);
        }
    };
    MultiSelect.prototype.getOverflowVal = function (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;
    };
    MultiSelect.prototype.unWireEvent = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.componentWrapper, 'mousedown', this.wrapperClick);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(window, 'resize', this.windowResize);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.inputElement, 'focus', this.focusInHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.inputElement, 'keydown', this.onKeyDown);
        if (this.mode !== 'CheckBox') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.inputElement, 'input', this.onInput);
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.inputElement, 'keyup', this.KeyUp);
        var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["closest"])(this.inputElement, 'form');
        if (formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(formElement, 'reset', this.resetValueHandler);
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.inputElement, 'blur', this.onBlur);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.componentWrapper, 'mousemove', this.mouseIn);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.componentWrapper, 'mouseout', this.mouseOut);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(this.overAllClear, 'mousedown', this.ClearAll);
    };
    MultiSelect.prototype.selectAllItem = function (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.enableGroupCheckBox && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.fields.groupBy)) {
            var target = event.target;
            target = (event.keyCode === 32) ? list : target;
            target = (target.classList.contains('e-frame')) ? target.parentElement.parentElement : target;
            if (target.classList.contains('e-list-group-item')) {
                var listElement = target.nextElementSibling;
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(listElement)) {
                    return;
                }
                while (listElement.classList.contains('e-list-item')) {
                    if (state) {
                        if (!listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
                            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();
            }
            else if (target.classList.contains('e-selectall-parent') || target.parentElement.classList.contains('e-selectall-parent')) {
                this.updateValue(event, li);
            }
        }
        else {
            this.updateValue(event, li);
        }
    };
    MultiSelect.prototype.updateValue = function (event, li) {
        var _this = this;
        var length = li.length;
        if (li && li.length) {
            var index_1 = 0;
            while (index_1 < length && index_1 <= 50) {
                this.updateListSelection(li[index_1], event, length - index_1);
                this.findGroupStart(li[index_1]);
                index_1++;
            }
            if (length > 50) {
                setTimeout(function () {
                    while (index_1 < length) {
                        _this.updateListSelection(li[index_1], event, length - index_1);
                        _this.findGroupStart(li[index_1]);
                        index_1++;
                    }
                    _this.textboxValueUpdate();
                }, 0);
            }
        }
        this.textboxValueUpdate();
        this.checkPlaceholderSize();
    };
    MultiSelect.prototype.textboxValueUpdate = function () {
        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);
            this.refreshInputHight();
        }
        else {
            this.updateDelimeter(this.delimiterChar);
        }
        this.refreshPlaceHolder();
    };
    MultiSelect.prototype.setZIndex = function () {
        if (this.popupObj) {
            this.popupObj.setProperties({ 'zIndex': this.zIndex });
        }
    };
    MultiSelect.prototype.updateDataSource = function (prop) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.list)) {
            this.renderPopup();
        }
        else {
            this.resetList(this.dataSource);
        }
        if (this.value && this.value.length) {
            this.setProperties({ 'value': this.value });
            this.refreshSelection();
        }
    };
    MultiSelect.prototype.onLoadSelect = function () {
        this.setDynValue = true;
        this.renderPopup();
    };
    MultiSelect.prototype.selectAllItems = function (state, event) {
        var _this = this;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.list)) {
            this.selectAllAction = function () {
                if (_this.mode === 'CheckBox' && _this.showSelectAll) {
                    var args = {
                        module: 'CheckBoxSelection',
                        enable: _this.mode === 'CheckBox',
                        value: state ? 'check' : 'uncheck'
                    };
                    _this.notify('checkSelectAll', args);
                }
                _this.selectAllItem(state, event);
                _this.selectAllAction = null;
            };
            _super.prototype.render.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.
     */
    MultiSelect.prototype.getPersistData = function () {
        return this.addOnPersist(['value']);
    };
    ;
    /**
     * Dynamically change the value of properties.
     * @private
     */
    MultiSelect.prototype.onPropertyChanged = function (newProp, oldProp) {
        if (newProp.dataSource && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(Object.keys(newProp.dataSource))) {
            this.mainList = null;
            this.mainData = null;
            this.isFirstClick = false;
        }
        if (this.getModuleName() === 'multiselect') {
            this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
        }
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'query':
                case 'dataSource':
                    if (this.mode === 'CheckBox' && this.showSelectAll) {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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');
                    break;
                case 'width':
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["setStyleAttribute"])(this.overAllWrapper, { 'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["formatUnit"])(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.popupWrapper.classList.remove(oldProp.cssClass);
                    this.overAllWrapper.classList.remove(oldProp.cssClass);
                    this.updateCssClass();
                    break;
                case 'enableRtl':
                    this.enableRTL(newProp.enableRtl);
                    _super.prototype.onPropertyChanged.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();
                    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();
                    }
                    break;
                default:
                    var msProps = void 0;
                    msProps = this.getPropObject(prop, newProp, oldProp);
                    _super.prototype.onPropertyChanged.call(this, msProps.newProperty, msProps.oldProperty);
                    break;
            }
        }
    };
    MultiSelect.prototype.reInitializePoup = function () {
        if (this.popupObj) {
            this.popupObj.destroy();
            this.popupObj = null;
        }
        this.renderPopup();
    };
    MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
        if (!this.list) {
            this.onLoadSelect();
        }
        else if (!this.inputFocus) {
            if (prop === 'text') {
                this.initialTextUpdate();
                newProp = this.value;
            }
            this.initialValueUpdate();
            if (this.mode !== 'Box') {
                this.updateDelimView();
            }
            this.refreshInputHight();
            this.refreshPlaceHolder();
            this.updateValueState(null, newProp, oldProp);
            this.checkPlaceholderSize();
        }
    };
    /**
     * Hides the popup, if the popup in a open state.
     * @returns void
     */
    MultiSelect.prototype.hidePopup = function () {
        var _this = 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) {
                    _this.beforePopupOpen = false;
                    _this.overAllWrapper.classList.remove(iconAnimation);
                    _this.popupObj.hide(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Animation"](eventArgs.animation));
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["attributes"])(_this.inputElement, { 'aria-expanded': 'false' });
                    if (_this.allowFiltering) {
                        _this.notify('inputFocus', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', value: 'clear' });
                    }
                    _this.popupObj.hide();
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([document.body, _this.popupObj.element], 'e-popup-full-page');
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["EventHandler"].remove(_this.list, 'keydown', _this.onKeyDown);
                }
            });
        }
    };
    /**
     * Shows the popup, if the popup in a closed state.
     * @returns void
     */
    MultiSelect.prototype.showPopup = function () {
        if (!this.enabled) {
            return;
        }
        if (!this.ulElement) {
            this.beforePopupOpen = true;
            _super.prototype.render.call(this);
            return;
        }
        var mainLiLength = this.ulElement.querySelectorAll('li.' + 'e-list-item').length;
        var liLength = this.ulElement.querySelectorAll('li.'
            + _drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["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
     */
    MultiSelect.prototype.selectAll = function (state) {
        this.selectAllItems(state);
    };
    MultiSelect.prototype.getModuleName = function () {
        return 'multiselect';
    };
    ;
    /**
     * To Initialize the control rendering
     * @private
     */
    MultiSelect.prototype.render = function () {
        this.setDynValue = this.initStatus = 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, 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_2__["addClass"])([this.overAllWrapper], 'e-checkbox');
        }
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isDevice) {
            this.componentWrapper.classList.add(ELEMENT_MOBILE_WRAPPER);
        }
        this.overAllWrapper.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["formatUnit"])(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,
                styles: 'display:none'
            });
            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_2__["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.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') {
            Object(_float_label__WEBPACK_IMPORTED_MODULE_5__["createFloatLabel"])(this.overAllWrapper, this.searchWrapper, this.element, this.inputElement, this.value, this.floatLabelType, this.placeholder);
        }
        else if (this.floatLabelType === 'Never') {
            this.refreshPlaceHolder();
        }
        this.element.style.opacity = '';
        var id = this.element.getAttribute('id') ? this.element.getAttribute('id') : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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();
    };
    MultiSelect.prototype.checkInitialValue = function () {
        var _this = this;
        var isData = this.dataSource instanceof Array ? (this.dataSource.length > 0)
            : !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.dataSource);
        if (!(this.value && this.value.length) &&
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_2__["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_2__["isNullOrUndefined"])(this.text)) {
            this.renderPopup();
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.text) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["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_4__["DataManager"])) {
                this.initialValueUpdate();
                this.initialUpdate();
            }
            else {
                this.setInitialValue = function () {
                    _this.initStatus = false;
                    _this.initialValueUpdate();
                    _this.initialUpdate();
                    _this.setInitialValue = null;
                    _this.initStatus = true;
                };
            }
        }
        else {
            this.initialUpdate();
        }
        this.initStatus = true;
        this.checkAutoFocus();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.text)) {
            this.element.setAttribute('data-initial-value', this.text);
        }
    };
    MultiSelect.prototype.checkAutoFocus = function () {
        if (this.element.hasAttribute('autofocus')) {
            this.inputElement.focus();
        }
    };
    MultiSelect.prototype.setFloatLabelType = function () {
        Object(_float_label__WEBPACK_IMPORTED_MODULE_5__["removeFloating"])(this.overAllWrapper, this.componentWrapper, this.searchWrapper, this.inputElement, this.value, this.floatLabelType, this.placeholder);
        if (this.floatLabelType !== 'Never') {
            Object(_float_label__WEBPACK_IMPORTED_MODULE_5__["createFloatLabel"])(this.overAllWrapper, this.searchWrapper, this.element, this.inputElement, this.value, this.floatLabelType, this.placeholder);
        }
    };
    MultiSelect.prototype.dropDownIcon = function () {
        if (this.showDropDownIcon) {
            this.dropIcon = this.createElement('span', { className: dropdownIcon });
            this.componentWrapper.appendChild(this.dropIcon);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["addClass"])([this.componentWrapper], ['e-down-icon']);
        }
        else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.dropIcon)) {
                this.dropIcon.parentElement.removeChild(this.dropIcon);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["removeClass"])([this.componentWrapper], ['e-down-icon']);
            }
        }
    };
    MultiSelect.prototype.initialUpdate = function () {
        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}
     */
    MultiSelect.prototype.destroy = function () {
        if (this.popupObj) {
            this.popupObj.hide();
        }
        this.notify(destroy, {});
        this.unwireListEvents();
        this.unWireEvent();
        this.list = null;
        this.popupObj = null;
        this.mainList = null;
        this.mainData = null;
        _super.prototype.destroy.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_2__["remove"])(this.overAllWrapper);
            }
            else {
                this.overAllWrapper.parentElement.insertBefore(this.element, this.overAllWrapper);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["remove"])(this.overAllWrapper);
            }
        }
    };
    ;
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(false)
    ], MultiSelect.prototype, "enableGroupCheckBox", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])('100%')
    ], MultiSelect.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])('300px')
    ], MultiSelect.prototype, "popupHeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])('100%')
    ], MultiSelect.prototype, "popupWidth", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "placeholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "filterBarPlaceholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])({})
    ], MultiSelect.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "valueTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "headerTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "footerTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "itemTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "allowFiltering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(false)
    ], MultiSelect.prototype, "allowCustomValue", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(true)
    ], MultiSelect.prototype, "showClearButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(1000)
    ], MultiSelect.prototype, "maximumSelectionLength", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(false)
    ], MultiSelect.prototype, "readonly", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(null)
    ], MultiSelect.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(true)
    ], MultiSelect.prototype, "hideSelectedItem", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(true)
    ], MultiSelect.prototype, "closePopupOnSelect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])('Default')
    ], MultiSelect.prototype, "mode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(',')
    ], MultiSelect.prototype, "delimiterChar", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(true)
    ], MultiSelect.prototype, "ignoreCase", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(false)
    ], MultiSelect.prototype, "showDropDownIcon", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])('Never')
    ], MultiSelect.prototype, "floatLabelType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(false)
    ], MultiSelect.prototype, "showSelectAll", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])('Select All')
    ], MultiSelect.prototype, "selectAllText", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])('Unselect All')
    ], MultiSelect.prototype, "unSelectAllText", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(true)
    ], MultiSelect.prototype, "enableSelectionOrder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Property"])(true)
    ], MultiSelect.prototype, "openOnClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "removing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "removed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "selectedAll", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "beforeOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "blur", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "focus", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "chipSelection", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "filtering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "tagging", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Event"])()
    ], MultiSelect.prototype, "customValueSelection", void 0);
    MultiSelect = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["NotifyPropertyChanges"]
    ], MultiSelect);
    return MultiSelect;
}(_drop_down_base_drop_down_base__WEBPACK_IMPORTED_MODULE_0__["DropDownBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/index.js":
/*!************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/index.js ***!
  \************************************************************/
/*! exports provided: CellStyle, Font, CellXfs, Alignment, CellStyleXfs, CellStyles, NumFmt, Border, Borders, Cell, Cells, Column, Row, Rows, Workbook, BuiltInProperties, Worksheet, HyperLink, Grouping, FreezePane, MergeCell, MergeCells, Worksheets, CsvHelper, ValueFormatter, BlobHelper */
/***/ (function(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-excel-export/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CellStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Font", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Font"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellXfs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CellXfs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Alignment", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Alignment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellStyleXfs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CellStyleXfs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellStyles", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CellStyles"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumFmt", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["NumFmt"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Border", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Border"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Borders", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Borders"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Cell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cells", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Cells"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Column"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Row"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rows", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Rows"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Workbook", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Workbook"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BuiltInProperties", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["BuiltInProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Worksheet", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Worksheet"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HyperLink", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["HyperLink"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grouping", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Grouping"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezePane", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FreezePane"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MergeCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["MergeCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MergeCells", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["MergeCells"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Worksheets", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Worksheets"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvHelper", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CsvHelper"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ValueFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlobHelper", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["BlobHelper"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/blob-helper.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/blob-helper.js ***!
  \**********************************************************************/
/*! exports provided: BlobHelper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlobHelper", function() { return BlobHelper; });
/**
 * BlobHelper class
 * @private
 */
var BlobHelper = /** @class */ (function () {
    function BlobHelper() {
        /* tslint:disable:no-any */
        this.parts = [];
    }
    /* tslint:disable:no-any */
    BlobHelper.prototype.append = function (part) {
        this.parts.push(part);
        this.blob = undefined; // Invalidate the blob
    };
    BlobHelper.prototype.getBlob = function () {
        return new Blob(this.parts, { type: 'text/plain' });
    };
    return BlobHelper;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/cell-style.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/cell-style.js ***!
  \*********************************************************************/
/*! exports provided: CellStyle, Font, CellXfs, Alignment, CellStyleXfs, CellStyles, NumFmt, Border, Borders */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellStyle", function() { return CellStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Font", function() { return Font; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellXfs", function() { return CellXfs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Alignment", function() { return Alignment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellStyleXfs", function() { return CellStyleXfs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellStyles", function() { return CellStyles; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumFmt", function() { return NumFmt; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Border", function() { return Border; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Borders", function() { return Borders; });
/**
 * CellStyle class
 * @private
 */
var CellStyle = /** @class */ (function () {
    function CellStyle() {
        this.numFmtId = 0;
        this.backColor = 'none';
        this.fontName = 'Calibri';
        this.fontSize = 14;
        this.fontColor = '#000000';
        this.italic = false;
        this.bold = false;
        this.underline = false;
        this.wrapText = false;
        this.hAlign = 'general';
        this.vAlign = 'bottom';
        this.indent = 0;
        this.rotation = 0;
        this.numberFormat = 'GENERAL';
        this.type = 'datetime';
        this.borders = new Borders();
        this.isGlobalStyle = false;
    }
    return CellStyle;
}());

/**
 * Font Class
 * @private
 */
var Font = /** @class */ (function () {
    function Font() {
        this.sz = 14;
        this.name = 'Calibri';
        this.u = false;
        this.b = false;
        this.i = false;
        this.color = 'FF000000';
    }
    return Font;
}());

/**
 * CellXfs class
 * @private
 */
var CellXfs = /** @class */ (function () {
    function CellXfs() {
    }
    return CellXfs;
}());

/**
 * Alignment class
 * @private
 */
var Alignment = /** @class */ (function () {
    function Alignment() {
    }
    return Alignment;
}());

/**
 * CellStyleXfs class
 * @private
 */
var CellStyleXfs = /** @class */ (function () {
    function CellStyleXfs() {
    }
    return CellStyleXfs;
}());

/**
 * CellStyles class
 * @private
 */
var CellStyles = /** @class */ (function () {
    function CellStyles() {
        this.name = 'Normal';
        this.xfId = 0;
    }
    return CellStyles;
}());

/**
 * NumFmt class
 * @private
 */
var NumFmt = /** @class */ (function () {
    function NumFmt(id, code) {
        this.numFmtId = id;
        this.formatCode = code;
    }
    return NumFmt;
}());

/**
 * Border class
 * @private
 */
var Border = /** @class */ (function () {
    function Border(mLine, mColor) {
        this.lineStyle = mLine;
        this.color = mColor;
    }
    return Border;
}());

/**
 * Borders class
 * @private
 */
var Borders = /** @class */ (function () {
    function Borders() {
        this.left = new Border('none', '#FFFFFF');
        this.right = new Border('none', '#FFFFFF');
        this.top = new Border('none', '#FFFFFF');
        this.bottom = new Border('none', '#FFFFFF');
        this.all = new Border('none', '#FFFFFF');
    }
    return Borders;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/cell.js":
/*!***************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/cell.js ***!
  \***************************************************************/
/*! exports provided: Cell, Cells */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cell", function() { return Cell; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cells", function() { return Cells; });
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * Worksheet class
 * @private
 */
var Cell = /** @class */ (function () {
    function Cell() {
    }
    return Cell;
}());

/**
 * Cells class
 * @private
 */
var Cells = /** @class */ (function (_super) {
    __extends(Cells, _super);
    function Cells() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.add = function (cell) {
            var inserted = false;
            var count = 0;
            for (var _i = 0, _a = _this; _i < _a.length; _i++) {
                var c = _a[_i];
                if (c.index === cell.index) {
                    _this[count] = cell;
                    inserted = true;
                }
                count++;
            }
            if (!inserted) {
                _this.push(cell);
            }
        };
        return _this;
    }
    return Cells;
}(Array));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/column.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/column.js ***!
  \*****************************************************************/
/*! exports provided: Column */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return Column; });
/**
 * Column class
 * @private
 */
var Column = /** @class */ (function () {
    function Column() {
    }
    return Column;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/csv-helper.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/csv-helper.js ***!
  \*********************************************************************/
/*! exports provided: CsvHelper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CsvHelper", function() { return CsvHelper; });
/* harmony import */ var _value_formatter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value-formatter */ "./node_modules/@syncfusion/ej2-excel-export/src/value-formatter.js");

/**
 * CsvHelper class
 * @private
 */
var CsvHelper = /** @class */ (function () {
    /* tslint:disable:no-any */
    function CsvHelper(json) {
        this.csvStr = '';
        this.formatter = new _value_formatter__WEBPACK_IMPORTED_MODULE_0__["ValueFormatter"]();
        this.isMicrosoftBrowser = !(!navigator.msSaveBlob);
        if (json.styles !== null && json.styles !== undefined) {
            this.globalStyles = new Map();
            for (var i = 0; i < json.styles.length; i++) {
                if (json.styles[i].name !== undefined && json.styles[i].numberFormat !== undefined) {
                    this.globalStyles.set(json.styles[i].name, json.styles[i].numberFormat);
                }
            }
        }
        // Parses Worksheets data to DOM.        
        if (json.worksheets !== null && json.worksheets !== undefined) {
            this.parseWorksheet(json.worksheets[0]);
        }
        //this.csvStr = 'a1,a2,a3\nb1,b2,b3';
    }
    CsvHelper.prototype.parseWorksheet = function (json) {
        //Rows
        if (json.rows !== null && json.rows !== undefined) {
            this.parseRows(json.rows);
        }
    };
    /* tslint:disable:no-any */
    CsvHelper.prototype.parseRows = function (rows) {
        var count = 1;
        for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
            var row = rows_1[_i];
            //Row index
            if (row.index !== null && row.index !== undefined) {
                while (count < row.index) {
                    this.csvStr += '\n';
                    count++;
                }
                this.parseRow(row);
            }
            else {
                throw Error('Row index is missing.');
            }
        }
    };
    /* tslint:disable:no-any */
    CsvHelper.prototype.parseRow = function (row) {
        if (row.cells !== null && row.cells !== undefined) {
            var count = 1;
            for (var _i = 0, _a = row.cells; _i < _a.length; _i++) {
                var cell = _a[_i];
                //cell index
                if (cell.index !== null && cell.index !== undefined) {
                    while (count < cell.index) {
                        this.csvStr += ',';
                        count++;
                    }
                    this.parseCell(cell);
                }
                else {
                    throw Error('Cell index is missing.');
                }
            }
        }
    };
    /* tslint:disable:no-any */
    CsvHelper.prototype.parseCell = function (cell) {
        var csv = this.csvStr;
        if (cell.value !== undefined) {
            if (cell.value instanceof Date) {
                if (cell.style !== undefined && cell.style.numberFormat !== undefined) {
                    /* tslint:disable-next-line:max-line-length */
                    try {
                        csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', skeleton: cell.style.numberFormat }));
                    }
                    catch (error) {
                        /* tslint:disable-next-line:max-line-length */
                        csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', format: cell.style.numberFormat }));
                    }
                }
                else if (cell.style !== undefined && cell.style.name !== undefined && this.globalStyles.has(cell.style.name)) {
                    /* tslint:disable-next-line:max-line-length */
                    try {
                        csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', skeleton: this.globalStyles.get(cell.style.name) }));
                    }
                    catch (error) {
                        /* tslint:disable-next-line:max-line-length */
                        csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', format: this.globalStyles.get(cell.style.name) }));
                    }
                }
                else {
                    csv += cell.value;
                }
            }
            else if (typeof (cell.value) === 'boolean') {
                csv += cell.value ? 'TRUE' : 'FALSE';
            }
            else if (typeof (cell.value) === 'number') {
                if (cell.style !== undefined && cell.style.numberFormat !== undefined) {
                    /* tslint:disable-next-line:max-line-length */
                    csv += this.parseCellValue(this.formatter.displayText(cell.value, { format: cell.style.numberFormat }));
                }
                else if (cell.style !== undefined && cell.style.name !== undefined && this.globalStyles.has(cell.style.name)) {
                    /* tslint:disable-next-line:max-line-length */
                    csv += this.parseCellValue(this.formatter.displayText(cell.value, { format: this.globalStyles.get(cell.style.name) }));
                }
                else {
                    csv += cell.value;
                }
            }
            else {
                csv += this.parseCellValue(cell.value);
            }
        }
        this.csvStr = csv;
    };
    CsvHelper.prototype.parseCellValue = function (value) {
        var val = '';
        var length = value.length;
        for (var start = 0; start < length; start++) {
            if (value[start] === '\"') {
                val += value[start].replace('\"', '\"\"');
            }
            else {
                val += value[start];
            }
        }
        value = val;
        if (value.indexOf(',') !== -1 || value.indexOf('\n') !== -1) {
            return value = '\"' + value + '\"';
        }
        else {
            return value;
        }
    };
    /**
     * Saves the file with specified name and sends the file to client browser
     * @param  {string} fileName- file name to save.
     * @param  {Blob} buffer- the content to write in file
     */
    CsvHelper.prototype.save = function (fileName) {
        this.buffer = new Blob(['\ufeff' + this.csvStr], { type: 'text/csv;charset=UTF-8' });
        if (this.isMicrosoftBrowser) {
            navigator.msSaveBlob(this.buffer, fileName);
        }
        else {
            var dataUrl_1 = window.URL.createObjectURL(this.buffer);
            var dwlLink = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
            dwlLink.download = fileName;
            dwlLink.href = dataUrl_1;
            var event_1 = document.createEvent('MouseEvent');
            event_1.initEvent('click', true, true);
            dwlLink.dispatchEvent(event_1);
            setTimeout(function () {
                window.URL.revokeObjectURL(dataUrl_1);
            });
        }
    };
    CsvHelper.prototype.saveAsBlob = function () {
        return new Blob(['\ufeff' + this.csvStr], { type: 'text/csv;charset=UTF-8' });
    };
    return CsvHelper;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/index.js ***!
  \****************************************************************/
/*! exports provided: CellStyle, Font, CellXfs, Alignment, CellStyleXfs, CellStyles, NumFmt, Border, Borders, Cell, Cells, Column, Row, Rows, Workbook, BuiltInProperties, Worksheet, HyperLink, Grouping, FreezePane, MergeCell, MergeCells, Worksheets, CsvHelper, ValueFormatter, BlobHelper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _cell_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cell-style */ "./node_modules/@syncfusion/ej2-excel-export/src/cell-style.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellStyle", function() { return _cell_style__WEBPACK_IMPORTED_MODULE_0__["CellStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Font", function() { return _cell_style__WEBPACK_IMPORTED_MODULE_0__["Font"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellXfs", function() { return _cell_style__WEBPACK_IMPORTED_MODULE_0__["CellXfs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Alignment", function() { return _cell_style__WEBPACK_IMPORTED_MODULE_0__["Alignment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellStyleXfs", function() { return _cell_style__WEBPACK_IMPORTED_MODULE_0__["CellStyleXfs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellStyles", function() { return _cell_style__WEBPACK_IMPORTED_MODULE_0__["CellStyles"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumFmt", function() { return _cell_style__WEBPACK_IMPORTED_MODULE_0__["NumFmt"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Border", function() { return _cell_style__WEBPACK_IMPORTED_MODULE_0__["Border"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Borders", function() { return _cell_style__WEBPACK_IMPORTED_MODULE_0__["Borders"]; });

/* harmony import */ var _cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cell */ "./node_modules/@syncfusion/ej2-excel-export/src/cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cell", function() { return _cell__WEBPACK_IMPORTED_MODULE_1__["Cell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cells", function() { return _cell__WEBPACK_IMPORTED_MODULE_1__["Cells"]; });

/* harmony import */ var _column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./column */ "./node_modules/@syncfusion/ej2-excel-export/src/column.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _column__WEBPACK_IMPORTED_MODULE_2__["Column"]; });

/* harmony import */ var _row__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./row */ "./node_modules/@syncfusion/ej2-excel-export/src/row.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _row__WEBPACK_IMPORTED_MODULE_3__["Row"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rows", function() { return _row__WEBPACK_IMPORTED_MODULE_3__["Rows"]; });

/* harmony import */ var _workbook__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./workbook */ "./node_modules/@syncfusion/ej2-excel-export/src/workbook.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Workbook", function() { return _workbook__WEBPACK_IMPORTED_MODULE_4__["Workbook"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BuiltInProperties", function() { return _workbook__WEBPACK_IMPORTED_MODULE_4__["BuiltInProperties"]; });

/* harmony import */ var _worksheet__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./worksheet */ "./node_modules/@syncfusion/ej2-excel-export/src/worksheet.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Worksheet", function() { return _worksheet__WEBPACK_IMPORTED_MODULE_5__["Worksheet"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HyperLink", function() { return _worksheet__WEBPACK_IMPORTED_MODULE_5__["HyperLink"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grouping", function() { return _worksheet__WEBPACK_IMPORTED_MODULE_5__["Grouping"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezePane", function() { return _worksheet__WEBPACK_IMPORTED_MODULE_5__["FreezePane"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MergeCell", function() { return _worksheet__WEBPACK_IMPORTED_MODULE_5__["MergeCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MergeCells", function() { return _worksheet__WEBPACK_IMPORTED_MODULE_5__["MergeCells"]; });

/* harmony import */ var _worksheets__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./worksheets */ "./node_modules/@syncfusion/ej2-excel-export/src/worksheets.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Worksheets", function() { return _worksheets__WEBPACK_IMPORTED_MODULE_6__["Worksheets"]; });

/* harmony import */ var _csv_helper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./csv-helper */ "./node_modules/@syncfusion/ej2-excel-export/src/csv-helper.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CsvHelper", function() { return _csv_helper__WEBPACK_IMPORTED_MODULE_7__["CsvHelper"]; });

/* harmony import */ var _value_formatter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./value-formatter */ "./node_modules/@syncfusion/ej2-excel-export/src/value-formatter.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatter", function() { return _value_formatter__WEBPACK_IMPORTED_MODULE_8__["ValueFormatter"]; });

/* harmony import */ var _blob_helper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./blob-helper */ "./node_modules/@syncfusion/ej2-excel-export/src/blob-helper.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlobHelper", function() { return _blob_helper__WEBPACK_IMPORTED_MODULE_9__["BlobHelper"]; });

/**
 * index class
 */












/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/row.js":
/*!**************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/row.js ***!
  \**************************************************************/
/*! exports provided: Row, Rows */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return Row; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rows", function() { return Rows; });
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * Row class
 * @private
 */
var Row = /** @class */ (function () {
    function Row() {
    }
    return Row;
}());

/**
 * Rows class
 * @private
 */
var Rows = /** @class */ (function (_super) {
    __extends(Rows, _super);
    function Rows() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.add = function (row) {
            var inserted = false;
            var count = 0;
            for (var _i = 0, _a = _this; _i < _a.length; _i++) {
                var r = _a[_i];
                if (r.index === row.index) {
                    _this[count] = row;
                    inserted = true;
                }
                count++;
            }
            if (!inserted) {
                _this.push(row);
            }
        };
        return _this;
    }
    return Rows;
}(Array));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/value-formatter.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/value-formatter.js ***!
  \**************************************************************************/
/*! exports provided: ValueFormatter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueFormatter", function() { return ValueFormatter; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");


// import { IValueFormatter } from '../base/interface';
/**
 * ValueFormatter class to globalize the value.
 * @private
 */
var ValueFormatter = /** @class */ (function () {
    function ValueFormatter(cultureName) {
        this.intl = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"]();
        // if (!isNullOrUndefined(cultureName)) {
        //     this.intl.culture = cultureName;
        // }
    }
    ValueFormatter.prototype.getFormatFunction = function (format) {
        if (format.type) {
            return this.intl.getDateFormat(format);
        }
        else {
            return this.intl.getNumberFormat(format);
        }
    };
    // public getParserFunction(format: NumberFormatOptions | DateFormatOptions): Function {
    //     if ((<DateFormatOptions>format).type) {
    //         return this.intl.getDateParser(<DateFormatOptions>format);
    //     } else {
    //         return this.intl.getNumberParser(<DateFormatOptions>format);
    //     }
    // }
    // public fromView(value: string, format: Function, type?: string): string | number | Date {
    //     if (type === 'date' || type === 'datetime' || type === 'number') {
    //         return format(value);
    //     } else {
    //         return value;
    //     }
    // }
    ValueFormatter.prototype.toView = function (value, format) {
        var result = value;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(format) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            result = format(value);
        }
        return result;
    };
    // public setCulture(cultureName: string): void {
    //     if (!isNullOrUndefined(cultureName)) {
    //         setCulture(cultureName);
    //     }
    // }
    /* tslint:disable:no-any */
    ValueFormatter.prototype.displayText = function (value, format) {
        return this.toView(value, this.getFormatFunction(format));
    };
    return ValueFormatter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/workbook.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/workbook.js ***!
  \*******************************************************************/
/*! exports provided: Workbook, BuiltInProperties */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Workbook", function() { return Workbook; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BuiltInProperties", function() { return BuiltInProperties; });
/* harmony import */ var _worksheets__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./worksheets */ "./node_modules/@syncfusion/ej2-excel-export/src/worksheets.js");
/* harmony import */ var _worksheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./worksheet */ "./node_modules/@syncfusion/ej2-excel-export/src/worksheet.js");
/* harmony import */ var _cell_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell-style */ "./node_modules/@syncfusion/ej2-excel-export/src/cell-style.js");
/* harmony import */ var _column__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./column */ "./node_modules/@syncfusion/ej2-excel-export/src/column.js");
/* harmony import */ var _row__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./row */ "./node_modules/@syncfusion/ej2-excel-export/src/row.js");
/* harmony import */ var _cell__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cell */ "./node_modules/@syncfusion/ej2-excel-export/src/cell.js");
/* harmony import */ var _syncfusion_ej2_compression__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @syncfusion/ej2-compression */ "./node_modules/@syncfusion/ej2-compression/index.js");
/* harmony import */ var _csv_helper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./csv-helper */ "./node_modules/@syncfusion/ej2-excel-export/src/csv-helper.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _blob_helper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./blob-helper */ "./node_modules/@syncfusion/ej2-excel-export/src/blob-helper.js");










/**
 * Workbook class
 */
var Workbook = /** @class */ (function () {
    /* tslint:disable:no-any */
    function Workbook(json, saveType, culture, currencyString) {
        this.sharedStringCount = 0;
        this.unitsProportions = [
            96 / 75.0,
            96 / 300.0,
            96,
            96 / 25.4,
            96 / 2.54,
            1,
            96 / 72.0,
            96 / 72.0 / 12700,
        ];
        /* tslint:disable:no-any */
        this.hyperlinkStyle = { fontColor: '#0000FF', underline: true };
        if (culture !== undefined) {
            this.culture = culture;
        }
        else {
            this.culture = 'en-US';
        }
        if (currencyString !== undefined) {
            this.currency = currencyString;
        }
        else {
            this.currency = 'USD';
        }
        this.intl = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_8__["Internationalization"](this.culture);
        this.mSaveType = saveType;
        if (saveType === 'xlsx') {
            this.mArchive = new _syncfusion_ej2_compression__WEBPACK_IMPORTED_MODULE_6__["ZipArchive"]();
            this.sharedString = [];
            this.mFonts = [];
            this.mBorders = [];
            this.mStyles = [];
            this.printTitles = new Map();
            this.cellStyles = new Map();
            this.mNumFmt = new Map();
            this.mFills = new Map();
            this.mStyles.push(new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyle"]());
            this.mFonts.push(new _cell_style__WEBPACK_IMPORTED_MODULE_2__["Font"]());
            /* tslint:disable */
            this.cellStyles.set('Normal', new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyles"]());
            /* tslint:enable */
            this.mCellXfs = [];
            this.mCellStyleXfs = [];
            if (json.styles !== null && json.styles !== undefined) {
                /* tslint:disable-next-line:no-any */
                this.globalStyles = new Map();
                for (var i = 0; i < json.styles.length; i++) {
                    if (json.styles[i].name !== undefined) {
                        if (!this.cellStyles.has(json.styles[i].name)) {
                            var cellStyle = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyle"]();
                            cellStyle.isGlobalStyle = true;
                            this.parserCellStyle(json.styles[i], cellStyle, 'none');
                            var cellStylesIn = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyles"]();
                            cellStylesIn.name = cellStyle.name;
                            cellStylesIn.xfId = (cellStyle.index - 1);
                            this.cellStyles.set(cellStylesIn.name, cellStylesIn);
                            /* tslint:disable-next-line:no-any */
                            var tFormat = {};
                            if (json.styles[i].numberFormat !== undefined) {
                                tFormat.format = json.styles[i].numberFormat;
                            }
                            if (json.styles[i].type !== undefined) {
                                tFormat.type = json.styles[i].type;
                            }
                            else {
                                tFormat.type = 'datetime';
                            }
                            if (tFormat.format !== undefined) {
                                this.globalStyles.set(json.styles[i].name, tFormat);
                            }
                        }
                        else {
                            throw Error('Style name ' + json.styles[i].name + ' is already existed');
                        }
                    }
                }
            }
            // Parses Worksheets data to DOM.        
            if (json.worksheets !== null && json.worksheets !== undefined) {
                this.parserWorksheets(json.worksheets);
            }
            else {
                throw Error('Worksheet is expected.');
            }
            // Parses the BuiltInProperties data to DOM.        
            if (json.builtInProperties !== null && json.builtInProperties !== undefined) {
                this.builtInProperties = new BuiltInProperties();
                this.parserBuiltInProperties(json.builtInProperties, this.builtInProperties);
            }
        }
        else {
            this.csvHelper = new _csv_helper__WEBPACK_IMPORTED_MODULE_7__["CsvHelper"](json);
        }
    }
    /* tslint:disable:no-any */
    Workbook.prototype.parserBuiltInProperties = function (jsonBuiltInProperties, builtInProperties) {
        //Author
        if (jsonBuiltInProperties.author !== null && jsonBuiltInProperties.author !== undefined) {
            builtInProperties.author = jsonBuiltInProperties.author;
        }
        //Comments
        if (jsonBuiltInProperties.comments !== null && jsonBuiltInProperties.comments !== undefined) {
            builtInProperties.comments = jsonBuiltInProperties.comments;
        }
        //Category
        if (jsonBuiltInProperties.category !== null && jsonBuiltInProperties.category !== undefined) {
            builtInProperties.category = jsonBuiltInProperties.category;
        }
        //Company
        if (jsonBuiltInProperties.company !== null && jsonBuiltInProperties.company !== undefined) {
            builtInProperties.company = jsonBuiltInProperties.company;
        }
        //Manager
        if (jsonBuiltInProperties.manager !== null && jsonBuiltInProperties.manager !== undefined) {
            builtInProperties.manager = jsonBuiltInProperties.manager;
        }
        //Subject
        if (jsonBuiltInProperties.subject !== null && jsonBuiltInProperties.subject !== undefined) {
            builtInProperties.subject = jsonBuiltInProperties.subject;
        }
        //Title
        if (jsonBuiltInProperties.title !== null && jsonBuiltInProperties.title !== undefined) {
            builtInProperties.title = jsonBuiltInProperties.title;
        }
        //Creation date
        if (jsonBuiltInProperties.createdDate !== null && jsonBuiltInProperties.createdDate !== undefined) {
            builtInProperties.createdDate = jsonBuiltInProperties.createdDate;
        }
        //Modified date
        if (jsonBuiltInProperties.modifiedDate !== null && jsonBuiltInProperties.modifiedDate !== undefined) {
            builtInProperties.modifiedDate = jsonBuiltInProperties.modifiedDate;
        }
        //Tags
        if (jsonBuiltInProperties.tags !== null && jsonBuiltInProperties.tags !== undefined) {
            builtInProperties.tags = jsonBuiltInProperties.tags;
        }
        //Status
        if (jsonBuiltInProperties.status !== null && jsonBuiltInProperties.status !== undefined) {
            builtInProperties.status = jsonBuiltInProperties.status;
        }
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parserWorksheets = function (json) {
        this.worksheets = new _worksheets__WEBPACK_IMPORTED_MODULE_0__["Worksheets"]();
        var length = json.length;
        for (var i = 0; i < length; i++) {
            var jsonSheet = json[i];
            var sheet = new _worksheet__WEBPACK_IMPORTED_MODULE_1__["Worksheet"]();
            this.mergeCells = new _worksheet__WEBPACK_IMPORTED_MODULE_1__["MergeCells"]();
            this.mergedCellsStyle = new Map();
            this.mHyperLinks = [];
            //Name
            if (jsonSheet.name !== null && jsonSheet.name !== undefined) {
                sheet.name = jsonSheet.name;
            }
            else {
                sheet.name = 'Sheet' + (i + 1).toString();
            }
            sheet.index = (i + 1);
            //Columns
            if (jsonSheet.columns !== null && jsonSheet.columns !== undefined) {
                this.parserColumns(jsonSheet.columns, sheet);
            }
            //Rows
            if (jsonSheet.rows !== null && jsonSheet.rows !== undefined) {
                this.parserRows(jsonSheet.rows, sheet);
            }
            //showGridLines
            if (jsonSheet.showGridLines !== null && jsonSheet.showGridLines !== undefined) {
                sheet.showGridLines = jsonSheet.showGridLines;
            }
            //FreezePanes
            if (jsonSheet.freeze !== null && jsonSheet.freeze !== undefined) {
                this.parserFreezePanes(jsonSheet.freeze, sheet);
            }
            //Print Title
            if (jsonSheet.printTitle !== null && jsonSheet.printTitle !== undefined) {
                this.parserPrintTitle(jsonSheet.printTitle, sheet);
            }
            if (jsonSheet.pageSetup !== undefined) {
                if (jsonSheet.pageSetup.isSummaryRowBelow !== undefined) {
                    sheet.isSummaryRowBelow = jsonSheet.pageSetup.isSummaryRowBelow;
                }
            }
            sheet.index = (i + 1);
            sheet.mergeCells = this.mergeCells;
            sheet.hyperLinks = this.mHyperLinks;
            this.worksheets.push(sheet);
        }
    };
    /* tslint:disable:no-any */
    Workbook.prototype.mergeOptions = function (fromJson, toJson) {
        /* tslint:disable:no-any */
        var result = {};
        this.applyProperties(fromJson, result);
        this.applyProperties(toJson, result);
        return result;
    };
    /* tslint:disable:no-any */
    Workbook.prototype.applyProperties = function (sourceJson, destJson) {
        var keys = Object.keys(sourceJson);
        for (var index = 0; index < keys.length; index++) {
            if (keys[index] !== 'name') {
                destJson[keys[index]] = sourceJson[keys[index]];
            }
        }
    };
    Workbook.prototype.getCellName = function (row, column) {
        return this.getColumnName(column) + row.toString();
    };
    Workbook.prototype.getColumnName = function (col) {
        col--;
        var strColumnName = '';
        do {
            var iCurrentDigit = col % 26;
            col = col / 26 - 1;
            strColumnName = String.fromCharCode(65 + iCurrentDigit) + strColumnName;
        } while (col >= 0);
        return strColumnName;
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parserPrintTitle = function (json, sheet) {
        var printTitleName = '';
        var titleRowName;
        if (json.fromRow !== null && json.fromRow !== undefined) {
            var fromRow = json.fromRow;
            var toRow = void 0;
            if (json.toRow !== null && json.toRow !== undefined) {
                toRow = json.toRow;
            }
            else {
                toRow = json.fromRow;
            }
            titleRowName = '$' + fromRow + ':$' + toRow;
        }
        var titleColName;
        if (json.fromColumn !== null && json.fromColumn !== undefined) {
            var fromColumn = json.fromColumn;
            var toColumn = void 0;
            if (json.toColumn !== null && json.toColumn !== undefined) {
                toColumn = json.toColumn;
            }
            else {
                toColumn = json.fromColumn;
            }
            titleColName = '$' + this.getColumnName(fromColumn) + ':$' + this.getColumnName(toColumn);
        }
        if (titleRowName !== undefined) {
            printTitleName += (sheet.name + '!' + titleRowName);
        }
        if (titleColName !== undefined && titleRowName !== undefined) {
            printTitleName += ',' + (sheet.name + '!' + titleColName);
        }
        else if (titleColName !== undefined) {
            printTitleName += (sheet.name + '!' + titleColName);
        }
        if (printTitleName !== '') {
            this.printTitles.set(sheet.index - 1, printTitleName);
        }
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parserFreezePanes = function (json, sheet) {
        sheet.freezePanes = new _worksheet__WEBPACK_IMPORTED_MODULE_1__["FreezePane"]();
        if (json.row !== null && json.row !== undefined) {
            sheet.freezePanes.row = json.row;
        }
        else {
            sheet.freezePanes.row = 0;
        }
        if (json.column !== null && json.column !== undefined) {
            sheet.freezePanes.column = json.column;
        }
        else {
            sheet.freezePanes.column = 0;
        }
        sheet.freezePanes.leftCell = this.getCellName(sheet.freezePanes.row + 1, sheet.freezePanes.column + 1);
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parserColumns = function (json, sheet) {
        var columnsLength = json.length;
        sheet.columns = [];
        for (var column = 0; column < columnsLength; column++) {
            var col = new _column__WEBPACK_IMPORTED_MODULE_3__["Column"]();
            if (json[column].index !== null && json[column].index !== undefined) {
                col.index = json[column].index;
            }
            else {
                throw Error('Column index is missing.');
            }
            if (json[column].width !== null && json[column].width !== undefined) {
                col.width = json[column].width;
            }
            sheet.columns.push(col);
        }
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parserRows = function (json, sheet) {
        var rowsLength = json.length;
        sheet.rows = new _row__WEBPACK_IMPORTED_MODULE_4__["Rows"]();
        var rowId = 0;
        for (var r = 0; r < rowsLength; r++) {
            var row = this.parserRow(json[r], rowId);
            rowId = row.index;
            sheet.rows.add(row);
        }
        this.insertMergedCellsStyle(sheet);
    };
    Workbook.prototype.insertMergedCellsStyle = function (sheet) {
        var _this = this;
        if (this.mergeCells.length > 0) {
            this.mergedCellsStyle.forEach(function (value, key) {
                var row = sheet.rows.filter(function (item) {
                    return item.index === value.y;
                })[0];
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_8__["isNullOrUndefined"])(row)) {
                    var cell = row.cells.filter(function (item) {
                        return item.index === value.x;
                    })[0];
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_8__["isNullOrUndefined"])(cell)) {
                        cell.styleIndex = value.styleIndex;
                    }
                    else {
                        var cells = row.cells.filter(function (item) {
                            return item.index <= value.x;
                        });
                        var insertIndex = 0;
                        if (cells.length > 0) {
                            insertIndex = row.cells.indexOf(cells[cells.length - 1]) + 1;
                        }
                        row.cells.splice(insertIndex, 0, _this.createCell(value, key));
                    }
                }
                else {
                    var rows = sheet.rows.filter(function (item) {
                        return item.index <= value.y;
                    });
                    var rowToInsert = new _row__WEBPACK_IMPORTED_MODULE_4__["Row"]();
                    rowToInsert.index = value.y;
                    rowToInsert.cells = new _cell__WEBPACK_IMPORTED_MODULE_5__["Cells"]();
                    rowToInsert.cells.add(_this.createCell(value, key));
                    var insertIndex = 0;
                    if (rows.length > 0) {
                        insertIndex = sheet.rows.indexOf(rows[rows.length - 1]) + 1;
                    }
                    sheet.rows.splice(insertIndex, 0, rowToInsert);
                }
            });
        }
    };
    Workbook.prototype.createCell = function (value, key) {
        var cellToInsert = new _cell__WEBPACK_IMPORTED_MODULE_5__["Cell"]();
        cellToInsert.refName = key;
        cellToInsert.index = value.x;
        cellToInsert.cellStyle = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyle"]();
        cellToInsert.styleIndex = value.styleIndex;
        return cellToInsert;
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parserRow = function (json, rowIndex) {
        var row = new _row__WEBPACK_IMPORTED_MODULE_4__["Row"]();
        //Row Height
        if (json.height !== null && json.height !== undefined) {
            row.height = json.height;
        }
        //Row index
        if (json.index !== null && json.index !== undefined) {
            row.index = json.index;
        }
        else {
            throw Error('Row index is missing.');
        }
        if (json.grouping !== null && json.grouping !== undefined) {
            this.parseGrouping(json.grouping, row);
        }
        this.parseCells(json.cells, row);
        return row;
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parseGrouping = function (json, row) {
        row.grouping = new _worksheet__WEBPACK_IMPORTED_MODULE_1__["Grouping"]();
        if (json.outlineLevel !== undefined) {
            row.grouping.outlineLevel = json.outlineLevel;
        }
        if (json.isCollapsed !== undefined) {
            row.grouping.isCollapsed = json.isCollapsed;
        }
        if (json.isHidden !== undefined) {
            row.grouping.isHidden = json.isHidden;
        }
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parseCells = function (json, row) {
        row.cells = new _cell__WEBPACK_IMPORTED_MODULE_5__["Cells"]();
        var cellsLength = json !== undefined ? json.length : 0;
        var spanMin = 1;
        var spanMax = 1;
        var curCellIndex = 0;
        for (var cellId = 0; cellId < cellsLength; cellId++) {
            /* tslint:disable:no-any */
            var jsonCell = json[cellId];
            var cell = new _cell__WEBPACK_IMPORTED_MODULE_5__["Cell"]();
            //cell index
            if (jsonCell.index !== null && jsonCell.index !== undefined) {
                cell.index = jsonCell.index;
            }
            else {
                throw Error('Cell index is missing.');
            }
            if (cell.index < spanMin) {
                spanMin = cell.index;
            }
            else if (cell.index > spanMax) {
                spanMax = cell.index;
            }
            //Update the Cell name
            cell.refName = this.getCellName(row.index, cell.index);
            //Row span
            if (jsonCell.rowSpan !== null && jsonCell.rowSpan !== undefined) {
                cell.rowSpan = jsonCell.rowSpan - 1;
            }
            else {
                cell.rowSpan = 0;
            }
            //Column span
            if (jsonCell.colSpan !== null && jsonCell.colSpan !== undefined) {
                cell.colSpan = jsonCell.colSpan - 1;
            }
            else {
                cell.colSpan = 0;
            }
            //Hyperlink
            if (jsonCell.hyperlink !== null && jsonCell.hyperlink !== undefined) {
                var hyperLink = new _worksheet__WEBPACK_IMPORTED_MODULE_1__["HyperLink"]();
                if (jsonCell.hyperlink.target !== undefined) {
                    hyperLink.target = jsonCell.hyperlink.target;
                    if (jsonCell.hyperlink.displayText !== undefined) {
                        cell.value = jsonCell.hyperlink.displayText;
                    }
                    else {
                        cell.value = jsonCell.hyperlink.target;
                    }
                    cell.type = this.getCellValueType(cell.value);
                    hyperLink.ref = cell.refName;
                    hyperLink.rId = (this.mHyperLinks.length + 1);
                    this.mHyperLinks.push(hyperLink);
                    cell.cellStyle = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyle"]();
                    /* tslint:disable-next-line:max-line-length */
                    this.parserCellStyle((jsonCell.style !== undefined ? this.mergeOptions(jsonCell.style, this.hyperlinkStyle) : this.hyperlinkStyle), cell.cellStyle, 'string');
                    cell.styleIndex = cell.cellStyle.index;
                }
            }
            // formulas
            if (jsonCell.formula !== null && jsonCell.formula !== undefined) {
                cell.formula = jsonCell.formula;
                cell.type = 'formula';
            }
            //Cell value
            if (jsonCell.value !== null && jsonCell.value !== undefined) {
                if (cell.formula !== undefined) {
                    cell.value = 0;
                }
                else {
                    cell.value = jsonCell.value;
                    cell.type = this.getCellValueType(cell.value);
                }
            }
            if (jsonCell.style !== null && jsonCell.style !== undefined && cell.styleIndex === undefined) {
                cell.cellStyle = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyle"]();
                if (cell.value instanceof Date) {
                    this.parserCellStyle(jsonCell.style, cell.cellStyle, cell.type, 14);
                }
                else {
                    this.parserCellStyle(jsonCell.style, cell.cellStyle, cell.type);
                }
                cell.styleIndex = cell.cellStyle.index;
            }
            else if (cell.value instanceof Date) {
                cell.cellStyle = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyle"]();
                this.parserCellStyle({}, cell.cellStyle, cell.type, 14);
                cell.styleIndex = cell.cellStyle.index;
            }
            this.parseCellType(cell);
            this.mergeCells = this.processMergeCells(cell, row.index, this.mergeCells);
            row.cells.add(cell);
            curCellIndex = (cell.index + 1);
        }
        row.spans = (spanMin) + ':' + (spanMax);
    };
    Workbook.prototype.GetColors = function () {
        var colors;
        colors = new Map();
        /* tslint:disable */
        colors.set('WHITE', 'FFFFFFFF');
        /* tslint:disable */
        colors.set('SILVER', 'FFC0C0C0');
        /* tslint:disable */
        colors.set('GRAY', 'FF808080');
        /* tslint:disable */
        colors.set('BLACK', 'FF000000');
        /* tslint:disable */
        colors.set('RED', 'FFFF0000');
        /* tslint:disable */
        colors.set('MAROON', 'FF800000');
        /* tslint:disable */
        colors.set('YELLOW', 'FFFFFF00');
        /* tslint:disable */
        colors.set('OLIVE', 'FF808000');
        /* tslint:disable */
        colors.set('LIME', 'FF00FF00');
        /* tslint:disable */
        colors.set('GREEN', 'FF008000');
        /* tslint:disable */
        colors.set('AQUA', 'FF00FFFF');
        /* tslint:disable */
        colors.set('TEAL', 'FF008080');
        /* tslint:disable */
        colors.set('BLUE', 'FF0000FF');
        /* tslint:disable */
        colors.set('NAVY', 'FF000080');
        /* tslint:disable */
        colors.set('FUCHSIA', 'FFFF00FF');
        /* tslint:disable */
        colors.set('PURPLE', 'FF800080');
        return colors;
    };
    Workbook.prototype.processColor = function (colorVal) {
        if (colorVal.startsWith('#')) {
            return colorVal.replace('#', 'FF');
        }
        colorVal = colorVal.toUpperCase();
        this.rgbColors = this.GetColors();
        if (this.rgbColors.has(colorVal)) {
            colorVal = this.rgbColors.get(colorVal);
        }
        else {
            colorVal = 'FF000000';
        }
        return colorVal;
    };
    Workbook.prototype.processCellValue = function (value, cell) {
        var cellValue = value;
        var processedVal = '';
        var startindex = value.indexOf('<', 0);
        if (startindex >= 0) {
            if (startindex !== 0) {
                processedVal += '<r><t xml:space="preserve">' + value.substring(0, startindex) + '</t></r>';
            }
            var endIndex = value.indexOf('>', startindex + 1);
            while (startindex >= 0 && endIndex >= 0) {
                endIndex = value.indexOf('>', startindex + 1);
                if (endIndex >= 0) {
                    var subString = value.substring(startindex + 1, endIndex);
                    startindex = value.indexOf('<', endIndex + 1);
                    if (startindex < 0) {
                        startindex = cellValue.length;
                    }
                    var text = cellValue.substring(endIndex + 1, startindex);
                    if (text.length !== 0) {
                        var subSplit = subString.split(' ');
                        if (subSplit.length > 0) {
                            processedVal += '<r><rPr>';
                        }
                        if (subSplit.length > 1) {
                            for (var _i = 0, subSplit_1 = subSplit; _i < subSplit_1.length; _i++) {
                                var element = subSplit_1[_i];
                                var start = element.trim().substring(0, 5);
                                switch (start) {
                                    case 'size=':
                                        processedVal += '<sz val="' + element.substring(6, element.length - 1) + '"/>';
                                        break;
                                    case 'face=':
                                        processedVal += '<rFont val="' + element.substring(6, element.length - 1) + '"/>';
                                        break;
                                    case 'color':
                                        processedVal += '<color rgb="' + this.processColor(element.substring(7, element.length - 1)) + '"/>';
                                        break;
                                    case 'href=':
                                        var hyperLink = new _worksheet__WEBPACK_IMPORTED_MODULE_1__["HyperLink"]();
                                        hyperLink.target = element.substring(6, element.length - 1).trim();
                                        hyperLink.ref = cell.refName;
                                        hyperLink.rId = (this.mHyperLinks.length + 1);
                                        this.mHyperLinks.push(hyperLink);
                                        processedVal += '<color rgb="FF0000FF"/><u/><b/>';
                                        break;
                                }
                            }
                        }
                        else if (subSplit.length === 1) {
                            var style = subSplit[0].trim();
                            switch (style) {
                                case 'b':
                                    processedVal += '<b/>';
                                    break;
                                case 'i':
                                    processedVal += '<i/>';
                                    break;
                                case 'u':
                                    processedVal += '<u/>';
                                    break;
                            }
                        }
                        processedVal += '</rPr><t xml:space="preserve">' + text + '</t></r>';
                    }
                }
            }
            if (processedVal === '') {
                return cellValue;
            }
            return processedVal;
        }
        else {
            return cellValue;
        }
    };
    Workbook.prototype.applyGlobalStyle = function (json, cellStyle) {
        var index = 0;
        if (this.cellStyles.has(json.name)) {
            cellStyle.index = this.mStyles.filter(function (a) { return (a.name === json.name); })[0].index;
            cellStyle.name = json.name;
        }
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parserCellStyle = function (json, cellStyle, cellType, defStyleIndex) {
        //name
        if (json.name !== null && json.name !== undefined) {
            if (cellStyle.isGlobalStyle) {
                cellStyle.name = json.name;
            }
            else {
                this.applyGlobalStyle(json, cellStyle);
                return;
            }
        }
        //background color
        if (json.backColor !== null && json.backColor !== undefined) {
            cellStyle.backColor = json.backColor;
        }
        //borders
        //leftBorder
        cellStyle.borders = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["Borders"]();
        //AllBorder
        if (json.borders !== null && json.borders !== undefined) {
            this.parserBorder(json.borders, cellStyle.borders.all);
        }
        //leftborder
        if (json.leftBorder !== null && json.leftBorder !== undefined) {
            this.parserBorder(json.leftBorder, cellStyle.borders.left);
        }
        //rightBorder
        if (json.rightBorder !== null && json.rightBorder !== undefined) {
            this.parserBorder(json.rightBorder, cellStyle.borders.right);
        }
        //topBorder
        if (json.topBorder !== null && json.topBorder !== undefined) {
            this.parserBorder(json.topBorder, cellStyle.borders.top);
        }
        //bottomBorder
        if (json.bottomBorder !== null && json.bottomBorder !== undefined) {
            this.parserBorder(json.bottomBorder, cellStyle.borders.bottom);
        }
        //fontName
        if (json.fontName !== null && json.fontName !== undefined) {
            cellStyle.fontName = json.fontName;
        }
        //fontSize
        if (json.fontSize !== null && json.fontSize !== undefined) {
            cellStyle.fontSize = json.fontSize;
        }
        //fontColor
        if (json.fontColor !== null && json.fontColor !== undefined) {
            cellStyle.fontColor = json.fontColor;
        }
        //italic
        if (json.italic !== null && json.italic !== undefined) {
            cellStyle.italic = json.italic;
        }
        //bold
        if (json.bold !== null && json.bold !== undefined) {
            cellStyle.bold = json.bold;
        }
        //hAlign
        if (json.hAlign !== null && json.hAlign !== undefined) {
            cellStyle.hAlign = json.hAlign.toLowerCase();
        }
        //indent
        if (json.indent !== null && json.indent !== undefined) {
            cellStyle.indent = json.indent;
            if (!(cellStyle.hAlign === 'left' || cellStyle.hAlign === 'right')) {
                cellStyle.hAlign = 'left';
            }
        }
        if (json.rotation !== null && json.rotation !== undefined) {
            cellStyle.rotation = json.rotation;
        }
        //vAlign
        if (json.vAlign !== null && json.vAlign !== undefined) {
            cellStyle.vAlign = json.vAlign.toLowerCase();
        }
        //underline
        if (json.underline !== null && json.underline !== undefined) {
            cellStyle.underline = json.underline;
        }
        //wrapText
        if (json.wrapText !== null && json.wrapText !== undefined) {
            cellStyle.wrapText = json.wrapText;
        }
        //numberFormat
        if (json.numberFormat !== null && json.numberFormat !== undefined) {
            if (json.type !== null && json.type !== undefined) {
                cellStyle.numberFormat = this.getNumberFormat(json.numberFormat, json.type);
            }
            else {
                cellStyle.numberFormat = this.getNumberFormat(json.numberFormat, cellType);
            }
        }
        else if (defStyleIndex !== undefined) {
            cellStyle.numFmtId = 14;
            cellStyle.numberFormat = 'GENERAL';
        }
        else {
            cellStyle.numberFormat = 'GENERAL';
        }
        cellStyle.index = this.processCellStyle(cellStyle);
    };
    Workbook.prototype.switchNumberFormat = function (numberFormat, type) {
        var format = this.getNumberFormat(numberFormat, type);
        if (format !== numberFormat) {
            var numFmt = this.mNumFmt.get(numberFormat);
            if (numFmt !== undefined) {
                numFmt.formatCode = format;
                if (this.mNumFmt.has(format)) {
                    for (var _i = 0, _a = this.mCellStyleXfs; _i < _a.length; _i++) {
                        var cellStyleXfs = _a[_i];
                        if (cellStyleXfs.numFmtId === numFmt.numFmtId) {
                            cellStyleXfs.numFmtId = this.mNumFmt.get(format).numFmtId;
                        }
                    }
                    for (var _b = 0, _c = this.mCellXfs; _b < _c.length; _b++) {
                        var cellXfs = _c[_b];
                        if (cellXfs.numFmtId === numFmt.numFmtId) {
                            cellXfs.numFmtId = this.mNumFmt.get(format).numFmtId;
                        }
                    }
                }
            }
        }
    };
    Workbook.prototype.getNumberFormat = function (numberFormat, type) {
        var returnFormat;
        switch (type) {
            case 'number':
                try {
                    returnFormat = this.intl.getNumberPattern({ format: numberFormat, currency: this.currency });
                }
                catch (error) {
                    returnFormat = numberFormat;
                }
                break;
            case 'datetime':
                try {
                    returnFormat = this.intl.getDatePattern({ skeleton: numberFormat, type: 'dateTime' }, true);
                }
                catch (error) {
                    try {
                        returnFormat = this.intl.getDatePattern({ format: numberFormat, type: 'dateTime' }, true);
                    }
                    catch (error) {
                        returnFormat = numberFormat;
                    }
                }
                break;
            case 'date':
                try {
                    returnFormat = this.intl.getDatePattern({ skeleton: numberFormat, type: 'date' }, true);
                }
                catch (error) {
                    try {
                        returnFormat = this.intl.getDatePattern({ format: numberFormat, type: 'date' }, true);
                    }
                    catch (error) {
                        returnFormat = numberFormat;
                    }
                }
                break;
            case 'time':
                try {
                    returnFormat = this.intl.getDatePattern({ skeleton: numberFormat, type: 'time' }, true);
                }
                catch (error) {
                    try {
                        returnFormat = this.intl.getDatePattern({ format: numberFormat, type: 'time' }, true);
                    }
                    catch (error) {
                        returnFormat = numberFormat;
                    }
                }
                break;
            default:
                returnFormat = numberFormat;
                break;
        }
        return returnFormat;
    };
    /* tslint:disable:no-any */
    Workbook.prototype.parserBorder = function (json, border) {
        if (json.color !== null && json.color !== undefined) {
            border.color = json.color;
        }
        else {
            border.color = '#000000';
        }
        if (json.lineStyle !== null && json.lineStyle !== undefined) {
            border.lineStyle = json.lineStyle;
        }
        else {
            border.lineStyle = 'thin';
        }
    };
    Workbook.prototype.processCellStyle = function (style) {
        if (style.isGlobalStyle) {
            this.processNumFormatId(style);
            this.mStyles.push(style);
            return this.mStyles.length;
        }
        else {
            var compareResult = this.compareStyle(style);
            if (!compareResult.result) {
                this.processNumFormatId(style);
                this.mStyles.push(style);
                return this.mStyles.length;
            }
            else {
                //Return the index of the already existing style.
                return compareResult.index;
            }
        }
    };
    Workbook.prototype.processNumFormatId = function (style) {
        if (style.numberFormat !== 'GENERAL' && !this.mNumFmt.has(style.numberFormat)) {
            var id = this.mNumFmt.size + 164;
            this.mNumFmt.set(style.numberFormat, new _cell_style__WEBPACK_IMPORTED_MODULE_2__["NumFmt"](id, style.numberFormat));
        }
    };
    Workbook.prototype.isNewFont = function (toCompareStyle) {
        var result = false;
        var index = 0;
        for (var _i = 0, _a = this.mFonts; _i < _a.length; _i++) {
            var font = _a[_i];
            index++;
            var fontColor = undefined;
            if (toCompareStyle.fontColor !== undefined) {
                fontColor = ('FF' + toCompareStyle.fontColor.replace('#', ''));
            }
            result = font.color === fontColor &&
                font.b === toCompareStyle.bold &&
                font.i === toCompareStyle.italic &&
                font.u === toCompareStyle.underline &&
                font.name === toCompareStyle.fontName &&
                font.sz === toCompareStyle.fontSize;
            if (result) {
                break;
            }
        }
        index = index - 1;
        return { index: index, result: result };
    };
    Workbook.prototype.isNewBorder = function (toCompareStyle) {
        var bStyle = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyle"]();
        if (this.isAllBorder(toCompareStyle.borders)) {
            return (bStyle.borders.all.color === toCompareStyle.borders.all.color &&
                bStyle.borders.all.lineStyle === toCompareStyle.borders.all.lineStyle);
        }
        else {
            return (bStyle.borders.left.color === toCompareStyle.borders.left.color &&
                bStyle.borders.left.lineStyle === toCompareStyle.borders.left.lineStyle &&
                bStyle.borders.right.color === toCompareStyle.borders.right.color &&
                bStyle.borders.right.lineStyle === toCompareStyle.borders.right.lineStyle &&
                bStyle.borders.top.color === toCompareStyle.borders.top.color &&
                bStyle.borders.top.lineStyle === toCompareStyle.borders.top.lineStyle &&
                bStyle.borders.bottom.color === toCompareStyle.borders.bottom.color &&
                bStyle.borders.bottom.lineStyle === toCompareStyle.borders.bottom.lineStyle);
        }
    };
    Workbook.prototype.isAllBorder = function (toCompareBorder) {
        var allBorderStyle = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyle"]();
        return allBorderStyle.borders.all.color !== toCompareBorder.all.color &&
            allBorderStyle.borders.all.lineStyle !== toCompareBorder.all.lineStyle;
    };
    Workbook.prototype.compareStyle = function (toCompareStyle) {
        var result = true;
        var index = 0;
        var globalStyleIndex = 0;
        for (var _i = 0, _a = this.mStyles; _i < _a.length; _i++) {
            var baseStyle = _a[_i];
            result = baseStyle.isGlobalStyle ? false : (baseStyle.backColor === toCompareStyle.backColor &&
                baseStyle.bold === toCompareStyle.bold &&
                baseStyle.numFmtId === toCompareStyle.numFmtId &&
                baseStyle.numberFormat === toCompareStyle.numberFormat &&
                baseStyle.type === toCompareStyle.type &&
                baseStyle.fontColor === toCompareStyle.fontColor &&
                baseStyle.fontName === toCompareStyle.fontName &&
                baseStyle.fontSize === toCompareStyle.fontSize &&
                baseStyle.hAlign === toCompareStyle.hAlign &&
                baseStyle.italic === toCompareStyle.italic &&
                baseStyle.underline === toCompareStyle.underline &&
                baseStyle.vAlign === toCompareStyle.vAlign &&
                baseStyle.indent === toCompareStyle.indent &&
                baseStyle.rotation === toCompareStyle.rotation &&
                baseStyle.wrapText === toCompareStyle.wrapText &&
                (baseStyle.borders.all.color === toCompareStyle.borders.all.color &&
                    baseStyle.borders.all.lineStyle === toCompareStyle.borders.all.lineStyle) &&
                (baseStyle.borders.left.color === toCompareStyle.borders.left.color &&
                    baseStyle.borders.left.lineStyle === toCompareStyle.borders.left.lineStyle &&
                    baseStyle.borders.right.color === toCompareStyle.borders.right.color &&
                    baseStyle.borders.right.lineStyle === toCompareStyle.borders.right.lineStyle &&
                    baseStyle.borders.top.color === toCompareStyle.borders.top.color &&
                    baseStyle.borders.top.lineStyle === toCompareStyle.borders.top.lineStyle &&
                    baseStyle.borders.bottom.color === toCompareStyle.borders.bottom.color &&
                    baseStyle.borders.bottom.lineStyle === toCompareStyle.borders.bottom.lineStyle));
            if (result) {
                index = baseStyle.index;
                break;
            }
        }
        return { index: index, result: result };
    };
    Workbook.prototype.contains = function (array, item) {
        var index = array.indexOf(item);
        return index > -1 && index < array.length;
    };
    Workbook.prototype.getCellValueType = function (value) {
        if (value instanceof Date) {
            return 'datetime';
        }
        else if (typeof (value) === 'boolean') {
            return 'boolean';
        }
        else if (typeof (value) === 'number') {
            return 'number';
        }
        else {
            return 'string';
        }
    };
    Workbook.prototype.parseCellType = function (cell) {
        var type = cell.type;
        var saveType;
        var value = cell.value;
        switch (type) {
            case 'datetime':
                value = this.toOADate(value);
                if (cell.cellStyle !== undefined && cell.cellStyle.name !== undefined) {
                    if (this.globalStyles.has(cell.cellStyle.name)) {
                        var value_1 = this.globalStyles.get(cell.cellStyle.name);
                        this.switchNumberFormat(value_1.format, value_1.type);
                    }
                }
                saveType = 'n';
                break;
            //TODO: Update the number format index and style
            case 'boolean':
                value = value ? 1 : 0;
                saveType = 'b';
                break;
            case 'number':
                saveType = 'n';
                if (cell.cellStyle !== undefined && cell.cellStyle.name !== undefined) {
                    if (this.globalStyles.has(cell.cellStyle.name)) {
                        this.switchNumberFormat(this.globalStyles.get(cell.cellStyle.name).format, 'number');
                    }
                }
                break;
            case 'string':
                this.sharedStringCount++;
                saveType = 's';
                var sstvalue = this.processCellValue(value, cell);
                if (!this.contains(this.sharedString, sstvalue)) {
                    this.sharedString.push(sstvalue);
                }
                value = this.sharedString.indexOf(sstvalue);
                break;
            default:
                break;
        }
        cell.saveType = saveType;
        cell.value = value;
    };
    Workbook.prototype.saveAsBlob = function (blobSaveType) {
        var _this = this;
        switch (blobSaveType) {
            case 'text/csv':
                return new Promise(function (resolve, reject) {
                    var obj = {};
                    obj.blobData = _this.csvHelper.saveAsBlob();
                    resolve(obj);
                });
            default:
                return new Promise(function (resolve, reject) {
                    _this.saveInternal();
                    _this.mArchive.saveAsBlob().then(function (blob) {
                        var obj = {};
                        obj.blobData = new Blob([blob], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
                        resolve(obj);
                    });
                });
        }
    };
    Workbook.prototype.save = function (fileName, proxyUrl) {
        var _this = this;
        if (fileName === null || fileName === undefined || fileName === '') {
            throw new Error('Argument Null Exception: fileName cannot be null or empty');
        }
        var xlsxMatch = fileName.match('.xlsx$');
        var csvMatch = fileName.match('.csv$');
        if (xlsxMatch !== null && xlsxMatch[0] === ('.' + this.mSaveType)) {
            this.saveInternal();
            this.mArchive.save(fileName).then(function () {
                _this.mArchive.destroy();
            });
        }
        else if (csvMatch !== null && csvMatch[0] === ('.' + this.mSaveType)) {
            this.csvHelper.save(fileName);
        }
        else {
            throw Error('Save type and file extension is different.');
        }
    };
    Workbook.prototype.saveInternal = function () {
        this.saveWorkbook();
        this.saveWorksheets();
        this.saveSharedString();
        this.saveStyles();
        this.saveApp(this.builtInProperties);
        this.saveCore(this.builtInProperties);
        this.saveContentType();
        this.saveTopLevelRelation();
        this.saveWorkbookRelation();
    };
    Workbook.prototype.saveWorkbook = function () {
        /* tslint:disable-next-line:max-line-length */
        var workbookTemp = '<?xml version="1.0" encoding="utf-8"?><workbook xmlns:r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns= "http://schemas.openxmlformats.org/spreadsheetml/2006/main"><workbookPr codeName="ThisWorkbook" defaultThemeVersion= "153222"/><bookViews><workbookView activeTab="0"/></bookViews>';
        var sheets = '<sheets>';
        var length = this.worksheets.length;
        for (var i = 0; i < length; i++) {
            /* tslint:disable-next-line:max-line-length */
            sheets += '<sheet name="' + this.worksheets[i].name + '" sheetId="' + (i + 1).toString() + '" r:id ="rId' + (i + 1).toString() + '" />';
        }
        sheets += '</sheets>';
        workbookTemp += sheets;
        if (this.printTitles.size > 0) {
            var printTitle_1 = '<definedNames>';
            this.printTitles.forEach(function (value, key) {
                printTitle_1 += '<definedName name="_xlnm.Print_Titles" localSheetId="' + key + '">' + value + '</definedName>';
            });
            printTitle_1 += '</definedNames>';
            workbookTemp += printTitle_1;
        }
        this.addToArchive(workbookTemp + '</workbook>', 'xl/workbook.xml');
    };
    Workbook.prototype.saveWorksheets = function () {
        var length = this.worksheets.length;
        for (var i = 0; i < length; i++) {
            this.saveWorksheet(this.worksheets[i], i);
        }
    };
    Workbook.prototype.saveWorksheet = function (sheet, index) {
        var sheetBlob = new _blob_helper__WEBPACK_IMPORTED_MODULE_9__["BlobHelper"]();
        /* tslint:disable-next-line:max-line-length */
        var sheetString = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';
        if (!sheet.isSummaryRowBelow) {
            sheetString += ('<sheetPr>' + '<outlinePr ' + 'summaryBelow="0" >' + '</outlinePr>' + '</sheetPr>');
        }
        else {
            sheetString += ('<sheetPr />');
        }
        sheetString += this.saveSheetView(sheet);
        if (sheet.columns !== undefined) {
            var colString = '<cols>';
            for (var _i = 0, _a = sheet.columns; _i < _a.length; _i++) {
                var column = _a[_i];
                /* tslint:disable-next-line:max-line-length */
                if (column.width !== undefined) {
                    colString += '<col min="' + (column.index) + '" max="' + (column.index) + '" width="' + this.pixelsToColumnWidth(column.width) + '" customWidth="1" />';
                }
                else {
                    colString += '<col min="' + (column.index) + '" max="' + (column.index) + '" width="' + '8.43' + '" customWidth="1" />';
                }
            }
            sheetString += (colString + '</cols>');
        }
        sheetString += ('<sheetData>');
        sheetBlob.append(sheetString);
        sheetString = '';
        if (sheet.rows !== undefined) {
            for (var _b = 0, _c = sheet.rows; _b < _c.length; _b++) {
                var row = _c[_b];
                var rowString = '<row r="' + (row.index) + '" ';
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_8__["isNullOrUndefined"])(row.spans)) {
                    rowString += 'spans="' + row.spans + '" ';
                }
                if (row.height !== undefined) {
                    rowString += ('ht="' + this.pixelsToRowHeight(row.height) + '" customHeight="1" ');
                }
                if (row.grouping !== undefined) {
                    if (row.grouping.isHidden) {
                        rowString += ('hidden="1" ');
                    }
                    if (row.grouping.outlineLevel !== undefined) {
                        rowString += ('outlineLevel="' + row.grouping.outlineLevel + '" ');
                    }
                    if (row.grouping.isCollapsed) {
                        rowString += ('collapsed="1" ');
                    }
                }
                rowString += ('>');
                for (var _d = 0, _e = row.cells; _d < _e.length; _d++) {
                    var cell = _e[_d];
                    if (cell !== undefined && (cell.value !== undefined || cell.cellStyle !== undefined)) {
                        rowString += ('<c r="' + cell.refName + '" ');
                        if (cell.saveType !== undefined) {
                            rowString += ('t="' + cell.saveType + '" ');
                        }
                        if (cell.styleIndex !== undefined) {
                            rowString += ('s="' + cell.styleIndex + '" ');
                        }
                        rowString += (' >');
                        if (cell.formula !== undefined) {
                            rowString += ('<f>' + cell.formula + '</f>');
                        }
                        if (cell.value !== undefined) {
                            rowString += ('<v>' + cell.value + '</v></c>');
                        }
                        else {
                            rowString += ('</c>');
                        }
                    }
                }
                rowString += ('</row>');
                sheetBlob.append(rowString);
            }
        }
        sheetString += ('</sheetData>');
        if (sheet.mergeCells.length > 0) {
            sheetString += ('<mergeCells count="' + sheet.mergeCells.length + '">');
            for (var _f = 0, _g = sheet.mergeCells; _f < _g.length; _f++) {
                var mCell = _g[_f];
                sheetString += ('<mergeCell ref="' + mCell.ref + '" />');
            }
            sheetString += ('</mergeCells>');
        }
        if (sheet.hyperLinks.length > 0) {
            sheetString += ('<hyperlinks>');
            for (var _h = 0, _j = sheet.hyperLinks; _h < _j.length; _h++) {
                var hLink = _j[_h];
                sheetString += ('<hyperlink ref="' + hLink.ref + '" r:id="rId' + hLink.rId + '" />');
            }
            sheetString += ('</hyperlinks>');
            this.addToArchive(this.saveSheetRelations(sheet), ('xl/worksheets/_rels/sheet' + sheet.index + '.xml.rels'));
        }
        /* tslint:disable-next-line:max-line-length */
        sheetString += ('<pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5" /><headerFooter scaleWithDoc="1" alignWithMargins="0" differentFirst="0" differentOddEven="0" /></worksheet>');
        sheetBlob.append(sheetString);
        this.addToArchive(sheetBlob.getBlob(), 'xl/worksheets' + '/sheet' + (index + 1) + '.xml');
    };
    Workbook.prototype.pixelsToColumnWidth = function (pixels) {
        var dDigitWidth = 7;
        var val = (pixels > dDigitWidth + 5) ?
            this.trunc((pixels - 5) / dDigitWidth * 100 + 0.5) / 100 :
            pixels / (dDigitWidth + 5);
        return (val > 1) ?
            ((val * dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0 :
            (val * (dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0;
    };
    Workbook.prototype.trunc = function (x) {
        var n = x - x % 1;
        return n === 0 && (x < 0 || (x === 0 && (1 / x !== 1 / 0))) ? -0 : n;
    };
    Workbook.prototype.pixelsToRowHeight = function (pixels) {
        return (pixels * this.unitsProportions[5] / this.unitsProportions[6]);
    };
    Workbook.prototype.saveSheetRelations = function (sheet) {
        /* tslint:disable-next-line:max-line-length */
        var relStr = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">';
        for (var _i = 0, _a = sheet.hyperLinks; _i < _a.length; _i++) {
            var hLink = _a[_i];
            /* tslint:disable-next-line:max-line-length */
            relStr += '<Relationship Id="rId' + hLink.rId + '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="' + hLink.target + '" TargetMode="External" />';
        }
        relStr += '</Relationships>';
        return relStr;
    };
    Workbook.prototype.saveSheetView = function (sheet) {
        var paneString = '<sheetViews><sheetView workbookViewId="0" ';
        if (sheet.showGridLines === false) {
            paneString += 'showGridLines="0" >';
        }
        else {
            paneString += '>';
        }
        if (sheet.freezePanes !== undefined) {
            paneString += '<pane state="frozen"' +
                ' topLeftCell="' + sheet.freezePanes.leftCell + '" ';
            if (sheet.freezePanes.row !== 0) {
                paneString += 'ySplit="' + sheet.freezePanes.row + '" ';
            }
            if (sheet.freezePanes.column !== 0) {
                paneString += 'xSplit="' + sheet.freezePanes.column + '" ';
            }
            paneString += '/>';
        }
        paneString += '</sheetView></sheetViews > ';
        return paneString;
    };
    Workbook.prototype.saveSharedString = function () {
        var length = this.sharedString.length;
        if (length > 0) {
            /* tslint:disable-next-line:max-line-length */
            var sstStart = '<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="' + length + '" count="' + this.sharedStringCount + '" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';
            var si = '';
            for (var i = 0; i < length; i++) {
                if (!this.sharedString[i].startsWith('<r>')) {
                    si += '<si><t>';
                    si += this.processString(this.sharedString[i]);
                    si += '</t></si>';
                }
                else {
                    si += '<si>';
                    si += this.sharedString[i];
                    si += '</si>';
                }
            }
            si += '</sst>';
            this.addToArchive(sstStart + si, 'xl/sharedStrings.xml');
        }
    };
    Workbook.prototype.processString = function (value) {
        if (value.indexOf('&') !== -1) {
            value = value.replace(/&/g, '&amp;');
        }
        if (value.indexOf('<') !== -1) {
            value = value.replace(/</g, '&lt;');
        }
        if (value.indexOf('>') !== -1) {
            value = value.replace(/>/g, '&gt;');
        }
        return value;
    };
    Workbook.prototype.saveStyles = function () {
        this.updateCellXfsStyleXfs();
        /* tslint:disable-next-line:max-line-length */
        var styleTemp = '<?xml version="1.0" encoding="utf-8"?><styleSheet xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';
        styleTemp += this.saveNumberFormats();
        styleTemp += this.saveFonts();
        styleTemp += this.saveFills();
        styleTemp += this.saveBorders();
        styleTemp += this.saveCellStyleXfs();
        styleTemp += this.saveCellXfs();
        styleTemp += this.saveCellStyles();
        this.addToArchive(styleTemp + '</styleSheet>', 'xl/styles.xml');
    };
    Workbook.prototype.updateCellXfsStyleXfs = function () {
        for (var _i = 0, _a = this.mStyles; _i < _a.length; _i++) {
            var style = _a[_i];
            var cellXfs = undefined;
            if (style.isGlobalStyle) {
                cellXfs = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellStyleXfs"]();
                cellXfs.xfId = (style.index - 1);
            }
            else {
                cellXfs = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["CellXfs"]();
                cellXfs.xfId = 0;
            }
            //Add font
            var compareFontResult = this.isNewFont(style);
            if (!compareFontResult.result) {
                var font = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["Font"]();
                font.b = style.bold;
                font.i = style.italic;
                font.name = style.fontName;
                font.sz = style.fontSize;
                font.u = style.underline;
                font.color = ('FF' + style.fontColor.replace('#', ''));
                this.mFonts.push(font);
                cellXfs.fontId = this.mFonts.length - 1;
            }
            else {
                cellXfs.fontId = compareFontResult.index;
            }
            //Add fill
            if (style.backColor !== 'none') {
                var backColor = 'FF' + style.backColor.replace('#', '');
                if (this.mFills.has(backColor)) {
                    var fillId = this.mFills.get(backColor);
                    cellXfs.fillId = fillId;
                }
                else {
                    var fillId = this.mFills.size + 2;
                    this.mFills.set(backColor, fillId);
                    cellXfs.fillId = (fillId);
                }
            }
            else {
                cellXfs.fillId = 0;
            }
            //Add border            
            if (!this.isNewBorder(style)) {
                this.mBorders.push(style.borders);
                cellXfs.borderId = this.mBorders.length;
            }
            else {
                cellXfs.borderId = 0;
            }
            //Add Number Format            
            if (style.numberFormat !== 'GENERAL') {
                if (this.mNumFmt.has(style.numberFormat)) {
                    var numFmt = this.mNumFmt.get(style.numberFormat);
                    cellXfs.numFmtId = numFmt.numFmtId;
                }
                else {
                    var id = this.mNumFmt.size + 164;
                    this.mNumFmt.set(style.numberFormat, new _cell_style__WEBPACK_IMPORTED_MODULE_2__["NumFmt"](id, style.numberFormat));
                    cellXfs.numFmtId = id;
                }
            }
            else {
                if (style.numberFormat === 'GENERAL' && style.numFmtId === 14) {
                    cellXfs.numFmtId = 14;
                }
                else {
                    cellXfs.numFmtId = 0;
                }
            }
            //Add alignment            
            if (!style.isGlobalStyle) {
                cellXfs.applyAlignment = 1;
            }
            cellXfs.alignment = new _cell_style__WEBPACK_IMPORTED_MODULE_2__["Alignment"]();
            cellXfs.alignment.indent = style.indent;
            cellXfs.alignment.horizontal = style.hAlign;
            cellXfs.alignment.vertical = style.vAlign;
            cellXfs.alignment.wrapText = style.wrapText ? 1 : 0;
            cellXfs.alignment.rotation = style.rotation;
            if (style.isGlobalStyle) {
                this.mCellStyleXfs.push(cellXfs);
                this.mCellXfs.push(cellXfs);
            }
            else {
                //Add cellxfs
                this.mCellXfs.push(cellXfs);
            }
        }
    };
    Workbook.prototype.saveNumberFormats = function () {
        if (this.mNumFmt.size >= 1) {
            var numFmtStyle_1 = '<numFmts count="' + (this.mNumFmt.size) + '">';
            this.mNumFmt.forEach(function (value, key) {
                numFmtStyle_1 += '<numFmt numFmtId="' + value.numFmtId + '" formatCode="' + value.formatCode.replace(/"/g, '&quot;') + '" />';
            });
            return (numFmtStyle_1 += '</numFmts>');
        }
        else {
            return '';
        }
    };
    Workbook.prototype.saveFonts = function () {
        /* tslint:disable-next-line:max-line-length */
        var fontStyle = '<fonts count="' + (this.mFonts.length) + '">';
        if (this.mFonts.length >= 1) {
            for (var _i = 0, _a = this.mFonts; _i < _a.length; _i++) {
                var font = _a[_i];
                fontStyle += '<font>';
                if (font.b) {
                    fontStyle += '<b />';
                }
                if (font.i) {
                    fontStyle += '<i />';
                }
                if (font.u) {
                    fontStyle += '<u />';
                }
                fontStyle += '<sz val="' + this.pixelsToRowHeight(font.sz) + '" />';
                fontStyle += '<color rgb="' + font.color + '" />';
                fontStyle += '<name val="' + font.name + '" /></font>';
            }
        }
        return fontStyle + '</fonts>';
    };
    Workbook.prototype.saveFills = function () {
        /* tslint:disable-next-line:max-line-length */
        var fillsStyle = '<fills count="' + (this.mFills.size + 2) + '"><fill><patternFill patternType="none"></patternFill></fill><fill><patternFill patternType="gray125"></patternFill></fill>';
        if (this.mFills.size >= 1) {
            this.mFills.forEach(function (value, key) {
                /* tslint:disable-next-line:max-line-length */
                fillsStyle += '<fill><patternFill patternType="solid"><fgColor rgb="' + key + '" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>';
            });
        }
        return fillsStyle + '</fills>';
    };
    Workbook.prototype.saveBorders = function () {
        /* tslint:disable-next-line:max-line-length */
        var bordersStyle = '<borders count="' + (this.mBorders.length + 1) + '"><border><left /><right /><top /><bottom /><diagonal /></border>';
        if (this.mBorders.length >= 1) {
            for (var _i = 0, _a = this.mBorders; _i < _a.length; _i++) {
                var borders = _a[_i];
                if (this.isAllBorder(borders)) {
                    var color = borders.all.color.replace('#', '');
                    var lineStyle = borders.all.lineStyle;
                    /* tslint:disable-next-line:max-line-length */
                    bordersStyle += '<border><left style="' + lineStyle + '"><color rgb="FF' + color + '" /></left><right style="' + lineStyle + '"><color rgb="FF' + color + '" /></right><top style="' + lineStyle + '"><color rgb="FF' + color + '" /></top><bottom style="' + lineStyle + '"><color rgb="FF' + color + '" /></bottom></border>';
                }
                else {
                    /* tslint:disable-next-line:max-line-length */
                    bordersStyle += '<border><left style="' + borders.left.lineStyle + '"><color rgb="FF' + borders.left.color.replace('#', '') + '" /></left><right style="' + borders.right.lineStyle + '"><color rgb="FF' + borders.right.color.replace('#', '') + '" /></right><top style="' + borders.top.lineStyle + '"><color rgb="FF' + borders.top.color.replace('#', '') + '" /></top><bottom style="' + borders.bottom.lineStyle + '"><color rgb="FF' + borders.bottom.color.replace('#', '') + '" /></bottom></border>';
                }
            }
        }
        return bordersStyle + '</borders>';
    };
    Workbook.prototype.saveCellStyles = function () {
        var _this = this;
        var cellStyleString = '<cellStyles  count="' + (this.cellStyles.size) + '">';
        this.cellStyles.forEach(function (value, key) {
            cellStyleString += '<cellStyle name="' + key + '" xfId="' + _this.cellStyles.get(key).xfId + '"';
            if (key === 'Normal') {
                cellStyleString += ' builtinId="0"';
            }
            cellStyleString += ' />';
        });
        return cellStyleString += '</cellStyles>';
    };
    Workbook.prototype.saveCellStyleXfs = function () {
        /* tslint:disable-next-line:max-line-length */
        var cellXfsStyle = '<cellStyleXfs count="' + (this.mCellStyleXfs.length + 1) + '"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';
        if (this.mCellStyleXfs.length >= 1) {
            for (var _i = 0, _a = this.mCellStyleXfs; _i < _a.length; _i++) {
                var cellStyleXf = _a[_i];
                /* tslint:disable-next-line:max-line-length */
                cellXfsStyle += '<xf numFmtId="' + cellStyleXf.numFmtId + '" fontId="' + cellStyleXf.fontId + '" fillId="' + cellStyleXf.fillId + '" borderId="' + cellStyleXf.borderId + '" ';
                if (cellStyleXf.alignment !== undefined) {
                    cellXfsStyle += '>' + this.saveAlignment(cellStyleXf) + '</xf>';
                }
                else {
                    cellXfsStyle += ' />';
                }
            }
        }
        return cellXfsStyle + '</cellStyleXfs>';
    };
    Workbook.prototype.saveCellXfs = function () {
        /* tslint:disable-next-line:max-line-length */
        var cellXfsStyle = '<cellXfs count="' + (this.mCellXfs.length + 1) + '"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';
        if (this.mCellXfs.length >= 1) {
            for (var _i = 0, _a = this.mCellXfs; _i < _a.length; _i++) {
                var cellXf = _a[_i];
                /* tslint:disable-next-line:max-line-length */
                cellXfsStyle += '<xf numFmtId="' + cellXf.numFmtId + '" fontId="' + cellXf.fontId + '" fillId="' + cellXf.fillId + '" borderId="' + cellXf.borderId + '" xfId="' + cellXf.xfId + '" ';
                if (cellXf.applyAlignment === 1) {
                    cellXfsStyle += 'applyAlignment="1"';
                }
                cellXfsStyle += '>' + this.saveAlignment(cellXf) + '</xf>';
            }
        }
        return cellXfsStyle + '</cellXfs>';
    };
    Workbook.prototype.saveAlignment = function (cellXf) {
        var alignString = '<alignment ';
        if (cellXf.alignment.horizontal !== undefined) {
            alignString += 'horizontal="' + cellXf.alignment.horizontal + '" ';
        }
        if (cellXf.alignment.indent !== undefined && cellXf.alignment.indent !== 0) {
            alignString += 'indent="' + cellXf.alignment.indent + '" ';
        }
        else if (cellXf.alignment.rotation !== undefined && cellXf.alignment.rotation !== 0) {
            alignString += 'textRotation="' + cellXf.alignment.rotation + '" ';
        }
        if (cellXf.alignment.vertical !== undefined) {
            alignString += 'vertical="' + cellXf.alignment.vertical + '" ';
        }
        alignString += 'wrapText="' + cellXf.alignment.wrapText + '" />';
        return alignString;
    };
    Workbook.prototype.saveApp = function (builtInProperties) {
        /* tslint:disable-next-line:max-line-length */
        var appString = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Essential XlsIO</Application>';
        if (builtInProperties !== undefined) {
            if (builtInProperties.manager !== undefined) {
                appString += '<Manager>' + builtInProperties.manager + '</Manager>';
            }
            if (builtInProperties.company !== undefined) {
                appString += '<Company>' + builtInProperties.company + '</Company>';
            }
        }
        this.addToArchive((appString + '</Properties>'), 'docProps/app.xml');
    };
    Workbook.prototype.saveCore = function (builtInProperties) {
        var createdDate = new Date();
        /* tslint:disable-next-line:max-line-length */
        var coreString = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><cp:coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">';
        if (this.builtInProperties !== undefined) {
            if (builtInProperties.author !== undefined) {
                coreString += '<dc:creator>' + builtInProperties.author + '</dc:creator>';
            }
            if (builtInProperties.subject !== undefined) {
                coreString += '<dc:subject>' + builtInProperties.subject + '</dc:subject>';
            }
            if (builtInProperties.category !== undefined) {
                coreString += '<cp:category>' + builtInProperties.category + '</cp:category>';
            }
            if (builtInProperties.comments !== undefined) {
                coreString += '<dc:description>' + builtInProperties.comments + '</dc:description>';
            }
            if (builtInProperties.title !== undefined) {
                coreString += '<dc:title>' + builtInProperties.title + '</dc:title>';
            }
            if (builtInProperties.tags !== undefined) {
                coreString += '<cp:keywords>' + builtInProperties.tags + '</cp:keywords>';
            }
            if (builtInProperties.status !== undefined) {
                coreString += '<cp:contentStatus>' + builtInProperties.status + '</cp:contentStatus>';
            }
            if (builtInProperties.createdDate !== undefined) {
                /* tslint:disable-next-line:max-line-length */
                coreString += '<dcterms:created xsi:type="dcterms:W3CDTF">' + builtInProperties.createdDate.toISOString() + '</dcterms:created>';
            }
            else {
                coreString += '<dcterms:created xsi:type="dcterms:W3CDTF">' + createdDate.toISOString() + '</dcterms:created>';
            }
            if (builtInProperties.modifiedDate !== undefined) {
                /* tslint:disable-next-line:max-line-length */
                coreString += '<dcterms:modified xsi:type="dcterms:W3CDTF">' + builtInProperties.modifiedDate.toISOString() + '</dcterms:modified>';
            }
            else {
                coreString += '<dcterms:modified xsi:type="dcterms:W3CDTF">' + createdDate.toISOString() + '</dcterms:modified>';
            }
        }
        else {
            coreString += '<dcterms:created xsi:type="dcterms:W3CDTF">' + createdDate.toISOString() + '</dcterms:created>';
            coreString += '<dcterms:modified xsi:type="dcterms:W3CDTF">' + createdDate.toISOString() + '</dcterms:modified>';
        }
        /* tslint:disable-next-line:max-line-length */
        coreString += '</cp:coreProperties>';
        this.addToArchive(coreString, 'docProps/core.xml');
    };
    Workbook.prototype.saveTopLevelRelation = function () {
        /* tslint:disable-next-line:max-line-length */
        var topRelation = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" /><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" /><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /></Relationships>';
        this.addToArchive(topRelation, '_rels/.rels');
    };
    Workbook.prototype.saveWorkbookRelation = function () {
        /* tslint:disable-next-line:max-line-length */
        var wbRelation = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">';
        var length = this.worksheets.length;
        var count = 0;
        for (var i = 0; i < length; i++, count++) {
            /* tslint:disable-next-line:max-line-length */
            wbRelation += '<Relationship Id="rId' + (i + 1).toString() + '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet' + (i + 1).toString() + '.xml" />';
        }
        /* tslint:disable-next-line:max-line-length */
        wbRelation += '<Relationship Id="rId' + (++count).toString() + '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />';
        if (this.sharedStringCount > 0) {
            /* tslint:disable-next-line:max-line-length */
            wbRelation += '<Relationship Id="rId' + (++count).toString() + '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />';
        }
        this.addToArchive((wbRelation + '</Relationships>'), 'xl/_rels/workbook.xml.rels');
    };
    Workbook.prototype.saveContentType = function () {
        /* tslint:disable-next-line:max-line-length */
        var contentTypeString = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />';
        var sheetsOverride = '';
        var length = this.worksheets.length;
        for (var i = 0; i < length; i++) {
            /* tslint:disable-next-line:max-line-length */
            sheetsOverride += '<Override PartName="/xl/worksheets/sheet' + (i + 1).toString() + '.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />';
        }
        if (this.sharedStringCount > 0) {
            /* tslint:disable-next-line:max-line-length */
            contentTypeString += '<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />';
        }
        this.addToArchive((contentTypeString + sheetsOverride + '</Types>'), '[Content_Types].xml');
    };
    Workbook.prototype.addToArchive = function (xmlString, itemName) {
        if (typeof (xmlString) === 'string') {
            var blob = new Blob([xmlString], { type: 'text/plain' });
            var archiveItem = new _syncfusion_ej2_compression__WEBPACK_IMPORTED_MODULE_6__["ZipArchiveItem"](blob, itemName);
            this.mArchive.addItem(archiveItem);
        }
        else {
            var archiveItem = new _syncfusion_ej2_compression__WEBPACK_IMPORTED_MODULE_6__["ZipArchiveItem"](xmlString, itemName);
            this.mArchive.addItem(archiveItem);
        }
    };
    Workbook.prototype.processMergeCells = function (cell, rowIndex, mergeCells) {
        if (cell.rowSpan !== 0 || cell.colSpan !== 0) {
            var mCell = new _worksheet__WEBPACK_IMPORTED_MODULE_1__["MergeCell"]();
            mCell.x = cell.index;
            mCell.width = cell.colSpan;
            mCell.y = rowIndex;
            mCell.height = cell.rowSpan;
            var startCell = this.getCellName(mCell.y, mCell.x);
            var endCell = this.getCellName(rowIndex + mCell.height, cell.index + mCell.width);
            mCell.ref = startCell + ':' + endCell;
            var mergedCell = mergeCells.add(mCell);
            var start = { x: mCell.x, y: mCell.y };
            var end = {
                x: (cell.index + mCell.width), y: (rowIndex + mCell.height)
            };
            this.updatedMergedCellStyles(start, end, cell);
        }
        return mergeCells;
    };
    Workbook.prototype.updatedMergedCellStyles = function (sCell, eCell, cell) {
        for (var x = sCell.x; x <= eCell.x; x++) {
            for (var y = sCell.y; y <= eCell.y; y++) {
                this.mergedCellsStyle.set(this.getCellName(y, x), { x: x, y: y, styleIndex: cell.styleIndex });
            }
        }
    };
    /**
     * Returns the tick count corresponding to the given year, month, and day.
     * @param year number value of year
     * @param month number value of month
     * @param day number value of day
     */
    Workbook.prototype.dateToTicks = function (year, month, day) {
        var ticksPerDay = 10000 * 1000 * 60 * 60 * 24;
        var daysToMonth365 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];
        var daysToMonth366 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];
        if (year >= 1 && year <= 9999 && month >= 1 && month <= 12) {
            var days = this.isLeapYear(year) ? daysToMonth366 : daysToMonth365;
            var y = year - 1;
            var n = y * 365 + ((y / 4) | 0) - ((y / 100) | 0) + ((y / 400) | 0) + days[month - 1] + day - 1;
            return n * ticksPerDay;
        }
        throw new Error('Not a valid date');
    };
    /**
     * Return the tick count corresponding to the given hour, minute, second.
     * @param hour number value of hour
     * @param minute number value if minute
     * @param second number value of second
     */
    Workbook.prototype.timeToTicks = function (hour, minute, second) {
        if (hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60) {
            var totalSeconds = hour * 3600 + minute * 60 + second;
            return totalSeconds * 10000 * 1000;
        }
        throw new Error('Not valid time');
    };
    /**
     * Checks if given year is a leap year.
     * @param year Year value.
     */
    Workbook.prototype.isLeapYear = function (year) {
        return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
    };
    /**
     * Converts `DateTime` to the equivalent OLE Automation date.
     */
    Workbook.prototype.toOADate = function (date) {
        var ticks = 0;
        /* tslint:disable-next-line:max-line-length */
        ticks = this.dateToTicks(date.getFullYear(), (date.getMonth() + 1), date.getDate()) + this.timeToTicks(date.getHours(), date.getMinutes(), date.getSeconds());
        if (ticks === 0) {
            return 0.0;
        }
        var ticksPerDay = 10000 * 1000 * 60 * 60 * 24;
        var daysTo1899 = (((365 * 4 + 1) * 25 - 1) * 4 + 1) * 4 + ((365 * 4 + 1) * 25 - 1) * 3 - 367;
        var doubleDateOffset = daysTo1899 * ticksPerDay;
        var oaDateMinAsTicks = (((365 * 4 + 1) * 25 - 1) - 365) * ticksPerDay;
        if (ticks < oaDateMinAsTicks) {
            throw new Error('Arg_OleAutDateInvalid');
        }
        var millisPerDay = 1000 * 60 * 60 * 24;
        return ((ticks - doubleDateOffset) / 10000) / millisPerDay;
    };
    return Workbook;
}());

/**
 * BuiltInProperties Class
 * @private
 */
var BuiltInProperties = /** @class */ (function () {
    function BuiltInProperties() {
    }
    return BuiltInProperties;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/worksheet.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/worksheet.js ***!
  \********************************************************************/
/*! exports provided: Worksheet, HyperLink, Grouping, FreezePane, MergeCell, MergeCells */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Worksheet", function() { return Worksheet; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HyperLink", function() { return HyperLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Grouping", function() { return Grouping; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FreezePane", function() { return FreezePane; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeCell", function() { return MergeCell; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeCells", function() { return MergeCells; });
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * Worksheet class
 * @private
 */
var Worksheet = /** @class */ (function () {
    function Worksheet() {
        this.isSummaryRowBelow = true;
        this.showGridLines = true;
    }
    return Worksheet;
}());

/**
 * Hyperlink class
 * @private
 */
var HyperLink = /** @class */ (function () {
    function HyperLink() {
    }
    return HyperLink;
}());

/**
 * Grouping class
 * @private
 */
var Grouping = /** @class */ (function () {
    function Grouping() {
    }
    return Grouping;
}());

/**
 * FreezePane class
 * @private
 */
var FreezePane = /** @class */ (function () {
    function FreezePane() {
    }
    return FreezePane;
}());

/**
 * MergeCell
 * @private
 */
var MergeCell = /** @class */ (function () {
    function MergeCell() {
    }
    return MergeCell;
}());

/**
 * MergeCells class
 * @private
 */
var MergeCells = /** @class */ (function (_super) {
    __extends(MergeCells, _super);
    function MergeCells() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.add = function (mergeCell) {
            var inserted = false;
            var count = 0;
            for (var _i = 0, _a = _this; _i < _a.length; _i++) {
                var mCell = _a[_i];
                if (MergeCells.isIntersecting(mCell, mergeCell)) {
                    var intersectingCell = new MergeCell();
                    intersectingCell.x = Math.min(mCell.x, mergeCell.x);
                    intersectingCell.y = Math.min(mCell.Y, mergeCell.y);
                    intersectingCell.width = Math.max(mCell.Width + mCell.X, mergeCell.width + mergeCell.x);
                    intersectingCell.height = Math.max(mCell.Height + mCell.Y, mergeCell.height + mergeCell.y);
                    intersectingCell.ref = (_this[count].ref.split(':')[0]) + ':' + (mergeCell.ref.split(':')[1]);
                    _this[count] = intersectingCell;
                    mergeCell = intersectingCell;
                    inserted = true;
                }
                count++;
            }
            if (!inserted) {
                _this.push(mergeCell);
            }
            return mergeCell;
        };
        return _this;
    }
    MergeCells.isIntersecting = function (base, compare) {
        return (base.x <= compare.x + compare.width)
            && (compare.x <= base.x + base.width)
            && (base.y <= compare.y + compare.height)
            && (compare.y <= base.y + base.height);
    };
    return MergeCells;
}(Array));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-excel-export/src/worksheets.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-excel-export/src/worksheets.js ***!
  \*********************************************************************/
/*! exports provided: Worksheets */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Worksheets", function() { return Worksheets; });
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * Worksheets class
 * @private
 */
var Worksheets = /** @class */ (function (_super) {
    __extends(Worksheets, _super);
    function Worksheets() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return Worksheets;
}(Array));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-file-utils/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-file-utils/index.js ***!
  \**********************************************************/
/*! exports provided: XmlWriter, Namespace, XmlElement, XmlAttribute, StreamWriter, Encoding, validateNullOrUndefined, Save */
/***/ (function(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-file-utils/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlWriter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["XmlWriter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Namespace", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Namespace"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlElement", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["XmlElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlAttribute", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["XmlAttribute"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StreamWriter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["StreamWriter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Encoding", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Encoding"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "validateNullOrUndefined", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["validateNullOrUndefined"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Save", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Save"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-file-utils/src/encoding.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-file-utils/src/encoding.js ***!
  \*****************************************************************/
/*! exports provided: Encoding, validateNullOrUndefined */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Encoding", function() { return Encoding; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateNullOrUndefined", function() { return validateNullOrUndefined; });
/**
 * Encoding class: Contains the details about encoding type, whether to write a Unicode byte order mark (BOM).
 * ```typescript
 * let encoding : Encoding = new Encoding();
 * encoding.type = 'Utf8';
 * encoding.getBytes('Encoding', 0, 5);
 * ```
 */
var Encoding = /** @class */ (function () {
    /**
     * Initializes a new instance of the Encoding class. A parameter specifies whether to write a Unicode byte order mark
     * @param  {boolean} includeBom?-true to specify that a Unicode byte order mark is written; otherwise, false.
     */
    function Encoding(includeBom) {
        this.emitBOM = true;
        this.encodingType = 'Ansi';
        this.initBOM(includeBom);
    }
    Object.defineProperty(Encoding.prototype, "includeBom", {
        /**
         * Gets a value indicating whether to write a Unicode byte order mark
         * @returns boolean- true to specify that a Unicode byte order mark is written; otherwise, false
         */
        get: function () {
            return this.emitBOM;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Encoding.prototype, "type", {
        /**
         * Gets the encoding type.
         * @returns EncodingType
         */
        get: function () {
            return this.encodingType;
        },
        /**
         * Sets the encoding type.
         * @param  {EncodingType} value
         */
        set: function (value) {
            this.encodingType = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Initialize the includeBom to emit BOM or Not
     * @param  {boolean} includeBom
     */
    Encoding.prototype.initBOM = function (includeBom) {
        if (includeBom === undefined || includeBom === null) {
            this.emitBOM = true;
        }
        else {
            this.emitBOM = includeBom;
        }
    };
    /**
     * Calculates the number of bytes produced by encoding the characters in the specified string
     * @param  {string} chars - The string containing the set of characters to encode
     * @returns {number} - The number of bytes produced by encoding the specified characters
     */
    Encoding.prototype.getByteCount = function (chars) {
        var byteCount = 0;
        validateNullOrUndefined(chars, 'string');
        if (chars === '') {
            var byte = this.utf8Len(chars.charCodeAt(0));
            return byte;
        }
        if (this.type === null || this.type === undefined) {
            this.type = 'Ansi';
        }
        return this.getByteCountInternal(chars, 0, chars.length);
    };
    /**
     * Return the Byte of character
     * @param  {number} codePoint
     * @returns {number}
     */
    Encoding.prototype.utf8Len = function (codePoint) {
        var bytes = codePoint <= 0x7F ? 1 :
            codePoint <= 0x7FF ? 2 :
                codePoint <= 0xFFFF ? 3 :
                    codePoint <= 0x1FFFFF ? 4 : 0;
        return bytes;
    };
    /**
     * for 4 byte character return surrogate pair true, otherwise false
     * @param  {number} codeUnit
     * @returns {boolean}
     */
    Encoding.prototype.isHighSurrogate = function (codeUnit) {
        return codeUnit >= 0xD800 && codeUnit <= 0xDBFF;
    };
    /**
     * for 4byte character generate the surrogate pair
     * @param  {number} highCodeUnit
     * @param  {number} lowCodeUnit
     */
    Encoding.prototype.toCodepoint = function (highCodeUnit, lowCodeUnit) {
        highCodeUnit = (0x3FF & highCodeUnit) << 10;
        var u = highCodeUnit | (0x3FF & lowCodeUnit);
        return u + 0x10000;
    };
    /**
     * private method to get the byte count for specific charindex and count
     * @param  {string} chars
     * @param  {number} charIndex
     * @param  {number} charCount
     */
    Encoding.prototype.getByteCountInternal = function (chars, charIndex, charCount) {
        var byteCount = 0;
        if (this.encodingType === 'Utf8' || this.encodingType === 'Unicode') {
            var isUtf8 = this.encodingType === 'Utf8';
            for (var i = 0; i < charCount; i++) {
                var charCode = chars.charCodeAt(isUtf8 ? charIndex : charIndex++);
                if (this.isHighSurrogate(charCode)) {
                    if (isUtf8) {
                        var high = charCode;
                        var low = chars.charCodeAt(++charIndex);
                        byteCount += this.utf8Len(this.toCodepoint(high, low));
                    }
                    else {
                        byteCount += 4;
                        ++i;
                    }
                }
                else {
                    if (isUtf8) {
                        byteCount += this.utf8Len(charCode);
                    }
                    else {
                        byteCount += 2;
                    }
                }
                if (isUtf8) {
                    charIndex++;
                }
            }
            return byteCount;
        }
        else {
            byteCount = charCount;
            return byteCount;
        }
    };
    /**
     * Encodes a set of characters from the specified string into the ArrayBuffer.
     * @param  {string} s- The string containing the set of characters to encode
     * @param  {number} charIndex-The index of the first character to encode.
     * @param  {number} charCount- The number of characters to encode.
     * @returns {ArrayBuffer} - The ArrayBuffer that contains the resulting sequence of bytes.
     */
    Encoding.prototype.getBytes = function (s, charIndex, charCount) {
        validateNullOrUndefined(s, 'string');
        validateNullOrUndefined(charIndex, 'charIndex');
        validateNullOrUndefined(charCount, 'charCount');
        if (charIndex < 0 || charCount < 0) {
            throw new RangeError('Argument Out Of Range Exception: charIndex or charCount is less than zero');
        }
        if (s.length - charIndex < charCount) {
            throw new RangeError('Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string');
        }
        var bytes;
        if (s === '') {
            bytes = new ArrayBuffer(0);
            return bytes;
        }
        if (this.type === null || this.type === undefined) {
            this.type = 'Ansi';
        }
        var byteCount = this.getByteCountInternal(s, charIndex, charCount);
        switch (this.type) {
            case 'Utf8':
                bytes = this.getBytesOfUtf8Encoding(byteCount, s, charIndex, charCount);
                return bytes;
            case 'Unicode':
                bytes = this.getBytesOfUnicodeEncoding(byteCount, s, charIndex, charCount);
                return bytes;
            default:
                bytes = this.getBytesOfAnsiEncoding(byteCount, s, charIndex, charCount);
                return bytes;
        }
    };
    /**
     * Decodes a sequence of bytes from the specified ArrayBuffer into the string.
     * @param  {ArrayBuffer} bytes- The ArrayBuffer containing the sequence of bytes to decode.
     * @param  {number} index- The index of the first byte to decode.
     * @param  {number} count- The number of bytes to decode.
     * @returns {string} - The string that contains the resulting set of characters.
     */
    Encoding.prototype.getString = function (bytes, index, count) {
        validateNullOrUndefined(bytes, 'bytes');
        validateNullOrUndefined(index, 'index');
        validateNullOrUndefined(count, 'count');
        if (index < 0 || count < 0) {
            throw new RangeError('Argument Out Of Range Exception: index or count is less than zero');
        }
        if (bytes.byteLength - index < count) {
            throw new RangeError('Argument Out Of Range Exception: index and count do not denote a valid range in bytes');
        }
        if (bytes.byteLength === 0 || count === 0) {
            return '';
        }
        if (this.type === null || this.type === undefined) {
            this.type = 'Ansi';
        }
        var out = '';
        var byteCal = new Uint8Array(bytes);
        switch (this.type) {
            case 'Utf8':
                var s = this.getStringOfUtf8Encoding(byteCal, index, count);
                return s;
            case 'Unicode':
                var byteUnicode = new Uint16Array(bytes);
                out = this.getStringofUnicodeEncoding(byteUnicode, index, count);
                return out;
            default:
                var j = index;
                for (var i = 0; i < count; i++) {
                    var c = byteCal[j];
                    out += String.fromCharCode(c); // 1 byte(ASCII) character                  
                    j++;
                }
                return out;
        }
    };
    Encoding.prototype.getBytesOfAnsiEncoding = function (byteCount, s, charIndex, charCount) {
        var bytes = new ArrayBuffer(byteCount);
        var bufview = new Uint8Array(bytes);
        var k = 0;
        for (var i = 0; i < charCount; i++) {
            var charcode = s.charCodeAt(charIndex++);
            if (charcode < 0x800) {
                bufview[k] = charcode;
            }
            else {
                bufview[k] = 63; //replacement character '?'
            }
            k++;
        }
        return bytes;
    };
    Encoding.prototype.getBytesOfUtf8Encoding = function (byteCount, s, charIndex, charCount) {
        var bytes = new ArrayBuffer(byteCount);
        var uint = new Uint8Array(bytes);
        var index = charIndex;
        var j = 0;
        for (var i = 0; i < charCount; i++) {
            var charcode = s.charCodeAt(index);
            if (charcode <= 0x7F) { // 1 byte character 2^7
                uint[j] = charcode;
            }
            else if (charcode < 0x800) { // 2 byte character 2^11
                uint[j] = 0xc0 | (charcode >> 6);
                uint[++j] = 0x80 | (charcode & 0x3f);
            }
            else if ((charcode < 0xd800 || charcode >= 0xe000)) { // 3 byte character 2^16        
                uint[j] = 0xe0 | (charcode >> 12);
                uint[++j] = 0x80 | ((charcode >> 6) & 0x3f);
                uint[++j] = 0x80 | (charcode & 0x3f);
            }
            else {
                uint[j] = 0xef;
                uint[++j] = 0xbf;
                uint[++j] = 0xbd; // U+FFFE "replacement character"
            }
            ++j;
            ++index;
        }
        return bytes;
    };
    Encoding.prototype.getBytesOfUnicodeEncoding = function (byteCount, s, charIndex, charCount) {
        var bytes = new ArrayBuffer(byteCount);
        var uint16 = new Uint16Array(bytes);
        for (var i = 0; i < charCount; i++) {
            var charcode = s.charCodeAt(i);
            uint16[i] = charcode;
        }
        return bytes;
    };
    Encoding.prototype.getStringOfUtf8Encoding = function (byteCal, index, count) {
        var j = 0;
        var i = index;
        var s = '';
        for (j; j < count; j++) {
            var c = byteCal[i++];
            while (i > byteCal.length) {
                return s;
            }
            if (c > 127) {
                if (c > 191 && c < 224 && i < count) {
                    c = (c & 31) << 6 | byteCal[i] & 63;
                }
                else if (c > 223 && c < 240 && i < byteCal.byteLength) {
                    c = (c & 15) << 12 | (byteCal[i] & 63) << 6 | byteCal[++i] & 63;
                }
                else if (c > 239 && c < 248 && i < byteCal.byteLength) {
                    c = (c & 7) << 18 | (byteCal[i] & 63) << 12 | (byteCal[++i] & 63) << 6 | byteCal[++i] & 63;
                }
                ++i;
            }
            s += String.fromCharCode(c); // 1 byte(ASCII) character                          
        }
        return s;
    };
    Encoding.prototype.getStringofUnicodeEncoding = function (byteUni, index, count) {
        if (count > byteUni.length) {
            throw new RangeError('ArgumentOutOfRange_Count');
        }
        var byte16 = new Uint16Array(count);
        var out = '';
        for (var i = 0; i < count && i < byteUni.length; i++) {
            byte16[i] = byteUni[index++];
        }
        out = String.fromCharCode.apply(null, byte16);
        return out;
    };
    /**
     * To clear the encoding instance
     * @return {void}
     */
    Encoding.prototype.destroy = function () {
        this.emitBOM = undefined;
        this.encodingType = undefined;
    };
    return Encoding;
}());

/**
 * To check the object is null or undefined and throw error if it is null or undefined
 * @param {Object} value - object to check is null or undefined
 * @return {boolean}
 * @throws {ArgumentException} - if the value is null or undefined
 * @private
 */
function validateNullOrUndefined(value, message) {
    if (value === null || value === undefined) {
        throw new Error('ArgumentException: ' + message + ' cannot be null or undefined');
    }
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-file-utils/src/index.js":
/*!**************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-file-utils/src/index.js ***!
  \**************************************************************/
/*! exports provided: XmlWriter, Namespace, XmlElement, XmlAttribute, StreamWriter, Encoding, validateNullOrUndefined, Save */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _xml_writer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./xml-writer */ "./node_modules/@syncfusion/ej2-file-utils/src/xml-writer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlWriter", function() { return _xml_writer__WEBPACK_IMPORTED_MODULE_0__["XmlWriter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Namespace", function() { return _xml_writer__WEBPACK_IMPORTED_MODULE_0__["Namespace"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlElement", function() { return _xml_writer__WEBPACK_IMPORTED_MODULE_0__["XmlElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "XmlAttribute", function() { return _xml_writer__WEBPACK_IMPORTED_MODULE_0__["XmlAttribute"]; });

/* harmony import */ var _stream_writer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stream-writer */ "./node_modules/@syncfusion/ej2-file-utils/src/stream-writer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StreamWriter", function() { return _stream_writer__WEBPACK_IMPORTED_MODULE_1__["StreamWriter"]; });

/* harmony import */ var _encoding__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./encoding */ "./node_modules/@syncfusion/ej2-file-utils/src/encoding.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Encoding", function() { return _encoding__WEBPACK_IMPORTED_MODULE_2__["Encoding"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "validateNullOrUndefined", function() { return _encoding__WEBPACK_IMPORTED_MODULE_2__["validateNullOrUndefined"]; });

/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./node_modules/@syncfusion/ej2-file-utils/src/save.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Save", function() { return _save__WEBPACK_IMPORTED_MODULE_3__["Save"]; });

// export all modules from current location
// example: export * from './module'
/**
 * file utils modules
 */






/***/ }),

/***/ "./node_modules/@syncfusion/ej2-file-utils/src/save.js":
/*!*************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-file-utils/src/save.js ***!
  \*************************************************************/
/*! exports provided: Save */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Save", function() { return Save; });
/**
 * Save class provide method to save file
 * ```typescript
 * let blob : Blob = new Blob([''], { type: 'text/plain' });
 * Save.save('fileName.txt',blob);
 */
var Save = /** @class */ (function () {
    /**
     * Initialize new instance of {save}
     */
    function Save() {
        // tslint:disable
    }
    /**
     * Saves the file with specified name and sends the file to client browser
     * @param  {string} fileName- file name to save.
     * @param  {Blob} buffer- the content to write in file
     * @param  {boolean} isMicrosoftBrowser- specify whether microsoft browser or not
     * @returns {void}
     */
    Save.save = function (fileName, buffer) {
        if (fileName === null || fileName === undefined || fileName === '') {
            throw new Error('ArgumentException: fileName cannot be undefined, null or empty');
        }
        var extension = fileName.substring(fileName.lastIndexOf('.') + 1, fileName.length);
        var mimeType = this.getMimeType(extension);
        if (mimeType !== '') {
            buffer = new Blob([buffer], { type: mimeType });
        }
        if (this.isMicrosoftBrowser) {
            navigator.msSaveBlob(buffer, fileName);
        }
        else {
            var downloadLink = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
            this.saveInternal(fileName, extension, buffer, downloadLink, 'download' in downloadLink);
        }
    };
    Save.saveInternal = function (fileName, extension, buffer, downloadLink, hasDownloadAttribute) {
        if (hasDownloadAttribute) {
            downloadLink.download = fileName;
            var dataUrl_1 = window.URL.createObjectURL(buffer);
            downloadLink.href = dataUrl_1;
            var event_1 = document.createEvent('MouseEvent');
            event_1.initEvent('click', true, true);
            downloadLink.dispatchEvent(event_1);
            setTimeout(function () {
                window.URL.revokeObjectURL(dataUrl_1);
                dataUrl_1 = undefined;
            });
        }
        else {
            if (extension !== 'docx' && extension !== 'xlsx') {
                var url = window.URL.createObjectURL(buffer);
                var isPopupBlocked = window.open(url, '_blank');
                if (!isPopupBlocked) {
                    window.location.href = url;
                }
            }
            else {
                var reader_1 = new FileReader();
                reader_1.onloadend = function () {
                    var isPopupBlocked = window.open(reader_1.result, '_blank');
                    if (!isPopupBlocked) {
                        window.location.href = reader_1.result;
                    }
                };
                reader_1.readAsDataURL(buffer);
            }
        }
    };
    /**
     *
     * @param {string} extension - get mime type of the specified extension
     * @private
     */
    Save.getMimeType = function (extension) {
        var mimeType = '';
        switch (extension) {
            case 'html':
                mimeType = 'text/html';
                break;
            case 'pdf':
                mimeType = 'application/pdf';
                break;
            case 'docx':
                mimeType = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
                break;
            case 'xlsx':
                mimeType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
                break;
            case 'txt':
                mimeType = 'text/plain';
                break;
        }
        return mimeType;
    };
    return Save;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-file-utils/src/stream-writer.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-file-utils/src/stream-writer.js ***!
  \**********************************************************************/
/*! exports provided: StreamWriter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StreamWriter", function() { return StreamWriter; });
/* harmony import */ var _encoding__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./encoding */ "./node_modules/@syncfusion/ej2-file-utils/src/encoding.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./save */ "./node_modules/@syncfusion/ej2-file-utils/src/save.js");


/**
 * StreamWriter class contains the implementation for writing characters to a file in a particular encoding
 * ```typescript
 * let writer = new StreamWriter();
 * writer.write('Hello World');
 * writer.save('Sample.txt');
 * writer.dispose();
 * ```
 */
var StreamWriter = /** @class */ (function () {
    /**
     * Initializes a new instance of the StreamWriter class by using the specified encoding.
     * @param  {Encoding} encoding?- The character encoding to use.
     */
    function StreamWriter(encoding) {
        this.bufferBlob = new Blob(['']);
        this.bufferText = '';
        this.init(encoding);
        _save__WEBPACK_IMPORTED_MODULE_1__["Save"].isMicrosoftBrowser = !(!navigator.msSaveBlob);
    }
    Object.defineProperty(StreamWriter.prototype, "buffer", {
        /**
         * Gets the content written to the StreamWriter as Blob.
         * @returns Blob
         */
        get: function () {
            this.flush();
            return this.bufferBlob;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StreamWriter.prototype, "encoding", {
        /**
         * Gets the encoding.
         * @returns Encoding
         */
        get: function () {
            return this.enc;
        },
        enumerable: true,
        configurable: true
    });
    StreamWriter.prototype.init = function (encoding) {
        if (encoding === null || encoding === undefined) {
            this.enc = new _encoding__WEBPACK_IMPORTED_MODULE_0__["Encoding"](false);
            this.enc.type = 'Utf8';
        }
        else {
            this.enc = encoding;
            this.setBomByte();
        }
    };
    /**
     * Private method to set Byte Order Mark(BOM) value based on EncodingType
     */
    StreamWriter.prototype.setBomByte = function () {
        if (this.encoding.includeBom) {
            switch (this.encoding.type) {
                case 'Unicode':
                    var arrayUnicode = new ArrayBuffer(2);
                    var uint8 = new Uint8Array(arrayUnicode);
                    uint8[0] = 255;
                    uint8[1] = 254;
                    this.bufferBlob = new Blob([arrayUnicode]);
                    break;
                case 'Utf8':
                    var arrayUtf8 = new ArrayBuffer(3);
                    var utf8 = new Uint8Array(arrayUtf8);
                    utf8[0] = 239;
                    utf8[1] = 187;
                    utf8[2] = 191;
                    this.bufferBlob = new Blob([arrayUtf8]);
                    break;
                default:
                    this.bufferBlob = new Blob(['']);
                    break;
            }
        }
    };
    /**
     * Saves the file with specified name and sends the file to client browser
     * @param  {string} fileName - The file name to save
     * @returns {void}
     */
    StreamWriter.prototype.save = function (fileName) {
        if (this.bufferText !== '') {
            this.flush();
        }
        _save__WEBPACK_IMPORTED_MODULE_1__["Save"].save(fileName, this.buffer);
    };
    /**
     * Writes the specified string.
     * @param  {string} value - The string to write. If value is null or undefined, nothing is written.
     * @returns {void}
     */
    StreamWriter.prototype.write = function (value) {
        if (this.encoding === undefined) {
            throw new Error('Object Disposed Exception: current writer is disposed');
        }
        Object(_encoding__WEBPACK_IMPORTED_MODULE_0__["validateNullOrUndefined"])(value, 'string');
        this.bufferText += value;
        if (this.bufferText.length >= 10240) {
            this.flush();
        }
    };
    StreamWriter.prototype.flush = function () {
        if (this.bufferText === undefined || this.bufferText === null || this.bufferText.length === 0) {
            return;
        }
        var bufferArray = this.encoding.getBytes(this.bufferText, 0, this.bufferText.length);
        this.bufferText = '';
        this.bufferBlob = new Blob([this.bufferBlob, bufferArray]);
    };
    /**
     * Writes the specified string followed by a line terminator
     * @param  {string} value - The string to write. If value is null or undefined, nothing is written
     * @returns {void}
     */
    StreamWriter.prototype.writeLine = function (value) {
        if (this.encoding === undefined) {
            throw new Error('Object Disposed Exception: current writer is disposed');
        }
        Object(_encoding__WEBPACK_IMPORTED_MODULE_0__["validateNullOrUndefined"])(value, 'string');
        this.bufferText = this.bufferText + value + '\r\n';
        if (this.bufferText.length >= 10240) {
            this.flush();
        }
    };
    /**
     * Releases the resources used by the StreamWriter
     * @returns {void}
     */
    StreamWriter.prototype.destroy = function () {
        this.bufferBlob = undefined;
        this.bufferText = undefined;
        if (this.enc instanceof _encoding__WEBPACK_IMPORTED_MODULE_0__["Encoding"]) {
            this.enc.destroy();
        }
        this.enc = undefined;
    };
    return StreamWriter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-file-utils/src/xml-writer.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-file-utils/src/xml-writer.js ***!
  \*******************************************************************/
/*! exports provided: XmlWriter, Namespace, XmlElement, XmlAttribute */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "XmlWriter", function() { return XmlWriter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Namespace", function() { return Namespace; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "XmlElement", function() { return XmlElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "XmlAttribute", function() { return XmlAttribute; });
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./save */ "./node_modules/@syncfusion/ej2-file-utils/src/save.js");

/**
 * XmlWriter class provide method to create XML data
 */
var XmlWriter = /** @class */ (function () {
    /**
     * Initialize new instance of {XmlWriter}
     */
    function XmlWriter() {
        this.contentPos = 0;
        this.bufferText = '';
        this.bufferBlob = new Blob([''], { type: 'text/plain' });
        this.currentState = 'Initial';
        this.namespaceStack = [];
        this.namespaceStack.push(new Namespace());
        this.namespaceStack[0].set('xmlns', 'http://www.w3.org/2000/xmlns/', 'Special');
        this.namespaceStack.push(new Namespace());
        this.namespaceStack[1].set('xml', 'http://www.w3.org/XML/1998/namespace', 'Special');
        this.namespaceStack.push(new Namespace());
        this.namespaceStack[2].set('', '', 'Implied');
        this.elementStack = [];
        this.elementStack.push(new XmlElement());
        this.elementStack[0].set('', '', '', this.namespaceStack.length - 1);
        this.attributeStack = [];
        _save__WEBPACK_IMPORTED_MODULE_0__["Save"].isMicrosoftBrowser = !(!navigator.msSaveBlob);
    }
    Object.defineProperty(XmlWriter.prototype, "buffer", {
        /**
         * Gets the content written to the {XmlWriter} as Blob.
         * @returns {Blob}
         */
        get: function () {
            this.flush();
            return this.bufferBlob;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Writes processing instruction with a space between the name and text
     * @param {string} name - name of the processing instruction
     * @param {string} text - text to write in the processing instruction
     * @throws ArgumentException
     * @throws InvalidArgumentException
     * @throws InvalidOperationException
     */
    XmlWriter.prototype.writeProcessingInstruction = function (name, text) {
        if (name === undefined || name === null || name.length === 0) {
            throw new Error('ArgumentException: name should not be undefined, null or empty');
        }
        this.checkName(name);
        if (text === undefined || text === null) {
            text = '';
        }
        if (name.length === 3 && name === 'xml') {
            if (this.currentState !== 'Initial') {
                // tslint:disable-next-line:max-line-length
                throw new Error('InvalidArgumentException: Cannot write XML declaration.WriteStartDocument method has already written it');
            }
        }
        if (this.currentState !== 'Initial' || this.bufferBlob === undefined) {
            throw new Error('InvalidOperationException: Wrong Token');
        }
        else {
            this.writeStartDocument();
            this.writeProcessingInstructionInternal(name, text);
        }
    };
    /**
     * Writes Xml declaration with version and standalone attribute
     * @param {boolean} standalone - if true it write standalone=yes else standalone=no
     * @throws InvalidOperation
     */
    XmlWriter.prototype.writeStartDocument = function (standalone) {
        if (this.currentState !== 'Initial' || this.bufferBlob === undefined) {
            throw new Error('InvalidOperationException: Wrong Token');
        }
        this.currentState = 'StartDocument';
        this.rawText('<?xml version="1.0" encoding="utf-8');
        if (standalone !== null && standalone !== undefined) {
            this.rawText('" standalone="');
            this.rawText(standalone ? 'yes' : 'no');
        }
        this.rawText('"?>');
    };
    /**
     * Closes any open tag or attribute and write the state back to start
     */
    XmlWriter.prototype.writeEndDocument = function () {
        while (this.elementStack.length - 1 > 0) {
            this.writeEndElement();
        }
        this.currentState = 'EndDocument';
        this.flush();
    };
    /**
     * Writes the specified start tag and associates it with the given namespace and prefix.
     * @param {string} prefix - namespace prefix of element
     * @param {string} localName -localName of element
     * @param {string} namespace - namespace URI associate with element
     * @throws ArgumentException
     * @throws InvalidOperationException
     */
    XmlWriter.prototype.writeStartElement = function (prefix, localName, namespace) {
        if (this.bufferBlob === undefined) {
            throw new Error('InvalidOperationException: Wrong Token');
        }
        if (localName === undefined || localName === null || localName.length === 0) {
            throw new Error('ArgumentException: localName cannot be undefined, null or empty');
        }
        this.checkName(localName);
        if (this.currentState === 'Initial') {
            this.writeStartDocument();
        }
        if (this.currentState === 'StartElement') {
            this.startElementContent();
        }
        this.currentState = 'StartElement';
        if (prefix === undefined || prefix === null) {
            if (namespace !== undefined && namespace !== null) {
                prefix = this.lookupPrefix(namespace);
            }
            if (prefix === undefined || prefix === null) {
                prefix = '';
            }
        }
        else if (prefix.length > 0) {
            if (namespace === undefined || namespace === null) {
                namespace = this.lookupNamespace(prefix);
            }
            if (namespace === undefined || namespace === null || (namespace !== undefined && namespace.length === 0)) {
                throw new Error('ArgumentException: Cannot use a prefix with an empty namespace');
            }
        }
        if (namespace === undefined || namespace === null) {
            namespace = this.lookupNamespace(prefix);
        }
        this.writeStartElementInternal(prefix, localName, namespace);
    };
    /**
     * Closes one element and pop corresponding namespace scope
     */
    XmlWriter.prototype.writeEndElement = function () {
        if (this.currentState === 'StartElement') {
            this.startElementContent();
            this.currentState = 'ElementContent';
        }
        else if (this.currentState === 'ElementContent') {
            this.currentState = 'ElementContent';
        }
        this.currentState = 'EndElement';
        var top = this.elementStack.length - 1;
        this.writeEndElementInternal(this.elementStack[top].prefix, this.elementStack[top].localName);
        this.namespaceStack.splice(this.elementStack[top].previousTop + 1);
        this.elementStack.splice(top);
        if (this.bufferText.length > 10240) {
            this.flush();
        }
    };
    /**
     * Writes an element with the specified prefix, local name, namespace URI, and value.
     * @param {string} prefix - namespace prefix of element
     * @param {string} localName - localName of element
     * @param {string} namespace - namespace URI associate with element
     * @param {string} value - value of element
     */
    XmlWriter.prototype.writeElementString = function (prefix, localName, namespace, value) {
        this.writeStartElement(prefix, localName, namespace);
        if (value !== undefined && value !== null && value.length !== 0) {
            this.writeString(value);
        }
        this.writeEndElement();
    };
    /**
     * Writes out the attribute with the specified prefix, local name, namespace URI, and value
     * @param {string} prefix - namespace prefix of element
     * @param {string} localName - localName of element
     * @param {string} namespace - namespace URI associate with element
     * @param {string} value - value of element
     */
    XmlWriter.prototype.writeAttributeString = function (prefix, localName, namespace, value) {
        this.writeStartAttribute(prefix, localName, namespace, value);
        this.writeStringInternal(value, true);
        this.writeEndAttribute();
    };
    /**
     * Writes the given text content
     * @param {string} text - text to write
     * @throws InvalidOperationException
     */
    XmlWriter.prototype.writeString = function (text) {
        this.writeInternal(text, false);
    };
    /**
     * Write given text as raw data
     * @param {string} text - text to write
     * @throws InvalidOperationException
     */
    XmlWriter.prototype.writeRaw = function (text) {
        this.writeInternal(text, true);
    };
    XmlWriter.prototype.writeInternal = function (text, isRawString) {
        if (text === undefined || text === null) {
            return;
        }
        else {
            if (this.currentState !== 'StartElement' && this.currentState !== 'ElementContent') {
                throw new Error('InvalidOperationException: Wrong Token');
            }
            if (this.currentState === 'StartElement') {
                this.startElementContent();
            }
            this.currentState = 'ElementContent';
            if (isRawString) {
                this.rawText(text);
            }
            else {
                this.writeStringInternal(text, false);
            }
        }
    };
    /**
     * Saves the file with specified name and sends the file to client browser
     * @param {string} fileName - file name
     */
    XmlWriter.prototype.save = function (fileName) {
        while (this.elementStack.length - 1 > 0) {
            this.writeEndElement();
        }
        if (this.bufferText !== '') {
            this.flush();
        }
        _save__WEBPACK_IMPORTED_MODULE_0__["Save"].save(fileName, this.buffer);
    };
    /**
     * Releases the resources used by XmlWriter.
     */
    XmlWriter.prototype.destroy = function () {
        this.bufferBlob = undefined;
        for (var i = 0; i < this.namespaceStack.length; i++) {
            this.namespaceStack[i].destroy();
        }
        this.namespaceStack = [];
        for (var i = 0; i < this.elementStack.length; i++) {
            this.elementStack[i].destroy();
        }
        this.elementStack = [];
        this.bufferText = '';
        this.contentPos = 0;
    };
    XmlWriter.prototype.flush = function () {
        if (this.bufferBlob === undefined) {
            return;
        }
        this.bufferBlob = new Blob([this.bufferBlob, this.bufferText], { type: 'text/plain' });
        this.bufferText = '';
    };
    XmlWriter.prototype.writeProcessingInstructionInternal = function (name, text) {
        this.bufferText += '<?';
        this.rawText(name);
        if (text.length > 0) {
            this.bufferText += ' ';
            text = text.replace(/\?\>/g, '? >');
            this.bufferText += text;
        }
        this.bufferText += '?';
        this.bufferText += '>';
    };
    XmlWriter.prototype.writeStartAttribute = function (prefix, localName, namespace, value) {
        if (localName === undefined || localName === null || localName.length === 0) {
            if (prefix === 'xmlns') {
                localName = 'xmlns';
                prefix = '';
            }
            else {
                throw new Error('ArgumentException: localName cannot be undefined, null or empty');
            }
        }
        if (this.currentState !== 'StartElement') {
            throw new Error('InvalidOperationException: Wrong Token');
        }
        this.checkName(localName);
        this.writeStartAttributePrefixAndNameSpace(prefix, localName, namespace, value);
    };
    XmlWriter.prototype.writeStartAttributePrefixAndNameSpace = function (prefix, localName, namespace, value) {
        if (prefix === undefined || prefix === null) {
            if (namespace !== undefined && namespace !== null) {
                if (!(localName === 'xmlns' && namespace === 'http://www.w3.org/2000/xmlns/')) {
                    prefix = this.lookupPrefix(namespace);
                }
            }
            if (prefix === undefined || prefix === null) {
                prefix = '';
            }
        }
        if (namespace === undefined || namespace === null) {
            if (prefix !== undefined && prefix !== null && prefix.length > 0) {
                namespace = this.lookupNamespace(prefix);
            }
            if (namespace === undefined || namespace === null) {
                namespace = '';
            }
        }
        this.writeStartAttributeSpecialAttribute(prefix, localName, namespace, value);
    };
    XmlWriter.prototype.writeStartAttributeSpecialAttribute = function (prefix, localName, namespace, value) {
        if (prefix.length === 0) {
            if (localName[0] === 'x' && localName === 'xmlns') {
                this.skipPushAndWrite(prefix, localName, namespace);
                this.pushNamespaceExplicit('', value);
                return;
            }
            else if (namespace.length > 0) {
                prefix = this.lookupPrefix(namespace);
            }
        }
        else {
            if (prefix[0] === 'x') {
                if (prefix === 'xmlns') {
                    this.skipPushAndWrite(prefix, localName, namespace);
                    this.pushNamespaceExplicit(localName, value);
                    return;
                }
                else if (prefix === 'xml') {
                    if (localName === 'space' || localName === 'lang') {
                        this.skipPushAndWrite(prefix, localName, namespace);
                        return;
                    }
                }
            }
            if (namespace.length === 0) {
                prefix = '';
            }
        }
        if (prefix !== undefined && prefix !== null && prefix.length !== 0) {
            this.pushNamespaceImplicit(prefix, namespace);
        }
        this.skipPushAndWrite(prefix, localName, namespace);
    };
    XmlWriter.prototype.writeEndAttribute = function () {
        this.currentState = 'StartElement';
        this.bufferText += '"';
    };
    XmlWriter.prototype.writeStartElementInternal = function (prefix, localName, namespace) {
        this.bufferText += '<';
        if (prefix.length > 0) {
            this.rawText(prefix);
            this.bufferText += ':';
        }
        this.rawText(localName);
        var top = this.elementStack.length;
        this.elementStack.push(new XmlElement());
        this.elementStack[top].set(prefix, localName, namespace, this.namespaceStack.length - 1);
        this.pushNamespaceImplicit(prefix, namespace);
        for (var i = 0; i < this.attributeStack.length; i++) {
            this.attributeStack[i].destroy();
        }
        this.attributeStack = [];
    };
    XmlWriter.prototype.writeEndElementInternal = function (prefix, localName) {
        if (this.contentPos !== this.bufferText.length + 1) {
            this.bufferText += '</';
            if (prefix !== undefined && prefix !== null && prefix.length !== 0) {
                this.rawText(prefix);
                this.bufferText += ':';
            }
            this.rawText(localName);
            this.bufferText += '>';
        }
        else {
            this.bufferText = this.bufferText.substring(0, this.bufferText.length - 1);
            this.bufferText += ' />';
        }
    };
    XmlWriter.prototype.writeStartAttributeInternal = function (prefix, localName, namespaceName) {
        this.bufferText += ' ';
        if (prefix !== undefined && prefix !== null && prefix.length > 0) {
            this.rawText(prefix);
            this.bufferText += ':';
        }
        this.rawText(localName);
        this.bufferText += '=';
        this.bufferText += '"';
    };
    XmlWriter.prototype.writeNamespaceDeclaration = function (prefix, namespaceUri) {
        this.writeStartNamespaceDeclaration(prefix);
        this.writeStringInternal(namespaceUri, true);
        this.bufferText += '"';
    };
    XmlWriter.prototype.writeStartNamespaceDeclaration = function (prefix) {
        if (prefix === undefined || prefix === null || prefix.length === 0) {
            this.rawText(' xmlns=\"');
        }
        else {
            this.rawText(' xmlns:');
            this.rawText(prefix);
            this.bufferText += '=';
            this.bufferText += '"';
        }
    };
    XmlWriter.prototype.writeStringInternal = function (text, inAttributeValue) {
        if (text === null || text === undefined) {
            text = '';
        }
        var tempText = '';
        text = text.replace(/\&/g, '&amp;');
        text = text.replace(/\</g, '&lt;');
        text = text.replace(/\>/g, '&gt;');
        if (inAttributeValue) {
            text = text.replace(/\"/g, '&quot;');
        }
        this.bufferText += text;
        if (!inAttributeValue) {
            this.contentPos = 0;
        }
    };
    XmlWriter.prototype.startElementContent = function () {
        var start = this.elementStack[this.elementStack.length - 1].previousTop;
        for (var i = this.namespaceStack.length - 1; i > start; i--) {
            if (this.namespaceStack[i].kind === 'NeedToWrite') {
                this.writeNamespaceDeclaration(this.namespaceStack[i].prefix, this.namespaceStack[i].namespaceUri);
            }
        }
        this.bufferText += '>';
        this.contentPos = this.bufferText.length + 1;
    };
    XmlWriter.prototype.rawText = function (text) {
        this.bufferText += text;
    };
    XmlWriter.prototype.addNamespace = function (prefix, ns, kind) {
        var top = this.namespaceStack.length;
        this.namespaceStack.push(new Namespace());
        this.namespaceStack[top].set(prefix, ns, kind);
    };
    XmlWriter.prototype.lookupPrefix = function (namespace) {
        for (var i = this.namespaceStack.length - 1; i >= 0; i--) {
            if (this.namespaceStack[i].namespaceUri === namespace) {
                return this.namespaceStack[i].prefix;
            }
        }
        return undefined;
    };
    XmlWriter.prototype.lookupNamespace = function (prefix) {
        for (var i = this.namespaceStack.length - 1; i >= 0; i--) {
            if (this.namespaceStack[i].prefix === prefix) {
                return this.namespaceStack[i].namespaceUri;
            }
        }
        return undefined;
    };
    XmlWriter.prototype.lookupNamespaceIndex = function (prefix) {
        for (var i = this.namespaceStack.length - 1; i >= 0; i--) {
            if (this.namespaceStack[i].prefix === prefix) {
                return i;
            }
        }
        return -1;
    };
    XmlWriter.prototype.pushNamespaceImplicit = function (prefix, ns) {
        var kind;
        var existingNsIndex = this.lookupNamespaceIndex(prefix);
        if (existingNsIndex !== -1) {
            if (existingNsIndex > this.elementStack[this.elementStack.length - 1].previousTop) {
                if (this.namespaceStack[existingNsIndex].namespaceUri !== ns) {
                    throw new Error('XmlException namespace Uri needs to be the same as the one that is already declared');
                }
                return;
            }
            else {
                if (this.namespaceStack[existingNsIndex].kind === 'Special') {
                    if (prefix === 'xml') {
                        if (ns !== this.namespaceStack[existingNsIndex].namespaceUri) {
                            throw new Error('InvalidArgumentException: Xml String');
                        }
                        else {
                            kind = 'Implied';
                        }
                    }
                    else {
                        throw new Error('InvalidArgumentException: Prefix "xmlns" is reserved for use by XML.');
                    }
                }
                else {
                    kind = (this.namespaceStack[existingNsIndex].namespaceUri === ns) ? 'Implied' : 'NeedToWrite';
                }
            }
        }
        else {
            if ((ns === 'http://www.w3.org/XML/1998/namespace' && prefix !== 'xml') ||
                (ns === 'http://www.w3.org/2000/xmlns/' && prefix !== 'xmlns')) {
                throw new Error('InvalidArgumentException');
            }
            kind = 'NeedToWrite';
        }
        this.addNamespace(prefix, ns, kind);
    };
    XmlWriter.prototype.pushNamespaceExplicit = function (prefix, ns) {
        var existingNsIndex = this.lookupNamespaceIndex(prefix);
        if (existingNsIndex !== -1) {
            if (existingNsIndex > this.elementStack[this.elementStack.length - 1].previousTop) {
                this.namespaceStack[existingNsIndex].kind = 'Written';
                return;
            }
        }
        this.addNamespace(prefix, ns, 'Written');
        return;
    };
    XmlWriter.prototype.addAttribute = function (prefix, localName, namespaceName) {
        var top = this.attributeStack.length;
        this.attributeStack.push(new XmlAttribute());
        this.attributeStack[top].set(prefix, localName, namespaceName);
        for (var i = 0; i < top; i++) {
            if (this.attributeStack[i].isDuplicate(prefix, localName, namespaceName)) {
                throw new Error('XmlException: duplicate attribute name');
            }
        }
    };
    XmlWriter.prototype.skipPushAndWrite = function (prefix, localName, namespace) {
        this.addAttribute(prefix, localName, namespace);
        this.writeStartAttributeInternal(prefix, localName, namespace);
    };
    XmlWriter.prototype.checkName = function (text) {
        var format = /[ !@#$%^&*()+\=\[\]{};':"\\|,<>\/?]/;
        if (format.test(text)) {
            throw new Error('InvalidArgumentException: invalid name character');
        }
    };
    return XmlWriter;
}());

/**
 * class for managing namespace collection
 */
var Namespace = /** @class */ (function () {
    function Namespace() {
    }
    /**
     * set value for current namespace instance
     * @param {string} prefix namespace's prefix
     * @param {string} namespaceUri namespace URI
     * @param {string} kind namespace kind
     */
    Namespace.prototype.set = function (prefix, namespaceUri, kind) {
        this.prefix = prefix;
        this.namespaceUri = namespaceUri;
        this.kind = kind;
    };
    /**
     * Releases the resources used by Namespace
     */
    Namespace.prototype.destroy = function () {
        this.prefix = undefined;
        this.namespaceUri = undefined;
        this.kind = undefined;
    };
    return Namespace;
}());

/**
 * class for managing element collection
 */
var XmlElement = /** @class */ (function () {
    function XmlElement() {
    }
    /**
     * set value of current element
     * @param {string} prefix - element prefix
     * @param {string} localName - element local name
     * @param {string} namespaceUri -namespace URI
     * @param {string} previousTop - previous namespace top
     */
    XmlElement.prototype.set = function (prefix, localName, namespaceUri, previousTop) {
        this.previousTop = previousTop;
        this.prefix = prefix;
        this.namespaceUri = namespaceUri;
        this.localName = localName;
    };
    /**
     * Releases the resources used by XmlElement
     */
    XmlElement.prototype.destroy = function () {
        this.previousTop = undefined;
        this.prefix = undefined;
        this.localName = undefined;
        this.namespaceUri = undefined;
    };
    return XmlElement;
}());

/**
 * class for managing attribute collection
 */
var XmlAttribute = /** @class */ (function () {
    function XmlAttribute() {
    }
    /**
     * set value of current attribute
     * @param {string} prefix - namespace's prefix
     * @param {string} namespaceUri - namespace URI
     * @param {string} localName - attribute localName
     */
    XmlAttribute.prototype.set = function (prefix, localName, namespaceUri) {
        this.prefix = prefix;
        this.namespaceUri = namespaceUri;
        this.localName = localName;
    };
    /**
     * get whether the attribute is duplicate or not
     * @param {string} prefix - namespace's prefix
     * @param {string} namespaceUri - namespace URI
     * @param {string} localName - attribute localName
     */
    XmlAttribute.prototype.isDuplicate = function (prefix, localName, namespaceUri) {
        return ((this.localName === localName) && ((this.prefix === prefix) || (this.namespaceUri === namespaceUri)));
    };
    /**
     * Releases the resources used by XmlAttribute
     */
    XmlAttribute.prototype.destroy = function () {
        this.prefix = undefined;
        this.namespaceUri = undefined;
        this.localName = undefined;
    };
    return XmlAttribute;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/index.js ***!
  \*****************************************************/
/*! exports provided: Pager, ExternalMessage, NumericContainer, PagerMessage, PagerDropDown, SortDescriptor, SortSettings, Predicate, FilterSettings, SelectionSettings, SearchSettings, RowDropSettings, TextWrapSettings, GroupSettings, EditSettings, Grid, CellType, RenderType, ToolbarItem, doesImplementInterface, valueAccessor, getUpdateUsingRaf, updatecloneRow, getCollapsedRowsCount, recursive, iterateArrayOrObject, iterateExtend, templateCompiler, setStyleAndAttributes, extend, setColumnIndex, prepareColumns, setCssInGridPopUp, getActualProperties, parentsUntil, getElementIndex, inArray, getActualPropFromColl, removeElement, getPosition, getUid, appendChildren, parents, calculateAggregate, getScrollBarWidth, getRowHeight, isComplexField, getComplexFieldID, setComplexFieldID, isEditable, isActionPrevent, wrap, setFormatter, addRemoveActiveClasses, distinctStringValues, getFilterMenuPostion, getZIndexCalcualtion, toogleCheckbox, createCboxWithWrap, removeAddCboxClasses, refreshForeignData, getForeignData, getColumnByForeignKeyValue, getDatePredicate, renderMovable, isGroupAdaptive, getObject, getCustomDateFormat, getExpandedState, getPrintGridModel, extendObjWithFn, measureColumnDepth, checkDepth, created, destroyed, load, rowDataBound, queryCellInfo, headerCellInfo, actionBegin, actionComplete, actionFailure, dataBound, rowSelecting, rowSelected, rowDeselecting, rowDeselected, cellSelecting, cellSelected, cellDeselecting, cellDeselected, columnDragStart, columnDrag, columnDrop, rowDragStartHelper, rowDragStart, rowDrag, rowDrop, beforePrint, printComplete, detailDataBound, toolbarClick, batchAdd, batchCancel, batchDelete, beforeBatchAdd, beforeBatchDelete, beforeBatchSave, beginEdit, cellEdit, cellSave, cellSaved, endAdd, endDelete, endEdit, recordDoubleClick, recordClick, beforeDataBound, beforeOpenColumnChooser, resizeStart, onResize, resizeStop, checkBoxChange, beforeCopy, beforePaste, filterChoiceRequest, filterAfterOpen, filterBeforeOpen, filterSearchBegin, commandClick, initialLoad, initialEnd, dataReady, contentReady, uiUpdate, onEmpty, inBoundModelChanged, modelChanged, colGroupRefresh, headerRefreshed, pageBegin, pageComplete, sortBegin, sortComplete, filterBegin, filterComplete, searchBegin, searchComplete, reorderBegin, reorderComplete, rowDragAndDropBegin, rowDragAndDropComplete, groupBegin, groupComplete, ungroupBegin, ungroupComplete, groupAggregates, refreshFooterRenderer, refreshAggregateCell, refreshAggregates, rowSelectionBegin, rowSelectionComplete, columnSelectionBegin, columnSelectionComplete, cellSelectionBegin, cellSelectionComplete, beforeCellFocused, cellFocused, keyPressed, click, destroy, columnVisibilityChanged, scroll, columnWidthChanged, columnPositionChanged, rowDragAndDrop, rowsAdded, rowsRemoved, columnDragStop, headerDrop, dataSourceModified, refreshComplete, refreshVirtualBlock, dblclick, toolbarRefresh, bulkSave, autoCol, tooltipDestroy, updateData, editBegin, editComplete, addBegin, addComplete, saveComplete, deleteBegin, deleteComplete, preventBatch, dialogDestroy, crudAction, addDeleteAction, destroyForm, doubleTap, beforeExcelExport, excelExportComplete, excelQueryCellInfo, excelHeaderQueryCellInfo, exportDetailDataBound, beforePdfExport, pdfExportComplete, pdfQueryCellInfo, pdfHeaderQueryCellInfo, accessPredicate, contextMenuClick, freezeRender, freezeRefresh, contextMenuOpen, columnMenuClick, columnMenuOpen, filterOpen, filterDialogCreated, filterMenuClose, initForeignKeyColumn, getForeignKeyData, generateQuery, showEmptyGrid, foreignKeyData, dataStateChange, dataSourceChanged, rtlUpdated, beforeFragAppend, frozenHeight, textWrapRefresh, recordAdded, cancelBegin, editNextValCell, hierarchyPrint, expandChildGrid, printGridInit, exportRowDataBound, rowPositionChanged, batchForm, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, partialRefresh, Data, Sort, Page, Selection, Filter, Search, Scroll, resizeClassList, Resize, Reorder, RowDD, Group, getCloneProperties, Print, DetailRow, Toolbar, Aggregate, summaryIterator, VirtualScroll, Edit, Global, BatchEdit, InlineEdit, NormalEdit, DialogEdit, ColumnChooser, ExcelExport, PdfExport, ExportHelper, ExportValueFormatter, Clipboard, CommandColumn, CheckBoxFilter, menuClass, ContextMenu, Freeze, ColumnMenu, ExcelFilter, ForeignKey, Logger, detailLists, Column, Row, Cell, HeaderRender, ContentRender, RowRenderer, CellRenderer, HeaderCellRenderer, FilterCellRenderer, StackedHeaderCellRenderer, Render, IndentCellRenderer, GroupCaptionCellRenderer, GroupCaptionEmptyCellRenderer, BatchEditRender, DialogEditRender, InlineEditRender, EditRender, BooleanEditCell, DefaultEditCell, DropDownEditCell, NumericEditCell, DatePickerEditCell, CommandColumnRenderer, FreezeContentRender, FreezeRender, StringFilterUI, NumberFilterUI, DateFilterUI, BooleanFilterUI, FlMenuOptrUI, AutoCompleteEditCell, ComboboxEditCell, MultiSelectEditCell, TimePickerEditCell, ToggleEditCell, MaskedTextBoxCellEdit, VirtualContentRenderer, VirtualHeaderRenderer, VirtualElementHandler, CellRendererFactory, ServiceLocator, RowModelGenerator, GroupModelGenerator, FreezeRowModelGenerator, ValueFormatter, VirtualRowModelGenerator, InterSectionObserver */
/***/ (function(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-grids/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Pager", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Pager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExternalMessage", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ExternalMessage"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericContainer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["NumericContainer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PagerMessage", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PagerMessage"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PagerDropDown", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PagerDropDown"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortDescriptor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SortDescriptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SortSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Predicate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Predicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FilterSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SelectionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SearchSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SearchSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowDropSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RowDropSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextWrapSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TextWrapSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["GroupSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["EditSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Grid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CellType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenderType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RenderType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolbarItem", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ToolbarItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doesImplementInterface", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["doesImplementInterface"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valueAccessor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["valueAccessor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUpdateUsingRaf", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getUpdateUsingRaf"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updatecloneRow", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["updatecloneRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCollapsedRowsCount", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getCollapsedRowsCount"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recursive", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["recursive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iterateArrayOrObject", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["iterateArrayOrObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iterateExtend", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["iterateExtend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "templateCompiler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["templateCompiler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setStyleAndAttributes", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["setStyleAndAttributes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["extend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setColumnIndex", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["setColumnIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareColumns", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["prepareColumns"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setCssInGridPopUp", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["setCssInGridPopUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualProperties", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getActualProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parentsUntil", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["parentsUntil"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElementIndex", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getElementIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inArray", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["inArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualPropFromColl", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getActualPropFromColl"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["removeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPosition", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUid", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getUid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendChildren", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["appendChildren"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parents", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["parents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateAggregate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["calculateAggregate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollBarWidth", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getScrollBarWidth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRowHeight", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getRowHeight"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isComplexField", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["isComplexField"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getComplexFieldID", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getComplexFieldID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setComplexFieldID", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["setComplexFieldID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEditable", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["isEditable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isActionPrevent", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["isActionPrevent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["wrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setFormatter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["setFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addRemoveActiveClasses", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["addRemoveActiveClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctStringValues", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["distinctStringValues"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFilterMenuPostion", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getFilterMenuPostion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getZIndexCalcualtion", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getZIndexCalcualtion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toogleCheckbox", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["toogleCheckbox"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createCboxWithWrap", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["createCboxWithWrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeAddCboxClasses", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["removeAddCboxClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshForeignData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["refreshForeignData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getForeignData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getForeignData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColumnByForeignKeyValue", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getColumnByForeignKeyValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDatePredicate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getDatePredicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "renderMovable", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["renderMovable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isGroupAdaptive", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["isGroupAdaptive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getObject", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCustomDateFormat", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getCustomDateFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getExpandedState", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getExpandedState"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPrintGridModel", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getPrintGridModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extendObjWithFn", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["extendObjWithFn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "measureColumnDepth", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["measureColumnDepth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkDepth", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["checkDepth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "created", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["created"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroyed", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["destroyed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "load", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["load"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDataBound", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queryCellInfo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["queryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerCellInfo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["headerCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["actionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["actionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionFailure", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["actionFailure"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataBound", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelecting", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowSelecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelected", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowSelected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDeselecting", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDeselecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDeselected", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDeselected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelecting", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellSelecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelected", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellSelected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellDeselecting", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellDeselecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellDeselected", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellDeselected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDragStart", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnDragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDrag", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnDrag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDrop", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragStartHelper", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDragStartHelper"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragStart", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDrag", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDrag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDrop", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePrint", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforePrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "printComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["printComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detailDataBound", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["detailDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toolbarClick", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["toolbarClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchAdd", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["batchAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchCancel", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["batchCancel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchDelete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["batchDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchAdd", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeBatchAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchDelete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeBatchDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchSave", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeBatchSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beginEdit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beginEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellEdit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSave", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSaved", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellSaved"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endAdd", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["endAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endDelete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["endDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endEdit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["endEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordDoubleClick", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["recordDoubleClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordClick", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["recordClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeDataBound", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeOpenColumnChooser", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeOpenColumnChooser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeStart", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["resizeStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onResize", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["onResize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeStop", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["resizeStop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkBoxChange", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["checkBoxChange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeCopy", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeCopy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePaste", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforePaste"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterChoiceRequest", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["filterChoiceRequest"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterAfterOpen", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["filterAfterOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterBeforeOpen", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["filterBeforeOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterSearchBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["filterSearchBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "commandClick", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["commandClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initialLoad", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["initialLoad"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initialEnd", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["initialEnd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataReady", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dataReady"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contentReady", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["contentReady"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uiUpdate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["uiUpdate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEmpty", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["onEmpty"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inBoundModelChanged", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["inBoundModelChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modelChanged", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["modelChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colGroupRefresh", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["colGroupRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerRefreshed", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["headerRefreshed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["pageBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["pageComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["sortBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["sortComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["filterBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["filterComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "searchBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["searchBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "searchComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["searchComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reorderBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["reorderBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reorderComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["reorderComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDragAndDropBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDragAndDropComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["groupBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["groupComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ungroupBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ungroupBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ungroupComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ungroupComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupAggregates", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["groupAggregates"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshFooterRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["refreshFooterRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshAggregateCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["refreshAggregateCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshAggregates", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["refreshAggregates"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelectionBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelectionComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnSelectionBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnSelectionComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelectionBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelectionComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeCellFocused", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeCellFocused"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellFocused", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cellFocused"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keyPressed", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["keyPressed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "click", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["click"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["destroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnVisibilityChanged", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnVisibilityChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scroll", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["scroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnWidthChanged", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnWidthChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnPositionChanged", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnPositionChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDrop", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowDragAndDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowsAdded", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowsAdded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowsRemoved", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowsRemoved"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDragStop", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnDragStop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerDrop", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["headerDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataSourceModified", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dataSourceModified"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["refreshComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshVirtualBlock", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["refreshVirtualBlock"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dblclick", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dblclick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toolbarRefresh", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["toolbarRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bulkSave", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["bulkSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoCol", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["autoCol"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tooltipDestroy", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["tooltipDestroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updateData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["updateData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["editBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["editComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["addBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["addComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "saveComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["saveComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deleteBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["deleteBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deleteComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["deleteComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "preventBatch", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["preventBatch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dialogDestroy", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dialogDestroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "crudAction", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["crudAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addDeleteAction", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["addDeleteAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroyForm", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["destroyForm"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doubleTap", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["doubleTap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeExcelExport", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeExcelExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelExportComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["excelExportComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelQueryCellInfo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["excelQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelHeaderQueryCellInfo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["excelHeaderQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exportDetailDataBound", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["exportDetailDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePdfExport", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforePdfExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfExportComplete", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["pdfExportComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfQueryCellInfo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["pdfQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfHeaderQueryCellInfo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["pdfHeaderQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "accessPredicate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["accessPredicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contextMenuClick", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["contextMenuClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "freezeRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["freezeRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "freezeRefresh", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["freezeRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contextMenuOpen", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["contextMenuOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnMenuClick", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnMenuClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnMenuOpen", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["columnMenuOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterOpen", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["filterOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterDialogCreated", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["filterDialogCreated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterMenuClose", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["filterMenuClose"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initForeignKeyColumn", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["initForeignKeyColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getForeignKeyData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getForeignKeyData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generateQuery", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["generateQuery"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showEmptyGrid", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["showEmptyGrid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "foreignKeyData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["foreignKeyData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataStateChange", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dataStateChange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataSourceChanged", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["dataSourceChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rtlUpdated", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rtlUpdated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeFragAppend", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeFragAppend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "frozenHeight", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["frozenHeight"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textWrapRefresh", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["textWrapRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordAdded", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["recordAdded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cancelBegin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cancelBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editNextValCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["editNextValCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchyPrint", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["hierarchyPrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expandChildGrid", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["expandChildGrid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "printGridInit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["printGridInit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exportRowDataBound", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["exportRowDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowPositionChanged", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["rowPositionChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchForm", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["batchForm"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeStartEdit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeStartEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchCancel", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["beforeBatchCancel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchEditFormRendered", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["batchEditFormRendered"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partialRefresh", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["partialRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Data", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Data"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sort", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Sort"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Page", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Page"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Filter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Filter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Search", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Search"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scroll", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Scroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeClassList", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["resizeClassList"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Resize", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Resize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Reorder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Reorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowDD", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RowDD"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Group", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Group"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCloneProperties", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getCloneProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Print", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Print"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DetailRow", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DetailRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Toolbar", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Toolbar"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Aggregate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Aggregate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "summaryIterator", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["summaryIterator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualScroll", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["VirtualScroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Edit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Edit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Global", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Global"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BatchEdit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["BatchEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InlineEdit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["InlineEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalEdit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["NormalEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogEdit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DialogEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnChooser", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ColumnChooser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelExport", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ExcelExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfExport", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExportHelper", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ExportHelper"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExportValueFormatter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ExportValueFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Clipboard", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Clipboard"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CommandColumn", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CommandColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckBoxFilter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CheckBoxFilter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "menuClass", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["menuClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContextMenu", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ContextMenu"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Freeze", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Freeze"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnMenu", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ColumnMenu"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelFilter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ExcelFilter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ForeignKey", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ForeignKey"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Logger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detailLists", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["detailLists"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Column"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Row"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Cell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["HeaderRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContentRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ContentRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RowRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCellRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["HeaderCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterCellRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FilterCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedHeaderCellRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["StackedHeaderCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Render", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Render"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IndentCellRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["IndentCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionCellRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["GroupCaptionCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionEmptyCellRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["GroupCaptionEmptyCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BatchEditRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["BatchEditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogEditRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DialogEditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InlineEditRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["InlineEditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["EditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["BooleanEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DefaultEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DropDownEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["NumericEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DatePickerEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DatePickerEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CommandColumnRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CommandColumnRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeContentRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FreezeContentRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeRender", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FreezeRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringFilterUI", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["StringFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberFilterUI", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["NumberFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateFilterUI", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DateFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanFilterUI", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["BooleanFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FlMenuOptrUI", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FlMenuOptrUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoCompleteEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AutoCompleteEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComboboxEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ComboboxEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelectEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["MultiSelectEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimePickerEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TimePickerEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToggleEditCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ToggleEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBoxCellEdit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["MaskedTextBoxCellEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualContentRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["VirtualContentRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualHeaderRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["VirtualHeaderRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualElementHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["VirtualElementHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRendererFactory", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CellRendererFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServiceLocator", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ServiceLocator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowModelGenerator", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RowModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupModelGenerator", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["GroupModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeRowModelGenerator", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FreezeRowModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ValueFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualRowModelGenerator", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["VirtualRowModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InterSectionObserver", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["InterSectionObserver"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions.js ***!
  \****************************************************************/
/*! exports provided: Data, Sort, Page, Selection, Filter, Search, Scroll, resizeClassList, Resize, Reorder, RowDD, Group, getCloneProperties, Print, DetailRow, Toolbar, Aggregate, summaryIterator, VirtualScroll, Edit, Global, BatchEdit, InlineEdit, NormalEdit, DialogEdit, ColumnChooser, ExcelExport, PdfExport, ExportHelper, ExportValueFormatter, Clipboard, CommandColumn, CheckBoxFilter, menuClass, ContextMenu, Freeze, ColumnMenu, ExcelFilter, ForeignKey, Logger, detailLists */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _actions_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actions/data */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/data.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Data", function() { return _actions_data__WEBPACK_IMPORTED_MODULE_0__["Data"]; });

/* harmony import */ var _actions_sort__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./actions/sort */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/sort.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sort", function() { return _actions_sort__WEBPACK_IMPORTED_MODULE_1__["Sort"]; });

/* harmony import */ var _actions_page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions/page */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/page.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Page", function() { return _actions_page__WEBPACK_IMPORTED_MODULE_2__["Page"]; });

/* harmony import */ var _actions_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions/selection */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/selection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return _actions_selection__WEBPACK_IMPORTED_MODULE_3__["Selection"]; });

/* harmony import */ var _actions_filter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./actions/filter */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/filter.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Filter", function() { return _actions_filter__WEBPACK_IMPORTED_MODULE_4__["Filter"]; });

/* harmony import */ var _actions_search__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./actions/search */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/search.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Search", function() { return _actions_search__WEBPACK_IMPORTED_MODULE_5__["Search"]; });

/* harmony import */ var _actions_scroll__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./actions/scroll */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/scroll.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scroll", function() { return _actions_scroll__WEBPACK_IMPORTED_MODULE_6__["Scroll"]; });

/* harmony import */ var _actions_resize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./actions/resize */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/resize.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeClassList", function() { return _actions_resize__WEBPACK_IMPORTED_MODULE_7__["resizeClassList"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Resize", function() { return _actions_resize__WEBPACK_IMPORTED_MODULE_7__["Resize"]; });

/* harmony import */ var _actions_reorder__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./actions/reorder */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/reorder.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Reorder", function() { return _actions_reorder__WEBPACK_IMPORTED_MODULE_8__["Reorder"]; });

/* harmony import */ var _actions_row_reorder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./actions/row-reorder */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/row-reorder.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowDD", function() { return _actions_row_reorder__WEBPACK_IMPORTED_MODULE_9__["RowDD"]; });

/* harmony import */ var _actions_group__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./actions/group */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/group.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Group", function() { return _actions_group__WEBPACK_IMPORTED_MODULE_10__["Group"]; });

/* harmony import */ var _actions_print__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./actions/print */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/print.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCloneProperties", function() { return _actions_print__WEBPACK_IMPORTED_MODULE_11__["getCloneProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Print", function() { return _actions_print__WEBPACK_IMPORTED_MODULE_11__["Print"]; });

/* harmony import */ var _actions_detail_row__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./actions/detail-row */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/detail-row.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DetailRow", function() { return _actions_detail_row__WEBPACK_IMPORTED_MODULE_12__["DetailRow"]; });

/* harmony import */ var _actions_toolbar__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./actions/toolbar */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/toolbar.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Toolbar", function() { return _actions_toolbar__WEBPACK_IMPORTED_MODULE_13__["Toolbar"]; });

/* harmony import */ var _actions_aggregate__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./actions/aggregate */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/aggregate.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Aggregate", function() { return _actions_aggregate__WEBPACK_IMPORTED_MODULE_14__["Aggregate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "summaryIterator", function() { return _actions_aggregate__WEBPACK_IMPORTED_MODULE_14__["summaryIterator"]; });

/* harmony import */ var _actions_virtual_scroll__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./actions/virtual-scroll */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/virtual-scroll.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualScroll", function() { return _actions_virtual_scroll__WEBPACK_IMPORTED_MODULE_15__["VirtualScroll"]; });

/* harmony import */ var _actions_edit__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./actions/edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/edit.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Edit", function() { return _actions_edit__WEBPACK_IMPORTED_MODULE_16__["Edit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Global", function() { return _actions_edit__WEBPACK_IMPORTED_MODULE_16__["Global"]; });

/* harmony import */ var _actions_batch_edit__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./actions/batch-edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/batch-edit.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BatchEdit", function() { return _actions_batch_edit__WEBPACK_IMPORTED_MODULE_17__["BatchEdit"]; });

/* harmony import */ var _actions_inline_edit__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./actions/inline-edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/inline-edit.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InlineEdit", function() { return _actions_inline_edit__WEBPACK_IMPORTED_MODULE_18__["InlineEdit"]; });

/* harmony import */ var _actions_normal_edit__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./actions/normal-edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/normal-edit.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalEdit", function() { return _actions_normal_edit__WEBPACK_IMPORTED_MODULE_19__["NormalEdit"]; });

/* harmony import */ var _actions_dialog_edit__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./actions/dialog-edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/dialog-edit.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogEdit", function() { return _actions_dialog_edit__WEBPACK_IMPORTED_MODULE_20__["DialogEdit"]; });

/* harmony import */ var _actions_column_chooser__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./actions/column-chooser */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/column-chooser.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnChooser", function() { return _actions_column_chooser__WEBPACK_IMPORTED_MODULE_21__["ColumnChooser"]; });

/* harmony import */ var _actions_excel_export__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./actions/excel-export */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-export.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelExport", function() { return _actions_excel_export__WEBPACK_IMPORTED_MODULE_22__["ExcelExport"]; });

/* harmony import */ var _actions_pdf_export__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./actions/pdf-export */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/pdf-export.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfExport", function() { return _actions_pdf_export__WEBPACK_IMPORTED_MODULE_23__["PdfExport"]; });

/* harmony import */ var _actions_export_helper__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./actions/export-helper */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/export-helper.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExportHelper", function() { return _actions_export_helper__WEBPACK_IMPORTED_MODULE_24__["ExportHelper"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExportValueFormatter", function() { return _actions_export_helper__WEBPACK_IMPORTED_MODULE_24__["ExportValueFormatter"]; });

/* harmony import */ var _actions_clipboard__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./actions/clipboard */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/clipboard.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Clipboard", function() { return _actions_clipboard__WEBPACK_IMPORTED_MODULE_25__["Clipboard"]; });

/* harmony import */ var _actions_command_column__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./actions/command-column */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/command-column.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CommandColumn", function() { return _actions_command_column__WEBPACK_IMPORTED_MODULE_26__["CommandColumn"]; });

/* harmony import */ var _actions_checkbox_filter__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./actions/checkbox-filter */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/checkbox-filter.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckBoxFilter", function() { return _actions_checkbox_filter__WEBPACK_IMPORTED_MODULE_27__["CheckBoxFilter"]; });

/* harmony import */ var _actions_context_menu__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./actions/context-menu */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/context-menu.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "menuClass", function() { return _actions_context_menu__WEBPACK_IMPORTED_MODULE_28__["menuClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContextMenu", function() { return _actions_context_menu__WEBPACK_IMPORTED_MODULE_28__["ContextMenu"]; });

/* harmony import */ var _actions_freeze__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./actions/freeze */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/freeze.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Freeze", function() { return _actions_freeze__WEBPACK_IMPORTED_MODULE_29__["Freeze"]; });

/* harmony import */ var _actions_column_menu__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./actions/column-menu */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/column-menu.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnMenu", function() { return _actions_column_menu__WEBPACK_IMPORTED_MODULE_30__["ColumnMenu"]; });

/* harmony import */ var _actions_excel_filter__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./actions/excel-filter */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-filter.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelFilter", function() { return _actions_excel_filter__WEBPACK_IMPORTED_MODULE_31__["ExcelFilter"]; });

/* harmony import */ var _actions_foreign_key__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./actions/foreign-key */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/foreign-key.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ForeignKey", function() { return _actions_foreign_key__WEBPACK_IMPORTED_MODULE_32__["ForeignKey"]; });

/* harmony import */ var _actions_logger__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./actions/logger */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/logger.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _actions_logger__WEBPACK_IMPORTED_MODULE_33__["Logger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detailLists", function() { return _actions_logger__WEBPACK_IMPORTED_MODULE_33__["detailLists"]; });

/**
 * Action export
 */




































/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/aggregate.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/aggregate.js ***!
  \**************************************************************************/
/*! exports provided: Aggregate, summaryIterator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Aggregate", function() { return Aggregate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "summaryIterator", function() { return summaryIterator; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _renderer_footer_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../renderer/footer-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/footer-renderer.js");
/* harmony import */ var _renderer_summary_cell_renderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../renderer/summary-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/summary-cell-renderer.js");
/* harmony import */ var _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../services/summary-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/summary-model-generator.js");







/**
 * Summary Action controller.
 */
var Aggregate = /** @class */ (function () {
    function Aggregate(parent, locator) {
        this.parent = parent;
        this.locator = locator;
        this.addEventListener();
    }
    Aggregate.prototype.getModuleName = function () {
        return 'aggregate';
    };
    Aggregate.prototype.initiateRender = function () {
        var _this = this;
        var cellFac = this.locator.getService('cellRendererFactory');
        var instance = new _renderer_summary_cell_renderer__WEBPACK_IMPORTED_MODULE_4__["SummaryCellRenderer"](this.parent, this.locator);
        [_base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Summary, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].CaptionSummary, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].GroupSummary].forEach(function (type) {
            return cellFac.addCellRenderer(type, instance);
        });
        this.footerRenderer = new _renderer_footer_renderer__WEBPACK_IMPORTED_MODULE_3__["FooterRenderer"](this.parent, this.locator);
        this.footerRenderer.renderPanel();
        this.footerRenderer.renderTable();
        this.locator.register('footerRenderer', this.footerRenderer);
        var fn = function () {
            _this.prepareSummaryInfo();
            _this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataReady"], fn);
        };
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataReady"], fn, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataReady"], this.footerRenderer.refresh, this.footerRenderer);
    };
    Aggregate.prototype.prepareSummaryInfo = function () {
        var _this = this;
        summaryIterator(this.parent.aggregates, function (column) {
            var dataColumn = _this.parent.getColumnByField(column.field) || {};
            var type = dataColumn.type;
            var cFormat = 'customFormat';
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column[cFormat])) {
                column.setPropertiesSilent({ format: column[cFormat] });
            }
            column.setPropertiesSilent({ format: _this.getFormatFromType(column.format, type) });
            column.setFormatter(_this.parent.locale);
            column.setPropertiesSilent({ columnName: column.columnName || column.field });
        });
    };
    Aggregate.prototype.getFormatFromType = function (format, type) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(type) || typeof format !== 'string') {
            return format;
        }
        var obj;
        switch (type) {
            case 'number':
                obj = { format: format };
                break;
            case 'date':
                obj = { type: type, skeleton: format };
                break;
            case 'datetime':
                obj = { type: 'dateTime', skeleton: format };
                break;
        }
        return obj;
    };
    Aggregate.prototype.onPropertyChanged = function (e) {
        if (e.module !== this.getModuleName()) {
            return;
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.footerRenderer)) {
            this.initiateRender();
        }
        this.prepareSummaryInfo();
        this.footerRenderer.refresh();
        var cModel = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_5__["CaptionSummaryModelGenerator"](this.parent);
        var gModel = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_5__["GroupSummaryModelGenerator"](this.parent);
        if (gModel.getData().length !== 0 || !cModel.isEmpty()) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], {});
        }
    };
    Aggregate.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.initiateRender, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.onPropertyChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["refreshAggregates"], this.refresh, this);
    };
    Aggregate.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.footerRenderer.removeEventListener();
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.initiateRender);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataReady"], this.footerRenderer.refresh);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.onPropertyChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["refreshAggregates"], this.refresh);
    };
    Aggregate.prototype.destroy = function () {
        this.removeEventListener();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.parent.element.querySelector('.e-gridfooter'));
    };
    Aggregate.prototype.refresh = function (data) {
        var editedData = data instanceof Array ? data : [data];
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["refreshFooterRenderer"], editedData);
        if (this.parent.groupSettings.columns.length > 0) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["groupAggregates"], editedData);
        }
    };
    return Aggregate;
}());

/**
 * @private
 */
function summaryIterator(aggregates, callback) {
    aggregates.forEach(function (row) {
        row.columns.forEach(function (column) {
            callback(column, row);
        });
    });
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/batch-edit.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/batch-edit.js ***!
  \***************************************************************************/
/*! exports provided: BatchEdit */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BatchEdit", function() { return BatchEdit; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../renderer/row-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js");
/* harmony import */ var _renderer_cell_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../renderer/cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony import */ var _models_cell__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../models/cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js");
/* harmony import */ var _services_row_model_generator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../services/row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");












/**
 * `BatchEdit` module is used to handle batch editing actions.
 * @hidden
 */
var BatchEdit = /** @class */ (function () {
    function BatchEdit(parent, serviceLocator, renderer) {
        this.cellDetails = {};
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        this.renderer = renderer;
        this.focus = serviceLocator.getService('focus');
        this.addEventListener();
    }
    /**
     * @hidden
     */
    BatchEdit.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.clickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dblclick"], this.dblClickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeCellFocused"], this.onBeforeCellFocused, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellFocused"], this.onCellFocused, this);
        this.dataBoundFunction = this.dataBound.bind(this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataBound"], this.dataBoundFunction);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["doubleTap"], this.dblClickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["keyPressed"], this.keyDownHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["editNextValCell"], this.editNextValCell, this);
    };
    /**
     * @hidden
     */
    BatchEdit.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.clickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dblclick"], this.dblClickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeCellFocused"], this.onBeforeCellFocused);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellFocused"], this.onCellFocused);
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataBound"], this.dataBoundFunction);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["doubleTap"], this.dblClickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["keyPressed"], this.keyDownHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["editNextValCell"], this.editNextValCell);
    };
    BatchEdit.prototype.dataBound = function () {
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["toolbarRefresh"], {});
    };
    /**
     * @hidden
     */
    BatchEdit.prototype.destroy = function () {
        this.removeEventListener();
    };
    BatchEdit.prototype.clickHandler = function (e) {
        if (!Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, this.parent.element.id + '_add', true)) {
            if (this.parent.isEdit) {
                this.saveCell();
                this.editNextValCell();
            }
            if (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-rowcell') && !this.parent.isEdit) {
                this.setCellIdx(e.target);
            }
        }
    };
    BatchEdit.prototype.dblClickHandler = function (e) {
        var target = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-rowcell');
        var tr = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-row');
        if (target && tr && !isNaN(parseInt(target.getAttribute('aria-colindex'), 10))
            && !target.parentElement.classList.contains('e-editedrow')) {
            this.editCell(parseInt(tr.getAttribute('aria-rowindex'), 10), this.parent.getColumns()[parseInt(target.getAttribute('aria-colindex'), 10)].field, this.isAddRow(parseInt(tr.getAttribute('aria-rowindex'), 10)));
        }
    };
    BatchEdit.prototype.onBeforeCellFocused = function (e) {
        if (this.parent.isEdit && this.validateFormObj() &&
            (e.byClick || (['tab', 'shiftTab', 'enter', 'shiftEnter'].indexOf(e.keyArgs.action) > -1))) {
            e.cancel = true;
            if (e.byClick) {
                e.clickArgs.preventDefault();
            }
            else {
                e.keyArgs.preventDefault();
            }
        }
    };
    BatchEdit.prototype.onCellFocused = function (e) {
        var frzCols = this.parent.getFrozenColumns();
        var mCont = this.parent.getContent().querySelector('.e-movablecontent');
        var mHdr = this.parent.getHeaderContent().querySelector('.e-movableheader');
        var clear = (!e.container.isContent || !e.container.isDataCell) && !(this.parent.frozenRows && e.container.isHeader);
        if (!e.byKey || clear) {
            if (this.parent.isEdit && clear) {
                this.saveCell();
            }
            return;
        }
        var _a = e.container.indexes, rowIndex = _a[0], cellIndex = _a[1];
        if (frzCols && (mCont.contains(e.element) || (this.parent.frozenRows && mHdr.contains(e.element)))) {
            cellIndex += frzCols;
        }
        if (this.parent.frozenRows && e.container.isContent) {
            rowIndex += this.parent.frozenRows;
        }
        var isEdit = this.parent.isEdit;
        if (!this.parent.element.querySelectorAll('.e-popup-open').length) {
            isEdit = isEdit && !this.validateFormObj();
            switch (e.keyArgs.action) {
                case 'tab':
                case 'shiftTab':
                    if (isEdit || this.parent.isLastCellPrimaryKey) {
                        this.editCellFromIndex(rowIndex, cellIndex);
                    }
                    break;
                case 'enter':
                case 'shiftEnter':
                    e.keyArgs.preventDefault();
                    if (isEdit) {
                        this.editCell(rowIndex, this.cellDetails.column.field);
                    }
                    break;
                case 'f2':
                    this.editCellFromIndex(rowIndex, cellIndex);
                    this.focus.focus();
                    break;
            }
        }
    };
    BatchEdit.prototype.isAddRow = function (index) {
        return this.parent.getDataRows()[index].classList.contains('e-insertedrow');
    };
    BatchEdit.prototype.editCellFromIndex = function (rowIdx, cellIdx) {
        this.cellDetails.rowIndex = rowIdx;
        this.cellDetails.cellIndex = cellIdx;
        this.editCell(rowIdx, this.parent.getColumns()[cellIdx].field, this.isAddRow(rowIdx));
    };
    BatchEdit.prototype.closeEdit = function () {
        var gObj = this.parent;
        var rows = this.parent.getRowsObject();
        var argument = { cancel: false, batchChanges: this.getBatchChanges() };
        gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeBatchCancel"], argument);
        if (argument.cancel) {
            return;
        }
        if (gObj.frozenColumns && rows.length < this.parent.currentViewData.length * 2) {
            rows.push.apply(rows, this.parent.getMovableRowsObject());
        }
        var rowRenderer = new _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_4__["RowRenderer"](this.serviceLocator, null, this.parent);
        var tr;
        var mTr;
        var movObj;
        if (gObj.isEdit) {
            this.saveCell(true);
        }
        this.isAdded = false;
        gObj.clearSelection();
        for (var i = 0; i < rows.length; i++) {
            if (rows[i].isDirty) {
                if (gObj.frozenColumns) {
                    movObj = gObj.getMovableRowsObject()[rows[i].index];
                    movObj.isDirty = true;
                }
                tr = gObj.getContentTable().querySelector('[data-uid=' + rows[i].uid + ']');
                if (gObj.frozenRows && !tr) {
                    tr = gObj.getHeaderContent().querySelector('[data-uid=' + rows[i].uid + ']');
                }
                if (gObj.frozenColumns) {
                    if (gObj.frozenRows) {
                        mTr = gObj.getHeaderContent().querySelector('.e-movableheader')
                            .querySelector('[data-uid=' + rows[i].uid + ']');
                        if (!mTr) {
                            mTr = gObj.getContent().querySelector('.e-movablecontent')
                                .querySelector('[data-uid=' + rows[i].uid + ']');
                        }
                    }
                    else {
                        mTr = gObj.getContent().querySelector('.e-movablecontent')
                            .querySelector('[data-uid=' + rows[i].uid + ']');
                    }
                }
                if (tr || mTr) {
                    if (tr && tr.classList.contains('e-insertedrow') || mTr && mTr.classList.contains('e-insertedrow')) {
                        if (tr) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(tr);
                        }
                        if (mTr && (gObj.frozenColumns || gObj.frozenRows)) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(mTr);
                        }
                        this.removeRowObjectFromUID(rows[i].uid);
                        i--;
                    }
                    else {
                        Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["refreshForeignData"])(rows[i], this.parent.getForeignKeyColumns(), rows[i].data);
                        delete rows[i].changes;
                        delete rows[i].edit;
                        rows[i].isDirty = false;
                        var ftr = mTr ? mTr : tr;
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(ftr, [], ['e-hiddenrow', 'e-updatedtd']);
                        rowRenderer.refresh(rows[i], gObj.getColumns(), false);
                        if (this.parent.aggregates.length > 0) {
                            var type = 'type';
                            var editType = [];
                            editType[type] = 'cancel';
                            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshFooterRenderer"], editType);
                            if (this.parent.groupSettings.columns.length > 0) {
                                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["groupAggregates"], editType);
                            }
                        }
                    }
                }
            }
        }
        if (!gObj.getContentTable().querySelector('tr.e-row')) {
            gObj.renderModule.renderEmptyRow();
        }
        var args = {
            requestType: 'batchCancel', rows: this.parent.getRowsObject()
        };
        gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["batchCancel"], {
            rows: this.parent.getRowsObject().length ? this.parent.getRowsObject() :
                [new _models_row__WEBPACK_IMPORTED_MODULE_6__["Row"]({ isDataRow: true, cells: [new _models_cell__WEBPACK_IMPORTED_MODULE_7__["Cell"]({ isDataCell: true, visible: true })] })]
        });
        gObj.selectRow(this.cellDetails.rowIndex);
        this.refreshRowIdx();
        gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["toolbarRefresh"], {});
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["tooltipDestroy"], {});
        args = { requestType: 'batchCancel', rows: this.parent.getRowsObject() };
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["batchCancel"], args);
        if (gObj.frozenColumns) {
            rows.splice(this.parent.getMovableRowsObject().length, rows.length);
        }
    };
    BatchEdit.prototype.deleteRecord = function (fieldname, data) {
        this.saveCell();
        if (this.validateFormObj()) {
            this.saveCell(true);
        }
        this.isAdded = false;
        this.bulkDelete(fieldname, data);
        if (this.parent.aggregates.length > 0) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshFooterRenderer"], {});
            if (this.parent.groupSettings.columns.length > 0) {
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["groupAggregates"], {});
            }
        }
    };
    BatchEdit.prototype.addRecord = function (data) {
        this.bulkAddRow(data);
    };
    BatchEdit.prototype.endEdit = function (data) {
        if (this.parent.isEdit && this.validateFormObj()) {
            return;
        }
        this.batchSave();
    };
    BatchEdit.prototype.validateFormObj = function () {
        return this.parent.editModule.formObj && !this.parent.editModule.formObj.validate();
    };
    BatchEdit.prototype.batchSave = function () {
        var gObj = this.parent;
        var deletedRecords = 'deletedRecords';
        if (gObj.isCheckBoxSelection) {
            var checkAllBox = gObj.element.querySelector('.e-checkselectall').parentElement;
            if (checkAllBox.classList.contains('e-checkbox-disabled') &&
                gObj.pageSettings.totalRecordsCount > gObj.currentViewData.length) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([checkAllBox], ['e-checkbox-disabled']);
            }
        }
        this.saveCell();
        if (gObj.isEdit || this.editNextValCell() || gObj.isEdit) {
            return;
        }
        var changes = this.getBatchChanges();
        if (this.parent.selectionSettings.type === 'Multiple' && changes[deletedRecords].length) {
            changes[deletedRecords] = changes[deletedRecords].concat(this.removeSelectedData);
            this.removeSelectedData = [];
        }
        var original = {
            changedRecords: this.parent.getRowsObject()
                .filter(function (row) { return row.isDirty && ['add', 'delete'].indexOf(row.edit) === -1; })
                .map(function (row) { return row.data; })
        };
        var args = { batchChanges: changes, cancel: false };
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeBatchSave"], args, function (beforeBatchSaveArgs) {
            if (beforeBatchSaveArgs.cancel) {
                return;
            }
            gObj.showSpinner();
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["bulkSave"], { changes: changes, original: original });
        });
    };
    BatchEdit.prototype.getBatchChanges = function () {
        var changes = {
            addedRecords: [],
            deletedRecords: [],
            changedRecords: []
        };
        var rows = this.parent.getRowsObject();
        var mRows = this.parent.getMovableRowsObject();
        var frzCols = this.parent.getFrozenColumns();
        for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
            var row = rows_1[_i];
            if (frzCols) {
                this.mergeBatchChanges(row, mRows[row.index], frzCols);
            }
            if (row.isDirty) {
                switch (row.edit) {
                    case 'add':
                        changes.addedRecords.push(row.changes);
                        break;
                    case 'delete':
                        changes.deletedRecords.push(row.data);
                        break;
                    default:
                        changes.changedRecords.push(row.changes);
                }
            }
        }
        return changes;
    };
    BatchEdit.prototype.mergeBatchChanges = function (row, mRow, frzCols) {
        if (row.isDirty) {
            if (mRow.isDirty) {
                var i_1 = 0;
                Object.keys(row.changes).forEach(function (key) {
                    if (i_1 >= frzCols) {
                        row.changes[key] = mRow.changes[key];
                    }
                    i_1++;
                });
            }
        }
        else if (mRow.isDirty) {
            row.changes = mRow.changes;
            row.isDirty = mRow.isDirty;
        }
    };
    /**
     * @hidden
     */
    BatchEdit.prototype.removeRowObjectFromUID = function (uid) {
        var rows = this.parent.getRowsObject();
        var i = 0;
        for (var len = rows.length; i < len; i++) {
            if (rows[i].uid === uid) {
                break;
            }
        }
        rows.splice(i, 1);
    };
    /**
     * @hidden
     */
    BatchEdit.prototype.addRowObject = function (row) {
        this.parent.editSettings.newRowPosition === 'Top' ? this.parent.getRowsObject().unshift(row) :
            this.parent.getRowsObject().push(row);
    };
    BatchEdit.prototype.bulkDelete = function (fieldname, data) {
        var _this = this;
        this.removeSelectedData = [];
        var gObj = this.parent;
        if (data) {
            gObj.selectRow(this.getIndexFromData(data));
        }
        var index = gObj.selectedRowIndex;
        var selectedRows = gObj.getSelectedRows();
        var args = {
            primaryKey: this.parent.getPrimaryKeyFieldNames(),
            rowIndex: index,
            rowData: data ? data : gObj.getSelectedRecords()[0],
            row: data ? gObj.getRows()[index] : selectedRows[0], cancel: false
        };
        if (!args.row) {
            return;
        }
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeBatchDelete"], args, function (beforeBatchDeleteArgs) {
            if (beforeBatchDeleteArgs.cancel) {
                return;
            }
            if (_this.parent.frozenColumns || selectedRows.length === 1) {
                var uid = beforeBatchDeleteArgs.row.getAttribute('data-uid');
                if (beforeBatchDeleteArgs.row.classList.contains('e-insertedrow')) {
                    _this.removeRowObjectFromUID(uid);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(beforeBatchDeleteArgs.row);
                }
                else {
                    var rowObj = gObj.getRowObjectFromUID(uid);
                    rowObj.isDirty = true;
                    rowObj.edit = 'delete';
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(beforeBatchDeleteArgs.row, ['e-hiddenrow', 'e-updatedtd'], []);
                    if (gObj.getFrozenColumns()) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(data ? gObj.getMovableRows()[index] : selectedRows[1], ['e-hiddenrow', 'e-updatedtd'], []);
                        if (gObj.frozenRows && index < gObj.frozenRows && gObj.getMovableDataRows().length >= gObj.frozenRows) {
                            gObj.getHeaderContent().querySelector('.e-movableheader').querySelector('tbody')
                                .appendChild(gObj.getMovableRowByIndex(gObj.frozenRows - 1));
                            gObj.getHeaderContent().querySelector('.e-frozenheader').querySelector('tbody')
                                .appendChild(gObj.getRowByIndex(gObj.frozenRows - 1));
                        }
                    }
                    else if (gObj.frozenRows && index < gObj.frozenRows && gObj.getDataRows().length >= gObj.frozenRows) {
                        gObj.getHeaderContent().querySelector('tbody').appendChild(gObj.getRowByIndex(gObj.frozenRows - 1));
                    }
                }
                delete beforeBatchDeleteArgs.row;
            }
            else {
                for (var i = 0; i < selectedRows.length; i++) {
                    var uniqueid = selectedRows[i].getAttribute('data-uid');
                    if (selectedRows[i].classList.contains('e-insertedrow')) {
                        _this.removeRowObjectFromUID(uniqueid);
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(selectedRows[i]);
                    }
                    else {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(selectedRows[i], ['e-hiddenrow', 'e-updatedtd'], []);
                        var selectedRow = gObj.getRowObjectFromUID(uniqueid);
                        selectedRow.isDirty = true;
                        selectedRow.edit = 'delete';
                        delete selectedRows[i];
                    }
                }
            }
            _this.refreshRowIdx();
            _this.removeSelectedData = gObj.getSelectedRecords();
            gObj.clearSelection();
            gObj.selectRow(index);
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["batchDelete"], beforeBatchDeleteArgs);
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["batchDelete"], { rows: _this.parent.getRowsObject() });
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["toolbarRefresh"], {});
        });
    };
    BatchEdit.prototype.refreshRowIdx = function () {
        var rows = [];
        var mRows = [];
        var nonMovableRows = [];
        var frzCols = this.parent.getFrozenColumns();
        if (this.parent.frozenRows) {
            rows = [].slice.call(this.parent.getHeaderTable().querySelector('tbody').children);
            if (frzCols) {
                mRows = [].slice.call(this.parent.getHeaderContent().querySelector('.e-movableheader').querySelector('tbody').children);
                for (var i = 0; i < mRows.length; i++) {
                    nonMovableRows[i] = this.parent.createElement('tr', { className: 'emptynonmv' });
                }
            }
        }
        if (frzCols) {
            mRows = mRows.concat([].slice.call(this.parent.getContentTable().querySelector('tbody').children));
            nonMovableRows = nonMovableRows.concat([].slice.call(this.parent.element.querySelector('.e-movablecontent').querySelector('tbody').children));
        }
        rows = rows.concat([].slice.call(this.parent.getContentTable().querySelector('tbody').children));
        for (var i = 0, j = 0, len = rows.length; i < len; i++) {
            if (rows[i].classList.contains('e-row') && !rows[i].classList.contains('e-hiddenrow')) {
                rows[i].setAttribute('aria-rowindex', j.toString());
                if (frzCols) {
                    mRows[i].setAttribute('aria-rowindex', j.toString());
                    if (nonMovableRows[i].classList.contains('e-row')) {
                        nonMovableRows[i].setAttribute('aria-rowindex', j.toString());
                    }
                }
                j++;
            }
            else {
                rows[i].removeAttribute('aria-rowindex');
                if (frzCols) {
                    mRows[i].removeAttribute('aria-rowindex');
                }
            }
        }
    };
    BatchEdit.prototype.getIndexFromData = function (data) {
        return Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["inArray"])(data, this.parent.getCurrentViewRecords());
    };
    BatchEdit.prototype.bulkAddRow = function (data) {
        var _this = this;
        var gObj = this.parent;
        if (!gObj.editSettings.allowAdding) {
            return;
        }
        if (gObj.isEdit) {
            this.saveCell();
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["editNextValCell"], {});
        }
        if (gObj.isEdit) {
            return;
        }
        var defaultData = data ? data : this.getDefaultData();
        var args = {
            defaultData: defaultData,
            primaryKey: gObj.getPrimaryKeyFieldNames(),
            cancel: false
        };
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeBatchAdd"], args, function (beforeBatchAddArgs) {
            if (beforeBatchAddArgs.cancel) {
                return;
            }
            _this.isAdded = true;
            gObj.clearSelection();
            var mTr;
            var mTbody;
            var row = new _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_4__["RowRenderer"](_this.serviceLocator, null, _this.parent);
            var model = new _services_row_model_generator__WEBPACK_IMPORTED_MODULE_8__["RowModelGenerator"](_this.parent);
            var modelData = model.generateRows([beforeBatchAddArgs.defaultData]);
            var tr = row.render(modelData[0], gObj.getColumns());
            var col;
            var index;
            for (var i = 0; i < _this.parent.groupSettings.columns.length; i++) {
                tr.insertBefore(_this.parent.createElement('td', { className: 'e-indentcell' }), tr.firstChild);
                modelData[0].cells.unshift(new _models_cell__WEBPACK_IMPORTED_MODULE_7__["Cell"]({ cellType: _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Indent }));
            }
            var tbody = gObj.getContentTable().querySelector('tbody');
            tr.classList.add('e-insertedrow');
            if (tbody.querySelector('.e-emptyrow')) {
                tbody.querySelector('.e-emptyrow').remove();
            }
            if (gObj.getFrozenColumns()) {
                mTr = _this.renderMovable(tr);
                if (gObj.frozenRows && gObj.editSettings.newRowPosition === 'Top') {
                    mTbody = gObj.getHeaderContent().querySelector('.e-movableheader').querySelector('tbody');
                }
                else {
                    mTbody = gObj.getContent().querySelector('.e-movablecontent').querySelector('tbody');
                }
                _this.parent.editSettings.newRowPosition === 'Top' ? mTbody.insertBefore(mTr, mTbody.firstChild) : mTbody.appendChild(mTr);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(mTr.querySelectorAll('.e-rowcell'), ['e-updatedtd']);
                if (_this.parent.height === 'auto') {
                    _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["frozenHeight"], {});
                }
            }
            if (gObj.frozenRows && gObj.editSettings.newRowPosition === 'Top') {
                tbody = gObj.getHeaderContent().querySelector('tbody');
            }
            else {
                tbody = gObj.getContent().querySelector('tbody');
            }
            _this.parent.editSettings.newRowPosition === 'Top' ? tbody.insertBefore(tr, tbody.firstChild) : tbody.appendChild(tr);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(tr.querySelectorAll('.e-rowcell'), ['e-updatedtd']);
            modelData[0].isDirty = true;
            modelData[0].changes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {}, modelData[0].data, true);
            modelData[0].edit = 'add';
            _this.addRowObject(modelData[0]);
            _this.refreshRowIdx();
            _this.focus.forgetPrevious();
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["batchAdd"], { rows: _this.parent.getRowsObject() });
            var changes = _this.getBatchChanges();
            var addedRecords = 'addedRecords';
            _this.parent.editSettings.newRowPosition === 'Top' ? gObj.selectRow(0) :
                gObj.selectRow(_this.parent.getCurrentViewRecords().length + changes[addedRecords].length - 1);
            if (!data) {
                index = _this.findNextEditableCell(0, true);
                col = gObj.getColumns()[index];
                _this.parent.editSettings.newRowPosition === 'Top' ? _this.editCell(0, col.field, true) :
                    _this.editCell(_this.parent.getCurrentViewRecords().length + changes[addedRecords].length - 1, col.field, true);
            }
            if (_this.parent.aggregates.length > 0 && data) {
                _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshFooterRenderer"], {});
            }
            var args1 = {
                defaultData: beforeBatchAddArgs.defaultData, row: tr,
                columnObject: col, columnIndex: index, primaryKey: beforeBatchAddArgs.primaryKey, cell: tr.cells[index]
            };
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["batchAdd"], args1);
        });
    };
    BatchEdit.prototype.renderMovable = function (ele) {
        var mEle = ele.cloneNode(true);
        for (var i = 0; i < this.parent.frozenColumns; i++) {
            mEle.removeChild(mEle.children[0]);
        }
        for (var i = this.parent.frozenColumns, len = ele.childElementCount; i < len; i++) {
            ele.removeChild(ele.children[ele.childElementCount - 1]);
        }
        return mEle;
    };
    BatchEdit.prototype.findNextEditableCell = function (columnIndex, isAdd, isValOnly) {
        var cols = this.parent.getColumns();
        var endIndex = cols.length;
        var validation;
        for (var i = columnIndex; i < endIndex; i++) {
            validation = isValOnly ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cols[i].validationRules) : false;
            if (!isAdd && this.checkNPCell(cols[i])) {
                return i;
            }
            else if (isAdd && !cols[i].template && cols[i].visible && cols[i].allowEditing &&
                !(cols[i].isIdentity && cols[i].isPrimaryKey) && !validation) {
                return i;
            }
        }
        return -1;
    };
    BatchEdit.prototype.checkNPCell = function (col) {
        return !col.template && col.visible && !col.isPrimaryKey && !col.isIdentity && col.allowEditing;
    };
    BatchEdit.prototype.getDefaultData = function () {
        var gObj = this.parent;
        var data = {};
        var dValues = { 'number': 0, 'string': null, 'boolean': false, 'date': null, 'datetime': null };
        for (var _i = 0, _a = gObj.columns; _i < _a.length; _i++) {
            var col = _a[_i];
            if (col.field) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(col.field, col.defaultValue ? col.defaultValue : dValues[col.type], data);
            }
        }
        return data;
    };
    BatchEdit.prototype.setCellIdx = function (target) {
        var gLen = 0;
        if (this.parent.allowGrouping) {
            gLen = this.parent.groupSettings.columns.length;
        }
        this.cellDetails.cellIndex = target.cellIndex - gLen;
        this.cellDetails.rowIndex = parseInt(target.getAttribute('index'), 10);
    };
    BatchEdit.prototype.editCell = function (index, field, isAdd) {
        var _this = this;
        var gObj = this.parent;
        var col = gObj.getColumnByField(field);
        var keys = gObj.getPrimaryKeyFieldNames();
        if (gObj.editSettings.allowEditing && col.allowEditing) {
            if (gObj.isEdit && !(this.cellDetails.column.field === field
                && (this.cellDetails.rowIndex === index && this.parent.getDataRows().length - 1 !== index))) {
                this.saveCell();
                if (this.cellDetails.rowIndex === index && this.cellDetails.column.field === field) {
                    return;
                }
            }
            if (gObj.isEdit) {
                return;
            }
            var row = void 0;
            var rowData_1;
            var mRowData = void 0;
            var colIdx = gObj.getColumnIndexByField(field);
            var frzCols = gObj.getFrozenColumns();
            if (frzCols && colIdx >= frzCols) {
                row = gObj.getMovableDataRows()[index];
                mRowData = this.parent.getRowObjectFromUID(this.parent.getMovableDataRows()[index].getAttribute('data-uid'));
                rowData_1 = mRowData.changes ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {}, mRowData.changes, true) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {}, this.getDataByIndex(index), true);
            }
            else {
                row = gObj.getDataRows()[index];
                rowData_1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {}, this.getDataByIndex(index), true);
            }
            if ((keys[0] === col.field && !row.classList.contains('e-insertedrow')) || col.columns ||
                (col.isPrimaryKey && col.isIdentity)) {
                this.parent.isLastCellPrimaryKey = true;
                return;
            }
            this.parent.isLastCellPrimaryKey = false;
            var rowObj = gObj.getRowObjectFromUID(row.getAttribute('data-uid'));
            var cells = [].slice.apply(row.cells);
            var args = {
                cell: cells[this.getColIndex(cells, this.getCellIdx(col.uid))], row: row,
                columnName: col.field, columnObject: col, isForeignKey: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.foreignKeyValue),
                primaryKey: keys, rowData: rowData_1,
                validationRules: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, col.validationRules ? col.validationRules : {}),
                value: Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(col.field, rowData_1),
                type: !isAdd ? 'edit' : 'add', cancel: false,
                foreignKeyData: rowObj && rowObj.foreignKeyData
            };
            if (!args.cell) {
                return;
            }
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellEdit"], args, function (cellEditArgs) {
                if (cellEditArgs.cancel) {
                    return;
                }
                _this.cellDetails = {
                    rowData: rowData_1, column: col, value: cellEditArgs.value, isForeignKey: cellEditArgs.isForeignKey, rowIndex: index,
                    cellIndex: parseInt(cellEditArgs.cell.getAttribute('aria-colindex'), 10),
                    foreignKeyData: cellEditArgs.foreignKeyData
                };
                if (cellEditArgs.cell.classList.contains('e-updatedtd')) {
                    _this.isColored = true;
                    cellEditArgs.cell.classList.remove('e-updatedtd');
                }
                gObj.isEdit = true;
                gObj.clearSelection();
                if (!gObj.isCheckBoxSelection || !gObj.isPersistSelection) {
                    gObj.selectRow(_this.cellDetails.rowIndex, true);
                }
                _this.renderer.update(cellEditArgs);
                _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["batchEditFormRendered"], cellEditArgs);
                _this.form = gObj.element.querySelector('#' + gObj.element.id + 'EditForm');
                gObj.editModule.applyFormValidation([col]);
                _this.parent.element.querySelector('.e-gridpopup').style.display = 'none';
            });
        }
    };
    BatchEdit.prototype.updateCell = function (rowIndex, field, value) {
        var col = this.parent.getColumnByField(field);
        var index = this.parent.getColumnIndexByField(field);
        if (col && !col.isPrimaryKey) {
            var td = this.parent.getDataRows()[rowIndex].querySelectorAll('.e-rowcell')[index];
            if (this.parent.getFrozenColumns()) {
                var cells = [].slice.call(this.parent.getDataRows()[rowIndex].querySelectorAll('.e-rowcell')).concat([].slice.call(this.parent.getMovableDataRows()[rowIndex].querySelectorAll('.e-rowcell')));
                td = cells[index];
            }
            var rowObj = this.parent.getRowObjectFromUID(td.parentElement.getAttribute('data-uid'));
            this.refreshTD(td, col, rowObj, value);
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["queryCellInfo"], {
                cell: td, column: col, data: rowObj.changes
            });
        }
    };
    BatchEdit.prototype.setChanges = function (rowObj, field, value) {
        if (!rowObj.changes) {
            rowObj.changes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {}, rowObj.data, true);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(field)) {
            _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_9__["DataUtil"].setValue(field, value, rowObj.changes);
        }
        if (rowObj.data[field] !== value) {
            rowObj.isDirty = true;
        }
    };
    BatchEdit.prototype.updateRow = function (index, data) {
        var keys = Object.keys(data);
        for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
            var col = keys_1[_i];
            this.updateCell(index, col, data[col]);
        }
    };
    BatchEdit.prototype.getCellIdx = function (uid) {
        var cIdx = this.parent.getColumnIndexByUid(uid) + this.parent.groupSettings.columns.length;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.detailTemplate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.childGrid)) {
            cIdx++;
        }
        if (this.parent.isRowDragable()) {
            cIdx++;
        }
        return cIdx;
    };
    BatchEdit.prototype.refreshTD = function (td, column, rowObj, value) {
        var cell = new _renderer_cell_renderer__WEBPACK_IMPORTED_MODULE_5__["CellRenderer"](this.parent, this.serviceLocator);
        var rowcell;
        this.setChanges(rowObj, column.field, value);
        var frzCols = this.parent.getFrozenColumns();
        Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["refreshForeignData"])(rowObj, this.parent.getForeignKeyColumns(), rowObj.changes);
        if (frzCols && this.getCellIdx(column.uid) >= frzCols && this.parent.getColumns().length === rowObj.cells.length) {
            rowcell = rowObj.cells.slice(frzCols, rowObj.cells.length);
        }
        else {
            rowcell = rowObj.cells;
        }
        cell.refreshTD(td, rowcell[this.getCellIdx(column.uid) - (this.getCellIdx(column.uid) >= frzCols ? frzCols : 0)], rowObj.changes, { 'index': this.getCellIdx(column.uid) });
        td.classList.add('e-updatedtd');
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["toolbarRefresh"], {});
    };
    BatchEdit.prototype.getColIndex = function (cells, index) {
        var cIdx = 0;
        if (this.parent.allowGrouping && this.parent.groupSettings.columns) {
            cIdx = this.parent.groupSettings.columns.length;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.detailTemplate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.childGrid)) {
            cIdx++;
        }
        if (this.parent.isRowDragable()) {
            cIdx++;
        }
        for (var m = 0; m < cells.length; m++) {
            var colIndex = parseInt(cells[m].getAttribute('aria-colindex'), 10);
            if (colIndex === index - cIdx) {
                return m;
            }
        }
        return -1;
    };
    BatchEdit.prototype.editNextValCell = function () {
        var gObj = this.parent;
        if (this.isAdded && !gObj.isEdit) {
            for (var i = this.cellDetails.cellIndex; i < gObj.getColumns().length; i++) {
                if (gObj.isEdit) {
                    return;
                }
                var index = this.findNextEditableCell(this.cellDetails.cellIndex + 1, true, true);
                var col = gObj.getColumns()[index];
                if (col) {
                    this.editCell(0, col.field, true);
                    this.saveCell();
                }
            }
            if (!gObj.isEdit) {
                this.isAdded = false;
            }
        }
    };
    BatchEdit.prototype.saveCell = function (isForceSave) {
        var gObj = this.parent;
        if (!isForceSave && (!gObj.isEdit || this.validateFormObj())) {
            return;
        }
        var tr = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(this.form, 'e-row');
        var column = this.cellDetails.column;
        var obj = {};
        obj[column.field] = this.cellDetails.rowData[column.field];
        var editedData = gObj.editModule.getCurrentEditedData(this.form, obj);
        var cloneEditedData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, editedData);
        editedData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, editedData, this.cellDetails.rowData);
        var value = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(column.field, cloneEditedData);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.field)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(column.field, value, editedData);
        }
        var args = {
            columnName: column.field,
            value: Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(column.field, editedData),
            rowData: this.cellDetails.rowData,
            previousValue: this.cellDetails.value,
            columnObject: column,
            cell: this.form.parentElement,
            isForeignKey: this.cellDetails.isForeignKey, cancel: false
        };
        if (!isForceSave) {
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSave"], args, this.successCallBack(args, tr, column));
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["batchForm"], { formObj: this.form });
        }
        else {
            this.successCallBack(args, tr, column)(args);
        }
    };
    BatchEdit.prototype.successCallBack = function (cellSaveArgs, tr, column) {
        var _this = this;
        return function (cellSaveArgs) {
            var gObj = _this.parent;
            if (cellSaveArgs.cancel) {
                return;
            }
            gObj.editModule.destroyForm();
            gObj.isEdit = false;
            gObj.editModule.destroyWidgets([column]);
            _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["tooltipDestroy"], {});
            _this.refreshTD(cellSaveArgs.cell, column, gObj.getRowObjectFromUID(tr.getAttribute('data-uid')), cellSaveArgs.value);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([tr], ['e-editedrow', 'e-batchrow']);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([cellSaveArgs.cell], ['e-editedbatchcell', 'e-boolcell']);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cellSaveArgs.value) && cellSaveArgs.value.toString() ===
                (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.cellDetails.value) ? _this.cellDetails.value : '').toString() && !_this.isColored
                || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cellSaveArgs.value) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.cellDetails.value) &&
                    !cellSaveArgs.cell.parentElement.classList.contains('e-insertedrow'))) {
                cellSaveArgs.cell.classList.remove('e-updatedtd');
            }
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSaved"], cellSaveArgs);
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["toolbarRefresh"], {});
            _this.isColored = false;
            if (_this.parent.aggregates.length > 0) {
                _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshFooterRenderer"], {});
                if (_this.parent.groupSettings.columns.length > 0 && !_this.isAddRow(_this.cellDetails.rowIndex)) {
                    _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["groupAggregates"], {});
                }
            }
        };
    };
    BatchEdit.prototype.getDataByIndex = function (index) {
        var row = this.parent.getRowObjectFromUID(this.parent.getDataRows()[index].getAttribute('data-uid'));
        return row.changes ? row.changes : row.data;
    };
    BatchEdit.prototype.keyDownHandler = function (e) {
        if ((e.action === 'tab' || e.action === 'shiftTab') && this.parent.isEdit) {
            var gObj = this.parent;
            var rowcell = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-rowcell');
            if (rowcell) {
                var cell = rowcell.querySelector('.e-field');
                if (cell) {
                    var visibleColumns = this.parent.getVisibleColumns();
                    var columnIndex = e.action === 'tab' ? visibleColumns.length - 1 : 0;
                    if (visibleColumns[columnIndex].field === cell.getAttribute('id').slice(this.parent.element.id.length)) {
                        if (this.cellDetails.rowIndex !== gObj.getRows().length - 1) {
                            this.saveCell();
                        }
                        else {
                            if (gObj.editSettings.newRowPosition === 'Top') {
                                gObj.editSettings.newRowPosition = 'Bottom';
                                this.addRecord();
                                gObj.editSettings.newRowPosition = 'Top';
                            }
                            else {
                                this.addRecord();
                            }
                        }
                    }
                }
            }
        }
    };
    /**
     * @hidden
     */
    BatchEdit.prototype.addCancelWhilePaging = function () {
        if (this.validateFormObj()) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["destroyForm"], {});
            this.parent.isEdit = false;
            this.isColored = false;
        }
    };
    return BatchEdit;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/checkbox-filter.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/checkbox-filter.js ***!
  \********************************************************************************/
/*! exports provided: CheckBoxFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckBoxFilter", function() { return CheckBoxFilter; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _services_value_formatter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../services/value-formatter */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* tslint:disable-next-line:max-line-length */












/**
 * @hidden
 * `CheckBoxFilter` module is used to handle filtering action.
 */
var CheckBoxFilter = /** @class */ (function () {
    /**
     * Constructor for checkbox filtering module
     * @hidden
     */
    function CheckBoxFilter(parent, filterSettings, serviceLocator) {
        this.existingPredicate = {};
        this.foreignKeyQuery = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]();
        this.filterState = true;
        this.values = {};
        this.renderEmpty = false;
        this.parent = parent;
        this.id = this.parent.element.id;
        this.serviceLocator = serviceLocator;
        this.filterSettings = filterSettings;
        this.valueFormatter = new _services_value_formatter__WEBPACK_IMPORTED_MODULE_5__["ValueFormatter"](this.parent.locale);
        this.cBoxTrue = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["createCheckBox"])(this.parent.createElement, false, { checked: true, label: ' ' });
        this.cBoxFalse = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["createCheckBox"])(this.parent.createElement, false, { checked: false, label: ' ' });
        this.cBoxTrue.insertBefore(this.parent.createElement('input', {
            className: 'e-chk-hidden', attrs: { type: 'checkbox' }
        }), this.cBoxTrue.firstChild);
        this.cBoxFalse.insertBefore(this.parent.createElement('input', {
            className: 'e-chk-hidden', attrs: { 'type': 'checkbox' }
        }), this.cBoxFalse.firstChild);
        this.cBoxFalse.querySelector('.e-frame').classList.add('e-uncheck');
        if (this.parent.enableRtl) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.cBoxTrue, this.cBoxFalse], ['e-rtl']);
        }
    }
    /**
     * To destroy the filter bar.
     * @return {void}
     * @hidden
     */
    CheckBoxFilter.prototype.destroy = function () {
        this.closeDialog();
    };
    CheckBoxFilter.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dlg, 'click', this.clickHandler, this);
        this.searchHandler = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["debounce"])(this.searchBoxKeyUp, 200);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dlg.querySelector('.e-searchinput'), 'keyup', this.searchHandler, this);
    };
    CheckBoxFilter.prototype.unWireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.dlg, 'click', this.clickHandler);
        var elem = this.dlg.querySelector('.e-searchinput');
        if (elem) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(elem, 'keyup', this.searchHandler);
        }
    };
    CheckBoxFilter.prototype.foreignKeyFilter = function (args, fColl, mPredicate) {
        var _this = this;
        var fPredicate = {};
        var filterCollection = [];
        var query = this.foreignKeyQuery.clone();
        this.options.column.dataSource.
            executeQuery(query.where(mPredicate)).then(function (e) {
            _this.options.column.columnData = e.result;
            _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["generateQuery"], { predicate: fPredicate, column: _this.options.column });
            args.ejpredicate = fPredicate.predicate.predicates;
            fPredicate.predicate.predicates.forEach(function (fpred) {
                filterCollection.push({
                    field: fpred.field,
                    predicate: 'or',
                    matchCase: fpred.ignoreCase,
                    ignoreAccent: fpred.ignoreAccent,
                    operator: fpred.operator,
                    value: fpred.value,
                    type: _this.options.type
                });
            });
            args.filterCollection = filterCollection.length ? filterCollection :
                fColl.filter(function (col) { return col.field = _this.options.field; });
            _this.options.handler(args);
        });
    };
    CheckBoxFilter.prototype.foreignFilter = function (args, value) {
        var operator = this.parent.getDataModule().isRemote() ?
            (this.options.column.type === 'string' ? 'contains' : 'equal') : (this.options.column.type ? 'startswith' : 'contains');
        var initalPredicate = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Predicate"](this.options.column.foreignKeyValue, operator, value, true, this.parent.filterSettings.ignoreAccent);
        this.foreignKeyFilter(args, [args.filterCollection], initalPredicate);
    };
    CheckBoxFilter.prototype.searchBoxClick = function (e) {
        var target = e.target;
        if (target.classList.contains('e-searchclear')) {
            this.sInput.value = '';
            this.refreshCheckboxes();
            this.updateSearchIcon();
            this.sInput.focus();
        }
    };
    CheckBoxFilter.prototype.searchBoxKeyUp = function (e) {
        this.refreshCheckboxes();
        this.updateSearchIcon();
    };
    CheckBoxFilter.prototype.updateSearchIcon = function () {
        if (this.sInput.value.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.sIcon, ['e-chkcancel-icon'], ['e-search-icon']);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.sIcon, ['e-search-icon'], ['e-chkcancel-icon']);
        }
    };
    /**
     * Gets the localized label by locale keyword.
     * @param  {string} key
     * @return {string}
     */
    CheckBoxFilter.prototype.getLocalizedLabel = function (key) {
        return this.localeObj.getConstant(key);
    };
    CheckBoxFilter.prototype.updateDataSource = function () {
        var dataSource = this.options.dataSource;
        var str = 'object';
        if (!(dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"])) {
            for (var i = 0; i < dataSource.length; i++) {
                if (typeof dataSource !== str) {
                    var obj = {};
                    obj[this.options.field] = dataSource[i];
                    dataSource[i] = obj;
                }
            }
        }
    };
    CheckBoxFilter.prototype.updateModel = function (options) {
        this.options = options;
        this.existingPredicate = options.actualPredicate || {};
        this.options.dataSource = options.dataSource;
        this.updateDataSource();
        this.parent.log('column_type_missing', { column: options.column });
        this.options.type = options.type;
        this.options.format = options.format || '';
        this.options.filteredColumns = options.filteredColumns || this.parent.filterSettings.columns;
        this.options.sortedColumns = options.sortedColumns || this.parent.sortSettings.columns;
        this.options.query = options.query || new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]();
        this.options.allowCaseSensitive = options.allowCaseSensitive || false;
        this.options.uid = options.column.uid;
        this.values = {};
        this.localeObj = options.localeObj;
        this.isFiltered = options.filteredColumns.length;
    };
    CheckBoxFilter.prototype.getAndSetChkElem = function (options) {
        this.dlg = this.parent.createElement('div', {
            id: this.id + this.options.type + '_excelDlg',
            className: 'e-checkboxfilter e-filter-popup'
        });
        this.sBox = this.parent.createElement('div', { className: 'e-searchcontainer' });
        if (!options.hideSearchbox) {
            this.sInput = this.parent.createElement('input', {
                id: this.id + '_SearchBox',
                className: 'e-searchinput'
            });
            this.sIcon = this.parent.createElement('span', {
                className: 'e-searchclear e-search-icon e-icons e-input-group-icon', attrs: {
                    type: 'text', title: this.getLocalizedLabel('Search')
                }
            });
            this.searchBox = this.parent.createElement('span', { className: 'e-searchbox e-fields' });
            this.searchBox.appendChild(this.sInput);
            this.sBox.appendChild(this.searchBox);
            var inputargs = {
                element: this.sInput, floatLabelType: 'Never', properties: {
                    placeholder: this.getLocalizedLabel('Search')
                }
            };
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_7__["Input"].createInput(inputargs, this.parent.createElement);
            this.searchBox.querySelector('.e-input-group').appendChild(this.sIcon);
        }
        this.spinner = this.parent.createElement('div', { className: 'e-spinner' }); //for spinner
        this.cBox = this.parent.createElement('div', {
            id: this.id + this.options.type + '_CheckBoxList',
            className: 'e-checkboxlist e-fields'
        });
        this.spinner.appendChild(this.cBox);
        this.sBox.appendChild(this.spinner);
        return this.sBox;
    };
    CheckBoxFilter.prototype.showDialog = function (options) {
        var args = {
            requestType: _base_constant__WEBPACK_IMPORTED_MODULE_4__["filterBeforeOpen"], filterModel: this,
            columnName: this.options.field, columnType: this.options.type, cancel: false
        };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_4__["actionBegin"], args);
        if (args.cancel) {
            return;
        }
        this.dialogObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_6__["Dialog"]({
            visible: false, content: this.sBox,
            close: this.closeDialog.bind(this),
            width: (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(options.target, 'e-bigger')))
                || this.parent.element.classList.contains('e-device') ? 260 : 255,
            target: this.parent.element, animationSettings: { effect: 'None' },
            buttons: [{
                    click: this.btnClick.bind(this),
                    buttonModel: {
                        content: this.getLocalizedLabel(this.isExcel ? 'OKButton' : 'FilterButton'),
                        cssClass: 'e-primary', isPrimary: true
                    }
                },
                {
                    click: this.btnClick.bind(this),
                    buttonModel: { cssClass: 'e-flat', content: this.getLocalizedLabel(this.isExcel ? 'CancelButton' : 'ClearButton') }
                }],
            created: this.dialogCreated.bind(this),
            open: this.dialogOpen.bind(this)
        });
        var isStringTemplate = 'isStringTemplate';
        this.dialogObj[isStringTemplate] = true;
        this.dialogObj.appendTo(this.dlg);
        this.dialogObj.element.style.maxHeight = '800px';
        this.dialogObj.show();
        this.wireEvents();
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_6__["createSpinner"])({ target: this.spinner }, this.parent.createElement);
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_6__["showSpinner"])(this.spinner);
        this.getAllData();
    };
    CheckBoxFilter.prototype.dialogCreated = function (e) {
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getFilterMenuPostion"])(this.options.target, this.dialogObj, this.parent);
        }
        else {
            this.dialogObj.position = { X: 'center', Y: 'center' };
        }
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["filterDialogCreated"], e);
    };
    CheckBoxFilter.prototype.openDialog = function (options) {
        this.updateModel(options);
        this.getAndSetChkElem(options);
        this.showDialog(options);
    };
    CheckBoxFilter.prototype.closeDialog = function () {
        if (this.dialogObj && !this.dialogObj.isDestroyed) {
            var filterTemplateCol = this.parent.getColumns().filter(function (col) { return col.getFilterItemTemplate(); });
            if (filterTemplateCol.length) {
                this.parent.destroyTemplate(['filterItemTemplate']);
            }
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["filterMenuClose"], { field: this.options.field });
            this.dialogObj.destroy();
            this.unWireEvents();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.dlg);
            this.dlg = null;
        }
    };
    CheckBoxFilter.prototype.clearFilter = function () {
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(this.parent)) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["preventBatch"], { instance: this, handler: this.clearFilter });
            return;
        }
        this.options.handler({ action: 'clear-filter', field: this.options.field });
    };
    CheckBoxFilter.prototype.btnClick = function (e) {
        if (this.filterState) {
            if (e.target.tagName.toLowerCase() === 'input') {
                var value = e.target.value;
                if (this.options.column.type === 'boolean') {
                    if (value !== undefined &&
                        this.getLocalizedLabel('FilterTrue').toLowerCase().indexOf(value.toLowerCase()) !== -1) {
                        value = 'true';
                    }
                    else if (value !== undefined &&
                        this.getLocalizedLabel('FilterFalse').toLowerCase().indexOf(value.toLowerCase()) !== -1) {
                        value = 'false';
                    }
                }
                var args = {
                    action: 'filtering', filterCollection: {
                        field: this.options.field,
                        operator: this.parent.getDataModule().isRemote() ?
                            (this.options.column.type === 'string' ? 'contains' : 'equal') :
                            (this.options.column.type === 'date' || this.options.column.type === 'datetime' ||
                                this.options.column.type === 'boolean' ? 'equal' : 'contains'),
                        value: value, matchCase: false, type: this.options.column.type
                    },
                    field: this.options.field
                };
                value ? this.options.column.isForeignColumn() ? this.foreignFilter(args, value) :
                    this.options.handler(args) : this.closeDialog();
            }
            else {
                var text = e.target.firstChild.textContent.toLowerCase();
                if (this.getLocalizedLabel(this.isExcel ? 'OKButton' : 'FilterButton').toLowerCase() === text) {
                    this.fltrBtnHandler();
                }
                else if (this.getLocalizedLabel('ClearButton').toLowerCase() === text) {
                    this.clearFilter();
                }
            }
            this.closeDialog();
        }
        else if (!(e.target.tagName.toLowerCase() === 'input')) {
            this.clearFilter();
            this.closeDialog();
        }
    };
    CheckBoxFilter.prototype.fltrBtnHandler = function () {
        var checked = [].slice.call(this.cBox.querySelectorAll('.e-check:not(.e-selectall)'));
        var optr = 'equal';
        var searchInput = this.searchBox.querySelector('.e-searchinput');
        var caseSen = this.options.type === 'string' ?
            this.options.allowCaseSensitive : true;
        var defaults = {
            field: this.options.field, predicate: 'or', uid: this.options.uid,
            operator: optr, type: this.options.type, matchCase: caseSen, ignoreAccent: this.parent.filterSettings.ignoreAccent
        };
        var isNotEqual = this.itemsCnt !== checked.length && this.itemsCnt - checked.length < checked.length;
        if (isNotEqual && searchInput.value === '') {
            optr = 'notequal';
            checked = [].slice.call(this.cBox.querySelectorAll('.e-uncheck:not(.e-selectall)'));
            defaults.predicate = 'and';
            defaults.operator = 'notequal';
        }
        var value;
        var fObj;
        var coll = [];
        if (checked.length !== this.itemsCnt || (searchInput.value && searchInput.value !== '')) {
            for (var i = 0; i < checked.length; i++) {
                value = this.values[Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(checked[i], 'e-ftrchk').getAttribute('uid')];
                fObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, { value: value }, defaults);
                if (value && !value.toString().length) {
                    fObj.operator = isNotEqual ? 'notequal' : 'equal';
                }
                if (value === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
                    if (this.options.type === 'string') {
                        coll.push({
                            field: defaults.field, ignoreAccent: defaults.ignoreAccent, matchCase: defaults.matchCase,
                            operator: defaults.operator, predicate: defaults.predicate, value: ''
                        });
                    }
                    coll.push({
                        field: defaults.field,
                        matchCase: defaults.matchCase, operator: defaults.operator, predicate: defaults.predicate, value: null
                    });
                    coll.push({
                        field: defaults.field, matchCase: defaults.matchCase, operator: defaults.operator,
                        predicate: defaults.predicate, value: undefined
                    });
                }
                else {
                    coll.push(fObj);
                }
                if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(this.parent)) {
                    this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["preventBatch"], {
                        instance: this, handler: this.fltrBtnHandler, arg1: fObj.field, arg2: fObj.predicate, arg3: fObj.operator,
                        arg4: fObj.matchCase, arg5: fObj.ignoreAccent, arg6: fObj.value
                    });
                    return;
                }
            }
            this.initiateFilter(coll);
        }
        else {
            this.clearFilter();
        }
    };
    CheckBoxFilter.prototype.initiateFilter = function (fColl) {
        var firstVal = fColl[0];
        var predicate;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(firstVal)) {
            predicate = firstVal.ejpredicate ? firstVal.ejpredicate :
                new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Predicate"](firstVal.field, firstVal.operator, firstVal.value, !firstVal.matchCase, firstVal.ignoreAccent);
            for (var j = 1; j < fColl.length; j++) {
                predicate = fColl[j].ejpredicate !== undefined ?
                    predicate[fColl[j].predicate](fColl[j].ejpredicate) :
                    predicate[fColl[j].predicate](fColl[j].field, fColl[j].operator, fColl[j].value, !fColl[j].matchCase, fColl[j].ignoreAccent);
            }
            var args = {
                action: 'filtering', filterCollection: fColl, field: this.options.field,
                ejpredicate: _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Predicate"].or(predicate)
            };
            this.options.handler(args);
        }
    };
    CheckBoxFilter.prototype.refreshCheckboxes = function () {
        var _this = this;
        var val = this.sInput.value;
        var column = this.options.column;
        var query = column.isForeignColumn() ? this.foreignKeyQuery.clone() : this.options.query.clone();
        var foreignQuery = this.options.query.clone();
        query.queries = [];
        foreignQuery.queries = [];
        var parsed = (this.options.type !== 'string' && parseFloat(val)) ? parseFloat(val) : val;
        var operator = this.parent.getDataModule().isRemote() ?
            (this.options.type === 'string' ? 'contains' : 'equal') : (this.options.type ? 'startswith' : 'contains');
        var matchCase = true;
        var ignoreAccent = this.parent.filterSettings.ignoreAccent;
        var field = column.isForeignColumn() ? column.foreignKeyValue : column.field;
        parsed = (parsed === '' || parsed === undefined) ? undefined : parsed;
        var predicte;
        if (this.options.type === 'boolean') {
            if (parsed !== undefined &&
                this.getLocalizedLabel('FilterTrue').toLowerCase().indexOf(parsed.toLowerCase()) !== -1) {
                parsed = 'true';
            }
            else if (parsed !== undefined &&
                this.getLocalizedLabel('FilterFalse').toLowerCase().indexOf(parsed.toLowerCase()) !== -1) {
                parsed = 'false';
            }
            operator = 'equal';
        }
        this.addDistinct(query);
        var args = {
            requestType: _base_constant__WEBPACK_IMPORTED_MODULE_4__["filterSearchBegin"],
            filterModel: this, columnName: field, column: column,
            operator: operator, matchCase: matchCase, ignoreAccent: ignoreAccent, filterChoiceCount: null,
            query: query
        };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_4__["actionBegin"], args);
        predicte = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Predicate"](field, args.operator, parsed, args.matchCase, args.ignoreAccent);
        if (this.options.type === 'date' || this.options.type === 'datetime') {
            parsed = this.valueFormatter.fromView(val, this.options.parserFn, this.options.type);
            operator = 'equal';
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parsed) && val.length) {
                return;
            }
            var filterObj = {
                field: field, operator: operator, value: parsed, matchCase: matchCase,
                ignoreAccent: ignoreAccent
            };
            predicte = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getDatePredicate"])(filterObj, this.options.type);
        }
        if (val.length) {
            query.where(predicte);
        }
        args.filterChoiceCount = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.filterChoiceCount) ? args.filterChoiceCount : 1000;
        var fPredicate = {};
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_6__["showSpinner"])(this.spinner);
        this.renderEmpty = false;
        if (column.isForeignColumn() && val.length) {
            // tslint:disable-next-line:no-any
            column.dataSource.executeQuery(query).then(function (e) {
                var columnData = _this.options.column.columnData;
                _this.options.column.columnData = e.result;
                _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["generateQuery"], { predicate: fPredicate, column: column });
                if (fPredicate.predicate.predicates.length) {
                    foreignQuery.where(fPredicate.predicate);
                }
                else {
                    _this.renderEmpty = true;
                }
                _this.options.column.columnData = columnData;
                foreignQuery.take(args.filterChoiceCount);
                _this.search(args, foreignQuery);
            });
        }
        else {
            query.take(args.filterChoiceCount);
            this.search(args, query);
        }
    };
    CheckBoxFilter.prototype.search = function (args, query) {
        if (this.parent.dataSource && 'result' in this.parent.dataSource) {
            this.filterEvent(args, query);
        }
        else {
            this.processSearch(query);
        }
    };
    CheckBoxFilter.prototype.getPredicateFromCols = function (columns) {
        var predicates = CheckBoxFilter.getPredicate(columns);
        var predicateList = [];
        var fPredicate = {};
        var foreignColumn = this.parent.getForeignKeyColumns();
        for (var _i = 0, _a = Object.keys(predicates); _i < _a.length; _i++) {
            var prop = _a[_i];
            var col = void 0;
            if (this.parent.getColumnByField(prop).isForeignColumn()) {
                col = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getColumnByForeignKeyValue"])(prop, foreignColumn);
            }
            if (col) {
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["generateQuery"], { predicate: fPredicate, column: col });
                if (fPredicate.predicate.predicates.length) {
                    predicateList.push(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Predicate"].or(fPredicate.predicate.predicates));
                }
            }
            else {
                predicateList.push(predicates[prop]);
            }
        }
        return predicateList.length && _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Predicate"].and(predicateList);
    };
    CheckBoxFilter.prototype.getAllData = function () {
        var query = this.parent.getQuery().clone();
        query.requiresCount(); //consider take query
        this.addDistinct(query);
        var args = {
            requestType: _base_constant__WEBPACK_IMPORTED_MODULE_4__["filterChoiceRequest"], filterModel: this, query: query, filterChoiceCount: null
        };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_4__["actionBegin"], args);
        args.filterChoiceCount = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.filterChoiceCount) ? args.filterChoiceCount : 1000;
        query.take(args.filterChoiceCount);
        if (this.parent.dataSource && 'result' in this.parent.dataSource) {
            this.filterEvent(args, query);
        }
        else {
            this.processDataOperation(query, true);
        }
    };
    CheckBoxFilter.prototype.addDistinct = function (query) {
        var filteredColumn = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].distinct(this.parent.filterSettings.columns, 'field');
        if (filteredColumn.indexOf(this.options.column.field) <= -1) {
            filteredColumn = filteredColumn.concat(this.options.column.field);
        }
        query.distinct(filteredColumn);
        return query;
    };
    CheckBoxFilter.prototype.filterEvent = function (args, query) {
        var _this = this;
        var def = this.eventPromise(args, query);
        def.promise.then(function (e) {
            _this.dataSuccess(e);
        });
    };
    CheckBoxFilter.prototype.eventPromise = function (args, query) {
        var state;
        state = this.getStateEventArgument(query);
        var def = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Deferred"]();
        state.dataSource = def.resolve;
        state.action = args;
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_4__["dataStateChange"], state);
        return def;
    };
    ;
    CheckBoxFilter.prototype.getStateEventArgument = function (query) {
        var adaptr = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["UrlAdaptor"]();
        var dm = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"]({ url: '', adaptor: new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["UrlAdaptor"] });
        var state = adaptr.processQuery(dm, query);
        var data = JSON.parse(state.data);
        return data;
    };
    ;
    CheckBoxFilter.prototype.processDataOperation = function (query, isInitial) {
        var _this = this;
        this.options.dataSource = this.options.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"] ?
            this.options.dataSource : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](this.options.dataSource);
        var allPromise = [];
        var runArray = [];
        if (this.options.column.isForeignColumn() && isInitial) {
            allPromise.push(this.options.column.dataSource.executeQuery(this.foreignKeyQuery));
            runArray.push(function (data) { return _this.foreignKeyData = data; });
        }
        allPromise.push(this.options.dataSource.executeQuery(query));
        runArray.push(this.dataSuccess.bind(this));
        var i = 0;
        Promise.all(allPromise).then(function (e) {
            e.forEach(function (data) {
                runArray[i++](data.result);
            });
        });
    };
    CheckBoxFilter.prototype.dataSuccess = function (e) {
        this.fullData = e;
        var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]();
        if (this.parent.searchSettings.key.length) {
            var sSettings = this.parent.searchSettings;
            var fields = sSettings.fields.length ? sSettings.fields : this.parent.getColumns().map(function (f) { return f.field; });
            query.search(sSettings.key, fields, sSettings.operator, sSettings.ignoreCase, sSettings.ignoreAccent);
        }
        if ((this.options.filteredColumns.length)) {
            var cols = [];
            for (var i = 0; i < this.options.filteredColumns.length; i++) {
                var filterColumn = this.options.filteredColumns[i];
                filterColumn.uid = filterColumn.uid || this.parent.getColumnByField(filterColumn.field).uid;
                if (filterColumn.uid !== this.options.uid) {
                    cols.push(this.options.filteredColumns[i]);
                }
            }
            var predicate = this.getPredicateFromCols(cols);
            if (predicate) {
                query.where(predicate);
            }
        }
        // query.select(this.options.field);
        var result = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](this.fullData).executeLocal(query);
        var col = this.options.column;
        this.filteredData = CheckBoxFilter.
            getDistinct(result, this.options.field, col, this.foreignKeyData).records || [];
        this.processDataSource(null, true, this.filteredData);
        this.sInput.focus();
        var args = {
            requestType: _base_constant__WEBPACK_IMPORTED_MODULE_4__["filterAfterOpen"],
            filterModel: this, columnName: this.options.field, columnType: this.options.type
        };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_4__["actionComplete"], args);
    };
    CheckBoxFilter.prototype.processDataSource = function (query, isInitial, dataSource) {
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_6__["showSpinner"])(this.spinner);
        // query = query ? query : this.options.query.clone();
        // query.requiresCount();
        // let result: Object = new DataManager(dataSource as JSON[]).executeLocal(query);
        // let res: { result: Object[] } = result as { result: Object[] };
        this.updateResult();
        this.createFilterItems(dataSource, isInitial);
    };
    CheckBoxFilter.prototype.processSearch = function (query) {
        this.processDataOperation(query);
    };
    CheckBoxFilter.prototype.updateResult = function () {
        this.result = {};
        var predicate = this.getPredicateFromCols(this.options.filteredColumns);
        var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]();
        if (predicate) {
            query.where(predicate);
        }
        var result = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](this.fullData).executeLocal(query);
        for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {
            var res = result_1[_i];
            this.result[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.options.field, res)] = true;
        }
    };
    CheckBoxFilter.prototype.clickHandler = function (e) {
        var target = e.target;
        var elem = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-checkbox-wrapper');
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-searchbox')) {
            this.searchBoxClick(e);
        }
        if (elem) {
            var selectAll = elem.querySelector('.e-selectall');
            if (selectAll) {
                this.updateAllCBoxes(!selectAll.classList.contains('e-check'));
            }
            else {
                Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["toogleCheckbox"])(elem.parentElement);
            }
            this.updateIndeterminatenBtn();
            elem.querySelector('.e-chk-hidden').focus();
        }
    };
    CheckBoxFilter.prototype.updateAllCBoxes = function (checked) {
        var cBoxes = [].slice.call(this.cBox.querySelectorAll('.e-frame'));
        for (var _i = 0, cBoxes_1 = cBoxes; _i < cBoxes_1.length; _i++) {
            var cBox = cBoxes_1[_i];
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["removeAddCboxClasses"])(cBox, checked);
        }
    };
    CheckBoxFilter.prototype.dialogOpen = function () {
        if (this.parent.element.classList.contains('e-device')) {
            this.dialogObj.element.querySelector('.e-input-group').classList.remove('e-input-focus');
            this.dialogObj.element.querySelector('.e-btn').focus();
        }
    };
    CheckBoxFilter.prototype.createCheckbox = function (value, checked, data) {
        var elem = checked ? this.cBoxTrue.cloneNode(true) :
            this.cBoxFalse.cloneNode(true);
        var label = elem.querySelector('.e-label');
        label.innerHTML = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && value.toString().length ? value :
            this.getLocalizedLabel('Blanks');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], ['e-checkboxfiltertext']);
        if (this.options.template) {
            label.innerHTML = '';
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["appendChildren"])(label, this.options.template(data, this.parent, 'filterItemTemplate'));
        }
        return elem;
    };
    CheckBoxFilter.prototype.updateIndeterminatenBtn = function () {
        var cnt = this.cBox.children.length - 1;
        var className = [];
        var elem = this.cBox.querySelector('.e-selectall');
        var selected = this.cBox.querySelectorAll('.e-check:not(.e-selectall)').length;
        var btn = this.dialogObj.btnObj[0];
        btn.disabled = false;
        if (cnt === selected) {
            className = ['e-check'];
        }
        else if (selected) {
            className = ['e-stop'];
        }
        else {
            className = ['e-uncheck'];
            btn.disabled = true;
        }
        this.filterState = !btn.disabled;
        btn.dataBind();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([elem], ['e-check', 'e-stop', 'e-uncheck']);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([elem], className);
    };
    CheckBoxFilter.prototype.createFilterItems = function (data, isInitial) {
        var _a;
        var cBoxes = this.parent.createElement('div');
        var btn = this.dialogObj.btnObj[0];
        var nullCounter = -1;
        for (var i = 0; i < data.length; i++) {
            var val = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ejValue', data[i]);
            if (val === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(val)) {
                nullCounter = nullCounter + 1;
            }
        }
        this.itemsCnt = nullCounter !== -1 ? data.length - nullCounter : data.length;
        if (data.length && !this.renderEmpty) {
            var selectAllValue = this.getLocalizedLabel('SelectAll');
            var checkBox = this.createCheckbox(selectAllValue, false, (_a = {}, _a[this.options.field] = selectAllValue, _a));
            var selectAll = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["createCboxWithWrap"])(Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getUid"])('cbox'), checkBox, 'e-ftrchk');
            selectAll.querySelector('.e-frame').classList.add('e-selectall');
            cBoxes.appendChild(selectAll);
            var predicate = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Predicate"]('field', 'equal', this.options.field);
            if (this.options.foreignKeyValue) {
                predicate = predicate.or('field', 'equal', this.options.foreignKeyValue);
            }
            var isColFiltered = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](this.options.filteredColumns).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]().where(predicate)).length;
            var isRndere = void 0;
            for (var i = 0; i < data.length; i++) {
                var uid = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getUid"])('cbox');
                this.values[uid] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ejValue', data[i]);
                var value = this.valueFormatter.toView(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.options.field, data[i]), this.options.formatFn);
                if ((value === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value))) {
                    if (isRndere) {
                        continue;
                    }
                    isRndere = true;
                }
                var checkbox = this.createCheckbox(value, this.getCheckedState(isColFiltered, this.values[uid]), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('dataObj', data[i]));
                cBoxes.appendChild(Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["createCboxWithWrap"])(uid, checkbox, 'e-ftrchk'));
            }
            this.cBox.innerHTML = '';
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["appendChildren"])(this.cBox, [].slice.call(cBoxes.children));
            this.updateIndeterminatenBtn();
            btn.disabled = false;
        }
        else {
            cBoxes.appendChild(this.parent.createElement('span', { innerHTML: this.getLocalizedLabel('NoResult') }));
            this.cBox.innerHTML = '';
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["appendChildren"])(this.cBox, [].slice.call(cBoxes.children));
            btn.disabled = true;
        }
        this.filterState = !btn.disabled;
        btn.dataBind();
        var args = { requestType: _base_constant__WEBPACK_IMPORTED_MODULE_4__["filterChoiceRequest"], filterModel: this, dataSource: this.renderEmpty ? [] : data };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_4__["actionComplete"], args);
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_6__["hideSpinner"])(this.spinner);
    };
    CheckBoxFilter.prototype.getCheckedState = function (isColFiltered, value) {
        if (!this.isFiltered || !isColFiltered) {
            return true;
        }
        else {
            return this.result[value];
        }
    };
    CheckBoxFilter.getDistinct = function (json, field, column, foreignKeyData) {
        var len = json.length;
        var result = [];
        var value;
        var ejValue = 'ejValue';
        var lookup = {};
        var isForeignKey = column && column.isForeignColumn();
        while (len--) {
            value = json[len];
            value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(field, value); //local remote diff, check with mdu   
            if (!(value in lookup)) {
                var obj = {};
                obj[ejValue] = value;
                lookup[value] = true;
                if (isForeignKey) {
                    var foreignDataObj = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getForeignData"])(column, {}, value, foreignKeyData)[0];
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(_base_constant__WEBPACK_IMPORTED_MODULE_4__["foreignKeyData"], foreignDataObj, json[len]);
                    value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(column.foreignKeyValue, foreignDataObj);
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(field, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) ? null : value, obj);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('dataObj', json[len], obj);
                result.push(obj);
            }
        }
        return _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].group(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].sort(result, field, _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].fnAscending), 'ejValue');
    };
    CheckBoxFilter.getPredicate = function (columns) {
        var cols = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].distinct(columns, 'field', true) || [];
        var collection = [];
        var pred = {};
        for (var i = 0; i < cols.length; i++) {
            collection = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](columns).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]().where('field', 'equal', cols[i].field));
            if (collection.length !== 0) {
                pred[cols[i].field] = CheckBoxFilter.generatePredicate(collection);
            }
        }
        return pred;
    };
    CheckBoxFilter.generatePredicate = function (cols) {
        var len = cols ? cols.length : 0;
        var predicate;
        var first;
        first = CheckBoxFilter.updateDateFilter(cols[0]);
        first.ignoreAccent = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(first.ignoreAccent) ? first.ignoreAccent : false;
        if (first.type === 'date' || first.type === 'datetime') {
            predicate = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getDatePredicate"])(first, first.type);
        }
        else {
            predicate = first.ejpredicate ? first.ejpredicate :
                new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Predicate"](first.field, first.operator, first.value, !CheckBoxFilter.getCaseValue(first), first.ignoreAccent);
        }
        for (var p = 1; p < len; p++) {
            cols[p] = CheckBoxFilter.updateDateFilter(cols[p]);
            if (len > 2 && p > 1 && cols[p].predicate === 'or') {
                if (cols[p].type === 'date' || cols[p].type === 'datetime') {
                    predicate.predicates.push(Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getDatePredicate"])(cols[p], cols[p].type));
                }
                else {
                    predicate.predicates.push(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Predicate"](cols[p].field, cols[p].operator, cols[p].value, !CheckBoxFilter.getCaseValue(cols[p]), cols[p].ignoreAccent));
                }
            }
            else {
                if (cols[p].type === 'date' || cols[p].type === 'datetime') {
                    predicate = predicate[(cols[p].predicate)](Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getDatePredicate"])(cols[p]), cols[p].type, cols[p].ignoreAccent);
                }
                else {
                    predicate = cols[p].ejpredicate ?
                        predicate[cols[p].predicate](cols[p].ejpredicate) :
                        predicate[(cols[p].predicate)](cols[p].field, cols[p].operator, cols[p].value, !CheckBoxFilter.getCaseValue(cols[p]), cols[p].ignoreAccent);
                }
            }
        }
        return predicate || null;
    };
    CheckBoxFilter.getCaseValue = function (filter) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(filter.matchCase)) {
            return true;
        }
        else {
            return filter.matchCase;
        }
    };
    CheckBoxFilter.updateDateFilter = function (filter) {
        if ((filter.type === 'date' || filter.type === 'datetime' || filter.value instanceof Date)) {
            filter.type = filter.type || 'date';
        }
        return filter;
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    CheckBoxFilter.prototype.getModuleName = function () {
        return 'checkboxFilter';
    };
    return CheckBoxFilter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/clipboard.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/clipboard.js ***!
  \**************************************************************************/
/*! exports provided: Clipboard */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Clipboard", function() { return Clipboard; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");



/**
 * The `Clipboard` module is used to handle clipboard copy action.
 */
var Clipboard = /** @class */ (function () {
    /**
     * Constructor for the Grid clipboard module
     * @hidden
     */
    function Clipboard(parent) {
        this.copyContent = '';
        this.isSelect = false;
        this.parent = parent;
        this.addEventListener();
    }
    /**
     * @hidden
     */
    Clipboard.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.initialEnd, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["keyPressed"], this.keyDownHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.clickHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.element, 'keydown', this.pasteHandler, this);
    };
    /**
     * @hidden
     */
    Clipboard.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["keyPressed"], this.keyDownHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.clickHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.element, 'keydown', this.pasteHandler);
    };
    Clipboard.prototype.clickHandler = function (e) {
        var target = e.target;
        target = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-rowcell');
    };
    Clipboard.prototype.pasteHandler = function (e) {
        var _this = this;
        if (e.keyCode === 86 && e.ctrlKey && !this.parent.isEdit) {
            var target_1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(document.activeElement, '.e-rowcell');
            if (!target_1) {
                return;
            }
            this.activeElement = document.activeElement;
            this.clipBoardTextArea.value = '';
            var x_1 = window.scrollX;
            var y_1 = window.scrollY;
            this.clipBoardTextArea.focus();
            setTimeout(function () {
                _this.activeElement.focus();
                window.scrollTo(x_1, y_1);
                _this.paste(_this.clipBoardTextArea.value, parseInt(target_1.parentElement.getAttribute('aria-rowindex'), 10), parseInt(target_1.getAttribute('aria-colindex'), 10));
            }, 10);
        }
    };
    /**
     * Paste data from clipboard to selected cells.
     * @param {boolean} data - Specifies the date for paste.
     * @param {boolean} rowIndex - Specifies the row index.
     * @param {boolean} colIndex - Specifies the column index.
     */
    Clipboard.prototype.paste = function (data, rowIndex, colIndex) {
        var grid = this.parent;
        var cIdx = colIndex;
        var rIdx = rowIndex;
        var col;
        var value;
        var isAvail;
        if (!grid.editSettings.allowEditing || grid.editSettings.mode !== 'Batch' ||
            grid.selectionSettings.mode !== 'Cell' || grid.selectionSettings.cellSelectionMode === 'Flow') {
            return;
        }
        var rows = data.split('\n');
        var cols;
        var dataRows = grid.getDataRows();
        var mRows;
        var isFrozen = this.parent.getFrozenColumns();
        if (isFrozen) {
            mRows = grid.getMovableDataRows();
        }
        for (var r = 0; r < rows.length; r++) {
            cols = rows[r].split('\t');
            cIdx = colIndex;
            if ((r === rows.length - 1 && rows[r] === '') || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(grid.getRowByIndex(rIdx))) {
                cIdx++;
                break;
            }
            for (var c = 0; c < cols.length; c++) {
                isAvail = grid.getCellFromIndex(rIdx, cIdx);
                if (isFrozen) {
                    var fTr = dataRows[rIdx];
                    var mTr = mRows[rIdx];
                    isAvail = !fTr.querySelector('[aria-colindex="' + cIdx + '"]') ?
                        mTr.querySelector('[aria-colindex="' + cIdx + '"]') : true;
                }
                if (!isAvail) {
                    cIdx++;
                    break;
                }
                col = grid.getColumnByIndex(cIdx);
                value = col.getParser() ? col.getParser()(cols[c]) : cols[c];
                if (col.allowEditing && !col.isPrimaryKey && !col.template) {
                    var args = {
                        column: col,
                        data: value,
                    };
                    this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["beforePaste"], args);
                    if (grid.editModule) {
                        if (col.type === 'number') {
                            this.parent.editModule.updateCell(rIdx, col.field, parseInt(args.data, 10));
                        }
                        else {
                            grid.editModule.updateCell(rIdx, col.field, args.data);
                        }
                    }
                }
                cIdx++;
            }
            rIdx++;
        }
        grid.selectionModule.selectCellsByRange({ rowIndex: rowIndex, cellIndex: colIndex }, { rowIndex: rIdx - 1, cellIndex: cIdx - 1 });
        var cell = this.parent.getCellFromIndex(rIdx - 1, cIdx - 1);
        if (cell) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cell, ['e-focus', 'e-focused'], []);
        }
    };
    Clipboard.prototype.initialEnd = function () {
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.initialEnd);
        this.clipBoardTextArea = this.parent.createElement('textarea', {
            className: 'e-clipboard',
            styles: 'opacity: 0',
            attrs: { tabindex: '-1', 'aria-label': 'clipboard' }
        });
        this.parent.element.appendChild(this.clipBoardTextArea);
    };
    Clipboard.prototype.keyDownHandler = function (e) {
        if (e.action === 'ctrlPlusC') {
            this.copy();
        }
        else if (e.action === 'ctrlShiftPlusH') {
            this.copy(true);
        }
    };
    Clipboard.prototype.setCopyData = function (withHeader) {
        if (window.getSelection().toString() === '') {
            var isFrozen = this.parent.getFrozenColumns();
            this.clipBoardTextArea.value = this.copyContent = '';
            var mRows = void 0;
            var rows = this.parent.getRows();
            if (isFrozen) {
                mRows = this.parent.getMovableDataRows();
            }
            if (this.parent.selectionSettings.mode !== 'Cell') {
                var selectedIndexes = this.parent.getSelectedRowIndexes().sort(function (a, b) { return a - b; });
                if (withHeader) {
                    var headerTextArray = [];
                    for (var i = 0; i < this.parent.getVisibleColumns().length; i++) {
                        headerTextArray[i] = this.parent.getVisibleColumns()[i].headerText;
                    }
                    this.getCopyData(headerTextArray, false, '\t', withHeader);
                    this.copyContent += '\n';
                }
                for (var i = 0; i < selectedIndexes.length; i++) {
                    if (i > 0) {
                        this.copyContent += '\n';
                    }
                    var cells = [].slice.call(rows[selectedIndexes[i]].querySelectorAll('.e-rowcell'));
                    if (isFrozen) {
                        cells.push.apply(cells, [].slice.call(mRows[selectedIndexes[i]].querySelectorAll('.e-rowcell')));
                    }
                    this.getCopyData(cells, false, '\t', withHeader);
                }
            }
            else {
                var obj = this.checkBoxSelection();
                if (obj.status) {
                    if (withHeader) {
                        var headers = [];
                        for (var i = 0; i < obj.colIndexes.length; i++) {
                            headers.push(this.parent.getColumnHeaderByIndex(obj.colIndexes[i]));
                        }
                        this.getCopyData(headers, false, '\t', withHeader);
                        this.copyContent += '\n';
                    }
                    for (var i = 0; i < obj.rowIndexes.length; i++) {
                        if (i > 0) {
                            this.copyContent += '\n';
                        }
                        var cells = [].slice.call(rows[obj.rowIndexes[i]].
                            querySelectorAll('.e-cellselectionbackground'));
                        if (isFrozen) {
                            cells.push.apply(cells, [].slice.call(mRows[obj.rowIndexes[i]].querySelectorAll('.e-cellselectionbackground')));
                        }
                        this.getCopyData(cells, false, '\t', withHeader);
                    }
                }
                else {
                    this.getCopyData([].slice.call(this.parent.element.querySelectorAll('.e-cellselectionbackground')), true, '\n', withHeader);
                }
            }
            var args = {
                data: this.copyContent,
                cancel: false,
            };
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["beforeCopy"], args);
            if (args.cancel) {
                return;
            }
            this.clipBoardTextArea.value = this.copyContent = args.data;
            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].userAgent.match(/ipad|ipod|iphone/i)) {
                this.clipBoardTextArea.select();
            }
            else {
                this.clipBoardTextArea.setSelectionRange(0, this.clipBoardTextArea.value.length);
            }
            this.isSelect = true;
        }
    };
    Clipboard.prototype.getCopyData = function (cells, isCell, splitKey, withHeader) {
        var isElement = typeof cells[0] !== 'string';
        for (var j = 0; j < cells.length; j++) {
            if (withHeader && isCell) {
                this.copyContent += this.parent.getColumns()[parseInt(cells[j].getAttribute('aria-colindex'), 10)].headerText + '\n';
            }
            if (isElement) {
                if (!cells[j].classList.contains('e-hide')) {
                    this.copyContent += cells[j].textContent;
                }
            }
            else {
                this.copyContent += cells[j];
            }
            if (j < cells.length - 1) {
                this.copyContent += splitKey;
            }
        }
    };
    /**
     * Copy selected rows or cells data into clipboard.
     * @param {boolean} withHeader - Specifies whether the column header data need to be copied or not.
     */
    Clipboard.prototype.copy = function (withHeader) {
        if (document.queryCommandSupported('copy')) {
            this.setCopyData(withHeader);
            document.execCommand('copy');
            this.clipBoardTextArea.blur();
        }
        if (this.isSelect) {
            window.getSelection().removeAllRanges();
            this.isSelect = false;
        }
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Clipboard.prototype.getModuleName = function () {
        return 'clipboard';
    };
    /**
     * To destroy the clipboard
     * @return {void}
     * @hidden
     */
    Clipboard.prototype.destroy = function () {
        this.removeEventListener();
        if (this.clipBoardTextArea) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.clipBoardTextArea);
        }
    };
    Clipboard.prototype.checkBoxSelection = function () {
        var gridObj = this.parent;
        var obj = { status: false };
        if (gridObj.selectionSettings.mode === 'Cell') {
            var rowCellIndxes = gridObj.getSelectedRowCellIndexes();
            var str = void 0;
            var isBox = void 0;
            var rowIndexes = [];
            var i = void 0;
            for (i = 0; i < rowCellIndxes.length; i++) {
                if (rowCellIndxes[i].cellIndexes.length) {
                    rowIndexes.push(rowCellIndxes[i].rowIndex);
                }
                if (rowCellIndxes[i].cellIndexes.length) {
                    if (!str) {
                        str = JSON.stringify(rowCellIndxes[i].cellIndexes.sort());
                    }
                    if (str !== JSON.stringify(rowCellIndxes[i].cellIndexes.sort())) {
                        break;
                    }
                }
            }
            rowIndexes.sort(function (a, b) { return a - b; });
            if (i === rowCellIndxes.length && rowIndexes[rowIndexes.length - 1] - rowIndexes[0] === rowIndexes.length - 1) {
                obj = { status: true, rowIndexes: rowIndexes, colIndexes: rowCellIndxes[0].cellIndexes };
            }
        }
        return obj;
    };
    return Clipboard;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/column-chooser.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/column-chooser.js ***!
  \*******************************************************************************/
/*! exports provided: ColumnChooser */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnChooser", function() { return ColumnChooser; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _services_focus_strategy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../services/focus-strategy */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/focus-strategy.js");








/**
 * The `ColumnChooser` module is used to show or hide columns dynamically.
 */
var ColumnChooser = /** @class */ (function () {
    /**
     * Constructor for the Grid ColumnChooser module
     * @hidden
     */
    function ColumnChooser(parent, serviceLocator) {
        this.showColumn = [];
        this.hideColumn = [];
        this.isDlgOpen = false;
        this.dlghide = false;
        this.initialOpenDlg = true;
        this.stateChangeColumns = [];
        this.isInitialOpen = false;
        this.isCustomizeOpenCC = false;
        this.searchOperator = 'startswith';
        this.prevShowedCols = [];
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        this.addEventListener();
        this.cBoxTrue = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_5__["createCheckBox"])(this.parent.createElement, true, { checked: true, label: ' ' });
        this.cBoxFalse = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_5__["createCheckBox"])(this.parent.createElement, true, { checked: false, label: ' ' });
        this.cBoxTrue.insertBefore(this.parent.createElement('input', {
            className: 'e-chk-hidden e-cc e-cc-chbox', attrs: { type: 'checkbox' }
        }), this.cBoxTrue.firstChild);
        this.cBoxFalse.insertBefore(this.parent.createElement('input', {
            className: 'e-chk-hidden e-cc e-cc-chbox', attrs: { 'type': 'checkbox' }
        }), this.cBoxFalse.firstChild);
        this.cBoxFalse.querySelector('.e-frame').classList.add('e-uncheck');
        if (this.parent.enableRtl) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.cBoxTrue, this.cBoxFalse], ['e-rtl']);
        }
    }
    ColumnChooser.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        this.removeEventListener();
        this.unWireEvents();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dlgObj) && this.dlgObj.element && !this.dlgObj.isDestroyed) {
            this.dlgObj.destroy();
        }
    };
    ColumnChooser.prototype.rtlUpdate = function () {
        if (this.parent.enableRtl) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(this.innerDiv.querySelectorAll('.e-checkbox-wrapper'), ['e-rtl']);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.innerDiv.querySelectorAll('.e-checkbox-wrapper'), ['e-rtl']);
        }
    };
    /**
     * @hidden
     */
    ColumnChooser.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'click', this.clickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRenderEle, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.render, this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataBound"], this.hideDialog.bind(this));
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["destroy"], this.destroy, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rtlUpdated"], this.rtlUpdate, this);
    };
    /**
     * @hidden
     */
    ColumnChooser.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'click', this.clickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.render);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["destroy"], this.destroy);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRenderEle);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rtlUpdated"], this.rtlUpdate);
    };
    ColumnChooser.prototype.render = function () {
        this.l10n = this.serviceLocator.getService('localization');
        this.renderDlgContent();
        this.getShowHideService = this.serviceLocator.getService('showHideService');
    };
    ColumnChooser.prototype.clickHandler = function (e) {
        var targetElement = e.target;
        if (!this.isCustomizeOpenCC) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(targetElement, '.e-cc')) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(targetElement, '.e-cc-toolbar'))) {
                if (targetElement.classList.contains('e-columnchooser-btn') || targetElement.classList.contains('e-cc-toolbar')) {
                    if ((this.initialOpenDlg && this.dlgObj.visible) || !this.isDlgOpen) {
                        this.isDlgOpen = true;
                        return;
                    }
                }
                else if (targetElement.classList.contains('e-cc-cancel')) {
                    targetElement.parentElement.querySelector('.e-ccsearch').value = '';
                    this.columnChooserSearch('');
                    this.removeCancelIcon();
                    this.refreshCheckboxButton();
                }
            }
            else {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dlgObj) && this.dlgObj.visible && !targetElement.classList.contains('e-toolbar-items')) {
                    this.dlgObj.hide();
                    this.clearActions();
                    this.refreshCheckboxState();
                    // this.unWireEvents();
                    this.isDlgOpen = false;
                }
            }
            if (this.parent.detailTemplate || this.parent.childGrid) {
                this.targetdlg = e.target;
            }
        }
        if (this.isCustomizeOpenCC && e.target.classList.contains('e-cc-cancel')) {
            this.refreshCheckboxState();
        }
        this.rtlUpdate();
    };
    ColumnChooser.prototype.hideDialog = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dlgObj) && this.dlgObj.visible) {
            this.dlgObj.hide();
            // this.unWireEvents();
            this.isDlgOpen = false;
        }
    };
    /**
     * To render columnChooser when showColumnChooser enabled.
     * @return {void}
     * @hidden
     */
    ColumnChooser.prototype.renderColumnChooser = function (x, y, target) {
        if (!this.dlgObj.visible && (this.parent.detailTemplate || this.parent.childGrid)) {
            this.hideOpenedDialog();
        }
        if (!this.dlgObj.visible) {
            var pos = { X: null, Y: null };
            var args1 = {
                requestType: 'beforeOpenColumnChooser', element: this.parent.element,
                columns: this.getColumns(), cancel: false, searchOperator: this.searchOperator
            };
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["beforeOpenColumnChooser"], args1);
            if (args1.cancel) {
                return;
            }
            this.searchOperator = args1.searchOperator;
            if (target) {
                this.targetdlg = target;
            }
            this.refreshCheckboxState();
            this.dlgObj.dataBind();
            this.dlgObj.element.style.maxHeight = '430px';
            var elementVisible = this.dlgObj.element.style.display;
            this.dlgObj.element.style.display = 'block';
            var newpos = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["calculateRelativeBasedPosition"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-toolbar-item'), this.dlgObj.element);
            this.dlgObj.element.style.display = elementVisible;
            this.dlgObj.element.style.top = newpos.top + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-cc-toolbar').getBoundingClientRect().height + 'px';
            var dlgWidth = 250;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-bigger'))) {
                this.dlgObj.width = 258;
            }
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                this.dlgObj.target = document.body;
                this.dlgObj.position = { X: 'center', Y: 'center' };
                this.dlgObj.refreshPosition();
                this.dlgObj.open = this.mOpenDlg.bind(this);
            }
            else {
                if (this.parent.enableRtl) {
                    this.dlgObj.element.style.left = target.offsetLeft + 'px';
                }
                else {
                    this.dlgObj.element.style.left = ((newpos.left - dlgWidth) + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-cc-toolbar').clientWidth) + 2 + 'px';
                }
            }
            this.removeCancelIcon();
            this.dlgObj.show();
        }
        else {
            // this.unWireEvents();
            this.hideDialog();
            this.addcancelIcon();
        }
        this.rtlUpdate();
    };
    /**
     * Column chooser can be displayed on screen by given position(X and Y axis).
     * @param  {number} X - Defines the X axis.
     * @param  {number} Y - Defines the Y axis.
     * @return {void}
     */
    ColumnChooser.prototype.openColumnChooser = function (X, Y) {
        this.isCustomizeOpenCC = true;
        if (this.dlgObj.visible) {
            this.hideDialog();
            return;
        }
        if (!this.isInitialOpen) {
            this.dlgObj.content = this.renderChooserList();
        }
        else {
            this.refreshCheckboxState();
        }
        this.dlgObj.dataBind();
        this.dlgObj.position = { X: 'center', Y: 'center' };
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(X)) {
            this.dlgObj.position = { X: 'center', Y: 'center' };
            this.dlgObj.refreshPosition();
        }
        else {
            this.dlgObj.element.style.top = '';
            this.dlgObj.element.style.left = '';
            this.dlgObj.element.style.top = Y + 'px';
            this.dlgObj.element.style.left = X + 'px';
        }
        this.dlgObj.beforeOpen = this.customDialogOpen.bind(this);
        this.dlgObj.show();
        this.isInitialOpen = true;
        this.dlgObj.beforeClose = this.customDialogClose.bind(this);
    };
    ColumnChooser.prototype.enableAfterRenderEle = function (e) {
        if (e.module === this.getModuleName() && e.enable) {
            this.render();
        }
    };
    ColumnChooser.prototype.customDialogOpen = function () {
        var searchElement = this.dlgObj.content.querySelector('input.e-ccsearch');
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(searchElement, 'keyup', this.columnChooserManualSearch, this);
    };
    ColumnChooser.prototype.customDialogClose = function () {
        var searchElement = this.dlgObj.content.querySelector('input.e-ccsearch');
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(searchElement, 'keyup', this.columnChooserManualSearch);
    };
    ColumnChooser.prototype.getColumns = function () {
        var columns = this.parent.getColumns().filter(function (column) { return (column.type !== 'checkbox'
            && column.showInColumnChooser === true) || (column.type === 'checkbox' && column.field !== undefined); });
        return columns;
    };
    ColumnChooser.prototype.renderDlgContent = function () {
        var y;
        this.dlgDiv = this.parent.createElement('div', { className: 'e-ccdlg e-cc', id: this.parent.element.id + '_ccdlg' });
        this.parent.element.appendChild(this.dlgDiv);
        var xpos = this.parent.element.getBoundingClientRect().width - 250;
        var dialoPos = this.parent.enableRtl ? 'left' : 'right';
        var tarElement = this.parent.element.querySelector('.e-ccdiv');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tarElement)) {
            y = tarElement.getBoundingClientRect().top;
        }
        var pos = { X: null, Y: null };
        this.dlgObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["Dialog"]({
            header: this.l10n.getConstant('ChooseColumns'),
            showCloseIcon: false,
            closeOnEscape: false,
            locale: this.parent.locale,
            visible: false,
            enableRtl: this.parent.enableRtl,
            target: document.getElementById(this.parent.element.id),
            buttons: [{
                    click: this.confirmDlgBtnClick.bind(this),
                    buttonModel: {
                        content: this.l10n.getConstant('OKButton'), isPrimary: true,
                        cssClass: 'e-cc e-cc_okbtn',
                    }
                },
                {
                    click: this.clearActions.bind(this),
                    buttonModel: { cssClass: 'e-flat e-cc e-cc-cnbtn', content: this.l10n.getConstant('CancelButton') }
                }],
            content: this.renderChooserList(),
            width: 250,
            cssClass: 'e-cc',
            animationSettings: { effect: 'None' },
        });
        var isStringTemplate = 'isStringTemplate';
        this.dlgObj[isStringTemplate] = true;
        this.dlgObj.appendTo(this.dlgDiv);
        this.wireEvents();
    };
    ColumnChooser.prototype.renderChooserList = function () {
        this.mainDiv = this.parent.createElement('div', { className: 'e-main-div e-cc' });
        var searchDiv = this.parent.createElement('div', { className: 'e-cc-searchdiv e-cc e-input-group' });
        var ccsearchele = this.parent.createElement('input', {
            className: 'e-ccsearch e-cc e-input',
            attrs: { placeholder: this.l10n.getConstant('Search') }
        });
        var ccsearchicon = this.parent.createElement('span', {
            className: 'e-ccsearch-icon e-icons e-cc e-input-group-icon',
            attrs: { title: this.l10n.getConstant('Search') }
        });
        var conDiv = this.parent.createElement('div', { className: 'e-cc-contentdiv' });
        this.innerDiv = this.parent.createElement('div', { className: 'e-innerdiv e-cc' });
        searchDiv.appendChild(ccsearchele);
        searchDiv.appendChild(ccsearchicon);
        this.searchBoxObj = new _services_focus_strategy__WEBPACK_IMPORTED_MODULE_6__["SearchBox"](ccsearchele);
        var innerDivContent = this.refreshCheckboxList(this.parent.getColumns());
        this.innerDiv.appendChild(innerDivContent);
        conDiv.appendChild(this.innerDiv);
        this.mainDiv.appendChild(searchDiv);
        this.mainDiv.appendChild(conDiv);
        return this.mainDiv;
    };
    ColumnChooser.prototype.confirmDlgBtnClick = function (args) {
        this.stateChangeColumns = [];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args)) {
            if (this.hideColumn.length) {
                this.columnStateChange(this.hideColumn, false);
            }
            if (this.showColumn.length) {
                this.columnStateChange(this.showColumn, true);
            }
            var params = {
                requestType: 'columnstate', element: this.parent.element,
                columns: this.stateChangeColumns, dialogInstance: this.dlgObj
            };
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], params);
            this.getShowHideService.setVisible(this.stateChangeColumns);
            this.clearActions();
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["tooltipDestroy"], { module: 'edit' });
        }
    };
    ColumnChooser.prototype.columnStateChange = function (stateColumns, state) {
        for (var index = 0; index < stateColumns.length; index++) {
            var colUid = stateColumns[index];
            var currentCol = this.parent.getColumnByUid(colUid);
            currentCol.visible = state;
            this.stateChangeColumns.push(currentCol);
        }
    };
    ColumnChooser.prototype.clearActions = function () {
        this.hideColumn = [];
        this.showColumn = [];
        // this.unWireEvents();
        this.hideDialog();
        this.addcancelIcon();
    };
    ColumnChooser.prototype.checkstatecolumn = function (isChecked, coluid) {
        if (isChecked) {
            if (this.hideColumn.indexOf(coluid) !== -1) {
                this.hideColumn.splice(this.hideColumn.indexOf(coluid), 1);
            }
            if (this.showColumn.indexOf(coluid) === -1) {
                this.showColumn.push(coluid);
            }
        }
        else {
            if (this.showColumn.indexOf(coluid) !== -1) {
                this.showColumn.splice(this.showColumn.indexOf(coluid), 1);
            }
            if (this.hideColumn.indexOf(coluid) === -1) {
                this.hideColumn.push(coluid);
            }
        }
    };
    ColumnChooser.prototype.columnChooserSearch = function (searchVal) {
        var clearSearch = false;
        var fltrCol;
        var okButton;
        var buttonEle = this.dlgDiv.querySelector('.e-footer-content');
        this.isInitialOpen = true;
        if (buttonEle) {
            okButton = buttonEle.querySelector('.e-btn').ej2_instances[0];
        }
        if (searchVal === '') {
            this.removeCancelIcon();
            fltrCol = this.getColumns();
            clearSearch = true;
        }
        else {
            fltrCol = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](this.getColumns()).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]()
                .where('headerText', this.searchOperator, searchVal, true));
        }
        if (fltrCol.length) {
            this.innerDiv.innerHTML = ' ';
            this.innerDiv.classList.remove('e-ccnmdiv');
            this.innerDiv.appendChild(this.refreshCheckboxList(fltrCol, searchVal));
            if (!clearSearch) {
                this.addcancelIcon();
                this.refreshCheckboxButton();
            }
            else {
                if (okButton) {
                    okButton.disabled = false;
                }
            }
        }
        else {
            var nMatchele = this.parent.createElement('span', { className: 'e-cc e-nmatch' });
            nMatchele.innerHTML = this.l10n.getConstant('Matchs');
            this.innerDiv.innerHTML = ' ';
            this.innerDiv.appendChild(nMatchele);
            this.innerDiv.classList.add('e-ccnmdiv');
            if (okButton) {
                okButton.disabled = true;
            }
        }
        this.flag = true;
        this.stopTimer();
    };
    ColumnChooser.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dlgObj.element, 'click', this.checkBoxClickHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.searchBoxObj.searchBox, 'keyup', this.columnChooserManualSearch, this);
        this.searchBoxObj.wireEvent();
    };
    ColumnChooser.prototype.unWireEvents = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        if (this.dlgObj.element) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.dlgObj.element, 'click', this.checkBoxClickHandler);
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.searchBoxObj.searchBox, 'keyup', this.columnChooserManualSearch);
        this.searchBoxObj.unWireEvent();
    };
    ColumnChooser.prototype.checkBoxClickHandler = function (e) {
        var _this = this;
        var checkstate;
        var elem = Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["parentsUntil"])(e.target, 'e-checkbox-wrapper');
        if (elem) {
            var selectAll = elem.querySelector('.e-selectall');
            if (selectAll) {
                this.updateSelectAll(!elem.querySelector('.e-check'));
            }
            else {
                Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["toogleCheckbox"])(elem.parentElement);
            }
            elem.querySelector('.e-chk-hidden').focus();
            if (elem.querySelector('.e-check')) {
                checkstate = true;
            }
            else if (elem.querySelector('.e-uncheck')) {
                checkstate = false;
            }
            else {
                return;
            }
            this.updateIntermediateBtn();
            var columnUid = Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["parentsUntil"])(elem, 'e-ccheck').getAttribute('uid');
            var column = this.parent.getColumns();
            if (columnUid === 'grid-selectAll') {
                column.forEach(function (col) {
                    if (col.showInColumnChooser) {
                        _this.checkstatecolumn(checkstate, col.uid);
                    }
                });
            }
            else {
                this.checkstatecolumn(checkstate, columnUid);
            }
            this.refreshCheckboxButton();
        }
    };
    ColumnChooser.prototype.updateIntermediateBtn = function () {
        var cnt = this.ulElement.children.length - 1;
        var className = [];
        var elem = this.ulElement.children[0].querySelector('.e-frame');
        var selected = this.ulElement.querySelectorAll('.e-check:not(.e-selectall)').length;
        var btn = this.dlgObj.btnObj[0];
        btn.disabled = false;
        if (cnt === selected) {
            className = ['e-check'];
        }
        else if (selected) {
            className = ['e-stop'];
        }
        else {
            className = ['e-uncheck'];
            btn.disabled = true;
        }
        btn.dataBind();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([elem], ['e-check', 'e-stop', 'e-uncheck']);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([elem], className);
    };
    ColumnChooser.prototype.updateSelectAll = function (checked) {
        var cBoxes = [].slice.call(this.ulElement.querySelectorAll('.e-frame'));
        for (var _i = 0, cBoxes_1 = cBoxes; _i < cBoxes_1.length; _i++) {
            var cBox = cBoxes_1[_i];
            Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["removeAddCboxClasses"])(cBox, checked);
        }
    };
    ColumnChooser.prototype.refreshCheckboxButton = function () {
        var searchValue = this.dlgObj.element.querySelector('.e-cc.e-input').value;
        var visibleCols = this.parent.getVisibleColumns();
        for (var i = 0; i < visibleCols.length; i++) {
            var columnUID = visibleCols[i].uid;
            if (this.prevShowedCols.indexOf(columnUID) === -1) {
                this.prevShowedCols.push(columnUID);
            }
        }
        var selected;
        for (var i = 0; i < this.hideColumn.length; i++) {
            var index = this.prevShowedCols.indexOf(this.hideColumn[i]);
            if (index !== -1) {
                this.prevShowedCols.splice(index, 1);
            }
        }
        selected = this.showColumn.length !== 0 ? 1 : this.prevShowedCols.length;
        var btn = this.dlgDiv.querySelector('.e-footer-content').querySelector('.e-btn').ej2_instances[0];
        btn.disabled = false;
        var srchShowCols = [];
        var searchData = this.parent.element.querySelectorAll('.e-cc-chbox');
        for (var i = 0, itemsLen = searchData.length; i < itemsLen; i++) {
            var element = searchData[i];
            var columnUID = Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["parentsUntil"])(element, 'e-ccheck').getAttribute('uid');
            srchShowCols.push(columnUID);
        }
        var hideCols = this.showColumn.filter(function (column) { return srchShowCols.indexOf(column) !== -1; });
        if (selected === 0 && hideCols.length === 0) {
            btn.disabled = true;
        }
        btn.dataBind();
    };
    ColumnChooser.prototype.refreshCheckboxList = function (gdCol, searchVal) {
        this.ulElement = this.parent.createElement('ul', { className: 'e-ccul-ele e-cc' });
        var selectAllValue = this.l10n.getConstant('SelectAll');
        var cclist = this.parent.createElement('li', { className: 'e-cclist e-cc e-cc-selectall' });
        var selectAll = this.createCheckBox(selectAllValue, false, 'grid-selectAll');
        if (gdCol.length) {
            selectAll.querySelector('.e-checkbox-wrapper').firstElementChild.classList.add('e-selectall');
            selectAll.querySelector('.e-frame').classList.add('e-selectall');
            this.checkState(selectAll.querySelector('.e-icons'), true);
            cclist.appendChild(selectAll);
            this.ulElement.appendChild(cclist);
        }
        for (var i = 0; i < gdCol.length; i++) {
            var columns = gdCol[i];
            this.renderCheckbox(columns);
        }
        return this.ulElement;
    };
    ColumnChooser.prototype.refreshCheckboxState = function () {
        this.dlgObj.element.querySelector('.e-cc.e-input').value = '';
        this.columnChooserSearch('');
        var gridObject = this.parent;
        var currentCheckBoxColls = this.dlgObj.element.querySelectorAll('.e-cc-chbox:not(.e-selectall)');
        for (var i = 0, itemLen = currentCheckBoxColls.length; i < itemLen; i++) {
            var element = currentCheckBoxColls[i];
            var columnUID = void 0;
            if (this.parent.childGrid || this.parent.detailTemplate) {
                columnUID = Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["parentsUntil"])(this.dlgObj.element.querySelectorAll('.e-cc-chbox:not(.e-selectall)')[i], 'e-ccheck').getAttribute('uid');
            }
            else {
                columnUID = Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["parentsUntil"])(element, 'e-ccheck').getAttribute('uid');
            }
            var column = gridObject.getColumnByUid(columnUID);
            if (column.visible) {
                element.checked = true;
                this.checkState(element.parentElement.querySelector('.e-icons'), true);
            }
            else {
                element.checked = false;
                this.checkState(element.parentElement.querySelector('.e-icons'), false);
            }
        }
    };
    ColumnChooser.prototype.checkState = function (element, state) {
        state ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(element, ['e-check'], ['e-uncheck']) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(element, ['e-uncheck'], ['e-check']);
    };
    ColumnChooser.prototype.createCheckBox = function (label, checked, uid) {
        var cbox = checked ? this.cBoxTrue.cloneNode(true) : this.cBoxFalse.cloneNode(true);
        cbox.querySelector('.e-label').innerHTML = label;
        return Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["createCboxWithWrap"])(uid, cbox, 'e-ccheck');
    };
    ColumnChooser.prototype.renderCheckbox = function (column) {
        var cclist;
        var hideColState;
        var showColState;
        var checkBoxObj;
        if (column.showInColumnChooser) {
            cclist = this.parent.createElement('li', { className: 'e-cclist e-cc', styles: 'list-style:None', id: 'e-ccli_' + column.uid });
            hideColState = this.hideColumn.indexOf(column.uid) === -1 ? false : true;
            showColState = this.showColumn.indexOf(column.uid) === -1 ? false : true;
            var cccheckboxlist = this.createCheckBox(column.headerText, (column.visible && !hideColState) || showColState, column.uid);
            cclist.appendChild(cccheckboxlist);
            this.ulElement.appendChild(cclist);
        }
        if (this.isInitialOpen) {
            this.updateIntermediateBtn();
        }
    };
    ColumnChooser.prototype.columnChooserManualSearch = function (e) {
        this.addcancelIcon();
        this.searchValue = e.target.value;
        var proxy = this;
        this.stopTimer();
        this.startTimer(e);
    };
    ColumnChooser.prototype.startTimer = function (e) {
        var proxy = this;
        var interval = !proxy.flag && e.keyCode !== 13 ? 500 : 0;
        this.timer = window.setInterval(function () { proxy.columnChooserSearch(proxy.searchValue); }, interval);
    };
    ColumnChooser.prototype.stopTimer = function () {
        window.clearInterval(this.timer);
    };
    ColumnChooser.prototype.addcancelIcon = function () {
        this.dlgDiv.querySelector('.e-cc.e-ccsearch-icon').classList.add('e-cc-cancel');
    };
    ColumnChooser.prototype.removeCancelIcon = function () {
        this.dlgDiv.querySelector('.e-cc.e-ccsearch-icon').classList.remove('e-cc-cancel');
    };
    ColumnChooser.prototype.mOpenDlg = function () {
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.dlgObj.element.querySelector('.e-cc-searchdiv').classList.remove('e-input-focus');
            this.dlgObj.element.querySelectorAll('.e-cc-chbox')[0].focus();
        }
    };
    // internally use
    ColumnChooser.prototype.getModuleName = function () {
        return 'columnChooser';
    };
    ColumnChooser.prototype.hideOpenedDialog = function () {
        var openCC = [].slice.call(document.getElementsByClassName('e-ccdlg')).filter(function (dlgEle) {
            return dlgEle.classList.contains('e-popup-open');
        });
        for (var i = 0, dlgLen = openCC.length; i < dlgLen; i++) {
            if (openCC[i].classList.contains('e-dialog') || this.parent.element.id + '_ccdlg' !== openCC[i].id) {
                openCC[i].ej2_instances[0].hide();
            }
        }
    };
    return ColumnChooser;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/column-menu.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/column-menu.js ***!
  \****************************************************************************/
/*! exports provided: ColumnMenu */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnMenu", function() { return ColumnMenu; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-navigations */ "./node_modules/@syncfusion/ej2-navigations/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _actions_group__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../actions/group */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/group.js");
/* harmony import */ var _actions_sort__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../actions/sort */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/sort.js");
/* harmony import */ var _actions_filter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../actions/filter */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/filter.js");
/* harmony import */ var _actions_resize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../actions/resize */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/resize.js");











/**
 * 'column menu module used to handle column menu actions'
 * @hidden
 */
var ColumnMenu = /** @class */ (function () {
    function ColumnMenu(parent, serviceLocator) {
        this.defaultItems = {};
        this.localeText = this.setLocaleKey();
        this.disableItems = [];
        this.hiddenItems = [];
        this.isOpen = false;
        // default class names
        this.GROUP = 'e-icon-group';
        this.UNGROUP = 'e-icon-ungroup';
        this.ASCENDING = 'e-icon-ascending';
        this.DESCENDING = 'e-icon-descending';
        this.ROOT = 'e-columnmenu';
        this.FILTER = 'e-icon-filter';
        this.POP = 'e-filter-popup';
        this.WRAP = 'e-col-menu';
        this.CHOOSER = '_chooser_';
        this.parent = parent;
        this.gridID = parent.element.id;
        this.serviceLocator = serviceLocator;
        this.addEventListener();
    }
    ColumnMenu.prototype.wireEvents = function () {
        var _this = this;
        this.getColumnMenuHandlers().forEach(function (ele) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(ele, 'mousedown', _this.columnMenuHandlerDown, _this);
        });
    };
    ColumnMenu.prototype.unwireEvents = function () {
        var _this = this;
        this.getColumnMenuHandlers().forEach(function (ele) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(ele, 'mousedown', _this.columnMenuHandlerDown);
        });
    };
    /**
     * To destroy the resize
     * @return {void}
     * @hidden
     */
    ColumnMenu.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        this.columnMenu.destroy();
        this.removeEventListener();
        this.unwireFilterEvents();
        this.unwireEvents();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
    };
    ColumnMenu.prototype.columnMenuHandlerClick = function (e) {
        if (e.target.classList.contains('e-columnmenu')) {
            if ((this.isOpen && this.headerCell !== this.getHeaderCell(e)) || document.querySelector('.e-grid-menu .e-menu-parent.e-ul')) {
                this.columnMenu.close();
                this.openColumnMenu(e);
            }
            else if (!this.isOpen) {
                this.openColumnMenu(e);
            }
            else {
                this.columnMenu.close();
            }
        }
    };
    ColumnMenu.prototype.openColumnMenu = function (e) {
        var pos = { top: 0, left: 0 };
        this.element.style.cssText = 'display:block;visibility:hidden';
        var elePos = this.element.getBoundingClientRect();
        this.element.style.cssText = 'display:none;visibility:visible';
        this.headerCell = this.getHeaderCell(e);
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            pos.top = ((window.innerHeight / 2) - (elePos.height / 2));
            pos.left = ((window.innerWidth / 2) - (elePos.width / 2));
        }
        else {
            if (this.parent.enableRtl) {
                pos = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_4__["calculatePosition"])(this.headerCell, 'left', 'bottom');
            }
            else {
                pos = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_4__["calculatePosition"])(this.headerCell, 'right', 'bottom');
                pos.left -= elePos.width;
            }
        }
        this.columnMenu.open(pos.top, pos.left);
        e.preventDefault();
        this.parent.applyBiggerTheme(this.columnMenu.element.parentElement);
    };
    ColumnMenu.prototype.columnMenuHandlerDown = function (e) {
        this.isOpen = !(this.element.style.display === 'none' || this.element.style.display === '');
    };
    ColumnMenu.prototype.getColumnMenuHandlers = function () {
        return [].slice.call(this.parent.getHeaderTable().querySelectorAll('.' + this.ROOT));
    };
    /**
     * @hidden
     */
    ColumnMenu.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["headerRefreshed"], this.wireEvents, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["uiUpdate"], this.enableAfterRenderMenu, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["initialEnd"], this.render, this);
        if (this.isFilterItemAdded()) {
            this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["filterDialogCreated"], this.filterPosition, this);
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.columnMenuHandlerClick, this);
    };
    /**
     * @hidden
     */
    ColumnMenu.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["headerRefreshed"], this.unwireEvents);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["uiUpdate"], this.enableAfterRenderMenu);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["initialEnd"], this.render);
        if (this.isFilterItemAdded()) {
            this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["filterDialogCreated"], this.filterPosition);
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.columnMenuHandlerClick);
    };
    ColumnMenu.prototype.enableAfterRenderMenu = function (e) {
        if (e.module === this.getModuleName() && e.enable) {
            if (this.columnMenu) {
                this.columnMenu.destroy();
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
            }
            this.render();
        }
    };
    ColumnMenu.prototype.render = function () {
        this.l10n = this.serviceLocator.getService('localization');
        this.element = this.parent.createElement('ul', { id: this.gridID + '_columnmenu', className: 'e-colmenu' });
        this.parent.element.appendChild(this.element);
        this.columnMenu = new _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__["ContextMenu"]({
            cssClass: 'e-grid-menu',
            enableRtl: this.parent.enableRtl,
            enablePersistence: this.parent.enablePersistence,
            locale: this.parent.locale,
            items: this.getItems(),
            select: this.columnMenuItemClick.bind(this),
            beforeOpen: this.columnMenuBeforeOpen.bind(this),
            onOpen: this.columnMenuOnOpen.bind(this),
            onClose: this.columnMenuOnClose.bind(this),
            beforeItemRender: this.beforeMenuItemRender.bind(this),
            beforeClose: this.columnMenuBeforeClose.bind(this)
        });
        this.columnMenu.appendTo(this.element);
        this.wireFilterEvents();
    };
    ColumnMenu.prototype.wireFilterEvents = function () {
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.isFilterItemAdded()) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseover', this.appendFilter, this);
        }
    };
    ColumnMenu.prototype.unwireFilterEvents = function () {
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.isFilterItemAdded()) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseover', this.appendFilter);
        }
    };
    ColumnMenu.prototype.beforeMenuItemRender = function (args) {
        if (this.isChooserItem(args.item)) {
            var field_1 = this.getKeyFromId(args.item.id, this.CHOOSER);
            var column = this.parent.columnModel.filter(function (col) { return col.field === field_1; });
            var check = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_5__["createCheckBox"])(this.parent.createElement, false, {
                label: args.item.text,
                checked: column[0].visible
            });
            if (this.parent.enableRtl) {
                check.classList.add('e-rtl');
            }
            args.element.innerHTML = '';
            args.element.appendChild(check);
        }
        else if (args.item.id && this.getKeyFromId(args.item.id) === 'Filter') {
            args.element.appendChild(this.parent.createElement('span', { className: 'e-icons e-caret' }));
            args.element.className += 'e-filter-item e-menu-caret-icon';
        }
    };
    ColumnMenu.prototype.columnMenuBeforeClose = function (args) {
        var colChooser = args.event ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.event.target, '.e-menu-item') : null;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.parentItem) &&
            this.getKeyFromId(args.parentItem.id) === 'ColumnChooser' &&
            colChooser && this.isChooserItem(colChooser)) {
            args.cancel = true;
        }
        else if (args.event && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.event.target, '.' + this.POP)
            || (args.event.currentTarget && args.event.currentTarget.activeElement &&
                Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(args.event.currentTarget.activeElement, 'e-filter-popup'))
            || Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(args.event.target, 'e-popup') ||
            (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(args.event.target, 'e-popup-wrapper'))) && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            args.cancel = true;
        }
    };
    ColumnMenu.prototype.isChooserItem = function (item) {
        return item.id && item.id.indexOf('_colmenu_') >= 0 &&
            this.getKeyFromId(item.id, this.CHOOSER).indexOf('_colmenu_') === -1;
    };
    ColumnMenu.prototype.columnMenuBeforeOpen = function (args) {
        args.column = this.targetColumn = this.getColumn();
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["columnMenuOpen"], args);
        for (var _i = 0, _a = args.items; _i < _a.length; _i++) {
            var item = _a[_i];
            var key = this.getKeyFromId(item.id);
            var dItem = this.defaultItems[key];
            if (this.getDefaultItems().indexOf(key) !== -1) {
                if (this.ensureDisabledStatus(key) && !dItem.hide) {
                    this.disableItems.push(item.text);
                }
                else if (item.hide) {
                    this.hiddenItems.push(item.text);
                }
            }
        }
        this.columnMenu.enableItems(this.disableItems, false);
        this.columnMenu.hideItems(this.hiddenItems);
    };
    ColumnMenu.prototype.columnMenuOnOpen = function (args) {
        if (args.element.className === 'e-menu-parent e-ul ') {
            if (args.element.offsetHeight > window.innerHeight) {
                args.element.style.maxHeight = (window.innerHeight) * 0.8 + 'px';
                args.element.style.overflowY = 'auto';
            }
            else if (this.parent.element.offsetHeight > window.innerHeight) {
                args.element.style.maxHeight = (window.innerHeight) * 0.8 + 'px';
                args.element.style.overflowY = 'auto';
            }
        }
    };
    ColumnMenu.prototype.ensureDisabledStatus = function (item) {
        var _this = this;
        var status = false;
        switch (item) {
            case 'Group':
                if (!this.parent.allowGrouping || (this.parent.ensureModuleInjected(_actions_group__WEBPACK_IMPORTED_MODULE_6__["Group"]) && this.targetColumn
                    && this.parent.groupSettings.columns.indexOf(this.targetColumn.field) >= 0 ||
                    this.targetColumn && !this.targetColumn.allowGrouping)) {
                    status = true;
                }
                break;
            case 'AutoFitAll':
            case 'AutoFit':
                status = !this.parent.ensureModuleInjected(_actions_resize__WEBPACK_IMPORTED_MODULE_9__["Resize"]);
                break;
            case 'Ungroup':
                if (!this.parent.ensureModuleInjected(_actions_group__WEBPACK_IMPORTED_MODULE_6__["Group"]) || (this.parent.ensureModuleInjected(_actions_group__WEBPACK_IMPORTED_MODULE_6__["Group"]) && this.targetColumn
                    && this.parent.groupSettings.columns.indexOf(this.targetColumn.field) < 0)) {
                    status = true;
                }
                break;
            case 'SortDescending':
            case 'SortAscending':
                if (this.parent.allowSorting && this.parent.ensureModuleInjected(_actions_sort__WEBPACK_IMPORTED_MODULE_7__["Sort"])
                    && this.parent.sortSettings.columns.length > 0 && this.targetColumn && this.targetColumn.allowSorting) {
                    this.parent.sortSettings.columns.forEach(function (ele) {
                        if (ele.field === _this.targetColumn.field
                            && ele.direction.toLocaleLowerCase() === item.toLocaleLowerCase().replace('sort', '')) {
                            status = true;
                        }
                    });
                }
                else if (!this.parent.allowSorting || !this.parent.ensureModuleInjected(_actions_sort__WEBPACK_IMPORTED_MODULE_7__["Sort"]) ||
                    this.parent.allowSorting && this.targetColumn && !this.targetColumn.allowSorting) {
                    status = true;
                }
                break;
            case 'Filter':
                if (this.parent.allowFiltering && (this.parent.filterSettings.type !== 'FilterBar')
                    && this.parent.ensureModuleInjected(_actions_filter__WEBPACK_IMPORTED_MODULE_8__["Filter"]) && this.targetColumn && this.targetColumn.allowFiltering) {
                    status = false;
                }
                else if (this.parent.ensureModuleInjected(_actions_filter__WEBPACK_IMPORTED_MODULE_8__["Filter"]) && this.parent.allowFiltering
                    && this.targetColumn && (!this.targetColumn.allowFiltering || this.parent.filterSettings.type === 'FilterBar')) {
                    status = true;
                }
        }
        return status;
    };
    ColumnMenu.prototype.columnMenuItemClick = function (args) {
        var item = this.isChooserItem(args.item) ? 'ColumnChooser' : this.getKeyFromId(args.item.id);
        switch (item) {
            case 'AutoFit':
                this.parent.autoFitColumns(this.targetColumn.field);
                break;
            case 'AutoFitAll':
                this.parent.autoFitColumns([]);
                break;
            case 'Ungroup':
                this.parent.ungroupColumn(this.targetColumn.field);
                break;
            case 'Group':
                this.parent.groupColumn(this.targetColumn.field);
                break;
            case 'SortAscending':
                this.parent.sortColumn(this.targetColumn.field, 'Ascending');
                break;
            case 'SortDescending':
                this.parent.sortColumn(this.targetColumn.field, 'Descending');
                break;
            case 'ColumnChooser':
                var key = this.getKeyFromId(args.item.id, this.CHOOSER);
                var checkbox = args.element.querySelector('.e-checkbox-wrapper .e-frame');
                if (checkbox && checkbox.classList.contains('e-check')) {
                    checkbox.classList.remove('e-check');
                    this.parent.hideColumns(key, 'field');
                }
                else if (checkbox) {
                    this.parent.showColumns(key, 'field');
                    checkbox.classList.add('e-check');
                }
                break;
            case 'Filter':
                this.getFilter(args.element, args.item.id);
                break;
        }
        args.column = this.targetColumn;
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["columnMenuClick"], args);
    };
    ColumnMenu.prototype.columnMenuOnClose = function (args) {
        var parent = 'parentObj';
        if (args.items.length > 0 && args.items[0][parent] instanceof _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__["ContextMenu"]) {
            this.columnMenu.enableItems(this.disableItems);
            this.disableItems = [];
            this.columnMenu.showItems(this.hiddenItems);
            this.hiddenItems = [];
            if (this.isFilterPopupOpen()) {
                this.getFilter(args.element, args.element.id, true);
            }
        }
    };
    ColumnMenu.prototype.getDefaultItems = function () {
        return ['AutoFitAll', 'AutoFit', 'SortAscending', 'SortDescending', 'Group', 'Ungroup', 'ColumnChooser', 'Filter'];
    };
    ColumnMenu.prototype.getItems = function () {
        var items = [];
        var defultItems = this.parent.columnMenuItems ? this.parent.columnMenuItems : this.getDefault();
        for (var _i = 0, defultItems_1 = defultItems; _i < defultItems_1.length; _i++) {
            var item = defultItems_1[_i];
            if (typeof item === 'string') {
                if (item === 'ColumnChooser') {
                    var col = this.getDefaultItem(item);
                    col.items = this.createChooserItems();
                    items.push(col);
                }
                else {
                    items.push(this.getDefaultItem(item));
                }
            }
            else {
                items.push(item);
            }
        }
        return items;
    };
    ColumnMenu.prototype.getDefaultItem = function (item) {
        var menuItem = {};
        switch (item) {
            case 'SortAscending':
                menuItem = { iconCss: this.ASCENDING };
                break;
            case 'SortDescending':
                menuItem = { iconCss: this.DESCENDING };
                break;
            case 'Group':
                menuItem = { iconCss: this.GROUP };
                break;
            case 'Ungroup':
                menuItem = { iconCss: this.UNGROUP };
                break;
            case 'Filter':
                menuItem = { iconCss: this.FILTER };
                break;
        }
        this.defaultItems[item] = {
            text: this.getLocaleText(item), id: this.generateID(item),
            iconCss: menuItem.iconCss ? 'e-icons ' + menuItem.iconCss : null
        };
        return this.defaultItems[item];
    };
    ColumnMenu.prototype.getLocaleText = function (item) {
        return this.l10n.getConstant(this.localeText[item]);
    };
    ColumnMenu.prototype.generateID = function (item, append) {
        return this.gridID + '_colmenu_' + (append ? append + item : item);
    };
    ColumnMenu.prototype.getKeyFromId = function (id, append) {
        return id.indexOf('_colmenu_') > 0 &&
            id.replace(this.gridID + '_colmenu_' + (append ? append : ''), '');
    };
    /**
     * @hidden
     */
    ColumnMenu.prototype.getColumnMenu = function () {
        return this.element;
    };
    ColumnMenu.prototype.getModuleName = function () {
        return 'columnMenu';
    };
    ColumnMenu.prototype.setLocaleKey = function () {
        return {
            'AutoFitAll': 'autoFitAll',
            'AutoFit': 'autoFit',
            'Group': 'Group',
            'Ungroup': 'Ungroup',
            'SortAscending': 'SortAscending',
            'SortDescending': 'SortDescending',
            'ColumnChooser': 'Columnchooser',
            'Filter': 'FilterMenu'
        };
    };
    ColumnMenu.prototype.getHeaderCell = function (e) {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'th.e-headercell');
    };
    ColumnMenu.prototype.getColumn = function () {
        if (this.headerCell) {
            var uid = this.headerCell.querySelector('.e-headercelldiv').getAttribute('e-mappinguid');
            return this.parent.getColumnByUid(uid);
        }
        return null;
    };
    ColumnMenu.prototype.createChooserItems = function () {
        var items = [];
        for (var _i = 0, _a = this.parent.columnModel; _i < _a.length; _i++) {
            var col = _a[_i];
            if (col.showInColumnChooser && col.field) {
                items.push({ id: this.generateID(col.field, this.CHOOSER), text: col.headerText ? col.headerText : col.field });
            }
        }
        return items;
    };
    ColumnMenu.prototype.appendFilter = function (e) {
        var filter = 'Filter';
        if (!this.defaultItems[filter]) {
            return;
        }
        else {
            var key = this.defaultItems[filter].id;
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '#' + key) && !this.isFilterPopupOpen()) {
                this.getFilter(e.target, key);
            }
            else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '#' + key) && this.isFilterPopupOpen()) {
                this.getFilter(e.target, key, true);
            }
        }
    };
    ColumnMenu.prototype.getFilter = function (target, id, isClose) {
        var filterPopup = this.getFilterPop();
        if (filterPopup) {
            filterPopup.style.display = !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && isClose ? 'none' : 'block';
        }
        else {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["filterOpen"], {
                col: this.targetColumn, target: target, isClose: isClose, id: id
            });
        }
    };
    ColumnMenu.prototype.setPosition = function (li, ul) {
        var gridPos = this.parent.element.getBoundingClientRect();
        var liPos = li.getBoundingClientRect();
        var left = liPos.left - gridPos.left;
        var top = liPos.top - gridPos.top;
        if (gridPos.height < top) {
            top = top - ul.offsetHeight + liPos.height;
        }
        else if (gridPos.height < top + ul.offsetHeight) {
            top = gridPos.height - ul.offsetHeight;
        }
        if (window.innerHeight < ul.offsetHeight + top + gridPos.top) {
            top = window.innerHeight - ul.offsetHeight - gridPos.top;
        }
        left += (this.parent.enableRtl ? -ul.offsetWidth : liPos.width);
        if (gridPos.width <= left + ul.offsetWidth) {
            left -= liPos.width + ul.offsetWidth;
        }
        else if (left < 0) {
            left += ul.offsetWidth + liPos.width;
        }
        ul.style.top = top + 'px';
        ul.style.left = left + 'px';
    };
    ColumnMenu.prototype.filterPosition = function (e) {
        var filterPopup = this.getFilterPop();
        filterPopup.classList.add(this.WRAP);
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            var disp = filterPopup.style.display;
            filterPopup.style.cssText += 'display:block;visibility:hidden';
            var li = this.element.querySelector('.' + this.FILTER);
            if (li) {
                this.setPosition(li.parentElement, filterPopup);
                filterPopup.style.cssText += 'display:' + disp + ';visibility:visible';
            }
        }
    };
    ColumnMenu.prototype.getDefault = function () {
        var items = [];
        if (this.parent.ensureModuleInjected(_actions_resize__WEBPACK_IMPORTED_MODULE_9__["Resize"])) {
            items.push('AutoFitAll');
            items.push('AutoFit');
        }
        if (this.parent.allowGrouping && this.parent.ensureModuleInjected(_actions_group__WEBPACK_IMPORTED_MODULE_6__["Group"])) {
            items.push('Group');
            items.push('Ungroup');
        }
        if (this.parent.allowSorting && this.parent.ensureModuleInjected(_actions_sort__WEBPACK_IMPORTED_MODULE_7__["Sort"])) {
            items.push('SortAscending');
            items.push('SortDescending');
        }
        items.push('ColumnChooser');
        if (this.parent.allowFiltering && (this.parent.filterSettings.type !== 'FilterBar') &&
            this.parent.ensureModuleInjected(_actions_filter__WEBPACK_IMPORTED_MODULE_8__["Filter"])) {
            items.push('Filter');
        }
        return items;
    };
    ColumnMenu.prototype.isFilterPopupOpen = function () {
        var filterPopup = this.getFilterPop();
        return filterPopup && filterPopup.style.display !== 'none';
    };
    ColumnMenu.prototype.getFilterPop = function () {
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.targetColumn !== null) {
            return document.getElementById(this.targetColumn.uid + '-flmdlg');
        }
        return this.parent.element.querySelector('.' + this.POP);
    };
    ColumnMenu.prototype.isFilterItemAdded = function () {
        return (this.parent.columnMenuItems &&
            this.parent.columnMenuItems.indexOf('Filter') >= 0) || !this.parent.columnMenuItems;
    };
    return ColumnMenu;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/command-column.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/command-column.js ***!
  \*******************************************************************************/
/*! exports provided: CommandColumn */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommandColumn", function() { return CommandColumn; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _renderer_command_column_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../renderer/command-column-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/command-column-renderer.js");




/**
 * `CommandColumn` used to handle the command column actions.
 * @hidden
 */
var CommandColumn = /** @class */ (function () {
    function CommandColumn(parent, locator) {
        this.parent = parent;
        this.locator = locator;
        this.addEventListener();
    }
    CommandColumn.prototype.initiateRender = function () {
        var cellFac = this.locator.getService('cellRendererFactory');
        cellFac.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].CommandColumn, new _renderer_command_column_renderer__WEBPACK_IMPORTED_MODULE_3__["CommandColumnRenderer"](this.parent, this.locator));
    };
    CommandColumn.prototype.commandClickHandler = function (e) {
        var gObj = this.parent;
        var gID = gObj.element.id;
        var target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'button');
        if (!target || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-unboundcell')) {
            return;
        }
        var buttonObj = target.ej2_instances[0];
        var type = buttonObj.commandType;
        var commandColumn;
        var row = gObj.getRowObjectFromUID(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-row').getAttribute('data-uid'));
        this.parent.columnModel.forEach(function (col) {
            if (col.commands) {
                col.commands.forEach(function (commandCol) {
                    var typeInString = 'type';
                    if (commandCol[typeInString] === type) {
                        commandColumn = commandCol;
                    }
                });
            }
        });
        var args = {
            cancel: false,
            target: target,
            commandColumn: commandColumn,
            rowData: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(row) ? undefined : row.data
        };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_1__["commandClick"], args, function (commandclickargs) {
            if (buttonObj.disabled || !gObj.editModule || commandclickargs.cancel) {
                return;
            }
            switch (type) {
                case 'Edit':
                    gObj.editModule.endEdit();
                    gObj.editModule.startEdit(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'tr'));
                    break;
                case 'Cancel':
                    gObj.editModule.closeEdit();
                    break;
                case 'Save':
                    gObj.editModule.endEdit();
                    break;
                case 'Delete':
                    if (gObj.editSettings.mode !== 'Batch') {
                        gObj.editModule.endEdit();
                    }
                    gObj.clearSelection();
                    //for toogle issue when dbl click
                    gObj.selectRow(parseInt(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'tr').getAttribute('aria-rowindex'), 10), false);
                    gObj.editModule.deleteRecord();
                    break;
            }
        });
    };
    /**
     * For internal use only - Get the module name.
     */
    CommandColumn.prototype.getModuleName = function () {
        return 'commandColumn';
    };
    /**
     * To destroy CommandColumn.
     * @method destroy
     * @return {void}
     */
    CommandColumn.prototype.destroy = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.removeEventListener();
    };
    CommandColumn.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["click"], this.commandClickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["initialEnd"], this.initiateRender);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["keyPressed"], this.keyPressHandler);
    };
    CommandColumn.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["click"], this.commandClickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["initialEnd"], this.initiateRender, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["keyPressed"], this.keyPressHandler, this);
    };
    CommandColumn.prototype.keyPressHandler = function (e) {
        if (e.action === 'enter' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-unboundcelldiv')) {
            this.commandClickHandler(e);
            e.preventDefault();
        }
    };
    return CommandColumn;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/context-menu.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/context-menu.js ***!
  \*****************************************************************************/
/*! exports provided: menuClass, ContextMenu */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "menuClass", function() { return menuClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextMenu", function() { return ContextMenu; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-navigations */ "./node_modules/@syncfusion/ej2-navigations/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _actions_resize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actions/resize */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/resize.js");
/* harmony import */ var _actions_page__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../actions/page */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/page.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _actions_group__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../actions/group */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/group.js");
/* harmony import */ var _actions_sort__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../actions/sort */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/sort.js");
/* harmony import */ var _actions_pdf_export__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../actions/pdf-export */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/pdf-export.js");
/* harmony import */ var _actions_excel_export__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../actions/excel-export */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-export.js");











var menuClass = {
    header: '.e-gridheader',
    content: '.e-gridcontent',
    edit: '.e-inline-edit',
    batchEdit: '.e-editedbatchcell',
    editIcon: 'e-edit',
    pager: '.e-gridpager',
    delete: 'e-delete',
    save: 'e-save',
    cancel: 'e-cancel',
    copy: 'e-copy',
    pdf: 'e-pdfexport',
    group: 'e-icon-group',
    ungroup: 'e-icon-ungroup',
    csv: 'e-csvexport',
    excel: 'e-excelexport',
    fPage: 'e-icon-first',
    nPage: 'e-icon-next',
    lPage: 'e-icon-last',
    pPage: 'e-icon-prev',
    ascending: 'e-icon-ascending',
    descending: 'e-icon-descending',
    groupHeader: 'e-groupdroparea',
    touchPop: 'e-gridpopup'
};
/**
 * The `ContextMenu` module is used to handle context menu actions.
 */
var ContextMenu = /** @class */ (function () {
    function ContextMenu(parent, serviceLocator) {
        this.defaultItems = {};
        this.disableItems = [];
        this.hiddenItems = [];
        this.localeText = this.setLocaleKey();
        this.parent = parent;
        this.gridID = parent.element.id;
        this.serviceLocator = serviceLocator;
        this.addEventListener();
    }
    /**
     * @hidden
     */
    ContextMenu.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRenderMenu, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialLoad"], this.render, this);
    };
    /**
     * @hidden
     */
    ContextMenu.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialLoad"], this.render);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRenderMenu);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keydown', this.keyDownHandler.bind(this));
    };
    ContextMenu.prototype.keyDownHandler = function (e) {
        if (e.code === 'Tab' || e.which === 9) {
            this.contextMenu.close();
        }
    };
    ContextMenu.prototype.render = function () {
        this.parent.element.classList.add('e-noselect');
        this.l10n = this.serviceLocator.getService('localization');
        this.element = this.parent.createElement('ul', { id: this.gridID + '_cmenu' });
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keydown', this.keyDownHandler.bind(this));
        this.parent.element.appendChild(this.element);
        var target = '#' + this.gridID;
        this.contextMenu = new _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__["ContextMenu"]({
            items: this.getMenuItems(),
            enableRtl: this.parent.enableRtl,
            enablePersistence: this.parent.enablePersistence,
            locale: this.parent.locale,
            target: target,
            select: this.contextMenuItemClick.bind(this),
            beforeOpen: this.contextMenuBeforeOpen.bind(this),
            onOpen: this.contextMenuOpen.bind(this),
            onClose: this.contextMenuOnClose.bind(this),
            cssClass: 'e-grid-menu'
        });
        this.contextMenu.appendTo(this.element);
    };
    ContextMenu.prototype.enableAfterRenderMenu = function (e) {
        if (e.module === this.getModuleName() && e.enable) {
            if (this.contextMenu) {
                this.contextMenu.destroy();
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
                this.parent.element.classList.remove('e-noselect');
            }
            this.render();
        }
    };
    ContextMenu.prototype.getMenuItems = function () {
        var menuItems = [];
        var exportItems = [];
        for (var _i = 0, _a = this.parent.contextMenuItems; _i < _a.length; _i++) {
            var item = _a[_i];
            if (typeof item === 'string' && this.getDefaultItems().indexOf(item) !== -1) {
                if (item.toLocaleLowerCase().indexOf('export') !== -1) {
                    exportItems.push(this.buildDefaultItems(item));
                }
                else {
                    menuItems.push(this.buildDefaultItems(item));
                }
            }
            else if (typeof item !== 'string') {
                menuItems.push(item);
            }
        }
        if (exportItems.length > 0) {
            var exportGroup = this.buildDefaultItems('export');
            exportGroup.items = exportItems;
            menuItems.push(exportGroup);
        }
        return menuItems;
    };
    ContextMenu.prototype.getLastPage = function () {
        var totalpage = Math.floor(this.parent.pageSettings.totalRecordsCount / this.parent.pageSettings.pageSize);
        if (this.parent.pageSettings.totalRecordsCount % this.parent.pageSettings.pageSize) {
            totalpage += 1;
        }
        return totalpage;
    };
    ContextMenu.prototype.contextMenuOpen = function () {
        this.isOpen = true;
    };
    /**
     * @hidden
     */
    ContextMenu.prototype.contextMenuItemClick = function (args) {
        var item = this.getKeyFromId(args.item.id);
        switch (item) {
            case 'AutoFitAll':
                this.parent.autoFitColumns([]);
                break;
            case 'AutoFit':
                this.parent.autoFitColumns(this.targetColumn.field);
                break;
            case 'Group':
                this.parent.groupColumn(this.targetColumn.field);
                break;
            case 'Ungroup':
                this.parent.ungroupColumn(this.targetColumn.field);
                break;
            case 'Edit':
                if (this.parent.editModule) {
                    if (this.parent.editSettings.mode === 'Batch') {
                        if (this.row && this.cell && !isNaN(parseInt(this.cell.getAttribute('aria-colindex'), 10))) {
                            this.parent.editModule.editCell(parseInt(this.row.getAttribute('aria-rowindex'), 10), this.parent.getColumns()[parseInt(this.cell.getAttribute('aria-colindex'), 10)].field);
                        }
                    }
                    else {
                        this.parent.editModule.endEdit();
                        this.parent.editModule.startEdit(this.row);
                    }
                }
                break;
            case 'Delete':
                if (this.parent.editModule) {
                    if (this.parent.editSettings.mode !== 'Batch') {
                        this.parent.editModule.endEdit();
                    }
                    if (this.parent.getSelectedRecords().length === 1) {
                        this.parent.editModule.deleteRow(this.row);
                    }
                    else {
                        this.parent.deleteRecord();
                    }
                }
                break;
            case 'Save':
                if (this.parent.editModule) {
                    this.parent.editModule.endEdit();
                }
                break;
            case 'Cancel':
                if (this.parent.editModule) {
                    this.parent.editModule.closeEdit();
                }
                break;
            case 'Copy':
                this.parent.copy();
                break;
            case 'PdfExport':
                this.parent.pdfExport();
                break;
            case 'ExcelExport':
                this.parent.excelExport();
                break;
            case 'CsvExport':
                this.parent.csvExport();
                break;
            case 'SortAscending':
                this.isOpen = false;
                this.parent.sortColumn(this.targetColumn.field, 'Ascending');
                break;
            case 'SortDescending':
                this.isOpen = false;
                this.parent.sortColumn(this.targetColumn.field, 'Descending');
                break;
            case 'FirstPage':
                this.parent.goToPage(1);
                break;
            case 'PrevPage':
                this.parent.goToPage(this.parent.pageSettings.currentPage - 1);
                break;
            case 'LastPage':
                this.parent.goToPage(this.getLastPage());
                break;
            case 'NextPage':
                this.parent.goToPage(this.parent.pageSettings.currentPage + 1);
                break;
        }
        args.column = this.targetColumn;
        args.rowInfo = this.targetRowdata;
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contextMenuClick"], args);
    };
    ContextMenu.prototype.contextMenuOnClose = function (args) {
        var parent = 'parentObj';
        if (args.items.length > 0 && args.items[0][parent] instanceof _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__["ContextMenu"]) {
            this.updateItemStatus();
        }
    };
    ContextMenu.prototype.getLocaleText = function (item) {
        return this.l10n.getConstant(this.localeText[item]);
    };
    ContextMenu.prototype.updateItemStatus = function () {
        this.contextMenu.showItems(this.hiddenItems);
        this.contextMenu.enableItems(this.disableItems);
        this.hiddenItems = [];
        this.disableItems = [];
        this.isOpen = false;
    };
    ContextMenu.prototype.contextMenuBeforeOpen = function (args) {
        var changedRecords = 'changedRecords';
        var addedRecords = 'addedRecords';
        var deletedRecords = 'deletedRecords';
        var closestGrid = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.event.target, '.e-grid');
        if (args.event && closestGrid && closestGrid !== this.parent.element) {
            args.cancel = true;
        }
        else if (args.event && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.event.target, '.' + menuClass.groupHeader)
            || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.event.target, '.' + menuClass.touchPop) ||
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.event.target, '.e-summarycell') ||
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.event.target, '.e-groupcaption') ||
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.event.target, '.e-filterbarcell'))) {
            args.cancel = true;
        }
        else {
            this.targetColumn = this.getColumn(args.event);
            this.targetRowdata = this.parent.getRowInfo(args.event.target);
            if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.parentItem)) && this.targetColumn) {
                this.selectRow(args.event, (args.event.target.classList.contains('e-selectionbackground')
                    && this.parent.selectionSettings.type === 'Multiple') ? false : true);
            }
            var hideSepItems = [];
            var showSepItems = [];
            for (var _i = 0, _a = args.items; _i < _a.length; _i++) {
                var item = _a[_i];
                var key = this.getKeyFromId(item.id);
                var dItem = this.defaultItems[key];
                if (this.getDefaultItems().indexOf(key) !== -1) {
                    if (this.ensureDisabledStatus(key)) {
                        this.disableItems.push(item.text);
                    }
                    if (args.event && (this.ensureTarget(args.event.target, menuClass.edit) ||
                        this.ensureTarget(args.event.target, menuClass.batchEdit))) {
                        if (key !== 'Save' && key !== 'Cancel') {
                            this.hiddenItems.push(item.text);
                        }
                    }
                    else if (this.parent.editModule && this.parent.editSettings.mode === 'Batch' &&
                        ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.event.target, '.e-gridform')) ||
                            this.parent.editModule.getBatchChanges()[changedRecords].length ||
                            this.parent.editModule.getBatchChanges()[addedRecords].length ||
                            this.parent.editModule.getBatchChanges()[deletedRecords].length) && (key === 'Save' || key === 'Cancel')) {
                        continue;
                    }
                    else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.parentItem) && args.event
                        && !this.ensureTarget(args.event.target, dItem.target)) {
                        this.hiddenItems.push(item.text);
                    }
                }
                else if (item.target && args.event &&
                    !this.ensureTarget(args.event.target, item.target)) {
                    if (item.separator) {
                        hideSepItems.push(item.id);
                    }
                    else {
                        this.hiddenItems.push(item.text);
                    }
                }
                else if (this.ensureTarget(args.event.target, item.target) && item.separator) {
                    showSepItems.push(item.id);
                }
            }
            if (showSepItems.length > 0) {
                this.contextMenu.showItems(showSepItems, true);
            }
            this.contextMenu.enableItems(this.disableItems, false);
            this.contextMenu.hideItems(this.hiddenItems);
            if (hideSepItems.length > 0) {
                this.contextMenu.hideItems(hideSepItems, true);
            }
            this.eventArgs = args.event;
            args.column = this.targetColumn;
            args.rowInfo = this.targetRowdata;
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contextMenuOpen"], args);
            if (args.cancel || (this.hiddenItems.length === args.items.length && !args.parentItem)) {
                this.updateItemStatus();
                args.cancel = true;
            }
        }
        this.parent.applyBiggerTheme(this.contextMenu.element.parentElement);
    };
    ContextMenu.prototype.ensureTarget = function (targetElement, selector) {
        var target = targetElement;
        if (this.ensureFrozenHeader(targetElement) && (selector === menuClass.header || selector === menuClass.content)) {
            target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(targetElement, selector === menuClass.header ? 'thead' : 'tbody');
        }
        else if (selector === menuClass.content || selector === menuClass.header) {
            target = Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["parentsUntil"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(targetElement, '.e-table'), selector.substr(1, selector.length));
        }
        else {
            target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(targetElement, selector);
        }
        return target && Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["parentsUntil"])(target, 'e-grid') === this.parent.element;
    };
    ContextMenu.prototype.ensureFrozenHeader = function (targetElement) {
        return (this.parent.getFrozenColumns() || this.parent.frozenRows)
            && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(targetElement, menuClass.header) ? true : false;
    };
    ContextMenu.prototype.ensureDisabledStatus = function (item) {
        var _this = this;
        var status = false;
        switch (item) {
            case 'AutoFitAll':
            case 'AutoFit':
                status = !(this.parent.ensureModuleInjected(_actions_resize__WEBPACK_IMPORTED_MODULE_3__["Resize"]) && !this.parent.isEdit)
                    || (this.targetColumn && !this.targetColumn.field && item === 'AutoFit');
                break;
            case 'Group':
                if (!this.parent.allowGrouping || (this.parent.ensureModuleInjected(_actions_group__WEBPACK_IMPORTED_MODULE_6__["Group"]) && this.targetColumn
                    && this.parent.groupSettings.columns.indexOf(this.targetColumn.field) >= 0) ||
                    (this.targetColumn && !this.targetColumn.field)) {
                    status = true;
                }
                break;
            case 'Ungroup':
                if (!this.parent.allowGrouping || !this.parent.ensureModuleInjected(_actions_group__WEBPACK_IMPORTED_MODULE_6__["Group"])
                    || (this.parent.ensureModuleInjected(_actions_group__WEBPACK_IMPORTED_MODULE_6__["Group"]) && this.targetColumn
                        && this.parent.groupSettings.columns.indexOf(this.targetColumn.field) < 0)) {
                    status = true;
                }
                break;
            case 'Edit':
            case 'Delete':
            case 'Save':
            case 'Cancel':
                if (!this.parent.editModule || (this.parent.getDataRows().length === 0)) {
                    status = true;
                }
                break;
            case 'Copy':
                if (this.parent.getSelectedRowIndexes().length === 0 ||
                    this.parent.getCurrentViewRecords().length === 0) {
                    status = true;
                }
                break;
            case 'export':
                if ((!this.parent.allowExcelExport || !this.parent.excelExport) ||
                    !this.parent.ensureModuleInjected(_actions_pdf_export__WEBPACK_IMPORTED_MODULE_8__["PdfExport"]) && !this.parent.ensureModuleInjected(_actions_excel_export__WEBPACK_IMPORTED_MODULE_9__["ExcelExport"])) {
                    status = true;
                }
                break;
            case 'PdfExport':
                if (!(this.parent.allowPdfExport) || !this.parent.ensureModuleInjected(_actions_pdf_export__WEBPACK_IMPORTED_MODULE_8__["PdfExport"])) {
                    status = true;
                }
                break;
            case 'ExcelExport':
            case 'CsvExport':
                if (!(this.parent.allowExcelExport) || !this.parent.ensureModuleInjected(_actions_excel_export__WEBPACK_IMPORTED_MODULE_9__["ExcelExport"])) {
                    status = true;
                }
                break;
            case 'SortAscending':
            case 'SortDescending':
                if ((!this.parent.allowSorting) || !this.parent.ensureModuleInjected(_actions_sort__WEBPACK_IMPORTED_MODULE_7__["Sort"]) ||
                    (this.targetColumn && !this.targetColumn.field)) {
                    status = true;
                }
                else if (this.parent.ensureModuleInjected(_actions_sort__WEBPACK_IMPORTED_MODULE_7__["Sort"]) && this.parent.sortSettings.columns.length > 0 && this.targetColumn) {
                    this.parent.sortSettings.columns.forEach(function (element) {
                        if (element.field === _this.targetColumn.field
                            && element.direction.toLowerCase() === item.toLowerCase().replace('sort', '').toLocaleLowerCase()) {
                            status = true;
                        }
                    });
                }
                break;
            case 'FirstPage':
            case 'PrevPage':
                if (!this.parent.allowPaging || !this.parent.ensureModuleInjected(_actions_page__WEBPACK_IMPORTED_MODULE_4__["Page"]) ||
                    this.parent.getCurrentViewRecords().length === 0 ||
                    (this.parent.ensureModuleInjected(_actions_page__WEBPACK_IMPORTED_MODULE_4__["Page"]) && this.parent.pageSettings.currentPage === 1)) {
                    status = true;
                }
                break;
            case 'LastPage':
            case 'NextPage':
                if (!this.parent.allowPaging || !this.parent.ensureModuleInjected(_actions_page__WEBPACK_IMPORTED_MODULE_4__["Page"]) ||
                    this.parent.getCurrentViewRecords().length === 0 ||
                    (this.parent.ensureModuleInjected(_actions_page__WEBPACK_IMPORTED_MODULE_4__["Page"]) && this.parent.pageSettings.currentPage === this.getLastPage())) {
                    status = true;
                }
                break;
        }
        return status;
    };
    /**
     * Gets the context menu element from the Grid.
     * @return {Element}
     */
    ContextMenu.prototype.getContextMenu = function () {
        return this.element;
    };
    /**
     * Destroys the context menu component in the Grid.
     * @method destroy
     * @return {void}
     * @hidden
     */
    ContextMenu.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        this.contextMenu.destroy();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
        this.removeEventListener();
        this.parent.element.classList.remove('e-noselect');
    };
    ContextMenu.prototype.getModuleName = function () {
        return 'contextMenu';
    };
    ContextMenu.prototype.generateID = function (item) {
        return this.gridID + '_cmenu_' + item;
    };
    ContextMenu.prototype.getKeyFromId = function (id) {
        return id.replace(this.gridID + '_cmenu_', '');
    };
    ContextMenu.prototype.buildDefaultItems = function (item) {
        var menuItem;
        switch (item) {
            case 'AutoFitAll':
            case 'AutoFit':
                menuItem = { target: menuClass.header };
                break;
            case 'Group':
                menuItem = { target: menuClass.header, iconCss: menuClass.group };
                break;
            case 'Ungroup':
                menuItem = { target: menuClass.header, iconCss: menuClass.ungroup };
                break;
            case 'Edit':
                menuItem = { target: menuClass.content, iconCss: menuClass.editIcon };
                break;
            case 'Delete':
                menuItem = { target: menuClass.content, iconCss: menuClass.delete };
                break;
            case 'Save':
                menuItem = { target: menuClass.edit, iconCss: menuClass.save };
                break;
            case 'Cancel':
                menuItem = { target: menuClass.edit, iconCss: menuClass.cancel };
                break;
            case 'Copy':
                menuItem = { target: menuClass.content, iconCss: menuClass.copy };
                break;
            case 'export':
                menuItem = { target: menuClass.content };
                break;
            case 'PdfExport':
                menuItem = { target: menuClass.content, iconCss: menuClass.pdf };
                break;
            case 'ExcelExport':
                menuItem = { target: menuClass.content, iconCss: menuClass.excel };
                break;
            case 'CsvExport':
                menuItem = { target: menuClass.content, iconCss: menuClass.csv };
                break;
            case 'SortAscending':
                menuItem = { target: menuClass.header, iconCss: menuClass.ascending };
                break;
            case 'SortDescending':
                menuItem = { target: menuClass.header, iconCss: menuClass.descending };
                break;
            case 'FirstPage':
                menuItem = { target: menuClass.pager, iconCss: menuClass.fPage };
                break;
            case 'PrevPage':
                menuItem = { target: menuClass.pager, iconCss: menuClass.pPage };
                break;
            case 'LastPage':
                menuItem = { target: menuClass.pager, iconCss: menuClass.lPage };
                break;
            case 'NextPage':
                menuItem = { target: menuClass.pager, iconCss: menuClass.nPage };
                break;
        }
        this.defaultItems[item] = {
            text: this.getLocaleText(item), id: this.generateID(item),
            target: menuItem.target, iconCss: menuItem.iconCss ? 'e-icons ' + menuItem.iconCss : ''
        };
        return this.defaultItems[item];
    };
    ContextMenu.prototype.getDefaultItems = function () {
        return ['AutoFitAll', 'AutoFit',
            'Group', 'Ungroup', 'Edit', 'Delete', 'Save', 'Cancel', 'Copy', 'export',
            'PdfExport', 'ExcelExport', 'CsvExport', 'SortAscending', 'SortDescending',
            'FirstPage', 'PrevPage', 'LastPage', 'NextPage'];
    };
    ContextMenu.prototype.setLocaleKey = function () {
        return {
            'AutoFitAll': 'autoFitAll',
            'AutoFit': 'autoFit',
            'Copy': 'Copy',
            'Group': 'Group',
            'Ungroup': 'Ungroup',
            'Edit': 'EditRecord',
            'Delete': 'DeleteRecord',
            'Save': 'Save',
            'Cancel': 'CancelButton',
            'PdfExport': 'Pdfexport',
            'ExcelExport': 'Excelexport',
            'CsvExport': 'Csvexport',
            'export': 'Export',
            'SortAscending': 'SortAscending',
            'SortDescending': 'SortDescending',
            'FirstPage': 'FirstPage',
            'LastPage': 'LastPage',
            'PrevPage': 'PreviousPage',
            'NextPage': 'NextPage'
        };
    };
    ContextMenu.prototype.getColumn = function (e) {
        var cell = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'th.e-headercell');
        if (cell) {
            var uid = cell.querySelector('.e-headercelldiv, .e-stackedheadercelldiv').getAttribute('e-mappinguid');
            return this.parent.getColumnByUid(uid);
        }
        else {
            var ele = (this.parent.getRowInfo(e.target).column);
            return ele || null;
        }
    };
    ContextMenu.prototype.selectRow = function (e, isSelectable) {
        this.cell = e.target;
        this.row = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'tr.e-row') || this.row;
        if (this.row && isSelectable && !Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["parentsUntil"])(e.target, 'e-gridpager')) {
            this.parent.selectRow(parseInt(this.row.getAttribute('aria-rowindex'), 10));
        }
    };
    return ContextMenu;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/data.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/data.js ***!
  \*********************************************************************/
/*! exports provided: Data */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Data", function() { return Data; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _services_value_formatter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/value-formatter */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js");
/* harmony import */ var _actions_checkbox_filter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../actions/checkbox-filter */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/checkbox-filter.js");






/**
 * Grid data module is used to generate query and data source.
 * @hidden
 */
var Data = /** @class */ (function () {
    /**
     * Constructor for data module.
     * @hidden
     */
    function Data(parent, serviceLocator) {
        this.dataState = { isPending: false, resolver: null, group: [] };
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        this.initDataManager();
        if (this.parent.isDestroyed || this.getModuleName() === 'foreignKey') {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowsAdded"], this.addRows, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowPositionChanged"], this.reorderRows, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowsRemoved"], this.removeRows, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataSourceModified"], this.initDataManager, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["destroy"], this.destroy, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["updateData"], this.crudActions, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["addDeleteAction"], this.getData, this);
    }
    Data.prototype.reorderRows = function (e) {
        this.dataManager.dataSource.json.splice(e.toIndex, 0, this.dataManager.dataSource.json.splice(e.fromIndex, 1)[0]);
    };
    Data.prototype.getModuleName = function () {
        return 'data';
    };
    /**
     * The function used to initialize dataManager and external query
     * @return {void}
     */
    Data.prototype.initDataManager = function () {
        var gObj = this.parent;
        this.dataManager = gObj.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? gObj.dataSource :
            (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(gObj.dataSource) ? new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]() : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](gObj.dataSource));
        gObj.query = gObj.query instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"] ? gObj.query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
    };
    /**
     * The function is used to generate updated Query from Grid model.
     * @return {Query}
     * @hidden
     */
    Data.prototype.generateQuery = function (skipPage) {
        var gObj = this.parent;
        var query = gObj.getQuery().clone();
        if (this.parent.columnQueryMode === 'ExcludeHidden') {
            query.select(this.parent.getColumns().filter(function (column) { return !(column.isPrimaryKey !== true && column.visible === false || column.field === undefined); }).map(function (column) { return column.field; }));
        }
        else if (this.parent.columnQueryMode === 'Schema') {
            var selectQueryFields = [];
            var columns = this.parent.columns;
            for (var i = 0; i < columns.length; i++) {
                selectQueryFields.push(columns[i].field);
            }
            query.select(selectQueryFields);
        }
        this.filterQuery(query);
        this.searchQuery(query);
        this.aggregateQuery(query);
        this.sortQuery(query);
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isGroupAdaptive"])(this.parent)) {
            this.virtualGroupPageQuery(query);
        }
        else {
            this.pageQuery(query, skipPage);
        }
        this.groupQuery(query);
        return query;
    };
    Data.prototype.aggregateQuery = function (query, isForeign) {
        this.parent.aggregates.forEach(function (row) {
            row.columns.forEach(function (column) {
                var types = column.type instanceof Array ? column.type : [column.type];
                types.forEach(function (type) { return query.aggregate(type.toLowerCase(), column.field); });
            });
        });
        return query;
    };
    Data.prototype.virtualGroupPageQuery = function (query) {
        var gObj = this.parent;
        var fName = 'fn';
        if (query.queries.length) {
            for (var i = 0; i < query.queries.length; i++) {
                if (query.queries[i][fName] === 'onPage') {
                    query.queries.splice(i, 1);
                }
            }
        }
        return query;
    };
    Data.prototype.pageQuery = function (query, skipPage) {
        var gObj = this.parent;
        var fName = 'fn';
        if ((gObj.allowPaging || gObj.enableVirtualization) && skipPage !== true) {
            gObj.pageSettings.currentPage = Math.max(1, gObj.pageSettings.currentPage);
            if (gObj.pageSettings.pageCount <= 0) {
                gObj.pageSettings.pageCount = 8;
            }
            if (gObj.pageSettings.pageSize <= 0) {
                gObj.pageSettings.pageSize = 12;
            }
            if (query.queries.length) {
                for (var i = 0; i < query.queries.length; i++) {
                    if (query.queries[i][fName] === 'onPage') {
                        query.queries.splice(i, 1);
                    }
                }
            }
            query.page(gObj.pageSettings.currentPage, gObj.pageSettings.pageSize);
        }
        return query;
    };
    Data.prototype.groupQuery = function (query) {
        var gObj = this.parent;
        if (gObj.allowGrouping && gObj.groupSettings.columns.length) {
            var columns = gObj.groupSettings.columns;
            for (var i = 0, len = columns.length; i < len; i++) {
                var column = this.getColumnByField(columns[i]);
                if (!column) {
                    this.parent.log('initial_action', { moduleName: 'group', columnName: columns[i] });
                }
                var isGrpFmt = column.enableGroupByFormat;
                var format = column.format;
                if (isGrpFmt) {
                    query.group(columns[i], this.formatGroupColumn.bind(this), format);
                }
                else {
                    query.group(columns[i], null);
                }
            }
        }
        return query;
    };
    Data.prototype.sortQuery = function (query) {
        var gObj = this.parent;
        if ((gObj.allowSorting || gObj.allowGrouping) && gObj.sortSettings.columns.length) {
            var columns = gObj.sortSettings.columns;
            var sortGrp = [];
            for (var i = columns.length - 1; i > -1; i--) {
                var col = this.getColumnByField(columns[i].field);
                if (col) {
                    col.setSortDirection(columns[i].direction);
                }
                else {
                    this.parent.log('initial_action', { moduleName: 'sort', columnName: columns[i].field });
                    return query;
                }
                var fn = columns[i].direction;
                if (col.sortComparer) {
                    this.parent.log('grid_sort_comparer');
                    fn = !this.isRemote() ? col.sortComparer.bind(col) : columns[i].direction;
                }
                if (gObj.groupSettings.columns.indexOf(columns[i].field) === -1) {
                    query.sortBy(col.field, fn);
                }
                else {
                    sortGrp.push({ direction: fn, field: col.field });
                }
            }
            for (var i = 0, len = sortGrp.length; i < len; i++) {
                query.sortBy(sortGrp[i].field, sortGrp[i].direction);
            }
        }
        return query;
    };
    Data.prototype.searchQuery = function (query) {
        var _this = this;
        var sSettings = this.parent.searchSettings;
        var fields = sSettings.fields.length ? sSettings.fields : this.getSearchColumnFieldNames();
        var predicateList = [];
        var needForeignKeySearch = false;
        if (this.parent.searchSettings.key.length) {
            needForeignKeySearch = this.parent.getForeignKeyColumns().some(function (col) { return fields.indexOf(col.field) > -1; });
            if (needForeignKeySearch && !(this.dataManager.adaptor.getModulename &&
                this.dataManager.adaptor.getModulename() === 'ODataV4Adaptor')) {
                fields.forEach(function (columnName) {
                    var column = _this.getColumnByField(columnName);
                    if (column.isForeignColumn()) {
                        predicateList = _this.fGeneratePredicate(column, predicateList);
                    }
                    else {
                        predicateList.push(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](column.field, sSettings.operator, sSettings.key, sSettings.ignoreCase, sSettings.ignoreAccent));
                    }
                });
                query.where(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"].or(predicateList));
            }
            else {
                query.search(sSettings.key, fields, sSettings.operator, sSettings.ignoreCase, sSettings.ignoreAccent);
            }
        }
        return query;
    };
    Data.prototype.filterQuery = function (query, column, skipFoerign) {
        var gObj = this.parent;
        var predicateList = [];
        var fPredicate = {};
        var actualFilter = [];
        var foreignColumn = this.parent.getForeignKeyColumns();
        if (gObj.allowFiltering && gObj.filterSettings.columns.length) {
            var columns = column ? column : gObj.filterSettings.columns;
            var colType = {};
            for (var _i = 0, _a = gObj.getColumns(); _i < _a.length; _i++) {
                var col = _a[_i];
                colType[col.field] = col.filter.type ? col.filter.type : gObj.filterSettings.type;
            }
            var checkBoxCols = [];
            var defaultFltrCols = [];
            for (var _b = 0, columns_1 = columns; _b < columns_1.length; _b++) {
                var col = columns_1[_b];
                if (colType[col.field] === 'CheckBox' || colType[col.field] === 'Excel') {
                    checkBoxCols.push(col);
                }
                else {
                    defaultFltrCols.push(col);
                }
            }
            if (checkBoxCols.length) {
                var excelPredicate = _actions_checkbox_filter__WEBPACK_IMPORTED_MODULE_5__["CheckBoxFilter"].getPredicate(checkBoxCols);
                for (var _c = 0, _d = Object.keys(excelPredicate); _c < _d.length; _c++) {
                    var prop = _d[_c];
                    var col = void 0;
                    if (this.parent.getColumnByField(prop).isForeignColumn()) {
                        col = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getColumnByForeignKeyValue"])(prop, foreignColumn);
                    }
                    if (!col) {
                        this.parent.log('initial_action', { moduleName: 'filter', columnName: prop });
                    }
                    if (col && !skipFoerign) {
                        predicateList = this.fGeneratePredicate(col, predicateList);
                        actualFilter.push(col);
                    }
                    else {
                        predicateList.push(excelPredicate[prop]);
                    }
                }
            }
            if (defaultFltrCols.length) {
                for (var _e = 0, defaultFltrCols_1 = defaultFltrCols; _e < defaultFltrCols_1.length; _e++) {
                    var col = defaultFltrCols_1[_e];
                    col.uid = col.uid || this.parent.getColumnByField(col.field).uid;
                    var column_1 = this.parent.getColumnByUid(col.uid);
                    if (!column_1) {
                        this.parent.log('initial_action', { moduleName: 'filter', columnName: col.field });
                    }
                    var sType = column_1.type;
                    if (column_1.isForeignColumn() && Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getColumnByForeignKeyValue"])(col.field, foreignColumn) && !skipFoerign) {
                        actualFilter.push(col);
                        predicateList = this.fGeneratePredicate(column_1, predicateList);
                    }
                    else {
                        if (sType !== 'date' && sType !== 'datetime') {
                            predicateList.push(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](col.field, col.operator, col.value, !col.matchCase, this.parent.filterSettings.ignoreAccent));
                        }
                        else {
                            predicateList.push(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getDatePredicate"])(col, sType));
                        }
                    }
                }
            }
            if (predicateList.length) {
                query.where(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"].and(predicateList));
            }
            else {
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["showEmptyGrid"], {});
            }
        }
        return query;
    };
    Data.prototype.fGeneratePredicate = function (col, predicateList) {
        var fPredicate = {};
        if (col) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["generateQuery"], { predicate: fPredicate, column: col });
            if (fPredicate.predicate.predicates.length) {
                predicateList.push(fPredicate.predicate);
            }
        }
        return predicateList;
    };
    /**
     * The function is used to get dataManager promise by executing given Query.
     * @param  {Query} query - Defines the query which will execute along with data processing.
     * @return {Promise<Object>}
     * @hidden
     */
    Data.prototype.getData = function (args, query) {
        var _this = this;
        if (args === void 0) { args = { requestType: '' }; }
        var key = this.getKey(args.foreignKeyData &&
            Object.keys(args.foreignKeyData).length ?
            args.foreignKeyData : this.parent.getPrimaryKeyFieldNames());
        if (this.parent.dataSource && 'result' in this.parent.dataSource) {
            var def = this.eventPromise(args, query, key);
            return def.promise;
        }
        else {
            var crud = void 0;
            switch (args.requestType) {
                case 'delete':
                    query = query ? query : this.generateQuery();
                    var len = Object.keys(args.data).length;
                    if (len === 1) {
                        crud = this.dataManager.remove(key, args.data[0], query.fromTable, query);
                    }
                    else {
                        var changes = {
                            addedRecords: [],
                            deletedRecords: [],
                            changedRecords: []
                        };
                        changes.deletedRecords = args.data;
                        crud = this.dataManager.saveChanges(changes, key, query.fromTable, query.requiresCount());
                    }
                    break;
                case 'save':
                    query = query ? query : this.generateQuery();
                    args.index = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.index) ? 0 : args.index;
                    crud = this.dataManager.insert(args.data, query.fromTable, query, args.index);
                    break;
            }
            if (crud && !Array.isArray(crud) && !crud.hasOwnProperty('deletedRecords')) {
                return crud.then(function (result) {
                    return _this.insert(query, args);
                });
            }
            else {
                return this.insert(query, args);
            }
        }
    };
    Data.prototype.insert = function (query, args) {
        if (args.requestType === 'save') {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["recordAdded"], args);
        }
        return this.executeQuery(query);
    };
    Data.prototype.executeQuery = function (query) {
        var _this = this;
        if (this.dataManager.ready) {
            var deferred_1 = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Deferred"]();
            var ready = this.dataManager.ready;
            ready.then(function (e) {
                _this.dataManager.executeQuery(query).then(function (result) {
                    deferred_1.resolve(result);
                });
            }).catch(function (e) {
                deferred_1.reject(e);
            });
            return deferred_1.promise;
        }
        else {
            return this.dataManager.executeQuery(query);
        }
    };
    Data.prototype.formatGroupColumn = function (value, field) {
        var gObj = this.parent;
        var serviceLocator = this.serviceLocator;
        var column = this.getColumnByField(field);
        var date = value;
        if (!column.type) {
            column.type = date.getDay ? (date.getHours() > 0 || date.getMinutes() > 0 ||
                date.getSeconds() > 0 || date.getMilliseconds() > 0 ? 'datetime' : 'date') : typeof (value);
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.getFormatter())) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["setFormatter"])(serviceLocator, column);
        }
        var formatVal = _services_value_formatter__WEBPACK_IMPORTED_MODULE_4__["ValueFormatter"].prototype.toView(value, column.getFormatter());
        return formatVal;
    };
    Data.prototype.crudActions = function (args) {
        var query = this.generateQuery();
        var promise = null;
        var pr = 'promise';
        var key = this.getKey(args.foreignKeyData &&
            Object.keys(args.foreignKeyData).length ? args.foreignKeyData :
            this.parent.getPrimaryKeyFieldNames());
        if (this.parent.dataSource && 'result' in this.parent.dataSource) {
            this.eventPromise(args, query, key);
        }
        switch (args.requestType) {
            case 'save':
                promise = this.dataManager.update(key, args.data, query.fromTable, query, args.previousData);
                break;
        }
        args[pr] = promise ? promise : args[pr];
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["crudAction"], args);
    };
    /** @hidden */
    Data.prototype.saveChanges = function (changes, key, original) {
        var query = this.generateQuery().requiresCount();
        if ('result' in this.parent.dataSource) {
            var state = void 0;
            state = this.getStateEventArgument(query);
            var deff = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Deferred"]();
            var args = {
                requestType: 'batchsave', changes: changes, key: key, query: query,
                endEdit: deff.resolve
            };
            this.setState({ isPending: true, resolver: deff.resolve });
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataSourceChanged"], args);
            return deff.promise;
        }
        else {
            var promise = this.dataManager.saveChanges(changes, key, query.fromTable, query, original);
            return promise;
        }
    };
    Data.prototype.getKey = function (keys) {
        if (keys && keys.length) {
            return keys[0];
        }
        return undefined;
    };
    /** @hidden */
    Data.prototype.isRemote = function () {
        return this.dataManager.dataSource.offline !== true && this.dataManager.dataSource.url !== undefined &&
            this.dataManager.dataSource.url !== '';
    };
    Data.prototype.addRows = function (e) {
        for (var i = e.records.length; i > 0; i--) {
            this.dataManager.dataSource.json.splice(e.toIndex, 0, e.records[i - 1]);
        }
    };
    Data.prototype.removeRows = function (e) {
        var json = this.dataManager.dataSource.json;
        this.dataManager.dataSource.json = json.filter(function (value, index) { return e.records.indexOf(value) === -1; });
    };
    Data.prototype.getColumnByField = function (field) {
        var col;
        return (this.parent.columnModel).some(function (column) {
            col = column;
            return column.field === field;
        }) && col;
    };
    Data.prototype.destroy = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowsAdded"], this.addRows);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowsRemoved"], this.removeRows);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataSourceModified"], this.initDataManager);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["destroy"], this.destroy);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["updateData"], this.crudActions);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["addDeleteAction"], this.getData);
    };
    Data.prototype.getState = function () {
        return this.dataState;
    };
    Data.prototype.setState = function (state) {
        return this.dataState = state;
    };
    Data.prototype.getStateEventArgument = function (query) {
        var adaptr = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["UrlAdaptor"]();
        var dm = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]({ url: '', adaptor: new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["UrlAdaptor"] });
        var state = adaptr.processQuery(dm, query);
        var data = JSON.parse(state.data);
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(data, state.pvtData);
    };
    Data.prototype.eventPromise = function (args, query, key) {
        var _this = this;
        var state;
        var dataArgs = args;
        state = this.getStateEventArgument(query);
        var def = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Deferred"]();
        var deff = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Deferred"]();
        if (args.requestType !== undefined && this.dataState.isDataChanged !== false) {
            state.action = args;
            if (args.requestType === 'save' || args.requestType === 'delete') {
                var editArgs = args;
                editArgs.key = key;
                var promise = 'promise';
                editArgs[promise] = deff.promise;
                editArgs.state = state;
                this.setState({ isPending: true, resolver: deff.resolve });
                dataArgs.endEdit = deff.resolve;
                dataArgs.cancelEdit = deff.reject;
                this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataSourceChanged"], editArgs);
                deff.promise.then(function (e) {
                    _this.setState({ isPending: true, resolver: def.resolve, group: state.group, aggregates: state.aggregates });
                    _this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataStateChange"], state);
                })
                    .catch(function () { return void 0; });
            }
            else {
                this.setState({ isPending: true, resolver: def.resolve, group: state.group, aggregates: state.aggregates });
                this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataStateChange"], state);
            }
        }
        else {
            this.setState({});
            def.resolve(this.parent.dataSource);
        }
        return def;
    };
    /**
     * Gets the columns where searching needs to be performed from the Grid.
     * @return {string[]}
     */
    Data.prototype.getSearchColumnFieldNames = function () {
        var colFieldNames = [];
        var columns = this.parent.getColumns();
        for (var _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {
            var col = columns_2[_i];
            if (col.allowSearching && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.field)) {
                colFieldNames.push(col.field);
            }
        }
        return colFieldNames;
    };
    return Data;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/detail-row.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/detail-row.js ***!
  \***************************************************************************/
/*! exports provided: DetailRow */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DetailRow", function() { return DetailRow; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/grid */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _services_aria_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/aria-service */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/aria-service.js");
/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony import */ var _models_cell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../models/cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");









/**
 * The `DetailRow` module is used to handle detail template and hierarchy Grid operations.
 */
var DetailRow = /** @class */ (function () {
    /**
     * Constructor for the Grid detail template module
     * @hidden
     */
    function DetailRow(parent, locator) {
        //Internal variables
        this.aria = new _services_aria_service__WEBPACK_IMPORTED_MODULE_4__["AriaService"]();
        this.parent = parent;
        if (this.parent.isDestroyed) {
            return;
        }
        this.focus = locator.getService('focus');
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.clickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["destroy"], this.destroy, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["keyPressed"], this.keyPressHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["expandChildGrid"], this.expand, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["columnVisibilityChanged"], this.refreshColSpan, this);
    }
    DetailRow.prototype.clickHandler = function (e) {
        this.toogleExpandcollapse(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'td'));
    };
    // tslint:disable-next-line:max-func-body-length
    DetailRow.prototype.toogleExpandcollapse = function (target) {
        var gObj = this.parent;
        var parent = 'parentDetails';
        var childGrid;
        if (!(target && (target.classList.contains('e-detailrowcollapse') || target.classList.contains('e-detailrowexpand')))) {
            return;
        }
        var tr = target.parentElement;
        var uid = tr.getAttribute('data-uid');
        var rowObj = gObj.getRowObjectFromUID(uid);
        var nextRow = this.parent.getContentTable().querySelector('tbody').children[tr.rowIndex + 1];
        if (target.classList.contains('e-detailrowcollapse')) {
            var data = rowObj.data;
            if (this.isDetailRow(nextRow)) {
                nextRow.style.display = '';
            }
            else if (gObj.getDetailTemplate() || gObj.childGrid) {
                var rowId = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getUid"])('grid-row');
                var detailRow = this.parent.createElement('tr', { className: 'e-detailrow', attrs: { 'data-uid': rowId } });
                var detailCell = this.parent.createElement('td', { className: 'e-detailcell' });
                detailCell.setAttribute('colspan', this.parent.getVisibleColumns().length.toString());
                var row = new _models_row__WEBPACK_IMPORTED_MODULE_5__["Row"]({
                    isDataRow: true,
                    isExpand: true,
                    uid: rowId,
                    isDetailRow: true,
                    cells: [new _models_cell__WEBPACK_IMPORTED_MODULE_6__["Cell"]({ cellType: _base_enum__WEBPACK_IMPORTED_MODULE_7__["CellType"].Indent }), new _models_cell__WEBPACK_IMPORTED_MODULE_6__["Cell"]({ isDataCell: true, visible: true })]
                });
                for (var i = 0, len = gObj.groupSettings.columns.length; i < len; i++) {
                    detailRow.appendChild(this.parent.createElement('td', { className: 'e-indentcell' }));
                    row.cells.unshift(new _models_cell__WEBPACK_IMPORTED_MODULE_6__["Cell"]({ cellType: _base_enum__WEBPACK_IMPORTED_MODULE_7__["CellType"].Indent }));
                }
                detailRow.appendChild(this.parent.createElement('td', { className: 'e-detailindentcell' }));
                detailRow.appendChild(detailCell);
                tr.parentNode.insertBefore(detailRow, tr.nextSibling);
                if (gObj.detailTemplate) {
                    var detailTemplateID = gObj.element.id + 'detailTemplate';
                    Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["appendChildren"])(detailCell, gObj.getDetailTemplate()(data, gObj, 'detailTemplate', detailTemplateID));
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(detailTemplateID, 'DetailTemplate');
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(detailTemplateID, 'DetailTemplate', gObj, false);
                    }
                }
                else {
                    childGrid = new _base_grid__WEBPACK_IMPORTED_MODULE_1__["Grid"](this.getGridModel(gObj, rowObj, gObj.printMode));
                    if (childGrid.query) {
                        childGrid.query = childGrid.query.clone();
                    }
                    childGrid[parent] = {
                        parentID: gObj.element.id,
                        parentPrimaryKeys: gObj.getPrimaryKeyFieldNames(),
                        parentKeyField: gObj.childGrid.queryString,
                        parentKeyFieldValue: data[gObj.childGrid.queryString],
                        parentRowData: data
                    };
                    if (gObj.isPrinting) {
                        childGrid.isPrinting = true;
                        childGrid.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], this.promiseResolve(childGrid), this);
                        childGrid.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["onEmpty"], this.promiseResolve(childGrid), this);
                    }
                    rowObj.childGrid = childGrid;
                    var modules = childGrid.getInjectedModules();
                    var injectedModues = gObj.getInjectedModules();
                    if (!modules || modules.length !== injectedModues.length) {
                        childGrid.setInjectedModules(injectedModues);
                    }
                    var gridElem = this.parent.createElement('div', {
                        id: 'child' + Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parents"])(tr, 'e-grid').length +
                            '_grid' + tr.rowIndex + Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getUid"])('')
                    });
                    detailCell.appendChild(gridElem);
                    childGrid.appendTo(gridElem);
                }
                detailRow.appendChild(detailCell);
                if (tr.nextSibling) {
                    tr.parentNode.insertBefore(detailRow, tr.nextSibling);
                }
                else {
                    tr.parentNode.appendChild(detailRow);
                }
                gObj.getRows().splice(tr.rowIndex + 1, 0, detailRow);
                gObj.getRowsObject().splice(rowObj.index + 1, 0, row);
                gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["detailDataBound"], { detailElement: detailCell, data: data, childGrid: childGrid });
                gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["detailDataBound"], { rows: gObj.getRowsObject() });
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(target, ['e-detailrowexpand'], ['e-detailrowcollapse']);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(target.firstElementChild, ['e-dtdiagonaldown', 'e-icon-gdownarrow'], ['e-dtdiagonalright', 'e-icon-grightarrow']);
            rowObj.isExpand = true;
            this.aria.setExpand(target, true);
        }
        else {
            if (this.isDetailRow(nextRow)) {
                nextRow.style.display = 'none';
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(target, ['e-detailrowcollapse'], ['e-detailrowexpand']);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(target.firstElementChild, ['e-dtdiagonalright', 'e-icon-grightarrow'], ['e-dtdiagonaldown', 'e-icon-gdownarrow']);
            rowObj.isExpand = false;
            this.aria.setExpand(target, false);
        }
    };
    /**
     * @hidden
     * @param gObj
     * @param rowObj
     */
    DetailRow.prototype.getGridModel = function (gObj, rowObj, printMode) {
        var gridModel;
        if (gObj.isPrinting && rowObj.isExpand && gObj.expandedRows &&
            gObj.expandedRows[rowObj.index] && gObj.expandedRows[rowObj.index].gridModel) {
            gObj.expandedRows[rowObj.index].gridModel.hierarchyPrintMode = gObj.childGrid.hierarchyPrintMode;
            gridModel = gObj.expandedRows[rowObj.index].gridModel;
        }
        else {
            if (gObj.isPrinting && gObj.childGrid.allowPaging) {
                gObj.childGrid.allowPaging = printMode === 'CurrentPage';
                gridModel = gObj.childGrid;
            }
            else {
                gridModel = gObj.childGrid;
            }
        }
        return gridModel;
    };
    DetailRow.prototype.promiseResolve = function (grid) {
        var _this = this;
        return function () {
            grid.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], _this.promiseResolve);
            grid.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["onEmpty"], _this.promiseResolve);
            grid.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["hierarchyPrint"], {});
        };
    };
    DetailRow.prototype.isDetailRow = function (row) {
        return row && row.classList.contains('e-detailrow');
    };
    DetailRow.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (this.parent.isDestroyed || !gridElement || (!gridElement.querySelector('.e-gridheader') &&
            !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.clickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["destroy"], this.destroy);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["keyPressed"], this.keyPressHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["expandChildGrid"], this.expand);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["columnVisibilityChanged"], this.refreshColSpan);
    };
    DetailRow.prototype.getTDfromIndex = function (index, className) {
        var tr = this.parent.getDataRows()[index];
        if (tr && tr.querySelector(className)) {
            return tr.querySelector(className);
        }
        return null;
    };
    /**
     * Expands a detail row with the given target.
     * @param  {Element} target - Defines the collapsed element to expand.
     * @return {void}
     */
    DetailRow.prototype.expand = function (target) {
        if (!isNaN(target)) {
            target = this.getTDfromIndex(target, '.e-detailrowcollapse');
        }
        if (target && target.classList.contains('e-detailrowcollapse')) {
            this.toogleExpandcollapse(target);
        }
    };
    /**
     * Collapses a detail row with the given target.
     * @param  {Element} target - Defines the expanded element to collapse.
     * @return {void}
     */
    DetailRow.prototype.collapse = function (target) {
        if (!isNaN(target)) {
            target = this.getTDfromIndex(target, '.e-detailrowexpand');
        }
        if (target && target.classList.contains('e-detailrowexpand')) {
            this.toogleExpandcollapse(target);
        }
    };
    /**
     * Expands all the detail rows of the Grid.
     * @return {void}
     */
    DetailRow.prototype.expandAll = function () {
        this.expandCollapse(true);
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"], { requestType: 'expandAllComplete', type: _base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"], moduleObj: this });
    };
    /**
     * Collapses all the detail rows of the Grid.
     * @return {void}
     */
    DetailRow.prototype.collapseAll = function () {
        this.expandCollapse(false);
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"], { requestType: 'collapseAllComplete', type: _base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"], moduleObj: this });
    };
    DetailRow.prototype.expandCollapse = function (isExpand) {
        var td;
        var rows = this.parent.getDataRows();
        for (var i = 0, len = rows.length; i < len; i++) {
            td = rows[i].querySelector('.e-detailrowcollapse, .e-detailrowexpand');
            isExpand ? this.expand(td) : this.collapse(td);
        }
    };
    DetailRow.prototype.keyPressHandler = function (e) {
        var gObj = this.parent;
        switch (e.action) {
            case 'ctrlDownArrow':
                this.expandAll();
                break;
            case 'ctrlUpArrow':
                this.collapseAll();
                break;
            case 'altUpArrow':
            case 'altDownArrow':
                var selected = gObj.allowSelection ? gObj.getSelectedRowIndexes() : [];
                if (selected.length) {
                    var dataRow = gObj.getDataRows()[selected[selected.length - 1]];
                    var td = dataRow.querySelector('.e-detailrowcollapse, .e-detailrowexpand');
                    e.action === 'altDownArrow' ? this.expand(td) : this.collapse(td);
                }
                break;
            case 'enter':
                if (this.parent.isEdit) {
                    return;
                }
                var element = this.focus.getFocusedElement();
                if (!e.target.classList.contains('e-detailrowcollapse') &&
                    !e.target.classList.contains('e-detailrowexpand')) {
                    break;
                }
                this.toogleExpandcollapse(element);
                break;
        }
    };
    DetailRow.prototype.refreshColSpan = function () {
        var detailrows = this.parent.contentModule.getTable().querySelectorAll('tr.e-detailrow');
        var colSpan = this.parent.getVisibleColumns().length;
        detailrows.forEach(function (detailrow) {
            detailrow.querySelector('.e-detailcell').setAttribute('colspan', colSpan + '');
        });
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    DetailRow.prototype.getModuleName = function () {
        return 'detailRow';
    };
    return DetailRow;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/dialog-edit.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/dialog-edit.js ***!
  \****************************************************************************/
/*! exports provided: DialogEdit */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DialogEdit", function() { return DialogEdit; });
/* harmony import */ var _normal_edit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./normal-edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/normal-edit.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * `DialogEdit` module is used to handle dialog editing actions.
 * @hidden
 */
var DialogEdit = /** @class */ (function (_super) {
    __extends(DialogEdit, _super);
    function DialogEdit(parent, serviceLocator, renderer) {
        var _this = 
        //constructor
        _super.call(this, parent, serviceLocator) || this;
        _this.parent = parent;
        _this.serviceLocator = serviceLocator;
        _this.renderer = renderer;
        return _this;
    }
    DialogEdit.prototype.closeEdit = function () {
        //closeEdit
        _super.prototype.closeEdit.call(this);
    };
    DialogEdit.prototype.addRecord = function (data, index) {
        //addRecord
        _super.prototype.addRecord.call(this, data, index);
    };
    DialogEdit.prototype.endEdit = function () {
        //endEdit
        _super.prototype.endEdit.call(this);
    };
    DialogEdit.prototype.updateRow = function (index, data) {
        _super.prototype.updateRow.call(this, index, data);
    };
    DialogEdit.prototype.deleteRecord = function (fieldname, data) {
        //deleteRecord
        _super.prototype.deleteRecord.call(this, fieldname, data);
    };
    DialogEdit.prototype.startEdit = function (tr) {
        _super.prototype.startEdit.call(this, tr);
    };
    return DialogEdit;
}(_normal_edit__WEBPACK_IMPORTED_MODULE_0__["NormalEdit"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/edit.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/edit.js ***!
  \*********************************************************************/
/*! exports provided: Edit, Global */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Edit", function() { return Edit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Global", function() { return Global; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _renderer_edit_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../renderer/edit-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/edit-renderer.js");
/* harmony import */ var _renderer_boolean_edit_cell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../renderer/boolean-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-edit-cell.js");
/* harmony import */ var _renderer_dropdown_edit_cell__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../renderer/dropdown-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dropdown-edit-cell.js");
/* harmony import */ var _renderer_numeric_edit_cell__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../renderer/numeric-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/numeric-edit-cell.js");
/* harmony import */ var _renderer_default_edit_cell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../renderer/default-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/default-edit-cell.js");
/* harmony import */ var _inline_edit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./inline-edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/inline-edit.js");
/* harmony import */ var _batch_edit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./batch-edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/batch-edit.js");
/* harmony import */ var _dialog_edit__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./dialog-edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/dialog-edit.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _renderer_datepicker_edit_cell__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../renderer/datepicker-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/datepicker-edit-cell.js");
/* harmony import */ var _renderer_template_edit_cell__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../renderer/template-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/template-edit-cell.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");




















/**
 * The `Edit` module is used to handle editing actions.
 */
var Edit = /** @class */ (function () {
    /**
     * Constructor for the Grid editing module
     * @hidden
     */
    function Edit(parent, serviceLocator) {
        this.editType = { 'Inline': _inline_edit__WEBPACK_IMPORTED_MODULE_7__["InlineEdit"], 'Normal': _inline_edit__WEBPACK_IMPORTED_MODULE_7__["InlineEdit"], 'Batch': _batch_edit__WEBPACK_IMPORTED_MODULE_8__["BatchEdit"], 'Dialog': _dialog_edit__WEBPACK_IMPORTED_MODULE_9__["DialogEdit"] };
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        this.l10n = this.serviceLocator.getService('localization');
        this.addEventListener();
        this.updateEditObj();
        this.createAlertDlg();
        this.createConfirmDlg();
    }
    Edit.prototype.updateColTypeObj = function () {
        var _this = this;
        this.parent.columnModel.forEach(function (col) {
            if (_this.parent.editSettings.template || col.editTemplate) {
                var templteCell = 'templateedit';
                col.edit = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(new Edit.editCellType[templteCell](_this.parent), col.edit || {});
            }
            else {
                col.edit = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(new Edit.editCellType[col.editType && Edit.editCellType[col.editType] ?
                    col.editType : 'defaultedit'](_this.parent, _this.serviceLocator), col.edit || {});
            }
        });
        this.parent.log('primary_column_missing');
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Edit.prototype.getModuleName = function () {
        return 'edit';
    };
    /**
     * @hidden
     */
    Edit.prototype.onPropertyChanged = function (e) {
        if (e.module !== this.getModuleName()) {
            return;
        }
        var gObj = this.parent;
        var newProp = e.properties;
        for (var _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'allowAdding':
                case 'allowDeleting':
                case 'allowEditing':
                    if (gObj.editSettings.allowAdding || gObj.editSettings.allowEditing || gObj.editSettings.allowDeleting) {
                        this.initialEnd();
                    }
                    break;
                case 'mode':
                    this.updateEditObj();
                    gObj.isEdit = false;
                    gObj.refresh();
                    break;
            }
        }
    };
    Edit.prototype.updateEditObj = function () {
        if (this.editModule) {
            this.editModule.destroy();
        }
        this.renderer = new _renderer_edit_renderer__WEBPACK_IMPORTED_MODULE_2__["EditRender"](this.parent, this.serviceLocator);
        this.editModule = new this.editType[this.parent.editSettings.mode](this.parent, this.serviceLocator, this.renderer);
    };
    Edit.prototype.initialEnd = function () {
        this.updateColTypeObj();
    };
    Edit.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.getContent(), 'touchstart', this.tapEvent, this);
    };
    Edit.prototype.unwireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.getContent(), 'touchstart', this.tapEvent);
    };
    Edit.prototype.tapEvent = function (e) {
        if (this.getUserAgent()) {
            if (!Global.timer) {
                Global.timer = setTimeout(function () {
                    Global.timer = null;
                }, 300);
            }
            else {
                clearTimeout(Global.timer);
                Global.timer = null;
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_1__["doubleTap"], e);
            }
        }
    };
    Edit.prototype.getUserAgent = function () {
        var userAgent = window.navigator.userAgent.toLowerCase();
        return /iphone|ipod|ipad/.test(userAgent);
    };
    /**
     * Edits any bound record in the Grid by TR element.
     * @param {HTMLTableRowElement} tr - Defines the table row to be edited.
     */
    Edit.prototype.startEdit = function (tr) {
        var gObj = this.parent;
        if (!gObj.editSettings.allowEditing || gObj.isEdit || gObj.editSettings.mode === 'Batch') {
            return;
        }
        if (!gObj.getSelectedRows().length) {
            if (!tr) {
                this.showDialog('EditOperationAlert', this.alertDObj);
                return;
            }
        }
        else if (!tr) {
            tr = gObj.getSelectedRows()[0];
        }
        if (tr.style.display === 'none') {
            return;
        }
        this.editModule.startEdit(tr);
        this.refreshToolbar();
        gObj.element.querySelector('.e-gridpopup').style.display = 'none';
        this.parent.notify('start-edit', {});
    };
    /**
     * Cancels edited state.
     */
    Edit.prototype.closeEdit = function () {
        if (this.parent.editSettings.mode === 'Batch' && this.parent.editSettings.showConfirmDialog
            && this.parent.element.querySelectorAll('.e-updatedtd').length) {
            this.showDialog('CancelEdit', this.dialogObj);
            return;
        }
        this.editModule.closeEdit();
        this.refreshToolbar();
        this.parent.notify('close-edit', {});
    };
    Edit.prototype.refreshToolbar = function () {
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_1__["toolbarRefresh"], {});
    };
    /**
     * To adds a new row at the top with the given data. When data is not passed, it will add empty rows.
     * > `editSettings.allowEditing` should be true.
     * @param {Object} data - Defines the new add record data.
     * @param {number} index - Defines the row index to be added
     */
    Edit.prototype.addRecord = function (data, index) {
        if (!this.parent.editSettings.allowAdding) {
            return;
        }
        this.editModule.addRecord(data, index);
        this.refreshToolbar();
        this.parent.notify('start-add', {});
    };
    /**
     * Deletes a record with the given options. If fieldname and data are not given, the Grid will delete the selected record.
     * > `editSettings.allowDeleting` should be true.
     * @param {string} fieldname - Defines the primary key field name of the column.
     * @param {Object} data - Defines the JSON data record to be deleted.
     */
    Edit.prototype.deleteRecord = function (fieldname, data) {
        var gObj = this.parent;
        if (!gObj.editSettings.allowDeleting) {
            return;
        }
        if (!data) {
            if (!gObj.getSelectedRecords().length) {
                this.showDialog('DeleteOperationAlert', this.alertDObj);
                return;
            }
        }
        if (gObj.editSettings.showDeleteConfirmDialog) {
            this.showDialog('ConfirmDelete', this.dialogObj);
            return;
        }
        this.editModule.deleteRecord(fieldname, data);
    };
    /**
     * Deletes a visible row by TR element.
     * @param {HTMLTableRowElement} tr - Defines the table row element.
     */
    Edit.prototype.deleteRow = function (tr) {
        this.deleteRecord(null, this.parent.getCurrentViewRecords()[parseInt(tr.getAttribute('aria-rowindex'), 10)]);
    };
    /**
     * If Grid is in editable state, you can save a record by invoking endEdit.
     */
    Edit.prototype.endEdit = function () {
        if (this.parent.editSettings.mode === 'Batch' && this.parent.editSettings.showConfirmDialog &&
            (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formObj) || this.formObj.validate())) {
            this.parent.editModule.saveCell();
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_1__["editNextValCell"], {});
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formObj) || this.formObj.validate()) {
                this.showDialog('BatchSaveConfirm', this.dialogObj);
                return;
            }
        }
        this.endEditing();
    };
    /**
     * To update the specified cell by given value without changing into edited state.
     * @param {number} rowIndex Defines the row index.
     * @param {string} field Defines the column field.
     * @param {string | number | boolean | Date} value - Defines the value to be changed.
     */
    Edit.prototype.updateCell = function (rowIndex, field, value) {
        this.editModule.updateCell(rowIndex, field, value);
    };
    /**
     * To update the specified row by given values without changing into edited state.
     * @param {number} index Defines the row index.
     * @param {Object} data Defines the data object to be updated.
     */
    Edit.prototype.updateRow = function (index, data) {
        this.editModule.updateRow(index, data);
    };
    /**
     * Resets added, edited, and deleted records in the batch mode.
     */
    Edit.prototype.batchCancel = function () {
        this.closeEdit();
    };
    /**
     * Bulk saves added, edited, and deleted records in the batch mode.
     */
    Edit.prototype.batchSave = function () {
        this.endEdit();
    };
    /**
     * Changes a particular cell into edited state based on the row index and field name provided in the `batch` mode.
     * @param {number} index - Defines row index to edit a particular cell.
     * @param {string} field - Defines the field name of the column to perform batch edit.
     */
    Edit.prototype.editCell = function (index, field) {
        this.editModule.editCell(index, field);
    };
    /**
     * Checks the status of validation at the time of editing. If validation is passed, it returns true.
     * @return {boolean}
     */
    Edit.prototype.editFormValidate = function () {
        if (this.formObj) {
            return this.formObj.validate();
        }
        return false;
    };
    /**
     * Gets the added, edited,and deleted data before bulk save to the DataSource in batch mode.
     * @return {Object}
     */
    Edit.prototype.getBatchChanges = function () {
        return this.editModule.getBatchChanges ? this.editModule.getBatchChanges() : {};
    };
    /**
     * Gets the current value of the edited component.
     */
    Edit.prototype.getCurrentEditCellData = function () {
        var obj = this.getCurrentEditedData(this.formObj.element, {});
        return obj[Object.keys(obj)[0]];
    };
    /**
     * Saves the cell that is currently edited. It does not save the value to the DataSource.
     */
    Edit.prototype.saveCell = function () {
        this.editModule.saveCell();
    };
    Edit.prototype.endEditing = function () {
        this.editModule.endEdit();
        this.refreshToolbar();
    };
    Edit.prototype.showDialog = function (content, obj) {
        obj.content = '<div>' + this.l10n.getConstant(content) + '</div>';
        obj.dataBind();
        obj.show();
    };
    Edit.prototype.getValueFromType = function (col, value) {
        var val = value;
        switch (col.type) {
            case 'number':
                val = !isNaN(parseFloat(value)) ? parseFloat(value) : null;
                break;
            case 'boolean':
                if (col.editType !== 'booleanedit') {
                    val = value === this.l10n.getConstant('True') || value === true ? true : false;
                }
                break;
            case 'date':
            case 'datetime':
                if (col.editType !== 'datepickeredit' && col.editType !== 'datetimepickeredit' && value && value.length) {
                    val = new Date(value);
                }
                else if (value === '') {
                    val = null;
                }
                break;
        }
        return val;
    };
    Edit.prototype.destroyToolTip = function () {
        var elements = [].slice.call(this.parent.element.querySelectorAll('.e-griderror'));
        for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
            var elem = elements_1[_i];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(elem);
        }
        this.parent.getContent().firstElementChild.style.position = 'relative';
    };
    Edit.prototype.createConfirmDlg = function () {
        this.dialogObj = this.dlgWidget([
            {
                click: this.dlgOk.bind(this),
                buttonModel: { content: this.l10n.getConstant('OKButton'), cssClass: 'e-primary', isPrimary: true }
            },
            {
                click: this.dlgCancel.bind(this),
                buttonModel: { cssClass: 'e-flat', content: this.l10n.getConstant('CancelButton') }
            }
        ], 'EditConfirm');
    };
    Edit.prototype.createAlertDlg = function () {
        this.alertDObj = this.dlgWidget([
            {
                click: this.alertClick.bind(this), buttonModel: { content: this.l10n.getConstant('OKButton'), cssClass: 'e-flat', isPrimary: true }
            }
        ], 'EditAlert');
    };
    Edit.prototype.alertClick = function () {
        this.alertDObj.hide();
    };
    Edit.prototype.dlgWidget = function (btnOptions, name) {
        var div = this.parent.createElement('div', { id: this.parent.element.id + name });
        this.parent.element.appendChild(div);
        var options = {
            showCloseIcon: false,
            isModal: true,
            visible: false,
            closeOnEscape: true,
            target: this.parent.element,
            width: '320px',
            animationSettings: { effect: 'None' }
        };
        options.buttons = btnOptions;
        var obj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_10__["Dialog"](options);
        var isStringTemplate = 'isStringTemplate';
        obj[isStringTemplate] = true;
        obj.appendTo(div);
        return obj;
    };
    Edit.prototype.dlgCancel = function () {
        this.dialogObj.hide();
    };
    Edit.prototype.dlgOk = function (e) {
        switch (this.dialogObj.element.querySelector('.e-dlg-content').firstElementChild.innerText) {
            case this.l10n.getConstant('ConfirmDelete'):
                this.editModule.deleteRecord();
                break;
            case this.l10n.getConstant('CancelEdit'):
                this.editModule.closeEdit();
                break;
            case this.l10n.getConstant('BatchSaveConfirm'):
                this.endEditing();
                break;
            case this.l10n.getConstant('BatchSaveLostChanges'):
                if (this.parent.editSettings.mode === 'Batch') {
                    this.editModule.addCancelWhilePaging();
                }
                this.executeAction();
                break;
        }
        this.dlgCancel();
    };
    /**
     * @hidden
     */
    Edit.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["inBoundModelChanged"], this.onPropertyChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["initialEnd"], this.initialEnd, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["keyPressed"], this.keyPressHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["autoCol"], this.updateColTypeObj, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["tooltipDestroy"], this.destroyToolTip, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["preventBatch"], this.preventBatch, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["destroyForm"], this.destroyForm, this);
        this.actionBeginFunction = this.onActionBegin.bind(this);
        this.actionCompleteFunction = this.actionComplete.bind(this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_1__["actionBegin"], this.actionBeginFunction);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_1__["actionComplete"], this.actionCompleteFunction);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["initialEnd"], this.wireEvents, this);
    };
    /**
     * @hidden
     */
    Edit.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["inBoundModelChanged"], this.onPropertyChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["initialEnd"], this.initialEnd);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["keyPressed"], this.keyPressHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["autoCol"], this.updateColTypeObj);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["tooltipDestroy"], this.destroyToolTip);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["preventBatch"], this.preventBatch);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["destroyForm"], this.destroyForm);
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_1__["actionComplete"], this.actionCompleteFunction);
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_1__["actionBegin"], this.actionBeginFunction);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["initialEnd"], this.unwireEvents);
    };
    Edit.prototype.actionComplete = function (e) {
        var actions = ['add', 'beginEdit', 'save', 'delete', 'cancel'];
        if (actions.indexOf(e.requestType) < 0) {
            this.parent.isEdit = false;
        }
        this.refreshToolbar();
    };
    /**
     * @hidden
     */
    Edit.prototype.getCurrentEditedData = function (form, editedData) {
        var _this = this;
        var gObj = this.parent;
        if (gObj.editSettings.template) {
            [].slice.call(form.elements).forEach(function (element) {
                if (element.hasAttribute('name')) {
                    var field = Object(_base_util__WEBPACK_IMPORTED_MODULE_11__["setComplexFieldID"])(element.getAttribute('name'));
                    var column = gObj.getColumnByField(field) || { field: field, type: element.getAttribute('type') };
                    var value = void 0;
                    if (column.type === 'checkbox' || column.type === 'boolean') {
                        value = element.checked;
                    }
                    else if (element.value) {
                        value = element.value;
                        if (element.ej2_instances &&
                            element.ej2_instances.length &&
                            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element.ej2_instances[0].value)) {
                            element.blur();
                            value = element.ej2_instances[0].value;
                        }
                    }
                    if (column.edit && typeof column.edit.read === 'string') {
                        value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(column.edit.read, window)(element, value);
                    }
                    else if (column.edit && column.edit.read) {
                        value = column.edit.read(element, value);
                    }
                    value = gObj.editModule.getValueFromType(column, value);
                    _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_15__["DataUtil"].setValue(column.field, value, editedData);
                }
            });
            return editedData;
        }
        gObj.columnModel.filter(function (col) { return col.editTemplate; }).forEach(function (col) {
            if (form[Object(_base_util__WEBPACK_IMPORTED_MODULE_11__["getComplexFieldID"])(col.field)]) {
                var inputElements = [].slice.call(form[Object(_base_util__WEBPACK_IMPORTED_MODULE_11__["getComplexFieldID"])(col.field)]);
                inputElements = inputElements.length ? inputElements : [form[Object(_base_util__WEBPACK_IMPORTED_MODULE_11__["getComplexFieldID"])(col.field)]];
                inputElements.forEach(function (input) {
                    var value = _this.getValue(col, input, editedData);
                    _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_15__["DataUtil"].setValue(col.field, value, editedData);
                });
            }
        });
        var inputs = [].slice.call(form.querySelectorAll('.e-field'));
        for (var i = 0, len = inputs.length; i < len; i++) {
            var col = gObj.getColumnByUid(inputs[i].getAttribute('e-mappinguid'));
            if (col && col.field) {
                var value = this.getValue(col, inputs[i], editedData);
                _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_15__["DataUtil"].setValue(col.field, value, editedData);
            }
        }
        return editedData;
    };
    Edit.prototype.getValue = function (col, input, editedData) {
        var value = input.value;
        var gObj = this.parent;
        var temp = col.edit.read;
        if (col.type === 'checkbox' || col.type === 'boolean') {
            value = input.checked;
        }
        if (typeof temp === 'string') {
            temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(temp, window);
            value = gObj.editModule.getValueFromType(col, (temp)(input, value));
        }
        else {
            value = gObj.editModule.getValueFromType(col, col.edit.read(input, value));
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(editedData[col.field]) && value === '') {
            value = editedData[col.field];
        }
        return value;
    };
    /**
     * @hidden
     */
    Edit.prototype.onActionBegin = function (e) {
        var restrictedRequestTypes = ['filterafteropen', 'filterbeforeopen', 'filterchoicerequest', 'save'];
        if (this.parent.editSettings.mode !== 'Batch' && this.formObj && !this.formObj.isDestroyed
            && restrictedRequestTypes.indexOf(e.requestType) === -1) {
            this.destroyWidgets();
            this.destroyForm();
        }
    };
    /**
     * @hidden
     */
    Edit.prototype.destroyWidgets = function (cols) {
        var gObj = this.parent;
        if (gObj.editSettings.template) {
            this.parent.destroyTemplate(['editSettingsTemplate']);
        }
        cols = cols ? cols : this.parent.getColumns();
        if (cols.some(function (column) { return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.editTemplate); })) {
            this.parent.destroyTemplate(['editTemplate']);
        }
        for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {
            var col = cols_1[_i];
            var temp = col.edit.destroy;
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && col.editTemplate) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.parent.element.id + col.uid + 'editTemplate', 'EditTemplate');
            }
            if (col.edit.destroy) {
                if (typeof temp === 'string') {
                    temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(temp, window);
                    temp();
                }
                else {
                    col.edit.destroy();
                }
            }
        }
        [].slice.call(this.formObj.element.elements).forEach(function (element) {
            if (element.hasAttribute('name')) {
                if (element.ej2_instances &&
                    element.ej2_instances.length &&
                    !element.ej2_instances[0].isDestroyed) {
                    element.ej2_instances[0].destroy();
                }
            }
        });
    };
    /**
     * @hidden
     */
    Edit.prototype.destroyForm = function () {
        this.destroyToolTip();
        if (this.formObj && !this.formObj.isDestroyed) {
            this.formObj.destroy();
        }
        this.destroyToolTip();
    };
    /**
     * To destroy the editing.
     * @return {void}
     * @hidden
     */
    Edit.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (!gridElement) {
            return;
        }
        var hasGridChild = gridElement.querySelector('.e-gridheader') &&
            gridElement.querySelector('.e-gridcontent') ? true : false;
        if (hasGridChild) {
            this.destroyForm();
        }
        this.removeEventListener();
        var elem = this.dialogObj.element;
        if (elem.childElementCount > 0) {
            this.dialogObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(elem);
        }
        elem = this.alertDObj.element;
        if (elem.childElementCount > 0) {
            this.alertDObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(elem);
        }
        if (!hasGridChild) {
            return;
        }
        this.unwireEvents();
        if (this.editModule) {
            this.editModule.destroy();
        }
    };
    Edit.prototype.keyPressHandler = function (e) {
        switch (e.action) {
            case 'insert':
                this.addRecord();
                break;
            case 'delete':
                if ((e.target.tagName !== 'INPUT' || e.target.classList.contains('e-checkselect'))
                    && !document.querySelector('.e-popup-open')) {
                    this.deleteRecord();
                }
                break;
            case 'f2':
                this.startEdit();
                break;
            case 'enter':
                if (!Object(_base_util__WEBPACK_IMPORTED_MODULE_11__["parentsUntil"])(e.target, 'e-unboundcelldiv') && this.parent.editSettings.mode !== 'Batch' &&
                    (Object(_base_util__WEBPACK_IMPORTED_MODULE_11__["parentsUntil"])(e.target, 'e-gridcontent') || (this.parent.frozenRows
                        && Object(_base_util__WEBPACK_IMPORTED_MODULE_11__["parentsUntil"])(e.target, 'e-headercontent')))
                    && !document.querySelectorAll('.e-popup-open').length) {
                    e.preventDefault();
                    this.endEdit();
                }
                break;
            case 'escape':
                this.closeEdit();
                break;
        }
    };
    Edit.prototype.preventBatch = function (args) {
        this.preventObj = args;
        this.showDialog('BatchSaveLostChanges', this.dialogObj);
    };
    Edit.prototype.executeAction = function () {
        this.preventObj.handler.call(this.preventObj.instance, this.preventObj.arg1, this.preventObj.arg2, this.preventObj.arg3, this.preventObj.arg4, this.preventObj.arg5, this.preventObj.arg6, this.preventObj.arg7, this.preventObj.arg8);
    };
    /**
     * @hidden
     */
    Edit.prototype.applyFormValidation = function (cols) {
        var gObj = this.parent;
        var frzCols = gObj.getFrozenColumns();
        var form = this.parent.editSettings.mode !== 'Dialog' ?
            gObj.element.querySelector('.e-gridform') :
            document.querySelector('#' + gObj.element.id + '_dialogEdit_wrapper').querySelector('.e-gridform');
        var mForm = gObj.element.querySelectorAll('.e-gridform')[1];
        var rules = {};
        var mRules = {};
        cols = cols ? cols : gObj.getColumns();
        cols.forEach(function (col, index) {
            if (!col.visible) {
                return;
            }
            if (index < frzCols && col.validationRules) {
                rules[Object(_base_util__WEBPACK_IMPORTED_MODULE_11__["getComplexFieldID"])(col.field)] = col.validationRules;
            }
            else if (index >= frzCols && col.validationRules) {
                mRules[Object(_base_util__WEBPACK_IMPORTED_MODULE_11__["getComplexFieldID"])(col.field)] = col.validationRules;
            }
        });
        if (frzCols && this.parent.editSettings.mode !== 'Dialog') {
            this.parent.editModule.mFormObj = this.createFormObj(mForm, mRules);
        }
        else {
            rules = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(rules, mRules);
        }
        this.parent.editModule.formObj = this.createFormObj(form, rules);
    };
    Edit.prototype.createFormObj = function (form, rules) {
        var _this = this;
        return new _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_12__["FormValidator"](form, {
            rules: rules,
            locale: this.parent.locale,
            validationComplete: function (args) {
                _this.validationComplete(args);
            },
            customPlacement: function (inputElement, error) {
                _this.valErrorPlacement(inputElement, error);
            }
        });
    };
    Edit.prototype.valErrorPlacement = function (inputElement, error) {
        if (this.parent.isEdit) {
            var id = error.getAttribute('for');
            var elem = this.getElemTable(inputElement).querySelector('#' + id + '_Error');
            if (!elem) {
                this.createTooltip(inputElement, error, id, '');
            }
            else {
                elem.querySelector('.e-tip-content').innerHTML = error.outerHTML;
            }
        }
    };
    Edit.prototype.getElemTable = function (inputElement) {
        var isFHdr;
        if (this.parent.editSettings.mode !== 'Dialog') {
            isFHdr = (this.parent.frozenRows && this.parent.frozenRows
                > (parseInt(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(inputElement, '.e-row').getAttribute('aria-rowindex'), 10) || 0));
        }
        return this.parent.editSettings.mode !== 'Dialog' ? isFHdr ? this.parent.getHeaderTable() : this.parent.getContentTable() :
            document.querySelector('#' + this.parent.element.id + '_dialogEdit_wrapper');
    };
    Edit.prototype.validationComplete = function (args) {
        if (this.parent.isEdit) {
            var elem = this.getElemTable(args.element).querySelector('#' + args.inputName + '_Error');
            if (elem) {
                if (args.status === 'failure') {
                    elem.style.display = '';
                }
                else {
                    elem.style.display = 'none';
                }
            }
        }
    };
    Edit.prototype.createTooltip = function (element, error, name, display) {
        var gcontent = this.parent.getContent().firstElementChild;
        var isScroll = gcontent.scrollHeight > gcontent.clientHeight || gcontent.scrollWidth > gcontent.clientWidth;
        var isInline = this.parent.editSettings.mode !== 'Dialog';
        var isFHdr;
        if (isInline) {
            isFHdr = (this.parent.frozenRows && this.parent.frozenRows
                > (parseInt(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(element, '.e-row').getAttribute('aria-rowindex'), 10) || 0));
        }
        var fCont = this.parent.getContent().querySelector('.e-frozencontent');
        var table = isInline ?
            (isFHdr ? this.parent.getHeaderTable() : this.parent.getContentTable()) :
            document.querySelector('#' + this.parent.element.id + '_dialogEdit_wrapper').querySelector('.e-dlg-content');
        var client = table.getBoundingClientRect();
        var left = isInline ?
            this.parent.element.getBoundingClientRect().left : client.left;
        var input = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(element, 'td');
        var inputClient = input ? input.getBoundingClientRect() : element.parentElement.getBoundingClientRect();
        var div = this.parent.createElement('div', {
            className: 'e-tooltip-wrap e-lib e-control e-popup e-griderror',
            id: name + '_Error',
            styles: 'display:' + display + ';top:' +
                ((isFHdr ? inputClient.top + inputClient.height : inputClient.bottom - client.top
                    - (this.parent.getFrozenColumns() ? fCont.scrollTop : 0)) + table.scrollTop + 9) + 'px;left:' +
                (inputClient.left - left + table.scrollLeft + inputClient.width / 2) + 'px;' +
                'max-width:' + inputClient.width + 'px;text-align:center;'
        });
        if (isInline && client.left < left) {
            div.style.left = parseInt(div.style.left, 10) - client.left + left + 'px';
        }
        var content = this.parent.createElement('div', { className: 'e-tip-content' });
        content.appendChild(error);
        var validationForBottomRowPos;
        if (this.parent.editSettings.newRowPosition === 'Bottom' && this.parent.editSettings.mode !== 'Dialog' &&
            ((this.editModule.args && this.editModule.args.requestType === 'add') || this.editModule.isAdded)) {
            validationForBottomRowPos = true;
        }
        var arrow;
        if (validationForBottomRowPos) {
            arrow = this.parent.createElement('div', { className: 'e-arrow-tip e-tip-bottom' });
            arrow.appendChild(this.parent.createElement('div', { className: 'e-arrow-tip-outer e-tip-bottom' }));
            arrow.appendChild(this.parent.createElement('div', { className: 'e-arrow-tip-inner e-tip-bottom' }));
        }
        else {
            arrow = this.parent.createElement('div', { className: 'e-arrow-tip e-tip-top' });
            arrow.appendChild(this.parent.createElement('div', { className: 'e-arrow-tip-outer e-tip-top' }));
            arrow.appendChild(this.parent.createElement('div', { className: 'e-arrow-tip-inner e-tip-top' }));
        }
        div.appendChild(content);
        div.appendChild(arrow);
        this.formObj.element.appendChild(div);
        if (isInline && gcontent.getBoundingClientRect().bottom < inputClient.bottom + inputClient.height) {
            gcontent.scrollTop = gcontent.scrollTop + div.offsetHeight + arrow.scrollHeight;
        }
        var lineHeight = parseInt(document.defaultView.getComputedStyle(div, null).getPropertyValue('font-size'), 10);
        if (div.getBoundingClientRect().width < inputClient.width &&
            div.querySelector('label').getBoundingClientRect().height / (lineHeight * 1.2) >= 2) {
            div.style.width = div.style.maxWidth;
        }
        div.style.left = (parseInt(div.style.left, 10) - div.offsetWidth / 2) + 'px';
        if (!isScroll && isInline && !this.parent.allowPaging) {
            gcontent.style.position = 'static';
            var pos = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_10__["calculateRelativeBasedPosition"])(input, div);
            div.style.top = pos.top + inputClient.height + 9 + 'px';
        }
        if (validationForBottomRowPos) {
            div.style.bottom = inputClient.height + 9 + 'px';
            div.style.top = null;
        }
    };
    /**
     * @hidden
     */
    Edit.prototype.checkColumnIsGrouped = function (col) {
        return !col.visible && !(this.parent.groupSettings.columns.indexOf(col.field) > -1);
    };
    /**
     * @hidden
     */
    Edit.AddEditors = function (editors) {
        Edit.editCellType = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(Edit.editCellType, editors);
    };
    Edit.editCellType = {
        'dropdownedit': _renderer_dropdown_edit_cell__WEBPACK_IMPORTED_MODULE_4__["DropDownEditCell"], 'numericedit': _renderer_numeric_edit_cell__WEBPACK_IMPORTED_MODULE_5__["NumericEditCell"],
        'datepickeredit': _renderer_datepicker_edit_cell__WEBPACK_IMPORTED_MODULE_13__["DatePickerEditCell"], 'datetimepickeredit': _renderer_datepicker_edit_cell__WEBPACK_IMPORTED_MODULE_13__["DatePickerEditCell"],
        'booleanedit': _renderer_boolean_edit_cell__WEBPACK_IMPORTED_MODULE_3__["BooleanEditCell"], 'defaultedit': _renderer_default_edit_cell__WEBPACK_IMPORTED_MODULE_6__["DefaultEditCell"],
        'templateedit': _renderer_template_edit_cell__WEBPACK_IMPORTED_MODULE_14__["TemplateEditCell"]
    };
    return Edit;
}());

/** @hidden */
var Global;
(function (Global) {
    Global.timer = null;
})(Global || (Global = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-export.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-export.js ***!
  \*****************************************************************************/
/*! exports provided: ExcelExport */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExcelExport", function() { return ExcelExport; });
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _syncfusion_ej2_excel_export__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-excel-export */ "./node_modules/@syncfusion/ej2-excel-export/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _actions_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actions/data */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/data.js");
/* harmony import */ var _export_helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./export-helper */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/export-helper.js");
/* harmony import */ var _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../services/summary-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/summary-model-generator.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");









/**
 * @hidden
 * `ExcelExport` module is used to handle the Excel export action.
 */
var ExcelExport = /** @class */ (function () {
    /**
     * Constructor for the Grid Excel Export module.
     * @hidden
     */
    function ExcelExport(parent, locator) {
        /* tslint:disable-next-line:no-any */
        this.book = {};
        this.workSheet = [];
        this.rows = [];
        this.columns = [];
        this.styles = [];
        this.rowLength = 1;
        this.expType = 'AppendToSheet';
        this.includeHiddenColumn = false;
        this.isCsvExport = false;
        this.isElementIdChanged = false;
        this.foreignKeyData = {};
        this.gridPool = {};
        this.parent = parent;
        this.helper = new _export_helper__WEBPACK_IMPORTED_MODULE_4__["ExportHelper"](parent);
        this.locator = locator;
        this.l10n = this.locator.getService('localization');
    }
    /**
     * For internal use only - Get the module name.
     */
    ExcelExport.prototype.getModuleName = function () {
        return 'ExcelExport';
    };
    ExcelExport.prototype.init = function (gObj) {
        if (gObj.element !== null && gObj.element.id === '') {
            gObj.element.id = new Date().toISOString();
            this.isElementIdChanged = true;
        }
        this.parent = gObj;
        if (this.parent.isDestroyed) {
            return;
        }
        this.isExporting = undefined;
        this.book = {};
        this.workSheet = [];
        this.rows = [];
        this.columns = [];
        this.styles = [];
        this.rowLength = 1;
        this.footer = undefined;
        this.expType = 'AppendToSheet';
        this.includeHiddenColumn = false;
        this.exportValueFormatter = new _export_helper__WEBPACK_IMPORTED_MODULE_4__["ExportValueFormatter"](gObj.locale);
        gObj.id = Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["getUid"])('main-grid');
        this.gridPool[gObj.id] = false;
    };
    /**
     * Export Grid to Excel file.
     * @param  {exportProperties} exportProperties - Defines the export properties of the Grid.
     * @param  {isMultipleExport} isMultipleExport - Defines is multiple Grid's are exported.
     * @param  {workbook} workbook - Defined the Workbook if multiple Grid is exported.
     * @param  {isCsv} isCsv - true if export to CSV.
     * @return {Promise<any>}
     */
    /* tslint:disable-next-line:max-line-length */
    /* tslint:disable-next-line:no-any */
    ExcelExport.prototype.Map = function (grid, exportProperties, isMultipleExport, workbook, isCsv, isBlob) {
        var gObj = grid;
        var cancel = 'cancel';
        var isBlb = 'isBlob';
        var csv = 'isCsv';
        var workbk = 'workbook';
        var isMultiEx = 'isMultipleExport';
        this.gridPool = {};
        if (grid.childGrid && !(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) && exportProperties.hierarchyExportMode === 'None')) {
            grid.expandedRows = Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["getPrintGridModel"])(grid).expandedRows;
        }
        var args = {
            requestType: 'beforeExcelExport', gridObject: gObj, cancel: false,
            isMultipleExport: isMultipleExport, workbook: workbook, isCsv: isCsv, isBlob: isBlob
        };
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["beforeExcelExport"], args);
        if (args[cancel]) {
            return new Promise(function (resolve, reject) {
                return resolve();
            });
        }
        this.parent.log('exporting_begin', this.getModuleName());
        this.data = new _actions_data__WEBPACK_IMPORTED_MODULE_3__["Data"](gObj);
        this.isExporting = true;
        this.isBlob = args[isBlb];
        if (args[csv]) {
            this.isCsvExport = args[csv];
        }
        else {
            this.isCsvExport = false;
        }
        return this.processRecords(gObj, exportProperties, args[isMultiEx], args[workbk]);
    };
    ExcelExport.prototype.exportingSuccess = function (resolve) {
        this.isExporting = false;
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["excelExportComplete"], this.isBlob ? { promise: this.blobPromise } : {});
        this.parent.log('exporting_complete', this.getModuleName());
        resolve(this.book);
    };
    /* tslint:disable-next-line:no-any */
    ExcelExport.prototype.processRecords = function (gObj, exportProperties, isMultipleExport, workbook) {
        var _this = this;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.dataSource) &&
            exportProperties.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__["DataManager"]) {
            return new Promise(function (resolve, reject) {
                var dataManager = exportProperties.dataSource.executeQuery(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__["Query"]());
                dataManager.then(function (r) {
                    _this.init(gObj);
                    _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, r).then(function () {
                        _this.exportingSuccess(resolve);
                    });
                });
            });
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) && exportProperties.exportType === 'CurrentPage') {
            return new Promise(function (resolve, reject) {
                _this.init(gObj);
                _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, _this.parent.getCurrentViewRecords());
                _this.exportingSuccess(resolve);
            });
        }
        else {
            var allPromise_1 = [];
            allPromise_1.push(this.data.getData({}, _export_helper__WEBPACK_IMPORTED_MODULE_4__["ExportHelper"].getQuery(gObj, this.data)));
            allPromise_1.push(this.helper.getColumnData(gObj));
            return new Promise(function (resolve, reject) {
                Promise.all(allPromise_1).then(function (e) {
                    _this.init(gObj);
                    _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, e[0]).then(function () {
                        _this.exportingSuccess(resolve);
                    });
                }).catch(function (e) {
                    reject(_this.book);
                    _this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["actionFailure"], e);
                });
            });
        }
    };
    /* tslint:disable-next-line:max-func-body-length */
    ExcelExport.prototype.processInnerRecords = function (gObj, exportProperties, 
    /* tslint:disable-next-line:no-any */
    isMultipleExport, workbook, r) {
        var _this = this;
        this.groupedColLength = gObj.groupSettings.columns.length;
        var blankRows = 5;
        var rows = [];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.multipleExport)) {
            /* tslint:disable-next-line:max-line-length */
            this.expType = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.multipleExport.type) ? exportProperties.multipleExport.type : 'AppendToSheet');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.multipleExport.blankRows)) {
                blankRows = exportProperties.multipleExport.blankRows;
            }
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(workbook)) {
            this.workSheet = [];
            this.rows = [];
            this.columns = [];
            this.styles = [];
        }
        else if (this.expType === 'NewSheet') {
            this.workSheet = workbook.worksheets;
            this.rows = [];
            this.columns = [];
            this.styles = workbook.styles;
        }
        else {
            this.workSheet = [];
            this.rows = workbook.worksheets[0].rows;
            this.columns = workbook.worksheets[0].columns;
            this.styles = workbook.styles;
            this.rowLength = (this.rows[this.rows.length - 1].index + blankRows);
            this.rowLength++;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties)) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(isMultipleExport)) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.header) && (isMultipleExport || this.expType === 'NewSheet')) {
                    this.processExcelHeader(JSON.parse(JSON.stringify(exportProperties.header)));
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.footer)) {
                    if (this.expType === 'AppendToSheet') {
                        if (!isMultipleExport) {
                            this.footer = JSON.parse(JSON.stringify(exportProperties.footer));
                        }
                    }
                    else {
                        this.footer = JSON.parse(JSON.stringify(exportProperties.footer));
                    }
                }
            }
            else {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.header)) {
                    this.processExcelHeader(JSON.parse(JSON.stringify(exportProperties.header)));
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.footer)) {
                    this.footer = JSON.parse(JSON.stringify(exportProperties.footer));
                }
            }
        }
        this.includeHiddenColumn = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) ? exportProperties.includeHiddenColumn : false);
        return new Promise(function (resolve, reject) {
            gObj.childGridLevel = 0;
            rows = _this.processGridExport(gObj, exportProperties, r);
            _this.globalResolve = resolve;
            _this.gridPool[gObj.id] = true;
            _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);
        }).then(function () {
            var organisedRows = [];
            _this.organiseRows(rows, rows[0].index, organisedRows);
            _this.rows = _this.rows.concat(organisedRows);
            //footer template add
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(_this.footer)) {
                if ((_this.expType === 'AppendToSheet' && !isMultipleExport) || (_this.expType === 'NewSheet')) {
                    _this.processExcelFooter(_this.footer);
                }
            }
            var sheet = {};
            if (_this.columns.length > 0) {
                sheet.columns = _this.columns;
            }
            /* tslint:disable-next-line:no-any */
            sheet.rows = _this.rows;
            _this.workSheet.push(sheet);
            _this.book.worksheets = _this.workSheet;
            _this.book.styles = _this.styles;
            if (!isMultipleExport) {
                if (_this.isCsvExport) {
                    var book = new _syncfusion_ej2_excel_export__WEBPACK_IMPORTED_MODULE_1__["Workbook"](_this.book, 'csv', gObj.locale, gObj.currencyCode);
                    if (!_this.isBlob) {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) && exportProperties.fileName) {
                            book.save(exportProperties.fileName);
                        }
                        else {
                            book.save('Export.csv');
                        }
                    }
                    else {
                        _this.blobPromise = book.saveAsBlob('text/csv');
                    }
                }
                else {
                    var book = new _syncfusion_ej2_excel_export__WEBPACK_IMPORTED_MODULE_1__["Workbook"](_this.book, 'xlsx', gObj.locale, gObj.currencyCode);
                    if (!_this.isBlob) {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) && exportProperties.fileName) {
                            book.save(exportProperties.fileName);
                        }
                        else {
                            book.save('Export.xlsx');
                        }
                    }
                    else {
                        _this.blobPromise = book.saveAsBlob('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
                    }
                }
                if (_this.isElementIdChanged) {
                    gObj.element.id = '';
                }
                delete gObj.expandedRows;
            }
            return workbook;
        });
    };
    ExcelExport.prototype.organiseRows = function (rows, initialIndex, organisedRows) {
        if (!rows.length) {
            return initialIndex;
        }
        for (var i = 0; i < rows.length; i++) {
            var row = rows[i];
            var childRows = row.childRows;
            if (childRows) {
                row.index = initialIndex++;
                delete row.childRows;
                organisedRows.push(row);
                initialIndex = this.organiseRows(childRows, initialIndex, organisedRows);
            }
            else {
                row.index = initialIndex++;
                organisedRows.push(row);
            }
        }
        return initialIndex;
    };
    ExcelExport.prototype.processGridExport = function (gObj, exportProperties, r) {
        var excelRows = [];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.theme)) {
            this.theme = exportProperties.theme;
        }
        if (gObj.childGrid && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties)) {
            gObj.hierarchyPrintMode = exportProperties.hierarchyExportMode || 'Expanded';
        }
        var helper = new _export_helper__WEBPACK_IMPORTED_MODULE_4__["ExportHelper"](gObj);
        var headerRow = helper.getHeaders(gObj.columns, this.includeHiddenColumn);
        var groupIndent = gObj.groupSettings.columns.length;
        excelRows = this.processHeaderContent(gObj, headerRow, groupIndent, excelRows);
        /* tslint:disable-next-line:max-line-length */
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties.dataSource) && !(exportProperties.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__["DataManager"])) {
            excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, exportProperties.dataSource, excelRows, helper);
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(exportProperties) && exportProperties.exportType === 'CurrentPage') {
            excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, gObj.currentViewData, excelRows, helper);
        }
        else {
            excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, undefined, excelRows, helper);
        }
        return excelRows;
    };
    ExcelExport.prototype.processRecordContent = function (gObj, returnType, headerRow, exportProperties, currentViewRecords, excelRow, helper) {
        var record;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(currentViewRecords)) {
            record = currentViewRecords;
        }
        else {
            record = returnType.result;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(record.level)) {
            this.processGroupedRows(gObj, record, headerRow, record.level, 0, exportProperties, excelRow, helper);
        }
        else {
            this.processRecordRows(gObj, record, headerRow, 0, 0, exportProperties, excelRow, helper);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(returnType.aggregates)) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(currentViewRecords)) {
                this.processAggregates(gObj, returnType.result, excelRow, currentViewRecords);
            }
            else {
                var result = returnType.result.GroupGuid ?
                    returnType.result.records : returnType.result;
                this.processAggregates(gObj, result, excelRow);
            }
        }
        return excelRow;
    };
    /* tslint:disable-next-line:no-any */
    ExcelExport.prototype.processGroupedRows = function (gObj, dataSource, headerRow, level, startIndex, excelExportProperties, excelRows, helper) {
        for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {
            var item = dataSource_1[_i];
            var cells = [];
            var index = 1;
            /* tslint:disable-next-line:no-any */
            var cell = {};
            cell.index = index + level;
            var col = gObj.getColumnByField(item.field);
            /* tslint:disable-next-line:no-any */
            var args = {
                value: item.key,
                column: col,
                style: undefined,
                isForeignKey: col.isForeignColumn(),
            };
            cell.value = gObj.getColumnByField(item.field).headerText +
                ': ' + (!col.enableGroupByFormat ? this.exportValueFormatter.formatCellValue(args) : item.key) + ' - ';
            if (item.count > 1) {
                cell.value += item.count + ' items';
            }
            else {
                cell.value += item.count + ' item';
            }
            cell.style = this.getCaptionThemeStyle(this.theme);
            var captionModelGen = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_5__["CaptionSummaryModelGenerator"](gObj);
            var groupCaptionSummaryRows = captionModelGen.generateRows(item);
            this.fillAggregates(gObj, groupCaptionSummaryRows, dataSource.level + dataSource.childLevels, excelRows, this.rowLength);
            cells.push(cell);
            if (excelRows[excelRows.length - 1].cells.length > 0) {
                var lIndex = dataSource.level + dataSource.childLevels + groupCaptionSummaryRows[0].cells.length;
                var hIndex = 0;
                for (var _a = 0, _b = excelRows[excelRows.length - 1].cells; _a < _b.length; _a++) {
                    var tCell = _b[_a];
                    if (tCell.index < lIndex) {
                        lIndex = tCell.index;
                    }
                    if (tCell.index > hIndex) {
                        hIndex = tCell.index;
                    }
                    if (cells[cells.length - 1].index !== tCell.index) {
                        cells.push(tCell);
                    }
                }
                if ((lIndex - cell.index) > 1) {
                    cell.colSpan = lIndex - cell.index;
                }
                while (hIndex < (headerRow.columns.length + level + dataSource.childLevels)) {
                    /* tslint:disable-next-line:no-any */
                    var sCell = {};
                    sCell.index = (hIndex + 1);
                    sCell.style = this.getCaptionThemeStyle(this.theme);
                    cells.push(sCell);
                    hIndex++;
                }
            }
            else {
                var span = 0;
                //Calculation for column span when group caption dont have aggregates
                for (var _c = 0, _d = headerRow.columns; _c < _d.length; _c++) {
                    var col_1 = _d[_c];
                    if (col_1.visible) {
                        span++;
                    }
                }
                cell.colSpan = (dataSource.childLevels + span);
            }
            excelRows[excelRows.length - 1].cells = cells;
            this.rowLength++;
            if (this.groupedColLength < 8 && level > 1) {
                var grouping = { outlineLevel: level - 1, isCollapsed: true };
                excelRows[excelRows.length - 1].grouping = grouping;
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(dataSource.childLevels) && dataSource.childLevels > 0) {
                this.processGroupedRows(gObj, item.items, headerRow, item.items.level, startIndex, excelExportProperties, excelRows, helper);
            }
            else {
                startIndex = this.processRecordRows(gObj, item.items, headerRow, (level), startIndex, excelExportProperties, excelRows, helper);
                this.processAggregates(gObj, item, excelRows, undefined, (level), true);
            }
        }
    };
    ExcelExport.prototype.processRecordRows = function (gObj, record, headerRow, level, startIndex, excelExportProperties, excelRows, helper) {
        var index = 1;
        var cells = [];
        var columns = headerRow.columns;
        var rows = helper.getGridRowModel(columns, record, gObj, startIndex);
        for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
            var row = rows_1[_i];
            cells = [];
            startIndex++;
            index = 1;
            for (var c = 0, len = row.cells.length; c < len; c++) {
                var gCell = row.cells[c];
                if (gCell.cellType !== _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].Data) {
                    continue;
                }
                var column = gCell.column;
                var field = column.field;
                var cellValue = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(field) ? column.valueAccessor(field, row.data, column) : '';
                var value = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(cellValue) ? cellValue : '';
                var fkData = void 0;
                if (column.isForeignColumn && column.isForeignColumn()) {
                    fkData = helper.getFData(value, column);
                    value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["getValue"])(column.foreignKeyValue, fkData);
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(value)) {
                    var cell = {};
                    /* tslint:disable-next-line:no-any */
                    var excelCellArgs = {
                        data: row.data, column: column, foreignKeyData: fkData,
                        value: value, style: undefined, colSpan: 1, cell: cell
                    };
                    gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["excelQueryCellInfo"], excelCellArgs);
                    cell = excelCellArgs.cell;
                    cell.index = index + level + gObj.childGridLevel;
                    cell.value = excelCellArgs.value;
                    if (excelCellArgs.data === '' && gObj.childGridLevel && index === 1) {
                        var style = {};
                        style.hAlign = 'left';
                        excelCellArgs = { style: style };
                        cell.colSpan = gObj.getVisibleColumns().length;
                        cell.value = this.l10n.getConstant('EmptyRecord');
                    }
                    if (excelCellArgs.colSpan > 1) {
                        cell.colSpan = excelCellArgs.colSpan;
                    }
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(excelCellArgs.style)) {
                        var styleIndex = this.getColumnStyle(gObj, index + level);
                        cell.style = this.mergeOptions(this.styles[styleIndex], excelCellArgs.style);
                    }
                    else {
                        cell.style = { name: gObj.element.id + 'column' + (index + level) };
                    }
                    cells.push(cell);
                }
                index++;
            }
            var excelRow = { index: this.rowLength++, cells: cells };
            if (this.groupedColLength < 8 && level > 0) {
                excelRow.grouping = { outlineLevel: level, isCollapsed: true };
                excelRows.push(excelRow);
            }
            else {
                excelRows.push(excelRow);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(gObj.childGrid)) {
                gObj.isPrinting = true;
                var exportType = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(excelExportProperties) && excelExportProperties.exportType) ?
                    excelExportProperties.exportType : 'AllPages';
                var returnVal = this.helper.createChildGrid(gObj, row, exportType, this.gridPool);
                var childGridObj = returnVal.childGrid;
                var element = returnVal.element;
                childGridObj.actionFailure =
                    helper.failureHandler(this.gridPool, childGridObj, this.globalResolve);
                childGridObj.childGridLevel = gObj.childGridLevel + 1;
                var args = { childGrid: childGridObj, row: row, exportProperties: excelExportProperties };
                this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["exportDetailDataBound"], args);
                childGridObj.beforeDataBound = this.childGridCell(excelRow, childGridObj, excelExportProperties, row);
                childGridObj.appendTo(element);
            }
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_0__["exportRowDataBound"], { rowObj: row, type: 'excel' });
        }
        return startIndex;
    };
    ExcelExport.prototype.childGridCell = function (excelRow, childGridObj, excelExportProps, gRow) {
        var _this = this;
        return function (result) {
            childGridObj.beforeDataBound = null;
            result.cancel = true;
            if (result.result.length === 0) {
                result.result = [''];
            }
            excelRow.childRows = _this.processGridExport(childGridObj, excelExportProps, result);
            var intent = _this.parent.groupSettings.columns.length;
            excelRow.childRows.forEach(function (row) {
                row.grouping = { outlineLevel: intent + childGridObj.childGridLevel,
                    isCollapsed: !gRow.isExpand, isHidden: !gRow.isExpand };
            });
            childGridObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["detach"])(childGridObj.element);
            _this.gridPool[childGridObj.id] = true;
            _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);
            return excelRow;
        };
    };
    // tslint:disable-next-line:max-line-length
    ExcelExport.prototype.processAggregates = function (gObj, rec, excelRows, currentViewRecords, indent, byGroup) {
        var summaryModel = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_5__["SummaryModelGenerator"](gObj);
        var data = undefined;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(currentViewRecords)) {
            data = currentViewRecords;
        }
        else {
            data = rec;
        }
        if (indent === undefined) {
            indent = 0;
        }
        if (gObj.groupSettings.columns.length > 0 && byGroup) {
            var groupSummaryModel = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_5__["GroupSummaryModelGenerator"](gObj);
            var groupSummaryRows = groupSummaryModel.generateRows(data, { level: data.level });
            if (groupSummaryRows.length > 0) {
                excelRows = this.fillAggregates(gObj, groupSummaryRows, indent, excelRows);
            }
        }
        else {
            indent = gObj.groupSettings.columns.length > 0 && !byGroup ? gObj.groupSettings.columns.length : indent;
            var sRows = summaryModel.generateRows(data, rec.aggregates);
            if (sRows.length > 0 && !byGroup) {
                excelRows = this.fillAggregates(gObj, sRows, indent, excelRows);
            }
        }
        return excelRows;
    };
    // tslint:disable-next-line:max-line-length
    ExcelExport.prototype.fillAggregates = function (gObj, rows, indent, excelRows, customIndex) {
        for (var _i = 0, rows_2 = rows; _i < rows_2.length; _i++) {
            var row = rows_2[_i];
            var cells = [];
            var index = 0;
            for (var _a = 0, _b = row.cells; _a < _b.length; _a++) {
                var cell = _b[_a];
                /* tslint:disable-next-line:no-any */
                var eCell = {};
                if (cell.cellType === _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].DetailFooterIntent) {
                    continue;
                }
                if ((cell.visible || this.includeHiddenColumn)) {
                    index++;
                    if (cell.isDataCell) {
                        eCell.index = index + indent + gObj.childGridLevel;
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(cell.column.footerTemplate)) {
                            eCell.value = this.getAggreateValue(_base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].Summary, cell.column.footerTemplate, cell, row);
                        }
                        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(cell.column.groupFooterTemplate)) {
                            eCell.value = this.getAggreateValue(_base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].GroupSummary, cell.column.groupFooterTemplate, cell, row);
                        }
                        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(cell.column.groupCaptionTemplate)) {
                            eCell.value = this.getAggreateValue(_base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].CaptionSummary, cell.column.groupCaptionTemplate, cell, row);
                        }
                        else {
                            for (var _c = 0, _d = Object.keys(row.data[cell.column.field]); _c < _d.length; _c++) {
                                var key = _d[_c];
                                if (key === cell.column.type) {
                                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(row.data[cell.column.field].Sum)) {
                                        eCell.value = row.data[cell.column.field][cell.column.field + " - sum"];
                                    }
                                    else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(row.data[cell.column.field].Average)) {
                                        eCell.value = row.data[cell.column.field][cell.column.field + " - average"];
                                    }
                                    else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(row.data[cell.column.field].Max)) {
                                        eCell.value = row.data[cell.column.field][cell.column.field + " - max"];
                                    }
                                    else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(row.data[cell.column.field].Min)) {
                                        eCell.value = row.data[cell.column.field][cell.column.field + " - min"];
                                    }
                                    else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(row.data[cell.column.field].Count)) {
                                        eCell.value = row.data[cell.column.field][cell.column.field + " - count"];
                                    }
                                    else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(row.data[cell.column.field].TrueCount)) {
                                        eCell.value = row.data[cell.column.field][cell.column.field + " - truecount"];
                                    }
                                    else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(row.data[cell.column.field].FalseCount)) {
                                        eCell.value = row.data[cell.column.field][cell.column.field + " - falsecount"];
                                    }
                                    else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(row.data[cell.column.field].Custom)) {
                                        eCell.value = row.data[cell.column.field].Custom;
                                    }
                                }
                            }
                        }
                        eCell.style = this.getCaptionThemeStyle(this.theme); //{ name: gObj.element.id + 'column' + index };
                        this.aggregateStyle(cell.column, eCell.style, cell.column.field);
                        var gridCellStyle = cell.attributes.style;
                        if (gridCellStyle.textAlign) {
                            eCell.style.hAlign = gridCellStyle.textAlign.toLowerCase();
                        }
                        cells.push(eCell);
                    }
                    else {
                        if (customIndex === undefined) {
                            eCell.index = index + indent + gObj.childGridLevel;
                            eCell.style = this.getCaptionThemeStyle(this.theme); //{ name: gObj.element.id + 'column' + index };
                            cells.push(eCell);
                        }
                    }
                }
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(customIndex)) {
                excelRows.push({ index: customIndex, cells: cells });
            }
            else {
                var row_1 = {};
                if (this.groupedColLength < 8 && this.groupedColLength > 0) {
                    var dummyOutlineLevel = 'outlineLevel';
                    var dummyGrouping = 'grouping';
                    var level = excelRows[excelRows.length - 1][dummyGrouping][dummyOutlineLevel];
                    var grouping = { outlineLevel: level, isCollapsed: true };
                    row_1 = { index: this.rowLength++, cells: cells, grouping: grouping };
                }
                else {
                    row_1 = { index: this.rowLength++, cells: cells };
                }
                excelRows.push(row_1);
            }
        }
        return excelRows;
    };
    ExcelExport.prototype.aggregateStyle = function (col, style, field) {
        if (typeof col.format === 'object') {
            var format = col.format;
            style.numberFormat = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(format.format) ? format.format : format.skeleton;
            style.type = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(format.type) ? format.type.toLowerCase() :
                this.parent.getColumnByField(field).type.toLowerCase();
        }
        else {
            style.numberFormat = col.format;
            style.type = this.parent.getColumnByField(field).type.toLowerCase();
        }
    };
    ExcelExport.prototype.getAggreateValue = function (cellType, template, cell, row) {
        var templateFn = {};
        templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"], cell.cellType)] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["compile"])(template);
        /* tslint:disable-next-line:max-line-length */
        var txt = (templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"], cell.cellType)](row.data[cell.column.field ? cell.column.field : cell.column.columnName]));
        return txt[0].textContent;
    };
    ExcelExport.prototype.mergeOptions = function (JSON1, JSON2) {
        var result = {};
        var attrname = Object.keys(JSON1);
        for (var index = 0; index < attrname.length; index++) {
            if (attrname[index] !== 'name') {
                result[attrname[index]] = JSON1[attrname[index]];
            }
        }
        attrname = Object.keys(JSON2);
        for (var index = 0; index < attrname.length; index++) {
            if (attrname[index] !== 'name') {
                result[attrname[index]] = JSON2[attrname[index]];
            }
        }
        return result;
    };
    ExcelExport.prototype.getColumnStyle = function (gObj, columnIndex) {
        var index = 0;
        for (var _i = 0, _a = this.styles; _i < _a.length; _i++) {
            var style = _a[_i];
            if (style.name === gObj.element.id + 'column' + columnIndex) {
                return index;
            }
            index++;
        }
        return undefined;
    };
    ExcelExport.prototype.processHeaderContent = function (gObj, headerRow, indent, excelRows) {
        var rowIndex = 1;
        var gridRows = headerRow.rows;
        // Column collection with respect to the records in the grid
        var gridColumns = headerRow.columns;
        var spannedCells = [];
        if (indent > 0) {
            var index = 0;
            while (index !== indent) {
                this.columns.push({ index: index + 1, width: 30 });
                index++;
            }
        }
        for (var row = 0; row < gridRows.length; row++) {
            var currentCellIndex = 1 + indent;
            var cells = [];
            for (var column = 0; column < gridRows[row].cells.length; column++) {
                /* tslint:disable-next-line:no-any */
                var style = {};
                var cell = {};
                var gridCell = gridRows[row].cells[column];
                if (gridCell.cellType === _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].HeaderIndent || gridCell.cellType === _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].DetailHeader) {
                    continue;
                }
                var result = { contains: true, index: 1 };
                while (result.contains) {
                    result = this.getIndex(spannedCells, rowIndex, currentCellIndex);
                    currentCellIndex = result.index;
                    if (!result.contains) {
                        cell.index = result.index + gObj.childGridLevel;
                        break;
                    }
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(gridCell.rowSpan) && gridCell.rowSpan !== 1) {
                    cell.rowSpan = gridCell.rowSpan;
                    for (var i = rowIndex; i < gridCell.rowSpan + rowIndex; i++) {
                        var spannedCell = { rowIndex: 0, columnIndex: 0 };
                        spannedCell.rowIndex = i;
                        spannedCell.columnIndex = currentCellIndex;
                        spannedCells.push(spannedCell);
                    }
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(gridCell.colSpan) && gridCell.colSpan !== 1) {
                    cell.colSpan = gridCell.colSpan;
                    currentCellIndex = currentCellIndex + cell.colSpan - 1;
                }
                cell.value = gridCell.column.headerText;
                style = this.getHeaderThemeStyle(this.theme);
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(gridCell.column.textAlign)) {
                    style.hAlign = gridCell.column.textAlign.toLowerCase();
                }
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(gridCell.column.headerTextAlign)) {
                    style.hAlign = gridCell.column.headerTextAlign.toLowerCase();
                }
                var excelHeaderCellArgs = { cell: cell, gridCell: gridCell, style: style };
                gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["excelHeaderQueryCellInfo"], excelHeaderCellArgs);
                cell.style = excelHeaderCellArgs.style;
                cells.push(cell);
                currentCellIndex++;
            }
            excelRows.push({ index: this.rowLength++, cells: cells });
        }
        for (var col = 0; col < gridColumns.length; col++) {
            this.parseStyles(gObj, gridColumns[col], this.getRecordThemeStyle(this.theme), indent + col + 1);
        }
        return excelRows;
    };
    ExcelExport.prototype.getHeaderThemeStyle = function (theme) {
        var style = {};
        style.fontSize = 12;
        style.borders = { color: '#E0E0E0' };
        style.bold = true;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(theme) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(theme.header)) {
            style = this.updateThemeStyle(theme.header, style);
        }
        return style;
    };
    ExcelExport.prototype.updateThemeStyle = function (themestyle, style) {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])(style, themestyle);
    };
    ExcelExport.prototype.getCaptionThemeStyle = function (theme) {
        var style = {};
        style.fontSize = 13;
        style.backColor = '#F6F6F6';
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(theme) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(theme.caption)) {
            style = this.updateThemeStyle(theme.caption, style);
        }
        return style;
    };
    ExcelExport.prototype.getRecordThemeStyle = function (theme) {
        var style = {};
        style.fontSize = 13;
        style.borders = { color: '#E0E0E0' };
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(theme) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(theme.record)) {
            style = this.updateThemeStyle(theme.record, style);
        }
        return style;
    };
    ExcelExport.prototype.processExcelHeader = function (header) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(header.rows) && (this.expType === 'NewSheet' || this.rowLength === 1)) {
            var noRows = void 0;
            if (header.headerRows === undefined) {
                this.rowLength = header.rows.length;
            }
            else {
                this.rowLength = header.headerRows;
            }
            if (this.rowLength < header.rows.length) {
                noRows = this.rowLength;
            }
            else {
                noRows = header.rows.length;
            }
            this.rowLength++;
            for (var row = 0; row < noRows; row++) {
                var json = header.rows[row];
                //Row index
                if (!(json.index !== null && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(json.index))) {
                    json.index = (row + 1);
                }
                this.updatedCellIndex(json);
            }
        }
    };
    ExcelExport.prototype.updatedCellIndex = function (json) {
        var cellsLength = json.cells.length;
        for (var cellId = 0; cellId < cellsLength; cellId++) {
            var jsonCell = json.cells[cellId];
            //cell index
            if (!(jsonCell.index !== null && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(jsonCell.index))) {
                jsonCell.index = (cellId + 1);
            }
        }
        this.rows.push(json);
    };
    ExcelExport.prototype.processExcelFooter = function (footer) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(footer.rows)) {
            var noRows = void 0;
            if (footer.footerRows === undefined) {
                this.rowLength += footer.rows.length;
            }
            else {
                if (footer.footerRows > footer.rows.length) {
                    this.rowLength += (footer.footerRows - footer.rows.length);
                    noRows = footer.rows.length;
                }
                else {
                    noRows = footer.footerRows;
                }
            }
            for (var row = 0; row < noRows; row++) {
                var json = footer.rows[row];
                //Row index
                if (json.index === null || json.index === undefined) {
                    json.index = this.rowLength++;
                }
                else {
                    json.index += this.rowLength;
                }
                this.updatedCellIndex(json);
            }
        }
    };
    ExcelExport.prototype.getIndex = function (spannedCells, rowIndex, columnIndex) {
        for (var _i = 0, spannedCells_1 = spannedCells; _i < spannedCells_1.length; _i++) {
            var spannedCell = spannedCells_1[_i];
            if ((spannedCell.rowIndex === rowIndex) && (spannedCell.columnIndex === columnIndex)) {
                columnIndex = columnIndex + 1;
                return { contains: true, index: columnIndex };
            }
        }
        return { contains: false, index: columnIndex };
    };
    ExcelExport.prototype.parseStyles = function (gObj, col, style, index) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(col.format)) {
            if (typeof col.format === 'object') {
                var format = col.format;
                style.numberFormat = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(format.format) ? format.format : format.skeleton;
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(format.type)) {
                    style.type = format.type.toLowerCase();
                }
            }
            else {
                style.numberFormat = col.format;
                style.type = col.type;
            }
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(col.textAlign)) {
            style.hAlign = col.textAlign.toLowerCase();
        }
        if (Object.keys(style).length > 0) {
            style.name = gObj.element.id + 'column' + index;
            this.styles.push(style);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(col.width)) {
            this.columns.push({ index: index + gObj.childGridLevel, width: typeof col.width === 'number' ?
                    col.width : this.helper.getConvertedWidth(col.width) });
        }
    };
    /**
     * To destroy the excel export
     * @return {void}
     * @hidden
     */
    ExcelExport.prototype.destroy = function () {
        //destroy for exporting
    };
    return ExcelExport;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-filter.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-filter.js ***!
  \*****************************************************************************/
/*! exports provided: ExcelFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExcelFilter", function() { return ExcelFilter; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-navigations */ "./node_modules/@syncfusion/ej2-navigations/index.js");
/* harmony import */ var _actions_checkbox_filter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../actions/checkbox-filter */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/checkbox-filter.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @syncfusion/ej2-dropdowns */ "./node_modules/@syncfusion/ej2-dropdowns/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @syncfusion/ej2-calendars */ "./node_modules/@syncfusion/ej2-calendars/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();













/**
 * @hidden
 * `ExcelFilter` module is used to handle filtering action.
 */
var ExcelFilter = /** @class */ (function (_super) {
    __extends(ExcelFilter, _super);
    /**
     * Constructor for excel filtering module
     * @hidden
     */
    function ExcelFilter(parent, filterSettings, serviceLocator, customFltrOperators) {
        var _this = _super.call(this, parent, filterSettings, serviceLocator) || this;
        _this.customFilterOperators = customFltrOperators;
        _this.isExcel = true;
        return _this;
    }
    ExcelFilter.prototype.getCMenuDS = function (type, operator) {
        var options = {
            number: ['Equal', 'NotEqual', '', 'LessThan', 'LessThanOrEqual', 'GreaterThan',
                'GreaterThanOrEqual', 'Between', '', 'CustomFilter'],
            string: ['Equal', 'NotEqual', '', 'StartsWith', 'EndsWith', '', 'Contains', '', 'CustomFilter'],
        };
        options.date = options.number;
        options.datetime = options.number;
        var model = [];
        for (var i = 0; i < options[type].length; i++) {
            if (options[type][i].length) {
                if (operator) {
                    model.push({
                        text: this.getLocalizedLabel(options[type][i]) + '...',
                        iconCss: 'e-icons e-icon-check ' + (operator === options[type][i].toLowerCase() ? '' : 'e-emptyicon')
                    });
                }
                else {
                    model.push({
                        text: this.getLocalizedLabel(options[type][i]) + '...'
                    });
                }
            }
            else {
                model.push({ separator: true });
            }
        }
        return model;
    };
    /**
     * To destroy the filter bar.
     * @return {void}
     * @hidden
     */
    ExcelFilter.prototype.destroy = function () {
        if (this.dlg) {
            this.unwireExEvents();
            _super.prototype.destroy.call(this);
        }
        if (this.cmenu && this.cmenu.parentElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.cmenu);
        }
    };
    ExcelFilter.prototype.createMenu = function (type, isFiltered, isCheckIcon) {
        var options = { string: 'TextFilter', date: 'DateFilter', datetime: 'DateTimeFilter', number: 'NumberFilter' };
        this.menu = this.parent.createElement('div', { className: 'e-contextmenu-wrapper' });
        if (this.parent.enableRtl) {
            this.menu.classList.add('e-rtl');
        }
        else {
            this.menu.classList.remove('e-rtl');
        }
        var ul = this.parent.createElement('ul');
        var icon = isFiltered ? 'e-excl-filter-icon e-filtered' : 'e-excl-filter-icon';
        ul.appendChild(this.createMenuElem(this.getLocalizedLabel('ClearFilter'), isFiltered ? '' : 'e-disabled', icon));
        if (type !== 'boolean') {
            ul.appendChild(this.createMenuElem(this.getLocalizedLabel(options[type]), 'e-submenu', isCheckIcon && this.ensureTextFilter() ? 'e-icon-check' : icon + ' e-emptyicon', true));
        }
        this.menu.appendChild(ul);
    };
    ExcelFilter.prototype.createMenuElem = function (val, className, iconName, isSubMenu) {
        var li = this.parent.createElement('li', { className: className + ' e-menu-item' });
        li.innerHTML = val;
        li.insertBefore(this.parent.createElement('span', { className: 'e-menu-icon e-icons ' + iconName }), li.firstChild);
        if (isSubMenu) {
            li.appendChild(this.parent.createElement('span', { className: 'e-icons e-caret' }));
        }
        return li;
    };
    ExcelFilter.prototype.wireExEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dlg, 'mouseover', this.hoverHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dlg, 'click', this.clickExHandler, this);
    };
    ExcelFilter.prototype.unwireExEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.dlg, 'mouseover', this.hoverHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.dlg, 'click', this.clickExHandler);
    };
    ExcelFilter.prototype.clickExHandler = function (e) {
        var menuItem = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-menu-item');
        if (menuItem && this.getLocalizedLabel('ClearFilter') === menuItem.innerText.trim()) {
            this.clearFilter();
            this.closeDialog();
        }
    };
    ExcelFilter.prototype.destroyCMenu = function () {
        if (this.menuObj && !this.menuObj.isDestroyed) {
            this.menuObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.cmenu);
        }
    };
    ExcelFilter.prototype.hoverHandler = function (e) {
        var target = e.target.querySelector('.e-contextmenu');
        var li = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-menu-item');
        var focused = this.menu.querySelector('.e-focused');
        var isSubMenu;
        if (focused) {
            focused.classList.remove('e-focused');
        }
        if (li) {
            li.classList.add('e-focused');
            isSubMenu = li.classList.contains('e-submenu');
        }
        if (target) {
            return;
        }
        if (!isSubMenu) {
            var submenu = this.menu.querySelector('.e-submenu');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(submenu)) {
                submenu.classList.remove('e-selected');
            }
            this.isCMenuOpen = false;
            this.destroyCMenu();
        }
        var selectedMenu = this.ensureTextFilter();
        if (!this.isCMenuOpen && isSubMenu) {
            li.classList.add('e-selected');
            this.isCMenuOpen = true;
            var menuOptions = {
                items: this.getCMenuDS(this.options.type, selectedMenu ? selectedMenu.replace(/\s/g, '') : undefined),
                select: this.selectHandler.bind(this),
                onClose: this.destroyCMenu.bind(this),
                enableRtl: this.parent.enableRtl,
                beforeClose: this.preventClose
            };
            this.parent.element.appendChild(this.cmenu);
            this.menuObj = new _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_3__["ContextMenu"](menuOptions, this.cmenu);
            var client = this.menu.querySelector('.e-submenu').getBoundingClientRect();
            var pos = { top: 0, left: 0 };
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                var contextRect = this.getContextBounds(this.menuObj);
                pos.top = (window.innerHeight - contextRect.height) / 2;
                pos.left = (window.innerWidth - contextRect.width) / 2;
                this.closeDialog();
            }
            else {
                pos.top = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE ? window.pageYOffset + client.top : window.scrollY + client.top;
                pos.left = this.getCMenuYPosition(this.dlg, this.menuObj);
            }
            this.menuObj.open(pos.top, pos.left, e.target);
            this.parent.applyBiggerTheme(this.menuObj.element.parentElement);
        }
    };
    ExcelFilter.prototype.ensureTextFilter = function () {
        var selectedMenu;
        var predicates = this.existingPredicate[this.options.field];
        if (predicates && predicates.length === 2) {
            if (predicates[0].operator === 'greaterthanorequal' && predicates[1].operator === 'lessthanorequal') {
                selectedMenu = 'between';
            }
            else {
                selectedMenu = 'customfilter';
            }
        }
        else {
            if (predicates && predicates.length === 1) {
                this.optrData = this.customFilterOperators[this.options.type + 'Operator'];
                selectedMenu = predicates[0].operator;
            }
        }
        return selectedMenu;
    };
    ExcelFilter.prototype.preventClose = function (args) {
        if (args.event instanceof MouseEvent && args.event.target.classList.contains('e-submenu')) {
            args.cancel = true;
        }
    };
    ExcelFilter.prototype.getContextBounds = function (context) {
        var elementVisible = this.menuObj.element.style.display;
        this.menuObj.element.style.display = 'block';
        return this.menuObj.element.getBoundingClientRect();
    };
    ExcelFilter.prototype.getCMenuYPosition = function (target, context) {
        var contextWidth = this.getContextBounds(context).width;
        var targetPosition = target.getBoundingClientRect();
        var leftPos = targetPosition.right + contextWidth - this.parent.element.clientWidth;
        var targetBorder = target.offsetWidth - target.clientWidth;
        targetBorder = targetBorder ? targetBorder + 1 : 0;
        return (leftPos < 1) ? (targetPosition.right + 1 - targetBorder) : (targetPosition.left - contextWidth - 1 + targetBorder);
    };
    ExcelFilter.prototype.openDialog = function (options) {
        var _this = this;
        this.updateModel(options);
        this.getAndSetChkElem(options);
        this.showDialog(options);
        this.dialogObj.dataBind();
        var filterLength = (this.existingPredicate[options.field] && this.existingPredicate[options.field].length) ||
            this.options.filteredColumns.filter(function (col) {
                return _this.options.field === col.field;
            }).length;
        this.createMenu(options.type, filterLength > 0, (filterLength === 1 || filterLength === 2));
        this.dlg.insertBefore(this.menu, this.dlg.firstChild);
        this.dlg.classList.add('e-excelfilter');
        this.dlg.classList.remove('e-checkboxfilter');
        this.cmenu = this.parent.createElement('ul', { className: 'e-excel-menu' });
        this.wireExEvents();
    };
    ExcelFilter.prototype.closeDialog = function () {
        _super.prototype.closeDialog.call(this);
    };
    ExcelFilter.prototype.selectHandler = function (e) {
        if (e.item) {
            this.menuItem = e.item;
            this.renderDialogue(e);
        }
    };
    ExcelFilter.prototype.renderDialogue = function (e) {
        var _this = this;
        var target = e.element;
        var column = this.options.field;
        var isComplex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isComplexField"])(column);
        var complexFieldName = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getComplexFieldID"])(column);
        var mainDiv = this.parent.createElement('div', {
            className: 'e-xlfl-maindiv',
            id: isComplex ? complexFieldName + '-xlflmenu' : column + '-xlflmenu'
        });
        this.dlgDiv = this.parent.createElement('div', {
            className: 'e-xlflmenu',
            id: isComplex ? complexFieldName + '-xlfldlg' : column + '-xlfldlg'
        });
        this.parent.element.appendChild(this.dlgDiv);
        this.dlgObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_6__["Dialog"]({
            header: this.getLocalizedLabel('CustomFilter'),
            isModal: true,
            overlayClick: this.removeDialog.bind(this),
            showCloseIcon: true,
            closeOnEscape: false,
            target: document.body,
            // target: this.parent.element,
            visible: false,
            enableRtl: this.parent.enableRtl,
            open: function () {
                var row = _this.dlgObj.element.querySelector('table.e-xlfl-table>tr');
                if (_this.options.column.filterTemplate) {
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                        row.querySelector('.e-xlfl-valuediv').children[0].focus();
                    }
                    else {
                        row.querySelector('#' + _this.options.column.field + '-xlfl-frstvalue').focus();
                    }
                }
                else {
                    row.cells[1].querySelector('input:not([type=hidden])').focus();
                }
            },
            close: this.removeDialog.bind(this),
            created: this.createdDialog.bind(this, target, column),
            buttons: [{
                    click: this.filterBtnClick.bind(this, column),
                    buttonModel: {
                        content: this.getLocalizedLabel('OKButton'), isPrimary: true, cssClass: 'e-xlfl-okbtn'
                    }
                },
                {
                    click: this.removeDialog.bind(this),
                    buttonModel: { content: this.getLocalizedLabel('CancelButton'), cssClass: 'e-xlfl-cancelbtn' }
                }],
            content: mainDiv,
            width: 430,
            animationSettings: { effect: 'None' },
        });
        var isStringTemplate = 'isStringTemplate';
        this.dlgObj[isStringTemplate] = true;
        this.dlgObj.appendTo(this.dlgDiv);
    };
    ExcelFilter.prototype.removeDialog = function () {
        this.removeObjects([this.dropOptr, this.datePicker, this.dateTimePicker, this.actObj, this.numericTxtObj, this.dlgObj]);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.dlgDiv);
    };
    ExcelFilter.prototype.createdDialog = function (target, column) {
        this.renderCustomFilter(target, column);
        this.dlgObj.element.style.left = '0px';
        this.dlgObj.element.style.top = '0px';
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && window.innerWidth < 440) {
            this.dlgObj.element.style.width = '90%';
        }
        this.dlgObj.show();
        this.parent.applyBiggerTheme(this.dlgObj.element.parentElement);
    };
    ExcelFilter.prototype.renderCustomFilter = function (target, column) {
        var dlgConetntEle = this.dlgObj.element.querySelector('.e-xlfl-maindiv');
        /* tslint:disable-next-line:max-line-length */
        var dlgFields = this.parent.createElement('div', { innerHTML: this.getLocalizedLabel('ShowRowsWhere'), className: 'e-xlfl-dlgfields' });
        dlgConetntEle.appendChild(dlgFields);
        //column name
        var fieldSet = this.parent.createElement('div', { innerHTML: this.options.displayName, className: 'e-xlfl-fieldset' });
        dlgConetntEle.appendChild(fieldSet);
        this.renderFilterUI(column, dlgConetntEle);
    };
    ExcelFilter.prototype.filterBtnClick = function (col) {
        var isComplex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isComplexField"])(col);
        var complexFieldName = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getComplexFieldID"])(col);
        var colValue = isComplex ? complexFieldName : col;
        var fValue = this.parent.getColumnByField(col).filterTemplate && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ?
            this.dlgDiv.querySelector('.-xlfl-frstvalue').children[0].querySelector('.e-control').ej2_instances[0]
            : this.dlgDiv.querySelector('#' + colValue + '-xlfl-frstvalue').ej2_instances[0];
        var fOperator = this.dlgDiv.querySelector('#' + colValue + '-xlfl-frstoptr').ej2_instances[0];
        var sValue = this.parent.getColumnByField(col).filterTemplate && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ?
            this.dlgDiv.querySelector('.-xlfl-secndvalue').children[0].querySelector('.e-control').ej2_instances[0]
            : this.dlgDiv.querySelector('#' + colValue + '-xlfl-secndvalue').ej2_instances[0];
        var sOperator = this.dlgDiv.querySelector('#' + colValue + '-xlfl-secndoptr').ej2_instances[0];
        var checkBoxValue;
        if (this.options.type === 'string') {
            var checkBox = this.dlgDiv.querySelector('#' + colValue + '-xlflmtcase').ej2_instances[0];
            checkBoxValue = checkBox.checked;
        }
        var andRadio = this.dlgDiv.querySelector('#' + colValue + 'e-xlfl-frstpredicate').ej2_instances[0];
        var orRadio = this.dlgDiv.querySelector('#' + colValue + 'e-xlfl-secndpredicate').ej2_instances[0];
        var predicate = (andRadio.checked ? 'and' : 'or');
        if (sValue.value === null) {
            predicate = 'or';
        }
        this.filterByColumn(this.options.field, fOperator.value, fValue.value, predicate, checkBoxValue, this.parent.filterSettings.ignoreAccent, sOperator.value, sValue.value);
        this.removeDialog();
    };
    /**
     * Filters grid row by column name with given options.
     * @param {string} fieldName - Defines the field name of the filter column.
     * @param {string} firstOperator - Defines the first operator by how to filter records.
     * @param {string | number | Date | boolean} firstValue - Defines the first value which is used to filter records.
     * @param  {string} predicate - Defines the relationship between one filter query with another by using AND or OR predicate.
     * @param {boolean} matchCase - If ignore case set to true, then filter records with exact match or else
     * filter records with case insensitive(uppercase and lowercase letters treated as same).
     * @param {boolean} ignoreAccent - If ignoreAccent set to true, then ignores the diacritic characters or accents when filtering.
     * @param {string} secondOperator - Defines the second operator by how to filter records.
     * @param {string | number | Date | boolean} secondValue - Defines the first value which is used to filter records.
     */
    ExcelFilter.prototype.filterByColumn = function (fieldName, firstOperator, firstValue, predicate, matchCase, ignoreAccent, secondOperator, secondValue) {
        var col = this.parent.getColumnByField(fieldName);
        var field = col.isForeignColumn() ? col.foreignKeyValue : fieldName;
        var fColl = [];
        var mPredicate;
        fColl.push({
            field: field,
            predicate: predicate,
            matchCase: matchCase,
            ignoreAccent: ignoreAccent,
            operator: firstOperator,
            value: firstValue,
            type: this.options.type
        });
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(this.parent)) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["preventBatch"], {
                instance: this, handler: this.filterByColumn, arg1: fieldName, arg2: firstOperator, arg3: firstValue, arg4: predicate,
                arg5: matchCase, arg6: ignoreAccent, arg7: secondOperator, arg8: secondValue
            });
            return;
        }
        mPredicate = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["Predicate"](field, firstOperator.toLowerCase(), firstValue, !matchCase, ignoreAccent);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(secondValue)) {
            secondOperator = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(secondOperator) ? secondOperator : 'equal';
            fColl.push({
                field: field,
                predicate: predicate,
                matchCase: matchCase,
                ignoreAccent: ignoreAccent,
                operator: secondOperator,
                value: secondValue,
                type: this.options.type
            });
            /* tslint:disable-next-line:max-line-length */
            mPredicate = mPredicate[predicate](field, secondOperator.toLowerCase(), secondValue, !matchCase, ignoreAccent);
        }
        var args = {
            action: 'filtering', filterCollection: fColl, field: this.options.field,
            ejpredicate: mPredicate, actualPredicate: fColl
        };
        if (col.isForeignColumn()) {
            this.foreignKeyFilter(args, fColl, mPredicate);
        }
        else {
            this.options.handler(args);
        }
    };
    /* tslint:disable-next-line:max-line-length */
    ExcelFilter.prototype.renderOperatorUI = function (column, table, elementID, predicates, isFirst) {
        var fieldElement = this.parent.createElement('tr', { className: 'e-xlfl-fields' });
        table.appendChild(fieldElement);
        var xlfloptr = this.parent.createElement('td', { className: 'e-xlfl-optr' });
        fieldElement.appendChild(xlfloptr);
        var optrDiv = this.parent.createElement('div', { className: 'e-xlfl-optrdiv' });
        var isComplex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isComplexField"])(column);
        var complexFieldName = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getComplexFieldID"])(column);
        var optrInput = this.parent
            .createElement('input', { id: isComplex ? complexFieldName + elementID : column + elementID });
        optrDiv.appendChild(optrInput);
        xlfloptr.appendChild(optrDiv);
        var optr = this.options.type + 'Operator';
        var dropDatasource = this.customFilterOperators[optr];
        this.optrData = dropDatasource;
        var selectedValue = this.dropSelectedVal(column, predicates, isFirst);
        //Trailing three dots are sliced.
        var menuText = '';
        if (this.menuItem) {
            menuText = this.menuItem.text.slice(0, -3);
            if (menuText !== this.getLocalizedLabel('CustomFilter')) {
                selectedValue = isFirst ? menuText : undefined;
            }
            if (menuText === this.getLocalizedLabel('Between')) {
                selectedValue = this.getLocalizedLabel(isFirst ? 'GreaterThanOrEqual' : 'LessThanOrEqual');
            }
        }
        var col = this.parent.getColumnByField(column);
        this.dropOptr = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_7__["DropDownList"](Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["extend"])({
            dataSource: dropDatasource,
            fields: { text: 'text', value: 'value' },
            text: selectedValue,
            open: this.dropDownOpen.bind(this),
            enableRtl: this.parent.enableRtl
        }, col.filter.params));
        this.dropOptr.appendTo(optrInput);
        var operator = this.getSelectedValue(selectedValue);
        return { fieldElement: fieldElement, operator: operator };
    };
    ExcelFilter.prototype.dropDownOpen = function (args) {
        args.popup.element.style.zIndex = (this.dialogObj.zIndex + 1).toString();
    };
    ExcelFilter.prototype.getSelectedValue = function (text) {
        var selectedField = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"](this.optrData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["Query"]().where('text', 'equal', text));
        return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedField[0]) ? selectedField[0].value : '';
    };
    ExcelFilter.prototype.dropSelectedVal = function (col, predicates, isFirst) {
        var operator;
        if (predicates && predicates.length > 0) {
            operator = predicates.length === 2 ?
                (isFirst ? predicates[0].operator : predicates[1].operator) :
                (isFirst ? predicates[0].operator : undefined);
        }
        else {
            operator = isFirst ? 'equal' : undefined;
        }
        return this.getSelectedText(operator);
    };
    ExcelFilter.prototype.getSelectedText = function (operator) {
        var selectedField = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"](this.optrData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["Query"]().where('value', 'equal', operator));
        return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedField[0]) ? selectedField[0].text : '';
    };
    ExcelFilter.prototype.renderFilterUI = function (column, dlgConetntEle) {
        var predicates = this.existingPredicate[column];
        var table = this.parent.createElement('table', { className: 'e-xlfl-table' });
        dlgConetntEle.appendChild(table);
        var colGroup = this.parent.createElement('colGroup');
        colGroup.innerHTML = '<col style="width: 50%"></col><col style="width: 50%"></col>';
        table.appendChild(colGroup);
        //Renders first dropdown
        /* tslint:disable-next-line:max-line-length */
        var optr = this.renderOperatorUI(column, table, '-xlfl-frstoptr', predicates, true);
        //Renders first value
        this.renderFlValueUI(column, optr, '-xlfl-frstvalue', predicates, true);
        var predicate = this.parent.createElement('tr', { className: 'e-xlfl-predicate' });
        table.appendChild(predicate);
        //Renders first radion button
        this.renderRadioButton(column, predicate, predicates);
        //Renders second dropdown
        optr = this.renderOperatorUI(column, table, '-xlfl-secndoptr', predicates, false);
        //Renders second text box
        this.renderFlValueUI(column, optr, '-xlfl-secndvalue', predicates, false);
    };
    ExcelFilter.prototype.renderRadioButton = function (column, tr, predicates) {
        var td = this.parent.createElement('td', { className: 'e-xlfl-radio', attrs: { 'colSpan': '2' } });
        tr.appendChild(td);
        var radioDiv = this.parent
            .createElement('div', { className: 'e-xlfl-radiodiv', attrs: { 'style': 'display: inline-block' } });
        var isComplex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isComplexField"])(column);
        var complexFieldName = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getComplexFieldID"])(column);
        /* tslint:disable-next-line:max-line-length */
        var frstpredicate = this.parent.createElement('input', { id: isComplex ? complexFieldName + 'e-xlfl-frstpredicate' : column + 'e-xlfl-frstpredicate', attrs: { 'type': 'radio' } });
        /* tslint:disable-next-line:max-line-length */
        var secndpredicate = this.parent.createElement('input', { id: isComplex ? complexFieldName + 'e-xlfl-secndpredicate' : column + 'e-xlfl-secndpredicate', attrs: { 'type': 'radio' } });
        //appends into div
        radioDiv.appendChild(frstpredicate);
        radioDiv.appendChild(secndpredicate);
        td.appendChild(radioDiv);
        if (this.options.type === 'string') {
            this.renderMatchCase(column, tr, td, '-xlflmtcase', predicates);
        }
        // Initialize AND RadioButton component.
        /* tslint:disable-next-line:max-line-length */
        var andRadio = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_9__["RadioButton"]({ label: this.getLocalizedLabel('AND'), name: 'default', cssClass: 'e-xlfl-radio-and', checked: true, enableRtl: this.parent.enableRtl });
        // Initialize OR RadioButton component.
        /* tslint:disable-next-line:max-line-length */
        var orRadio = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_9__["RadioButton"]({ label: this.getLocalizedLabel('OR'), name: 'default', cssClass: 'e-xlfl-radio-or', enableRtl: this.parent.enableRtl });
        var flValue = predicates && predicates.length === 2 ? predicates[1].predicate : 'and';
        if (flValue === 'and') {
            andRadio.checked = true;
            orRadio.checked = false;
        }
        else {
            orRadio.checked = true;
            andRadio.checked = false;
        }
        // Render initialized RadioButton.
        andRadio.appendTo(frstpredicate);
        orRadio.appendTo(secndpredicate);
    };
    /* tslint:disable-next-line:no-any */
    ExcelFilter.prototype.removeObjects = function (elements) {
        for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
            var obj = elements_1[_i];
            if (obj && !obj.isDestroyed) {
                obj.destroy();
            }
        }
    };
    /* tslint:disable-next-line:max-line-length */
    ExcelFilter.prototype.renderFlValueUI = function (column, optr, elementId, predicates, isFirst) {
        var value = this.parent.createElement('td', { className: 'e-xlfl-value' });
        optr.fieldElement.appendChild(value);
        var isComplex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isComplexField"])(column);
        var complexFieldName = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getComplexFieldID"])(column);
        var valueDiv = this.parent.createElement('div', { className: 'e-xlfl-valuediv' });
        var isFilteredCol = this.filterSettings.columns.some(function (col) { return column === col.field; });
        var fltrPredicates = this.options.filteredColumns.filter(function (col) { return col.field === column; });
        if (this.options.column.filterTemplate) {
            var data = {};
            var columnObj = this.parent.getColumnByField(column);
            if (isFilteredCol && elementId === '-xlfl-frstvalue') {
                data = { column: predicates instanceof Array ? predicates[0] : predicates };
                var indx = this.options.column.columnData && fltrPredicates.length > 1 ?
                    (this.options.column.columnData.length === 1 ? 0 : 1) : 0;
                data[this.options.field] = columnObj.foreignKeyValue ? this.options.column.columnData[indx][columnObj.foreignKeyValue] :
                    fltrPredicates[indx].value;
                if (this.options.foreignKeyValue) {
                    data[this.options.foreignKeyValue] = this.options.column.columnData[indx][columnObj.foreignKeyValue];
                }
            }
            var tempID = this.parent.element.id + columnObj.uid + 'filterTemplate';
            var element = this.options.column.getFilterTemplate()(data, this.parent, 'filterTemplate', tempID);
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["appendChildren"])(valueDiv, element);
            valueDiv.children[0].id = isComplex ? complexFieldName + elementId : column + elementId;
            value.appendChild(valueDiv);
        }
        else {
            var valueInput = this.parent
                .createElement('input', { id: isComplex ? complexFieldName + elementId : column + elementId });
            valueDiv.appendChild(valueInput);
            value.appendChild(valueDiv);
            var flValue = void 0;
            var predicate = void 0;
            if (predicates && predicates.length > 0) {
                predicate = predicates.length === 2 ?
                    (isFirst ? predicates[0] : predicates[1]) :
                    (isFirst ? predicates[0] : undefined);
                flValue = (predicate && predicate.operator === optr.operator) ? predicate.value : undefined;
            }
            var types = {
                'string': this.renderAutoComplete.bind(this),
                'number': this.renderNumericTextBox.bind(this),
                'date': this.renderDate.bind(this),
                'datetime': this.renderDateTime.bind(this)
            };
            types[this.options.type](this.options, column, valueInput, flValue, this.parent.enableRtl);
        }
    };
    /* tslint:disable-next-line:max-line-length */
    ExcelFilter.prototype.renderMatchCase = function (column, tr, matchCase, elementId, predicates) {
        /* tslint:disable-next-line:max-line-length */
        var matchCaseDiv = this.parent.createElement('div', { className: 'e-xlfl-matchcasediv', attrs: { 'style': 'display: inline-block' } });
        var isComplex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isComplexField"])(column);
        var complexFieldName = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getComplexFieldID"])(column);
        var matchCaseInput = this.parent.createElement('input', { id: isComplex ? complexFieldName + elementId : column + elementId, attrs: { 'type': 'checkbox' } });
        matchCaseDiv.appendChild(matchCaseInput);
        matchCase.appendChild(matchCaseDiv);
        var flValue = predicates && predicates.length > 0 ?
            (predicates && predicates.length === 2 ? predicates[1].matchCase : predicates[0].matchCase) :
            false;
        // Initialize Match Case check box.
        var checkbox = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_9__["CheckBox"]({
            label: this.getLocalizedLabel('MatchCase'),
            enableRtl: this.parent.enableRtl, checked: flValue
        });
        // Render initialized CheckBox.
        checkbox.appendTo(matchCaseInput);
    };
    /* tslint:disable-next-line:max-line-length */
    ExcelFilter.prototype.renderDate = function (options, column, inputValue, fValue, isRtl) {
        var format = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getCustomDateFormat"])(options.format, options.type);
        this.datePicker = new _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_10__["DatePicker"](Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["extend"])({
            format: format,
            cssClass: 'e-popup-flmenu',
            placeholder: this.getLocalizedLabel('CustomFilterDatePlaceHolder'),
            width: '100%',
            enableRtl: isRtl,
            value: new Date(fValue),
        }, options.column.filter.params));
        this.datePicker.appendTo(inputValue);
    };
    /* tslint:disable-next-line:max-line-length */
    ExcelFilter.prototype.renderDateTime = function (options, column, inputValue, fValue, isRtl) {
        var format = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getCustomDateFormat"])(options.format, options.type);
        this.dateTimePicker = new _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_10__["DateTimePicker"](Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["extend"])({
            format: format,
            cssClass: 'e-popup-flmenu',
            placeholder: this.getLocalizedLabel('CustomFilterDatePlaceHolder'),
            width: '100%',
            enableRtl: isRtl,
            value: new Date(fValue),
        }, options.column.filter.params));
        this.dateTimePicker.appendTo(inputValue);
    };
    ExcelFilter.prototype.completeAction = function (e) {
        e.result = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["distinctStringValues"])(e.result);
    };
    /* tslint:disable-next-line:max-line-length */
    ExcelFilter.prototype.renderNumericTextBox = function (options, column, inputValue, fValue, isRtl) {
        this.numericTxtObj = new _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_8__["NumericTextBox"](Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["extend"])({
            format: options.format,
            placeholder: this.getLocalizedLabel('CustomFilterPlaceHolder'),
            enableRtl: isRtl,
            value: fValue
        }, options.column.filter.params));
        this.numericTxtObj.appendTo(inputValue);
    };
    /* tslint:disable-next-line:max-line-length */
    ExcelFilter.prototype.renderAutoComplete = function (options, column, inputValue, fValue, isRtl) {
        var _this = this;
        var colObj = this.parent.getColumnByField(column);
        var isForeignColumn = colObj.isForeignColumn();
        var dataSource = isForeignColumn ? colObj.dataSource : options.dataSource;
        var fields = { value: isForeignColumn ? colObj.foreignKeyValue : column };
        var actObj = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_7__["AutoComplete"](Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["extend"])({
            dataSource: dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"] ? dataSource : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataManager"](dataSource),
            fields: fields,
            query: this.parent.getQuery().clone(),
            sortOrder: 'Ascending',
            locale: this.parent.locale,
            autofill: true,
            focus: function () {
                var isComplex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isComplexField"])(column);
                var complexFieldName = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getComplexFieldID"])(column);
                var columnvalue = isComplex ? complexFieldName : column;
                actObj.filterType = _this.dlgDiv.querySelector('#' + columnvalue +
                    (inputValue.id === (columnvalue + '-xlfl-frstvalue') ?
                        '-xlfl-frstoptr' :
                        '-xlfl-secndoptr')).ej2_instances[0].value;
                actObj.ignoreCase = options.type === 'string' ?
                    !_this.dlgDiv.querySelector('#' + columnvalue + '-xlflmtcase').ej2_instances[0].checked :
                    true;
                actObj.filterType = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(actObj.filterType) ? actObj.filterType :
                    'equal';
            },
            placeholder: this.getLocalizedLabel('CustomFilterPlaceHolder'),
            enableRtl: isRtl,
            actionComplete: function (e) {
                var isComplex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isComplexField"])(column);
                e.result = e.result.filter(function (obj, index, arr) {
                    return arr.map(function (mapObject) {
                        return isComplex ? _this.performComplexDataOperation(actObj.fields.value, mapObject)
                            : mapObject[actObj.fields.value];
                    }).indexOf(isComplex ? _this.performComplexDataOperation(actObj.fields.value, obj) :
                        obj[_this.actObj.fields.value]) === index;
                });
            },
            value: fValue
        }, colObj.filter.params));
        actObj.appendTo(inputValue);
        this.actObj = actObj;
    };
    ExcelFilter.prototype.performComplexDataOperation = function (value, mapObject) {
        var returnObj;
        var length = value.split('.').length;
        var splits = value.split('.');
        var duplicateMap = mapObject;
        for (var i = 0; i < length; i++) {
            returnObj = duplicateMap[splits[i]];
            duplicateMap = returnObj;
        }
        return returnObj;
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    ExcelFilter.prototype.getModuleName = function () {
        return 'excelFilter';
    };
    return ExcelFilter;
}(_actions_checkbox_filter__WEBPACK_IMPORTED_MODULE_4__["CheckBoxFilter"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/export-helper.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/export-helper.js ***!
  \******************************************************************************/
/*! exports provided: ExportHelper, ExportValueFormatter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportHelper", function() { return ExportHelper; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportValueFormatter", function() { return ExportValueFormatter; });
/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _models_cell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../models/cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js");
/* harmony import */ var _services_value_formatter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../services/value-formatter */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_grid__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../base/grid */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js");








/**
 * @hidden
 * `ExportHelper` for `PdfExport` & `ExcelExport`
 */
var ExportHelper = /** @class */ (function () {
    function ExportHelper(parent) {
        this.hideColumnInclude = false;
        this.foreignKeyData = {};
        this.parent = parent;
    }
    ExportHelper.getQuery = function (parent, data) {
        return data.isRemote() ?
            data.generateQuery(true).requiresCount().take(parent.pageSettings.totalRecordsCount) :
            data.generateQuery(true).requiresCount();
    };
    ExportHelper.prototype.getFData = function (value, column) {
        var foreignKeyData = Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getForeignData"])(column, {}, value, this.foreignKeyData[column.field])[0];
        return foreignKeyData;
    };
    ExportHelper.prototype.getGridRowModel = function (columns, dataSource, gObj, startIndex) {
        if (startIndex === void 0) { startIndex = 0; }
        var rows = [];
        var length = dataSource.length;
        if (length) {
            for (var i = 0; i < length; i++, startIndex++) {
                var options = { isExpand: false };
                options.data = dataSource[i];
                options.index = startIndex;
                if (gObj.childGrid) {
                    if (gObj.hierarchyPrintMode === 'All') {
                        options.isExpand = true;
                    }
                    else if (gObj.hierarchyPrintMode === 'Expanded' &&
                        this.parent.expandedRows && this.parent.expandedRows[startIndex]) {
                        options.isExpand = gObj.expandedRows[startIndex].isExpand;
                    }
                }
                var row = new _models_row__WEBPACK_IMPORTED_MODULE_0__["Row"](options);
                row.cells = this.generateCells(columns, gObj);
                rows.push(row);
            }
            this.processColumns(rows);
        }
        return rows;
    };
    ExportHelper.prototype.generateCells = function (columns, gObj) {
        var cells = [];
        if (gObj.childGridLevel) {
            var len = gObj.childGridLevel;
            for (var i = 0; len > i; i++) {
                cells.push(this.generateCell({}, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Indent));
            }
        }
        for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
            var col = columns_1[_i];
            cells.push(this.generateCell(col, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Data));
        }
        return cells;
    };
    ExportHelper.prototype.getColumnData = function (gridObj) {
        var _this = this;
        var columnPromise = [];
        var promise;
        var fColumns = gridObj.getForeignKeyColumns();
        if (fColumns.length) {
            fColumns.forEach(function (col) {
                columnPromise.push(col.dataSource.executeQuery(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["Query"]()));
            });
            promise = Promise.all(columnPromise).then(function (e) {
                fColumns.forEach(function (col, index) {
                    _this.foreignKeyData[col.field] = e[index].result;
                });
                // tslint:disable-next-line:no-any
            });
        }
        return promise;
    };
    ExportHelper.prototype.getHeaders = function (columns, isHideColumnInclude) {
        if (isHideColumnInclude) {
            this.hideColumnInclude = true;
        }
        else {
            this.hideColumnInclude = false;
        }
        this.colDepth = Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["measureColumnDepth"])(columns);
        var rows = [];
        for (var i = 0; i < this.colDepth; i++) {
            rows[i] = new _models_row__WEBPACK_IMPORTED_MODULE_0__["Row"]({});
            rows[i].cells = [];
        }
        rows = this.processColumns(rows);
        rows = this.processHeaderCells(rows);
        return { rows: rows, columns: this.generateActualColumns(columns) };
    };
    ExportHelper.prototype.getConvertedWidth = function (input) {
        var value = parseFloat(input);
        return (input.indexOf('%') !== -1) ? (this.parent.element.getBoundingClientRect().width * value / 100) : value;
    };
    ExportHelper.prototype.generateActualColumns = function (columns, actualColumns) {
        if (actualColumns === void 0) { actualColumns = []; }
        for (var _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {
            var column = columns_2[_i];
            if (column.commands) {
                continue;
            }
            if (!column.columns) {
                if (column.visible || this.hideColumnInclude) {
                    actualColumns.push(column);
                }
            }
            else {
                if (column.visible || this.hideColumnInclude) {
                    var colSpan = this.getCellCount(column, 0);
                    if (colSpan !== 0) {
                        this.generateActualColumns(column.columns, actualColumns);
                    }
                }
            }
        }
        return actualColumns;
    };
    ExportHelper.prototype.processHeaderCells = function (rows) {
        var columns = this.parent.columns;
        for (var i = 0; i < columns.length; i++) {
            if (!columns[i].commands) {
                rows = this.appendGridCells(columns[i], rows, 0);
            }
        }
        return rows;
    };
    ExportHelper.prototype.appendGridCells = function (cols, gridRows, index) {
        if (!cols.columns && (cols.visible !== false || this.hideColumnInclude) && !cols.commands) {
            gridRows[index].cells.push(this.generateCell(cols, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Header, this.colDepth - index, index));
        }
        else if (cols.columns) {
            var colSpan = this.getCellCount(cols, 0);
            if (colSpan) {
                gridRows[index].cells.push(new _models_cell__WEBPACK_IMPORTED_MODULE_3__["Cell"]({
                    cellType: _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].StackedHeader, column: cols, colSpan: colSpan
                }));
            }
            var isIgnoreFirstCell = void 0;
            for (var i = 0, len = cols.columns.length; i < len; i++) {
                if (cols.columns[i].visible && !isIgnoreFirstCell) {
                    isIgnoreFirstCell = true;
                }
                gridRows = this.appendGridCells(cols.columns[i], gridRows, index + 1);
            }
        }
        return gridRows;
    };
    ExportHelper.prototype.generateCell = function (gridColumn, cellType, rowSpan, rowIndex) {
        var option = {
            'visible': gridColumn.visible,
            'isDataCell': cellType === _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Data,
            'column': gridColumn,
            'cellType': cellType,
            'rowSpan': rowSpan,
            'index': rowIndex
        };
        if (!option.rowSpan || option.rowSpan < 2) {
            delete option.rowSpan;
        }
        return new _models_cell__WEBPACK_IMPORTED_MODULE_3__["Cell"](option);
    };
    ExportHelper.prototype.processColumns = function (rows) {
        //TODO: generate dummy column for group, detail, stacked row here; ensureColumns here
        var gridObj = this.parent;
        var columnIndexes = [];
        if (gridObj.enableColumnVirtualization) {
            columnIndexes = gridObj.getColumnIndexesInView();
        }
        for (var i = 0, len = rows.length; i < len; i++) {
            if (gridObj.allowGrouping) {
                for (var j = 0, len_1 = gridObj.groupSettings.columns.length; j < len_1; j++) {
                    if (gridObj.enableColumnVirtualization && columnIndexes.indexOf(j) === -1) {
                        continue;
                    }
                    rows[i].cells.splice(0, 0, this.generateCell({}, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].HeaderIndent));
                }
            }
        }
        return rows;
    };
    ExportHelper.prototype.getCellCount = function (column, count) {
        if (column.columns) {
            for (var i = 0; i < column.columns.length; i++) {
                count = this.getCellCount(column.columns[i], count);
            }
        }
        else {
            if (column.visible || this.hideColumnInclude) {
                count++;
            }
        }
        return count;
    };
    ExportHelper.prototype.checkAndExport = function (gridPool, globalResolve) {
        var bool = Object.keys(gridPool).some(function (key) {
            return !gridPool[key];
        });
        if (!bool) {
            globalResolve();
        }
    };
    ExportHelper.prototype.failureHandler = function (gridPool, childGridObj, resolve) {
        var _this = this;
        return function () {
            gridPool[childGridObj.id] = true;
            _this.checkAndExport(gridPool, resolve);
        };
    };
    // tslint:disable-next-line:no-any
    ExportHelper.prototype.createChildGrid = function (gObj, row, exportType, gridPool) {
        var childGridObj = new _base_grid__WEBPACK_IMPORTED_MODULE_7__["Grid"](this.parent.detailRowModule.getGridModel(gObj, row, exportType));
        gObj.isPrinting = false;
        var parent = 'parentDetails';
        childGridObj[parent] = {
            parentID: gObj.element.id,
            parentPrimaryKeys: gObj.getPrimaryKeyFieldNames(),
            parentKeyField: gObj.childGrid.queryString,
            parentKeyFieldValue: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["getValue"])(childGridObj.queryString, row.data),
            parentRowData: row.data
        };
        var exportId = Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getUid"])('child-grid');
        var element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["createElement"])('div', {
            id: exportId, styles: 'display: none'
        });
        document.body.appendChild(element);
        childGridObj.id = exportId;
        gridPool[exportId] = false;
        return { childGrid: childGridObj, element: element };
    };
    return ExportHelper;
}());

/**
 * @hidden
 * `ExportValueFormatter` for `PdfExport` & `ExcelExport`
 */
var ExportValueFormatter = /** @class */ (function () {
    function ExportValueFormatter(culture) {
        this.valueFormatter = new _services_value_formatter__WEBPACK_IMPORTED_MODULE_4__["ValueFormatter"](culture);
        this.internationalization = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Internationalization"](culture);
    }
    /* tslint:disable-next-line:no-any */
    ExportValueFormatter.prototype.returnFormattedValue = function (args, customFormat) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(args.value) && args.value) {
            return this.valueFormatter.getFormatFunction(customFormat)(args.value);
        }
        else {
            return '';
        }
    };
    /* tslint:disable-next-line:no-any */
    ExportValueFormatter.prototype.formatCellValue = function (args) {
        if (args.isForeignKey) {
            args.value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["getValue"])(args.column.foreignKeyValue, Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getForeignData"])(args.column, {}, args.value)[0]);
        }
        if (args.column.type === 'number' && args.column.format !== undefined && args.column.format !== '') {
            return args.value ? this.internationalization.getNumberFormat({ format: args.column.format })(args.value) : '';
        }
        else if (args.column.type === 'boolean') {
            return args.value ? 'true' : 'false';
            /* tslint:disable-next-line:max-line-length */
        }
        else if ((args.column.type === 'date' || args.column.type === 'datetime' || args.column.type === 'time') && args.column.format !== undefined) {
            if (typeof args.value === 'string') {
                args.value = new Date(args.value);
            }
            if (typeof args.column.format === 'string') {
                var format = void 0;
                if (args.column.type === 'date') {
                    format = { type: 'date', skeleton: args.column.format };
                }
                else if (args.column.type === 'time') {
                    format = { type: 'time', skeleton: args.column.format };
                }
                else {
                    format = { type: 'dateTime', skeleton: args.column.format };
                }
                return this.returnFormattedValue(args, format);
            }
            else {
                if (args.column.format instanceof Object && args.column.format.type === undefined) {
                    return (args.value.toString());
                }
                else {
                    /* tslint:disable-next-line:max-line-length */
                    var customFormat = void 0;
                    if (args.column.type === 'date') {
                        /* tslint:disable-next-line:max-line-length */
                        customFormat = { type: args.column.format.type, format: args.column.format.format, skeleton: args.column.format.skeleton };
                    }
                    else if (args.column.type === 'time') {
                        customFormat = { type: 'time', format: args.column.format.format, skeleton: args.column.format.skeleton };
                    }
                    else {
                        customFormat = { type: 'dateTime', format: args.column.format.format, skeleton: args.column.format.skeleton };
                    }
                    return this.returnFormattedValue(args, customFormat);
                }
            }
        }
        else {
            if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(args.column.type) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(args.value)) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(args.value)) {
                return (args.value).toString();
            }
            else {
                return '';
            }
        }
    };
    return ExportValueFormatter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/filter.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/filter.js ***!
  \***********************************************************************/
/*! exports provided: Filter */
/***/ (function(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 _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../renderer/row-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js");
/* harmony import */ var _models_cell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../models/cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js");
/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony import */ var _renderer_filter_cell_renderer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../renderer/filter-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-cell-renderer.js");
/* harmony import */ var _renderer_filter_menu_renderer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../renderer/filter-menu-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-menu-renderer.js");
/* harmony import */ var _actions_checkbox_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../actions/checkbox-filter */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/checkbox-filter.js");
/* harmony import */ var _actions_excel_filter__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../actions/excel-filter */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-filter.js");














/**
 *
 * The `Filter` module is used to handle filtering action.
 */
var Filter = /** @class */ (function () {
    /**
     * Constructor for Grid filtering module
     * @hidden
     */
    function Filter(parent, filterSettings, serviceLocator) {
        this.predicate = 'and';
        this.contentRefresh = true;
        this.refresh = true;
        this.values = {};
        this.cellText = {};
        this.nextFlMenuOpen = '';
        this.type = { 'Menu': _renderer_filter_menu_renderer__WEBPACK_IMPORTED_MODULE_9__["FilterMenuRenderer"], 'CheckBox': _actions_checkbox_filter__WEBPACK_IMPORTED_MODULE_10__["CheckBoxFilter"], 'Excel': _actions_excel_filter__WEBPACK_IMPORTED_MODULE_11__["ExcelFilter"] };
        this.filterOperators = {
            contains: 'contains', endsWith: 'endswith', equal: 'equal', greaterThan: 'greaterthan', greaterThanOrEqual: 'greaterthanorequal',
            lessThan: 'lessthan', lessThanOrEqual: 'lessthanorequal', notEqual: 'notequal', startsWith: 'startswith'
        };
        this.fltrDlgDetails = { field: '', isOpen: false };
        this.actualPredicate = {};
        this.parent = parent;
        this.filterSettings = filterSettings;
        this.serviceLocator = serviceLocator;
        this.addEventListener();
    }
    /**
     * To render filter bar when filtering enabled.
     * @return {void}
     * @hidden
     */
    Filter.prototype.render = function (e) {
        if (_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].getObject('args.isFrozen', e)) {
            return;
        }
        var gObj = this.parent;
        this.l10n = this.serviceLocator.getService('localization');
        this.getLocalizedCustomOperators();
        if (this.parent.filterSettings.type === 'FilterBar') {
            if (gObj.columns.length) {
                var fltrElem = this.parent.element.querySelector('.e-filterbar');
                if (fltrElem) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(fltrElem);
                }
                var rowRenderer = new _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_5__["RowRenderer"](this.serviceLocator, _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].Filter, gObj);
                var row = void 0;
                var cellrender = this.serviceLocator.getService('cellRendererFactory');
                cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].Filter, new _renderer_filter_cell_renderer__WEBPACK_IMPORTED_MODULE_8__["FilterCellRenderer"](this.parent, this.serviceLocator));
                this.valueFormatter = this.serviceLocator.getService('valueFormatter');
                rowRenderer.element = this.parent.createElement('tr', { className: 'e-filterbar' });
                row = this.generateRow();
                row.data = this.values;
                this.parent.getHeaderContent().querySelector('thead').appendChild(rowRenderer.element);
                var rowdrag = this.parent.element.querySelector('.e-rowdragheader');
                this.element = rowRenderer.render(row, gObj.getColumns(), null, null, rowRenderer.element);
                var detail = this.element.querySelector('.e-detailheadercell');
                if (detail) {
                    detail.className = 'e-filterbarcell e-mastercell';
                }
                if (rowdrag) {
                    rowdrag.className = 'e-dragheadercell e-mastercell';
                }
                var gCells = [].slice.call(this.element.querySelectorAll('.e-grouptopleftcell'));
                if (gCells.length) {
                    gCells[gCells.length - 1].classList.add('e-lastgrouptopleftcell');
                }
                this.wireEvents();
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["freezeRender"], { case: 'filter' });
            }
        }
    };
    /**
     * To destroy the filter bar.
     * @return {void}
     * @hidden
     */
    Filter.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        if (this.filterModule) {
            this.filterModule.destroy();
        }
        // tslint:disable-next-line:no-any
        if (!this.parent.refreshing) {
            this.filterSettings.columns = [];
        }
        this.updateFilterMsg();
        this.removeEventListener();
        this.unWireEvents();
        if (this.element) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
            var filterBarElement = this.parent.getHeaderContent().querySelector('.e-filterbar');
            if (this.parent.getFrozenColumns() && filterBarElement) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(filterBarElement);
            }
        }
    };
    Filter.prototype.generateRow = function (index) {
        var options = {};
        var row = new _models_row__WEBPACK_IMPORTED_MODULE_7__["Row"](options);
        row.cells = this.generateCells();
        return row;
    };
    Filter.prototype.generateCells = function () {
        //TODO: generate dummy column for group, detail, stacked row here for filtering;
        var cells = [];
        if (this.parent.allowGrouping) {
            for (var c = 0, len = this.parent.groupSettings.columns.length; c < len; c++) {
                cells.push(this.generateCell({}, _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].HeaderIndent));
            }
        }
        if (this.parent.detailTemplate || this.parent.childGrid) {
            cells.push(this.generateCell({}, _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].DetailHeader));
        }
        if (this.parent.isRowDragable()) {
            cells.push(this.generateCell({}, _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].RowDragHIcon));
        }
        for (var _i = 0, _a = this.parent.getColumns(); _i < _a.length; _i++) {
            var dummy = _a[_i];
            cells.push(this.generateCell(dummy));
        }
        return cells;
    };
    Filter.prototype.generateCell = function (column, cellType) {
        var opt = {
            'visible': column.visible,
            'isDataCell': false,
            'rowId': '',
            'column': column,
            'cellType': cellType ? cellType : _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].Filter,
            'attributes': { title: this.l10n.getConstant('FilterbarTitle') }
        };
        return new _models_cell__WEBPACK_IMPORTED_MODULE_6__["Cell"](opt);
    };
    /**
     * To update filterSettings when applying filter.
     * @return {void}
     * @hidden
     */
    Filter.prototype.updateModel = function () {
        var col = this.parent.getColumnByField(this.fieldName);
        var field = col.isForeignColumn() ? col.foreignKeyValue : this.fieldName;
        this.currentFilterObject = {
            field: field, uid: col.uid, operator: this.operator, value: this.value, predicate: this.predicate,
            matchCase: this.matchCase, ignoreAccent: this.ignoreAccent, actualFilterValue: {}, actualOperator: {}
        };
        var index = this.getFilteredColsIndexByField(col);
        if (index > -1) {
            this.filterSettings.columns[index] = this.currentFilterObject;
        }
        else {
            this.filterSettings.columns.push(this.currentFilterObject);
        }
        this.filterSettings.columns = this.filterSettings.columns;
        this.parent.dataBind();
    };
    Filter.prototype.getFilteredColsIndexByField = function (col) {
        var cols = this.filterSettings.columns;
        for (var i = 0, len = cols.length; i < len; i++) {
            if (cols[i].uid === col.uid || (col.isForeignColumn() && this.parent.getColumnByUid(col.uid).field === col.foreignKeyValue)) {
                return i;
            }
        }
        return -1;
    };
    /**
     * To trigger action complete event.
     * @return {void}
     * @hidden
     */
    Filter.prototype.onActionComplete = function (e) {
        var args = !this.isRemove ? {
            currentFilterObject: this.currentFilterObject,
            /* tslint:disable:no-string-literal */
            currentFilteringColumn: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.column) ? this.column.field : undefined,
            /* tslint:enable:no-string-literal */
            columns: this.filterSettings.columns, requestType: 'filtering', type: _base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"]
        } : {
            requestType: 'filtering', type: _base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"]
        };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(e, args));
        this.isRemove = false;
    };
    Filter.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.getHeaderContent(), 'keyup', this.keyUpHandler, this);
    };
    Filter.prototype.unWireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.getHeaderContent(), 'keyup', this.keyUpHandler);
    };
    Filter.prototype.enableAfterRender = function (e) {
        if (e.module === this.getModuleName() && e.enable) {
            this.parent.getHeaderTable().classList.add('e-sortfilter');
            this.render();
        }
    };
    Filter.prototype.initialEnd = function () {
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], this.initialEnd);
        if (this.parent.getColumns().length && this.filterSettings.columns.length) {
            var gObj = this.parent;
            this.contentRefresh = false;
            this.initialLoad = true;
            for (var _i = 0, _a = gObj.filterSettings.columns; _i < _a.length; _i++) {
                var col = _a[_i];
                this.filterByColumn(col.field, col.operator, col.value, col.predicate, col.matchCase, col.ignoreAccent, col.actualFilterValue, col.actualOperator);
            }
            this.initialLoad = false;
            this.updateFilterMsg();
            this.contentRefresh = true;
        }
    };
    /**
     * @hidden
     */
    Filter.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["uiUpdate"], this.enableAfterRender, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["filterComplete"], this.onActionComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["inBoundModelChanged"], this.onPropertyChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["keyPressed"], this.keyUpHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["columnPositionChanged"], this.columnPositionChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["headerRefreshed"], this.render, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], this.initialEnd, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["filterMenuClose"], this.filterMenuClose, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'click', this.clickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["filterOpen"], this.columnMenuFilter, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.filterIconClickHandler, this);
    };
    /**
     * @hidden
     */
    Filter.prototype.removeEventListener = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'click', this.clickHandler);
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["uiUpdate"], this.enableAfterRender);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["filterComplete"], this.onActionComplete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["inBoundModelChanged"], this.onPropertyChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["keyPressed"], this.keyUpHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["columnPositionChanged"], this.columnPositionChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["headerRefreshed"], this.render);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["filterOpen"], this.columnMenuFilter);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["filterMenuClose"], this.filterMenuClose);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.filterIconClickHandler);
    };
    Filter.prototype.filterMenuClose = function (args) {
        this.fltrDlgDetails.isOpen = false;
    };
    /**
     * Filters the Grid row by fieldName, filterOperator, and filterValue.
     * @param  {string} fieldName - Defines the field name of the filter column.
     * @param  {string} filterOperator - Defines the operator to filter records.
     * @param  {string | number | Date | boolean} filterValue - Defines the value which is used to filter records.
     * @param  {string} predicate - Defines the relationship of one filter query with another by using AND or OR predicate.
     * @param  {boolean} matchCase - If match case is set to true, then the filter records
     * the exact match or <br> filters records that are case insensitive (uppercase and lowercase letters treated the same).
     * @param {boolean} ignoreAccent - If ignoreAccent set to true, then filter ignores the diacritic characters or accents while filtering.
     * @param  {string} actualFilterValue - Defines the actual filter value for the filter column.
     * @param  {string} actualOperator - Defines the actual filter operator for the filter column.
     * @return {void}
     */
    Filter.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
        var gObj = this.parent;
        var filterCell;
        this.column = gObj.getColumnByField(fieldName);
        if (this.filterSettings.type === 'FilterBar') {
            filterCell = gObj.getHeaderContent().querySelector('[id=\'' + this.column.field + '_filterBarcell\']');
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.column.allowFiltering) && !this.column.allowFiltering) {
            this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), columnName: this.column.headerText });
            return;
        }
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(gObj)) {
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["preventBatch"], {
                instance: this, handler: this.filterByColumn, arg1: fieldName, arg2: filterOperator, arg3: filterValue, arg4: predicate,
                arg5: matchCase, arg6: ignoreAccent, arg7: actualFilterValue, arg8: actualOperator
            });
            return;
        }
        this.value = filterValue;
        this.matchCase = matchCase || false;
        this.ignoreAccent = this.ignoreAccent = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ignoreAccent) ? ignoreAccent : this.parent.filterSettings.ignoreAccent;
        this.fieldName = fieldName;
        this.predicate = predicate || 'and';
        this.operator = filterOperator;
        filterValue = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(filterValue) && filterValue.toString();
        if (this.column.type === 'number' || this.column.type === 'date') {
            this.matchCase = true;
        }
        gObj.getColumnHeaderByField(fieldName).setAttribute('aria-filtered', 'true');
        if (filterValue.length < 1 || this.checkForSkipInput(this.column, filterValue)) {
            this.filterStatusMsg = filterValue.length < 1 ? '' : this.l10n.getConstant('InvalidFilterMessage');
            this.updateFilterMsg();
            return;
        }
        if (filterCell && this.filterSettings.type === 'FilterBar' && filterCell.value !== filterValue) {
            filterCell.value = filterValue;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.column.format)) {
            this.applyColumnFormat(filterValue);
            if (this.initialLoad && this.filterSettings.type === 'FilterBar') {
                filterCell.value = this.values[this.column.field];
            }
        }
        else {
            this.values[this.column.field] = filterValue; //this line should be above updateModel
        }
        this.actualPredicate[this.fieldName] = [{
                field: this.fieldName,
                predicate: predicate,
                matchCase: matchCase,
                ignoreAccent: ignoreAccent,
                operator: this.operator,
                value: this.value,
                type: this.column.type
            }];
        this.addFilteredClass(this.fieldName);
        if (this.checkAlreadyColFiltered(this.column.field)) {
            return;
        }
        this.updateModel();
    };
    Filter.prototype.applyColumnFormat = function (filterValue) {
        var getFlvalue = (this.column.type === 'date' || this.column.type === 'datetime') ?
            new Date(filterValue) : parseFloat(filterValue);
        this.values[this.column.field] = this.setFormatForFlColumn(getFlvalue, this.column);
    };
    Filter.prototype.onPropertyChanged = function (e) {
        if (e.module !== this.getModuleName()) {
            return;
        }
        for (var _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'columns':
                    if (this.contentRefresh) {
                        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["modelChanged"], {
                            currentFilterObject: this.currentFilterObject, currentFilteringColumn: this.column ?
                                this.column.field : undefined,
                            columns: this.filterSettings.columns, requestType: 'filtering', type: _base_constant__WEBPACK_IMPORTED_MODULE_3__["actionBegin"]
                        });
                        this.refreshFilterSettings();
                        this.updateFilterMsg();
                        this.updateFilter();
                    }
                    break;
                case 'showFilterBarStatus':
                    if (e.properties[prop]) {
                        this.updateFilterMsg();
                    }
                    else if (this.parent.allowPaging) {
                        this.parent.updateExternalMessage('');
                    }
                    break;
                case 'type':
                    this.parent.refreshHeader();
                    this.refreshFilterSettings();
                    break;
            }
        }
    };
    Filter.prototype.refreshFilterSettings = function () {
        if (this.filterSettings.type === 'FilterBar') {
            for (var i = 0; i < this.filterSettings.columns.length; i++) {
                this.column = this.parent.getColumnByUid(this.filterSettings.columns[i].uid);
                var filterValue = this.filterSettings.columns[i].value;
                filterValue = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(filterValue) && filterValue.toString();
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.column.format)) {
                    this.applyColumnFormat(filterValue);
                }
                else {
                    var key = this.filterSettings.columns[i].field;
                    this.values[key] = this.filterSettings.columns[i].value;
                }
                var filterElement = this.getFilterBarElement(this.column.field);
                if (filterElement) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cellText[this.filterSettings.columns[i].field])) {
                        filterElement.value = this.cellText[this.column.field];
                    }
                    else {
                        filterElement.value = this.filterSettings.columns[i].value;
                    }
                }
            }
            if (this.filterSettings.columns.length === 0) {
                var col = this.parent.getColumns();
                for (var i = 0; i < col.length; i++) {
                    var filterElement = this.getFilterBarElement(col[i].field);
                    if (filterElement && filterElement.value !== '') {
                        filterElement.value = '';
                        delete this.values[col[i].field];
                    }
                }
            }
        }
    };
    Filter.prototype.getFilterBarElement = function (col) {
        var selector = '[id=\'' + col + '_filterBarcell\']';
        var filterElement;
        if (selector && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element)) {
            filterElement = this.element.querySelector(selector);
        }
        return filterElement;
    };
    /**
     * @private
     */
    Filter.prototype.refreshFilter = function () {
        this.refreshFilterSettings();
        this.updateFilterMsg();
    };
    /**
     * Clears all the filtered rows of the Grid.
     * @return {void}
     */
    Filter.prototype.clearFiltering = function () {
        var _this = this;
        var cols = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getActualPropFromColl"])(this.filterSettings.columns);
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(this.parent)) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["preventBatch"], { instance: this, handler: this.clearFiltering });
            return;
        }
        cols.forEach(function (col) {
            col.uid = col.uid || _this.parent.getColumnByField(col.field).uid;
        });
        var colUid = cols.map(function (f) { return f.uid; });
        var filteredcols = colUid.filter(function (item, pos) { return colUid.indexOf(item) === pos; });
        this.refresh = false;
        for (var i = 0, len = filteredcols.length; i < len; i++) {
            this.removeFilteredColsByField(this.parent.getColumnByUid(filteredcols[i]).field, false);
        }
        this.refresh = true;
        if (filteredcols.length) {
            this.parent.renderModule.refresh();
        }
        if (this.parent.filterSettings.columns.length === 0 && this.parent.element.querySelector('.e-filtered')) {
            var fltrElement = [].slice.call(this.parent.element.querySelectorAll('.e-filtered'));
            for (var i = 0, len = fltrElement.length; i < len; i++) {
                fltrElement[0].removeAttribute('aria-filtered');
                fltrElement[0].classList.remove('e-filtered');
            }
        }
        this.isRemove = true;
        this.filterStatusMsg = '';
        this.updateFilterMsg();
    };
    Filter.prototype.checkAlreadyColFiltered = function (field) {
        var columns = this.filterSettings.columns;
        for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
            var col = columns_1[_i];
            if (col.field === field && col.value === this.value &&
                col.operator === this.operator && col.predicate === this.predicate) {
                return true;
            }
        }
        return false;
    };
    Filter.prototype.columnMenuFilter = function (args) {
        this.column = args.col;
        var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.target, '#' + args.id);
        if (args.isClose && !ele) {
            this.filterModule.closeDialog();
        }
        else if (ele) {
            this.filterDialogOpen(this.column, args.target);
        }
    };
    Filter.prototype.filterDialogOpen = function (col, target, left, top) {
        var gObj = this.parent;
        if (this.filterModule) {
            this.filterModule.closeDialog();
        }
        this.filterModule = new this.type[col.filter.type || this.parent.filterSettings.type](this.parent, gObj.filterSettings, this.serviceLocator, this.customOperators, this);
        var dataSource = col.filter.dataSource || gObj.getDataModule().dataManager;
        this.filterModule.openDialog({
            type: col.type, field: col.field, displayName: col.headerText,
            dataSource: dataSource, format: col.format,
            filteredColumns: gObj.filterSettings.columns, target: target,
            sortedColumns: gObj.sortSettings.columns, formatFn: col.getFormatter(),
            parserFn: col.getParser(), query: gObj.query, template: col.getFilterItemTemplate(),
            hideSearchbox: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.filter.hideSearchbox) ? false : col.filter.hideSearchbox,
            handler: this.filterHandler.bind(this), localizedStrings: gObj.getLocaleConstants(),
            position: { X: left, Y: top }, column: col, foreignKeyValue: col.foreignKeyValue,
            actualPredicate: this.actualPredicate, localeObj: this.parent.localeObj
        });
    };
    /**
     * Removes filtered column by field name.
     * @param  {string} field - Defines column field name to remove filter.
     * @param  {boolean} isClearFilterBar -  Specifies whether the filter bar value needs to be cleared.
     * @return {void}
     * @hidden
     */
    Filter.prototype.removeFilteredColsByField = function (field, isClearFilterBar) {
        var fCell;
        var cols = this.filterSettings.columns;
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(this.parent)) {
            var args = { instance: this, handler: this.removeFilteredColsByField, arg1: field, arg2: isClearFilterBar };
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["preventBatch"], args);
            return;
        }
        var colUid = cols.map(function (f) { return f.uid; });
        var filteredColsUid = colUid.filter(function (item, pos) { return colUid.indexOf(item) === pos; });
        for (var i = 0, len = filteredColsUid.length; i < len; i++) {
            cols[i].uid = cols[i].uid || this.parent.getColumnByField(cols[i].field).uid;
            var len_1 = cols.length;
            var column = this.parent.getColumnByUid(filteredColsUid[i]);
            if (column.field === field || (column.field === column.foreignKeyValue && column.isForeignColumn())) {
                if (this.filterSettings.type === 'FilterBar' && !isClearFilterBar) {
                    var selector = '[id=\'' + column.field + '_filterBarcell\']';
                    fCell = this.parent.getHeaderContent().querySelector(selector);
                    if (fCell) {
                        fCell.value = '';
                        delete this.values[field];
                    }
                }
                while (len_1--) {
                    if (cols[len_1].uid === column.uid) {
                        cols.splice(len_1, 1);
                    }
                }
                var fltrElement = this.parent.getColumnHeaderByField(column.field);
                fltrElement.removeAttribute('aria-filtered');
                if (this.filterSettings.type !== 'FilterBar') {
                    var iconClass = this.parent.showColumnMenu ? '.e-columnmenu' : '.e-icon-filter';
                    fltrElement.querySelector(iconClass).classList.remove('e-filtered');
                }
                this.isRemove = true;
                if (this.actualPredicate[field]) {
                    delete this.actualPredicate[field];
                }
                if (this.values[field]) {
                    delete this.values[field];
                }
                if (this.refresh) {
                    this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["modelChanged"], {
                        requestType: 'filtering', type: _base_constant__WEBPACK_IMPORTED_MODULE_3__["actionBegin"], currentFilterObject: {
                            field: column.field, operator: this.operator, value: this.value, predicate: this.predicate,
                            matchCase: this.matchCase, ignoreAccent: this.ignoreAccent, actualFilterValue: {}, actualOperator: {}
                        }, currentFilterColumn: column
                    });
                }
                break;
            }
        }
        this.updateFilterMsg();
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Filter.prototype.getModuleName = function () {
        return 'filter';
    };
    Filter.prototype.keyUpHandler = function (e) {
        var gObj = this.parent;
        var target = e.target;
        if (target && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["matches"])(target, '.e-filterbar input')) {
            var closeHeaderEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'th.e-filterbarcell');
            this.column = gObj.getColumnByUid(closeHeaderEle.getAttribute('e-mappinguid'));
            if (!this.column) {
                return;
            }
            if ((this.filterSettings.mode === 'Immediate' || e.keyCode === 13) && e.keyCode !== 9) {
                this.value = target.value.trim();
                this.processFilter(e);
            }
        }
    };
    Filter.prototype.updateCrossIcon = function (element) {
        if (element.value.length) {
            element.nextElementSibling.classList.remove('e-hide');
        }
    };
    Filter.prototype.updateFilterMsg = function () {
        if (this.filterSettings.type === 'FilterBar') {
            var gObj = this.parent;
            var getFormatFlValue = void 0;
            var columns = this.filterSettings.columns;
            var formater = this.serviceLocator.getService('valueFormatter');
            var column = void 0;
            var value = void 0;
            if (!this.filterSettings.showFilterBarStatus) {
                return;
            }
            if (columns.length > 0 && this.filterStatusMsg !== this.l10n.getConstant('InvalidFilterMessage')) {
                this.filterStatusMsg = '';
                for (var index = 0; index < columns.length; index++) {
                    column = gObj.getColumnByUid(columns[index].uid);
                    if (index) {
                        this.filterStatusMsg += ' && ';
                    }
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.format)) {
                        var flValue = (column.type === 'date' || column.type === 'datetime') ?
                            this.valueFormatter.fromView(this.values[column.field], column.getParser(), column.type) :
                            this.values[column.field];
                        if (!(column.type === 'date' || column.type === 'datetime')) {
                            var formater_1 = this.serviceLocator.getService('valueFormatter');
                            getFormatFlValue = formater_1.toView(flValue, column.getParser()).toString();
                        }
                        else {
                            getFormatFlValue = this.setFormatForFlColumn(flValue, column);
                        }
                        this.filterStatusMsg += column.headerText + ': ' + getFormatFlValue;
                    }
                    else {
                        this.filterStatusMsg += column.headerText + ': ' + this.values[column.field];
                    }
                }
            }
            if (gObj.allowPaging) {
                gObj.updateExternalMessage(this.filterStatusMsg);
            }
            //TODO: virtual paging       
            this.filterStatusMsg = '';
        }
    };
    Filter.prototype.setFormatForFlColumn = function (value, column) {
        var formater = this.serviceLocator.getService('valueFormatter');
        return formater.toView(value, column.getFormatter()).toString();
    };
    Filter.prototype.checkForSkipInput = function (column, value) {
        var isSkip;
        var skipInput;
        if (column.type === 'number') {
            skipInput = ['=', ' ', '!'];
            if (_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].operatorSymbols[value] || skipInput.indexOf(value) > -1) {
                isSkip = true;
            }
        }
        else if (column.type === 'string') {
            skipInput = ['>', '<', '=', '!'];
            for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {
                var val = value_1[_i];
                if (skipInput.indexOf(val) > -1) {
                    isSkip = true;
                }
            }
        }
        return isSkip;
    };
    Filter.prototype.processFilter = function (e) {
        this.stopTimer();
        this.startTimer(e);
    };
    Filter.prototype.startTimer = function (e) {
        var _this = this;
        this.timer = window.setInterval(function () { _this.onTimerTick(); }, e.keyCode === 13 ? 0 : this.filterSettings.immediateModeDelay);
    };
    Filter.prototype.stopTimer = function () {
        window.clearInterval(this.timer);
    };
    Filter.prototype.onTimerTick = function () {
        var selector = '[id=\'' + this.column.field + '_filterBarcell\']';
        var filterElement = this.element.querySelector(selector);
        if (!filterElement && this.parent.getFrozenColumns()) {
            filterElement = this.parent.getHeaderContent().querySelector(selector);
        }
        var filterValue;
        this.cellText[this.column.field] = filterElement.value;
        this.stopTimer();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.column.filterBarTemplate)) {
            var templateRead = this.column.filterBarTemplate.read;
            if (typeof templateRead === 'string') {
                templateRead = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(templateRead, window);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(templateRead)) {
                this.value = templateRead.call(this, filterElement);
            }
        }
        else {
            filterValue = JSON.parse(JSON.stringify(filterElement.value));
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value === '') {
            this.removeFilteredColsByField(this.column.field);
            return;
        }
        this.validateFilterValue(this.value);
        this.filterByColumn(this.column.field, this.operator, this.value, this.predicate, this.matchCase, this.ignoreAccent);
        filterElement.value = filterValue;
        this.updateFilterMsg();
    };
    Filter.prototype.validateFilterValue = function (value) {
        var gObj = this.parent;
        var skipInput;
        var index;
        this.matchCase = true;
        switch (this.column.type) {
            case 'number':
                this.operator = this.filterOperators.equal;
                skipInput = ['>', '<', '=', '!'];
                for (var i = 0; i < value.length; i++) {
                    if (skipInput.indexOf(value[i]) > -1) {
                        index = i;
                        break;
                    }
                }
                this.getOperator(value.substring(index));
                if (index !== 0) {
                    this.value = value.substring(0, index);
                }
                if (this.value !== '' && value.length >= 1) {
                    this.value = this.valueFormatter.fromView(this.value, this.column.getParser(), this.column.type);
                }
                if (isNaN(this.value)) {
                    this.filterStatusMsg = this.l10n.getConstant('InvalidFilterMessage');
                }
                break;
            case 'date':
            case 'datetime':
                this.operator = this.filterOperators.equal;
                if (this.value !== '' && !(this.value instanceof Date)) {
                    this.getOperator(value);
                    this.value = this.valueFormatter.fromView(this.value, this.column.getParser(), this.column.type);
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
                        this.filterStatusMsg = this.l10n.getConstant('InvalidFilterMessage');
                    }
                }
                break;
            case 'string':
                this.matchCase = false;
                if (value.charAt(0) === '*') {
                    this.value = this.value.slice(1);
                    this.operator = this.filterOperators.startsWith;
                }
                else if (value.charAt(value.length - 1) === '%') {
                    this.value = this.value.slice(0, -1);
                    this.operator = this.filterOperators.startsWith;
                }
                else if (value.charAt(0) === '%') {
                    this.value = this.value.slice(1);
                    this.operator = this.filterOperators.endsWith;
                }
                else {
                    this.operator = this.filterOperators.startsWith;
                }
                break;
            case 'boolean':
                if (value.toLowerCase() === 'true' || value === '1') {
                    this.value = true;
                }
                else if (value.toLowerCase() === 'false' || value === '0') {
                    this.value = false;
                }
                else if (value.length) {
                    this.filterStatusMsg = this.l10n.getConstant('InvalidFilterMessage');
                }
                this.operator = this.filterOperators.equal;
                break;
            default:
                this.operator = this.filterOperators.equal;
        }
    };
    Filter.prototype.getOperator = function (value) {
        var singleOp = value.charAt(0);
        var multipleOp = value.slice(0, 2);
        var operators = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({ '=': this.filterOperators.equal, '!': this.filterOperators.notEqual }, _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].operatorSymbols);
        if (operators.hasOwnProperty(singleOp) || operators.hasOwnProperty(multipleOp)) {
            this.operator = operators[singleOp];
            this.value = value.substring(1);
            if (!this.operator) {
                this.operator = operators[multipleOp];
                this.value = value.substring(2);
            }
        }
        if (this.operator === this.filterOperators.lessThan || this.operator === this.filterOperators.greaterThan) {
            if (this.value.charAt(0) === '=') {
                this.operator = this.operator + 'orequal';
                this.value = this.value.substring(1);
            }
        }
    };
    Filter.prototype.columnPositionChanged = function (e) {
        if (this.parent.filterSettings.type !== 'FilterBar') {
            return;
        }
    };
    Filter.prototype.getLocalizedCustomOperators = function () {
        var numOptr = [
            { value: 'equal', text: this.l10n.getConstant('Equal') },
            { value: 'greaterthan', text: this.l10n.getConstant('GreaterThan') },
            { value: 'greaterthanorequal', text: this.l10n.getConstant('GreaterThanOrEqual') },
            { value: 'lessthan', text: this.l10n.getConstant('LessThan') },
            { value: 'lessthanorequal', text: this.l10n.getConstant('LessThanOrEqual') },
            { value: 'notequal', text: this.l10n.getConstant('NotEqual') }
        ];
        this.customOperators = {
            stringOperator: [
                { value: 'startswith', text: this.l10n.getConstant('StartsWith') },
                { value: 'endswith', text: this.l10n.getConstant('EndsWith') },
                { value: 'contains', text: this.l10n.getConstant('Contains') },
                { value: 'equal', text: this.l10n.getConstant('Equal') },
                { value: 'notequal', text: this.l10n.getConstant('NotEqual') }
            ],
            numberOperator: numOptr,
            dateOperator: numOptr,
            datetimeOperator: numOptr,
            booleanOperator: [
                { value: 'equal', text: this.l10n.getConstant('Equal') },
                { value: 'notequal', text: this.l10n.getConstant('NotEqual') }
            ]
        };
    };
    ;
    Filter.prototype.filterIconClickHandler = function (e) {
        var target = e.target;
        if (target.classList.contains('e-filtermenudiv') && (this.parent.filterSettings.type === 'Menu' ||
            this.parent.filterSettings.type === 'CheckBox' || this.parent.filterSettings.type === 'Excel')) {
            var gObj = this.parent;
            var col = gObj.getColumnByUid(Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-headercell').firstElementChild.getAttribute('e-mappinguid'));
            var gClient = gObj.element.getBoundingClientRect();
            var fClient = target.getBoundingClientRect();
            this.column = col;
            if (this.fltrDlgDetails.field === col.field && this.fltrDlgDetails.isOpen) {
                return;
            }
            if (this.filterModule) {
                this.filterModule.closeDialog();
            }
            this.fltrDlgDetails = { field: col.field, isOpen: true };
            this.filterDialogOpen(this.column, target, fClient.right - gClient.left, fClient.bottom - gClient.top);
        }
    };
    Filter.prototype.clickHandler = function (e) {
        if (this.filterSettings.mode === 'Immediate' || this.parent.filterSettings.type === 'Menu' ||
            this.parent.filterSettings.type === 'CheckBox' || this.parent.filterSettings.type === 'Excel') {
            var gObj = this.parent;
            var target = e.target;
            var datepickerEle = target.classList.contains('e-day'); // due to datepicker popup cause
            if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-filter-popup') || target.classList.contains('e-filtermenudiv')) {
                return;
            }
            else if (this.filterModule &&
                (!Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-popup-wrapper')
                    && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-filter-item.e-menu-item'))
                    && (!Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-popup'))) && !datepickerEle) {
                this.filterModule.closeDialog(target);
            }
            if (this.filterSettings.mode === 'Immediate' && target.classList.contains('e-clear-icon')) {
                var targetText = target.previousElementSibling;
                this.removeFilteredColsByField(targetText.id.slice(0, -14)); //Length of _filterBarcell = 14
            }
        }
    };
    Filter.prototype.filterHandler = function (args) {
        var filterIconElement;
        this.actualPredicate[args.field] = args.actualPredicate;
        var dataManager = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](this.filterSettings.columns);
        var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]().where('field', this.filterOperators.equal, args.field);
        var result = dataManager.executeLocal(query);
        for (var i = 0; i < result.length; i++) {
            var index = -1;
            for (var j = 0; j < this.filterSettings.columns.length; j++) {
                if (result[i].field === this.filterSettings.columns[j].field) {
                    index = j;
                    break;
                }
            }
            if (index !== -1) {
                this.filterSettings.columns.splice(index, 1);
            }
        }
        if (this.values[args.field]) {
            delete this.values[args.field];
        }
        var iconClass = this.parent.showColumnMenu ? '.e-columnmenu' : '.e-icon-filter';
        filterIconElement = this.parent.getColumnHeaderByField(args.field).querySelector(iconClass);
        if (args.action === 'filtering') {
            this.filterSettings.columns = this.filterSettings.columns.concat(args.filterCollection);
            if (this.filterSettings.columns.length && filterIconElement) {
                filterIconElement.classList.add('e-filtered');
            }
        }
        else {
            if (filterIconElement) {
                filterIconElement.classList.remove('e-filtered');
            }
            this.parent.renderModule.refresh(); //hot-fix onpropertychanged not working for object { array }           
        }
        this.parent.dataBind();
    };
    Filter.prototype.updateFilter = function () {
        var cols = this.filterSettings.columns;
        this.actualPredicate = {};
        for (var i = 0; i < cols.length; i++) {
            this.column = this.parent.getColumnByField(cols[i].field) ||
                Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getColumnByForeignKeyValue"])(cols[i].field, this.parent.getForeignKeyColumns());
            var fieldName = cols[i].field;
            if (!this.parent.getColumnByField(cols[i].field)) {
                fieldName = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getColumnByForeignKeyValue"])(cols[i].field, this.parent.getForeignKeyColumns()).field;
            }
            /* tslint:disable-next-line:max-line-length */
            this.refreshFilterIcon(fieldName, cols[i].operator, cols[i].value, cols[i].type, cols[i].predicate, cols[i].matchCase, cols[i].ignoreAccent, cols[i].uid);
        }
    };
    /* tslint:disable-next-line:max-line-length */
    Filter.prototype.refreshFilterIcon = function (fieldName, operator, value, type, predicate, matchCase, ignoreAccent, uid) {
        var obj;
        obj = {
            field: fieldName,
            predicate: predicate,
            matchCase: matchCase,
            ignoreAccent: ignoreAccent,
            operator: operator,
            value: value,
            type: type
        };
        this.actualPredicate[fieldName] ? this.actualPredicate[fieldName].push(obj) : this.actualPredicate[fieldName] = [obj];
        var field = uid ? this.parent.getColumnByUid(uid).field : fieldName;
        this.addFilteredClass(field);
    };
    Filter.prototype.addFilteredClass = function (fieldName) {
        var filterIconElement;
        if (this.parent.showColumnMenu) {
            filterIconElement = this.parent.getColumnHeaderByField(fieldName).querySelector('.e-columnmenu');
        }
        else {
            filterIconElement = this.parent.getColumnHeaderByField(fieldName).querySelector('.e-icon-filter');
        }
        if (filterIconElement) {
            filterIconElement.classList.add('e-filtered');
        }
    };
    return Filter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/foreign-key.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/foreign-key.js ***!
  \****************************************************************************/
/*! exports provided: ForeignKey */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForeignKey", function() { return ForeignKey; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/data.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





/**
 * `ForeignKey` module is used to handle foreign key column's actions.
 */
var ForeignKey = /** @class */ (function (_super) {
    __extends(ForeignKey, _super);
    function ForeignKey(parent, serviceLocator) {
        var _this = _super.call(this, parent, serviceLocator) || this;
        _this.parent = parent;
        _this.serviceLocator = serviceLocator;
        _this.initEvent();
        return _this;
    }
    ForeignKey.prototype.initEvent = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initForeignKeyColumn"], this.initForeignKeyColumns, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["getForeignKeyData"], this.getForeignKeyData, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["generateQuery"], this.generateQueryFormData, this);
    };
    ForeignKey.prototype.initForeignKeyColumns = function (columns) {
        columns.forEach(function (column) {
            column.dataSource = (column.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? column.dataSource :
                (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.dataSource) ? new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]() : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](column.dataSource)));
        });
    };
    ForeignKey.prototype.getForeignKeyData = function (args) {
        var _this = this;
        var foreignColumns = args.column ? [args.column] : this.parent.getForeignKeyColumns();
        var allPromise = [];
        foreignColumns.forEach(function (col) {
            var promise;
            var query = args.isComplex ? _this.genarateColumnQuery(col) :
                _this.genarateQuery(col, args.result.result, false, true);
            query.params = _this.parent.query.params;
            var dataSource = col.dataSource;
            if (!dataSource.ready || dataSource.dataSource.offline) {
                promise = dataSource.executeQuery(query);
            }
            else {
                promise = dataSource.ready.then(function () {
                    return dataSource.executeQuery(query);
                });
            }
            allPromise.push(promise);
        });
        Promise.all(allPromise).then(function (responses) {
            responses.forEach(function (data, index) {
                foreignColumns[index].columnData = data.result;
            });
            args.promise.resolve(args.result);
        }).catch(function (e) {
            _this.parent.log(['actionfailure', 'foreign_key_failure']);
            if (args.promise && args.promise.reject) {
                args.promise.reject(e);
            }
            return e;
        });
    };
    ForeignKey.prototype.generateQueryFormData = function (args) {
        args.predicate.predicate = this.genarateQuery(args.column, args.column.columnData, true);
    };
    ForeignKey.prototype.genarateQuery = function (column, e, fromData, needQuery) {
        var gObj = this.parent;
        var predicates = [];
        var predicate;
        var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
        var field = fromData ? column.foreignKeyField : column.field;
        if (gObj.allowPaging || gObj.enableVirtualization || fromData) {
            e = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](((gObj.allowGrouping && gObj.groupSettings.columns.length && !fromData) ?
                e.records : e)).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().select(field));
            var filteredValue = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].distinct(e, field, false);
            field = fromData ? column.field : column.foreignKeyField;
            filteredValue.forEach(function (obj) {
                if (obj && obj.getDay) {
                    predicates.push(Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getDatePredicate"])({ field: field, operator: 'equal', value: obj, matchCase: false }));
                }
                else {
                    predicates.push(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](field, 'equal', obj, false));
                }
            });
        }
        if (needQuery) {
            return predicates.length ? query.where(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"].or(predicates)) : query;
        }
        predicate = (predicates.length ? _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"].or(predicates) : { predicates: [] });
        return predicate;
    };
    ForeignKey.prototype.genarateColumnQuery = function (column) {
        var gObj = this.parent;
        var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
        var queryColumn = this.isFiltered(column);
        if (queryColumn.isTrue) {
            query = this.filterQuery(query, queryColumn.column, true);
        }
        if (gObj.searchSettings.key.length) {
            var sSettings = gObj.searchSettings;
            query.search(sSettings.key, column.foreignKeyValue, sSettings.operator, sSettings.ignoreCase);
        }
        return query;
    };
    ForeignKey.prototype.isFiltered = function (column) {
        var filterColumn = this.parent.filterSettings.columns.filter(function (fColumn) {
            return (fColumn.uid === column.uid);
        });
        return {
            column: filterColumn, isTrue: !!filterColumn.length
        };
    };
    ForeignKey.prototype.getModuleName = function () {
        return 'foreignKey';
    };
    ForeignKey.prototype.destroy = function () {
        this.destroyEvent();
    };
    ForeignKey.prototype.destroyEvent = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initForeignKeyColumn"], this.initForeignKeyColumns);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["getForeignKeyData"], this.getForeignKeyData);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["generateQuery"], this.generateQueryFormData);
    };
    return ForeignKey;
}(_data__WEBPACK_IMPORTED_MODULE_4__["Data"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/freeze.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/freeze.js ***!
  \***********************************************************************/
/*! exports provided: Freeze */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Freeze", function() { return Freeze; });
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _renderer_freeze_renderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../renderer/freeze-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/freeze-renderer.js");





/**
 * `Freeze` module is used to handle Frozen rows and columns.
 * @hidden
 */
var Freeze = /** @class */ (function () {
    function Freeze(parent, locator) {
        this.parent = parent;
        this.locator = locator;
        this.addEventListener();
    }
    Freeze.prototype.getModuleName = function () {
        return 'freeze';
    };
    Freeze.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_0__["initialLoad"], this.instantiateRenderer, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_0__["initialEnd"], this.wireEvents, this);
    };
    Freeze.prototype.wireEvents = function () {
        if (this.parent.frozenRows) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["EventHandler"].add(this.parent.getHeaderContent(), 'dblclick', this.dblClickHandler, this);
        }
    };
    Freeze.prototype.dblClickHandler = function (e) {
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-grid').id !== this.parent.element.id) {
            return;
        }
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_0__["dblclick"], e);
    };
    Freeze.prototype.instantiateRenderer = function () {
        this.parent.log('limitation', this.getModuleName());
        var renderer = this.locator.getService('rendererFactory');
        if (this.parent.getFrozenColumns()) {
            renderer.addRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_1__["RenderType"].Header, new _renderer_freeze_renderer__WEBPACK_IMPORTED_MODULE_4__["FreezeRender"](this.parent, this.locator));
            renderer.addRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_1__["RenderType"].Content, new _renderer_freeze_renderer__WEBPACK_IMPORTED_MODULE_4__["FreezeContentRender"](this.parent, this.locator));
        }
    };
    Freeze.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_0__["initialLoad"], this.instantiateRenderer);
    };
    Freeze.prototype.destroy = function () {
        this.removeEventListener();
    };
    return Freeze;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/group.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/group.js ***!
  \**********************************************************************/
/*! exports provided: Group */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Group", function() { return Group; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _services_aria_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/aria-service */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/aria-service.js");
/* harmony import */ var _services_group_model_generator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/group-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/group-model-generator.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");








/**
 *
 * The `Group` module is used to handle group action.
 */
var Group = /** @class */ (function () {
    /**
     * Constructor for Grid group module
     * @hidden
     */
    function Group(parent, groupSettings, sortedColumns, serviceLocator) {
        var _this = this;
        this.isAppliedGroup = false;
        this.isAppliedUnGroup = false;
        this.visualElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-cloneproperties e-dragclone e-gdclone',
            styles: 'line-height:23px', attrs: { action: 'grouping' }
        });
        this.helper = function (e) {
            var gObj = _this.parent;
            var target = e.sender.target;
            var element = target.classList.contains('e-groupheadercell') ? target :
                Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-groupheadercell');
            if (!element) {
                return false;
            }
            _this.column = gObj.getColumnByField(element.firstElementChild.getAttribute('ej-mappingname'));
            _this.visualElement.textContent = element.textContent;
            _this.visualElement.style.width = element.offsetWidth + 2 + 'px';
            _this.visualElement.style.height = element.offsetHeight + 2 + 'px';
            _this.visualElement.setAttribute('e-mappinguid', _this.column.uid);
            gObj.element.appendChild(_this.visualElement);
            return _this.visualElement;
        };
        this.dragStart = function () {
            _this.parent.element.classList.add('e-ungroupdrag');
        };
        this.drag = function (e) {
            var target = e.target;
            var cloneElement = _this.parent.element.querySelector('.e-cloneproperties');
            _this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrag"], { target: target, draggableType: 'headercell', column: _this.column });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-defaultcur'], ['e-notallowedcur']);
            if (!(Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-gridcontent') || Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-headercell'))) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);
            }
        };
        this.dragStop = function (e) {
            _this.parent.element.classList.remove('e-ungroupdrag');
            if (!(Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-gridcontent') || Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-gridheader'))) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(e.helper);
                return;
            }
        };
        this.drop = function (e) {
            var gObj = _this.parent;
            var column = gObj.getColumnByUid(e.droppedElement.getAttribute('e-mappinguid'));
            _this.element.classList.remove('e-hover');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(e.droppedElement);
            _this.aria.setDropTarget(_this.parent.element.querySelector('.e-groupdroparea'), false);
            _this.aria.setGrabbed(_this.parent.getHeaderTable().querySelector('[aria-grabbed=true]'), false);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) || column.allowGrouping === false ||
                Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(gObj.getColumnHeaderByUid(column.uid), 'e-grid').getAttribute('id') !==
                    gObj.element.getAttribute('id')) {
                _this.parent.log('action_disabled_column', { moduleName: _this.getModuleName(), columnName: column.headerText });
                return;
            }
            _this.groupColumn(column.field);
        };
        this.contentRefresh = true;
        this.aria = new _services_aria_service__WEBPACK_IMPORTED_MODULE_3__["AriaService"]();
        this.parent = parent;
        this.groupSettings = groupSettings;
        this.serviceLocator = serviceLocator;
        this.sortedColumns = sortedColumns;
        this.focus = serviceLocator.getService('focus');
        this.addEventListener();
        this.groupGenerator = new _services_group_model_generator__WEBPACK_IMPORTED_MODULE_4__["GroupModelGenerator"](this.parent);
    }
    Group.prototype.columnDrag = function (e) {
        var gObj = this.parent;
        var cloneElement = this.parent.element.querySelector('.e-cloneproperties');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-defaultcur'], ['e-notallowedcur']);
        if (!Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-groupdroparea') &&
            !(this.parent.allowReordering && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-headercell'))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);
        }
        e.target.classList.contains('e-groupdroparea') ? this.element.classList.add('e-hover') : this.element.classList.remove('e-hover');
    };
    Group.prototype.columnDragStart = function (e) {
        if (e.target.classList.contains('e-stackedheadercell')) {
            return;
        }
        var gObj = this.parent;
        var dropArea = this.parent.element.querySelector('.e-groupdroparea');
        this.aria.setDropTarget(dropArea, e.column.allowGrouping);
        var element = e.target.classList.contains('e-headercell') ? e.target : Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-headercell');
        this.aria.setGrabbed(element, true, !e.column.allowGrouping);
    };
    Group.prototype.columnDrop = function (e) {
        var gObj = this.parent;
        if (e.droppedElement.getAttribute('action') === 'grouping') {
            var column = gObj.getColumnByUid(e.droppedElement.getAttribute('e-mappinguid'));
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) || column.allowGrouping === false ||
                Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(gObj.getColumnHeaderByUid(column.uid), 'e-grid').getAttribute('id') !==
                    gObj.element.getAttribute('id')) {
                return;
            }
            this.ungroupColumn(column.field);
        }
    };
    /**
     * @hidden
     */
    Group.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRender, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["groupComplete"], this.onActionComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["ungroupComplete"], this.onActionComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["inBoundModelChanged"], this.onPropertyChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.clickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrag"], this.columnDrag, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDragStart"], this.columnDragStart, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrop"], this.columnDrop, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.refreshSortIcons, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["sortComplete"], this.refreshSortIcons, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["keyPressed"], this.keyPressHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.initialEnd, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["onEmpty"], this.initialEnd, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.render, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["groupAggregates"], this.onGroupAggregates, this);
    };
    /**
     * @hidden
     */
    Group.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.render);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRender);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["groupComplete"], this.onActionComplete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["ungroupComplete"], this.onActionComplete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["inBoundModelChanged"], this.onPropertyChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.clickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrag"], this.columnDrag);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDragStart"], this.columnDragStart);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrop"], this.columnDrop);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.refreshSortIcons);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["sortComplete"], this.refreshSortIcons);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["keyPressed"], this.keyPressHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["groupAggregates"], this.onGroupAggregates);
    };
    Group.prototype.initialEnd = function () {
        var gObj = this.parent;
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.initialEnd);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["onEmpty"], this.initialEnd);
        if (this.parent.getColumns().length && this.groupSettings.columns.length) {
            this.contentRefresh = false;
            for (var _i = 0, _a = gObj.groupSettings.columns; _i < _a.length; _i++) {
                var col = _a[_i];
                this.groupColumn(col);
            }
            this.contentRefresh = true;
        }
    };
    Group.prototype.keyPressHandler = function (e) {
        var gObj = this.parent;
        if ((!this.groupSettings.columns.length ||
            ['altDownArrow', 'altUpArrow', 'ctrlDownArrow', 'ctrlUpArrow', 'enter'].indexOf(e.action) === -1)) {
            return;
        }
        e.preventDefault();
        switch (e.action) {
            case 'altDownArrow':
            case 'altUpArrow':
                var selected = gObj.allowSelection ? gObj.getSelectedRowIndexes() : [];
                if (selected.length) {
                    var rows = gObj.getContentTable().querySelector('tbody').children;
                    var dataRow = gObj.getDataRows()[selected[selected.length - 1]];
                    var grpRow = void 0;
                    for (var i = dataRow.rowIndex; i >= 0; i--) {
                        if (!rows[i].classList.contains('e-row') && !rows[i].classList.contains('e-detailrow')) {
                            grpRow = rows[i];
                            break;
                        }
                    }
                    this.expandCollapseRows(grpRow.querySelector(e.action === 'altUpArrow' ?
                        '.e-recordplusexpand' : '.e-recordpluscollapse'));
                }
                break;
            case 'ctrlDownArrow':
                this.expandAll();
                break;
            case 'ctrlUpArrow':
                this.collapseAll();
                break;
            case 'enter':
                if (this.parent.isEdit || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '#' + this.parent.element.id + '_searchbar') !== null)) {
                    return;
                }
                var element = this.focus.getFocusedElement();
                var row = element ? element.parentElement.querySelector('[class^="e-record"]') : null;
                if (!row) {
                    break;
                }
                this.expandCollapseRows(row);
                break;
        }
    };
    Group.prototype.clickHandler = function (e) {
        this.expandCollapseRows(e.target);
        this.applySortFromTarget(e.target);
        this.unGroupFromTarget(e.target);
        this.toogleGroupFromHeader(e.target);
    };
    Group.prototype.unGroupFromTarget = function (target) {
        if (target.classList.contains('e-ungroupbutton')) {
            this.ungroupColumn(target.parentElement.getAttribute('ej-mappingname'));
        }
    };
    Group.prototype.toogleGroupFromHeader = function (target) {
        if (this.groupSettings.showToggleButton) {
            if (target.classList.contains('e-grptogglebtn')) {
                if (target.classList.contains('e-toggleungroup')) {
                    this.ungroupColumn(this.parent.getColumnByUid(target.parentElement.getAttribute('e-mappinguid')).field);
                }
                else {
                    this.groupColumn(this.parent.getColumnByUid(target.parentElement.getAttribute('e-mappinguid')).field);
                }
            }
            else {
                if (target.classList.contains('e-toggleungroup')) {
                    this.ungroupColumn(target.parentElement.getAttribute('ej-mappingname'));
                }
            }
        }
    };
    Group.prototype.applySortFromTarget = function (target) {
        var gObj = this.parent;
        var gHeader = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-groupheadercell');
        if (gObj.allowSorting && gHeader && !target.classList.contains('e-ungroupbutton') &&
            !target.classList.contains('e-toggleungroup')) {
            var field = gHeader.firstElementChild.getAttribute('ej-mappingname');
            if (gObj.getColumnHeaderByField(field).querySelectorAll('.e-ascending').length) {
                gObj.sortColumn(field, 'Descending', true);
            }
            else {
                gObj.sortColumn(field, 'Ascending', true);
            }
        }
    };
    /**
     * Expands or collapses grouped rows by target element.
     * @param  {Element} target - Defines the target element of the grouped row.
     * @return {void}
     */
    Group.prototype.expandCollapseRows = function (target) {
        var trgt = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-recordplusexpand') ||
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-recordpluscollapse');
        if (trgt) {
            var cellIdx = trgt.cellIndex;
            var rowIdx = trgt.parentElement.rowIndex;
            var rowNodes = this.parent.getContentTable().querySelector('tbody').children;
            var rows = [].slice.call(rowNodes).slice(rowIdx + 1, rowNodes.length);
            var isHide = void 0;
            var expandElem = void 0;
            var dataManager = void 0;
            var query = void 0;
            var toExpand = [];
            var gObj = this.parent;
            var indent = trgt.parentElement.querySelectorAll('.e-indentcell').length;
            var expand = false;
            if (trgt.classList.contains('e-recordpluscollapse')) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trgt], 'e-recordplusexpand');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([trgt], 'e-recordpluscollapse');
                trgt.firstElementChild.className = 'e-icons e-gdiagonaldown e-icon-gdownarrow';
                expand = true;
                if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isGroupAdaptive"])(gObj)) {
                    this.updateVirtualRows(gObj, target, expand, query, dataManager);
                }
            }
            else {
                isHide = true;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([trgt], 'e-recordplusexpand');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([trgt], 'e-recordpluscollapse');
                trgt.firstElementChild.className = 'e-icons e-gnextforward e-icon-grightarrow';
                if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isGroupAdaptive"])(gObj)) {
                    this.updateVirtualRows(gObj, target, !isHide, query, dataManager);
                }
            }
            this.aria.setExpand(trgt, expand);
            if (!Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isGroupAdaptive"])(gObj)) {
                for (var i = 0, len = rows.length; i < len; i++) {
                    if (rows[i].querySelectorAll('td')[cellIdx] &&
                        rows[i].querySelectorAll('td')[cellIdx].classList.contains('e-indentcell') && rows) {
                        if (isHide) {
                            rows[i].style.display = 'none';
                        }
                        else {
                            if (rows[i].querySelectorAll('.e-indentcell').length === indent + 1) {
                                rows[i].style.display = '';
                                expandElem = rows[i].querySelector('.e-recordplusexpand');
                                if (expandElem) {
                                    toExpand.push(expandElem);
                                }
                                if (rows[i].classList.contains('e-detailrow')) {
                                    if (rows[i - 1].querySelectorAll('.e-detailrowcollapse').length) {
                                        rows[i].style.display = 'none';
                                    }
                                }
                            }
                        }
                    }
                    else {
                        break;
                    }
                }
            }
            for (var i = 0, len = toExpand.length; i < len; i++) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([toExpand[i]], 'e-recordplusexpand');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([toExpand[i]], 'e-recordpluscollapse');
                toExpand[i].firstElementChild.className = 'e-icons e-gnextforward e-icon-grightarrow';
                this.expandCollapseRows(toExpand[i]);
            }
        }
    };
    Group.prototype.updateVirtualRows = function (gObj, target, isExpand, query, dataManager) {
        var rObj = gObj.getRowObjectFromUID(target.closest('tr').getAttribute('data-uid'));
        rObj.isExpand = isExpand;
        Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["updatecloneRow"])(gObj);
        query = gObj.getDataModule().generateQuery(false);
        query.queries = [];
        var args = { requestType: 'virtualscroll', rowObject: rObj };
        dataManager = gObj.getDataModule().getData(args, query.requiresCount());
        dataManager.then(function (e) { return gObj.renderModule.dataManagerSuccess(e, args); });
    };
    Group.prototype.expandCollapse = function (isExpand) {
        var rowNodes = this.parent.getContentTable().querySelector('tbody').children;
        var row;
        for (var i = 0, len = rowNodes.length; i < len; i++) {
            if (rowNodes[i].querySelectorAll('.e-recordplusexpand, .e-recordpluscollapse').length) {
                row = rowNodes[i].querySelector(isExpand ? '.e-recordpluscollapse' : '.e-recordplusexpand');
                if (row) {
                    row.className = isExpand ? 'e-recordplusexpand' : 'e-recordpluscollapse';
                    row.firstElementChild.className = isExpand ? 'e-icons e-gdiagonaldown e-icon-gdownarrow' :
                        'e-icons e-gnextforward e-icon-grightarrow';
                }
                if (!(rowNodes[i].firstElementChild.classList.contains('e-recordplusexpand') ||
                    rowNodes[i].firstElementChild.classList.contains('e-recordpluscollapse'))) {
                    rowNodes[i].style.display = isExpand ? '' : 'none';
                }
            }
            else {
                rowNodes[i].style.display = isExpand ? '' : 'none';
            }
        }
    };
    /**
     * Expands all the grouped rows of the Grid.
     * @return {void}
     */
    Group.prototype.expandAll = function () {
        this.expandCollapse(true);
    };
    /**
     * Collapses all the grouped rows of the Grid.
     * @return {void}
     */
    Group.prototype.collapseAll = function () {
        this.expandCollapse(false);
    };
    /**
     * The function is used to render grouping
     * @return {Element}
     * @hidden
     */
    Group.prototype.render = function () {
        this.l10n = this.serviceLocator.getService('localization');
        this.renderGroupDropArea();
        this.initDragAndDrop();
        this.refreshToggleBtn();
    };
    Group.prototype.renderGroupDropArea = function () {
        var groupElem = this.parent.element.querySelector('.e-groupdroparea');
        if (groupElem) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(groupElem);
        }
        this.element = this.parent.createElement('div', { className: 'e-groupdroparea', attrs: { 'tabindex': '-1' } });
        this.updateGroupDropArea();
        this.parent.element.insertBefore(this.element, this.parent.element.firstChild);
        if (!this.groupSettings.showDropArea) {
            this.element.style.display = 'none';
        }
    };
    Group.prototype.updateGroupDropArea = function (clear) {
        if (this.groupSettings.showDropArea && !this.groupSettings.columns.length) {
            var dragLabel = this.l10n.getConstant('GroupDropArea');
            this.element.innerHTML = dragLabel;
            this.element.classList.remove('e-grouped');
        }
        else {
            if ((this.element.innerHTML === this.l10n.getConstant('GroupDropArea') && (this.groupSettings.columns.length === 1
                || !this.isAppliedGroup && !this.isAppliedUnGroup)) || clear) {
                this.element.innerHTML = '';
            }
            this.element.classList.add('e-grouped');
        }
    };
    Group.prototype.initDragAndDrop = function () {
        this.initializeGHeaderDrop();
        this.initializeGHeaderDrag();
    };
    Group.prototype.initializeGHeaderDrag = function () {
        var drag = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"](this.element, {
            dragTarget: '.e-groupheadercell',
            distance: 5,
            helper: this.helper,
            dragStart: this.dragStart,
            drag: this.drag,
            dragStop: this.dragStop
        });
    };
    Group.prototype.initializeGHeaderDrop = function () {
        var gObj = this.parent;
        var drop = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Droppable"](this.element, {
            accept: '.e-dragclone',
            drop: this.drop
        });
    };
    /**
     * Groups a column by column name.
     * @param  {string} columnName - Defines the column name to group.
     * @return {void}
     */
    Group.prototype.groupColumn = function (columnName) {
        var gObj = this.parent;
        var column = gObj.getColumnByField(columnName);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) || column.allowGrouping === false ||
            (this.contentRefresh && this.groupSettings.columns.indexOf(columnName) > -1)) {
            this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), columnName: column.headerText });
            return;
        }
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(gObj)) {
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["preventBatch"], { instance: this, handler: this.groupColumn, arg1: columnName });
            return;
        }
        column.visible = gObj.groupSettings.showGroupedColumn;
        this.colName = columnName;
        this.isAppliedGroup = true;
        if (this.contentRefresh) {
            this.updateModel();
        }
        else {
            this.addColToGroupDrop(columnName);
        }
        this.updateGroupDropArea();
        this.isAppliedGroup = false;
    };
    /**
     * Ungroups a column by column name.
     * @param  {string} columnName - Defines the column name to ungroup.
     * @return {void}
     */
    Group.prototype.ungroupColumn = function (columnName) {
        var gObj = this.parent;
        var column = this.parent.enableColumnVirtualization ?
            this.parent.columns.filter(function (c) { return c.field === columnName; })[0] : gObj.getColumnByField(columnName);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) || column.allowGrouping === false || this.groupSettings.columns.indexOf(columnName) < 0) {
            return;
        }
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(gObj)) {
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["preventBatch"], { instance: this, handler: this.ungroupColumn, arg1: columnName });
            return;
        }
        column.visible = true;
        this.colName = column.field;
        var columns = JSON.parse(JSON.stringify(this.groupSettings.columns));
        columns.splice(columns.indexOf(this.colName), 1);
        if (this.sortedColumns.indexOf(columnName) < 0) {
            for (var i = 0, len = gObj.sortSettings.columns.length; i < len; i++) {
                if (columnName === gObj.sortSettings.columns[i].field) {
                    gObj.sortSettings.columns.splice(i, 1);
                    break;
                }
            }
        }
        this.groupSettings.columns = columns;
        if (gObj.allowGrouping) {
            this.isAppliedUnGroup = true;
            this.parent.dataBind();
        }
    };
    /**
     * The function used to update groupSettings
     * @return {void}
     * @hidden
     */
    Group.prototype.updateModel = function () {
        var gObj = this.parent;
        var i = 0;
        var columns = JSON.parse(JSON.stringify(this.groupSettings.columns));
        columns.push(this.colName);
        this.groupSettings.columns = columns;
        this.groupAddSortingQuery(this.colName);
        this.parent.dataBind();
    };
    /**
     * The function used to trigger onActionComplete
     * @return {void}
     * @hidden
     */
    Group.prototype.onActionComplete = function (e) {
        var gObj = this.parent;
        if (e.requestType === 'grouping') {
            this.addColToGroupDrop(this.colName);
        }
        else {
            this.removeColFromGroupDrop(this.colName);
        }
        var args = this.groupSettings.columns.indexOf(this.colName) > -1 ? {
            columnName: this.colName, requestType: 'grouping', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"]
        } : { requestType: 'ungrouping', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"] };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(e, args));
        this.colName = null;
    };
    Group.prototype.groupAddSortingQuery = function (colName) {
        var i = 0;
        while (i < this.parent.sortSettings.columns.length) {
            if (this.parent.sortSettings.columns[i].field === colName) {
                break;
            }
            i++;
        }
        if (this.parent.sortSettings.columns.length === i) {
            this.parent.sortSettings.columns.push({ field: colName, direction: 'Ascending', isFromGroup: true });
        }
        else if (!this.parent.allowSorting) {
            this.parent.sortSettings.columns[i].direction = 'Ascending';
        }
    };
    Group.prototype.addColToGroupDrop = function (field) {
        var gObj = this.parent;
        var direction = 'Ascending';
        var groupedColumn = this.parent.createElement('div', { className: 'e-grid-icon e-groupheadercell' });
        var childDiv = this.parent.createElement('div', { attrs: { 'ej-mappingname': field } });
        var column = this.parent.getColumnByField(field);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column)) {
            return;
        }
        //Todo headerTemplateID for grouped column, disableHtmlEncode                          
        var headerCell = gObj.getColumnHeaderByUid(column.uid);
        // if (!isNullOrUndefined(column.headerTemplate)) {
        //     if (column.headerTemplate.indexOf('#') !== -1) {
        //         childDiv.innerHTML = document.querySelector(column.headerTemplate).innerHTML.trim();
        //     } else {
        //         childDiv.innerHTML = column.headerTemplate;
        //     }
        //     childDiv.firstElementChild.classList.add('e-grouptext');
        // } else {
        childDiv.appendChild(this.parent.createElement('span', {
            className: 'e-grouptext', innerHTML: column.headerText,
            attrs: { tabindex: '-1', 'aria-label': 'sort the grouped column' }
        }));
        // }
        if (this.groupSettings.showToggleButton) {
            childDiv.appendChild(this.parent.createElement('span', {
                className: 'e-togglegroupbutton e-icons e-icon-ungroup e-toggleungroup', innerHTML: '&nbsp;',
                attrs: { tabindex: '-1', 'aria-label': 'ungroup button' }
            }));
        }
        if (headerCell.querySelectorAll('.e-ascending,.e-descending').length) {
            direction = headerCell.querySelector('.e-ascending') ? 'Ascending' : 'Descending';
        }
        childDiv.appendChild(this.parent.createElement('span', {
            className: 'e-groupsort e-icons ' +
                ('e-' + direction.toLowerCase() + ' e-icon-' + direction.toLowerCase()), innerHTML: '&nbsp;',
            attrs: { tabindex: '-1', 'aria-label': 'sort the grouped column' }
        }));
        childDiv.appendChild(this.parent.createElement('span', {
            className: 'e-ungroupbutton e-icons e-icon-hide', innerHTML: '&nbsp;',
            attrs: { title: this.l10n.getConstant('UnGroup'), tabindex: '-1', 'aria-label': 'ungroup the grouped column' },
            styles: this.groupSettings.showUngroupButton ? '' : 'display:none'
        }));
        groupedColumn.appendChild(childDiv);
        this.element.appendChild(groupedColumn);
        //Todo:  rtl 
    };
    Group.prototype.refreshToggleBtn = function (isRemove) {
        if (this.groupSettings.showToggleButton) {
            var headers = [].slice.call(this.parent.element.getElementsByClassName('e-headercelldiv'));
            for (var i = 0, len = headers.length; i < len; i++) {
                if (!((headers[i].classList.contains('e-emptycell')) || (headers[i].classList.contains('e-headerchkcelldiv')))) {
                    var column = this.parent.getColumnByUid(headers[i].getAttribute('e-mappinguid'));
                    if (!this.parent.showColumnMenu || (this.parent.showColumnMenu && !column.showColumnMenu)) {
                        if (headers[i].querySelectorAll('.e-grptogglebtn').length) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(headers[i].querySelectorAll('.e-grptogglebtn')[0]);
                        }
                        if (!isRemove) {
                            headers[i].appendChild(this.parent.createElement('span', {
                                className: 'e-grptogglebtn e-icons ' +
                                    (this.groupSettings.columns.indexOf(column.field) > -1 ? 'e-toggleungroup e-icon-ungroup'
                                        : 'e-togglegroup e-icon-group'), attrs: { tabindex: '-1', 'aria-label': 'Group button' }
                            }));
                        }
                    }
                }
            }
        }
    };
    Group.prototype.removeColFromGroupDrop = function (field) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.getGHeaderCell(field))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getGHeaderCell(field));
            this.updateGroupDropArea();
        }
        this.isAppliedUnGroup = false;
    };
    Group.prototype.onPropertyChanged = function (e) {
        var _this = this;
        if (e.module !== this.getModuleName()) {
            return;
        }
        var _loop_1 = function (prop) {
            switch (prop) {
                case 'columns':
                    var args = void 0;
                    if (this_1.contentRefresh) {
                        if (!this_1.isAppliedUnGroup) {
                            if (!this_1.isAppliedGroup) {
                                this_1.updateGroupDropArea(true);
                                for (var i = 0; i < this_1.groupSettings.columns.length; i++) {
                                    this_1.colName = this_1.groupSettings.columns[i];
                                    var col = this_1.parent.getColumnByField(this_1.colName);
                                    col.visible = this_1.parent.groupSettings.showGroupedColumn;
                                    this_1.groupAddSortingQuery(this_1.colName);
                                    if (i < this_1.groupSettings.columns.length - 1) {
                                        this_1.addColToGroupDrop(this_1.groupSettings.columns[i]);
                                    }
                                }
                            }
                            args = {
                                columnName: this_1.colName, requestType: e.properties[prop].length ? 'grouping' : 'ungrouping',
                                type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"]
                            };
                        }
                        else {
                            args = { requestType: 'ungrouping', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"] };
                        }
                        if (!this_1.groupSettings.showGroupedColumn) {
                            e.oldProperties[prop].forEach(function (column) {
                                if (e.properties[prop].indexOf(column) === -1) {
                                    _this.parent.getColumnByField(column).visible = true;
                                }
                            });
                        }
                        this_1.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], args);
                    }
                    break;
                case 'showDropArea':
                    this_1.updateGroupDropArea();
                    this_1.groupSettings.showDropArea ? this_1.element.style.display = '' : this_1.element.style.display = 'none';
                    break;
                case 'showGroupedColumn':
                    this_1.updateGroupedColumn(this_1.groupSettings.showGroupedColumn);
                    this_1.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], { requestType: 'refresh' });
                    break;
                case 'showUngroupButton':
                    this_1.updateButtonVisibility(this_1.groupSettings.showUngroupButton, 'e-ungroupbutton');
                    break;
                case 'showToggleButton':
                    this_1.updateButtonVisibility(this_1.groupSettings.showToggleButton, 'e-togglegroupbutton ');
                    this_1.parent.refreshHeader();
                    break;
            }
        };
        var this_1 = this;
        for (var _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) {
            var prop = _a[_i];
            _loop_1(prop);
        }
    };
    Group.prototype.updateGroupedColumn = function (isVisible) {
        for (var i = 0; i < this.groupSettings.columns.length; i++) {
            this.parent.getColumnByField(this.groupSettings.columns[i]).visible = isVisible;
        }
    };
    Group.prototype.updateButtonVisibility = function (isVisible, className) {
        var gHeader = [].slice.call(this.element.querySelectorAll('.' + className));
        for (var i = 0; i < gHeader.length; i++) {
            gHeader[i].style.display = isVisible ? '' : 'none';
        }
    };
    Group.prototype.enableAfterRender = function (e) {
        if (e.module === this.getModuleName() && e.enable) {
            this.render();
        }
    };
    /**
     * To destroy the reorder
     * @return {void}
     * @hidden
     */
    Group.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        // tslint:disable-next-line:no-any
        if (!this.parent.isDestroyed && !this.parent.refreshing) {
            this.clearGrouping();
        }
        this.removeEventListener();
        this.refreshToggleBtn(true);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
        //call ejdrag and drop destroy
    };
    /**
     * Clears all the grouped columns of the Grid.
     * @return {void}
     */
    Group.prototype.clearGrouping = function () {
        var cols = JSON.parse(JSON.stringify(this.groupSettings.columns));
        this.contentRefresh = false;
        for (var i = 0, len = cols.length; i < len; i++) {
            if (i === (len - 1)) {
                this.contentRefresh = true;
            }
            this.ungroupColumn(cols[i]);
        }
        this.contentRefresh = true;
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Group.prototype.getModuleName = function () {
        return 'group';
    };
    Group.prototype.refreshSortIcons = function (e) {
        var gObj = this.parent;
        var header;
        var cols = gObj.sortSettings.columns;
        var gCols = gObj.groupSettings.columns;
        var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });
        this.refreshToggleBtn();
        for (var i = 0, len = cols.length; i < len; i++) {
            if (fieldNames.indexOf(cols[i].field) === -1) {
                continue;
            }
            header = gObj.getColumnHeaderByField(cols[i].field);
            if (!gObj.allowSorting && (this.sortedColumns.indexOf(cols[i].field) > -1 ||
                this.groupSettings.columns.indexOf(cols[i].field) > -1)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(header.querySelector('.e-sortfilterdiv'), ['e-ascending', 'e-icon-ascending'], []);
                if (cols.length > 1) {
                    header.querySelector('.e-headercelldiv').appendChild(this.parent.createElement('span', { className: 'e-sortnumber', innerHTML: (i + 1).toString() }));
                }
            }
            else if (this.getGHeaderCell(cols[i].field) && this.getGHeaderCell(cols[i].field).querySelectorAll('.e-groupsort').length) {
                if (cols[i].direction === 'Ascending') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.getGHeaderCell(cols[i].field).querySelector('.e-groupsort'), ['e-ascending', 'e-icon-ascending'], ['e-descending', 'e-icon-descending']);
                }
                else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.getGHeaderCell(cols[i].field).querySelector('.e-groupsort'), ['e-descending', 'e-icon-descending'], ['e-ascending', 'e-icon-ascending']);
                }
            }
        }
        for (var i = 0, len = gCols.length; i < len; i++) {
            if (fieldNames.indexOf(gCols[i]) === -1) {
                continue;
            }
            gObj.getColumnHeaderByField(gCols[i]).setAttribute('aria-grouped', 'true');
        }
    };
    Group.prototype.getGHeaderCell = function (field) {
        if (this.element && this.element.querySelector('[ej-mappingname="' + field + '"]')) {
            return this.element.querySelector('[ej-mappingname="' + field + '"]').parentElement;
        }
        return null;
    };
    Group.prototype.onGroupAggregates = function (editedData) {
        var _this = this;
        var aggregates = this.iterateGroupAggregates(editedData);
        var rowData = this.groupGenerator.generateRows(aggregates, {});
        var summaryRows = this.parent.getRowsObject().filter(function (row) { return !row.isDataRow; });
        var updateSummaryRows = rowData.filter(function (data) { return !data.isDataRow; });
        updateSummaryRows.forEach(function (row, indx) {
            var cells = row.cells.filter(function (cell) { return cell.isDataCell; });
            var args = { cells: cells, data: row.data, dataUid: summaryRows[indx] ? summaryRows[indx].uid : '' };
            _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["refreshAggregateCell"], args);
        });
    };
    Group.prototype.iterateGroupAggregates = function (editedData) {
        var updatedData = editedData instanceof Array ? editedData : [];
        var rows = this.parent.getRowsObject();
        var initData = this.parent.getCurrentViewRecords();
        var deletedCols = [];
        var changeds = rows.map(function (row) {
            if (row.edit === 'delete') {
                deletedCols.push(row.data);
            }
            return row.changes instanceof Object ? row.changes : row.data;
        });
        var field = this.parent.getPrimaryKeyFieldNames()[0];
        changeds = updatedData.length === 0 ? changeds : updatedData;
        var mergeData = initData.map(function (item) {
            var pKeyVal = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataUtil"].getObject(field, item);
            var value;
            var hasVal = changeds.some(function (cItem) {
                value = cItem;
                return pKeyVal === _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataUtil"].getObject(field, cItem);
            });
            return hasVal ? value : item;
        });
        var eData = editedData;
        if (!(eData.type && eData.type === 'cancel') && deletedCols.length > 0) {
            deletedCols.forEach(function (row) {
                var index = mergeData.indexOf(row);
                mergeData.splice(index, 1);
            });
        }
        var aggregates = [];
        var aggregateRows = this.parent.aggregates;
        aggregateRows.forEach(function (row) {
            row.columns.forEach(function (col) {
                var aggr = {};
                var type = col.type.toString();
                aggr = { type: type.toLowerCase(), field: col.field };
                aggregates.push(aggr);
            });
        });
        var result;
        var aggrds;
        var groupedCols = this.parent.groupSettings.columns;
        groupedCols.forEach(function (field) {
            aggrds = result ? result : mergeData;
            result = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_5__["DataUtil"].group(aggrds, field, aggregates, null, null);
        });
        return result;
    };
    return Group;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/inline-edit.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/inline-edit.js ***!
  \****************************************************************************/
/*! exports provided: InlineEdit */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InlineEdit", function() { return InlineEdit; });
/* harmony import */ var _normal_edit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./normal-edit */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/normal-edit.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * `InlineEdit` module is used to handle inline editing actions.
 * @hidden
 */
var InlineEdit = /** @class */ (function (_super) {
    __extends(InlineEdit, _super);
    function InlineEdit(parent, serviceLocator, renderer) {
        var _this = _super.call(this, parent, serviceLocator) || this;
        _this.parent = parent;
        _this.serviceLocator = serviceLocator;
        _this.renderer = renderer;
        return _this;
    }
    InlineEdit.prototype.closeEdit = function () {
        _super.prototype.closeEdit.call(this);
    };
    InlineEdit.prototype.addRecord = function (data, index) {
        _super.prototype.addRecord.call(this, data, index);
    };
    InlineEdit.prototype.endEdit = function () {
        _super.prototype.endEdit.call(this);
    };
    InlineEdit.prototype.updateRow = function (index, data) {
        _super.prototype.updateRow.call(this, index, data);
    };
    InlineEdit.prototype.deleteRecord = function (fieldname, data) {
        _super.prototype.deleteRecord.call(this, fieldname, data);
    };
    InlineEdit.prototype.startEdit = function (tr) {
        _super.prototype.startEdit.call(this, tr);
    };
    return InlineEdit;
}(_normal_edit__WEBPACK_IMPORTED_MODULE_0__["NormalEdit"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/logger.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/logger.js ***!
  \***********************************************************************/
/*! exports provided: Logger, detailLists */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detailLists", function() { return detailLists; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/**
 *
 * `Logger` class
 */


var BASE_DOC_URL = 'https://ej2.syncfusion.com/documentation/grid';
var DOC_URL = 'https://ej2.syncfusion.com/documentation/';
var WARNING = '[EJ2Grid.Warning]';
var ERROR = '[EJ2Grid.Error]';
var INFO = '[EJ2Grid.Info]';
var Logger = /** @class */ (function () {
    function Logger(parent) {
        this.parent = parent;
        this.parent.on('initial-end', this.patchadaptor, this);
    }
    Logger.prototype.getModuleName = function () {
        return 'logger';
    };
    Logger.prototype.log = function (types, args) {
        var _this = this;
        if (!(types instanceof Array)) {
            types = [types];
        }
        types.forEach(function (type) {
            var item = detailLists[type];
            var cOp = item.check(args, _this.parent);
            if (cOp.success) {
                console[item.logType](item.generateMessage(args, _this.parent, cOp.options));
            }
        });
    };
    Logger.prototype.patchadaptor = function () {
        var adaptor = this.parent.getDataModule().dataManager.adaptor;
        var original = adaptor.beforeSend;
        if (original) {
            adaptor.beforeSend = function (dm, request, settings) {
                original.call(adaptor, dm, request, settings);
            };
        }
    };
    Logger.prototype.destroy = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off('initial-end', this.patchadaptor);
    };
    return Logger;
}());

var detailLists = {
    module_missing: {
        type: 'module_missing',
        logType: 'warn',
        check: function (args, parent) {
            var injected = parent.getInjectedModules().map(function (m) { return m.prototype.getModuleName(); });
            /* tslint:disable-next-line:no-any */
            var modules = parent.requiredModules().map(function (m) { return m.member; })
                .filter(function (name) { return injected.indexOf(name) === -1; });
            return { success: modules.filter(function (m) { return m !== 'resize'; }).length > 0, options: modules };
        },
        generateMessage: function (args, parent, modules) {
            modules = modules.filter(function (m) { return m !== 'resize'; })
                .reduce(function (prev, cur) { return prev + ("* " + cur + "\n"); }, '');
            return WARNING + ': MODULES MISSING\n' + 'The following modules are not injected:.\n' +
                ("" + modules) +
                ("Refer to " + BASE_DOC_URL + "/module.html for documentation on importing feature modules.");
        }
    },
    promise_enabled: {
        type: 'promise_enabled',
        logType: 'error',
        check: function (args, parent) {
            return { success: typeof Promise === 'undefined' };
        },
        generateMessage: function (args, parent) {
            return ERROR + ': PROMISE UNDEFINED\n' +
                'Promise object is not present in the global environment,' +
                'please use polyfil to support Promise object in your environment.\n' +
                ("Refer to " + DOC_URL + "/base/browser.html?#required-polyfills for more information.");
        }
    },
    primary_column_missing: {
        type: 'primary_column_missing',
        logType: 'warn',
        check: function (args, parent) {
            return { success: parent.getColumns().filter(function (column) { return column.isPrimaryKey; }).length === 0 };
        },
        generateMessage: function (args, parent) {
            return WARNING + ': PRIMARY KEY MISSING\n' + 'Editing is enabled but primary key column is not specified.\n' +
                ("Refer to " + BASE_DOC_URL + "/api-column.html?#isprimarykey for documentation on providing primary key columns.");
        }
    },
    selection_key_missing: {
        type: 'selection_key_missing',
        logType: 'warn',
        check: function (args, parent) {
            return { success: parent.selectionSettings.persistSelection &&
                    parent.getColumns().filter(function (column) { return column.isPrimaryKey; }).length === 0 };
        },
        generateMessage: function (args, parent) {
            return WARNING + ': PRIMARY KEY MISSING\n' +
                'selectionSettings.persistSelection property is enabled. It requires one primary key column to persist selection.\n' +
                ("Refer to " + BASE_DOC_URL + "/api-column.html?#isprimarykey for documentation on providing primary key columns.");
        }
    },
    actionfailure: {
        type: 'actionfailure',
        logType: 'error',
        check: function (args, parent) {
            return { success: true };
        },
        generateMessage: function (args, parent) {
            var message = '';
            var formatError = formatErrorHandler(args, parent);
            var ajaxError = ajaxErrorHandler(args, parent);
            if (ajaxError !== '') {
                message = ajaxError;
            }
            else if (formatError !== '') {
                message = formatError;
            }
            else {
                message = args.error;
            }
            return WARNING + ': ' + message;
        }
    },
    locale_missing: {
        type: 'locale_missing',
        logType: 'warn',
        check: function (args, parent) {
            var lObj = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getObject("locale." + parent.locale + ".grid", _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]);
            return { success: parent.locale !== 'en-US' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(lObj) };
        },
        generateMessage: function (args, parent) {
            return WARNING + ': LOCALE CONFIG MISSING\n' + ("Locale configuration for '" + parent.locale + "' is not provided.\n") +
                ("Refer to " + BASE_DOC_URL + "/globalization-and-localization.html?#localization \n             for documentation on setting locale configuration.");
        }
    },
    limitation: {
        type: 'limitation',
        logType: 'warn',
        check: function (args, parent) {
            var name = args;
            var opt;
            switch (name) {
                case 'freeze':
                    opt = {
                        success: parent.allowGrouping || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(parent.detailTemplate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(parent.childGrid)
                            || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(parent.rowTemplate) || parent.enableVirtualization,
                        options: { name: 'freeze' }
                    };
                    break;
                case 'virtualization':
                    opt = {
                        success: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(parent.detailTemplate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(parent.childGrid) || parent.frozenRows !== 0
                            || parent.frozenColumns !== 0,
                        options: { name: 'virtualization' }
                    };
                    break;
                default:
                    opt = { success: false };
                    break;
            }
            return opt;
        },
        generateMessage: function (args, parent, options) {
            var name = options.name;
            var opt;
            switch (name) {
                case 'freeze':
                    opt = 'Frozen rows and columns do not support the following features:\n' +
                        '* Virtualization\n' +
                        '* Row Template\n' +
                        '* Details Template\n' +
                        '* Hierarchy Grid\n' +
                        '* Grouping';
                    break;
                case 'virtualization':
                    opt = 'Virtualization does not support the following features.\n' +
                        '* Freeze rows and columns.\n' +
                        '* Details Template.\n' +
                        '* Hierarchy Grid.\n';
                    break;
                default:
                    opt = '';
                    break;
            }
            return WARNING + (": " + name.toUpperCase() + " LIMITATIONS\n") + opt;
        }
    },
    check_datasource_columns: {
        type: 'check_datasource_columns',
        logType: 'warn',
        check: function (args, parent) {
            return { success: !(parent.columns.length ||
                    (parent.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) || parent.dataSource.length) };
        },
        generateMessage: function (args, parent) {
            return WARNING + ': GRID CONFIG MISSING\n' + 'dataSource and columns are not provided in the grid. ' +
                'At least one of either must be provided for grid configuration.\n' +
                ("Refer to " + BASE_DOC_URL + "/columns.html for documentation on configuring the grid data and columns.");
        }
    },
    virtual_height: {
        type: 'virtual_height',
        logType: 'error',
        check: function (args, parent) {
            return { success: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parent.height) || parent.height === 'auto' };
        },
        generateMessage: function (args, parent) {
            return ERROR + ': GRID HEIGHT MISSING \n' + 'height property is required to use virtualization.\n' +
                ("Refer to " + BASE_DOC_URL + "/virtual.html for documentation on configuring the virtual grid.");
        }
    },
    grid_remote_edit: {
        type: 'grid_remote_edit',
        logType: 'error',
        check: function (args, parent) {
            return { success: Array.isArray(args) || Array.isArray(args.result) };
        },
        generateMessage: function (args, parent) {
            return ERROR + ': RETRUN VALUE MISSING  \n' +
                'Remote service returns invalid data. \n' +
                ("Refer to " + BASE_DOC_URL + "/edit.html for documentation on configuring editing with remote data.");
        }
    },
    grid_sort_comparer: {
        type: 'grid_sort_comparer',
        logType: 'warn',
        check: function (args, parent) {
            return { success: parent.getDataModule().isRemote() };
        },
        generateMessage: function (args, parent) {
            return WARNING + ': SORT COMPARER NOT WORKING  \n' + 'Sort comparer will not work with remote data.' +
                ("Refer to " + BASE_DOC_URL + "/sorting/#custom-sort-comparer for documentation on using the sort comparer.");
        }
    },
    resize_min_max: {
        type: 'resize_min_max',
        logType: 'info',
        check: function (args, parent) {
            return { success: (args.column.minWidth && args.column.minWidth >= args.width) ||
                    (args.column.maxWidth && args.column.maxWidth <= args.width) };
        },
        generateMessage: function (args, parent) {
            return INFO + ': RESIZING COLUMN REACHED MIN OR MAX  \n' + 'The column resizing width is at its min or max.';
        }
    },
    action_disabled_column: {
        type: 'action_disabled_column',
        logType: 'info',
        check: function (args, parent) {
            var success = true;
            var fn;
            switch (args.moduleName) {
                case 'reorder':
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.destColumn)) {
                        fn = "reordering action is disabled for the " + args.column.headerText + " column";
                    }
                    else {
                        fn = "reordering action is disabled for the " + (args.column.allowReordering ?
                            args.destColumn.headerText : args.column.headerText) + " column";
                    }
                    break;
                case 'group':
                    fn = "grouping action is disabled for the " + args.columnName + " column.";
                    break;
                case 'filter':
                    fn = "filtering action is disabled for the " + args.columnName + " column.";
                    break;
                case 'sort':
                    fn = "sorting action is disabled for the " + args.columnName + " column.";
                    break;
            }
            return { success: success, options: { fn: fn } };
        },
        generateMessage: function (args, parent, options) {
            return INFO + (": ACTION DISABLED \n " + options.fn);
        }
    },
    exporting_begin: {
        type: 'exporting_begin',
        logType: 'info',
        check: function (args, parent) {
            return { success: true, options: { args: args } };
        },
        generateMessage: function (args, parent, options) {
            return INFO + (": EXPORTNIG INPROGRESS \n Grid " + options.args + "ing is in progress");
        }
    },
    exporting_complete: {
        type: 'exporting_complete',
        logType: 'info',
        check: function (args, parent) {
            return { success: true, options: { args: args } };
        },
        generateMessage: function (args, parent, options) {
            return INFO + (": EXPORTNIG COMPLETED \n Grid " + options.args + "ing is complete");
        }
    },
    foreign_key_failure: {
        type: 'foreign_key_failure',
        logType: 'error',
        check: function (args, parent) {
            return { success: true };
        },
        generateMessage: function (args, parent) {
            return ERROR + ': FOREIGNKEY CONFIG \n  Grid foreign key column needs a valid data source/service.' +
                ("Refer to " + BASE_DOC_URL + "/columns/#foreign-key-column for documentation on configuring foreign key columns.");
        }
    },
    initial_action: {
        type: 'initial_action',
        logType: 'error',
        check: function (args, parent) {
            var success = true;
            var fn;
            switch (args.moduleName) {
                case 'group':
                    fn = "The " + args.columnName + " column is not available in the grid's column model." +
                        'Please provide a valid field name to group the column';
                    break;
                case 'filter':
                    fn = "The " + args.columnName + " column is not available in the grid's column model." +
                        'Please provide a valid field name to filter the column.';
                    break;
                case 'sort':
                    fn = "The " + args.columnName + " column is not available in the grid's column model." +
                        'Please provide a valid field name to sort the column.';
                    break;
            }
            return { success: success, options: { fn: fn } };
        },
        generateMessage: function (args, parent, options) {
            return ERROR + (": INITIAL ACTION FAILURE \n " + options.fn);
        }
    },
    frozen_rows_columns: {
        type: 'frozen_rows_columns',
        logType: 'error',
        check: function (args, parent) {
            return { success: parent.getColumns().length <= parent.frozenColumns || parent.frozenRows >= parent.currentViewData.length };
        },
        generateMessage: function (args, parent, options) {
            return ERROR + (": OUT OF RANGE ERROR-\n " + (parent.getColumns().length <= parent.frozenColumns ? 'FROZEN COLUMNS,' : '')) +
                ((parent.frozenRows >= parent.currentViewData.length ? 'FROZEN ROWS' : '') + " invalid");
        }
    },
    column_type_missing: {
        type: 'column_type_missing',
        logType: 'error',
        check: function (args, parent) {
            return { success: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.column.type), options: args.column.headerText };
        },
        generateMessage: function (args, parent, options) {
            return ERROR + (": COLUMN TYPE MISSING-\n  " + options + " column type was invalid or not defined.") +
                ("Please go through below help link: " + DOC_URL + "/grid/columns/#column-type");
        }
    }
};
var formatErrorHandler = function (args, parent) {
    var error = args.error;
    if (error.indexOf && error.indexOf('Format options') !== 0) {
        return '';
    }
    return 'INVALID FORMAT\n' +
        'For more information, refer to the following documentation links:\n' +
        ("Number format: " + DOC_URL + "/base/intl.html?#supported-format-string.\n") +
        ("Date format: " + DOC_URL + "/base/intl.html?#manipulating-datetime.\n") +
        ("Message: " + error);
};
var ajaxErrorHandler = function (args, parent) {
    var error = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getObject('error.error', args);
    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(error)) {
        return '';
    }
    var jsonResult = '';
    try {
        jsonResult = JSON.parse(error.responseText);
    }
    catch (_a) {
        jsonResult = '';
    }
    return 'XMLHTTPREQUEST FAILED\n' +
        ("Url: " + error.responseURL + "\n") +
        ("Status: " + error.status + " - " + error.statusText + "\n") +
        ("" + (jsonResult !== '' ? 'Message: ' + jsonResult : ''));
};


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/normal-edit.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/normal-edit.js ***!
  \****************************************************************************/
/*! exports provided: NormalEdit */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NormalEdit", function() { return NormalEdit; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../renderer/row-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");






/**
 * `NormalEdit` module is used to handle normal('inline, dialog, external') editing actions.
 * @hidden
 */
var NormalEdit = /** @class */ (function () {
    function NormalEdit(parent, serviceLocator, renderer) {
        this.args = {};
        this.parent = parent;
        this.renderer = renderer;
        this.serviceLocator = serviceLocator;
        this.addEventListener();
    }
    NormalEdit.prototype.clickHandler = function (e) {
        var target = e.target;
        var gObj = this.parent;
        if ((((Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-gridcontent') &&
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-gridcontent'), 'e-grid').id === gObj.element.id)) || (gObj.frozenRows
            && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-headercontent'))) && !Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-unboundcelldiv')) {
            this.rowIndex = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-rowcell') ? parseInt(target.parentElement.getAttribute('aria-rowindex'), 10) : -1;
            if (gObj.isEdit) {
                gObj.editModule.endEdit();
            }
        }
    };
    NormalEdit.prototype.dblClickHandler = function (e) {
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-rowcell') && this.parent.editSettings.allowEditOnDblClick) {
            this.parent.editModule.startEdit(Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-row'));
        }
    };
    /**
     * The function used to trigger editComplete
     * @return {void}
     * @hidden
     */
    NormalEdit.prototype.editComplete = function (e) {
        this.parent.isEdit = false;
        switch (e.requestType) {
            case 'save':
                if (!(this.parent.isCheckBoxSelection || this.parent.selectionSettings.type === 'Multiple')
                    || (!this.parent.isPersistSelection)) {
                    this.parent.selectRow(0);
                }
                this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(e, {
                    requestType: 'save',
                    type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"]
                }));
                break;
            case 'delete':
                this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(e, {
                    requestType: 'delete',
                    type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"]
                }));
                this.parent.selectRow(this.editRowIndex);
                break;
        }
    };
    NormalEdit.prototype.startEdit = function (tr) {
        var _this = this;
        var gObj = this.parent;
        var primaryKeys = gObj.getPrimaryKeyFieldNames();
        var primaryKeyValues = [];
        this.rowIndex = this.editRowIndex = parseInt(tr.getAttribute('aria-rowindex'), 10);
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isGroupAdaptive"])(gObj)) {
            var rObj = gObj.getRowObjectFromUID(tr.getAttribute('data-uid'));
            this.previousData = rObj.data;
        }
        else {
            this.previousData = gObj.getCurrentViewRecords()[this.rowIndex];
        }
        for (var i = 0; i < primaryKeys.length; i++) {
            primaryKeyValues.push(this.previousData[primaryKeys[i]]);
        }
        this.uid = tr.getAttribute('data-uid');
        var rowObj = gObj.getRowObjectFromUID(this.uid);
        var args = {
            row: tr, primaryKey: primaryKeys, primaryKeyValue: primaryKeyValues, requestType: 'beginEdit',
            rowData: this.previousData, rowIndex: this.rowIndex, type: 'edit', cancel: false,
            foreignKeyData: rowObj && rowObj.foreignKeyData, target: undefined
        };
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["beginEdit"], args, function (begineditargs) {
            begineditargs.type = 'actionBegin';
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], begineditargs, function (editargs) {
                if (!editargs.cancel) {
                    gObj.isEdit = true;
                    editargs.row = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getElement"])(editargs.row);
                    if (gObj.editSettings.mode !== 'Dialog') {
                        gObj.clearSelection();
                    }
                    if (gObj.editSettings.mode === 'Dialog' && gObj.selectionModule) {
                        gObj.selectionModule.preventFocus = true;
                        editargs.row.classList.add('e-dlgeditrow');
                    }
                    _this.renderer.update(editargs);
                    _this.uid = tr.getAttribute('data-uid');
                    gObj.editModule.applyFormValidation();
                    editargs.type = 'actionComplete';
                    gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], editargs);
                    _this.args = editargs;
                    if (_this.parent.allowTextWrap) {
                        _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["freezeRender"], { case: 'textwrap' });
                    }
                }
            });
        });
    };
    NormalEdit.prototype.updateRow = function (index, data) {
        var _this = this;
        var gObj = this.parent;
        var args = {
            requestType: 'save', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], data: data, cancel: false,
            previousData: gObj.getCurrentViewRecords()[index]
        };
        gObj.showSpinner();
        gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["updateData"], args);
        if (args.promise) {
            args.promise.then(function () { return gObj.refresh(); }).catch(function (e) { return _this.edFail(e); });
        }
        else {
            gObj.refresh();
        }
    };
    NormalEdit.prototype.editFormValidate = function () {
        var gObj = this.parent;
        var form1 = gObj.editModule.formObj.validate();
        var form2 = gObj.editModule.mFormObj ? gObj.editModule.mFormObj.validate() : true;
        return (form1 && form2);
    };
    NormalEdit.prototype.endEdit = function () {
        var gObj = this.parent;
        if (!this.parent.isEdit || !this.editFormValidate()) {
            return;
        }
        var editedData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {}, this.previousData, true);
        var args = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.args, {
            requestType: 'save', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], data: editedData, cancel: false,
            previousData: this.previousData, selectedRow: gObj.selectedRowIndex, foreignKeyData: {}
        });
        var isDlg = gObj.editSettings.mode === 'Dialog';
        var dlgWrapper = document.querySelector('#' + gObj.element.id + '_dialogEdit_wrapper');
        var dlgForm = isDlg ? dlgWrapper.querySelector('.e-gridform') : gObj.element.querySelector('.e-gridform');
        editedData = gObj.editModule.getCurrentEditedData(dlgForm, editedData);
        if (gObj.getFrozenColumns() && gObj.editSettings.mode === 'Normal') {
            var mForm = gObj.element.querySelector('.e-movableheader').querySelector('.e-gridform');
            if (gObj.frozenRows && mForm) {
                editedData = gObj.editModule.getCurrentEditedData(mForm, editedData);
            }
            else {
                editedData = gObj.editModule.getCurrentEditedData(gObj.element.querySelector('.e-movablecontent').querySelector('.e-gridform'), editedData);
            }
        }
        if (isDlg ? dlgWrapper.querySelectorAll('.e-editedrow').length : gObj.element.querySelectorAll('.e-editedrow').length) {
            args.action = 'edit';
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], args, function (endEditArgs) {
                if (endEditArgs.cancel) {
                    return;
                }
                gObj.showSpinner();
                gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["updateData"], endEditArgs);
            });
        }
        else {
            args.action = 'add';
            args.selectedRow = 0;
            args.index = this.addedRowIndex;
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], args);
            this.addedRowIndex = null;
            if (args.cancel) {
                return;
            }
        }
    };
    NormalEdit.prototype.destroyElements = function () {
        var gObj = this.parent;
        gObj.editModule.destroyWidgets();
        gObj.editModule.destroyForm();
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dialogDestroy"], {});
    };
    NormalEdit.prototype.editHandler = function (args) {
        var _this = this;
        if (args.promise) {
            args.promise.then(function (e) { return _this.edSucc(e, args); }).catch(function (e) { return _this.edFail(e); });
        }
        else {
            this.editSuccess(args.data, args);
        }
    };
    NormalEdit.prototype.edSucc = function (e, args) {
        this.editSuccess(e, args);
    };
    NormalEdit.prototype.edFail = function (e) {
        this.editFailure(e);
    };
    NormalEdit.prototype.updateCurrentViewData = function (data) {
        this.parent.getCurrentViewRecords()[this.editRowIndex] = data;
    };
    NormalEdit.prototype.requestSuccess = function (args) {
        if (this.parent.editModule.formObj && !this.parent.editModule.formObj.isDestroyed) {
            this.destroyElements();
            this.stopEditStatus();
            if (this.parent.editSettings.mode === 'Dialog' && args.action !== 'add') {
                this.parent.element.querySelector('.e-dlgeditrow').classList.remove('e-dlgeditrow');
            }
        }
    };
    NormalEdit.prototype.editSuccess = function (e, args) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) && !(e instanceof Array)) {
            var rowData = 'rowData';
            args.data = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, args[rowData], args.data), e);
        }
        this.requestSuccess(args);
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["beforeDataBound"], args);
        args.type = _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"];
        this.parent.isEdit = false;
        this.refreshRow(args.data);
        this.updateCurrentViewData(args.data);
        this.blazorTemplate();
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], args);
        if (!(this.parent.isCheckBoxSelection || this.parent.selectionSettings.type === 'Multiple')
            || (!this.parent.isPersistSelection)) {
            if (this.parent.editSettings.mode !== 'Dialog') {
                this.parent.selectRow(this.rowIndex > -1 ? this.rowIndex : this.editRowIndex);
            }
        }
        this.parent.hideSpinner();
    };
    NormalEdit.prototype.blazorTemplate = function () {
        var cols = this.parent.getColumns();
        for (var i = 0; i < cols.length; i++) {
            var col = cols[i];
            if (col.template) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.parent.element.id + col.uid, 'Template', col, false);
            }
            if (col.editTemplate) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.parent.element.id + col.uid + 'editTemplate', 'EditTemplate', col);
            }
        }
    };
    NormalEdit.prototype.editFailure = function (e) {
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionFailure"], e);
        this.parent.hideSpinner();
        this.parent.log('actionfailure', { error: e });
    };
    NormalEdit.prototype.refreshRow = function (data) {
        var frzCols = this.parent.getFrozenColumns();
        var row = new _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_3__["RowRenderer"](this.serviceLocator, null, this.parent);
        var rowObj = this.parent.getRowObjectFromUID(this.uid);
        if (rowObj) {
            rowObj.changes = data;
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["refreshForeignData"])(rowObj, this.parent.getForeignKeyColumns(), rowObj.changes);
            row.refresh(rowObj, this.parent.getColumns(), true);
            if (frzCols) {
                var uid = void 0;
                var tr = this.parent.element.querySelector('[data-uid=' + rowObj.uid + ']');
                if ((Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(tr, 'e-frozencontent')) || (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(tr, 'e-frozenheader'))) {
                    uid = this.parent.getMovableRows()[rowObj.index].getAttribute('data-uid');
                }
                else {
                    uid = this.parent.getRows()[rowObj.index].getAttribute('data-uid');
                }
                rowObj = this.parent.getRowObjectFromUID(uid);
                rowObj.changes = data;
                row.refresh(rowObj, this.parent.columns, true);
            }
        }
    };
    NormalEdit.prototype.closeEdit = function () {
        var _this = this;
        if (!this.parent.isEdit) {
            return;
        }
        var gObj = this.parent;
        var args = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.args, {
            requestType: 'cancel', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], data: this.previousData, selectedRow: gObj.selectedRowIndex
        });
        this.blazorTemplate();
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], args, function (closeEditArgs) {
            if (_this.parent.editSettings.mode === 'Dialog') {
                _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dialogDestroy"], {});
            }
            gObj.isEdit = false;
            _this.stopEditStatus();
            closeEditArgs.type = _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"];
            if (gObj.editSettings.mode !== 'Dialog') {
                _this.refreshRow(closeEditArgs.data);
            }
            if (gObj.getContentTable().querySelector('tr.e-emptyrow') &&
                !gObj.getContentTable().querySelector('tr.e-row')) {
                gObj.getContentTable().querySelector('tr.e-emptyrow').classList.remove('e-hide');
            }
            if (gObj.editSettings.mode !== 'Dialog') {
                gObj.selectRow(_this.rowIndex);
            }
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], closeEditArgs);
        });
    };
    NormalEdit.prototype.addRecord = function (data, index) {
        var _this = this;
        var gObj = this.parent;
        this.addedRowIndex = index = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index) ? index : 0;
        if (data) {
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], {
                requestType: 'save', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], data: data, selectedRow: 0, action: 'add', index: index
            });
            return;
        }
        if (gObj.isEdit) {
            return;
        }
        this.previousData = {};
        this.uid = '';
        gObj.columns.forEach(function (col) {
            if (col.field) {
                _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataUtil"].setValue(col.field, col.defaultValue, _this.previousData);
            }
        });
        var args = {
            cancel: false, foreignKeyData: {},
            requestType: 'add', data: this.previousData, type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], index: index,
            rowData: this.previousData, target: undefined
        };
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], args, function (addArgs) {
            if (addArgs.cancel) {
                return;
            }
            gObj.isEdit = true;
            if (gObj.editSettings.mode !== 'Dialog') {
                gObj.clearSelection();
            }
            _this.renderer.addNew(addArgs);
            gObj.editModule.applyFormValidation();
            addArgs.type = _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"];
            addArgs.row = gObj.element.querySelector('.e-addedrow');
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], addArgs);
            _this.args = addArgs;
        });
    };
    NormalEdit.prototype.deleteRecord = function (fieldname, data) {
        this.editRowIndex = this.parent.selectedRowIndex;
        if (data) {
            data = (data instanceof Array) ? data : [data];
            var gObj = this.parent;
            var index = 0;
            var dataLen = Object.keys(data).length;
            fieldname = fieldname || this.parent.getPrimaryKeyFieldNames()[0];
            var _loop_1 = function (i) {
                var _a;
                var tmpRecord;
                var contained = gObj.currentViewData.some(function (record) {
                    tmpRecord = record;
                    return data[i] === Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getObject"])(fieldname, record) || data[i] === record;
                });
                data[i] = contained ? tmpRecord : (_a = {}, _a[fieldname] = data[i], _a);
            };
            for (var i = 0; i < dataLen; i++) {
                _loop_1(i);
            }
        }
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], {
            requestType: 'delete', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], foreignKeyData: {},
            data: data ? data : this.parent.getSelectedRecords(), tr: this.parent.getSelectedRows(), cancel: false
        });
    };
    NormalEdit.prototype.stopEditStatus = function () {
        var gObj = this.parent;
        var elem = gObj.element.querySelector('.e-addedrow');
        var mElem;
        var editMElem;
        if (gObj.getFrozenColumns()) {
            mElem = gObj.element.querySelectorAll('.e-addedrow')[1];
            editMElem = gObj.element.querySelectorAll('.e-editedrow')[1];
            if (mElem) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(mElem);
            }
            if (editMElem) {
                editMElem.classList.remove('e-editedrow');
            }
        }
        if (elem) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(elem);
        }
        elem = gObj.element.querySelector('.e-editedrow');
        if (elem) {
            elem.classList.remove('e-editedrow');
        }
    };
    /**
     * @hidden
     */
    NormalEdit.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["crudAction"], this.editHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["doubleTap"], this.dblClickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.clickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["recordAdded"], this.requestSuccess, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dblclick"], this.dblClickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["deleteComplete"], this.editComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["saveComplete"], this.editComplete, this);
    };
    /**
     * @hidden
     */
    NormalEdit.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["crudAction"], this.editHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["doubleTap"], this.dblClickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.clickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["recordAdded"], this.requestSuccess);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dblclick"], this.dblClickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["deleteComplete"], this.editComplete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["saveComplete"], this.editComplete);
    };
    /**
     * @hidden
     */
    NormalEdit.prototype.destroy = function () {
        this.removeEventListener();
        this.renderer.destroy();
    };
    return NormalEdit;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/page.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/page.js ***!
  \*********************************************************************/
/*! exports provided: Page */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Page", function() { return Page; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _pager_pager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../pager/pager */ "./node_modules/@syncfusion/ej2-grids/src/pager/pager.js");
/* harmony import */ var _pager_pager_dropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../pager/pager-dropdown */ "./node_modules/@syncfusion/ej2-grids/src/pager/pager-dropdown.js");
/* harmony import */ var _pager_external_message__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../pager/external-message */ "./node_modules/@syncfusion/ej2-grids/src/pager/external-message.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");







/**
 * The `Page` module is used to render pager and handle paging action.
 */
var Page = /** @class */ (function () {
    /**
     * Constructor for the Grid paging module
     * @hidden
     */
    function Page(parent, pageSettings) {
        _pager_pager__WEBPACK_IMPORTED_MODULE_1__["Pager"].Inject(_pager_external_message__WEBPACK_IMPORTED_MODULE_3__["ExternalMessage"], _pager_pager_dropdown__WEBPACK_IMPORTED_MODULE_2__["PagerDropDown"]);
        this.parent = parent;
        this.pageSettings = pageSettings;
        this.addEventListener();
    }
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Page.prototype.getModuleName = function () {
        return 'pager';
    };
    /**
     * The function used to render pager from grid pageSettings
     * @return {void}
     * @hidden
     */
    Page.prototype.render = function () {
        var gObj = this.parent;
        var pagerObj;
        this.pagerDestroy();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.pagerTemplate)) {
            this.pageSettings.template = this.parent.pagerTemplate;
        }
        this.element = this.parent.createElement('div', { className: 'e-gridpager' });
        pagerObj = Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["extend"])({}, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["getActualProperties"])(this.pageSettings)), {
            click: this.clickHandler.bind(this),
            dropDownChanged: this.onSelect.bind(this),
            enableRtl: gObj.enableRtl, locale: gObj.locale,
            created: this.addAriaAttr.bind(this)
        }, ['parentObj', 'propName']);
        this.pagerObj = new _pager_pager__WEBPACK_IMPORTED_MODULE_1__["Pager"](pagerObj);
    };
    Page.prototype.onSelect = function (e) {
        this.pageSettings.pageSize = e.pageSize;
        if (!this.isInitialLoad) {
            this.pageSettings.currentPage = 1;
        }
    };
    Page.prototype.addAriaAttr = function () {
        var _this = this;
        if (!(this.pageSettings.template)) {
            var numericContainerNew = this.parent.createElement('div', { className: 'e-numericcontainer' });
            var pagerContainer = this.element.querySelector('.e-pagercontainer');
            var frag = document.createDocumentFragment();
            var numericContainer = this.element.querySelector('.e-numericcontainer');
            var links = numericContainer.querySelectorAll('a');
            for (var i = 0; i < links.length; i++) {
                if (this.parent.getContentTable()) {
                    links[i].setAttribute('aria-owns', this.parent.getContentTable().id);
                }
                else {
                    links[i].setAttribute('aria-owns', this.parent.element.getAttribute('id') + '_content_table');
                }
                var numericContainerDiv = this.parent.createElement('div');
                numericContainerDiv.appendChild(links[i]);
                frag.appendChild(numericContainerDiv);
            }
            numericContainerNew.appendChild(frag);
            pagerContainer.replaceChild(numericContainerNew, numericContainer);
            var classList = ['.e-mfirst', '.e-mprev', '.e-first', '.e-prev', '.e-next', '.e-last', '.e-mnext', '.e-mlast'];
            classList.forEach(function (value) {
                var element = _this.element.querySelector(value);
                if (_this.parent.getContentTable()) {
                    element.setAttribute('aria-owns', _this.parent.getContentTable().id);
                }
            });
        }
    };
    Page.prototype.dataReady = function (e) {
        this.updateModel(e);
    };
    /**
     * Refreshes the page count, pager information, and external message.
     * @return {void}
     */
    Page.prototype.refresh = function () {
        this.pagerObj.refresh();
    };
    /**
     * Navigates to the target page according to the given number.
     * @param  {number} pageNo - Defines the page number to navigate.
     * @return {void}
     */
    Page.prototype.goToPage = function (pageNo) {
        this.pagerObj.goToPage(pageNo);
    };
    /**
     * The function used to update pageSettings model
     * @return {void}
     * @hidden
     */
    Page.prototype.updateModel = function (e) {
        this.parent.pageSettings.totalRecordsCount = e.count;
        this.parent.dataBind();
    };
    /**
     * The function used to trigger onActionComplete
     * @return {void}
     * @hidden
     */
    Page.prototype.onActionComplete = function (e) {
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_5__["actionComplete"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(e, {
            currentPage: this.parent.pageSettings.currentPage, requestType: 'paging',
            type: _base_constant__WEBPACK_IMPORTED_MODULE_5__["actionComplete"]
        }));
    };
    /**
     * @hidden
     */
    Page.prototype.onPropertyChanged = function (e) {
        if (e.module !== this.getModuleName()) {
            return;
        }
        var newProp = e.properties;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            this.pagerObj[prop] = newProp[prop];
        }
        this.pagerObj.dataBind();
    };
    Page.prototype.clickHandler = function (e) {
        var gObj = this.parent;
        if (this.isForceCancel || Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["isActionPrevent"])(gObj) && !gObj.prevPageMoving) {
            if (!this.isForceCancel) {
                gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_5__["preventBatch"], { instance: this, handler: this.goToPage, arg1: e.currentPage });
                this.isForceCancel = true;
                this.pagerObj.currentPage = gObj.pageSettings.currentPage;
                this.pagerObj.dataBind();
            }
            else {
                this.isForceCancel = false;
            }
            e.cancel = true;
            return;
        }
        gObj.prevPageMoving = false;
        var prevPage = this.pageSettings.currentPage;
        this.pageSettings.currentPage = e.currentPage;
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_5__["modelChanged"], {
            requestType: 'paging',
            previousPage: prevPage,
            currentPage: e.currentPage,
            type: _base_constant__WEBPACK_IMPORTED_MODULE_5__["actionBegin"]
        });
        this.parent.requestTypeAction = 'paging';
    };
    Page.prototype.keyPressHandler = function (e) {
        if (e.action in keyActions) {
            e.preventDefault();
            this.element.querySelector(keyActions[e.action]).click();
        }
    };
    /**
     * Defines the text of the external message.
     * @param  {string} message - Defines the message to update.
     * @return {void}
     */
    Page.prototype.updateExternalMessage = function (message) {
        if (!this.pagerObj.enableExternalMessage) {
            this.pagerObj.enableExternalMessage = true;
            this.pagerObj.dataBind();
        }
        this.pagerObj.externalMessage = message;
        this.pagerObj.dataBind();
    };
    Page.prototype.appendToElement = function (e) {
        this.isInitialLoad = true;
        this.parent.element.appendChild(this.element);
        this.parent.setGridPager(this.element);
        this.pagerObj.appendTo(this.element);
        this.isInitialLoad = false;
    };
    Page.prototype.enableAfterRender = function (e) {
        if (e.module === this.getModuleName() && e.enable) {
            this.render();
            this.appendToElement();
        }
    };
    /**
     * @hidden
     */
    Page.prototype.addEventListener = function () {
        this.handlers = {
            load: this.render,
            end: this.appendToElement,
            ready: this.dataReady,
            complete: this.onActionComplete,
            updateLayout: this.enableAfterRender,
            inboundChange: this.onPropertyChanged,
            keyPress: this.keyPressHandler
        };
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_5__["initialLoad"], this.handlers.load, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_5__["initialEnd"], this.handlers.end, this); //For initial rendering
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_5__["dataReady"], this.handlers.ready, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_5__["pageComplete"], this.handlers.complete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_5__["uiUpdate"], this.handlers.updateLayout, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_5__["inBoundModelChanged"], this.handlers.inboundChange, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_5__["keyPressed"], this.handlers.keyPress, this);
    };
    /**
     * @hidden
     */
    Page.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_5__["initialLoad"], this.handlers.load);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_5__["initialEnd"], this.handlers.end); //For initial rendering
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_5__["dataReady"], this.handlers.ready);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_5__["pageComplete"], this.handlers.complete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_5__["uiUpdate"], this.handlers.updateLayout);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_5__["inBoundModelChanged"], this.handlers.inboundChange);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_5__["keyPressed"], this.handlers.keyPress);
    };
    /**
     * To destroy the pager
     * @return {void}
     * @hidden
     */
    Page.prototype.destroy = function () {
        this.removeEventListener();
        this.pagerDestroy();
    };
    Page.prototype.pagerDestroy = function () {
        if (this.pagerObj && !this.pagerObj.isDestroyed) {
            this.pagerObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
        }
    };
    return Page;
}());

/**
 * @hidden
 */
var keyActions = {
    pageUp: '.e-prev',
    pageDown: '.e-next',
    ctrlAltPageDown: '.e-last',
    ctrlAltPageUp: '.e-first',
    altPageUp: '.e-pp',
    altPageDown: '.e-np'
};


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/pdf-export.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/pdf-export.js ***!
  \***************************************************************************/
/*! exports provided: PdfExport */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfExport", function() { return PdfExport; });
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-pdf-export */ "./node_modules/@syncfusion/ej2-pdf-export/index.js");
/* harmony import */ var _export_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./export-helper */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/export-helper.js");
/* harmony import */ var _actions_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actions/data */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/data.js");
/* harmony import */ var _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/summary-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/summary-model-generator.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");















/**
 * `PDF Export` module is used to handle the exportToPDF action.
 * @hidden
 */
var PdfExport = /** @class */ (function () {
    /**
     * Constructor for the Grid PDF Export module
     * @hidden
     */
    function PdfExport(parent) {
        this.hideColumnInclude = false;
        this.currentViewData = false;
        this.customDataSource = false;
        this.isGrouping = false;
        this.parent = parent;
        this.helper = new _export_helper__WEBPACK_IMPORTED_MODULE_2__["ExportHelper"](parent);
        this.gridPool = {};
    }
    /**
     * For internal use only - Get the module name.
     */
    PdfExport.prototype.getModuleName = function () {
        return 'PdfExport';
    };
    PdfExport.prototype.init = function (parent) {
        this.exportValueFormatter = new _export_helper__WEBPACK_IMPORTED_MODULE_2__["ExportValueFormatter"](parent.locale);
        this.pdfDocument = undefined;
        this.hideColumnInclude = false;
        this.currentViewData = false;
        this.parent = parent;
        this.isGrouping = false;
        this.isExporting = true;
        parent.id = Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["getUid"])('main-grid');
        this.gridPool[parent.id] = false;
    };
    PdfExport.prototype.exportWithData = function (parent, pdfDoc, resolve, returnType, pdfExportProperties, isMultipleExport) {
        var _this = this;
        this.init(parent);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfDoc)) {
            this.pdfDocument = pdfDoc;
        }
        else {
            this.pdfDocument = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfDocument"]();
        }
        this.processExport(parent, returnType, pdfExportProperties, isMultipleExport).then(function () {
            _this.isExporting = false;
            parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["pdfExportComplete"], _this.isBlob ? { promise: _this.blobPromise } : {});
            _this.parent.log('exporting_complete', _this.getModuleName());
            resolve(_this.pdfDocument);
        });
    };
    /**
     * Used to map the input data
     * @return {void}
     */
    PdfExport.prototype.Map = function (parent, pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
        var _this = this;
        this.data = new _actions_data__WEBPACK_IMPORTED_MODULE_3__["Data"](this.parent);
        this.isBlob = isBlob;
        this.gridPool = {};
        if (parent.childGrid && !(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties) && pdfExportProperties.hierarchyExportMode === 'None')) {
            parent.expandedRows = Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["getPrintGridModel"])(parent).expandedRows;
        }
        var args = {
            requestType: 'beforePdfExport', gridObject: parent, cancel: false
        };
        var can = 'cancel';
        parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["beforePdfExport"], args);
        if (args[can] === true) {
            return new Promise(function (resolve, reject) {
                return resolve();
            });
        }
        this.parent.log('exporting_begin', this.getModuleName());
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties.dataSource)
            && pdfExportProperties.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__["DataManager"]) {
            return new Promise(function (resolve, reject) {
                pdfExportProperties.dataSource.executeQuery(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__["Query"]()).then(function (returnType) {
                    _this.exportWithData(parent, pdfDoc, resolve, returnType, pdfExportProperties, isMultipleExport);
                });
            });
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties) && pdfExportProperties.exportType === 'CurrentPage') {
            return new Promise(function (resolve, reject) {
                _this.exportWithData(parent, pdfDoc, resolve, _this.parent.getCurrentViewRecords(), pdfExportProperties, isMultipleExport);
            });
        }
        else {
            var allPromise_1 = [];
            allPromise_1.push(this.data.getData({}, _export_helper__WEBPACK_IMPORTED_MODULE_2__["ExportHelper"].getQuery(parent, this.data)));
            allPromise_1.push(this.helper.getColumnData(parent));
            return new Promise(function (resolve, reject) {
                Promise.all(allPromise_1).then(function (e) {
                    _this.init(parent);
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfDoc)) {
                        _this.pdfDocument = pdfDoc;
                    }
                    else {
                        _this.pdfDocument = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfDocument"]();
                    }
                    _this.processExport(parent, e[0], pdfExportProperties, isMultipleExport).then(function () {
                        _this.isExporting = false;
                        parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["pdfExportComplete"], _this.isBlob ? { promise: _this.blobPromise } : {});
                        _this.parent.log('exporting_complete', _this.getModuleName());
                        resolve(_this.pdfDocument);
                    });
                });
            });
        }
    };
    PdfExport.prototype.processExport = function (gObj, returnType, pdfExportProperties, isMultipleExport) {
        var _this = this;
        var section = this.pdfDocument.sections.add();
        var pdfGrid;
        this.processSectionExportProperties(section, pdfExportProperties);
        var pdfPage = section.pages.add();
        return new Promise(function (resolve, reject) {
            pdfGrid = _this.processGridExport(gObj, returnType, pdfExportProperties);
            _this.globalResolve = resolve;
            _this.gridPool[gObj.id] = true;
            _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);
        }).then(function () {
            // draw the grid
            pdfGrid.draw(pdfPage, 0, 0);
            if (!isMultipleExport) {
                // save the PDF
                if (!_this.isBlob) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties) && pdfExportProperties.fileName) {
                        _this.pdfDocument.save(pdfExportProperties.fileName);
                    }
                    else {
                        _this.pdfDocument.save('Export.pdf');
                    }
                }
                else {
                    _this.blobPromise = _this.pdfDocument.save();
                }
                _this.pdfDocument.destroy();
                delete gObj.expandedRows;
            }
            return _this.pdfDocument;
        });
    };
    PdfExport.prototype.processSectionExportProperties = function (section, pdfExportProperties) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties) && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties.pageOrientation)
            || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties.pageSize))) {
            var pdfPageSettings = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPageSettings"]();
            pdfPageSettings.orientation = (pdfExportProperties.pageOrientation === 'Landscape') ?
                _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPageOrientation"].Landscape : _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPageOrientation"].Portrait;
            pdfPageSettings.size = this.getPageSize(pdfExportProperties.pageSize);
            section.setPageSettings(pdfPageSettings);
        }
        return section;
    };
    PdfExport.prototype.processGridExport = function (gObj, returnType, pdfExportProperties) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties)) {
            this.gridTheme = pdfExportProperties.theme;
        }
        var helper = new _export_helper__WEBPACK_IMPORTED_MODULE_2__["ExportHelper"](gObj);
        var dataSource = this.processExportProperties(pdfExportProperties, returnType.result);
        var columns = gObj.columns;
        var isGrouping = false;
        if (gObj.groupSettings.columns.length) {
            isGrouping = true;
        }
        if (gObj.childGrid && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties)) {
            gObj.hierarchyPrintMode = pdfExportProperties.hierarchyExportMode || 'Expanded';
        }
        // create a grid
        var pdfGrid = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfGrid"]();
        // get header theme style
        var headerThemeStyle = this.getHeaderThemeStyle();
        var border = headerThemeStyle.border;
        var headerFont = headerThemeStyle.font;
        var headerBrush = headerThemeStyle.brush;
        var returnValue = helper.getHeaders(columns, this.hideColumnInclude);
        // Column collection with respect to the records in the grid
        var gridColumns = returnValue.columns;
        // process grid header content
        pdfGrid = this.processGridHeaders(gObj.groupSettings.columns.length, pdfGrid, returnValue.rows, gridColumns, border, headerFont, headerBrush, gObj);
        // set alignment, width and type of the values of the column
        this.setColumnProperties(gridColumns, pdfGrid, helper, gObj);
        var captionThemeStyle = this.getSummaryCaptionThemeStyle();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(dataSource) && dataSource.length) {
            if (isGrouping) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(captionThemeStyle.border)) {
                    border = captionThemeStyle.border;
                }
                this.processGroupedRecords(pdfGrid, dataSource, gridColumns, gObj, border, 0, captionThemeStyle.font, captionThemeStyle.
                    brush, captionThemeStyle.backgroundBrush, returnType, pdfExportProperties, helper, 0);
            }
            else {
                this.processRecord(border, gridColumns, gObj, dataSource, pdfGrid, 0, pdfExportProperties, helper, 0);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(returnType.aggregates)) {
                var summaryModel = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__["SummaryModelGenerator"](gObj);
                var sRows = void 0;
                if (this.customDataSource) {
                    sRows = summaryModel.generateRows(dataSource, returnType.aggregates);
                }
                else if (this.currentViewData) {
                    sRows = summaryModel.generateRows(this.parent.getCurrentViewRecords(), returnType.aggregates);
                }
                else if (isGrouping) {
                    sRows = summaryModel.generateRows(dataSource.records, returnType.aggregates);
                }
                else {
                    sRows = summaryModel.generateRows(returnType.result, returnType.aggregates);
                }
                this.processAggregates(sRows, pdfGrid, border, captionThemeStyle.font, captionThemeStyle.brush, captionThemeStyle.backgroundBrush, false);
            }
        }
        else {
            var row = pdfGrid.rows.addRow();
            row.style.setBorder(border);
        }
        return pdfGrid;
    };
    PdfExport.prototype.getSummaryCaptionThemeStyle = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.caption)) {
            var fontSize = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.caption.fontSize) ? this.gridTheme.caption.fontSize : 9.75;
            var fontFamily = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.caption.fontName) ?
                this.getFontFamily(this.gridTheme.caption.fontName) : _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontFamily"].Helvetica;
            var fontStyle = this.getFontStyle(this.gridTheme.caption);
            var pdfColor = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](0, 0, 0);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.caption.fontColor)) {
                var penBrushColor = this.hexToRgb(this.gridTheme.caption.fontColor);
                pdfColor = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](penBrushColor.r, penBrushColor.g, penBrushColor.b);
            }
            var borderCaption = this.gridTheme.caption.border ? this.getBorderStyle(this.gridTheme.caption.border) : null;
            var font = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStandardFont"](fontFamily, fontSize, fontStyle);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.caption.font)) {
                font = this.gridTheme.caption.font;
            }
            return { font: font, brush: new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](pdfColor), backgroundBrush: new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](246, 246, 246)),
                border: borderCaption };
        }
        else {
            //Material theme
            return { font: new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStandardFont"](_syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontFamily"].Helvetica, 9.75), brush: new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](0, 0, 0)),
                backgroundBrush: new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](246, 246, 246)) };
        }
    };
    PdfExport.prototype.getHeaderThemeStyle = function () {
        var border = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfBorders"]();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.header)) {
            var fontFamily = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.header.fontName) ?
                this.getFontFamily(this.gridTheme.header.fontName) : _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontFamily"].Helvetica;
            var fontStyle = this.getFontStyle(this.gridTheme.header);
            var fontSize = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.header.fontSize) ? this.gridTheme.header.fontSize : 10.5;
            var pdfColor = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"]();
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.header.fontColor)) {
                var penBrushColor = this.hexToRgb(this.gridTheme.header.fontColor);
                pdfColor = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](penBrushColor.r, penBrushColor.g, penBrushColor.b);
            }
            var font = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStandardFont"](fontFamily, fontSize, fontStyle);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.header.font)) {
                font = this.gridTheme.header.font;
            }
            return { border: this.getBorderStyle(this.gridTheme.header.border), font: font, brush: new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](pdfColor) };
        }
        else {
            //Material theme
            border.all = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPen"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](234, 234, 234));
            return { border: border, font: new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStandardFont"](_syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontFamily"].Helvetica, 10.5),
                brush: new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](102, 102, 102)) };
        }
    };
    /* tslint:disable-next-line:no-any */
    PdfExport.prototype.processGroupedRecords = function (pdfGrid, dataSource, gridColumns, gObj, border, level, font, brush, backgroundBrush, returnType, pdfExportProperties, helper, index) {
        var groupIndex = level;
        for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {
            var dataSourceItems = dataSource_1[_i];
            var row = pdfGrid.rows.addRow();
            var col = gObj.getColumnByField(dataSourceItems.field);
            /* tslint:disable-next-line:no-any */
            var args = {
                value: dataSourceItems.key,
                column: col,
                style: undefined,
                isForeignKey: col.isForeignColumn(),
            };
            /* tslint:disable-next-line:max-line-length */
            var value = this.parent.getColumnByField(dataSourceItems.field).headerText + ': ' + (!col.enableGroupByFormat ? this.exportValueFormatter.formatCellValue(args) : dataSourceItems.key) + ' - ' + dataSourceItems.count + (dataSource.count > 1 ? ' items' : ' item');
            row.cells.getCell(groupIndex).value = value;
            row.cells.getCell(groupIndex + 1).style.stringFormat = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStringFormat"](_syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Left);
            row.style.setBorder(border);
            row.style.setFont(font);
            row.style.setTextBrush(brush);
            row.style.setBackgroundBrush(backgroundBrush);
            var sRows = void 0;
            var captionSummaryModel = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__["CaptionSummaryModelGenerator"](gObj);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(dataSourceItems.items.records)) {
                sRows = captionSummaryModel.generateRows(dataSourceItems.items.records, dataSourceItems);
            }
            else {
                sRows = captionSummaryModel.generateRows(dataSourceItems.items, dataSourceItems);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(sRows) && sRows.length === 0) {
                row.cells.getCell(groupIndex + 1).columnSpan = pdfGrid.columns.count - (groupIndex + 1);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(dataSource.childLevels) && dataSource.childLevels > 0) {
                this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, true, row, groupIndex);
                this.processGroupedRecords(pdfGrid, dataSourceItems.items, gridColumns, gObj, border, (groupIndex + 1), font, brush, backgroundBrush, returnType, pdfExportProperties, helper, index);
                var groupSummaryModel = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__["GroupSummaryModelGenerator"](gObj);
                sRows = groupSummaryModel.generateRows(dataSourceItems.items.records, dataSourceItems);
                this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, false);
            }
            else {
                this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, true, row, groupIndex);
                index = this.processRecord(border, gridColumns, gObj, dataSourceItems.items, pdfGrid, (groupIndex + 1), pdfExportProperties, helper, index);
                var groupSummaryModel = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__["GroupSummaryModelGenerator"](gObj);
                sRows = groupSummaryModel.generateRows(dataSourceItems.items, dataSourceItems);
                this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, false);
            }
        }
    };
    PdfExport.prototype.processGridHeaders = function (childLevels, pdfGrid, rows, gridColumn, border, headerFont, headerBrush, grid) {
        var columnCount = gridColumn.length + childLevels;
        // add columns
        pdfGrid.columns.add(columnCount);
        // add header
        pdfGrid.headers.add(rows.length);
        // set cell values of each rows in the header
        for (var i = 0; i < rows.length; i++) {
            var gridHeader = pdfGrid.headers.getHeader(i);
            gridHeader.style.setBorder(border);
            gridHeader.style.setFont(headerFont);
            gridHeader.style.setTextBrush(headerBrush);
            var colSpan = 0;
            var cellLength = rows[i].cells.length;
            for (var j = 0; j < cellLength; j++) {
                var cell = rows[i].cells[j];
                var pdfCell = gridHeader.cells.getCell(j + colSpan);
                switch (cell.cellType) {
                    case _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].HeaderIndent:
                    case _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].DetailHeader:
                        pdfCell.value = '';
                        pdfCell.width = 20;
                        break;
                    case _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].Header:
                    case _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].StackedHeader:
                        if (pdfCell.value !== null) {
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(cell.column.headerTextAlign)) {
                                pdfCell.style.stringFormat = this.getHorizontalAlignment(cell.column.headerTextAlign);
                            }
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(cell.rowSpan)) {
                                pdfCell.rowSpan = cell.rowSpan;
                                pdfCell.style.stringFormat = this.getVerticalAlignment('Bottom', pdfCell.style.stringFormat, cell.column.textAlign);
                                for (var k = 1; k < rows[i].cells[j].rowSpan; k++) {
                                    pdfGrid.headers.getHeader(i + k).cells.getCell(j).value = null;
                                }
                            }
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(cell.colSpan)) {
                                pdfCell.columnSpan = cell.colSpan;
                                colSpan += cell.colSpan - 1;
                            }
                            pdfCell.value = cell.column.headerText;
                            var args = {
                                cell: pdfCell,
                                gridCell: cell,
                                style: pdfCell.style
                            };
                            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["pdfHeaderQueryCellInfo"], args);
                        }
                        else {
                            colSpan += pdfCell.columnSpan;
                            j = j - 1;
                        }
                        break;
                }
            }
        }
        if (pdfGrid.columns.count >= 6) {
            pdfGrid.style.allowHorizontalOverflow = true;
        }
        return pdfGrid;
    };
    PdfExport.prototype.processExportProperties = function (pdfExportProperties, dataSource) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties)) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties.theme)) {
                this.gridTheme = pdfExportProperties.theme;
            }
            var clientSize = this.pdfDocument.pageSettings.size;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties.header)) {
                /* tslint:disable-next-line:no-any */
                var header = pdfExportProperties.header;
                var position = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PointF"](0, header.fromTop);
                var size = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"]((clientSize.width - 80), (header.height * 0.75));
                var bounds = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](position, size);
                this.pdfDocument.template.top = this.drawPageTemplate(new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPageTemplateElement"](bounds), header);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties.footer)) {
                /* tslint:disable-next-line:no-any */
                var footer = pdfExportProperties.footer;
                var position = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PointF"](0, ((clientSize.width - 80) - (footer.fromBottom * 0.75)));
                var size = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"]((clientSize.width - 80), (footer.height * 0.75));
                var bounds = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](position, size);
                this.pdfDocument.template.bottom = this.drawPageTemplate(new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPageTemplateElement"](bounds), footer);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties.includeHiddenColumn) && !this.isGrouping) {
                this.hideColumnInclude = pdfExportProperties.includeHiddenColumn;
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties.dataSource)) {
                if (!(pdfExportProperties.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_7__["DataManager"])) {
                    dataSource = pdfExportProperties.dataSource;
                }
                this.customDataSource = true;
                this.currentViewData = false;
            }
            else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties.exportType)) {
                if (pdfExportProperties.exportType === 'CurrentPage') {
                    dataSource = this.parent.currentViewData;
                    this.currentViewData = true;
                    this.customDataSource = false;
                }
                else {
                    this.currentViewData = false;
                    this.customDataSource = false;
                }
            }
            else {
                this.currentViewData = false;
                this.customDataSource = false;
            }
        }
        else {
            this.currentViewData = false;
            this.customDataSource = false;
        }
        return dataSource;
    };
    PdfExport.prototype.drawPageTemplate = function (template, element) {
        for (var _i = 0, _a = element.contents; _i < _a.length; _i++) {
            var content = _a[_i];
            this.processContentValidation(content);
            switch (content.type) {
                case 'Text':
                    /* tslint:disable-next-line:max-line-length */
                    if (content.value === '' || content.value === undefined || content.value === null || typeof content.value !== 'string') {
                        throw new Error('please enter the valid input value in text content...');
                    }
                    this.drawText(template, content);
                    break;
                case 'PageNumber':
                    this.drawPageNumber(template, content);
                    break;
                case 'Image':
                    if (content.src === undefined || content.src === null || content.src === '') {
                        throw new Error('please enter the valid base64 string in image content...');
                    }
                    this.drawImage(template, content);
                    break;
                case 'Line':
                    this.drawLine(template, content);
                    break;
                default:
                    throw new Error('Please set valid content type...');
            }
        }
        return template;
    };
    PdfExport.prototype.processContentValidation = function (content) {
        if (content.type === undefined || content.type === null) {
            throw new Error('please set valid content type...');
        }
        else {
            if (content.type === 'Line') {
                if (content.points === undefined || content.points === null) {
                    throw new Error('please enter valid points in ' + content.type + ' content...');
                }
                else {
                    if (content.points.x1 === undefined || content.points.x1 === null || typeof content.points.x1 !== 'number') {
                        throw new Error('please enter valid x1 co-ordinate in ' + content.type + ' points...');
                    }
                    if (content.points.y1 === undefined || content.points.y1 === null || typeof content.points.y1 !== 'number') {
                        throw new Error('please enter valid y1 co-ordinate in ' + content.type + ' points...');
                    }
                    if (content.points.x2 === undefined || content.points.x2 === null || typeof content.points.x2 !== 'number') {
                        throw new Error('please enter valid x2 co-ordinate in ' + content.type + ' points...');
                    }
                    if (content.points.y2 === undefined || content.points.y2 === null || typeof content.points.y2 !== 'number') {
                        throw new Error('please enter valid y2 co-ordinate in ' + content.type + ' points...');
                    }
                }
            }
            else {
                if (content.position === undefined || content.position === null) {
                    throw new Error('please enter valid position in ' + content.type + ' content...');
                }
                else {
                    if (content.position.x === undefined || content.position.x === null || typeof content.position.x !== 'number') {
                        throw new Error('please enter valid x co-ordinate in ' + content.type + ' position...');
                    }
                    if (content.position.y === undefined || content.position.y === null || typeof content.position.y !== 'number') {
                        throw new Error('please enter valid y co-ordinate in ' + content.type + ' position...');
                    }
                }
            }
        }
    };
    /* tslint:disable-next-line:no-any */
    PdfExport.prototype.drawText = function (pageTemplate, content) {
        var font = this.getFont(content);
        var brush = this.getBrushFromContent(content);
        var pen = null;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.textPenColor)) {
            var penColor = this.hexToRgb(content.style.textPenColor);
            pen = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPen"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](penColor.r, penColor.g, penColor.b));
        }
        if (brush == null && pen == null) {
            brush = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](0, 0, 0));
        }
        var value = content.value.toString();
        var x = content.position.x * 0.75;
        var y = content.position.y * 0.75;
        var format;
        var result = this.setContentFormat(content, format);
        if (result !== null && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(result.format) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(result.size)) {
            pageTemplate.graphics.drawString(value, font, pen, brush, x, y, result.size.width, result.size.height, result.format);
        }
        else {
            pageTemplate.graphics.drawString(value, font, pen, brush, x, y, format);
        }
    };
    /* tslint:disable-next-line:no-any */
    PdfExport.prototype.drawPageNumber = function (documentHeader, content) {
        var font = this.getFont(content);
        var brush = null;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.textBrushColor)) {
            /* tslint:disable-next-line:max-line-length */
            var brushColor = this.hexToRgb(content.style.textBrushColor);
            brush = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](brushColor.r, brushColor.g, brushColor.b));
        }
        else {
            brush = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](0, 0, 0));
        }
        var pageNumber = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPageNumberField"](font, brush);
        pageNumber.numberStyle = this.getPageNumberStyle(content.pageNumberType);
        var compositeField;
        var format;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.format)) {
            if (content.format.indexOf('$total') !== -1 && content.format.indexOf('$current') !== -1) {
                var pageCount = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPageCountField"](font);
                if (content.format.indexOf('$total') > content.format.indexOf('$current')) {
                    format = content.format.replace('$current', '0');
                    format = format.replace('$total', '1');
                }
                else {
                    format = content.format.replace('$current', '1');
                    format = format.replace('$total', '0');
                }
                compositeField = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfCompositeField"](font, brush, format, pageNumber, pageCount);
            }
            else if (content.format.indexOf('$current') !== -1 && content.format.indexOf('$total') === -1) {
                format = content.format.replace('$current', '0');
                compositeField = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfCompositeField"](font, brush, format, pageNumber);
            }
            else {
                var pageCount = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPageCountField"](font);
                format = content.format.replace('$total', '0');
                compositeField = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfCompositeField"](font, brush, format, pageCount);
            }
        }
        else {
            format = '{0}';
            compositeField = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfCompositeField"](font, brush, format, pageNumber);
        }
        var x = content.position.x * 0.75;
        var y = content.position.y * 0.75;
        var result = this.setContentFormat(content, compositeField.stringFormat);
        if (result !== null && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(result.format) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(result.size)) {
            compositeField.stringFormat = result.format;
            compositeField.bounds = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](x, y, result.size.width, result.size.height);
        }
        compositeField.draw(documentHeader.graphics, x, y);
    };
    /* tslint:disable-next-line:no-any */
    PdfExport.prototype.drawImage = function (documentHeader, content) {
        var x = content.position.x * 0.75;
        var y = content.position.y * 0.75;
        var width = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.size)) ? (content.size.width * 0.75) : undefined;
        var height = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.size)) ? (content.size.height * 0.75) : undefined;
        var image = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfBitmap"](content.src);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(width)) {
            documentHeader.graphics.drawImage(image, x, y, width, height);
        }
        else {
            documentHeader.graphics.drawImage(image, x, y);
        }
    };
    /* tslint:disable-next-line:no-any */
    PdfExport.prototype.drawLine = function (documentHeader, content) {
        var x1 = content.points.x1 * 0.75;
        var y1 = content.points.y1 * 0.75;
        var x2 = content.points.x2 * 0.75;
        var y2 = content.points.y2 * 0.75;
        var pen = this.getPenFromContent(content);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style) && content.style !== null) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.penSize) && content.style.penSize !== null && typeof content.style.penSize === 'number') {
                pen.width = content.style.penSize * 0.75;
            }
            pen.dashStyle = this.getDashStyle(content.style.dashStyle);
        }
        documentHeader.graphics.drawLine(pen, x1, y1, x2, y2);
    };
    /* tslint:disable-next-line:no-any */ /* tslint:disable-next-line:max-line-length */
    PdfExport.prototype.processAggregates = function (sRows, pdfGrid, border, font, brush, backgroundBrush, isCaption, captionRow, groupIndex) {
        for (var _i = 0, sRows_1 = sRows; _i < sRows_1.length; _i++) {
            var row = sRows_1[_i];
            var startIndex = 0;
            var leastCaptionSummaryIndex = -1;
            var index = 0;
            var isEmpty = true;
            /* tslint:disable-next-line:no-any */
            var value = [];
            for (var i = 0; i < pdfGrid.columns.count; i++) {
                var cell = row.cells[index];
                if (cell.cellType === _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].DetailFooterIntent) {
                    i--;
                    index++;
                    continue;
                }
                if (!this.hideColumnInclude) {
                    while (cell.visible === undefined) {
                        if (cell.cellType === _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].DetailFooterIntent) {
                            continue;
                        }
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(captionRow)) {
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(captionRow.cells.getCell(i).value)) {
                                value.push('');
                                value.push(captionRow.cells.getCell(i).value);
                                isEmpty = false;
                                i += 1;
                            }
                            else {
                                value.push('');
                            }
                        }
                        else {
                            value.push('');
                        }
                        i += 1;
                        index = index + 1;
                        cell = row.cells[index];
                    }
                    while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(cell.visible) && !cell.visible) {
                        index = index + 1;
                        cell = row.cells[index];
                    }
                }
                if (cell.isDataCell) {
                    var templateFn = {};
                    /* tslint:disable-next-line:max-line-length */
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(cell.column.footerTemplate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(cell.column.groupCaptionTemplate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(cell.column.groupFooterTemplate)) {
                        /* tslint:disable-next-line:no-any */
                        var result = this.getTemplateFunction(templateFn, i, leastCaptionSummaryIndex, cell.column);
                        templateFn = result.templateFunction;
                        leastCaptionSummaryIndex = result.leastCaptionSummaryIndex;
                        /* tslint:disable-next-line:max-line-length */
                        var txt = (templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"], cell.cellType)](row.data[cell.column.field ? cell.column.field : cell.column.columnName]));
                        value.push(txt[0].textContent);
                        isEmpty = false;
                    }
                    else {
                        /* tslint:disable-next-line:no-any */
                        var result = this.getSummaryWithoutTemplate(row.data[cell.column.field]);
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(result)) {
                            value.push(result);
                        }
                    }
                }
                else {
                    value.push('');
                }
                if (isEmpty && value[i] !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(value[i]) && value[i] !== null) {
                    isEmpty = false;
                }
                index += 1;
            }
            if (!isEmpty) {
                if (!isCaption) {
                    var gridRow = pdfGrid.rows.addRow();
                    gridRow.style.setBorder(border);
                    gridRow.style.setFont(font);
                    gridRow.style.setTextBrush(brush);
                    gridRow.style.setBackgroundBrush(backgroundBrush);
                    for (var i = 0; i < pdfGrid.columns.count; i++) {
                        gridRow.cells.getCell(i).value = value[i].toString();
                    }
                }
                else {
                    for (var i = 0; i < pdfGrid.columns.count; i++) {
                        captionRow.cells.getCell(i).value = value[i].toString();
                        if (i === (groupIndex + 1) && leastCaptionSummaryIndex !== -1) {
                            captionRow.cells.getCell(i).columnSpan = leastCaptionSummaryIndex - (groupIndex + 1);
                        }
                        else if (i === (groupIndex + 1) && leastCaptionSummaryIndex === -1) {
                            captionRow.cells.getCell(i).columnSpan = pdfGrid.columns.count - (groupIndex + 1);
                        }
                    }
                }
            }
        }
    };
    /* tslint:disable-next-line:no-any */
    PdfExport.prototype.getTemplateFunction = function (templateFn, index, leastCaptionSummaryIndex, column) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(column.footerTemplate)) {
            templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"], _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].Summary)] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["compile"])(column.footerTemplate);
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(column.groupCaptionTemplate)) {
            if (leastCaptionSummaryIndex === -1) {
                leastCaptionSummaryIndex = index;
            }
            templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"], _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].CaptionSummary)] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["compile"])(column.groupCaptionTemplate);
        }
        else {
            templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"], _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].GroupSummary)] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["compile"])(column.groupFooterTemplate);
        }
        return { templateFunction: templateFn, leastCaptionSummaryIndex: leastCaptionSummaryIndex };
    };
    /* tslint:disable-next-line:no-any */
    PdfExport.prototype.getSummaryWithoutTemplate = function (data) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(data.Sum)) {
            return data.Sum;
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(data.Average)) {
            return data.Average;
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(data.Max)) {
            return data.Max;
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(data.Min)) {
            return data.Min;
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(data.Count)) {
            return data.Count;
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(data.TrueCount)) {
            return data.TrueCount;
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(data.FalseCount)) {
            return data.FalseCount;
        }
        else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(data.Custom)) {
            return data.Custom;
        }
    };
    /**
     * Set alignment, width and type of the values of the column
     */
    PdfExport.prototype.setColumnProperties = function (gridColumns, pdfGrid, helper, gObj) {
        var startIndex = gObj.groupSettings.columns.length;
        for (var i = 0; i < startIndex; i++) {
            pdfGrid.columns.getColumn(i).width = 20;
        }
        for (var i = 0; i < gridColumns.length; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(gridColumns[i].textAlign)) {
                pdfGrid.columns.getColumn(i + startIndex).format = this.getHorizontalAlignment(gridColumns[i].textAlign);
            }
            // Need to add width consideration with % value
            if (pdfGrid.style.allowHorizontalOverflow && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(gridColumns[i].width)) {
                pdfGrid.columns.getColumn(i + startIndex).width = typeof gridColumns[i].width === 'number' ?
                    gridColumns[i].width * 0.75 : helper.getConvertedWidth(gridColumns[i].width) * 0.75;
            }
        }
    };
    /**
     * set default style properties of each rows in exporting grid
     * @private
     */
    PdfExport.prototype.setRecordThemeStyle = function (row, border) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.record)) {
            var fontFamily = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.record.fontName) ?
                this.getFontFamily(this.gridTheme.record.fontName) : _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontFamily"].Helvetica;
            var fontSize = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.record.fontSize) ? this.gridTheme.record.fontSize : 9.75;
            var fontStyle = this.getFontStyle(this.gridTheme.record);
            var font = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStandardFont"](fontFamily, fontSize, fontStyle);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.record.font)) {
                font = this.gridTheme.record.font;
            }
            row.style.setFont(font);
            var pdfColor = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"]();
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(this.gridTheme.record.fontColor)) {
                var penBrushColor = this.hexToRgb(this.gridTheme.record.fontColor);
                pdfColor = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](penBrushColor.r, penBrushColor.g, penBrushColor.b);
            }
            row.style.setTextBrush(new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](pdfColor));
        }
        else {
            row.style.setTextBrush(new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](0, 0, 0)));
        }
        var borderRecord = this.gridTheme && this.gridTheme.record &&
            this.gridTheme.record.border ? this.getBorderStyle(this.gridTheme.record.border) : border;
        row.style.setBorder(borderRecord);
        return row;
    };
    /**
     * generate the formatted cell values
     * @private
     */
    PdfExport.prototype.processRecord = function (border, columns, gObj, dataSource, pdfGrid, startIndex, pdfExportProperties, helper, rowIndex) {
        var rows = helper.getGridRowModel(columns, dataSource, gObj, rowIndex);
        for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
            var row = rows_1[_i];
            rowIndex++;
            // create a new row and set default style properties
            var gridRow = this.setRecordThemeStyle(pdfGrid.rows.addRow(), border);
            var cellLength = row.cells.length;
            for (var j = 0; j < cellLength; j++) {
                var gridCell = row.cells[j];
                if (gridCell.cellType !== _base_enum__WEBPACK_IMPORTED_MODULE_6__["CellType"].Data) {
                    continue;
                }
                var column = gridCell.column;
                var field = column.field;
                var cellValue = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(field) ? column.valueAccessor(field, row.data, column) : '';
                var value = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(cellValue) ? cellValue : '';
                var foreignKeyData = void 0;
                if (column.isForeignColumn && column.isForeignColumn()) {
                    foreignKeyData = helper.getFData(value, column);
                    value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["getValue"])(column.foreignKeyValue, foreignKeyData);
                }
                var data = row.data;
                var cell = gridRow.cells.getCell(j);
                var args = {
                    data: data,
                    value: value,
                    column: column,
                    style: undefined,
                    colSpan: 1,
                    cell: cell
                };
                args.value = this.exportValueFormatter.formatCellValue(args);
                this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["pdfQueryCellInfo"], args);
                cell.value = args.value;
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style)) {
                    this.processCellStyle(cell, args);
                }
                if (args.colSpan > 1) {
                    if ((j + 1 + args.colSpan) > gridRow.cells.count) {
                        args.colSpan = gridRow.cells.count - (j + 1);
                    }
                    cell.columnSpan = args.colSpan;
                    for (var i = 1; i < cell.columnSpan; i++) {
                        var spanCell = gridRow.cells.getCell(j + i);
                        spanCell.value = '';
                    }
                    j += (args.colSpan - 1);
                }
            }
            if (row.isExpand) {
                var gridRow_1 = this.setRecordThemeStyle(pdfGrid.rows.addRow(), border);
                var cell = gridRow_1.cells.getCell(startIndex);
                cell.columnSpan = gridRow_1.cells.count - (startIndex);
                cell.style.cellPadding = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPaddings"](10, 10, 10, 10);
                gObj.isPrinting = true;
                var exportType = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(pdfExportProperties) && pdfExportProperties.exportType) ?
                    pdfExportProperties.exportType : 'AllPages';
                var returnValue = this.helper.createChildGrid(gObj, row, exportType, this.gridPool);
                var childGridObj = returnValue.childGrid;
                var element = returnValue.element;
                childGridObj.actionFailure =
                    helper.failureHandler(this.gridPool, childGridObj, this.globalResolve);
                var args = { childGrid: childGridObj, row: row, cell: cell, exportProperties: pdfExportProperties };
                this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_0__["exportDetailDataBound"], args);
                childGridObj.beforeDataBound = this.childGridCell(cell, childGridObj, pdfExportProperties);
                childGridObj.appendTo(element);
            }
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_0__["exportRowDataBound"], { type: 'pdf', rowObj: row });
        }
        return rowIndex;
    };
    PdfExport.prototype.childGridCell = function (cell, childGridObj, pdfExportProperties) {
        var _this = this;
        return function (result) {
            childGridObj.beforeDataBound = null;
            result.cancel = true;
            cell.value = _this.processGridExport(childGridObj, result, pdfExportProperties);
            childGridObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["detach"])(childGridObj.element);
            _this.gridPool[childGridObj.id] = true;
            _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);
            return cell;
        };
    };
    PdfExport.prototype.processCellStyle = function (cell, args) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.backgroundColor)) {
            var backColor = this.hexToRgb(args.style.backgroundColor);
            cell.style.backgroundBrush = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](backColor.r, backColor.g, backColor.b));
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.textAlignment)) {
            cell.style.stringFormat = this.getHorizontalAlignment(args.style.textAlignment);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.cellPadding)) {
            cell.style.cellPadding = args.style.cellPadding;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.verticalAlignment)) {
            cell.style.stringFormat = this.getVerticalAlignment(args.style.verticalAlignment, cell.style.stringFormat);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.textBrushColor)) {
            var textBrushColor = this.hexToRgb(args.style.textBrushColor);
            cell.style.textBrush = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](textBrushColor.r, textBrushColor.g, textBrushColor.b));
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.textPenColor)) {
            var textPenColor = this.hexToRgb(args.style.textPenColor);
            cell.style.textPen = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPen"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](textPenColor.r, textPenColor.g, textPenColor.b));
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.fontFamily) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.fontSize) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.bold) ||
            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.italic) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.underline) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.strikeout)) {
            cell.style.font = this.getFont(args);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.border)) {
            var border = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfBorders"]();
            var borderWidth = args.style.border.width;
            // set border width
            var width = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(borderWidth) && typeof borderWidth === 'number') ? (borderWidth * 0.75) : (undefined);
            // set border color
            var color = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](196, 196, 196);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.border.color)) {
                var borderColor = this.hexToRgb(args.style.border.color);
                color = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](borderColor.r, borderColor.g, borderColor.b);
            }
            var pen = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPen"](color, width);
            // set border dashStyle 'Solid <default>, Dash, Dot, DashDot, DashDotDot'
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.border.dashStyle)) {
                pen.dashStyle = this.getDashStyle(args.style.border.dashStyle);
            }
            border.all = pen;
            cell.style.borders = border;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(args.style.paragraphIndent)) {
            cell.style.stringFormat = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStringFormat"]();
            cell.style.stringFormat.paragraphIndent = args.style.paragraphIndent;
        }
    };
    /**
     * set text alignment of each columns in exporting grid
     * @private
     */
    PdfExport.prototype.getHorizontalAlignment = function (textAlign, format) {
        if (format === undefined) {
            format = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStringFormat"]();
        }
        switch (textAlign) {
            case 'Right':
                format.alignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Right;
                break;
            case 'Center':
                format.alignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Center;
                break;
            case 'Justify':
                format.alignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Justify;
                break;
            case 'Left':
                format.alignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Left;
                break;
        }
        return format;
    };
    /**
     * set vertical alignment of each columns in exporting grid
     * @private
     */
    PdfExport.prototype.getVerticalAlignment = function (verticalAlign, format, textAlign) {
        if (format === undefined) {
            format = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStringFormat"]();
            format = this.getHorizontalAlignment(textAlign, format);
        }
        switch (verticalAlign) {
            case 'Bottom':
                format.lineAlignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfVerticalAlignment"].Bottom;
                break;
            case 'Middle':
                format.lineAlignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfVerticalAlignment"].Middle;
                break;
            case 'Top':
                format.lineAlignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfVerticalAlignment"].Top;
                break;
        }
        return format;
    };
    PdfExport.prototype.getFontFamily = function (fontFamily) {
        switch (fontFamily) {
            case 'TimesRoman':
                return 2;
            case 'Courier':
                return 1;
            case 'Symbol':
                return 3;
            case 'ZapfDingbats':
                return 4;
            default:
                return 0;
        }
    };
    /* tslint:disable-next-line:no-any */
    PdfExport.prototype.getFont = function (content) {
        if (content.style.font) {
            return content.style.font;
        }
        var fontSize = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.fontSize)) ? (content.style.fontSize * 0.75) : 9.75;
        var fontFamily = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.fontFamily)) ?
            (this.getFontFamily(content.style.fontFamily)) : _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontFamily"].TimesRoman;
        var fontStyle = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Regular;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.bold) && content.style.bold) {
            fontStyle |= _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Bold;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.italic) && content.style.italic) {
            fontStyle |= _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Italic;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.underline) && content.style.underline) {
            fontStyle |= _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Underline;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.strikeout) && content.style.strikeout) {
            fontStyle |= _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Strikeout;
        }
        return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStandardFont"](fontFamily, fontSize, fontStyle);
    };
    PdfExport.prototype.getPageNumberStyle = function (pageNumberType) {
        switch (pageNumberType) {
            case 'LowerLatin':
                return 2;
            case 'LowerRoman':
                return 3;
            case 'UpperLatin':
                return 4;
            case 'UpperRoman':
                return 5;
            default:
                return 1;
        }
    };
    PdfExport.prototype.setContentFormat = function (content, format) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.size)) {
            var width = content.size.width * 0.75;
            var height = content.size.height * 0.75;
            format = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfStringFormat"](_syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Left, _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfVerticalAlignment"].Middle);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.hAlign)) {
                switch (content.style.hAlign) {
                    case 'Right':
                        format.alignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Right;
                        break;
                    case 'Center':
                        format.alignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Center;
                        break;
                    case 'Justify':
                        format.alignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Justify;
                        break;
                    default:
                        format.alignment = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfTextAlignment"].Left;
                }
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.vAlign)) {
                format = this.getVerticalAlignment(content.style.vAlign, format);
            }
            return { format: format, size: new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](width, height) };
        }
        return null;
    };
    PdfExport.prototype.getPageSize = function (pageSize) {
        switch (pageSize) {
            case 'Letter':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](612, 792);
            case 'Note':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](540, 720);
            case 'Legal':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](612, 1008);
            case 'A0':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](2380, 3368);
            case 'A1':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](1684, 2380);
            case 'A2':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](1190, 1684);
            case 'A3':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](842, 1190);
            case 'A5':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](421, 595);
            case 'A6':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](297, 421);
            case 'A7':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](210, 297);
            case 'A8':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](148, 210);
            case 'A9':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](105, 148);
            // case 'A10':
            //     return new SizeF(74, 105);
            case 'B0':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](2836, 4008);
            case 'B1':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](2004, 2836);
            case 'B2':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](1418, 2004);
            case 'B3':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](1002, 1418);
            case 'B4':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](709, 1002);
            case 'B5':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](501, 709);
            case 'Archa':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](648, 864);
            case 'Archb':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](864, 1296);
            case 'Archc':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](1296, 1728);
            case 'Archd':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](1728, 2592);
            case 'Arche':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](2592, 3456);
            case 'Flsa':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](612, 936);
            case 'HalfLetter':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](396, 612);
            case 'Letter11x17':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](792, 1224);
            case 'Ledger':
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](1224, 792);
            default:
                return new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["SizeF"](595, 842);
        }
    };
    PdfExport.prototype.getDashStyle = function (dashStyle) {
        switch (dashStyle) {
            case 'Dash':
                return 1;
            case 'Dot':
                return 2;
            case 'DashDot':
                return 3;
            case 'DashDotDot':
                return 4;
            default:
                return 0;
        }
    };
    PdfExport.prototype.getPenFromContent = function (content) {
        var pen = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPen"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](0, 0, 0));
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style) && content.style !== null && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.penColor)) {
            var penColor = this.hexToRgb(content.style.penColor);
            pen = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPen"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](penColor.r, penColor.g, penColor.b));
        }
        return pen;
    };
    PdfExport.prototype.getBrushFromContent = function (content) {
        var brush = null;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(content.style.textBrushColor)) {
            /* tslint:disable-next-line:max-line-length */
            var brushColor = this.hexToRgb(content.style.textBrushColor);
            brush = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](brushColor.r, brushColor.g, brushColor.b));
        }
        return brush;
    };
    PdfExport.prototype.hexToRgb = function (hex) {
        if (hex === null || hex === '' || hex.length !== 7) {
            throw new Error('please set valid hex value for color...');
        }
        hex = hex.substring(1);
        var bigint = parseInt(hex, 16);
        var r = (bigint >> 16) & 255;
        var g = (bigint >> 8) & 255;
        var b = bigint & 255;
        return { r: r, g: g, b: b };
    };
    PdfExport.prototype.getFontStyle = function (theme) {
        var fontStyle = _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Regular;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(theme) && theme.bold) {
            fontStyle |= _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Bold;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(theme) && theme.italic) {
            fontStyle |= _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Italic;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(theme) && theme.underline) {
            fontStyle |= _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Underline;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(theme) && theme.strikeout) {
            fontStyle |= _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfFontStyle"].Strikeout;
        }
        return fontStyle;
    };
    PdfExport.prototype.getBorderStyle = function (border) {
        var borders = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfBorders"]();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(border)) {
            var borderWidth = border.width;
            // set border width
            var width = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(borderWidth) && typeof borderWidth === 'number') ? borderWidth * 0.75 : undefined;
            // set border color
            var color = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](196, 196, 196);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(border.color)) {
                var borderColor = this.hexToRgb(border.color);
                color = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](borderColor.r, borderColor.g, borderColor.b);
            }
            var pen = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPen"](color, width);
            // set border dashStyle 'Solid <default>, Dash, Dot, DashDot, DashDotDot'
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_5__["isNullOrUndefined"])(border.dashStyle)) {
                pen.dashStyle = this.getDashStyle(border.dashStyle);
            }
            borders.all = pen;
        }
        else {
            borders.all = new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfPen"](new _syncfusion_ej2_pdf_export__WEBPACK_IMPORTED_MODULE_1__["PdfColor"](234, 234, 234));
        }
        return borders;
    };
    /**
     * To destroy the pdf export
     * @return {void}
     * @hidden
     */
    PdfExport.prototype.destroy = function () {
        //destroy for exporting
    };
    return PdfExport;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/print.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/print.js ***!
  \**********************************************************************/
/*! exports provided: getCloneProperties, Print */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCloneProperties", function() { return getCloneProperties; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Print", function() { return Print; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/grid */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");





/**
 * @hidden
 */
function getCloneProperties() {
    return ['aggregates', 'allowGrouping', 'allowFiltering', 'allowMultiSorting', 'allowReordering', 'allowSorting',
        'allowTextWrap', 'childGrid', 'columns', 'currentViewData', 'dataSource', 'detailTemplate', 'enableAltRow',
        'enableColumnVirtualization', 'filterSettings', 'gridLines',
        'groupSettings', 'height', 'locale', 'pageSettings', 'printMode', 'query', 'queryString', 'enableRtl',
        'rowHeight', 'rowTemplate', 'sortSettings', 'textWrapSettings', 'allowPaging', 'hierarchyPrintMode', 'searchSettings'];
}
/**
 *
 * The `Print` module is used to handle print action.
 */
var Print = /** @class */ (function () {
    /**
     * Constructor for the Grid print module
     * @hidden
     */
    function Print(parent, scrollModule) {
        this.isAsyncPrint = false;
        this.defered = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Deferred"]();
        this.parent = parent;
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], this.isContentReady(), this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionBegin"], this.actionBegin.bind(this));
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["onEmpty"], this.onEmpty.bind(this));
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["hierarchyPrint"], this.hierarchyPrint, this);
        this.scrollModule = scrollModule;
    }
    Print.prototype.isContentReady = function () {
        var _this = this;
        if (this.isPrintGrid() && (this.parent.hierarchyPrintMode === 'None' || !this.parent.childGrid)) {
            return this.contentReady;
        }
        return function () {
            _this.defered.promise.then(function () {
                _this.contentReady();
            });
            if (_this.isPrintGrid()) {
                _this.hierarchyPrint();
            }
        };
    };
    Print.prototype.hierarchyPrint = function () {
        this.removeColGroup(this.parent);
        var printGridObj = window.printGridObj;
        if (printGridObj && !printGridObj.element.querySelector('[aria-busy=true')) {
            printGridObj.printModule.defered.resolve();
        }
    };
    /**
     * By default, prints all the Grid pages and hides the pager.
     * > You can customize print options using the
     * [`printMode`](grid/#printmode-string/).
     * @return {void}
     */
    Print.prototype.print = function () {
        this.renderPrintGrid();
        this.printWind = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
        this.printWind.moveTo(0, 0);
        this.printWind.resizeTo(screen.availWidth, screen.availHeight);
    };
    Print.prototype.onEmpty = function () {
        if (this.isPrintGrid()) {
            this.contentReady();
        }
    };
    Print.prototype.actionBegin = function () {
        if (this.isPrintGrid()) {
            this.isAsyncPrint = true;
        }
    };
    Print.prototype.renderPrintGrid = function () {
        var gObj = this.parent;
        var element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            id: this.parent.element.id + '_print', className: gObj.element.className + ' e-print-grid'
        });
        document.body.appendChild(element);
        var printGrid = new _base_grid__WEBPACK_IMPORTED_MODULE_2__["Grid"](Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getPrintGridModel"])(gObj, gObj.hierarchyPrintMode));
        printGrid.query = gObj.getQuery().clone();
        window.printGridObj = printGrid;
        printGrid.isPrinting = true;
        var modules = printGrid.getInjectedModules();
        var injectedModues = gObj.getInjectedModules();
        if (!modules || modules.length !== injectedModues.length) {
            printGrid.setInjectedModules(injectedModues);
        }
        gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["printGridInit"], { element: element, printgrid: printGrid });
        this.parent.log('exporting_begin', this.getModuleName());
        printGrid.appendTo(element);
        printGrid.registeredTemplate = this.parent.registeredTemplate;
        printGrid.trigger = gObj.trigger;
    };
    Print.prototype.contentReady = function () {
        if (this.isPrintGrid()) {
            var gObj = this.parent;
            if (this.isAsyncPrint) {
                this.printGrid();
                return;
            }
            var args = {
                requestType: 'print',
                element: gObj.element,
                selectedRows: gObj.getContentTable().querySelectorAll('tr[aria-selected="true"]'),
                cancel: false,
                hierarchyPrintMode: gObj.hierarchyPrintMode
            };
            if (!this.isAsyncPrint) {
                gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforePrint"], args);
            }
            if (args.cancel) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(gObj.element);
                return;
            }
            if (!this.isAsyncPrint) {
                this.printGrid();
            }
        }
    };
    Print.prototype.printGrid = function () {
        var gObj = this.parent;
        // Height adjustment on print grid
        if (gObj.height !== 'auto') { // if scroller enabled
            var cssProps = this.scrollModule.getCssProperties();
            var contentDiv = gObj.element.querySelector('.e-content');
            var headerDiv = gObj.element.querySelector('.e-gridheader');
            contentDiv.style.height = 'auto';
            contentDiv.style.overflowY = 'auto';
            headerDiv.style[cssProps.padding] = '';
            headerDiv.firstElementChild.style[cssProps.border] = '';
        }
        // Grid alignment adjustment on grouping
        if (gObj.allowGrouping) {
            if (!gObj.groupSettings.columns.length) {
                gObj.element.querySelector('.e-groupdroparea').style.display = 'none';
            }
            else {
                this.removeColGroup(gObj);
            }
        }
        // hide horizontal scroll
        for (var _i = 0, _a = [].slice.call(gObj.element.querySelectorAll('.e-content')); _i < _a.length; _i++) {
            var element = _a[_i];
            element.style.overflowX = 'hidden';
        }
        // Hide the waiting popup
        var waitingPop = gObj.element.querySelectorAll('.e-spin-show');
        for (var _b = 0, _c = [].slice.call(waitingPop); _b < _c.length; _b++) {
            var element = _c[_b];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(element, ['e-spin-hide'], ['e-spin-show']);
        }
        this.printGridElement(gObj);
        gObj.isPrinting = false;
        delete window.printGridObj;
        var args = {
            element: gObj.element
        };
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["printComplete"], args);
        this.parent.log('exporting_complete', this.getModuleName());
    };
    Print.prototype.printGridElement = function (gObj) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(gObj.element, ['e-print-grid-layout'], ['e-print-grid']);
        if (gObj.isPrinting) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(gObj.element);
        }
        this.printWind = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["print"])(gObj.element, this.printWind);
    };
    Print.prototype.removeColGroup = function (gObj) {
        var depth = gObj.groupSettings.columns.length;
        var element = gObj.element;
        var id = '#' + gObj.element.id;
        if (!depth) {
            return;
        }
        var groupCaption = element.querySelectorAll(id + "captioncell.e-groupcaption");
        var colSpan = groupCaption[depth - 1].getAttribute('colspan');
        for (var i = 0; i < groupCaption.length; i++) {
            groupCaption[i].setAttribute('colspan', colSpan);
        }
        var colGroups = element.querySelectorAll("colgroup" + id + "colGroup");
        for (var i = 0; i < colGroups.length; i++) {
            for (var j = 0; j < depth; j++) {
                colGroups[i].childNodes[j].style.display = 'none';
            }
        }
    };
    Print.prototype.isPrintGrid = function () {
        return this.parent.element.id.indexOf('_print') > 0 && this.parent.isPrinting;
    };
    /**
     * To destroy the print
     * @return {void}
     * @hidden
     */
    Print.prototype.destroy = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], this.contentReady.bind(this));
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionBegin"], this.actionBegin.bind(this));
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["onEmpty"], this.onEmpty.bind(this));
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["hierarchyPrint"], this.hierarchyPrint);
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Print.prototype.getModuleName = function () {
        return 'print';
    };
    Print.printGridProp = getCloneProperties().concat([_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforePrint"], _base_constant__WEBPACK_IMPORTED_MODULE_3__["printComplete"]]);
    return Print;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/reorder.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/reorder.js ***!
  \************************************************************************/
/*! exports provided: Reorder */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Reorder", function() { return Reorder; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");




/**
 *
 * The `Reorder` module is used for reordering columns.
 */
var Reorder = /** @class */ (function () {
    /**
     * Constructor for the Grid reorder module
     * @hidden
     */
    function Reorder(parent) {
        this.parent = parent;
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerDrop"], this.headerDrop, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRender, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["reorderComplete"], this.onActionComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrag"], this.drag, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDragStart"], this.dragStart, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDragStop"], this.dragStop, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerDrop"], this.headerDrop, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.createReorderElement, this);
    }
    Reorder.prototype.chkDropPosition = function (srcElem, destElem) {
        var col = this.parent.getColumnByUid(destElem.firstElementChild.getAttribute('e-mappinguid'));
        var bool = col ? !col.lockColumn : true;
        return (srcElem.parentElement.isEqualNode(destElem.parentElement) || (this.parent.getFrozenColumns()
            && Array.prototype.indexOf.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(srcElem, 'thead').children, srcElem.parentElement)
                === Array.prototype.indexOf.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(destElem, 'thead').children, destElem.parentElement)))
            && this.targetParentContainerIndex(srcElem, destElem) > -1 && bool;
    };
    Reorder.prototype.chkDropAllCols = function (srcElem, destElem) {
        var isFound;
        var headers = this.getHeaderCells();
        var header;
        while (!isFound && headers.length > 0) {
            header = headers.pop();
            isFound = srcElem !== header && this.targetParentContainerIndex(srcElem, destElem) > -1;
        }
        return isFound;
    };
    Reorder.prototype.findColParent = function (col, cols, parent) {
        parent = parent;
        for (var i = 0, len = cols.length; i < len; i++) {
            if (col === cols[i]) {
                return true;
            }
            else if (cols[i].columns) {
                var cnt = parent.length;
                parent.push(cols[i]);
                if (!this.findColParent(col, cols[i].columns, parent)) {
                    parent.splice(cnt, parent.length - cnt);
                }
                else {
                    return true;
                }
            }
        }
        return false;
    };
    Reorder.prototype.getColumnsModel = function (cols) {
        var columnModel = [];
        var subCols = [];
        for (var i = 0, len = cols.length; i < len; i++) {
            columnModel.push(cols[i]);
            if (cols[i].columns) {
                subCols = subCols.concat(cols[i].columns);
            }
        }
        if (subCols.length) {
            columnModel = columnModel.concat(this.getColumnsModel(subCols));
        }
        return columnModel;
    };
    Reorder.prototype.headerDrop = function (e) {
        var gObj = this.parent;
        var dropElement = this.element.querySelector('.e-headercelldiv') || this.element.querySelector('.e-stackedheadercelldiv');
        var uId = dropElement.getAttribute('e-mappinguid');
        var column = gObj.getColumnByUid(uId);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'th') || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && (!column.allowReordering || column.lockColumn))) {
            this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), column: column });
            return;
        }
        var destElem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-headercell');
        var destElemDiv = destElem.querySelector('.e-headercelldiv') || destElem.querySelector('.e-stackedheadercelldiv');
        var destElemUid = destElemDiv.getAttribute('e-mappinguid');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(destElemUid)) {
            var destColumn = gObj.getColumnByUid(destElemUid);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(destColumn) || !destColumn.allowReordering || destColumn.lockColumn) {
                this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), column: column, destColumn: destColumn });
                return;
            }
        }
        if (destElem && !(!this.chkDropPosition(this.element, destElem) || !this.chkDropAllCols(this.element, destElem))) {
            if (this.parent.enableColumnVirtualization) {
                var columns = this.parent.columns;
                var sourceUid_1 = this.element.querySelector('.e-headercelldiv').getAttribute('e-mappinguid');
                var col = this.parent.getColumns(true).filter(function (col) { return col.uid === sourceUid_1; });
                var colMatchIndex_1 = null;
                var column_1 = col[0];
                var destUid_1 = destElem.querySelector('.e-headercelldiv').getAttribute('e-mappinguid');
                var bool = columns.some(function (col, index) {
                    if (col.uid === destUid_1) {
                        colMatchIndex_1 = index;
                        return col.uid === destUid_1;
                    }
                    return false;
                });
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(colMatchIndex_1)) {
                    this.moveColumns(colMatchIndex_1, column_1);
                }
            }
            else {
                var newIndex = this.targetParentContainerIndex(this.element, destElem);
                var uid = this.element.firstElementChild.getAttribute('e-mappinguid');
                this.destElement = destElem;
                if (uid) {
                    this.moveColumns(newIndex, this.parent.getColumnByUid(uid));
                }
                else {
                    var headers = this.getHeaderCells();
                    var oldIdx = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getElementIndex"])(this.element, headers);
                    var columns = this.getColumnsModel(this.parent.columns);
                    var column_2 = columns[oldIdx];
                    this.moveColumns(newIndex, column_2);
                }
            }
        }
    };
    Reorder.prototype.isActionPrevent = function (gObj) {
        return Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(gObj);
    };
    Reorder.prototype.moveColumns = function (destIndex, column, reorderByColumn) {
        var gObj = this.parent;
        if (this.isActionPrevent(gObj)) {
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["preventBatch"], { instance: this, handler: this.moveColumns, arg1: destIndex, arg2: column });
            return;
        }
        var parent = this.getColParent(column, this.parent.columns);
        var cols = parent ? parent.columns : this.parent.columns;
        var srcIdx = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["inArray"])(column, cols);
        if (((this.parent.getFrozenColumns() && parent) || this.parent.lockcolPositionCount) && !reorderByColumn) {
            for (var i = 0; i < cols.length; i++) {
                if (cols[i].field === column.field) {
                    srcIdx = i;
                    break;
                }
            }
            var col = this.parent.getColumnByUid(this.destElement.firstElementChild.getAttribute('e-mappinguid'));
            if (col) {
                for (var i = 0; i < cols.length; i++) {
                    if (cols[i].field === col.field) {
                        destIndex = i;
                        break;
                    }
                }
            }
            else {
                for (var i = 0; i < cols.length; i++) {
                    if (cols[i].headerText === this.destElement.innerText.trim()) {
                        destIndex = i;
                    }
                }
            }
        }
        if (!gObj.allowReordering || srcIdx === destIndex || srcIdx === -1 || destIndex === -1) {
            return;
        }
        cols.splice(destIndex, 0, cols.splice(srcIdx, 1)[0]);
        gObj.getColumns(true);
        gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnPositionChanged"], { fromIndex: destIndex, toIndex: srcIdx });
        gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], {
            type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], requestType: 'reorder'
        });
    };
    Reorder.prototype.targetParentContainerIndex = function (srcElem, destElem) {
        var headers = this.getHeaderCells();
        var cols = this.parent.columns;
        var flatColumns = this.getColumnsModel(cols);
        var parent = this.getColParent(flatColumns[Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getElementIndex"])(srcElem, headers)], cols);
        cols = parent ? parent.columns : cols;
        return Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["inArray"])(flatColumns[Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getElementIndex"])(destElem, headers)], cols);
    };
    Reorder.prototype.getHeaderCells = function () {
        var frozenColumns = this.parent.getFrozenColumns();
        if (frozenColumns || this.parent.lockcolPositionCount) {
            var fTh = void 0;
            var mTh = void 0;
            var fHeaders = [];
            var fRows = [].slice.call(this.parent.getHeaderTable().querySelectorAll('.e-columnheader'));
            if (frozenColumns) {
                var mRows = [].slice.call(this.parent.getHeaderContent()
                    .querySelector('.e-movableheader').querySelectorAll('.e-columnheader'));
                for (var i = 0; i < fRows.length; i++) {
                    fTh = [].slice.call(fRows[i].getElementsByClassName('e-headercell'));
                    mTh = [].slice.call(mRows[i].getElementsByClassName('e-headercell'));
                    var isAvail = void 0;
                    for (var k = 0; k < fTh.length; k++) {
                        for (var j = 0; j < mTh.length; j++) {
                            if (mTh[j].innerText === fTh[k].innerText) {
                                isAvail = true;
                                break;
                            }
                        }
                        if (!isAvail) {
                            fHeaders = fHeaders.concat([fTh[k]]);
                        }
                    }
                    for (var j = 0; j < mTh.length; j++) {
                        fHeaders.push(mTh[j]);
                    }
                }
            }
            else {
                for (var i = 0; i < fRows.length; i++) {
                    mTh = [].slice.call(fRows[i].getElementsByClassName('e-headercell'));
                    for (var k = 0; k < mTh.length; k++) {
                        var isAvail = void 0;
                        for (var j = k + 1; j < mTh.length; j++) {
                            if (mTh[j].innerText === mTh[k].innerText) {
                                isAvail = true;
                                break;
                            }
                        }
                        if (!isAvail) {
                            fHeaders = fHeaders.concat([mTh[k]]);
                        }
                    }
                }
            }
            return fHeaders;
        }
        else {
            return [].slice.call(this.parent.element.getElementsByClassName('e-headercell'));
        }
    };
    Reorder.prototype.getColParent = function (column, columns) {
        var parents = [];
        this.findColParent(column, columns, parents);
        return parents[parents.length - 1];
    };
    Reorder.prototype.reorderSingleColumn = function (fromFName, toFName) {
        var fColumn = this.parent.getColumnByField(fromFName);
        var toColumn = this.parent.getColumnByField(toFName);
        if ((!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fColumn) && (!fColumn.allowReordering || fColumn.lockColumn)) ||
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(toColumn) && (!toColumn.allowReordering || fColumn.lockColumn))) {
            this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), column: fColumn, destColumn: toColumn });
            return;
        }
        var column = this.parent.getColumnByField(toFName);
        var parent = this.getColParent(column, this.parent.columns);
        var columns = parent ? parent.columns : this.parent.columns;
        var destIndex = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["inArray"])(column, columns);
        if (destIndex > -1) {
            this.moveColumns(destIndex, this.parent.getColumnByField(fromFName), true);
        }
    };
    Reorder.prototype.reorderMultipleColumns = function (fromFNames, toFName) {
        var toIndex = this.parent.getColumnIndexByField(toFName);
        var toColumn = this.parent.getColumnByField(toFName);
        if (toIndex < 0 || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(toColumn) && (!toColumn.allowReordering || toColumn.lockColumn))) {
            return;
        }
        for (var i = 0; i < fromFNames.length; i++) {
            var column = this.parent.getColumnByField(fromFNames[i]);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column) && (!column.allowReordering || column.lockColumn)) {
                return;
            }
        }
        for (var i = 0; i < fromFNames.length; i++) {
            var column = this.parent.getColumnByIndex(toIndex);
            var parent_1 = this.getColParent(column, this.parent.columns);
            var columns = parent_1 ? parent_1.columns : this.parent.columns;
            var destIndex = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["inArray"])(column, columns);
            if (destIndex > -1) {
                this.moveColumns(destIndex, this.parent.getColumnByField(fromFNames[i]), true);
            }
            if (this.parent.getColumnIndexByField(fromFNames[i + 1]) >= destIndex) {
                toIndex++; //R to L
            }
        }
    };
    Reorder.prototype.moveTargetColumn = function (column, toIndex) {
        if (toIndex > -1) {
            this.moveColumns(toIndex, column, true);
        }
    };
    Reorder.prototype.reorderSingleColumnByTarget = function (fieldName, toIndex) {
        var column = this.parent.getColumnByField(fieldName);
        this.moveTargetColumn(column, toIndex);
    };
    Reorder.prototype.reorderMultipleColumnByTarget = function (fieldName, toIndex) {
        for (var i = 0; i < fieldName.length; i++) {
            this.reorderSingleColumnByTarget(fieldName[i], toIndex);
        }
    };
    /**
     * Changes the position of the Grid columns by field names.
     * @param  {string | string[]} fromFName - Defines the origin field names.
     * @param  {string} toFName - Defines the destination field name.
     * @return {void}
     */
    Reorder.prototype.reorderColumns = function (fromFName, toFName) {
        typeof fromFName === 'string' ? this.reorderSingleColumn(fromFName, toFName) : this.reorderMultipleColumns(fromFName, toFName);
    };
    /**
     * Changes the position of the Grid columns by field index.
     * @param  {number} fromIndex - Defines the origin field index.
     * @param  {number} toIndex - Defines the destination field index.
     * @return {void}
     */
    Reorder.prototype.reorderColumnByIndex = function (fromIndex, toIndex) {
        var column = this.parent.getColumnByIndex(fromIndex);
        this.moveTargetColumn(column, toIndex);
    };
    /**
     * Changes the position of the Grid columns by field index.
     * @param  {string | string[]} fieldName - Defines the field name.
     * @param  {number} toIndex - Defines the destination field index.
     * @return {void}
     */
    Reorder.prototype.reorderColumnByTargetIndex = function (fieldName, toIndex) {
        typeof fieldName === 'string' ? this.reorderSingleColumnByTarget(fieldName, toIndex) :
            this.reorderMultipleColumnByTarget(fieldName, toIndex);
    };
    Reorder.prototype.enableAfterRender = function (e) {
        if (e.module === this.getModuleName() && e.enable) {
            this.createReorderElement();
        }
    };
    Reorder.prototype.createReorderElement = function () {
        var header = this.parent.element.querySelector('.e-headercontent');
        this.upArrow = header.appendChild(this.parent
            .createElement('div', { className: 'e-icons e-icon-reorderuparrow e-reorderuparrow', attrs: { style: 'display:none' } }));
        this.downArrow = header.appendChild(this.parent
            .createElement('div', { className: 'e-icons e-icon-reorderdownarrow e-reorderdownarrow', attrs: { style: 'display:none' } }));
    };
    /**
     * The function used to trigger onActionComplete
     * @return {void}
     * @hidden
     */
    Reorder.prototype.onActionComplete = function (e) {
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(e, { type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"] }));
    };
    /**
     * To destroy the reorder
     * @return {void}
     * @hidden
     */
    Reorder.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (this.parent.isDestroyed || !gridElement || (!gridElement.querySelector('.e-gridheader') &&
            !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.upArrow);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.downArrow);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerDrop"], this.headerDrop);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRender);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["reorderComplete"], this.onActionComplete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrag"], this.drag);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDragStart"], this.dragStart);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDragStop"], this.dragStop);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.createReorderElement);
        //call ejdrag and drop destroy
    };
    Reorder.prototype.drag = function (e) {
        var gObj = this.parent;
        var target = e.target;
        if (!e.column.allowReordering || e.column.lockColumn) {
            return;
        }
        var closest = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-headercell:not(.e-stackedHeaderCell)');
        var cloneElement = gObj.element.querySelector('.e-cloneproperties');
        var isLeft = this.x > Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getPosition"])(e.event).x + gObj.getContent().firstElementChild.scrollLeft;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(gObj.getHeaderTable().querySelectorAll('.e-reorderindicate'), ['e-reorderindicate']);
        this.setDisplay('none');
        this.stopTimer();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-defaultcur'], ['e-notallowedcur']);
        this.updateScrollPostion(e.event);
        if (closest && !closest.isEqualNode(this.element)) {
            target = closest;
            //consider stacked, detail header cell 
            if (!(!this.chkDropPosition(this.element, target) || !this.chkDropAllCols(this.element, target))) {
                this.updateArrowPosition(target, isLeft);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(target, ['e-allowDrop', 'e-reorderindicate'], []);
            }
            else if (!(gObj.allowGrouping && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.target, 'e-groupdroparea'))) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);
            }
        }
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrag"], { target: target, draggableType: 'headercell', column: e.column });
    };
    Reorder.prototype.updateScrollPostion = function (e) {
        var _this = this;
        var frzCols = this.parent.getFrozenColumns();
        var x = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getPosition"])(e).x;
        var cliRect = this.parent.element.getBoundingClientRect();
        var cliRectBaseLeft = frzCols ? this.parent.element.querySelector('.e-movableheader')
            .getBoundingClientRect().left : cliRect.left;
        var cliRectBaseRight = cliRect.right;
        var scrollElem = frzCols ? this.parent.getContent().querySelector('.e-movablecontent')
            : this.parent.getContent().firstElementChild;
        if (x > cliRectBaseLeft && x < cliRectBaseLeft + 35) {
            this.timer = window.setInterval(function () { _this.setScrollLeft(scrollElem, true); }, 50);
        }
        else if (x < cliRectBaseRight && x > cliRectBaseRight - 35) {
            this.timer = window.setInterval(function () { _this.setScrollLeft(scrollElem, false); }, 50);
        }
    };
    Reorder.prototype.setScrollLeft = function (scrollElem, isLeft) {
        var scrollLeft = scrollElem.scrollLeft;
        scrollElem.scrollLeft = scrollElem.scrollLeft + (isLeft ? -5 : 5);
        if (scrollLeft !== scrollElem.scrollLeft) {
            this.setDisplay('none');
        }
    };
    Reorder.prototype.stopTimer = function () {
        window.clearInterval(this.timer);
    };
    Reorder.prototype.updateArrowPosition = function (target, isLeft) {
        var cliRect = target.getBoundingClientRect();
        var cliRectBase = this.parent.element.getBoundingClientRect();
        if ((isLeft && cliRect.left < cliRectBase.left) || (!isLeft && cliRect.right > cliRectBase.right)) {
            return;
        }
        this.upArrow.style.top = cliRect.top + cliRect.height - cliRectBase.top + 'px';
        this.downArrow.style.top = cliRect.top - cliRectBase.top - 4 + 'px';
        this.upArrow.style.left = this.downArrow.style.left = (isLeft ? cliRect.left : cliRect.right) - cliRectBase.left - 4 + 'px';
        this.setDisplay('');
    };
    Reorder.prototype.dragStart = function (e) {
        var gObj = this.parent;
        var target = e.target;
        this.element = target.classList.contains('e-headercell') ? target :
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-headercell');
        if (!e.column.allowReordering || e.column.lockColumn) {
            return;
        }
        this.x = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getPosition"])(e.event).x + gObj.getContent().firstElementChild.scrollLeft;
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDragStart"], {
            target: target, draggableType: 'headercell', column: e.column
        });
    };
    Reorder.prototype.dragStop = function (e) {
        var gObj = this.parent;
        this.setDisplay('none');
        this.stopTimer();
        if (!e.cancel) {
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrop"], { target: e.target, draggableType: 'headercell', column: e.column });
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(gObj.getHeaderTable().querySelectorAll('.e-reorderindicate'), ['e-reorderindicate']);
    };
    Reorder.prototype.setDisplay = function (display) {
        this.upArrow.style.display = display;
        this.downArrow.style.display = display;
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Reorder.prototype.getModuleName = function () {
        return 'reorder';
    };
    return Reorder;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/resize.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/resize.js ***!
  \***********************************************************************/
/*! exports provided: resizeClassList, Resize */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resizeClassList", function() { return resizeClassList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Resize", function() { return Resize; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _models_column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../models/column */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js");
/* harmony import */ var _services_width_controller__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/width-controller */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/width-controller.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");






var resizeClassList = {
    root: 'e-rhandler',
    suppress: 'e-rsuppress',
    icon: 'e-ricon',
    helper: 'e-rhelper',
    header: 'th.e-headercell',
    cursor: 'e-rcursor'
};
/**
 * `Resize` module is used to handle Resize to fit for columns.
 * @hidden
 * @private
 */
var Resize = /** @class */ (function () {
    /**
     * Constructor for the Grid resize module
     * @hidden
     */
    function Resize(parent) {
        this.tapped = false;
        this.isDblClk = true;
        this.parent = parent;
        if (this.parent.isDestroyed) {
            return;
        }
        this.widthService = new _services_width_controller__WEBPACK_IMPORTED_MODULE_2__["ColumnWidthService"](parent);
        this.addEventListener();
    }
    /**
     * Resize by field names.
     * @param  {string|string[]} fName - Defines the field name.
     * @return {void}
     */
    Resize.prototype.autoFitColumns = function (fName) {
        var columnName = (fName === undefined || fName === null || fName.length <= 0) ?
            this.parent.getColumns().map(function (x) { return x.field; }) : (typeof fName === 'string') ? [fName] : fName;
        this.findColumn(columnName);
    };
    /* tslint:disable-next-line:max-func-body-length */
    Resize.prototype.resizeColumn = function (fName, index, id) {
        var gObj = this.parent;
        var tWidth = 0;
        var headerTable;
        var contentTable;
        var footerTable;
        var headerDivTag = 'e-gridheader';
        var contentDivTag = 'e-gridcontent';
        var footerDivTag = 'e-gridfooter';
        var indentWidth = 0;
        var uid = id ? id : this.parent.getUidByColumnField(fName);
        var columnIndex = this.parent.getNormalizedColumnIndex(uid);
        var headerTextClone;
        var contentTextClone;
        var footerTextClone;
        var frzCols = gObj.getFrozenColumns();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(gObj.getFooterContent())) {
            footerTable = gObj.getFooterContentTable();
        }
        if (frzCols) {
            if (index < frzCols) {
                headerTable = gObj.getHeaderTable();
                contentTable = gObj.getContentTable();
                headerTextClone = headerTable.querySelector('[e-mappinguid="' + uid + '"]').parentElement.cloneNode(true);
                contentTextClone = contentTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + ")");
                if (footerTable) {
                    footerTextClone = footerTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + ")");
                }
            }
            else {
                headerTable = gObj.getHeaderContent().querySelector('.e-movableheader').children[0];
                contentTable = gObj.getContent().querySelector('.e-movablecontent').children[0];
                headerTextClone = headerTable.querySelector('[e-mappinguid="' + uid + '"]').parentElement.cloneNode(true);
                contentTextClone = contentTable.querySelectorAll("td:nth-child(" + ((columnIndex - frzCols) + 1) + ")");
                if (footerTable) {
                    footerTable = gObj.getFooterContent().querySelector('.e-movablefootercontent').children[0];
                    footerTextClone = footerTable.querySelectorAll("td:nth-child(" + ((columnIndex - frzCols) + 1) + ")");
                }
            }
        }
        else {
            headerTable = gObj.getHeaderTable();
            contentTable = gObj.getContentTable();
            headerTextClone = headerTable.querySelector('[e-mappinguid="' + uid + '"]').parentElement.cloneNode(true);
            contentTextClone = contentTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + "):not(.e-groupcaption)");
            if (footerTable) {
                footerTextClone = footerTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + "):not(.e-groupcaption)");
            }
        }
        var indentWidthClone = headerTable.querySelector('tr').querySelectorAll('.e-grouptopleftcell');
        if (indentWidthClone.length > 0) {
            for (var i = 0; i < indentWidthClone.length; i++) {
                indentWidth += indentWidthClone[i].offsetWidth;
            }
        }
        var detailsElement = contentTable.querySelector('.e-detailrowcollapse') ||
            contentTable.querySelector('.e-detailrowexpand');
        if ((this.parent.detailTemplate || this.parent.childGrid) && detailsElement) {
            indentWidth += detailsElement.offsetWidth;
        }
        var headerText = [headerTextClone];
        var contentText = [];
        var footerText = [];
        if (footerTable) {
            for (var i = 0; i < footerTextClone.length; i++) {
                footerText[i] = footerTextClone[i].cloneNode(true);
            }
        }
        for (var i = 0; i < contentTextClone.length; i++) {
            contentText[i] = contentTextClone[i].cloneNode(true);
        }
        var wHeader = this.createTable(headerTable, headerText, headerDivTag);
        var wContent = this.createTable(contentTable, contentText, contentDivTag);
        var wFooter = null;
        if (footerText.length) {
            wFooter = this.createTable(footerTable, footerText, footerDivTag);
        }
        var columnbyindex = gObj.getColumns()[index];
        var result;
        var width = columnbyindex.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(Math.max(wHeader, wContent, wFooter));
        this.widthService.setColumnWidth(gObj.getColumns()[index]);
        result = gObj.getColumns().some(function (x) { return x.width === null || x.width === undefined || x.width.length <= 0; });
        if (result === false) {
            gObj.getColumns().forEach(function (element) {
                if (element.visible) {
                    tWidth = tWidth + parseFloat(element.width);
                }
            });
        }
        var calcTableWidth = tWidth + indentWidth;
        if (tWidth > 0 && !gObj.getFrozenColumns()) {
            if (this.parent.detailTemplate || this.parent.childGrid) {
                this.widthService.setColumnWidth(new _models_column__WEBPACK_IMPORTED_MODULE_1__["Column"]({ width: '30px' }));
            }
            headerTable.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(calcTableWidth);
            contentTable.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(calcTableWidth);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(footerTable)) {
                footerTable.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(calcTableWidth);
            }
        }
        var tableWidth = headerTable.offsetWidth;
        var contentwidth = (gObj.getContent().scrollWidth);
        if (contentwidth > tableWidth) {
            headerTable.classList.add('e-tableborder');
            contentTable.classList.add('e-tableborder');
        }
        else {
            headerTable.classList.remove('e-tableborder');
            contentTable.classList.remove('e-tableborder');
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(footerTable)) {
            footerTable.classList.add('e-tableborder');
        }
    };
    /**
     * To destroy the resize
     * @return {void}
     * @hidden
     */
    Resize.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        this.widthService = null;
        this.unwireEvents();
        this.removeEventListener();
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Resize.prototype.getModuleName = function () {
        return 'resize';
    };
    Resize.prototype.findColumn = function (fName) {
        var _this = this;
        fName.forEach(function (element) {
            var fieldName = element;
            var columnIndex = _this.parent.getColumnIndexByField(fieldName);
            if (_this.parent.getColumns()[columnIndex].visible === true) {
                _this.resizeColumn(fieldName, columnIndex);
            }
        });
    };
    /**
     * To create table for autofit
     * @hidden
     */
    Resize.prototype.createTable = function (table, text, tag) {
        var myTableDiv = this.parent.createElement('div');
        myTableDiv.className = this.parent.element.className;
        myTableDiv.style.cssText = 'display: inline-block;visibility:hidden;position:absolute';
        var mySubDiv = this.parent.createElement('div');
        mySubDiv.className = tag;
        var myTable = this.parent.createElement('table');
        myTable.className = table.className;
        myTable.classList.add('e-resizetable');
        myTable.style.cssText = 'table-layout: auto;width: auto';
        var myTr = this.parent.createElement('tr');
        text.forEach(function (element) {
            var tr = myTr.cloneNode();
            tr.className = table.querySelector('tr').className;
            tr.appendChild(element);
            myTable.appendChild(tr);
        });
        mySubDiv.appendChild(myTable);
        myTableDiv.appendChild(mySubDiv);
        document.body.appendChild(myTableDiv);
        var offsetWidthValue = myTable.getBoundingClientRect().width;
        document.body.removeChild(myTableDiv);
        return Math.ceil(offsetWidthValue);
    };
    /**
     * @hidden
     */
    Resize.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["headerRefreshed"], this.refreshHeight, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["initialEnd"], this.wireEvents, this);
    };
    /**
     * @hidden
     */
    Resize.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["headerRefreshed"], this.refreshHeight);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["initialEnd"], this.wireEvents);
    };
    /**
     * @hidden
     */
    Resize.prototype.render = function () {
        this.unwireEvents();
        this.wireEvents();
        this.setHandlerHeight();
    };
    Resize.prototype.refreshHeight = function () {
        this.getResizeHandlers().forEach(function (ele) {
            if (ele.parentElement.offsetHeight > 0) {
                ele.style.height = ele.parentElement.offsetHeight + 'px';
            }
        });
        this.setHandlerHeight();
    };
    Resize.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.getHeaderContent(), _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.resizeStart, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.getHeaderContent(), _base_constant__WEBPACK_IMPORTED_MODULE_3__["dblclick"], this.callAutoFit, this);
    };
    Resize.prototype.unwireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.getHeaderContent(), _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.resizeStart);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.getHeaderContent(), _base_constant__WEBPACK_IMPORTED_MODULE_3__["dblclick"], this.callAutoFit);
    };
    Resize.prototype.getResizeHandlers = function () {
        return this.parent.getFrozenColumns() ?
            [].slice.call(this.parent.getHeaderContent().querySelectorAll('.' + resizeClassList.root))
            : [].slice.call(this.parent.getHeaderTable().querySelectorAll('.' + resizeClassList.root));
    };
    Resize.prototype.setHandlerHeight = function () {
        [].slice.call(this.parent.getHeaderTable().querySelectorAll('.' + resizeClassList.suppress)).forEach(function (ele) {
            ele.style.height = ele.parentElement.offsetHeight + 'px';
        });
    };
    Resize.prototype.callAutoFit = function (e) {
        if (e.target.classList.contains('e-rhandler')) {
            var col = this.getTargetColumn(e);
            if (col.columns) {
                return;
            }
            this.resizeColumn(col.field, this.parent.getNormalizedColumnIndex(col.uid), col.uid);
            var header = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, resizeClassList.header);
            header.classList.add('e-resized');
        }
    };
    Resize.prototype.resizeStart = function (e) {
        if (e.target.classList.contains('e-rhandler')) {
            if (!this.helper) {
                if (this.getScrollBarWidth() === 0) {
                    for (var _i = 0, _a = this.refreshColumnWidth(); _i < _a.length; _i++) {
                        var col = _a[_i];
                        this.widthService.setColumnWidth(col);
                    }
                    this.widthService.setWidthToTable();
                }
                this.refreshStackedColumnWidth();
                this.element = e.target;
                if (this.parent.getVisibleFrozenColumns()) {
                    var mtbody = this.parent.getContent().querySelector('.e-movablecontent').querySelector('tbody');
                    var ftbody = this.parent.getContent().querySelector('.e-frozencontent').querySelector('tbody');
                    var mtr = mtbody.querySelectorAll('tr');
                    var ftr = ftbody.querySelectorAll('tr');
                    for (var i = 0; i < mtr.length; i++) {
                        if (this.parent.rowHeight) {
                            mtr[i].style.height = this.parent.rowHeight + 'px';
                            ftr[i].style.height = this.parent.rowHeight + 'px';
                        }
                        else {
                            mtr[i].style.removeProperty('height');
                            ftr[i].style.removeProperty('height');
                        }
                    }
                }
                this.parentElementWidth = this.parent.element.getBoundingClientRect().width;
                this.appendHelper();
                this.column = this.getTargetColumn(e);
                this.pageX = this.getPointX(e);
                if (this.parent.enableRtl) {
                    this.minMove = parseFloat(this.column.width.toString())
                        - (this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 0);
                }
                else {
                    this.minMove = (this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 0)
                        - parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.column.width) ? '' : this.column.width.toString());
                }
                this.minMove += this.pageX;
            }
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.helper.classList.contains(resizeClassList.icon)) {
                this.helper.classList.add(resizeClassList.icon);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.removeHelper, this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.helper, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.resizeStart, this);
            }
            else {
                var args = {
                    e: e,
                    column: this.column
                };
                this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["resizeStart"], args);
                if (args.cancel) {
                    this.cancelResizeAction();
                    return;
                }
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.resizeEnd, this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.resizing, this);
                this.updateCursor('add');
            }
        }
    };
    Resize.prototype.cancelResizeAction = function (removeEvents) {
        if (removeEvents) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.resizing);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.resizeEnd);
            this.updateCursor('remove');
        }
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.removeHelper);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.helper, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.resizeStart);
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.helper);
        this.refresh();
    };
    Resize.prototype.getWidth = function (width, minWidth, maxWidth) {
        if (minWidth && width < minWidth) {
            return minWidth;
        }
        else if ((maxWidth && width > maxWidth)) {
            return maxWidth;
        }
        else {
            return width;
        }
    };
    Resize.prototype.getColData = function (column, mousemove) {
        return {
            width: parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.widthService.getWidth(column)) || this.widthService.getWidth(column) === 'auto' ? '0'
                : this.widthService.getWidth(column).toString()) + mousemove,
            minWidth: column.minWidth ? parseFloat(column.minWidth.toString()) : null,
            maxWidth: column.maxWidth ? parseFloat(column.maxWidth.toString()) : null
        };
    };
    Resize.prototype.resizing = function (e) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.column)) {
            return;
        }
        var offsetWidth = 0;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.column)) {
            offsetWidth = Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["parentsUntil"])(this.element, 'th').offsetWidth;
        }
        if (this.parent.allowTextWrap) {
            this.element.style.height = this.element.parentElement.offsetHeight + 'px';
            this.setHelperHeight();
        }
        var pageX = this.getPointX(e);
        var mousemove = this.parent.enableRtl ? -(pageX - this.pageX) : (pageX - this.pageX);
        var colData = this.getColData(this.column, mousemove);
        if (!colData.width) {
            colData.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'th').offsetWidth;
        }
        var width = this.getWidth(colData.width, colData.minWidth, colData.maxWidth);
        this.parent.log('resize_min_max', { column: this.column, width: width });
        if ((!this.parent.enableRtl && this.minMove >= pageX) || (this.parent.enableRtl && this.minMove <= pageX)) {
            width = this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 0;
            this.pageX = pageX = this.minMove;
        }
        if (width !== parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.column.width) || this.column.width === 'auto' ?
            offsetWidth.toString() : this.column.width.toString())) {
            this.pageX = pageX;
            this.column.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            var args = {
                e: e,
                column: this.column
            };
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["onResize"], args);
            if (args.cancel) {
                this.cancelResizeAction(true);
                return;
            }
            var columns = [this.column];
            var finalColumns = [this.column];
            if (this.column.columns) {
                columns = this.getSubColumns(this.column, []);
                columns = this.calulateColumnsWidth(columns, false, mousemove);
                finalColumns = this.calulateColumnsWidth(columns, true, mousemove);
            }
            for (var _i = 0, finalColumns_1 = finalColumns; _i < finalColumns_1.length; _i++) {
                var col = finalColumns_1[_i];
                this.widthService.setColumnWidth(col, null, 'resize');
            }
            this.updateHelper();
        }
        this.isDblClk = false;
    };
    Resize.prototype.calulateColumnsWidth = function (columns, isUpdate, mousemove) {
        var finalColumns = [];
        var _loop_1 = function (col) {
            var totalWidth = 0;
            columns.forEach(function (col) {
                totalWidth += parseFloat(col.width.toString());
            });
            var colData = this_1.getColData(col, (parseFloat(col.width)) * mousemove / totalWidth);
            var colWidth = this_1.getWidth(colData.width, colData.minWidth, colData.maxWidth);
            if ((colWidth !== parseFloat(col.width.toString()))) {
                if (isUpdate) {
                    col.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(colWidth < 1 ? 1 : colWidth);
                }
                finalColumns.push(col);
            }
        };
        var this_1 = this;
        for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
            var col = columns_1[_i];
            _loop_1(col);
        }
        return finalColumns;
    };
    Resize.prototype.getSubColumns = function (column, subColumns) {
        for (var _i = 0, _a = column.columns; _i < _a.length; _i++) {
            var col = _a[_i];
            if (col.visible !== false && col.allowResizing) {
                if (col.columns) {
                    this.getSubColumns(col, subColumns);
                }
                else {
                    subColumns.push(col);
                }
            }
        }
        return subColumns;
    };
    Resize.prototype.resizeEnd = function (e) {
        if (!this.helper || this.parent.isDestroyed) {
            return;
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.resizing);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.resizeEnd);
        this.updateCursor('remove');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.helper);
        var args = {
            e: e,
            column: this.column
        };
        var content = this.parent.getContent().querySelector('.e-content');
        var cTable = content.querySelector('.e-movablecontent') ? content.querySelector('.e-movablecontent') : content;
        if (cTable.scrollHeight >= cTable.clientHeight) {
            this.parent.scrollModule.setPadding();
            cTable.style.overflowY = 'scroll';
        }
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["resizeStop"], args);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.e-headercell').classList.add('e-resized');
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["parentsUntil"])(this.element, 'e-frozenheader')) {
            this.isFrozenColResized = true;
        }
        else {
            this.isFrozenColResized = false;
        }
        if (this.parent.getFrozenColumns()) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["freezeRender"], { case: 'textwrap' });
        }
        if (this.parent.allowTextWrap) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_3__["textWrapRefresh"], { case: 'textwrap' });
        }
        this.refresh();
        this.doubleTapEvent(e);
        this.isDblClk = true;
    };
    Resize.prototype.getPointX = function (e) {
        if (e.touches && e.touches.length) {
            return e.touches[0].pageX;
        }
        else {
            return e.pageX;
        }
    };
    Resize.prototype.refreshColumnWidth = function () {
        var columns = this.parent.getColumns();
        for (var _i = 0, _a = [].slice.apply(this.parent.getHeaderTable().querySelectorAll('th.e-headercell')); _i < _a.length; _i++) {
            var ele = _a[_i];
            for (var _b = 0, columns_2 = columns; _b < columns_2.length; _b++) {
                var column = columns_2[_b];
                if (ele.querySelector('[e-mappinguid]') &&
                    ele.querySelector('[e-mappinguid]').getAttribute('e-mappinguid') === column.uid && column.visible) {
                    column.width = ele.getBoundingClientRect().width;
                    break;
                }
            }
        }
        return columns;
    };
    Resize.prototype.refreshStackedColumnWidth = function () {
        for (var _i = 0, _a = this.parent.getStackedColumns(this.parent.columns); _i < _a.length; _i++) {
            var stackedColumn = _a[_i];
            stackedColumn.width = this.getStackedWidth(stackedColumn, 0);
        }
    };
    Resize.prototype.getStackedWidth = function (column, width) {
        for (var _i = 0, _a = column.columns; _i < _a.length; _i++) {
            var col = _a[_i];
            if (col.visible !== false) {
                if (col.columns) {
                    this.getStackedWidth(col, width);
                }
                else {
                    width += col.width;
                }
            }
        }
        return width;
    };
    Resize.prototype.getTargetColumn = function (e) {
        var cell = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, resizeClassList.header);
        cell = cell.querySelector('.e-headercelldiv') || cell.querySelector('.e-stackedheadercelldiv');
        var uid = cell.getAttribute('e-mappinguid');
        return this.parent.getColumnByUid(uid);
    };
    Resize.prototype.updateCursor = function (action) {
        var headerRows = [].slice.call(this.parent.getHeaderContent().querySelectorAll('th'));
        headerRows.push(this.parent.element);
        for (var _i = 0, headerRows_1 = headerRows; _i < headerRows_1.length; _i++) {
            var row = headerRows_1[_i];
            row.classList[action](resizeClassList.cursor);
        }
    };
    Resize.prototype.refresh = function () {
        this.column = null;
        this.pageX = null;
        this.element = null;
        this.helper = null;
    };
    Resize.prototype.appendHelper = function () {
        this.helper = this.parent.createElement('div', {
            className: resizeClassList.helper
        });
        this.parent.element.appendChild(this.helper);
        this.setHelperHeight();
    };
    Resize.prototype.setHelperHeight = function () {
        var height = this.parent.getContent().offsetHeight - this.getScrollBarWidth();
        var rect = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, resizeClassList.header);
        var tr = [].slice.call(this.parent.getHeaderContent().querySelectorAll('tr'));
        var frzCols = this.parent.getFrozenColumns();
        if (frzCols) {
            if (rect.parentElement.children.length !== frzCols) {
                tr.splice(0, tr.length / 2);
            }
            else {
                tr.splice(tr.length / 2, tr.length / 2);
            }
        }
        for (var i = tr.indexOf(rect.parentElement); i < tr.length; i++) {
            height += tr[i].offsetHeight;
        }
        var pos = this.calcPos(rect);
        pos.left += (this.parent.enableRtl ? 0 - 1 : rect.offsetWidth - 2);
        this.helper.style.cssText = 'height: ' + height + 'px; top: ' + pos.top + 'px; left:' + Math.floor(pos.left) + 'px;';
    };
    Resize.prototype.getScrollBarWidth = function (height) {
        var ele = this.parent.getFrozenColumns() ? this.parent.getContent().querySelector('.e-movablecontent')
            : this.parent.getContent().firstChild;
        return (ele.scrollHeight > ele.clientHeight && height) ||
            ele.scrollWidth > ele.clientWidth ? Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["getScrollBarWidth"])() : 0;
    };
    Resize.prototype.removeHelper = function (e) {
        var cls = e.target.classList;
        if (!(cls.contains(resizeClassList.root) || cls.contains(resizeClassList.icon)) && this.helper) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.removeHelper);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.helper, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.resizeStart);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.helper);
            this.refresh();
        }
    };
    Resize.prototype.updateHelper = function () {
        var rect = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, resizeClassList.header);
        var left = Math.floor(this.calcPos(rect).left + (this.parent.enableRtl ? 0 - 1 : rect.offsetWidth - 2));
        var borderWidth = 2; // to maintain the helper inside of grid element.
        if (left > this.parentElementWidth) {
            left = this.parentElementWidth - borderWidth;
        }
        if (this.parent.getFrozenColumns()) {
            var table = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(rect, '.e-table');
            var fLeft = table.offsetLeft;
            if (left < fLeft) {
                left = fLeft;
            }
        }
        this.helper.style.left = left + 'px';
    };
    Resize.prototype.calcPos = function (elem) {
        var parentOffset = {
            top: 0,
            left: 0
        };
        var offset = elem.getBoundingClientRect();
        var doc = elem.ownerDocument;
        var offsetParent = elem.offsetParent || doc.documentElement;
        while (offsetParent &&
            (offsetParent === doc.body || offsetParent === doc.documentElement) &&
            offsetParent.style.position === 'static') {
            offsetParent = offsetParent.parentNode;
        }
        if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
            parentOffset = offsetParent.getBoundingClientRect();
        }
        return {
            top: offset.top - parentOffset.top,
            left: offset.left - parentOffset.left
        };
    };
    Resize.prototype.doubleTapEvent = function (e) {
        if (this.getUserAgent() && this.isDblClk) {
            if (!this.tapped) {
                this.tapped = setTimeout(this.timeoutHandler(), 300);
            }
            else {
                clearTimeout(this.tapped);
                this.callAutoFit(e);
                this.tapped = null;
            }
        }
    };
    Resize.prototype.getUserAgent = function () {
        var userAgent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].userAgent.toLowerCase();
        return /iphone|ipod|ipad/.test(userAgent);
    };
    Resize.prototype.timeoutHandler = function () {
        this.tapped = null;
    };
    return Resize;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/row-reorder.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/row-reorder.js ***!
  \****************************************************************************/
/*! exports provided: RowDD */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowDD", function() { return RowDD; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _actions_scroll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actions/scroll */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/scroll.js");






/**
 *
 * Reorder module is used to handle row reordering.
 * @hidden
 */
var RowDD = /** @class */ (function () {
    /**
     * Constructor for the Grid print module
     * @hidden
     */
    function RowDD(parent) {
        var _this = this;
        this.selectedRows = [];
        this.isOverflowBorder = true;
        this.selectedRowColls = [];
        this.isRefresh = true;
        /* tslint:disable-next-line:max-line-length */
        // tslint:disable-next-line:max-func-body-length
        this.helper = function (e) {
            var gObj = _this.parent;
            var target = e.sender.target;
            var visualElement = _this.parent.createElement('div', {
                className: 'e-cloneproperties e-draganddrop e-grid e-dragclone',
                styles: 'height:"auto", z-index:2, width:' + gObj.element.offsetWidth
            });
            var table = _this.parent.createElement('table', { styles: 'width:' + gObj.element.offsetWidth });
            var tbody = _this.parent.createElement('tbody');
            if (document.getElementsByClassName('e-griddragarea').length ||
                (gObj.rowDropSettings.targetID && (!e.sender.target.classList.contains('e-selectionbackground')
                    && gObj.selectionSettings.type !== 'Single')) ||
                (!gObj.rowDropSettings.targetID && !Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(e.sender.target, 'e-rowdragdrop'))) {
                return false;
            }
            if (gObj.rowDropSettings.targetID &&
                gObj.selectionSettings.mode === 'Row' && gObj.selectionSettings.type === 'Single') {
                gObj.selectRow(parseInt(e.sender.target.parentElement.getAttribute('aria-rowindex'), 10));
            }
            _this.startedRow = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'tr').cloneNode(true);
            _this.processArgs(target);
            var args = {
                selectedRow: _this.rows, dragelement: target,
                cloneElement: visualElement, cancel: false, data: _this.rowData
            };
            var selectedRows = gObj.getSelectedRows();
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rowDragStartHelper"], args);
            var cancel = 'cancel';
            var cloneElement = 'cloneElement';
            if (args[cancel]) {
                visualElement = args[cloneElement];
                return visualElement;
            }
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(_this.startedRow, '.e-indentcell');
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(_this.startedRow, '.e-detailrowcollapse');
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["removeElement"])(_this.startedRow, '.e-detailrowexpand');
            _this.removeCell(_this.startedRow, 'e-gridchkbox');
            var exp = new RegExp('e-active', 'g'); //high contrast issue
            _this.startedRow.innerHTML = _this.startedRow.innerHTML.replace(exp, '');
            tbody.appendChild(_this.startedRow);
            if (gObj.getSelectedRows().length > 1) {
                var dropCountEle = _this.parent.createElement('span', {
                    className: 'e-dropitemscount', innerHTML: '' + selectedRows.length,
                });
                visualElement.appendChild(dropCountEle);
            }
            var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'tr').querySelector('.e-icon-rowdragicon');
            if (ele) {
                ele.classList.add('e-dragstartrow');
            }
            table.appendChild(tbody);
            visualElement.appendChild(table);
            gObj.element.appendChild(visualElement);
            return visualElement;
        };
        this.dragStart = function (e) {
            var gObj = _this.parent;
            if (document.getElementsByClassName('e-griddragarea').length) {
                return;
            }
            var target = e.target;
            var spanCssEle = _this.parent.element.querySelector('.e-dropitemscount');
            if (_this.parent.getSelectedRecords().length > 1 && spanCssEle) {
                spanCssEle.style.left = _this.parent.element.querySelector('.e-cloneproperties table')
                    .offsetWidth - 5 + 'px';
            }
            _this.processArgs(target);
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rowDragStart"], {
                rows: _this.rows,
                target: e.target, draggableType: 'rows', fromIndex: parseInt(_this.rows[0].getAttribute('aria-rowindex'), 10),
                data: _this.rowData
            });
            _this.dragStartData = _this.rowData;
            var dropElem = document.getElementById(gObj.rowDropSettings.targetID);
            if (gObj.rowDropSettings.targetID && dropElem && dropElem.ej2_instances &&
                dropElem.ej2_instances[0].getModuleName() === 'grid') {
                dropElem.ej2_instances[0].getContent().classList.add('e-allowRowDrop');
            }
        };
        this.drag = function (e) {
            var gObj = _this.parent;
            var cloneElement = _this.parent.element.querySelector('.e-cloneproperties');
            var target = _this.getElementFromPosition(cloneElement, e.event);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-defaultcur'], ['e-notallowedcur', 'e-movecur']);
            _this.isOverflowBorder = true;
            _this.hoverState = gObj.enableHover;
            var trElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'tr');
            gObj.enableHover = false;
            if (!e.target) {
                return;
            }
            _this.processArgs(target);
            var args = {
                rows: _this.rows, target: target, draggableType: 'rows',
                data: _this.rowData, originalEvent: e, cancel: false
            };
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rowDrag"], args);
            _this.stopTimer();
            if (args.cancel) {
                return;
            }
            gObj.element.classList.add('e-rowdrag');
            _this.dragTarget = trElement && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-grid').id === cloneElement.parentElement.id ?
                trElement.rowIndex : parseInt(_this.startedRow.getAttribute('aria-rowindex'), 10);
            if (gObj.rowDropSettings.targetID) {
                if (!Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-gridcontent') ||
                    Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(cloneElement.parentElement, 'e-grid').id === Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-grid').id) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);
                }
                else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-defaultcur'], ['e-notallowedcur']);
                }
            }
            else {
                var elem = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-grid');
                if (elem && elem.id === cloneElement.parentElement.id) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-movecur'], ['e-defaultcur']);
                }
                else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-notallowedcur'], ['e-movecur']);
                }
            }
            if (!gObj.rowDropSettings.targetID &&
                (!gObj.groupSettings.columns.length || e.target.classList.contains('e-selectionbackground'))) {
                if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-grid')) {
                    _this.updateScrollPostion(e.event, target);
                }
                if (_this.isOverflowBorder && parseInt(_this.startedRow.getAttribute('aria-rowindex'), 10) !== _this.dragTarget) {
                    _this.moveDragRows(e, _this.startedRow, trElement);
                }
                else {
                    if (trElement && _this.parent.getRowByIndex(_this.parent.getRows().length - 1).getAttribute('data-uid') ===
                        trElement.getAttribute('data-uid')) {
                        var bottomborder = _this.parent.createElement('div', { className: 'e-lastrow-dragborder' });
                        var gridcontentEle = _this.parent.getContent();
                        bottomborder.style.width = _this.parent.element.offsetWidth - _this.getScrollWidth() + 'px';
                        if (!gridcontentEle.querySelectorAll('.e-lastrow-dragborder').length) {
                            gridcontentEle.classList.add('e-grid-relative');
                            gridcontentEle.appendChild(bottomborder);
                            bottomborder.style.bottom = _this.getScrollWidth() + 'px';
                        }
                    }
                    _this.removeBorder(trElement);
                }
            }
        };
        this.dragStop = function (e) {
            var gObj = _this.parent;
            if (_this.parent.isDestroyed) {
                return;
            }
            var targetEle = _this.getElementFromPosition(e.helper, e.event);
            var target = targetEle ? targetEle : e.target;
            var cloneElement = _this.parent.element.querySelector('.e-cloneproperties');
            gObj.element.classList.remove('e-rowdrag');
            var dropElement = document.getElementById(gObj.rowDropSettings.targetID);
            if (gObj.rowDropSettings.targetID && dropElement && dropElement.ej2_instances &&
                dropElement.ej2_instances[0].getModuleName() === 'grid') {
                dropElement.ej2_instances[0].getContent().classList.remove('e-allowRowDrop');
            }
            if (gObj.isRowDragable()) {
                _this.stopTimer();
                gObj.enableHover = _this.hoverState;
                _this.parent.getContent().classList.remove('e-grid-relative');
                _this.removeBorder(targetEle);
                var stRow = gObj.element.querySelector('.e-dragstartrow');
                if (stRow) {
                    stRow.classList.remove('e-dragstartrow');
                }
            }
            _this.processArgs(target);
            var args = {
                target: target, draggableType: 'rows',
                cancel: false,
                fromIndex: parseInt(_this.rows[0].getAttribute('aria-rowindex'), 10),
                dropIndex: _this.dragTarget,
                rows: _this.rows, data: _this.dragStartData
            };
            gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rowDrop"], args);
            if (!Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(target, 'e-gridcontent') || args.cancel) {
                _this.dragTarget = null;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(e.helper);
                return;
            }
            _this.isRefresh = false;
            var selectedIndexes = _this.parent.getSelectedRowIndexes();
            if (gObj.isRowDragable()) {
                if (!_this.parent.rowDropSettings.targetID &&
                    _this.startedRow.querySelector('td.e-selectionbackground') && selectedIndexes.length > 1 &&
                    selectedIndexes.length !== _this.parent.getCurrentViewRecords().length) {
                    _this.reorderRows(selectedIndexes, args.dropIndex);
                }
                else {
                    _this.reorderRows([parseInt(_this.startedRow.getAttribute('aria-rowindex'), 10)], _this.dragTarget);
                }
                _this.dragTarget = null;
                if (!gObj.rowDropSettings.targetID) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(e.helper);
                    gObj.refresh();
                }
            }
            _this.isRefresh = true;
        };
        this.removeCell = function (targetRow, className) {
            return [].slice.call(targetRow.querySelectorAll('td')).filter(function (cell) {
                if (cell.classList.contains(className)) {
                    targetRow.deleteCell(cell.cellIndex);
                }
            });
        };
        this.parent = parent;
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.initializeDrag, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrop"], this.columnDrop, this);
        this.onDataBoundFn = this.onDataBound.bind(this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataBound"], this.onDataBoundFn);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRender, this);
    }
    RowDD.prototype.reorderRows = function (fromIndexes, toIndex) {
        var selectedIndexes = this.parent.getSelectedRowIndexes();
        var selectedRecords = [];
        var draggedRecords = [];
        var currentViewData = this.parent.renderModule.data.dataManager.dataSource.json;
        var dropIdx = toIndex;
        var actualIdx = fromIndexes[0];
        for (var i = 0, len = fromIndexes.length; i < len; i++) {
            draggedRecords[i] = currentViewData[fromIndexes[i]];
        }
        for (var i = 0, len = selectedIndexes.length; i < len; i++) {
            selectedRecords[i] = currentViewData[selectedIndexes[i]];
        }
        for (var i = 0, len = draggedRecords.length; i < len; i++) {
            if (i !== 0) {
                for (var j = 0, len1 = currentViewData.length; j < len1; j++) {
                    if (JSON.stringify(this.parent.renderModule.data.dataManager.dataSource.json[j]) ===
                        JSON.stringify(draggedRecords[i])) {
                        actualIdx = j;
                        break;
                    }
                }
                for (var j = 0, len1 = currentViewData.length; j < len1; j++) {
                    if (JSON.stringify(this.parent.renderModule.data.dataManager.dataSource.json[j]) === JSON.stringify(draggedRecords[i - 1])) {
                        if (actualIdx > j) {
                            dropIdx = j + 1;
                        }
                        break;
                    }
                }
            }
            this.reorderRow(actualIdx, dropIdx);
        }
        if (this.isRefresh) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], {
                type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], requestType: 'rowdraganddrop'
            });
        }
        for (var i = 0, len = selectedRecords.length; i < len; i++) {
            for (var j = 0, len1 = currentViewData.length; j < len1; j++) {
                if (JSON.stringify(this.parent.renderModule.data.dataManager.dataSource.json[j]) === JSON.stringify(selectedRecords[i])) {
                    selectedIndexes[i] = j;
                    break;
                }
            }
        }
        this.selectedRowColls = selectedIndexes;
    };
    RowDD.prototype.stopTimer = function () {
        window.clearInterval(this.timer);
    };
    RowDD.prototype.initializeDrag = function () {
        var gObj = this.parent;
        var column;
        var drag;
        drag = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"](gObj.getContent(), {
            dragTarget: '.e-rowcelldrag, .e-rowdragdrop, .e-rowcell',
            distance: 5,
            helper: this.helper,
            dragStart: this.dragStart,
            drag: this.drag,
            dragStop: this.dragStop
        });
    };
    RowDD.prototype.updateScrollPostion = function (e, target) {
        var _this = this;
        var frzCols = this.parent.getFrozenColumns();
        var y = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getPosition"])(e).y;
        var cliRect = this.parent.getContent().getBoundingClientRect();
        var rowHeight = this.parent.getRowHeight() - 15;
        var scrollElem = frzCols ? this.parent.getContent().querySelector('.e-movablecontent')
            : this.parent.getContent().firstElementChild;
        if (cliRect.top + rowHeight >= y) {
            var scrollPixel_1 = -(this.parent.getRowHeight());
            this.isOverflowBorder = false;
            this.timer = window.setInterval(function () { _this.setScrollDown(scrollElem, scrollPixel_1, true); }, 200);
        }
        else if (cliRect.top + this.parent.getContent().clientHeight - rowHeight - 33 <= y) {
            var scrollPixel_2 = (this.parent.getRowHeight());
            this.isOverflowBorder = false;
            this.timer = window.setInterval(function () { _this.setScrollDown(scrollElem, scrollPixel_2, true); }, 200);
        }
    };
    RowDD.prototype.setScrollDown = function (scrollElem, scrollPixel, isLeft) {
        scrollElem.scrollTop = scrollElem.scrollTop + scrollPixel;
    };
    RowDD.prototype.moveDragRows = function (e, startedRow, targetRow) {
        var cloneElement = this.parent.element.querySelector('.e-cloneproperties');
        var element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'tr');
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(element, 'e-gridcontent') && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(cloneElement.parentElement, 'e-grid').id ===
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(element, 'e-grid').id) {
            var targetElement = element ?
                element : this.startedRow;
            this.setBorder(targetElement, e.event, startedRow, targetRow);
        }
    };
    RowDD.prototype.setBorder = function (element, event, startedRow, targetRow) {
        var node = this.parent.element;
        var cloneElement = this.parent.element.querySelector('.e-cloneproperties');
        this.removeFirstRowBorder(element);
        this.removeLastRowBorder(element);
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(element, 'e-gridcontent') && Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(cloneElement.parentElement, 'e-grid').id ===
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["parentsUntil"])(element, 'e-grid').id) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(node.querySelectorAll('.e-rowcell,.e-rowdragdrop'), ['e-dragborder']);
            var rowElement = [];
            if (targetRow && targetRow.rowIndex === 0) {
                var div = this.parent.createElement('div', { className: 'e-firstrow-dragborder' });
                var gridheaderEle = this.parent.getHeaderContent();
                gridheaderEle.classList.add('e-grid-relative');
                div.style.width = node.offsetWidth - this.getScrollWidth() + 'px';
                if (!gridheaderEle.querySelectorAll('.e-firstrow-dragborder').length) {
                    gridheaderEle.appendChild(div);
                }
            }
            else if (targetRow && parseInt(startedRow.getAttribute('aria-rowindex'), 10) > targetRow.rowIndex) {
                element = this.parent.getRowByIndex(targetRow.rowIndex - 1);
                rowElement = [].slice.call(element.querySelectorAll('.e-rowcell,.e-rowdragdrop,.e-detailrowcollapse'));
            }
            else {
                rowElement = [].slice.call(element.querySelectorAll('.e-rowcell,.e-rowdragdrop,.e-detailrowcollapse'));
            }
            if (rowElement.length > 0) {
                Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["addRemoveActiveClasses"])(rowElement, true, 'e-dragborder');
            }
        }
    };
    RowDD.prototype.getScrollWidth = function () {
        var scrollElem = this.parent.getContent().firstElementChild;
        return scrollElem.scrollWidth > scrollElem.offsetWidth ? _actions_scroll__WEBPACK_IMPORTED_MODULE_3__["Scroll"].getScrollBarWidth() : 0;
    };
    RowDD.prototype.removeFirstRowBorder = function (element) {
        if (this.parent.element.getElementsByClassName('e-firstrow-dragborder').length > 0 && element &&
            element.rowIndex !== 0) {
            this.parent.element.getElementsByClassName('e-firstrow-dragborder')[0].remove();
        }
    };
    RowDD.prototype.removeLastRowBorder = function (element) {
        var islastRowIndex = element && this.parent.getRowByIndex(this.parent.getRows().length - 1).getAttribute('data-uid') !==
            element.getAttribute('data-uid');
        if (this.parent.element.getElementsByClassName('e-lastrow-dragborder').length > 0 && element && islastRowIndex) {
            this.parent.element.getElementsByClassName('e-lastrow-dragborder')[0].remove();
        }
    };
    RowDD.prototype.removeBorder = function (element) {
        this.removeFirstRowBorder(element);
        this.removeLastRowBorder(element);
        element = this.parent.getRows().filter(function (row) {
            return row.querySelector('td.e-dragborder');
        })[0];
        if (element) {
            var rowElement = [].slice.call(element.querySelectorAll('.e-dragborder'));
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["addRemoveActiveClasses"])(rowElement, false, 'e-dragborder');
        }
    };
    RowDD.prototype.getElementFromPosition = function (element, event) {
        var target;
        var position = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getPosition"])(event);
        element.style.display = 'none';
        target = document.elementFromPoint(position.x, position.y);
        element.style.display = '';
        return target;
    };
    RowDD.prototype.onDataBound = function (e) {
        if (this.selectedRowColls.length > 0) {
            this.parent.selectRows(this.selectedRowColls);
            this.selectedRowColls = [];
        }
    };
    RowDD.prototype.getTargetIdx = function (targetRow) {
        return targetRow ? parseInt(targetRow.getAttribute('aria-rowindex'), 10) : 0;
    };
    RowDD.prototype.singleRowDrop = function (e) {
        var targetRow = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'tr');
        var currentIndex;
        var srcControl;
        srcControl = e.droppedElement.parentElement.ej2_instances[0];
        currentIndex = targetRow ? targetRow.rowIndex : srcControl.currentViewData.length - 1;
        this.reorderRow(this.startedRowIndex, currentIndex);
    };
    RowDD.prototype.columnDrop = function (e) {
        var gObj = this.parent;
        var draggObj = e.droppedElement.parentElement.ej2_instances[0];
        if (e.droppedElement.getAttribute('action') !== 'grouping') {
            var targetRow = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'tr');
            var srcControl = void 0;
            var currentIndex = void 0;
            if ((e.droppedElement.querySelector('tr').getAttribute('single-dragrow') !== 'true' &&
                e.droppedElement.parentElement.id === gObj.element.id)
                || (e.droppedElement.querySelector('tr').getAttribute('single-dragrow') === 'true' &&
                    e.droppedElement.parentElement.id !== gObj.element.id)) {
                return;
            }
            if (e.droppedElement.parentElement.id !== gObj.element.id) {
                srcControl = e.droppedElement.parentElement.ej2_instances[0];
            }
            else if (this.isSingleRowDragDrop || e.droppedElement.querySelector('tr').getAttribute('single-dragrow') === 'true') {
                this.singleRowDrop(e);
                return;
            }
            if (srcControl.element.id !== gObj.element.id && srcControl.rowDropSettings.targetID !== gObj.element.id) {
                return;
            }
            var records = srcControl.getSelectedRecords();
            var targetIndex = currentIndex = this.getTargetIdx(targetRow);
            var count = 0;
            if (isNaN(targetIndex)) {
                targetIndex = currentIndex = 0;
            }
            if (gObj.allowPaging) {
                targetIndex = targetIndex + (gObj.pageSettings.currentPage * gObj.pageSettings.pageSize) - gObj.pageSettings.pageSize;
            }
            //Todo: drag and drop mapper & BatchChanges                   
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rowsAdded"], { toIndex: targetIndex, records: records });
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], {
                type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], requestType: 'rowdraganddrop'
            });
            var selectedRows = srcControl.getSelectedRowIndexes();
            var skip = srcControl.allowPaging ?
                (srcControl.pageSettings.currentPage * srcControl.pageSettings.pageSize) - srcControl.pageSettings.pageSize : 0;
            this.selectedRows = [];
            for (var i = 0, len = records.length; i < len; i++) {
                this.selectedRows.push(skip + selectedRows[i]);
            }
            srcControl.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rowsRemoved"], { indexes: this.selectedRows, records: records });
            srcControl.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], {
                type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], requestType: 'rowdraganddrop'
            });
        }
    };
    RowDD.prototype.reorderRow = function (fromIndexes, toIndex) {
        var gObj = this.parent;
        if (!gObj.sortSettings.columns.length && !gObj.groupSettings.columns.length && !gObj.filterSettings.columns.length) {
            //Todo: drag and drop mapper & BatchChanges                 
            var skip = gObj.allowPaging ?
                (gObj.pageSettings.currentPage * gObj.pageSettings.pageSize) - gObj.pageSettings.pageSize : 0;
            var fromIndex = fromIndexes;
            toIndex = toIndex + skip;
            this.selectedRows = gObj.getSelectedRowIndexes();
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rowPositionChanged"], {
                fromIndex: fromIndexes + skip,
                toIndex: toIndex
            });
        }
    };
    RowDD.prototype.enableAfterRender = function (e) {
        if (e.module === this.getModuleName() && e.enable) {
            this.initializeDrag();
        }
    };
    /**
     * To destroy the print
     * @return {void}
     * @hidden
     */
    RowDD.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (this.parent.isDestroyed || !gridElement || (!gridElement.querySelector('.e-gridheader') &&
            !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.initializeDrag);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrop"], this.columnDrop);
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataBound"], this.onDataBoundFn);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRender);
        //destory ejdrag and drop
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    RowDD.prototype.getModuleName = function () {
        return 'rowDragAndDrop';
    };
    RowDD.prototype.processArgs = function (target) {
        var gObj = this.parent;
        if ((gObj.getSelectedRecords().length > 0 && this.startedRow.cells[0].classList.contains('e-selectionbackground') === false)
            || gObj.getSelectedRecords().length === 0) {
            this.rows = [this.startedRow];
            this.rowData = this.parent.getRowInfo((this.startedRow).querySelector('.e-rowcell')).rowData;
        }
        else {
            this.rows = gObj.getSelectedRows();
            this.rowData = gObj.getSelectedRecords();
        }
    };
    return RowDD;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/scroll.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/scroll.js ***!
  \***********************************************************************/
/*! exports provided: Scroll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scroll", function() { return Scroll; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _services_width_controller__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/width-controller */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/width-controller.js");






/**
 * The `Scroll` module is used to handle scrolling behaviour.
 */
var Scroll = /** @class */ (function () {
    /**
     * Constructor for the Grid scrolling.
     * @hidden
     */
    function Scroll(parent) {
        this.lastScrollTop = 0;
        //To maintain scroll state on grid actions.
        this.previousValues = { top: 0, left: 0 };
        this.oneTimeReady = true;
        this.parent = parent;
        this.widthService = new _services_width_controller__WEBPACK_IMPORTED_MODULE_3__["ColumnWidthService"](parent);
        this.addEventListener();
    }
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Scroll.prototype.getModuleName = function () {
        return 'scroll';
    };
    /**
     * @hidden
     */
    Scroll.prototype.setWidth = function (uiupdate) {
        this.parent.element.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.parent.width);
        if (uiupdate) {
            this.widthService.setWidthToColumns();
        }
        if (this.parent.toolbarModule && this.parent.toolbarModule.toolbar &&
            this.parent.toolbarModule.toolbar.element) {
            this.parent.toolbarModule.toolbar.refreshOverflow();
        }
    };
    /**
     * @hidden
     */
    Scroll.prototype.setHeight = function () {
        var mHdrHeight = 0;
        var content = this.parent.getContent().firstChild;
        if (this.parent.frozenRows && this.parent.height !== 'auto') {
            mHdrHeight =
                this.parent.getHeaderContent().querySelector('tbody').offsetHeight;
            content.style.height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.parent.height - mHdrHeight);
        }
        else {
            content.style.height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.parent.height);
        }
        this.ensureOverflow(content);
    };
    /**
     * @hidden
     */
    Scroll.prototype.setPadding = function () {
        var content = this.parent.getHeaderContent();
        var scrollWidth = Scroll.getScrollBarWidth() - this.getThreshold();
        var cssProps = this.getCssProperties();
        content.firstChild.style[cssProps.border] = scrollWidth > 0 ? '1px' : '0px';
        content.style[cssProps.padding] = scrollWidth > 0 ? scrollWidth + 'px' : '0px';
    };
    /**
     * @hidden
     */
    Scroll.prototype.removePadding = function (rtl) {
        var cssProps = this.getCssProperties(rtl);
        this.parent.getHeaderContent().firstChild.style[cssProps.border] = '';
        this.parent.getHeaderContent().firstChild.parentElement.style[cssProps.padding] = '';
    };
    /**
     * Refresh makes the Grid adoptable with the height of parent container.
     *
     * > The [`height`](grid/#height/) must be set to 100%.
     * @return
     */
    Scroll.prototype.refresh = function () {
        if (this.parent.height !== '100%') {
            return;
        }
        var content = this.parent.getContent();
        this.parent.element.style.height = '100%';
        var height = this.widthService.getSiblingsHeight(content);
        content.style.height = 'calc(100% - ' + height + 'px)'; //Set the height to the '.e-gridcontent';
    };
    Scroll.prototype.getThreshold = function () {
        /* Some browsers places the scroller outside the content,
         * hence the padding should be adjusted.*/
        var appName = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name;
        if (appName === 'mozilla') {
            return 0.5;
        }
        return 1;
    };
    /**
     * @hidden
     */
    Scroll.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["onEmpty"], this.wireEvents, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.wireEvents, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.onPropertyChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["textWrapRefresh"], this.wireEvents, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.setScrollLeft, this);
    };
    /**
     * @hidden
     */
    Scroll.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["onEmpty"], this.wireEvents);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.wireEvents);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.onPropertyChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["textWrapRefresh"], this.wireEvents);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.setScrollLeft);
    };
    Scroll.prototype.setScrollLeft = function () {
        if (this.parent.frozenColumns) {
            this.parent.headerModule.getMovableHeader().scrollLeft = this.previousValues.left;
        }
    };
    Scroll.prototype.onContentScroll = function (scrollTarget) {
        var _this = this;
        var element = scrollTarget;
        var isHeader = element.classList.contains('e-headercontent');
        return function (e) {
            if (_this.content.querySelector('tbody') === null || _this.parent.isPreventScrollEvent) {
                return;
            }
            var target = e.target;
            var left = target.scrollLeft;
            var sLimit = target.scrollWidth;
            var isFooter = target.classList.contains('e-summarycontent');
            if (_this.previousValues.left === left) {
                _this.previousValues.top = !isHeader ? _this.previousValues.top : target.scrollTop;
                return;
            }
            element.scrollLeft = left;
            if (isFooter) {
                _this.header.scrollLeft = left;
            }
            _this.previousValues.left = left;
            _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["scroll"], { left: left });
        };
    };
    Scroll.prototype.onFreezeContentScroll = function (scrollTarget) {
        var _this = this;
        var element = scrollTarget;
        return function (e) {
            if (_this.content.querySelector('tbody') === null) {
                return;
            }
            var target = e.target;
            var top = target.scrollTop;
            if (_this.previousValues.top === top) {
                return;
            }
            element.scrollTop = top;
            _this.previousValues.top = top;
            if (_this.parent.isDestroyed) {
                return;
            }
        };
    };
    Scroll.prototype.onWheelScroll = function (scrollTarget) {
        var _this = this;
        var element = scrollTarget;
        return function (e) {
            if (_this.content.querySelector('tbody') === null) {
                return;
            }
            var top = element.scrollTop + (e.deltaMode === 1 ? e.deltaY * 30 : e.deltaY);
            if (_this.previousValues.top === top) {
                return;
            }
            e.preventDefault();
            _this.parent.getContent().querySelector('.e-frozencontent').scrollTop = top;
            element.scrollTop = top;
            _this.previousValues.top = top;
        };
    };
    Scroll.prototype.onTouchScroll = function (scrollTarget) {
        var _this = this;
        var element = scrollTarget;
        return function (e) {
            if (e.pointerType === 'mouse') {
                return;
            }
            var cont;
            var mHdr;
            var pageXY = _this.getPointXY(e);
            var top = element.scrollTop + (_this.pageXY.y - pageXY.y);
            var left = element.scrollLeft + (_this.pageXY.x - pageXY.x);
            if (_this.parent.getHeaderContent().contains(e.target)) {
                mHdr = _this.parent.getFrozenColumns() ?
                    _this.parent.getHeaderContent().querySelector('.e-movableheader') : _this.parent.getHeaderContent().firstChild;
                if (_this.previousValues.left === left || (left < 0 || (mHdr.scrollWidth - mHdr.clientWidth) < left)) {
                    return;
                }
                e.preventDefault();
                mHdr.scrollLeft = left;
                element.scrollLeft = left;
                _this.pageXY.x = pageXY.x;
                _this.previousValues.left = left;
            }
            else {
                cont = _this.parent.getContent().querySelector('.e-frozencontent');
                if (_this.previousValues.top === top && (top < 0 || (cont.scrollHeight - cont.clientHeight) < top)
                    || (top < 0 || (cont.scrollHeight - cont.clientHeight) < top)) {
                    return;
                }
                e.preventDefault();
                cont.scrollTop = top;
                element.scrollTop = top;
                _this.pageXY.y = pageXY.y;
                _this.previousValues.top = top;
            }
        };
    };
    Scroll.prototype.setPageXY = function () {
        var _this = this;
        return function (e) {
            if (e.pointerType === 'mouse') {
                return;
            }
            _this.pageXY = _this.getPointXY(e);
        };
    };
    Scroll.prototype.getPointXY = function (e) {
        var pageXY = { x: 0, y: 0 };
        if (e.touches && e.touches.length) {
            pageXY.x = e.touches[0].pageX;
            pageXY.y = e.touches[0].pageY;
        }
        else {
            pageXY.x = e.pageX;
            pageXY.y = e.pageY;
        }
        return pageXY;
    };
    Scroll.prototype.wireEvents = function () {
        var _this = this;
        if (this.oneTimeReady) {
            var frzCols = this.parent.getFrozenColumns();
            this.content = this.parent.getContent().firstChild;
            this.header = this.parent.getHeaderContent().firstChild;
            var mCont = this.content.querySelector('.e-movablecontent');
            var fCont = this.content.querySelector('.e-frozencontent');
            var mHdr = this.header.querySelector('.e-movableheader');
            if (this.parent.frozenRows) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(frzCols ? mHdr : this.header, 'touchstart pointerdown', this.setPageXY(), this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(frzCols ? mHdr : this.header, 'touchmove pointermove', this.onTouchScroll(frzCols ? mCont : this.content), this);
            }
            if (frzCols) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(mCont, 'scroll', this.onContentScroll(mHdr), this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(mCont, 'scroll', this.onFreezeContentScroll(fCont), this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(fCont, 'scroll', this.onFreezeContentScroll(mCont), this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(mHdr, 'scroll', this.onContentScroll(mCont), this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(fCont, 'wheel', this.onWheelScroll(mCont), this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(fCont, 'touchstart pointerdown', this.setPageXY(), this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(fCont, 'touchmove pointermove', this.onTouchScroll(mCont), this);
            }
            else {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.content, 'scroll', this.onContentScroll(this.header), this);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.header, 'scroll', this.onContentScroll(this.content), this);
            }
            if (this.parent.aggregates.length) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.getFooterContent().firstChild, 'scroll', this.onContentScroll(this.content), this);
            }
            this.refresh();
            this.oneTimeReady = false;
        }
        var table = this.parent.getContentTable();
        var sLeft;
        var sHeight;
        var clientHeight;
        Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getUpdateUsingRaf"])(function () {
            sLeft = _this.header.scrollLeft;
            sHeight = table.scrollHeight;
            clientHeight = _this.parent.getContent().clientHeight;
        }, function () {
            if (!_this.parent.enableVirtualization) {
                if (sHeight < clientHeight) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(table.querySelectorAll('tr:last-child td'), 'e-lastrowcell');
                    if (_this.parent.getFrozenColumns()) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(_this.parent.getContent().querySelector('.e-movablecontent').querySelectorAll('tr:last-child td'), 'e-lastrowcell');
                    }
                }
                if ((_this.parent.frozenRows > 0 || _this.parent.frozenColumns > 0) && _this.header.querySelector('.e-movableheader')) {
                    _this.header.querySelector('.e-movableheader').scrollLeft = _this.previousValues.left;
                }
                else {
                    _this.header.scrollLeft = _this.previousValues.left;
                }
                _this.content.scrollLeft = _this.previousValues.left;
                _this.content.scrollTop = _this.previousValues.top;
            }
            if (!_this.parent.enableColumnVirtualization) {
                _this.content.scrollLeft = sLeft;
            }
            if (_this.parent.frozenColumns && _this.header.querySelector('.e-movableheader')) {
                _this.header.querySelector('.e-movableheader').scrollLeft =
                    _this.content.querySelector('.e-movablecontent').scrollLeft;
            }
        });
        this.parent.isPreventScrollEvent = false;
    };
    /**
     * @hidden
     */
    Scroll.prototype.getCssProperties = function (rtl) {
        var css = {};
        var enableRtl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(rtl) ? this.parent.enableRtl : rtl;
        css.border = enableRtl ? 'borderLeftWidth' : 'borderRightWidth';
        css.padding = enableRtl ? 'paddingLeft' : 'paddingRight';
        return css;
    };
    Scroll.prototype.ensureOverflow = function (content) {
        if (this.parent.getFrozenColumns()) {
            content.querySelector('.e-movablecontent').style.overflowY = this.parent.height === 'auto' ? 'auto' : 'scroll';
            if (content.querySelector('.e-movablecontent').style.overflowY === 'scroll') {
                this.setPadding();
            }
        }
        else {
            content.style.overflowY = this.parent.height === 'auto' ? 'auto' : 'scroll';
        }
    };
    Scroll.prototype.onPropertyChanged = function (e) {
        if (e.module !== this.getModuleName()) {
            return;
        }
        this.setPadding();
        this.oneTimeReady = true;
        if (this.parent.height === 'auto') {
            this.removePadding();
        }
        this.wireEvents();
        this.setHeight();
        var width = 'width';
        this.setWidth(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.properties[width]));
    };
    /**
     * @hidden
     */
    Scroll.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        this.removeEventListener();
        //Remove padding
        this.removePadding();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.parent.getHeaderContent().firstChild], 'e-headercontent');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.parent.getContent().firstChild], 'e-content');
        //Remove height
        this.parent.getContent().firstChild.style.height = '';
        //Remove width
        this.parent.element.style.width = '';
        //Remove Dom event
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.getContent().firstChild, 'scroll', this.onContentScroll);
    };
    /**
     * Function to get the scrollbar width of the browser.
     * @return {number}
     * @hidden
     */
    Scroll.getScrollBarWidth = function () {
        return Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getScrollBarWidth"])();
    };
    return Scroll;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/search.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/search.js ***!
  \***********************************************************************/
/*! exports provided: Search */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Search", function() { return Search; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");



/**
 * The `Search` module is used to handle search action.
 */
var Search = /** @class */ (function () {
    /**
     * Constructor for Grid search module.
     * @hidden
     */
    function Search(parent) {
        this.parent = parent;
        this.addEventListener();
    }
    /**
     * Searches Grid records by given key.
     *
     * > You can customize the default search action by using [`searchSettings`](grid/#searchsettings/).
     * @param  {string} searchString - Defines the key.
     * @return {void}
     */
    Search.prototype.search = function (searchString) {
        var gObj = this.parent;
        searchString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(searchString) ? '' : searchString;
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isActionPrevent"])(gObj)) {
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_1__["preventBatch"], { instance: this, handler: this.search, arg1: searchString });
            return;
        }
        if (searchString !== gObj.searchSettings.key) {
            gObj.searchSettings.key = searchString.toString();
            gObj.dataBind();
        }
        else if (this.refreshSearch) {
            gObj.refresh();
        }
    };
    /**
     * @hidden
     */
    Search.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["inBoundModelChanged"], this.onPropertyChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["searchComplete"], this.onSearchComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["destroy"], this.destroy, this);
        this.actionCompleteFunc = this.onActionComplete.bind(this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_1__["actionComplete"], this.actionCompleteFunc);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["cancelBegin"], this.cancelBeginEvent, this);
    };
    /**
     * @hidden
     */
    Search.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["inBoundModelChanged"], this.onPropertyChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["searchComplete"], this.onSearchComplete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["destroy"], this.destroy);
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_1__["actionComplete"], this.actionCompleteFunc);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["cancelBegin"], this.cancelBeginEvent);
    };
    /**
     * To destroy the print
     * @return {void}
     * @hidden
     */
    Search.prototype.destroy = function () {
        this.removeEventListener();
    };
    /**
     * @hidden
     */
    Search.prototype.onPropertyChanged = function (e) {
        if (e.module !== this.getModuleName()) {
            return;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.properties.key)) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_1__["modelChanged"], {
                requestType: 'searching', type: _base_constant__WEBPACK_IMPORTED_MODULE_1__["actionBegin"], searchString: this.parent.searchSettings.key
            });
        }
        else {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_1__["modelChanged"], {
                requestType: 'searching', type: _base_constant__WEBPACK_IMPORTED_MODULE_1__["actionBegin"]
            });
        }
    };
    /**
     * The function used to trigger onActionComplete
     * @return {void}
     * @hidden
     */
    Search.prototype.onSearchComplete = function (e) {
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_1__["actionComplete"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(e, {
            searchString: this.parent.searchSettings.key, requestType: 'searching', type: _base_constant__WEBPACK_IMPORTED_MODULE_1__["actionComplete"]
        }));
    };
    Search.prototype.onActionComplete = function (e) {
        this.refreshSearch = e.requestType !== 'searching';
    };
    Search.prototype.cancelBeginEvent = function (e) {
        if (e.requestType === 'searching') {
            this.parent.setProperties({ searchSettings: { key: '' } }, true);
        }
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Search.prototype.getModuleName = function () {
        return 'search';
    };
    return Search;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/selection.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/selection.js ***!
  \**************************************************************************/
/*! exports provided: Selection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
var __assign = (undefined && undefined.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};








/**
 * The `Selection` module is used to handle cell and row selection.
 */
var Selection = /** @class */ (function () {
    /**
     * Constructor for the Grid selection module
     * @hidden
     */
    function Selection(parent, selectionSettings, locator) {
        //Internal letiables       
        /**
         * @hidden
         */
        this.selectedRowIndexes = [];
        /**
         * @hidden
         */
        this.selectedRowCellIndexes = [];
        /**
         * @hidden
         */
        this.selectedRecords = [];
        /**
         * @hidden
         */
        this.preventFocus = false;
        this.isMultiShiftRequest = false;
        this.isMultiCtrlRequest = false;
        this.enableSelectMultiTouch = false;
        this.selectedRowState = {};
        this.totalRecordsCount = 0;
        this.chkAllCollec = [];
        this.isCheckedOnAdd = false;
        this.persistSelectedData = [];
        this.isCancelDeSelect = false;
        this.isPreventCellSelect = false;
        this.disableUI = false;
        this.isPersisted = false;
        this.cmdKeyPressed = false;
        this.parent = parent;
        this.selectionSettings = selectionSettings;
        this.factory = locator.getService('rendererFactory');
        this.focus = locator.getService('focus');
        this.addEventListener();
        this.wireEvents();
    }
    Selection.prototype.initializeSelection = function () {
        this.parent.log('selection_key_missing');
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.getContent(), 'mousedown', this.mouseDownHandler, this);
    };
    /**
     * The function used to trigger onActionBegin
     * @return {void}
     * @hidden
     */
    Selection.prototype.onActionBegin = function (args, type) {
        this.parent.trigger(type, this.fDataUpdate(args));
    };
    Selection.prototype.fDataUpdate = function (args) {
        if (args.cellIndex || args.rowIndex) {
            var rowObj = this.getRowObj(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.rowIndex) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.cellIndex) ?
                this.currentIndex : args.cellIndex.rowIndex : args.rowIndex);
            args.foreignKeyData = rowObj.foreignKeyData;
        }
        return args;
    };
    /**
     * The function used to trigger onActionComplete
     * @return {void}
     * @hidden
     */
    Selection.prototype.onActionComplete = function (args, type) {
        this.parent.trigger(type, this.fDataUpdate(args));
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Selection.prototype.getModuleName = function () {
        return 'selection';
    };
    /**
     * To destroy the selection
     * @return {void}
     * @hidden
     */
    Selection.prototype.destroy = function () {
        var gridElement = this.parent.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        this.hidePopUp();
        this.clearSelection();
        this.removeEventListener();
        this.unWireEvents();
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.getContent(), 'mousedown', this.mouseDownHandler);
    };
    Selection.prototype.isEditing = function () {
        return (this.parent.editSettings.mode === 'Normal' || (this.parent.editSettings.mode === 'Batch' && this.parent.editModule &&
            this.parent.editModule.formObj && !this.parent.editModule.formObj.validate())) &&
            this.parent.isEdit && !this.parent.isPersistSelection;
    };
    Selection.prototype.getSelectedMovableRow = function (index) {
        var gObj = this.parent;
        if (gObj.getFrozenColumns()) {
            return gObj.getMovableRowByIndex(index);
        }
        return null;
    };
    Selection.prototype.getCurrentBatchRecordChanges = function () {
        var gObj = this.parent;
        var added = 'addedRecords';
        var deleted = 'deletedRecords';
        if (gObj.editSettings.mode === 'Batch' && gObj.editModule) {
            var currentRecords = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["iterateExtend"])(this.parent.getCurrentViewRecords());
            currentRecords = this.parent.editModule.getBatchChanges()[added].concat(currentRecords);
            var deletedRecords = this.parent.editModule.getBatchChanges()[deleted];
            var primaryKey = this.parent.getPrimaryKeyFieldNames()[0];
            for (var i = 0; i < (deletedRecords.length); i++) {
                for (var j = 0; j < currentRecords.length; j++) {
                    if (deletedRecords[i][primaryKey] === currentRecords[j][primaryKey]) {
                        currentRecords.splice(j, 1);
                        break;
                    }
                }
            }
            return currentRecords;
        }
        else {
            return gObj.getCurrentViewRecords();
        }
    };
    /**
     * Selects a row by the given index.
     * @param  {number} index - Defines the row index.
     * @param  {boolean} isToggle - If set to true, then it toggles the selection.
     * @return {void}
     */
    Selection.prototype.selectRow = function (index, isToggle) {
        if (this.selectedRowIndexes.length && this.selectionSettings.enableSimpleMultiRowSelection) {
            this.addRowsToSelection([index]);
            return;
        }
        var gObj = this.parent;
        var selectedRow = gObj.getRowByIndex(index);
        var selectedMovableRow = this.getSelectedMovableRow(index);
        var selectData;
        var isRemoved = false;
        if (gObj.enableVirtualization && selectedRow) {
            selectData = gObj.getRowObjectFromUID(selectedRow.getAttribute('data-uid')).data;
        }
        else {
            selectData = this.getCurrentBatchRecordChanges()[index];
        }
        if (!this.isRowType() || !selectedRow || this.isEditing()) {
            // if (this.isEditing()) {
            //     gObj.selectedRowIndex = index;
            // }
            return;
        }
        var isRowSelected = selectedRow.hasAttribute('aria-selected');
        isToggle = !isToggle ? isToggle :
            !this.selectedRowIndexes.length ? false :
                (this.selectedRowIndexes.length === 1 ? (index === this.selectedRowIndexes[0]) : false);
        var args;
        var can = 'cancel';
        if (!isToggle) {
            args = {
                data: selectData, rowIndex: index, isCtrlPressed: this.isMultiCtrlRequest,
                isShiftPressed: this.isMultiShiftRequest, row: selectedRow,
                previousRow: gObj.getRowByIndex(this.prevRowIndex),
                previousRowIndex: this.prevRowIndex, target: this.actualTarget, cancel: false
            };
            args = this.addMovableArgs(args, selectedMovableRow);
            this.onActionBegin(args, _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelecting"]);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args) && args[can] === true) {
            return;
        }
        if (isRowSelected && this.selectionSettings.persistSelection) {
            this.clearSelectedRow(index);
            isRemoved = true;
        }
        if (!this.selectionSettings.persistSelection) {
            this.clearRow();
        }
        if (!isToggle && !isRemoved) {
            if (this.selectedRowIndexes.indexOf(index) <= -1) {
                this.updateRowSelection(selectedRow, index);
                if (gObj.getFrozenColumns()) {
                    this.updateRowSelection(selectedMovableRow, index);
                }
            }
            this.selectRowIndex(index);
        }
        if (!isToggle) {
            args = {
                data: selectData, rowIndex: index,
                row: selectedRow, previousRow: gObj.getRowByIndex(this.prevRowIndex),
                previousRowIndex: this.prevRowIndex, target: this.actualTarget
            };
            args = this.addMovableArgs(args, selectedMovableRow);
            this.onActionComplete(args, _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelected"]);
        }
        this.updateRowProps(index);
    };
    Selection.prototype.addMovableArgs = function (targetObj, mRow) {
        if (this.parent.getFrozenColumns()) {
            var mObj = { mRow: mRow, previousMovRow: this.parent.getMovableRows()[this.prevRowIndex] };
            targetObj = __assign({}, targetObj, mObj);
        }
        return targetObj;
    };
    /**
     * Selects a range of rows from start and end row indexes.
     * @param  {number} startIndex - Specifies the start row index.
     * @param  {number} endIndex - Specifies the end row index.
     * @return {void}
     */
    Selection.prototype.selectRowsByRange = function (startIndex, endIndex) {
        this.selectRows(this.getCollectionFromIndexes(startIndex, endIndex));
        this.selectRowIndex(endIndex);
    };
    /**
     * Selects a collection of rows by index.
     * @param  {number[]} rowIndexes - Specifies an array of row indexes.
     * @return {void}
     */
    Selection.prototype.selectRows = function (rowIndexes) {
        var gObj = this.parent;
        var rowIndex = !this.isSingleSel() ? rowIndexes[0] : rowIndexes[rowIndexes.length - 1];
        var selectedRow = gObj.getRowByIndex(rowIndex);
        var selectedMovableRow = this.getSelectedMovableRow(rowIndex);
        var frzCols = gObj.getFrozenColumns();
        var can = 'cancel';
        var selectedData = this.getCurrentBatchRecordChanges()[rowIndexes[0]];
        if (!this.isRowType() || this.isEditing()) {
            return;
        }
        var args = {
            rowIndexes: rowIndexes, row: selectedRow, rowIndex: rowIndex, target: this.actualTarget,
            prevRow: gObj.getRows()[this.prevRowIndex], previousRowIndex: this.prevRowIndex,
            isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,
            data: selectedData
        };
        args = this.addMovableArgs(args, selectedMovableRow);
        this.onActionBegin(args, _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelecting"]);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args) && args[can] === true) {
            return;
        }
        this.clearRow();
        this.selectRowIndex(rowIndexes.slice(-1)[0]);
        if (!this.isSingleSel()) {
            for (var _i = 0, rowIndexes_1 = rowIndexes; _i < rowIndexes_1.length; _i++) {
                var rowIdx = rowIndexes_1[_i];
                this.updateRowSelection(gObj.getRowByIndex(rowIdx), rowIdx);
                if (frzCols) {
                    this.updateRowSelection(gObj.getMovableRowByIndex(rowIdx), rowIdx);
                }
                this.updateRowProps(rowIndex);
            }
        }
        else {
            this.updateRowSelection(gObj.getRowByIndex(rowIndex), rowIndex);
            if (frzCols) {
                this.updateRowSelection(gObj.getMovableRowByIndex(rowIndex), rowIndex);
            }
            this.updateRowProps(rowIndex);
        }
        args = {
            rowIndexes: rowIndexes, row: selectedRow, rowIndex: rowIndex, target: this.actualTarget,
            prevRow: gObj.getRows()[this.prevRowIndex], previousRowIndex: this.prevRowIndex,
            data: selectedData
        };
        args = this.addMovableArgs(args, selectedMovableRow);
        this.onActionComplete(args, _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelected"]);
    };
    /**
     * Select rows with existing row selection by passing row indexes.
     * @param  {number} startIndex - Specifies the row indexes.
     * @return {void}
     * @hidden
     */
    Selection.prototype.addRowsToSelection = function (rowIndexes) {
        var gObj = this.parent;
        var can = 'cancel';
        var target = this.target;
        var selectedRow = !this.isSingleSel() ? gObj.getRowByIndex(rowIndexes[0]) :
            gObj.getRowByIndex(rowIndexes[rowIndexes.length - 1]);
        var selectedMovableRow = !this.isSingleSel() ? this.getSelectedMovableRow(rowIndexes[0]) :
            this.getSelectedMovableRow(rowIndexes[rowIndexes.length - 1]);
        var frzCols = gObj.getFrozenColumns();
        if (!this.isRowType() || this.isEditing()) {
            return;
        }
        var args;
        var checkboxColumn = this.parent.getColumns().filter(function (col) { return col.type === 'checkbox'; });
        for (var _i = 0, rowIndexes_2 = rowIndexes; _i < rowIndexes_2.length; _i++) {
            var rowIndex = rowIndexes_2[_i];
            var rowObj = this.getRowObj(rowIndex);
            var isUnSelected = this.selectedRowIndexes.indexOf(rowIndex) > -1;
            this.selectRowIndex(rowIndex);
            if (isUnSelected && ((checkboxColumn.length ? true : this.selectionSettings.enableToggle) || this.isMultiCtrlRequest)) {
                this.rowDeselect(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDeselecting"], [rowIndex], [rowObj.data], [selectedRow], [rowObj.foreignKeyData], target);
                if (this.isCancelDeSelect) {
                    return;
                }
                this.selectedRowIndexes.splice(this.selectedRowIndexes.indexOf(rowIndex), 1);
                this.selectedRecords.splice(this.selectedRecords.indexOf(selectedRow), 1);
                selectedRow.removeAttribute('aria-selected');
                this.addRemoveClassesForRow(selectedRow, false, null, 'e-selectionbackground', 'e-active');
                if (selectedMovableRow) {
                    this.selectedRecords.splice(this.selectedRecords.indexOf(selectedMovableRow), 1);
                    selectedMovableRow.removeAttribute('aria-selected');
                    this.addRemoveClassesForRow(selectedMovableRow, false, null, 'e-selectionbackground', 'e-active');
                }
                this.rowDeselect(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDeselected"], [rowIndex], [rowObj.data], [selectedRow], [rowObj.foreignKeyData], target, [selectedMovableRow]);
                this.isInteracted = false;
            }
            else {
                args = {
                    data: rowObj.data, rowIndex: rowIndex, row: selectedRow, target: this.actualTarget,
                    prevRow: gObj.getRows()[this.prevRowIndex], previousRowIndex: this.prevRowIndex,
                    isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,
                    foreignKeyData: rowObj.foreignKeyData
                };
                args = this.addMovableArgs(args, selectedMovableRow);
                this.onActionBegin(args, _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelecting"]);
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args) && args[can] === true) {
                    return;
                }
                if (this.isSingleSel()) {
                    this.clearRow();
                }
                this.updateRowSelection(selectedRow, rowIndex);
                if (frzCols) {
                    this.updateRowSelection(selectedMovableRow, rowIndex);
                }
            }
            if (!isUnSelected) {
                args = {
                    data: rowObj.data, rowIndex: rowIndex, row: selectedRow, target: this.actualTarget,
                    prevRow: gObj.getRows()[this.prevRowIndex], previousRowIndex: this.prevRowIndex,
                    foreignKeyData: rowObj.foreignKeyData
                };
                args = this.addMovableArgs(args, selectedMovableRow);
                this.onActionComplete(args, _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelected"]);
            }
            this.updateRowProps(rowIndex);
            if (this.isSingleSel()) {
                break;
            }
        }
    };
    Selection.prototype.getCollectionFromIndexes = function (startIndex, endIndex) {
        var indexes = [];
        var _a = (startIndex <= endIndex) ?
            { i: startIndex, max: endIndex } : { i: endIndex, max: startIndex }, i = _a.i, max = _a.max;
        for (; i <= max; i++) {
            indexes.push(i);
        }
        if (startIndex > endIndex) {
            indexes.reverse();
        }
        return indexes;
    };
    Selection.prototype.clearRow = function () {
        this.clearRowSelection();
        if (this.isCancelDeSelect && this.parent.checkAllRows !== 'Check') {
            return;
        }
        this.selectedRowIndexes = [];
        this.selectedRecords = [];
        this.selectRowIndex(-1);
        if (this.isSingleSel() && this.parent.isPersistSelection) {
            this.selectedRowState = {};
        }
    };
    Selection.prototype.clearSelectedRow = function (index) {
        if (this.target) {
            var selectedEle = this.target.parentElement;
            if (!this.disableUI) {
                selectedEle.removeAttribute('aria-selected');
                this.addRemoveClassesForRow(selectedEle, false, true, 'e-selectionbackground', 'e-active');
            }
            this.updatePersistCollection(selectedEle, false);
            this.updateCheckBoxes(selectedEle);
            this.selectedRowIndexes.splice(this.selectedRowIndexes.indexOf(index), 1);
            this.selectedRecords.splice(this.selectedRecords.indexOf(this.parent.getRowByIndex(index)), 1);
        }
    };
    Selection.prototype.updateRowProps = function (startIndex) {
        this.prevRowIndex = startIndex;
        this.isRowSelected = this.selectedRowIndexes.length && true;
    };
    Selection.prototype.updatePersistCollection = function (selectedRow, chkState) {
        var _this = this;
        if (this.parent.isPersistSelection && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedRow)) {
            var rowObj = this.getRowObj(selectedRow);
            var pKey_1 = rowObj.data ? rowObj.data[this.primaryKey] : null;
            if (pKey_1 === null) {
                return;
            }
            rowObj.isSelected = chkState;
            if (chkState) {
                this.selectedRowState[pKey_1] = chkState;
                if (!this.persistSelectedData.some(function (data) { return data[_this.primaryKey] === pKey_1; })) {
                    this.persistSelectedData.push(rowObj.data);
                }
            }
            else {
                this.updatePersistDelete(pKey_1);
            }
        }
    };
    Selection.prototype.updatePersistDelete = function (pKey) {
        var _this = this;
        delete (this.selectedRowState[pKey]);
        var index;
        var isPresent = this.persistSelectedData.some(function (data, i) {
            index = i;
            return data[_this.primaryKey] === pKey;
        });
        if (isPresent) {
            this.persistSelectedData.splice(index, 1);
        }
    };
    Selection.prototype.updateCheckBoxes = function (row, chkState, rowIndex) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(row)) {
            var chkBox = row.querySelector('.e-checkselect');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(chkBox)) {
                Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["removeAddCboxClasses"])(chkBox.nextElementSibling, chkState);
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkedTarget) || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkedTarget)
                    && !this.checkedTarget.classList.contains('e-checkselectall'))) {
                    this.setCheckAllState(rowIndex);
                }
            }
        }
    };
    Selection.prototype.updateRowSelection = function (selectedRow, startIndex) {
        if (!selectedRow) {
            return;
        }
        this.selectedRowIndexes.push(startIndex);
        var len = this.selectedRowIndexes.length;
        if (this.parent.getFrozenColumns() && len > 1) {
            if ((this.selectedRowIndexes[len - 2] === this.selectedRowIndexes[len - 1])) {
                this.selectedRowIndexes.pop();
            }
        }
        this.selectedRecords.push(selectedRow);
        selectedRow.setAttribute('aria-selected', 'true');
        this.updatePersistCollection(selectedRow, true);
        this.updateCheckBoxes(selectedRow, true);
        this.addRemoveClassesForRow(selectedRow, true, null, 'e-selectionbackground', 'e-active');
        if (!this.preventFocus) {
            var target = this.focus.getPrevIndexes().cellIndex ?
                selectedRow.cells[this.focus.getPrevIndexes().cellIndex] :
                selectedRow.querySelector('.e-selectionbackground:not(.e-hide):not(.e-detailrowcollapse):not(.e-detailrowexpand)');
            if (!target) {
                return;
            }
            this.focus.onClick({ target: target }, true);
        }
    };
    /**
     * Deselects the currently selected rows and cells.
     * @return {void}
     */
    Selection.prototype.clearSelection = function () {
        if (!this.parent.isPersistSelection || (this.parent.isPersistSelection && !this.parent.isEdit) ||
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkedTarget) && this.checkedTarget.classList.contains('e-checkselectall'))) {
            var span = this.parent.element.querySelector('.e-gridpopup').querySelector('span');
            if (span.classList.contains('e-rowselect')) {
                span.classList.remove('e-spanclicked');
            }
            this.isInteracted = false;
            if (this.parent.isPersistSelection) {
                this.persistSelectedData = [];
                this.selectedRowState = {};
            }
            this.clearRowSelection();
            this.clearCellSelection();
            this.enableSelectMultiTouch = false;
        }
    };
    /**
     * Deselects the currently selected rows.
     * @return {void}
     */
    Selection.prototype.clearRowSelection = function () {
        var _this = this;
        if (this.isRowSelected) {
            var gObj = this.parent;
            var rows = this.parent.getDataRows();
            var data = [];
            var row = [];
            var mRow = [];
            var rowIndex = [];
            var frzCols = gObj.getFrozenColumns();
            var foreignKeyData = [];
            var target = this.target;
            var currentViewData = this.parent.getCurrentViewRecords();
            for (var i = 0, len = this.selectedRowIndexes.length; i < len; i++) {
                var currentRow = this.parent.editSettings.mode === 'Batch' ?
                    this.parent.getRows()[this.selectedRowIndexes[i]]
                    : this.parent.getDataRows()[this.selectedRowIndexes[i]];
                var rowObj = this.getRowObj(currentRow);
                if (rowObj) {
                    data.push(rowObj.data);
                    row.push(currentRow);
                    rowIndex.push(this.selectedRowIndexes[i]);
                    foreignKeyData.push(rowObj.foreignKeyData);
                }
                if (frzCols) {
                    mRow.push(gObj.getMovableRows()[this.selectedRowIndexes[i]]);
                }
            }
            if (this.selectionSettings.persistSelection) {
                this.isInteracted = this.checkSelectAllClicked ? true : false;
            }
            this.rowDeselect(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDeselecting"], rowIndex, data, row, foreignKeyData, target, mRow);
            if (this.isCancelDeSelect && (this.isInteracted || this.checkSelectAllClicked)) {
                if (this.parent.isPersistSelection) {
                    if (this.getCheckAllStatus(this.parent.element.querySelector('.e-checkselectall')) === 'Intermediate') {
                        for (var i = 0; i < this.selectedRecords.length; i++) {
                            this.updatePersistCollection(this.selectedRecords[i], true);
                        }
                    }
                    else {
                        this.parent.checkAllRows = 'Check';
                        this.updatePersistSelectedData(true);
                    }
                }
                return;
            }
            rows.filter(function (record) { return record.hasAttribute('aria-selected'); }).forEach(function (ele) {
                if (!_this.disableUI) {
                    ele.removeAttribute('aria-selected');
                    _this.addRemoveClassesForRow(ele, false, true, 'e-selectionbackground', 'e-active');
                }
                _this.updatePersistCollection(ele, false);
                _this.updateCheckBoxes(ele);
            });
            for (var i = 0, len = this.selectedRowIndexes.length; i < len; i++) {
                var movableRow = this.getSelectedMovableRow(this.selectedRowIndexes[i]);
                if (movableRow) {
                    if (!this.disableUI) {
                        movableRow.removeAttribute('aria-selected');
                        this.addRemoveClassesForRow(movableRow, false, true, 'e-selectionbackground', 'e-active');
                    }
                    this.updatePersistCollection(movableRow, false);
                }
            }
            this.selectedRowIndexes = [];
            this.selectedRecords = [];
            this.isRowSelected = false;
            this.selectRowIndex(-1);
            this.rowDeselect(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDeselected"], rowIndex, data, row, foreignKeyData, target, mRow);
            this.isInteracted = false;
        }
    };
    Selection.prototype.rowDeselect = function (type, rowIndex, data, row, foreignKeyData, target, mRow) {
        if ((this.selectionSettings.persistSelection && this.isInteracted) || !this.selectionSettings.persistSelection) {
            var cancl = 'cancel';
            var rowDeselectObj = {
                rowIndex: rowIndex, data: data, row: row, foreignKeyData: foreignKeyData,
                cancel: false, target: target, isInteracted: this.isInteracted
            };
            this.parent.trigger(type, this.parent.getFrozenColumns() ? __assign({}, rowDeselectObj, { mRow: mRow }) : rowDeselectObj);
            this.isCancelDeSelect = rowDeselectObj[cancl];
            if (!this.isCancelDeSelect || (!this.isInteracted && !this.checkSelectAllClicked)) {
                this.updatePersistCollection(row[0], false);
                this.updateCheckBoxes(row[0], undefined, rowIndex[0]);
            }
        }
    };
    Selection.prototype.getRowObj = function (row) {
        if (row === void 0) { row = this.currentIndex; }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(row)) {
            return {};
        }
        if (typeof row === 'number') {
            row = this.parent.getRowByIndex(row);
        }
        if (row) {
            return this.parent.getRowObjectFromUID(row.getAttribute('data-uid')) || {};
        }
        return {};
    };
    Selection.prototype.getSelectedMovableCell = function (cellIndex) {
        var gObj = this.parent;
        var frzCols = gObj.getFrozenColumns();
        if (frzCols) {
            if (cellIndex.cellIndex >= frzCols) {
                return gObj.getMovableCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex));
            }
            return null;
        }
        return null;
    };
    /**
     * Selects a cell by the given index.
     * @param  {IIndex} cellIndex - Defines the row and column indexes.
     * @param  {boolean} isToggle - If set to true, then it toggles the selection.
     * @return {void}
     */
    Selection.prototype.selectCell = function (cellIndex, isToggle) {
        if (!this.isCellType()) {
            return;
        }
        var gObj = this.parent;
        var selectedCell = this.getSelectedMovableCell(cellIndex);
        var args;
        if (!selectedCell) {
            selectedCell = gObj.getCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex));
        }
        var selectedTable;
        var cIdx;
        this.currentIndex = cellIndex.rowIndex;
        var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];
        if (!this.isCellType() || !selectedCell || this.isEditing()) {
            return;
        }
        var isCellSelected = selectedCell.classList.contains('e-cellselectionbackground');
        isToggle = !isToggle ? isToggle : (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.prevCIdxs) &&
            cellIndex.rowIndex === this.prevCIdxs.rowIndex && cellIndex.cellIndex === this.prevCIdxs.cellIndex &&
            isCellSelected);
        if (!isToggle) {
            args = {
                data: selectedData, cellIndex: cellIndex, currentCell: selectedCell,
                isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest, previousRowCellIndex: this.prevECIdxs,
                previousRowCell: this.prevECIdxs ?
                    this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined,
                cancel: false
            };
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelecting"], this.fDataUpdate(args), this.successCallBack(args, isToggle, cellIndex, selectedCell, selectedData));
        }
        else {
            this.successCallBack(args, isToggle, cellIndex, selectedCell, selectedData)(args);
        }
    };
    Selection.prototype.successCallBack = function (cellSelectingArgs, isToggle, cellIndex, selectedCell, selectedData) {
        var _this = this;
        return function (cellSelectingArgs) {
            var cncl = 'cancel';
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cellSelectingArgs) && cellSelectingArgs[cncl] === true) {
                return;
            }
            _this.clearCell();
            if (!isToggle) {
                _this.updateCellSelection(selectedCell, cellIndex.rowIndex, cellIndex.cellIndex);
            }
            _this.updateCellProps(cellIndex, cellIndex);
            if (!isToggle) {
                _this.onActionComplete({
                    data: selectedData, cellIndex: cellIndex, currentCell: selectedCell,
                    previousRowCellIndex: _this.prevECIdxs, selectedRowCellIndex: _this.selectedRowCellIndexes,
                    previousRowCell: _this.prevECIdxs ?
                        _this.getCellIndex(_this.prevECIdxs.rowIndex, _this.prevECIdxs.cellIndex) : undefined
                }, _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelected"]);
            }
        };
    };
    Selection.prototype.getCellIndex = function (rIdx, cIdx) {
        return (this.parent.getFrozenColumns() ? (cIdx >= this.parent.getFrozenColumns() ? this.parent.getMovableCellFromIndex(rIdx, cIdx)
            : this.parent.getCellFromIndex(rIdx, cIdx)) : this.parent.getCellFromIndex(rIdx, cIdx));
    };
    /**
     * Selects a range of cells from start and end indexes.
     * @param  {IIndex} startIndex - Specifies the row and column's start index.
     * @param  {IIndex} endIndex - Specifies the row and column's end index.
     * @return {void}
     */
    Selection.prototype.selectCellsByRange = function (startIndex, endIndex) {
        var _this = this;
        if (!this.isCellType()) {
            return;
        }
        var gObj = this.parent;
        var selectedCell = this.getSelectedMovableCell(startIndex);
        var frzCols = gObj.getFrozenColumns();
        if (!selectedCell) {
            selectedCell = gObj.getCellFromIndex(startIndex.rowIndex, startIndex.cellIndex);
        }
        var min;
        var max;
        var stIndex = startIndex;
        var edIndex = endIndex = endIndex ? endIndex : startIndex;
        var cellIndexes;
        this.currentIndex = startIndex.rowIndex;
        var cncl = 'cancel';
        var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];
        if (this.isSingleSel() || !this.isCellType() || this.isEditing()) {
            return;
        }
        var args = {
            data: selectedData, cellIndex: startIndex, currentCell: selectedCell,
            isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest, previousRowCellIndex: this.prevECIdxs,
            previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined
        };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelecting"], this.fDataUpdate(args), function (cellSelectingArgs) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cellSelectingArgs) && cellSelectingArgs[cncl] === true) {
                return;
            }
            _this.clearCell();
            if (startIndex.rowIndex > endIndex.rowIndex) {
                var temp = startIndex;
                startIndex = endIndex;
                endIndex = temp;
            }
            for (var i = startIndex.rowIndex; i <= endIndex.rowIndex; i++) {
                if (_this.selectionSettings.cellSelectionMode.indexOf('Box') < 0) {
                    min = i === startIndex.rowIndex ? (startIndex.cellIndex) : 0;
                    max = i === endIndex.rowIndex ? (endIndex.cellIndex) : _this.getLastColIndex(i);
                }
                else {
                    min = startIndex.cellIndex;
                    max = endIndex.cellIndex;
                }
                cellIndexes = [];
                for (var j = min < max ? min : max, len = min > max ? min : max; j <= len; j++) {
                    if (frzCols) {
                        if (j < frzCols) {
                            selectedCell = gObj.getCellFromIndex(i, j);
                        }
                        else {
                            selectedCell = gObj.getMovableCellFromIndex(i, j);
                        }
                    }
                    else {
                        selectedCell = gObj.getCellFromIndex(i, j);
                    }
                    if (!selectedCell) {
                        continue;
                    }
                    cellIndexes.push(j);
                    _this.updateCellSelection(selectedCell);
                    _this.addAttribute(selectedCell);
                }
                _this.selectedRowCellIndexes.push({ rowIndex: i, cellIndexes: cellIndexes });
            }
            _this.updateCellProps(stIndex, edIndex);
            _this.onActionComplete({
                data: selectedData, cellIndex: startIndex, currentCell: selectedCell,
                previousRowCellIndex: _this.prevECIdxs, selectedRowCellIndex: _this.selectedRowCellIndexes,
                previousRowCell: _this.prevECIdxs ? _this.getCellIndex(_this.prevECIdxs.rowIndex, _this.prevECIdxs.cellIndex) : undefined
            }, _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelected"]);
        });
    };
    /**
     * Selects a collection of cells by row and column indexes.
     * @param  {ISelectedCell[]} rowCellIndexes - Specifies the row and column indexes.
     * @return {void}
     */
    Selection.prototype.selectCells = function (rowCellIndexes) {
        if (!this.isCellType()) {
            return;
        }
        var gObj = this.parent;
        var selectedCell = this.getSelectedMovableCell(rowCellIndexes[0]);
        var frzCols = gObj.getFrozenColumns();
        if (!selectedCell) {
            selectedCell = gObj.getCellFromIndex(rowCellIndexes[0].rowIndex, rowCellIndexes[0].cellIndexes[0]);
        }
        this.currentIndex = rowCellIndexes[0].rowIndex;
        var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];
        if (this.isSingleSel() || !this.isCellType() || this.isEditing()) {
            return;
        }
        this.onActionBegin({
            data: selectedData, cellIndex: rowCellIndexes[0].cellIndexes[0],
            currentCell: selectedCell, isCtrlPressed: this.isMultiCtrlRequest,
            isShiftPressed: this.isMultiShiftRequest, previousRowCellIndex: this.prevECIdxs,
            previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined
        }, _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelecting"]);
        for (var i = 0, len = rowCellIndexes.length; i < len; i++) {
            for (var j = 0, cellLen = rowCellIndexes[i].cellIndexes.length; j < cellLen; j++) {
                if (frzCols) {
                    if (rowCellIndexes[i].cellIndexes[j] < frzCols) {
                        selectedCell = gObj.getCellFromIndex(rowCellIndexes[i].rowIndex, rowCellIndexes[i].cellIndexes[j]);
                    }
                    else {
                        selectedCell = gObj.getMovableCellFromIndex(rowCellIndexes[i].rowIndex, rowCellIndexes[i].cellIndexes[j]);
                    }
                }
                else {
                    selectedCell = gObj.getCellFromIndex(rowCellIndexes[i].rowIndex, rowCellIndexes[i].cellIndexes[j]);
                }
                if (!selectedCell) {
                    continue;
                }
                this.updateCellSelection(selectedCell);
                this.addAttribute(selectedCell);
                this.addRowCellIndex({ rowIndex: rowCellIndexes[i].rowIndex, cellIndex: rowCellIndexes[i].cellIndexes[j] });
            }
        }
        this.updateCellProps({ rowIndex: rowCellIndexes[0].rowIndex, cellIndex: rowCellIndexes[0].cellIndexes[0] }, { rowIndex: rowCellIndexes[0].rowIndex, cellIndex: rowCellIndexes[0].cellIndexes[0] });
        this.onActionComplete({
            data: selectedData, cellIndex: rowCellIndexes[0].cellIndexes[0],
            currentCell: selectedCell,
            previousRowCellIndex: this.prevECIdxs, selectedRowCellIndex: this.selectedRowCellIndexes,
            previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined
        }, _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelected"]);
    };
    /**
     * Select cells with existing cell selection by passing row and column index.
     * @param  {IIndex} startIndex - Defines the collection of row and column index.
     * @return {void}
     * @hidden
     */
    Selection.prototype.addCellsToSelection = function (cellIndexes) {
        if (!this.isCellType()) {
            return;
        }
        var gObj = this.parent;
        var selectedTable;
        var cIdx;
        var selectedCell;
        var frzCols = gObj.getFrozenColumns();
        var index;
        this.currentIndex = cellIndexes[0].rowIndex;
        var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];
        if (this.isSingleSel() || !this.isCellType() || this.isEditing()) {
            return;
        }
        this.hideAutoFill();
        var rowObj;
        if (frzCols && cellIndexes[0].cellIndex >= frzCols) {
            rowObj = gObj.getMovableRowsObject()[cellIndexes[0].rowIndex];
        }
        else {
            rowObj = this.getRowObj(cellIndexes[0].rowIndex);
        }
        var foreignKeyData = [];
        for (var _i = 0, cellIndexes_1 = cellIndexes; _i < cellIndexes_1.length; _i++) {
            var cellIndex = cellIndexes_1[_i];
            for (var i = 0, len = this.selectedRowCellIndexes.length; i < len; i++) {
                if (this.selectedRowCellIndexes[i].rowIndex === cellIndex.rowIndex) {
                    index = i;
                    break;
                }
            }
            selectedCell = this.getSelectedMovableCell(cellIndex);
            if (!selectedCell) {
                selectedCell = gObj.getCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex));
            }
            foreignKeyData.push(rowObj.cells[frzCols && cellIndexes[0].cellIndex >= frzCols
                ? cellIndex.cellIndex - frzCols : cellIndex.cellIndex].foreignKeyData);
            var args = {
                data: selectedData, cellIndex: cellIndexes[0],
                isShiftPressed: this.isMultiShiftRequest, previousRowCellIndex: this.prevECIdxs,
                currentCell: selectedCell, isCtrlPressed: this.isMultiCtrlRequest,
                previousRowCell: this.prevECIdxs ?
                    gObj.getCellFromIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined,
            };
            var isUnSelected = index > -1;
            if (isUnSelected) {
                var selectedCellIdx = this.selectedRowCellIndexes[index].cellIndexes;
                if (selectedCellIdx.indexOf(cellIndex.cellIndex) > -1) {
                    this.cellDeselect(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellDeselecting"], [{ rowIndex: cellIndex.rowIndex, cellIndexes: [cellIndex.cellIndex] }], selectedData, [selectedCell], foreignKeyData);
                    selectedCellIdx.splice(selectedCellIdx.indexOf(cellIndex.cellIndex), 1);
                    if (selectedCellIdx.length === 0) {
                        this.selectedRowCellIndexes.splice(index, 1);
                    }
                    selectedCell.classList.remove('e-cellselectionbackground');
                    selectedCell.removeAttribute('aria-selected');
                    this.cellDeselect(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellDeselected"], [{ rowIndex: cellIndex.rowIndex, cellIndexes: [cellIndex.cellIndex] }], selectedData, [selectedCell], foreignKeyData);
                }
                else {
                    isUnSelected = false;
                    this.onActionBegin(args, _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelecting"]);
                    this.addRowCellIndex({ rowIndex: cellIndex.rowIndex, cellIndex: cellIndex.cellIndex });
                    this.updateCellSelection(selectedCell);
                    this.addAttribute(selectedCell);
                }
            }
            else {
                this.onActionBegin(args, _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelecting"]);
                this.updateCellSelection(selectedCell, cellIndex.rowIndex, cellIndex.cellIndex);
            }
            this.updateCellProps(cellIndex, cellIndex);
            if (!isUnSelected) {
                this.onActionComplete({
                    data: selectedData, cellIndex: cellIndexes[0], currentCell: selectedCell,
                    previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) :
                        undefined, previousRowCellIndex: this.prevECIdxs, selectedRowCellIndex: this.selectedRowCellIndexes
                }, _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelected"]);
            }
        }
    };
    Selection.prototype.getColIndex = function (rowIndex, index) {
        var cells;
        var frzCols = this.parent.getFrozenColumns();
        if (frzCols) {
            if (index >= frzCols) {
                cells = this.parent.getMovableDataRows()[rowIndex] &&
                    this.parent.getMovableDataRows()[rowIndex].querySelectorAll('td.e-rowcell');
            }
        }
        if (!cells) {
            cells = this.parent.getDataRows()[rowIndex] &&
                this.parent.getDataRows()[rowIndex].querySelectorAll('td.e-rowcell');
        }
        if (cells) {
            for (var m = 0; m < cells.length; m++) {
                var colIndex = parseInt(cells[m].getAttribute('aria-colindex'), 10);
                if (colIndex === index) {
                    if (frzCols) {
                        if (index >= frzCols) {
                            m += frzCols;
                        }
                    }
                    return m;
                }
            }
        }
        return -1;
    };
    Selection.prototype.getLastColIndex = function (rowIndex) {
        var cells = this.parent.getFrozenColumns() ? this.parent.getMovableDataRows()[rowIndex].querySelectorAll('td.e-rowcell')
            : this.parent.getDataRows()[rowIndex].querySelectorAll('td.e-rowcell');
        return parseInt(cells[cells.length - 1].getAttribute('aria-colindex'), 10);
    };
    Selection.prototype.clearCell = function () {
        this.clearCellSelection();
    };
    Selection.prototype.cellDeselect = function (type, cellIndexes, data, cells, foreignKeyData) {
        var cancl = 'cancel';
        if (cells[0] && cells[0].classList.contains('e-gridchkbox')) {
            this.updateCheckBoxes(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(cells[0], 'tr'));
        }
        var args = {
            cells: cells, data: data, cellIndexes: cellIndexes, foreignKeyData: foreignKeyData, cancel: false
        };
        this.parent.trigger(type, args);
        this.isPreventCellSelect = args[cancl];
    };
    Selection.prototype.updateCellSelection = function (selectedCell, rowIndex, cellIndex) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(rowIndex)) {
            this.addRowCellIndex({ rowIndex: rowIndex, cellIndex: cellIndex });
        }
        selectedCell.classList.add('e-cellselectionbackground');
        if (selectedCell.classList.contains('e-gridchkbox')) {
            this.updateCheckBoxes(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(selectedCell, 'tr'), true);
        }
        this.addAttribute(selectedCell);
    };
    Selection.prototype.addAttribute = function (cell) {
        this.target = cell;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cell)) {
            cell.setAttribute('aria-selected', 'true');
            if (!this.preventFocus) {
                this.focus.onClick({ target: cell }, true);
            }
        }
    };
    Selection.prototype.updateCellProps = function (startIndex, endIndex) {
        this.prevCIdxs = startIndex;
        this.prevECIdxs = endIndex;
        this.isCellSelected = this.selectedRowCellIndexes.length && true;
    };
    Selection.prototype.addRowCellIndex = function (rowCellIndex) {
        var isRowAvail;
        var index;
        for (var i = 0, len = this.selectedRowCellIndexes.length; i < len; i++) {
            if (this.selectedRowCellIndexes[i].rowIndex === rowCellIndex.rowIndex) {
                isRowAvail = true;
                index = i;
                break;
            }
        }
        if (isRowAvail) {
            if (this.selectedRowCellIndexes[index].cellIndexes.indexOf(rowCellIndex.cellIndex) < 0) {
                this.selectedRowCellIndexes[index].cellIndexes.push(rowCellIndex.cellIndex);
            }
        }
        else {
            this.selectedRowCellIndexes.push({ rowIndex: rowCellIndex.rowIndex, cellIndexes: [rowCellIndex.cellIndex] });
        }
    };
    /**
     * Deselects the currently selected cells.
     * @return {void}
     */
    Selection.prototype.clearCellSelection = function () {
        if (this.isCellSelected) {
            var gObj = this.parent;
            var selectedCells = this.getSelectedCellsElement();
            var rowCell = this.selectedRowCellIndexes;
            var data = [];
            var cells = [];
            var foreignKeyData = [];
            var currentViewData = this.getCurrentBatchRecordChanges();
            var selectedTable = void 0;
            var frzCols = gObj.getFrozenColumns();
            this.hideAutoFill();
            for (var i = 0, len = rowCell.length; i < len; i++) {
                data.push(currentViewData[rowCell[i].rowIndex]);
                var rowObj = this.getRowObj(rowCell[i].rowIndex);
                for (var j = 0, cLen = rowCell[i].cellIndexes.length; j < cLen; j++) {
                    if (frzCols) {
                        if (rowCell[i].cellIndexes[j] < frzCols) {
                            cells.push(gObj.getCellFromIndex(rowCell[i].rowIndex, rowCell[i].cellIndexes[j]));
                        }
                        else {
                            cells.push(gObj.getMovableCellFromIndex(rowCell[i].rowIndex, rowCell[i].cellIndexes[j]));
                        }
                    }
                    else {
                        if (rowObj.cells) {
                            foreignKeyData.push(rowObj.cells[rowCell[i].cellIndexes[j]].foreignKeyData);
                        }
                        cells.push(gObj.getCellFromIndex(rowCell[i].rowIndex, rowCell[i].cellIndexes[j]));
                    }
                }
            }
            this.cellDeselect(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellDeselecting"], rowCell, data, cells, foreignKeyData);
            if (this.isPreventCellSelect === true) {
                return;
            }
            for (var i = 0, len = selectedCells.length; i < len; i++) {
                selectedCells[i].classList.remove('e-cellselectionbackground');
                selectedCells[i].removeAttribute('aria-selected');
            }
            if (this.bdrBottom) {
                this.hideBorders();
            }
            this.selectedRowCellIndexes = [];
            this.isCellSelected = false;
            this.cellDeselect(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellDeselected"], rowCell, data, cells, foreignKeyData);
        }
    };
    Selection.prototype.getSelectedCellsElement = function () {
        var gObj = this.parent;
        var rows = gObj.getDataRows();
        var mRows;
        if (gObj.getFrozenColumns()) {
            mRows = gObj.getMovableDataRows();
            rows = gObj.addMovableRows(rows, mRows);
        }
        var cells = [];
        for (var i = 0, len = rows.length; i < len; i++) {
            cells = cells.concat([].slice.call(rows[i].querySelectorAll('.e-cellselectionbackground')));
        }
        return cells;
    };
    Selection.prototype.mouseMoveHandler = function (e) {
        e.preventDefault();
        var gBRect = this.parent.element.getBoundingClientRect();
        var x1 = this.x;
        var y1 = this.y;
        var position = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getPosition"])(e);
        var x2 = position.x - gBRect.left;
        var y2 = position.y - gBRect.top;
        var tmp;
        var target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'tr');
        this.isDragged = true;
        if (!this.isCellDrag) {
            if (!target) {
                target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(document.elementFromPoint(this.parent.element.offsetLeft + 2, e.clientY), 'tr');
            }
            if (x1 > x2) {
                tmp = x2;
                x2 = x1;
                x1 = tmp;
            }
            if (y1 > y2) {
                tmp = y2;
                y2 = y1;
                y1 = tmp;
            }
            this.element.style.left = x1 + 'px';
            this.element.style.top = y1 + 'px';
            this.element.style.width = x2 - x1 + 'px';
            this.element.style.height = y2 - y1 + 'px';
        }
        if (target && !e.ctrlKey && !e.shiftKey) {
            var rowIndex = parseInt(target.getAttribute('aria-rowindex'), 10);
            if (!this.isCellDrag) {
                this.hideAutoFill();
                this.selectRowsByRange(this.startDIndex, rowIndex);
            }
            else {
                var td = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-rowcell');
                if (td) {
                    this.startAFCell = this.startCell;
                    this.endAFCell = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-rowcell');
                    this.selectLikeExcel(e, rowIndex, parseInt(td.getAttribute('aria-colindex'), 10));
                }
            }
        }
    };
    Selection.prototype.selectLikeExcel = function (e, rowIndex, cellIndex) {
        if (!this.isAutoFillSel) {
            this.clearCellSelection();
            this.selectCellsByRange({ rowIndex: this.startDIndex, cellIndex: this.startDCellIndex }, { rowIndex: rowIndex, cellIndex: cellIndex });
            this.drawBorders();
        }
        else { //Autofill
            this.showAFBorders();
            this.selectLikeAutoFill(e);
        }
    };
    Selection.prototype.drawBorders = function () {
        if (this.selectionSettings.cellSelectionMode === 'BoxWithBorder' && this.selectedRowCellIndexes.length && !this.parent.isEdit) {
            if (!this.bdrBottom) {
                this.createBorders();
            }
            this.positionBorders();
        }
        else {
            this.hideBorders();
        }
    };
    Selection.prototype.positionBorders = function () {
        this.updateStartEndCells();
        if (!this.startCell || !this.bdrLeft || !this.selectedRowCellIndexes.length) {
            return;
        }
        this.showBorders();
        var stOff = this.startCell.getBoundingClientRect();
        var endOff = this.endCell.getBoundingClientRect();
        var parentOff = this.startCell.offsetParent.getBoundingClientRect();
        this.bdrLeft.style.left = stOff.left - parentOff.left + 'px';
        this.bdrLeft.style.top = stOff.top - parentOff.top + 'px';
        this.bdrLeft.style.height = endOff.top - stOff.top > 0 ?
            (endOff.top - parentOff.top + endOff.height + 1) - (stOff.top - parentOff.top) + 'px' : endOff.height + 'px';
        this.bdrRight.style.left = endOff.left - parentOff.left + endOff.width + 'px';
        this.bdrRight.style.top = this.bdrLeft.style.top;
        this.bdrRight.style.height = this.bdrLeft.style.height;
        this.bdrTop.style.left = this.bdrLeft.style.left;
        this.bdrTop.style.top = this.bdrRight.style.top;
        this.bdrTop.style.width = parseInt(this.bdrRight.style.left, 10) - parseInt(this.bdrLeft.style.left, 10) + 1 + 'px';
        this.bdrBottom.style.left = this.bdrLeft.style.left;
        this.bdrBottom.style.top = parseInt(this.bdrLeft.style.top, 10) + parseInt(this.bdrLeft.style.height, 10) + 'px';
        this.bdrBottom.style.width = this.bdrTop.style.width;
    };
    Selection.prototype.createBorders = function () {
        if (!this.bdrLeft) {
            this.bdrLeft = this.parent.getContentTable().parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-xlsel', id: this.parent.element.id + '_bdrleft', styles: 'width: 2px;' }));
            this.bdrRight = this.parent.getContentTable().parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-xlsel', id: this.parent.element.id + '_bdrright', styles: 'width: 2px;' }));
            this.bdrBottom = this.parent.getContentTable().parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-xlsel', id: this.parent.element.id + '_bdrbottom', styles: 'height: 2px;' }));
            this.bdrTop = this.parent.getContentTable().parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-xlsel', id: this.parent.element.id + '_bdrtop', styles: 'height: 2px;' }));
        }
    };
    Selection.prototype.showBorders = function () {
        if (this.bdrLeft) {
            this.bdrLeft.style.display = '';
            this.bdrRight.style.display = '';
            this.bdrBottom.style.display = '';
            this.bdrTop.style.display = '';
        }
    };
    Selection.prototype.hideBorders = function () {
        if (this.bdrLeft) {
            this.bdrLeft.style.display = 'none';
            this.bdrRight.style.display = 'none';
            this.bdrBottom.style.display = 'none';
            this.bdrTop.style.display = 'none';
        }
    };
    Selection.prototype.drawAFBorders = function () {
        if (!this.bdrAFBottom) {
            this.createAFBorders();
        }
        this.positionAFBorders();
    };
    Selection.prototype.positionAFBorders = function () {
        if (!this.startCell || !this.bdrAFLeft) {
            return;
        }
        this.showBorders();
        var stOff = this.startAFCell.getBoundingClientRect();
        var endOff = this.endAFCell.getBoundingClientRect();
        var parentOff = this.startAFCell.offsetParent.getBoundingClientRect();
        this.bdrAFLeft.style.left = stOff.left - parentOff.left + 'px';
        this.bdrAFLeft.style.top = stOff.top - parentOff.top + 'px';
        this.bdrAFLeft.style.height = endOff.top - stOff.top > 0 ?
            (endOff.top - parentOff.top + endOff.height + 1) - (stOff.top - parentOff.top) + 'px' : endOff.height + 'px';
        this.bdrAFRight.style.left = endOff.left - parentOff.left + endOff.width + 'px';
        this.bdrAFRight.style.top = this.bdrAFLeft.style.top;
        this.bdrAFRight.style.height = this.bdrAFLeft.style.height;
        this.bdrAFTop.style.left = this.bdrAFLeft.style.left;
        this.bdrAFTop.style.top = this.bdrAFRight.style.top;
        this.bdrAFTop.style.width = parseInt(this.bdrAFRight.style.left, 10) - parseInt(this.bdrAFLeft.style.left, 10) + 1 + 'px';
        this.bdrAFBottom.style.left = this.bdrAFLeft.style.left;
        this.bdrAFBottom.style.top = parseInt(this.bdrAFLeft.style.top, 10) + parseInt(this.bdrAFLeft.style.height, 10) + 'px';
        this.bdrAFBottom.style.width = this.bdrAFTop.style.width;
    };
    Selection.prototype.createAFBorders = function () {
        if (!this.bdrAFLeft) {
            this.bdrAFLeft = this.parent.getContentTable().parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-xlsel', id: this.parent.element.id + '_bdrafleft', styles: 'width: 2px;' }));
            this.bdrAFRight = this.parent.getContentTable().parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-xlsel', id: this.parent.element.id + '_bdrafright', styles: 'width: 2px;' }));
            this.bdrAFBottom = this.parent.getContentTable().parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-xlsel', id: this.parent.element.id + '_bdrafbottom', styles: 'height: 2px;' }));
            this.bdrAFTop = this.parent.getContentTable().parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-xlsel', id: this.parent.element.id + '_bdraftop', styles: 'height: 2px;' }));
        }
    };
    Selection.prototype.showAFBorders = function () {
        if (this.bdrAFLeft) {
            this.bdrAFLeft.style.display = '';
            this.bdrAFRight.style.display = '';
            this.bdrAFBottom.style.display = '';
            this.bdrAFTop.style.display = '';
        }
    };
    Selection.prototype.hideAFBorders = function () {
        if (this.bdrAFLeft) {
            this.bdrAFLeft.style.display = 'none';
            this.bdrAFRight.style.display = 'none';
            this.bdrAFBottom.style.display = 'none';
            this.bdrAFTop.style.display = 'none';
        }
    };
    Selection.prototype.updateValue = function (rIdx, cIdx, cell) {
        var col = this.parent.getColumnByIndex(cIdx);
        if (this.parent.editModule && cell) {
            if (col.type === 'number') {
                this.parent.editModule.updateCell(rIdx, col.field, parseInt(cell.textContent, 10));
            }
            else {
                this.parent.editModule.updateCell(rIdx, col.field, cell.textContent);
            }
        }
    };
    /* tslint:disable-next-line:max-func-body-length */
    Selection.prototype.selectLikeAutoFill = function (e, isApply) {
        var startrowIdx = parseInt(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(this.startAFCell, 'e-row').getAttribute('aria-rowindex'), 10);
        var startCellIdx = parseInt(this.startAFCell.getAttribute('aria-colindex'), 10);
        var endrowIdx = parseInt(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(this.endAFCell, 'e-row').getAttribute('aria-rowindex'), 10);
        var endCellIdx = parseInt(this.endAFCell.getAttribute('aria-colindex'), 10);
        var rowLen = this.selectedRowCellIndexes.length - 1;
        var colLen = this.selectedRowCellIndexes[0].cellIndexes.length - 1;
        var col;
        switch (true) { //direction         
            case !isApply && this.endAFCell.classList.contains('e-cellselectionbackground') &&
                !!Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-rowcell'):
                this.startAFCell = this.parent.getCellFromIndex(startrowIdx, startCellIdx);
                this.endAFCell = this.parent.getCellFromIndex(startrowIdx + rowLen, startCellIdx + colLen);
                this.drawAFBorders();
                break;
            case startCellIdx + colLen < endCellIdx && //right
                endCellIdx - startCellIdx - colLen + 1 > endrowIdx - startrowIdx - rowLen // right bottom
                && endCellIdx - startCellIdx - colLen + 1 > startrowIdx - endrowIdx: //right top
                this.endAFCell = this.parent.getCellFromIndex(startrowIdx + rowLen, endCellIdx);
                endrowIdx = parseInt(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(this.endAFCell, 'e-row').getAttribute('aria-rowindex'), 10);
                endCellIdx = parseInt(this.endAFCell.getAttribute('aria-colindex'), 10);
                if (!isApply) {
                    this.drawAFBorders();
                }
                else {
                    var cellIdx = parseInt(this.endCell.getAttribute('aria-colindex'), 10);
                    for (var i = startrowIdx; i <= endrowIdx; i++) {
                        var cells = [].slice.call(this.parent.getDataRows()[i].querySelectorAll('.e-cellselectionbackground'));
                        var c = 0;
                        for (var j = cellIdx + 1; j <= endCellIdx; j++) {
                            if (c > colLen) {
                                c = 0;
                            }
                            this.updateValue(i, j, cells[c]);
                            c++;
                        }
                    }
                    this.selectCellsByRange({ rowIndex: startrowIdx, cellIndex: this.startCellIndex }, { rowIndex: endrowIdx, cellIndex: endCellIdx });
                }
                break;
            case startCellIdx > endCellIdx && // left
                startCellIdx - endCellIdx + 1 > endrowIdx - startrowIdx - rowLen && //left top
                startCellIdx - endCellIdx + 1 > startrowIdx - endrowIdx: // left bottom
                this.startAFCell = this.parent.getCellFromIndex(startrowIdx, endCellIdx);
                this.endAFCell = this.endCell;
                if (!isApply) {
                    this.drawAFBorders();
                }
                else {
                    for (var i = startrowIdx; i <= startrowIdx + rowLen; i++) {
                        var cells = [].slice.call(this.parent.getDataRows()[i].querySelectorAll('.e-cellselectionbackground'));
                        cells.reverse();
                        var c = 0;
                        for (var j = this.startCellIndex - 1; j >= endCellIdx; j--) {
                            if (c > colLen) {
                                c = 0;
                            }
                            this.updateValue(i, j, cells[c]);
                            c++;
                        }
                    }
                    this.selectCellsByRange({ rowIndex: startrowIdx, cellIndex: endCellIdx }, { rowIndex: startrowIdx + rowLen, cellIndex: this.startCellIndex + colLen });
                }
                break;
            case startrowIdx > endrowIdx: //up
                this.startAFCell = this.parent.getCellFromIndex(endrowIdx, startCellIdx);
                this.endAFCell = this.endCell;
                if (!isApply) {
                    this.drawAFBorders();
                }
                else {
                    var trIdx = parseInt(this.endCell.parentElement.getAttribute('aria-rowindex'), 10);
                    var r = trIdx;
                    for (var i = startrowIdx - 1; i >= endrowIdx; i--) {
                        if (r === this.startIndex - 1) {
                            r = trIdx;
                        }
                        var cells = [].slice.call(this.parent.getDataRows()[r].querySelectorAll('.e-cellselectionbackground'));
                        var c = 0;
                        r--;
                        for (var j = this.startCellIndex; j <= this.startCellIndex + colLen; j++) {
                            this.updateValue(i, j, cells[c]);
                            c++;
                        }
                    }
                    this.selectCellsByRange({ rowIndex: endrowIdx, cellIndex: startCellIdx + colLen }, { rowIndex: startrowIdx + rowLen, cellIndex: startCellIdx });
                }
                break;
            default: //down
                this.endAFCell = this.parent.getCellFromIndex(endrowIdx, startCellIdx + colLen);
                if (!isApply) {
                    this.drawAFBorders();
                }
                else {
                    var trIdx = parseInt(this.endCell.parentElement.getAttribute('aria-rowindex'), 10);
                    var r = this.startIndex;
                    for (var i = trIdx + 1; i <= endrowIdx; i++) {
                        if (r === trIdx + 1) {
                            r = this.startIndex;
                        }
                        var cells = [].slice.call(this.parent.getDataRows()[r].querySelectorAll('.e-cellselectionbackground'));
                        r++;
                        var c = 0;
                        for (var m = this.startCellIndex; m <= this.startCellIndex + colLen; m++) {
                            this.updateValue(i, m, cells[c]);
                            c++;
                        }
                    }
                    this.selectCellsByRange({ rowIndex: trIdx - rowLen, cellIndex: startCellIdx }, { rowIndex: endrowIdx, cellIndex: startCellIdx + colLen });
                }
                break;
        }
    };
    Selection.prototype.mouseUpHandler = function (e) {
        document.body.classList.remove('e-disableuserselect');
        if (this.element) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
        }
        if (this.isDragged && this.selectedRowCellIndexes.length === 1 && this.selectedRowCellIndexes[0].cellIndexes.length === 1) {
            this.mUPTarget = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-rowcell');
        }
        else {
            this.mUPTarget = null;
        }
        this.isDragged = false;
        this.updateAutoFillPosition();
        if (this.isAutoFillSel) {
            this.startAFCell = this.startCell;
            this.endAFCell = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-rowcell');
            this.updateStartCellsIndex();
            this.selectLikeAutoFill(e, true);
            this.updateAutoFillPosition();
            this.hideAFBorders();
            this.positionBorders();
            this.isAutoFillSel = false;
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.getContent(), 'mousemove', this.mouseMoveHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document.body, 'mouseup', this.mouseUpHandler);
    };
    Selection.prototype.hideAutoFill = function () {
        if (this.autofill) {
            this.autofill.style.display = 'none';
        }
    };
    /**
     * @hidden
     */
    Selection.prototype.updateAutoFillPosition = function () {
        if (this.parent.enableAutoFill && !this.parent.isEdit &&
            this.selectionSettings.cellSelectionMode.indexOf('Box') > -1 && !this.isRowType() && !this.isSingleSel()
            && this.selectedRowCellIndexes.length) {
            var cells = [].slice.call(this.parent.getDataRows()[this.selectedRowCellIndexes[this.selectedRowCellIndexes.length - 1].rowIndex].querySelectorAll('.e-cellselectionbackground'));
            if (!this.parent.element.querySelector('#' + this.parent.element.id + '_autofill')) {
                this.autofill = this.parent.getContentTable().parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-autofill', id: this.parent.element.id + '_autofill' }));
            }
            var cell = cells[cells.length - 1];
            if (cell && cell.offsetParent) {
                var clientRect = cell.getBoundingClientRect();
                var parentOff = cell.offsetParent.getBoundingClientRect();
                this.autofill.style.left = clientRect.left - parentOff.left + clientRect.width - 3 + 'px';
                this.autofill.style.top = clientRect.top - parentOff.top + clientRect.height - 3 + 'px';
            }
            this.autofill.style.display = '';
        }
        else {
            this.hideAutoFill();
        }
    };
    Selection.prototype.mouseDownHandler = function (e) {
        var target = e.target;
        var gObj = this.parent;
        var isDrag;
        var gridElement = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(target, 'e-grid');
        if (gridElement && gridElement.id !== gObj.element.id) {
            return;
        }
        if (e.shiftKey || e.ctrlKey) {
            e.preventDefault();
        }
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(target, 'e-rowcell') && !e.shiftKey && !e.ctrlKey) {
            if (gObj.selectionSettings.cellSelectionMode.indexOf('Box') > -1 && !this.isRowType() && !this.isSingleSel()) {
                this.isCellDrag = true;
                isDrag = true;
            }
            else if (gObj.allowRowDragAndDrop) {
                if (!this.isRowType() || this.isSingleSel() || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'td').classList.contains('e-selectionbackground')) {
                    this.isDragged = false;
                    return;
                }
                isDrag = true;
                this.element = this.parent.createElement('div', { className: 'e-griddragarea' });
                gObj.getContent().appendChild(this.element);
            }
            if (isDrag) {
                this.enableDrag(e, true);
            }
        }
        this.updateStartEndCells();
        if (target.classList.contains('e-autofill')) {
            this.isCellDrag = true;
            this.isAutoFillSel = true;
            this.enableDrag(e);
        }
    };
    Selection.prototype.updateStartEndCells = function () {
        var cells = [].slice.call(this.parent.element.querySelectorAll('.e-cellselectionbackground'));
        this.startCell = cells[0];
        this.endCell = cells[cells.length - 1];
        if (this.startCell) {
            this.startIndex = parseInt(this.startCell.parentElement.getAttribute('aria-rowindex'), 10);
            this.startCellIndex = parseInt(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(this.startCell, 'e-rowcell').getAttribute('aria-colindex'), 10);
        }
    };
    Selection.prototype.updateStartCellsIndex = function () {
        if (this.startCell) {
            this.startIndex = parseInt(this.startCell.parentElement.getAttribute('aria-rowindex'), 10);
            this.startCellIndex = parseInt(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(this.startCell, 'e-rowcell').getAttribute('aria-colindex'), 10);
        }
    };
    Selection.prototype.enableDrag = function (e, isUpdate) {
        var gObj = this.parent;
        if (isUpdate) {
            var tr = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'tr');
            this.startDIndex = parseInt(tr.getAttribute('aria-rowindex'), 10);
            this.startDCellIndex = parseInt(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(e.target, 'e-rowcell').getAttribute('aria-colindex'), 10);
        }
        document.body.classList.add('e-disableuserselect');
        var gBRect = gObj.element.getBoundingClientRect();
        var postion = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getPosition"])(e);
        this.x = postion.x - gBRect.left;
        this.y = postion.y - gBRect.top;
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(gObj.getContent(), 'mousemove', this.mouseMoveHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document.body, 'mouseup', this.mouseUpHandler, this);
    };
    Selection.prototype.clearSelAfterRefresh = function (e) {
        if (e.requestType !== 'virtualscroll' && !this.parent.isPersistSelection) {
            this.clearSelection();
        }
    };
    /**
     * @hidden
     */
    Selection.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["uiUpdate"], this.enableAfterRender, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["initialEnd"], this.initializeSelection, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelectionComplete"], this.onActionComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelectionComplete"], this.onActionComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["inBoundModelChanged"], this.onPropertyChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellFocused"], this.onCellFocused, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeFragAppend"], this.clearSelAfterRefresh, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["columnPositionChanged"], this.columnPositionChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], this.initialEnd, this);
        this.actionBeginFunction = this.actionBegin.bind(this);
        this.actionCompleteFunction = this.actionComplete.bind(this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionBegin"], this.actionBeginFunction);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"], this.actionCompleteFunction);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowsRemoved"], this.rowsRemoved, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["headerRefreshed"], this.refreshHeader, this);
        this.addEventListener_checkbox();
    };
    /**
     * @hidden
     */
    Selection.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["uiUpdate"], this.enableAfterRender);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["initialEnd"], this.initializeSelection);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelectionComplete"], this.onActionComplete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelectionComplete"], this.onActionComplete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["inBoundModelChanged"], this.onPropertyChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["cellFocused"], this.onCellFocused);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeFragAppend"], this.clearSelAfterRefresh);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["columnPositionChanged"], this.columnPositionChanged);
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionBegin"], this.actionBeginFunction);
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"], this.actionCompleteFunction);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["rowsRemoved"], this.rowsRemoved);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["headerRefreshed"], this.refreshHeader);
        this.removeEventListener_checkbox();
    };
    Selection.prototype.wireEvents = function () {
        this.isMacOS = navigator.userAgent.indexOf('Mac OS') !== -1;
        if (this.isMacOS) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.element, 'keydown', this.keyDownHandler, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.element, 'keyup', this.keyUpHandler, this);
        }
    };
    Selection.prototype.unWireEvents = function () {
        if (this.isMacOS) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.element, 'keydown', this.keyDownHandler);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.element, 'keyup', this.keyUpHandler);
        }
    };
    Selection.prototype.columnPositionChanged = function () {
        if (!this.parent.isPersistSelection) {
            this.clearSelection();
        }
    };
    Selection.prototype.refreshHeader = function () {
        this.setCheckAllState();
    };
    Selection.prototype.rowsRemoved = function (e) {
        for (var i = 0; i < e.records.length; i++) {
            delete (this.selectedRowState[e.records[i][this.primaryKey]]);
            --this.totalRecordsCount;
        }
        this.setCheckAllState();
    };
    ;
    Selection.prototype.beforeFragAppend = function (e) {
        if (e.requestType !== 'virtualscroll' && !this.parent.isPersistSelection) {
            this.clearSelection();
        }
    };
    ;
    Selection.prototype.getCheckAllBox = function () {
        return this.parent.getHeaderContent().querySelector('.e-checkselectall');
    };
    Selection.prototype.enableAfterRender = function (e) {
        if (e.module === this.getModuleName() && e.enable) {
            this.render();
        }
    };
    Selection.prototype.render = function (e) {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.getContent(), 'mousedown', this.mouseDownHandler, this);
    };
    Selection.prototype.onPropertyChanged = function (e) {
        if (e.module !== this.getModuleName()) {
            return;
        }
        var gObj = this.parent;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.properties.type) && this.selectionSettings.type === 'Single') {
            if (this.selectedRowCellIndexes.length > 1) {
                this.clearCellSelection();
                this.prevCIdxs = undefined;
            }
            if (this.selectedRowIndexes.length > 1) {
                this.clearRowSelection();
                this.prevRowIndex = undefined;
            }
            this.enableSelectMultiTouch = false;
            this.hidePopUp();
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.properties.mode) ||
            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.properties.cellSelectionMode)) {
            this.clearSelection();
            this.prevRowIndex = undefined;
            this.prevCIdxs = undefined;
        }
        this.isPersisted = true;
        this.checkBoxSelectionChanged();
        this.isPersisted = false;
        this.initPerisistSelection();
        var checkboxColumn = this.parent.getColumns().filter(function (col) { return col.type === 'checkbox'; });
        if (checkboxColumn.length) {
            gObj.isCheckBoxSelection = !(this.selectionSettings.checkboxMode === 'ResetOnRowClick');
        }
        this.drawBorders();
    };
    Selection.prototype.hidePopUp = function () {
        if (this.parent.element.querySelector('.e-gridpopup').querySelectorAll('.e-rowselect').length) {
            this.parent.element.querySelector('.e-gridpopup').style.display = 'none';
        }
    };
    Selection.prototype.initialEnd = function () {
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], this.initialEnd);
        this.selectRow(this.parent.selectedRowIndex);
    };
    Selection.prototype.checkBoxSelectionChanged = function () {
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], this.checkBoxSelectionChanged);
        var gobj = this.parent;
        var checkboxColumn = gobj.getColumns().filter(function (col) { return col.type === 'checkbox'; });
        if (checkboxColumn.length > 0) {
            gobj.isCheckBoxSelection = true;
            this.chkField = checkboxColumn[0].field;
            this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.totalRecordsCount)) {
                this.totalRecordsCount = this.getCurrentBatchRecordChanges().length;
            }
            if (this.isSingleSel()) {
                gobj.selectionSettings.type = 'Multiple';
                gobj.dataBind();
            }
            else {
                this.initPerisistSelection();
            }
        }
        if (!gobj.isCheckBoxSelection && !this.isPersisted) {
            this.chkField = null;
            this.initPerisistSelection();
        }
    };
    Selection.prototype.initPerisistSelection = function () {
        var gobj = this.parent;
        if (this.parent.selectionSettings.persistSelection && this.parent.getPrimaryKeyFieldNames().length > 0) {
            gobj.isPersistSelection = true;
            this.ensureCheckboxFieldSelection();
        }
        else if (this.parent.getPrimaryKeyFieldNames().length > 0) {
            gobj.isPersistSelection = false;
            this.ensureCheckboxFieldSelection();
        }
        else {
            gobj.isPersistSelection = false;
            this.selectedRowState = {};
        }
    };
    Selection.prototype.ensureCheckboxFieldSelection = function () {
        var gobj = this.parent;
        this.primaryKey = this.parent.getPrimaryKeyFieldNames()[0];
        if (!gobj.enableVirtualization && this.chkField
            && ((gobj.isPersistSelection && Object.keys(this.selectedRowState).length === 0) ||
                !gobj.isPersistSelection)) {
            var data = this.parent.getDataModule();
            var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().where(this.chkField, 'equal', true);
            if (!query.params) {
                query.params = this.parent.query.params;
            }
            var dataManager = data.getData({}, query);
            var proxy_1 = this;
            this.parent.showSpinner();
            dataManager.then(function (e) {
                proxy_1.dataSuccess(e.result);
                proxy_1.refreshPersistSelection();
                proxy_1.parent.hideSpinner();
            });
        }
    };
    Selection.prototype.dataSuccess = function (res) {
        for (var i = 0; i < res.length; i++) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedRowState[res[i][this.primaryKey]]) && res[i][this.chkField]) {
                this.selectedRowState[res[i][this.primaryKey]] = res[i][this.chkField];
            }
        }
        this.persistSelectedData = res;
    };
    Selection.prototype.setRowSelection = function (state) {
        var adaptorName = 'adaptorName';
        if (!this.parent.getDataModule().isRemote() && !(this.parent.dataSource[adaptorName] === 'BlazorAdaptor')) {
            if (state) {
                for (var _i = 0, _a = this.getData(); _i < _a.length; _i++) {
                    var data = _a[_i];
                    this.selectedRowState[data[this.primaryKey]] = true;
                }
            }
            else {
                this.selectedRowState = {};
            }
            // (this.getData()).forEach(function (data) {
            //     this.selectedRowState[data[this.primaryKey]] = true;
            // })
        }
    };
    Selection.prototype.getData = function () {
        return this.parent.getDataModule().dataManager.executeLocal(this.parent.getDataModule().generateQuery(true));
    };
    Selection.prototype.refreshPersistSelection = function () {
        var rows = this.parent.getRows();
        if (rows.length > 0 && (this.parent.isPersistSelection || this.chkField)) {
            var indexes = [];
            for (var j = 0; j < rows.length; j++) {
                var rowObj = this.getRowObj(rows[j]);
                var pKey = rowObj ? rowObj.data[this.primaryKey] : null;
                if (pKey === null) {
                    return;
                }
                var checkState = void 0;
                var chkBox = rows[j].querySelector('.e-checkselect');
                if (this.selectedRowState[pKey] || (this.parent.checkAllRows === 'Check' && this.chkAllCollec.indexOf(pKey) < 0)
                    || (this.parent.checkAllRows === 'Uncheck' && this.chkAllCollec.indexOf(pKey) > 0)
                    || (this.parent.checkAllRows === 'Intermediate' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.chkField) && rowObj.data[this.chkField])) {
                    indexes.push(parseInt(rows[j].getAttribute('aria-rowindex'), 10));
                    checkState = true;
                }
                else {
                    checkState = false;
                    if (this.checkedTarget !== chkBox && this.parent.isCheckBoxSelection) {
                        Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["removeAddCboxClasses"])(chkBox.nextElementSibling, checkState);
                    }
                }
                this.updatePersistCollection(rows[j], checkState);
            }
            this.isSingleSel() && indexes.length > 0 ? this.selectRow(indexes[0], true) : this.selectRows(indexes);
        }
        if (this.parent.isCheckBoxSelection && this.getCurrentBatchRecordChanges().length > 0) {
            this.setCheckAllState();
        }
    };
    Selection.prototype.actionBegin = function (e) {
        if (e.requestType === 'save' && this.parent.isPersistSelection) {
            var editChkBox = this.parent.element.querySelector('.e-edit-checkselect');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(editChkBox)) {
                var row = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(editChkBox, '.e-editedrow');
                if (row) {
                    if (this.parent.editSettings.mode === 'Dialog') {
                        row = this.parent.element.querySelector('.e-dlgeditrow');
                    }
                    var rowObj = this.getRowObj(row);
                    if (!rowObj) {
                        return;
                    }
                    this.selectedRowState[rowObj.data[this.primaryKey]] = rowObj.isSelected = editChkBox.checked;
                }
                else {
                    this.isCheckedOnAdd = editChkBox.checked;
                }
            }
        }
    };
    Selection.prototype.actionComplete = function (e) {
        var _this = this;
        if (e.requestType === 'save' && this.parent.isPersistSelection) {
            if (e.action === 'add' && this.isCheckedOnAdd) {
                var rowObj = this.parent.getRowObjectFromUID(this.parent.getRows()[e.selectedRow].getAttribute('data-uid'));
                this.selectedRowState[rowObj.data[this.primaryKey]] = rowObj.isSelected = this.isCheckedOnAdd;
            }
            this.refreshPersistSelection();
        }
        if (e.requestType === 'delete' && this.parent.isPersistSelection) {
            e.data.slice().forEach(function (data) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[_this.primaryKey])) {
                    _this.updatePersistDelete(data[_this.primaryKey]);
                }
            });
            this.setCheckAllState();
            this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;
        }
        if (e.requestType === 'paging') {
            this.prevRowIndex = undefined;
            this.prevCIdxs = undefined;
            this.prevECIdxs = undefined;
        }
    };
    Selection.prototype.onDataBound = function () {
        if (!this.parent.enableVirtualization && this.parent.isPersistSelection) {
            this.refreshPersistSelection();
        }
    };
    Selection.prototype.updatePersistSelectedData = function (checkState) {
        if (this.parent.isPersistSelection) {
            var adaptorName = 'adaptorName';
            var rows = this.parent.getRows();
            for (var i = 0; i < rows.length; i++) {
                this.updatePersistCollection(rows[i], checkState);
            }
            if (this.parent.checkAllRows === 'Uncheck') {
                this.setRowSelection(false);
                this.persistSelectedData = this.parent.getDataModule().isRemote() ? this.persistSelectedData : [];
            }
            else if (this.parent.checkAllRows === 'Check') {
                this.setRowSelection(true);
                this.persistSelectedData = (!this.parent.getDataModule().isRemote() &&
                    !(this.parent.dataSource[adaptorName] === 'BlazorAdaptor')) ?
                    this.getData().slice() : this.persistSelectedData;
            }
        }
    };
    Selection.prototype.checkSelectAllAction = function (checkState) {
        var cRenderer = this.getRenderer();
        var editForm = this.parent.element.querySelector('.e-gridform');
        this.checkedTarget = this.getCheckAllBox();
        if (checkState && this.getCurrentBatchRecordChanges().length) {
            this.parent.checkAllRows = 'Check';
            this.updatePersistSelectedData(checkState);
            this.selectRowsByRange(cRenderer.getVirtualRowIndex(0), cRenderer.getVirtualRowIndex(this.getCurrentBatchRecordChanges().length - 1));
        }
        else {
            this.parent.checkAllRows = 'Uncheck';
            this.updatePersistSelectedData(checkState);
            this.clearSelection();
        }
        this.chkAllCollec = [];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(editForm)) {
            var editChkBox = editForm.querySelector('.e-edit-checkselect');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(editChkBox)) {
                Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["removeAddCboxClasses"])(editChkBox.nextElementSibling, checkState);
            }
        }
    };
    Selection.prototype.checkSelectAll = function (checkBox) {
        var _this = this;
        var stateStr = this.getCheckAllStatus(checkBox);
        var state = stateStr === 'Check';
        if (stateStr === 'Intermediate') {
            state = this.getCurrentBatchRecordChanges().some(function (data) {
                return data[_this.primaryKey] in _this.selectedRowState;
            });
        }
        this.checkSelectAllAction(!state);
        this.target = null;
        if (this.getCurrentBatchRecordChanges().length > 0) {
            this.setCheckAllState();
        }
        this.triggerChkChangeEvent(checkBox, !state);
    };
    Selection.prototype.getCheckAllStatus = function (ele) {
        var classes = ele ? ele.nextElementSibling.classList :
            this.getCheckAllBox().nextElementSibling.classList;
        var status;
        if (classes.contains('e-check')) {
            status = 'Check';
        }
        else if (classes.contains('e-uncheck')) {
            status = 'Uncheck';
        }
        else if (classes.contains('e-stop')) {
            status = 'Intermediate';
        }
        else {
            status = 'None';
        }
        return status;
    };
    Selection.prototype.checkSelect = function (checkBox) {
        var target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.checkedTarget, '.e-rowcell');
        var checkObj = checkBox;
        var gObj = this.parent;
        this.isMultiCtrlRequest = true;
        var rIndex = 0;
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isGroupAdaptive"])(gObj)) {
            var uid = target.parentElement.getAttribute('data-uid');
            rIndex = gObj.getRows().map(function (m) { return m.getAttribute('data-uid'); }).indexOf(uid);
        }
        else {
            rIndex = parseInt(target.parentElement.getAttribute('aria-rowindex'), 10);
        }
        if (this.parent.isPersistSelection && this.parent.element.querySelectorAll('.e-addedrow').length > 0) {
            ++rIndex;
        }
        this.rowCellSelectionHandler(rIndex, parseInt(target.getAttribute('aria-colindex'), 10));
        this.moveIntoUncheckCollection(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-row'));
        this.setCheckAllState();
        this.isMultiCtrlRequest = false;
        this.triggerChkChangeEvent(checkBox, checkBox.nextElementSibling.classList.contains('e-check'));
    };
    Selection.prototype.moveIntoUncheckCollection = function (row) {
        if (this.parent.checkAllRows === 'Check' || this.parent.checkAllRows === 'Uncheck') {
            var rowObj = this.getRowObj(row);
            var pKey = rowObj && rowObj.data ? rowObj.data[this.primaryKey] : null;
            if (!pKey) {
                return;
            }
            if (this.chkAllCollec.indexOf(pKey) < 0) {
                this.chkAllCollec.push(pKey);
            }
            else {
                this.chkAllCollec.splice(this.chkAllCollec.indexOf(pKey), 1);
            }
        }
    };
    Selection.prototype.triggerChkChangeEvent = function (checkBox, checkState) {
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_3__["checkBoxChange"], {
            checked: checkState, selectedRowIndexes: this.parent.getSelectedRowIndexes(),
            target: checkBox
        });
        if (!this.parent.isEdit) {
            this.checkedTarget = null;
        }
    };
    Selection.prototype.updateSelectedRowIndex = function (index) {
        if (this.parent.isCheckBoxSelection && this.parent.enableVirtualization && !this.parent.getDataModule().isRemote()) {
            if (this.parent.checkAllRows === 'Check') {
                this.selectedRowIndexes = [];
                for (var data = 0; data < this.getData().length; data++) {
                    this.selectedRowIndexes.push(data);
                }
            }
            else if (this.parent.checkAllRows === 'Uncheck') {
                this.selectedRowIndexes = [];
            }
            else {
                if (index && this.parent.getRowByIndex(index).getAttribute('aria-selected') === 'false') {
                    var selectedVal = this.selectedRowIndexes.indexOf(index);
                    this.selectedRowIndexes.splice(selectedVal, 1);
                }
            }
        }
    };
    ;
    Selection.prototype.setCheckAllState = function (index, isInteraction) {
        if (this.parent.isCheckBoxSelection || this.parent.selectionSettings.checkboxMode === 'ResetOnRowClick') {
            var checkedLen = Object.keys(this.selectedRowState).length;
            if (!this.parent.isPersistSelection) {
                checkedLen = this.selectedRecords.length;
                this.totalRecordsCount = this.getCurrentBatchRecordChanges().length;
            }
            if (this.getCheckAllBox()) {
                var spanEle = this.getCheckAllBox().nextElementSibling;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([spanEle], ['e-check', 'e-stop', 'e-uncheck']);
                if (checkedLen === this.totalRecordsCount && this.totalRecordsCount || (this.parent.enableVirtualization
                    && !this.parent.allowPaging && !this.parent.getDataModule().isRemote() && checkedLen === this.getData().length)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([spanEle], ['e-check']);
                    if (isInteraction) {
                        this.getRenderer().setSelection(null, true, true);
                    }
                    this.parent.checkAllRows = 'Check';
                }
                else if (checkedLen === 0 || this.getCurrentBatchRecordChanges().length === 0) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([spanEle], ['e-uncheck']);
                    if (isInteraction) {
                        this.getRenderer().setSelection(null, false, true);
                    }
                    this.parent.checkAllRows = 'Uncheck';
                    if (checkedLen === 0 && this.getCurrentBatchRecordChanges().length === 0) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([spanEle.parentElement], ['e-checkbox-disabled']);
                    }
                    else {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([spanEle.parentElement], ['e-checkbox-disabled']);
                    }
                }
                else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([spanEle], ['e-stop']);
                    this.parent.checkAllRows = 'Intermediate';
                }
                if (this.parent.enableVirtualization && !this.parent.allowPaging && !this.parent.getDataModule().isRemote()) {
                    this.updateSelectedRowIndex(index);
                }
            }
        }
    };
    Selection.prototype.keyDownHandler = function (e) {
        // Below are keyCode for command key in MAC OS. Safari/Chrome(91-Left command, 93-Right Command), Opera(17), FireFox(224)
        if ((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === ('chrome' || 'safari') && (e.keyCode === 91 || e.keyCode === 93)) ||
            (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'opera' && e.keyCode === 17) || (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'mozilla' && e.keyCode === 224)) {
            this.cmdKeyPressed = true;
        }
    };
    Selection.prototype.keyUpHandler = function (e) {
        if ((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === ('chrome' || 'safari') && (e.keyCode === 91 || e.keyCode === 93)) ||
            (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'opera' && e.keyCode === 17) || (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'mozilla' && e.keyCode === 224)) {
            this.cmdKeyPressed = false;
        }
    };
    Selection.prototype.clickHandler = function (e) {
        var target = e.target;
        this.actualTarget = target;
        this.isInteracted = true;
        this.isMultiCtrlRequest = e.ctrlKey || this.enableSelectMultiTouch ||
            (this.isMacOS && this.cmdKeyPressed);
        this.isMultiShiftRequest = e.shiftKey;
        this.popUpClickHandler(e);
        var chkSelect = false;
        this.preventFocus = true;
        var checkBox;
        var checkWrap = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(target, 'e-checkbox-wrapper');
        this.checkSelectAllClicked = checkWrap && checkWrap.querySelectorAll('.e-checkselectall') ? true : false;
        if (checkWrap && checkWrap.querySelectorAll('.e-checkselect,.e-checkselectall').length > 0) {
            checkBox = checkWrap.querySelector('input[type="checkbox"]');
            chkSelect = true;
        }
        this.drawBorders();
        target = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"])(target, 'e-rowcell');
        if ((target && target.parentElement.classList.contains('e-row') && !this.parent.selectionSettings.checkboxOnly) || chkSelect) {
            if (this.parent.isCheckBoxSelection) {
                this.isMultiCtrlRequest = true;
            }
            this.target = target;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(checkBox)) {
                this.checkedTarget = checkBox;
                if (checkBox.classList.contains('e-checkselectall')) {
                    this.checkSelectAll(checkBox);
                }
                else {
                    this.checkSelect(checkBox);
                }
            }
            else {
                var gObj = this.parent;
                var rIndex = 0;
                if (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isGroupAdaptive"])(gObj)) {
                    var uid = target.parentElement.getAttribute('data-uid');
                    rIndex = gObj.getRows().map(function (m) { return m.getAttribute('data-uid'); }).indexOf(uid);
                }
                else {
                    rIndex = parseInt(target.parentElement.getAttribute('aria-rowindex'), 10);
                }
                if (this.parent.isPersistSelection && this.parent.element.querySelectorAll('.e-addedrow').length > 0) {
                    ++rIndex;
                }
                if (!this.mUPTarget || !this.mUPTarget.isEqualNode(target)) {
                    this.rowCellSelectionHandler(rIndex, parseInt(target.getAttribute('aria-colindex'), 10));
                }
                if (this.parent.isCheckBoxSelection) {
                    this.moveIntoUncheckCollection(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-row'));
                    this.setCheckAllState();
                }
            }
            if (!this.parent.isCheckBoxSelection && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.isSingleSel()) {
                this.showPopup(e);
            }
        }
        this.isMultiCtrlRequest = false;
        this.isMultiShiftRequest = false;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-unboundcell'))) {
            this.preventFocus = false;
        }
    };
    Selection.prototype.popUpClickHandler = function (e) {
        var target = e.target;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-headercell') || e.target.classList.contains('e-rowcell') ||
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-gridpopup')) {
            if (target.classList.contains('e-rowselect')) {
                if (!target.classList.contains('e-spanclicked')) {
                    target.classList.add('e-spanclicked');
                    this.enableSelectMultiTouch = true;
                }
                else {
                    target.classList.remove('e-spanclicked');
                    this.enableSelectMultiTouch = false;
                    this.parent.element.querySelector('.e-gridpopup').style.display = 'none';
                }
            }
        }
        else {
            this.parent.element.querySelector('.e-gridpopup').style.display = 'none';
        }
    };
    Selection.prototype.showPopup = function (e) {
        if (!this.selectionSettings.enableSimpleMultiRowSelection) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["setCssInGridPopUp"])(this.parent.element.querySelector('.e-gridpopup'), e, 'e-rowselect e-icons e-icon-rowselect' +
                (!this.isSingleSel() && (this.selectedRecords.length > (this.parent.getFrozenColumns() ? 2 : 1)
                    || this.selectedRowCellIndexes.length > 1) ? ' e-spanclicked' : ''));
        }
    };
    Selection.prototype.rowCellSelectionHandler = function (rowIndex, cellIndex) {
        var gObj = this.parent;
        if ((!this.isMultiCtrlRequest && !this.isMultiShiftRequest) || this.isSingleSel()) {
            if (!this.isDragged) {
                this.selectRow(rowIndex, this.selectionSettings.enableToggle);
            }
            this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, this.selectionSettings.enableToggle);
            if (this.selectedRowCellIndexes.length) {
                this.updateAutoFillPosition();
            }
            this.drawBorders();
        }
        else if (this.isMultiShiftRequest) {
            if (this.parent.isCheckBoxSelection || (!this.parent.isCheckBoxSelection &&
                !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.target, '.e-rowcell').classList.contains('e-gridchkbox'))) {
                this.selectRowsByRange(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.prevRowIndex) ? rowIndex : this.prevRowIndex, rowIndex);
            }
            else {
                this.addRowsToSelection([rowIndex]);
            }
            this.selectCellsByRange(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.prevCIdxs) ? { rowIndex: rowIndex, cellIndex: cellIndex } : this.prevCIdxs, { rowIndex: rowIndex, cellIndex: cellIndex });
            this.updateAutoFillPosition();
            this.drawBorders();
        }
        else {
            this.addRowsToSelection([rowIndex]);
            this.addCellsToSelection([{ rowIndex: rowIndex, cellIndex: cellIndex }]);
            this.hideBorders();
        }
        this.isDragged = false;
    };
    Selection.prototype.onCellFocused = function (e) {
        if (this.parent.frozenRows && e.container.isHeader && e.byKey) {
            if (e.keyArgs.action === 'upArrow') {
                if (this.parent.allowFiltering) {
                    e.isJump = e.element.tagName === 'INPUT' ? true : false;
                }
                else {
                    e.isJump = e.element.tagName === 'TH' ? true : false;
                }
            }
            else {
                if (e.keyArgs.action === 'downArrow') {
                    var rIdx = Number(e.element.parentElement.getAttribute('aria-rowindex'));
                    e.isJump = rIdx === 0 ? true : false;
                }
                else {
                    if (e.keyArgs.action === 'ctrlHome') {
                        e.isJump = true;
                    }
                }
            }
        }
        var clear = this.parent.getFrozenColumns() ? (((e.container.isHeader && e.element.tagName !== 'TD' && e.isJump) ||
            ((e.container.isContent || e.element.tagName === 'TD') && !(e.container.isSelectable || e.element.tagName === 'TD')))
            && !(e.byKey && e.keyArgs.action === 'space')) : ((e.container.isHeader && e.isJump) ||
            (e.container.isContent && !e.container.isSelectable)) && !(e.byKey && e.keyArgs.action === 'space');
        var headerAction = (e.container.isHeader && e.element.tagName !== 'TD' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.element, '.e-rowcell'))
            && !(e.byKey && e.keyArgs.action === 'space');
        if (!e.byKey || clear) {
            if (clear && !this.parent.isCheckBoxSelection) {
                this.clearSelection();
            }
            return;
        }
        var _a = e.container.isContent ? e.container.indexes : e.indexes, rowIndex = _a[0], cellIndex = _a[1];
        var prev = this.focus.getPrevIndexes();
        if (this.parent.frozenRows) {
            if (e.container.isHeader && (e.element.tagName === 'TD' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.element, '.e-rowcell'))) {
                var thLen = this.parent.getHeaderTable().querySelector('thead').childElementCount;
                rowIndex -= thLen;
                prev.rowIndex = prev.rowIndex ? prev.rowIndex - thLen : null;
            }
            else {
                rowIndex += this.parent.frozenRows;
                prev.rowIndex = prev.rowIndex === 0 || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(prev.rowIndex) ? prev.rowIndex + this.parent.frozenRows : null;
            }
        }
        if (this.parent.getFrozenColumns()) {
            var cIdx = Number(e.element.getAttribute('aria-colindex'));
            prev.cellIndex = prev.cellIndex ? (prev.cellIndex === cellIndex ? cIdx : cIdx - 1) : null;
            cellIndex = cIdx;
        }
        if (headerAction || (['ctrlPlusA', 'escape'].indexOf(e.keyArgs.action) === -1 && e.keyArgs.action !== 'space' &&
            rowIndex === prev.rowIndex && cellIndex === prev.cellIndex)) {
            return;
        }
        this.preventFocus = true;
        switch (e.keyArgs.action) {
            case 'downArrow':
            case 'upArrow':
            case 'enter':
            case 'shiftEnter':
                this.applyDownUpKey(rowIndex, cellIndex);
                break;
            case 'rightArrow':
            case 'leftArrow':
                this.applyRightLeftKey(rowIndex, cellIndex);
                break;
            case 'shiftDown':
            case 'shiftUp':
                this.shiftDownKey(rowIndex, cellIndex);
                break;
            case 'shiftLeft':
            case 'shiftRight':
                this.applyShiftLeftRightKey(rowIndex, cellIndex);
                break;
            case 'home':
            case 'end':
                cellIndex = e.keyArgs.action === 'end' ? this.getLastColIndex(rowIndex) : 0;
                this.applyHomeEndKey(rowIndex, cellIndex);
                break;
            case 'ctrlHome':
            case 'ctrlEnd':
                this.applyCtrlHomeEndKey(rowIndex, cellIndex);
                break;
            case 'escape':
                this.clearSelection();
                break;
            case 'ctrlPlusA':
                this.ctrlPlusA();
                break;
            case 'space':
                this.applySpaceSelection(e.element);
                break;
            case 'tab':
                if (this.parent.editSettings.allowNextRowEdit) {
                    this.selectRow(rowIndex);
                }
                break;
        }
        this.preventFocus = false;
        this.positionBorders();
        this.updateAutoFillPosition();
    };
    /**
     * Apply ctrl + A key selection
     * @return {void}
     * @hidden
     */
    Selection.prototype.ctrlPlusA = function () {
        if (this.isRowType() && !this.isSingleSel()) {
            this.selectRowsByRange(0, this.parent.getRows().length - 1);
        }
        if (this.isCellType() && !this.isSingleSel()) {
            this.selectCellsByRange({ rowIndex: 0, cellIndex: 0 }, { rowIndex: this.parent.getRows().length - 1, cellIndex: this.parent.getColumns().length - 1 });
        }
    };
    Selection.prototype.applySpaceSelection = function (target) {
        if (target.classList.contains('e-checkselectall')) {
            this.checkedTarget = target;
            this.checkSelectAll(this.checkedTarget);
        }
        else {
            if (target.classList.contains('e-checkselect')) {
                this.checkedTarget = target;
                this.checkSelect(this.checkedTarget);
            }
        }
    };
    Selection.prototype.applyDownUpKey = function (rowIndex, cellIndex) {
        var gObj = this.parent;
        if (this.parent.isCheckBoxSelection && this.parent.checkAllRows === 'Check' && !this.selectionSettings.persistSelection) {
            this.checkSelectAllAction(false);
            this.checkedTarget = null;
        }
        if (this.isRowType()) {
            if (this.parent.frozenRows) {
                this.selectRow(rowIndex, true);
                this.applyUpDown(gObj.selectedRowIndex);
            }
            else {
                this.selectRow(rowIndex, true);
                this.applyUpDown(gObj.selectedRowIndex);
            }
        }
        if (this.isCellType()) {
            this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);
        }
    };
    Selection.prototype.applyUpDown = function (rowIndex) {
        if (rowIndex < 0) {
            return;
        }
        if (!this.target) {
            this.target = this.parent.getRows()[0].children[this.parent.groupSettings.columns.length || 0];
        }
        var cIndex = parseInt(this.target.getAttribute('aria-colindex'), 10);
        var frzCols = this.parent.getFrozenColumns();
        if (frzCols) {
            if (cIndex >= frzCols) {
                this.target =
                    this.contentRenderer.getMovableRowByIndex(rowIndex).querySelectorAll('.e-rowcell')[cIndex - frzCols];
            }
            else {
                this.target = this.contentRenderer.getRowByIndex(rowIndex).querySelectorAll('.e-rowcell')[cIndex];
            }
        }
        else {
            this.target = this.contentRenderer.getRowByIndex(rowIndex).querySelectorAll('.e-rowcell')[cIndex];
        }
        this.addAttribute(this.target);
    };
    Selection.prototype.applyRightLeftKey = function (rowIndex, cellIndex) {
        var gObj = this.parent;
        if (this.isCellType()) {
            this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);
            this.addAttribute(this.target);
        }
    };
    Selection.prototype.applyHomeEndKey = function (rowIndex, cellIndex) {
        if (this.isCellType()) {
            this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);
        }
        else {
            this.addAttribute(this.parent.getCellFromIndex(rowIndex, cellIndex));
        }
    };
    /**
     * Apply shift+down key selection
     * @return {void}
     * @hidden
     */
    Selection.prototype.shiftDownKey = function (rowIndex, cellIndex) {
        var gObj = this.parent;
        this.isMultiShiftRequest = true;
        if (this.isRowType() && !this.isSingleSel()) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.prevRowIndex)) {
                this.selectRowsByRange(this.prevRowIndex, rowIndex);
                this.applyUpDown(rowIndex);
            }
            else {
                this.selectRow(0, true);
            }
        }
        if (this.isCellType() && !this.isSingleSel()) {
            this.selectCellsByRange(this.prevCIdxs || { rowIndex: 0, cellIndex: 0 }, { rowIndex: rowIndex, cellIndex: cellIndex });
        }
        this.isMultiShiftRequest = false;
    };
    Selection.prototype.applyShiftLeftRightKey = function (rowIndex, cellIndex) {
        var gObj = this.parent;
        this.isMultiShiftRequest = true;
        this.selectCellsByRange(this.prevCIdxs, { rowIndex: rowIndex, cellIndex: cellIndex });
        this.isMultiShiftRequest = false;
    };
    Selection.prototype.applyCtrlHomeEndKey = function (rowIndex, cellIndex) {
        if (this.isRowType()) {
            this.selectRow(rowIndex, true);
            this.addAttribute(this.parent.getCellFromIndex(rowIndex, cellIndex));
        }
        if (this.isCellType()) {
            this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);
        }
    };
    Selection.prototype.addRemoveClassesForRow = function (row, isAdd, clearAll) {
        var args = [];
        for (var _i = 3; _i < arguments.length; _i++) {
            args[_i - 3] = arguments[_i];
        }
        if (row) {
            var cells = [].slice.call(row.querySelectorAll('.e-rowcell'));
            var detailIndentCell = row.querySelector('.e-detailrowcollapse') || row.querySelector('.e-detailrowexpand');
            var dragdropIndentCell = row.querySelector('.e-rowdragdrop');
            if (detailIndentCell) {
                cells.push(detailIndentCell);
            }
            if (dragdropIndentCell) {
                cells.push(dragdropIndentCell);
            }
            _base_util__WEBPACK_IMPORTED_MODULE_2__["addRemoveActiveClasses"].apply(void 0, [cells, isAdd].concat(args));
        }
        this.getRenderer().setSelection(row ? row.getAttribute('data-uid') : null, isAdd, clearAll);
    };
    Selection.prototype.isRowType = function () {
        return this.selectionSettings.mode === 'Row' || this.selectionSettings.mode === 'Both';
    };
    Selection.prototype.isCellType = function () {
        return this.selectionSettings.mode === 'Cell' || this.selectionSettings.mode === 'Both';
    };
    Selection.prototype.isSingleSel = function () {
        return this.selectionSettings.type === 'Single';
    };
    Selection.prototype.getRenderer = function () {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.contentRenderer)) {
            this.contentRenderer = this.factory.getRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_4__["RenderType"].Content);
        }
        return this.contentRenderer;
    };
    /**
     * Gets the collection of selected records.
     * @return {Object[]}
     */
    Selection.prototype.getSelectedRecords = function () {
        var selectedData = [];
        if (!this.selectionSettings.persistSelection) {
            selectedData = this.parent.getRowsObject().filter(function (row) { return row.isSelected; })
                .map(function (m) { return m.data; });
        }
        else {
            selectedData = this.persistSelectedData;
        }
        return selectedData;
    };
    Selection.prototype.addEventListener_checkbox = function () {
        var _this = this;
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataReady"], this.dataReady, this);
        this.onDataBoundFunction = this.onDataBound.bind(this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataBound"], this.onDataBoundFunction);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"], this.checkBoxSelectionChanged, this);
        this.actionCompleteFunc = this.actionCompleteHandler.bind(this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"], this.actionCompleteFunc);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.clickHandler, this);
        this.resizeEndFn = function () {
            _this.updateAutoFillPosition();
            _this.drawBorders();
        };
        this.resizeEndFn.bind(this);
        this.parent.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["resizeStop"], this.resizeEndFn);
    };
    Selection.prototype.removeEventListener_checkbox = function () {
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataReady"], this.dataReady);
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["dataBound"], this.onDataBoundFunction);
        this.parent.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"], this.actionCompleteFunc);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_3__["click"], this.clickHandler);
    };
    Selection.prototype.dataReady = function (e) {
        if (e.requestType !== 'virtualscroll' && !this.parent.isPersistSelection) {
            this.disableUI = true;
            this.clearSelection();
            this.disableUI = false;
        }
    };
    Selection.prototype.actionCompleteHandler = function (e) {
        if (e.requestType === 'save' && this.parent.isPersistSelection) {
            this.refreshPersistSelection();
        }
    };
    Selection.prototype.selectRowIndex = function (index) {
        this.parent.isSelectedRowIndexUpdating = true;
        this.parent.selectedRowIndex = index;
    };
    return Selection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/show-hide.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/show-hide.js ***!
  \**************************************************************************/
/*! exports provided: ShowHide */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShowHide", function() { return ShowHide; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");



/**
 * The `ShowHide` module is used to control column visibility.
 */
var ShowHide = /** @class */ (function () {
    /**
     * Constructor for the show hide module.
     * @hidden
     */
    function ShowHide(parent) {
        this.parent = parent;
    }
    /**
     * Shows a column by column name.
     * @param  {string|string[]} columnName - Defines a single or collection of column names to show.
     * @param  {string} showBy - Defines the column key either as field name or header text.
     * @return {void}
     */
    ShowHide.prototype.show = function (columnName, showBy) {
        var keys = this.getToggleFields(columnName);
        var columns = this.getColumns(keys, showBy);
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["tooltipDestroy"], { module: 'edit' });
        columns.forEach(function (value) {
            value.visible = true;
        });
        this.setVisible(columns);
    };
    /**
     * Hides a column by column name.
     * @param  {string|string[]} columnName - Defines a single or collection of column names to hide.
     * @param  {string} hideBy - Defines the column key either as field name or header text.
     * @return {void}
     */
    ShowHide.prototype.hide = function (columnName, hideBy) {
        var keys = this.getToggleFields(columnName);
        var columns = this.getColumns(keys, hideBy);
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["tooltipDestroy"], { module: 'edit' });
        columns.forEach(function (value) {
            value.visible = false;
        });
        this.setVisible(columns);
    };
    ShowHide.prototype.getToggleFields = function (key) {
        var finalized = [];
        if (typeof key === 'string') {
            finalized = [key];
        }
        else {
            finalized = key;
        }
        return finalized;
    };
    ShowHide.prototype.getColumns = function (keys, getKeyBy) {
        var _this = this;
        var columns = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["iterateArrayOrObject"])(keys, function (key, index) {
            return Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["iterateArrayOrObject"])(_this.parent.columnModel, function (item, index) {
                if (item[getKeyBy] === key) {
                    return item;
                }
                return undefined;
            })[0];
        });
        return columns;
    };
    /**
     * Shows or hides columns by given column collection.
     * @private
     * @param  {Column[]} columns - Specifies the columns.
     * @return {void}
     */
    ShowHide.prototype.setVisible = function (columns) {
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(this.parent)) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["preventBatch"], {
                instance: this, handler: this.setVisible,
                arg1: columns
            });
            return;
        }
        var currentViewCols = this.parent.getColumns();
        columns = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(columns) ? currentViewCols : columns;
        if (this.parent.allowSelection && this.parent.getSelectedRecords().length) {
            this.parent.clearSelection();
        }
        if (this.parent.enableColumnVirtualization) {
            var colsInCurrentView = columns.filter(function (col1) { return (currentViewCols.some(function (col2) { return col1.field === col2.field; })); });
            if (colsInCurrentView.length) {
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnVisibilityChanged"], columns);
            }
        }
        else {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnVisibilityChanged"], columns);
        }
        if (this.parent.columnQueryMode !== 'All') {
            this.parent.refresh();
        }
    };
    return ShowHide;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/sort.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/sort.js ***!
  \*********************************************************************/
/*! exports provided: Sort */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sort", function() { return Sort; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _services_aria_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/aria-service */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/aria-service.js");






/**
 *
 * The `Sort` module is used to handle sorting action.
 */
var Sort = /** @class */ (function () {
    /**
     * Constructor for Grid sorting module
     * @hidden
     */
    function Sort(parent, sortSettings, sortedColumns, locator) {
        this.contentRefresh = true;
        this.isModelChanged = true;
        this.aria = new _services_aria_service__WEBPACK_IMPORTED_MODULE_3__["AriaService"]();
        this.currentTarget = null;
        this.parent = parent;
        this.sortSettings = sortSettings;
        this.sortedColumns = sortedColumns;
        this.focus = locator.getService('focus');
        this.addEventListener();
    }
    /**
     * The function used to update sortSettings
     * @return {void}
     * @hidden
     */
    Sort.prototype.updateModel = function () {
        var sortedColumn = { field: this.columnName, direction: this.direction };
        var index;
        var gCols = this.parent.groupSettings.columns;
        var flag = false;
        if (!this.isMultiSort) {
            if (!gCols.length) {
                this.sortSettings.columns = [sortedColumn];
            }
            else {
                var sortedCols = [];
                for (var i = 0, len = gCols.length; i < len; i++) {
                    index = this.getSortedColsIndexByField(gCols[i], sortedCols);
                    if (this.columnName === gCols[i]) {
                        flag = true;
                        sortedCols.push(sortedColumn);
                    }
                    else {
                        var sCol = this.getSortColumnFromField(gCols[i]);
                        sortedCols.push({ field: sCol.field, direction: sCol.direction, isFromGroup: sCol.isFromGroup });
                    }
                }
                if (!flag) {
                    sortedCols.push(sortedColumn);
                }
                this.sortSettings.columns = sortedCols;
            }
        }
        else {
            index = this.getSortedColsIndexByField(this.columnName);
            if (index > -1) {
                this.sortSettings.columns.splice(index, 1);
            }
            this.sortSettings.columns.push(sortedColumn);
            this.sortSettings.columns = this.sortSettings.columns;
        }
        this.parent.dataBind();
        this.lastSortedCol = this.columnName;
    };
    /**
     * The function used to trigger onActionComplete
     * @return {void}
     * @hidden
     */
    Sort.prototype.onActionComplete = function (e) {
        var args = !this.isRemove ? {
            columnName: this.columnName, direction: this.direction, requestType: 'sorting', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"]
        } : { requestType: 'sorting', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"] };
        this.isRemove = false;
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(e, args));
    };
    /**
     * Sorts a column with the given options.
     * @param {string} columnName - Defines the column name to sort.
     * @param {SortDirection} direction - Defines the direction of sorting field.
     * @param {boolean} isMultiSort - Specifies whether the previously sorted columns are to be maintained.
     * @return {void}
     */
    Sort.prototype.sortColumn = function (columnName, direction, isMultiSort) {
        var gObj = this.parent;
        if (this.parent.getColumnByField(columnName).allowSorting === false || this.parent.isContextMenuOpen()) {
            this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), columnName: columnName });
            return;
        }
        if (!gObj.allowMultiSorting) {
            isMultiSort = gObj.allowMultiSorting;
        }
        if (this.isActionPrevent()) {
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["preventBatch"], {
                instance: this, handler: this.sortColumn,
                arg1: columnName, arg2: direction, arg3: isMultiSort
            });
            return;
        }
        this.backupSettings();
        this.columnName = columnName;
        this.direction = direction;
        this.isMultiSort = isMultiSort;
        this.removeSortIcons();
        var column = gObj.getColumnHeaderByField(columnName);
        this.updateSortedCols(columnName, isMultiSort);
        this.updateModel();
    };
    Sort.prototype.backupSettings = function () {
        this.lastSortedCols = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["iterateExtend"])(this.sortSettings.columns);
        this.lastCols = this.sortedColumns;
    };
    Sort.prototype.restoreSettings = function () {
        this.isModelChanged = false;
        this.isMultiSort = true;
        this.parent.setProperties({ sortSettings: { columns: this.lastSortedCols } }, true);
        //this.parent.sortSettings.columns =  this.lastSortedCols;        
        this.sortedColumns = this.lastCols;
        this.isModelChanged = true;
    };
    Sort.prototype.updateSortedCols = function (columnName, isMultiSort) {
        if (!isMultiSort) {
            if (this.parent.allowGrouping) {
                for (var i = 0, len = this.sortedColumns.length; i < len; i++) {
                    if (this.parent.groupSettings.columns.indexOf(this.sortedColumns[i]) < 0) {
                        this.sortedColumns.splice(i, 1);
                        len--;
                        i--;
                    }
                }
            }
            else {
                this.sortedColumns.splice(0, this.sortedColumns.length);
            }
        }
        if (this.sortedColumns.indexOf(columnName) < 0) {
            this.sortedColumns.push(columnName);
        }
    };
    /**
     * @hidden
     */
    Sort.prototype.onPropertyChanged = function (e) {
        if (e.module !== this.getModuleName()) {
            return;
        }
        if (this.contentRefresh) {
            var args = this.sortSettings.columns.length ? {
                columnName: this.columnName, direction: this.direction, requestType: 'sorting',
                type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], target: this.currentTarget
            } : {
                requestType: 'sorting', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], cancel: false,
                target: this.currentTarget
            };
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], args);
        }
        this.refreshSortSettings();
        this.removeSortIcons();
        this.addSortIcons();
    };
    Sort.prototype.refreshSortSettings = function () {
        var _this = this;
        this.sortedColumns.length = 0;
        this.sortSettings.columns.forEach(function (e) {
            if (!e.isFromGroup) {
                _this.sortedColumns.push(e.field);
            }
        });
    };
    /**
     * Clears all the sorted columns of the Grid.
     * @return {void}
     */
    Sort.prototype.clearSorting = function () {
        var cols = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getActualPropFromColl"])(this.sortSettings.columns);
        if (this.isActionPrevent()) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["preventBatch"], { instance: this, handler: this.clearSorting });
            return;
        }
        for (var i = 0, len = cols.length; i < len; i++) {
            this.removeSortColumn(cols[i].field);
        }
    };
    Sort.prototype.isActionPrevent = function () {
        return Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isActionPrevent"])(this.parent);
    };
    /**
     * Remove sorted column by field name.
     * @param {string} field - Defines the column field name to remove sort.
     * @return {void}
     * @hidden
     */
    Sort.prototype.removeSortColumn = function (field) {
        var gObj = this.parent;
        var cols = this.sortSettings.columns;
        if (this.sortedColumns.indexOf(field) < 0) {
            return;
        }
        if (this.isActionPrevent()) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["preventBatch"], { instance: this, handler: this.removeSortColumn, arg1: field });
            return;
        }
        this.backupSettings();
        this.removeSortIcons();
        for (var i = 0, len = cols.length; i < len; i++) {
            if (cols[i].field === field) {
                if (gObj.allowGrouping && gObj.groupSettings.columns.indexOf(cols[i].field) > -1) {
                    continue;
                }
                this.sortedColumns.splice(this.sortedColumns.indexOf(cols[i].field), 1);
                cols.splice(i, 1);
                this.isRemove = true;
                if (this.isModelChanged) {
                    this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], {
                        requestType: 'sorting', type: _base_constant__WEBPACK_IMPORTED_MODULE_2__["actionBegin"], target: this.currentTarget
                    });
                }
                break;
            }
        }
        this.addSortIcons();
    };
    Sort.prototype.getSortedColsIndexByField = function (field, sortedColumns) {
        var cols = sortedColumns ? sortedColumns : this.sortSettings.columns;
        for (var i = 0, len = cols.length; i < len; i++) {
            if (cols[i].field === field) {
                return i;
            }
        }
        return -1;
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Sort.prototype.getModuleName = function () {
        return 'sort';
    };
    Sort.prototype.initialEnd = function () {
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.initialEnd);
        if (this.parent.getColumns().length && this.sortSettings.columns.length) {
            var gObj = this.parent;
            this.contentRefresh = false;
            this.isMultiSort = this.sortSettings.columns.length > 1;
            for (var _i = 0, _a = gObj.sortSettings.columns.slice(); _i < _a.length; _i++) {
                var col = _a[_i];
                if (this.sortedColumns.indexOf(col.field) > -1) {
                    this.sortColumn(col.field, col.direction, true);
                }
            }
            this.isMultiSort = false;
            this.contentRefresh = true;
        }
    };
    /**
     * @hidden
     */
    Sort.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.initialEnd, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["sortComplete"], this.onActionComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["inBoundModelChanged"], this.onPropertyChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.clickHandler, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.refreshSortIcons, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["keyPressed"], this.keyPressed, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["cancelBegin"], this.cancelBeginEvent, this);
    };
    /**
     * @hidden
     */
    Sort.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["sortComplete"], this.onActionComplete);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["inBoundModelChanged"], this.onPropertyChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.clickHandler);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.refreshSortIcons);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["keyPressed"], this.keyPressed);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["cancelBegin"], this.cancelBeginEvent);
    };
    /**
     * To destroy the sorting
     * @return {void}
     * @hidden
     */
    Sort.prototype.destroy = function () {
        this.isModelChanged = false;
        var gridElement = this.parent.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        if (this.parent.element.querySelector('.e-gridpopup').querySelectorAll('.e-sortdirect').length) {
            this.parent.element.querySelector('.e-gridpopup').style.display = 'none';
        }
        // tslint:disable-next-line:no-any
        if (!this.parent.refreshing) {
            this.clearSorting();
        }
        this.isModelChanged = true;
        this.removeEventListener();
    };
    Sort.prototype.cancelBeginEvent = function (e) {
        if (e.requestType === 'sorting') {
            this.restoreSettings();
            this.refreshSortIcons();
            this.isMultiSort = true;
        }
    };
    Sort.prototype.clickHandler = function (e) {
        this.currentTarget = null;
        this.popUpClickHandler(e);
        var target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-headercell');
        if (target && !e.target.classList.contains('e-grptogglebtn') &&
            !e.target.classList.contains('e-stackedheadercell') &&
            !e.target.classList.contains('e-stackedheadercelldiv') &&
            !(target.classList.contains('e-resized')) &&
            !e.target.classList.contains('e-rhandler') &&
            !e.target.classList.contains('e-columnmenu') &&
            !e.target.classList.contains('e-filtermenudiv')) {
            var gObj = this.parent;
            var colObj = gObj.getColumnByUid(target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid'));
            var direction = !target.querySelectorAll('.e-ascending').length ? 'Ascending' :
                'Descending';
            if (colObj.type !== 'checkbox') {
                this.initiateSort(target, e, colObj);
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                    this.showPopUp(e);
                }
            }
        }
        if (target) {
            target.classList.remove('e-resized');
        }
    };
    Sort.prototype.keyPressed = function (e) {
        var ele = e.target;
        if (!this.parent.isEdit && (e.action === 'enter' || e.action === 'ctrlEnter' || e.action === 'shiftEnter')
            && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(ele, '.e-headercell')) {
            var target = this.focus.getFocusedElement();
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) || !target.classList.contains('e-headercell')
                || !target.querySelector('.e-headercelldiv')) {
                return;
            }
            var col = this.parent.getColumnByUid(target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid'));
            this.initiateSort(target, e, col);
        }
    };
    Sort.prototype.initiateSort = function (target, e, column) {
        var gObj = this.parent;
        var field = column.field;
        this.currentTarget = e.target;
        var direction = !target.querySelectorAll('.e-ascending').length ? 'Ascending' :
            'Descending';
        if (e.shiftKey || (this.sortSettings.allowUnsort && target.querySelectorAll('.e-descending').length)
            && !(gObj.groupSettings.columns.indexOf(field) > -1)) {
            this.removeSortColumn(field);
        }
        else {
            this.sortColumn(field, direction, e.ctrlKey || this.enableSortMultiTouch);
        }
    };
    Sort.prototype.showPopUp = function (e) {
        var target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-headercell');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) || this.parent.isContextMenuOpen()) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["setCssInGridPopUp"])(this.parent.element.querySelector('.e-gridpopup'), e, 'e-sortdirect e-icons e-icon-sortdirect' + (this.sortedColumns.length > 1 ? ' e-spanclicked' : ''));
        }
    };
    Sort.prototype.popUpClickHandler = function (e) {
        var target = e.target;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-headercell') || e.target.classList.contains('e-rowcell') ||
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-gridpopup')) {
            if (target.classList.contains('e-sortdirect')) {
                if (!target.classList.contains('e-spanclicked')) {
                    target.classList.add('e-spanclicked');
                    this.enableSortMultiTouch = true;
                }
                else {
                    target.classList.remove('e-spanclicked');
                    this.enableSortMultiTouch = false;
                    this.parent.element.querySelector('.e-gridpopup').style.display = 'none';
                }
            }
        }
        else {
            this.parent.element.querySelector('.e-gridpopup').style.display = 'none';
        }
    };
    Sort.prototype.addSortIcons = function () {
        var gObj = this.parent;
        var header;
        var filterElement;
        var cols = this.sortSettings.columns;
        var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });
        for (var i = 0, len = cols.length; i < len; i++) {
            if (fieldNames.indexOf(cols[i].field) === -1) {
                continue;
            }
            header = gObj.getColumnHeaderByField(cols[i].field);
            this.aria.setSort(header, cols[i].direction);
            if (this.isMultiSort && cols.length > 1) {
                header.querySelector('.e-headercelldiv').insertBefore(this.parent.createElement('span', { className: 'e-sortnumber', innerHTML: (i + 1).toString() }), header.querySelector('.e-headertext'));
            }
            filterElement = header.querySelector('.e-sortfilterdiv');
            if (cols[i].direction === 'Ascending') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(filterElement, ['e-ascending', 'e-icon-ascending'], []);
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(filterElement, ['e-descending', 'e-icon-descending'], []);
            }
        }
    };
    Sort.prototype.removeSortIcons = function (position) {
        var gObj = this.parent;
        var header;
        var cols = this.sortSettings.columns;
        var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });
        for (var i = position ? position : 0, len = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(position) ? position + 1 : cols.length; i < len; i++) {
            header = gObj.getColumnHeaderByField(cols[i].field);
            if (gObj.allowGrouping && gObj.groupSettings.columns.indexOf(cols[i].field) > -1 &&
                (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(header) || !header.querySelector('.e-sortfilterdiv'))) {
                continue;
            }
            if (fieldNames.indexOf(cols[i].field) === -1) {
                continue;
            }
            this.aria.setSort(header, 'none');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(header.querySelector('.e-sortfilterdiv'), [], ['e-descending', 'e-icon-descending', 'e-ascending', 'e-icon-ascending']);
            if (header.querySelector('.e-sortnumber')) {
                header.querySelector('.e-headercelldiv').removeChild(header.querySelector('.e-sortnumber'));
            }
        }
    };
    Sort.prototype.getSortColumnFromField = function (field) {
        for (var i = 0, len = this.sortSettings.columns.length; i < len; i++) {
            if (this.sortSettings.columns[i].field === field) {
                return this.sortSettings.columns[i];
            }
        }
        return false;
    };
    Sort.prototype.updateAriaAttr = function () {
        var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });
        for (var _i = 0, _a = this.sortedColumns; _i < _a.length; _i++) {
            var col = _a[_i];
            if (fieldNames.indexOf(col) === -1) {
                continue;
            }
            var header = this.parent.getColumnHeaderByField(col);
            this.aria.setSort(header, this.getSortColumnFromField(col).direction);
        }
    };
    Sort.prototype.refreshSortIcons = function (params) {
        if (params === void 0) { params = { args: { isFrozen: false } }; }
        if (!params.args.isFrozen) {
            this.removeSortIcons();
            this.isMultiSort = true;
            this.removeSortIcons();
            this.addSortIcons();
            this.isMultiSort = false;
            this.updateAriaAttr();
        }
    };
    return Sort;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/toolbar.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/toolbar.js ***!
  \************************************************************************/
/*! exports provided: Toolbar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Toolbar", function() { return Toolbar; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-navigations */ "./node_modules/@syncfusion/ej2-navigations/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _services_focus_strategy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/focus-strategy */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/focus-strategy.js");






/**
 * The `Toolbar` module is used to handle ToolBar actions.
 * @hidden
 */
var Toolbar = /** @class */ (function () {
    function Toolbar(parent, serviceLocator) {
        this.predefinedItems = {};
        this.items = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'Print', 'Search',
            'ColumnChooser', 'PdfExport', 'ExcelExport', 'CsvExport', 'WordExport'];
        this.parent = parent;
        this.gridID = parent.element.id;
        this.serviceLocator = serviceLocator;
        this.addEventListener();
    }
    Toolbar.prototype.render = function () {
        this.l10n = this.serviceLocator.getService('localization');
        var preItems = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'Print',
            'PdfExport', 'ExcelExport', 'WordExport', 'CsvExport'];
        for (var _i = 0, preItems_1 = preItems; _i < preItems_1.length; _i++) {
            var item = preItems_1[_i];
            var itemStr = item.toLowerCase();
            var localeName = itemStr[0].toUpperCase() + itemStr.slice(1);
            this.predefinedItems[item] = {
                id: this.gridID + '_' + itemStr, prefixIcon: 'e-' + itemStr,
                text: this.l10n.getConstant(localeName), tooltipText: this.l10n.getConstant(localeName)
            };
        }
        this.predefinedItems.Search = {
            id: this.gridID + '_search',
            template: '<div class="e-input-group e-search" role="search">\
            <input id="' + this.gridID + '_searchbar" class="e-input" name="input" type="search" \
            placeholder= \"' + this.l10n.getConstant('Search') + '\"/>\
            <span id="' + this.gridID + '_searchbutton" class="e-input-group-icon e-search-icon e-icons" \
            tabindex="-1" title="' + this.l10n.getConstant('Search') + '" aria-label= "search"></span> \
            </div>',
            tooltipText: this.l10n.getConstant('Search'), align: 'Right', cssClass: 'e-search-wrapper'
        };
        this.predefinedItems.ColumnChooser = {
            id: this.gridID + '_' + 'columnchooser', cssClass: 'e-cc e-ccdiv e-cc-toolbar', suffixIcon: 'e-' + 'columnchooser-btn',
            text: this.l10n.getConstant('Columnchooser'), tooltipText: this.l10n.getConstant('Columnchooser'), align: 'Right',
        };
        this.createToolbar();
    };
    /**
     * Gets the toolbar of the Grid.
     * @return {Element}
     * @hidden
     */
    Toolbar.prototype.getToolbar = function () {
        return this.toolbar.element;
    };
    /**
     * Destroys the ToolBar.
     * @method destroy
     * @return {void}
     */
    Toolbar.prototype.destroy = function () {
        if (this.toolbar && !this.toolbar.isDestroyed) {
            if (!this.toolbar.element) {
                this.parent.destroyTemplate(['toolbarTemplate']);
            }
            else {
                this.toolbar.destroy();
            }
            this.unWireEvent();
            this.removeEventListener();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
        }
    };
    Toolbar.prototype.bindSearchEvents = function () {
        this.searchElement = this.element.querySelector('#' + this.gridID + '_searchbar');
        this.wireEvent();
        this.refreshToolbarItems();
        if (this.parent.searchSettings) {
            this.updateSearchBox();
        }
    };
    Toolbar.prototype.createToolbar = function () {
        var items = this.getItems();
        this.toolbar = new _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_1__["Toolbar"]({
            items: items,
            clicked: this.toolbarClickHandler.bind(this),
            enablePersistence: this.parent.enablePersistence,
            enableRtl: this.parent.enableRtl,
            created: this.bindSearchEvents.bind(this)
        });
        var isStringTemplate = 'isStringTemplate';
        this.toolbar[isStringTemplate] = true;
        var viewStr = 'viewContainerRef';
        var registerTemp = 'registeredTemplate';
        if (this.parent[viewStr]) {
            this.toolbar[registerTemp] = {};
            this.toolbar[viewStr] = this.parent[viewStr];
        }
        this.element = this.parent.createElement('div', { id: this.gridID + '_toolbarItems' });
        if (this.parent.toolbarTemplate) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && typeof (this.parent.toolbarTemplate) === 'string') {
                this.toolbar.appendTo(this.parent.toolbarTemplate);
                this.element = this.toolbar.element;
            }
            else {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                    var tempID = this.parent.element.id + 'toolbarTemplate';
                    var item = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["appendChildren"])(this.element, Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.parent.toolbarTemplate)({}, this.parent, 'toolbarTemplate', tempID));
                    var items_1 = this.getItem(item);
                    this.toolbar.items.push(items_1);
                    this.toolbar.appendTo(this.element);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.parent.element.id + 'toolbarTemplate', 'ToolbarTemplate', this.parent);
                }
                else {
                    Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["appendChildren"])(this.element, Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.parent.toolbarTemplate)({}, this.parent, 'toolbarTemplate'));
                }
            }
        }
        else {
            this.toolbar.appendTo(this.element);
        }
        this.parent.element.insertBefore(this.element, this.parent.getHeaderContent());
        this.bindSearchEvents();
    };
    Toolbar.prototype.refreshToolbarItems = function (args) {
        var gObj = this.parent;
        var enableItems = [];
        var disableItems = [];
        var edit = gObj.editSettings;
        var hasData = gObj.currentViewData && gObj.currentViewData.length;
        edit.allowAdding ? enableItems.push(this.gridID + '_add') : disableItems.push(this.gridID + '_add');
        edit.allowEditing && hasData ? enableItems.push(this.gridID + '_edit') : disableItems.push(this.gridID + '_edit');
        edit.allowDeleting && hasData ? enableItems.push(this.gridID + '_delete') : disableItems.push(this.gridID + '_delete');
        if (gObj.editSettings.mode === 'Batch') {
            if (gObj.element.querySelectorAll('.e-updatedtd').length && (edit.allowAdding || edit.allowEditing)) {
                enableItems.push(this.gridID + '_update');
                enableItems.push(this.gridID + '_cancel');
            }
            else {
                disableItems.push(this.gridID + '_update');
                disableItems.push(this.gridID + '_cancel');
            }
        }
        else {
            if (gObj.isEdit && (edit.allowAdding || edit.allowEditing)) {
                enableItems = [this.gridID + '_update', this.gridID + '_cancel'];
                disableItems = [this.gridID + '_add', this.gridID + '_edit', this.gridID + '_delete'];
            }
            else {
                disableItems.push(this.gridID + '_update');
                disableItems.push(this.gridID + '_cancel');
            }
        }
        this.enableItems(enableItems, true);
        this.enableItems(disableItems, false);
    };
    Toolbar.prototype.getItems = function () {
        var items = [];
        var toolbarItems = this.parent.toolbar || [];
        if (typeof (this.parent.toolbar) === 'string') {
            return [];
        }
        for (var _i = 0, toolbarItems_1 = toolbarItems; _i < toolbarItems_1.length; _i++) {
            var item = toolbarItems_1[_i];
            switch (typeof item) {
                case 'number':
                    items.push(this.getItemObject(this.items[item]));
                    break;
                case 'string':
                    items.push(this.getItemObject(item));
                    break;
                default:
                    items.push(this.getItem(item));
            }
        }
        return items;
    };
    Toolbar.prototype.getItem = function (itemObject) {
        var item = this.predefinedItems[itemObject.text];
        return item ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(item, item, itemObject) : itemObject;
    };
    Toolbar.prototype.getItemObject = function (itemName) {
        return this.predefinedItems[itemName] || { text: itemName, id: this.gridID + '_' + itemName };
    };
    /**
     * Enables or disables ToolBar items.
     * @param {string[]} items - Defines the collection of itemID of ToolBar items.
     * @param {boolean} isEnable - Defines the items to be enabled or disabled.
     * @return {void}
     * @hidden
     */
    Toolbar.prototype.enableItems = function (items, isEnable) {
        for (var _i = 0, items_2 = items; _i < items_2.length; _i++) {
            var item = items_2[_i];
            var element = this.element.querySelector('#' + item);
            if (element) {
                this.toolbar.enableItems(element.parentElement, isEnable);
            }
        }
    };
    Toolbar.prototype.toolbarClickHandler = function (args) {
        var _this = this;
        var gObj = this.parent;
        var gID = this.gridID;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(args, { cancel: false });
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["toolbarClick"], args, function (toolbarargs) {
            if (!toolbarargs.cancel) {
                switch (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(toolbarargs.item) && toolbarargs.item.id) {
                    case gID + '_print':
                        gObj.print();
                        break;
                    case gID + '_edit':
                        gObj.startEdit();
                        break;
                    case gID + '_update':
                        gObj.endEdit();
                        break;
                    case gID + '_cancel':
                        gObj.closeEdit();
                        break;
                    case gID + '_add':
                        gObj.addRecord();
                        break;
                    case gID + '_delete':
                        gObj.deleteRecord();
                        break;
                    case gID + '_search':
                        if (toolbarargs.originalEvent.target.id === gID + '_searchbutton') {
                            _this.search();
                        }
                        break;
                    case gID + '_columnchooser':
                        var tarElement = _this.parent.element.querySelector('.e-ccdiv');
                        var y = tarElement.getBoundingClientRect().top;
                        var x = tarElement.getBoundingClientRect().left;
                        var targetEle = toolbarargs.originalEvent.target;
                        y = tarElement.getBoundingClientRect().top + tarElement.offsetTop;
                        gObj.createColumnchooser(x, y, targetEle);
                        break;
                }
            }
        });
    };
    Toolbar.prototype.modelChanged = function (e) {
        if (e.module === 'edit') {
            this.refreshToolbarItems();
        }
    };
    Toolbar.prototype.onPropertyChanged = function (e) {
        if (e.module !== this.getModuleName() || !this.parent.toolbar) {
            return;
        }
        if (this.element) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
        }
        this.render();
    };
    Toolbar.prototype.keyUpHandler = function (e) {
        if (e.keyCode === 13) {
            this.search();
        }
    };
    Toolbar.prototype.search = function () {
        this.parent.search(this.searchElement.value);
    };
    Toolbar.prototype.updateSearchBox = function () {
        if (this.searchElement) {
            this.searchElement.value = this.parent.searchSettings.key;
        }
    };
    Toolbar.prototype.wireEvent = function () {
        if (this.searchElement) {
            this.searchBoxObj = new _services_focus_strategy__WEBPACK_IMPORTED_MODULE_4__["SearchBox"](this.searchElement);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.searchElement, 'keyup', this.keyUpHandler, this);
            this.searchBoxObj.wireEvent();
        }
    };
    Toolbar.prototype.unWireEvent = function () {
        if (this.searchElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.searchElement, 'keyup', this.keyUpHandler);
            this.searchBoxObj.unWireEvent();
        }
    };
    Toolbar.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.render, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.onPropertyChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["inBoundModelChanged"], this.updateSearchBox.bind(this));
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], this.refreshToolbarItems, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["toolbarRefresh"], this.refreshToolbarItems, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["inBoundModelChanged"], this.modelChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataBound"], this.refreshToolbarItems, this);
    };
    Toolbar.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["initialEnd"], this.render);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.onPropertyChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["inBoundModelChanged"], this.updateSearchBox);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"], this.refreshToolbarItems);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["toolbarRefresh"], this.refreshToolbarItems);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["inBoundModelChanged"], this.modelChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataBound"], this.refreshToolbarItems);
    };
    /**
     * For internal use only - Get the module name.
     */
    Toolbar.prototype.getModuleName = function () {
        return 'toolbar';
    };
    return Toolbar;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/virtual-scroll.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/actions/virtual-scroll.js ***!
  \*******************************************************************************/
/*! exports provided: VirtualScroll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualScroll", function() { return VirtualScroll; });
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _renderer_virtual_content_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../renderer/virtual-content-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/virtual-content-renderer.js");




/**
 * Virtual Scrolling class
 */
var VirtualScroll = /** @class */ (function () {
    function VirtualScroll(parent, locator) {
        this.parent = parent;
        this.locator = locator;
        this.addEventListener();
    }
    VirtualScroll.prototype.getModuleName = function () {
        return 'virtualscroll';
    };
    VirtualScroll.prototype.instantiateRenderer = function () {
        this.parent.log(['limitation', 'virtual_height'], 'virtualization');
        var renderer = this.locator.getService('rendererFactory');
        if (this.parent.enableColumnVirtualization) {
            renderer.addRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_1__["RenderType"].Header, new _renderer_virtual_content_renderer__WEBPACK_IMPORTED_MODULE_2__["VirtualHeaderRenderer"](this.parent, this.locator));
        }
        renderer.addRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_1__["RenderType"].Content, new _renderer_virtual_content_renderer__WEBPACK_IMPORTED_MODULE_2__["VirtualContentRenderer"](this.parent, this.locator));
        this.ensurePageSize();
    };
    VirtualScroll.prototype.ensurePageSize = function () {
        var rowHeight = this.parent.getRowHeight();
        var vHeight = this.parent.height.toString().indexOf('%') < 0 ? this.parent.height :
            this.parent.element.getBoundingClientRect().height;
        this.blockSize = ~~(vHeight / rowHeight);
        var height = this.blockSize * 2;
        var size = this.parent.pageSettings.pageSize;
        this.parent.setProperties({ pageSettings: { pageSize: size < height ? height : size } }, true);
    };
    VirtualScroll.prototype.addEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_0__["initialLoad"], this.instantiateRenderer, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_0__["columnWidthChanged"], this.refreshVirtualElement, this);
    };
    VirtualScroll.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_0__["initialLoad"], this.instantiateRenderer);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_0__["columnWidthChanged"], this.refreshVirtualElement);
    };
    VirtualScroll.prototype.refreshVirtualElement = function (args) {
        if (this.parent.enableColumnVirtualization && args.module === 'resize') {
            var renderer = this.locator.getService('rendererFactory');
            renderer.getRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_1__["RenderType"].Content).refreshVirtualElement();
        }
    };
    VirtualScroll.prototype.destroy = function () {
        this.removeEventListener();
    };
    return VirtualScroll;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js ***!
  \**********************************************************************/
/*! exports provided: created, destroyed, load, rowDataBound, queryCellInfo, headerCellInfo, actionBegin, actionComplete, actionFailure, dataBound, rowSelecting, rowSelected, rowDeselecting, rowDeselected, cellSelecting, cellSelected, cellDeselecting, cellDeselected, columnDragStart, columnDrag, columnDrop, rowDragStartHelper, rowDragStart, rowDrag, rowDrop, beforePrint, printComplete, detailDataBound, toolbarClick, batchAdd, batchCancel, batchDelete, beforeBatchAdd, beforeBatchDelete, beforeBatchSave, beginEdit, cellEdit, cellSave, cellSaved, endAdd, endDelete, endEdit, recordDoubleClick, recordClick, beforeDataBound, beforeOpenColumnChooser, resizeStart, onResize, resizeStop, checkBoxChange, beforeCopy, beforePaste, filterChoiceRequest, filterAfterOpen, filterBeforeOpen, filterSearchBegin, commandClick, initialLoad, initialEnd, dataReady, contentReady, uiUpdate, onEmpty, inBoundModelChanged, modelChanged, colGroupRefresh, headerRefreshed, pageBegin, pageComplete, sortBegin, sortComplete, filterBegin, filterComplete, searchBegin, searchComplete, reorderBegin, reorderComplete, rowDragAndDropBegin, rowDragAndDropComplete, groupBegin, groupComplete, ungroupBegin, ungroupComplete, groupAggregates, refreshFooterRenderer, refreshAggregateCell, refreshAggregates, rowSelectionBegin, rowSelectionComplete, columnSelectionBegin, columnSelectionComplete, cellSelectionBegin, cellSelectionComplete, beforeCellFocused, cellFocused, keyPressed, click, destroy, columnVisibilityChanged, scroll, columnWidthChanged, columnPositionChanged, rowDragAndDrop, rowsAdded, rowsRemoved, columnDragStop, headerDrop, dataSourceModified, refreshComplete, refreshVirtualBlock, dblclick, toolbarRefresh, bulkSave, autoCol, tooltipDestroy, updateData, editBegin, editComplete, addBegin, addComplete, saveComplete, deleteBegin, deleteComplete, preventBatch, dialogDestroy, crudAction, addDeleteAction, destroyForm, doubleTap, beforeExcelExport, excelExportComplete, excelQueryCellInfo, excelHeaderQueryCellInfo, exportDetailDataBound, beforePdfExport, pdfExportComplete, pdfQueryCellInfo, pdfHeaderQueryCellInfo, accessPredicate, contextMenuClick, freezeRender, freezeRefresh, contextMenuOpen, columnMenuClick, columnMenuOpen, filterOpen, filterDialogCreated, filterMenuClose, initForeignKeyColumn, getForeignKeyData, generateQuery, showEmptyGrid, foreignKeyData, dataStateChange, dataSourceChanged, rtlUpdated, beforeFragAppend, frozenHeight, textWrapRefresh, recordAdded, cancelBegin, editNextValCell, hierarchyPrint, expandChildGrid, printGridInit, exportRowDataBound, rowPositionChanged, batchForm, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, partialRefresh */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "created", function() { return created; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroyed", function() { return destroyed; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "load", function() { return load; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDataBound", function() { return rowDataBound; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryCellInfo", function() { return queryCellInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "headerCellInfo", function() { return headerCellInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionBegin", function() { return actionBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionComplete", function() { return actionComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionFailure", function() { return actionFailure; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dataBound", function() { return dataBound; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowSelecting", function() { return rowSelecting; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowSelected", function() { return rowSelected; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDeselecting", function() { return rowDeselecting; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDeselected", function() { return rowDeselected; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellSelecting", function() { return cellSelecting; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellSelected", function() { return cellSelected; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellDeselecting", function() { return cellDeselecting; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellDeselected", function() { return cellDeselected; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnDragStart", function() { return columnDragStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnDrag", function() { return columnDrag; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnDrop", function() { return columnDrop; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDragStartHelper", function() { return rowDragStartHelper; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDragStart", function() { return rowDragStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDrag", function() { return rowDrag; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDrop", function() { return rowDrop; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforePrint", function() { return beforePrint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "printComplete", function() { return printComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detailDataBound", function() { return detailDataBound; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toolbarClick", function() { return toolbarClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "batchAdd", function() { return batchAdd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "batchCancel", function() { return batchCancel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "batchDelete", function() { return batchDelete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeBatchAdd", function() { return beforeBatchAdd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeBatchDelete", function() { return beforeBatchDelete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeBatchSave", function() { return beforeBatchSave; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beginEdit", function() { return beginEdit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellEdit", function() { return cellEdit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellSave", function() { return cellSave; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellSaved", function() { return cellSaved; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endAdd", function() { return endAdd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endDelete", function() { return endDelete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endEdit", function() { return endEdit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recordDoubleClick", function() { return recordDoubleClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recordClick", function() { return recordClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeDataBound", function() { return beforeDataBound; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeOpenColumnChooser", function() { return beforeOpenColumnChooser; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resizeStart", function() { return resizeStart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onResize", function() { return onResize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resizeStop", function() { return resizeStop; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkBoxChange", function() { return checkBoxChange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeCopy", function() { return beforeCopy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforePaste", function() { return beforePaste; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterChoiceRequest", function() { return filterChoiceRequest; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterAfterOpen", function() { return filterAfterOpen; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterBeforeOpen", function() { return filterBeforeOpen; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterSearchBegin", function() { return filterSearchBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commandClick", function() { return commandClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialLoad", function() { return initialLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialEnd", function() { return initialEnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dataReady", function() { return dataReady; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "contentReady", function() { return contentReady; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uiUpdate", function() { return uiUpdate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onEmpty", function() { return onEmpty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inBoundModelChanged", function() { return inBoundModelChanged; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modelChanged", function() { return modelChanged; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colGroupRefresh", function() { return colGroupRefresh; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "headerRefreshed", function() { return headerRefreshed; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pageBegin", function() { return pageBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pageComplete", function() { return pageComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortBegin", function() { return sortBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortComplete", function() { return sortComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterBegin", function() { return filterBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterComplete", function() { return filterComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "searchBegin", function() { return searchBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "searchComplete", function() { return searchComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reorderBegin", function() { return reorderBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reorderComplete", function() { return reorderComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropBegin", function() { return rowDragAndDropBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropComplete", function() { return rowDragAndDropComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBegin", function() { return groupBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupComplete", function() { return groupComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ungroupBegin", function() { return ungroupBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ungroupComplete", function() { return ungroupComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupAggregates", function() { return groupAggregates; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refreshFooterRenderer", function() { return refreshFooterRenderer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refreshAggregateCell", function() { return refreshAggregateCell; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refreshAggregates", function() { return refreshAggregates; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowSelectionBegin", function() { return rowSelectionBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowSelectionComplete", function() { return rowSelectionComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnSelectionBegin", function() { return columnSelectionBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnSelectionComplete", function() { return columnSelectionComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellSelectionBegin", function() { return cellSelectionBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellSelectionComplete", function() { return cellSelectionComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeCellFocused", function() { return beforeCellFocused; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellFocused", function() { return cellFocused; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyPressed", function() { return keyPressed; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "click", function() { return click; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnVisibilityChanged", function() { return columnVisibilityChanged; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scroll", function() { return scroll; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnWidthChanged", function() { return columnWidthChanged; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnPositionChanged", function() { return columnPositionChanged; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDrop", function() { return rowDragAndDrop; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowsAdded", function() { return rowsAdded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowsRemoved", function() { return rowsRemoved; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnDragStop", function() { return columnDragStop; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "headerDrop", function() { return headerDrop; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dataSourceModified", function() { return dataSourceModified; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refreshComplete", function() { return refreshComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refreshVirtualBlock", function() { return refreshVirtualBlock; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dblclick", function() { return dblclick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toolbarRefresh", function() { return toolbarRefresh; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bulkSave", function() { return bulkSave; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autoCol", function() { return autoCol; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tooltipDestroy", function() { return tooltipDestroy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateData", function() { return updateData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editBegin", function() { return editBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editComplete", function() { return editComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addBegin", function() { return addBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addComplete", function() { return addComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saveComplete", function() { return saveComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteBegin", function() { return deleteBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteComplete", function() { return deleteComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "preventBatch", function() { return preventBatch; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dialogDestroy", function() { return dialogDestroy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "crudAction", function() { return crudAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addDeleteAction", function() { return addDeleteAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroyForm", function() { return destroyForm; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doubleTap", function() { return doubleTap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeExcelExport", function() { return beforeExcelExport; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "excelExportComplete", function() { return excelExportComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "excelQueryCellInfo", function() { return excelQueryCellInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "excelHeaderQueryCellInfo", function() { return excelHeaderQueryCellInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exportDetailDataBound", function() { return exportDetailDataBound; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforePdfExport", function() { return beforePdfExport; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pdfExportComplete", function() { return pdfExportComplete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pdfQueryCellInfo", function() { return pdfQueryCellInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pdfHeaderQueryCellInfo", function() { return pdfHeaderQueryCellInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "accessPredicate", function() { return accessPredicate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "contextMenuClick", function() { return contextMenuClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "freezeRender", function() { return freezeRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "freezeRefresh", function() { return freezeRefresh; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "contextMenuOpen", function() { return contextMenuOpen; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnMenuClick", function() { return columnMenuClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "columnMenuOpen", function() { return columnMenuOpen; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterOpen", function() { return filterOpen; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterDialogCreated", function() { return filterDialogCreated; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterMenuClose", function() { return filterMenuClose; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initForeignKeyColumn", function() { return initForeignKeyColumn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getForeignKeyData", function() { return getForeignKeyData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateQuery", function() { return generateQuery; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showEmptyGrid", function() { return showEmptyGrid; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "foreignKeyData", function() { return foreignKeyData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dataStateChange", function() { return dataStateChange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dataSourceChanged", function() { return dataSourceChanged; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rtlUpdated", function() { return rtlUpdated; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeFragAppend", function() { return beforeFragAppend; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "frozenHeight", function() { return frozenHeight; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textWrapRefresh", function() { return textWrapRefresh; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recordAdded", function() { return recordAdded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cancelBegin", function() { return cancelBegin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editNextValCell", function() { return editNextValCell; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hierarchyPrint", function() { return hierarchyPrint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expandChildGrid", function() { return expandChildGrid; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "printGridInit", function() { return printGridInit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exportRowDataBound", function() { return exportRowDataBound; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowPositionChanged", function() { return rowPositionChanged; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "batchForm", function() { return batchForm; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeStartEdit", function() { return beforeStartEdit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beforeBatchCancel", function() { return beforeBatchCancel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "batchEditFormRendered", function() { return batchEditFormRendered; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partialRefresh", function() { return partialRefresh; });
/** @hidden */
var created = 'create';
/** @hidden */
var destroyed = 'destroy';
/** @hidden */
var load = 'load';
/** @hidden */
var rowDataBound = 'rowDataBound';
/** @hidden */
var queryCellInfo = 'queryCellInfo';
/** @hidden */
var headerCellInfo = 'headerCellInfo';
/** @hidden */
var actionBegin = 'actionBegin';
/** @hidden */
var actionComplete = 'actionComplete';
/** @hidden */
var actionFailure = 'actionFailure';
/** @hidden */
var dataBound = 'dataBound';
/** @hidden */
var rowSelecting = 'rowSelecting';
/** @hidden */
var rowSelected = 'rowSelected';
/** @hidden */
var rowDeselecting = 'rowDeselecting';
/** @hidden */
var rowDeselected = 'rowDeselected';
/** @hidden */
var cellSelecting = 'cellSelecting';
/** @hidden */
var cellSelected = 'cellSelected';
/** @hidden */
var cellDeselecting = 'cellDeselecting';
/** @hidden */
var cellDeselected = 'cellDeselected';
/** @hidden */
var columnDragStart = 'columnDragStart';
/** @hidden */
var columnDrag = 'columnDrag';
/** @hidden */
var columnDrop = 'columnDrop';
/** @hidden */
var rowDragStartHelper = 'rowDragStartHelper';
/** @hidden */
var rowDragStart = 'rowDragStart';
/** @hidden */
var rowDrag = 'rowDrag';
/** @hidden */
var rowDrop = 'rowDrop';
/** @hidden */
var beforePrint = 'beforePrint';
/** @hidden */
var printComplete = 'printComplete';
/** @hidden */
var detailDataBound = 'detailDataBound';
/** @hidden */
var toolbarClick = 'toolbarClick';
/** @hidden */
var batchAdd = 'batchAdd';
/** @hidden */
var batchCancel = 'batchCancel';
/** @hidden */
var batchDelete = 'batchDelete';
/** @hidden */
var beforeBatchAdd = 'beforeBatchAdd';
/** @hidden */
var beforeBatchDelete = 'beforeBatchDelete';
/** @hidden */
var beforeBatchSave = 'beforeBatchSave';
/** @hidden */
var beginEdit = 'beginEdit';
/** @hidden */
var cellEdit = 'cellEdit';
/** @hidden */
var cellSave = 'cellSave';
/** @hidden */
var cellSaved = 'cellSaved';
/** @hidden */
var endAdd = 'endAdd';
/** @hidden */
var endDelete = 'endDelete';
/** @hidden */
var endEdit = 'endEdit';
/** @hidden */
var recordDoubleClick = 'recordDoubleClick';
/** @hidden */
var recordClick = 'recordClick';
/** @hidden */
var beforeDataBound = 'beforeDataBound';
/** @hidden */
var beforeOpenColumnChooser = 'beforeOpenColumnChooser';
/** @hidden */
var resizeStart = 'resizeStart';
/** @hidden */
var onResize = 'resizing';
/** @hidden */
var resizeStop = 'resizeStop';
/** @hidden */
var checkBoxChange = 'checkBoxChange';
/** @hidden */
var beforeCopy = 'beforeCopy';
/** @hidden */
var beforePaste = 'beforePaste';
/** @hidden */
var filterChoiceRequest = 'filterchoicerequest';
/** @hidden */
var filterAfterOpen = 'filterafteropen';
/** @hidden */
var filterBeforeOpen = 'filterbeforeopen';
/** @hidden */
var filterSearchBegin = 'filtersearchbegin';
/** @hidden */
var commandClick = 'commandClick';
/**
 * Specifies grid internal events
 */
/** @hidden */
var initialLoad = 'initial-load';
/** @hidden */
var initialEnd = 'initial-end';
/** @hidden */
var dataReady = 'data-ready';
/** @hidden */
var contentReady = 'content-ready';
/** @hidden */
var uiUpdate = 'ui-update';
/** @hidden */
var onEmpty = 'on-empty';
/** @hidden */
var inBoundModelChanged = 'inbound-model-changed';
/** @hidden */
var modelChanged = 'model-changed';
/** @hidden */
var colGroupRefresh = 'colgroup-refresh';
/** @hidden */
var headerRefreshed = 'header-refreshed';
/** @hidden */
var pageBegin = 'paging-begin';
/** @hidden */
var pageComplete = 'paging-complete';
/** @hidden */
var sortBegin = 'sorting-begin';
/** @hidden */
var sortComplete = 'sorting-complete';
/** @hidden */
var filterBegin = 'filtering-begin';
/** @hidden */
var filterComplete = 'filtering-complete';
/** @hidden */
var searchBegin = 'searching-begin';
/** @hidden */
var searchComplete = 'searching-complete';
/** @hidden */
var reorderBegin = 'reorder-begin';
/** @hidden */
var reorderComplete = 'reorder-complete';
/** @hidden */
var rowDragAndDropBegin = 'rowdraganddrop-begin';
/** @hidden */
var rowDragAndDropComplete = 'rowdraganddrop-complete';
/** @hidden */
var groupBegin = 'grouping-begin';
/** @hidden */
var groupComplete = 'grouping-complete';
/** @hidden */
var ungroupBegin = 'ungrouping-begin';
/** @hidden */
var ungroupComplete = 'ungrouping-complete';
/** @hidden */
var groupAggregates = 'group-aggregates';
/** @hidden */
var refreshFooterRenderer = 'refresh-footer-rendered';
/** @hidden */
var refreshAggregateCell = 'refresh-aggregate-cell';
/** @hidden */
var refreshAggregates = 'refresh-aggregates';
/** @hidden */
var rowSelectionBegin = 'rowselecting';
/** @hidden */
var rowSelectionComplete = 'rowselected';
/** @hidden */
var columnSelectionBegin = 'columnselecting';
/** @hidden */
var columnSelectionComplete = 'columnselected';
/** @hidden */
var cellSelectionBegin = 'cellselecting';
/** @hidden */
var cellSelectionComplete = 'cellselected';
/** @hidden */
var beforeCellFocused = 'beforecellfocused';
/** @hidden */
var cellFocused = 'cellfocused';
/** @hidden */
var keyPressed = 'key-pressed';
/** @hidden */
var click = 'click';
/** @hidden */
var destroy = 'destroy';
/** @hidden */
var columnVisibilityChanged = 'column-visible-changed';
/** @hidden */
var scroll = 'scroll';
/** @hidden */
var columnWidthChanged = 'column-width-changed';
/** @hidden */
var columnPositionChanged = 'column-position-changed';
/** @hidden */
var rowDragAndDrop = 'row-drag-and-drop';
/** @hidden */
var rowsAdded = 'rows-added';
/** @hidden */
var rowsRemoved = 'rows-removed';
/** @hidden */
var columnDragStop = 'column-drag-stop';
/** @hidden */
var headerDrop = 'header-drop';
/** @hidden */
var dataSourceModified = 'datasource-modified';
/** @hidden */
var refreshComplete = 'refresh-complete';
/** @hidden */
var refreshVirtualBlock = 'refresh-virtual-block';
/** @hidden */
var dblclick = 'dblclick';
/** @hidden */
var toolbarRefresh = 'toolbar-refresh';
/** @hidden */
var bulkSave = 'bulk-save';
/** @hidden */
var autoCol = 'auto-col';
/** @hidden */
var tooltipDestroy = 'tooltip-destroy';
/** @hidden */
var updateData = 'update-data';
/** @hidden */
var editBegin = 'edit-begin';
/** @hidden */
var editComplete = 'edit-complete';
/** @hidden */
var addBegin = 'add-begin';
/** @hidden */
var addComplete = 'add-complete';
/** @hidden */
var saveComplete = 'save-complete';
/** @hidden */
var deleteBegin = 'delete-begin';
/** @hidden */
var deleteComplete = 'delete-complete';
/** @hidden */
var preventBatch = 'prevent-batch';
/** @hidden */
var dialogDestroy = 'dialog-destroy';
/** @hidden */
var crudAction = 'crud-Action';
/** @hidden */
var addDeleteAction = 'add-delete-Action';
/** @hidden */
var destroyForm = 'destroy-form';
/** @hidden */
var doubleTap = 'double-tap';
/** @hidden */
var beforeExcelExport = 'beforeExcelExport';
/** @hidden */
var excelExportComplete = 'excelExportComplete';
/** @hidden */
var excelQueryCellInfo = 'excelQueryCellInfo';
/** @hidden */
var excelHeaderQueryCellInfo = 'excelHeaderQueryCellInfo';
/** @hidden */
var exportDetailDataBound = 'exportdetaildatabound';
/** @hidden */
var beforePdfExport = 'beforePdfExport';
/** @hidden */
var pdfExportComplete = 'pdfExportComplete';
/** @hidden */
var pdfQueryCellInfo = 'pdfQueryCellInfo';
/** @hidden */
var pdfHeaderQueryCellInfo = 'pdfHeaderQueryCellInfo';
/** @hidden */
var accessPredicate = 'access-predicate';
/** @hidden */
var contextMenuClick = 'contextMenuClick';
/** @hidden */
var freezeRender = 'freezerender';
/** @hidden */
var freezeRefresh = 'freezerefresh';
/** @hidden */
var contextMenuOpen = 'contextMenuOpen';
/** @hidden */
var columnMenuClick = 'columnMenuClick';
/** @hidden */
var columnMenuOpen = 'columnMenuOpen';
/** @hidden */
var filterOpen = 'filterOpen';
/** @hidden */
var filterDialogCreated = 'filterDialogCreated';
/** @hidden */
var filterMenuClose = 'filter-menu-close';
/** @hidden */
var initForeignKeyColumn = 'initForeignKeyColumn';
/** @hidden */
var getForeignKeyData = 'getForeignKeyData';
/** @hidden */
var generateQuery = 'generateQuery';
/** @hidden */
var showEmptyGrid = 'showEmptyGrid';
/** @hidden */
var foreignKeyData = 'foreignKeyData';
/** @hidden */
var dataStateChange = 'dataStateChange';
/** @hidden */
var dataSourceChanged = 'dataSourceChanged';
/** @hidden */
var rtlUpdated = 'rtl-updated';
/** @hidden */
var beforeFragAppend = 'beforeFragAppend';
/** @hidden */
var frozenHeight = 'frozenHeight';
/** @hidden */
var textWrapRefresh = 'textWrapRefresh';
/** @hidden */
var recordAdded = 'recordAdded';
/** @hidden */
var cancelBegin = 'cancel-Begin';
/** @hidden */
var editNextValCell = 'editNextValCell';
/** @hidden */
var hierarchyPrint = 'hierarchyprint';
/** @hidden */
var expandChildGrid = 'expandchildgrid';
/** @hidden */
var printGridInit = 'printGrid-Init';
/** @hidden */
var exportRowDataBound = 'export-RowDataBound';
/** @hidden */
var rowPositionChanged = 'row-position-changed';
/** @hidden */
var batchForm = 'batchedit-form';
/** @hidden */
var beforeStartEdit = 'edit-form';
/** @hidden */
var beforeBatchCancel = 'before-batch-cancel';
/** @hidden */
var batchEditFormRendered = 'batcheditform-rendered';
/** @hidden */
var partialRefresh = 'partial-refresh';


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js ***!
  \******************************************************************/
/*! exports provided: CellType, RenderType, ToolbarItem */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellType", function() { return CellType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderType", function() { return RenderType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToolbarItem", function() { return ToolbarItem; });
/**
 * Defines types of Cell
 * @hidden
 */
var CellType;
(function (CellType) {
    /**  Defines CellType as Data */
    CellType[CellType["Data"] = 0] = "Data";
    /**  Defines CellType as Header */
    CellType[CellType["Header"] = 1] = "Header";
    /**  Defines CellType as Summary */
    CellType[CellType["Summary"] = 2] = "Summary";
    /**  Defines CellType as GroupSummary */
    CellType[CellType["GroupSummary"] = 3] = "GroupSummary";
    /**  Defines CellType as CaptionSummary */
    CellType[CellType["CaptionSummary"] = 4] = "CaptionSummary";
    /**  Defines CellType as Filter */
    CellType[CellType["Filter"] = 5] = "Filter";
    /**  Defines CellType as Indent */
    CellType[CellType["Indent"] = 6] = "Indent";
    /**  Defines CellType as GroupCaption */
    CellType[CellType["GroupCaption"] = 7] = "GroupCaption";
    /**  Defines CellType as GroupCaptionEmpty */
    CellType[CellType["GroupCaptionEmpty"] = 8] = "GroupCaptionEmpty";
    /**  Defines CellType as Expand */
    CellType[CellType["Expand"] = 9] = "Expand";
    /**  Defines CellType as HeaderIndent */
    CellType[CellType["HeaderIndent"] = 10] = "HeaderIndent";
    /**  Defines CellType as StackedHeader */
    CellType[CellType["StackedHeader"] = 11] = "StackedHeader";
    /**  Defines CellType as DetailHeader */
    CellType[CellType["DetailHeader"] = 12] = "DetailHeader";
    /**  Defines CellType as DetailExpand */
    CellType[CellType["DetailExpand"] = 13] = "DetailExpand";
    /**  Defines CellType as CommandColumn */
    CellType[CellType["CommandColumn"] = 14] = "CommandColumn";
    /**  Defines CellType as DetailFooterIntent */
    CellType[CellType["DetailFooterIntent"] = 15] = "DetailFooterIntent";
    /**  Defines CellType as RowDrag */
    CellType[CellType["RowDragIcon"] = 16] = "RowDragIcon";
    /**  Defines CellType as RowDragHeader */
    CellType[CellType["RowDragHIcon"] = 17] = "RowDragHIcon";
})(CellType || (CellType = {}));
/**
 * Defines types of Render
 * @hidden
 */
var RenderType;
(function (RenderType) {
    /**  Defines RenderType as Header */
    RenderType[RenderType["Header"] = 0] = "Header";
    /**  Defines RenderType as Content */
    RenderType[RenderType["Content"] = 1] = "Content";
    /**  Defines RenderType as Summary */
    RenderType[RenderType["Summary"] = 2] = "Summary";
})(RenderType || (RenderType = {}));
/**
 * Defines Predefined toolbar items.
 * @hidden
 */
var ToolbarItem;
(function (ToolbarItem) {
    ToolbarItem[ToolbarItem["Add"] = 0] = "Add";
    ToolbarItem[ToolbarItem["Edit"] = 1] = "Edit";
    ToolbarItem[ToolbarItem["Update"] = 2] = "Update";
    ToolbarItem[ToolbarItem["Delete"] = 3] = "Delete";
    ToolbarItem[ToolbarItem["Cancel"] = 4] = "Cancel";
    ToolbarItem[ToolbarItem["Print"] = 5] = "Print";
    ToolbarItem[ToolbarItem["Search"] = 6] = "Search";
    ToolbarItem[ToolbarItem["ColumnChooser"] = 7] = "ColumnChooser";
    ToolbarItem[ToolbarItem["PdfExport"] = 8] = "PdfExport";
    ToolbarItem[ToolbarItem["ExcelExport"] = 9] = "ExcelExport";
    ToolbarItem[ToolbarItem["CsvExport"] = 10] = "CsvExport";
    ToolbarItem[ToolbarItem["WordExport"] = 11] = "WordExport";
})(ToolbarItem || (ToolbarItem = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js ***!
  \******************************************************************/
/*! exports provided: SortDescriptor, SortSettings, Predicate, FilterSettings, SelectionSettings, SearchSettings, RowDropSettings, TextWrapSettings, GroupSettings, EditSettings, Grid */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortDescriptor", function() { return SortDescriptor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortSettings", function() { return SortSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Predicate", function() { return Predicate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterSettings", function() { return FilterSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionSettings", function() { return SelectionSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SearchSettings", function() { return SearchSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowDropSettings", function() { return RowDropSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextWrapSettings", function() { return TextWrapSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupSettings", function() { return GroupSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditSettings", function() { return EditSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return Grid; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _renderer_render__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../renderer/render */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../renderer/row-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js");
/* harmony import */ var _renderer_cell_renderer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../renderer/cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony import */ var _services_cell_render_factory__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../services/cell-render-factory */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/cell-render-factory.js");
/* harmony import */ var _services_service_locator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../services/service-locator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/service-locator.js");
/* harmony import */ var _services_value_formatter__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../services/value-formatter */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js");
/* harmony import */ var _services_renderer_factory__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../services/renderer-factory */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/renderer-factory.js");
/* harmony import */ var _services_width_controller__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../services/width-controller */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/width-controller.js");
/* harmony import */ var _services_aria_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../services/aria-service */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/aria-service.js");
/* harmony import */ var _services_focus_strategy__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../services/focus-strategy */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/focus-strategy.js");
/* harmony import */ var _models_page_settings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../models/page-settings */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/page-settings.js");
/* harmony import */ var _actions_selection__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../actions/selection */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/selection.js");
/* harmony import */ var _actions_search__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../actions/search */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/search.js");
/* harmony import */ var _actions_show_hide__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../actions/show-hide */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/show-hide.js");
/* harmony import */ var _actions_scroll__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../actions/scroll */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/scroll.js");
/* harmony import */ var _actions_print__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../actions/print */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/print.js");
/* harmony import */ var _models_aggregate__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../models/aggregate */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/aggregate.js");
/* harmony import */ var _actions_clipboard__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../actions/clipboard */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/clipboard.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};





























/**
 * Represents the field name and direction of sort column.
 */
var SortDescriptor = /** @class */ (function (_super) {
    __extends(SortDescriptor, _super);
    function SortDescriptor() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], SortDescriptor.prototype, "field", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], SortDescriptor.prototype, "direction", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SortDescriptor.prototype, "isFromGroup", void 0);
    return SortDescriptor;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the sorting behavior of Grid.
 */
var SortSettings = /** @class */ (function (_super) {
    __extends(SortSettings, _super);
    function SortSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], SortDescriptor)
    ], SortSettings.prototype, "columns", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], SortSettings.prototype, "allowUnsort", void 0);
    return SortSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Represents the predicate for the filter column.
 */
var Predicate = /** @class */ (function (_super) {
    __extends(Predicate, _super);
    function Predicate() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Predicate.prototype, "field", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Predicate.prototype, "operator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Predicate.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Predicate.prototype, "matchCase", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Predicate.prototype, "ignoreAccent", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Predicate.prototype, "predicate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], Predicate.prototype, "actualFilterValue", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], Predicate.prototype, "actualOperator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Predicate.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Predicate.prototype, "ejpredicate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Predicate.prototype, "uid", void 0);
    return Predicate;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the filtering behavior of the Grid.
 */
var FilterSettings = /** @class */ (function (_super) {
    __extends(FilterSettings, _super);
    function FilterSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], Predicate)
    ], FilterSettings.prototype, "columns", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('FilterBar')
    ], FilterSettings.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], FilterSettings.prototype, "mode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], FilterSettings.prototype, "showFilterBarStatus", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1500)
    ], FilterSettings.prototype, "immediateModeDelay", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], FilterSettings.prototype, "operators", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], FilterSettings.prototype, "ignoreAccent", void 0);
    return FilterSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the selection behavior of the Grid.
 */
var SelectionSettings = /** @class */ (function (_super) {
    __extends(SelectionSettings, _super);
    function SelectionSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Row')
    ], SelectionSettings.prototype, "mode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Flow')
    ], SelectionSettings.prototype, "cellSelectionMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Single')
    ], SelectionSettings.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SelectionSettings.prototype, "checkboxOnly", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SelectionSettings.prototype, "persistSelection", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Default')
    ], SelectionSettings.prototype, "checkboxMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SelectionSettings.prototype, "enableSimpleMultiRowSelection", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], SelectionSettings.prototype, "enableToggle", void 0);
    return SelectionSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the search behavior of the Grid.
 */
var SearchSettings = /** @class */ (function (_super) {
    __extends(SearchSettings, _super);
    function SearchSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], SearchSettings.prototype, "fields", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SearchSettings.prototype, "key", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('contains')
    ], SearchSettings.prototype, "operator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], SearchSettings.prototype, "ignoreCase", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SearchSettings.prototype, "ignoreAccent", void 0);
    return SearchSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the row drop settings of the Grid.
 */
var RowDropSettings = /** @class */ (function (_super) {
    __extends(RowDropSettings, _super);
    function RowDropSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], RowDropSettings.prototype, "targetID", void 0);
    return RowDropSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the text wrap settings of the Grid.
 */
var TextWrapSettings = /** @class */ (function (_super) {
    __extends(TextWrapSettings, _super);
    function TextWrapSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Both')
    ], TextWrapSettings.prototype, "wrapMode", void 0);
    return TextWrapSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the group behavior of the Grid.
 */
var GroupSettings = /** @class */ (function (_super) {
    __extends(GroupSettings, _super);
    function GroupSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], GroupSettings.prototype, "showDropArea", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], GroupSettings.prototype, "showToggleButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], GroupSettings.prototype, "showGroupedColumn", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], GroupSettings.prototype, "showUngroupButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], GroupSettings.prototype, "disablePageWiseAggregates", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], GroupSettings.prototype, "columns", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], GroupSettings.prototype, "captionTemplate", void 0);
    return GroupSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the edit behavior of the Grid.
 */
var EditSettings = /** @class */ (function (_super) {
    __extends(EditSettings, _super);
    function EditSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], EditSettings.prototype, "allowAdding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], EditSettings.prototype, "allowEditing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], EditSettings.prototype, "allowDeleting", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Normal')
    ], EditSettings.prototype, "mode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], EditSettings.prototype, "allowEditOnDblClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], EditSettings.prototype, "showConfirmDialog", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], EditSettings.prototype, "showDeleteConfirmDialog", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], EditSettings.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Top')
    ], EditSettings.prototype, "newRowPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], EditSettings.prototype, "dialog", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], EditSettings.prototype, "allowNextRowEdit", void 0);
    return EditSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Represents the Grid component.
 * ```html
 * <div id="grid"></div>
 * <script>
 *  var gridObj = new Grid({ allowPaging: true });
 *  gridObj.appendTo("#grid");
 * </script>
 * ```
 */
var Grid = /** @class */ (function (_super) {
    __extends(Grid, _super);
    /**
     * Constructor for creating the component
     * @hidden
     */
    function Grid(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.isPreventScrollEvent = false;
        _this.inViewIndexes = [];
        _this.media = {};
        _this.freezeRefresh = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"].prototype.refresh;
        /** @hidden */
        _this.isVirtualAdaptive = false;
        /** @hidden */
        _this.vRows = [];
        /** @hidden */
        _this.vcRows = [];
        /** @hidden */
        _this.vGroupOffsets = {};
        /**
         * Gets the currently visible records of the Grid.
         */
        _this.currentViewData = [];
        /** @hidden */
        _this.lockcolPositionCount = 0;
        /** @hidden */
        _this.prevPageMoving = false;
        /** @hidden */
        _this.pageTemplateChange = false;
        // enable/disable logger for MVC & Core
        _this.enableLogger = true;
        _this.needsID = true;
        Grid_1.Inject(_actions_selection__WEBPACK_IMPORTED_MODULE_17__["Selection"]);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('mergePersistData', _this.mergePersistGridData, _this);
        return _this;
    }
    Grid_1 = Grid;
    /**
     * Get the properties to be maintained in the persisted state.
     * @return {string}
     * @hidden
     */
    Grid.prototype.getPersistData = function () {
        var _this = this;
        var keyEntity = ['pageSettings', 'sortSettings',
            'filterSettings', 'groupSettings', 'columns', 'searchSettings', 'selectedRowIndex', 'scrollPosition'];
        var ignoreOnPersist = {
            pageSettings: ['template', 'pageSizes', 'enableQueryString', 'totalRecordsCount', 'pageCount'],
            filterSettings: ['type', 'mode', 'showFilterBarStatus', 'immediateModeDelay', 'ignoreAccent'],
            groupSettings: ['showDropArea', 'showToggleButton', 'showGroupedColumn', 'showUngroupButton',
                'disablePageWiseAggregates', 'hideCaptionCount'],
            searchSettings: ['fields', 'operator', 'ignoreCase'],
            sortSettings: [], columns: [], selectedRowIndex: [], scrollPosition: []
        };
        var ignoreOnColumn = ['filter', 'edit', 'filterBarTemplate', 'headerTemplate', 'template',
            'commandTemplate', 'commands', 'dataSource', 'headerText'];
        keyEntity.forEach(function (value) {
            var currentObject = _this[value];
            for (var _i = 0, _a = ignoreOnPersist[value]; _i < _a.length; _i++) {
                var val = _a[_i];
                delete currentObject[val];
            }
        });
        this.pageSettings.template = undefined;
        this.pageTemplateChange = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.pagerTemplate);
        return this.addOnPersist(keyEntity);
    };
    /**
     * To provide the array of modules needed for component rendering
     * @return {ModuleDeclaration[]}
     * @hidden
     */
    Grid.prototype.requiredModules = function () {
        var modules = [];
        if (this.isDestroyed) {
            return modules;
        }
        if (this.allowFiltering) {
            modules.push({
                member: 'filter',
                args: [this, this.filterSettings, this.serviceLocator]
            });
        }
        if (this.allowExcelExport) {
            modules.push({
                member: 'ExcelExport',
                args: [this, this.serviceLocator]
            });
        }
        if (this.allowPdfExport) {
            modules.push({
                member: 'PdfExport',
                args: [this]
            });
        }
        if (this.allowSorting) {
            modules.push({
                member: 'sort',
                args: [this, this.sortSettings, this.sortedColumns, this.serviceLocator]
            });
        }
        if (this.allowPaging) {
            modules.push({
                member: 'pager',
                args: [this, this.pageSettings]
            });
        }
        if (this.allowSelection) {
            modules.push({
                member: 'selection',
                args: [this, this.selectionSettings, this.serviceLocator]
            });
        }
        modules.push({
            member: 'resize',
            args: [this]
        });
        if (this.allowReordering) {
            modules.push({
                member: 'reorder',
                args: [this]
            });
        }
        if (this.allowRowDragAndDrop) {
            modules.push({
                member: 'rowDragAndDrop',
                args: [this]
            });
        }
        if (this.allowGrouping) {
            modules.push({
                member: 'group',
                args: [this, this.groupSettings, this.sortedColumns, this.serviceLocator]
            });
        }
        if (this.aggregates.length) {
            modules.push({ member: 'aggregate', args: [this, this.serviceLocator] });
        }
        if (this.isDetail()) {
            modules.push({
                member: 'detailRow',
                args: [this, this.serviceLocator]
            });
        }
        if (this.toolbar || this.toolbarTemplate) {
            modules.push({
                member: 'toolbar',
                args: [this, this.serviceLocator]
            });
        }
        if (this.enableVirtualization || this.enableColumnVirtualization) {
            modules.push({
                member: 'virtualscroll',
                args: [this, this.serviceLocator]
            });
        }
        if (this.getFrozenColumns() || this.frozenRows) {
            modules.push({ member: 'freeze', args: [this, this.serviceLocator] });
        }
        if (this.isCommandColumn(this.columns)) {
            modules.push({
                member: 'commandColumn',
                args: [this, this.serviceLocator]
            });
        }
        if (this.editSettings.allowAdding || this.editSettings.allowDeleting || this.editSettings.allowEditing) {
            modules.push({
                member: 'edit',
                args: [this, this.serviceLocator]
            });
        }
        this.extendRequiredModules(modules);
        return modules;
    };
    Grid.prototype.extendRequiredModules = function (modules) {
        if (this.contextMenuItems) {
            modules.push({
                member: 'contextMenu',
                args: [this, this.serviceLocator]
            });
        }
        if (this.showColumnMenu) {
            modules.push({
                member: 'columnMenu',
                args: [this, this.serviceLocator]
            });
        }
        if (this.showColumnChooser) {
            modules.push({
                member: 'columnChooser',
                args: [this, this.serviceLocator]
            });
        }
        if (this.isForeignKeyEnabled(this.columns)) {
            modules.push({ member: 'foreignKey', args: [this, this.serviceLocator] });
        }
        if (this.enableLogger) {
            modules.push({ member: 'logger', args: [this] });
        }
    };
    /**
     * For internal use only - Initialize the event handler;
     * @private
     */
    Grid.prototype.preRender = function () {
        this.serviceLocator = new _services_service_locator__WEBPACK_IMPORTED_MODULE_10__["ServiceLocator"];
        this.initProperties();
        this.initializeServices();
    };
    Grid.prototype.initProperties = function () {
        /* tslint:disable */
        this.isInitial = true;
        this.sortedColumns = [];
        this.inViewIndexes = [];
        this.mediaCol = [];
        this.isInitialLoad = false;
        this.mergeCells = {};
        this.isEdit = false;
        this.checkAllRows = 'None';
        this.isCheckBoxSelection = false;
        this.isPersistSelection = false;
        this.freezeRefresh = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"].prototype.refresh;
        this.filterOperators = {
            contains: 'contains', endsWith: 'endswith', equal: 'equal', greaterThan: 'greaterthan', greaterThanOrEqual: 'greaterthanorequal',
            lessThan: 'lessthan', lessThanOrEqual: 'lessthanorequal', notEqual: 'notequal', startsWith: 'startswith'
        };
        this.defaultLocale = {
            EmptyRecord: 'No records to display',
            True: 'true',
            False: 'false',
            InvalidFilterMessage: 'Invalid Filter Data',
            GroupDropArea: 'Drag a column header here to group its column',
            UnGroup: 'Click here to ungroup',
            GroupDisable: 'Grouping is disabled for this column',
            FilterbarTitle: '\'s filter bar cell',
            EmptyDataSourceError: 'DataSource must not be empty at initial load since columns are generated from dataSource in AutoGenerate Column Grid',
            // Toolbar Items
            Add: 'Add',
            Edit: 'Edit',
            Cancel: 'Cancel',
            Update: 'Update',
            Delete: 'Delete',
            Print: 'Print',
            Pdfexport: 'PDF Export',
            Excelexport: 'Excel Export',
            Wordexport: 'Word Export',
            Csvexport: 'CSV Export',
            Search: 'Search',
            Columnchooser: 'Columns',
            Save: 'Save',
            Item: 'item',
            Items: 'items',
            EditOperationAlert: 'No records selected for edit operation',
            DeleteOperationAlert: 'No records selected for delete operation',
            SaveButton: 'Save',
            OKButton: 'OK',
            CancelButton: 'Cancel',
            EditFormTitle: 'Details of ',
            AddFormTitle: 'Add New Record',
            BatchSaveConfirm: 'Are you sure you want to save changes?',
            BatchSaveLostChanges: 'Unsaved changes will be lost. Are you sure you want to continue?',
            ConfirmDelete: 'Are you sure you want to Delete Record?',
            CancelEdit: 'Are you sure you want to Cancel the changes?',
            ChooseColumns: 'Choose Column',
            SearchColumns: 'search columns',
            Matchs: 'No Matches Found',
            FilterButton: 'Filter',
            ClearButton: 'Clear',
            StartsWith: 'Starts With',
            EndsWith: 'Ends With',
            Contains: 'Contains',
            Equal: 'Equal',
            NotEqual: 'Not Equal',
            LessThan: 'Less Than',
            LessThanOrEqual: 'Less Than Or Equal',
            GreaterThan: 'Greater Than',
            GreaterThanOrEqual: 'Greater Than Or Equal',
            ChooseDate: 'Choose a Date',
            EnterValue: 'Enter the value',
            Copy: 'Copy',
            Group: 'Group by this column',
            Ungroup: 'Ungroup by this column',
            autoFitAll: 'Autofit all columns',
            autoFit: 'Autofit this column',
            Export: 'Export',
            FirstPage: 'First Page',
            LastPage: 'Last Page',
            PreviousPage: 'Previous Page',
            NextPage: 'Next Page',
            SortAscending: 'Sort Ascending',
            SortDescending: 'Sort Descending',
            EditRecord: 'Edit Record',
            DeleteRecord: 'Delete Record',
            FilterMenu: 'Filter',
            SelectAll: 'Select All',
            Blanks: 'Blanks',
            FilterTrue: 'True',
            FilterFalse: 'False',
            NoResult: 'No Matches Found',
            ClearFilter: 'Clear Filter',
            NumberFilter: 'Number Filters',
            TextFilter: 'Text Filters',
            DateFilter: 'Date Filters',
            DateTimeFilter: 'DateTime Filters',
            MatchCase: 'Match Case',
            Between: 'Between',
            CustomFilter: 'Custom Filter',
            CustomFilterPlaceHolder: 'Enter the value',
            CustomFilterDatePlaceHolder: 'Choose a date',
            AND: 'AND',
            OR: 'OR',
            ShowRowsWhere: 'Show rows where:'
        };
        this.keyConfigs = {
            downArrow: 'downarrow',
            upArrow: 'uparrow',
            rightArrow: 'rightarrow',
            leftArrow: 'leftarrow',
            shiftDown: 'shift+downarrow',
            shiftUp: 'shift+uparrow',
            shiftRight: 'shift+rightarrow',
            shiftLeft: 'shift+leftarrow',
            home: 'home',
            end: 'end',
            escape: 'escape',
            ctrlHome: 'ctrl+home',
            ctrlEnd: 'ctrl+end',
            pageUp: 'pageup',
            pageDown: 'pagedown',
            ctrlAltPageUp: 'ctrl+alt+pageup',
            ctrlAltPageDown: 'ctrl+alt+pagedown',
            altPageUp: 'alt+pageup',
            altPageDown: 'alt+pagedown',
            altDownArrow: 'alt+downarrow',
            altUpArrow: 'alt+uparrow',
            ctrlDownArrow: 'ctrl+downarrow',
            ctrlUpArrow: 'ctrl+uparrow',
            ctrlPlusA: 'ctrl+A',
            ctrlPlusP: 'ctrl+P',
            insert: 'insert',
            delete: 'delete',
            f2: 'f2',
            enter: 'enter',
            ctrlEnter: 'ctrl+enter',
            shiftEnter: 'shift+enter',
            tab: 'tab',
            shiftTab: 'shift+tab',
            space: 'space',
            ctrlPlusC: 'ctrl+C',
            ctrlShiftPlusH: 'ctrl+shift+H'
        };
        /* tslint:enable */
    };
    /**
     * For internal use only - To Initialize the component rendering.
     * @private
     */
    Grid.prototype.render = function () {
        this.log(['module_missing', 'promise_enabled', 'locale_missing', 'check_datasource_columns']);
        this.ariaService.setOptions(this.element, { role: 'grid' });
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["createSpinner"])({ target: this.element }, this.createElement);
        this.renderModule = new _renderer_render__WEBPACK_IMPORTED_MODULE_5__["Render"](this, this.serviceLocator);
        this.searchModule = new _actions_search__WEBPACK_IMPORTED_MODULE_18__["Search"](this);
        this.scrollModule = new _actions_scroll__WEBPACK_IMPORTED_MODULE_20__["Scroll"](this);
        this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["initialLoad"], {});
        if (this.getDataModule().dataManager.dataSource.offline === true || this.getDataModule().dataManager.dataSource.url === undefined) {
            this.isVirtualAdaptive = true;
        }
        this.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_4__["load"]);
        Object(_util__WEBPACK_IMPORTED_MODULE_3__["prepareColumns"])(this.columns, this.enableColumnVirtualization);
        this.getMediaColumns();
        Object(_util__WEBPACK_IMPORTED_MODULE_3__["setColumnIndex"])(this.columns);
        this.checkLockColumns(this.columns);
        this.getColumns();
        this.processModel();
        this.gridRender();
        this.wireEvents();
        this.addListener();
        this.updateDefaultCursor();
        this.updateStackedFilter();
        this.showSpinner();
        this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["initialEnd"], {});
    };
    /**
     * By default, grid shows the spinner for all its actions. You can use this method to show spinner at your needed time.
     */
    Grid.prototype.showSpinner = function () {
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["showSpinner"])(this.element);
    };
    /**
     * Manually showed spinner needs to hide by `hideSpinnner`.
     */
    Grid.prototype.hideSpinner = function () {
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["hideSpinner"])(this.element);
    };
    Grid.prototype.updateStackedFilter = function () {
        if (this.allowFiltering && this.filterSettings.type === 'FilterBar' &&
            this.getHeaderContent().querySelectorAll('.e-stackedheadercell').length) {
            this.getHeaderContent().classList.add('e-stackedfilter');
        }
        else {
            this.getHeaderContent().classList.remove('e-stackedfilter');
        }
    };
    Grid.prototype.getMediaColumns = function () {
        if (!this.enableColumnVirtualization) {
            var gcol = this.getColumns();
            this.getShowHideService = this.serviceLocator.getService('showHideService');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(gcol)) {
                for (var index = 0; index < gcol.length; index++) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(gcol[index].hideAtMedia) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(gcol[index].visible) || gcol[index].visible)) {
                        this.pushMediaColumn(gcol[index], index);
                    }
                }
            }
        }
    };
    Grid.prototype.pushMediaColumn = function (col, index) {
        this.mediaCol.push(col);
        this.media[col.uid] = window.matchMedia(col.hideAtMedia);
        this.mediaQueryUpdate(index, this.media[col.uid]);
        this.media[col.uid].addListener(this.mediaQueryUpdate.bind(this, index));
    };
    /**
     * @hidden
     */
    Grid.prototype.updateMediaColumns = function (col) {
        if (!this.enableColumnVirtualization) {
            var index = this.getColumnIndexByUid(col.uid);
            for (var i = 0; i < this.mediaCol.length; i++) {
                if (col.uid === this.mediaCol[i].uid) {
                    this.mediaCol.splice(i, 1);
                    return;
                }
            }
            this.pushMediaColumn(col, index);
        }
    };
    /**
     * @hidden
     */
    Grid.prototype.mediaQueryUpdate = function (columnIndex, e) {
        var col = this.getColumns()[columnIndex];
        if (this.mediaCol.some(function (mediaColumn) { return mediaColumn.uid === col.uid; })) {
            col.visible = e.matches;
            if (this.isInitialLoad) {
                this.invokedFromMedia = true;
                if (col.visible) {
                    this.showHider.show(col.headerText, 'headerText');
                }
                else {
                    this.showHider.hide(col.headerText, 'headerText');
                }
            }
        }
    };
    Grid.prototype.refreshMediaCol = function () {
        this.isInitialLoad = true;
        if (this.aggregates.length && this.element.scrollHeight > this.height) {
            var footerContent = this.element.querySelector('.e-gridfooter');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([footerContent], ['e-footerpadding']);
        }
        var checkboxColumn = this.getColumns().filter(function (col) { return col.type === 'checkbox'; });
        if (checkboxColumn.length && this.selectionSettings.checkboxMode === 'ResetOnRowClick') {
            this.isCheckBoxSelection = false;
            this.refreshHeader();
        }
    };
    /**
     * For internal use only - Initialize the event handler
     * @private
     */
    Grid.prototype.eventInitializer = function () {
        //eventInitializer
    };
    /**
     * Destroys the component (detaches/removes all event handlers, attributes, classes, and empties the component element).
     * @method destroy
     * @return {void}
     */
    Grid.prototype.destroy = function () {
        var gridElement = this.element;
        if (!gridElement) {
            return;
        }
        var hasGridChild = gridElement.querySelector('.e-gridheader') &&
            gridElement.querySelector('.e-gridcontent') ? true : false;
        if (hasGridChild) {
            this.unwireEvents();
        }
        this.removeListener();
        this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["destroy"], {});
        this.destroyDependentModules();
        if (hasGridChild) {
            _super.prototype.destroy.call(this);
        }
        this.toolTipObj.destroy();
        var modules = ['renderModule', 'headerModule', 'contentModule', 'valueFormatterService',
            'serviceLocator', 'ariaService', 'keyboardModule', 'widthService', 'searchModule', 'showHider',
            'scrollModule', 'printModule', 'clipboardModule', 'focusModule'];
        for (var i = 0; i < modules.length; i++) {
            if (this[modules[i]]) {
                this[modules[i]] = null;
            }
        }
        this.element.innerHTML = '';
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.element, [], ['e-rtl', 'e-gridhover', 'e-responsive', 'e-default', 'e-device', 'e-grid-min-height']);
    };
    Grid.prototype.destroyDependentModules = function () {
        var gridElement = this.element;
        if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {
            return;
        }
        this.scrollModule.destroy();
        this.keyboardModule.destroy();
        this.focusModule.destroy();
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Grid.prototype.getModuleName = function () {
        return 'grid';
    };
    Grid.prototype.enableBoxSelection = function () {
        if (this.enableAutoFill) {
            this.selectionSettings.cellSelectionMode = 'BoxWithBorder';
        }
    };
    /**
     * Called internally if any of the property value changed.
     * @hidden
     */
    /* tslint:disable-next-line:max-line-length */
    // tslint:disable-next-line:max-func-body-length
    Grid.prototype.onPropertyChanged = function (newProp, oldProp) {
        var requireRefresh = false;
        var requireGridRefresh = false;
        var freezeRefresh = false;
        var checkCursor;
        var args = { requestType: 'refresh' };
        if (this.isDestroyed) {
            return;
        }
        this.log('module_missing');
        var properties = Object.keys(newProp);
        if (properties.indexOf('columns') > -1) {
            this.updateColumnObject();
            requireGridRefresh = true;
        }
        for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {
            var prop = properties_1[_i];
            switch (prop) {
                case 'allowPaging':
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'pager', enable: this.allowPaging });
                    requireRefresh = true;
                    break;
                case 'pageSettings':
                    if (this.pageTemplateChange) {
                        this.pageTemplateChange = false;
                        break;
                    }
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["inBoundModelChanged"], { module: 'pager', properties: newProp.pageSettings });
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.pageSettings.currentPage) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.pageSettings.totalRecordsCount)
                        || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldProp.pageSettings) &&
                            ((newProp.pageSettings.currentPage !== oldProp.pageSettings.currentPage)
                                && !this.enableColumnVirtualization && !this.enableVirtualization
                                && this.pageSettings.totalRecordsCount <= this.pageSettings.pageSize)) {
                        requireRefresh = true;
                    }
                    break;
                case 'allowSorting':
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'sort', enable: this.allowSorting });
                    requireRefresh = true;
                    checkCursor = true;
                    break;
                case 'allowFiltering':
                    this.updateStackedFilter();
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'filter', enable: this.allowFiltering });
                    requireRefresh = true;
                    if (this.filterSettings.type !== 'FilterBar') {
                        this.refreshHeader();
                    }
                    break;
                case 'height':
                case 'width':
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'scroll', properties: { width: newProp.width, height: newProp.height } });
                    break;
                case 'allowReordering':
                    this.headerModule.refreshUI();
                    checkCursor = true;
                    break;
                case 'allowRowDragAndDrop':
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'rowDragAndDrop', enable: this.allowRowDragAndDrop });
                    break;
                case 'allowSelection':
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'selection', enable: this.allowSelection });
                    break;
                case 'enableAutoFill':
                    if (this.selectionModule) {
                        this.enableBoxSelection();
                        this.selectionModule.updateAutoFillPosition();
                    }
                    break;
                case 'rowTemplate':
                    this.rowTemplateFn = Object(_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.rowTemplate);
                    requireRefresh = true;
                    break;
                case 'detailTemplate':
                    this.detailTemplateFn = Object(_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.detailTemplate);
                    requireRefresh = true;
                    break;
                case 'allowGrouping':
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'group', enable: this.allowGrouping });
                    this.headerModule.refreshUI();
                    requireRefresh = true;
                    checkCursor = true;
                    break;
                case 'childGrid':
                    requireRefresh = true;
                    break;
                case 'toolbar':
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'toolbar' });
                    break;
                case 'groupSettings':
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["inBoundModelChanged"], {
                        module: 'group', properties: newProp.groupSettings,
                        oldProperties: oldProp.groupSettings
                    });
                    break;
                case 'aggregates':
                    if (!this.aggregates.length && this.allowGrouping && this.groupSettings.columns.length) {
                        requireRefresh = true;
                    }
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'aggregate', properties: newProp });
                    break;
                case 'frozenColumns':
                case 'frozenRows':
                case 'enableVirtualization':
                case 'currencyCode':
                case 'locale':
                    this.log('frozen_rows_columns');
                    freezeRefresh = true;
                    requireGridRefresh = true;
                    break;
                default:
                    this.extendedPropertyChange(prop, newProp, requireGridRefresh);
            }
        }
        if (checkCursor) {
            this.updateDefaultCursor();
        }
        if (requireGridRefresh) {
            if (freezeRefresh || this.frozenColumns || this.frozenRows) {
                this.freezeRefresh();
            }
            else {
                this.refresh();
            }
        }
        else if (requireRefresh) {
            this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["modelChanged"], args);
            requireRefresh = false;
            this.maintainSelection(newProp.selectedRowIndex);
        }
    };
    /* tslint:disable */
    Grid.prototype.extendedPropertyChange = function (prop, newProp, requireGridRefresh) {
        switch (prop) {
            case 'enableRtl':
                this.updateRTL();
                if (this.allowPaging) {
                    this.element.querySelector('.e-gridpager').ej2_instances[0].enableRtl = newProp.enableRtl;
                    this.element.querySelector('.e-gridpager').ej2_instances[0].dataBind();
                }
                if (this.height !== 'auto') {
                    this.scrollModule.removePadding(!newProp.enableRtl);
                    this.scrollModule.setPadding();
                }
                if (this.toolbar && this.toolbarModule) {
                    this.toolbarModule.getToolbar().ej2_instances[0].enableRtl = newProp.enableRtl;
                    this.toolbarModule.getToolbar().ej2_instances[0].dataBind();
                }
                if (this.contextMenuItems && this.contextMenuModule) {
                    this.contextMenuModule.getContextMenu().ej2_instances[0].enableRtl = newProp.enableRtl;
                    this.contextMenuModule.getContextMenu().ej2_instances[0].dataBind();
                }
                if (this.showColumnMenu && this.columnMenuModule) {
                    this.columnMenuModule.getColumnMenu().ej2_instances[0].enableRtl = newProp.enableRtl;
                    this.columnMenuModule.getColumnMenu().ej2_instances[0].dataBind();
                }
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["rtlUpdated"], {});
                break;
            case 'enableAltRow':
                this.renderModule.refresh();
                break;
            case 'allowResizing':
                this.headerModule.refreshUI();
                this.updateResizeLines();
                break;
            case 'rowHeight':
                if (this.rowHeight) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], 'e-grid-min-height');
                }
                else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], 'e-grid-min-height');
                }
                this.renderModule.refresh();
                this.headerModule.refreshUI();
                break;
            case 'gridLines':
                this.updateGridLines();
                break;
            case 'showColumnMenu':
                this.headerModule.refreshUI();
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'columnMenu', enable: true });
                break;
            case 'columnMenuItems':
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'columnMenu', enable: this.columnMenuItems });
                break;
            case 'contextMenuItems':
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'contextMenu', enable: this.contextMenuItems });
                break;
            case 'showColumnChooser':
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], { module: 'columnChooser', enable: this.showColumnChooser });
                break;
            case 'filterSettings':
                this.updateStackedFilter();
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["inBoundModelChanged"], { module: 'filter', properties: newProp.filterSettings });
                break;
            case 'searchSettings':
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["inBoundModelChanged"], { module: 'search', properties: newProp.searchSettings });
                break;
            case 'sortSettings':
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["inBoundModelChanged"], { module: 'sort' });
                break;
            case 'selectionSettings':
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["inBoundModelChanged"], { module: 'selection', properties: newProp.selectionSettings });
                break;
            case 'editSettings':
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["inBoundModelChanged"], { module: 'edit', properties: newProp.editSettings });
                break;
            case 'allowTextWrap':
            case 'textWrapSettings':
                if (this.allowTextWrap) {
                    this.applyTextWrap();
                }
                else {
                    this.removeTextWrap();
                }
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["freezeRender"], { case: 'textwrap', isModeChg: (prop === 'textWrapSettings') });
                break;
            case 'dataSource':
                var pending_1 = this.getDataModule().getState();
                if (Object.getPrototypeOf(newProp).deepWatch) {
                    var pKeyField = this.getPrimaryKeyFieldNames()[0];
                    for (var i = 0, props = Object.keys(newProp.dataSource); i < props.length; i++) {
                        this.setRowData(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(pKeyField, this.dataSource[props[i]]), this.dataSource[props[i]]);
                    }
                }
                else if (pending_1.isPending) {
                    var gResult_1 = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dataSource) ? this.dataSource.result : [];
                    (pending_1.group || []).forEach(function (name) {
                        gResult_1 = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].group(gResult_1, name, pending_1.aggregates || []);
                    });
                    this.dataSource = {
                        result: gResult_1, count: this.dataSource.count,
                        aggregates: this.dataSource.aggregates
                    };
                    this.getDataModule().setState({});
                    pending_1.resolver(this.dataSource);
                }
                else {
                    this.getDataModule().setState({ isDataChanged: false });
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["dataSourceModified"], {});
                    if (!requireGridRefresh) {
                        this.renderModule.refresh();
                    }
                }
                break;
            case 'enableHover':
                var action = newProp.enableHover ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"] : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"];
                action([this.element], 'e-gridhover');
                break;
            case 'selectedRowIndex':
                if (!this.isSelectedRowIndexUpdating) {
                    this.selectRow(newProp.selectedRowIndex);
                }
                this.isSelectedRowIndexUpdating = false;
                break;
        }
    };
    Grid.prototype.maintainSelection = function (index) {
        var _this = this;
        if (index !== -1) {
            var fn_1 = function () {
                _this.selectRow(index);
                _this.off(_base_constant__WEBPACK_IMPORTED_MODULE_4__["contentReady"], fn_1);
            };
            this.on(_base_constant__WEBPACK_IMPORTED_MODULE_4__["contentReady"], fn_1, this);
        }
    };
    /**
     * @private
     */
    Grid.prototype.setProperties = function (prop, muteOnChange) {
        _super.prototype.setProperties.call(this, prop, muteOnChange);
        var filterSettings = 'filterSettings';
        if (prop[filterSettings] && this.filterModule && muteOnChange) {
            this.filterModule.refreshFilter();
        }
    };
    /**
     * @hidden
     */
    Grid.prototype.updateDefaultCursor = function () {
        var headerRows = [].slice.call(this.element.querySelectorAll('.e-columnheader'));
        for (var _i = 0, headerRows_1 = headerRows; _i < headerRows_1.length; _i++) {
            var row = headerRows_1[_i];
            if (this.allowSorting || (this.allowGrouping && this.groupSettings.showDropArea) || this.allowReordering) {
                row.classList.remove('e-defaultcursor');
            }
            else {
                row.classList.add('e-defaultcursor');
            }
        }
    };
    Grid.prototype.updateColumnModel = function (columns) {
        for (var i = 0, len = columns.length; i < len; i++) {
            if (columns[i].columns) {
                this.updateColumnModel(columns[i].columns);
            }
            else {
                this.columnModel.push(columns[i]);
            }
        }
        this.updateFrozenColumns();
        this.updateLockableColumns();
    };
    Grid.prototype.updateFrozenColumns = function () {
        var cols = this.columnModel;
        var count = 0;
        for (var i = 0, len = cols.length; i < len; i++) {
            if (cols[i].isFrozen) {
                cols.splice(this.frozenColumns + count, 0, cols.splice(i, 1)[0]);
                count++;
            }
        }
    };
    Grid.prototype.updateLockableColumns = function () {
        var cols = this.columnModel;
        var frozenCount = 0;
        var movableCount = 0;
        var frozenColumns = this.getFrozenColumns();
        for (var i = 0; i < cols.length; i++) {
            if (cols[i].lockColumn) {
                if (i < frozenColumns) {
                    cols.splice(frozenCount, 0, cols.splice(i, 1)[0]);
                    frozenCount++;
                }
                else {
                    cols.splice(frozenColumns + movableCount, 0, cols.splice(i, 1)[0]);
                    movableCount++;
                }
            }
        }
    };
    Grid.prototype.checkLockColumns = function (cols) {
        for (var i = 0; i < cols.length; i++) {
            if (cols[i].columns) {
                this.checkLockColumns(cols[i].columns);
            }
            else if (cols[i].lockColumn) {
                this.lockcolPositionCount++;
            }
        }
    };
    /**
     * Gets the columns from the Grid.
     * @return {Column[]}
     */
    Grid.prototype.getColumns = function (isRefresh) {
        var _this = this;
        var inview = this.inViewIndexes.map(function (v) { return v - _this.groupSettings.columns.length; }).filter(function (v) { return v > -1; });
        var vLen = inview.length;
        if (!this.enableColumnVirtualization || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.columnModel) || this.columnModel.length === 0 || isRefresh) {
            this.columnModel = [];
            this.updateColumnModel(this.columns);
        }
        var columns = vLen === 0 ? this.columnModel :
            this.columnModel.slice(inview[0], inview[vLen - 1] + 1);
        return columns;
    };
    /**
     * @private
     */
    Grid.prototype.getStackedHeaderColumnByHeaderText = function (stackedHeader, col) {
        for (var i = 0; i < col.length; i++) {
            var individualColumn = col[i];
            if (individualColumn.field === stackedHeader || individualColumn.headerText === stackedHeader) {
                this.stackedColumn = individualColumn;
                break;
            }
            else if (individualColumn.columns) {
                this.getStackedHeaderColumnByHeaderText(stackedHeader, individualColumn.columns);
            }
        }
        return this.stackedColumn;
    };
    /**
     * @private
     */
    Grid.prototype.getColumnIndexesInView = function () {
        return this.inViewIndexes;
    };
    /**
     * @private
     */
    Grid.prototype.getQuery = function () {
        return this.query;
    };
    /**
     * @private
     */
    Grid.prototype.getLocaleConstants = function () {
        return this.defaultLocale;
    };
    /**
     * @private
     */
    Grid.prototype.setColumnIndexesInView = function (indexes) {
        this.inViewIndexes = indexes;
    };
    /**
     * Gets the visible columns from the Grid.
     * @return {Column[]}
     */
    Grid.prototype.getVisibleColumns = function () {
        var cols = [];
        for (var _i = 0, _a = this.columnModel; _i < _a.length; _i++) {
            var col = _a[_i];
            if (col.visible) {
                cols.push(col);
            }
        }
        return cols;
    };
    /**
     * Gets the header div of the Grid.
     * @return {Element}
     */
    Grid.prototype.getHeaderContent = function () {
        return this.headerModule.getPanel();
    };
    /**
     * Sets the header div of the Grid to replace the old header.
     * @param  {Element} element - Specifies the Grid header.
     * @return {void}
     */
    Grid.prototype.setGridHeaderContent = function (element) {
        this.headerModule.setPanel(element);
    };
    /**
     * Gets the content table of the Grid.
     * @return {Element}
     */
    Grid.prototype.getContentTable = function () {
        return this.contentModule.getTable();
    };
    /**
     * Sets the content table of the Grid to replace the old content table.
     * @param  {Element} element - Specifies the Grid content table.
     * @return {void}
     */
    Grid.prototype.setGridContentTable = function (element) {
        this.contentModule.setTable(element);
    };
    /**
     * Gets the content div of the Grid.
     * @return {Element}
     */
    Grid.prototype.getContent = function () {
        return this.contentModule.getPanel();
    };
    /**
     * Sets the content div of the Grid to replace the old Grid content.
     * @param  {Element} element - Specifies the Grid content.
     * @return {void}
     */
    Grid.prototype.setGridContent = function (element) {
        this.contentModule.setPanel(element);
    };
    /**
     * Gets the header table element of the Grid.
     * @return {Element}
     */
    Grid.prototype.getHeaderTable = function () {
        return this.headerModule.getTable();
    };
    /**
     * Sets the header table of the Grid to replace the old one.
     * @param  {Element} element - Specifies the Grid header table.
     * @return {void}
     */
    Grid.prototype.setGridHeaderTable = function (element) {
        this.headerModule.setTable(element);
    };
    /**
     * Gets the footer div of the Grid.
     * @return {Element}
     */
    Grid.prototype.getFooterContent = function () {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.footerElement)) {
            this.footerElement = this.element.getElementsByClassName('e-gridfooter')[0];
        }
        return this.footerElement;
    };
    /**
     * Gets the footer table element of the Grid.
     * @return {Element}
     */
    Grid.prototype.getFooterContentTable = function () {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.footerElement)) {
            this.footerElement = this.element.getElementsByClassName('e-gridfooter')[0];
        }
        return this.footerElement.firstChild.firstChild;
    };
    /**
     * Gets the pager of the Grid.
     * @return {Element}
     */
    Grid.prototype.getPager = function () {
        return this.gridPager; //get element from pager
    };
    /**
     * Sets the pager of the Grid to replace the old pager.
     * @param  {Element} element - Specifies the Grid pager.
     * @return {void}
     */
    Grid.prototype.setGridPager = function (element) {
        this.gridPager = element;
    };
    /**
     * Gets a row by index.
     * @param  {number} index - Specifies the row index.
     * @return {Element}
     */
    Grid.prototype.getRowByIndex = function (index) {
        return this.contentModule.getRowByIndex(index);
    };
    /**
     * Gets a movable tables row by index.
     * @param  {number} index - Specifies the row index.
     * @return {Element}
     */
    Grid.prototype.getMovableRowByIndex = function (index) {
        return this.contentModule.getMovableRowByIndex(index);
    };
    /**
     * Gets all the data rows of the Grid.
     * @return {Element[]}
     */
    Grid.prototype.getRows = function () {
        return this.contentModule.getRowElements();
    };
    /**
     * Get a row information based on cell
     * @param {Element}
     * @return RowInfo
     */
    Grid.prototype.getRowInfo = function (target) {
        var ele = target;
        var args = { target: target };
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(ele, 'e-detailrowcollapse')
            && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(ele, 'e-recordplusexpand'))) && !this.isEdit) {
            var cell = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(ele, '.e-rowcell');
            if (!cell) {
                return args;
            }
            var cellIndex = parseInt(cell.getAttribute('aria-colindex'), 10);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cell) && !isNaN(cellIndex)) {
                var row_1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(cell, '.e-row');
                var rowIndex = parseInt(row_1.getAttribute('aria-rowindex'), 10);
                var frzCols = this.getFrozenColumns();
                var isMovable = frzCols ? cellIndex >= frzCols : false;
                var rows = (isMovable ?
                    this.contentModule.getMovableRows() : this.contentModule.getRows());
                var rowsObject = rows.filter(function (r) { return r.uid === row_1.getAttribute('data-uid'); });
                var rowData = {};
                var column = void 0;
                if (Object.keys(rowsObject).length) {
                    rowData = rowsObject[0].data;
                    column = rowsObject[0].cells[isMovable ? cellIndex - frzCols : cellIndex].column;
                }
                args = { cell: cell, cellIndex: cellIndex, row: row_1, rowIndex: rowIndex, rowData: rowData, column: column, target: target };
            }
        }
        return args;
    };
    /**
     * Gets the Grid's movable content rows from frozen grid.
     * @return {Element[]}
     */
    Grid.prototype.getMovableRows = function () {
        return this.contentModule.getMovableRowElements();
    };
    /**
     * Gets all the Grid's data rows.
     * @return {Element[]}
     */
    Grid.prototype.getDataRows = function () {
        var rows = [].slice.call(this.getContentTable().querySelector('tbody').children);
        if (this.frozenRows) {
            var freezeRows = [].slice.call(this.getHeaderTable().querySelector('tbody').children);
            rows = this.addMovableRows(freezeRows, rows);
        }
        var dataRows = this.generateDataRows(rows);
        return dataRows;
    };
    /**
     * @hidden
     */
    Grid.prototype.addMovableRows = function (fRows, mrows) {
        for (var i = 0, len = mrows.length; i < len; i++) {
            fRows.push(mrows[i]);
        }
        return fRows;
    };
    Grid.prototype.generateDataRows = function (rows) {
        var dRows = [];
        for (var i = 0, len = rows.length; i < len; i++) {
            if (rows[i].classList.contains('e-row') && !rows[i].classList.contains('e-hiddenrow')) {
                dRows.push(rows[i]);
            }
        }
        return dRows;
    };
    /**
     * Gets all the Grid's movable table data rows.
     * @return {Element[]}
     */
    Grid.prototype.getMovableDataRows = function () {
        var rows = [].slice.call(this.getContent().querySelector('.e-movablecontent').querySelector('tbody').children);
        if (this.frozenRows) {
            var freezeRows = [].slice.call(this.getHeaderContent().querySelector('.e-movableheader').querySelector('tbody').children);
            rows = this.addMovableRows(freezeRows, rows);
        }
        var dataRows = this.generateDataRows(rows);
        return dataRows;
    };
    /**
     * Updates particular cell value based on the given primary key value.
     * > Primary key column must be specified using `columns.isPrimaryKey` property.
     * @param {string| number} key - Specifies the PrimaryKey value of dataSource.
     * @param {string } field - Specifies the field name which you want to update.
     * @param {string | number | boolean | Date} value - To update new value for the particular cell.
     */
    Grid.prototype.setCellValue = function (key, field, value) {
        var cells = 'cells';
        var rowData = 'data';
        var rowIdx = 'index';
        var rowuID = 'uid';
        var fieldIdx;
        var col;
        var tr;
        var mTr;
        var pkName = this.getPrimaryKeyFieldNames()[0];
        var cell = new _renderer_cell_renderer__WEBPACK_IMPORTED_MODULE_8__["CellRenderer"](this, this.serviceLocator);
        var selectedRow = {};
        var movableSelectedRow = {};
        var rowObjects = this.contentModule.getRows();
        var movableRowObjects = this.contentModule.getMovableRows();
        fieldIdx = this.getColumnIndexByField(field);
        if (this.groupSettings.columns.length > 0 || this.childGrid || this.detailTemplate) {
            fieldIdx = fieldIdx + 1;
        }
        col = this.getColumnByField(field);
        selectedRow = rowObjects.filter(function (r) {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(pkName, r.data) === key;
        })[0];
        movableSelectedRow = movableRowObjects.filter(function (r) {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(pkName, r.data) === key;
        })[0];
        tr = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedRow) ? this.element.querySelector('[data-uid=' + selectedRow[rowuID] + ']') : null;
        mTr = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(movableSelectedRow) ? this.element.querySelector('[data-uid=' + movableSelectedRow[rowuID] + ']') : null;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tr)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(field, value, selectedRow[rowData]);
            var td = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tr.childNodes[fieldIdx]) ?
                tr.childNodes[fieldIdx] : mTr.childNodes[fieldIdx - this.frozenColumns];
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(td)) {
                var sRow = selectedRow[cells][fieldIdx];
                var mRow = void 0;
                if (this.frozenColumns) {
                    mRow = movableSelectedRow[cells][fieldIdx - this.frozenColumns];
                }
                cell.refreshTD(td, !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(sRow) ? sRow : mRow, selectedRow[rowData], { index: selectedRow[rowIdx] });
                if (this.aggregates.length > 0) {
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["refreshFooterRenderer"], {});
                    if (this.groupSettings.columns.length > 0) {
                        this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["groupAggregates"], {});
                    }
                }
                /* tslint:disable:no-string-literal */
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(movableSelectedRow) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(movableSelectedRow['changes'])) {
                    movableSelectedRow['changes'][field] = value;
                }
                /* tslint:disable:no-string-literal */
                this.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_4__["queryCellInfo"], {
                    cell: td, column: col, data: selectedRow[rowData]
                });
            }
        }
        else {
            return;
        }
    };
    /**
     * Updates and refresh the particular row values based on the given primary key value.
     * > Primary key column must be specified using `columns.isPrimaryKey` property.
     *  @param {string| number} key - Specifies the PrimaryKey value of dataSource.
     *  @param {Object} rowData - To update new data for the particular row.
     */
    Grid.prototype.setRowData = function (key, rowData) {
        var rwdata = 'data';
        var rowuID = 'uid';
        var rowObjects = this.contentModule.getRows();
        var selectedRow;
        var pkName = this.getPrimaryKeyFieldNames()[0];
        var rowRenderer = new _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_7__["RowRenderer"](this.serviceLocator, null, this);
        if (this.groupSettings.columns.length > 0 && this.aggregates.length > 0) {
            rowObjects = rowObjects.filter(function (row) { return row.isDataRow; });
        }
        selectedRow = rowObjects.filter(function (r) {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(pkName, r.data) === key;
        })[0];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedRow) && this.element.querySelectorAll('[data-uid=' + selectedRow[rowuID] + ']').length) {
            selectedRow.changes = rowData;
            Object(_util__WEBPACK_IMPORTED_MODULE_3__["refreshForeignData"])(selectedRow, this.getForeignKeyColumns(), selectedRow.changes);
            rowRenderer.refresh(selectedRow, this.getColumns(), true);
            if (this.aggregates.length > 0) {
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["refreshFooterRenderer"], {});
                if (this.groupSettings.columns.length > 0) {
                    this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["groupAggregates"], {});
                }
            }
        }
        else {
            return;
        }
    };
    /**
     * Gets a cell by row and column index.
     * @param  {number} rowIndex - Specifies the row index.
     * @param  {number} columnIndex - Specifies the column index.
     * @return {Element}
     */
    Grid.prototype.getCellFromIndex = function (rowIndex, columnIndex) {
        return this.getDataRows()[rowIndex] && this.getDataRows()[rowIndex].querySelectorAll('.e-rowcell')[columnIndex];
    };
    /**
     * Gets a movable table cell by row and column index.
     * @param  {number} rowIndex - Specifies the row index.
     * @param  {number} columnIndex - Specifies the column index.
     * @return {Element}
     */
    Grid.prototype.getMovableCellFromIndex = function (rowIndex, columnIndex) {
        return this.getMovableDataRows()[rowIndex] &&
            this.getMovableDataRows()[rowIndex].querySelectorAll('.e-rowcell')[columnIndex - this.getFrozenColumns()];
    };
    /**
     * Gets a column header by column index.
     * @param  {number} index - Specifies the column index.
     * @return {Element}
     */
    Grid.prototype.getColumnHeaderByIndex = function (index) {
        return this.getHeaderTable().querySelectorAll('.e-headercell')[index];
    };
    /**
     * @hidden
     */
    Grid.prototype.getRowObjectFromUID = function (uid) {
        var rows = this.contentModule.getRows();
        var row = this.rowObject(rows, uid);
        if (this.getFrozenColumns()) {
            if (!row) {
                row = this.rowObject(this.contentModule.getMovableRows(), uid);
                return row;
            }
        }
        return row;
    };
    Grid.prototype.rowObject = function (rows, uid) {
        for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
            var row = rows_1[_i];
            if (row.uid === uid) {
                return row;
            }
        }
        return null;
    };
    /**
     * @hidden
     */
    Grid.prototype.getRowsObject = function () {
        return this.contentModule.getRows();
    };
    /**
     * @hidden
     */
    Grid.prototype.getMovableRowsObject = function () {
        return this.contentModule.getMovableRows();
    };
    /**
     * Gets a column header by column name.
     * @param  {string} field - Specifies the column name.
     * @return {Element}
     */
    Grid.prototype.getColumnHeaderByField = function (field) {
        return this.getColumnHeaderByUid(this.getColumnByField(field).uid);
    };
    /**
     * Gets a column header by UID.
     * @param  {string} field - Specifies the column uid.
     * @return {Element}
     */
    Grid.prototype.getColumnHeaderByUid = function (uid) {
        return this.getHeaderContent().querySelector('[e-mappinguid=' + uid + ']').parentElement;
    };
    /**
     * @hidden
     */
    Grid.prototype.getColumnByIndex = function (index) {
        var column;
        this.getColumns().some(function (col, i) {
            column = col;
            return i === index;
        });
        return column;
    };
    /**
     * Gets a Column by column name.
     * @param  {string} field - Specifies the column name.
     * @return {Column}
     */
    Grid.prototype.getColumnByField = function (field) {
        return Object(_util__WEBPACK_IMPORTED_MODULE_3__["iterateArrayOrObject"])(this.getColumns(), function (item, index) {
            if (item.field === field) {
                return item;
            }
            return undefined;
        })[0];
    };
    /**
     * Gets a column index by column name.
     * @param  {string} field - Specifies the column name.
     * @return {number}
     */
    Grid.prototype.getColumnIndexByField = function (field) {
        var cols = this.getColumns();
        for (var i = 0; i < cols.length; i++) {
            if (cols[i].field === field) {
                return i;
            }
        }
        return -1;
    };
    /**
     * Gets a column by UID.
     * @param  {string} uid - Specifies the column UID.
     * @return {Column}
     */
    Grid.prototype.getColumnByUid = function (uid) {
        return Object(_util__WEBPACK_IMPORTED_MODULE_3__["iterateArrayOrObject"])(this.getColumns().concat(this.getStackedColumns(this.columns)), function (item, index) {
            if (item.uid === uid) {
                return item;
            }
            return undefined;
        })[0];
    };
    /**
     * @hidden
     */
    Grid.prototype.getStackedColumns = function (columns, stackedColumn) {
        if (stackedColumn === void 0) { stackedColumn = []; }
        for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
            var column = columns_1[_i];
            if (column.columns) {
                stackedColumn.push(column);
                this.getStackedColumns(column.columns, stackedColumn);
            }
        }
        return stackedColumn;
    };
    /**
     * Gets a column index by UID.
     * @param  {string} uid - Specifies the column UID.
     * @return {number}
     */
    Grid.prototype.getColumnIndexByUid = function (uid) {
        var index = Object(_util__WEBPACK_IMPORTED_MODULE_3__["iterateArrayOrObject"])(this.getColumns(), function (item, index) {
            if (item.uid === uid) {
                return index;
            }
            return undefined;
        })[0];
        return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index) ? index : -1;
    };
    /**
     * Gets UID by column name.
     * @param  {string} field - Specifies the column name.
     * @return {string}
     */
    Grid.prototype.getUidByColumnField = function (field) {
        return Object(_util__WEBPACK_IMPORTED_MODULE_3__["iterateArrayOrObject"])(this.getColumns(), function (item, index) {
            if (item.field === field) {
                return item.uid;
            }
            return undefined;
        })[0];
    };
    /**
     * Gets TH index by column uid value.
     * @private
     * @param  {string} uid - Specifies the column uid.
     * @return {number}
     */
    Grid.prototype.getNormalizedColumnIndex = function (uid) {
        var index = this.getColumnIndexByUid(uid);
        if (this.allowGrouping) {
            index += this.groupSettings.columns.length;
        }
        if (this.isDetail()) {
            index++;
        }
        /**
         * TODO: index normalization based on the stacked header, grouping and detailTemplate
         * and frozen should be handled here
         */
        return index;
    };
    /**
     * Gets the collection of column fields.
     * @return {string[]}
     */
    Grid.prototype.getColumnFieldNames = function () {
        var columnNames = [];
        var column;
        for (var i = 0, len = this.getColumns().length; i < len; i++) {
            column = this.getColumns()[i];
            if (column.visible) {
                columnNames.push(column.field);
            }
        }
        return columnNames;
    };
    /**
     * Gets a compiled row template.
     * @return {Function}
     * @private
     */
    Grid.prototype.getRowTemplate = function () {
        return this.rowTemplateFn;
    };
    /**
     * Gets a compiled detail row template.
     * @private
     * @return {Function}
     */
    Grid.prototype.getDetailTemplate = function () {
        return this.detailTemplateFn;
    };
    /**
     * Gets a compiled detail row template.
     * @private
     * @return {Function}
     */
    Grid.prototype.getEditTemplate = function () {
        return this.editTemplateFn;
    };
    /**
     * Get the names of the primary key columns of the Grid.
     * @return {string[]}
     */
    Grid.prototype.getPrimaryKeyFieldNames = function () {
        var keys = [];
        for (var k = 0; k < this.columnModel.length; k++) {
            if (this.columnModel[k].isPrimaryKey) {
                keys.push(this.columnModel[k].field);
            }
        }
        return keys;
    };
    /**
     * Refreshes the Grid header and content.
     */
    Grid.prototype.refresh = function () {
        this.headerModule.refreshUI();
        this.updateStackedFilter();
        this.renderModule.refresh();
    };
    /**
     * Refreshes the Grid header.
     */
    Grid.prototype.refreshHeader = function () {
        this.headerModule.refreshUI();
    };
    /**
     * Gets the collection of selected rows.
     * @return {Element[]}
     */
    Grid.prototype.getSelectedRows = function () {
        return this.selectionModule ? this.selectionModule.selectedRecords : [];
    };
    /**
     * Gets the collection of selected row indexes.
     * @return {number[]}
     */
    Grid.prototype.getSelectedRowIndexes = function () {
        return this.selectionModule ? this.selectionModule.selectedRowIndexes : [];
    };
    /**
     * Gets the collection of selected row and cell indexes.
     * @return {number[]}
     */
    Grid.prototype.getSelectedRowCellIndexes = function () {
        return this.selectionModule ? this.selectionModule.selectedRowCellIndexes : [];
    };
    /**
     * Gets the collection of selected records.
     * @return {Object[]}
     */
    Grid.prototype.getSelectedRecords = function () {
        return this.selectionModule ? this.selectionModule.getSelectedRecords() : [];
    };
    /**
     * Gets the data module.
     * @return {Data}
     */
    Grid.prototype.getDataModule = function () {
        return this.renderModule.data;
    };
    /**
     * Shows a column by its column name.
     * @param  {string|string[]} keys - Defines a single or collection of column names.
     * @param  {string} showBy - Defines the column key either as field name or header text.
     * @return {void}
     */
    Grid.prototype.showColumns = function (keys, showBy) {
        showBy = showBy ? showBy : 'headerText';
        this.showHider.show(keys, showBy);
    };
    /**
     * Hides a column by column name.
     * @param  {string|string[]} keys - Defines a single or collection of column names.
     * @param  {string} hideBy - Defines the column key either as field name or header text.
     * @return {void}
     */
    Grid.prototype.hideColumns = function (keys, hideBy) {
        hideBy = hideBy ? hideBy : 'headerText';
        this.showHider.hide(keys, hideBy);
    };
    /**
     * @hidden
     */
    Grid.prototype.getFrozenColumns = function () {
        return this.frozenColumns + this.getFrozenCount(this.columns, 0);
    };
    /**
     * @hidden
     */
    Grid.prototype.getVisibleFrozenColumns = function () {
        return this.getVisibleFrozenColumnsCount() + this.getVisibleFrozenCount(this.columns, 0);
    };
    Grid.prototype.getVisibleFrozenColumnsCount = function () {
        var visibleFrozenColumns = 0;
        var col = this.columns;
        for (var i = 0; i < this.frozenColumns; i++) {
            if (col[i].visible) {
                visibleFrozenColumns++;
            }
        }
        return visibleFrozenColumns;
    };
    Grid.prototype.getVisibleFrozenCount = function (cols, cnt) {
        for (var i = 0, len = cols.length; i < len; i++) {
            if (cols[i].columns) {
                cnt = this.getVisibleFrozenCount(cols[i].columns, cnt);
            }
            else {
                if (cols[i].isFrozen && cols[i].visible) {
                    cnt++;
                }
            }
        }
        return cnt;
    };
    Grid.prototype.getFrozenCount = function (cols, cnt) {
        for (var i = 0, len = cols.length; i < len; i++) {
            if (cols[i].columns) {
                cnt = this.getFrozenCount(cols[i].columns, cnt);
            }
            else {
                if (cols[i].isFrozen) {
                    cnt++;
                }
            }
        }
        return cnt;
    };
    /**
     * Navigates to the specified target page.
     * @param  {number} pageNo - Defines the page number to navigate.
     * @return {void}
     */
    Grid.prototype.goToPage = function (pageNo) {
        if (this.pagerModule) {
            this.pagerModule.goToPage(pageNo);
        }
    };
    /**
     * Defines the text of external message.
     * @param  {string} message - Defines the message to update.
     * @return {void}
     */
    Grid.prototype.updateExternalMessage = function (message) {
        if (this.pagerModule) {
            this.pagerModule.updateExternalMessage(message);
        }
    };
    /**
     * Sorts a column with the given options.
     * @param {string} columnName - Defines the column name to be sorted.
     * @param {SortDirection} direction - Defines the direction of sorting field.
     * @param {boolean} isMultiSort - Specifies whether the previous sorted columns are to be maintained.
     * @return {void}
     */
    Grid.prototype.sortColumn = function (columnName, direction, isMultiSort) {
        if (this.sortModule) {
            this.sortModule.sortColumn(columnName, direction, isMultiSort);
        }
    };
    /**
     * Clears all the sorted columns of the Grid.
     * @return {void}
     */
    Grid.prototype.clearSorting = function () {
        if (this.sortModule) {
            this.sortModule.clearSorting();
        }
    };
    /**
     * Remove sorted column by field name.
     * @param {string} field - Defines the column field name to remove sort.
     * @return {void}
     * @hidden
     */
    Grid.prototype.removeSortColumn = function (field) {
        if (this.sortModule) {
            this.sortModule.removeSortColumn(field);
        }
    };
    /**
     * Filters grid row by column name with the given options.
     * @param  {string} fieldName - Defines the field name of the column.
     * @param  {string} filterOperator - Defines the operator to filter records.
     * @param  {string | number | Date | boolean} filterValue - Defines the value used to filter records.
     * @param  {string} predicate - Defines the relationship between one filter query and another by using AND or OR predicate.
     * @param  {boolean} matchCase - If match case is set to true, the grid filters the records with exact match. if false, it filters case
     * insensitive records (uppercase and lowercase letters treated the same).
     * @param  {boolean} ignoreAccent - If ignoreAccent set to true,
     * then filter ignores the diacritic characters or accents while filtering.
     * @param  {string} actualFilterValue - Defines the actual filter value for the filter column.
     * @param  {string} actualOperator - Defines the actual filter operator for the filter column.
     * @return {void}
     */
    Grid.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
        if (this.filterModule) {
            this.filterModule.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);
        }
    };
    /**
     * Clears all the filtered rows of the Grid.
     * @return {void}
     */
    Grid.prototype.clearFiltering = function () {
        if (this.filterModule) {
            this.filterModule.clearFiltering();
        }
    };
    /**
     * Removes filtered column by field name.
     * @param  {string} field - Defines column field name to remove filter.
     * @param  {boolean} isClearFilterBar -  Specifies whether the filter bar value needs to be cleared.
     * @return {void}
     * @hidden
     */
    Grid.prototype.removeFilteredColsByField = function (field, isClearFilterBar) {
        if (this.filterModule) {
            this.filterModule.removeFilteredColsByField(field, isClearFilterBar);
        }
    };
    /**
     * Selects a row by given index.
     * @param  {number} index - Defines the row index.
     * @param  {boolean} isToggle - If set to true, then it toggles the selection.
     * @return {void}
     */
    Grid.prototype.selectRow = function (index, isToggle) {
        if (this.selectionModule) {
            this.selectionModule.selectRow(index, isToggle);
        }
    };
    /**
     * Selects a collection of rows by indexes.
     * @param  {number[]} rowIndexes - Specifies the row indexes.
     * @return {void}
     */
    Grid.prototype.selectRows = function (rowIndexes) {
        if (this.selectionModule) {
            this.selectionModule.selectRows(rowIndexes);
        }
    };
    /**
     * Deselects the current selected rows and cells.
     * @return {void}
     */
    Grid.prototype.clearSelection = function () {
        if (this.selectionModule) {
            this.selectionModule.clearSelection();
        }
    };
    /**
     * Selects a cell by the given index.
     * @param  {IIndex} cellIndex - Defines the row and column indexes.
     * @param  {boolean} isToggle - If set to true, then it toggles the selection.
     * @return {void}
     */
    Grid.prototype.selectCell = function (cellIndex, isToggle) {
        if (this.selectionModule) {
            this.selectionModule.selectCell(cellIndex, isToggle);
        }
    };
    /**
     * Selects a range of cells from start and end indexes.
     * @param  {IIndex} startIndex - Specifies the row and column's start index.
     * @param  {IIndex} endIndex - Specifies the row and column's end index.
     * @return {void}
     */
    Grid.prototype.selectCellsByRange = function (startIndex, endIndex) {
        this.selectionModule.selectCellsByRange(startIndex, endIndex);
    };
    /**
     * Searches Grid records using the given key.
     * You can customize the default search option by using the
     * [`searchSettings`](./#searchsettings/).
     * @param  {string} searchString - Defines the key.
     * @return {void}
     */
    Grid.prototype.search = function (searchString) {
        if (this.searchModule) {
            this.searchModule.search(searchString);
        }
    };
    /**
     * By default, prints all the pages of the Grid and hides the pager.
     * > You can customize print options using the
     * [`printMode`](./#printmode).
     * @return {void}
     */
    Grid.prototype.print = function () {
        if (this.printModule) {
            this.printModule.print();
        }
    };
    /**
     * Delete a record with Given options. If fieldname and data is not given then grid will delete the selected record.
     * > `editSettings.allowDeleting` should be true.
     * @param {string} fieldname - Defines the primary key field, 'Name of the column'.
     * @param {Object} data - Defines the JSON data of the record to be deleted.
     */
    Grid.prototype.deleteRecord = function (fieldname, data) {
        if (this.editModule) {
            this.editModule.deleteRecord(fieldname, data);
        }
    };
    /**
     * Starts edit the selected row. At least one row must be selected before invoking this method.
     * `editSettings.allowEditing` should be true.
     * @return {void}
     */
    Grid.prototype.startEdit = function () {
        if (this.editModule) {
            this.editModule.startEdit();
        }
    };
    /**
     * If Grid is in editable state, you can save a record by invoking endEdit.
     */
    Grid.prototype.endEdit = function () {
        if (this.editModule) {
            this.editModule.endEdit();
        }
    };
    /**
     * Cancels edited state.
     */
    Grid.prototype.closeEdit = function () {
        if (this.editModule) {
            this.editModule.closeEdit();
        }
    };
    /**
     * Adds a new record to the Grid. Without passing parameters, it adds empty rows.
     * > `editSettings.allowEditing` should be true.
     * @param {Object} data - Defines the new add record data.
     * @param {number} index - Defines the row index to be added
     */
    Grid.prototype.addRecord = function (data, index) {
        if (this.editModule) {
            this.editModule.addRecord(data, index);
        }
    };
    /**
     * Delete any visible row by TR element.
     * @param {HTMLTableRowElement} tr - Defines the table row element.
     */
    Grid.prototype.deleteRow = function (tr) {
        if (this.editModule) {
            this.editModule.deleteRow(tr);
        }
    };
    /**
     * Copy the selected rows or cells data into clipboard.
     * @param {boolean} withHeader - Specifies whether the column header text needs to be copied along with rows or cells.
     */
    Grid.prototype.copy = function (withHeader) {
        if (this.clipboardModule) {
            this.clipboardModule.copy(withHeader);
        }
    };
    /**
     * @hidden
     */
    Grid.prototype.recalcIndentWidth = function () {
        if (!this.getHeaderTable().querySelector('.e-emptycell')) {
            return;
        }
        if ((!this.groupSettings.columns.length && !this.isDetail() && !this.isRowDragable()) ||
            this.getHeaderTable().querySelector('.e-emptycell').getAttribute('indentRefreshed') ||
            !this.getContentTable()) {
            return;
        }
        var indentWidth = this.getHeaderTable().querySelector('.e-emptycell').parentElement.offsetWidth;
        var headerCol = [].slice.call(this.getHeaderTable().querySelector('colgroup').childNodes);
        var contentCol = [].slice.call(this.getContentTable().querySelector('colgroup').childNodes);
        var perPixel = indentWidth / 30;
        var i = 0;
        if (perPixel >= 1) {
            indentWidth = (30 / perPixel);
        }
        if (this.enableColumnVirtualization) {
            indentWidth = 30;
        }
        while (i < this.groupSettings.columns.length) {
            headerCol[i].style.width = indentWidth + 'px';
            contentCol[i].style.width = indentWidth + 'px';
            this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["columnWidthChanged"], { index: i, width: indentWidth });
            i++;
        }
        if (this.isDetail()) {
            headerCol[i].style.width = indentWidth + 'px';
            contentCol[i].style.width = indentWidth + 'px';
            this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["columnWidthChanged"], { index: i, width: indentWidth });
            i++;
        }
        if (this.isRowDragable()) {
            headerCol[i].style.width = indentWidth + 'px';
            contentCol[i].style.width = indentWidth + 'px';
            this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["columnWidthChanged"], { index: i, width: indentWidth });
        }
        this.getHeaderTable().querySelector('.e-emptycell').setAttribute('indentRefreshed', 'true');
    };
    /**
     * @hidden
     */
    Grid.prototype.isRowDragable = function () {
        return this.allowRowDragAndDrop && !this.rowDropSettings.targetID;
    };
    /**
     * Changes the Grid column positions by field names.
     * @param  {string} fromFName - Defines the origin field name.
     * @param  {string} toFName - Defines the destination field name.
     * @return {void}
     */
    Grid.prototype.reorderColumns = function (fromFName, toFName) {
        if (this.reorderModule) {
            this.reorderModule.reorderColumns(fromFName, toFName);
        }
    };
    /**
     * Changes the Grid column positions by field index. If you invoke reorderColumnByIndex multiple times,
     * then you won't get the same results every time.
     * @param  {number} fromIndex - Defines the origin field index.
     * @param  {number} toIndex - Defines the destination field index.
     * @return {void}
     */
    Grid.prototype.reorderColumnByIndex = function (fromIndex, toIndex) {
        if (this.reorderModule) {
            this.reorderModule.reorderColumnByIndex(fromIndex, toIndex);
        }
    };
    /**
     * Changes the Grid column positions by field index. If you invoke reorderColumnByTargetIndex multiple times,
     * then you will get the same results every time.
     * @param  {string} fieldName - Defines the field name.
     * @param  {number} toIndex - Defines the destination field index.
     * @return {void}
     */
    Grid.prototype.reorderColumnByTargetIndex = function (fieldName, toIndex) {
        if (this.reorderModule) {
            this.reorderModule.reorderColumnByTargetIndex(fieldName, toIndex);
        }
    };
    /**
     * Changes the Grid Row position with given indexes.
     * @param  {number} fromIndexes - Defines the origin Indexes.
     * @param  {number} toIndex - Defines the destination Index.
     * @return {void}
     */
    Grid.prototype.reorderRows = function (fromIndexes, toIndex) {
        if (this.rowDragAndDropModule) {
            this.rowDragAndDropModule.reorderRows(fromIndexes, toIndex);
        }
    };
    /**
     * @hidden
     */
    Grid.prototype.refreshDataSource = function (e, args) {
        this.notify('refreshdataSource', e);
    };
    /**
     * @hidden
     */
    Grid.prototype.disableRowDD = function (enable) {
        var headerTable = this.getHeaderTable();
        var contentTable = this.getContentTable();
        var headerRows = headerTable.querySelectorAll('th.e-rowdragheader, th.e-mastercell');
        var rows = this.getRows();
        var disValue = enable ? 'none' : '';
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(headerTable.querySelector('colgroup').childNodes[0], { 'display': disValue });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(contentTable.querySelector('colgroup').childNodes[0], { 'display': disValue });
        for (var i = 0; i < this.getRows().length; i++) {
            var ele = rows[i].firstElementChild;
            enable ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], 'e-hide') : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele], ['e-hide']);
        }
        for (var j = 0; j < headerTable.querySelectorAll('th.e-rowdragheader, th.e-mastercell').length; j++) {
            var ele = headerRows[j];
            enable ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], 'e-hide') : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele], ['e-hide']);
        }
    };
    /**
     * Changes the column width to automatically fit its content to ensure that the width shows the content without wrapping/hiding.
     * > * This method ignores the hidden columns.
     * > * Uses the `autoFitColumns` method in the `dataBound` event to resize at initial rendering.
     * @param  {string |string[]} fieldNames - Defines the column names.
     * @return {void}
     *
     *
     * ```typescript
     * <div id="Grid"></div>
     * <script>
     * let gridObj: Grid = new Grid({
     *     dataSource: employeeData,
     *     columns: [
     *         { field: 'OrderID', headerText: 'Order ID', width:100 },
     *         { field: 'EmployeeID', headerText: 'Employee ID' }],
     *     dataBound: () => gridObj.autoFitColumns('EmployeeID')
     * });
     * gridObj.appendTo('#Grid');
     * </script>
     * ```
     *
     */
    Grid.prototype.autoFitColumns = function (fieldNames) {
        if (this.resizeModule) {
            this.resizeModule.autoFitColumns(fieldNames);
        }
    };
    /**
     * @hidden
     */
    Grid.prototype.createColumnchooser = function (x, y, target) {
        if (this.columnChooserModule) {
            this.columnChooserModule.renderColumnChooser(x, y, target);
        }
    };
    Grid.prototype.initializeServices = function () {
        this.serviceLocator.register('widthService', this.widthService = new _services_width_controller__WEBPACK_IMPORTED_MODULE_13__["ColumnWidthService"](this));
        this.serviceLocator.register('cellRendererFactory', new _services_cell_render_factory__WEBPACK_IMPORTED_MODULE_9__["CellRendererFactory"]);
        this.serviceLocator.register('rendererFactory', new _services_renderer_factory__WEBPACK_IMPORTED_MODULE_12__["RendererFactory"]);
        this.serviceLocator.register('localization', this.localeObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName(), this.defaultLocale, this.locale));
        this.serviceLocator.register('valueFormatter', this.valueFormatterService = new _services_value_formatter__WEBPACK_IMPORTED_MODULE_11__["ValueFormatter"](this.locale));
        this.serviceLocator.register('showHideService', this.showHider = new _actions_show_hide__WEBPACK_IMPORTED_MODULE_19__["ShowHide"](this));
        this.serviceLocator.register('ariaService', this.ariaService = new _services_aria_service__WEBPACK_IMPORTED_MODULE_14__["AriaService"]());
        this.serviceLocator.register('focus', this.focusModule = new _services_focus_strategy__WEBPACK_IMPORTED_MODULE_15__["FocusStrategy"](this));
    };
    Grid.prototype.processModel = function () {
        var _this = this;
        var gCols = this.groupSettings.columns;
        var sCols = this.sortSettings.columns;
        var flag;
        var j;
        if (this.allowGrouping) {
            var _loop_1 = function (i, len) {
                j = 0;
                for (var sLen = sCols.length; j < sLen; j++) {
                    if (sCols[j].field === gCols[i]) {
                        flag = true;
                        break;
                    }
                }
                if (!flag) {
                    sCols.push({ field: gCols[i], direction: 'Ascending' });
                }
                else {
                    if (this_1.allowSorting) {
                        this_1.sortedColumns.push(sCols[j].field);
                    }
                    else {
                        sCols[j].direction = 'Ascending';
                    }
                }
                if (!this_1.groupSettings.showGroupedColumn) {
                    var column = this_1.enableColumnVirtualization ?
                        this_1.columns.filter(function (c) { return c.field === gCols[i]; })[0] : this_1.getColumnByField(gCols[i]);
                    if (column) {
                        column.visible = false;
                    }
                    else {
                        this_1.log('initial_action', { moduleName: 'group', columnName: gCols[i] });
                    }
                }
            };
            var this_1 = this;
            for (var i = 0, len = gCols.length; i < len; i++) {
                _loop_1(i, len);
            }
        }
        if (!gCols.length) {
            sCols.forEach(function (col) {
                _this.sortedColumns.push(col.field);
            });
        }
        this.rowTemplateFn = Object(_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.rowTemplate);
        this.detailTemplateFn = Object(_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.detailTemplate);
        this.editTemplateFn = Object(_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.editSettings.template);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parentDetails)) {
            var value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parentDetails.parentKeyFieldValue) ? 'undefined' :
                this.parentDetails.parentKeyFieldValue;
            this.query.where(this.queryString, 'equal', value, true);
        }
        this.initForeignColumn();
    };
    Grid.prototype.initForeignColumn = function () {
        if (this.isForeignKeyEnabled(this.getColumns())) {
            this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["initForeignKeyColumn"], this.getForeignKeyColumns());
        }
    };
    Grid.prototype.gridRender = function () {
        this.updateRTL();
        if (this.enableHover) {
            this.element.classList.add('e-gridhover');
        }
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.element.classList.add('e-device');
        }
        if (this.rowHeight) {
            this.element.classList.add('e-grid-min-height');
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.element, ['e-responsive', 'e-default'], []);
        var rendererFactory = this.serviceLocator.getService('rendererFactory');
        this.headerModule = rendererFactory.getRenderer(_enum__WEBPACK_IMPORTED_MODULE_6__["RenderType"].Header);
        this.contentModule = rendererFactory.getRenderer(_enum__WEBPACK_IMPORTED_MODULE_6__["RenderType"].Content);
        this.printModule = new _actions_print__WEBPACK_IMPORTED_MODULE_21__["Print"](this, this.scrollModule);
        this.clipboardModule = new _actions_clipboard__WEBPACK_IMPORTED_MODULE_23__["Clipboard"](this);
        this.renderModule.render();
        this.eventInitializer();
        this.createGridPopUpElement();
        this.widthService.setWidthToColumns();
        this.updateGridLines();
        this.applyTextWrap();
        this.createTooltip(); //for clip mode ellipsis
        this.enableBoxSelection();
    };
    Grid.prototype.dataReady = function () {
        this.scrollModule.setWidth();
        this.scrollModule.setHeight();
        if (this.height !== 'auto') {
            this.scrollModule.setPadding();
        }
    };
    Grid.prototype.updateRTL = function () {
        if (this.enableRtl) {
            this.element.classList.add('e-rtl');
        }
        else {
            this.element.classList.remove('e-rtl');
        }
    };
    Grid.prototype.createGridPopUpElement = function () {
        var popup = this.createElement('div', { className: 'e-gridpopup', styles: 'display:none;' });
        var content = this.createElement('div', { className: 'e-content', attrs: { tabIndex: '-1' } });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([content, this.createElement('div', { className: 'e-uptail e-tail' })], popup);
        content.appendChild(this.createElement('span'));
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([content, this.createElement('div', { className: 'e-downtail e-tail' })], popup);
        this.element.appendChild(popup);
    };
    Grid.prototype.updateGridLines = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.element, [], ['e-verticallines', 'e-horizontallines', 'e-hidelines', 'e-bothlines']);
        switch (this.gridLines) {
            case 'Horizontal':
                this.element.classList.add('e-horizontallines');
                break;
            case 'Vertical':
                this.element.classList.add('e-verticallines');
                break;
            case 'None':
                this.element.classList.add('e-hidelines');
                break;
            case 'Both':
                this.element.classList.add('e-bothlines');
                break;
        }
        this.updateResizeLines();
    };
    Grid.prototype.updateResizeLines = function () {
        if (this.allowResizing &&
            !(this.gridLines === 'Vertical' || this.gridLines === 'Both')) {
            this.element.classList.add('e-resize-lines');
        }
        else {
            this.element.classList.remove('e-resize-lines');
        }
    };
    /**
     * The function is used to apply text wrap
     * @return {void}
     * @hidden
     */
    Grid.prototype.applyTextWrap = function () {
        if (this.allowTextWrap) {
            var headerRows = [].slice.call(this.element.querySelectorAll('.e-columnheader'));
            switch (this.textWrapSettings.wrapMode) {
                case 'Header':
                    Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(this.element, false);
                    Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(this.getContent(), false);
                    Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(headerRows, true);
                    break;
                case 'Content':
                    Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(this.getContent(), true);
                    Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(this.element, false);
                    Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(headerRows, false);
                    break;
                default:
                    Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(this.element, true);
                    Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(this.getContent(), false);
                    Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(headerRows, false);
            }
        }
    };
    /**
     * The function is used to remove text wrap
     * @return {void}
     * @hidden
     */
    Grid.prototype.removeTextWrap = function () {
        Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(this.element, false);
        var headerRows = [].slice.call(this.element.querySelectorAll('.e-columnheader'));
        Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(headerRows, false);
        Object(_util__WEBPACK_IMPORTED_MODULE_3__["wrap"])(this.getContent(), false);
    };
    /**
     * The function is used to add Tooltip to the grid cell that has ellipsiswithtooltip clip mode.
     * @return {void}
     * @hidden
     */
    Grid.prototype.createTooltip = function () {
        this.toolTipObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["Tooltip"]({ opensOn: 'custom', content: '' }, this.element);
    };
    Grid.prototype.getTooltipStatus = function (element) {
        var width;
        var headerTable = this.getHeaderTable();
        var contentTable = this.getContentTable();
        var headerDivTag = 'e-gridheader';
        var contentDivTag = 'e-gridcontent';
        var htable = this.createTable(headerTable, headerDivTag, 'header');
        var ctable = this.createTable(headerTable, headerDivTag, 'content');
        var td = element;
        var table = headerTable.contains(element) ? htable : ctable;
        var ele = headerTable.contains(element) ? 'th' : 'tr';
        table.querySelector(ele).className = element.className;
        table.querySelector(ele).innerHTML = element.innerHTML;
        width = table.querySelector(ele).getBoundingClientRect().width;
        document.body.removeChild(htable);
        document.body.removeChild(ctable);
        if (width > element.getBoundingClientRect().width) {
            return true;
        }
        return false;
    };
    Grid.prototype.mouseMoveHandler = function (e) {
        if (this.isEllipsisTooltip()) {
            var element = Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-ellipsistooltip');
            if (this.prevElement !== element || e.type === 'mouseout') {
                this.toolTipObj.close();
            }
            var tagName = e.target.tagName;
            var elemNames = ['A', 'BUTTON', 'INPUT'];
            if (element && e.type !== 'mouseout' && !(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && elemNames.indexOf(tagName) !== -1)) {
                if (element.getAttribute('aria-describedby')) {
                    return;
                }
                if (this.getTooltipStatus(element)) {
                    if (element.getElementsByClassName('e-headertext').length) {
                        this.toolTipObj.content = element.getElementsByClassName('e-headertext')[0].innerText;
                    }
                    else {
                        this.toolTipObj.content = element.innerText;
                    }
                    this.prevElement = element;
                    this.toolTipObj.open(element);
                }
            }
        }
    };
    Grid.prototype.isEllipsisTooltip = function () {
        var cols = this.getColumns();
        for (var i = 0; i < cols.length; i++) {
            if (cols[i].clipMode === 'EllipsisWithTooltip') {
                return true;
            }
        }
        return false;
    };
    Grid.prototype.scrollHandler = function () {
        if (this.isEllipsisTooltip()) {
            this.toolTipObj.close();
        }
    };
    /**
     * To create table for ellipsiswithtooltip
     * @hidden
     */
    Grid.prototype.createTable = function (table, tag, type) {
        var myTableDiv = this.createElement('div');
        myTableDiv.className = this.element.className;
        myTableDiv.style.cssText = 'display: inline-block;visibility:hidden;position:absolute';
        var mySubDiv = this.createElement('div');
        mySubDiv.className = tag;
        var myTable = this.createElement('table');
        myTable.className = table.className;
        myTable.style.cssText = 'table-layout: auto;width: auto';
        var ele = (type === 'header') ? 'th' : 'td';
        var myTr = this.createElement('tr');
        var mytd = this.createElement(ele);
        myTr.appendChild(mytd);
        myTable.appendChild(myTr);
        mySubDiv.appendChild(myTable);
        myTableDiv.appendChild(mySubDiv);
        document.body.appendChild(myTableDiv);
        return myTableDiv;
    };
    Grid.prototype.keyPressed = function (e) {
        if (e.action === 'tab' || e.action === 'shiftTab') {
            this.toolTipObj.close();
        }
    };
    /**
     * Binding events to the element while component creation.
     * @hidden
     */
    Grid.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.mouseClickHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'touchend', this.mouseClickHandler, 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.getContent(), 'dblclick', this.dblClickHandler, this);
        if (this.allowKeyboard) {
            this.element.tabIndex = this.element.tabIndex === -1 ? 0 : this.element.tabIndex;
        }
        this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.element, {
            keyAction: this.keyActionHandler.bind(this),
            keyConfigs: this.keyConfigs,
            eventName: 'keydown'
        });
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.getContent().firstElementChild, 'scroll', this.scrollHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mousemove', this.mouseMoveHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseout', this.mouseMoveHandler, this);
    };
    /**
     * Unbinding events from the element while component destroy.
     * @hidden
     */
    Grid.prototype.unwireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.mouseClickHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'touchend', this.mouseClickHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focusout', this.focusOutHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.getContent().firstElementChild, 'scroll', this.scrollHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mousemove', this.mouseMoveHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseout', this.mouseMoveHandler);
    };
    /**
     * @hidden
     */
    Grid.prototype.addListener = function () {
        if (this.isDestroyed) {
            return;
        }
        this.on(_base_constant__WEBPACK_IMPORTED_MODULE_4__["dataReady"], this.dataReady, this);
        this.on(_base_constant__WEBPACK_IMPORTED_MODULE_4__["contentReady"], this.recalcIndentWidth, this);
        this.on(_base_constant__WEBPACK_IMPORTED_MODULE_4__["headerRefreshed"], this.recalcIndentWidth, this);
        this.dataBoundFunction = this.refreshMediaCol.bind(this);
        this.addEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_4__["dataBound"], this.dataBoundFunction);
        this.on(_base_constant__WEBPACK_IMPORTED_MODULE_4__["keyPressed"], this.keyPressed, this);
        this.on(_base_constant__WEBPACK_IMPORTED_MODULE_4__["contentReady"], this.blazorTemplate, this);
    };
    /**
     * @hidden
     */
    Grid.prototype.removeListener = function () {
        if (this.isDestroyed) {
            return;
        }
        this.off(_base_constant__WEBPACK_IMPORTED_MODULE_4__["dataReady"], this.dataReady);
        this.off(_base_constant__WEBPACK_IMPORTED_MODULE_4__["contentReady"], this.recalcIndentWidth);
        this.off(_base_constant__WEBPACK_IMPORTED_MODULE_4__["headerRefreshed"], this.recalcIndentWidth);
        this.removeEventListener(_base_constant__WEBPACK_IMPORTED_MODULE_4__["dataBound"], this.dataBoundFunction);
        this.off(_base_constant__WEBPACK_IMPORTED_MODULE_4__["keyPressed"], this.keyPressed);
    };
    Grid.prototype.blazorTemplate = function () {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            for (var i = 0; i < this.columnModel.length; i++) {
                if (this.columnModel[i].template) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + this.columnModel[i].uid, 'Template', this.columnModel[i]);
                }
                if (this.columnModel[i].headerTemplate) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + this.columnModel[i].uid + 'headerTemplate', 'HeaderTemplate', this.columnModel[i]);
                }
                if (this.columnModel[i].filterTemplate) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + this.columnModel[i].uid + 'filterTemplate', 'FilterTemplate', this.columnModel[i]);
                }
            }
            if (this.groupSettings.captionTemplate) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'captionTemplate', 'CaptionTemplate', this.groupSettings);
            }
            var guid = 'guid';
            for (var k = 0; k < this.aggregates.length; k++) {
                for (var j = 0; j < this.aggregates[k].columns.length; j++) {
                    if (this.aggregates[k].columns[j].footerTemplate) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + this.aggregates[k].columns[j][guid] + 'footerTemplate', 'FooterTemplate', this.aggregates[k].columns[j]);
                    }
                    if (this.aggregates[k].columns[j].groupFooterTemplate) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + this.aggregates[k].columns[j][guid] + 'groupFooterTemplate', 'GroupFooterTemplate', this.aggregates[k].columns[j]);
                    }
                    if (this.aggregates[k].columns[j].groupCaptionTemplate) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + this.aggregates[k].columns[j][guid] + 'groupCaptionTemplate', 'GroupCaptionTemplate', this.aggregates[k].columns[j]);
                    }
                }
            }
        }
    };
    /**
     * Get current visible data of grid.
     * @return {Object[]}
     * @hidden
     */
    Grid.prototype.getCurrentViewRecords = function () {
        if (Object(_util__WEBPACK_IMPORTED_MODULE_3__["isGroupAdaptive"])(this)) {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.currentViewData.records) ?
                this.currentViewData : this.currentViewData.records;
        }
        return (this.allowGrouping && this.groupSettings.columns.length && this.currentViewData.length) ?
            this.currentViewData.records : this.currentViewData;
    };
    Grid.prototype.mouseClickHandler = function (e) {
        if (this.isChildGrid(e) || (Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-gridpopup') && e.touches) ||
            this.element.querySelectorAll('.e-cloneproperties').length || this.checkEdit(e)) {
            return;
        }
        if (((!this.allowRowDragAndDrop && (Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-gridcontent') ||
            e.target.tagName === 'TD')) || (!(this.allowGrouping || this.allowReordering) &&
            Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-gridheader'))) && e.touches) {
            return;
        }
        if (Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-gridheader') && this.allowRowDragAndDrop) {
            e.preventDefault();
        }
        this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["click"], e);
    };
    Grid.prototype.checkEdit = function (e) {
        var tr = Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-row');
        var isEdit = this.editSettings.mode !== 'Batch' &&
            this.isEdit && tr && (tr.classList.contains('e-editedrow') || tr.classList.contains('e-addedrow'));
        return !Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-unboundcelldiv') && (isEdit || (Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-rowcell') &&
            Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-rowcell').classList.contains('e-editedbatchcell')));
    };
    Grid.prototype.dblClickHandler = function (e) {
        var grid = Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-grid');
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(grid) || grid.id !== this.element.id || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-unboundcelldiv')) {
            return;
        }
        var dataRow = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'tr').getAttribute('data-uid')) &&
            this.getRowObjectFromUID(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'tr').getAttribute('data-uid')).isDataRow;
        var args = this.getRowInfo(e.target);
        args.target = e.target;
        if (dataRow) {
            this.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_4__["recordDoubleClick"], args);
        }
        this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["dblclick"], e);
    };
    Grid.prototype.focusOutHandler = function (e) {
        if (this.isChildGrid(e)) {
            return;
        }
        if (!Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-grid')) {
            this.element.querySelector('.e-gridpopup').style.display = 'None';
        }
        var filterClear = this.element.querySelector('.e-cancel:not(.e-hide)');
        if (filterClear) {
            filterClear.classList.add('e-hide');
        }
        var relatedTarget = e.relatedTarget;
        var ariaOwns = relatedTarget ? relatedTarget.getAttribute('aria-owns') : null;
        if ((!relatedTarget || (!Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(relatedTarget, 'e-grid') &&
            (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ariaOwns) &&
                (ariaOwns)) !== e.target.getAttribute('aria-owns')))
            && !this.keyPress && this.isEdit && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            if (this.editSettings.mode === 'Batch') {
                this.editModule.saveCell();
                this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["editNextValCell"], {});
            }
            if (this.editSettings.mode === 'Normal') {
                this.editModule.editFormValidate();
            }
        }
        this.keyPress = false;
    };
    Grid.prototype.isChildGrid = function (e) {
        var gridElement = Object(_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(e.target, 'e-grid');
        if (gridElement && gridElement.id !== this.element.id) {
            return true;
        }
        return false;
    };
    Grid.prototype.mergePersistGridData = function () {
        var data = window.localStorage.getItem(this.getModuleName() + this.element.id);
        if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data) || (data === ''))) {
            var dataObj = JSON.parse(data);
            if (this.enableVirtualization) {
                dataObj.pageSettings.currentPage = 1;
            }
            var keys = Object.keys(dataObj);
            this.isProtectedOnChange = true;
            for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
                var key = keys_1[_i];
                if ((typeof this[key] === 'object') && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this[key])) {
                    if (Array.isArray(this[key]) && key === 'columns') {
                        Object(_util__WEBPACK_IMPORTED_MODULE_3__["setColumnIndex"])(this[key]);
                        this.mergeColumns(dataObj[key], this[key]);
                        this[key] = dataObj[key];
                    }
                    else {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this[key], dataObj[key]);
                    }
                }
                else {
                    this[key] = dataObj[key];
                }
            }
            this.isProtectedOnChange = false;
        }
    };
    Grid.prototype.mergeColumns = function (storedColumn, columns) {
        var _this = this;
        storedColumn.forEach(function (col, index, arr) {
            var localCol = columns.filter(function (tCol) { return tCol.index === col.index; })[0];
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(localCol)) {
                if (localCol.columns && localCol.columns.length) {
                    _this.mergeColumns(col.columns, localCol.columns);
                    arr[index] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(localCol, col, true);
                }
                else {
                    arr[index] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(localCol, col, true);
                }
            }
        });
    };
    /**
     * @hidden
     */
    Grid.prototype.isDetail = function () {
        return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.detailTemplate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.childGrid);
    };
    Grid.prototype.isCommandColumn = function (columns) {
        var _this = this;
        return columns.some(function (col) {
            if (col.columns) {
                return _this.isCommandColumn(col.columns);
            }
            return !!(col.commands || col.commandsTemplate);
        });
    };
    Grid.prototype.isForeignKeyEnabled = function (columns) {
        var _this = this;
        return columns.some(function (col) {
            if (col.columns) {
                return _this.isForeignKeyEnabled(col.columns);
            }
            return !!(col.dataSource && col.foreignKeyValue);
        });
    };
    Grid.prototype.keyActionHandler = function (e) {
        this.keyPress = e.action !== 'space';
        if (this.isChildGrid(e) ||
            (this.isEdit && e.action !== 'escape' && e.action !== 'enter' && e.action !== 'shiftEnter'
                && e.action !== 'tab' && e.action !== 'shiftTab')) {
            return;
        }
        if (this.allowKeyboard) {
            if (e.action === 'ctrlPlusP') {
                e.preventDefault();
                this.print();
            }
            this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["keyPressed"], e);
        }
    };
    /**
     * @hidden
     */
    Grid.prototype.setInjectedModules = function (modules) {
        this.injectedModules = modules;
    };
    Grid.prototype.updateColumnObject = function () {
        Object(_util__WEBPACK_IMPORTED_MODULE_3__["prepareColumns"])(this.columns, this.enableColumnVirtualization);
        Object(_util__WEBPACK_IMPORTED_MODULE_3__["setColumnIndex"])(this.columns);
        this.initForeignColumn();
        this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["autoCol"], {});
    };
    /**
     * Gets the foreign columns from Grid.
     * @return {Column[]}
     */
    Grid.prototype.getForeignKeyColumns = function () {
        return this.getColumns().filter(function (col) {
            return col.isForeignColumn();
        });
    };
    /**
     * @hidden
     */
    Grid.prototype.getRowHeight = function () {
        return this.rowHeight ? this.rowHeight : Object(_util__WEBPACK_IMPORTED_MODULE_3__["getRowHeight"])(this.element);
    };
    /**
     * Refreshes the Grid column changes.
     */
    Grid.prototype.refreshColumns = function () {
        this.isPreventScrollEvent = true;
        this.updateColumnObject();
        this.refresh();
    };
    /**
     * Export Grid data to Excel file(.xlsx).
     * @param  {ExcelExportProperties} excelExportProperties - Defines the export properties of the Grid.
     * @param  {boolean} isMultipleExport - Define to enable multiple export.
     * @param  {workbook} workbook - Defines the Workbook if multiple export is enabled.
     * @param  {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
     * @return {Promise<any>}
     */
    Grid.prototype.excelExport = function (excelExportProperties, isMultipleExport, 
    /* tslint:disable-next-line:no-any */
    workbook, isBlob) {
        return this.excelExportModule ?
            this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, false, isBlob) : null;
    };
    /**
     * Export Grid data to CSV file.
     * @param  {ExcelExportProperties} excelExportProperties - Defines the export properties of the Grid.
     * @param  {boolean} isMultipleExport - Define to enable multiple export.
     * @param  {workbook} workbook - Defines the Workbook if multiple export is enabled.
     * @param  {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
     * @return {Promise<any>}
     *
     */
    Grid.prototype.csvExport = function (excelExportProperties, 
    /* tslint:disable-next-line:no-any */
    isMultipleExport, workbook, isBlob) {
        return this.excelExportModule ?
            this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, true, isBlob) : null;
    };
    /**
     * Export Grid data to PDF document.
     * @param  {pdfExportProperties} PdfExportProperties - Defines the export properties of the Grid.
     * @param  {isMultipleExport} isMultipleExport - Define to enable multiple export.
     * @param  {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.
     * @param  {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
     * @return {Promise<any>}
     *
     */
    Grid.prototype.pdfExport = function (pdfExportProperties, 
    /* tslint:disable-next-line:no-any */
    isMultipleExport, pdfDoc, isBlob) {
        return this.pdfExportModule ? this.pdfExportModule.Map(this, pdfExportProperties, isMultipleExport, pdfDoc, isBlob) : null;
    };
    /**
     * Groups a column by column name.
     * @param  {string} columnName - Defines the column name to group.
     * @return {void}
     */
    Grid.prototype.groupColumn = function (columnName) {
        if (this.groupModule) {
            this.groupModule.groupColumn(columnName);
        }
    };
    /**
     * Ungroups a column by column name.
     * @param  {string} columnName - Defines the column name to ungroup.
     * @return {void}
     */
    Grid.prototype.ungroupColumn = function (columnName) {
        if (this.groupModule) {
            this.groupModule.ungroupColumn(columnName);
        }
    };
    /**
     * @hidden
     */
    Grid.prototype.isContextMenuOpen = function () {
        return this.contextMenuModule && this.contextMenuModule.isOpen;
    };
    /**
     * @hidden
     */
    Grid.prototype.ensureModuleInjected = function (module) {
        return this.getInjectedModules().indexOf(module) >= 0;
    };
    /**
     * Destroys the given template reference.
     * @param {string[]} propertyNames - Defines the collection of template name.
     */
    //tslint:disable-next-line:no-any
    Grid.prototype.destroyTemplate = function (propertyNames, index) {
        this.clearTemplate(propertyNames, index);
    };
    /**
     * @hidden
     * @private
     */
    Grid.prototype.log = function (type, args) {
        this.loggerModule ? this.loggerModule.log(type, args) : (function () { return 0; })();
    };
    /**
     * @hidden
     */
    Grid.prototype.applyBiggerTheme = function (element) {
        if (this.element.classList.contains('e-bigger')) {
            element.classList.add('e-bigger');
        }
    };
    /**
     * @hidden
     */
    Grid.prototype.getPreviousRowData = function () {
        var previousRowData = this.getRowsObject()[this.getRows().length - 1].data;
        return previousRowData;
    };
    /**
     * Hides the scrollbar placeholder of Grid content when grid content is not overflown.
     * @return {void}
     */
    Grid.prototype.hideScroll = function () {
        var content = this.getContent().querySelector('.e-content');
        var cTable = content.querySelector('.e-movablecontent') ? content.querySelector('.e-movablecontent') : content;
        var fTable = content.querySelector('.e-frozencontent') ? content.querySelector('.e-frozencontent') : content;
        if (cTable.scrollHeight <= cTable.clientHeight && fTable.scrollHeight <= fTable.clientHeight) {
            this.scrollModule.removePadding();
            cTable.style.overflowY = 'auto';
        }
        if (this.frozenColumns && cTable.scrollWidth <= cTable.clientWidth) {
            cTable.style.overflowX = 'auto';
            cTable.style.overflowY = 'auto';
            this.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["frozenHeight"], 0);
        }
    };
    /**
     * Get row index by primary key or row data.
     * @param  {string} value - Defines the primary key value.
     * @param  {Object} value - Defines the row data.
     */
    Grid.prototype.getRowIndexByPrimaryKey = function (value) {
        var pkName = this.getPrimaryKeyFieldNames()[0];
        value = typeof value === 'object' ? value[pkName] : value;
        for (var i = 0; i < this.getRowsObject().length; i++) {
            if (this.getRowsObject()[i].data[pkName] === value) {
                return this.getRowsObject()[i].index;
            }
        }
        return -1;
    };
    ;
    var Grid_1;
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], Grid.prototype, "columns", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Grid.prototype, "enableAltRow", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Grid.prototype, "enableHover", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "enableAutoFill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Grid.prototype, "allowKeyboard", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowTextWrap", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, TextWrapSettings)
    ], Grid.prototype, "textWrapSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowPaging", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _models_page_settings__WEBPACK_IMPORTED_MODULE_16__["PageSettings"])
    ], Grid.prototype, "pageSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "enableVirtualization", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "enableColumnVirtualization", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SearchSettings)
    ], Grid.prototype, "searchSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowSorting", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Grid.prototype, "allowMultiSorting", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowExcelExport", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowPdfExport", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SortSettings)
    ], Grid.prototype, "sortSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Grid.prototype, "allowSelection", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(-1)
    ], Grid.prototype, "selectedRowIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SelectionSettings)
    ], Grid.prototype, "selectionSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowFiltering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowReordering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowResizing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowRowDragAndDrop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, RowDropSettings)
    ], Grid.prototype, "rowDropSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, FilterSettings)
    ], Grid.prototype, "filterSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "allowGrouping", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "showColumnMenu", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, GroupSettings)
    ], Grid.prototype, "groupSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, EditSettings)
    ], Grid.prototype, "editSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _models_aggregate__WEBPACK_IMPORTED_MODULE_22__["AggregateRow"])
    ], Grid.prototype, "aggregates", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Grid.prototype, "showColumnChooser", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Grid.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Grid.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Default')
    ], Grid.prototype, "gridLines", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "rowTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "detailTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "childGrid", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "queryString", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('AllPages')
    ], Grid.prototype, "printMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Expanded')
    ], Grid.prototype, "hierarchyPrintMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], Grid.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Grid.prototype, "rowHeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('USD')
    ], Grid.prototype, "currencyCode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "toolbar", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "contextMenuItems", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "columnMenuItems", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "toolbarTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Grid.prototype, "pagerTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Grid.prototype, "frozenRows", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Grid.prototype, "frozenColumns", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('All')
    ], Grid.prototype, "columnQueryMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "destroyed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "load", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "rowDataBound", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "queryCellInfo", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "headerCellInfo", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "actionBegin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "actionComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "actionFailure", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "dataBound", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "recordDoubleClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "rowSelecting", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "rowSelected", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "rowDeselecting", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "rowDeselected", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "cellSelecting", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "cellSelected", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "cellDeselecting", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "cellDeselected", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "columnDragStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "columnDrag", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "columnDrop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "printComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforePrint", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "pdfQueryCellInfo", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "pdfHeaderQueryCellInfo", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "exportDetailDataBound", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "excelQueryCellInfo", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "excelHeaderQueryCellInfo", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforeExcelExport", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "excelExportComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforePdfExport", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "pdfExportComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "rowDragStartHelper", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "detailDataBound", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "rowDragStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "rowDrag", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "rowDrop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "toolbarClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforeOpenColumnChooser", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "batchAdd", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "batchDelete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "batchCancel", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforeBatchAdd", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforeBatchDelete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforeBatchSave", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beginEdit", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "commandClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "cellEdit", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "cellSave", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "cellSaved", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "resizeStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "resizing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "resizeStop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforeDataBound", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "contextMenuOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "contextMenuClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "columnMenuOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "columnMenuClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "checkBoxChange", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforeCopy", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "beforePaste", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "dataStateChange", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Grid.prototype, "dataSourceChanged", void 0);
    Grid = Grid_1 = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Grid);
    return Grid;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js ***!
  \******************************************************************/
/*! exports provided: doesImplementInterface, valueAccessor, getUpdateUsingRaf, updatecloneRow, getCollapsedRowsCount, recursive, iterateArrayOrObject, iterateExtend, templateCompiler, setStyleAndAttributes, extend, setColumnIndex, prepareColumns, setCssInGridPopUp, getActualProperties, parentsUntil, getElementIndex, inArray, getActualPropFromColl, removeElement, getPosition, getUid, appendChildren, parents, calculateAggregate, getScrollBarWidth, getRowHeight, isComplexField, getComplexFieldID, setComplexFieldID, isEditable, isActionPrevent, wrap, setFormatter, addRemoveActiveClasses, distinctStringValues, getFilterMenuPostion, getZIndexCalcualtion, toogleCheckbox, createCboxWithWrap, removeAddCboxClasses, refreshForeignData, getForeignData, getColumnByForeignKeyValue, getDatePredicate, renderMovable, isGroupAdaptive, getObject, getCustomDateFormat, getExpandedState, getPrintGridModel, extendObjWithFn, measureColumnDepth, checkDepth */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doesImplementInterface", function() { return doesImplementInterface; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "valueAccessor", function() { return valueAccessor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUpdateUsingRaf", function() { return getUpdateUsingRaf; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updatecloneRow", function() { return updatecloneRow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCollapsedRowsCount", function() { return getCollapsedRowsCount; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recursive", function() { return recursive; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterateArrayOrObject", function() { return iterateArrayOrObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterateExtend", function() { return iterateExtend; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateCompiler", function() { return templateCompiler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setStyleAndAttributes", function() { return setStyleAndAttributes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setColumnIndex", function() { return setColumnIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prepareColumns", function() { return prepareColumns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCssInGridPopUp", function() { return setCssInGridPopUp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActualProperties", function() { return getActualProperties; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parentsUntil", function() { return parentsUntil; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementIndex", function() { return getElementIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inArray", function() { return inArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActualPropFromColl", function() { return getActualPropFromColl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return removeElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPosition", function() { return getPosition; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUid", function() { return getUid; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendChildren", function() { return appendChildren; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parents", function() { return parents; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateAggregate", function() { return calculateAggregate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScrollBarWidth", function() { return getScrollBarWidth; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRowHeight", function() { return getRowHeight; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isComplexField", function() { return isComplexField; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getComplexFieldID", function() { return getComplexFieldID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setComplexFieldID", function() { return setComplexFieldID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEditable", function() { return isEditable; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isActionPrevent", function() { return isActionPrevent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return wrap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFormatter", function() { return setFormatter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRemoveActiveClasses", function() { return addRemoveActiveClasses; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctStringValues", function() { return distinctStringValues; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFilterMenuPostion", function() { return getFilterMenuPostion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getZIndexCalcualtion", function() { return getZIndexCalcualtion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toogleCheckbox", function() { return toogleCheckbox; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCboxWithWrap", function() { return createCboxWithWrap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAddCboxClasses", function() { return removeAddCboxClasses; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refreshForeignData", function() { return refreshForeignData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getForeignData", function() { return getForeignData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColumnByForeignKeyValue", function() { return getColumnByForeignKeyValue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDatePredicate", function() { return getDatePredicate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderMovable", function() { return renderMovable; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isGroupAdaptive", function() { return isGroupAdaptive; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getObject", function() { return getObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCustomDateFormat", function() { return getCustomDateFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getExpandedState", function() { return getExpandedState; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPrintGridModel", function() { return getPrintGridModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extendObjWithFn", function() { return extendObjWithFn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "measureColumnDepth", function() { return measureColumnDepth; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkDepth", function() { return checkDepth; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _models_column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../models/column */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _actions_print__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../actions/print */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/print.js");








//https://typescript.codeplex.com/discussions/401501
/**
 * Function to check whether target object implement specific interface
 * @param  {Object} target
 * @param  {string} checkFor
 * @returns no
 * @hidden
 */
function doesImplementInterface(target, checkFor) {
    /* tslint:disable:no-any */
    return target.prototype && checkFor in target.prototype;
}
/**
 * Function to get value from provided data
 * @param  {string} field
 * @param  {Object} data
 * @param  {IColumn} column
 * @hidden
 */
function valueAccessor(field, data, column) {
    return (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(field) || field === '') ? '' : _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].getObject(field, data);
}
/**
 * The function used to update Dom using requestAnimationFrame.
 * @param  {Function} fn - Function that contains the actual action
 * @return {Promise<T>}
 * @hidden
 */
function getUpdateUsingRaf(updateFunction, callBack) {
    requestAnimationFrame(function () {
        try {
            callBack(null, updateFunction());
        }
        catch (e) {
            callBack(e);
        }
    });
}
/**
 * @hidden
 */
function updatecloneRow(grid) {
    var nRows = [];
    var actualRows = grid.vRows;
    for (var i = 0; i < actualRows.length; i++) {
        if (actualRows[i].isDataRow) {
            nRows.push(actualRows[i]);
        }
        else if (!actualRows[i].isDataRow) {
            nRows.push(actualRows[i]);
            if (!actualRows[i].isExpand) {
                i += getCollapsedRowsCount(actualRows[i], grid);
            }
        }
    }
    grid.vcRows = nRows;
}
/**
 * @hidden
 */
var count = 0;
function getCollapsedRowsCount(val, grid) {
    count = 0;
    var gSummary = 'gSummary';
    var total = 'count';
    var gLen = grid.groupSettings.columns.length;
    var records = 'records';
    var items = 'items';
    var value = val[gSummary];
    if (value === val.data[total]) {
        if (grid.groupSettings.columns.length !== 1) {
            count += val[gSummary] * (grid.groupSettings.columns.length - val.indent);
        }
        else {
            count += val[gSummary];
        }
        return count;
    }
    else {
        for (var i = 0, len = val.data[items].length; i < len; i++) {
            var gLevel = val.data[items][i];
            count += gLevel[items].length + ((gLen !== grid.columns.length) &&
                !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(gLevel[items][records]) ? gLevel[items][records].length : 0);
            if (gLevel[items].GroupGuid && gLevel[items].childLevels !== 0) {
                recursive(gLevel);
            }
        }
        count += val.data[items].length;
    }
    return count;
}
/**
 * @hidden
 */
function recursive(row) {
    var items = 'items';
    var rCount = 'count';
    for (var j = 0, length_1 = row[items].length; j < length_1; j++) {
        var nLevel = row[items][j];
        count += nLevel[rCount];
        if (nLevel[items].childLevels !== 0) {
            recursive(nLevel);
        }
    }
}
/**
 * @hidden
 */
function iterateArrayOrObject(collection, predicate) {
    var result = [];
    for (var i = 0, len = collection.length; i < len; i++) {
        var pred = predicate(collection[i], i);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(pred)) {
            result.push(pred);
        }
    }
    return result;
}
/** @hidden */
function iterateExtend(array) {
    var obj = [];
    for (var i = 0; i < array.length; i++) {
        obj.push(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, getActualProperties(array[i]), {}, true));
    }
    return obj;
}
/** @hidden */
function templateCompiler(template) {
    if (template) {
        var e = void 0;
        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;
}
/** @hidden */
function setStyleAndAttributes(node, customAttributes) {
    var copyAttr = {};
    var literals = ['style', 'class'];
    //Dont touch the original object - make a copy
    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(copyAttr, customAttributes, {});
    if ('style' in copyAttr) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(node, copyAttr[literals[0]]);
        delete copyAttr[literals[0]];
    }
    if ('class' in copyAttr) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([node], copyAttr[literals[1]]);
        delete copyAttr[literals[1]];
    }
    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(node, copyAttr);
}
/** @hidden */
function extend(copied, first, second, exclude) {
    var moved = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(copied, first, second);
    Object.keys(moved).forEach(function (value, index) {
        if (exclude && exclude.indexOf(value) !== -1) {
            delete moved[value];
        }
    });
    return moved;
}
/** @hidden */
function setColumnIndex(columnModel, ind) {
    if (ind === void 0) { ind = 0; }
    for (var i = 0, len = columnModel.length; i < len; i++) {
        if (columnModel[i].columns) {
            columnModel[i].index = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(columnModel[i].index) ? ind : columnModel[i].index;
            ind++;
            ind = setColumnIndex(columnModel[i].columns, ind);
        }
        else {
            columnModel[i].index = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(columnModel[i].index) ? ind : columnModel[i].index;
            ind++;
        }
    }
    return ind;
}
/** @hidden */
function prepareColumns(columns, autoWidth) {
    for (var c = 0, len = columns.length; c < len; c++) {
        var column = void 0;
        if (typeof columns[c] === 'string') {
            column = new _models_column__WEBPACK_IMPORTED_MODULE_2__["Column"]({ field: columns[c] });
        }
        else if (!(columns[c] instanceof _models_column__WEBPACK_IMPORTED_MODULE_2__["Column"])) {
            if (!columns[c].columns) {
                column = new _models_column__WEBPACK_IMPORTED_MODULE_2__["Column"](columns[c]);
            }
            else {
                columns[c].columns = prepareColumns(columns[c].columns);
                column = new _models_column__WEBPACK_IMPORTED_MODULE_2__["Column"](columns[c]);
            }
        }
        else {
            column = columns[c];
        }
        column.headerText = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.headerText) ? column.foreignKeyValue || column.field || '' : column.headerText;
        column.foreignKeyField = column.foreignKeyField || column.field;
        column.valueAccessor = (typeof column.valueAccessor === 'string' ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(column.valueAccessor, window)
            : column.valueAccessor) || valueAccessor;
        column.width = autoWidth && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.width) ? 200 : column.width;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.visible)) {
            column.visible = true;
        }
        columns[c] = column;
    }
    return columns;
}
/** @hidden */
function setCssInGridPopUp(popUp, e, className) {
    var popUpSpan = popUp.querySelector('span');
    var position = popUp.parentElement.getBoundingClientRect();
    var targetPosition = e.target.getBoundingClientRect();
    var isBottomTail;
    popUpSpan.className = className;
    popUp.style.display = '';
    isBottomTail = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.clientY) ? e.changedTouches[0].clientY :
        e.clientY) > popUp.offsetHeight + 10;
    popUp.style.top = targetPosition.top - position.top +
        (isBottomTail ? -(popUp.offsetHeight + 10) : popUp.offsetHeight + 10) + 'px'; //10px for tail element
    popUp.style.left = getPopupLeftPosition(popUp, e, targetPosition, position.left) + 'px';
    if (isBottomTail) {
        popUp.querySelector('.e-downtail').style.display = '';
        popUp.querySelector('.e-uptail').style.display = 'none';
    }
    else {
        popUp.querySelector('.e-downtail').style.display = 'none';
        popUp.querySelector('.e-uptail').style.display = '';
    }
}
/** @hidden */
function getPopupLeftPosition(popup, e, targetPosition, left) {
    var width = popup.offsetWidth / 2;
    var x = getPosition(e).x;
    if (x - targetPosition.left < width) {
        return targetPosition.left - left;
    }
    else if (targetPosition.right - x < width) {
        return targetPosition.right - left - width * 2;
    }
    else {
        return x - left - width;
    }
}
/** @hidden */
function getActualProperties(obj) {
    if (obj instanceof _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]) {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('properties', obj);
    }
    else {
        return obj;
    }
}
/** @hidden */
function parentsUntil(elem, selector, isID) {
    var parent = elem;
    while (parent) {
        if (isID ? parent.id === selector : parent.classList.contains(selector)) {
            break;
        }
        parent = parent.parentElement;
    }
    return parent;
}
/** @hidden */
function getElementIndex(element, elements) {
    var index = -1;
    for (var i = 0, len = elements.length; i < len; i++) {
        if (elements[i].isEqualNode(element)) {
            index = i;
            break;
        }
    }
    return index;
}
/** @hidden */
function inArray(value, collection) {
    for (var i = 0, len = collection.length; i < len; i++) {
        if (collection[i] === value) {
            return i;
        }
    }
    return -1;
}
/** @hidden */
function getActualPropFromColl(collection) {
    var coll = [];
    for (var i = 0, len = collection.length; i < len; i++) {
        if (collection[i].hasOwnProperty('properties')) {
            coll.push(collection[i].properties);
        }
        else {
            coll.push(collection[i]);
        }
    }
    return coll;
}
/** @hidden */
function removeElement(target, selector) {
    var elements = [].slice.call(target.querySelectorAll(selector));
    for (var i = 0; i < elements.length; i++) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(elements[i]);
    }
}
/** @hidden */
function getPosition(e) {
    var position = {};
    position.x = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.clientX) ? e.changedTouches[0].clientX :
        e.clientX);
    position.y = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.clientY) ? e.changedTouches[0].clientY :
        e.clientY);
    return position;
}
var uid = 0;
/** @hidden */
function getUid(prefix) {
    return prefix + uid++;
}
/** @hidden */
function appendChildren(elem, children) {
    for (var i = 0, len = children.length; i < len; i++) {
        if (len === children.length) {
            elem.appendChild(children[i]);
        }
        else {
            elem.appendChild(children[0]);
        }
    }
    return elem;
}
/** @hidden */
function parents(elem, selector, isID) {
    var parent = elem;
    var parents = [];
    while (parent) {
        if (isID ? parent.id === selector : parent.classList.contains(selector)) {
            parents.push(parent);
        }
        parent = parent.parentElement;
    }
    return parents;
}
/** @hidden */
function calculateAggregate(type, data, column, context) {
    if (type === 'Custom') {
        var temp = column.customAggregate;
        if (typeof temp === 'string') {
            temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(temp, window);
        }
        return temp ? temp.call(context, data, column) : '';
    }
    return (column.field in data || data instanceof Array) ? _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].aggregates[type.toLowerCase()](data, column.field) : null;
}
/** @hidden */
var scrollWidth = null;
/** @hidden */
function getScrollBarWidth() {
    if (scrollWidth !== null) {
        return scrollWidth;
    }
    var divNode = document.createElement('div');
    var value = 0;
    divNode.style.cssText = 'width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;';
    document.body.appendChild(divNode);
    value = (divNode.offsetWidth - divNode.clientWidth) | 0;
    document.body.removeChild(divNode);
    return scrollWidth = value;
}
/** @hidden */
var rowHeight;
/** @hidden */
function getRowHeight(element) {
    if (rowHeight !== undefined) {
        return rowHeight;
    }
    var table = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('table', { className: 'e-table', styles: 'visibility: hidden' });
    table.innerHTML = '<tr><td class="e-rowcell">A<td></tr>';
    element.appendChild(table);
    var rect = table.querySelector('td').getBoundingClientRect();
    element.removeChild(table);
    rowHeight = Math.ceil(rect.height);
    return rowHeight;
}
/** @hidden */
function isComplexField(field) {
    return field.split('.').length > 1;
}
/** @hidden */
function getComplexFieldID(field) {
    if (field === void 0) { field = ''; }
    return field.replace(/\./g, '___');
}
/** @hidden */
function setComplexFieldID(field) {
    if (field === void 0) { field = ''; }
    return field.replace(/___/g, '.');
}
/** @hidden */
function isEditable(col, type, elem) {
    var row = parentsUntil(elem, 'e-row');
    var isOldRow = !row ? true : row && !row.classList.contains('e-insertedrow');
    if (type === 'beginEdit' && isOldRow) {
        if (col.isIdentity || col.isPrimaryKey || !col.allowEditing) {
            return false;
        }
        return true;
    }
    else if (type === 'add' && col.isIdentity) {
        return false;
    }
    else {
        if (isOldRow && !col.allowEditing && !col.isIdentity && !col.isPrimaryKey) {
            return false;
        }
        return true;
    }
}
/** @hidden */
function isActionPrevent(inst) {
    var dlg = inst.element.querySelector('#' + inst.element.id + 'EditConfirm');
    return inst.editSettings.mode === 'Batch' &&
        (inst.element.querySelectorAll('.e-updatedtd').length) && inst.editSettings.showConfirmDialog &&
        (dlg ? dlg.classList.contains('e-popup-close') : true);
}
/** @hidden */
function wrap(elem, action) {
    var clName = 'e-wrap';
    elem = elem instanceof Array ? elem : [elem];
    for (var i = 0; i < elem.length; i++) {
        action ? elem[i].classList.add(clName) : elem[i].classList.remove(clName);
    }
}
/** @hidden */
function setFormatter(serviceLocator, column) {
    var fmtr = serviceLocator.getService('valueFormatter');
    switch (column.type) {
        case 'date':
            column.setFormatter(fmtr.getFormatFunction({ type: 'date', skeleton: column.format }));
            column.setParser(fmtr.getParserFunction({ type: 'date', skeleton: column.format }));
            break;
        case 'datetime':
            column.setFormatter(fmtr.getFormatFunction({ type: 'dateTime', skeleton: column.format }));
            column.setParser(fmtr.getParserFunction({ type: 'dateTime', skeleton: column.format }));
            break;
        case 'number':
            column.setFormatter(fmtr.getFormatFunction({ format: column.format }));
            column.setParser(fmtr.getParserFunction({ format: column.format }));
            break;
    }
}
/** @hidden */
function addRemoveActiveClasses(cells, add) {
    var args = [];
    for (var _i = 2; _i < arguments.length; _i++) {
        args[_i - 2] = arguments[_i];
    }
    for (var i = 0, len = cells.length; i < len; i++) {
        if (add) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cells[i], args.slice(), []);
            cells[i].setAttribute('aria-selected', 'true');
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cells[i], [], args.slice());
            cells[i].removeAttribute('aria-selected');
        }
    }
}
/** @hidden */
function distinctStringValues(result) {
    var temp = {};
    var res = [];
    for (var i = 0; i < result.length; i++) {
        if (!(result[i] in temp)) {
            res.push(result[i].toString());
            temp[result[i]] = 1;
        }
    }
    return res;
}
/** @hidden */
function getFilterMenuPostion(target, dialogObj, grid) {
    var elementVisible = dialogObj.element.style.display;
    dialogObj.element.style.display = 'block';
    var dlgWidth = dialogObj.width;
    var newpos;
    if (!grid.enableRtl) {
        newpos = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["calculateRelativeBasedPosition"])(target, dialogObj.element);
        dialogObj.element.style.display = elementVisible;
        dialogObj.element.style.top = (newpos.top + target.getBoundingClientRect().height) - 5 + 'px';
        var leftPos = ((newpos.left - dlgWidth) + target.clientWidth);
        if (leftPos < 1) {
            dialogObj.element.style.left = (dlgWidth + leftPos) - 16 + 'px'; // right calculation
        }
        else {
            dialogObj.element.style.left = leftPos + -4 + 'px';
        }
    }
    else {
        newpos = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["calculatePosition"])(target, 'left', 'bottom');
        dialogObj.element.style.top = (newpos.top + target.getBoundingClientRect().height) - 35 + 'px';
        dialogObj.element.style.display = elementVisible;
        var leftPos = ((newpos.left - dlgWidth) + target.clientWidth);
        if (leftPos < 1) {
            dialogObj.element.style.left = (dlgWidth + leftPos) + -16 + 'px';
        }
        else {
            dialogObj.element.style.left = leftPos - 16 + 'px';
        }
    }
}
/** @hidden */
function getZIndexCalcualtion(args, dialogObj) {
    args.popup.element.style.zIndex = (dialogObj.zIndex + 1).toString();
}
/** @hidden */
function toogleCheckbox(elem) {
    var span = elem.querySelector('.e-frame');
    span.classList.contains('e-check') ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(span, ['e-uncheck'], ['e-check']) :
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(span, ['e-check'], ['e-uncheck']);
}
/** @hidden */
function createCboxWithWrap(uid, elem, className) {
    var div = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: className });
    div.appendChild(elem);
    div.setAttribute('uid', uid);
    return div;
}
/** @hidden */
function removeAddCboxClasses(elem, checked) {
    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([elem], ['e-check', 'e-stop', 'e-uncheck']);
    if (checked) {
        elem.classList.add('e-check');
    }
    else {
        elem.classList.add('e-uncheck');
    }
}
/**
 * Refresh the Row model's foreign data.
 * @param row - Grid Row model object.
 * @param columns - Foreign columns array.
 * @param data - Updated Row data.
 * @hidden
 */
function refreshForeignData(row, columns, data) {
    columns.forEach(function (col) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(col.field, getForeignData(col, data), row.foreignKeyData);
    });
    row.cells.forEach(function (cell) {
        if (cell.isForeignKey) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('foreignKeyData', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(cell.column.field, row.foreignKeyData), cell);
        }
    });
}
/**
 * Get the foreign data for the corresponding cell value.
 * @param column - Foreign Key column
 * @param data - Row data.
 * @param lValue - cell value.
 * @param foreignData - foreign data source.
 * @hidden
 */
function getForeignData(column, data, lValue, foreignKeyData) {
    var fField = column.foreignKeyField;
    var key = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(lValue) ? lValue : valueAccessor(column.field, data, column));
    key = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(key) ? '' : key;
    var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
    var fdata = foreignKeyData || ((column.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && column.dataSource.dataSource.json.length ?
        column.dataSource.dataSource.json : column.columnData);
    if (key.getDay) {
        query.where(getDatePredicate({ field: fField, operator: 'equal', value: key, matchCase: false }));
    }
    else {
        query.where(fField, '==', key, false);
    }
    return new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](fdata).executeLocal(query);
}
/**
 * To use to get the column's object by the foreign key value.
 * @param foreignKeyValue - Defines ForeignKeyValue.
 * @param columns - Array of column object.
 * @hidden
 */
function getColumnByForeignKeyValue(foreignKeyValue, columns) {
    var column;
    return columns.some(function (col) {
        column = col;
        return col.foreignKeyValue === foreignKeyValue;
    }) && column;
}
/**
 * @hidden
 * @param filterObject - Defines predicate model object
 */
function getDatePredicate(filterObject, type) {
    var datePredicate;
    var prevDate;
    var nextDate;
    var prevObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, getActualProperties(filterObject));
    var nextObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, getActualProperties(filterObject));
    if (filterObject.value === null) {
        datePredicate = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](prevObj.field, prevObj.operator, prevObj.value, false);
        return datePredicate;
    }
    var value = new Date(filterObject.value);
    if (filterObject.operator === 'equal' || filterObject.operator === 'notequal') {
        if (type === 'datetime') {
            prevDate = new Date(value.setSeconds(value.getSeconds() - 1));
            nextDate = new Date(value.setSeconds(value.getSeconds() + 2));
            filterObject.value = new Date(value.setSeconds(nextDate.getSeconds() - 1));
        }
        else {
            prevDate = new Date(value.setHours(0) - 1);
            nextDate = new Date(value.setHours(24));
        }
        prevObj.value = prevDate;
        nextObj.value = nextDate;
        if (filterObject.operator === 'equal') {
            prevObj.operator = 'greaterthan';
            nextObj.operator = 'lessthan';
        }
        else if (filterObject.operator === 'notequal') {
            prevObj.operator = 'lessthanorequal';
            nextObj.operator = 'greaterthanorequal';
        }
        var predicateSt = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](prevObj.field, prevObj.operator, prevObj.value, false);
        var predicateEnd = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](nextObj.field, nextObj.operator, nextObj.value, false);
        datePredicate = filterObject.operator === 'equal' ? predicateSt.and(predicateEnd) : predicateSt.or(predicateEnd);
    }
    else {
        if (typeof (prevObj.value) === 'string') {
            prevObj.value = new Date(prevObj.value);
        }
        var predicates = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](prevObj.field, prevObj.operator, prevObj.value, false);
        datePredicate = predicates;
    }
    if (filterObject.setProperties) {
        filterObject.setProperties({ ejpredicate: datePredicate }, true);
    }
    else {
        filterObject.ejpredicate = datePredicate;
    }
    return datePredicate;
}
/**
 * @hidden
 */
function renderMovable(ele, frzCols) {
    var mEle = ele.cloneNode(true);
    for (var i = 0; i < frzCols; i++) {
        mEle.removeChild(mEle.children[0]);
    }
    for (var i = frzCols, len = ele.childElementCount; i < len; i++) {
        ele.removeChild(ele.children[ele.childElementCount - 1]);
    }
    return mEle;
}
/**
 * @hidden
 */
function isGroupAdaptive(grid) {
    return grid.enableVirtualization && grid.groupSettings.columns.length > 0 && grid.isVirtualAdaptive;
}
/**
 * @hidden
 */
function getObject(field, object) {
    if (field === void 0) { field = ''; }
    if (field) {
        var value = object;
        var splits = field.split('.');
        for (var i = 0; i < splits.length && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value); i++) {
            value = value[splits[i]];
        }
        return value;
    }
}
/**
 * @hidden
 */
function getCustomDateFormat(format, colType) {
    var intl = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"]();
    var formatvalue;
    var formatter = 'format';
    var type = 'type';
    if (colType === 'date') {
        formatvalue = typeof (format) === 'object' ?
            intl.getDatePattern({ type: format[type] ? format[type] : 'date', format: format[formatter] }, false) :
            intl.getDatePattern({ type: 'date', skeleton: format }, false);
    }
    else {
        formatvalue = typeof (format) === 'object' ?
            intl.getDatePattern({ type: format[type] ? format[type] : 'dateTime', format: format[formatter] }, false) :
            intl.getDatePattern({ type: 'dateTime', skeleton: format }, false);
    }
    return formatvalue;
}
/**
 * @hidden
 */
function getExpandedState(gObj, hierarchyPrintMode) {
    var rows = gObj.getRowsObject();
    var obj = {};
    for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
        var row = rows_1[_i];
        if (row.isExpand && !row.isDetailRow) {
            var index = gObj.allowPaging && gObj.printMode === 'AllPages' ? row.index +
                (gObj.pageSettings.currentPage * gObj.pageSettings.pageSize) - gObj.pageSettings.pageSize : row.index;
            obj[index] = {};
            obj[index].isExpand = true;
            obj[index].gridModel = getPrintGridModel(row.childGrid, hierarchyPrintMode);
            obj[index].gridModel.query = gObj.childGrid.query;
        }
    }
    return obj;
}
/**
 * @hidden
 */
function getPrintGridModel(gObj, hierarchyPrintMode) {
    if (hierarchyPrintMode === void 0) { hierarchyPrintMode = 'Expanded'; }
    var printGridModel = {};
    if (!gObj) {
        return printGridModel;
    }
    for (var _i = 0, _a = _actions_print__WEBPACK_IMPORTED_MODULE_4__["Print"].printGridProp; _i < _a.length; _i++) {
        var key = _a[_i];
        if (key === 'columns') {
            printGridModel[key] = getActualPropFromColl(gObj[key]);
        }
        else if (key === 'allowPaging') {
            printGridModel[key] = gObj.printMode === 'CurrentPage';
        }
        else {
            printGridModel[key] = getActualProperties(gObj[key]);
        }
    }
    if (gObj.childGrid && hierarchyPrintMode !== 'None') {
        printGridModel.expandedRows = getExpandedState(gObj, hierarchyPrintMode);
    }
    return printGridModel;
}
/**
 * @hidden
 */
function extendObjWithFn(copied, first, second, deep) {
    var res = copied || {};
    var len = arguments.length;
    if (deep) {
        len = len - 1;
    }
    var _loop_1 = function (i) {
        if (!arguments_1[i]) {
            return "continue";
        }
        var obj1 = arguments_1[i];
        var keys = Object.keys(Object.getPrototypeOf(obj1)).length ?
            Object.keys(obj1).concat(getPrototypesOfObj(obj1)) : Object.keys(obj1);
        keys.forEach(function (key) {
            var source = res[key];
            var cpy = obj1[key];
            var cln;
            if (deep && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isObject"])(cpy) || Array.isArray(cpy))) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isObject"])(cpy)) {
                    cln = source ? source : {};
                    res[key] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, cln, cpy, deep);
                }
                else {
                    cln = source ? source : [];
                    res[key] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], cln, cpy, deep);
                }
            }
            else {
                res[key] = cpy;
            }
        });
    };
    var arguments_1 = arguments;
    for (var i = 1; i < len; i++) {
        _loop_1(i);
    }
    return res;
}
/**
 * @hidden
 */
function getPrototypesOfObj(obj) {
    var keys = [];
    while (Object.getPrototypeOf(obj) && Object.keys(Object.getPrototypeOf(obj)).length) {
        keys = keys.concat(Object.keys(Object.getPrototypeOf(obj)));
        obj = Object.getPrototypeOf(obj);
    }
    return keys;
}
/**
 * @hidden
 */
function measureColumnDepth(column) {
    var max = 0;
    for (var i = 0; i < column.length; i++) {
        var depth = checkDepth(column[i], 0);
        if (max < depth) {
            max = depth;
        }
    }
    return max + 1;
}
/**
 * @hidden
 */
function checkDepth(col, index) {
    var max = index;
    var indices = [];
    if (col.columns) {
        index++;
        for (var i = 0; i < col.columns.length; i++) {
            indices[i] = checkDepth(col.columns[i], index);
        }
        for (var j = 0; j < indices.length; j++) {
            if (max < indices[j]) {
                max = indices[j];
            }
        }
        index = max;
    }
    return index;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/common.js":
/*!***************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/common.js ***!
  \***************************************************************/
/*! exports provided: SortDescriptor, SortSettings, Predicate, FilterSettings, SelectionSettings, SearchSettings, RowDropSettings, TextWrapSettings, GroupSettings, EditSettings, Grid, CellType, RenderType, ToolbarItem, doesImplementInterface, valueAccessor, getUpdateUsingRaf, updatecloneRow, getCollapsedRowsCount, recursive, iterateArrayOrObject, iterateExtend, templateCompiler, setStyleAndAttributes, extend, setColumnIndex, prepareColumns, setCssInGridPopUp, getActualProperties, parentsUntil, getElementIndex, inArray, getActualPropFromColl, removeElement, getPosition, getUid, appendChildren, parents, calculateAggregate, getScrollBarWidth, getRowHeight, isComplexField, getComplexFieldID, setComplexFieldID, isEditable, isActionPrevent, wrap, setFormatter, addRemoveActiveClasses, distinctStringValues, getFilterMenuPostion, getZIndexCalcualtion, toogleCheckbox, createCboxWithWrap, removeAddCboxClasses, refreshForeignData, getForeignData, getColumnByForeignKeyValue, getDatePredicate, renderMovable, isGroupAdaptive, getObject, getCustomDateFormat, getExpandedState, getPrintGridModel, extendObjWithFn, measureColumnDepth, checkDepth, created, destroyed, load, rowDataBound, queryCellInfo, headerCellInfo, actionBegin, actionComplete, actionFailure, dataBound, rowSelecting, rowSelected, rowDeselecting, rowDeselected, cellSelecting, cellSelected, cellDeselecting, cellDeselected, columnDragStart, columnDrag, columnDrop, rowDragStartHelper, rowDragStart, rowDrag, rowDrop, beforePrint, printComplete, detailDataBound, toolbarClick, batchAdd, batchCancel, batchDelete, beforeBatchAdd, beforeBatchDelete, beforeBatchSave, beginEdit, cellEdit, cellSave, cellSaved, endAdd, endDelete, endEdit, recordDoubleClick, recordClick, beforeDataBound, beforeOpenColumnChooser, resizeStart, onResize, resizeStop, checkBoxChange, beforeCopy, beforePaste, filterChoiceRequest, filterAfterOpen, filterBeforeOpen, filterSearchBegin, commandClick, initialLoad, initialEnd, dataReady, contentReady, uiUpdate, onEmpty, inBoundModelChanged, modelChanged, colGroupRefresh, headerRefreshed, pageBegin, pageComplete, sortBegin, sortComplete, filterBegin, filterComplete, searchBegin, searchComplete, reorderBegin, reorderComplete, rowDragAndDropBegin, rowDragAndDropComplete, groupBegin, groupComplete, ungroupBegin, ungroupComplete, groupAggregates, refreshFooterRenderer, refreshAggregateCell, refreshAggregates, rowSelectionBegin, rowSelectionComplete, columnSelectionBegin, columnSelectionComplete, cellSelectionBegin, cellSelectionComplete, beforeCellFocused, cellFocused, keyPressed, click, destroy, columnVisibilityChanged, scroll, columnWidthChanged, columnPositionChanged, rowDragAndDrop, rowsAdded, rowsRemoved, columnDragStop, headerDrop, dataSourceModified, refreshComplete, refreshVirtualBlock, dblclick, toolbarRefresh, bulkSave, autoCol, tooltipDestroy, updateData, editBegin, editComplete, addBegin, addComplete, saveComplete, deleteBegin, deleteComplete, preventBatch, dialogDestroy, crudAction, addDeleteAction, destroyForm, doubleTap, beforeExcelExport, excelExportComplete, excelQueryCellInfo, excelHeaderQueryCellInfo, exportDetailDataBound, beforePdfExport, pdfExportComplete, pdfQueryCellInfo, pdfHeaderQueryCellInfo, accessPredicate, contextMenuClick, freezeRender, freezeRefresh, contextMenuOpen, columnMenuClick, columnMenuOpen, filterOpen, filterDialogCreated, filterMenuClose, initForeignKeyColumn, getForeignKeyData, generateQuery, showEmptyGrid, foreignKeyData, dataStateChange, dataSourceChanged, rtlUpdated, beforeFragAppend, frozenHeight, textWrapRefresh, recordAdded, cancelBegin, editNextValCell, hierarchyPrint, expandChildGrid, printGridInit, exportRowDataBound, rowPositionChanged, batchForm, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, partialRefresh */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _base_grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base/grid */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortDescriptor", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["SortDescriptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortSettings", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["SortSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Predicate", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["Predicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterSettings", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["FilterSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionSettings", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["SelectionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SearchSettings", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["SearchSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowDropSettings", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["RowDropSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextWrapSettings", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["TextWrapSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupSettings", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["GroupSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditSettings", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["EditSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _base_grid__WEBPACK_IMPORTED_MODULE_0__["Grid"]; });

/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellType", function() { return _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenderType", function() { return _base_enum__WEBPACK_IMPORTED_MODULE_1__["RenderType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolbarItem", function() { return _base_enum__WEBPACK_IMPORTED_MODULE_1__["ToolbarItem"]; });

/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doesImplementInterface", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["doesImplementInterface"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valueAccessor", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["valueAccessor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUpdateUsingRaf", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getUpdateUsingRaf"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updatecloneRow", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["updatecloneRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCollapsedRowsCount", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getCollapsedRowsCount"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recursive", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["recursive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iterateArrayOrObject", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["iterateArrayOrObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iterateExtend", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["iterateExtend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "templateCompiler", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["templateCompiler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setStyleAndAttributes", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["setStyleAndAttributes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["extend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setColumnIndex", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["setColumnIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareColumns", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["prepareColumns"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setCssInGridPopUp", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["setCssInGridPopUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualProperties", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getActualProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parentsUntil", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["parentsUntil"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElementIndex", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getElementIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inArray", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["inArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualPropFromColl", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getActualPropFromColl"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["removeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPosition", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUid", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getUid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendChildren", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["appendChildren"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parents", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["parents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateAggregate", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["calculateAggregate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollBarWidth", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getScrollBarWidth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRowHeight", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getRowHeight"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isComplexField", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["isComplexField"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getComplexFieldID", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setComplexFieldID", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["setComplexFieldID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEditable", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["isEditable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isActionPrevent", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["isActionPrevent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["wrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setFormatter", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["setFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addRemoveActiveClasses", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["addRemoveActiveClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctStringValues", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["distinctStringValues"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFilterMenuPostion", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getFilterMenuPostion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getZIndexCalcualtion", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getZIndexCalcualtion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toogleCheckbox", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["toogleCheckbox"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createCboxWithWrap", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["createCboxWithWrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeAddCboxClasses", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["removeAddCboxClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshForeignData", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["refreshForeignData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getForeignData", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getForeignData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColumnByForeignKeyValue", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getColumnByForeignKeyValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDatePredicate", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getDatePredicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "renderMovable", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["renderMovable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isGroupAdaptive", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["isGroupAdaptive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getObject", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCustomDateFormat", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getCustomDateFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getExpandedState", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getExpandedState"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPrintGridModel", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["getPrintGridModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extendObjWithFn", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["extendObjWithFn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "measureColumnDepth", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["measureColumnDepth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkDepth", function() { return _base_util__WEBPACK_IMPORTED_MODULE_2__["checkDepth"]; });

/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "created", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["created"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroyed", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["destroyed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "load", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["load"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDataBound", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queryCellInfo", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["queryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerCellInfo", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["headerCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["actionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["actionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionFailure", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["actionFailure"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataBound", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["dataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelecting", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelected", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDeselecting", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDeselecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDeselected", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDeselected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelecting", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelected", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellDeselecting", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellDeselecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellDeselected", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellDeselected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDragStart", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnDragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDrag", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnDrag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDrop", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragStartHelper", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDragStartHelper"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragStart", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDrag", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDrag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDrop", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePrint", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforePrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "printComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["printComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detailDataBound", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["detailDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toolbarClick", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["toolbarClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchAdd", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["batchAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchCancel", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["batchCancel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchDelete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["batchDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchAdd", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeBatchAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchDelete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeBatchDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchSave", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeBatchSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beginEdit", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beginEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellEdit", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSave", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSaved", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSaved"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endAdd", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["endAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endDelete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["endDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endEdit", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["endEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordDoubleClick", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["recordDoubleClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordClick", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["recordClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeDataBound", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeOpenColumnChooser", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeOpenColumnChooser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeStart", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["resizeStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onResize", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["onResize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeStop", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["resizeStop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkBoxChange", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["checkBoxChange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeCopy", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeCopy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePaste", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforePaste"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterChoiceRequest", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["filterChoiceRequest"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterAfterOpen", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["filterAfterOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterBeforeOpen", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["filterBeforeOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterSearchBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["filterSearchBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "commandClick", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["commandClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initialLoad", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["initialLoad"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initialEnd", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["initialEnd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataReady", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["dataReady"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contentReady", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["contentReady"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uiUpdate", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["uiUpdate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEmpty", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["onEmpty"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inBoundModelChanged", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["inBoundModelChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modelChanged", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["modelChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colGroupRefresh", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["colGroupRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerRefreshed", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["headerRefreshed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["pageBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["pageComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["sortBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["sortComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["filterBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["filterComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "searchBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["searchBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "searchComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["searchComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reorderBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["reorderBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reorderComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["reorderComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDragAndDropBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDragAndDropComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["groupBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["groupComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ungroupBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["ungroupBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ungroupComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["ungroupComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupAggregates", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["groupAggregates"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshFooterRenderer", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshFooterRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshAggregateCell", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshAggregateCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshAggregates", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshAggregates"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelectionBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelectionComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnSelectionBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnSelectionComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelectionBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelectionComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeCellFocused", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeCellFocused"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellFocused", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cellFocused"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keyPressed", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["keyPressed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "click", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["click"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["destroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnVisibilityChanged", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnVisibilityChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scroll", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["scroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnWidthChanged", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnWidthChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnPositionChanged", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnPositionChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDrop", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowDragAndDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowsAdded", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowsAdded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowsRemoved", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowsRemoved"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDragStop", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnDragStop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerDrop", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["headerDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataSourceModified", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["dataSourceModified"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshVirtualBlock", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshVirtualBlock"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dblclick", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["dblclick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toolbarRefresh", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["toolbarRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bulkSave", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["bulkSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoCol", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["autoCol"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tooltipDestroy", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["tooltipDestroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updateData", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["updateData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["editBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["editComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["addBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["addComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "saveComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["saveComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deleteBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["deleteBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deleteComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["deleteComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "preventBatch", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["preventBatch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dialogDestroy", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["dialogDestroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "crudAction", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["crudAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addDeleteAction", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["addDeleteAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroyForm", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["destroyForm"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doubleTap", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["doubleTap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeExcelExport", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeExcelExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelExportComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["excelExportComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelQueryCellInfo", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["excelQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelHeaderQueryCellInfo", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["excelHeaderQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exportDetailDataBound", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["exportDetailDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePdfExport", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforePdfExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfExportComplete", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["pdfExportComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfQueryCellInfo", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["pdfQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfHeaderQueryCellInfo", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["pdfHeaderQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "accessPredicate", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["accessPredicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contextMenuClick", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["contextMenuClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "freezeRender", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["freezeRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "freezeRefresh", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["freezeRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contextMenuOpen", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["contextMenuOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnMenuClick", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnMenuClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnMenuOpen", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["columnMenuOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterOpen", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["filterOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterDialogCreated", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["filterDialogCreated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterMenuClose", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["filterMenuClose"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initForeignKeyColumn", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["initForeignKeyColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getForeignKeyData", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["getForeignKeyData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generateQuery", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["generateQuery"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showEmptyGrid", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["showEmptyGrid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "foreignKeyData", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["foreignKeyData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataStateChange", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["dataStateChange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataSourceChanged", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["dataSourceChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rtlUpdated", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rtlUpdated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeFragAppend", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeFragAppend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "frozenHeight", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["frozenHeight"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textWrapRefresh", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["textWrapRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordAdded", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["recordAdded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cancelBegin", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["cancelBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editNextValCell", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["editNextValCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchyPrint", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["hierarchyPrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expandChildGrid", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["expandChildGrid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "printGridInit", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["printGridInit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exportRowDataBound", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["exportRowDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowPositionChanged", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["rowPositionChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchForm", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["batchForm"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeStartEdit", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeStartEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchCancel", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["beforeBatchCancel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchEditFormRendered", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["batchEditFormRendered"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partialRefresh", function() { return _base_constant__WEBPACK_IMPORTED_MODULE_3__["partialRefresh"]; });

/**
 * Base export
 */






/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/index.js":
/*!**************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/index.js ***!
  \**************************************************************/
/*! exports provided: SortDescriptor, SortSettings, Predicate, FilterSettings, SelectionSettings, SearchSettings, RowDropSettings, TextWrapSettings, GroupSettings, EditSettings, Grid, CellType, RenderType, ToolbarItem, doesImplementInterface, valueAccessor, getUpdateUsingRaf, updatecloneRow, getCollapsedRowsCount, recursive, iterateArrayOrObject, iterateExtend, templateCompiler, setStyleAndAttributes, extend, setColumnIndex, prepareColumns, setCssInGridPopUp, getActualProperties, parentsUntil, getElementIndex, inArray, getActualPropFromColl, removeElement, getPosition, getUid, appendChildren, parents, calculateAggregate, getScrollBarWidth, getRowHeight, isComplexField, getComplexFieldID, setComplexFieldID, isEditable, isActionPrevent, wrap, setFormatter, addRemoveActiveClasses, distinctStringValues, getFilterMenuPostion, getZIndexCalcualtion, toogleCheckbox, createCboxWithWrap, removeAddCboxClasses, refreshForeignData, getForeignData, getColumnByForeignKeyValue, getDatePredicate, renderMovable, isGroupAdaptive, getObject, getCustomDateFormat, getExpandedState, getPrintGridModel, extendObjWithFn, measureColumnDepth, checkDepth, created, destroyed, load, rowDataBound, queryCellInfo, headerCellInfo, actionBegin, actionComplete, actionFailure, dataBound, rowSelecting, rowSelected, rowDeselecting, rowDeselected, cellSelecting, cellSelected, cellDeselecting, cellDeselected, columnDragStart, columnDrag, columnDrop, rowDragStartHelper, rowDragStart, rowDrag, rowDrop, beforePrint, printComplete, detailDataBound, toolbarClick, batchAdd, batchCancel, batchDelete, beforeBatchAdd, beforeBatchDelete, beforeBatchSave, beginEdit, cellEdit, cellSave, cellSaved, endAdd, endDelete, endEdit, recordDoubleClick, recordClick, beforeDataBound, beforeOpenColumnChooser, resizeStart, onResize, resizeStop, checkBoxChange, beforeCopy, beforePaste, filterChoiceRequest, filterAfterOpen, filterBeforeOpen, filterSearchBegin, commandClick, initialLoad, initialEnd, dataReady, contentReady, uiUpdate, onEmpty, inBoundModelChanged, modelChanged, colGroupRefresh, headerRefreshed, pageBegin, pageComplete, sortBegin, sortComplete, filterBegin, filterComplete, searchBegin, searchComplete, reorderBegin, reorderComplete, rowDragAndDropBegin, rowDragAndDropComplete, groupBegin, groupComplete, ungroupBegin, ungroupComplete, groupAggregates, refreshFooterRenderer, refreshAggregateCell, refreshAggregates, rowSelectionBegin, rowSelectionComplete, columnSelectionBegin, columnSelectionComplete, cellSelectionBegin, cellSelectionComplete, beforeCellFocused, cellFocused, keyPressed, click, destroy, columnVisibilityChanged, scroll, columnWidthChanged, columnPositionChanged, rowDragAndDrop, rowsAdded, rowsRemoved, columnDragStop, headerDrop, dataSourceModified, refreshComplete, refreshVirtualBlock, dblclick, toolbarRefresh, bulkSave, autoCol, tooltipDestroy, updateData, editBegin, editComplete, addBegin, addComplete, saveComplete, deleteBegin, deleteComplete, preventBatch, dialogDestroy, crudAction, addDeleteAction, destroyForm, doubleTap, beforeExcelExport, excelExportComplete, excelQueryCellInfo, excelHeaderQueryCellInfo, exportDetailDataBound, beforePdfExport, pdfExportComplete, pdfQueryCellInfo, pdfHeaderQueryCellInfo, accessPredicate, contextMenuClick, freezeRender, freezeRefresh, contextMenuOpen, columnMenuClick, columnMenuOpen, filterOpen, filterDialogCreated, filterMenuClose, initForeignKeyColumn, getForeignKeyData, generateQuery, showEmptyGrid, foreignKeyData, dataStateChange, dataSourceChanged, rtlUpdated, beforeFragAppend, frozenHeight, textWrapRefresh, recordAdded, cancelBegin, editNextValCell, hierarchyPrint, expandChildGrid, printGridInit, exportRowDataBound, rowPositionChanged, batchForm, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, partialRefresh, Data, Sort, Page, Selection, Filter, Search, Scroll, resizeClassList, Resize, Reorder, RowDD, Group, getCloneProperties, Print, DetailRow, Toolbar, Aggregate, summaryIterator, VirtualScroll, Edit, Global, BatchEdit, InlineEdit, NormalEdit, DialogEdit, ColumnChooser, ExcelExport, PdfExport, ExportHelper, ExportValueFormatter, Clipboard, CommandColumn, CheckBoxFilter, menuClass, ContextMenu, Freeze, ColumnMenu, ExcelFilter, ForeignKey, Logger, detailLists, Column, Row, Cell, HeaderRender, ContentRender, RowRenderer, CellRenderer, HeaderCellRenderer, FilterCellRenderer, StackedHeaderCellRenderer, Render, IndentCellRenderer, GroupCaptionCellRenderer, GroupCaptionEmptyCellRenderer, BatchEditRender, DialogEditRender, InlineEditRender, EditRender, BooleanEditCell, DefaultEditCell, DropDownEditCell, NumericEditCell, DatePickerEditCell, CommandColumnRenderer, FreezeContentRender, FreezeRender, StringFilterUI, NumberFilterUI, DateFilterUI, BooleanFilterUI, FlMenuOptrUI, AutoCompleteEditCell, ComboboxEditCell, MultiSelectEditCell, TimePickerEditCell, ToggleEditCell, MaskedTextBoxCellEdit, VirtualContentRenderer, VirtualHeaderRenderer, VirtualElementHandler, CellRendererFactory, ServiceLocator, RowModelGenerator, GroupModelGenerator, FreezeRowModelGenerator, ValueFormatter, VirtualRowModelGenerator, InterSectionObserver */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ "./node_modules/@syncfusion/ej2-grids/src/grid/common.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortDescriptor", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["SortDescriptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortSettings", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["SortSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Predicate", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["Predicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterSettings", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["FilterSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionSettings", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["SelectionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SearchSettings", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["SearchSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowDropSettings", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["RowDropSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextWrapSettings", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["TextWrapSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupSettings", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["GroupSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditSettings", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["EditSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["Grid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellType", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["CellType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenderType", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["RenderType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolbarItem", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["ToolbarItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doesImplementInterface", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["doesImplementInterface"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valueAccessor", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["valueAccessor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUpdateUsingRaf", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getUpdateUsingRaf"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updatecloneRow", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["updatecloneRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCollapsedRowsCount", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getCollapsedRowsCount"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recursive", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["recursive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iterateArrayOrObject", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["iterateArrayOrObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iterateExtend", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["iterateExtend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "templateCompiler", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["templateCompiler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setStyleAndAttributes", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["setStyleAndAttributes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["extend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setColumnIndex", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["setColumnIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareColumns", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["prepareColumns"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setCssInGridPopUp", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["setCssInGridPopUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualProperties", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getActualProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parentsUntil", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["parentsUntil"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElementIndex", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getElementIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inArray", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["inArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualPropFromColl", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getActualPropFromColl"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["removeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPosition", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUid", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getUid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendChildren", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["appendChildren"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parents", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["parents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateAggregate", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["calculateAggregate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollBarWidth", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getScrollBarWidth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRowHeight", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getRowHeight"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isComplexField", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["isComplexField"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getComplexFieldID", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getComplexFieldID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setComplexFieldID", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["setComplexFieldID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEditable", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["isEditable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isActionPrevent", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["isActionPrevent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["wrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setFormatter", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["setFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addRemoveActiveClasses", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["addRemoveActiveClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctStringValues", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["distinctStringValues"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFilterMenuPostion", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getFilterMenuPostion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getZIndexCalcualtion", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getZIndexCalcualtion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toogleCheckbox", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["toogleCheckbox"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createCboxWithWrap", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["createCboxWithWrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeAddCboxClasses", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["removeAddCboxClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshForeignData", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["refreshForeignData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getForeignData", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getForeignData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColumnByForeignKeyValue", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getColumnByForeignKeyValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDatePredicate", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getDatePredicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "renderMovable", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["renderMovable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isGroupAdaptive", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["isGroupAdaptive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getObject", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCustomDateFormat", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getCustomDateFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getExpandedState", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getExpandedState"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPrintGridModel", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getPrintGridModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extendObjWithFn", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["extendObjWithFn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "measureColumnDepth", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["measureColumnDepth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkDepth", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["checkDepth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "created", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["created"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroyed", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["destroyed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "load", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["load"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDataBound", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queryCellInfo", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["queryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerCellInfo", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["headerCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["actionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["actionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionFailure", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["actionFailure"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataBound", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["dataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelecting", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowSelecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelected", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowSelected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDeselecting", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDeselecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDeselected", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDeselected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelecting", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellSelecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelected", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellSelected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellDeselecting", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellDeselecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellDeselected", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellDeselected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDragStart", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnDragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDrag", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnDrag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDrop", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragStartHelper", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDragStartHelper"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragStart", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDrag", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDrag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDrop", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePrint", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforePrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "printComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["printComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detailDataBound", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["detailDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toolbarClick", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["toolbarClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchAdd", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["batchAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchCancel", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["batchCancel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchDelete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["batchDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchAdd", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeBatchAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchDelete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeBatchDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchSave", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeBatchSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beginEdit", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beginEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellEdit", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSave", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSaved", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellSaved"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endAdd", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["endAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endDelete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["endDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endEdit", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["endEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordDoubleClick", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["recordDoubleClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordClick", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["recordClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeDataBound", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeOpenColumnChooser", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeOpenColumnChooser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeStart", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["resizeStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onResize", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["onResize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeStop", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["resizeStop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkBoxChange", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["checkBoxChange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeCopy", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeCopy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePaste", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforePaste"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterChoiceRequest", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["filterChoiceRequest"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterAfterOpen", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["filterAfterOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterBeforeOpen", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["filterBeforeOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterSearchBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["filterSearchBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "commandClick", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["commandClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initialLoad", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["initialLoad"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initialEnd", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["initialEnd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataReady", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["dataReady"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contentReady", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["contentReady"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uiUpdate", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["uiUpdate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEmpty", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["onEmpty"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inBoundModelChanged", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["inBoundModelChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modelChanged", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["modelChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colGroupRefresh", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["colGroupRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerRefreshed", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["headerRefreshed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["pageBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["pageComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["sortBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["sortComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["filterBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["filterComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "searchBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["searchBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "searchComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["searchComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reorderBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["reorderBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reorderComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["reorderComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDragAndDropBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDragAndDropComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["groupBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["groupComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ungroupBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["ungroupBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ungroupComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["ungroupComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupAggregates", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["groupAggregates"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshFooterRenderer", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["refreshFooterRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshAggregateCell", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["refreshAggregateCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshAggregates", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["refreshAggregates"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelectionBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelectionComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnSelectionBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnSelectionComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelectionBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelectionComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeCellFocused", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeCellFocused"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellFocused", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cellFocused"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keyPressed", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["keyPressed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "click", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["click"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["destroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnVisibilityChanged", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnVisibilityChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scroll", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["scroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnWidthChanged", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnWidthChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnPositionChanged", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnPositionChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDrop", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowDragAndDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowsAdded", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowsAdded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowsRemoved", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowsRemoved"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDragStop", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnDragStop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerDrop", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["headerDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataSourceModified", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["dataSourceModified"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["refreshComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshVirtualBlock", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["refreshVirtualBlock"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dblclick", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["dblclick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toolbarRefresh", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["toolbarRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bulkSave", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["bulkSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoCol", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["autoCol"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tooltipDestroy", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["tooltipDestroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updateData", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["updateData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["editBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["editComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["addBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["addComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "saveComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["saveComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deleteBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["deleteBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deleteComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["deleteComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "preventBatch", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["preventBatch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dialogDestroy", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["dialogDestroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "crudAction", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["crudAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addDeleteAction", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["addDeleteAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroyForm", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["destroyForm"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doubleTap", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["doubleTap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeExcelExport", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeExcelExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelExportComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["excelExportComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelQueryCellInfo", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["excelQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelHeaderQueryCellInfo", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["excelHeaderQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exportDetailDataBound", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["exportDetailDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePdfExport", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforePdfExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfExportComplete", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["pdfExportComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfQueryCellInfo", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["pdfQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfHeaderQueryCellInfo", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["pdfHeaderQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "accessPredicate", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["accessPredicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contextMenuClick", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["contextMenuClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "freezeRender", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["freezeRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "freezeRefresh", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["freezeRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contextMenuOpen", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["contextMenuOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnMenuClick", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnMenuClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnMenuOpen", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["columnMenuOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterOpen", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["filterOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterDialogCreated", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["filterDialogCreated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterMenuClose", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["filterMenuClose"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initForeignKeyColumn", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["initForeignKeyColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getForeignKeyData", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getForeignKeyData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generateQuery", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["generateQuery"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showEmptyGrid", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["showEmptyGrid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "foreignKeyData", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["foreignKeyData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataStateChange", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["dataStateChange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataSourceChanged", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["dataSourceChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rtlUpdated", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rtlUpdated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeFragAppend", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeFragAppend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "frozenHeight", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["frozenHeight"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textWrapRefresh", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["textWrapRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordAdded", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["recordAdded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cancelBegin", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["cancelBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editNextValCell", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["editNextValCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchyPrint", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["hierarchyPrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expandChildGrid", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["expandChildGrid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "printGridInit", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["printGridInit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exportRowDataBound", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["exportRowDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowPositionChanged", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["rowPositionChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchForm", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["batchForm"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeStartEdit", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeStartEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchCancel", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["beforeBatchCancel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchEditFormRendered", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["batchEditFormRendered"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partialRefresh", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["partialRefresh"]; });

/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./actions */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Data", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Data"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sort", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Sort"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Page", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Page"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Selection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Filter", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Filter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Search", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Search"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scroll", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Scroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeClassList", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["resizeClassList"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Resize", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Resize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Reorder", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Reorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowDD", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["RowDD"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Group", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Group"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCloneProperties", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["getCloneProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Print", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Print"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DetailRow", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["DetailRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Toolbar", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Toolbar"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Aggregate", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Aggregate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "summaryIterator", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["summaryIterator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualScroll", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["VirtualScroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Edit", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Edit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Global", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Global"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BatchEdit", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["BatchEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InlineEdit", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["InlineEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalEdit", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["NormalEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogEdit", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["DialogEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnChooser", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["ColumnChooser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelExport", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["ExcelExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfExport", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["PdfExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExportHelper", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["ExportHelper"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExportValueFormatter", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["ExportValueFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Clipboard", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Clipboard"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CommandColumn", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["CommandColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckBoxFilter", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["CheckBoxFilter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "menuClass", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["menuClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContextMenu", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["ContextMenu"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Freeze", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Freeze"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnMenu", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["ColumnMenu"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelFilter", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["ExcelFilter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ForeignKey", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["ForeignKey"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["Logger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detailLists", function() { return _actions__WEBPACK_IMPORTED_MODULE_1__["detailLists"]; });

/* harmony import */ var _models__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./models */ "./node_modules/@syncfusion/ej2-grids/src/grid/models.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _models__WEBPACK_IMPORTED_MODULE_2__["Column"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _models__WEBPACK_IMPORTED_MODULE_2__["Row"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cell", function() { return _models__WEBPACK_IMPORTED_MODULE_2__["Cell"]; });

/* harmony import */ var _renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRender", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["HeaderRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContentRender", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["ContentRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["RowRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["CellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCellRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["HeaderCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterCellRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["FilterCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedHeaderCellRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["StackedHeaderCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Render", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["Render"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IndentCellRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["IndentCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionCellRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["GroupCaptionCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionEmptyCellRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["GroupCaptionEmptyCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BatchEditRender", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["BatchEditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogEditRender", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["DialogEditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InlineEditRender", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["InlineEditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditRender", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["EditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["BooleanEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["DefaultEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["DropDownEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["NumericEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DatePickerEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["DatePickerEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CommandColumnRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["CommandColumnRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeContentRender", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["FreezeContentRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeRender", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["FreezeRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringFilterUI", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["StringFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberFilterUI", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["NumberFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateFilterUI", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["DateFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanFilterUI", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["BooleanFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FlMenuOptrUI", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["FlMenuOptrUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoCompleteEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["AutoCompleteEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComboboxEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["ComboboxEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelectEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["MultiSelectEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimePickerEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["TimePickerEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToggleEditCell", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["ToggleEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBoxCellEdit", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["MaskedTextBoxCellEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualContentRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["VirtualContentRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualHeaderRenderer", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["VirtualHeaderRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualElementHandler", function() { return _renderer__WEBPACK_IMPORTED_MODULE_3__["VirtualElementHandler"]; });

/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./services */ "./node_modules/@syncfusion/ej2-grids/src/grid/services.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRendererFactory", function() { return _services__WEBPACK_IMPORTED_MODULE_4__["CellRendererFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServiceLocator", function() { return _services__WEBPACK_IMPORTED_MODULE_4__["ServiceLocator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowModelGenerator", function() { return _services__WEBPACK_IMPORTED_MODULE_4__["RowModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupModelGenerator", function() { return _services__WEBPACK_IMPORTED_MODULE_4__["GroupModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeRowModelGenerator", function() { return _services__WEBPACK_IMPORTED_MODULE_4__["FreezeRowModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatter", function() { return _services__WEBPACK_IMPORTED_MODULE_4__["ValueFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualRowModelGenerator", function() { return _services__WEBPACK_IMPORTED_MODULE_4__["VirtualRowModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InterSectionObserver", function() { return _services__WEBPACK_IMPORTED_MODULE_4__["InterSectionObserver"]; });

/**
 * Grid component exported items
 */







/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/models.js":
/*!***************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/models.js ***!
  \***************************************************************/
/*! exports provided: Column, Row, Cell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _models_column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./models/column */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _models_column__WEBPACK_IMPORTED_MODULE_0__["Column"]; });

/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _models_row__WEBPACK_IMPORTED_MODULE_1__["Row"]; });

/* harmony import */ var _models_cell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./models/cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cell", function() { return _models_cell__WEBPACK_IMPORTED_MODULE_2__["Cell"]; });

/**
 * Models
 */





/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/models/aggregate.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/models/aggregate.js ***!
  \*************************************************************************/
/*! exports provided: AggregateColumn, AggregateRow */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AggregateColumn", function() { return AggregateColumn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AggregateRow", function() { return AggregateRow; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _services_value_formatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/value-formatter */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};





/**
 * Configures the Grid's aggregate column.
 */
var AggregateColumn = /** @class */ (function (_super) {
    __extends(AggregateColumn, _super);
    function AggregateColumn() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.templateFn = {};
        return _this;
    }
    /**
     * @hidden
     */
    AggregateColumn.prototype.setFormatter = function (cultureName) {
        var valueFormatter = new _services_value_formatter__WEBPACK_IMPORTED_MODULE_2__["ValueFormatter"](cultureName);
        if (this.format && (this.format.skeleton || this.format.format)) {
            this.formatFn = valueFormatter.getFormatFunction(this.format);
        }
    };
    /**
     * @hidden
     */
    AggregateColumn.prototype.getFormatter = function () {
        return this.formatFn;
    };
    /**
     * @hidden
     */
    AggregateColumn.prototype.setTemplate = function (helper) {
        if (helper === void 0) { helper = {}; }
        if (this.footerTemplate !== undefined) {
            this.templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"], _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Summary)] = { fn: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.footerTemplate, helper),
                property: 'footerTemplate' };
        }
        if (this.groupFooterTemplate !== undefined) {
            this.templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"], _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].GroupSummary)] = { fn: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.groupFooterTemplate, helper),
                property: 'groupFooterTemplate' };
        }
        if (this.groupCaptionTemplate !== undefined) {
            this.templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"], _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].CaptionSummary)] = { fn: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.groupCaptionTemplate, helper),
                property: 'groupCaptionTemplate' };
        }
    };
    /**
     * @hidden
     */
    AggregateColumn.prototype.getTemplate = function (type) {
        return this.templateFn[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"], type)];
    };
    /**
     * @hidden
     */
    AggregateColumn.prototype.setPropertiesSilent = function (prop) {
        this.setProperties(prop, true);
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], AggregateColumn.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], AggregateColumn.prototype, "field", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], AggregateColumn.prototype, "columnName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], AggregateColumn.prototype, "format", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], AggregateColumn.prototype, "footerTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], AggregateColumn.prototype, "groupFooterTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], AggregateColumn.prototype, "groupCaptionTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], AggregateColumn.prototype, "customAggregate", void 0);
    return AggregateColumn;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the aggregate rows.
 */
var AggregateRow = /** @class */ (function (_super) {
    __extends(AggregateRow, _super);
    function AggregateRow() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], AggregateColumn)
    ], AggregateRow.prototype, "columns", void 0);
    return AggregateRow;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js ***!
  \********************************************************************/
/*! exports provided: Cell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cell", function() { return Cell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");

/**
 * Cell
 * @hidden
 */
var Cell = /** @class */ (function () {
    function Cell(options) {
        this.isSpanned = false;
        this.isRowSpanned = false;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(this, options);
    }
    Cell.prototype.clone = function () {
        var cell = new Cell({});
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(cell, this);
        return cell;
    };
    return Cell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js ***!
  \**********************************************************************/
/*! exports provided: Column */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return Column; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _services_value_formatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/value-formatter */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");




/**
 * Represents Grid `Column` model class.
 */
var Column = /** @class */ (function () {
    function Column(options) {
        var _this = this;
        /**
         * If `allowSorting` set to false, then it disables sorting option of a particular column.
         * By default all columns are sortable.
         * @default true
         */
        this.allowSorting = true;
        /**
         * If `allowResizing` is set to false, it disables resize option of a particular column.
         * By default all the columns can be resized.
         * @default true
         */
        this.allowResizing = true;
        /**
         * If `allowFiltering` set to false, then it disables filtering option and filter bar element of a particular column.
         * By default all columns are filterable.
         * @default true
         */
        this.allowFiltering = true;
        /**
         * If `allowGrouping` set to false, then it disables grouping of a particular column.
         * By default all columns are groupable.
         * @default true
         */
        this.allowGrouping = true;
        /**
         * If `allowReordering` set to false, then it disables reorder of a particular column.
         * By default all columns can be reorder.
         * @default true
         */
        this.allowReordering = true;
        /**
         * If `showColumnMenu` set to false, then it disable the column menu of a particular column.
         * By default column menu will show for all columns
         * @default true
         */
        this.showColumnMenu = true;
        /**
         * If `enableGroupByFormat` set to true, then it groups the particular column by formatted values.
         * @default true
         */
        this.enableGroupByFormat = false;
        /**
         * If `allowEditing` set to false, then it disables editing of a particular column.
         * By default all columns are editable.
         * @default true
         */
        this.allowEditing = true;
        /**
         *  It is used to customize the default filter options for a specific columns.
         * * type -  Specifies the filter type as menu or checkbox.
         * * ui - to render custom component for specific column it has following functions.
         * * ui.create – It is used for creating custom components.
         * * ui.read -  It is used for read the value from the component.
         * * ui.write - It is used to apply component model as dynamically.
         * {% codeBlock src="grid/filter-menu-api/index.ts" %}{% endcodeBlock %}
         *
         * > Check the [`Filter UI`](../../grid/filtering/#custom-component-in-filter-menu) for its customization.
         *  @default null
         */
        this.filter = {};
        /**
         * If `showInColumnChooser` set to false, then hide the particular column in column chooser.
         *  By default all columns are displayed in column Chooser.
         * @default true
         */
        this.showInColumnChooser = true;
        /**
         * Defines the `IEditCell` object to customize default edit cell.
         * @default {}
         */
        this.edit = {};
        /**
         * If `allowSearching` set to false, then it disables Searching of a particular column.
         * By default all columns allow Searching.
         * @default true
         */
        this.allowSearching = true;
        this.sortDirection = 'Descending';
        /** @hidden */
        this.getEditTemplate = function () { return _this.editTemplateFn; };
        /** @hidden */
        this.getFilterTemplate = function () { return _this.filterTemplateFn; };
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(this, options);
        this.uid = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getUid"])('grid-column');
        var valueFormatter = new _services_value_formatter__WEBPACK_IMPORTED_MODULE_2__["ValueFormatter"]();
        if (options.format && (options.format.skeleton || options.format.format)) {
            this.setFormatter(valueFormatter.getFormatFunction(options.format));
            this.setParser(valueFormatter.getParserFunction(options.format));
        }
        this.toJSON = function () {
            var col = {};
            var skip = ['headerText', 'template', 'headerTemplate', 'edit', 'editTemplate', 'filterTemplate', 'commandsTemplate'];
            var keys = Object.keys(_this);
            for (var i = 0; i < keys.length; i++) {
                if (keys[i] === 'columns') {
                    col[keys[i]] = [];
                    for (var j = 0; j < _this[keys[i]].length; j++) {
                        col[keys[i]].push(_this[keys[i]][j].toJSON());
                    }
                }
                else if (skip.indexOf(keys[i]) < 0) {
                    col[keys[i]] = _this[keys[i]];
                }
            }
            return col;
        };
        if (!this.field) {
            this.allowFiltering = false;
            this.allowGrouping = false;
            this.allowSorting = false;
            if (this.columns) {
                this.allowResizing = this.columns.some(function (col) {
                    return col.allowResizing;
                });
            }
        }
        if (this.commands && !this.textAlign) {
            this.textAlign = 'Right';
        }
        if (this.template || this.commandsTemplate) {
            this.templateFn = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.template || this.commandsTemplate);
        }
        if (this.headerTemplate) {
            this.headerTemplateFn = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.headerTemplate);
        }
        if (this.filter.itemTemplate) {
            this.fltrTemplateFn = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.filter.itemTemplate);
        }
        if (this.editTemplate) {
            this.editTemplateFn = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.editTemplate);
        }
        if (this.filterTemplate) {
            this.filterTemplateFn = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["templateCompiler"])(this.filterTemplate);
        }
        if (this.isForeignColumn() && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.editType) || this.editType === 'dropdownedit')) {
            this.editType = 'dropdownedit';
            this.edit.params = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
                dataSource: this.dataSource,
                query: new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"](), fields: { value: this.foreignKeyField || this.field, text: this.foreignKeyValue }
            }, this.edit.params);
        }
        if (this.sortComparer) {
            var a_1 = this.sortComparer;
            this.sortComparer = function comparer(x, y, xObj, yObj) {
                if (typeof a_1 === 'string') {
                    a_1 = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getObject"])(a_1, window);
                }
                if (this.sortDirection === 'Descending') {
                    var z = x;
                    x = y;
                    y = z;
                    var obj = xObj;
                    xObj = yObj;
                    yObj = obj;
                }
                return a_1(x, y, xObj, yObj);
            };
        }
        if (!this.sortComparer && this.isForeignColumn()) {
            this.sortComparer = function (x, y) {
                x = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getObject"])(_this.foreignKeyValue, Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getForeignData"])(_this, {}, x)[0]);
                y = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getObject"])(_this.foreignKeyValue, Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getForeignData"])(_this, {}, y)[0]);
                return _this.sortDirection === 'Descending' ? _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].fnDescending(x, y) : _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].fnAscending(x, y);
            };
        }
    }
    /** @hidden */
    Column.prototype.getSortDirection = function () {
        return this.sortDirection;
    };
    /** @hidden */
    Column.prototype.setSortDirection = function (direction) {
        this.sortDirection = direction;
    };
    /** @hidden */
    Column.prototype.setProperties = function (column) {
        //Angular two way binding
        var keys = Object.keys(column);
        for (var i = 0; i < keys.length; i++) {
            this[keys[i]] = column[keys[i]];
        }
    };
    /**
     * @hidden
     * It defines the column is foreign key column or not.
     */
    Column.prototype.isForeignColumn = function () {
        return !!(this.dataSource && this.foreignKeyValue);
    };
    /** @hidden */
    Column.prototype.getFormatter = function () {
        return this.formatFn;
    };
    /** @hidden */
    Column.prototype.setFormatter = function (value) {
        this.formatFn = value;
    };
    /** @hidden */
    Column.prototype.getParser = function () {
        return this.parserFn;
    };
    /** @hidden */
    Column.prototype.setParser = function (value) {
        this.parserFn = value;
    };
    /** @hidden */
    Column.prototype.getColumnTemplate = function () {
        return this.templateFn;
    };
    /** @hidden */
    Column.prototype.getHeaderTemplate = function () {
        return this.headerTemplateFn;
    };
    /** @hidden */
    Column.prototype.getFilterItemTemplate = function () {
        return this.fltrTemplateFn;
    };
    /** @hidden */
    Column.prototype.getDomSetter = function () {
        return this.disableHtmlEncode ? 'textContent' : 'innerHTML';
    };
    return Column;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/models/page-settings.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/models/page-settings.js ***!
  \*****************************************************************************/
/*! exports provided: PageSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageSettings", function() { return PageSettings; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};

/**
 * Configures the paging behavior of the Grid.
 */
var PageSettings = /** @class */ (function (_super) {
    __extends(PageSettings, _super);
    function PageSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(12)
    ], PageSettings.prototype, "pageSize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(8)
    ], PageSettings.prototype, "pageCount", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], PageSettings.prototype, "currentPage", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], PageSettings.prototype, "totalRecordsCount", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], PageSettings.prototype, "enableQueryString", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], PageSettings.prototype, "pageSizes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], PageSettings.prototype, "template", void 0);
    return PageSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js ***!
  \*******************************************************************/
/*! exports provided: Row */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return Row; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");

/**
 * Row
 * @hidden
 */
var Row = /** @class */ (function () {
    function Row(options) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(this, options);
    }
    Row.prototype.clone = function () {
        var row = new Row({});
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(row, this);
        row.cells = this.cells.map(function (cell) { return cell.clone(); });
        return row;
    };
    return Row;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer.js ***!
  \*****************************************************************/
/*! exports provided: HeaderRender, ContentRender, RowRenderer, CellRenderer, HeaderCellRenderer, FilterCellRenderer, StackedHeaderCellRenderer, Render, IndentCellRenderer, GroupCaptionCellRenderer, GroupCaptionEmptyCellRenderer, BatchEditRender, DialogEditRender, InlineEditRender, EditRender, BooleanEditCell, DefaultEditCell, DropDownEditCell, NumericEditCell, DatePickerEditCell, CommandColumnRenderer, FreezeContentRender, FreezeRender, StringFilterUI, NumberFilterUI, DateFilterUI, BooleanFilterUI, FlMenuOptrUI, AutoCompleteEditCell, ComboboxEditCell, MultiSelectEditCell, TimePickerEditCell, ToggleEditCell, MaskedTextBoxCellEdit, VirtualContentRenderer, VirtualHeaderRenderer, VirtualElementHandler */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _renderer_header_renderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./renderer/header-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRender", function() { return _renderer_header_renderer__WEBPACK_IMPORTED_MODULE_0__["HeaderRender"]; });

/* harmony import */ var _renderer_content_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./renderer/content-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/content-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContentRender", function() { return _renderer_content_renderer__WEBPACK_IMPORTED_MODULE_1__["ContentRender"]; });

/* harmony import */ var _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./renderer/row-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return _renderer_row_renderer__WEBPACK_IMPORTED_MODULE_2__["RowRenderer"]; });

/* harmony import */ var _renderer_cell_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./renderer/cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRenderer", function() { return _renderer_cell_renderer__WEBPACK_IMPORTED_MODULE_3__["CellRenderer"]; });

/* harmony import */ var _renderer_header_cell_renderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./renderer/header-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-cell-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCellRenderer", function() { return _renderer_header_cell_renderer__WEBPACK_IMPORTED_MODULE_4__["HeaderCellRenderer"]; });

/* harmony import */ var _renderer_filter_cell_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./renderer/filter-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-cell-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterCellRenderer", function() { return _renderer_filter_cell_renderer__WEBPACK_IMPORTED_MODULE_5__["FilterCellRenderer"]; });

/* harmony import */ var _renderer_stacked_cell_renderer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./renderer/stacked-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/stacked-cell-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedHeaderCellRenderer", function() { return _renderer_stacked_cell_renderer__WEBPACK_IMPORTED_MODULE_6__["StackedHeaderCellRenderer"]; });

/* harmony import */ var _renderer_render__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./renderer/render */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Render", function() { return _renderer_render__WEBPACK_IMPORTED_MODULE_7__["Render"]; });

/* empty/unused harmony star reexport *//* harmony import */ var _renderer_indent_cell_renderer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./renderer/indent-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/indent-cell-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IndentCellRenderer", function() { return _renderer_indent_cell_renderer__WEBPACK_IMPORTED_MODULE_8__["IndentCellRenderer"]; });

/* harmony import */ var _renderer_caption_cell_renderer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./renderer/caption-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/caption-cell-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionCellRenderer", function() { return _renderer_caption_cell_renderer__WEBPACK_IMPORTED_MODULE_9__["GroupCaptionCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionEmptyCellRenderer", function() { return _renderer_caption_cell_renderer__WEBPACK_IMPORTED_MODULE_9__["GroupCaptionEmptyCellRenderer"]; });

/* harmony import */ var _renderer_batch_edit_renderer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./renderer/batch-edit-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/batch-edit-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BatchEditRender", function() { return _renderer_batch_edit_renderer__WEBPACK_IMPORTED_MODULE_10__["BatchEditRender"]; });

/* harmony import */ var _renderer_dialog_edit_renderer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./renderer/dialog-edit-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dialog-edit-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogEditRender", function() { return _renderer_dialog_edit_renderer__WEBPACK_IMPORTED_MODULE_11__["DialogEditRender"]; });

/* harmony import */ var _renderer_inline_edit_renderer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./renderer/inline-edit-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/inline-edit-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InlineEditRender", function() { return _renderer_inline_edit_renderer__WEBPACK_IMPORTED_MODULE_12__["InlineEditRender"]; });

/* harmony import */ var _renderer_edit_renderer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./renderer/edit-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/edit-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditRender", function() { return _renderer_edit_renderer__WEBPACK_IMPORTED_MODULE_13__["EditRender"]; });

/* harmony import */ var _renderer_boolean_edit_cell__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./renderer/boolean-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanEditCell", function() { return _renderer_boolean_edit_cell__WEBPACK_IMPORTED_MODULE_14__["BooleanEditCell"]; });

/* harmony import */ var _renderer_default_edit_cell__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./renderer/default-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/default-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultEditCell", function() { return _renderer_default_edit_cell__WEBPACK_IMPORTED_MODULE_15__["DefaultEditCell"]; });

/* harmony import */ var _renderer_dropdown_edit_cell__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./renderer/dropdown-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dropdown-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownEditCell", function() { return _renderer_dropdown_edit_cell__WEBPACK_IMPORTED_MODULE_16__["DropDownEditCell"]; });

/* harmony import */ var _renderer_numeric_edit_cell__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./renderer/numeric-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/numeric-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericEditCell", function() { return _renderer_numeric_edit_cell__WEBPACK_IMPORTED_MODULE_17__["NumericEditCell"]; });

/* harmony import */ var _renderer_datepicker_edit_cell__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./renderer/datepicker-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/datepicker-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DatePickerEditCell", function() { return _renderer_datepicker_edit_cell__WEBPACK_IMPORTED_MODULE_18__["DatePickerEditCell"]; });

/* harmony import */ var _renderer_command_column_renderer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./renderer/command-column-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/command-column-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CommandColumnRenderer", function() { return _renderer_command_column_renderer__WEBPACK_IMPORTED_MODULE_19__["CommandColumnRenderer"]; });

/* harmony import */ var _renderer_freeze_renderer__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./renderer/freeze-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/freeze-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeContentRender", function() { return _renderer_freeze_renderer__WEBPACK_IMPORTED_MODULE_20__["FreezeContentRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeRender", function() { return _renderer_freeze_renderer__WEBPACK_IMPORTED_MODULE_20__["FreezeRender"]; });

/* harmony import */ var _renderer_string_filter_ui__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./renderer/string-filter-ui */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/string-filter-ui.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringFilterUI", function() { return _renderer_string_filter_ui__WEBPACK_IMPORTED_MODULE_21__["StringFilterUI"]; });

/* harmony import */ var _renderer_number_filter_ui__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./renderer/number-filter-ui */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/number-filter-ui.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberFilterUI", function() { return _renderer_number_filter_ui__WEBPACK_IMPORTED_MODULE_22__["NumberFilterUI"]; });

/* harmony import */ var _renderer_date_filter_ui__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./renderer/date-filter-ui */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/date-filter-ui.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateFilterUI", function() { return _renderer_date_filter_ui__WEBPACK_IMPORTED_MODULE_23__["DateFilterUI"]; });

/* harmony import */ var _renderer_boolean_filter_ui__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./renderer/boolean-filter-ui */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-filter-ui.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanFilterUI", function() { return _renderer_boolean_filter_ui__WEBPACK_IMPORTED_MODULE_24__["BooleanFilterUI"]; });

/* harmony import */ var _renderer_filter_menu_operator__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./renderer/filter-menu-operator */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-menu-operator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FlMenuOptrUI", function() { return _renderer_filter_menu_operator__WEBPACK_IMPORTED_MODULE_25__["FlMenuOptrUI"]; });

/* harmony import */ var _renderer_autocomplete_edit_cell__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./renderer/autocomplete-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/autocomplete-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoCompleteEditCell", function() { return _renderer_autocomplete_edit_cell__WEBPACK_IMPORTED_MODULE_26__["AutoCompleteEditCell"]; });

/* harmony import */ var _renderer_combobox_edit_cell__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./renderer/combobox-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/combobox-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComboboxEditCell", function() { return _renderer_combobox_edit_cell__WEBPACK_IMPORTED_MODULE_27__["ComboboxEditCell"]; });

/* harmony import */ var _renderer_multiselect_edit_cell__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./renderer/multiselect-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/multiselect-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelectEditCell", function() { return _renderer_multiselect_edit_cell__WEBPACK_IMPORTED_MODULE_28__["MultiSelectEditCell"]; });

/* harmony import */ var _renderer_timepicker_edit_cell__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./renderer/timepicker-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/timepicker-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimePickerEditCell", function() { return _renderer_timepicker_edit_cell__WEBPACK_IMPORTED_MODULE_29__["TimePickerEditCell"]; });

/* harmony import */ var _renderer_toggleswitch_edit_cell__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./renderer/toggleswitch-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/toggleswitch-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToggleEditCell", function() { return _renderer_toggleswitch_edit_cell__WEBPACK_IMPORTED_MODULE_30__["ToggleEditCell"]; });

/* harmony import */ var _renderer_inputmask_edit_cell__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./renderer/inputmask-edit-cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/inputmask-edit-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBoxCellEdit", function() { return _renderer_inputmask_edit_cell__WEBPACK_IMPORTED_MODULE_31__["MaskedTextBoxCellEdit"]; });

/* harmony import */ var _renderer_virtual_content_renderer__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./renderer/virtual-content-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/virtual-content-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualContentRenderer", function() { return _renderer_virtual_content_renderer__WEBPACK_IMPORTED_MODULE_32__["VirtualContentRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualHeaderRenderer", function() { return _renderer_virtual_content_renderer__WEBPACK_IMPORTED_MODULE_32__["VirtualHeaderRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualElementHandler", function() { return _renderer_virtual_content_renderer__WEBPACK_IMPORTED_MODULE_32__["VirtualElementHandler"]; });

/**
 * Models
 */




































/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/autocomplete-edit-cell.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/autocomplete-edit-cell.js ***!
  \****************************************************************************************/
/*! exports provided: AutoCompleteEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoCompleteEditCell", function() { return AutoCompleteEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-dropdowns */ "./node_modules/@syncfusion/ej2-dropdowns/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");




/**
 * `AutoCompleteEditCell` is used to handle autocomplete cell type editing.
 * @hidden
 */
var AutoCompleteEditCell = /** @class */ (function () {
    function AutoCompleteEditCell(parent) {
        //constructor
        this.parentObj = parent;
    }
    AutoCompleteEditCell.prototype.create = function (args) {
        //create 
        var complexFieldName = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getComplexFieldID"])(args.column.field);
        return this.parentObj.createElement('input', {
            className: 'e-field', attrs: {
                id: this.parentObj.element.id + complexFieldName,
                name: complexFieldName, type: 'text', 'e-mappinguid': args.column.uid,
            }
        });
    };
    AutoCompleteEditCell.prototype.write = function (args) {
        this.column = args.column;
        var isInlineEdit = this.parentObj.editSettings.mode !== 'Dialog';
        this.object = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__["AutoComplete"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
            dataSource: this.parentObj.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"] ?
                this.parentObj.dataSource : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](this.parentObj.dataSource),
            query: new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]().select(args.column.field), enabled: Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["isEditable"])(args.column, args.requestType, args.element),
            fields: { value: args.column.field },
            value: Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getObject"])(args.column.field, args.rowData),
            // enableRtl: this.parentObject.enableRtl,
            actionComplete: this.selectedValues.bind(this),
            placeholder: isInlineEdit ? '' : args.column.headerText,
            floatLabelType: isInlineEdit ? 'Never' : 'Always'
        }, args.column.edit.params));
        this.object.appendTo(args.element);
        /* tslint:disable-next-line:no-any */
        args.element.setAttribute('name', Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getComplexFieldID"])(args.column.field));
    };
    AutoCompleteEditCell.prototype.read = function (element) {
        return element.ej2_instances[0].value;
    };
    AutoCompleteEditCell.prototype.selectedValues = function (valObj) {
        valObj.result = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].distinct(valObj.result, this.object.fields.value, true);
        if (this.column.dataSource) {
            this.column.dataSource.dataSource.json = valObj.result;
        }
    };
    AutoCompleteEditCell.prototype.destroy = function () {
        if (this.object) {
            this.object.destroy();
        }
    };
    return AutoCompleteEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/batch-edit-renderer.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/batch-edit-renderer.js ***!
  \*************************************************************************************/
/*! exports provided: BatchEditRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BatchEditRender", function() { return BatchEditRender; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");

/**
 * Edit render module is used to render grid edit row.
 * @hidden
 */
var BatchEditRender = /** @class */ (function () {
    /**
     * Constructor for render module
     */
    function BatchEditRender(parent) {
        this.parent = parent;
    }
    BatchEditRender.prototype.update = function (elements, args) {
        args.cell.innerHTML = '';
        args.cell.appendChild(this.getEditElement(elements, args));
        args.cell.classList.remove('e-ellipsistooltip');
        args.cell.classList.add('e-editedbatchcell');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(args.row, ['e-editedrow', 'e-batchrow'], []);
    };
    BatchEditRender.prototype.getEditElement = function (elements, args) {
        var gObj = this.parent;
        var form = this.parent
            .createElement('form', { id: gObj.element.id + 'EditForm', className: 'e-gridform' });
        form.appendChild(elements[args.columnObject.uid]);
        if (args.columnObject.editType === 'booleanedit') {
            args.cell.classList.add('e-boolcell');
        }
        if (!args.columnObject.editType) {
            args.cell.classList.add('e-inputbox');
        }
        return form;
    };
    BatchEditRender.prototype.removeEventListener = function () {
        //To destroy the renderer
    };
    return BatchEditRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-edit-cell.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-edit-cell.js ***!
  \***********************************************************************************/
/*! exports provided: BooleanEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BooleanEditCell", function() { return BooleanEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");




/**
 * `BooleanEditCell` is used to handle boolean cell type editing.
 * @hidden
 */
var BooleanEditCell = /** @class */ (function () {
    function BooleanEditCell(parent) {
        this.activeClasses = ['e-selectionbackground', 'e-active'];
        this.parent = parent;
    }
    BooleanEditCell.prototype.create = function (args) {
        var col = args.column;
        var classNames = 'e-field e-boolcell';
        if (col.type === 'checkbox') {
            classNames = 'e-field e-boolcell e-edit-checkselect';
        }
        var complexFieldName = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(args.column.field);
        return this.parent.createElement('input', {
            className: classNames, attrs: {
                type: 'checkbox', value: args.value, 'e-mappinguid': col.uid,
                id: this.parent.element.id + complexFieldName,
                name: complexFieldName
            }
        });
    };
    BooleanEditCell.prototype.read = function (element) {
        return element.checked;
    };
    BooleanEditCell.prototype.write = function (args) {
        var selectChkBox;
        var chkState;
        var isAddRow = args.requestType === 'add' || args.row.classList.contains('e-addedrow');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.row)) {
            selectChkBox = args.row.querySelector('.e-edit-checkselect');
        }
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(args.column.field, args.rowData)) {
            chkState = JSON.parse(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(args.column.field, args.rowData).toString().toLowerCase());
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectChkBox)) {
            this.editType = this.parent.editSettings.mode;
            this.editRow = args.row;
            if (args.requestType !== 'add') {
                var row = this.parent.getRowObjectFromUID(args.row.getAttribute('data-uid'));
                chkState = row ? row.isSelected : false;
            }
            _base_util__WEBPACK_IMPORTED_MODULE_2__["addRemoveActiveClasses"].apply(void 0, [[].slice.call(args.row.querySelectorAll('.e-rowcell')), chkState].concat(this.activeClasses));
        }
        this.obj = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__["CheckBox"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
            label: this.parent.editSettings.mode !== 'Dialog' ? ' ' : args.column.headerText,
            checked: chkState,
            disabled: !Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isEditable"])(args.column, args.requestType, args.element), enableRtl: this.parent.enableRtl,
            change: this.checkBoxChange.bind(this)
        }, args.column.edit.params));
        this.obj.appendTo(args.element);
    };
    BooleanEditCell.prototype.checkBoxChange = function (args) {
        if (this.editRow && this.editType !== 'Dialog') {
            var add = false;
            if (!args.checked) {
                this.editRow.removeAttribute('aria-selected');
            }
            else {
                add = true;
                this.editRow.setAttribute('aria-selected', add.toString());
            }
            _base_util__WEBPACK_IMPORTED_MODULE_2__["addRemoveActiveClasses"].apply(void 0, [[].slice.call(this.editRow.querySelectorAll('.e-rowcell')), add].concat(this.activeClasses));
        }
    };
    BooleanEditCell.prototype.destroy = function () {
        if (this.obj) {
            this.obj.destroy();
        }
    };
    return BooleanEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-filter-ui.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-filter-ui.js ***!
  \***********************************************************************************/
/*! exports provided: BooleanFilterUI */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BooleanFilterUI", function() { return BooleanFilterUI; });
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-dropdowns */ "./node_modules/@syncfusion/ej2-dropdowns/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");




/**
 * `boolfilterui` render boolean column.
 * @hidden
 */
var BooleanFilterUI = /** @class */ (function () {
    function BooleanFilterUI(parent, serviceLocator, filterSettings) {
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        this.filterSettings = filterSettings;
    }
    BooleanFilterUI.prototype.create = function (args) {
        var isForeignColumn = args.column.isForeignColumn();
        var dataSource = isForeignColumn ? args.column.dataSource : this.parent.dataSource;
        var fields = isForeignColumn ? args.column.foreignKeyValue : args.column.field;
        this.elem = this.parent.createElement('input', { className: 'e-flmenu-input', id: 'bool-ui-' + args.column.uid });
        args.target.appendChild(this.elem);
        this.dialogObj = args.dialogObj;
        this.dropInstance = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_2__["DropDownList"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["extend"])({
            dataSource: dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ?
                dataSource : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](dataSource),
            query: new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().select(fields),
            fields: { text: fields, value: fields },
            placeholder: args.localizeText.getConstant('SelectValue'),
            cssClass: 'e-popup-flmenu',
            locale: this.parent.locale,
            enableRtl: this.parent.enableRtl,
            open: this.openPopup.bind(this),
            actionComplete: function (e) {
                e.result = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].distinct(e.result, fields, true);
            }
        }, args.column.filter.params));
        this.dropInstance.appendTo(this.elem);
    };
    BooleanFilterUI.prototype.write = function (args) {
        var drpuiObj = document.querySelector('#bool-ui-' + args.column.uid).ej2_instances[0];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_3__["isNullOrUndefined"])(args.filteredValue)) {
            drpuiObj.text = args.filteredValue;
        }
    };
    BooleanFilterUI.prototype.read = function (element, column, filterOptr, filterObj) {
        var drpuiObj = document.querySelector('#bool-ui-' + column.uid).ej2_instances[0];
        var filterValue = drpuiObj.value;
        filterObj.filterByColumn(column.field, filterOptr, filterValue, 'and', false);
    };
    BooleanFilterUI.prototype.openPopup = function (args) {
        Object(_base_util__WEBPACK_IMPORTED_MODULE_0__["getZIndexCalcualtion"])(args, this.dialogObj);
    };
    return BooleanFilterUI;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/caption-cell-renderer.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/caption-cell-renderer.js ***!
  \***************************************************************************************/
/*! exports provided: GroupCaptionCellRenderer, GroupCaptionEmptyCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionCellRenderer", function() { return GroupCaptionCellRenderer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionEmptyCellRenderer", function() { return GroupCaptionEmptyCellRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * GroupCaptionCellRenderer class which responsible for building group caption cell.
 * @hidden
 */
var GroupCaptionCellRenderer = /** @class */ (function (_super) {
    __extends(GroupCaptionCellRenderer, _super);
    function GroupCaptionCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent
            .createElement('TD', { className: 'e-groupcaption',
            attrs: { id: _this.parent.element.id + 'captioncell', role: 'gridcell', tabindex: '-1' } });
        return _this;
    }
    /**
     * Function to render the cell content based on Column object.
     * @param  {Cell} cell
     * @param  {Object} data
     */
    GroupCaptionCellRenderer.prototype.render = function (cell, data) {
        var node = this.element.cloneNode();
        var gObj = this.parent;
        var result;
        var helper = {};
        var fKeyValue;
        data.headerText = cell.column.headerText;
        if (cell.isForeignKey) {
            fKeyValue = this.format(cell.column, cell.column.valueAccessor('foreignKey', data, cell.column));
        }
        var value = cell.isForeignKey ? fKeyValue : cell.column.enableGroupByFormat ? data.key :
            this.format(cell.column, cell.column.valueAccessor('key', data, cell.column));
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(gObj.groupSettings.captionTemplate)) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                var tempID = gObj.element.id + 'captionTemplate';
                result = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["templateCompiler"])(gObj.groupSettings.captionTemplate)(data, null, null, tempID);
            }
            else {
                result = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["templateCompiler"])(gObj.groupSettings.captionTemplate)(data);
            }
            Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["appendChildren"])(node, result);
        }
        else {
            node.innerHTML = cell.column.headerText + ': ' + value + ' - ' + data.count + ' ' +
                (data.count < 2 ? this.localizer.getConstant('Item') : this.localizer.getConstant('Items'));
        }
        node.setAttribute('colspan', cell.colSpan.toString());
        node.setAttribute('aria-label', node.innerHTML + ' is groupcaption cell');
        node.setAttribute('title', node.innerHTML);
        return node;
    };
    return GroupCaptionCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_1__["CellRenderer"]));

/**
 * GroupCaptionEmptyCellRenderer class which responsible for building group caption empty cell.
 * @hidden
 */
var GroupCaptionEmptyCellRenderer = /** @class */ (function (_super) {
    __extends(GroupCaptionEmptyCellRenderer, _super);
    function GroupCaptionEmptyCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent.createElement('TD', { className: 'e-groupcaption' });
        return _this;
    }
    /**
     * Function to render the cell content based on Column object.
     * @param  {Cell} cell
     * @param  {Object} data
     */
    GroupCaptionEmptyCellRenderer.prototype.render = function (cell, data) {
        var node = this.element.cloneNode();
        node.innerHTML = '&nbsp;';
        node.setAttribute('colspan', cell.colSpan.toString());
        return node;
    };
    return GroupCaptionEmptyCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_1__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-merge-renderer.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-merge-renderer.js ***!
  \*************************************************************************************/
/*! exports provided: CellMergeRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellMergeRender", function() { return CellMergeRender; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");



/**
 * `CellMergeRender` module.
 * @hidden
 */
var CellMergeRender = /** @class */ (function () {
    function CellMergeRender(serviceLocator, parent) {
        this.serviceLocator = serviceLocator;
        this.parent = parent;
    }
    CellMergeRender.prototype.render = function (cellArgs, row, i, td) {
        var cellRendererFact = this.serviceLocator.getService('cellRendererFactory');
        var cellRenderer = cellRendererFact.getCellRenderer(row.cells[i].cellType || _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].Data);
        var colSpan = row.cells[i].cellSpan ? row.cells[i].cellSpan :
            (cellArgs.colSpan + i) <= row.cells.length ? cellArgs.colSpan : row.cells.length - i;
        var rowSpan = cellArgs.rowSpan;
        var visible = 0;
        var spannedCell;
        if (row.index > 0) {
            var cells = this.parent.groupSettings.columns.length > 0 &&
                !this.parent.getRowsObject()[row.index - 1].isDataRow ? this.parent.getRowsObject()[row.index].cells :
                this.parent.getRowsObject()[row.index - 1].cells;
            var targetCell_1 = row.cells[i];
            var uid_1 = 'uid';
            spannedCell = cells.filter(function (cell) { return cell.column.uid === targetCell_1.column[uid_1]; })[0];
        }
        var colSpanLen = spannedCell && spannedCell.colSpanRange > 1 && spannedCell.rowSpanRange > 1 ?
            spannedCell.colSpanRange : colSpan;
        for (var j = i + 1; j < i + colSpanLen && j < row.cells.length; j++) {
            if (row.cells[j].visible === false) {
                visible++;
            }
            else {
                row.cells[j].isSpanned = true;
            }
        }
        if (visible > 0) {
            for (var j = i + colSpan; j < i + colSpan + visible && j < row.cells.length; j++) {
                row.cells[j].isSpanned = true;
            }
            if (i + colSpan + visible >= row.cells.length) {
                colSpan -= (i + colSpan + visible) - row.cells.length;
            }
        }
        if (row.cells[i].cellSpan) {
            row.data[cellArgs.column.field] = row.cells[i].spanText;
            td = cellRenderer.render(row.cells[i], row.data, { 'index': !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(row.index) ? row.index.toString() : '' });
        }
        if (colSpan > 1) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(td, { 'colSpan': colSpan.toString(), 'aria-colSpan': colSpan.toString() });
        }
        if (rowSpan > 1) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(td, { 'rowspan': rowSpan.toString(), 'aria-rowspan': rowSpan.toString() });
            row.cells[i].isRowSpanned = true;
            row.cells[i].rowSpanRange = Number(rowSpan);
            if (colSpan > 1) {
                row.cells[i].colSpanRange = Number(colSpan);
            }
        }
        if (row.index > 0 && (spannedCell.rowSpanRange > 1)) {
            row.cells[i].isSpanned = true;
            row.cells[i].rowSpanRange = Number(spannedCell.rowSpanRange - 1);
            row.cells[i].colSpanRange = spannedCell.rowSpanRange > 0 ? spannedCell.colSpanRange : 1;
        }
        if (this.parent.enableColumnVirtualization && !row.cells[i].cellSpan &&
            !this.containsKey(cellArgs.column.field, cellArgs.data[cellArgs.column.field])) {
            this.backupMergeCells(cellArgs.column.field, cellArgs.data[cellArgs.column.field], cellArgs.colSpan);
        }
        return td;
    };
    CellMergeRender.prototype.backupMergeCells = function (fName, data, span) {
        this.setMergeCells(this.generteKey(fName, data), span);
    };
    CellMergeRender.prototype.generteKey = function (fname, data) {
        return fname + '__' + data.toString();
    };
    CellMergeRender.prototype.splitKey = function (key) {
        return key.split('__');
    };
    CellMergeRender.prototype.containsKey = function (fname, data) {
        return this.getMergeCells().hasOwnProperty(this.generteKey(fname, data));
    };
    CellMergeRender.prototype.getMergeCells = function () {
        return this.parent.mergeCells;
    };
    CellMergeRender.prototype.setMergeCells = function (key, span) {
        this.parent.mergeCells[key] = span;
    };
    CellMergeRender.prototype.updateVirtualCells = function (rows) {
        var mCells = this.getMergeCells();
        for (var _i = 0, _a = Object.keys(mCells); _i < _a.length; _i++) {
            var key = _a[_i];
            var value = mCells[key];
            var merge = this.splitKey(key);
            var columnIndex = this.getIndexFromAllColumns(merge[0]);
            var vColumnIndices = this.parent.getColumnIndexesInView();
            var span = value - (vColumnIndices[0] - columnIndex);
            if (columnIndex < vColumnIndices[0] && span > 1) {
                for (var _b = 0, rows_1 = rows; _b < rows_1.length; _b++) {
                    var row = rows_1[_b];
                    if (row.data[merge[0]].toString() === merge[1].toString()) {
                        row.cells[0].cellSpan = span;
                        row.cells[0].spanText = merge[1];
                        break;
                    }
                }
            }
        }
        return rows;
    };
    CellMergeRender.prototype.getIndexFromAllColumns = function (field) {
        var index = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["iterateArrayOrObject"])(this.parent.getVisibleColumns(), function (item, index) {
            if (item.field === field) {
                return index;
            }
            return undefined;
        })[0];
        return index;
    };
    return CellMergeRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js ***!
  \*******************************************************************************/
/*! exports provided: CellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellRenderer", function() { return CellRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");




/**
 * CellRenderer class which responsible for building cell content.
 * @hidden
 */
var CellRenderer = /** @class */ (function () {
    function CellRenderer(parent, locator) {
        this.localizer = locator.getService('localization');
        this.formatter = locator.getService('valueFormatter');
        this.parent = parent;
        this.element = this.parent.createElement('TD', { className: 'e-rowcell', attrs: { role: 'gridcell', tabindex: '-1' } });
        this.rowChkBox = this.parent.createElement('input', { className: 'e-checkselect', attrs: { 'type': 'checkbox' } });
    }
    /**
     * Function to return the wrapper for the TD content
     * @returns string
     */
    CellRenderer.prototype.getGui = function () {
        return '';
    };
    /**
     * Function to format the cell value.
     * @param  {Column} column
     * @param  {Object} value
     * @param  {Object} data
     */
    CellRenderer.prototype.format = function (column, value, data) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.format)) {
            value = this.formatter.toView(value, column.getFormatter());
        }
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) ? '' : value.toString();
    };
    CellRenderer.prototype.evaluate = function (node, cell, data, attributes, fData, isEdit) {
        var _a;
        var result;
        if (cell.column.template) {
            var literals = ['index'];
            var dummyData = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["extendObjWithFn"])({}, data, (_a = {}, _a[_base_constant__WEBPACK_IMPORTED_MODULE_3__["foreignKeyData"]] = fData, _a));
            var templateID = this.parent.element.id + cell.column.uid;
            var str = 'isStringTemplate';
            var index = 'index';
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && isEdit) {
                result = cell.column.getColumnTemplate()(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({ 'index': attributes[literals[0]] }, dummyData), this.parent, 'template', templateID, this.parent[str], parseInt(attributes[index], 10));
            }
            else {
                result = cell.column.getColumnTemplate()(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({ 'index': attributes[literals[0]] }, dummyData), this.parent, 'template', templateID);
            }
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["appendChildren"])(node, result);
            this.parent.notify('template-result', { template: result });
            result = null;
            node.setAttribute('aria-label', node.innerText + ' is template cell' + ' column header ' +
                cell.column.headerText);
            return false;
        }
        return true;
    };
    /**
     * Function to invoke the custom formatter available in the column object.
     * @param  {Column} column
     * @param  {Object} value
     * @param  {Object} data
     */
    CellRenderer.prototype.invokeFormatter = function (column, value, data) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.formatter)) {
            if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["doesImplementInterface"])(column.formatter, 'getValue')) {
                var formatter = column.formatter;
                value = new formatter().getValue(column, data);
            }
            else if (typeof column.formatter === 'function') {
                value = column.formatter(column, data);
            }
            else {
                value = column.formatter.getValue(column, data);
            }
        }
        return value;
    };
    /**
     * Function to render the cell content based on Column object.
     * @param  {Column} column
     * @param  {Object} data
     * @param  {{[x:string]:Object}} attributes?
     * @param  {Element}
     */
    CellRenderer.prototype.render = function (cell, data, attributes, isEdit) {
        return this.refreshCell(cell, data, attributes, isEdit);
    };
    /**
     * Function to refresh the cell content based on Column object.
     * @param  {Column} column
     * @param  {Object} data
     * @param  {{[x:string]:Object}} attributes?
     * @param  {Element}
     */
    CellRenderer.prototype.refreshTD = function (td, cell, data, attributes) {
        var node = this.refreshCell(cell, data, attributes);
        td.innerHTML = '';
        td.setAttribute('aria-label', node.getAttribute('aria-label'));
        var elements = [].slice.call(node.childNodes);
        for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
            var elem = elements_1[_i];
            td.appendChild(elem);
        }
    };
    CellRenderer.prototype.refreshCell = function (cell, data, attributes, isEdit) {
        var _a;
        var node = this.element.cloneNode();
        var column = cell.column;
        var fData;
        if (cell.isForeignKey) {
            fData = cell.foreignKeyData[0] || (_a = {}, _a[column.foreignKeyValue] = column.format ? null : '', _a);
        }
        //Prepare innerHtml
        var innerHtml = this.getGui();
        var value = cell.isForeignKey ? this.getValue(column.foreignKeyValue, fData, column) :
            this.getValue(column.field, data, column);
        if ((column.type === 'date' || column.type === 'datetime') && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            value = new Date(value);
        }
        value = this.format(column, value, data);
        innerHtml = value.toString();
        if (column.type === 'boolean' && !column.displayAsCheckBox) {
            var localeStr = (value !== 'true' && value !== 'false') ? null : value === 'true' ? 'True' : 'False';
            innerHtml = localeStr ? this.localizer.getConstant(localeStr) : innerHtml;
        }
        var fromFormatter = this.invokeFormatter(column, value, data);
        innerHtml = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.formatter) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fromFormatter) ? '' : fromFormatter.toString() : innerHtml;
        node.setAttribute('aria-label', (innerHtml === '' ? 'empty' : innerHtml) + ' column header ' + cell.column.headerText);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cell.column.headerText)) {
            node.setAttribute('aria-label', innerHtml + ' column header ' + cell.column.headerText);
        }
        if (this.evaluate(node, cell, data, attributes, fData, isEdit) && column.type !== 'checkbox') {
            this.appendHtml(node, innerHtml, column.getDomSetter ? column.getDomSetter() : 'innerHTML');
        }
        else if (column.type === 'checkbox') {
            node.classList.add('e-gridchkbox');
            node.setAttribute('aria-label', 'checkbox');
            if (this.parent.selectionSettings.persistSelection) {
                value = value === 'true';
            }
            else {
                value = false;
            }
            var checkWrap = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__["createCheckBox"])(this.parent.createElement, false, { checked: value, label: ' ' });
            checkWrap.insertBefore(this.rowChkBox.cloneNode(), checkWrap.firstChild);
            node.appendChild(checkWrap);
        }
        if (this.parent.checkAllRows === 'Check' && this.parent.enableVirtualization) {
            cell.isSelected = true;
        }
        this.setAttributes(node, cell, attributes);
        if (column.type === 'boolean' && column.displayAsCheckBox) {
            var checked = isNaN(parseInt(value.toString(), 10)) ? value === 'true' : parseInt(value.toString(), 10) > 0;
            var checkWrap = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__["createCheckBox"])(this.parent.createElement, false, { checked: checked, label: ' ' });
            node.innerHTML = '';
            checkWrap.classList.add('e-checkbox-disabled');
            node.appendChild(checkWrap);
            node.setAttribute('aria-label', checked + ' column header ' + cell.column.headerText);
        }
        return node;
    };
    /**
     * Function to specifies how the result content to be placed in the cell.
     * @param  {Element} node
     * @param  {string|Element} innerHtml
     * @returns Element
     */
    CellRenderer.prototype.appendHtml = function (node, innerHtml, property) {
        if (property === void 0) { property = 'innerHTML'; }
        node[property] = innerHtml;
        return node;
    };
    /**
     * @hidden
     */
    CellRenderer.prototype.setAttributes = function (node, cell, attributes) {
        var column = cell.column;
        this.buildAttributeFromCell(node, cell, column.type === 'checkbox');
        Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["setStyleAndAttributes"])(node, attributes);
        Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["setStyleAndAttributes"])(node, cell.attributes);
        if (column.customAttributes) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["setStyleAndAttributes"])(node, column.customAttributes);
        }
        if (column.textAlign) {
            node.style.textAlign = column.textAlign;
        }
        if (column.clipMode === 'Clip') {
            node.classList.add('e-gridclip');
        }
        else if (column.clipMode === 'EllipsisWithTooltip') {
            node.classList.add('e-ellipsistooltip');
        }
    };
    CellRenderer.prototype.buildAttributeFromCell = function (node, cell, isCheckBoxType) {
        var attr = {};
        var prop = { 'colindex': 'aria-colindex' };
        var classes = [];
        if (cell.colSpan) {
            attr.colSpan = cell.colSpan;
        }
        if (cell.rowSpan) {
            attr.rowSpan = cell.rowSpan;
        }
        if (cell.isTemplate) {
            classes.push('e-templatecell');
        }
        if (cell.isSelected) {
            classes.push.apply(classes, ['e-selectionbackground', 'e-active']);
            if (isCheckBoxType) {
                node.querySelector('.e-frame').classList.add('e-check');
            }
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cell.index)) {
            attr[prop.colindex] = cell.index;
        }
        if (!cell.visible) {
            classes.push('e-hide');
        }
        attr.class = classes;
        Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["setStyleAndAttributes"])(node, attr);
    };
    CellRenderer.prototype.getValue = function (field, data, column) {
        return column.valueAccessor(field, data, column);
    };
    return CellRenderer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/combobox-edit-cell.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/combobox-edit-cell.js ***!
  \************************************************************************************/
/*! exports provided: ComboboxEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComboboxEditCell", function() { return ComboboxEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-dropdowns */ "./node_modules/@syncfusion/ej2-dropdowns/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");




/**
 * `ComboBoxEditCell` is used to handle ComboBoxEdit cell type editing.
 * @hidden
 */
var ComboboxEditCell = /** @class */ (function () {
    function ComboboxEditCell(parentObject) {
        //constructor
        this.parent = parentObject;
    }
    ComboboxEditCell.prototype.create = function (args) {
        //create
        var fieldName = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getComplexFieldID"])(args.column.field);
        return this.parent.createElement('input', {
            className: 'e-field', attrs: {
                id: this.parent.element.id + fieldName,
                name: fieldName, type: 'text', 'e-mappinguid': args.column.uid,
            }
        });
    };
    ComboboxEditCell.prototype.write = function (args) {
        this.column = args.column;
        var isInlineMode = this.parent.editSettings.mode !== 'Dialog';
        this.obj = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__["ComboBox"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
            dataSource: this.parent.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"] ?
                this.parent.dataSource : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](this.parent.dataSource),
            query: new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]().select(args.column.field),
            fields: { value: args.column.field },
            value: Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getObject"])(args.column.field, args.rowData),
            enableRtl: this.parent.enableRtl, actionComplete: this.finalValue.bind(this),
            placeholder: isInlineMode ? '' : args.column.headerText,
            floatLabelType: isInlineMode ? 'Never' : 'Always',
            enabled: Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["isEditable"])(args.column, args.requestType, args.element),
        }, args.column.edit.params));
        this.obj.appendTo(args.element);
    };
    ComboboxEditCell.prototype.read = function (inputEle) {
        return inputEle.ej2_instances[0].value;
    };
    ComboboxEditCell.prototype.finalValue = function (val) {
        val.result = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].distinct(val.result, this.obj.fields.value, true);
        if (this.column.dataSource) {
            this.column.dataSource.dataSource.json = val.result;
        }
    };
    ComboboxEditCell.prototype.destroy = function () {
        if (this.obj) {
            this.obj.destroy();
        }
    };
    return ComboboxEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/command-column-renderer.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/command-column-renderer.js ***!
  \*****************************************************************************************/
/*! exports provided: CommandColumnRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommandColumnRenderer", function() { return CommandColumnRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * `CommandColumn` used to render command column in grid
 * @hidden
 */
var CommandColumnRenderer = /** @class */ (function (_super) {
    __extends(CommandColumnRenderer, _super);
    function CommandColumnRenderer(parent, locator) {
        var _this = _super.call(this, parent, locator) || this;
        _this.buttonElement = _this.parent.createElement('button', {});
        _this.unbounDiv = _this.parent.createElement('div', { className: 'e-unboundcelldiv', styles: 'display: inline-block' });
        _this.element = _this.parent.createElement('TD', {
            className: 'e-rowcell e-unboundcell', attrs: {
                role: 'gridcell', tabindex: '-1'
            }
        });
        return _this;
    }
    /**
     * Function to render the cell content based on Column object.
     * @param  {Column} column
     * @param  {Object} data
     * @param  {{[x:string]:Object}} attributes?
     * @param  {Element}
     */
    CommandColumnRenderer.prototype.render = function (cell, data, attributes) {
        var node = this.element.cloneNode();
        node.appendChild(this.unbounDiv.cloneNode());
        node.setAttribute('aria-label', 'is Command column column header ' + cell.column.headerText);
        if (cell.column.commandsTemplate) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["appendChildren"])(node.firstElementChild, cell.column.getColumnTemplate()(data));
        }
        else {
            for (var _i = 0, _a = cell.commands; _i < _a.length; _i++) {
                var command = _a[_i];
                node = this.renderButton(node, command, attributes.index);
            }
        }
        this.setAttributes(node, cell, attributes);
        if (this.parent.isEdit) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(node.querySelectorAll('.e-edit-delete'), 'e-hide');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(node.querySelectorAll('.e-save-cancel'), 'e-hide');
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(node.querySelectorAll('.e-save-cancel'), 'e-hide');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(node.querySelectorAll('.e-edit-delete'), 'e-hide');
        }
        return node;
    };
    CommandColumnRenderer.prototype.renderButton = function (node, buttonOption, index) {
        var button = this.buttonElement.cloneNode();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(button, {
            'id': this.parent.element.id + (buttonOption.type || '') + '_' + index, 'type': 'button',
            title: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(buttonOption.title) ? buttonOption.title :
                buttonOption.buttonOption.content || this.localizer.getConstant(buttonOption.type) || buttonOption.type
        });
        button.onclick = buttonOption.buttonOption.click;
        var buttonObj = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__["Button"](buttonOption.buttonOption, button);
        buttonObj.commandType = buttonOption.type;
        node.firstElementChild.appendChild(buttonObj.element);
        switch (buttonOption.type) {
            case 'Edit':
            case 'Delete':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([button], ['e-edit-delete', 'e-' + buttonOption.type.toLowerCase() + 'button']);
                break;
            case 'Cancel':
            case 'Save':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([button], ['e-save-cancel', 'e-' + buttonOption.type.toLowerCase() + 'button']);
                break;
        }
        return node;
    };
    return CommandColumnRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_2__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/content-renderer.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/content-renderer.js ***!
  \**********************************************************************************/
/*! exports provided: ContentRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentRender", function() { return ContentRender; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _row_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./row-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js");
/* harmony import */ var _cell_merge_renderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cell-merge-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-merge-renderer.js");
/* harmony import */ var _services_row_model_generator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../services/row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js");
/* harmony import */ var _services_group_model_generator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../services/group-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/group-model-generator.js");










/**
 * Content module is used to render grid content
 * @hidden
 */
var ContentRender = /** @class */ (function () {
    /**
     * Constructor for content renderer module
     */
    function ContentRender(parent, serviceLocator) {
        var _this = this;
        this.rows = [];
        this.freezeRows = [];
        this.movableRows = [];
        this.isLoaded = true;
        this.drop = function (e) {
            _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnDrop"], { target: e.target, droppedElement: e.droppedElement });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(e.droppedElement);
        };
        this.rafCallback = function (args) {
            var arg = args;
            return function () {
                _this.ariaService.setBusy(_this.getPanel().firstChild, false);
                if (_this.parent.isDestroyed) {
                    return;
                }
                var rows = _this.rows.slice(0);
                if (_this.parent.getFrozenColumns() !== 0) {
                    rows = args.isFrozen ? _this.freezeRows : _this.movableRows;
                }
                _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], { rows: rows, args: arg });
                if (_this.isLoaded) {
                    _this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataBound"], {});
                    if (_this.parent.allowTextWrap) {
                        _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["freezeRender"], { case: 'textwrap' });
                    }
                }
                if (arg) {
                    var action = (arg.requestType || '').toLowerCase() + '-complete';
                    _this.parent.notify(action, arg);
                    if (args.requestType === 'batchsave') {
                        args.cancel = false;
                        _this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["actionComplete"], args);
                    }
                }
                if (_this.isLoaded) {
                    _this.parent.hideSpinner();
                }
            };
        };
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        this.ariaService = this.serviceLocator.getService('ariaService');
        this.generator = this.getModelGenerator();
        if (this.parent.isDestroyed) {
            return;
        }
        if (!this.parent.enableColumnVirtualization && !this.parent.enableVirtualization) {
            this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnVisibilityChanged"], this.setVisible, this);
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["colGroupRefresh"], this.colGroupRefresh, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["uiUpdate"], this.enableAfterRender, this);
    }
    /**
     * The function is used to render grid content div
     */
    ContentRender.prototype.renderPanel = function () {
        var gObj = this.parent;
        var div = this.parent.createElement('div', { className: 'e-gridcontent' });
        var innerDiv = this.parent.createElement('div', {
            className: 'e-content'
        });
        this.ariaService.setOptions(innerDiv, { busy: false });
        div.appendChild(innerDiv);
        this.setPanel(div);
        gObj.element.appendChild(div);
    };
    /**
     * The function is used to render grid content table
     */
    ContentRender.prototype.renderTable = function () {
        var contentDiv = this.getPanel();
        var virtualTable = contentDiv.querySelector('.e-virtualtable');
        var virtualTrack = contentDiv.querySelector('.e-virtualtrack');
        if (this.parent.enableVirtualization && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(virtualTable) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(virtualTrack)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(virtualTable);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(virtualTrack);
        }
        contentDiv.appendChild(this.createContentTable('_content_table'));
        this.setTable(contentDiv.querySelector('.e-table'));
        this.ariaService.setOptions(this.getTable(), {
            multiselectable: this.parent.selectionSettings.type === 'Multiple'
        });
        this.initializeContentDrop();
        if (this.parent.frozenRows) {
            this.parent.getHeaderContent().classList.add('e-frozenhdrcont');
        }
    };
    /**
     * The function is used to create content table elements
     * @return {Element}
     * @hidden
     */
    ContentRender.prototype.createContentTable = function (id) {
        var innerDiv = this.getPanel().firstChild;
        if (this.getTable()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getTable());
        }
        var table = this.parent.createElement('table', {
            className: 'e-table', attrs: {
                cellspacing: '0.25px', role: 'grid',
                id: this.parent.element.id + id
            }
        });
        this.setColGroup(this.parent.element.querySelector('.e-gridheader').querySelector('colgroup').cloneNode(true));
        table.appendChild(this.getColGroup());
        table.appendChild(this.parent.createElement('tbody'));
        innerDiv.appendChild(table);
        return innerDiv;
    };
    ContentRender.prototype.splitRows = function (idx) {
        if (this.parent.getFrozenColumns()) {
            if (idx === 0) {
                this.freezeRows = this.rows;
                this.freezeRowElements = this.rowElements;
            }
            else {
                this.movableRows = this.rows;
            }
        }
    };
    /**
     * Refresh the content of the Grid.
     * @return {void}
     */
    // tslint:disable-next-line:max-func-body-length
    ContentRender.prototype.refreshContentRows = function (args) {
        var _this = this;
        if (args === void 0) { args = {}; }
        var gObj = this.parent;
        if (gObj.currentViewData.length === 0) {
            return;
        }
        var dataSource = gObj.currentViewData;
        var frag = document.createDocumentFragment();
        var hdrfrag = document.createDocumentFragment();
        var columns = gObj.getColumns();
        var tr;
        var hdrTbody;
        var frzCols = gObj.getFrozenColumns();
        var trElement;
        var row = new _row_renderer__WEBPACK_IMPORTED_MODULE_3__["RowRenderer"](this.serviceLocator, null, this.parent);
        this.rowElements = [];
        this.rows = [];
        var fCont = this.getPanel().querySelector('.e-frozencontent');
        var mCont = this.getPanel().querySelector('.e-movablecontent');
        var cont = this.getPanel().querySelector('.e-content');
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isGroupAdaptive"])(gObj)) {
            if (['sorting', 'filtering', 'searching', 'grouping', 'ungrouping', 'reorder']
                .some(function (value) { return args.requestType === value; })) {
                gObj.vcRows = [];
                gObj.vRows = [];
            }
        }
        var modelData = this.generator.generateRows(dataSource, args);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(modelData[0].cells[0])) {
            mCont.querySelector('tbody').innerHTML = '';
        }
        var idx = modelData[0].cells[0].index;
        /* tslint:disable:no-any */
        if (this.parent.registeredTemplate && this.parent.registeredTemplate.template && !args.isFrozen) {
            var templatetoclear = [];
            for (var i = 0; i < this.parent.registeredTemplate.template.length; i++) {
                for (var j = 0; j < this.parent.registeredTemplate.template[i].rootNodes.length; j++) {
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.registeredTemplate.template[i].rootNodes[j].parentNode)) {
                        templatetoclear.push(this.parent.registeredTemplate.template[i]);
                        /* tslint:enable:no-any */
                    }
                }
            }
            this.parent.destroyTemplate(['template'], templatetoclear);
        }
        if (this.parent.enableColumnVirtualization) {
            var cellMerge = new _cell_merge_renderer__WEBPACK_IMPORTED_MODULE_4__["CellMergeRender"](this.serviceLocator, this.parent);
            cellMerge.updateVirtualCells(modelData);
        }
        if (frzCols && idx >= frzCols) {
            this.tbody = mCont.querySelector('tbody');
        }
        else {
            this.tbody = this.getTable().querySelector('tbody');
        }
        var startIndex = 0;
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isGroupAdaptive"])(gObj) && gObj.vcRows.length) {
            var top_1 = 'top';
            var scrollTop = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.virtualInfo.offsets) ? args.virtualInfo.offsets.top :
                (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.scrollTop) ? args.scrollTop[top_1] : 0);
            if (scrollTop !== 0) {
                var offsets_1 = gObj.vGroupOffsets;
                var bSize = gObj.pageSettings.pageSize / 2;
                var values = Object.keys(offsets_1).map(function (key) { return offsets_1[key]; });
                for (var m = 0; m < values.length; m++) {
                    if (scrollTop < values[m]) {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.virtualInfo) && args.virtualInfo.direction === 'up') {
                            args.virtualInfo.blockIndexes = m === 0 || m === 1 ? [1, 2] : [m, m + 1];
                            startIndex = m === 0 || m === 1 ? 0 : (m * bSize);
                            break;
                        }
                        else {
                            args.virtualInfo.blockIndexes = m === 0 || m === 1 ? [1, 2] : [m, m + 1];
                            startIndex = m === 0 || m === 1 ? 0 : (m) * bSize;
                            break;
                        }
                    }
                }
            }
        }
        for (var i = startIndex, len = modelData.length; i < len; i++) {
            this.rows.push(modelData[i]);
            if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isGroupAdaptive"])(gObj) && this.rows.length >= (gObj.pageSettings.pageSize)) {
                break;
            }
            if (!gObj.rowTemplate) {
                tr = row.render(modelData[i], columns);
                if (gObj.frozenRows && i < gObj.frozenRows) {
                    hdrfrag.appendChild(tr);
                }
                else {
                    frag.appendChild(tr);
                }
                if (modelData[i].isExpand) {
                    gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["expandChildGrid"], tr.cells[gObj.groupSettings.columns.length]);
                }
            }
            else {
                var rowTemplateID = gObj.element.id + 'rowTemplate';
                var elements = gObj.getRowTemplate()(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({ index: i }, dataSource[i]), gObj, 'rowTemplate', rowTemplateID);
                if (elements[0].tagName === 'TBODY') {
                    for (var j = 0; j < elements.length; j++) {
                        var isTR = elements[j].nodeName.toLowerCase() === 'tr';
                        if (isTR || (elements[j].querySelectorAll && elements[j].querySelectorAll('tr').length)) {
                            tr = isTR ? elements[j] : elements[j].querySelector('tr');
                        }
                    }
                    if (gObj.frozenRows && i < gObj.frozenRows) {
                        hdrfrag.appendChild(tr);
                    }
                    else {
                        frag.appendChild(tr);
                    }
                }
                else {
                    if (gObj.frozenRows && i < gObj.frozenRows) {
                        tr = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["appendChildren"])(hdrfrag, elements);
                    }
                    else {
                        // frag.appendChild(tr);
                        tr = Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["appendChildren"])(frag, elements);
                        trElement = tr.lastElementChild;
                    }
                }
                var arg = { data: modelData[i].data, row: trElement ? trElement : tr };
                this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["rowDataBound"], arg);
            }
            if (modelData[i].isDataRow) {
                this.rowElements.push(tr);
            }
            this.ariaService.setOptions(this.getTable(), { colcount: gObj.getColumns().length.toString() });
        }
        this.splitRows(idx);
        if (gObj.frozenRows) {
            hdrTbody = frzCols ? gObj.getHeaderContent().querySelector(idx === 0 ? '.e-frozenheader'
                : '.e-movableheader').querySelector('tbody') : gObj.getHeaderTable().querySelector('tbody');
            hdrTbody.innerHTML = '';
            hdrTbody.appendChild(hdrfrag);
        }
        if (gObj.frozenRows && idx === 0 && cont.offsetHeight === Number(gObj.height)) {
            cont.style.height = (cont.offsetHeight - hdrTbody.offsetHeight) + 'px';
        }
        if (frzCols && idx === 0) {
            this.getPanel().firstChild.style.overflowY = 'hidden';
        }
        args.rows = this.rows.slice(0);
        args.isFrozen = this.parent.getFrozenColumns() !== 0 && !args.isFrozen;
        this.index = idx;
        Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getUpdateUsingRaf"])(function () {
            _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["beforeFragAppend"], args);
            if (!_this.parent.enableVirtualization) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(_this.tbody);
                _this.tbody = _this.parent.createElement('tbody');
            }
            if (frzCols) {
                _this.tbody.appendChild(frag);
                if (_this.index === 0) {
                    _this.isLoaded = false;
                    fCont.querySelector('table').appendChild(_this.tbody);
                }
                else {
                    if (_this.tbody.childElementCount < 1) {
                        _this.tbody.appendChild(_this.parent.createElement('tr').appendChild(_this.parent.createElement('td')));
                    }
                    _this.isLoaded = true;
                    mCont.querySelector('table').appendChild(_this.tbody);
                    fCont.style.height = ((mCont.offsetHeight) - Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["getScrollBarWidth"])()) + 'px';
                    mCont.style.overflowY = _this.parent.height !== 'auto' ? 'scroll' : 'auto';
                    fCont.style.borderRightWidth = '1px';
                }
            }
            else {
                if (gObj.rowTemplate) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(gObj.element.id + 'rowTemplate', 'RowTemplate', gObj);
                }
                _this.appendContent(_this.tbody, frag, args);
            }
            if (frzCols && idx === 0) {
                _this.refreshContentRows(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, args));
            }
            frag = null;
        }, this.rafCallback(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, args)));
    };
    ContentRender.prototype.appendContent = function (tbody, frag, args) {
        tbody.appendChild(frag);
        this.getTable().appendChild(tbody);
    };
    /**
     * Get the content div element of grid
     * @return {Element}
     */
    ContentRender.prototype.getPanel = function () {
        return this.contentPanel;
    };
    /**
     * Set the content div element of grid
     * @param  {Element} panel
     */
    ContentRender.prototype.setPanel = function (panel) {
        this.contentPanel = panel;
    };
    /**
     * Get the content table element of grid
     * @return {Element}
     */
    ContentRender.prototype.getTable = function () {
        return this.contentTable;
    };
    /**
     * Set the content table element of grid
     * @param  {Element} table
     */
    ContentRender.prototype.setTable = function (table) {
        this.contentTable = table;
    };
    /**
     * Get the Row collection in the Grid.
     * @returns {Row[] | HTMLCollectionOf<HTMLTableRowElement>}
     */
    ContentRender.prototype.getRows = function () {
        return this.parent.getFrozenColumns() ? this.freezeRows : this.rows;
    };
    /**
     * Get the Movable Row collection in the Freeze pane Grid.
     * @returns {Row[] | HTMLCollectionOf<HTMLTableRowElement>}
     */
    ContentRender.prototype.getMovableRows = function () {
        return this.movableRows;
    };
    /**
     * Get the content table data row elements
     * @return {Element}
     */
    ContentRender.prototype.getRowElements = function () {
        return this.parent.getFrozenColumns() ? this.freezeRowElements : this.rowElements;
    };
    /**
     * Get the Freeze pane movable content table data row elements
     * @return {Element}
     */
    ContentRender.prototype.getMovableRowElements = function () {
        return this.rowElements;
    };
    /**
     * Get the content table data row elements
     * @return {Element}
     */
    ContentRender.prototype.setRowElements = function (elements) {
        this.rowElements = elements;
    };
    /**
     * Get the header colgroup element
     * @returns {Element}
     */
    ContentRender.prototype.getColGroup = function () {
        return this.colgroup;
    };
    /**
     * Set the header colgroup element
     * @param {Element} colgroup
     * @returns {Element}
     */
    ContentRender.prototype.setColGroup = function (colGroup) {
        return this.colgroup = colGroup;
    };
    /**
     * Function to hide content table column based on visible property
     * @param  {Column[]} columns?
     */
    ContentRender.prototype.setVisible = function (columns) {
        var gObj = this.parent;
        var frzCols = gObj.getFrozenColumns();
        var rows = [];
        if (frzCols) {
            var fRows = this.freezeRows;
            var mRows = this.movableRows;
            var rowLen = fRows.length;
            var cellLen = void 0;
            for (var i = 0, row = void 0; i < rowLen; i++) {
                cellLen = mRows[i].cells.length;
                row = fRows[i].clone();
                for (var j = 0; j < cellLen; j++) {
                    row.cells.push(mRows[i].cells[j]);
                }
                rows.push(row);
            }
        }
        else {
            rows = this.getRows();
        }
        var element;
        var testRow;
        rows.some(function (r) { if (r.isDataRow) {
            testRow = r;
        } return r.isDataRow; });
        var tasks = [];
        var needFullRefresh = true;
        if (!gObj.groupSettings.columns.length && testRow) {
            needFullRefresh = false;
        }
        var tr = gObj.getDataRows();
        var args = {};
        var contentrows = this.rows.filter(function (row) { return !row.isDetailRow; });
        for (var c = 0, clen = columns.length; c < clen; c++) {
            var column = columns[c];
            var idx = this.parent.getNormalizedColumnIndex(column.uid);
            var displayVal = column.visible === true ? '' : 'none';
            if (idx !== -1 && testRow && idx < testRow.cells.length) {
                if (frzCols) {
                    if (idx < frzCols) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.getColGroup().childNodes[idx], { 'display': displayVal });
                        contentrows = this.freezeRows;
                    }
                    else {
                        var mTable = gObj.getContent().querySelector('.e-movablecontent').querySelector('colgroup');
                        idx = idx - frzCols;
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(mTable.childNodes[idx], { 'display': displayVal });
                        tr = gObj.getMovableDataRows();
                        contentrows = this.movableRows;
                    }
                }
                else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.getColGroup().childNodes[idx], { 'display': displayVal });
                }
            }
            idx = gObj.isDetail() ? idx - 1 : idx;
            if (!needFullRefresh) {
                this.setDisplayNone(tr, idx, displayVal, contentrows);
            }
            if (!this.parent.invokedFromMedia && column.hideAtMedia) {
                this.parent.updateMediaColumns(column);
            }
            this.parent.invokedFromMedia = false;
        }
        if (needFullRefresh) {
            this.refreshContentRows({ requestType: 'refresh' });
        }
        else {
            if (!this.parent.getFrozenColumns()) {
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["partialRefresh"], { rows: contentrows, args: args });
            }
            else {
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["partialRefresh"], { rows: this.freezeRows, args: { isFrozen: true, rows: this.freezeRows } });
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["partialRefresh"], { rows: this.movableRows, args: { isFrozen: false, rows: this.movableRows } });
            }
        }
    };
    /**
     * @hidden
     */
    ContentRender.prototype.setDisplayNone = function (tr, idx, displayVal, rows) {
        Object.keys(tr).forEach(function (i) {
            if (tr[i].querySelectorAll('td.e-rowcell').length) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(tr[i].querySelectorAll('td.e-rowcell')[idx], { 'display': displayVal });
                if (tr[i].querySelectorAll('td.e-rowcell')[idx].classList.contains('e-hide')) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([tr[i].querySelectorAll('td.e-rowcell')[idx]], ['e-hide']);
                }
                rows[i].cells[idx].visible = displayVal === '' ? true : false;
            }
        });
    };
    ContentRender.prototype.colGroupRefresh = function () {
        if (this.getColGroup()) {
            var colGroup = this.parent.element.querySelector('.e-gridheader').querySelector('colgroup').cloneNode(true);
            this.getTable().replaceChild(colGroup, this.getColGroup());
            this.setColGroup(colGroup);
        }
    };
    ContentRender.prototype.initializeContentDrop = function () {
        var gObj = this.parent;
        var drop = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Droppable"](gObj.getContent(), {
            accept: '.e-dragclone',
            drop: this.drop
        });
    };
    ContentRender.prototype.canSkip = function (column, row, index) {
        /**
         * Skip the toggle visiblity operation when one of the following success
         * 1. Grid has empty records
         * 2. column visible property is unchanged
         * 3. cell`s isVisible property is same as column`s visible property.
         */
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(row) || //(1)
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.visible) || //(2)    
            row.cells[index].visible === column.visible; //(3)
    };
    ContentRender.prototype.getModelGenerator = function () {
        return this.generator = this.parent.allowGrouping ? new _services_group_model_generator__WEBPACK_IMPORTED_MODULE_6__["GroupModelGenerator"](this.parent) : new _services_row_model_generator__WEBPACK_IMPORTED_MODULE_5__["RowModelGenerator"](this.parent);
    };
    ContentRender.prototype.renderEmpty = function (tbody) {
        this.getTable().appendChild(tbody);
        if (this.parent.frozenRows) {
            this.parent.getHeaderContent().querySelector('tbody').innerHTML = '';
        }
    };
    ContentRender.prototype.setSelection = function (uid, set, clearAll) {
        if (this.parent.getFrozenColumns()) {
            this.getMovableRows().filter(function (row) { return clearAll || uid === row.uid; }).forEach(function (row) { return row.isSelected = set; });
        }
        this.getRows().filter(function (row) { return clearAll || uid === row.uid; })
            .forEach(function (row) {
            row.isSelected = set;
            row.cells.forEach(function (cell) { return cell.isSelected = set; });
        });
    };
    ContentRender.prototype.getRowByIndex = function (index) {
        return this.parent.getDataRows()[index];
    };
    ContentRender.prototype.getVirtualRowIndex = function (index) {
        return index;
    };
    ContentRender.prototype.getMovableRowByIndex = function (index) {
        return this.parent.getMovableDataRows()[index];
    };
    ContentRender.prototype.enableAfterRender = function (e) {
        if (e.module === 'group' && e.enable) {
            this.generator = this.getModelGenerator();
        }
    };
    ContentRender.prototype.setRowObjects = function (rows) {
        this.rows = rows;
    };
    return ContentRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/date-filter-ui.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/date-filter-ui.js ***!
  \********************************************************************************/
/*! exports provided: DateFilterUI */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateFilterUI", function() { return DateFilterUI; });
/* harmony import */ var _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-calendars */ "./node_modules/@syncfusion/ej2-calendars/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");



/**
 * `datefilterui` render date column.
 * @hidden
 */
var DateFilterUI = /** @class */ (function () {
    function DateFilterUI(parent, serviceLocator, filterSettings) {
        this.parent = parent;
        this.locator = serviceLocator;
        this.fltrSettings = filterSettings;
    }
    DateFilterUI.prototype.create = function (args) {
        var format = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getCustomDateFormat"])(args.column.format, args.column.type);
        this.dialogObj = args.dialogObj;
        this.inputElem = this.parent.createElement('input', { className: 'e-flmenu-input', id: 'dateui-' + args.column.uid });
        args.target.appendChild(this.inputElem);
        if (args.column.type === 'date') {
            this.datePickerObj = new _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_0__["DatePicker"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])({
                format: format,
                cssClass: 'e-popup-flmenu',
                placeholder: args.localizeText.getConstant('ChooseDate'),
                width: '100%',
                locale: this.parent.locale,
                enableRtl: this.parent.enableRtl,
                open: this.openPopup.bind(this),
            }, args.column.filter.params));
        }
        else if (args.column.type === 'datetime') {
            this.datePickerObj = new _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_0__["DateTimePicker"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])({
                format: format,
                cssClass: 'e-popup-flmenu',
                placeholder: args.localizeText.getConstant('ChooseDate'),
                width: '100%',
                locale: this.parent.locale,
                enableRtl: this.parent.enableRtl,
                open: this.openPopup.bind(this),
            }, args.column.filter.params));
        }
        this.datePickerObj.appendTo(this.inputElem);
    };
    DateFilterUI.prototype.write = function (args) {
        var columns = this.fltrSettings.columns;
        var dateuiObj = document.querySelector('#dateui-' + args.column.uid).ej2_instances[0];
        dateuiObj.value = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(args.filteredValue) ? new Date(args.filteredValue) : null;
    };
    DateFilterUI.prototype.read = function (element, column, filterOptr, filterObj) {
        var dateuiObj = document.querySelector('#dateui-' + column.uid).ej2_instances[0];
        var filterValue = dateuiObj.value;
        filterValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(filterValue) ? null : filterValue;
        filterObj.filterByColumn(column.field, filterOptr, filterValue, 'and', true);
    };
    DateFilterUI.prototype.openPopup = function (args) {
        args.popup.element.style.zIndex = (this.dialogObj.zIndex + 1).toString();
    };
    return DateFilterUI;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/datepicker-edit-cell.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/datepicker-edit-cell.js ***!
  \**************************************************************************************/
/*! exports provided: DatePickerEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DatePickerEditCell", function() { return DatePickerEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-calendars */ "./node_modules/@syncfusion/ej2-calendars/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");



/**
 * `DatePickerEditCell` is used to handle datepicker cell type editing.
 * @hidden
 */
var DatePickerEditCell = /** @class */ (function () {
    function DatePickerEditCell(parent) {
        this.parent = parent;
    }
    DatePickerEditCell.prototype.create = function (args) {
        /* tslint:disable-next-line:no-any */
        var complexFieldName = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(args.column.field);
        return this.parent.createElement('input', {
            className: 'e-field', attrs: {
                id: this.parent.element.id + complexFieldName,
                name: complexFieldName, type: 'text', 'e-mappinguid': args.column.uid
            }
        });
    };
    DatePickerEditCell.prototype.read = function (element) {
        return element.ej2_instances[0].value;
    };
    DatePickerEditCell.prototype.write = function (args) {
        if (args.column.editType === 'datepickeredit') {
            this.obj = new _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_1__["DatePicker"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(dateanddatetimerender(args, this.parent.editSettings.mode, this.parent.enableRtl), args.column.edit.params));
        }
        else if (args.column.editType === 'datetimepickeredit') {
            this.obj = new _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_1__["DateTimePicker"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(dateanddatetimerender(args, this.parent.editSettings.mode, this.parent.enableRtl), args.column.edit.params));
        }
        this.obj.appendTo(args.element);
    };
    DatePickerEditCell.prototype.destroy = function () {
        if (this.obj) {
            this.obj.destroy();
        }
    };
    return DatePickerEditCell;
}());

function dateanddatetimerender(args, mode, rtl) {
    var isInline = mode !== 'Dialog';
    var format = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getCustomDateFormat"])(args.column.format, args.column.type);
    var value = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(args.column.field, args.rowData);
    value = value ? new Date(value) : null;
    return {
        floatLabelType: isInline ? 'Never' : 'Always',
        value: value,
        format: format,
        placeholder: isInline ?
            '' : args.column.headerText, enableRtl: rtl,
        enabled: Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isEditable"])(args.column, args.requestType, args.element),
    };
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/default-edit-cell.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/default-edit-cell.js ***!
  \***********************************************************************************/
/*! exports provided: DefaultEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultEditCell", function() { return DefaultEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");



/**
 * `DefaultEditCell` is used to handle default cell type editing.
 * @hidden
 */
var DefaultEditCell = /** @class */ (function () {
    function DefaultEditCell(parent) {
        this.parent = parent;
    }
    DefaultEditCell.prototype.create = function (args) {
        var col = args.column;
        var input = this.parent.createElement('input', {
            className: 'e-field e-input e-defaultcell', attrs: {
                type: 'text', value: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.value) ? args.value : '', 'e-mappinguid': col.uid,
                id: this.parent.element.id + Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(col.field), name: Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(col.field),
                style: 'text-align:' + col.textAlign,
            }
        });
        return input;
    };
    DefaultEditCell.prototype.read = function (element) {
        return element.value;
    };
    DefaultEditCell.prototype.write = function (args) {
        var col = args.column;
        var isInline = this.parent.editSettings.mode !== 'Dialog';
        var inputargs = {
            element: args.element, floatLabelType: this.parent.editSettings.mode !== 'Dialog' ? 'Never' : 'Always',
            properties: {
                enableRtl: this.parent.enableRtl, enabled: Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isEditable"])(args.column, args.requestType, args.element),
                placeholder: isInline ? '' : args.column.headerText
            }
        };
        _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_1__["Input"].createInput(inputargs, this.parent.createElement);
    };
    return DefaultEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-expand-cell-renderer.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-expand-cell-renderer.js ***!
  \*********************************************************************************************/
/*! exports provided: DetailExpandCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DetailExpandCellRenderer", function() { return DetailExpandCellRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * ExpandCellRenderer class which responsible for building group expand cell.
 * @hidden
 */
var DetailExpandCellRenderer = /** @class */ (function (_super) {
    __extends(DetailExpandCellRenderer, _super);
    function DetailExpandCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent.createElement('TD', {
            className: 'e-detailrowcollapse',
            attrs: { 'aria-expanded': 'false', role: 'gridcell', tabindex: '-1' }
        });
        return _this;
    }
    /**
     * Function to render the detail expand cell
     */
    DetailExpandCellRenderer.prototype.render = function (cell, data, attributes) {
        var node = this.element.cloneNode();
        if (attributes && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(attributes['class'])) {
            node.className = '';
            node.className = attributes['class'];
            node.appendChild(this.parent.createElement('div', { className: 'e-icons e-dtdiagonaldown e-icon-gdownarrow' }));
        }
        else {
            node.appendChild(this.parent.createElement('div', { className: 'e-icons e-dtdiagonalright e-icon-grightarrow' }));
        }
        return node;
    };
    return DetailExpandCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_1__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-header-indent-renderer.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-header-indent-renderer.js ***!
  \***********************************************************************************************/
/*! exports provided: DetailHeaderIndentCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DetailHeaderIndentCellRenderer", function() { return DetailHeaderIndentCellRenderer; });
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * DetailHeaderIndentCellRenderer class which responsible for building detail header indent cell.
 * @hidden
 */
var DetailHeaderIndentCellRenderer = /** @class */ (function (_super) {
    __extends(DetailHeaderIndentCellRenderer, _super);
    function DetailHeaderIndentCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent.createElement('TH', { className: 'e-detailheadercell' });
        return _this;
    }
    /**
     * Function to render the detail indent cell
     * @param  {Cell} cell
     * @param  {Object} data
     */
    DetailHeaderIndentCellRenderer.prototype.render = function (cell, data) {
        var node = this.element.cloneNode();
        node.appendChild(this.parent.createElement('div', { className: 'e-emptycell' }));
        return node;
    };
    return DetailHeaderIndentCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_0__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dialog-edit-renderer.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dialog-edit-renderer.js ***!
  \**************************************************************************************/
/*! exports provided: DialogEditRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DialogEditRender", function() { return DialogEditRender; });
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");




/**
 * Edit render module is used to render grid edit row.
 * @hidden
 */
var DialogEditRender = /** @class */ (function () {
    /**
     * Constructor for render module
     */
    function DialogEditRender(parent, serviceLocator) {
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dialogDestroy"], this.destroy, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["destroy"], this.destroy, this);
    }
    DialogEditRender.prototype.setLocaleObj = function () {
        this.l10n = this.serviceLocator.getService('localization');
    };
    DialogEditRender.prototype.addNew = function (elements, args) {
        this.isEdit = false;
        this.createDialog(elements, args);
    };
    DialogEditRender.prototype.update = function (elements, args) {
        this.isEdit = true;
        this.createDialog(elements, args);
    };
    DialogEditRender.prototype.createDialog = function (elements, args) {
        var gObj = this.parent;
        this.dialog = this.parent.createElement('div', { id: gObj.element.id + '_dialogEdit_wrapper', styles: 'width: auto' });
        gObj.element.appendChild(this.dialog);
        this.setLocaleObj();
        // let position: PositionDataModel = this.parent.element.getBoundingClientRect().height < 400 ?
        //     { X: 'center', Y: 'top' } : { X: 'center', Y: 'center' };
        this.dialogObj = args.dialog = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_0__["Dialog"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])({
            header: this.isEdit ? this.l10n.getConstant('EditFormTitle') + args.primaryKeyValue[0] :
                this.l10n.getConstant('AddFormTitle'), isModal: true, visible: true, cssClass: 'e-edit-dialog',
            content: this.getEditElement(elements, args),
            showCloseIcon: true,
            allowDragging: true,
            // position: position,
            close: this.dialogClose.bind(this),
            closeOnEscape: true, width: gObj.editSettings.template ? 'auto' : '330px',
            target: args.target ? args.target : document.body, animationSettings: { effect: 'None' },
            buttons: [{
                    click: this.btnClick.bind(this),
                    buttonModel: { content: this.l10n.getConstant('SaveButton'), cssClass: 'e-primary', isPrimary: true }
                },
                { click: this.btnClick.bind(this), buttonModel: { cssClass: 'e-flat', content: this.l10n.getConstant('CancelButton') } }]
        }, gObj.editSettings.dialog.params));
        var isStringTemplate = 'isStringTemplate';
        this.dialogObj[isStringTemplate] = true;
        this.dialogObj.appendTo(this.dialog);
        this.parent.applyBiggerTheme(this.dialogObj.element.parentElement);
    };
    DialogEditRender.prototype.btnClick = function (e) {
        if (this.l10n.getConstant('CancelButton').toLowerCase() === e.target.innerText.trim().toLowerCase()) {
            this.dialogClose();
        }
        else {
            this.parent.endEdit();
        }
    };
    DialogEditRender.prototype.dialogClose = function () {
        this.parent.closeEdit();
        this.destroy();
    };
    DialogEditRender.prototype.destroy = function (args) {
        var editTemplateID = this.parent.element.id + 'editSettingsTemplate';
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["updateBlazorTemplate"])(editTemplateID, 'Template', this.parent.editSettings);
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["destroyForm"], {});
        this.parent.isEdit = false;
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["toolbarRefresh"], {});
        if (this.dialog && !this.dialogObj.isDestroyed) {
            this.dialogObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["remove"])(this.dialog);
        }
    };
    DialogEditRender.prototype.getEditElement = function (elements, args) {
        var gObj = this.parent;
        var div = this.parent.createElement('div', { className: this.isEdit ? 'e-editedrow' : 'e-insertedrow' });
        var form = args.form =
            this.parent.createElement('form', { id: gObj.element.id + 'EditForm', className: 'e-gridform' });
        if (this.parent.editSettings.template) {
            var editTemplateID = this.parent.element.id + 'editSettingsTemplate';
            var dummyData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])({}, args.rowData, { isAdd: !this.isEdit }, true);
            Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["appendChildren"])(form, this.parent.getEditTemplate()(dummyData, this.parent, 'editSettingsTemplate', editTemplateID));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["updateBlazorTemplate"])(editTemplateID, 'Template', this.parent.editSettings);
            div.appendChild(form);
            return div;
        }
        var table = this.parent.createElement('table', { className: 'e-table', attrs: { cellspacing: '6px' } });
        var tbody = this.parent.createElement('tbody');
        var cols = gObj.getColumns();
        for (var i = 0; i < cols.length; i++) {
            if (this.parent.editModule.checkColumnIsGrouped(cols[i]) || cols[i].commands || cols[i].commandsTemplate) {
                continue;
            }
            var tr = this.parent.createElement('tr');
            var dataCell = this.parent.createElement('td', {
                className: 'e-rowcell', attrs: {
                    style: 'text-align:' + (this.parent.enableRtl ? 'right' : 'left') + ';width:190px'
                }
            });
            var label = this.parent.createElement('label', { innerHTML: cols[i].field });
            elements[cols[i].uid].classList.remove('e-input');
            dataCell.appendChild(elements[cols[i].uid]);
            tr.appendChild(dataCell);
            tbody.appendChild(tr);
        }
        table.appendChild(tbody);
        form.appendChild(table);
        div.appendChild(form);
        return div;
    };
    DialogEditRender.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["dialogDestroy"], this.destroy);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["destroy"], this.destroy);
    };
    return DialogEditRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dropdown-edit-cell.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dropdown-edit-cell.js ***!
  \************************************************************************************/
/*! exports provided: DropDownEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropDownEditCell", function() { return DropDownEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-dropdowns */ "./node_modules/@syncfusion/ej2-dropdowns/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");





/**
 * `DropDownEditCell` is used to handle dropdown cell type editing.
 * @hidden
 */
var DropDownEditCell = /** @class */ (function () {
    function DropDownEditCell(parent) {
        //constructor
        this.parent = parent;
        this.flag = false;
    }
    DropDownEditCell.prototype.create = function (args) {
        //create
        var complexFieldName = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getComplexFieldID"])(args.column.field);
        return this.parent.createElement('input', {
            className: 'e-field', attrs: {
                id: this.parent.element.id + complexFieldName,
                name: complexFieldName, type: 'text', 'e-mappinguid': args.column.uid,
            }
        });
    };
    DropDownEditCell.prototype.write = function (args) {
        this.column = args.column;
        var isInline = this.parent.editSettings.mode !== 'Dialog';
        this.obj = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__["DropDownList"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
            dataSource: this.parent.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"] ?
                this.parent.dataSource : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](this.parent.dataSource),
            query: new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]().select(args.column.field), enabled: Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["isEditable"])(args.column, args.requestType, args.element),
            fields: { value: args.column.field },
            value: Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getObject"])(args.column.field, args.rowData),
            enableRtl: this.parent.enableRtl, filtering: this.ddFiltering.bind(this), actionComplete: this.ddActionComplete.bind(this),
            placeholder: isInline ? '' : args.column.headerText, popupHeight: '200px',
            floatLabelType: isInline ? 'Never' : 'Always', open: this.dropDownOpen.bind(this),
            sortOrder: 'Ascending'
        }, args.column.edit.params));
        this.obj.appendTo(args.element);
        /* tslint:disable-next-line:no-any */
        args.element.setAttribute('name', Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getComplexFieldID"])(args.column.field));
    };
    DropDownEditCell.prototype.read = function (element) {
        return element.ej2_instances[0].value;
    };
    DropDownEditCell.prototype.ddFiltering = function (e) {
        this.flag = true;
    };
    DropDownEditCell.prototype.ddActionComplete = function (e) {
        e.result = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataUtil"].distinct(e.result, this.obj.fields.value, true);
        if (!this.flag && this.column.dataSource) {
            this.column.dataSource.dataSource.json = e.result;
        }
        this.flag = false;
    };
    DropDownEditCell.prototype.dropDownOpen = function (args) {
        var dlgElement = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["parentsUntil"])(this.obj.element, 'e-dialog');
        if (this.parent.editSettings.mode === 'Dialog' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dlgElement)) {
            var dlgObj = document.querySelector('#' + dlgElement.id).ej2_instances[0];
            args.popup.element.style.zIndex = (dlgObj.zIndex + 1).toString();
        }
    };
    DropDownEditCell.prototype.destroy = function () {
        if (this.obj) {
            this.obj.destroy();
        }
    };
    return DropDownEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/edit-renderer.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/edit-renderer.js ***!
  \*******************************************************************************/
/*! exports provided: EditRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditRender", function() { return EditRender; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _inline_edit_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./inline-edit-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/inline-edit-renderer.js");
/* harmony import */ var _batch_edit_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./batch-edit-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/batch-edit-renderer.js");
/* harmony import */ var _dialog_edit_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dialog-edit-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dialog-edit-renderer.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _services_row_model_generator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../services/row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");









/**
 * Edit render module is used to render grid edit row.
 * @hidden
 */
var EditRender = /** @class */ (function () {
    /**
     * Constructor for render module
     */
    function EditRender(parent, serviceLocator) {
        //Internal variables               
        this.editType = {
            'Inline': _inline_edit_renderer__WEBPACK_IMPORTED_MODULE_1__["InlineEditRender"],
            'Normal': _inline_edit_renderer__WEBPACK_IMPORTED_MODULE_1__["InlineEditRender"], 'Batch': _batch_edit_renderer__WEBPACK_IMPORTED_MODULE_2__["BatchEditRender"], 'Dialog': _dialog_edit_renderer__WEBPACK_IMPORTED_MODULE_3__["DialogEditRender"]
        };
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        this.renderer = new this.editType[this.parent.editSettings.mode](parent, serviceLocator);
        this.focus = serviceLocator.getService('focus');
    }
    EditRender.prototype.addNew = function (args) {
        this.renderer.addNew(this.getEditElements(args), args);
        this.convertWidget(args);
    };
    EditRender.prototype.update = function (args) {
        this.renderer.update(this.getEditElements(args), args);
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_7__["beforeStartEdit"], args);
        this.convertWidget(args);
    };
    EditRender.prototype.convertWidget = function (args) {
        var gObj = this.parent;
        var isFocused;
        var cell;
        var value;
        var fForm;
        var frzCols = gObj.getFrozenColumns();
        var form = gObj.editSettings.mode === 'Dialog' ?
            document.querySelector('#' + gObj.element.id + '_dialogEdit_wrapper').querySelector('.e-gridform') :
            gObj.element.querySelector('.e-gridform');
        if (frzCols && gObj.editSettings.mode === 'Normal') {
            var rowIndex = parseInt(args.row.getAttribute('aria-rowindex'), 10);
            if (gObj.frozenRows && (args.requestType === 'add' || rowIndex < gObj.frozenRows)) {
                fForm = gObj.element.querySelector('.e-movableheader').querySelector('.e-gridform');
            }
            else {
                fForm = gObj.element.querySelector('.e-movablecontent').querySelector('.e-gridform');
            }
        }
        var cols = gObj.editSettings.mode !== 'Batch' ? gObj.getColumns() : [gObj.getColumnByField(args.columnName)];
        for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {
            var col = cols_1[_i];
            if (this.parent.editSettings.template && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.field)) {
                var cellArgs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, args);
                cellArgs.element = form.querySelector('[name=' + Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getComplexFieldID"])(col.field) + ']');
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cellArgs.element) && frzCols) {
                    cellArgs.element = fForm.querySelector('[name=' + Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getComplexFieldID"])(col.field) + ']');
                }
                if (typeof col.edit.write === 'string') {
                    Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getObject"])(col.edit.write, window)(cellArgs);
                }
                else {
                    col.edit.write(cellArgs);
                }
                continue;
            }
            if (this.parent.editModule.checkColumnIsGrouped(col) || col.commands) {
                continue;
            }
            value = (col.valueAccessor(col.field, args.rowData, col));
            if (frzCols && cols.indexOf(col) >= frzCols && gObj.editSettings.mode === 'Normal') {
                cell = fForm.querySelector('[e-mappinguid=' + col.uid + ']');
            }
            else {
                cell = form.querySelector('[e-mappinguid=' + col.uid + ']');
            }
            var temp = col.edit.write;
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cell)) {
                if (typeof temp === 'string') {
                    temp = Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getObject"])(temp, window);
                    temp({
                        rowData: args.rowData, element: cell, column: col, requestType: args.requestType, row: args.row,
                        foreignKeyData: col.isForeignColumn() && Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getObject"])(col.field, args.foreignKeyData)
                    });
                }
                else {
                    col.edit.write({
                        rowData: args.rowData, element: cell, column: col, requestType: args.requestType, row: args.row,
                        foreignKeyData: col.isForeignColumn() && Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getObject"])(col.field, args.foreignKeyData)
                    });
                }
                if (!isFocused && !cell.getAttribute('disabled')) {
                    this.focusElement(cell, args.type);
                    isFocused = true;
                }
            }
        }
    };
    EditRender.prototype.focusElement = function (elem, type) {
        var chkBox = this.parent.element.querySelector('.e-edit-checkselect');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(chkBox)) {
            chkBox.nextElementSibling.classList.add('e-focus');
        }
        if (this.parent.editSettings.mode === 'Batch') {
            this.focus.onClick({ target: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(elem, 'td') }, true);
        }
        else {
            elem.focus();
        }
        if (elem.classList.contains('e-defaultcell')) {
            elem.setSelectionRange(elem.value.length, elem.value.length);
        }
    };
    EditRender.prototype.getEditElements = function (args) {
        var gObj = this.parent;
        var elements = {};
        var cols = gObj.editSettings.mode !== 'Batch' ? gObj.getColumns() : [gObj.getColumnByField(args.columnName)];
        if (this.parent.editSettings.template) {
            return {};
        }
        for (var i = 0, len = cols.length; i < len; i++) {
            var col = cols[i];
            if (this.parent.editModule.checkColumnIsGrouped(col)) {
                continue;
            }
            if (col.commands || col.commandsTemplate) {
                var cellRendererFact = this.serviceLocator.getService('cellRendererFactory');
                var model = new _services_row_model_generator__WEBPACK_IMPORTED_MODULE_5__["RowModelGenerator"](this.parent);
                var cellRenderer = cellRendererFact.getCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].CommandColumn);
                var cells = model.generateRows(args.rowData)[0].cells;
                var cell = cells.filter(function (cell) { return cell.rowID; });
                var td = cellRenderer.render(cell[i], args.rowData, { 'index': args.row ? args.row.getAttribute('aria-rowindex') : 0 });
                var div = td.firstElementChild;
                div.setAttribute('textAlign', td.getAttribute('textAlign'));
                elements[col.uid] = div;
                continue;
            }
            var value = (col.valueAccessor(col.field, args.rowData, col));
            var tArgs = { column: col, value: value, type: args.requestType, data: args.rowData };
            var temp = col.edit.create;
            var input = void 0;
            if (col.editTemplate) {
                input = this.parent.createElement('span', { attrs: { 'e-mappinguid': col.uid } });
                var tempID = this.parent.element.id + col.uid + 'editTemplate';
                Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["appendChildren"])(input, col.getEditTemplate()(args.rowData, this.parent, 'editTemplate', tempID));
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(tempID, 'EditTemplate', col);
                }
            }
            else {
                if (typeof temp === 'string') {
                    temp = Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getObject"])(temp, window);
                    input = temp(tArgs);
                }
                else {
                    input = col.edit.create(tArgs);
                }
                if (typeof input === 'string') {
                    var div = this.parent.createElement('div');
                    div.innerHTML = input;
                    input = div.firstChild;
                }
                var isInput = input.tagName !== 'input' && input.querySelectorAll('input').length;
                var complexFieldName = Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["getComplexFieldID"])(col.field);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(isInput ? input.querySelector('input') : input, {
                    name: complexFieldName, 'e-mappinguid': col.uid,
                    id: gObj.element.id + complexFieldName
                });
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(input, ['e-input', 'e-field'], []);
                if (col.textAlign === 'Right') {
                    input.classList.add('e-ralign');
                }
                if ((col.isPrimaryKey || col.isIdentity) && args.requestType === 'beginEdit' ||
                    (col.isIdentity && args.requestType === 'add')) { // already disabled in cell plugins
                    input.setAttribute('disabled', '');
                }
            }
            elements[col.uid] = input;
        }
        return elements;
    };
    EditRender.prototype.destroy = function () {
        this.renderer.removeEventListener();
    };
    return EditRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/expand-cell-renderer.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/expand-cell-renderer.js ***!
  \**************************************************************************************/
/*! exports provided: ExpandCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandCellRenderer", function() { return ExpandCellRenderer; });
/* harmony import */ var _indent_cell_renderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./indent-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/indent-cell-renderer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * ExpandCellRenderer class which responsible for building group expand cell.
 * @hidden
 */
var ExpandCellRenderer = /** @class */ (function (_super) {
    __extends(ExpandCellRenderer, _super);
    function ExpandCellRenderer() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Function to render the expand cell
     * @param  {Cell} cell
     * @param  {Object} data
     * @param  {{ [x: string]: string }} attr
     * @param {boolean} isExpand
     */
    ExpandCellRenderer.prototype.render = function (cell, data, attr, isExpand) {
        var node = this.element.cloneNode();
        node.className = isExpand ? 'e-recordplusexpand' : 'e-recordpluscollapse';
        node.setAttribute('ej-mappingname', data.field);
        node.setAttribute('ej-mappingvalue', data.key);
        node.setAttribute('aria-expanded', isExpand ? 'true' : 'false');
        node.setAttribute('tabindex', '-1');
        node.appendChild(this.parent.createElement('div', {
            className: isExpand ? 'e-icons e-gdiagonaldown e-icon-gdownarrow' : 'e-icons e-gnextforward e-icon-grightarrow'
        }));
        return node;
    };
    return ExpandCellRenderer;
}(_indent_cell_renderer__WEBPACK_IMPORTED_MODULE_0__["IndentCellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-cell-renderer.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-cell-renderer.js ***!
  \**************************************************************************************/
/*! exports provided: FilterCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterCellRenderer", function() { return FilterCellRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





/**
 * FilterCellRenderer class which responsible for building filter cell.
 * @hidden
 */
var FilterCellRenderer = /** @class */ (function (_super) {
    __extends(FilterCellRenderer, _super);
    function FilterCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent.createElement('TH', { className: 'e-filterbarcell' });
        return _this;
    }
    /**
     * Function to return the wrapper for the TH content.
     * @returns string
     */
    FilterCellRenderer.prototype.getGui = function () {
        return this.parent.createElement('div');
    };
    /**
     * Function to render the cell content based on Column object.
     * @param  {Cell} cell
     * @param  {Object} data
     */
    FilterCellRenderer.prototype.render = function (cell, data) {
        var tr = this.parent.element.querySelector('.e-filterbar');
        var node = this.element.cloneNode();
        var innerDIV = this.getGui();
        var input;
        var column = cell.column;
        tr.appendChild(node);
        node.setAttribute('e-mappinguid', column.uid);
        if (column.filterTemplate) {
            var fltrData = {};
            if (data) {
                fltrData[column.field] = data[column.field];
            }
            var col = 'column';
            fltrData[col] = column;
            if (column.visible) {
                var tempID = this.parent.element.id + column.uid + 'filterTemplate';
                var element = column.getFilterTemplate()(fltrData, this.parent, 'filterTemplate', tempID);
                Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["appendChildren"])(node, element);
            }
            else {
                node.classList.add('e-hide');
            }
        }
        else {
            if (column.type !== 'checkbox') {
                if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.allowFiltering) || column.allowFiltering) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.filterBarTemplate)) {
                    node.classList.add('e-fltrtemp');
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(innerDIV, {
                        'class': 'e-fltrtempdiv'
                    });
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.filterBarTemplate.create)) {
                        input = this.parent.createElement('input', {
                            id: column.field + '_filterBarcell', className: 'e-filterUi_input e-filtertext e-fltrTemp',
                            attrs: { type: 'search', title: column.headerText }
                        });
                        innerDIV.appendChild(input);
                    }
                    else {
                        var args = { column: column, node: Element };
                        var temp = column.filterBarTemplate.create;
                        if (typeof temp === 'string') {
                            temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(temp, window);
                        }
                        input = temp(args);
                        if (typeof input === 'string') {
                            var div = this.parent.createElement('div');
                            div.innerHTML = input;
                            input = div.firstChild;
                        }
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(innerDIV, {
                            class: 'e-filterUi_input e-filtertext e-fltrTemp',
                            title: column.headerText,
                            id: column.field + '_filterBarcell',
                        });
                        innerDIV.appendChild(input);
                    }
                }
                else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(innerDIV, {
                        'class': 'e-filterdiv e-fltrinputdiv'
                    });
                    input = this.parent.createElement('input', {
                        id: column.field + '_filterBarcell', className: 'e-filtertext',
                        attrs: {
                            type: 'search', title: column.headerText + cell.attributes.title,
                            value: data[cell.column.field] ? data[cell.column.field] : '', role: 'search'
                        }
                    });
                    innerDIV.appendChild(input);
                    var args = {
                        element: input, floatLabelType: 'Never',
                        properties: {
                            enableRtl: this.parent.enableRtl, showClearButton: true
                        }
                    };
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__["Input"].createInput(args, this.parent.createElement);
                }
                //TODO: apply intial filtering
                if (column.allowFiltering === false || column.field === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.field)) {
                    input.setAttribute('disabled', 'true');
                    input.classList.add('e-disable');
                }
                if (!column.visible) {
                    node.classList.add('e-hide');
                }
                this.appendHtml(node, innerDIV);
                if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.allowFiltering) || column.allowFiltering) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.filterBarTemplate)) {
                    var templateWrite = column.filterBarTemplate.write;
                    var args = { element: input, column: column };
                    if (typeof templateWrite === 'string') {
                        templateWrite = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(templateWrite, window);
                    }
                    templateWrite.call(this, args);
                }
            }
        }
        return node;
    };
    /**
     * Function to specifies how the result content to be placed in the cell.
     * @param  {Element} node
     * @param  {string|Element} innerHTML
     * @returns Element
     */
    FilterCellRenderer.prototype.appendHtml = function (node, innerHtml) {
        node.appendChild(innerHtml);
        return node;
    };
    return FilterCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_1__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-menu-operator.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-menu-operator.js ***!
  \**************************************************************************************/
/*! exports provided: FlMenuOptrUI */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FlMenuOptrUI", function() { return FlMenuOptrUI; });
/* harmony import */ var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-dropdowns */ "./node_modules/@syncfusion/ej2-dropdowns/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");



/**
 * `filter operators` render boolean column.
 * @hidden
 */
var FlMenuOptrUI = /** @class */ (function () {
    function FlMenuOptrUI(parent, customFltrOperators, serviceLocator, filterSettings) {
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        this.filterSettings = filterSettings;
        this.customFilterOperators = customFltrOperators;
    }
    /**
     * @hidden
     */
    FlMenuOptrUI.prototype.renderOperatorUI = function (dlgConetntEle, target, column, dlgObj) {
        this.dialogObj = dlgObj;
        var optr = column.type + 'Operator';
        this.optrData = this.customOptr = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(this.parent.filterSettings.operators) &&
            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(this.parent.filterSettings.operators[optr])) ?
            this.parent.filterSettings.operators[optr] : this.customFilterOperators[optr];
        var dropDatasource = this.customOptr;
        var selectedValue = this.dropSelectedVal(column, optr);
        var optrDiv = this.parent.createElement('div', { className: 'e-flm_optrdiv' });
        dlgConetntEle.appendChild(optrDiv);
        var optrInput = this.parent.createElement('input', { id: column.uid + '-floptr' });
        optrDiv.appendChild(optrInput);
        this.dropOptr = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_0__["DropDownList"]({
            dataSource: dropDatasource,
            fields: { text: 'text', value: 'value' },
            open: this.dropDownOpen.bind(this),
            text: selectedValue
        });
        this.dropOptr.appendTo('#' + column.uid + '-floptr');
    };
    FlMenuOptrUI.prototype.dropDownOpen = function (args) {
        args.popup.element.style.zIndex = (this.dialogObj.zIndex + 1).toString();
    };
    FlMenuOptrUI.prototype.dropSelectedVal = function (col, optr) {
        var selValue = '';
        var columns = this.parent.filterSettings.columns;
        for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
            var column = columns_1[_i];
            if (col.field === column.field || (col.isForeignColumn() && col.foreignKeyValue === column.field)) {
                var selectedField = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["DataManager"](this.optrData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_2__["Query"]().where('value', 'equal', column.operator));
                selValue = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(selectedField[0]) ? selectedField[0].text : '';
            }
        }
        if (selValue === '') { // rewuired or not
            selValue = this.optrData[0].text;
        }
        return selValue;
    };
    /**
     * @hidden
     */
    FlMenuOptrUI.prototype.getFlOperator = function () {
        return this.dropOptr.value;
    };
    return FlMenuOptrUI;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-menu-renderer.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-menu-renderer.js ***!
  \**************************************************************************************/
/*! exports provided: FilterMenuRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterMenuRenderer", function() { return FilterMenuRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _filter_menu_operator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter-menu-operator */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-menu-operator.js");
/* harmony import */ var _string_filter_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./string-filter-ui */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/string-filter-ui.js");
/* harmony import */ var _number_filter_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number-filter-ui */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/number-filter-ui.js");
/* harmony import */ var _boolean_filter_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./boolean-filter-ui */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-filter-ui.js");
/* harmony import */ var _date_filter_ui__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./date-filter-ui */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/date-filter-ui.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");










/**
 * `filter menu` render boolean column.
 * @hidden
 */
var FilterMenuRenderer = /** @class */ (function () {
    function FilterMenuRenderer(parent, filterSettings, serviceLocator, customFltrOperators, fltrObj) {
        this.isDialogOpen = false;
        this.colTypes = {
            'string': _string_filter_ui__WEBPACK_IMPORTED_MODULE_3__["StringFilterUI"], 'number': _number_filter_ui__WEBPACK_IMPORTED_MODULE_4__["NumberFilterUI"], 'date': _date_filter_ui__WEBPACK_IMPORTED_MODULE_6__["DateFilterUI"], 'boolean': _boolean_filter_ui__WEBPACK_IMPORTED_MODULE_5__["BooleanFilterUI"], 'datetime': _date_filter_ui__WEBPACK_IMPORTED_MODULE_6__["DateFilterUI"]
        };
        this.parent = parent;
        this.filterSettings = filterSettings;
        this.serviceLocator = serviceLocator;
        this.customFilterOperators = customFltrOperators;
        this.filterObj = fltrObj;
        this.flMuiObj = new _filter_menu_operator__WEBPACK_IMPORTED_MODULE_2__["FlMenuOptrUI"](this.parent, this.customFilterOperators, this.serviceLocator);
        this.l10n = this.serviceLocator.getService('localization');
    }
    FilterMenuRenderer.prototype.openDialog = function (args) {
        this.col = this.parent.getColumnByField(args.field);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.col.filter) || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.col.filter.type) || this.col.filter.type === 'Menu')) { ///
            this.renderDlgContent(args.target, this.col);
        }
    };
    FilterMenuRenderer.prototype.closeDialog = function () {
        if (!this.dlgObj) {
            return;
        }
        var elem = document.getElementById(this.dlgObj.element.id);
        if (this.dlgObj && !this.dlgObj.isDestroyed && elem) {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["filterMenuClose"], { field: this.col.field });
            this.isDialogOpen = false;
            this.dlgObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(elem);
        }
    };
    FilterMenuRenderer.prototype.renderDlgContent = function (target, column) {
        var args = {
            requestType: _base_constant__WEBPACK_IMPORTED_MODULE_8__["filterBeforeOpen"], filterModel: this,
            columnName: column.field, columnType: column.type
        };
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_8__["actionBegin"], args);
        var mainDiv = this.parent.createElement('div', { className: 'e-flmenu-maindiv', id: column.uid + '-flmenu' });
        this.dlgDiv = this.parent.createElement('div', { className: 'e-flmenu', id: column.uid + '-flmdlg' });
        this.parent.element.appendChild(this.dlgDiv);
        this.dlgObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["Dialog"]({
            showCloseIcon: false,
            closeOnEscape: false,
            locale: this.parent.locale,
            visible: false,
            enableRtl: this.parent.enableRtl,
            created: this.dialogCreated.bind(this, target, column),
            position: this.parent.element.classList.contains('e-device') ? { X: 'center', Y: 'center' } : { X: '', Y: '' },
            target: this.parent.element.classList.contains('e-device') ? document.body : this.parent.element,
            buttons: [{
                    click: this.filterBtnClick.bind(this, column),
                    buttonModel: {
                        content: this.l10n.getConstant('FilterButton'), isPrimary: true, cssClass: 'e-flmenu-okbtn'
                    }
                },
                {
                    click: this.clearBtnClick.bind(this, column),
                    buttonModel: { content: this.l10n.getConstant('ClearButton'), cssClass: 'e-flmenu-cancelbtn' }
                }],
            content: mainDiv,
            width: (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_base_util__WEBPACK_IMPORTED_MODULE_7__["parentsUntil"])(target, 'e-bigger'))) || this.parent.element.classList.contains('e-device') ? 260 : 250,
            animationSettings: { effect: 'None' },
            cssClass: 'e-filter-popup'
        });
        var isStringTemplate = 'isStringTemplate';
        this.dlgObj[isStringTemplate] = true;
        this.dlgObj.appendTo(this.dlgDiv);
    };
    FilterMenuRenderer.prototype.dialogCreated = function (target, column) {
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_7__["getFilterMenuPostion"])(target, this.dlgObj, this.parent);
        }
        this.renderFilterUI(target, column);
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["filterDialogCreated"], {});
        this.dlgObj.element.style.maxHeight = '350px';
        this.dlgObj.show();
        if (!column.filterTemplate) {
            this.writeMethod(column, this.dlgObj.element.querySelector('#' + column.uid + '-flmenu'));
        }
        var args = {
            requestType: _base_constant__WEBPACK_IMPORTED_MODULE_8__["filterAfterOpen"],
            filterModel: this, columnName: column.field, columnType: column.type
        };
        this.isDialogOpen = true;
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_8__["actionComplete"], args);
    };
    FilterMenuRenderer.prototype.renderFilterUI = function (target, col) {
        var dlgConetntEle = this.dlgObj.element.querySelector('.e-flmenu-maindiv');
        this.parent.log('column_type_missing', { column: col });
        this.renderOperatorUI(dlgConetntEle, target, col);
        this.renderFlValueUI(dlgConetntEle, target, col);
    };
    FilterMenuRenderer.prototype.renderOperatorUI = function (dlgConetntEle, target, column) {
        this.flMuiObj.renderOperatorUI(dlgConetntEle, target, column, this.dlgObj);
    };
    FilterMenuRenderer.prototype.renderFlValueUI = function (dlgConetntEle, target, column) {
        var valueDiv = this.parent.createElement('div', { className: 'e-flmenu-valuediv' });
        var fObj = this.filterObj;
        dlgConetntEle.appendChild(valueDiv);
        var args = { target: valueDiv, column: column, getOptrInstance: this.flMuiObj, dialogObj: this.dlgObj };
        var instanceofFilterUI = new this.colTypes[column.type](this.parent, this.serviceLocator, this.parent.filterSettings);
        if (column.filterTemplate) {
            var fltrData = {};
            fltrData[column.field] = fObj.values[column.field];
            if (column.foreignKeyValue) {
                fltrData[column.foreignKeyValue] = fObj.values[column.foreignKeyValue];
            }
            var col = 'column';
            fltrData[col] = column;
            var tempID = this.parent.element.id + column.uid + 'filterTemplate';
            var compElement = column.getFilterTemplate()(fltrData, this.parent, 'filterTemplate', tempID);
            Object(_base_util__WEBPACK_IMPORTED_MODULE_7__["appendChildren"])(valueDiv, compElement);
        }
        else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.filter) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.filter.ui)
                && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.filter.ui.create)) {
                var temp = column.filter.ui.create;
                if (typeof temp === 'string') {
                    temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(temp, window);
                }
                temp({
                    column: column, target: valueDiv,
                    getOptrInstance: this.flMuiObj, dialogObj: this.dlgObj
                });
            }
            else {
                instanceofFilterUI.create({
                    column: column, target: valueDiv,
                    getOptrInstance: this.flMuiObj, localizeText: this.l10n, dialogObj: this.dlgObj
                });
            }
        }
    };
    FilterMenuRenderer.prototype.writeMethod = function (col, dlgContentEle) {
        var flValue;
        var target = dlgContentEle.querySelector('.e-flmenu-valinput');
        var instanceofFilterUI = new this.colTypes[col.type](this.parent, this.serviceLocator, this.parent.filterSettings);
        var columns = this.filterSettings.columns;
        for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
            var column = columns_1[_i];
            if (col.uid === column.uid) {
                flValue = column.value;
            }
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.filter) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.filter.ui)
            && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.filter.ui.write)) {
            var temp = col.filter.ui.write;
            if (typeof temp === 'string') {
                temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(temp, window);
            }
            temp({ column: col, target: target, parent: this.parent, filteredValue: flValue });
        }
        else {
            instanceofFilterUI.write({ column: col, target: target, parent: this.parent, filteredValue: flValue });
        }
    };
    FilterMenuRenderer.prototype.filterBtnClick = function (col) {
        var flValue;
        var flOptrValue;
        var targ = this.dlgObj.element.querySelector('.e-flmenu-valuediv input');
        flOptrValue = this.flMuiObj.getFlOperator();
        var instanceofFilterUI = new this.colTypes[col.type](this.parent, this.serviceLocator, this.parent.filterSettings);
        if (col.filterTemplate) {
            var element = this.dlgDiv.querySelector('.e-flmenu-valuediv');
            var fltrValue = void 0;
            if (element.children[0].value) {
                fltrValue = element.children[0].value;
            }
            else {
                fltrValue = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])((element.children[0].ej2_instances) ?
                    element.children[0].ej2_instances[0].value
                    : element.querySelector('.e-control').ej2_instances[0].value);
            }
            this.filterObj.filterByColumn(col.field, flOptrValue, fltrValue);
        }
        else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.filter) &&
                !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.filter.ui) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.filter.ui.read)) {
                var temp = col.filter.ui.read;
                if (typeof temp === 'string') {
                    temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(temp, window);
                }
                flValue = temp({ element: targ, column: col, operator: flOptrValue, fltrObj: this.filterObj });
            }
            else {
                instanceofFilterUI.read(targ, col, flOptrValue, this.filterObj);
            }
        }
        var iconClass = this.parent.showColumnMenu ? '.e-columnmenu' : '.e-icon-filter';
        var column = this.parent.element.querySelector('[e-mappinguid="' + col.uid + '"]').parentElement;
        var flIcon = column.querySelector(iconClass);
        if (flIcon) {
            flIcon.classList.add('e-filtered');
        }
        this.closeDialog();
    };
    FilterMenuRenderer.prototype.clearBtnClick = function (column) {
        this.filterObj.removeFilteredColsByField(column.field);
        this.closeDialog();
        var iconClass = this.parent.showColumnMenu ? '.e-columnmenu' : '.e-icon-filter';
        var col = this.parent.element.querySelector('[e-mappinguid="' + column.uid + '"]').parentElement;
        var flIcon = col.querySelector(iconClass);
        if (flIcon) {
            flIcon.classList.remove('e-filtered');
        }
    };
    FilterMenuRenderer.prototype.destroy = function () {
        this.closeDialog();
    };
    return FilterMenuRenderer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/footer-renderer.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/footer-renderer.js ***!
  \*********************************************************************************/
/*! exports provided: FooterRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FooterRenderer", function() { return FooterRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _content_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./content-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/content-renderer.js");
/* harmony import */ var _row_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./row-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js");
/* harmony import */ var _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/summary-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/summary-model-generator.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();









/**
 * Footer module is used to render grid content
 * @hidden
 */
var FooterRenderer = /** @class */ (function (_super) {
    __extends(FooterRenderer, _super);
    function FooterRenderer(gridModule, serviceLocator) {
        var _this = _super.call(this, gridModule, serviceLocator) || this;
        _this.aggregates = {};
        _this.parent = gridModule;
        _this.locator = serviceLocator;
        _this.modelGenerator = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__["SummaryModelGenerator"](_this.parent);
        _this.addEventListener();
        return _this;
    }
    /**
     * The function is used to render grid footer div
     */
    FooterRenderer.prototype.renderPanel = function () {
        var div = this.parent.createElement('div', { className: 'e-gridfooter' });
        var innerDiv = this.parent.createElement('div', { className: 'e-summarycontent' });
        var movableContent = innerDiv;
        if (this.parent.getFrozenColumns()) {
            var fDiv = this.parent.createElement('div', { className: 'e-frozenfootercontent' });
            var mDiv = this.parent.createElement('div', { className: 'e-movablefootercontent' });
            innerDiv.appendChild(fDiv);
            innerDiv.appendChild(mDiv);
            this.frozenContent = fDiv;
            this.movableContent = mDiv;
            movableContent = mDiv;
        }
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            movableContent.style.overflowX = 'scroll';
        }
        div.appendChild(innerDiv);
        this.setPanel(div);
        if (this.parent.getPager() != null) {
            this.parent.element.insertBefore(div, this.parent.getPager());
        }
        else {
            this.parent.element.appendChild(div);
        }
    };
    /**
     * The function is used to render grid footer table
     */
    FooterRenderer.prototype.renderTable = function () {
        var contentDiv = this.getPanel();
        var innerDiv = this.createContentTable('_footer_table');
        var table = innerDiv.querySelector('.e-table');
        var tFoot = this.parent.createElement('tfoot');
        table.appendChild(tFoot);
        if (this.parent.getFrozenColumns()) {
            var freezeTable = table.cloneNode(true);
            this.frozenContent.appendChild(freezeTable);
            this.freezeTable = freezeTable;
            this.movableContent.appendChild(table);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(table.querySelector('colgroup'));
            var colGroup = ((this.parent.getHeaderContent().querySelector('.e-movableheader').querySelector('colgroup')).cloneNode(true));
            table.insertBefore(colGroup, table.querySelector('tbody'));
            this.setColGroup(colGroup);
        }
        this.setTable(table);
    };
    FooterRenderer.prototype.renderSummaryContent = function (e, table, cStart, cEnd) {
        var input = this.parent.dataSource instanceof Array ? this.parent.dataSource : this.parent.currentViewData;
        var summaries = this.modelGenerator.getData();
        var dummies = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cStart) ? this.modelGenerator.getColumns() :
            this.modelGenerator.getColumns(cStart, cEnd);
        var rows = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cStart) ? this.modelGenerator.generateRows(input, e || this.aggregates) :
            this.modelGenerator.generateRows(input, e || this.aggregates, cStart, cEnd);
        var fragment = document.createDocumentFragment();
        var rowrenderer = new _row_renderer__WEBPACK_IMPORTED_MODULE_3__["RowRenderer"](this.locator, null, this.parent);
        rowrenderer.element = this.parent.createElement('TR', { className: 'e-summaryrow' });
        for (var srow = 0, len = summaries.length; srow < len; srow++) {
            var row = rows[srow];
            if (!row) {
                continue;
            }
            var tr = rowrenderer.render(row, dummies);
            fragment.appendChild(tr);
        }
        table.tFoot.appendChild(fragment);
        this.aggregates = e;
    };
    FooterRenderer.prototype.refresh = function (e) {
        if (this.parent.getFrozenColumns()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getPanel());
            this.renderPanel();
            this.renderTable();
            this.freezeTable.tFoot.innerHTML = '';
            this.renderSummaryContent(e, this.freezeTable, 0, this.parent.getFrozenColumns());
        }
        this.getTable().tFoot.innerHTML = '';
        this.renderSummaryContent(e, this.getTable(), this.parent.getFrozenColumns());
        // check freeze content have no row case
        if (this.parent.getFrozenColumns()) {
            var frozenDiv = this.frozenContent;
            if (!frozenDiv.offsetHeight) {
                frozenDiv.style.height = this.getTable().offsetHeight + 'px';
            }
        }
        this.onScroll();
    };
    FooterRenderer.prototype.refreshCol = function () {
        // frozen table 
        var mheaderCol;
        var fheaderCol = mheaderCol = this.parent.element.querySelector('.e-gridheader').querySelector('colgroup').cloneNode(true);
        if (this.parent.getFrozenColumns()) {
            mheaderCol = Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["renderMovable"])(fheaderCol, this.parent.getFrozenColumns());
            this.freezeTable.replaceChild(fheaderCol, this.freezeTable.querySelector('colGroup'));
        }
        this.getTable().replaceChild(mheaderCol, this.getColGroup());
        this.setColGroup(mheaderCol);
    };
    FooterRenderer.prototype.onWidthChange = function (args) {
        this.getColFromIndex(args.index).style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(args.width);
        if (this.parent.allowResizing && args.module === 'resize') {
            this.updateFooterTableWidth(this.getTable());
        }
    };
    FooterRenderer.prototype.onScroll = function (e) {
        if (e === void 0) { e = { left: this.parent.getContent().firstChild.scrollLeft }; }
        this.getTable().parentElement.scrollLeft = e.left;
    };
    FooterRenderer.prototype.getColFromIndex = function (index) {
        var fCol = this.parent.getFrozenColumns();
        if (fCol && fCol > index) {
            return this.freezeTable.querySelector('colGroup').children[index];
        }
        return this.getColGroup().children[index - fCol];
    };
    FooterRenderer.prototype.columnVisibilityChanged = function () {
        this.refresh();
    };
    FooterRenderer.prototype.addEventListener = function () {
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["colGroupRefresh"], this.refreshCol, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["columnWidthChanged"], this.onWidthChange, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["scroll"], this.onScroll, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["columnVisibilityChanged"], this.columnVisibilityChanged, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_1__["refreshFooterRenderer"], this.refreshFooterRenderer, this);
    };
    FooterRenderer.prototype.removeEventListener = function () {
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["colGroupRefresh"], this.refreshCol);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["columnWidthChanged"], this.onWidthChange);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["scroll"], this.onScroll);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["columnVisibilityChanged"], this.columnVisibilityChanged);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_1__["refreshFooterRenderer"], this.refreshFooterRenderer);
    };
    FooterRenderer.prototype.updateFooterTableWidth = function (tFoot) {
        var tHead = this.parent.getHeaderTable();
        if (tHead && tFoot) {
            tFoot.style.width = tHead.style.width;
        }
    };
    FooterRenderer.prototype.refreshFooterRenderer = function (editedData) {
        var aggregates = this.onAggregates(editedData);
        this.refresh(aggregates);
    };
    FooterRenderer.prototype.onAggregates = function (editedData) {
        var _this = this;
        editedData = editedData instanceof Array ? editedData : [];
        var field = this.parent.getPrimaryKeyFieldNames()[0];
        var deletedCols = [];
        var data = 'dataSource';
        var mergeds;
        var rows = this.parent.frozenColumns > 0 ? this.parent.getMovableRowsObject() : this.parent.getRowsObject();
        var initds = this.parent.dataSource instanceof Array ? this.parent.dataSource : this.parent.dataSource[data].json.length
            ? this.parent.dataSource[data].json : this.parent.getCurrentViewRecords();
        var addrow = [];
        var changeds = rows.map(function (row) {
            if (row.changes && row.edit === 'add') {
                addrow.push(row.changes);
            }
            if (row.edit === 'delete') {
                deletedCols.push(row.data);
            }
            return row.isDirty && row.changes ? row.changes : row.data;
        });
        changeds = editedData.length === 0 ? changeds : editedData;
        mergeds = initds.map(function (item) {
            var idVal = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_6__["DataUtil"].getObject(field, item);
            var value;
            var hasVal = changeds.some(function (cItem) {
                value = cItem;
                return idVal === _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_6__["DataUtil"].getObject(field, cItem);
            });
            return hasVal ? value : item;
        });
        var currentData = this.parent.groupSettings.columns.length > 0 && 'records' in this.parent.currentViewData ?
            this.parent.getCurrentViewRecords() : this.parent.currentViewData;
        var currentds;
        currentds = currentData.map(function (item) {
            var idVal = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_6__["DataUtil"].getObject(field, item);
            var value;
            var hasVal = mergeds.some(function (cItem) {
                value = cItem;
                return idVal === _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_6__["DataUtil"].getObject(field, cItem);
            });
            return hasVal ? value : item;
        });
        if (addrow.length > 0) {
            addrow.forEach(function (row) { mergeds.push(row); currentds.push(row); });
        }
        var eData = editedData;
        if (!(eData.type && eData.type === 'cancel') && deletedCols.length > 0) {
            deletedCols.forEach(function (row) {
                var index = mergeds.indexOf(row);
                var curIndx = currentData.indexOf(row);
                mergeds.splice(index, 1);
                if (currentds && currentds.length) {
                    currentds.splice(curIndx, 1);
                }
            });
        }
        var aggregate = {};
        var agrVal;
        var aggregateRows = this.parent.aggregates;
        aggregateRows.forEach(function (row) {
            row.columns.forEach(function (col) {
                var data = [];
                var type = col.type.toString();
                data = type.toLowerCase() === 'custom' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(currentds) ? currentds : mergeds;
                agrVal = Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["calculateAggregate"])(type, data, col, _this.parent);
                aggregate[col.field + ' - ' + type.toLowerCase()] = agrVal;
            });
        });
        var result = {
            result: this.parent.groupSettings.columns.length > 0 ? mergeds : currentds,
            count: mergeds.length,
            aggregates: aggregate
        };
        return result;
    };
    return FooterRenderer;
}(_content_renderer__WEBPACK_IMPORTED_MODULE_2__["ContentRender"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/freeze-renderer.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/freeze-renderer.js ***!
  \*********************************************************************************/
/*! exports provided: FreezeContentRender, FreezeRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FreezeContentRender", function() { return FreezeContentRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FreezeRender", function() { return FreezeRender; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _header_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./header-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-renderer.js");
/* harmony import */ var _content_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./content-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/content-renderer.js");
/* harmony import */ var _services_freeze_row_model_generator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/freeze-row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/freeze-row-model-generator.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * Freeze module is used to render grid content with frozen rows and columns
 * @hidden
 */
var FreezeContentRender = /** @class */ (function (_super) {
    __extends(FreezeContentRender, _super);
    function FreezeContentRender(parent, locator) {
        return _super.call(this, parent, locator) || this;
    }
    FreezeContentRender.prototype.renderPanel = function () {
        _super.prototype.renderPanel.call(this);
        var fDiv = this.parent.createElement('div', { className: 'e-frozencontent' });
        var mDiv = this.parent.createElement('div', { className: 'e-movablecontent' });
        this.getPanel().firstChild.appendChild(fDiv);
        this.getPanel().firstChild.appendChild(mDiv);
        this.setFrozenContent(fDiv);
        this.setMovableContent(mDiv);
    };
    FreezeContentRender.prototype.renderEmpty = function (tbody) {
        _super.prototype.renderEmpty.call(this, tbody);
        this.getMovableContent().querySelector('tbody').innerHTML = '<tr><td></td></tr>';
        this.getFrozenContent().querySelector('.e-emptyrow').querySelector('td').colSpan = this.parent.getFrozenColumns();
        this.getFrozenContent().style.borderRightWidth = '0px';
        if (this.parent.frozenRows) {
            this.parent.getHeaderContent().querySelector('.e-frozenheader').querySelector('tbody').innerHTML = '';
            this.parent.getHeaderContent().querySelector('.e-movableheader').querySelector('tbody').innerHTML = '';
        }
    };
    FreezeContentRender.prototype.setFrozenContent = function (ele) {
        this.frozenContent = ele;
    };
    FreezeContentRender.prototype.setMovableContent = function (ele) {
        this.movableContent = ele;
    };
    FreezeContentRender.prototype.getFrozenContent = function () {
        return this.frozenContent;
    };
    FreezeContentRender.prototype.getMovableContent = function () {
        return this.movableContent;
    };
    FreezeContentRender.prototype.getModelGenerator = function () {
        return new _services_freeze_row_model_generator__WEBPACK_IMPORTED_MODULE_3__["FreezeRowModelGenerator"](this.parent);
    };
    FreezeContentRender.prototype.renderTable = function () {
        _super.prototype.renderTable.call(this);
        this.getFrozenContent().appendChild(this.getTable());
        var mTbl = this.getTable().cloneNode(true);
        this.getMovableContent().appendChild(mTbl);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getMovableContent().querySelector('colgroup'));
        var colGroup = ((this.parent.getHeaderContent().querySelector('.e-movableheader').querySelector('colgroup')).cloneNode(true));
        mTbl.insertBefore(colGroup, mTbl.querySelector('tbody'));
    };
    return FreezeContentRender;
}(_content_renderer__WEBPACK_IMPORTED_MODULE_2__["ContentRender"]));

var FreezeRender = /** @class */ (function (_super) {
    __extends(FreezeRender, _super);
    function FreezeRender(parent, locator) {
        var _this = _super.call(this, parent, locator) || this;
        _this.addEventListener();
        return _this;
    }
    FreezeRender.prototype.addEventListener = function () {
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_4__["freezeRender"], this.refreshFreeze, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_4__["frozenHeight"], this.setFrozenHeight, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], this.enableAfterRender, this);
    };
    FreezeRender.prototype.removeEventListener = function () {
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_4__["frozenHeight"], this.setFrozenHeight);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_4__["uiUpdate"], this.enableAfterRender);
    };
    FreezeRender.prototype.renderTable = function () {
        _super.prototype.renderTable.call(this);
        this.rfshMovable();
        this.updateColgroup();
        this.initializeHeaderDrag();
        this.initializeHeaderDrop();
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["headerRefreshed"], { rows: this.rows, args: { isFrozen: false } });
    };
    FreezeRender.prototype.renderPanel = function () {
        _super.prototype.renderPanel.call(this);
        var fDiv = this.parent.createElement('div', { className: 'e-frozenheader' });
        var mDiv = this.parent.createElement('div', { className: 'e-movableheader' });
        this.getPanel().firstChild.appendChild(fDiv);
        this.getPanel().firstChild.appendChild(mDiv);
        this.setFrozenHeader(fDiv);
        this.setMovableHeader(mDiv);
    };
    FreezeRender.prototype.refreshUI = function () {
        var tbody = this.getMovableHeader().querySelector('tbody');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getMovableHeader().querySelector('table'));
        _super.prototype.refreshUI.call(this);
        this.rfshMovable();
        this.getMovableHeader().querySelector('tbody').innerHTML = tbody.innerHTML;
        this.updateColgroup();
        this.widthService.setWidthToTable();
        if (this.parent.allowTextWrap && this.parent.textWrapSettings.wrapMode === 'Header') {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["wrap"])([].slice.call(this.movableHeader.querySelectorAll('tr.e-columnheader')), true);
        }
        this.parent.updateDefaultCursor();
        Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["renderMovable"])(this.parent.getContentTable().querySelector('colgroup'), this.parent.getFrozenColumns());
        this.initializeHeaderDrag();
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_4__["headerRefreshed"], { rows: this.rows, args: { isFrozen: false } });
    };
    FreezeRender.prototype.rfshMovable = function () {
        this.getFrozenHeader().appendChild(this.getTable());
        this.getMovableHeader().appendChild(this.createTable());
        this.refreshStackedHdrHgt();
        this.addMovableFirstCls();
    };
    FreezeRender.prototype.addMovableFirstCls = function () {
        if (this.parent.getVisibleFrozenColumns()) {
            var movablefirstcell = this.parent.element.querySelector('.e-movableheader').querySelector('thead').querySelectorAll('.e-columnheader');
            var len = this.parent.element.querySelector('.e-movableheader').querySelector('thead').querySelectorAll('.e-columnheader').length;
            for (var i = 0; i < len; i++) {
                var cells = 'cells';
                var element = movablefirstcell[i][cells][0];
                if (element) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], ['e-movablefirst']);
                    if (movablefirstcell[i][cells][0].rowSpan > 1) {
                        i = i + (movablefirstcell[i][cells][0].rowSpan - 1);
                    }
                }
            }
        }
    };
    FreezeRender.prototype.refreshFreeze = function (obj) {
        if (obj.case === 'filter') {
            var filterRow = this.getTable().querySelector('.e-filterbar');
            if (this.parent.allowFiltering && filterRow && this.getMovableHeader().querySelector('thead')) {
                this.getMovableHeader().querySelector('thead')
                    .appendChild(Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["renderMovable"])(filterRow, this.parent.getFrozenColumns()));
            }
        }
        else if (obj.case === 'textwrap') {
            var fRows = void 0;
            var mRows = void 0;
            var fHdr = this.getFrozenHeader();
            var mHdr = this.getMovableHeader();
            var cont = this.parent.getContent();
            var wrapMode = this.parent.textWrapSettings.wrapMode;
            var hdrClassList = this.parent.getHeaderContent().firstChild.classList;
            if (wrapMode !== 'Header' || obj.isModeChg) {
                fRows = cont.querySelector('.e-frozencontent').querySelectorAll('tr');
                mRows = cont.querySelector('.e-movablecontent').querySelectorAll('tr');
                this.setWrapHeight(fRows, mRows, obj.isModeChg, true);
            }
            if (wrapMode === 'Content' && this.parent.allowTextWrap) {
                hdrClassList.add('e-wrap');
            }
            else {
                hdrClassList.remove('e-wrap');
            }
            if (wrapMode === 'Both' || obj.isModeChg) {
                fRows = fHdr.querySelectorAll('tr');
                mRows = mHdr.querySelectorAll('tr');
            }
            else {
                fRows = fHdr.querySelector(wrapMode === 'Content' ? 'tbody' : 'thead').querySelectorAll('tr');
                mRows = mHdr.querySelector(wrapMode === 'Content' ? 'tbody' : 'thead').querySelectorAll('tr');
            }
            if (!this.parent.getHeaderContent().querySelectorAll('.e-stackedheadercell').length) {
                this.setWrapHeight(fRows, mRows, obj.isModeChg, false, this.colDepth > 1);
            }
            this.refreshStackedHdrHgt();
        }
    };
    FreezeRender.prototype.enableAfterRender = function (e) {
        if (e.module === 'scroll') {
            this.setFrozenHeight();
        }
    };
    FreezeRender.prototype.updateResizeHandler = function () {
        [].slice.call(this.parent.getHeaderContent().querySelectorAll('.e-rhandler')).forEach(function (ele) {
            ele.style.height = ele.parentElement.offsetHeight + 'px';
        });
    };
    FreezeRender.prototype.setWrapHeight = function (fRows, mRows, isModeChg, isContReset, isStackedHdr) {
        var fRowHgt;
        var mRowHgt;
        var isWrap = this.parent.allowTextWrap;
        var wrapMode = this.parent.textWrapSettings.wrapMode;
        var tHead = this.parent.getHeaderContent().querySelector('thead');
        var tBody = this.parent.getHeaderContent().querySelector('tbody');
        var height = [];
        var width = [];
        for (var i = 0, len = fRows.length; i < len; i++) { //separate loop for performance issue 
            if (!fRows[i].classList.contains('e-columnheader')) {
                height[i] = fRows[i].offsetHeight; //https://pagebuildersandwich.com/increased-plugins-performance-200/
                width[i] = mRows[i].offsetHeight;
            }
        }
        for (var i = 0, len = fRows.length; i < len; i++) {
            if (isModeChg && ((wrapMode === 'Header' && isContReset) || ((wrapMode === 'Content' && tHead.contains(fRows[i]))
                || (wrapMode === 'Header' && tBody.contains(fRows[i])))) || isStackedHdr) {
                fRows[i].style.height = null;
                mRows[i].style.height = null;
            }
            fRowHgt = height[i];
            mRowHgt = width[i];
            if (fRows[i].childElementCount && ((isWrap && fRowHgt < mRowHgt) || (!isWrap && fRowHgt > mRowHgt) ||
                (this.parent.allowResizing && this.parent.resizeModule && !this.parent.resizeModule.isFrozenColResized))) {
                fRows[i].style.height = mRowHgt + 'px';
            }
            if (mRows[i].childElementCount && ((isWrap && fRowHgt > mRowHgt) || (!isWrap && fRowHgt < mRowHgt) ||
                (this.parent.allowResizing && this.parent.resizeModule && this.parent.resizeModule.isFrozenColResized))) {
                mRows[i].style.height = fRowHgt + 'px';
            }
        }
        if (isWrap) {
            this.setFrozenHeight();
        }
    };
    FreezeRender.prototype.setFrozenHeight = function (height) {
        if (height === void 0) { height = Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["getScrollBarWidth"])(); }
        var movableContentHeight = this.parent.element.querySelector('.e-movablecontent').getBoundingClientRect().height;
        var movableContent = this.parent.element.querySelector('.e-movablecontent');
        var frozenContent = this.parent.element.querySelector('.e-frozencontent');
        if (movableContent.scrollWidth - movableContent.clientWidth) {
            frozenContent.style.height = movableContentHeight -
                height + 'px';
            frozenContent.style.borderBottom = '';
        }
        else {
            frozenContent.style.height = movableContentHeight + 'px';
            if ((frozenContent.scrollHeight <= frozenContent.clientHeight) ||
                (movableContent.scrollHeight <= movableContent.clientHeight)) {
                this.parent.scrollModule.removePadding();
            }
            frozenContent.style.borderBottom = '0px';
        }
    };
    FreezeRender.prototype.refreshStackedHdrHgt = function () {
        var fRowSpan;
        var mRowSpan;
        var fTr = this.getFrozenHeader().querySelectorAll('.e-columnheader');
        var mTr = this.getMovableHeader().querySelectorAll('.e-columnheader');
        for (var i = 0, len = fTr.length; i < len; i++) {
            fRowSpan = this.getRowSpan(fTr[i]);
            mRowSpan = this.getRowSpan(mTr[i]);
            if (fRowSpan.min > 1) {
                this.updateStackedHdrRowHgt(i, fRowSpan.max, fTr[i], mTr);
            }
            else if (mRowSpan.min > 1) {
                this.updateStackedHdrRowHgt(i, mRowSpan.max, mTr[i], fTr);
            }
        }
        if (this.parent.allowResizing) {
            this.updateResizeHandler();
        }
    };
    FreezeRender.prototype.getRowSpan = function (row) {
        var rSpan;
        var minRowSpan;
        var maxRowSpan;
        for (var i = 0, len = row.childElementCount; i < len; i++) {
            if (i === 0) {
                minRowSpan = row.children[0].rowSpan;
            }
            rSpan = row.children[i].rowSpan;
            minRowSpan = Math.min(rSpan, minRowSpan);
            maxRowSpan = Math.max(rSpan, minRowSpan);
        }
        return { min: minRowSpan, max: maxRowSpan };
    };
    FreezeRender.prototype.updateStackedHdrRowHgt = function (idx, maxRowSpan, row, rows) {
        var height = 0;
        for (var i = 0; i < maxRowSpan; i++) {
            height += rows[idx + i].style.height ?
                parseInt(rows[idx + i].style.height, 10) : rows[idx + i].offsetHeight;
        }
        row.style.height = height + 'px';
    };
    FreezeRender.prototype.setFrozenHeader = function (ele) {
        this.frozenHeader = ele;
    };
    FreezeRender.prototype.setMovableHeader = function (ele) {
        this.movableHeader = ele;
    };
    FreezeRender.prototype.getFrozenHeader = function () {
        return this.frozenHeader;
    };
    FreezeRender.prototype.getMovableHeader = function () {
        return this.movableHeader;
    };
    FreezeRender.prototype.updateColgroup = function () {
        var mTable = this.getMovableHeader().querySelector('table');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getMovableHeader().querySelector('colgroup'));
        mTable.insertBefore(Object(_base_util__WEBPACK_IMPORTED_MODULE_5__["renderMovable"])(this.getFrozenHeader().querySelector('colgroup'), this.parent.getFrozenColumns()), mTable.querySelector('thead'));
    };
    return FreezeRender;
}(_header_renderer__WEBPACK_IMPORTED_MODULE_1__["HeaderRender"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-cell-renderer.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-cell-renderer.js ***!
  \**************************************************************************************/
/*! exports provided: HeaderCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderCellRenderer", function() { return HeaderCellRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony import */ var _services_aria_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/aria-service */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/aria-service.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







/**
 * HeaderCellRenderer class which responsible for building header cell content.
 * @hidden
 */
var HeaderCellRenderer = /** @class */ (function (_super) {
    __extends(HeaderCellRenderer, _super);
    function HeaderCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent
            .createElement('TH', { className: 'e-headercell', attrs: { role: 'columnheader', tabindex: '-1' } });
        _this.ariaService = new _services_aria_service__WEBPACK_IMPORTED_MODULE_3__["AriaService"]();
        _this.hTxtEle = _this.parent.createElement('span', { className: 'e-headertext' });
        _this.sortEle = _this.parent.createElement('div', { className: 'e-sortfilterdiv e-icons' });
        _this.gui = _this.parent.createElement('div');
        _this.chkAllBox = _this.parent.createElement('input', { className: 'e-checkselectall', attrs: { 'type': 'checkbox' } });
        return _this;
    }
    /**
     * Function to return the wrapper for the TH content.
     * @returns string
     */
    HeaderCellRenderer.prototype.getGui = function () {
        return this.gui.cloneNode();
    };
    /**
     * Function to render the cell content based on Column object.
     * @param  {Column} column
     * @param  {Object} data
     * @param  {Element}
     */
    HeaderCellRenderer.prototype.render = function (cell, data, attributes) {
        var node = this.element.cloneNode();
        var fltrMenuEle = this.parent.createElement('div', { className: 'e-filtermenudiv e-icons e-icon-filter' });
        return this.prepareHeader(cell, node, fltrMenuEle);
    };
    /**
     * Function to refresh the cell content based on Column object.
     * @param  {Cell} cell
     * @param  {Element} node
     */
    HeaderCellRenderer.prototype.refresh = function (cell, node) {
        this.clean(node);
        var fltrMenuEle = this.parent.createElement('div', { className: 'e-filtermenudiv e-icons e-icon-filter' });
        return this.prepareHeader(cell, node, fltrMenuEle);
    };
    HeaderCellRenderer.prototype.clean = function (node) {
        node.innerHTML = '';
    };
    HeaderCellRenderer.prototype.prepareHeader = function (cell, node, fltrMenuEle) {
        var column = cell.column;
        var ariaAttr = {};
        //Prepare innerHtml
        var innerDIV = this.getGui();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(innerDIV, {
            'e-mappinguid': column.uid,
            'class': 'e-headercelldiv'
        });
        if (column.type !== 'checkbox') {
            var value = column.headerText;
            var headerText = this.hTxtEle.cloneNode();
            headerText[column.getDomSetter()] = value;
            innerDIV.appendChild(headerText);
        }
        else {
            column.editType = 'booleanedit';
            var checkAllWrap = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_4__["createCheckBox"])(this.parent.createElement, false, { checked: false, label: ' ' });
            checkAllWrap.insertBefore(this.chkAllBox.cloneNode(), checkAllWrap.firstChild);
            innerDIV.appendChild(checkAllWrap);
            innerDIV.classList.add('e-headerchkcelldiv');
        }
        this.buildAttributeFromCell(node, cell);
        this.appendHtml(node, innerDIV);
        node.appendChild(this.sortEle.cloneNode());
        if ((this.parent.allowFiltering && this.parent.filterSettings.type !== 'FilterBar') &&
            (column.allowFiltering && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.field)) &&
            !(this.parent.showColumnMenu && column.showColumnMenu)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(fltrMenuEle, {
                'e-mappinguid': 'e-flmenu-' + column.uid,
            });
            node.classList.add('e-fltr-icon');
            var matchFlColumns = [];
            if (this.parent.filterSettings.columns.length && this.parent.filterSettings.columns.length !== matchFlColumns.length) {
                for (var index = 0; index < this.parent.columns.length; index++) {
                    for (var count = 0; count < this.parent.filterSettings.columns.length; count++) {
                        if (this.parent.filterSettings.columns[count].field === column.field) {
                            fltrMenuEle.classList.add('e-filtered');
                            matchFlColumns.push(column.field);
                            break;
                        }
                    }
                }
            }
            node.appendChild(fltrMenuEle.cloneNode());
        }
        if (cell.className) {
            node.classList.add(cell.className);
        }
        if (column.customAttributes) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["setStyleAndAttributes"])(node, column.customAttributes);
        }
        if (column.allowSorting) {
            ariaAttr.sort = 'none';
        }
        if (column.allowGrouping) {
            ariaAttr.grabbed = false;
        }
        node = this.extendPrepareHeader(column, node);
        var result;
        var gridObj = this.parent;
        var colIndex = gridObj.getColumnIndexByField(column.field);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.headerTemplate)) {
            //need to pass the template id for blazor headertemplate
            var headerTempID = gridObj.element.id + column.uid + 'headerTemplate';
            var str = 'isStringTemplate';
            result = column.getHeaderTemplate()(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({ 'index': colIndex }, column), gridObj, 'headerTemplate', headerTempID, this.parent[str]);
            node.firstElementChild.innerHTML = '';
            Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["appendChildren"])(node.firstElementChild, result);
        }
        this.ariaService.setOptions(node, ariaAttr);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.headerTextAlign) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.textAlign)) {
            var alignment = column.headerTextAlign || column.textAlign;
            innerDIV.style.textAlign = alignment;
            if (alignment === 'Right' || alignment === 'Left') {
                node.classList.add(alignment === 'Right' ? 'e-rightalign' : 'e-leftalign');
            }
            else if (alignment === 'Center') {
                node.classList.add('e-centeralign');
            }
        }
        if (column.clipMode === 'Clip') {
            node.classList.add('e-gridclip');
        }
        else if (column.clipMode === 'EllipsisWithTooltip') {
            node.classList.add('e-ellipsistooltip');
        }
        node.setAttribute('aria-rowspan', (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cell.rowSpan) ? cell.rowSpan : 1).toString());
        node.setAttribute('aria-colspan', '1');
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_5__["headerCellInfo"], { cell: cell, node: node });
        return node;
    };
    HeaderCellRenderer.prototype.extendPrepareHeader = function (column, node) {
        if (this.parent.showColumnMenu && column.showColumnMenu && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.field)) {
            var element = (this.parent.createElement('div', { className: 'e-icons e-columnmenu' }));
            var matchFilteredColumns = [];
            if (this.parent.filterSettings.columns.length && this.parent.filterSettings.columns.length !== matchFilteredColumns.length) {
                for (var i = 0; i < this.parent.columns.length; i++) {
                    for (var j = 0; j < this.parent.filterSettings.columns.length; j++) {
                        if (this.parent.filterSettings.columns[j].field === column.field) {
                            element.classList.add('e-filtered');
                            matchFilteredColumns.push(column.field);
                            break;
                        }
                    }
                }
            }
            node.classList.add('e-fltr-icon');
            node.appendChild(element);
        }
        if (this.parent.allowResizing) {
            var handler = this.parent.createElement('div');
            handler.className = column.allowResizing ? 'e-rhandler e-rcursor' : 'e-rsuppress';
            node.appendChild(handler);
        }
        return node;
    };
    /**
     * Function to specifies how the result content to be placed in the cell.
     * @param  {Element} node
     * @param  {string|Element} innerHtml
     * @returns Element
     */
    HeaderCellRenderer.prototype.appendHtml = function (node, innerHtml) {
        node.appendChild(innerHtml);
        return node;
    };
    return HeaderCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_2__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-indent-renderer.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-indent-renderer.js ***!
  \****************************************************************************************/
/*! exports provided: HeaderIndentCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderIndentCellRenderer", function() { return HeaderIndentCellRenderer; });
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * HeaderIndentCellRenderer class which responsible for building header indent cell.
 * @hidden
 */
var HeaderIndentCellRenderer = /** @class */ (function (_super) {
    __extends(HeaderIndentCellRenderer, _super);
    function HeaderIndentCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent.createElement('TH', { className: 'e-grouptopleftcell' });
        return _this;
    }
    /**
     * Function to render the indent cell
     * @param  {Cell} cell
     * @param  {Object} data
     */
    HeaderIndentCellRenderer.prototype.render = function (cell, data) {
        var node = this.element.cloneNode();
        node.appendChild(this.parent.createElement('div', { className: 'e-headercelldiv e-emptycell', innerHTML: '' }));
        return node;
    };
    return HeaderIndentCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_0__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-renderer.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-renderer.js ***!
  \*********************************************************************************/
/*! exports provided: HeaderRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRender", function() { return HeaderRender; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _row_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./row-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js");
/* harmony import */ var _models_cell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../models/cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js");
/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");










/**
 * Content module is used to render grid content
 * @hidden
 */
var HeaderRender = /** @class */ (function () {
    /**
     * Constructor for header renderer module
     */
    function HeaderRender(parent, serviceLocator) {
        var _this = this;
        this.frzIdx = 0;
        this.notfrzIdx = 0;
        this.helper = function (e) {
            var gObj = _this.parent;
            var target = e.sender.target;
            var parentEle = Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["parentsUntil"])(target, 'e-headercell');
            if (!(gObj.allowReordering || gObj.allowGrouping) || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parentEle)
                && parentEle.querySelectorAll('.e-checkselectall').length > 0)) {
                return false;
            }
            var visualElement = _this.parent.createElement('div', { className: 'e-cloneproperties e-dragclone e-headerclone' });
            var element = target.classList.contains('e-headercell') ? target : parentEle;
            if (!element || (!gObj.allowReordering && element.classList.contains('e-stackedheadercell'))) {
                return false;
            }
            var height = element.offsetHeight;
            var headercelldiv = element.querySelector('.e-headercelldiv') || element.querySelector('.e-stackedheadercelldiv');
            var col;
            if (headercelldiv) {
                if (element.querySelector('.e-stackedheadercelldiv')) {
                    col = gObj.getStackedHeaderColumnByHeaderText(headercelldiv.innerText.trim(), gObj.columns);
                }
                else {
                    col = gObj.getColumnByUid(headercelldiv.getAttribute('e-mappinguid'));
                }
                _this.column = col;
                if (_this.column.lockColumn) {
                    return false;
                }
                visualElement.setAttribute('e-mappinguid', _this.column.uid);
            }
            if (col && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.headerTemplate)) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.headerTemplate)) {
                    var result = void 0;
                    var colIndex = gObj.getColumnIndexByField(col.field);
                    result = col.getHeaderTemplate()(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({ 'index': colIndex }, col), gObj, 'headerTemplate');
                    Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["appendChildren"])(visualElement, result);
                }
                else {
                    visualElement.innerHTML = col.headerTemplate;
                }
            }
            else {
                visualElement.innerHTML = headercelldiv ?
                    col.headerText : element.firstElementChild.innerHTML;
            }
            visualElement.style.width = element.offsetWidth + 'px';
            visualElement.style.height = element.offsetHeight + 'px';
            visualElement.style.lineHeight = (height - 6).toString() + 'px';
            gObj.element.appendChild(visualElement);
            return visualElement;
        };
        this.dragStart = function (e) {
            var gObj = _this.parent;
            gObj.element.querySelector('.e-gridpopup').style.display = 'none';
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_5__["columnDragStart"], { target: e.target, column: _this.column, event: e.event });
        };
        this.drag = function (e) {
            var gObj = _this.parent;
            var target = e.target;
            if (target) {
                var closest = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-grid');
                var cloneElement = _this.parent.element.querySelector('.e-cloneproperties');
                if (!closest || closest.getAttribute('id') !== gObj.element.getAttribute('id')) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);
                    if (gObj.allowReordering) {
                        gObj.element.querySelector('.e-reorderuparrow').style.display = 'none';
                        gObj.element.querySelector('.e-reorderdownarrow').style.display = 'none';
                    }
                    return;
                }
                gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_5__["columnDrag"], { target: e.target, column: _this.column, event: e.event });
            }
        };
        this.dragStop = function (e) {
            var gObj = _this.parent;
            var cancel;
            gObj.element.querySelector('.e-gridpopup').style.display = 'none';
            if ((!Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["parentsUntil"])(e.target, 'e-headercell') && !Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["parentsUntil"])(e.target, 'e-groupdroparea')) ||
                (!gObj.allowReordering && Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["parentsUntil"])(e.target, 'e-headercell')) ||
                (!e.helper.getAttribute('e-mappinguid') && Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["parentsUntil"])(e.target, 'e-groupdroparea'))) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(e.helper);
                cancel = true;
            }
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_5__["columnDragStop"], { target: e.target, event: e.event, column: _this.column, cancel: cancel });
        };
        this.drop = function (e) {
            var gObj = _this.parent;
            var uid = e.droppedElement.getAttribute('e-mappinguid');
            var closest = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-grid');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(e.droppedElement);
            if (closest && closest.getAttribute('id') !== gObj.element.getAttribute('id') ||
                !(gObj.allowReordering || gObj.allowGrouping)) {
                return;
            }
            gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_5__["headerDrop"], { target: e.target, uid: uid });
        };
        this.parent = parent;
        this.serviceLocator = serviceLocator;
        this.ariaService = this.serviceLocator.getService('ariaService');
        this.widthService = this.serviceLocator.getService('widthService');
        if (this.parent.isDestroyed) {
            return;
        }
        if (!this.parent.enableColumnVirtualization) {
            this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_5__["columnVisibilityChanged"], this.setVisible, this);
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_5__["columnPositionChanged"], this.colPosRefresh, this);
    }
    /**
     * The function is used to render grid header div
     */
    HeaderRender.prototype.renderPanel = function () {
        var div = this.parent.createElement('div', { className: 'e-gridheader' });
        var innerDiv = this.parent.createElement('div', { className: 'e-headercontent' });
        this.toggleStackClass(div);
        div.appendChild(innerDiv);
        this.setPanel(div);
        this.parent.element.appendChild(div);
    };
    /**
     * The function is used to render grid header table
     */
    HeaderRender.prototype.renderTable = function () {
        var headerDiv = this.getPanel();
        headerDiv.appendChild(this.createHeaderTable());
        this.setTable(headerDiv.querySelector('.e-table'));
        if (!this.parent.getFrozenColumns()) {
            this.initializeHeaderDrag();
            this.initializeHeaderDrop();
        }
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_5__["headerRefreshed"], { rows: this.rows, args: { isFrozen: this.parent.getFrozenColumns() !== 0 } });
    };
    /**
     * Get the header content div element of grid
     * @return {Element}
     */
    HeaderRender.prototype.getPanel = function () {
        return this.headerPanel;
    };
    /**
     * Set the header content div element of grid
     * @param  {Element} panel
     */
    HeaderRender.prototype.setPanel = function (panel) {
        this.headerPanel = panel;
    };
    /**
     * Get the header table element of grid
     * @return {Element}
     */
    HeaderRender.prototype.getTable = function () {
        return this.headerTable;
    };
    /**
     * Set the header table element of grid
     * @param  {Element} table
     */
    HeaderRender.prototype.setTable = function (table) {
        this.headerTable = table;
    };
    /**
     * Get the header colgroup element
     * @returns {Element}
     */
    HeaderRender.prototype.getColGroup = function () {
        return this.colgroup;
    };
    /**
     * Set the header colgroup element
     * @param {Element} colgroup
     * @returns {Element}
     */
    HeaderRender.prototype.setColGroup = function (colGroup) {
        return this.colgroup = colGroup;
    };
    /**
     * Get the header row element collection.
     * @return {Element[]}
     */
    HeaderRender.prototype.getRows = function () {
        var table = this.getTable();
        return table.tHead.rows;
    };
    /**
     * The function is used to create header table elements
     * @return {Element}
     * @hidden
     */
    HeaderRender.prototype.createHeaderTable = function () {
        var table = this.createTable();
        var innerDiv = this.getPanel().firstChild;
        innerDiv.appendChild(table);
        return innerDiv;
    };
    /**
     * @hidden
     */
    HeaderRender.prototype.createTable = function () {
        var gObj = this.parent;
        if (this.getTable() && (!gObj.getFrozenColumns())) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getTable());
        }
        var columns = gObj.getColumns();
        var table = this.parent.createElement('table', { className: 'e-table', attrs: { cellspacing: '0.25px', role: 'grid' } });
        var innerDiv = this.getPanel().firstChild;
        var findHeaderRow = this.createHeaderContent();
        var thead = findHeaderRow.thead;
        var tbody = this.parent.createElement('tbody', { className: this.parent.frozenRows ? '' : 'e-hide' });
        this.caption = this.parent.createElement('caption', { innerHTML: this.parent.element.id + '_header_table', className: 'e-hide' });
        var colGroup = this.parent.createElement('colgroup');
        var rowBody = this.parent.createElement('tr');
        var bodyCell;
        var rows = this.rows = findHeaderRow.rows;
        var rowRenderer = new _row_renderer__WEBPACK_IMPORTED_MODULE_2__["RowRenderer"](this.serviceLocator, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Header, this.parent);
        for (var i = 0, len = rows.length; i < len; i++) {
            for (var j = 0, len_1 = rows[i].cells.length; j < len_1; j++) {
                var cell = rows[i].cells[j];
                bodyCell = this.parent.createElement('td');
                rowBody.appendChild(bodyCell);
            }
        }
        if (gObj.allowFiltering || gObj.allowSorting || gObj.allowGrouping) {
            table.classList.add('e-sortfilter');
        }
        this.updateColGroup(colGroup);
        tbody.appendChild(rowBody);
        table.appendChild(this.setColGroup(colGroup));
        table.appendChild(thead);
        table.appendChild(tbody);
        table.appendChild(this.caption);
        this.ariaService.setOptions(table, { colcount: gObj.getColumns().length.toString() });
        return table;
    };
    HeaderRender.prototype.createHeaderContent = function () {
        var gObj = this.parent;
        var columns = gObj.getColumns();
        var thead = this.parent.createElement('thead');
        var colHeader = this.parent.createElement('tr', { className: 'e-columnheader' });
        var rowRenderer = new _row_renderer__WEBPACK_IMPORTED_MODULE_2__["RowRenderer"](this.serviceLocator, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Header, gObj);
        rowRenderer.element = colHeader;
        var rows = [];
        var headerRow;
        this.colDepth = Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["measureColumnDepth"])(gObj.columns);
        for (var i = 0, len = this.colDepth; i < len; i++) {
            rows[i] = this.generateRow(i);
            rows[i].cells = [];
        }
        rows = this.ensureColumns(rows);
        rows = this.getHeaderCells(rows);
        for (var i = 0, len = this.colDepth; i < len; i++) {
            headerRow = rowRenderer.render(rows[i], columns);
            if (this.parent.rowHeight && headerRow.querySelector('.e-headercell')) {
                headerRow.style.height = this.parent.rowHeight + 'px';
            }
            thead.appendChild(headerRow);
        }
        var findHeaderRow = {
            thead: thead,
            rows: rows
        };
        return findHeaderRow;
    };
    HeaderRender.prototype.updateColGroup = function (colGroup) {
        var cols = this.parent.getColumns();
        var col;
        var indexes = this.parent.getColumnIndexesInView();
        colGroup.id = this.parent.element.id + 'colGroup';
        if (this.parent.allowGrouping) {
            for (var i = 0, len = this.parent.groupSettings.columns.length; i < len; i++) {
                if (this.parent.enableColumnVirtualization && indexes.indexOf(i) === -1) {
                    continue;
                }
                col = this.parent.createElement('col', { className: 'e-group-intent' });
                colGroup.appendChild(col);
            }
        }
        if (this.parent.detailTemplate || this.parent.childGrid) {
            col = this.parent.createElement('col', { className: 'e-detail-intent' });
            colGroup.appendChild(col);
        }
        if (this.parent.isRowDragable()) {
            col = this.parent.createElement('col', { className: 'e-drag-intent' });
            colGroup.appendChild(col);
        }
        for (var i = 0, len = cols.length; i < len; i++) {
            col = this.parent.createElement('col');
            if (cols[i].visible === false) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(col, { 'display': 'none' });
            }
            colGroup.appendChild(col);
        }
        return colGroup;
    };
    HeaderRender.prototype.ensureColumns = function (rows) {
        //TODO: generate dummy column for group, detail, stacked row here; ensureColumns here
        var gObj = this.parent;
        var indexes = this.parent.getColumnIndexesInView();
        for (var i = 0, len = rows.length; i < len; i++) {
            if (gObj.allowGrouping) {
                for (var c = 0, len_2 = gObj.groupSettings.columns.length; c < len_2; c++) {
                    if (this.parent.enableColumnVirtualization && indexes.indexOf(c) === -1) {
                        continue;
                    }
                    rows[i].cells.push(this.generateCell({}, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].HeaderIndent));
                }
            }
            if (gObj.detailTemplate || gObj.childGrid) {
                rows[i].cells.push(this.generateCell({}, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].DetailHeader));
            }
            if (gObj.isRowDragable()) {
                rows[i].cells.push(this.generateCell({}, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].RowDragHIcon));
            }
        }
        return rows;
    };
    HeaderRender.prototype.getHeaderCells = function (rows) {
        var column;
        var thead = this.parent.getHeaderTable() && this.parent.getHeaderTable().querySelector('thead');
        var cols = this.parent.enableColumnVirtualization ?
            this.parent.getColumns(this.parent.enablePersistence) : this.parent.columns;
        this.frzIdx = 0;
        this.notfrzIdx = 0;
        if (this.parent.lockcolPositionCount) {
            for (var i = 0; i < cols.length; i++) {
                this.lockColsRendered = false;
                rows = this.appendCells(cols[i], rows, 0, i === 0, false, i === (cols.length - 1), thead);
            }
        }
        for (var i = 0, len = cols.length; i < len; i++) {
            this.notfrzIdx = 0;
            this.lockColsRendered = true;
            rows = this.appendCells(cols[i], rows, 0, i === 0, false, i === (len - 1), thead);
        }
        return rows;
    };
    HeaderRender.prototype.appendCells = function (cols, rows, index, isFirstObj, isFirstCol, isLastCol, isMovable) {
        var lastCol = isLastCol ? 'e-lastcell' : '';
        var frzCols = this.parent.getFrozenColumns();
        if (!cols.columns) {
            if (!frzCols && (!this.parent.lockcolPositionCount
                || (cols.lockColumn && !this.lockColsRendered) || (!cols.lockColumn && this.lockColsRendered))
                || (frzCols && ((!isMovable && (this.frzIdx + this.notfrzIdx < this.parent.frozenColumns || cols.isFrozen) &&
                    (!this.parent.lockcolPositionCount || (cols.lockColumn && !this.lockColsRendered) ||
                        (!cols.lockColumn && this.lockColsRendered)))
                    || (isMovable && (this.frzIdx + this.notfrzIdx >= this.parent.frozenColumns && !cols.isFrozen) &&
                        (!this.parent.lockcolPositionCount || (cols.lockColumn && !this.lockColsRendered) ||
                            (!cols.lockColumn && this.lockColsRendered)))))) {
                rows[index].cells.push(this.generateCell(cols, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Header, this.colDepth - index, (isFirstObj ? '' : (isFirstCol ? 'e-firstcell' : '')) + lastCol, index, this.parent.getColumnIndexByUid(cols.uid)));
            }
            if (this.parent.lockcolPositionCount) {
                if ((this.frzIdx + this.notfrzIdx < this.parent.frozenColumns) &&
                    ((cols.lockColumn && !this.lockColsRendered) || (!cols.lockColumn && this.lockColsRendered))) {
                    this.frzIdx++;
                }
                else {
                    this.notfrzIdx++;
                }
            }
            else {
                this.frzIdx++;
            }
        }
        else {
            var colSpan = this.getCellCnt(cols, 0);
            if (colSpan) {
                var frzObj = this.refreshFrozenHdr(cols.columns, { isPartial: false, isComp: true, cnt: 0 });
                var stackedLockColsCount = this.getStackedLockColsCount(cols, 0);
                if (!frzCols && (!this.parent.lockcolPositionCount
                    || (!this.lockColsRendered && stackedLockColsCount) || (this.lockColsRendered && (colSpan - stackedLockColsCount)))
                    || (frzCols && ((!isMovable && (this.parent.frozenColumns - this.frzIdx > 0 || (frzObj.isPartial)))
                        || (isMovable && (colSpan + this.frzIdx > this.parent.frozenColumns && !frzObj.isComp))))) {
                    rows[index].cells.push(new _models_cell__WEBPACK_IMPORTED_MODULE_3__["Cell"]({
                        cellType: _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].StackedHeader, column: cols,
                        colSpan: this.getColSpan(colSpan, isMovable, frzObj.cnt, stackedLockColsCount)
                    }));
                }
            }
            if (this.parent.lockcolPositionCount && !this.lockColsRendered) {
                for (var i = 0; i < cols.columns.length; i++) {
                    rows = this.appendCells(cols.columns[i], rows, index + 1, isFirstObj, i === 0, i === (cols.columns.length - 1) && isLastCol, isMovable);
                }
            }
            if (this.lockColsRendered) {
                for (var i = 0, len = cols.columns.length; i < len; i++) {
                    rows = this.appendCells(cols.columns[i], rows, index + 1, isFirstObj, i === 0, i === (len - 1) && isLastCol, isMovable);
                }
            }
        }
        return rows;
    };
    HeaderRender.prototype.getStackedLockColsCount = function (col, lockColsCount) {
        if (col.columns) {
            for (var i = 0; i < col.columns.length; i++) {
                lockColsCount = this.getStackedLockColsCount(col.columns[i], lockColsCount);
            }
        }
        else if (col.lockColumn) {
            lockColsCount++;
        }
        return lockColsCount;
    };
    HeaderRender.prototype.refreshFrozenHdr = function (cols, frzObj) {
        for (var i = 0; i < cols.length; i++) {
            if (cols[i].columns) {
                frzObj = this.refreshFrozenHdr(cols[i].columns, frzObj);
            }
            else {
                if (cols[i].isFrozen) {
                    frzObj.isPartial = true;
                    frzObj.cnt++;
                }
                frzObj.isComp = frzObj.isComp && (cols[i].isFrozen ||
                    this.parent.getColumnIndexByField(cols[i].field) < this.parent.frozenColumns);
            }
        }
        return frzObj;
    };
    HeaderRender.prototype.getColSpan = function (colSpan, isMovable, frozenCnt, stackedLockColsCount) {
        var frzCol = this.parent.frozenColumns;
        if (this.parent.getFrozenColumns() && this.frzIdx + colSpan > frzCol) {
            if (isMovable) {
                colSpan = colSpan - (frzCol > this.frzIdx ? frzCol - this.frzIdx : 0) - frozenCnt;
            }
            else {
                colSpan = colSpan - (colSpan - (frzCol > this.frzIdx ? frzCol + frozenCnt - this.frzIdx : frozenCnt));
            }
        }
        else if (this.parent.lockcolPositionCount) {
            colSpan = !this.lockColsRendered ? stackedLockColsCount : colSpan - stackedLockColsCount;
        }
        return colSpan;
    };
    HeaderRender.prototype.generateRow = function (index) {
        return new _models_row__WEBPACK_IMPORTED_MODULE_4__["Row"]({});
    };
    HeaderRender.prototype.generateCell = function (column, cellType, rowSpan, className, rowIndex, colIndex) {
        var opt = {
            'visible': column.visible,
            'isDataCell': false,
            'isTemplate': !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.headerTemplate),
            'rowID': '',
            'column': column,
            'cellType': cellType,
            'rowSpan': rowSpan,
            'className': className,
            'index': rowIndex,
            'colIndex': colIndex
        };
        if (!opt.rowSpan || opt.rowSpan < 2) {
            delete opt.rowSpan;
        }
        return new _models_cell__WEBPACK_IMPORTED_MODULE_3__["Cell"](opt);
    };
    /**
     * Function to hide header table column based on visible property
     * @param  {Column[]} columns?
     */
    HeaderRender.prototype.setVisible = function (columns) {
        var gObj = this.parent;
        var rows = [].slice.call(this.getRows()); //NodeList -> Array        
        var displayVal;
        var idx;
        var className;
        var element;
        var frzCols = gObj.getFrozenColumns();
        for (var c = 0, clen = columns.length; c < clen; c++) {
            var column = columns[c];
            idx = gObj.getNormalizedColumnIndex(column.uid);
            displayVal = column.visible ? '' : 'none';
            if (frzCols) {
                if (idx < frzCols) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.getColGroup().children[idx], { 'display': displayVal });
                }
                else {
                    var mTblColGrp = gObj.getHeaderContent().querySelector('.e-movableheader').querySelector('colgroup');
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(mTblColGrp.children[idx - frzCols], { 'display': displayVal });
                }
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.getColGroup().children[idx], { 'display': displayVal });
            }
            this.refreshUI();
        }
    };
    HeaderRender.prototype.colPosRefresh = function () {
        this.refreshUI();
    };
    /**
     * Refresh the header of the Grid.
     * @returns {void}
     */
    HeaderRender.prototype.refreshUI = function () {
        var headerDiv = this.getPanel();
        this.toggleStackClass(headerDiv);
        var table = this.getTable();
        var frzCols = this.parent.getFrozenColumns();
        if (this.getTable()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getTable());
            table.removeChild(table.firstChild);
            table.removeChild(table.childNodes[0]);
            var colGroup = this.parent.createElement('colgroup');
            var findHeaderRow = this.createHeaderContent();
            this.rows = findHeaderRow.rows;
            table.insertBefore(findHeaderRow.thead, table.firstChild);
            this.updateColGroup(colGroup);
            table.insertBefore(this.setColGroup(colGroup), table.firstChild);
            this.setTable(table);
            this.appendContent(table);
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_5__["colGroupRefresh"], {});
            this.widthService.setWidthToColumns();
            this.parent.updateDefaultCursor();
            if (!frzCols) {
                this.initializeHeaderDrag();
            }
            var rows = [].slice.call(headerDiv.querySelectorAll('tr.e-columnheader'));
            for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
                var row = rows_1[_i];
                var gCells = [].slice.call(row.querySelectorAll('.e-grouptopleftcell'));
                if (gCells.length) {
                    gCells[gCells.length - 1].classList.add('e-lastgrouptopleftcell');
                }
            }
            if (!frzCols) {
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_5__["headerRefreshed"], { rows: this.rows, args: { isFrozen: this.parent.getFrozenColumns() !== 0 } });
            }
            if (this.parent.allowTextWrap && this.parent.textWrapSettings.wrapMode === 'Header') {
                Object(_base_util__WEBPACK_IMPORTED_MODULE_6__["wrap"])(rows, true);
            }
        }
    };
    HeaderRender.prototype.toggleStackClass = function (div) {
        var column = this.parent.columns;
        var stackedHdr = column.some(function (column) { return column.columns !== undefined; });
        if (stackedHdr) {
            div.classList.add('e-stackedheader');
        }
        else {
            div.classList.remove('e-stackedheader');
        }
    };
    HeaderRender.prototype.appendContent = function (table) {
        this.getPanel().firstChild.appendChild(table);
    };
    HeaderRender.prototype.getCellCnt = function (col, cnt) {
        if (col.columns) {
            for (var i = 0, len = col.columns.length; i < len; i++) {
                cnt = this.getCellCnt(col.columns[i], cnt);
            }
        }
        else {
            if (col.visible) {
                cnt++;
            }
        }
        return cnt;
    };
    HeaderRender.prototype.initializeHeaderDrag = function () {
        var gObj = this.parent;
        if (!(this.parent.allowReordering || (this.parent.allowGrouping && this.parent.groupSettings.showDropArea))) {
            return;
        }
        var headerRows = [].slice.call(gObj.getHeaderContent().querySelectorAll('.e-columnheader'));
        for (var i = 0, len = headerRows.length; i < len; i++) {
            var drag = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"](headerRows[i], {
                dragTarget: '.e-headercell',
                distance: 5,
                helper: this.helper,
                dragStart: this.dragStart,
                drag: this.drag,
                dragStop: this.dragStop,
                abort: '.e-rhandler'
            });
        }
    };
    HeaderRender.prototype.initializeHeaderDrop = function () {
        var gObj = this.parent;
        var drop = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Droppable"](gObj.getHeaderContent(), {
            accept: '.e-dragclone',
            drop: this.drop
        });
    };
    return HeaderRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/indent-cell-renderer.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/indent-cell-renderer.js ***!
  \**************************************************************************************/
/*! exports provided: IndentCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentCellRenderer", function() { return IndentCellRenderer; });
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * IndentCellRenderer class which responsible for building group indent cell.
 * @hidden
 */
var IndentCellRenderer = /** @class */ (function (_super) {
    __extends(IndentCellRenderer, _super);
    function IndentCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent.createElement('TD', { className: 'e-indentcell' });
        return _this;
    }
    /**
     * Function to render the indent cell
     * @param  {Cell} cell
     * @param  {Object} data
     */
    IndentCellRenderer.prototype.render = function (cell, data) {
        var node = this.element.cloneNode();
        Object(_base_util__WEBPACK_IMPORTED_MODULE_0__["setStyleAndAttributes"])(node, cell.attributes);
        return node;
    };
    return IndentCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_1__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/inline-edit-renderer.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/inline-edit-renderer.js ***!
  \**************************************************************************************/
/*! exports provided: InlineEditRender */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InlineEditRender", function() { return InlineEditRender; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");



/**
 * Edit render module is used to render grid edit row.
 * @hidden
 */
var InlineEditRender = /** @class */ (function () {
    /**
     * Constructor for render module
     */
    function InlineEditRender(parent) {
        this.parent = parent;
    }
    InlineEditRender.prototype.addNew = function (elements, args) {
        this.isEdit = false;
        var mTbody;
        var tbody;
        if (this.parent.frozenRows) {
            tbody = this.parent.getHeaderContent().querySelector('tbody');
        }
        else {
            tbody = this.parent.getContentTable().querySelector('tbody');
        }
        args.row = this.parent.createElement('tr', { className: 'e-row e-addedrow' });
        if (tbody.querySelector('.e-emptyrow')) {
            tbody.querySelector('.e-emptyrow').classList.add('e-hide');
        }
        this.parent.editSettings.newRowPosition === 'Top' ? tbody.insertBefore(args.row, tbody.firstChild) : tbody.appendChild(args.row);
        args.row.appendChild(this.getEditElement(elements, false, undefined, args, true));
        if (this.parent.getFrozenColumns()) {
            var mEle = this.renderMovableform(args.row, args);
            if (this.parent.frozenRows) {
                mTbody = this.parent.getHeaderContent().querySelector('.e-movableheader').querySelector('tbody');
            }
            else {
                mTbody = this.parent.getContent().querySelector('.e-movablecontent').querySelector('tbody');
            }
            this.parent.editSettings.newRowPosition === 'Top' ? mTbody.insertBefore(mEle, mTbody.firstChild) : mTbody.appendChild(mEle);
            args.row.querySelector('.e-normaledit').setAttribute('colspan', this.parent.getVisibleFrozenColumns() + '');
            mEle.setAttribute('colspan', '' + (this.parent.getVisibleColumns().length - this.parent.getVisibleFrozenColumns()));
            if (this.parent.height === 'auto') {
                this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_1__["frozenHeight"], {});
            }
        }
    };
    InlineEditRender.prototype.renderMovableform = function (ele, args) {
        var mEle = ele.cloneNode(true);
        var form = args.movableForm = mEle.querySelector('form');
        if (this.parent.editSettings.template) {
            form.innerHTML = '';
            this.appendChildren(form, args.rowData, false);
            return mEle;
        }
        this.renderMovable(ele, mEle);
        mEle.querySelector('colgroup').innerHTML = this.parent.getHeaderContent()
            .querySelector('.e-movableheader').querySelector('colgroup').innerHTML;
        return mEle;
    };
    InlineEditRender.prototype.updateFreezeEdit = function (row, td) {
        td = td.concat([].slice.call(this.getFreezeRow(row).querySelectorAll('td.e-rowcell')));
        return td;
    };
    InlineEditRender.prototype.getFreezeRow = function (row) {
        if (this.parent.getFrozenColumns()) {
            var idx = parseInt(row.getAttribute('aria-rowindex'), 10);
            var fCont = this.parent.getContent().querySelector('.e-frozencontent').querySelector('tbody');
            var mCont = this.parent.getContent().querySelector('.e-movablecontent').querySelector('tbody');
            var fHdr = this.parent.getHeaderContent().querySelector('.e-frozenheader').querySelector('tbody');
            var mHdr = this.parent.getHeaderContent().querySelector('.e-movableheader').querySelector('tbody');
            if (this.parent.frozenRows && idx >= this.parent.frozenRows) {
                idx -= this.parent.frozenRows;
            }
            if (fCont.contains(row)) {
                return mCont.children[idx];
            }
            else if (mCont.contains(row)) {
                return fCont.children[idx];
            }
            else if (fHdr.contains(row)) {
                return mHdr.children[idx];
            }
            else if (mHdr.contains(row)) {
                return fHdr.children[idx];
            }
        }
        return row;
    };
    InlineEditRender.prototype.update = function (elements, args) {
        this.isEdit = true;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.row, '.e-movablecontent')) {
            args.row = this.getFreezeRow(args.row);
        }
        var tdElement = [].slice.call(args.row.querySelectorAll('td.e-rowcell'));
        args.row.innerHTML = '';
        tdElement = this.updateFreezeEdit(args.row, tdElement);
        args.row.appendChild(this.getEditElement(elements, true, tdElement, args, true));
        args.row.classList.add('e-editedrow');
        this.refreshFreezeEdit(args.row, args);
    };
    InlineEditRender.prototype.refreshFreezeEdit = function (row, args) {
        var td = row.firstChild;
        var fCls;
        var cont;
        var idx = parseInt(row.getAttribute('aria-rowindex'), 10);
        if (this.parent.getFrozenColumns()) {
            if (idx < this.parent.frozenRows) {
                cont = this.parent.getHeaderContent();
                fCls = '.e-frozenheader';
            }
            else {
                cont = this.parent.getContent();
                fCls = '.e-frozencontent';
            }
            var mTd = td.cloneNode(true);
            var form = args.movableForm = mTd.querySelector('form');
            if (this.parent.editSettings.template) {
                form.innerHTML = '';
                this.appendChildren(form, args.rowData, false);
            }
            var fRows = void 0;
            if (cont.querySelector(fCls).contains(row)) {
                fRows = this.parent.getMovableRowByIndex(idx);
                this.updateFrozenCont(fRows, td, mTd);
            }
            else {
                fRows = this.parent.getRowByIndex(idx);
                this.updateFrozenCont(fRows, mTd, td);
            }
            fRows.appendChild(mTd);
            fRows.classList.add('e-editedrow');
        }
    };
    InlineEditRender.prototype.updateFrozenCont = function (row, ele, mEle) {
        row.innerHTML = '';
        if (!this.parent.editSettings.template) {
            this.renderMovable(ele, mEle);
            mEle.querySelector('colgroup').innerHTML = this.parent.getHeaderContent()
                .querySelector('.e-movableheader').querySelector('colgroup').innerHTML;
        }
        ele.setAttribute('colspan', this.parent.getVisibleFrozenColumns() + '');
        mEle.setAttribute('colspan', this.parent.getVisibleColumns().length - this.parent.getVisibleFrozenColumns() + '');
    };
    InlineEditRender.prototype.renderMovable = function (ele, mEle) {
        var frzCols = this.parent.getFrozenColumns();
        for (var i = 0; i < frzCols; i++) {
            mEle.querySelector('tr').removeChild(mEle.querySelector('tr').children[0]);
        }
        for (var i = frzCols, len = ele.querySelector('tr').childElementCount; i < len; i++) {
            ele.querySelector('tr').removeChild(ele.querySelector('tr').children[ele.querySelector('tr').childElementCount - 1]);
        }
    };
    InlineEditRender.prototype.getEditElement = function (elements, isEdit, tdElement, args, isFrozen) {
        var gObj = this.parent;
        var gLen = 0;
        var isDetail = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(gObj.detailTemplate) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(gObj.childGrid) ? 1 : 0;
        var isDragable = gObj.isRowDragable() ? 1 : 0;
        if (gObj.allowGrouping) {
            gLen = gObj.groupSettings.columns.length;
        }
        var td = this.parent.createElement('td', {
            className: 'e-editcell e-normaledit',
            attrs: { colspan: (gObj.getVisibleColumns().length - gObj.getVisibleFrozenColumns() + gLen + isDetail + isDragable).toString() }
        });
        var form = args.form =
            this.parent.createElement('form', { id: gObj.element.id + 'EditForm', className: 'e-gridform' });
        if (this.parent.editSettings.template) {
            this.appendChildren(form, args.rowData, isFrozen);
            td.appendChild(form);
            return td;
        }
        var table = this.parent.createElement('table', { className: 'e-table e-inline-edit', attrs: { cellspacing: '0.25' } });
        table.appendChild(gObj.getContentTable().querySelector('colgroup').cloneNode(true));
        var tbody = this.parent.createElement('tbody');
        var tr = this.parent.createElement('tr');
        var i = 0;
        if (isDetail) {
            tr.insertBefore(this.parent.createElement('td', { className: 'e-detailrowcollapse' }), tr.firstChild);
        }
        if (gObj.isRowDragable()) {
            tr.appendChild(this.parent.createElement('td', { className: 'e-dragindentcell' }));
        }
        while (i < gLen) {
            tr.appendChild(this.parent.createElement('td', { className: 'e-indentcell' }));
            i++;
        }
        var m = 0;
        i = 0;
        while ((isEdit && m < tdElement.length && i < gObj.getColumns().length) || i < gObj.getColumns().length) {
            var span = isEdit ? tdElement[m].getAttribute('colspan') : null;
            var col = gObj.getColumns()[i];
            var td_1 = this.parent.createElement('td', {
                className: 'e-rowcell', attrs: { style: 'text-align:' + (col.textAlign ? col.textAlign : ''), 'colspan': span ? span : '' }
            });
            if (col.visible) {
                td_1.appendChild(elements[col.uid]);
                if (col.editType === 'booleanedit') {
                    td_1.classList.add('e-boolcell');
                }
                else if (col.commands || col.commandsTemplate) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([td_1], 'e-unboundcell');
                }
            }
            else {
                td_1.classList.add('e-hide');
            }
            tr.appendChild(td_1);
            i = span ? i + parseInt(span, 10) : i + 1;
            m++;
        }
        tbody.appendChild(tr);
        table.appendChild(tbody);
        form.appendChild(table);
        td.appendChild(form);
        return td;
    };
    InlineEditRender.prototype.removeEventListener = function () {
        //To destroy the renderer
    };
    InlineEditRender.prototype.appendChildren = function (form, data, isFrozen) {
        var dummyData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, data, { isAdd: !this.isEdit, isFrozen: isFrozen }, true);
        Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["appendChildren"])(form, this.parent.getEditTemplate()(dummyData, this.parent, 'editSettingsTemplate'));
    };
    return InlineEditRender;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/inputmask-edit-cell.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/inputmask-edit-cell.js ***!
  \*************************************************************************************/
/*! exports provided: MaskedTextBoxCellEdit */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBoxCellEdit", function() { return MaskedTextBoxCellEdit; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");



/**
 * `MaskedTextBoxCellEdit` is used to handle masked input cell type editing.
 * @hidden
 */
var MaskedTextBoxCellEdit = /** @class */ (function () {
    function MaskedTextBoxCellEdit(parentInstance) {
        //constructor
        this.parent = parentInstance;
    }
    MaskedTextBoxCellEdit.prototype.create = function (args) {
        //create
        var columnField = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(args.column.field);
        return this.parent.createElement('input', {
            className: 'e-field', attrs: {
                id: this.parent.element.id + columnField,
                name: columnField, type: 'text', 'e-mappinguid': args.column.uid,
            }
        });
    };
    MaskedTextBoxCellEdit.prototype.write = function (args) {
        this.column = args.column;
        var isInlineEdit = this.parent.editSettings.mode !== 'Dialog';
        this.obj = new _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_1__["MaskedTextBox"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
            fields: { value: args.column.field },
            value: Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(args.column.field, args.rowData),
            floatLabelType: isInlineEdit ? 'Never' : 'Always',
            mask: '000-000-0000',
            enabled: Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isEditable"])(args.column, args.requestType, args.element),
        }, args.column.edit.params));
        this.obj.appendTo(args.element);
    };
    MaskedTextBoxCellEdit.prototype.read = function (element) {
        return element.ej2_instances[0].value;
    };
    MaskedTextBoxCellEdit.prototype.destroy = function () {
        if (this.obj) {
            this.obj.destroy();
        }
    };
    return MaskedTextBoxCellEdit;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/multiselect-edit-cell.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/multiselect-edit-cell.js ***!
  \***************************************************************************************/
/*! exports provided: MultiSelectEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiSelectEditCell", function() { return MultiSelectEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-dropdowns */ "./node_modules/@syncfusion/ej2-dropdowns/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");



/**
 * `MultiSelectEditCell` is used to handle multiselect dropdown cell type editing.
 * @hidden
 */
var MultiSelectEditCell = /** @class */ (function () {
    function MultiSelectEditCell(parentObj) {
        //constructor
        this.parent = parentObj;
    }
    MultiSelectEditCell.prototype.create = function (args) {
        //create
        var colName = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(args.column.field);
        return this.parent.createElement('input', {
            className: 'e-field', attrs: {
                id: this.parent.element.id + colName,
                name: colName, type: 'text', 'e-mappinguid': args.column.uid,
            }
        });
    };
    MultiSelectEditCell.prototype.read = function (element) {
        return element.ej2_instances[0].value;
    };
    MultiSelectEditCell.prototype.write = function (args) {
        this.column = args.column;
        var isInline = this.parent.editSettings.mode !== 'Dialog';
        this.obj = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__["MultiSelect"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
            fields: { text: args.column.field, value: args.column.field },
            value: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(args.column.field, args.rowData),
            enableRtl: this.parent.enableRtl,
            placeholder: isInline ? '' : args.column.headerText, popupHeight: '200px',
            floatLabelType: isInline ? 'Never' : 'Always'
        }, args.column.edit.params));
        this.obj.appendTo(args.element);
        args.element.setAttribute('name', Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(args.column.field));
    };
    MultiSelectEditCell.prototype.destroy = function () {
        if (this.obj) {
            this.obj.destroy();
        }
    };
    return MultiSelectEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/number-filter-ui.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/number-filter-ui.js ***!
  \**********************************************************************************/
/*! exports provided: NumberFilterUI */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFilterUI", function() { return NumberFilterUI; });
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");


/**
 * `numberfilterui` render number column.
 * @hidden
 */
var NumberFilterUI = /** @class */ (function () {
    function NumberFilterUI(parent, serviceLocator, filterSettings) {
        this.filterSettings = filterSettings;
        this.parent = parent;
        this.serviceLocator = serviceLocator;
    }
    NumberFilterUI.prototype.create = function (args) {
        this.instance = this.parent.createElement('input', { className: 'e-flmenu-input', id: 'numberui-' + args.column.uid });
        args.target.appendChild(this.instance);
        this.numericTxtObj = new _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_0__["NumericTextBox"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])({
            format: args.column.format,
            locale: this.parent.locale,
            cssClass: 'e-popup-flmenu',
            placeholder: args.localizeText.getConstant('EnterValue'),
            enableRtl: this.parent.enableRtl,
        }, args.column.filter.params));
        this.numericTxtObj.appendTo(this.instance);
    };
    NumberFilterUI.prototype.write = function (args) {
        var numberuiObj = document.querySelector('#numberui-' + args.column.uid).ej2_instances[0];
        numberuiObj.value = args.filteredValue;
    };
    NumberFilterUI.prototype.read = function (element, column, filterOptr, filterObj) {
        var numberuiObj = document.querySelector('#numberui-' + column.uid).ej2_instances[0];
        var filterValue = numberuiObj.value;
        filterObj.filterByColumn(column.field, filterOptr, filterValue, 'and', true);
    };
    return NumberFilterUI;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/numeric-edit-cell.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/numeric-edit-cell.js ***!
  \***********************************************************************************/
/*! exports provided: NumericEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumericEditCell", function() { return NumericEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");



/**
 * `NumericEditCell` is used to handle numeric cell type editing.
 * @hidden
 */
var NumericEditCell = /** @class */ (function () {
    function NumericEditCell(parent) {
        this.parent = parent;
    }
    NumericEditCell.prototype.create = function (args) {
        var complexFieldName = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(args.column.field);
        this.instances = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.parent.locale);
        return this.parent.createElement('input', {
            className: 'e-field', attrs: {
                id: this.parent.element.id + complexFieldName,
                name: complexFieldName, 'e-mappinguid': args.column.uid
            }
        });
    };
    NumericEditCell.prototype.read = function (element) {
        var value = this.instances.getNumberParser({ format: 'n' })(element.value);
        return value;
    };
    NumericEditCell.prototype.write = function (args) {
        var col = args.column;
        var isInline = this.parent.editSettings.mode !== 'Dialog';
        this.obj = new _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_1__["NumericTextBox"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
            value: parseFloat(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(args.column.field, args.rowData)),
            enableRtl: this.parent.enableRtl,
            placeholder: isInline ? '' : args.column.headerText,
            enabled: Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isEditable"])(args.column, args.requestType, args.element),
            floatLabelType: this.parent.editSettings.mode !== 'Dialog' ? 'Never' : 'Always',
        }, col.edit.params));
        args.element.setAttribute('name', Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(args.column.field));
        this.obj.appendTo(args.element);
    };
    NumericEditCell.prototype.destroy = function () {
        if (this.obj && !this.obj.isDestroyed) {
            this.obj.destroy();
        }
    };
    return NumericEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js ***!
  \************************************************************************/
/*! exports provided: Render */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Render", function() { return Render; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _services_value_formatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/value-formatter */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _actions_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../actions/data */ "./node_modules/@syncfusion/ej2-grids/src/grid/actions/data.js");
/* harmony import */ var _models_column__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../models/column */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js");
/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony import */ var _models_cell__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../models/cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _renderer_content_renderer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../renderer/content-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/content-renderer.js");
/* harmony import */ var _renderer_header_renderer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../renderer/header-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-renderer.js");
/* harmony import */ var _renderer_cell_renderer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../renderer/cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony import */ var _renderer_header_cell_renderer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../renderer/header-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-cell-renderer.js");
/* harmony import */ var _renderer_stacked_cell_renderer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../renderer/stacked-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/stacked-cell-renderer.js");
/* harmony import */ var _renderer_indent_cell_renderer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../renderer/indent-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/indent-cell-renderer.js");
/* harmony import */ var _renderer_caption_cell_renderer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../renderer/caption-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/caption-cell-renderer.js");
/* harmony import */ var _renderer_expand_cell_renderer__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../renderer/expand-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/expand-cell-renderer.js");
/* harmony import */ var _renderer_header_indent_renderer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../renderer/header-indent-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-indent-renderer.js");
/* harmony import */ var _renderer_detail_header_indent_renderer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../renderer/detail-header-indent-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-header-indent-renderer.js");
/* harmony import */ var _renderer_detail_expand_cell_renderer__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../renderer/detail-expand-cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-expand-cell-renderer.js");
/* harmony import */ var _row_drag_drop_renderer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./row-drag-drop-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-drop-renderer.js");
/* harmony import */ var _renderer_row_drag_header_indent_render__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../renderer/row-drag-header-indent-render */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-header-indent-render.js");
























/**
 * Content module is used to render grid content
 * @hidden
 */
var Render = /** @class */ (function () {
    /**
     * Constructor for render module
     */
    function Render(parent, locator) {
        this.emptyGrid = false;
        this.parent = parent;
        this.locator = locator;
        this.data = new _actions_data__WEBPACK_IMPORTED_MODULE_4__["Data"](parent, locator);
        this.l10n = locator.getService('localization');
        this.ariaService = this.locator.getService('ariaService');
        this.renderer = this.locator.getService('rendererFactory');
        this.addEventListener();
    }
    /**
     * To initialize grid header, content and footer rendering
     */
    Render.prototype.render = function () {
        var gObj = this.parent;
        this.headerRenderer = this.renderer.getRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["RenderType"].Header);
        this.contentRenderer = this.renderer.getRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["RenderType"].Content);
        this.headerRenderer.renderPanel();
        this.contentRenderer.renderPanel();
        if (gObj.getColumns().length) {
            this.isLayoutRendered = true;
            this.headerRenderer.renderTable();
            this.contentRenderer.renderTable();
            this.emptyRow(false);
        }
        this.refreshDataManager();
    };
    /**
     * Refresh the entire Grid.
     * @return {void}
     */
    Render.prototype.refresh = function (e) {
        var _this = this;
        if (e === void 0) { e = { requestType: 'refresh' }; }
        var gObj = this.parent;
        gObj.notify(e.requestType + "-begin", e);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            this.resetTemplates();
        }
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_8__["actionBegin"], e, function (args) {
            if (args === void 0) { args = { requestType: 'refresh' }; }
            if (args.cancel) {
                gObj.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["cancelBegin"], args);
                return;
            }
            if (args.requestType === 'delete' && gObj.allowPaging) {
                var dataLength = args.data.length;
                var count = gObj.pageSettings.totalRecordsCount - dataLength;
                if (!(gObj.currentViewData.length - dataLength) && count) {
                    gObj.prevPageMoving = true;
                    gObj.setProperties({
                        pageSettings: {
                            totalRecordsCount: count, currentPage: Math.ceil(count / gObj.pageSettings.pageSize)
                        }
                    }, true);
                    gObj.pagerModule.pagerObj.totalRecordsCount = count;
                }
            }
            _this.refreshDataManager(args);
        });
    };
    Render.prototype.resetTemplates = function () {
        var gObj = this.parent;
        if (gObj.detailTemplate) {
            var detailTemplateID = gObj.element.id + 'detailTemplate';
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["blazorTemplates"][detailTemplateID] = [];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(detailTemplateID, 'DetailTemplate');
        }
        if (gObj.groupSettings.captionTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(gObj.element.id + 'captionTemplate', 'CaptionTemplate');
        }
        if (gObj.rowTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(gObj.element.id + 'rowTemplate', 'RowTemplate');
        }
        if (gObj.toolbarTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(gObj.element.id + 'toolbarTemplate', 'ToolbarTemplate');
        }
        for (var i = 0; i < gObj.getColumns().length; i++) {
            if (gObj.getColumns()[i].template) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(gObj.element.id + gObj.getColumns()[i].uid, 'Template');
            }
            if (gObj.getColumns()[i].headerTemplate) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(gObj.element.id + gObj.getColumns()[i].uid + 'headerTemplate', 'HeaderTemplate');
            }
            if (gObj.getColumns()[i].filterTemplate) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(gObj.element.id + gObj.getColumns()[i].uid + 'filterTemplate', 'FilterTemplate');
            }
        }
        var guid = 'guid';
        for (var k = 0; k < gObj.aggregates.length; k++) {
            for (var j = 0; j < gObj.aggregates[k].columns.length; j++) {
                if (gObj.aggregates[k].columns[j].footerTemplate) {
                    var tempID = gObj.element.id + gObj.aggregates[k].columns[j][guid] + 'footerTemplate';
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(tempID, 'FooterTemplate');
                }
                if (gObj.aggregates[k].columns[j].groupFooterTemplate) {
                    var tempID = gObj.element.id + gObj.aggregates[k].columns[j][guid] + 'groupFooterTemplate';
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(tempID, 'GroupFooterTemplate');
                }
                if (gObj.aggregates[k].columns[j].groupCaptionTemplate) {
                    var tempID = gObj.element.id + gObj.aggregates[k].columns[j][guid] + 'groupCaptionTemplate';
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(tempID, 'GroupCaptionTemplate');
                }
            }
        }
    };
    Render.prototype.refreshComplete = function (e) {
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_8__["actionComplete"], e);
    };
    /**
     * The function is used to refresh the dataManager
     * @return {void}
     */
    Render.prototype.refreshDataManager = function (args) {
        var _this = this;
        if (args === void 0) { args = {}; }
        if (args.requestType !== 'virtualscroll') {
            this.parent.showSpinner();
        }
        this.emptyGrid = false;
        var dataManager;
        var isFActon = this.isNeedForeignAction();
        this.ariaService.setBusy(this.parent.getContent().firstChild, true);
        if (isFActon) {
            var deffered = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Deferred"]();
            dataManager = this.getFData(deffered);
        }
        if (!dataManager) {
            dataManager = this.data.getData(args, this.data.generateQuery().requiresCount());
        }
        else {
            dataManager = dataManager.then(function (e) {
                var query = _this.data.generateQuery().requiresCount();
                if (_this.emptyGrid) {
                    var def = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Deferred"]();
                    def.resolve({ result: [], count: 0 });
                    return def.promise;
                }
                return _this.data.getData(args, query);
            });
        }
        if (this.parent.getForeignKeyColumns().length && (!isFActon || this.parent.searchSettings.key.length)) {
            var deffered_1 = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Deferred"]();
            dataManager = dataManager.then(function (e) {
                _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["getForeignKeyData"], { dataManager: dataManager, result: e, promise: deffered_1 });
                return deffered_1.promise;
            });
        }
        if (this.parent.groupSettings.disablePageWiseAggregates && this.parent.groupSettings.columns.length) {
            dataManager = dataManager.then(function (e) { return _this.validateGroupRecords(e); });
        }
        dataManager.then(function (e) { return _this.dataManagerSuccess(e, args); })
            .catch(function (e) { return _this.dataManagerFailure(e, args); });
    };
    Render.prototype.getFData = function (deferred) {
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["getForeignKeyData"], { isComplex: true, promise: deferred });
        return deferred.promise;
    };
    Render.prototype.isNeedForeignAction = function () {
        var gObj = this.parent;
        return !!((gObj.allowFiltering && gObj.filterSettings.columns.length) ||
            (gObj.searchSettings.key.length)) && this.foreignKey(this.parent.getForeignKeyColumns());
    };
    Render.prototype.foreignKey = function (columns) {
        var _this = this;
        return columns.some(function (col) {
            var fbool = false;
            fbool = _this.parent.filterSettings.columns.some(function (value) {
                return col.uid === value.uid;
            });
            return !!(fbool || _this.parent.searchSettings.key.length);
        });
    };
    Render.prototype.sendBulkRequest = function (args) {
        var _this = this;
        args.requestType = 'batchsave';
        var promise = this.data.saveChanges(args.changes, this.parent.getPrimaryKeyFieldNames()[0], args.original);
        var query = this.data.generateQuery().requiresCount();
        if (this.data.dataManager.dataSource.offline) {
            this.refreshDataManager({ requestType: 'batchsave' });
            return;
        }
        else {
            promise.then(function (e) {
                _this.data.getData(args, query)
                    .then(function (e) { return _this.dmSuccess(e, args); })
                    .catch(function (e) { return _this.dmFailure(e, args); });
            })
                .catch(function (e) { return _this.dmFailure(e, args); });
        }
    };
    Render.prototype.dmSuccess = function (e, args) {
        this.dataManagerSuccess(e, args);
    };
    Render.prototype.dmFailure = function (e, args) {
        this.dataManagerFailure(e, args);
    };
    /**
     * Render empty row to Grid which is used at the time to represent to no records.
     * @return {void}
     * @hidden
     */
    Render.prototype.renderEmptyRow = function () {
        this.emptyRow(true);
    };
    Render.prototype.emptyRow = function (isTrigger) {
        var gObj = this.parent;
        var tbody = this.contentRenderer.getTable().querySelector('tbody');
        var tr;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tbody)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(tbody);
        }
        tbody = this.parent.createElement('tbody');
        var spanCount = 0;
        if (gObj.detailTemplate || gObj.childGrid) {
            ++spanCount;
        }
        tr = this.parent.createElement('tr', { className: 'e-emptyrow' });
        tr.appendChild(this.parent.createElement('td', {
            innerHTML: this.l10n.getConstant('EmptyRecord'),
            attrs: { colspan: (gObj.getColumns().length + spanCount).toString() }
        }));
        tbody.appendChild(tr);
        this.contentRenderer.renderEmpty(tbody);
        if (isTrigger) {
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_8__["dataBound"], {});
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["onEmpty"], { rows: [new _models_row__WEBPACK_IMPORTED_MODULE_6__["Row"]({ isDataRow: true, cells: [new _models_cell__WEBPACK_IMPORTED_MODULE_7__["Cell"]({ isDataCell: true, visible: true })] })] });
        }
    };
    Render.prototype.dynamicColumnChange = function () {
        if (this.parent.getCurrentViewRecords().length) {
            this.updateColumnType(this.parent.getCurrentViewRecords()[0]);
        }
    };
    Render.prototype.updateColumnType = function (record) {
        var columns = this.parent.getColumns();
        var value;
        var cFormat = 'customFormat';
        var equalTo = 'equalTo';
        var data = record && record.items ? record.items[0] : record;
        var fmtr = this.locator.getService('valueFormatter');
        for (var i = 0, len = columns.length; i < len; i++) {
            value = Object(_base_util__WEBPACK_IMPORTED_MODULE_9__["getObject"])(columns[i].field || '', data);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(columns[i][cFormat])) {
                columns[i].format = columns[i][cFormat];
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(columns[i].validationRules) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(columns[i].validationRules[equalTo])) {
                columns[i].validationRules[equalTo][0] = this.parent.element.id + columns[i].validationRules[equalTo][0];
            }
            if (columns[i].isForeignColumn() && columns[i].columnData) {
                value = Object(_base_util__WEBPACK_IMPORTED_MODULE_9__["getObject"])(columns[i].foreignKeyValue || '', columns[i].columnData[0]);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
                this.isColTypeDef = true;
                if (!columns[i].type) {
                    columns[i].type = value.getDay ? (value.getHours() > 0 || value.getMinutes() > 0 ||
                        value.getSeconds() > 0 || value.getMilliseconds() > 0 ? 'datetime' : 'date') : typeof (value);
                }
            }
            else {
                columns[i].type = columns[i].type || null;
            }
            var valueFormatter = new _services_value_formatter__WEBPACK_IMPORTED_MODULE_2__["ValueFormatter"]();
            if (columns[i].format && (columns[i].format.skeleton || columns[i].format.format)) {
                columns[i].setFormatter(valueFormatter.getFormatFunction(columns[i].format));
                columns[i].setParser(valueFormatter.getParserFunction(columns[i].format));
            }
            if (typeof (columns[i].format) === 'string') {
                Object(_base_util__WEBPACK_IMPORTED_MODULE_9__["setFormatter"])(this.locator, columns[i]);
            }
            else if (!columns[i].format && columns[i].type === 'number') {
                columns[i].setParser(fmtr.getParserFunction({ format: 'n2' }));
            }
        }
    };
    /** @hidden */
    Render.prototype.dataManagerSuccess = function (e, args) {
        var _this = this;
        var gObj = this.parent;
        this.contentRenderer = this.renderer.getRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["RenderType"].Content);
        this.headerRenderer = this.renderer.getRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["RenderType"].Header);
        e.actionArgs = args;
        gObj.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_8__["beforeDataBound"], e, function (dataArgs) {
            if (dataArgs.cancel) {
                return;
            }
            var len = Object.keys(dataArgs.result).length;
            if (_this.parent.isDestroyed) {
                return;
            }
            if ((!gObj.getColumns().length && !len) && !(gObj.columns.length && gObj.columns[0] instanceof _models_column__WEBPACK_IMPORTED_MODULE_5__["Column"])) {
                gObj.hideSpinner();
                return;
            }
            _this.parent.isEdit = false;
            _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["tooltipDestroy"], {});
            gObj.currentViewData = dataArgs.result;
            if (!len && dataArgs.count && gObj.allowPaging && args && args.requestType !== 'delete') {
                gObj.prevPageMoving = true;
                gObj.pageSettings.totalRecordsCount = dataArgs.count;
                gObj.pageSettings.currentPage = Math.ceil(dataArgs.count / gObj.pageSettings.pageSize);
                gObj.dataBind();
                return;
            }
            if ((!gObj.getColumns().length && len || !_this.isLayoutRendered) && !Object(_base_util__WEBPACK_IMPORTED_MODULE_9__["isGroupAdaptive"])(gObj)) {
                _this.updatesOnInitialRender(dataArgs);
            }
            if (!_this.isColTypeDef && gObj.getCurrentViewRecords()) {
                _this.updateColumnType(gObj.getCurrentViewRecords()[0]);
            }
            if (!_this.parent.isInitialLoad && _this.parent.groupSettings.disablePageWiseAggregates &&
                !_this.parent.groupSettings.columns.length) {
                dataArgs.result = _this.parent.dataSource instanceof Array ? _this.parent.dataSource : _this.parent.currentViewData;
            }
            _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["dataReady"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({ count: dataArgs.count, result: dataArgs.result, aggregates: dataArgs.aggregates }, args));
            if ((gObj.groupSettings.columns.length || (args && args.requestType === 'ungrouping'))
                && (args && args.requestType !== 'filtering')) {
                _this.headerRenderer.refreshUI();
            }
            if (len) {
                if (Object(_base_util__WEBPACK_IMPORTED_MODULE_9__["isGroupAdaptive"])(gObj)) {
                    var content = 'content';
                    args.scrollTop = { top: _this.contentRenderer[content].scrollTop };
                }
                _this.contentRenderer.refreshContentRows(args);
            }
            else {
                if (!gObj.getColumns().length) {
                    gObj.element.innerHTML = '';
                    alert(_this.l10n.getConstant('EmptyDataSourceError')); //ToDO: change this alert as dialog
                    return;
                }
                _this.contentRenderer.setRowElements([]);
                _this.contentRenderer.setRowObjects([]);
                _this.ariaService.setBusy(_this.parent.getContent().firstChild, false);
                _this.renderEmptyRow();
                if (args) {
                    var action = (args.requestType || '').toLowerCase() + '-complete';
                    _this.parent.notify(action, args);
                    if (args.requestType === 'batchsave') {
                        args.cancel = false;
                        args.rows = [];
                        args.isFrozen = _this.parent.getFrozenColumns() !== 0 && !args.isFrozen;
                        _this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_8__["actionComplete"], args);
                    }
                }
                _this.parent.hideSpinner();
            }
            _this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["toolbarRefresh"], {});
        });
    };
    Render.prototype.dataManagerFailure = function (e, args) {
        this.ariaService.setOptions(this.parent.getContent().firstChild, { busy: false, invalid: true });
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_8__["actionFailure"], { error: e });
        this.parent.hideSpinner();
        if (args.requestType === 'save' || args.requestType === 'delete'
            || args.name === 'bulk-save') {
            return;
        }
        this.parent.currentViewData = [];
        this.renderEmptyRow();
        this.parent.log('actionfailure', { error: e });
    };
    Render.prototype.updatesOnInitialRender = function (e) {
        this.isLayoutRendered = true;
        if (this.parent.columns.length < 1) {
            this.buildColumns(e.result[0]);
        }
        Object(_base_util__WEBPACK_IMPORTED_MODULE_9__["prepareColumns"])(this.parent.columns);
        this.headerRenderer.renderTable();
        this.contentRenderer.renderTable();
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_8__["autoCol"], {});
    };
    Render.prototype.buildColumns = function (record) {
        var columns = Object.keys(record);
        var cols = [];
        for (var i = 0, len = columns.length; i < len; i++) {
            cols[i] = { 'field': columns[i] };
            if (this.parent.enableColumnVirtualization) {
                cols[i].width = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cols[i].width) ? cols[i].width : 200;
            }
        }
        this.parent.setProperties({ 'columns': cols }, true);
    };
    Render.prototype.instantiateRenderer = function () {
        this.renderer.addRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["RenderType"].Header, new _renderer_header_renderer__WEBPACK_IMPORTED_MODULE_11__["HeaderRender"](this.parent, this.locator));
        this.renderer.addRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["RenderType"].Content, new _renderer_content_renderer__WEBPACK_IMPORTED_MODULE_10__["ContentRender"](this.parent, this.locator));
        var cellrender = this.locator.getService('cellRendererFactory');
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].Header, new _renderer_header_cell_renderer__WEBPACK_IMPORTED_MODULE_13__["HeaderCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].Data, new _renderer_cell_renderer__WEBPACK_IMPORTED_MODULE_12__["CellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].StackedHeader, new _renderer_stacked_cell_renderer__WEBPACK_IMPORTED_MODULE_14__["StackedHeaderCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].Indent, new _renderer_indent_cell_renderer__WEBPACK_IMPORTED_MODULE_15__["IndentCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].GroupCaption, new _renderer_caption_cell_renderer__WEBPACK_IMPORTED_MODULE_16__["GroupCaptionCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].GroupCaptionEmpty, new _renderer_caption_cell_renderer__WEBPACK_IMPORTED_MODULE_16__["GroupCaptionEmptyCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].Expand, new _renderer_expand_cell_renderer__WEBPACK_IMPORTED_MODULE_17__["ExpandCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].HeaderIndent, new _renderer_header_indent_renderer__WEBPACK_IMPORTED_MODULE_18__["HeaderIndentCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].StackedHeader, new _renderer_stacked_cell_renderer__WEBPACK_IMPORTED_MODULE_14__["StackedHeaderCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].DetailHeader, new _renderer_detail_header_indent_renderer__WEBPACK_IMPORTED_MODULE_19__["DetailHeaderIndentCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].RowDragHIcon, new _renderer_row_drag_header_indent_render__WEBPACK_IMPORTED_MODULE_22__["RowDragDropHeaderRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].DetailExpand, new _renderer_detail_expand_cell_renderer__WEBPACK_IMPORTED_MODULE_20__["DetailExpandCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].DetailFooterIntent, new _renderer_indent_cell_renderer__WEBPACK_IMPORTED_MODULE_15__["IndentCellRenderer"](this.parent, this.locator));
        cellrender.addCellRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].RowDragIcon, new _row_drag_drop_renderer__WEBPACK_IMPORTED_MODULE_21__["RowDragDropRenderer"](this.parent, this.locator));
    };
    Render.prototype.addEventListener = function () {
        var _this = this;
        if (this.parent.isDestroyed) {
            return;
        }
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_8__["initialLoad"], this.instantiateRenderer, this);
        this.parent.on('refreshdataSource', this.dataManagerSuccess, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_8__["modelChanged"], this.refresh, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_8__["refreshComplete"], this.refreshComplete, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_8__["bulkSave"], this.sendBulkRequest, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_8__["showEmptyGrid"], function () { _this.emptyGrid = true; }, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_8__["autoCol"], this.dynamicColumnChange, this);
    };
    /** @hidden */
    Render.prototype.validateGroupRecords = function (e) {
        var _this = this;
        var index = e.result.length - 1;
        if (index < 0) {
            return Promise.resolve(e);
        }
        var group0 = e.result[0];
        var groupN = e.result[index];
        var predicate = [];
        var addWhere = function (input) {
            [group0, groupN].forEach(function (group) {
                return predicate.push(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"]('field', '==', group.field).and(_this.getPredicate('key', 'equal', group.key)));
            });
            input.where(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"].or(predicate));
        };
        var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
        addWhere(query);
        var curDm = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](e.result);
        var curFilter = curDm.executeLocal(query);
        var newQuery = this.data.generateQuery(true);
        var rPredicate = [];
        if (this.data.isRemote()) {
            [group0, groupN].forEach(function (group) {
                return rPredicate.push(_this.getPredicate(group.field, 'equal', group.key));
            });
            newQuery.where(_syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"].or(rPredicate));
        }
        else {
            addWhere(newQuery);
        }
        var deferred = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Deferred"]();
        this.data.getData({}, newQuery).then(function (r) {
            _this.updateGroupInfo(curFilter, r.result);
            deferred.resolve(e);
        }).catch(function (e) { return deferred.reject(e); });
        return deferred.promise;
    };
    Render.prototype.getPredicate = function (key, operator, value) {
        if (value instanceof Date) {
            return Object(_base_util__WEBPACK_IMPORTED_MODULE_9__["getDatePredicate"])({ field: key, operator: operator, value: value });
        }
        return new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](key, operator, value);
    };
    Render.prototype.updateGroupInfo = function (current, untouched) {
        var _this = this;
        var dm = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](untouched);
        current.forEach(function (element, index, array) {
            var uGroup = dm.executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]()
                .where(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"]('field', '==', element.field).and(_this.getPredicate('key', 'equal', element.key))))[0];
            element.count = uGroup.count;
            var itemGroup = element.items;
            var uGroupItem = uGroup.items;
            if (itemGroup.GroupGuid) {
                element.items = _this.updateGroupInfo(element.items, uGroup.items);
            }
            _this.parent.aggregates.forEach(function (row) {
                return row.columns.forEach(function (column) {
                    var types = column.type instanceof Array ? column.type : [column.type];
                    types.forEach(function (type) {
                        var key = column.field + ' - ' + type.toLowerCase();
                        var data = itemGroup.level ? uGroupItem.records : uGroup.items;
                        var context = _this.parent;
                        if (type === 'Custom') {
                            var data_1 = itemGroup.level ? uGroupItem : uGroup;
                            element.aggregates[key] = column.customAggregate ?
                                column.customAggregate.call(context, data_1, column) : '';
                        }
                        else {
                            element.aggregates[key] = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].aggregates[type.toLowerCase()](data, column.field);
                        }
                    });
                });
            });
        });
        return current;
    };
    return Render;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-drop-renderer.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-drop-renderer.js ***!
  \****************************************************************************************/
/*! exports provided: RowDragDropRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowDragDropRenderer", function() { return RowDragDropRenderer; });
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * ExpandCellRenderer class which responsible for building group expand cell.
 * @hidden
 */
var RowDragDropRenderer = /** @class */ (function (_super) {
    __extends(RowDragDropRenderer, _super);
    function RowDragDropRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent.createElement('TD', {
            className: 'e-rowdragdrop',
            attrs: { role: 'gridcell', tabindex: '-1' }
        });
        return _this;
    }
    /**
     * Function to render the detail expand cell
     */
    RowDragDropRenderer.prototype.render = function (cell, data) {
        var nodeElement = this.element.cloneNode();
        nodeElement.appendChild(this.parent.createElement('div', {
            className: 'e-icons e-rowcelldrag e-dtdiagonalright e-icon-rowdragicon'
        }));
        return nodeElement;
    };
    return RowDragDropRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_0__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-header-indent-render.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-header-indent-render.js ***!
  \***********************************************************************************************/
/*! exports provided: RowDragDropHeaderRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowDragDropHeaderRenderer", function() { return RowDragDropHeaderRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * DetailHeaderIndentCellRenderer class which responsible for building detail header indent cell.
 * @hidden
 */
var RowDragDropHeaderRenderer = /** @class */ (function (_super) {
    __extends(RowDragDropHeaderRenderer, _super);
    function RowDragDropHeaderRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent.createElement('TH', { className: 'e-rowdragheader' });
        return _this;
    }
    /**
     * Function to render the detail indent cell
     * @param  {Cell} cell
     * @param  {Object} data
     */
    RowDragDropHeaderRenderer.prototype.render = function (cell, data) {
        var node = this.element.cloneNode();
        node.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-emptycell' }));
        return node;
    };
    return RowDragDropHeaderRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_1__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js ***!
  \******************************************************************************/
/*! exports provided: RowRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return RowRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _cell_merge_renderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cell-merge-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-merge-renderer.js");






/**
 * RowRenderer class which responsible for building row content.
 * @hidden
 */
var RowRenderer = /** @class */ (function () {
    function RowRenderer(serviceLocator, cellType, parent) {
        this.isSpan = false;
        this.cellType = cellType;
        this.serviceLocator = serviceLocator;
        this.parent = parent;
        this.element = this.parent.createElement('tr', { attrs: { role: 'row' } });
    }
    /**
     * Function to render the row content based on Column[] and data.
     * @param  {Column[]} columns
     * @param  {Object} data?
     * @param  {{[x:string]:Object}} attributes?
     * @param  {string} rowTemplate?
     */
    RowRenderer.prototype.render = function (row, columns, attributes, rowTemplate, cloneNode) {
        return this.refreshRow(row, columns, attributes, rowTemplate, cloneNode);
    };
    /**
     * Function to refresh the row content based on Column[] and data.
     * @param  {Column[]} columns
     * @param  {Object} data?
     * @param  {{[x:string]:Object}} attributes?
     * @param  {string} rowTemplate?
     */
    RowRenderer.prototype.refresh = function (row, columns, isChanged, attributes, rowTemplate) {
        if (isChanged) {
            row.data = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["extendObjWithFn"])({}, row.changes);
            this.refreshMergeCells(row);
        }
        var node = this.parent.element.querySelector('[data-uid=' + row.uid + ']');
        var tr = this.refreshRow(row, columns, attributes, rowTemplate, null, isChanged);
        var cells = [].slice.call(tr.cells);
        node.innerHTML = '';
        for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
            var cell = cells_1[_i];
            node.appendChild(cell);
        }
    };
    RowRenderer.prototype.refreshRow = function (row, columns, attributes, rowTemplate, cloneNode, isEdit) {
        var tr = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cloneNode) ? cloneNode : this.element.cloneNode();
        var rowArgs = { data: row.data };
        var cellArgs = { data: row.data };
        var attrCopy = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, attributes, {});
        var chekBoxEnable = this.parent.getColumns().filter(function (col) { return col.type === 'checkbox' && col.field; })[0];
        var value = false;
        if (chekBoxEnable) {
            value = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(chekBoxEnable.field, rowArgs.data);
        }
        if (row.isDataRow) {
            row.isSelected = this.parent.getSelectedRowIndexes().indexOf(row.index) > -1 || value;
        }
        if (row.isDataRow && this.parent.isCheckBoxSelection
            && this.parent.checkAllRows === 'Check' && this.parent.enableVirtualization) {
            row.isSelected = true;
            if (this.parent.getSelectedRowIndexes().indexOf(row.index) === -1) {
                this.parent.getSelectedRowIndexes().push(row.index);
            }
        }
        this.buildAttributeFromRow(tr, row);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(tr, attrCopy);
        Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["setStyleAndAttributes"])(tr, row.attributes);
        var cellRendererFact = this.serviceLocator.getService('cellRendererFactory');
        var _loop_1 = function (i, len) {
            var cell = row.cells[i];
            cell.isSelected = row.isSelected;
            var cellRenderer = cellRendererFact.getCellRenderer(row.cells[i].cellType || _base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].Data);
            var attrs = { 'index': !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(row.index) ? row.index.toString() : '' };
            if (row.isExpand && row.cells[i].cellType === _base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].DetailExpand) {
                attrs['class'] = this_1.parent.isPrinting ? 'e-detailrowcollapse' : 'e-detailrowexpand';
            }
            var td = cellRenderer.render(row.cells[i], row.data, attrs, row.isExpand, isEdit);
            if (row.cells[i].cellType !== _base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].Filter) {
                if (row.cells[i].cellType === _base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].Data || row.cells[i].cellType === _base_enum__WEBPACK_IMPORTED_MODULE_3__["CellType"].CommandColumn) {
                    this_1.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_1__["queryCellInfo"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(cellArgs, {
                        cell: td, column: cell.column, colSpan: 1,
                        rowSpan: 1, foreignKeyData: row.cells[i].foreignKeyData,
                        requestType: this_1.parent.requestTypeAction
                    }));
                    var isRowSpanned = false;
                    if (row.index > 0 && this_1.isSpan) {
                        var prevRowCells = this_1.parent.groupSettings.columns.length > 0 &&
                            !this_1.parent.getRowsObject()[row.index - 1].isDataRow ?
                            this_1.parent.getRowsObject()[row.index].cells : this_1.parent.getRowsObject()[row.index - 1].cells;
                        var uid_1 = 'uid';
                        var prevRowCell = prevRowCells.filter(function (cell) {
                            return cell.column.uid === row.cells[i].column[uid_1];
                        })[0];
                        isRowSpanned = prevRowCell.isRowSpanned ? prevRowCell.isRowSpanned : prevRowCell.rowSpanRange > 1;
                    }
                    if (cellArgs.colSpan > 1 || row.cells[i].cellSpan > 1 || cellArgs.rowSpan > 1 || isRowSpanned) {
                        this_1.isSpan = true;
                        var cellMerge = new _cell_merge_renderer__WEBPACK_IMPORTED_MODULE_4__["CellMergeRender"](this_1.serviceLocator, this_1.parent);
                        td = cellMerge.render(cellArgs, row, i, td);
                    }
                }
                if (!row.cells[i].isSpanned) {
                    tr.appendChild(td);
                }
            }
        };
        var this_1 = this;
        for (var i = 0, len = row.cells.length; i < len; i++) {
            _loop_1(i, len);
        }
        var args = { row: tr, rowHeight: this.parent.rowHeight };
        if (row.isDataRow) {
            this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_1__["rowDataBound"], Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(rowArgs, args));
            if (this.parent.childGrid || this.parent.isRowDragable() || this.parent.detailTemplate) {
                var td = tr.querySelectorAll('.e-rowcell:not(.e-hide)')[0];
                if (td) {
                    td.classList.add('e-detailrowvisible');
                }
            }
        }
        if (this.parent.enableVirtualization) {
            rowArgs.rowHeight = this.parent.rowHeight;
        }
        if (rowArgs.rowHeight) {
            tr.style.height = rowArgs.rowHeight + 'px';
        }
        else if (this.parent.rowHeight && (tr.querySelector('.e-headercell') || tr.querySelector('.e-groupcaption'))) {
            tr.style.height = this.parent.rowHeight + 'px';
        }
        if (row.cssClass) {
            tr.classList.add(row.cssClass);
        }
        if (this.parent.element.scrollHeight > this.parent.height && this.parent.aggregates.length) {
            for (var i = 0; i < this.parent.aggregates.length; i++) {
                var property = 'properties';
                var column = 'columns';
                if (this.parent.aggregates[i][property][column][0].footerTemplate) {
                    var summarycell = tr.querySelectorAll('.e-summarycell');
                    if (summarycell.length) {
                        var lastSummaryCell = (summarycell[summarycell.length - 1]);
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([lastSummaryCell], ['e-lastsummarycell']);
                    }
                }
            }
        }
        return tr;
    };
    RowRenderer.prototype.refreshMergeCells = function (row) {
        for (var _i = 0, _a = row.cells; _i < _a.length; _i++) {
            var cell = _a[_i];
            cell.isSpanned = false;
        }
        return row;
    };
    /**
     * Function to check and add alternative row css class.
     * @param  {Element} tr
     * @param  {{[x:string]:Object}} attr
     */
    RowRenderer.prototype.buildAttributeFromRow = function (tr, row) {
        var attr = {};
        var prop = { 'rowindex': 'aria-rowindex', 'dataUID': 'data-uid', 'ariaSelected': 'aria-selected' };
        var classes = [];
        if (row.isDataRow) {
            classes.push('e-row');
        }
        if (row.isAltRow) {
            classes.push('e-altrow');
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(row.index)) {
            attr[prop.rowindex] = row.index;
        }
        if (row.rowSpan) {
            attr.rowSpan = row.rowSpan;
        }
        if (row.uid) {
            attr[prop.dataUID] = row.uid;
        }
        if (row.isSelected) {
            attr[prop.ariaSelected] = true;
        }
        if (row.visible === false) {
            classes.push('e-hide');
        }
        attr.class = classes;
        Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["setStyleAndAttributes"])(tr, attr);
    };
    return RowRenderer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/stacked-cell-renderer.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/stacked-cell-renderer.js ***!
  \***************************************************************************************/
/*! exports provided: StackedHeaderCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackedHeaderCellRenderer", function() { return StackedHeaderCellRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * StackedHeaderCellRenderer class which responsible for building stacked header cell content.
 * @hidden
 */
var StackedHeaderCellRenderer = /** @class */ (function (_super) {
    __extends(StackedHeaderCellRenderer, _super);
    function StackedHeaderCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent.createElement('TH', {
            className: 'e-headercell e-stackedheadercell', attrs: {
                role: 'columnheader',
                tabindex: '-1'
            }
        });
        return _this;
    }
    /**
     * Function to render the cell content based on Column object.
     * @param  {Column} column
     * @param  {Object} data
     * @param  {Element}
     */
    StackedHeaderCellRenderer.prototype.render = function (cell, data, attributes) {
        var node = this.element.cloneNode();
        var div = this.parent.createElement('div', {
            className: 'e-stackedheadercelldiv',
            attrs: { 'e-mappinguid': cell.column.uid }
        });
        var column = cell.column;
        node.appendChild(div);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.headerTemplate)) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["appendChildren"])(div, column.getHeaderTemplate()(column, this.parent, 'headerTemplate'));
        }
        else {
            this.appendHtml(div, column.headerText, column.getDomSetter());
        }
        if (cell.column.toolTip) {
            node.setAttribute('title', cell.column.toolTip);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cell.column.textAlign)) {
            div.style.textAlign = cell.column.textAlign;
        }
        if (cell.column.customAttributes) {
            Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["setStyleAndAttributes"])(node, cell.column.customAttributes);
        }
        node.setAttribute('colspan', cell.colSpan.toString());
        node.setAttribute('aria-colspan', cell.colSpan.toString());
        node.setAttribute('aria-rowspan', '1');
        if (this.parent.allowResizing) {
            var handler = this.parent.createElement('div');
            handler.className = cell.column.allowResizing ? 'e-rhandler e-rcursor' : 'e-rsuppress';
            node.appendChild(handler);
        }
        this.parent.trigger(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerCellInfo"], { cell: cell, node: node });
        return node;
    };
    return StackedHeaderCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_1__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/string-filter-ui.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/string-filter-ui.js ***!
  \**********************************************************************************/
/*! exports provided: StringFilterUI */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringFilterUI", function() { return StringFilterUI; });
/* harmony import */ var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-dropdowns */ "./node_modules/@syncfusion/ej2-dropdowns/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");




/**
 * `string filterui` render string column.
 * @hidden
 */
var StringFilterUI = /** @class */ (function () {
    function StringFilterUI(parent, serviceLocator, filterSettings) {
        this.parent = parent;
        this.serLocator = serviceLocator;
        this.filterSettings = filterSettings;
    }
    StringFilterUI.prototype.create = function (args) {
        var data;
        var floptr;
        this.instance = this.parent.createElement('input', { className: 'e-flmenu-input', id: 'strui-' + args.column.uid });
        args.target.appendChild(this.instance);
        this.dialogObj = args.dialogObj;
        this.actObj = this.getAutoCompleteOptions(args);
        this.actObj.appendTo(this.instance);
    };
    StringFilterUI.prototype.getAutoCompleteOptions = function (args) {
        var _this = this;
        var isForeignColumn = args.column.isForeignColumn();
        var dataSource = isForeignColumn ? args.column.dataSource : this.parent.dataSource;
        var fields = { value: isForeignColumn ? args.column.foreignKeyValue : args.column.field };
        var autoComplete = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_0__["AutoComplete"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["extend"])({
            dataSource: dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? dataSource : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](dataSource),
            fields: fields,
            locale: this.parent.locale,
            enableRtl: this.parent.enableRtl,
            query: this.parent.query.clone(),
            sortOrder: 'Ascending',
            open: this.openPopup.bind(this),
            cssClass: 'e-popup-flmenu',
            focus: function () {
                _this.actObj.filterType = args.getOptrInstance.getFlOperator();
            },
            autofill: true,
            placeholder: args.localizeText.getConstant('EnterValue'),
            actionComplete: function (e) {
                e.result = e.result.filter(function (obj, index, arr) {
                    return arr.map(function (mapObj) {
                        return mapObj[_this.actObj.fields.value];
                    }).indexOf(obj[_this.actObj.fields.value]) === index;
                });
            }
        }, args.column.filter.params));
        return autoComplete;
    };
    StringFilterUI.prototype.write = function (args) {
        var columns = this.filterSettings.columns;
        if (args.filteredValue !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(args.filteredValue)) {
            var struiObj = document.querySelector('#strui-' + args.column.uid).ej2_instances[0];
            struiObj.value = args.filteredValue;
        }
    };
    StringFilterUI.prototype.read = function (element, column, filterOptr, filterObj) {
        var actuiObj = document.querySelector('#strui-' + column.uid).ej2_instances[0];
        if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["Browser"].isDevice) {
            actuiObj.hidePopup();
            actuiObj.focusOut();
        }
        var filterValue = actuiObj.value;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(filterValue) || filterValue === '') {
            filterValue = null;
        }
        filterObj.filterByColumn(column.field, filterOptr, filterValue, 'and', false);
    };
    StringFilterUI.prototype.openPopup = function (args) {
        Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getZIndexCalcualtion"])(args, this.dialogObj);
    };
    return StringFilterUI;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/summary-cell-renderer.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/summary-cell-renderer.js ***!
  \***************************************************************************************/
/*! exports provided: SummaryCellRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SummaryCellRenderer", function() { return SummaryCellRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _cell_renderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * SummaryCellRenderer class which responsible for building summary cell content.
 * @hidden
 */
var SummaryCellRenderer = /** @class */ (function (_super) {
    __extends(SummaryCellRenderer, _super);
    function SummaryCellRenderer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.element = _this.parent
            .createElement('TD', { className: 'e-summarycell', attrs: { role: 'gridcell', tabindex: '-1' } });
        return _this;
    }
    SummaryCellRenderer.prototype.getValue = function (field, data, column) {
        var key;
        key = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.type) ?
            column.field + ' - ' + (typeof column.type === 'string' ? column.type.toLowerCase() : '') : column.columnName;
        return data[column.columnName] ? data[column.columnName][key] : '';
    };
    SummaryCellRenderer.prototype.evaluate = function (node, cell, data, attributes) {
        var column = cell.column;
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_3__["refreshAggregateCell"], this.refreshWithAggregate(node, cell), this);
        if (!(column.footerTemplate || column.groupFooterTemplate || column.groupCaptionTemplate)) {
            return true;
        }
        var tempObj = column.getTemplate(cell.cellType);
        var tempID = '';
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            var guid = 'guid';
            tempID = this.parent.element.id + column[guid] + tempObj.property;
        }
        Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["appendChildren"])(node, tempObj.fn(data[column.columnName], this.parent, tempObj.property, tempID));
        return false;
    };
    SummaryCellRenderer.prototype.refreshWithAggregate = function (node, cell) {
        var _this = this;
        var cellNode = cell;
        return function (args) {
            var cell = cellNode;
            var field = cell.column.columnName ? cell.column.columnName : null;
            var curCell = (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(field) ? args.cells.filter(function (cell) {
                return cell.column.columnName === field;
            })[0] : null);
            if (node.parentElement && node.parentElement.getAttribute('data-uid') === args.dataUid && field &&
                field === curCell.column.columnName) {
                _this.refreshTD(node, curCell, args.data);
            }
        };
    };
    return SummaryCellRenderer;
}(_cell_renderer__WEBPACK_IMPORTED_MODULE_2__["CellRenderer"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/template-edit-cell.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/template-edit-cell.js ***!
  \************************************************************************************/
/*! exports provided: TemplateEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateEditCell", function() { return TemplateEditCell; });
/**
 * `TemplateEditCell` is used to handle template cell.
 * @hidden
 */
var TemplateEditCell = /** @class */ (function () {
    function TemplateEditCell(parent) {
        this.parent = parent;
    }
    TemplateEditCell.prototype.read = function (element, value) {
        return value;
    };
    TemplateEditCell.prototype.write = function () {
        //
    };
    TemplateEditCell.prototype.destroy = function () {
        //
    };
    return TemplateEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/timepicker-edit-cell.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/timepicker-edit-cell.js ***!
  \**************************************************************************************/
/*! exports provided: TimePickerEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimePickerEditCell", function() { return TimePickerEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-calendars */ "./node_modules/@syncfusion/ej2-calendars/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");



/**
 * `TimePickerEditCell` is used to handle Timepicker cell type editing.
 * @hidden
 */
var TimePickerEditCell = /** @class */ (function () {
    function TimePickerEditCell(grid) {
        this.parent = grid;
    }
    TimePickerEditCell.prototype.create = function (args) {
        /* tslint:disable-next-line:no-any */
        var complexField = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(args.column.field);
        return this.parent.createElement('input', {
            className: 'e-field', attrs: {
                id: this.parent.element.id + complexField,
                name: complexField, type: 'text', 'e-mappinguid': args.column.uid
            }
        });
    };
    TimePickerEditCell.prototype.read = function (element) {
        return element.ej2_instances[0].value;
    };
    TimePickerEditCell.prototype.write = function (args) {
        var isInlineEdit = this.parent.editSettings.mode !== 'Dialog';
        var rowDataValue = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(args.column.field, args.rowData);
        rowDataValue = rowDataValue ? new Date(rowDataValue) : null;
        this.obj = new _syncfusion_ej2_calendars__WEBPACK_IMPORTED_MODULE_1__["TimePicker"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
            floatLabelType: isInlineEdit ? 'Never' : 'Always',
            value: rowDataValue,
            placeholder: isInlineEdit ?
                '' : args.column.headerText, enableRtl: this.parent.enableRtl,
            enabled: Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isEditable"])(args.column, args.requestType, args.element),
        }, args.column.edit.params));
        this.obj.appendTo(args.element);
    };
    TimePickerEditCell.prototype.destroy = function () {
        if (this.obj) {
            this.obj.destroy();
        }
    };
    return TimePickerEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/toggleswitch-edit-cell.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/toggleswitch-edit-cell.js ***!
  \****************************************************************************************/
/*! exports provided: ToggleEditCell */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToggleEditCell", function() { return ToggleEditCell; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");




/**
 * `ToggleEditCell` is used to handle boolean cell type editing.
 * @hidden
 */
var ToggleEditCell = /** @class */ (function () {
    function ToggleEditCell(parentObject) {
        this.activeClasses = ['e-selectionbackground', 'e-active'];
        this.parent = parentObject;
    }
    ToggleEditCell.prototype.create = function (args) {
        var col = args.column;
        var classNames = 'e-field e-boolcell';
        if (col.type === 'checkbox') {
            classNames = 'e-field e-boolcell e-edit-checkselect';
        }
        var complexField = Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getComplexFieldID"])(args.column.field);
        return this.parent.createElement('input', {
            className: classNames, attrs: {
                type: 'checkbox', value: args.value, 'e-mappinguid': col.uid,
                id: this.parent.element.id + complexField,
                name: complexField
            }
        });
    };
    ToggleEditCell.prototype.read = function (element) {
        return element.checked;
    };
    ToggleEditCell.prototype.write = function (args) {
        var chkBoxElement;
        var checkState;
        // let isAddRow : boolean =  args.requestType === 'add' || args.row.classList.contains('e-addedrow');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.row)) {
            chkBoxElement = args.row.querySelector('.e-edit-checkselect');
        }
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(args.column.field, args.rowData)) {
            checkState = JSON.parse(Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["getObject"])(args.column.field, args.rowData).toString().toLowerCase());
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(chkBoxElement)) {
            this.editType = this.parent.editSettings.mode;
            this.editRow = args.row;
            if (args.requestType !== 'add') {
                var row = this.parent.getRowObjectFromUID(args.row.getAttribute('data-uid'));
                checkState = row ? row.isSelected : false;
            }
            _base_util__WEBPACK_IMPORTED_MODULE_2__["addRemoveActiveClasses"].apply(void 0, [[].slice.call(args.row.querySelectorAll('.e-rowcell')), checkState].concat(this.activeClasses));
        }
        this.obj = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__["Switch"](Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({
            label: this.parent.editSettings.mode !== 'Dialog' ? ' ' : args.column.headerText,
            checked: checkState,
            disabled: !Object(_base_util__WEBPACK_IMPORTED_MODULE_2__["isEditable"])(args.column, args.requestType, args.element), enableRtl: this.parent.enableRtl,
            change: this.switchModeChange.bind(this)
        }, args.column.edit.params));
        this.obj.appendTo(args.element);
    };
    ToggleEditCell.prototype.switchModeChange = function (args) {
        if (this.editRow && this.editType !== 'Dialog') {
            var addClass = false;
            if (!args.checked) {
                this.editRow.removeAttribute('aria-selected');
            }
            else {
                addClass = true;
                this.editRow.setAttribute('aria-selected', addClass.toString());
            }
            _base_util__WEBPACK_IMPORTED_MODULE_2__["addRemoveActiveClasses"].apply(void 0, [[].slice.call(this.editRow.querySelectorAll('.e-rowcell')), addClass].concat(this.activeClasses));
        }
    };
    ToggleEditCell.prototype.destroy = function () {
        if (this.obj) {
            this.obj.destroy();
        }
    };
    return ToggleEditCell;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/virtual-content-renderer.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/renderer/virtual-content-renderer.js ***!
  \******************************************************************************************/
/*! exports provided: VirtualContentRenderer, VirtualHeaderRenderer, VirtualElementHandler */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualContentRenderer", function() { return VirtualContentRenderer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualHeaderRenderer", function() { return VirtualHeaderRenderer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualElementHandler", function() { return VirtualElementHandler; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _content_renderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./content-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/content-renderer.js");
/* harmony import */ var _header_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./header-renderer */ "./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-renderer.js");
/* harmony import */ var _services_intersection_observer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../services/intersection-observer */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/intersection-observer.js");
/* harmony import */ var _services_virtual_row_model_generator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../services/virtual-row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/virtual-row-model-generator.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();












/**
 * VirtualContentRenderer
 * @hidden
 */
var VirtualContentRenderer = /** @class */ (function (_super) {
    __extends(VirtualContentRenderer, _super);
    function VirtualContentRenderer(parent, locator) {
        var _this = _super.call(this, parent, locator) || this;
        _this.prevHeight = 0;
        _this.currentInfo = {};
        _this.preventEvent = false;
        _this.actions = ['filtering', 'searching', 'grouping', 'ungrouping'];
        _this.offsets = {};
        _this.tmpOffsets = {};
        _this.virtualEle = new VirtualElementHandler();
        _this.offsetKeys = [];
        _this.isFocused = false;
        _this.locator = locator;
        _this.eventListener('on');
        _this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnVisibilityChanged"], _this.setVisible, _this);
        _this.vgenerator = _this.generator;
        return _this;
    }
    VirtualContentRenderer.prototype.renderTable = function () {
        this.header = this.locator.getService('rendererFactory').getRenderer(_base_enum__WEBPACK_IMPORTED_MODULE_3__["RenderType"].Header);
        _super.prototype.renderTable.call(this);
        this.virtualEle.table = this.getTable();
        this.virtualEle.content = this.content = this.getPanel().firstChild;
        this.virtualEle.renderWrapper(this.parent.height);
        this.virtualEle.renderPlaceHolder();
        this.virtualEle.wrapper.style.position = 'absolute';
        var debounceEvent = (this.parent.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] && !this.parent.dataSource.dataSource.offline);
        var opt = {
            container: this.content, pageHeight: this.getBlockHeight() * 2, debounceEvent: debounceEvent,
            axes: this.parent.enableColumnVirtualization ? ['X', 'Y'] : ['Y']
        };
        this.observer = new _services_intersection_observer__WEBPACK_IMPORTED_MODULE_6__["InterSectionObserver"](this.virtualEle.wrapper, opt);
    };
    VirtualContentRenderer.prototype.renderEmpty = function (tbody) {
        this.getTable().appendChild(tbody);
        this.virtualEle.adjustTable(0, 0);
    };
    VirtualContentRenderer.prototype.scrollListener = function (scrollArgs) {
        if (this.parent.enablePersistence) {
            this.parent.scrollPosition = scrollArgs.offset;
        }
        if (this.preventEvent || this.parent.isDestroyed) {
            this.preventEvent = false;
            return;
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(document.activeElement)) {
            this.isFocused = false;
        }
        else {
            this.isFocused = this.content === Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(document.activeElement, '.e-content') || this.content === document.activeElement;
        }
        var info = scrollArgs.sentinel;
        var viewInfo = this.currentInfo = this.getInfoFromView(scrollArgs.direction, info, scrollArgs.offset);
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(this.parent)) {
            if ((info.axis === 'Y' && this.prevInfo.blockIndexes.toString() === viewInfo.blockIndexes.toString())
                && scrollArgs.direction === 'up' && viewInfo.blockIndexes[viewInfo.blockIndexes.length - 1] !== 2) {
                return;
            }
            else {
                viewInfo.event = 'refresh-virtual-block';
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(viewInfo.offsets)) {
                    viewInfo.offsets.top = this.content.scrollTop;
                }
                this.parent.notify(viewInfo.event, { requestType: 'virtualscroll', virtualInfo: viewInfo, focusElement: scrollArgs.focusElement });
                return;
            }
        }
        if (this.prevInfo && ((info.axis === 'Y' && this.prevInfo.blockIndexes.toString() === viewInfo.blockIndexes.toString())
            || (info.axis === 'X' && this.prevInfo.columnIndexes.toString() === viewInfo.columnIndexes.toString()))) {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE) {
                this.parent.hideSpinner();
            }
            return;
        }
        this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
        this.parent.pageSettings.currentPage = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page;
        this.parent.notify(viewInfo.event, { requestType: 'virtualscroll', virtualInfo: viewInfo, focusElement: scrollArgs.focusElement });
    };
    VirtualContentRenderer.prototype.block = function (blk) {
        return this.vgenerator.isBlockAvailable(blk);
    };
    VirtualContentRenderer.prototype.getInfoFromView = function (direction, info, e) {
        var tempBlocks = [];
        var infoType = { direction: direction, sentinelInfo: info, offsets: e };
        var vHeight = this.parent.height.toString().indexOf('%') < 0 ? this.content.getBoundingClientRect().height :
            this.parent.element.getBoundingClientRect().height;
        infoType.page = this.getPageFromTop(e.top + vHeight, infoType);
        infoType.blockIndexes = tempBlocks = this.vgenerator.getBlockIndexes(infoType.page);
        infoType.loadSelf = !this.vgenerator.isBlockAvailable(tempBlocks[infoType.block]);
        var blocks = this.ensureBlocks(infoType);
        infoType.blockIndexes = blocks;
        infoType.loadNext = !blocks.filter(function (val) { return tempBlocks.indexOf(val) === -1; })
            .every(this.block.bind(this));
        infoType.event = (infoType.loadNext || infoType.loadSelf) ? _base_constant__WEBPACK_IMPORTED_MODULE_2__["modelChanged"] : _base_constant__WEBPACK_IMPORTED_MODULE_2__["refreshVirtualBlock"];
        infoType.nextInfo = infoType.loadNext ? { page: Math.max(1, infoType.page + (direction === 'down' ? 1 : -1)) } : {};
        infoType.columnIndexes = info.axis === 'X' ? this.vgenerator.getColumnIndexes() : this.parent.getColumnIndexesInView();
        if (this.parent.enableColumnVirtualization && info.axis === 'X') {
            infoType.event = _base_constant__WEBPACK_IMPORTED_MODULE_2__["refreshVirtualBlock"];
        }
        return infoType;
    };
    VirtualContentRenderer.prototype.ensureBlocks = function (info) {
        var _this = this;
        var index = info.blockIndexes[info.block];
        var mIdx;
        var old = index;
        var max = Math.max;
        var indexes = info.direction === 'down' ? [max(index, 1), ++index, ++index] : [max(index - 1, 1), index, index + 1];
        indexes = indexes.filter(function (val, ind) { return indexes.indexOf(val) === ind; });
        if (this.prevInfo.blockIndexes.toString() === indexes.toString()) {
            return indexes;
        }
        if (info.loadSelf || (info.direction === 'down' && this.isEndBlock(old))) {
            indexes = this.vgenerator.getBlockIndexes(info.page);
        }
        indexes.some(function (val, ind) {
            var result = val === (Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(_this.parent) ? _this.getGroupedTotalBlocks() : _this.getTotalBlocks());
            if (result) {
                mIdx = ind;
            }
            return result;
        });
        if (mIdx !== undefined) {
            indexes = indexes.slice(0, mIdx + 1);
            if (info.block === 0 && indexes.length === 1 && this.vgenerator.isBlockAvailable(indexes[0] - 1)) {
                indexes = [indexes[0] - 1, indexes[0]];
            }
        }
        return indexes;
    };
    VirtualContentRenderer.prototype.appendContent = function (target, newChild, e) {
        // currentInfo value will be used if there are multiple dom updates happened due to mousewheel
        var info = e.virtualInfo.sentinelInfo && e.virtualInfo.sentinelInfo.axis === 'Y' && this.currentInfo.page &&
            this.currentInfo.page !== e.virtualInfo.page ? this.currentInfo : e.virtualInfo;
        this.prevInfo = this.prevInfo || e.virtualInfo;
        var cBlock = (info.columnIndexes[0]) - 1;
        var cOffset = this.getColumnOffset(cBlock);
        var width;
        var blocks = info.blockIndexes;
        if (this.parent.groupSettings.columns.length) {
            this.refreshOffsets();
        }
        if (this.parent.height === '100%') {
            this.parent.element.style.height = '100%';
        }
        var vHeight = this.parent.height.toString().indexOf('%') < 0 ? this.content.getBoundingClientRect().height :
            this.parent.element.getBoundingClientRect().height;
        var translate = this.getTranslateY(this.content.scrollTop, vHeight, info);
        this.virtualEle.adjustTable(cOffset, translate);
        if (this.parent.enableColumnVirtualization) {
            this.header.virtualEle.adjustTable(cOffset, 0);
        }
        if (this.parent.enableColumnVirtualization) {
            var cIndex = info.columnIndexes;
            width = this.getColumnOffset(cIndex[cIndex.length - 1]) - this.getColumnOffset(cIndex[0] - 1) + '';
            this.header.virtualEle.setWrapperWidth(width);
        }
        this.virtualEle.setWrapperWidth(width, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'edge');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target.parentNode)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(target);
        }
        var tbody = this.parent.element.querySelector('.e-content').querySelector('tbody');
        if (tbody) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(tbody);
            target = null;
        }
        target = this.parent.createElement('tbody');
        target.appendChild(newChild);
        this.getTable().appendChild(target);
        if (this.parent.groupSettings.columns.length) {
            if (!Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(this.parent) && info.direction === 'up') {
                var blk = this.offsets[this.getTotalBlocks()] - this.prevHeight;
                this.preventEvent = true;
                var sTop = this.content.scrollTop;
                this.content.scrollTop = sTop + blk;
            }
            this.setVirtualHeight();
            this.observer.setPageHeight(this.getOffset(blocks[blocks.length - 1]) - this.getOffset(blocks[0] - 1));
        }
        this.prevInfo = info;
        if (this.isFocused) {
            this.content.focus();
        }
    };
    VirtualContentRenderer.prototype.onDataReady = function (e) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.count)) {
            this.count = e.count;
            this.maxPage = Math.ceil(e.count / this.parent.pageSettings.pageSize);
        }
        this.vgenerator.checkAndResetCache(e.requestType);
        if (['refresh', 'filtering', 'searching', 'grouping', 'ungrouping', 'reorder', undefined]
            .some(function (value) { return e.requestType === value; })) {
            this.refreshOffsets();
        }
        this.setVirtualHeight();
        this.resetScrollPosition(e.requestType);
    };
    VirtualContentRenderer.prototype.setVirtualHeight = function () {
        var width = this.parent.enableColumnVirtualization ?
            this.getColumnOffset(this.parent.columns.length + this.parent.groupSettings.columns.length - 1) + 'px' : '100%';
        this.virtualEle.setVirtualHeight(this.offsets[Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(this.parent) ? this.getGroupedTotalBlocks() : this.getTotalBlocks()], width);
        if (this.parent.enableColumnVirtualization) {
            this.header.virtualEle.setVirtualHeight(1, width);
        }
    };
    VirtualContentRenderer.prototype.getPageFromTop = function (sTop, info) {
        var _this = this;
        var total = (Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(this.parent)) ? this.getGroupedTotalBlocks() : this.getTotalBlocks();
        var page = 0;
        var extra = this.offsets[total] - this.prevHeight;
        this.offsetKeys.some(function (offset) {
            var iOffset = Number(offset);
            var border = sTop <= _this.offsets[offset] || (iOffset === total && sTop > _this.offsets[offset]);
            if (border) {
                info.block = iOffset % 2 === 0 ? 1 : 0;
                page = Math.max(1, Math.min(_this.vgenerator.getPage(iOffset), _this.maxPage));
            }
            return border;
        });
        return page;
    };
    VirtualContentRenderer.prototype.getTranslateY = function (sTop, cHeight, info, isOnenter) {
        if (info === undefined) {
            info = { page: this.getPageFromTop(sTop + cHeight, {}) };
            info.blockIndexes = this.vgenerator.getBlockIndexes(info.page);
        }
        var block = (info.blockIndexes[0] || 1) - 1;
        var translate = this.getOffset(block);
        var endTranslate = this.getOffset(info.blockIndexes[info.blockIndexes.length - 1]);
        if (isOnenter) {
            info = this.prevInfo;
        }
        var result = translate > sTop ?
            this.getOffset(block - 1) : endTranslate < (sTop + cHeight) ? this.getOffset(block + 1) : translate;
        var blockHeight = this.offsets[info.blockIndexes[info.blockIndexes.length - 1]] -
            this.tmpOffsets[info.blockIndexes[0]];
        if (result + blockHeight > this.offsets[Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(this.parent) ? this.getGroupedTotalBlocks() : this.getTotalBlocks()]) {
            result -= (result + blockHeight) - this.offsets[this.getTotalBlocks()];
        }
        return result;
    };
    VirtualContentRenderer.prototype.getOffset = function (block) {
        return Math.min(this.offsets[block] | 0, this.offsets[this.maxBlock] | 0);
    };
    VirtualContentRenderer.prototype.onEntered = function () {
        var _this = this;
        return function (element, current, direction, e, isWheel, check) {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE && !isWheel && check && !_this.preventEvent) {
                _this.parent.showSpinner();
            }
            var xAxis = current.axis === 'X';
            var top = _this.prevInfo.offsets ? _this.prevInfo.offsets.top : null;
            var height = _this.content.getBoundingClientRect().height;
            var x = _this.getColumnOffset(xAxis ? _this.vgenerator.getColumnIndexes()[0] - 1 : _this.prevInfo.columnIndexes[0] - 1);
            var y = _this.getTranslateY(e.top, height, xAxis && top === e.top ? _this.prevInfo : undefined, true);
            _this.virtualEle.adjustTable(x, Math.min(y, _this.offsets[_this.maxBlock]));
            if (_this.parent.enableColumnVirtualization) {
                _this.header.virtualEle.adjustTable(x, 0);
            }
        };
    };
    VirtualContentRenderer.prototype.eventListener = function (action) {
        var _this = this;
        this.parent[action](_base_constant__WEBPACK_IMPORTED_MODULE_2__["dataReady"], this.onDataReady, this);
        this.parent[action](_base_constant__WEBPACK_IMPORTED_MODULE_2__["refreshVirtualBlock"], this.refreshContentRows, this);
        this.actions.forEach(function (event) { return _this.parent[action](event + "-begin", _this.onActionBegin, _this); });
        var fn = function () {
            _this.observer.observe(function (scrollArgs) { return _this.scrollListener(scrollArgs); }, _this.onEntered());
            var gObj = _this.parent;
            if (gObj.enablePersistence && gObj.scrollPosition) {
                _this.content.scrollTop = gObj.scrollPosition.top;
                var scrollValues = { direction: 'down', sentinel: _this.observer.sentinelInfo.down,
                    offset: gObj.scrollPosition, focusElement: gObj.element };
                _this.scrollListener(scrollValues);
                if (gObj.enableColumnVirtualization) {
                    _this.content.scrollLeft = gObj.scrollPosition.left;
                }
            }
            _this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], fn);
        };
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], fn, this);
    };
    VirtualContentRenderer.prototype.getBlockSize = function () {
        return this.parent.pageSettings.pageSize >> 1;
    };
    VirtualContentRenderer.prototype.getBlockHeight = function () {
        return this.getBlockSize() * this.parent.getRowHeight();
    };
    VirtualContentRenderer.prototype.isEndBlock = function (index) {
        var totalBlocks = this.getTotalBlocks();
        return index >= totalBlocks || index === totalBlocks - 1;
    };
    VirtualContentRenderer.prototype.getGroupedTotalBlocks = function () {
        var rows = this.parent.vcRows;
        return Math.floor((rows.length / this.getBlockSize()) < 1 ? 1 : rows.length / this.getBlockSize());
    };
    VirtualContentRenderer.prototype.getTotalBlocks = function () {
        return Math.ceil(this.count / this.getBlockSize());
    };
    VirtualContentRenderer.prototype.getColumnOffset = function (block) {
        return this.vgenerator.cOffsets[block] | 0;
    };
    VirtualContentRenderer.prototype.getModelGenerator = function () {
        return new _services_virtual_row_model_generator__WEBPACK_IMPORTED_MODULE_7__["VirtualRowModelGenerator"](this.parent);
    };
    VirtualContentRenderer.prototype.resetScrollPosition = function (action) {
        if (this.actions.some(function (value) { return value === action; })) {
            this.preventEvent = this.content.scrollTop !== 0;
            this.content.scrollTop = 0;
        }
    };
    VirtualContentRenderer.prototype.onActionBegin = function (e) {
        //Update property silently..
        this.parent.setProperties({ pageSettings: { currentPage: 1 } }, true);
    };
    VirtualContentRenderer.prototype.getRows = function () {
        return this.vgenerator.getRows();
    };
    VirtualContentRenderer.prototype.getRowByIndex = function (index) {
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(this.parent)) {
            return this.parent.getDataRows()[index];
        }
        var prev = this.prevInfo.blockIndexes;
        var startIdx = (prev[0] - 1) * this.getBlockSize();
        return this.parent.getDataRows()[index - startIdx];
    };
    VirtualContentRenderer.prototype.getVirtualRowIndex = function (index) {
        var prev = this.prevInfo.blockIndexes;
        var startIdx = (prev[0] - 1) * this.getBlockSize();
        return startIdx + index;
    };
    VirtualContentRenderer.prototype.refreshOffsets = function () {
        var _this = this;
        var gObj = this.parent;
        var row = 0;
        var bSize = this.getBlockSize();
        var total = Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(this.parent) ? this.getGroupedTotalBlocks() : this.getTotalBlocks();
        this.prevHeight = this.offsets[total];
        this.maxBlock = total % 2 === 0 ? total - 2 : total - 1;
        this.offsets = {};
        //Row offset update
        Array.apply(null, Array(total)).map(function () { return ++row; })
            .forEach(function (block) {
            var tmp = (_this.vgenerator.cache[block] || []).length;
            var rem = !Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(_this.parent) ? _this.count % bSize : (gObj.vcRows.length % bSize);
            var size = !Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(_this.parent) && block in _this.vgenerator.cache ?
                tmp * _this.parent.getRowHeight() : rem && block === total ? rem * _this.parent.getRowHeight() : _this.getBlockHeight();
            // let size: number = this.parent.groupSettings.columns.length && block in this.vgenerator.cache ?
            // tmp * getRowHeight() : this.getBlockHeight();
            _this.offsets[block] = (_this.offsets[block - 1] | 0) + size;
            _this.tmpOffsets[block] = _this.offsets[block - 1] | 0;
        });
        this.offsetKeys = Object.keys(this.offsets);
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_8__["isGroupAdaptive"])(this.parent)) {
            this.parent.vGroupOffsets = this.offsets;
        }
        //Column offset update
        if (this.parent.enableColumnVirtualization) {
            this.vgenerator.refreshColOffsets();
        }
    };
    VirtualContentRenderer.prototype.refreshVirtualElement = function () {
        this.vgenerator.refreshColOffsets();
        this.setVirtualHeight();
    };
    VirtualContentRenderer.prototype.setVisible = function (columns) {
        var gObj = this.parent;
        var rows = [];
        rows = this.getRows();
        var testRow;
        rows.some(function (r) { if (r.isDataRow) {
            testRow = r;
        } return r.isDataRow; });
        var needFullRefresh = true;
        if (!gObj.groupSettings.columns.length && testRow) {
            needFullRefresh = false;
        }
        var tr = gObj.getDataRows();
        for (var c = 0, clen = columns.length; c < clen; c++) {
            var column = columns[c];
            var idx = gObj.getNormalizedColumnIndex(column.uid);
            var displayVal = column.visible === true ? '' : 'none';
            if (idx !== -1 && testRow && idx < testRow.cells.length) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.getColGroup().childNodes[idx], { 'display': displayVal });
            }
            if (!needFullRefresh) {
                var width = void 0;
                if (column.visible) {
                    width = this.virtualEle.wrapper.offsetWidth + parseInt(column.width.toString(), 10);
                }
                else {
                    width = this.virtualEle.wrapper.offsetWidth - parseInt(column.width.toString(), 10);
                }
                if (width > gObj.width) {
                    this.setDisplayNone(tr, idx, displayVal, rows);
                    this.virtualEle.setWrapperWidth(width + '');
                    this.vgenerator.refreshColOffsets();
                    this.refreshVirtualElement();
                }
                else {
                    this.refreshContentRows({ requestType: 'refresh' });
                }
            }
            if (!this.parent.invokedFromMedia && column.hideAtMedia) {
                this.parent.updateMediaColumns(column);
            }
            this.parent.invokedFromMedia = false;
        }
        if (needFullRefresh) {
            this.refreshContentRows({ requestType: 'refresh' });
        }
        else {
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["partialRefresh"], { rows: rows, args: { isFrozen: false, rows: rows } });
        }
    };
    return VirtualContentRenderer;
}(_content_renderer__WEBPACK_IMPORTED_MODULE_4__["ContentRender"]));

/**
 * @hidden
 */
var VirtualHeaderRenderer = /** @class */ (function (_super) {
    __extends(VirtualHeaderRenderer, _super);
    function VirtualHeaderRenderer(parent, locator) {
        var _this = _super.call(this, parent, locator) || this;
        _this.virtualEle = new VirtualElementHandler();
        _this.gen = new _services_virtual_row_model_generator__WEBPACK_IMPORTED_MODULE_7__["VirtualRowModelGenerator"](_this.parent);
        _this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["columnVisibilityChanged"], _this.setVisible, _this);
        _this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["refreshVirtualBlock"], function (e) { return e.virtualInfo.sentinelInfo.axis === 'X' ? _this.refreshUI() : null; }, _this);
        return _this;
    }
    VirtualHeaderRenderer.prototype.renderTable = function () {
        this.gen.refreshColOffsets();
        this.parent.setColumnIndexesInView(this.gen.getColumnIndexes(this.getPanel().firstChild));
        _super.prototype.renderTable.call(this);
        this.virtualEle.table = this.getTable();
        this.virtualEle.content = this.getPanel().firstChild;
        this.virtualEle.content.style.position = 'relative';
        this.virtualEle.renderWrapper();
        this.virtualEle.renderPlaceHolder('absolute');
    };
    VirtualHeaderRenderer.prototype.appendContent = function (table) {
        this.virtualEle.wrapper.appendChild(table);
    };
    VirtualHeaderRenderer.prototype.refreshUI = function () {
        this.gen.refreshColOffsets();
        this.parent.setColumnIndexesInView(this.gen.getColumnIndexes(this.getPanel().firstChild));
        _super.prototype.refreshUI.call(this);
    };
    VirtualHeaderRenderer.prototype.setVisible = function (columns) {
        var gObj = this.parent;
        var displayVal;
        var idx;
        for (var c = 0, clen = columns.length; c < clen; c++) {
            var column = columns[c];
            idx = gObj.getNormalizedColumnIndex(column.uid);
            displayVal = column.visible ? '' : 'none';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.getColGroup().children[idx], { 'display': displayVal });
            if (gObj.enableColumnVirtualization && !gObj.groupSettings.columns.length) {
                var tablewidth = void 0;
                if (column.visible) {
                    tablewidth = this.virtualEle.wrapper.offsetWidth + parseInt(column.width.toString(), 10);
                }
                else {
                    tablewidth = this.virtualEle.wrapper.offsetWidth - parseInt(column.width.toString(), 10);
                }
                if (tablewidth > gObj.width) {
                    this.setDisplayNone(column, displayVal);
                    this.virtualEle.setWrapperWidth(tablewidth + '');
                    this.gen.refreshColOffsets();
                }
                else {
                    this.refreshUI();
                }
            }
            else {
                this.refreshUI();
            }
        }
    };
    VirtualHeaderRenderer.prototype.setDisplayNone = function (col, displayVal) {
        for (var _i = 0, _a = [].slice.apply(this.getTable().querySelectorAll('th.e-headercell')); _i < _a.length; _i++) {
            var ele = _a[_i];
            if (ele.querySelector('[e-mappinguid]') &&
                ele.querySelector('[e-mappinguid]').getAttribute('e-mappinguid') === col.uid) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(ele, { 'display': displayVal });
                break;
            }
        }
    };
    return VirtualHeaderRenderer;
}(_header_renderer__WEBPACK_IMPORTED_MODULE_5__["HeaderRender"]));

/**
 * @hidden
 */
var VirtualElementHandler = /** @class */ (function () {
    function VirtualElementHandler() {
    }
    VirtualElementHandler.prototype.renderWrapper = function (height) {
        this.wrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-virtualtable', styles: "min-height:" + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(height) });
        this.wrapper.appendChild(this.table);
        this.content.appendChild(this.wrapper);
    };
    VirtualElementHandler.prototype.renderPlaceHolder = function (position) {
        if (position === void 0) { position = 'relative'; }
        this.placeholder = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-virtualtrack', styles: "position:" + position });
        this.content.appendChild(this.placeholder);
    };
    VirtualElementHandler.prototype.adjustTable = function (xValue, yValue) {
        this.wrapper.style.transform = "translate(" + xValue + "px, " + yValue + "px)";
    };
    VirtualElementHandler.prototype.setWrapperWidth = function (width, full) {
        this.wrapper.style.width = width ? width + "px" : full ? '100%' : '';
    };
    VirtualElementHandler.prototype.setVirtualHeight = function (height, width) {
        this.placeholder.style.height = height + "px";
        this.placeholder.style.width = width;
    };
    return VirtualElementHandler;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services.js ***!
  \*****************************************************************/
/*! exports provided: CellRendererFactory, ServiceLocator, RowModelGenerator, GroupModelGenerator, FreezeRowModelGenerator, ValueFormatter, VirtualRowModelGenerator, InterSectionObserver */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _services_cell_render_factory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./services/cell-render-factory */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/cell-render-factory.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRendererFactory", function() { return _services_cell_render_factory__WEBPACK_IMPORTED_MODULE_0__["CellRendererFactory"]; });

/* harmony import */ var _services_service_locator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./services/service-locator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/service-locator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServiceLocator", function() { return _services_service_locator__WEBPACK_IMPORTED_MODULE_1__["ServiceLocator"]; });

/* harmony import */ var _services_row_model_generator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./services/row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowModelGenerator", function() { return _services_row_model_generator__WEBPACK_IMPORTED_MODULE_2__["RowModelGenerator"]; });

/* harmony import */ var _services_group_model_generator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./services/group-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/group-model-generator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupModelGenerator", function() { return _services_group_model_generator__WEBPACK_IMPORTED_MODULE_3__["GroupModelGenerator"]; });

/* harmony import */ var _services_freeze_row_model_generator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./services/freeze-row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/freeze-row-model-generator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeRowModelGenerator", function() { return _services_freeze_row_model_generator__WEBPACK_IMPORTED_MODULE_4__["FreezeRowModelGenerator"]; });

/* harmony import */ var _services_value_formatter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./services/value-formatter */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatter", function() { return _services_value_formatter__WEBPACK_IMPORTED_MODULE_5__["ValueFormatter"]; });

/* harmony import */ var _services_virtual_row_model_generator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./services/virtual-row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/virtual-row-model-generator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualRowModelGenerator", function() { return _services_virtual_row_model_generator__WEBPACK_IMPORTED_MODULE_6__["VirtualRowModelGenerator"]; });

/* harmony import */ var _services_intersection_observer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./services/intersection-observer */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/intersection-observer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InterSectionObserver", function() { return _services_intersection_observer__WEBPACK_IMPORTED_MODULE_7__["InterSectionObserver"]; });

/**
 * Services
 */










/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/aria-service.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/aria-service.js ***!
  \******************************************************************************/
/*! exports provided: AriaService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AriaService", function() { return AriaService; });
/**
 * AriaService
 * @hidden
 */
var AriaService = /** @class */ (function () {
    function AriaService() {
    }
    AriaService.prototype.setOptions = function (target, options) {
        var props = Object.keys(options);
        props.forEach(function (name) { return setStateAndProperties(target, config[name], options[name]); });
    };
    AriaService.prototype.setExpand = function (target, expand) {
        setStateAndProperties(target, config.expand, expand);
    };
    AriaService.prototype.setSort = function (target, direction) {
        setStateAndProperties(target, config.sort, direction, typeof direction === 'boolean');
    };
    AriaService.prototype.setBusy = function (target, isBusy) {
        setStateAndProperties(target, config.busy, isBusy);
        setStateAndProperties(target, config.invalid, null, true);
    };
    AriaService.prototype.setGrabbed = function (target, isGrabbed, remove) {
        setStateAndProperties(target, config.grabbed, isGrabbed, remove);
    };
    AriaService.prototype.setDropTarget = function (target, isTarget) {
        setStateAndProperties(target, config.dropeffect, 'copy', !isTarget);
    };
    return AriaService;
}());

/**
 * @hidden
 */
function setStateAndProperties(target, attribute, value, remove) {
    if (remove) {
        target.removeAttribute(attribute);
        return;
    }
    if (target) {
        target.setAttribute(attribute, value);
    }
}
var config = {
    expand: 'aria-expanded',
    role: 'role',
    selected: 'aria-selected',
    multiselectable: 'aria-multiselectable',
    sort: 'aria-sort',
    busy: 'aria-busy',
    invalid: 'aria-invalid',
    grabbed: 'aria-grabbed',
    dropeffect: 'aria-dropeffect',
    haspopup: 'aria-haspopup',
    level: 'aria-level',
    colcount: 'aria-colcount'
};


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/cell-render-factory.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/cell-render-factory.js ***!
  \*************************************************************************************/
/*! exports provided: CellRendererFactory */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellRendererFactory", function() { return CellRendererFactory; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");


/**
 * CellRendererFactory
 * @hidden
 */
var CellRendererFactory = /** @class */ (function () {
    function CellRendererFactory() {
        this.cellRenderMap = {};
    }
    CellRendererFactory.prototype.addCellRenderer = function (name, type) {
        name = typeof name === 'string' ? name : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"], name);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cellRenderMap[name])) {
            this.cellRenderMap[name] = type;
        }
    };
    CellRendererFactory.prototype.getCellRenderer = function (name) {
        name = typeof name === 'string' ? name : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"], name);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cellRenderMap[name])) {
            throw "The cellRenderer " + name + " is not found";
        }
        else {
            return this.cellRenderMap[name];
        }
    };
    return CellRendererFactory;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/focus-strategy.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/focus-strategy.js ***!
  \********************************************************************************/
/*! exports provided: FocusStrategy, Matrix, ContentFocus, HeaderFocus, FixedContentFocus, FixedHeaderFocus, SearchBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FocusStrategy", function() { return FocusStrategy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Matrix", function() { return Matrix; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentFocus", function() { return ContentFocus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderFocus", function() { return HeaderFocus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FixedContentFocus", function() { return FixedContentFocus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FixedHeaderFocus", function() { return FixedHeaderFocus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SearchBox", function() { return SearchBox; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * FocusStrategy class
 * @hidden
 */
var FocusStrategy = /** @class */ (function () {
    function FocusStrategy(parent) {
        this.currentInfo = {};
        this.oneTime = true;
        this.swap = {};
        this.forget = true;
        this.skipFocus = true;
        this.focusByClick = false;
        this.prevIndexes = {};
        this.parent = parent;
        this.addEventListener();
    }
    FocusStrategy.prototype.focusCheck = function (e) {
        var target = e.target;
        this.focusByClick = true;
        this.skipFocus = target.classList.contains('e-grid');
    };
    FocusStrategy.prototype.onFocus = function () {
        if (this.parent.isDestroyed || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice || this.parent.enableVirtualization) {
            return;
        }
        this.setActive(this.parent.frozenRows === 0, this.parent.frozenColumns !== 0);
        var current = this.getContent().matrix.get(0, -1, [0, 1], null, this.getContent().validator());
        this.getContent().matrix.select(current[0], current[1]);
        if (this.skipFocus) {
            this.focus();
            this.skipFocus = false;
        }
    };
    FocusStrategy.prototype.passiveFocus = function (e) {
        if (this.parent.isDestroyed) {
            return;
        }
        if (e.target && e.target.classList.contains('e-detailcell')) {
            this.currentInfo.skipAction = false;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.currentInfo.element], ['e-focused', 'e-focus']);
        }
    };
    FocusStrategy.prototype.onBlur = function (e) {
        if ((this.parent.isEdit || e && (!e.relatedTarget || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.relatedTarget, '.e-grid')))) {
            return;
        }
        this.removeFocus();
        this.skipFocus = false;
        this.currentInfo.skipAction = false;
        if (this.getContent().getFocusInfo().elementToFocus) {
            this.getContent().getFocusInfo().elementToFocus.tabIndex = 0;
        }
    };
    FocusStrategy.prototype.onClick = function (e, force) {
        var isContent = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-gridcontent'));
        var isHeader = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-gridheader'));
        isContent = isContent && isHeader ? !isContent : isContent;
        var isFrozen = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-frozencontent')) ||
            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-frozenheader'));
        if (!isContent && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-gridheader')) ||
            e.target.classList.contains('e-content') ||
            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-unboundcell'))) {
            return;
        }
        this.setActive(isContent, isFrozen);
        if (!isContent && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-gridheader')) ||
            e.target.classList.contains('e-filtermenudiv')) {
            this.clearOutline();
            return;
        }
        var beforeArgs = { cancel: false, byKey: false, byClick: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.target), clickArgs: e };
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["beforeCellFocused"], beforeArgs);
        if (beforeArgs.cancel || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-inline-edit')) {
            return;
        }
        this.setActive(isContent, isFrozen);
        if (this.getContent()) {
            var returnVal = this.getContent().onClick(e, force);
            if (returnVal === false) {
                return;
            }
            this.focus();
        }
    };
    FocusStrategy.prototype.onKeyPress = function (e) {
        if (this.skipOn(e)) {
            return;
        }
        var beforeArgs = { cancel: false, byKey: true, byClick: false, keyArgs: e };
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["beforeCellFocused"], beforeArgs);
        if (beforeArgs.cancel) {
            return;
        }
        var bValue = this.getContent().matrix.current;
        this.currentInfo.outline = true;
        var swapInfo = this.getContent().jump(e.action, bValue);
        this.swap = swapInfo;
        if (swapInfo.swap) {
            this.setActive(!swapInfo.toHeader, swapInfo.toFrozen);
            this.getContent().matrix.current = this.getContent().getNextCurrent(bValue, swapInfo, this.active, e.action);
            this.prevIndexes = {};
        }
        this.setActiveByKey(e.action, this.getContent());
        var returnVal = this.getContent().onKeyPress(e);
        if (returnVal === false) {
            this.clearIndicator();
            return;
        }
        e.preventDefault();
        this.focus(e);
    };
    FocusStrategy.prototype.skipOn = function (e) {
        var target = e.target;
        if (!target) {
            return false;
        }
        if (this.currentInfo.skipAction) {
            this.clearIndicator();
            return true;
        }
        if (['pageUp', 'pageDown'].indexOf(e.action) > -1) {
            this.clearIndicator();
            return true;
        }
        var th = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'th') && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'th').tabIndex;
        if (th && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(document.activeElement, '.e-filterbarcell') !== null) {
            this.removeFocus();
        }
        return (e.action === 'delete'
            || (this.parent.editSettings.mode !== 'Batch' && (this.parent.isEdit || ['insert', 'f2'].indexOf(e.action) > -1))
            || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(document.activeElement, '.e-filterbarcell') !== null ||
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(document.activeElement, '#' + this.parent.element.id + '_searchbar') !== null
                    && ['enter', 'leftArrow', 'rightArrow',
                        'shiftLeft', 'shiftRight', 'ctrlPlusA'].indexOf(e.action) > -1)
            || (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-gridcontent') === null && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-gridheader') === null)
            || (e.action === 'space' && (!target.classList.contains('e-gridchkbox') && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-gridchkbox') === null
                && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.e-headerchkcelldiv') === null)));
    };
    FocusStrategy.prototype.getFocusedElement = function () {
        return this.currentInfo.elementToFocus;
    };
    FocusStrategy.prototype.getContent = function () {
        return this.active || this.content;
    };
    FocusStrategy.prototype.setActive = function (content, isFrozen) {
        this.active = content ? isFrozen ? this.fContent : this.content :
            isFrozen ? this.fHeader : this.header;
    };
    FocusStrategy.prototype.setFocusedElement = function (element) {
        var _this = this;
        this.currentInfo.elementToFocus = element;
        setTimeout(function () { return _this.currentInfo.elementToFocus.focus(); }, 0);
    };
    FocusStrategy.prototype.focus = function (e) {
        this.removeFocus();
        this.addFocus(this.getContent().getFocusInfo(), e);
    };
    FocusStrategy.prototype.removeFocus = function (e) {
        if (!this.currentInfo.element) {
            return;
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.currentInfo.element, this.currentInfo.elementToFocus], ['e-focused', 'e-focus']);
        this.currentInfo.element.tabIndex = -1;
    };
    FocusStrategy.prototype.addFocus = function (info, e) {
        this.currentInfo = info;
        this.currentInfo.outline = info.outline && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e);
        if (!info.element) {
            return;
        }
        var isFocused = info.elementToFocus.classList.contains('e-focus');
        if (isFocused) {
            return;
        }
        if (this.currentInfo.outline) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([info.element], ['e-focused']);
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([info.elementToFocus], ['e-focus']);
        info.element.tabIndex = 0;
        if (!isFocused) {
            this.setFocusedElement(info.elementToFocus);
        }
        this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_2__["cellFocused"], {
            element: info.elementToFocus,
            parent: info.element,
            indexes: this.getContent().matrix.current,
            byKey: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
            byClick: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
            keyArgs: e,
            isJump: this.swap.swap,
            container: this.getContent().getInfo(e),
            outline: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
            swapInfo: this.swap
        });
        var _a = this.getContent().matrix.current, rowIndex = _a[0], cellIndex = _a[1];
        this.prevIndexes = { rowIndex: rowIndex, cellIndex: cellIndex };
        this.focusedColumnUid = this.parent.getColumnByIndex(cellIndex).uid;
        this.focusByClick = false;
    };
    FocusStrategy.prototype.refreshMatrix = function (content) {
        var _this = this;
        return function (e) {
            if (content && (e.args && e.args.isFrozen) && !_this.fContent) {
                _this.fContent = new FixedContentFocus(_this.parent);
            }
            else if (content && !_this.content) {
                _this.content = new ContentFocus(_this.parent);
            }
            if (!content && (e.args && e.args.isFrozen) && !_this.fHeader) {
                _this.fHeader = new FixedHeaderFocus(_this.parent);
            }
            else if (!content && !_this.header) {
                _this.header = new HeaderFocus(_this.parent);
            }
            var cFocus = content ? (e.args && e.args.isFrozen) ? _this.fContent : _this.content :
                (e.args && e.args.isFrozen) ? _this.fHeader : _this.header;
            var rows = content ? e.rows.slice(_this.parent.frozenRows) : e.rows;
            var updateRow = content ? e.rows.slice(0, _this.parent.frozenRows) : e.rows;
            var isRowTemplate = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.parent.rowTemplate);
            var matrix = cFocus.matrix.generate(updateRow, cFocus.selector, isRowTemplate);
            var frozenColumnsCount = _this.parent.getFrozenColumns();
            if (e.name === 'batchAdd' && frozenColumnsCount) {
                var newMovableRows = rows.map(function (row) { return row.clone(); });
                var newFrozenRows = rows.map(function (row) { return row.clone(); });
                for (var i = 0; i < rows.length; i++) {
                    if (rows[i].cells.length > frozenColumnsCount) {
                        newFrozenRows[i].cells = rows[i].cells.slice(0, frozenColumnsCount);
                        newMovableRows[i].cells = rows[i].cells.slice(frozenColumnsCount);
                    }
                }
                _this.fContent.matrix.generate(newFrozenRows, _this.fContent.selector, isRowTemplate);
                cFocus.matrix.generate(newMovableRows, cFocus.selector, isRowTemplate);
            }
            else {
                cFocus.matrix.generate(rows, cFocus.selector, isRowTemplate);
            }
            cFocus.generateRows(updateRow, { matrix: matrix, handlerInstance: (e.args && e.args.isFrozen) ? _this.fHeader : _this.header });
            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !_this.focusByClick && e && e.args && e.args.requestType === 'paging') {
                _this.skipFocus = false;
                _this.parent.element.focus();
            }
            if (e && e.args && e.args.requestType === 'virtualscroll') {
                if (_this.currentInfo.uid) {
                    var index_1;
                    var bool = e.rows.some(function (row, i) {
                        index_1 = i;
                        return row.uid === _this.currentInfo.uid;
                    });
                    if (bool) {
                        _this.content.matrix.current[0] = index_1;
                        _this.content.matrix.current[1] = _this.parent.getColumnIndexByUid(_this.focusedColumnUid) || 0;
                        var focusElement = _this.getContent().getFocusInfo().elementToFocus;
                        if (focusElement) {
                            var cellPosition = focusElement.getBoundingClientRect();
                            var gridPosition = _this.parent.element.getBoundingClientRect();
                            if (cellPosition.top >= 0 && cellPosition.left >= 0 &&
                                cellPosition.right <= Math.min(gridPosition.right, window.innerWidth ||
                                    document.documentElement.clientWidth) &&
                                cellPosition.bottom <= Math.min(gridPosition.bottom, window.innerHeight ||
                                    document.documentElement.clientHeight)) {
                                _this.focus();
                            }
                        }
                    }
                }
                else if (e.args.focusElement && e.args.focusElement.classList.contains('e-filtertext')) {
                    var focusElement = _this.parent.element.querySelector('#' + e.args.focusElement.id);
                    if (focusElement) {
                        focusElement.focus();
                    }
                }
            }
        };
    };
    FocusStrategy.prototype.addEventListener = function () {
        var _this = this;
        if (this.parent.isDestroyed) {
            return;
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.element, 'mousedown', this.focusCheck, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.element, 'focus', this.onFocus, this);
        this.parent.element.addEventListener('focus', this.passiveHandler = function (e) { return _this.passiveFocus(e); }, true);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.parent.element, 'focusout', this.onBlur, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["keyPressed"], this.onKeyPress, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.onClick, this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.refreshMatrix(true), this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["partialRefresh"], this.refreshMatrix(true), this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.refreshMatrix(), this);
        this.parent.on('close-edit', this.restoreFocus, this);
        ['start-edit', 'start-add'].forEach(function (evt) { return _this.parent.on(evt, _this.clearIndicator, _this); });
        ['sorting'].forEach(function (action) { return _this.parent.on(action + "-complete", _this.restoreFocus, _this); });
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["batchAdd"], this.refreshMatrix(true), this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["batchCancel"], this.refreshMatrix(true), this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["batchDelete"], this.refreshMatrix(true), this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["detailDataBound"], this.refreshMatrix(true), this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["onEmpty"], this.refreshMatrix(true), this);
        this.parent.on(_base_constant__WEBPACK_IMPORTED_MODULE_2__["cellFocused"], this.internalCellFocus, this);
    };
    FocusStrategy.prototype.removeEventListener = function () {
        var _this = this;
        if (this.parent.isDestroyed) {
            return;
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.element, 'mousedown', this.focusCheck);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.element, 'focus', this.onFocus);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.element, 'focusout', this.onBlur);
        this.parent.element.removeEventListener('focus', this.passiveHandler, true);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["keyPressed"], this.onKeyPress);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["click"], this.onClick);
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["contentReady"], this.refreshMatrix(true));
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["partialRefresh"], this.refreshMatrix(true));
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["headerRefreshed"], this.refreshMatrix());
        this.parent.off('close-edit', this.restoreFocus);
        ['start-edit', 'start-add'].forEach(function (evt) { return _this.parent.off(evt, _this.clearOutline); });
        ['sorting'].forEach(function (action) { return _this.parent.off(action + "-complete", _this.restoreFocus); });
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["batchAdd"], this.refreshMatrix(true));
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["batchDelete"], this.refreshMatrix(true));
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["batchCancel"], this.refreshMatrix(true));
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["detailDataBound"], this.refreshMatrix(true));
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["onEmpty"], this.refreshMatrix(true));
        this.parent.off(_base_constant__WEBPACK_IMPORTED_MODULE_2__["cellFocused"], this.internalCellFocus);
    };
    FocusStrategy.prototype.destroy = function () {
        this.removeEventListener();
    };
    FocusStrategy.prototype.restoreFocus = function () {
        this.addFocus(this.getContent().getFocusInfo());
    };
    FocusStrategy.prototype.clearOutline = function () {
        this.getContent().matrix.current = this.getContent().matrix.get(0, -1, [0, 1], 'downArrow', this.getContent().validator());
        this.clearIndicator();
    };
    FocusStrategy.prototype.clearIndicator = function () {
        if (!this.currentInfo.element || !this.currentInfo.elementToFocus) {
            return;
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.currentInfo.element, this.currentInfo.elementToFocus], ['e-focus', 'e-focused']);
    };
    FocusStrategy.prototype.getPrevIndexes = function () {
        var forget = this.forget;
        this.forget = false;
        return forget ? { rowIndex: null, cellIndex: null } : this.prevIndexes;
    };
    FocusStrategy.prototype.forgetPrevious = function () {
        this.forget = true;
    };
    FocusStrategy.prototype.setActiveByKey = function (action, active) {
        var _this = this;
        if (this.parent.frozenColumns === 0 && this.parent.frozenRows === 0) {
            return;
        }
        var info;
        var actions = {
            'home': function () { return ({ toHeader: !info.isContent, toFrozen: true }); },
            'end': function () { return ({ toHeader: !info.isContent, toFrozen: false }); },
            'ctrlHome': function () { return ({ toHeader: true, toFrozen: _this.parent.frozenColumns !== 0 }); },
            'ctrlEnd': function () { return ({ toHeader: false, toFrozen: false }); }
        };
        if (!(action in actions)) {
            return;
        }
        info = active.getInfo();
        var swap = actions[action]();
        this.setActive(!swap.toHeader, swap.toFrozen);
        this.getContent().matrix.current = active.matrix.current;
    };
    FocusStrategy.prototype.internalCellFocus = function (e) {
        if (!(e.byKey && e.container.isContent && e.keyArgs.action === 'enter'
            && (e.parent.classList.contains('e-detailcell') ||
                e.parent.classList.contains('e-unboundcell') || e.parent.classList.contains('e-templatecell')))) {
            return;
        }
        this.clearIndicator();
        var focusEle = this.getContent().getFocusable(this.getFocusedElement());
        this.setFocusedElement(focusEle);
        this.currentInfo.skipAction = true;
    };
    return FocusStrategy;
}());

/**
 * Create matrix from row collection which act as mental model for cell navigation
 * @hidden
 */
var Matrix = /** @class */ (function () {
    function Matrix() {
        this.matrix = [];
        this.current = [];
    }
    Matrix.prototype.set = function (rowIndex, columnIndex, allow) {
        rowIndex = Math.max(0, Math.min(rowIndex, this.rows));
        columnIndex = Math.max(0, Math.min(columnIndex, this.columns));
        this.matrix[rowIndex] = this.matrix[rowIndex] || [];
        this.matrix[rowIndex][columnIndex] = allow ? 1 : 0;
    };
    Matrix.prototype.get = function (rowIndex, columnIndex, navigator, action, validator) {
        var tmp = columnIndex;
        if (rowIndex + navigator[0] < 0) {
            return [rowIndex, columnIndex];
        }
        rowIndex = Math.max(0, Math.min(rowIndex + navigator[0], this.rows));
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.matrix[rowIndex])) {
            return null;
        }
        columnIndex = Math.max(0, Math.min(columnIndex + navigator[1], this.matrix[rowIndex].length - 1));
        if (tmp + navigator[1] > this.matrix[rowIndex].length - 1 && validator(rowIndex, columnIndex, action)) {
            return [rowIndex, tmp];
        }
        var first = this.first(this.matrix[rowIndex], columnIndex, navigator, true, action);
        columnIndex = first === null ? tmp : first;
        var val = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(rowIndex + "." + columnIndex, this.matrix);
        if (rowIndex === this.rows && (action === 'downArrow' || action === 'enter')) {
            navigator[0] = -1;
        }
        return this.inValid(val) || !validator(rowIndex, columnIndex, action) ?
            this.get(rowIndex, tmp, navigator, action, validator) : [rowIndex, columnIndex];
    };
    Matrix.prototype.first = function (vector, index, navigator, moveTo, action) {
        if (((index < 0 || index === vector.length) && this.inValid(vector[index])
            && (action !== 'upArrow' && action !== 'downArrow')) || !vector.some(function (v) { return v === 1; })) {
            return null;
        }
        return !this.inValid(vector[index]) ? index :
            this.first(vector, (['upArrow', 'downArrow', 'shiftUp', 'shiftDown'].indexOf(action) !== -1) ? moveTo ? 0 : ++index : index + navigator[1], navigator, false, action);
    };
    Matrix.prototype.select = function (rowIndex, columnIndex) {
        rowIndex = Math.max(0, Math.min(rowIndex, this.rows));
        columnIndex = Math.max(0, Math.min(columnIndex, this.matrix[rowIndex].length - 1));
        this.current = [rowIndex, columnIndex];
    };
    Matrix.prototype.generate = function (rows, selector, isRowTemplate) {
        var _this = this;
        this.rows = rows.length - 1;
        this.matrix = [];
        rows.forEach(function (row, rIndex) {
            var cells = row.cells.filter(function (c) { return c.isSpanned !== true; });
            _this.columns = Math.max(cells.length - 1, _this.columns | 0);
            cells.forEach(function (cell, cIndex) {
                _this.set(rIndex, cIndex, selector(row, cell, isRowTemplate));
            });
        });
        return this.matrix;
    };
    Matrix.prototype.inValid = function (value) {
        return value === 0 || value === undefined;
    };
    return Matrix;
}());

/**
 * @hidden
 */
var ContentFocus = /** @class */ (function () {
    function ContentFocus(parent) {
        var _this = this;
        this.matrix = new Matrix();
        this.parent = parent;
        this.keyActions = {
            'rightArrow': [0, 1],
            'tab': [0, 1],
            'leftArrow': [0, -1],
            'shiftTab': [0, -1],
            'upArrow': [-1, 0],
            'downArrow': [1, 0],
            'shiftUp': [-1, 0],
            'shiftDown': [1, 0],
            'shiftRight': [0, 1],
            'shiftLeft': [0, -1],
            'enter': [1, 0],
            'shiftEnter': [-1, 0]
        };
        this.indexesByKey = function (action) {
            var opt = {
                'home': [_this.matrix.current[0], -1, 0, 1],
                'end': [_this.matrix.current[0], _this.matrix.columns + 1, 0, -1],
                'ctrlHome': [0, -1, 0, 1],
                'ctrlEnd': [_this.matrix.rows, _this.matrix.columns + 1, 0, -1]
            };
            return opt[action] || null;
        };
    }
    ContentFocus.prototype.getTable = function () {
        return (this.parent.frozenColumns ?
            this.parent.getContent().querySelector('.e-movablecontent .e-table') :
            this.parent.getContentTable());
    };
    ContentFocus.prototype.onKeyPress = function (e) {
        var navigator = this.keyActions[e.action];
        var current = this.getCurrentFromAction(e.action, navigator, e.action in this.keyActions, e);
        if (!current) {
            return;
        }
        if ((['tab', 'shiftTab'].indexOf(e.action) > -1 && this.matrix.current || []).toString() === current.toString()) {
            if (current.toString() === [this.matrix.rows, this.matrix.columns].toString() ||
                current.toString() === [0, 0].toString() || (this.matrix.current[0] === this.matrix.rows &&
                this.matrix.current.toString() === current.toString())) {
                return false;
            }
            else {
                current = this.editNextRow(current[0], current[1], e.action);
            }
        }
        this.matrix.select(current[0], current[1]);
    };
    ContentFocus.prototype.editNextRow = function (rowIndex, cellIndex, action) {
        var gObj = this.parent;
        var editNextRow = gObj.editSettings.allowNextRowEdit && (gObj.isEdit || gObj.isLastCellPrimaryKey);
        var visibleIndex = gObj.getColumnIndexByField(gObj.getVisibleColumns()[0].field);
        if (action === 'tab' && editNextRow) {
            rowIndex++;
            var index = (this.getTable().rows[rowIndex].querySelectorAll('.e-indentcell').length +
                this.getTable().rows[rowIndex].querySelectorAll('.e-detailrowcollapse').length);
            cellIndex = visibleIndex + index;
        }
        if (action === 'shiftTab' && editNextRow) {
            rowIndex--;
            cellIndex = gObj.getColumnIndexByField(gObj.getVisibleColumns()[gObj.getVisibleColumns().length - 1].field);
        }
        return !this.getTable().rows[rowIndex].cells[cellIndex].classList.contains('e-rowcell') ?
            this.editNextRow(rowIndex, cellIndex, action) : [rowIndex, cellIndex];
    };
    ContentFocus.prototype.getCurrentFromAction = function (action, navigator, isPresent, e) {
        if (navigator === void 0) { navigator = [0, 0]; }
        if (!isPresent && !this.indexesByKey(action) || (this.matrix.current.length === 0)) {
            return null;
        }
        if (!this.shouldFocusChange(e)) {
            return this.matrix.current;
        }
        var _a = this.indexesByKey(action) || this.matrix.current.concat(navigator), rowIndex = _a[0], cellIndex = _a[1], rN = _a[2], cN = _a[3];
        var current = this.matrix.get(rowIndex, cellIndex, [rN, cN], action, this.validator());
        return current;
    };
    ContentFocus.prototype.onClick = function (e, force) {
        var target = e.target;
        target = (target.classList.contains('e-rowcell') ? target : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'td'));
        target = target ? target : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'td.e-detailrowcollapse')
            || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'td.e-detailrowexpand');
        target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'td.e-detailcell') ?
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-grid'), 'td.e-detailcell')) ? null : target : target;
        target = target && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'table').classList.contains('e-table') ? target : null;
        if (!target) {
            return false;
        }
        var _a = [target.parentElement.rowIndex, target.cellIndex], rowIndex = _a[0], cellIndex = _a[1];
        var _b = this.matrix.current, oRowIndex = _b[0], oCellIndex = _b[1];
        var val = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(rowIndex + "." + cellIndex, this.matrix.matrix);
        if (this.matrix.inValid(val) || (!force && oRowIndex === rowIndex && oCellIndex === cellIndex)) {
            return false;
        }
        this.matrix.select(rowIndex, cellIndex);
    };
    ContentFocus.prototype.getFocusInfo = function () {
        var info = {};
        var _a = this.matrix.current, _b = _a[0], rowIndex = _b === void 0 ? 0 : _b, _c = _a[1], cellIndex = _c === void 0 ? 0 : _c;
        this.matrix.current = [rowIndex, cellIndex];
        info.element = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.getTable().rows[rowIndex]) ? this.getTable().rows[rowIndex].cells[cellIndex] : null;
        if (!info.element) {
            return info;
        }
        info.elementToFocus = !info.element.classList.contains('e-unboundcell') && !info.element.classList.contains('e-detailcell')
            ? this.getFocusable(info.element) : info.element;
        info.outline = true;
        info.uid = info.element.parentElement.getAttribute('data-uid');
        return info;
    };
    ContentFocus.prototype.getFocusable = function (element) {
        var query = 'button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])';
        if (this.parent.isEdit) {
            query = 'input:not([type="hidden"]), select:not([aria-hidden="true"]), textarea';
        }
        var child = [].slice.call(element.querySelectorAll(query));
        /* Select the first focusable child element
         * if no child found then select the cell itself.
         * if Grid is in editable state, check for editable control inside child.
         */
        return child.length ? child[0] : element;
    };
    ContentFocus.prototype.selector = function (row, cell, isRowTemplate) {
        var types = [_base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].Expand, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].GroupCaption, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].CaptionSummary, _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].GroupSummary];
        return ((row.isDataRow && cell.visible && (cell.isDataCell || cell.isTemplate))
            || (row.isDataRow && cell.cellType === _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].DetailExpand && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cell.visible))
            || (!row.isDataRow && types.indexOf(cell.cellType) > -1)
            || (cell.column && cell.column.type === 'checkbox')
            || (cell.cellType === _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].CommandColumn)
            || (row.isDataRow && isRowTemplate))
            && !(row.edit === 'delete' && row.isDirty);
    };
    ContentFocus.prototype.jump = function (action, current) {
        var frozenSwap = this.parent.frozenColumns > 0 &&
            ((action === 'leftArrow' || action === 'shiftTab') && current[1] === 0);
        var enterFrozen = this.parent.frozenRows !== 0 && action === 'shiftEnter';
        var info = {
            swap: ((action === 'upArrow' || enterFrozen) && current[0] === 0) || frozenSwap,
            toHeader: (action === 'upArrow' || enterFrozen) && current[0] === 0,
            toFrozen: frozenSwap
        };
        return info;
    };
    ContentFocus.prototype.getNextCurrent = function (previous, swap, active, action) {
        if (previous === void 0) { previous = []; }
        var current = [];
        if (action === 'rightArrow' || action === 'tab') {
            current[0] = previous[0];
            current[1] = -1;
        }
        else if (action === 'downArrow' || action === 'enter') {
            current[0] = -1;
            current[1] = previous[1];
        }
        return current;
    };
    ContentFocus.prototype.generateRows = function (rows, optionals) {
        var _a;
        var matrix = optionals.matrix, handlerInstance = optionals.handlerInstance;
        var len = handlerInstance.matrix.matrix.length;
        var defaultLen = this.parent.allowFiltering && this.parent.filterSettings.type === 'FilterBar' ? len + 1 : len;
        handlerInstance.matrix.matrix = handlerInstance.matrix.matrix.slice(0, defaultLen); //Header matrix update.
        handlerInstance.matrix.rows = defaultLen;
        (_a = handlerInstance.matrix.matrix).push.apply(_a, matrix);
        handlerInstance.matrix.rows += matrix.length;
    };
    ContentFocus.prototype.getInfo = function (e) {
        var info = this.getFocusInfo();
        var _a = this.matrix.current, rIndex = _a[0], cIndex = _a[1];
        var isData = info.element.classList.contains('e-rowcell');
        var isSelectable = isData || (e && e.action !== 'enter' && (info.element.classList.contains('e-detailrowcollapse')
            || info.element.classList.contains('e-detailrowexpand')));
        var _b = [Math.min(parseInt(info.element.parentElement.getAttribute('aria-rowindex'), 10), rIndex),
            Math.min(parseInt(info.element.getAttribute('aria-colindex'), 10), cIndex)], rowIndex = _b[0], cellIndex = _b[1];
        return { isContent: true, isDataCell: isData, indexes: [rowIndex, cellIndex], isSelectable: isSelectable };
    };
    ContentFocus.prototype.validator = function () {
        var table = this.getTable();
        return function (rowIndex, cellIndex, action) {
            var cell = table.rows[rowIndex].cells[cellIndex];
            var isCellWidth = cell.getBoundingClientRect().width !== 0;
            if (action === 'enter' || action === 'shiftEnter') {
                return isCellWidth && cell.classList.contains('e-rowcell');
            }
            if ((action === 'shiftUp' || action === 'shiftDown') && cell.classList.contains('e-rowcell')) {
                return isCellWidth;
            }
            else if (action !== 'shiftUp' && action !== 'shiftDown') {
                return isCellWidth;
            }
            return false;
        };
    };
    ContentFocus.prototype.shouldFocusChange = function (e) {
        var _a = this.matrix.current, _b = _a[0], rIndex = _b === void 0 ? -1 : _b, _c = _a[1], cIndex = _c === void 0 ? -1 : _c;
        if (rIndex < 0 || cIndex < 0) {
            return true;
        }
        var cell = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(rIndex + ".cells." + cIndex, this.getTable().rows);
        if (!cell) {
            return true;
        }
        return e.action === 'enter' || e.action === 'shiftEnter' ?
            cell.classList.contains('e-rowcell') && !cell.classList.contains('e-unboundcell')
                && !cell.classList.contains('e-templatecell') && !cell.classList.contains('e-detailcell') : true;
    };
    return ContentFocus;
}());

/**
 * @hidden
 */
var HeaderFocus = /** @class */ (function (_super) {
    __extends(HeaderFocus, _super);
    function HeaderFocus(parent) {
        return _super.call(this, parent) || this;
    }
    HeaderFocus.prototype.getTable = function () {
        return (this.parent.getFrozenColumns() ?
            this.parent.getHeaderContent().querySelector('.e-movableheader .e-table') :
            this.parent.getHeaderTable());
    };
    HeaderFocus.prototype.onClick = function (e) {
        var target = e.target;
        target = (target.classList.contains('e-headercell') ? target : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, 'th'));
        if (!target && this.parent.frozenRows !== 0) {
            target = (e.target.classList.contains('e-rowcell') ? e.target :
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'td'));
        }
        if (e.target.classList.contains('e-columnheader') ||
            e.target.querySelector('.e-stackedheadercell')) {
            return false;
        }
        if (!target) {
            return;
        }
        var _a = [target.parentElement.rowIndex, target.cellIndex], rowIndex = _a[0], cellIndex = _a[1];
        var val = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(rowIndex + "." + cellIndex, this.matrix.matrix);
        if (this.matrix.inValid(val)) {
            return false;
        }
        this.matrix.select(target.parentElement.rowIndex, target.cellIndex);
    };
    HeaderFocus.prototype.getFocusInfo = function () {
        var info = {};
        var _a = this.matrix.current, _b = _a[0], rowIndex = _b === void 0 ? 0 : _b, _c = _a[1], cellIndex = _c === void 0 ? 0 : _c;
        info.element = this.getTable().rows[rowIndex].cells[cellIndex];
        info.elementToFocus = this.getFocusable(info.element);
        info.outline = !info.element.classList.contains('e-filterbarcell');
        return info;
    };
    HeaderFocus.prototype.selector = function (row, cell) {
        return (cell.visible && (cell.column.field !== undefined || cell.isTemplate)) || cell.column.type === 'checkbox' ||
            cell.cellType === _base_enum__WEBPACK_IMPORTED_MODULE_1__["CellType"].StackedHeader;
    };
    HeaderFocus.prototype.jump = function (action, current) {
        var frozenSwap = this.parent.frozenColumns > 0 &&
            (action === 'leftArrow' || action === 'shiftTab') && current[1] === 0;
        var enterFrozen = this.parent.frozenRows !== 0 && action === 'enter';
        return {
            swap: ((action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1) ||
                frozenSwap,
            toHeader: frozenSwap,
            toFrozen: frozenSwap
        };
    };
    HeaderFocus.prototype.getNextCurrent = function (previous, swap, active, action) {
        if (previous === void 0) { previous = []; }
        var current1 = [];
        if (action === 'upArrow' || action === 'shiftEnter') {
            current1[0] = this.matrix.matrix.length;
            current1[1] = previous[1];
        }
        else if (action === 'rightArrow' || action === 'tab') {
            current1[0] = previous[0];
            current1[1] = -1;
        }
        return current1;
    };
    HeaderFocus.prototype.generateRows = function (rows) {
        var _this = this;
        var length = this.matrix.matrix.length;
        if (this.parent.allowFiltering && this.parent.filterSettings.type === 'FilterBar') {
            this.matrix.rows = ++this.matrix.rows;
            rows[0].cells.forEach(function (cell, cIndex) {
                return _this.matrix.set(length, cIndex, cell.visible && cell.column.allowFiltering !== false);
            });
        }
    };
    HeaderFocus.prototype.getInfo = function (e) {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(_super.prototype.getInfo.call(this, e), { isContent: false, isHeader: true });
    };
    HeaderFocus.prototype.validator = function () {
        return function () { return true; };
    };
    HeaderFocus.prototype.shouldFocusChange = function (e) {
        var _a = this.matrix.current, rowIndex = _a[0], columnIndex = _a[1];
        if (rowIndex < 0 || columnIndex < 0) {
            return true;
        }
        var cell = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(rowIndex + ".cells." + columnIndex, this.getTable().rows);
        if (!cell) {
            return true;
        }
        return e.action === 'enter' || e.action === 'altDownArrow' ? !cell.classList.contains('e-headercell') : true;
    };
    return HeaderFocus;
}(ContentFocus));

var FixedContentFocus = /** @class */ (function (_super) {
    __extends(FixedContentFocus, _super);
    function FixedContentFocus() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    FixedContentFocus.prototype.getTable = function () {
        return this.parent.getContent().querySelector('.e-frozencontent .e-table');
    };
    FixedContentFocus.prototype.jump = function (action, current) {
        var enterFrozen = this.parent.frozenRows !== 0 && action === 'shiftEnter';
        return {
            swap: (action === 'upArrow' || enterFrozen) && current[0] === 0
                || ((action === 'tab' || action === 'rightArrow') && current[1] === this.matrix.columns),
            toHeader: (action === 'upArrow' || enterFrozen) && current[0] === 0,
            toFrozen: (action === 'upArrow' || enterFrozen) && current[0] === 0
        };
    };
    FixedContentFocus.prototype.getNextCurrent = function (previous, swap, active, action) {
        if (previous === void 0) { previous = []; }
        var current2 = [];
        if (action === 'leftArrow' || action === 'shiftTab') {
            current2[0] = previous[0];
            current2[1] = active.matrix.columns + 1;
        }
        else if (action === 'downArrow' || action === 'enter') {
            current2[0] = -1;
            current2[1] = previous[1];
        }
        return current2;
    };
    return FixedContentFocus;
}(ContentFocus));

var FixedHeaderFocus = /** @class */ (function (_super) {
    __extends(FixedHeaderFocus, _super);
    function FixedHeaderFocus() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    FixedHeaderFocus.prototype.jump = function (action, current) {
        var enterFrozen = this.parent.frozenRows !== 0 && action === 'enter';
        return {
            swap: (action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1
                || ((action === 'rightArrow' || action === 'tab') && current[1] === this.matrix.columns),
            toHeader: (action === 'rightArrow' || action === 'tab') && current[1] === this.matrix.columns,
            toFrozen: (action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1
        };
    };
    FixedHeaderFocus.prototype.getTable = function () {
        return (this.parent.getHeaderContent().querySelector('.e-frozenheader .e-table'));
    };
    FixedHeaderFocus.prototype.getNextCurrent = function (previous, swap, active, action) {
        if (previous === void 0) { previous = []; }
        var current3 = [];
        if (action === 'leftArrow' || action === 'shiftTab') {
            current3[0] = previous[0];
            current3[1] = active.matrix.columns + 1;
        }
        else if (action === 'upArrow' || action === 'shiftEnter') {
            current3[0] = this.matrix.matrix.length;
            current3[1] = previous[1];
        }
        return current3;
    };
    return FixedHeaderFocus;
}(HeaderFocus));

/** @hidden */
var SearchBox = /** @class */ (function () {
    function SearchBox(searchBox) {
        this.searchBox = searchBox;
    }
    SearchBox.prototype.searchFocus = function (args) {
        args.target.parentElement.classList.add('e-input-focus');
    };
    SearchBox.prototype.searchBlur = function (args) {
        args.target.parentElement.classList.remove('e-input-focus');
    };
    SearchBox.prototype.wireEvent = function () {
        if (this.searchBox) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.searchBox, 'focus', this.searchFocus, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.searchBox, 'blur', this.searchBlur, this);
        }
    };
    SearchBox.prototype.unWireEvent = function () {
        if (this.searchBox) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.searchBox, 'focus', this.searchFocus);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.searchBox, 'blur', this.searchBlur);
        }
    };
    return SearchBox;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/freeze-row-model-generator.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/freeze-row-model-generator.js ***!
  \********************************************************************************************/
/*! exports provided: FreezeRowModelGenerator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FreezeRowModelGenerator", function() { return FreezeRowModelGenerator; });
/* harmony import */ var _services_row_model_generator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../services/row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js");

/**
 * FreezeRowModelGenerator is used to generate grid data rows with freeze row and column.
 * @hidden
 */
var FreezeRowModelGenerator = /** @class */ (function () {
    function FreezeRowModelGenerator(parent) {
        this.isFrzLoad = 1;
        this.parent = parent;
        this.rowModelGenerator = new _services_row_model_generator__WEBPACK_IMPORTED_MODULE_0__["RowModelGenerator"](this.parent);
    }
    FreezeRowModelGenerator.prototype.generateRows = function (data, notifyArgs) {
        var frzCols = this.parent.getFrozenColumns();
        var row = this.rowModelGenerator.generateRows(data, notifyArgs);
        for (var i = 0, len = row.length; i < len; i++) {
            if (this.isFrzLoad % 2 === 0) {
                row[i].cells = row[i].cells.slice(frzCols, row[i].cells.length);
            }
            else {
                row[i].cells = row[i].cells.slice(0, frzCols);
            }
        }
        this.isFrzLoad++;
        return row;
    };
    return FreezeRowModelGenerator;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/group-model-generator.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/group-model-generator.js ***!
  \***************************************************************************************/
/*! exports provided: GroupModelGenerator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupModelGenerator", function() { return GroupModelGenerator; });
/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _services_row_model_generator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js");
/* harmony import */ var _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/summary-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/summary-model-generator.js");
/* harmony import */ var _grid_base_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../grid/base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * GroupModelGenerator is used to generate group caption rows and data rows.
 * @hidden
 */
var GroupModelGenerator = /** @class */ (function (_super) {
    __extends(GroupModelGenerator, _super);
    function GroupModelGenerator(parent) {
        var _this = _super.call(this, parent) || this;
        _this.rows = [];
        _this.index = 0;
        _this.parent = parent;
        _this.summaryModelGen = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__["GroupSummaryModelGenerator"](parent);
        _this.captionModelGen = new _services_summary_model_generator__WEBPACK_IMPORTED_MODULE_4__["CaptionSummaryModelGenerator"](parent);
        return _this;
    }
    GroupModelGenerator.prototype.generateRows = function (data, args) {
        if (this.parent.groupSettings.columns.length === 0) {
            return _super.prototype.generateRows.call(this, data, args);
        }
        this.rows = [];
        this.index = this.parent.enableVirtualization ? args.startIndex : 0;
        for (var i = 0, len = data.length; i < len; i++) {
            this.getGroupedRecords(0, data[i], data.level, i, undefined, this.rows.length);
        }
        this.index = 0;
        return this.rows;
    };
    GroupModelGenerator.prototype.getGroupedRecords = function (index, data, raw, parentid, childId, tIndex) {
        var _a;
        var level = raw;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(data.items)) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(data.GroupGuid)) {
                this.rows = this.rows.concat(this.generateDataRows(data, index, parentid, this.rows.length));
            }
            else {
                for (var j = 0, len = data.length; j < len; j++) {
                    this.getGroupedRecords(index, data[j], data.level, parentid, index, this.rows.length);
                }
            }
        }
        else {
            this.rows = this.rows.concat(this.generateCaptionRow(data, index, parentid, childId, tIndex));
            if (data.items && data.items.length) {
                this.getGroupedRecords(index + 1, data.items, data.items.level, parentid, index + 1, this.rows.length);
            }
            if (this.parent.aggregates.length) {
                (_a = this.rows).push.apply(_a, this.summaryModelGen.generateRows(data, { level: level }));
            }
        }
    };
    GroupModelGenerator.prototype.getCaptionRowCells = function (field, indent, data) {
        var _this = this;
        var cells = [];
        var visibles = [];
        var column = this.parent.getColumnByField(field);
        var indexes = this.parent.getColumnIndexesInView();
        if (this.parent.enableColumnVirtualization) {
            column = this.parent.columns.filter(function (c) { return c.field === field; })[0];
        }
        var groupedLen = this.parent.groupSettings.columns.length;
        var gObj = this.parent;
        if (!this.parent.enableColumnVirtualization || indexes.indexOf(indent) !== -1) {
            for (var i = 0; i < indent; i++) {
                cells.push(this.generateIndentCell());
            }
            cells.push(this.generateCell({}, null, _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].Expand));
        }
        indent = this.parent.enableColumnVirtualization ? 1 :
            (this.parent.getVisibleColumns().length + groupedLen + (gObj.detailTemplate || gObj.childGrid ? 1 : 0) -
                indent + (this.parent.getVisibleColumns().length ? -1 : 0));
        //Captionsummary cells will be added here.    
        if (this.parent.aggregates.length && !this.captionModelGen.isEmpty()) {
            var captionCells = this.captionModelGen.generateRows(data)[0];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])(data, captionCells.data);
            var cIndex_1 = 0;
            captionCells.cells.some(function (cell, index) { cIndex_1 = index; return cell.visible && cell.isDataCell; });
            visibles = captionCells.cells.slice(cIndex_1).filter(function (cell) { return cell.visible; });
            if (captionCells.visible && visibles[0].column.field === this.parent.getVisibleColumns()[0].field) {
                visibles = visibles.slice(1);
            }
            if (this.parent.getVisibleColumns().length === 1) {
                visibles = [];
            }
            indent = indent - visibles.length;
        }
        var cols = (!this.parent.enableColumnVirtualization ? [column] : this.parent.getColumns());
        var wFlag = true;
        cols.forEach(function (col, index) {
            var tmpFlag = wFlag && indexes.indexOf(indent) !== -1;
            if (tmpFlag) {
                wFlag = false;
            }
            var cellType = !_this.parent.enableColumnVirtualization || tmpFlag ?
                _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].GroupCaption : _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].GroupCaptionEmpty;
            indent = _this.parent.enableColumnVirtualization && cellType === _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].GroupCaption ? indent + groupedLen : indent;
            if (gObj.isRowDragable()) {
                indent++;
            }
            cells.push(_this.generateCell(column, null, cellType, indent));
        });
        cells.push.apply(cells, visibles);
        return cells;
    };
    GroupModelGenerator.prototype.generateCaptionRow = function (data, indent, parentID, childID, tIndex) {
        var options = {};
        var tmp = [];
        var records = 'records';
        var col = this.parent.getColumnByField(data.field);
        options.data = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["extend"])({}, data);
        if (col) {
            options.data.field = data.field;
        }
        options.isDataRow = false;
        options.isExpand = true;
        options.parentGid = parentID;
        options.childGid = childID;
        options.tIndex = tIndex;
        options.gSummary = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(data.items[records]) ? data.items[records].length : data.items.length;
        options.uid = Object(_grid_base_util__WEBPACK_IMPORTED_MODULE_5__["getUid"])('grid-row');
        var row = new _models_row__WEBPACK_IMPORTED_MODULE_0__["Row"](options);
        row.indent = indent;
        this.getForeignKeyData(row);
        row.cells = this.getCaptionRowCells(data.field, indent, row.data);
        return row;
    };
    GroupModelGenerator.prototype.getForeignKeyData = function (row) {
        var data = row.data;
        var col = this.parent.getColumnByField(data.field);
        if (col && col.isForeignColumn && col.isForeignColumn()) {
            var fkValue = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(data.key) ? '' : col.valueAccessor(col.foreignKeyValue, Object(_grid_base_util__WEBPACK_IMPORTED_MODULE_5__["getForeignData"])(col, {}, data.key)[0], col));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["setValue"])('foreignKey', fkValue, row.data);
        }
    };
    GroupModelGenerator.prototype.generateDataRows = function (data, indent, childID, tIndex) {
        var rows = [];
        var indexes = this.parent.getColumnIndexesInView();
        for (var i = 0, len = data.length; i < len; i++, tIndex++) {
            rows[i] = this.generateRow(data[i], this.index, i ? undefined : 'e-firstchildrow', indent, childID, tIndex);
            for (var j = 0; j < indent; j++) {
                if (this.parent.enableColumnVirtualization && indexes.indexOf(indent) === -1) {
                    continue;
                }
                rows[i].cells.unshift(this.generateIndentCell());
            }
            this.index++;
        }
        return rows;
    };
    GroupModelGenerator.prototype.generateIndentCell = function () {
        return this.generateCell({}, null, _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].Indent);
    };
    GroupModelGenerator.prototype.refreshRows = function (input) {
        var _this = this;
        var indexes = this.parent.getColumnIndexesInView();
        input.forEach(function (row) {
            if (row.isDataRow) {
                row.cells = _this.generateCells(row);
                for (var j = 0; j < row.indent; j++) {
                    if (_this.parent.enableColumnVirtualization && indexes.indexOf(row.indent) === -1) {
                        continue;
                    }
                    row.cells.unshift(_this.generateIndentCell());
                }
            }
            else {
                var cRow = _this.generateCaptionRow(row.data, row.indent);
                row.cells = cRow.cells;
            }
        });
        return input;
    };
    return GroupModelGenerator;
}(_services_row_model_generator__WEBPACK_IMPORTED_MODULE_3__["RowModelGenerator"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/intersection-observer.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/intersection-observer.js ***!
  \***************************************************************************************/
/*! exports provided: InterSectionObserver */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterSectionObserver", function() { return InterSectionObserver; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");


/**
 * InterSectionObserver - class watch whether it enters the viewport.
 * @hidden
 */
var InterSectionObserver = /** @class */ (function () {
    function InterSectionObserver(element, options) {
        var _this = this;
        this.fromWheel = false;
        this.touchMove = false;
        this.options = {};
        this.sentinelInfo = {
            'up': {
                check: function (rect, info) {
                    var top = rect.top - _this.containerRect.top;
                    info.entered = top >= 0;
                    return top + (_this.options.pageHeight / 2) >= 0;
                },
                axis: 'Y'
            },
            'down': {
                check: function (rect, info) {
                    var cHeight = _this.options.container.clientHeight;
                    var top = rect.bottom;
                    info.entered = rect.bottom <= _this.containerRect.bottom;
                    return top - (_this.options.pageHeight / 2) <= _this.options.pageHeight / 2;
                }, axis: 'Y'
            },
            'right': {
                check: function (rect, info) {
                    var right = rect.right;
                    info.entered = right < _this.containerRect.right;
                    return right - _this.containerRect.width <= _this.containerRect.right;
                }, axis: 'X'
            },
            'left': {
                check: function (rect, info) {
                    var left = rect.left;
                    info.entered = left > 0;
                    return left + _this.containerRect.width >= _this.containerRect.left;
                }, axis: 'X'
            }
        };
        this.element = element;
        this.options = options;
    }
    InterSectionObserver.prototype.observe = function (callback, onEnterCallback) {
        var _this = this;
        this.containerRect = this.options.container.getBoundingClientRect();
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.options.container, 'wheel', function () { return _this.fromWheel = true; }, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.options.container, 'scroll', this.virtualScrollHandler(callback, onEnterCallback), this);
    };
    InterSectionObserver.prototype.check = function (direction) {
        var info = this.sentinelInfo[direction];
        return info.check(this.element.getBoundingClientRect(), info);
    };
    InterSectionObserver.prototype.virtualScrollHandler = function (callback, onEnterCallback) {
        var _this = this;
        var prevTop = 0;
        var prevLeft = 0;
        var debounced100 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["debounce"])(callback, 100);
        var debounced50 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["debounce"])(callback, 50);
        return function (e) {
            var top = e.target.scrollTop;
            var left = e.target.scrollLeft;
            var direction = prevTop < top ? 'down' : 'up';
            direction = prevLeft === left ? direction : prevLeft < left ? 'right' : 'left';
            prevTop = top;
            prevLeft = left;
            var current = _this.sentinelInfo[direction];
            if (_this.options.axes.indexOf(current.axis) === -1) {
                return;
            }
            var check = _this.check(direction);
            if (current.entered) {
                onEnterCallback(_this.element, current, direction, { top: top, left: left }, _this.fromWheel, check);
            }
            if (check) {
                var fn = debounced100; //this.fromWheel ? this.options.debounceEvent ? debounced100 : callback : debounced100;
                if (current.axis === 'X') {
                    fn = debounced50;
                }
                fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
                    focusElement: document.activeElement });
            }
            _this.fromWheel = false;
        };
    };
    InterSectionObserver.prototype.setPageHeight = function (value) {
        this.options.pageHeight = value;
    };
    return InterSectionObserver;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/renderer-factory.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/renderer-factory.js ***!
  \**********************************************************************************/
/*! exports provided: RendererFactory */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererFactory", function() { return RendererFactory; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");


/**
 * RendererFactory
 * @hidden
 */
var RendererFactory = /** @class */ (function () {
    function RendererFactory() {
        this.rendererMap = {};
    }
    RendererFactory.prototype.addRenderer = function (name, type) {
        var rName = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_1__["RenderType"], name);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.rendererMap[rName])) {
            this.rendererMap[rName] = type;
        }
    };
    RendererFactory.prototype.getRenderer = function (name) {
        var rName = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getEnumValue"])(_base_enum__WEBPACK_IMPORTED_MODULE_1__["RenderType"], name);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.rendererMap[rName])) {
            throw "The renderer " + rName + " is not found";
        }
        else {
            return this.rendererMap[rName];
        }
    };
    return RendererFactory;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js ***!
  \*************************************************************************************/
/*! exports provided: RowModelGenerator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowModelGenerator", function() { return RowModelGenerator; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _models_cell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../models/cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");






/**
 * RowModelGenerator is used to generate grid data rows.
 * @hidden
 */
var RowModelGenerator = /** @class */ (function () {
    /**
     * Constructor for header renderer module
     */
    function RowModelGenerator(parent) {
        this.parent = parent;
    }
    RowModelGenerator.prototype.generateRows = function (data, args) {
        var rows = [];
        var startIndex = this.parent.enableVirtualization ? args.startIndex : 0;
        for (var i = 0, len = Object.keys(data).length; i < len; i++, startIndex++) {
            rows[i] = this.generateRow(data[i], startIndex);
        }
        return rows;
    };
    RowModelGenerator.prototype.ensureColumns = function () {
        //TODO: generate dummy column for group, detail here;
        var cols = [];
        if (this.parent.detailTemplate || this.parent.childGrid) {
            cols.push(this.generateCell({}, null, _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].DetailExpand));
        }
        if (this.parent.isRowDragable()) {
            cols.push(this.generateCell({}, null, _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].RowDragIcon));
        }
        return cols;
    };
    RowModelGenerator.prototype.generateRow = function (data, index, cssClass, indent, pid, tIndex) {
        var options = {};
        options.foreignKeyData = {};
        options.uid = Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["getUid"])('grid-row');
        options.data = data;
        options.index = index;
        options.indent = indent;
        options.tIndex = tIndex;
        options.isDataRow = true;
        options.parentGid = pid;
        if (this.parent.isPrinting) {
            if (this.parent.hierarchyPrintMode === 'All') {
                options.isExpand = true;
            }
            else if (this.parent.hierarchyPrintMode === 'Expanded' && this.parent.expandedRows && this.parent.expandedRows[index]) {
                options.isExpand = this.parent.expandedRows[index].isExpand;
            }
        }
        options.cssClass = cssClass;
        options.isAltRow = this.parent.enableAltRow ? index % 2 !== 0 : false;
        options.isSelected = this.parent.getSelectedRowIndexes().indexOf(index) > -1;
        this.refreshForeignKeyRow(options);
        var cells = this.ensureColumns();
        var row = new _models_row__WEBPACK_IMPORTED_MODULE_1__["Row"](options);
        row.cells = cells.concat(this.generateCells(options));
        return row;
    };
    RowModelGenerator.prototype.refreshForeignKeyRow = function (options) {
        this.parent.getForeignKeyColumns().forEach(function (col) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(col.field, Object(_base_util__WEBPACK_IMPORTED_MODULE_4__["getForeignData"])(col, options.data), options.foreignKeyData);
        });
    };
    RowModelGenerator.prototype.generateCells = function (options) {
        var _this = this;
        var dummies = this.parent.getColumns();
        var tmp = [];
        dummies.forEach(function (dummy, index) {
            return tmp.push(_this.generateCell(dummy, options.uid, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dummy.commands) ? undefined : _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].CommandColumn, null, index, options.foreignKeyData));
        });
        return tmp;
    };
    RowModelGenerator.prototype.generateCell = function (column, rowId, cellType, colSpan, oIndex, foreignKeyData) {
        var opt = {
            'visible': column.visible,
            'isDataCell': !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.field || column.template),
            'isTemplate': !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.template),
            'rowID': rowId,
            'column': column,
            'cellType': !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cellType) ? cellType : _base_enum__WEBPACK_IMPORTED_MODULE_2__["CellType"].Data,
            'colSpan': colSpan,
            'commands': column.commands,
            'isForeignKey': column.isForeignColumn && column.isForeignColumn(),
            'foreignKeyData': column.isForeignColumn && column.isForeignColumn() && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(column.field, foreignKeyData)
        };
        if (opt.isDataCell || opt.column.type === 'checkbox') {
            opt.index = oIndex;
        }
        return new _models_cell__WEBPACK_IMPORTED_MODULE_3__["Cell"](opt);
    };
    RowModelGenerator.prototype.refreshRows = function (input) {
        var _this = this;
        input.forEach(function (row) {
            _this.refreshForeignKeyRow(row);
            row.cells = _this.generateCells(row);
        });
        return input;
    };
    return RowModelGenerator;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/service-locator.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/service-locator.js ***!
  \*********************************************************************************/
/*! exports provided: ServiceLocator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServiceLocator", function() { return ServiceLocator; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");

/**
 * ServiceLocator
 * @hidden
 */
var ServiceLocator = /** @class */ (function () {
    function ServiceLocator() {
        this.services = {};
    }
    ServiceLocator.prototype.register = function (name, type) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.services[name])) {
            this.services[name] = type;
        }
    };
    ServiceLocator.prototype.getService = function (name) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.services[name])) {
            throw "The service " + name + " is not registered";
        }
        return this.services[name];
    };
    return ServiceLocator;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/summary-model-generator.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/summary-model-generator.js ***!
  \*****************************************************************************************/
/*! exports provided: SummaryModelGenerator, GroupSummaryModelGenerator, CaptionSummaryModelGenerator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SummaryModelGenerator", function() { return SummaryModelGenerator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupSummaryModelGenerator", function() { return GroupSummaryModelGenerator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CaptionSummaryModelGenerator", function() { return CaptionSummaryModelGenerator; });
/* harmony import */ var _models_row__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../models/row */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js");
/* harmony import */ var _models_column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../models/column */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _base_enum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/enum */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js");
/* harmony import */ var _models_cell__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../models/cell */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();






/**
 * Summary row model generator
 * @hidden
 */
var SummaryModelGenerator = /** @class */ (function () {
    /**
     * Constructor for Summary row model generator
     */
    function SummaryModelGenerator(parent) {
        this.parent = parent;
    }
    SummaryModelGenerator.prototype.getData = function () {
        var _this = this;
        var rows = [];
        this.parent.aggregates.slice().forEach(function (row) {
            var columns = row.columns.filter(function (column) {
                return !(column.footerTemplate || column.groupFooterTemplate || column.groupCaptionTemplate)
                    || _this.columnSelector(column);
            });
            if (columns.length) {
                rows.push({ columns: columns });
            }
        });
        return rows;
    };
    SummaryModelGenerator.prototype.columnSelector = function (column) {
        return column.footerTemplate !== undefined;
    };
    SummaryModelGenerator.prototype.getColumns = function (start, end) {
        var columns = [];
        if (this.parent.allowGrouping) {
            this.parent.groupSettings.columns.forEach(function (value) { return columns.push(new _models_column__WEBPACK_IMPORTED_MODULE_1__["Column"]({})); });
        }
        if (this.parent.detailTemplate || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.parent.childGrid) || this.parent.isRowDragable()) {
            columns.push(new _models_column__WEBPACK_IMPORTED_MODULE_1__["Column"]({}));
        }
        columns.push.apply(columns, this.parent.getColumns());
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(start) ? columns : columns.slice(start, end);
    };
    SummaryModelGenerator.prototype.generateRows = function (input, args, start, end) {
        var _this = this;
        if (this.parent.currentViewData.length === 0) {
            return [];
        }
        var data = this.buildSummaryData(input, args);
        var rows = [];
        this.getData().forEach(function (row, index) {
            rows.push(_this.getGeneratedRow(row, data[index], args ? args.level : undefined, start, end));
        });
        return rows;
    };
    SummaryModelGenerator.prototype.getGeneratedRow = function (summaryRow, data, raw, start, end) {
        var _this = this;
        var tmp = [];
        var indents = this.getIndentByLevel(raw);
        var isDetailGridAlone = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.parent.childGrid);
        var indentLength = this.parent.groupSettings.columns.length + (this.parent.detailTemplate ||
            !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(this.parent.childGrid) ? 1 : 0);
        if (this.parent.isRowDragable()) {
            indentLength++;
            indents = ['e-indentcelltop'];
        }
        this.getColumns(start, end).forEach(function (value, index) { return tmp.push(_this.getGeneratedCell(value, summaryRow, index >= indentLength ? _this.getCellType() :
            index < _this.parent.groupSettings.columns.length ? _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].Indent : _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].DetailFooterIntent, indents[index], isDetailGridAlone)); });
        var row = new _models_row__WEBPACK_IMPORTED_MODULE_0__["Row"]({ data: data, attributes: { class: 'e-summaryrow' } });
        row.cells = tmp;
        row.uid = Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["getUid"])('grid-row');
        row.visible = tmp.some(function (cell) { return cell.isDataCell && cell.visible; });
        return row;
    };
    SummaryModelGenerator.prototype.getGeneratedCell = function (column, summaryRow, cellType, indent, isDetailGridAlone) {
        //Get the summary column by display
        var sColumn = summaryRow.columns.filter(function (scolumn) { return scolumn.columnName === column.field; })[0];
        var attrs = { 'style': { 'textAlign': column.textAlign } };
        if (indent) {
            attrs.class = indent;
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(indent) && isDetailGridAlone) {
            attrs.class = 'e-detailindentcelltop';
        }
        var opt = {
            'visible': column.visible,
            'isDataCell': !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(sColumn),
            'isTemplate': sColumn && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(sColumn.footerTemplate
                || sColumn.groupFooterTemplate || sColumn.groupCaptionTemplate),
            'column': sColumn || {},
            'attributes': attrs,
            'cellType': cellType
        };
        return new _models_cell__WEBPACK_IMPORTED_MODULE_5__["Cell"](opt);
    };
    SummaryModelGenerator.prototype.buildSummaryData = function (data, args) {
        var _this = this;
        var dummy = [];
        var summaryRows = this.getData();
        var single = {};
        var key = '';
        summaryRows.forEach(function (row) {
            single = {};
            row.columns.forEach(function (column) {
                single = _this.setTemplate(column, (args && args.aggregates) ? args : data, single);
            });
            dummy.push(single);
        });
        return dummy;
    };
    SummaryModelGenerator.prototype.getIndentByLevel = function (data) {
        return this.parent.groupSettings.columns.map(function () { return 'e-indentcelltop'; });
    };
    SummaryModelGenerator.prototype.setTemplate = function (column, data, single) {
        var _this = this;
        var types = column.type;
        var helper = {};
        var formatFn = column.getFormatter() || (function () { return function (a) { return a; }; })();
        var group = data;
        if (!(types instanceof Array)) {
            types = [column.type];
        }
        types.forEach(function (type) {
            var key = column.field + ' - ' + type.toLowerCase();
            var disp = column.columnName;
            var val = type !== 'Custom' && group.aggregates && key in group.aggregates ? group.aggregates[key] :
                Object(_base_util__WEBPACK_IMPORTED_MODULE_3__["calculateAggregate"])(type, group.aggregates ? group : data, column, _this.parent);
            single[disp] = single[disp] || {};
            single[disp][key] = val;
            single[disp][type] = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_2__["isNullOrUndefined"])(val) ? formatFn(val) : ' ';
            if (group.field) {
                single[disp].field = group.field;
                single[disp].key = group.key;
            }
        });
        helper.format = column.getFormatter();
        column.setTemplate(helper);
        return single;
    };
    SummaryModelGenerator.prototype.getCellType = function () {
        return _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].Summary;
    };
    return SummaryModelGenerator;
}());

var GroupSummaryModelGenerator = /** @class */ (function (_super) {
    __extends(GroupSummaryModelGenerator, _super);
    function GroupSummaryModelGenerator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    GroupSummaryModelGenerator.prototype.columnSelector = function (column) {
        return column.groupFooterTemplate !== undefined;
    };
    GroupSummaryModelGenerator.prototype.getIndentByLevel = function (level) {
        if (level === void 0) { level = this.parent.groupSettings.columns.length; }
        return this.parent.groupSettings.columns.map(function (v, indx) { return indx <= level - 1 ? '' : 'e-indentcelltop'; });
    };
    GroupSummaryModelGenerator.prototype.getCellType = function () {
        return _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].GroupSummary;
    };
    return GroupSummaryModelGenerator;
}(SummaryModelGenerator));

var CaptionSummaryModelGenerator = /** @class */ (function (_super) {
    __extends(CaptionSummaryModelGenerator, _super);
    function CaptionSummaryModelGenerator() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    CaptionSummaryModelGenerator.prototype.columnSelector = function (column) {
        return column.groupCaptionTemplate !== undefined;
    };
    CaptionSummaryModelGenerator.prototype.getData = function () {
        var initVal = { columns: [] };
        return [_super.prototype.getData.call(this).reduce(function (prev, cur) {
                prev.columns = prev.columns.concat(cur.columns);
                return prev;
            }, initVal)];
    };
    CaptionSummaryModelGenerator.prototype.isEmpty = function () {
        return (this.getData()[0].columns || []).length === 0;
    };
    CaptionSummaryModelGenerator.prototype.getCellType = function () {
        return _base_enum__WEBPACK_IMPORTED_MODULE_4__["CellType"].CaptionSummary;
    };
    return CaptionSummaryModelGenerator;
}(SummaryModelGenerator));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js ***!
  \*********************************************************************************/
/*! exports provided: ValueFormatter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueFormatter", function() { return ValueFormatter; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");


/**
 * ValueFormatter class to globalize the value.
 * @hidden
 */
var ValueFormatter = /** @class */ (function () {
    function ValueFormatter(cultureName) {
        this.intl = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"]();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cultureName)) {
            this.intl.culture = cultureName;
        }
    }
    ValueFormatter.prototype.getFormatFunction = function (format) {
        if (format.type) {
            return this.intl.getDateFormat(format);
        }
        else {
            return this.intl.getNumberFormat(format);
        }
    };
    ValueFormatter.prototype.getParserFunction = function (format) {
        if (format.type) {
            return this.intl.getDateParser(format);
        }
        else {
            return this.intl.getNumberParser(format);
        }
    };
    ValueFormatter.prototype.fromView = function (value, format, type) {
        if ((type === 'date' || type === 'datetime' || type === 'number') && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(format))) {
            return format(value);
        }
        else {
            return value;
        }
    };
    ValueFormatter.prototype.toView = function (value, format) {
        var result = value;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(format) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            result = format(value);
        }
        return result;
    };
    ValueFormatter.prototype.setCulture = function (cultureName) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cultureName)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setCulture"])(cultureName);
        }
    };
    return ValueFormatter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/virtual-row-model-generator.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/virtual-row-model-generator.js ***!
  \*********************************************************************************************/
/*! exports provided: VirtualRowModelGenerator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualRowModelGenerator", function() { return VirtualRowModelGenerator; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
/* harmony import */ var _services_row_model_generator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/row-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js");
/* harmony import */ var _services_group_model_generator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/group-model-generator */ "./node_modules/@syncfusion/ej2-grids/src/grid/services/group-model-generator.js");




/**
 * Content module is used to render grid content
 */
var VirtualRowModelGenerator = /** @class */ (function () {
    function VirtualRowModelGenerator(parent) {
        this.cOffsets = {};
        this.cache = {};
        this.data = {};
        this.groups = {};
        this.parent = parent;
        this.model = this.parent.pageSettings;
        this.rowModelGenerator = this.parent.allowGrouping ? new _services_group_model_generator__WEBPACK_IMPORTED_MODULE_3__["GroupModelGenerator"](this.parent) : new _services_row_model_generator__WEBPACK_IMPORTED_MODULE_2__["RowModelGenerator"](this.parent);
    }
    VirtualRowModelGenerator.prototype.generateRows = function (data, notifyArgs) {
        var _this = this;
        var info = notifyArgs.virtualInfo = notifyArgs.virtualInfo || this.getData();
        var xAxis = info.sentinelInfo && info.sentinelInfo.axis === 'X';
        var page = !xAxis && info.loadNext && !info.loadSelf ? info.nextInfo.page : info.page;
        var result = [];
        var center = ~~(this.model.pageSize / 2);
        var indexes = this.getBlockIndexes(page);
        var loadedBlocks = [];
        this.checkAndResetCache(notifyArgs.requestType);
        if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isGroupAdaptive"])(this.parent) && this.parent.vcRows.length) {
            return result = this.parent.vcRows;
        }
        if (this.parent.enableColumnVirtualization) {
            info.blockIndexes.forEach(function (value) {
                if (_this.isBlockAvailable(value)) {
                    _this.cache[value] = _this.rowModelGenerator.refreshRows(_this.cache[value]);
                }
            });
        }
        info.blockIndexes.forEach(function (value) {
            if (!_this.isBlockAvailable(value)) {
                var rows = _this.rowModelGenerator.generateRows(data, {
                    virtualInfo: info, startIndex: _this.getStartIndex(value, data)
                });
                if (Object(_base_util__WEBPACK_IMPORTED_MODULE_1__["isGroupAdaptive"])(_this.parent) && !_this.parent.vcRows.length) {
                    _this.parent.vRows = rows;
                    _this.parent.vcRows = rows;
                }
                var median = ~~Math.max(rows.length, _this.model.pageSize) / 2;
                if (!_this.isBlockAvailable(indexes[0])) {
                    _this.cache[indexes[0]] = rows.slice(0, median);
                }
                if (!_this.isBlockAvailable(indexes[1])) {
                    _this.cache[indexes[1]] = rows.slice(median);
                }
            }
            if (_this.parent.groupSettings.columns.length && !xAxis && _this.cache[value]) {
                _this.cache[value] = _this.updateGroupRow(_this.cache[value], value);
            }
            result.push.apply(result, _this.cache[value]);
            if (_this.isBlockAvailable(value)) {
                loadedBlocks.push(value);
            }
        });
        info.blockIndexes = loadedBlocks;
        var grouping = 'records';
        if (this.parent.allowGrouping) {
            this.parent.currentViewData[grouping] = result.map(function (m) { return m.data; });
        }
        else {
            this.parent.currentViewData = result.map(function (m) { return m.data; });
        }
        return result;
    };
    VirtualRowModelGenerator.prototype.getBlockIndexes = function (page) {
        return [page + (page - 1), page * 2];
    };
    VirtualRowModelGenerator.prototype.getPage = function (block) {
        return block % 2 === 0 ? block / 2 : (block + 1) / 2;
    };
    VirtualRowModelGenerator.prototype.isBlockAvailable = function (value) {
        return value in this.cache;
    };
    VirtualRowModelGenerator.prototype.getData = function () {
        return {
            page: this.model.currentPage,
            blockIndexes: this.getBlockIndexes(this.model.currentPage),
            direction: 'down',
            columnIndexes: this.parent.getColumnIndexesInView()
        };
    };
    VirtualRowModelGenerator.prototype.getStartIndex = function (blk, data, full) {
        if (full === void 0) { full = true; }
        var page = this.getPage(blk);
        var even = blk % 2 === 0;
        var index = (page - 1) * this.model.pageSize;
        return full || !even ? index : index + ~~(this.model.pageSize / 2);
    };
    VirtualRowModelGenerator.prototype.getColumnIndexes = function (content) {
        var _this = this;
        if (content === void 0) { content = this.parent.getHeaderContent().firstChild; }
        var indexes = [];
        var sLeft = content.scrollLeft | 0;
        var keys = Object.keys(this.cOffsets);
        var cWidth = content.getBoundingClientRect().width;
        sLeft = Math.min(this.cOffsets[keys.length - 1] - cWidth, sLeft);
        var calWidth = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 2 * cWidth : cWidth / 2;
        var left = sLeft + cWidth + (sLeft === 0 ? calWidth : 0);
        keys.some(function (offset, indx, input) {
            var iOffset = Number(offset);
            var offsetVal = _this.cOffsets[offset];
            var border = sLeft - calWidth <= offsetVal && left + calWidth >= offsetVal;
            if (border) {
                indexes.push(iOffset);
            }
            return left + calWidth < offsetVal;
        });
        return indexes;
    };
    VirtualRowModelGenerator.prototype.checkAndResetCache = function (action) {
        var clear = ['paging', 'refresh', 'sorting', 'filtering', 'searching', 'grouping', 'ungrouping', 'reorder',
            'save', 'delete'].some(function (value) { return action === value; });
        if (clear) {
            this.cache = {};
            this.data = {};
            this.groups = {};
        }
        return clear;
    };
    VirtualRowModelGenerator.prototype.refreshColOffsets = function () {
        var _this = this;
        var col = 0;
        this.cOffsets = {};
        var gLen = this.parent.groupSettings.columns.length;
        var cols = this.parent.columns;
        var cLen = cols.length;
        var isVisible = function (column) { return column.visible &&
            (!_this.parent.groupSettings.showGroupedColumn ? _this.parent.groupSettings.columns.indexOf(column.field) < 0 : column.visible); };
        this.parent.groupSettings.columns.forEach(function (c, n) { return _this.cOffsets[n] = (_this.cOffsets[n - 1] | 0) + 30; });
        Array.apply(null, Array(cLen)).map(function () { return col++; }).forEach(function (block, i) {
            block = block + gLen;
            _this.cOffsets[block] = (_this.cOffsets[block - 1] | 0) + (isVisible(cols[i]) ? parseInt(cols[i].width, 10) : 0);
        });
    };
    VirtualRowModelGenerator.prototype.updateGroupRow = function (current, block) {
        var _this = this;
        var currentFirst = current[0];
        var rows = [];
        Object.keys(this.cache).forEach(function (key) {
            if (Number(key) < block) {
                rows = rows.concat(_this.cache[key]);
            }
        });
        if ((currentFirst && currentFirst.isDataRow) || block % 2 === 0) {
            return current;
        }
        return this.iterateGroup(current, rows);
    };
    VirtualRowModelGenerator.prototype.iterateGroup = function (current, rows) {
        var currentFirst = current[0];
        var offset = 0;
        if (currentFirst && currentFirst.isDataRow) {
            return current;
        }
        var isPresent = current.some(function (row) {
            return rows.some(function (oRow, index) {
                var res = oRow && oRow.data.field !== undefined && oRow.data.field === row.data.field &&
                    oRow.data.key === row.data.key;
                if (res) {
                    offset = index;
                }
                return res;
            });
        });
        if (isPresent) {
            current.shift();
            current = this.iterateGroup(current, rows.slice(offset));
        }
        return current;
    };
    VirtualRowModelGenerator.prototype.getRows = function () {
        var _this = this;
        var rows = [];
        Object.keys(this.cache).forEach(function (key) { return rows = rows.concat(_this.cache[key]); });
        return rows;
    };
    return VirtualRowModelGenerator;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/grid/services/width-controller.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/grid/services/width-controller.js ***!
  \**********************************************************************************/
/*! exports provided: ColumnWidthService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnWidthService", function() { return ColumnWidthService; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _base_constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/constant */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js");
/* harmony import */ var _models_column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../models/column */ "./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js");




/**
 * ColumnWidthService
 * @hidden
 */
var ColumnWidthService = /** @class */ (function () {
    function ColumnWidthService(parent) {
        this.parent = parent;
    }
    ColumnWidthService.prototype.setWidthToColumns = function () {
        var _this = this;
        var i = 0;
        var indexes = this.parent.getColumnIndexesInView();
        var wFlag = true;
        var totalColumnsWidth = 0;
        if (this.parent.allowGrouping) {
            for (var len = this.parent.groupSettings.columns.length; i < len; i++) {
                if (this.parent.enableColumnVirtualization && indexes.indexOf(i) === -1) {
                    wFlag = false;
                    continue;
                }
                this.setColumnWidth(new _models_column__WEBPACK_IMPORTED_MODULE_2__["Column"]({ width: '30px' }), i);
            }
        }
        if (this.parent.detailTemplate || this.parent.childGrid) {
            this.setColumnWidth(new _models_column__WEBPACK_IMPORTED_MODULE_2__["Column"]({ width: '30px' }), i);
            i++;
        }
        if (this.parent.isRowDragable()) {
            this.setColumnWidth(new _models_column__WEBPACK_IMPORTED_MODULE_2__["Column"]({ width: '30px' }), i);
            i++;
        }
        this.parent.getColumns().forEach(function (column, index) {
            _this.setColumnWidth(column, wFlag && _this.parent.enableColumnVirtualization ? undefined : index + i);
        });
        totalColumnsWidth = this.getTableWidth(this.parent.getColumns());
        if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1) {
            this.setMinwidthBycalculation(totalColumnsWidth);
        }
    };
    ColumnWidthService.prototype.setMinwidthBycalculation = function (tWidth) {
        var difference = 0;
        var collection = this.parent.getColumns().filter(function (a) {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(a.width) || a.width === 'auto';
        });
        if (collection.length) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.width) && this.parent.width !== 'auto') {
                difference = (typeof this.parent.width === 'string' ? parseInt(this.parent.width, 10) : this.parent.width) - tWidth;
            }
            var tmWidth = 0;
            for (var _i = 0, collection_1 = collection; _i < collection_1.length; _i++) {
                var cols = collection_1[_i];
                tmWidth += !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cols.minWidth) ?
                    ((typeof cols.minWidth === 'string' ? parseInt(cols.minWidth, 10) : cols.minWidth)) : 0;
            }
            for (var i = 0; i < collection.length; i++) {
                if (tWidth === 0 && this.parent.allowResizing && this.isWidthUndefined() && (i !== collection.length - 1)) {
                    this.setUndefinedColumnWidth(collection);
                }
                if (tWidth !== 0 && difference < tmWidth) {
                    this.setWidth(collection[i].minWidth, this.parent.getColumnIndexByField(collection[i].field));
                }
                else if (tWidth !== 0 && difference > tmWidth) {
                    this.setWidth('', this.parent.getColumnIndexByField(collection[i].field), true);
                }
            }
        }
    };
    ColumnWidthService.prototype.setUndefinedColumnWidth = function (collection) {
        for (var k = 0; k < collection.length; k++) {
            if (k !== collection.length - 1) {
                collection[k].width = 200;
                this.setWidth(200, this.parent.getColumnIndexByField(collection[k].field));
            }
        }
    };
    ColumnWidthService.prototype.setColumnWidth = function (column, index, module) {
        var columnIndex = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index) ? this.parent.getNormalizedColumnIndex(column.uid) : index;
        var cWidth = this.getWidth(column);
        var tgridWidth = this.getTableWidth(this.parent.getColumns());
        if (cWidth !== null) {
            this.setWidth(cWidth, columnIndex);
            if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1) {
                this.setMinwidthBycalculation(tgridWidth);
            }
            if ((this.parent.allowResizing && module === 'resize') || (this.parent.getFrozenColumns() && this.parent.allowResizing)) {
                this.setWidthToTable();
            }
            this.parent.notify(_base_constant__WEBPACK_IMPORTED_MODULE_1__["columnWidthChanged"], { index: columnIndex, width: cWidth, column: column, module: module });
        }
    };
    ColumnWidthService.prototype.setWidth = function (width, index, clear) {
        var chrome = 'chrome';
        var webstore = 'webstore';
        if (typeof (width) === 'string' && width.indexOf('%') !== -1 &&
            !(Boolean(window[chrome]) && Boolean(window[chrome][webstore])) && this.parent.allowGrouping) {
            var elementWidth = this.parent.element.offsetWidth;
            width = parseInt(width, 10) / 100 * (elementWidth);
        }
        var header = this.parent.getHeaderTable();
        var content = this.parent.getContentTable();
        var fWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
        var headerCol;
        var frzCols = this.parent.getFrozenColumns();
        var mHdr = this.parent.getHeaderContent().querySelector('.e-movableheader');
        if (frzCols && index >= frzCols && mHdr && mHdr.querySelector('colgroup')) {
            headerCol = mHdr.querySelector('colgroup').children[index - frzCols];
        }
        else {
            headerCol = header.querySelector('colgroup').children[index];
        }
        if (headerCol && !clear) {
            headerCol.style.width = fWidth;
        }
        else if (headerCol && clear) {
            headerCol.style.width = ' ';
        }
        var contentCol;
        if (frzCols && index >= frzCols) {
            contentCol = this.parent.getContent().querySelector('.e-movablecontent')
                .querySelector('colgroup').children[index - frzCols];
        }
        else {
            contentCol = content.querySelector('colgroup').children[index];
        }
        if (contentCol && !clear) {
            contentCol.style.width = fWidth;
        }
        else if (contentCol && clear) {
            contentCol.style.width = ' ';
        }
        var edit = this.parent.element.querySelectorAll('.e-table.e-inline-edit');
        var editTableCol = [];
        for (var i = 0; i < edit.length; i++) {
            for (var j = 0; j < edit[i].querySelector('colgroup').children.length; j++) {
                editTableCol.push(edit[i].querySelector('colgroup').children[j]);
            }
        }
        if (edit.length) {
            editTableCol[index].style.width = fWidth;
        }
    };
    ColumnWidthService.prototype.getSiblingsHeight = function (element) {
        var previous = this.getHeightFromDirection(element, 'previous');
        var next = this.getHeightFromDirection(element, 'next');
        return previous + next;
    };
    ColumnWidthService.prototype.getHeightFromDirection = function (element, direction) {
        var sibling = element[direction + 'ElementSibling'];
        var result = 0;
        var classList = ['e-gridheader', 'e-gridfooter', 'e-groupdroparea', 'e-gridpager', 'e-toolbar'];
        while (sibling) {
            if (classList.some(function (value) { return sibling.classList.contains(value); })) {
                result += sibling.offsetHeight;
            }
            sibling = sibling[direction + 'ElementSibling'];
        }
        return result;
    };
    ColumnWidthService.prototype.isWidthUndefined = function () {
        var isWidUndefCount = this.parent.getColumns().filter(function (col) {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.width) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(col.minWidth);
        }).length;
        return (this.parent.getColumns().length === isWidUndefCount);
    };
    ColumnWidthService.prototype.getWidth = function (column) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.width) && this.parent.allowResizing
            && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(column.minWidth) && !this.isWidthUndefined()) {
            column.width = 200;
        }
        if (!column.width) {
            return null;
        }
        var width = parseInt(column.width.toString(), 10);
        if (column.minWidth && width < parseInt(column.minWidth.toString(), 10)) {
            return column.minWidth;
        }
        else if ((column.maxWidth && width > parseInt(column.maxWidth.toString(), 10))) {
            return column.maxWidth;
        }
        else {
            return column.width;
        }
    };
    ColumnWidthService.prototype.getTableWidth = function (columns) {
        var tWidth = 0;
        for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
            var column = columns_1[_i];
            var cWidth = this.getWidth(column);
            if (column.width === 'auto') {
                cWidth = 0;
            }
            if (column.visible !== false && cWidth !== null) {
                tWidth += parseInt(cWidth.toString(), 10);
            }
        }
        return tWidth;
    };
    ColumnWidthService.prototype.calcMovableOrFreezeColWidth = function (tableType) {
        var columns = this.parent.getColumns().slice();
        if (tableType === 'movable') {
            columns.splice(0, this.parent.getFrozenColumns());
        }
        else if (tableType === 'freeze') {
            columns.splice(this.parent.getFrozenColumns(), columns.length);
        }
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.getTableWidth(columns));
    };
    ColumnWidthService.prototype.setWidthToFrozenTable = function () {
        var freezeWidth = this.calcMovableOrFreezeColWidth('freeze');
        this.parent.getHeaderTable().style.width = freezeWidth;
        this.parent.getContentTable().style.width = freezeWidth;
    };
    ColumnWidthService.prototype.setWidthToMovableTable = function () {
        var movableWidth = '';
        var isColUndefined = this.parent.getColumns().filter(function (a) { return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(a.width); }).length >= 1;
        var isWidthAuto = this.parent.getColumns().filter(function (a) { return (a.width === 'auto'); }).length >= 1;
        if (typeof this.parent.width === 'number' && !isColUndefined && !isWidthAuto) {
            movableWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.parent.width - parseInt(this.calcMovableOrFreezeColWidth('freeze').split('px')[0], 10) - 5);
        }
        else if (!isColUndefined && !isWidthAuto) {
            movableWidth = this.calcMovableOrFreezeColWidth('movable');
        }
        if (this.parent.getHeaderContent().querySelector('.e-movableheader').firstElementChild) {
            this.parent.getHeaderContent().querySelector('.e-movableheader').firstElementChild.style.width
                = movableWidth;
        }
        this.parent.getContent().querySelector('.e-movablecontent').firstElementChild.style.width =
            movableWidth;
    };
    ColumnWidthService.prototype.setWidthToFrozenEditTable = function () {
        var freezeWidth = this.calcMovableOrFreezeColWidth('freeze');
        this.parent.element.querySelectorAll('.e-table.e-inline-edit')[0].style.width = freezeWidth;
    };
    ColumnWidthService.prototype.setWidthToMovableEditTable = function () {
        var movableWidth = this.calcMovableOrFreezeColWidth('movable');
        this.parent.element.querySelectorAll('.e-table.e-inline-edit')[1].style.width = movableWidth;
    };
    ColumnWidthService.prototype.setWidthToTable = function () {
        var tWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.getTableWidth(this.parent.getColumns()));
        if (this.parent.getFrozenColumns()) {
            this.setWidthToFrozenTable();
            this.setWidthToMovableTable();
        }
        else {
            if (this.parent.detailTemplate || this.parent.childGrid) {
                this.setColumnWidth(new _models_column__WEBPACK_IMPORTED_MODULE_2__["Column"]({ width: '30px' }));
            }
            this.parent.getHeaderTable().style.width = tWidth;
            this.parent.getContentTable().style.width = tWidth;
        }
        var edit = this.parent.element.querySelector('.e-table.e-inline-edit');
        if (edit && this.parent.getFrozenColumns()) {
            this.setWidthToFrozenEditTable();
            this.setWidthToMovableEditTable();
        }
        else if (edit) {
            edit.style.width = tWidth;
        }
    };
    return ColumnWidthService;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/index.js":
/*!*********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/index.js ***!
  \*********************************************************/
/*! exports provided: Pager, ExternalMessage, NumericContainer, PagerMessage, PagerDropDown, SortDescriptor, SortSettings, Predicate, FilterSettings, SelectionSettings, SearchSettings, RowDropSettings, TextWrapSettings, GroupSettings, EditSettings, Grid, CellType, RenderType, ToolbarItem, doesImplementInterface, valueAccessor, getUpdateUsingRaf, updatecloneRow, getCollapsedRowsCount, recursive, iterateArrayOrObject, iterateExtend, templateCompiler, setStyleAndAttributes, extend, setColumnIndex, prepareColumns, setCssInGridPopUp, getActualProperties, parentsUntil, getElementIndex, inArray, getActualPropFromColl, removeElement, getPosition, getUid, appendChildren, parents, calculateAggregate, getScrollBarWidth, getRowHeight, isComplexField, getComplexFieldID, setComplexFieldID, isEditable, isActionPrevent, wrap, setFormatter, addRemoveActiveClasses, distinctStringValues, getFilterMenuPostion, getZIndexCalcualtion, toogleCheckbox, createCboxWithWrap, removeAddCboxClasses, refreshForeignData, getForeignData, getColumnByForeignKeyValue, getDatePredicate, renderMovable, isGroupAdaptive, getObject, getCustomDateFormat, getExpandedState, getPrintGridModel, extendObjWithFn, measureColumnDepth, checkDepth, created, destroyed, load, rowDataBound, queryCellInfo, headerCellInfo, actionBegin, actionComplete, actionFailure, dataBound, rowSelecting, rowSelected, rowDeselecting, rowDeselected, cellSelecting, cellSelected, cellDeselecting, cellDeselected, columnDragStart, columnDrag, columnDrop, rowDragStartHelper, rowDragStart, rowDrag, rowDrop, beforePrint, printComplete, detailDataBound, toolbarClick, batchAdd, batchCancel, batchDelete, beforeBatchAdd, beforeBatchDelete, beforeBatchSave, beginEdit, cellEdit, cellSave, cellSaved, endAdd, endDelete, endEdit, recordDoubleClick, recordClick, beforeDataBound, beforeOpenColumnChooser, resizeStart, onResize, resizeStop, checkBoxChange, beforeCopy, beforePaste, filterChoiceRequest, filterAfterOpen, filterBeforeOpen, filterSearchBegin, commandClick, initialLoad, initialEnd, dataReady, contentReady, uiUpdate, onEmpty, inBoundModelChanged, modelChanged, colGroupRefresh, headerRefreshed, pageBegin, pageComplete, sortBegin, sortComplete, filterBegin, filterComplete, searchBegin, searchComplete, reorderBegin, reorderComplete, rowDragAndDropBegin, rowDragAndDropComplete, groupBegin, groupComplete, ungroupBegin, ungroupComplete, groupAggregates, refreshFooterRenderer, refreshAggregateCell, refreshAggregates, rowSelectionBegin, rowSelectionComplete, columnSelectionBegin, columnSelectionComplete, cellSelectionBegin, cellSelectionComplete, beforeCellFocused, cellFocused, keyPressed, click, destroy, columnVisibilityChanged, scroll, columnWidthChanged, columnPositionChanged, rowDragAndDrop, rowsAdded, rowsRemoved, columnDragStop, headerDrop, dataSourceModified, refreshComplete, refreshVirtualBlock, dblclick, toolbarRefresh, bulkSave, autoCol, tooltipDestroy, updateData, editBegin, editComplete, addBegin, addComplete, saveComplete, deleteBegin, deleteComplete, preventBatch, dialogDestroy, crudAction, addDeleteAction, destroyForm, doubleTap, beforeExcelExport, excelExportComplete, excelQueryCellInfo, excelHeaderQueryCellInfo, exportDetailDataBound, beforePdfExport, pdfExportComplete, pdfQueryCellInfo, pdfHeaderQueryCellInfo, accessPredicate, contextMenuClick, freezeRender, freezeRefresh, contextMenuOpen, columnMenuClick, columnMenuOpen, filterOpen, filterDialogCreated, filterMenuClose, initForeignKeyColumn, getForeignKeyData, generateQuery, showEmptyGrid, foreignKeyData, dataStateChange, dataSourceChanged, rtlUpdated, beforeFragAppend, frozenHeight, textWrapRefresh, recordAdded, cancelBegin, editNextValCell, hierarchyPrint, expandChildGrid, printGridInit, exportRowDataBound, rowPositionChanged, batchForm, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, partialRefresh, Data, Sort, Page, Selection, Filter, Search, Scroll, resizeClassList, Resize, Reorder, RowDD, Group, getCloneProperties, Print, DetailRow, Toolbar, Aggregate, summaryIterator, VirtualScroll, Edit, Global, BatchEdit, InlineEdit, NormalEdit, DialogEdit, ColumnChooser, ExcelExport, PdfExport, ExportHelper, ExportValueFormatter, Clipboard, CommandColumn, CheckBoxFilter, menuClass, ContextMenu, Freeze, ColumnMenu, ExcelFilter, ForeignKey, Logger, detailLists, Column, Row, Cell, HeaderRender, ContentRender, RowRenderer, CellRenderer, HeaderCellRenderer, FilterCellRenderer, StackedHeaderCellRenderer, Render, IndentCellRenderer, GroupCaptionCellRenderer, GroupCaptionEmptyCellRenderer, BatchEditRender, DialogEditRender, InlineEditRender, EditRender, BooleanEditCell, DefaultEditCell, DropDownEditCell, NumericEditCell, DatePickerEditCell, CommandColumnRenderer, FreezeContentRender, FreezeRender, StringFilterUI, NumberFilterUI, DateFilterUI, BooleanFilterUI, FlMenuOptrUI, AutoCompleteEditCell, ComboboxEditCell, MultiSelectEditCell, TimePickerEditCell, ToggleEditCell, MaskedTextBoxCellEdit, VirtualContentRenderer, VirtualHeaderRenderer, VirtualElementHandler, CellRendererFactory, ServiceLocator, RowModelGenerator, GroupModelGenerator, FreezeRowModelGenerator, ValueFormatter, VirtualRowModelGenerator, InterSectionObserver */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _grid_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grid/index */ "./node_modules/@syncfusion/ej2-grids/src/grid/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortDescriptor", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["SortDescriptor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SortSettings", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["SortSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Predicate", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Predicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterSettings", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["FilterSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionSettings", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["SelectionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SearchSettings", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["SearchSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowDropSettings", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["RowDropSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextWrapSettings", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["TextWrapSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupSettings", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["GroupSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditSettings", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["EditSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Grid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellType", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["CellType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenderType", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["RenderType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolbarItem", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ToolbarItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doesImplementInterface", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["doesImplementInterface"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valueAccessor", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["valueAccessor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUpdateUsingRaf", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getUpdateUsingRaf"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updatecloneRow", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["updatecloneRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCollapsedRowsCount", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getCollapsedRowsCount"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recursive", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["recursive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iterateArrayOrObject", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["iterateArrayOrObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iterateExtend", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["iterateExtend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "templateCompiler", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["templateCompiler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setStyleAndAttributes", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["setStyleAndAttributes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["extend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setColumnIndex", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["setColumnIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareColumns", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["prepareColumns"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setCssInGridPopUp", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["setCssInGridPopUp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualProperties", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getActualProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parentsUntil", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["parentsUntil"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElementIndex", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getElementIndex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inArray", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["inArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActualPropFromColl", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getActualPropFromColl"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["removeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPosition", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUid", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getUid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "appendChildren", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["appendChildren"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parents", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["parents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateAggregate", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["calculateAggregate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollBarWidth", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getScrollBarWidth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRowHeight", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getRowHeight"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isComplexField", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["isComplexField"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getComplexFieldID", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getComplexFieldID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setComplexFieldID", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["setComplexFieldID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEditable", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["isEditable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isActionPrevent", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["isActionPrevent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["wrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setFormatter", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["setFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addRemoveActiveClasses", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["addRemoveActiveClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctStringValues", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["distinctStringValues"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFilterMenuPostion", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getFilterMenuPostion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getZIndexCalcualtion", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getZIndexCalcualtion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toogleCheckbox", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["toogleCheckbox"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createCboxWithWrap", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["createCboxWithWrap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeAddCboxClasses", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["removeAddCboxClasses"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshForeignData", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["refreshForeignData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getForeignData", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getForeignData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColumnByForeignKeyValue", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getColumnByForeignKeyValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDatePredicate", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getDatePredicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "renderMovable", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["renderMovable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isGroupAdaptive", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["isGroupAdaptive"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getObject", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCustomDateFormat", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getCustomDateFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getExpandedState", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getExpandedState"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPrintGridModel", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getPrintGridModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extendObjWithFn", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["extendObjWithFn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "measureColumnDepth", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["measureColumnDepth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkDepth", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["checkDepth"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "created", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["created"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroyed", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["destroyed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "load", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["load"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDataBound", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queryCellInfo", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["queryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerCellInfo", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["headerCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["actionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["actionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "actionFailure", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["actionFailure"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataBound", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["dataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelecting", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowSelecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelected", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowSelected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDeselecting", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDeselecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDeselected", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDeselected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelecting", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellSelecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelected", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellSelected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellDeselecting", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellDeselecting"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellDeselected", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellDeselected"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDragStart", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnDragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDrag", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnDrag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDrop", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragStartHelper", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDragStartHelper"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragStart", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDragStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDrag", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDrag"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDrop", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePrint", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforePrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "printComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["printComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detailDataBound", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["detailDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toolbarClick", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["toolbarClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchAdd", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["batchAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchCancel", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["batchCancel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchDelete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["batchDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchAdd", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeBatchAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchDelete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeBatchDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchSave", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeBatchSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beginEdit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beginEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellEdit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSave", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSaved", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellSaved"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endAdd", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["endAdd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endDelete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["endDelete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endEdit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["endEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordDoubleClick", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["recordDoubleClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordClick", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["recordClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeDataBound", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeOpenColumnChooser", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeOpenColumnChooser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeStart", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["resizeStart"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onResize", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["onResize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeStop", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["resizeStop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkBoxChange", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["checkBoxChange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeCopy", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeCopy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePaste", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforePaste"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterChoiceRequest", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["filterChoiceRequest"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterAfterOpen", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["filterAfterOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterBeforeOpen", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["filterBeforeOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterSearchBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["filterSearchBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "commandClick", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["commandClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initialLoad", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["initialLoad"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initialEnd", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["initialEnd"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataReady", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["dataReady"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contentReady", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["contentReady"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uiUpdate", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["uiUpdate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEmpty", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["onEmpty"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "inBoundModelChanged", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["inBoundModelChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modelChanged", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["modelChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colGroupRefresh", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["colGroupRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerRefreshed", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["headerRefreshed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["pageBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["pageComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["sortBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["sortComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["filterBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["filterComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "searchBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["searchBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "searchComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["searchComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reorderBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["reorderBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reorderComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["reorderComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDragAndDropBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDropComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDragAndDropComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["groupBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["groupComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ungroupBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ungroupBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ungroupComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ungroupComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupAggregates", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["groupAggregates"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshFooterRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["refreshFooterRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshAggregateCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["refreshAggregateCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshAggregates", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["refreshAggregates"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelectionBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowSelectionComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnSelectionBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnSelectionComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelectionBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellSelectionBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellSelectionComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellSelectionComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeCellFocused", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeCellFocused"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cellFocused", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cellFocused"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keyPressed", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["keyPressed"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "click", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["click"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["destroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnVisibilityChanged", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnVisibilityChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scroll", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["scroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnWidthChanged", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnWidthChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnPositionChanged", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnPositionChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowDragAndDrop", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowDragAndDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowsAdded", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowsAdded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowsRemoved", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowsRemoved"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnDragStop", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnDragStop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "headerDrop", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["headerDrop"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataSourceModified", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["dataSourceModified"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["refreshComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refreshVirtualBlock", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["refreshVirtualBlock"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dblclick", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["dblclick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toolbarRefresh", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["toolbarRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bulkSave", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["bulkSave"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoCol", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["autoCol"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tooltipDestroy", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["tooltipDestroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updateData", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["updateData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["editBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["editComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["addBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["addComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "saveComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["saveComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deleteBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["deleteBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deleteComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["deleteComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "preventBatch", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["preventBatch"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dialogDestroy", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["dialogDestroy"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "crudAction", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["crudAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addDeleteAction", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["addDeleteAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "destroyForm", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["destroyForm"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doubleTap", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["doubleTap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeExcelExport", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeExcelExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelExportComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["excelExportComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelQueryCellInfo", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["excelQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "excelHeaderQueryCellInfo", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["excelHeaderQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exportDetailDataBound", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["exportDetailDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforePdfExport", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforePdfExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfExportComplete", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["pdfExportComplete"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfQueryCellInfo", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["pdfQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pdfHeaderQueryCellInfo", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["pdfHeaderQueryCellInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "accessPredicate", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["accessPredicate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contextMenuClick", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["contextMenuClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "freezeRender", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["freezeRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "freezeRefresh", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["freezeRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contextMenuOpen", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["contextMenuOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnMenuClick", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnMenuClick"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "columnMenuOpen", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["columnMenuOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterOpen", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["filterOpen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterDialogCreated", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["filterDialogCreated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filterMenuClose", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["filterMenuClose"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initForeignKeyColumn", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["initForeignKeyColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getForeignKeyData", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getForeignKeyData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generateQuery", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["generateQuery"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showEmptyGrid", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["showEmptyGrid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "foreignKeyData", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["foreignKeyData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataStateChange", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["dataStateChange"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dataSourceChanged", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["dataSourceChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rtlUpdated", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rtlUpdated"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeFragAppend", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeFragAppend"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "frozenHeight", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["frozenHeight"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textWrapRefresh", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["textWrapRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recordAdded", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["recordAdded"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cancelBegin", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["cancelBegin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "editNextValCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["editNextValCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchyPrint", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["hierarchyPrint"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expandChildGrid", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["expandChildGrid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "printGridInit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["printGridInit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exportRowDataBound", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["exportRowDataBound"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rowPositionChanged", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["rowPositionChanged"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchForm", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["batchForm"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeStartEdit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeStartEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "beforeBatchCancel", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["beforeBatchCancel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batchEditFormRendered", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["batchEditFormRendered"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partialRefresh", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["partialRefresh"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Data", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Data"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sort", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Sort"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Page", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Page"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Filter", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Filter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Search", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Search"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scroll", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Scroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resizeClassList", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["resizeClassList"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Resize", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Resize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Reorder", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Reorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowDD", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["RowDD"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Group", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Group"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCloneProperties", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["getCloneProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Print", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Print"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DetailRow", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["DetailRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Toolbar", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Toolbar"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Aggregate", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Aggregate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "summaryIterator", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["summaryIterator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualScroll", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["VirtualScroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Edit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Edit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Global", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Global"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BatchEdit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["BatchEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InlineEdit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["InlineEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalEdit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["NormalEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogEdit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["DialogEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnChooser", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ColumnChooser"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelExport", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ExcelExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfExport", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["PdfExport"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExportHelper", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ExportHelper"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExportValueFormatter", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ExportValueFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Clipboard", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Clipboard"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CommandColumn", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["CommandColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckBoxFilter", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["CheckBoxFilter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "menuClass", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["menuClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContextMenu", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ContextMenu"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Freeze", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Freeze"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnMenu", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ColumnMenu"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExcelFilter", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ExcelFilter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ForeignKey", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ForeignKey"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Logger"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "detailLists", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["detailLists"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Column"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Row"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Cell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderRender", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["HeaderRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContentRender", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ContentRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["RowRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["CellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCellRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["HeaderCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilterCellRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["FilterCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedHeaderCellRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["StackedHeaderCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Render", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["Render"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IndentCellRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["IndentCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionCellRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["GroupCaptionCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupCaptionEmptyCellRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["GroupCaptionEmptyCellRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BatchEditRender", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["BatchEditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogEditRender", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["DialogEditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InlineEditRender", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["InlineEditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditRender", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["EditRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["BooleanEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["DefaultEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["DropDownEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["NumericEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DatePickerEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["DatePickerEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CommandColumnRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["CommandColumnRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeContentRender", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["FreezeContentRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeRender", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["FreezeRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringFilterUI", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["StringFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumberFilterUI", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["NumberFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateFilterUI", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["DateFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BooleanFilterUI", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["BooleanFilterUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FlMenuOptrUI", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["FlMenuOptrUI"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoCompleteEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["AutoCompleteEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComboboxEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ComboboxEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelectEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["MultiSelectEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimePickerEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["TimePickerEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToggleEditCell", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ToggleEditCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBoxCellEdit", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["MaskedTextBoxCellEdit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualContentRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["VirtualContentRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualHeaderRenderer", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["VirtualHeaderRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualElementHandler", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["VirtualElementHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellRendererFactory", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["CellRendererFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServiceLocator", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ServiceLocator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowModelGenerator", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["RowModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupModelGenerator", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["GroupModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FreezeRowModelGenerator", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["FreezeRowModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ValueFormatter", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["ValueFormatter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualRowModelGenerator", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["VirtualRowModelGenerator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InterSectionObserver", function() { return _grid_index__WEBPACK_IMPORTED_MODULE_0__["InterSectionObserver"]; });

/* harmony import */ var _pager_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pager/index */ "./node_modules/@syncfusion/ej2-grids/src/pager/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Pager", function() { return _pager_index__WEBPACK_IMPORTED_MODULE_1__["Pager"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExternalMessage", function() { return _pager_index__WEBPACK_IMPORTED_MODULE_1__["ExternalMessage"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericContainer", function() { return _pager_index__WEBPACK_IMPORTED_MODULE_1__["NumericContainer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PagerMessage", function() { return _pager_index__WEBPACK_IMPORTED_MODULE_1__["PagerMessage"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PagerDropDown", function() { return _pager_index__WEBPACK_IMPORTED_MODULE_1__["PagerDropDown"]; });

/**
 * Export Grid components
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/pager/external-message.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/pager/external-message.js ***!
  \**************************************************************************/
/*! exports provided: ExternalMessage */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExternalMessage", function() { return ExternalMessage; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");

/**
 * `ExternalMessage` module is used to display user provided message.
 */
var ExternalMessage = /** @class */ (function () {
    /**
     * Constructor for externalMessage module
     * @param  {Pager} pagerModule?
     * @returns defaultType
     * @hidden
     */
    function ExternalMessage(pagerModule) {
        this.pagerModule = pagerModule;
    }
    /**
     * For internal use only - Get the module name.
     * @private
     */
    ExternalMessage.prototype.getModuleName = function () {
        return 'externalMessage';
    };
    /**
     * The function is used to render pager externalMessage
     * @hidden
     */
    ExternalMessage.prototype.render = function () {
        this.element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-pagerexternalmsg', attrs: { 'aria-label': 'Pager external message' } });
        this.pagerModule.element.appendChild(this.element);
        this.refresh();
    };
    /**
     * Refreshes the external message of Pager.
     */
    ExternalMessage.prototype.refresh = function () {
        if (this.pagerModule.externalMessage && this.pagerModule.externalMessage.toString().length) {
            this.showMessage();
            this.element.innerHTML = this.pagerModule.externalMessage;
        }
        else {
            this.hideMessage();
        }
    };
    /**
     * Hides the external message of Pager.
     */
    ExternalMessage.prototype.hideMessage = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element)) {
            this.element.style.display = 'none';
        }
    };
    /**
     * Shows the external message of the Pager.
     */
    ExternalMessage.prototype.showMessage = function () {
        this.element.style.display = '';
    };
    /**
     * To destroy the PagerMessage
     * @method destroy
     * @return {void}
     * @hidden
     */
    ExternalMessage.prototype.destroy = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element);
    };
    return ExternalMessage;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/pager/index.js":
/*!***************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/pager/index.js ***!
  \***************************************************************/
/*! exports provided: Pager, ExternalMessage, NumericContainer, PagerMessage, PagerDropDown */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _pager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pager */ "./node_modules/@syncfusion/ej2-grids/src/pager/pager.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Pager", function() { return _pager__WEBPACK_IMPORTED_MODULE_0__["Pager"]; });

/* harmony import */ var _external_message__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./external-message */ "./node_modules/@syncfusion/ej2-grids/src/pager/external-message.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExternalMessage", function() { return _external_message__WEBPACK_IMPORTED_MODULE_1__["ExternalMessage"]; });

/* harmony import */ var _numeric_container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./numeric-container */ "./node_modules/@syncfusion/ej2-grids/src/pager/numeric-container.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericContainer", function() { return _numeric_container__WEBPACK_IMPORTED_MODULE_2__["NumericContainer"]; });

/* harmony import */ var _pager_message__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pager-message */ "./node_modules/@syncfusion/ej2-grids/src/pager/pager-message.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PagerMessage", function() { return _pager_message__WEBPACK_IMPORTED_MODULE_3__["PagerMessage"]; });

/* harmony import */ var _pager_dropdown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pager-dropdown */ "./node_modules/@syncfusion/ej2-grids/src/pager/pager-dropdown.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PagerDropDown", function() { return _pager_dropdown__WEBPACK_IMPORTED_MODULE_4__["PagerDropDown"]; });

/**
 * Pager component exported items
 */







/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/pager/numeric-container.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/pager/numeric-container.js ***!
  \***************************************************************************/
/*! exports provided: NumericContainer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumericContainer", function() { return NumericContainer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");



/**
 * `NumericContainer` module handles rendering and refreshing numeric container.
 */
var NumericContainer = /** @class */ (function () {
    /**
     * Constructor for numericContainer module
     * @hidden
     */
    function NumericContainer(pagerModule) {
        this.pagerModule = pagerModule;
    }
    /**
     * The function is used to render numericContainer
     * @hidden
     */
    NumericContainer.prototype.render = function () {
        this.pagerElement = this.pagerModule.element;
        this.renderNumericContainer();
        this.refreshNumericLinks();
        this.wireEvents();
    };
    /**
     * Refreshes the numeric container of Pager.
     */
    NumericContainer.prototype.refresh = function () {
        this.pagerModule.updateTotalPages();
        if (this.links.length) {
            this.updateLinksHtml();
        }
        this.updateStyles();
    };
    /**
     * The function is used to refresh refreshNumericLinks
     * @hidden
     */
    NumericContainer.prototype.refreshNumericLinks = function () {
        var link;
        var pagerObj = this.pagerModule;
        var div = pagerObj.element.querySelector('.e-numericcontainer');
        var frag = document.createDocumentFragment();
        div.innerHTML = '';
        for (var i = 1; i <= pagerObj.pageCount; i++) {
            link = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('a', {
                className: 'e-link e-numericitem e-spacing e-pager-default',
                attrs: { role: 'link', tabindex: '-1', 'aria-label': 'Goto Page ' + i,
                    href: 'javascript:void(0);', name: 'Goto page' + i }
            });
            if (pagerObj.currentPage === i) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(link, ['e-currentitem', 'e-active'], ['e-pager-default']);
            }
            frag.appendChild(link);
        }
        div.appendChild(frag);
        this.links = [].slice.call(div.childNodes);
    };
    /**
     * Binding events to the element while component creation
     * @hidden
     */
    NumericContainer.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.pagerElement, 'click', this.clickHandler, this);
    };
    /**
     * Unbinding events from the element while component destroy
     * @hidden
     */
    NumericContainer.prototype.unwireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.pagerModule.element, 'click', this.clickHandler);
    };
    /**
     * To destroy the PagerMessage
     * @method destroy
     * @return {void}
     * @hidden
     */
    NumericContainer.prototype.destroy = function () {
        this.unwireEvents();
    };
    NumericContainer.prototype.renderNumericContainer = function () {
        this.element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-pagercontainer', attrs: { 'role': 'navigation' }
        });
        this.renderFirstNPrev(this.element);
        this.renderPrevPagerSet(this.element);
        this.element.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-numericcontainer' }));
        this.renderNextPagerSet(this.element);
        this.renderNextNLast(this.element);
        this.pagerModule.element.appendChild(this.element);
    };
    NumericContainer.prototype.renderFirstNPrev = function (pagerContainer) {
        this.first = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-first e-icons e-icon-first',
            attrs: {
                title: this.pagerModule.getLocalizedLabel('firstPageTooltip'),
                'aria-label': this.pagerModule.getLocalizedLabel('firstPageTooltip'),
                tabindex: '-1'
            }
        });
        this.prev = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-prev e-icons e-icon-prev',
            attrs: {
                title: this.pagerModule.getLocalizedLabel('previousPageTooltip'),
                'aria-label': this.pagerModule.getLocalizedLabel('previousPageTooltip'),
                tabindex: '-1'
            }
        });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.first, this.prev], pagerContainer);
    };
    NumericContainer.prototype.renderPrevPagerSet = function (pagerContainer) {
        var prevPager = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div');
        this.PP = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('a', {
            className: 'e-link e-pp e-spacing', innerHTML: '...',
            attrs: {
                title: this.pagerModule.getLocalizedLabel('previousPagerTooltip'), role: 'link',
                'aria-label': this.pagerModule.getLocalizedLabel('previousPagerTooltip'),
                tabindex: '-1',
                name: this.pagerModule.getLocalizedLabel('previousPagerTooltip'),
                href: 'javascript:void(0);'
            }
        });
        prevPager.appendChild(this.PP);
        pagerContainer.appendChild(prevPager);
    };
    NumericContainer.prototype.renderNextPagerSet = function (pagerContainer) {
        var nextPager = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div');
        this.NP = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('a', {
            className: 'e-link e-np e-spacing',
            innerHTML: '...', attrs: {
                title: this.pagerModule.getLocalizedLabel('nextPagerTooltip'), role: 'link',
                'aria-label': this.pagerModule.getLocalizedLabel('nextPagerTooltip'),
                tabindex: '-1',
                name: this.pagerModule.getLocalizedLabel('nextPagerTooltip'),
                href: 'javascript:void(0);'
            }
        });
        nextPager.appendChild(this.NP);
        pagerContainer.appendChild(nextPager);
    };
    NumericContainer.prototype.renderNextNLast = function (pagerContainer) {
        this.next = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-next e-icons e-icon-next',
            attrs: {
                title: this.pagerModule.getLocalizedLabel('nextPageTooltip'),
                'aria-label': this.pagerModule.getLocalizedLabel('nextPageTooltip'),
                tabindex: '-1'
            }
        });
        this.last = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-last e-icons e-icon-last',
            attrs: {
                title: this.pagerModule.getLocalizedLabel('lastPageTooltip'),
                'aria-label': this.pagerModule.getLocalizedLabel('lastPageTooltip'),
                tabindex: '-1'
            }
        });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.next, this.last], pagerContainer);
    };
    NumericContainer.prototype.clickHandler = function (e) {
        var pagerObj = this.pagerModule;
        var target = e.target;
        pagerObj.previousPageNo = pagerObj.currentPage;
        if (!target.classList.contains('e-disable') && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target.getAttribute('index'))) {
            pagerObj.currentPage = parseInt(target.getAttribute('index'), 10);
            pagerObj.dataBind();
        }
        return false;
    };
    NumericContainer.prototype.updateLinksHtml = function () {
        var pagerObj = this.pagerModule;
        var currentPageSet;
        var pageNo;
        pagerObj.currentPage = pagerObj.totalPages === 1 ? 1 : pagerObj.currentPage;
        if (pagerObj.currentPage > pagerObj.totalPages && pagerObj.totalPages) {
            pagerObj.currentPage = pagerObj.totalPages;
        }
        currentPageSet = parseInt((pagerObj.currentPage / pagerObj.pageCount).toString(), 10);
        if (pagerObj.currentPage % pagerObj.pageCount === 0 && currentPageSet > 0) {
            currentPageSet = currentPageSet - 1;
        }
        for (var i = 0; i < pagerObj.pageCount; i++) {
            pageNo = (currentPageSet * pagerObj.pageCount) + 1 + i;
            if (pageNo <= pagerObj.totalPages) {
                this.links[i].style.display = '';
                this.links[i].setAttribute('index', pageNo.toString());
                this.links[i].innerHTML = !pagerObj.customText ? pageNo.toString() : pagerObj.customText + pageNo;
                if (pagerObj.currentPage !== pageNo) {
                    this.links[i].classList.add('e-pager-default');
                }
                else {
                    this.links[i].classList.remove('e-pager-default');
                }
            }
            else {
                this.links[i].innerHTML = !pagerObj.customText ? pageNo.toString() : pagerObj.customText + pageNo;
                this.links[i].style.display = 'none';
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.links[i], [], ['e-currentitem', 'e-active']);
        }
        this.first.setAttribute('index', '1');
        this.last.setAttribute('index', pagerObj.totalPages.toString());
        this.prev.setAttribute('index', (pagerObj.currentPage - 1).toString());
        this.next.setAttribute('index', (pagerObj.currentPage + 1).toString());
        this.pagerElement.querySelector('.e-mfirst').setAttribute('index', '1');
        this.pagerElement.querySelector('.e-mlast').setAttribute('index', pagerObj.totalPages.toString());
        this.pagerElement.querySelector('.e-mprev').setAttribute('index', (pagerObj.currentPage - 1).toString());
        this.pagerElement.querySelector('.e-mnext').setAttribute('index', (pagerObj.currentPage + 1).toString());
        this.PP.setAttribute('index', (parseInt(this.links[0].getAttribute('index'), 10) - pagerObj.pageCount).toString());
        this.NP.setAttribute('index', (parseInt(this.links[this.links.length - 1].getAttribute('index'), 10) + 1).toString());
    };
    NumericContainer.prototype.updateStyles = function () {
        this.updateFirstNPrevStyles();
        this.updatePrevPagerSetStyles();
        this.updateNextPagerSetStyles();
        this.updateNextNLastStyles();
        if (this.links.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.links[(this.pagerModule.currentPage - 1) % this.pagerModule.pageCount], ['e-currentitem', 'e-active'], []);
        }
    };
    NumericContainer.prototype.updateFirstNPrevStyles = function () {
        var firstPage = ['e-firstpage', 'e-pager-default'];
        var firstPageDisabled = ['e-firstpagedisabled', 'e-disable'];
        var prevPage = ['e-prevpage', 'e-pager-default'];
        var prevPageDisabled = ['e-prevpagedisabled', 'e-disable'];
        if (this.pagerModule.totalPages > 0 && this.pagerModule.currentPage > 1) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.prev, prevPage, prevPageDisabled);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.first, firstPage, firstPageDisabled);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.pagerElement.querySelector('.e-mfirst'), firstPage, firstPageDisabled);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.pagerElement.querySelector('.e-mprev'), prevPage, prevPageDisabled);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.prev, prevPageDisabled, prevPage);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.first, firstPageDisabled, firstPage);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.pagerElement.querySelector('.e-mprev'), prevPageDisabled, prevPage);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.pagerElement.querySelector('.e-mfirst'), firstPageDisabled, firstPage);
        }
    };
    NumericContainer.prototype.updatePrevPagerSetStyles = function () {
        if (this.pagerModule.currentPage > this.pagerModule.pageCount) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.PP, ['e-numericitem', 'e-pager-default'], ['e-nextprevitemdisabled', 'e-disable']);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.PP, ['e-nextprevitemdisabled', 'e-disable'], ['e-numericitem', 'e-pager-default']);
        }
    };
    NumericContainer.prototype.updateNextPagerSetStyles = function () {
        var pagerObj = this.pagerModule;
        var firstPage = this.links[0].innerHTML.replace(pagerObj.customText, '');
        if (!firstPage.length || !this.links.length || (parseInt(firstPage, 10) + pagerObj.pageCount > pagerObj.totalPages)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.NP, ['e-nextprevitemdisabled', 'e-disable'], ['e-numericitem', 'e-pager-default']);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.NP, ['e-numericitem', 'e-pager-default'], ['e-nextprevitemdisabled', 'e-disable']);
        }
    };
    NumericContainer.prototype.updateNextNLastStyles = function () {
        var lastPage = ['e-lastpage', 'e-pager-default'];
        var lastPageDisabled = ['e-lastpagedisabled', 'e-disable'];
        var nextPage = ['e-nextpage', 'e-pager-default'];
        var nextPageDisabled = ['e-nextpagedisabled', 'e-disable'];
        var pagerObj = this.pagerModule;
        if (pagerObj.currentPage === pagerObj.totalPages || pagerObj.totalRecordsCount === 0) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.last, lastPageDisabled, lastPage);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.next, nextPageDisabled, nextPage);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.pagerElement.querySelector('.e-mlast'), lastPageDisabled, lastPage);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.pagerElement.querySelector('.e-mnext'), nextPageDisabled, nextPage);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.last, lastPage, lastPageDisabled);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.next, nextPage, nextPageDisabled);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.pagerElement.querySelector('.e-mlast'), lastPage, lastPageDisabled);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.pagerElement.querySelector('.e-mnext'), nextPage, nextPageDisabled);
        }
    };
    return NumericContainer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/pager/pager-dropdown.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/pager/pager-dropdown.js ***!
  \************************************************************************/
/*! exports provided: PagerDropDown */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PagerDropDown", function() { return PagerDropDown; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-dropdowns */ "./node_modules/@syncfusion/ej2-dropdowns/index.js");


/**
 * `PagerDropDown` module handles selected pageSize from DropDownList.
 */
var PagerDropDown = /** @class */ (function () {
    /**
     * Constructor for pager module
     * @hidden
     */
    function PagerDropDown(pagerModule) {
        this.pagerModule = pagerModule;
    }
    /**
     * For internal use only - Get the module name.
     * @private
     * @hidden
     */
    PagerDropDown.prototype.getModuleName = function () {
        return 'pagerdropdown';
    };
    /**
     * The function is used to render pager dropdown
     * @hidden
     */
    PagerDropDown.prototype.render = function () {
        var pagerObj = this.pagerModule;
        this.pagerDropDownDiv = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-pagesizes' });
        var dropDownDiv = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-pagerdropdown' });
        var defaultTextDiv = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-pagerconstant' });
        var input = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('input', { attrs: { type: 'text', tabindex: '1' } });
        this.pagerCons = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('span', { className: 'e-constant', innerHTML: this.pagerModule.getLocalizedLabel('pagerDropDown') });
        dropDownDiv.appendChild(input);
        defaultTextDiv.appendChild(this.pagerCons);
        this.pagerDropDownDiv.appendChild(dropDownDiv);
        this.pagerDropDownDiv.appendChild(defaultTextDiv);
        this.pagerModule.element.appendChild(this.pagerDropDownDiv);
        var pageSizesModule = this.pagerModule.pageSizes;
        var pageSizesArray = (pageSizesModule.length ? this.convertValue(pageSizesModule) :
            [this.pagerModule.getLocalizedLabel('All'), '5', '10', '12', '20']);
        var defaultValue = this.pagerModule.pageSize;
        this.dropDownListObject = new _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_1__["DropDownList"]({
            dataSource: pageSizesArray,
            value: defaultValue.toString(),
            change: this.onChange.bind(this),
            cssClass: 'e-alldrop'
        });
        this.dropDownListObject.appendTo(input);
        if (pageSizesModule.length) {
            this.dropDownListObject.element.value = this.pagerModule.pageSize.toString();
        }
        pagerObj.pageSize = defaultValue;
        pagerObj.dataBind();
        pagerObj.trigger('dropDownChanged', { pageSize: defaultValue });
        this.addEventListener();
    };
    /**
     * For internal use only - Get the pagesize.
     * @private
     * @hidden
     */
    PagerDropDown.prototype.onChange = function (e) {
        if (this.dropDownListObject.value === this.pagerModule.getLocalizedLabel('All')) {
            this.pagerModule.pageSize = this.pagerModule.totalRecordsCount;
            this.pagerCons.innerHTML = this.pagerModule.getLocalizedLabel('pagerAllDropDown');
            e.value = this.pagerModule.pageSize;
            if (document.getElementsByClassName('e-popup-open e-alldrop').length) {
                document.getElementsByClassName('e-popup-open e-alldrop')[0].style.display = 'none';
            }
        }
        else {
            this.pagerModule.pageSize = parseInt(this.dropDownListObject.value, 10);
            if (this.pagerCons.innerHTML !== this.pagerModule.getLocalizedLabel('pagerDropDown')) {
                this.pagerCons.innerHTML = this.pagerModule.getLocalizedLabel('pagerDropDown');
            }
        }
        this.pagerModule.dataBind();
        this.pagerModule.trigger('dropDownChanged', { pageSize: this.dropDownListObject.value });
    };
    PagerDropDown.prototype.beforeValueChange = function (prop) {
        if (typeof prop.newProp.value === 'number') {
            var val = prop.newProp.value.toString();
            prop.newProp.value = val;
        }
    };
    PagerDropDown.prototype.convertValue = function (pageSizeValue) {
        var item = pageSizeValue;
        for (var i = 0; i < item.length; i++) {
            item[i] = typeof item[i] === 'number' ? item[i].toString() : item[i];
        }
        return item;
    };
    PagerDropDown.prototype.setDropDownValue = function (prop, value) {
        if (this.dropDownListObject) {
            this.dropDownListObject[prop] = value;
        }
    };
    PagerDropDown.prototype.addEventListener = function () {
        this.dropDownListObject.on('beforeValueChange', this.beforeValueChange, this);
    };
    PagerDropDown.prototype.removeEventListener = function () {
        this.dropDownListObject.off('beforeValueChange', this.beforeValueChange);
    };
    /**
     * To destroy the Pagerdropdown
     * @method destroy
     * @return {void}
     * @hidden
     */
    PagerDropDown.prototype.destroy = function (args) {
        if (this.dropDownListObject && !this.dropDownListObject.isDestroyed) {
            this.removeEventListener();
            this.dropDownListObject.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.pagerDropDownDiv);
        }
    };
    return PagerDropDown;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/pager/pager-message.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/pager/pager-message.js ***!
  \***********************************************************************/
/*! exports provided: PagerMessage */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PagerMessage", function() { return PagerMessage; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");

/**
 * `PagerMessage` module is used to display pager information.
 */
var PagerMessage = /** @class */ (function () {
    /**
     * Constructor for externalMessage module
     * @hidden
     */
    function PagerMessage(pagerModule) {
        this.pagerModule = pagerModule;
    }
    /**
     * The function is used to render pager message
     * @hidden
     */
    PagerMessage.prototype.render = function () {
        var div = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: 'e-parentmsgbar', attrs: { 'aria-label': 'Pager Information' } });
        this.pageNoMsgElem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('span', { className: 'e-pagenomsg', styles: 'textalign:right' });
        this.pageCountMsgElem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('span', { className: 'e-pagecountmsg', styles: 'textalign:right' });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.pageNoMsgElem, this.pageCountMsgElem], div);
        this.pagerModule.element.appendChild(div);
        this.refresh();
    };
    /**
     * Refreshes the pager information.
     */
    PagerMessage.prototype.refresh = function () {
        var pagerObj = this.pagerModule;
        this.pageNoMsgElem.textContent = this.format(pagerObj.getLocalizedLabel('currentPageInfo'), [pagerObj.totalRecordsCount === 0 ? 0 :
                pagerObj.currentPage, pagerObj.totalPages || 0]) + ' ';
        this.pageCountMsgElem.textContent = this.format(pagerObj.getLocalizedLabel('totalItemsInfo'), [pagerObj.totalRecordsCount || 0]);
        this.pageNoMsgElem.parentElement.setAttribute('aria-label', this.pageNoMsgElem.textContent + this.pageCountMsgElem.textContent);
    };
    /**
     * Hides the Pager information.
     */
    PagerMessage.prototype.hideMessage = function () {
        if (this.pageNoMsgElem) {
            this.pageNoMsgElem.style.display = 'none';
        }
        if (this.pageCountMsgElem) {
            this.pageCountMsgElem.style.display = 'none';
        }
    };
    /**
     * Shows the Pager information.
     */
    PagerMessage.prototype.showMessage = function () {
        if (!this.pageNoMsgElem) {
            this.render();
        }
        this.pageNoMsgElem.style.display = '';
        this.pageCountMsgElem.style.display = '';
    };
    /**
     * To destroy the PagerMessage
     * @method destroy
     * @return {void}
     * @hidden
     */
    PagerMessage.prototype.destroy = function () {
        //destroy
    };
    PagerMessage.prototype.format = function (str, args) {
        var regx;
        for (var i = 0; i < args.length; i++) {
            regx = new RegExp('\\{' + (i) + '\\}', 'gm');
            str = str.replace(regx, args[i].toString());
        }
        return str;
    };
    return PagerMessage;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-grids/src/pager/pager.js":
/*!***************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-grids/src/pager/pager.js ***!
  \***************************************************************/
/*! exports provided: Pager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pager", function() { return Pager; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _numeric_container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numeric-container */ "./node_modules/@syncfusion/ej2-grids/src/pager/numeric-container.js");
/* harmony import */ var _pager_message__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pager-message */ "./node_modules/@syncfusion/ej2-grids/src/pager/pager-message.js");
/* harmony import */ var _grid_base_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../grid/base/util */ "./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};







/**
 * Represents the `Pager` component.
 * ```html
 * <div id="pager"/>
 * ```
 * ```typescript
 * <script>
 *   var pagerObj = new Pager({ totalRecordsCount: 50, pageSize:10 });
 *   pagerObj.appendTo("#pager");
 * </script>
 * ```
 */
var Pager = /** @class */ (function (_super) {
    __extends(Pager, _super);
    /**
     * Constructor for creating the component.
     * @hidden
     */
    function Pager(options, element) {
        return _super.call(this, options, element) || this;
    }
    /**
     * To provide the array of modules needed for component rendering
     * @hidden
     */
    Pager.prototype.requiredModules = function () {
        var modules = [];
        if (this.enableExternalMessage) {
            modules.push({
                member: 'externalMessage',
                args: [this]
            });
        }
        if (this.checkpagesizes()) {
            modules.push({
                member: 'pagerdropdown',
                args: [this]
            });
        }
        return modules;
    };
    /**
     * Initialize the event handler
     * @hidden
     */
    Pager.prototype.preRender = function () {
        //preRender
        this.defaultConstants = {
            currentPageInfo: '{0} of {1} pages',
            totalItemsInfo: '({0} items)',
            firstPageTooltip: 'Go to first page',
            lastPageTooltip: 'Go to last page',
            nextPageTooltip: 'Go to next page',
            previousPageTooltip: 'Go to previous page',
            nextPagerTooltip: 'Go to next pager',
            previousPagerTooltip: 'Go to previous pager',
            pagerDropDown: 'Items per page',
            pagerAllDropDown: 'Items',
            All: 'All'
        };
        this.containerModule = new _numeric_container__WEBPACK_IMPORTED_MODULE_1__["NumericContainer"](this);
        this.pagerMessageModule = new _pager_message__WEBPACK_IMPORTED_MODULE_2__["PagerMessage"](this);
    };
    /**
     * To Initialize the component rendering
     */
    Pager.prototype.render = function () {
        if (this.template) {
            this.pagerTemplate();
        }
        else {
            this.initLocalization();
            this.updateRTL();
            this.totalRecordsCount = this.totalRecordsCount || 0;
            this.renderFirstPrevDivForDevice();
            this.containerModule.render();
            if (this.enablePagerMessage) {
                this.pagerMessageModule.render();
            }
            this.renderNextLastDivForDevice();
            if (this.checkpagesizes() && this.pagerdropdownModule) {
                this.pagerdropdownModule.render();
            }
            this.addAriaLabel();
            if (this.enableExternalMessage && this.externalMessageModule) {
                this.externalMessageModule.render();
            }
            this.refresh();
            this.trigger('created', { 'currentPage': this.currentPage, 'totalRecordsCount': this.totalRecordsCount });
        }
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @hidden
     */
    Pager.prototype.getPersistData = function () {
        var keyEntity = ['currentPage', 'pageSize'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * To destroy the Pager component.
     * @method destroy
     * @return {void}
     */
    Pager.prototype.destroy = function () {
        _super.prototype.destroy.call(this);
        this.containerModule.destroy();
        this.pagerMessageModule.destroy();
        this.element.innerHTML = '';
    };
    /**
     * For internal use only - Get the module name.
     * @private
     */
    Pager.prototype.getModuleName = function () {
        return 'pager';
    };
    /**
     * Called internally if any of the property value changed.
     * @hidden
     */
    Pager.prototype.onPropertyChanged = function (newProp, oldProp) {
        if (this.isDestroyed) {
            return;
        }
        if (newProp.pageCount !== oldProp.pageCount) {
            this.containerModule.refreshNumericLinks();
            this.containerModule.refresh();
        }
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'currentPage':
                    if (this.checkGoToPage(newProp.currentPage, oldProp.currentPage)) {
                        this.currentPageChanged();
                    }
                    break;
                case 'pageSize':
                case 'totalRecordsCount':
                case 'customText':
                    if (this.checkpagesizes() && this.pagerdropdownModule) {
                        this.pagerdropdownModule.setDropDownValue('value', this.pageSize);
                    }
                    this.refresh();
                    break;
                case 'pageSizes':
                    if (this.checkpagesizes() && this.pagerdropdownModule) {
                        this.pagerdropdownModule.destroy();
                        this.pagerdropdownModule.render();
                    }
                    this.refresh();
                    break;
                case 'template':
                    this.templateFn = this.compile(this.template);
                    this.refresh();
                    break;
                case 'locale':
                    this.initLocalization();
                    this.refresh();
                    break;
                case 'enableExternalMessage':
                    if (this.enableExternalMessage && this.externalMessageModule) {
                        this.externalMessageModule.render();
                    }
                    break;
                case 'externalMessage':
                    if (this.externalMessageModule) {
                        this.externalMessageModule.refresh();
                    }
                    break;
                case 'enableRtl':
                    this.updateRTL();
                    break;
                case 'enablePagerMessage':
                    if (this.enablePagerMessage) {
                        this.pagerMessageModule.showMessage();
                    }
                    else {
                        this.pagerMessageModule.hideMessage();
                    }
                    break;
            }
        }
    };
    /**
     * Gets the localized label by locale keyword.
     * @param  {string} key
     * @return {string}
     */
    Pager.prototype.getLocalizedLabel = function (key) {
        return this.localeObj.getConstant(key);
    };
    /**
     * Navigate to target page by given number.
     * @param  {number} pageNo - Defines page number.
     * @return {void}
     */
    Pager.prototype.goToPage = function (pageNo) {
        if (this.checkGoToPage(pageNo)) {
            this.currentPage = pageNo;
            this.dataBind();
        }
    };
    Pager.prototype.checkpagesizes = function () {
        if (this.pageSizes === true || this.pageSizes.length) {
            return true;
        }
        return false;
    };
    Pager.prototype.checkGoToPage = function (newPageNo, oldPageNo) {
        if (newPageNo !== this.currentPage) {
            this.previousPageNo = this.currentPage;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldPageNo)) {
            this.previousPageNo = oldPageNo;
        }
        if (this.previousPageNo !== newPageNo && (newPageNo >= 1 && newPageNo <= this.totalPages)) {
            return true;
        }
        return false;
    };
    Pager.prototype.currentPageChanged = function () {
        if (this.enableQueryString) {
            this.updateQueryString(this.currentPage);
        }
        var args = { currentPage: this.currentPage, cancel: false };
        this.trigger('click', args);
        if (!args.cancel) {
            this.refresh();
        }
    };
    Pager.prototype.pagerTemplate = function () {
        var result;
        this.element.classList.add('e-pagertemplate');
        this.compile(this.template);
        var data = {
            currentPage: this.currentPage, pageSize: this.pageSize, pageCount: this.pageCount,
            totalRecordsCount: this.totalRecordsCount, totalPages: this.totalPages
        };
        result = this.getPagerTemplate()(data);
        Object(_grid_base_util__WEBPACK_IMPORTED_MODULE_3__["appendChildren"])(this.element, result);
    };
    /** @hidden */
    Pager.prototype.updateTotalPages = function () {
        this.totalPages = (this.totalRecordsCount % this.pageSize === 0) ? (this.totalRecordsCount / this.pageSize) :
            (parseInt((this.totalRecordsCount / this.pageSize).toString(), 10) + 1);
    };
    /** @hidden */
    Pager.prototype.getPagerTemplate = function () {
        return this.templateFn;
    };
    Pager.prototype.compile = function (template) {
        if (template) {
            var e = void 0;
            try {
                if (document.querySelectorAll(template).length) {
                    this.templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(template).innerHTML.trim());
                }
            }
            catch (e) {
                this.templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
            }
        }
        return undefined;
    };
    /**
     * Refreshes page count, pager information and external message.
     * @return {void}
     */
    Pager.prototype.refresh = function () {
        if (this.template) {
            this.element.innerHTML = '';
            this.updateTotalPages();
            this.pagerTemplate();
        }
        else {
            this.updateRTL();
            this.containerModule.refresh();
            if (this.enablePagerMessage) {
                this.pagerMessageModule.refresh();
            }
            if (this.enableExternalMessage && this.externalMessageModule) {
                this.externalMessageModule.refresh();
            }
        }
    };
    Pager.prototype.updateRTL = function () {
        if (this.enableRtl) {
            this.element.classList.add('e-rtl');
        }
        else {
            this.element.classList.remove('e-rtl');
        }
    };
    Pager.prototype.initLocalization = function () {
        this.localeObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName(), this.defaultConstants, this.locale);
    };
    Pager.prototype.updateQueryString = function (value) {
        var updatedUrl = this.getUpdatedURL(window.location.href, 'page', value.toString());
        window.history.pushState({ path: updatedUrl }, '', updatedUrl);
    };
    Pager.prototype.getUpdatedURL = function (uri, key, value) {
        var regx = new RegExp('([?|&])' + key + '=.*?(&|#|$)', 'i');
        if (uri.match(regx)) {
            return uri.replace(regx, '$1' + key + '=' + value + '$2');
        }
        else {
            var hash = '';
            if (uri.indexOf('#') !== -1) {
                hash = uri.replace(/.*#/, '#');
                uri = uri.replace(/#.*/, '');
            }
            return uri + (uri.indexOf('?') !== -1 ? '&' : '?') + key + '=' + value + hash;
        }
    };
    Pager.prototype.renderFirstPrevDivForDevice = function () {
        this.element.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-mfirst e-icons e-icon-first',
            attrs: { title: this.getLocalizedLabel('firstPageTooltip'), tabindex: '-1' }
        }));
        this.element.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-mprev e-icons e-icon-prev',
            attrs: { title: this.getLocalizedLabel('previousPageTooltip'), tabindex: '-1' }
        }));
    };
    Pager.prototype.renderNextLastDivForDevice = function () {
        this.element.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-mnext e-icons e-icon-next',
            attrs: { title: this.getLocalizedLabel('nextPageTooltip'), tabindex: '-1' }
        }));
        this.element.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: 'e-mlast e-icons e-icon-last',
            attrs: { title: this.getLocalizedLabel('lastPageTooltip'), tabindex: '-1' }
        }));
    };
    Pager.prototype.addAriaLabel = function () {
        var _this = this;
        var classList = ['.e-mfirst', '.e-mprev', '.e-mnext', '.e-mlast'];
        if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            classList.forEach(function (value) {
                var element = _this.element.querySelector(value);
                element.setAttribute('aria-label', element.getAttribute('title'));
            });
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Pager.prototype, "enableQueryString", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Pager.prototype, "enableExternalMessage", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Pager.prototype, "enablePagerMessage", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(12)
    ], Pager.prototype, "pageSize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], Pager.prototype, "pageCount", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Pager.prototype, "currentPage", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Pager.prototype, "totalRecordsCount", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Pager.prototype, "externalMessage", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Pager.prototype, "pageSizes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Pager.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Pager.prototype, "customText", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Pager.prototype, "click", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Pager.prototype, "dropDownChanged", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Pager.prototype, "created", void 0);
    Pager = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Pager);
    return Pager;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/index.js":
/*!******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/index.js ***!
  \******************************************************/
/*! exports provided: NumericTextBox, Input, TicksData, LimitData, TooltipData, Slider, regex, ErrorOption, FormValidator, FilesProp, ButtonsProps, AsyncSettings, Uploader, ColorPicker, TextBox, regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputFocusHandler, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo, MaskedTextBox */
/***/ (function(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-inputs/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericTextBox", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["NumericTextBox"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Input"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TicksData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TicksData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LimitData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LimitData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TooltipData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Slider"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regex", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["regex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorOption", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ErrorOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormValidator", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FormValidator"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilesProp", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FilesProp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonsProps", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ButtonsProps"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AsyncSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uploader", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Uploader"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPicker", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ColorPicker"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextBox", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TextBox"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regularExpressions", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["regularExpressions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMask", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["createMask"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "applyMask", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["applyMask"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wireEvents", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["wireEvents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unwireEvents", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["unwireEvents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindClearEvent", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["bindClearEvent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unstrippedValue", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["unstrippedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "strippedValue", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["strippedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputFocusHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["maskInputFocusHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputBlurHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["maskInputBlurHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputDropHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["maskInputDropHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mobileRemoveFunction", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["mobileRemoveFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setMaskValue", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["setMaskValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setElementValue", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["setElementValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInput", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["maskInput"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getVal", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getVal"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMaskedVal", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getMaskedVal"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskUndo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["MaskUndo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBox", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["MaskedTextBox"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/color-picker/color-picker.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/color-picker/color-picker.js ***!
  \******************************************************************************/
/*! exports provided: ColorPicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPicker", function() { return ColorPicker; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-splitbuttons */ "./node_modules/@syncfusion/ej2-splitbuttons/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _input_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../input/index */ "./node_modules/@syncfusion/ej2-inputs/src/input/index.js");
/* harmony import */ var _numerictextbox_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../numerictextbox/index */ "./node_modules/@syncfusion/ej2-inputs/src/numerictextbox/index.js");
/* harmony import */ var _slider_slider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../slider/slider */ "./node_modules/@syncfusion/ej2-inputs/src/slider/slider.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 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 = '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 = '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 = /** @class */ (function (_super) {
    __extends(ColorPicker, _super);
    function ColorPicker(options, element) {
        return _super.call(this, options, element) || this;
    }
    ColorPicker.prototype.preRender = function () {
        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
     */
    ColorPicker.prototype.render = function () {
        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);
        }
    };
    ColorPicker.prototype.initWrapper = function () {
        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';
        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;
        this.setProperties({ 'value': value }, true);
        if (this.enableRtl) {
            wrapper.classList.add(RTL);
        }
        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' });
    };
    ColorPicker.prototype.getWrapper = function () {
        return this.element.parentElement;
    };
    ColorPicker.prototype.createWidget = function () {
        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();
        }
    };
    ColorPicker.prototype.createSplitBtn = function () {
        var _this = this;
        var splitButton = this.createElement('button', { className: 'e-split-colorpicker' });
        this.getWrapper().appendChild(splitButton);
        this.splitBtn = new _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_1__["SplitButton"]({
            iconCss: 'e-selected-color',
            target: this.container,
            disabled: this.disabled,
            enableRtl: this.enableRtl,
            beforeOpen: this.beforeOpenFn.bind(this),
            open: this.onOpen.bind(this),
            beforeClose: this.beforePopupClose.bind(this),
            click: function (args) {
                _this.trigger('change', {
                    currentValue: { hex: _this.value.slice(0, 7), rgba: _this.convertToRgbString(_this.hexToRgb(_this.value)) },
                    previousValue: { hex: null, rgba: null }, value: _this.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_2__["getZindexPartial"])(this.splitBtn.element).toString();
        }
    };
    ColorPicker.prototype.onOpen = function (args) {
        this.trigger('open', { element: this.container });
    };
    ColorPicker.prototype.getPopupInst = function () {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(this.getPopupEle(), _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["Popup"]);
    };
    ColorPicker.prototype.beforeOpenFn = function (args) {
        var _this = this;
        var beforeOpenArgs = { element: this.container, event: args.event, cancel: false };
        this.trigger('beforeOpen', beforeOpenArgs, function (observeOpenArgs) {
            args.cancel = observeOpenArgs.cancel;
            if (!observeOpenArgs.cancel) {
                var popupEle = _this.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';
                _this.createWidget();
                popupEle.style.display = '';
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                    _this.modal = _this.createElement('div');
                    _this.modal.className = 'e-' + _this.getModuleName() + ' e-modal';
                    _this.modal.style.display = 'none';
                    document.body.insertBefore(_this.modal, popupEle);
                    document.body.className += ' e-colorpicker-overflow';
                    _this.modal.style.display = 'block';
                    _this.modal.style.zIndex = (Number(popupEle.style.zIndex) - 1).toString();
                }
            }
        });
    };
    ColorPicker.prototype.beforePopupClose = function (args) {
        var _this = this;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.event)) {
            var beforeCloseArgs = { element: this.container, event: args.event, cancel: false };
            this.trigger('beforeClose', beforeCloseArgs, function (observedCloseArgs) {
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && args.event.target === _this.modal) {
                    observedCloseArgs.cancel = true;
                }
                args.cancel = observedCloseArgs.cancel;
                if (!observedCloseArgs.cancel) {
                    _this.onPopupClose();
                }
            });
        }
    };
    ColorPicker.prototype.onPopupClose = function () {
        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;
        }
    };
    ColorPicker.prototype.createPalette = function () {
        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, len = keys.length; i < len; 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);
    };
    ColorPicker.prototype.firstPaletteFocus = function () {
        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();
        }
    };
    ColorPicker.prototype.appendPalette = function (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, len = colors.length; i < len; 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));
        }
    };
    ColorPicker.prototype.setNoColor = function () {
        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 = '';
    };
    ColorPicker.prototype.appendElement = function (ele, insertPos) {
        if (insertPos === void 0) { insertPos = 0; }
        var refEle = this.container.children[insertPos];
        refEle ? this.container.insertBefore(ele, refEle) : this.container.appendChild(ele);
    };
    ColorPicker.prototype.addTileSelection = function (ele) {
        ele.classList.add(SELECT);
        ele.setAttribute('aria-selected', 'true');
    };
    ColorPicker.prototype.createPicker = function () {
        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();
    };
    ColorPicker.prototype.setHsvContainerBg = function (h) {
        if (h === void 0) { h = this.hsv[0]; }
        this.getHsvContainer().style.backgroundColor = this.convertToRgbString(this.hsvToRgb(h, 100, 100, 1));
    };
    ColorPicker.prototype.getHsvContainer = function () {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + HSVCONTAINER, this.container);
    };
    ColorPicker.prototype.setHandlerPosition = function () {
        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);
    };
    ColorPicker.prototype.createSlider = function () {
        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_slider__WEBPACK_IMPORTED_MODULE_5__["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);
        }
    };
    ColorPicker.prototype.createOpacitySlider = function (slider) {
        this.opacitySlider = new _slider_slider__WEBPACK_IMPORTED_MODULE_5__["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();
    };
    ColorPicker.prototype.updateOpacitySliderBg = function () {
        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%)';
    };
    ColorPicker.prototype.hueChange = function (args) {
        this.hsv[0] = args.value;
        this.setHsvContainerBg();
        this.convertToOtherFormat();
    };
    ColorPicker.prototype.opacityChange = function (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);
    };
    ColorPicker.prototype.updateOpacityInput = function (value) {
        if (!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_index__WEBPACK_IMPORTED_MODULE_4__["NumericTextBox"]);
            opacityTextBoxInst.value = value;
            opacityTextBoxInst.dataBind();
        }
    };
    ColorPicker.prototype.createPreview = function (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;
    };
    ColorPicker.prototype.isPicker = function () {
        return !this.container.classList.contains(PALETTECONTENT);
    };
    ColorPicker.prototype.getPopupEle = function () {
        return this.container.parentElement;
    };
    ColorPicker.prototype.createNumericInput = function (element, value, label, max) {
        var _this = this;
        var numericInput = new _numerictextbox_index__WEBPACK_IMPORTED_MODULE_4__["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 (args) {
                if (args.event) {
                    _this.inputHandler(args.event);
                }
            }
        });
        numericInput.createElement = this.createElement;
        numericInput.appendTo(element);
    };
    ColorPicker.prototype.createInput = function () {
        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_index__WEBPACK_IMPORTED_MODULE_3__["Input"].createInput({
                    element: hexInput,
                    floatLabelType: 'Always',
                    properties: {
                        placeholder: 'HEX',
                        enableRtl: this.enableRtl,
                        enabled: !this.disabled,
                        readonly: this.isPicker() ? false : true
                    }
                }, this.createElement);
                _input_index__WEBPACK_IMPORTED_MODULE_3__["Input"].setValue(this.value.slice(0, 7), hexInput);
                hexInput.addEventListener('input', this.inputHandler.bind(this));
            }
            if (!wrapper.classList.contains(HIDERGBA)) {
                var label = void 0;
                var value = void 0;
                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);
                }
            }
        }
    };
    ColorPicker.prototype.appendOpacityValue = function (container) {
        this.createNumericInput(container.appendChild(this.createElement('input', { className: OPACITY })), this.rgb[3] * 100, 'A', 100);
    };
    ColorPicker.prototype.appendValueSwitchBtn = function (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));
        }
    };
    ColorPicker.prototype.createCtrlBtn = function () {
        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();
            }
        }
    };
    ColorPicker.prototype.appendModeSwitchBtn = function () {
        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));
    };
    ColorPicker.prototype.createDragTooltip = function () {
        var _this = this;
        var tooltip = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["Tooltip"]({
            opensOn: 'Custom',
            showTipPointer: false,
            cssClass: 'e-color-picker-tooltip',
            beforeOpen: function (args) {
                _this.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_2__["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' }));
    };
    ColorPicker.prototype.getTooltipInst = function () {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(this.container, _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["Tooltip"]);
    };
    ColorPicker.prototype.setTooltipOffset = function (value) {
        this.getTooltipInst().offsetY = value;
    };
    ColorPicker.prototype.toggleDisabled = function (enable) {
        enable ? this.getWrapper().classList.add(DISABLED) : this.getWrapper().classList.remove(DISABLED);
        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');
            });
        }
    };
    ColorPicker.prototype.convertToRgbString = function (rgb) {
        return rgb.length ? rgb.length === 4 ? 'rgba(' + rgb.join() + ')' : 'rgb(' + rgb.join() + ')' : '';
    };
    ColorPicker.prototype.convertToHsvString = function (hsv) {
        return hsv.length === 4 ? 'hsva(' + hsv.join() + ')' : 'hsv(' + hsv.join() + ')';
    };
    ColorPicker.prototype.updateHsv = function () {
        this.hsv[1] = this.hsv[1] > 100 ? 100 : this.hsv[1];
        this.hsv[2] = this.hsv[2] > 100 ? 100 : this.hsv[2];
        this.setHandlerPosition();
    };
    ColorPicker.prototype.convertToOtherFormat = function (isKey) {
        if (isKey === void 0) { isKey = 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);
    };
    ColorPicker.prototype.updateInput = function (value) {
        var wrapper = this.getWrapper();
        if (!wrapper.classList.contains(HIDEVALUE)) {
            if (!wrapper.classList.contains(HIDEHEX)) {
                _input_index__WEBPACK_IMPORTED_MODULE_3__["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);
                }
            }
        }
    };
    ColorPicker.prototype.updatePreview = function (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));
    };
    ColorPicker.prototype.getDragHandler = function () {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + HANDLER, this.container);
    };
    ColorPicker.prototype.removeTileSelection = function () {
        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');
        });
    };
    ColorPicker.prototype.convertRgbToNumberArray = function (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}
     */
    ColorPicker.prototype.getValue = function (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}
     */
    ColorPicker.prototype.toggle = function () {
        this.container.parentElement.classList.contains('e-popup-close') ? this.splitBtn.toggle() : this.closePopup(null);
    };
    /**
     * Get component name.
     * @returns string
     * @private
     */
    ColorPicker.prototype.getModuleName = function () {
        return 'colorpicker';
    };
    /**
     * Gets the properties to be maintained in the persisted state.
     * @return {string}
     */
    ColorPicker.prototype.getPersistData = function () {
        return this.addOnPersist(['value']);
    };
    ColorPicker.prototype.wireEvents = function () {
        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);
        }
    };
    ColorPicker.prototype.formResetHandler = function () {
        this.value = this.initialInputValue;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, { 'value': this.initialInputValue });
    };
    ColorPicker.prototype.addCtrlSwitchEvent = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CTRLSWITCH, this.container), 'click', this.btnClickHandler, this);
    };
    ColorPicker.prototype.pickerKeyDown = function (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);
        }
    };
    ColorPicker.prototype.enterKeyHandler = function (value, e) {
        this.triggerChangeEvent(value);
        if (!this.inline) {
            this.closePopup(e);
            this.splitBtn.element.focus();
        }
    };
    ColorPicker.prototype.closePopup = function (e) {
        var _this = this;
        var beforeCloseArgs = { element: this.container, event: e, cancel: false };
        this.trigger('beforeClose', beforeCloseArgs, function (observedcloseArgs) {
            if (!observedcloseArgs.cancel) {
                _this.splitBtn.toggle();
                _this.onPopupClose();
            }
        });
    };
    ColorPicker.prototype.triggerChangeEvent = function (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: value
        });
        this.setProperties({ 'value': value }, true);
        this.element.value = hex ? hex : '#000000';
    };
    ColorPicker.prototype.handlerDragPosition = function (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);
    };
    ColorPicker.prototype.handlerDown = function (e) {
        e.preventDefault();
        var x;
        var y;
        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);
    };
    ColorPicker.prototype.handlerMove = function (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');
            }
        }
    };
    ColorPicker.prototype.setHsv = function (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;
    };
    ColorPicker.prototype.handlerEnd = function (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);
        }
    };
    ColorPicker.prototype.btnClickHandler = function (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);
            }
        }
    };
    ColorPicker.prototype.switchToPalette = function () {
        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();
    };
    ColorPicker.prototype.refreshPopupPos = function () {
        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);
        }
    };
    ColorPicker.prototype.formatSwitchHandler = function (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;
        }
    };
    ColorPicker.prototype.updateValue = function (value, format, idx, max) {
        var clsName = ['e-rh-value', 'e-gs-value', 'e-bv-value'];
        var inst;
        for (var i = 0, len = clsName.length; i < len; 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_index__WEBPACK_IMPORTED_MODULE_4__["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();
        }
    };
    ColorPicker.prototype.previewHandler = function (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));
    };
    ColorPicker.prototype.paletteClickHandler = function (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);
                    }
                }
            }
        }
    };
    ColorPicker.prototype.noColorTile = function (isKey) {
        if (isKey === void 0) { isKey = false; }
        var pValue = this.rgbToHex(this.rgb);
        this.rgb = [];
        this.hsv = [];
        this.triggerEvent('', pValue, '', isKey);
    };
    ColorPicker.prototype.switchToPicker = function () {
        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();
    };
    ColorPicker.prototype.ctrlBtnClick = function (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();
        }
    };
    ColorPicker.prototype.paletteKeyDown = function (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);
                }
        }
    };
    ColorPicker.prototype.keySelectionChanges = function (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);
        }
    };
    ColorPicker.prototype.tilePosition = function (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;
    };
    ColorPicker.prototype.inputHandler = function (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;
        }
    };
    ColorPicker.prototype.inputValueChange = function (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);
    };
    ColorPicker.prototype.triggerEvent = function (cValue, pValue, rgba, isKey) {
        if (isKey === void 0) { isKey = 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}
     */
    ColorPicker.prototype.destroy = function () {
        var _this = this;
        var wrapper = this.getWrapper();
        _super.prototype.destroy.call(this);
        ['tabindex', 'spellcheck'].forEach(function (attr) { _this.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;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.element.nextElementSibling);
        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);
        }
    };
    ColorPicker.prototype.destroyOtherComp = function () {
        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;
        }
    };
    ColorPicker.prototype.isPopupOpen = function () {
        return this.getPopupEle().classList.contains('e-popup-open');
    };
    ColorPicker.prototype.unWireEvents = function () {
        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);
        }
    };
    ColorPicker.prototype.roundValue = function (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, len_1 = value.length; i < len_1; i++) {
                tempValue += (value.charAt(i) + value.charAt(i));
            }
            value = '#' + tempValue;
            len = 9;
        }
        if (len === 7) {
            value += 'ff';
        }
        return value;
    };
    ColorPicker.prototype.hexToRgb = function (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;
    };
    ColorPicker.prototype.rgbToHsv = function (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;
    };
    ColorPicker.prototype.hsvToRgb = function (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;
    };
    ColorPicker.prototype.rgbToHex = function (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') : '')) : '';
    };
    ColorPicker.prototype.hex = function (x) {
        return ('0' + x.toString(16)).slice(-2);
    };
    ColorPicker.prototype.changeModeSwitcherProp = function (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);
                }
            }
        }
    };
    ColorPicker.prototype.changeShowBtnProps = function (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);
            }
        }
    };
    ColorPicker.prototype.changeValueProp = function (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);
            }
        }
    };
    ColorPicker.prototype.setInputEleProps = function (prop) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INPUTWRAPPER, this.container));
        this.createInput();
    };
    ColorPicker.prototype.changeDisabledProp = function (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();
        }
    };
    ColorPicker.prototype.changeCssClassProps = function (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(' '));
        }
    };
    ColorPicker.prototype.changeRtlProps = function (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');
        }
    };
    ColorPicker.prototype.changePaletteProps = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.container.children[0]);
        this.container.style.width = '';
        this.createPalette();
    };
    ColorPicker.prototype.changeOpacityProps = function (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
     */
    ColorPicker.prototype.onPropertyChanged = function (newProp, oldProp) {
        var _this = 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 = 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_1__["getModel"])(newProp, otherCompModel));
            if (!this.isPopupOpen()) {
                this.changeCssClassProps(newProp.cssClass, oldProp.cssClass);
                this.changeRtlProps(newProp.enableRtl);
                return;
            }
        }
        var _loop_1 = function (prop) {
            switch (prop) {
                case 'inline':
                    if (newProp.inline) {
                        this_1.getWrapper().appendChild(this_1.container);
                        this_1.splitBtn.destroy();
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this_1.element.nextElementSibling);
                        if (!this_1.container.children.length) {
                            this_1.createWidget();
                        }
                    }
                    else {
                        this_1.destroyOtherComp();
                        this_1.unWireEvents();
                        this_1.container.innerHTML = '';
                        this_1.createSplitBtn();
                    }
                    break;
                case 'cssClass':
                    this_1.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_1 = 0;
                    props.forEach(function (cls) {
                        if (count_1 === 0 &&
                            (cls === HIDEVALUE || cls === HIDEVALUESWITCH || cls === SHOWVALUE || cls === HIDEHEX || cls === HIDERGBA)) {
                            var inputWrap = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INPUTWRAPPER, _this.container);
                            if (inputWrap) {
                                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INPUTWRAPPER, _this.container));
                            }
                            _this.createInput();
                            count_1++;
                        }
                    });
                    break;
                case 'enableRtl':
                    if (this_1.isPicker()) {
                        this_1.hueSlider.enableRtl = newProp.enableRtl;
                        if (this_1.enableOpacity) {
                            this_1.opacitySlider.enableRtl = newProp.enableRtl;
                        }
                        this_1.setInputEleProps(newProp.enableRtl);
                    }
                    this_1.changeRtlProps(newProp.enableRtl);
                    break;
                case 'disabled':
                    this_1.changeDisabledProp(newProp.disabled);
                    break;
                case 'value':
                    if (this_1.value !== oldProp.value) {
                        this_1.changeValueProp(newProp.value);
                    }
                    break;
                case 'showButtons':
                    this_1.changeShowBtnProps(newProp.showButtons);
                    break;
                case 'mode':
                    if (newProp.mode === 'Picker') {
                        this_1.switchToPicker();
                    }
                    else {
                        this_1.switchToPalette();
                    }
                    break;
                case 'modeSwitcher':
                    this_1.changeModeSwitcherProp(newProp.modeSwitcher);
                    break;
                case 'columns':
                case 'presetColors':
                    if (!this_1.isPicker()) {
                        this_1.changePaletteProps();
                    }
                    break;
                case 'noColor':
                    if (newProp.noColor) {
                        if (this_1.mode === 'Palette' && !this_1.modeSwitcher) {
                            this_1.setNoColor();
                        }
                    }
                    else {
                        this_1.changePaletteProps();
                    }
                    break;
                case 'enableOpacity':
                    this_1.changeOpacityProps(newProp.enableOpacity);
                    break;
            }
        };
        var this_1 = this;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            _loop_1(prop);
        }
    };
    /**
     * Sets the focus to Colorpicker
     * its native method
     * @public
     */
    ColorPicker.prototype.focusIn = function () {
        this.element.parentElement.focus();
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#008000ff')
    ], ColorPicker.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], ColorPicker.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ColorPicker.prototype, "disabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Picker')
    ], ColorPicker.prototype, "mode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], ColorPicker.prototype, "modeSwitcher", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], ColorPicker.prototype, "presetColors", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], ColorPicker.prototype, "showButtons", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], ColorPicker.prototype, "columns", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ColorPicker.prototype, "inline", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ColorPicker.prototype, "noColor", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], ColorPicker.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], ColorPicker.prototype, "enableOpacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ColorPicker.prototype, "select", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ColorPicker.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ColorPicker.prototype, "beforeTileRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ColorPicker.prototype, "beforeOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ColorPicker.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ColorPicker.prototype, "beforeClose", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ColorPicker.prototype, "beforeModeSwitch", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ColorPicker.prototype, "created", void 0);
    ColorPicker = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], ColorPicker);
    return ColorPicker;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/color-picker/index.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/color-picker/index.js ***!
  \***********************************************************************/
/*! exports provided: ColorPicker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _color_picker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color-picker */ "./node_modules/@syncfusion/ej2-inputs/src/color-picker/color-picker.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPicker", function() { return _color_picker__WEBPACK_IMPORTED_MODULE_0__["ColorPicker"]; });

/**
 * ColorPicker modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/form-validator/form-validator.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/form-validator/form-validator.js ***!
  \**********************************************************************************/
/*! exports provided: regex, ErrorOption, FormValidator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};




/**
 * 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,5}' +
        '|[.]{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 = /** @class */ (function (_super) {
    __extends(FormValidator, _super);
    // Initializes the FormValidator 
    function FormValidator(element, options) {
        var _this = _super.call(this, options, element) || this;
        _this.validated = [];
        _this.errorRules = [];
        _this.allowSubmit = false;
        _this.required = 'required';
        _this.infoElement = null;
        _this.inputElement = null;
        _this.selectQuery = 'input:not([type=reset]):not([type=button]), select, textarea';
        // tslint:disable-next-line:no-any
        _this.localyMessage = {};
        /**
         * Specifies the default messages for validation rules.
         * @default : { List of validation message };
         */
        _this.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 _this.rules === 'undefined') {
            _this.rules = {};
        }
        _this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('formValidator', _this.defaultMessages, _this.locale);
        if (_this.locale) {
            _this.localeFunc();
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["onIntlChange"].on('notifyExternalChange', _this.afterLocalization, _this);
        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 (_this.element != null) {
            _this.element.setAttribute('novalidate', '');
            _this.inputElements = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(_this.selectQuery, _this.element);
            _this.createHTML5Rules();
            _this.wireEvents();
        }
        else {
            return undefined;
        }
        return _this;
    }
    FormValidator_1 = FormValidator;
    // 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}
     */
    FormValidator.prototype.addRules = function (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}
     */
    FormValidator.prototype.removeRules = function (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}
     */
    FormValidator.prototype.validate = function (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 = [];
            for (var _i = 0, rules_1 = rules; _i < rules_1.length; _i++) {
                var name_1 = rules_1[_i];
                this.validateRules(name_1);
            }
            return this.errorRules.length === 0;
        }
    };
    /**
     * Reset the value of all the fields in form.
     * @return {void}
     */
    FormValidator.prototype.reset = function () {
        this.element.reset();
        this.clearForm();
    };
    /**
     * Get input element by name.
     * @param {string} name - Input element name attribute value.
     * @return {HTMLInputElement}
     */
    FormValidator.prototype.getInputElement = function (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}
     */
    FormValidator.prototype.destroy = function () {
        this.reset();
        this.unwireEvents();
        this.rules = {};
        var elements = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + this.errorClass + ', .' + this.validClass, this.element);
        for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
            var element = elements_1[_i];
            element.remove();
        }
        _super.prototype.destroy.call(this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["onIntlChange"].off('notifyExternalChange', this.afterLocalization);
    };
    /**
     * @private
     */
    FormValidator.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'locale':
                    this.localeFunc();
                    break;
            }
        }
    };
    ;
    /**
     * @private
     */
    FormValidator.prototype.localeFunc = function () {
        for (var _i = 0, _a = Object.keys(this.defaultMessages); _i < _a.length; _i++) {
            var key = _a[_i];
            this.l10n.setLocale(this.locale);
            var value = this.l10n.getConstant(key);
            this.localyMessage[key] = value;
        }
    };
    /**
     * @private
     */
    FormValidator.prototype.getModuleName = function () {
        return 'formValidator';
    };
    /**
     * @private
     */
    // tslint:disable-next-line:no-any
    FormValidator.prototype.afterLocalization = function (args) {
        this.locale = args.locale;
        this.localeFunc();
    };
    FormValidator.prototype.clearForm = function () {
        this.errorRules = [];
        this.validated = [];
        var elements = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(this.selectQuery, this.element);
        for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
            var element = elements_2[_i];
            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);
        }
    };
    FormValidator.prototype.createHTML5Rules = function () {
        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'];
        for (var _i = 0, _a = (this.inputElements); _i < _a.length; _i++) {
            var input = _a[_i];
            // Default attribute rules 
            var allRule = {};
            for (var _b = 0, defRules_1 = defRules; _b < defRules_1.length; _b++) {
                var rule = defRules_1[_b];
                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
            if (Object.keys(allRule).length !== 0) {
                this.addRules(input.name, allRule);
            }
        }
    };
    FormValidator.prototype.annotationRule = function (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;
            }
        }
    };
    FormValidator.prototype.defRule = function (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
    FormValidator.prototype.wireEvents = function () {
        for (var _i = 0, _a = (this.inputElements); _i < _a.length; _i++) {
            var input = _a[_i];
            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);
            }
        }
        _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
    FormValidator.prototype.unwireEvents = function () {
        for (var _i = 0, _a = (this.inputElements); _i < _a.length; _i++) {
            var input = _a[_i];
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(input);
        }
        _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
    FormValidator.prototype.focusOutHandler = function (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
    FormValidator.prototype.keyUpHandler = function (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
    FormValidator.prototype.clickHandler = function (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
    FormValidator.prototype.changeHandler = function (e) {
        this.trigger('change', e);
        var element = e.target;
        this.validate(element.name);
    };
    // Handle form submit event
    FormValidator.prototype.submitHandler = function (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
    FormValidator.prototype.resetHandler = function () {
        this.clearForm();
    };
    // Validate each rule based on input element name
    FormValidator.prototype.validateRules = function (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);
            for (var _i = 0, rules_2 = rules; _i < rules_2.length; _i++) {
                var rule = rules_2[_i];
                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);
                }
            }
        }
        else {
            return;
        }
    };
    // Update the optional validation status
    FormValidator.prototype.optionalValidationStatus = function (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
    FormValidator.prototype.isValid = function (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 
    FormValidator.prototype.getErrorMessage = function (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
    FormValidator.prototype.createErrorElement = function (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
    FormValidator.prototype.getErrorElement = function (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
    FormValidator.prototype.removeErrorRules = function (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
    FormValidator.prototype.showMessage = function (errorRule) {
        this.infoElement.style.display = 'block';
        this.infoElement.innerHTML = errorRule.message;
        this.checkRequired(errorRule.name);
    };
    // Hide error message based on input name
    FormValidator.prototype.hideMessage = function (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
    FormValidator.prototype.checkRequired = function (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
    FormValidator.isCheckable = function (input) {
        var inputType = input.getAttribute('type');
        return inputType && (inputType === 'checkbox' || inputType === 'radio' || inputType === 'submit');
    };
    var FormValidator_1;
    // List of function to validate the rules
    FormValidator.checkValidator = {
        required: function (option) {
            return option.value.length > 0;
        },
        email: function (option) {
            return regex.EMAIL.test(option.value);
        },
        url: function (option) {
            return regex.URL.test(option.value);
        },
        dateIso: function (option) {
            return regex.DATE_ISO.test(option.value);
        },
        tel: function (option) {
            return regex.PHONE.test(option.value);
        },
        creditcard: function (option) {
            return regex.CREDITCARD.test(option.value);
        },
        number: function (option) {
            return !isNaN(Number(option.value)) && option.value.indexOf(' ') === -1;
        },
        digits: function (option) {
            return regex.DIGITS.test(option.value);
        },
        maxLength: function (option) {
            return option.value.length <= option.param;
        },
        minLength: function (option) {
            return option.value.length >= option.param;
        },
        rangeLength: function (option) {
            var param = option.param;
            return option.value.length >= param[0] && option.value.length <= param[1];
        },
        range: function (option) {
            var param = option.param;
            return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];
        },
        date: function (option) {
            return !isNaN(new Date(option.value).getTime());
        },
        max: function (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 (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 (option) {
            return new RegExp(option.param).test(option.value);
        },
        equalTo: function (option) {
            var compareTo = option.formElement.querySelector('#' + option.param);
            option.param = compareTo.value;
            return option.param === option.value;
        },
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], FormValidator.prototype, "locale", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('e-hidden')
    ], FormValidator.prototype, "ignore", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], FormValidator.prototype, "rules", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('e-error')
    ], FormValidator.prototype, "errorClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('e-valid')
    ], FormValidator.prototype, "validClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('label')
    ], FormValidator.prototype, "errorElement", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('div')
    ], FormValidator.prototype, "errorContainer", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(ErrorOption.Label)
    ], FormValidator.prototype, "errorOption", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], FormValidator.prototype, "focusout", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], FormValidator.prototype, "keyup", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], FormValidator.prototype, "click", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], FormValidator.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], FormValidator.prototype, "submit", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], FormValidator.prototype, "validationBegin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], FormValidator.prototype, "validationComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], FormValidator.prototype, "customPlacement", void 0);
    FormValidator = FormValidator_1 = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], FormValidator);
    return FormValidator;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/form-validator/index.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/form-validator/index.js ***!
  \*************************************************************************/
/*! exports provided: regex, ErrorOption, FormValidator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _form_validator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./form-validator */ "./node_modules/@syncfusion/ej2-inputs/src/form-validator/form-validator.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regex", function() { return _form_validator__WEBPACK_IMPORTED_MODULE_0__["regex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorOption", function() { return _form_validator__WEBPACK_IMPORTED_MODULE_0__["ErrorOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormValidator", function() { return _form_validator__WEBPACK_IMPORTED_MODULE_0__["FormValidator"]; });

/**
 * Input box Component
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/index.js ***!
  \**********************************************************/
/*! exports provided: NumericTextBox, Input, TicksData, LimitData, TooltipData, Slider, regex, ErrorOption, FormValidator, FilesProp, ButtonsProps, AsyncSettings, Uploader, ColorPicker, TextBox, regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputFocusHandler, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo, MaskedTextBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _numerictextbox_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./numerictextbox/index */ "./node_modules/@syncfusion/ej2-inputs/src/numerictextbox/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericTextBox", function() { return _numerictextbox_index__WEBPACK_IMPORTED_MODULE_0__["NumericTextBox"]; });

/* harmony import */ var _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maskedtextbox/index */ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regularExpressions", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["regularExpressions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMask", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["createMask"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "applyMask", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["applyMask"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wireEvents", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["wireEvents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unwireEvents", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["unwireEvents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindClearEvent", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["bindClearEvent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unstrippedValue", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["unstrippedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "strippedValue", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["strippedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputFocusHandler", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["maskInputFocusHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputBlurHandler", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["maskInputBlurHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputDropHandler", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["maskInputDropHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mobileRemoveFunction", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["mobileRemoveFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setMaskValue", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["setMaskValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setElementValue", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["setElementValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInput", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["maskInput"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getVal", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["getVal"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMaskedVal", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["getMaskedVal"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskUndo", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["MaskUndo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBox", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["MaskedTextBox"]; });

/* harmony import */ var _input_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./input/index */ "./node_modules/@syncfusion/ej2-inputs/src/input/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return _input_index__WEBPACK_IMPORTED_MODULE_2__["Input"]; });

/* harmony import */ var _slider_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slider/index */ "./node_modules/@syncfusion/ej2-inputs/src/slider/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TicksData", function() { return _slider_index__WEBPACK_IMPORTED_MODULE_3__["TicksData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LimitData", function() { return _slider_index__WEBPACK_IMPORTED_MODULE_3__["LimitData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipData", function() { return _slider_index__WEBPACK_IMPORTED_MODULE_3__["TooltipData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _slider_index__WEBPACK_IMPORTED_MODULE_3__["Slider"]; });

/* harmony import */ var _form_validator_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./form-validator/index */ "./node_modules/@syncfusion/ej2-inputs/src/form-validator/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regex", function() { return _form_validator_index__WEBPACK_IMPORTED_MODULE_4__["regex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorOption", function() { return _form_validator_index__WEBPACK_IMPORTED_MODULE_4__["ErrorOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormValidator", function() { return _form_validator_index__WEBPACK_IMPORTED_MODULE_4__["FormValidator"]; });

/* harmony import */ var _uploader_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./uploader/index */ "./node_modules/@syncfusion/ej2-inputs/src/uploader/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilesProp", function() { return _uploader_index__WEBPACK_IMPORTED_MODULE_5__["FilesProp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonsProps", function() { return _uploader_index__WEBPACK_IMPORTED_MODULE_5__["ButtonsProps"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSettings", function() { return _uploader_index__WEBPACK_IMPORTED_MODULE_5__["AsyncSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uploader", function() { return _uploader_index__WEBPACK_IMPORTED_MODULE_5__["Uploader"]; });

/* harmony import */ var _color_picker_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./color-picker/index */ "./node_modules/@syncfusion/ej2-inputs/src/color-picker/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPicker", function() { return _color_picker_index__WEBPACK_IMPORTED_MODULE_6__["ColorPicker"]; });

/* harmony import */ var _textbox_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./textbox/index */ "./node_modules/@syncfusion/ej2-inputs/src/textbox/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextBox", function() { return _textbox_index__WEBPACK_IMPORTED_MODULE_7__["TextBox"]; });

/**
 * NumericTextBox all modules
 */










/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/input/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/input/index.js ***!
  \****************************************************************/
/*! exports provided: Input */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./input */ "./node_modules/@syncfusion/ej2-inputs/src/input/input.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return _input__WEBPACK_IMPORTED_MODULE_0__["Input"]; });

/**
 * Input box Component
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/input/input.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/input/input.js ***!
  \****************************************************************/
/*! exports provided: Input */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return Input; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");

var CLASSNAMES = {
    RTL: 'e-rtl',
    DISABLE: 'e-disabled',
    INPUT: 'e-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 privateInputObj = {
        container: null,
        buttons: [],
        clearButton: null
    };
    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);
        }
        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);
        });
        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));
            }
        }
        inputObject = setPropertyValue(args, inputObject);
        privateInputObj = inputObject;
        return inputObject;
    }
    Input.createInput = createInput;
    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.classList.remove('e-valid-input');
        }
    }
    function _focusFn() {
        var label = getParentNode(this).getElementsByClassName('e-float-text')[0];
        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 (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);
    }
    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 inputElement;
        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.innerHTML = 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.innerHTML = args.properties.placeholder;
        }
        if (!floatLabelElement.innerHTML) {
            inputObject.container.classList.add(CLASSNAMES.NOFLOATLABEL);
        }
        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 _i = 0, _a = Object.keys(args.properties); _i < _a.length; _i++) {
                var prop = _a[_i];
                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 = element.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);
        });
    }
    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 = placeholder;
            result = spanEle.innerHTML;
        }
        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(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);
            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;
    /**
     * 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 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 _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {
            var key = _a[_i];
            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 _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {
            var key = _a[_i];
            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);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(iconEle)) {
                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);
                container.insertBefore(input, iconEle);
                container.insertBefore(floatLine, iconEle);
                container.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 index = 0; index < buttons.length; index++) {
                buttons[index].removeEventListener('mousedown', _onMouseDownRipple, this);
                buttons[index].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);
    }
    /**
     * 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 = makeElement('span', { className: iconClass });
        button.classList.add('e-input-group-icon');
        container.appendChild(button);
        if (!container.classList.contains(CLASSNAMES.INPUTGROUP)) {
            container.classList.add(CLASSNAMES.INPUTGROUP);
        }
        _internalRipple(true, container, button);
        return button;
    }
    Input.appendSpan = appendSpan;
})(Input || (Input = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/base/index.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/base/index.js ***!
  \*****************************************************************************/
/*! exports provided: regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputFocusHandler, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _mask_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mask-base */ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/base/mask-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regularExpressions", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["regularExpressions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMask", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["createMask"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "applyMask", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["applyMask"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wireEvents", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["wireEvents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unwireEvents", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["unwireEvents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindClearEvent", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["bindClearEvent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unstrippedValue", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["unstrippedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "strippedValue", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["strippedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputFocusHandler", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["maskInputFocusHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputBlurHandler", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["maskInputBlurHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputDropHandler", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["maskInputDropHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mobileRemoveFunction", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["mobileRemoveFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setMaskValue", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["setMaskValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setElementValue", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["setElementValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInput", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["maskInput"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getVal", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["getVal"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMaskedVal", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["getMaskedVal"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskUndo", function() { return _mask_base__WEBPACK_IMPORTED_MODULE_0__["MaskUndo"]; });

/**
 * MaskedTextbox base modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/base/mask-base.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/base/mask-base.js ***!
  \*********************************************************************************/
/*! exports provided: regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputFocusHandler, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _input_input__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../input/input */ "./node_modules/@syncfusion/ej2-inputs/src/input/input.js");
/**
 * MaskedTextBox base module
 */


var ERROR = '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 j = 0; j < splitInnerMask.length; j++) {
                        if (splitInnerMask[j] === '\\') {
                            this.customRegExpCollec.push('[');
                            this.hiddenMask += splitInnerMask[j] + '[';
                        }
                        else if (splitInnerMask[j] === '') {
                            chkSpace = true;
                        }
                        else if ((splitInnerMask[j] !== '' && chkSpace) || j === splitInnerMask.length - 1) {
                            this.customRegExpCollec.push('[' + splitInnerMask[j] + ']');
                            this.hiddenMask += this.promptChar;
                            chkSpace = false;
                        }
                        else {
                            pushIntoRegExpCollec.call(this, splitInnerMask[j]);
                        }
                    }
                }
                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 i = 0; i < this.promptMask.length; i++) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters[this.promptMask[i]])) {
                    this.promptMask = this.promptMask.replace(new RegExp(this.promptMask[i], 'g'), this.promptChar);
                }
            }
        }
        var escapeNumber = 0;
        if (this.hiddenMask.match(new RegExp(/\\/))) {
            for (var i = 0; i < this.hiddenMask.length; i++) {
                var j = 0;
                if (i >= 1) {
                    j = i;
                }
                escapeNumber = this.hiddenMask.length - this.promptMask.length;
                j = j - escapeNumber;
                if ((i > 0 && this.hiddenMask[i - 1] !== '\\') && (this.hiddenMask[i] === '>' ||
                    this.hiddenMask[i] === '<' || this.hiddenMask[i] === '|')) {
                    this.promptMask = this.promptMask.substring(0, j) +
                        this.promptMask.substring((i + 1) - escapeNumber, this.promptMask.length);
                    this.escapeMaskValue = this.escapeMaskValue.substring(0, j) +
                        this.escapeMaskValue.substring((i + 1) - escapeNumber, this.escapeMaskValue.length);
                }
                if (this.hiddenMask[i] === '\\') {
                    this.promptMask = this.promptMask.substring(0, j) + this.hiddenMask[i + 1] +
                        this.promptMask.substring((i + 2) - escapeNumber, this.promptMask.length);
                    this.escapeMaskValue = this.escapeMaskValue.substring(0, j) + this.escapeMaskValue[i + 1] +
                        this.escapeMaskValue.substring((i + 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]) &&
                    ((!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 _this = 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 (_this.mask) {
            _this.isFocus = true;
            if (_this.element.value === '') {
                setElementValue.call(_this, _this.promptMask);
            }
            else {
                setElementValue.call(_this, _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') {
                _this.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 () {
                    _this.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 _this = this;
    if (this.mask) {
        var sIndex_1 = this.element.selectionStart;
        var eIndex_1 = this.element.selectionEnd;
        var oldValue_1 = this.element.value;
        setElementValue.call(this, '');
        this._callPasteHandler = true;
        setTimeout(function () {
            var value = _this.element.value.replace(/ /g, '');
            if (_this.redoCollec.length > 0 && _this.redoCollec[0].value === _this.element.value) {
                value = strippedValue.call(_this, _this.element);
            }
            setElementValue.call(_this, oldValue_1);
            _this.element.selectionStart = sIndex_1;
            _this.element.selectionEnd = eIndex_1;
            var i = 0;
            _this.maskKeyPress = true;
            do {
                validateValue.call(_this, value[i], false, null);
                ++i;
            } while (i < value.length);
            _this.maskKeyPress = false;
            _this._callPasteHandler = false;
            if (_this.element.value === oldValue_1) {
                var i_1 = 0;
                _this.maskKeyPress = true;
                do {
                    validateValue.call(_this, value[i_1], false, null);
                    ++i_1;
                } while (i_1 < value.length);
                _this.maskKeyPress = false;
            }
            else {
                triggerMaskChangeEvent.call(_this, event, oldValue_1);
            }
        }, 1);
    }
}
function maskInputCutHandler(event) {
    var _this = this;
    if (this.mask) {
        var preValue_1 = this.element.value;
        var sIndex_2 = 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_1 = this.element.value.substring(0, sIndex_2) + this.promptMask.substring(sIndex_2, eIndex) +
            this.element.value.substring(eIndex);
        setTimeout(function () {
            setElementValue.call(_this, value_1);
            _this.element.selectionStart = _this.element.selectionEnd = sIndex_2;
            if (_this.element.value !== preValue_1) {
                triggerMaskChangeEvent.call(_this, 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) {
        var value = this;
        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 = void 0;
            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_1 = this.promptChar;
                        var elementValue = value.substring(0, sIndex) + prompt_1 + 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) {
        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) {
        var collec = void 0;
        if (!this.maskKeyPress && event.keyCode === 229) {
            var oldEventVal = void 0;
            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 val_1 = this.element.value.substring(startIndex - addedValues, startIndex);
                if (this.undoCollec.length > 0) {
                    collec = this.undoCollec[this.undoCollec.length - 1];
                    var startIndex_1 = this.element.selectionStart;
                    oldEventVal = collec.value;
                    var oldVal = collec.value.substring(startIndex_1 - addedValues, startIndex_1);
                    collec = this.redoCollec[0];
                    val_1 = val_1.trim();
                    var isSpace = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isAndroid && val_1 === '';
                    if (!isSpace && oldVal !== val_1 && collec.value.substring(startIndex_1 - addedValues, startIndex_1) !== val_1) {
                        validateValue.call(this, val_1, event.ctrlKey, event);
                    }
                    else if (isSpace) {
                        preventUnsupportedValues.call(this, event, startIndex_1 - 1, this.element.selectionEnd - 1, val_1, event.ctrlKey, false);
                    }
                }
                else {
                    oldEventVal = this.promptMask;
                    validateValue.call(this, val_1, 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_1 = this.element;
        setTimeout(function () {
            temp_1.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 i = 0; i < customValArr.length; i++) {
                    if (keyValue.match(new RegExp('[' + customValArr[i] + ']'))) {
                        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 = void 0;
        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 _this = 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);
    }
    else {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], ERROR);
    }
    if (this.isIosInvalid === true) {
        timer = 400;
    }
    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, { 'aria-invalid': 'true' });
    setTimeout(function () {
        if (!_this.maskKeyPress) {
            removeMaskError.call(_this);
        }
    }, 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);
    }
    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], ERROR);
    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 j = 0;
    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_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setValue(val, (element ? element : this.element), this.floatLabelType, false);
        if (this.showClearButton) {
            this.inputObj.clearButton.classList.add('e-clear-icon-hide');
        }
    }
    else {
        _input_input__WEBPACK_IMPORTED_MODULE_1__["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 value = '';
    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 = /** @class */ (function () {
    function MaskUndo() {
    }
    return MaskUndo;
}());

var maskUndo = new MaskUndo();


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/index.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/index.js ***!
  \************************************************************************/
/*! exports provided: regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputFocusHandler, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo, MaskedTextBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _base_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base/index */ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/base/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regularExpressions", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["regularExpressions"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMask", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["createMask"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "applyMask", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["applyMask"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wireEvents", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["wireEvents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unwireEvents", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["unwireEvents"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindClearEvent", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["bindClearEvent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unstrippedValue", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["unstrippedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "strippedValue", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["strippedValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputFocusHandler", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["maskInputFocusHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputBlurHandler", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["maskInputBlurHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInputDropHandler", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["maskInputDropHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mobileRemoveFunction", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["mobileRemoveFunction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setMaskValue", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["setMaskValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setElementValue", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["setElementValue"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maskInput", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["maskInput"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getVal", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["getVal"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMaskedVal", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["getMaskedVal"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskUndo", function() { return _base_index__WEBPACK_IMPORTED_MODULE_0__["MaskUndo"]; });

/* harmony import */ var _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maskedtextbox/index */ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBox", function() { return _maskedtextbox_index__WEBPACK_IMPORTED_MODULE_1__["MaskedTextBox"]; });

/**
 * MaskedTextbox modules
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox/index.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox/index.js ***!
  \**************************************************************************************/
/*! exports provided: MaskedTextBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _maskedtextbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./maskedtextbox */ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox/maskedtextbox.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBox", function() { return _maskedtextbox__WEBPACK_IMPORTED_MODULE_0__["MaskedTextBox"]; });

/**
 * MaskedTextbox modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox/maskedtextbox.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox/maskedtextbox.js ***!
  \**********************************************************************************************/
/*! exports provided: MaskedTextBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaskedTextBox", function() { return MaskedTextBox; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _input_input__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../input/input */ "./node_modules/@syncfusion/ej2-inputs/src/input/input.js");
/* harmony import */ var _base_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/index */ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/base/index.js");
/* harmony import */ var _base_mask_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/mask-base */ "./node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/base/mask-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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-widget e-control-wrapper e-mask';
var INPUT = 'e-input';
var COMPONENT = 'e-maskedtextbox';
var CONTROL = '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 = /** @class */ (function (_super) {
    __extends(MaskedTextBox, _super);
    function MaskedTextBox(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.initInputValue = '';
        _this.maskOptions = options;
        return _this;
    }
    /**
     * Gets the component name
     * @private
     */
    MaskedTextBox.prototype.getModuleName = function () {
        return 'maskedtextbox';
    };
    /**
     * Initializes the event handler
     * @private
     */
    MaskedTextBox.prototype.preRender = function () {
        this.promptMask = '';
        this.hiddenMask = '';
        this.escapeMaskValue = '';
        this.regExpCollec = _base_index__WEBPACK_IMPORTED_MODULE_2__["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, COMPONENT, '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(true);
        if (this.formElement) {
            this.initInputValue = this.value;
        }
    };
    /**
     * Gets the properties to be maintained in the persisted state.
     * @return {string}
     */
    MaskedTextBox.prototype.getPersistData = function () {
        var keyEntity = ['value'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Initializes the component rendering.
     * @private
     */
    MaskedTextBox.prototype.render = function () {
        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 (this.element.getAttribute('value') || this.value) {
                this.element.setAttribute('value', this.element.value);
            }
        }
    };
    MaskedTextBox.prototype.updateHTMLAttrToElement = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (wrapperAttr.indexOf(key) < 0) {
                this.element.setAttribute(key, this.htmlAttributes[key]);
            }
        }
    };
    MaskedTextBox.prototype.updateHTMLAttrToWrapper = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (wrapperAttr.indexOf(key) > -1) {
                if (key === 'class') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputObj.container], this.htmlAttributes[key].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]);
                }
            }
        }
    };
    MaskedTextBox.prototype.resetMaskedTextBox = function () {
        this.promptMask = '';
        this.hiddenMask = '';
        this.escapeMaskValue = '';
        this.customRegExpCollec = [];
        this.undoCollec = [];
        this.redoCollec = [];
        if (this.promptChar.length > 1) {
            this.promptChar = this.promptChar[0];
        }
        _base_index__WEBPACK_IMPORTED_MODULE_2__["createMask"].call(this);
        _base_index__WEBPACK_IMPORTED_MODULE_2__["applyMask"].call(this);
        if (this.mask === null || this.mask === '' && this.value !== undefined) {
            _base_index__WEBPACK_IMPORTED_MODULE_2__["setElementValue"].call(this, this.value);
        }
        var val = _base_index__WEBPACK_IMPORTED_MODULE_2__["strippedValue"].call(this, this.element);
        this.prevValue = val;
        this.value = val;
        if (!this.isInitial) {
            _base_index__WEBPACK_IMPORTED_MODULE_2__["unwireEvents"].call(this);
        }
        _base_index__WEBPACK_IMPORTED_MODULE_2__["wireEvents"].call(this);
    };
    MaskedTextBox.prototype.setMaskPlaceholder = function (setVal, dynamicPlaceholder) {
        if (dynamicPlaceholder || this.placeholder) {
            _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setPlaceholder(this.placeholder, this.element);
            if (this.element.value === this.promptMask && setVal && this.floatLabelType !== 'Always') {
                _base_index__WEBPACK_IMPORTED_MODULE_2__["setElementValue"].call(this, '');
            }
            if (this.floatLabelType === 'Never') {
                _base_mask_base__WEBPACK_IMPORTED_MODULE_3__["maskInputBlurHandler"].call(this);
            }
        }
    };
    MaskedTextBox.prototype.setWidth = function (width) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(width)) {
            this.element.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            this.inputObj.container.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
        }
    };
    MaskedTextBox.prototype.checkHtmlAttributes = function (isDynamic) {
        var attributes = ['placeholder', 'disabled', 'value'];
        for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
            var key = attributes_1[_i];
            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;
                }
            }
        }
    };
    MaskedTextBox.prototype.createWrapper = function () {
        this.inputObj = _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].createInput({
            element: this.element,
            floatLabelType: this.floatLabelType,
            properties: {
                enableRtl: this.enableRtl,
                cssClass: this.cssClass,
                enabled: this.enabled,
                placeholder: this.placeholder,
                showClearButton: this.showClearButton
            }
        }, this.createElement);
        this.inputObj.container.setAttribute('class', ROOT + ' ' + this.inputObj.container.getAttribute('class'));
    };
    /**
     * Calls internally if any of the property value is changed.
     * @hidden
     */
    MaskedTextBox.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'value':
                    _base_index__WEBPACK_IMPORTED_MODULE_2__["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':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setCssClass(newProp.cssClass, [this.inputObj.container], oldProp.cssClass);
                    break;
                case 'enabled':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setEnabled(newProp.enabled, this.element);
                    break;
                case 'enableRtl':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setEnableRtl(newProp.enableRtl, [this.inputObj.container]);
                    break;
                case 'customCharacters':
                    this.customCharacters = newProp.customCharacters;
                    this.resetMaskedTextBox();
                    break;
                case 'showClearButton':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setClearButton(newProp.showClearButton, this.element, this.inputObj, undefined, this.createElement);
                    _base_index__WEBPACK_IMPORTED_MODULE_2__["bindClearEvent"].call(this);
                    break;
                case 'floatLabelType':
                    this.floatLabelType = newProp.floatLabelType;
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].removeFloating(this.inputObj);
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);
                    break;
                case 'htmlAttributes':
                    this.updateHTMLAttrToElement();
                    this.updateHTMLAttrToWrapper();
                    this.checkHtmlAttributes(false);
                    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 = [];
                    _base_index__WEBPACK_IMPORTED_MODULE_2__["setElementValue"].call(this, value);
                    break;
            }
        }
    };
    MaskedTextBox.prototype.updateValue = function (strippedVal) {
        this.resetMaskedTextBox();
        _base_index__WEBPACK_IMPORTED_MODULE_2__["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}
     */
    MaskedTextBox.prototype.getMaskedValue = function () {
        return _base_index__WEBPACK_IMPORTED_MODULE_2__["unstrippedValue"].call(this, this.element);
    };
    /**
     * Sets the focus to widget for interaction.
     * @returns void
     */
    MaskedTextBox.prototype.focusIn = function () {
        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
     */
    MaskedTextBox.prototype.focusOut = function () {
        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}
     */
    MaskedTextBox.prototype.destroy = function () {
        var _this = this;
        _base_index__WEBPACK_IMPORTED_MODULE_2__["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'];
        attrArray.forEach(function (value) {
            _this.element.removeAttribute(value);
        });
        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);
        _super.prototype.destroy.call(this);
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MaskedTextBox.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MaskedTextBox.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MaskedTextBox.prototype, "placeholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')
    ], MaskedTextBox.prototype, "floatLabelType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], MaskedTextBox.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], MaskedTextBox.prototype, "enabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], MaskedTextBox.prototype, "showClearButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], MaskedTextBox.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MaskedTextBox.prototype, "mask", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('_')
    ], MaskedTextBox.prototype, "promptChar", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MaskedTextBox.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MaskedTextBox.prototype, "customCharacters", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MaskedTextBox.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MaskedTextBox.prototype, "destroyed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MaskedTextBox.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MaskedTextBox.prototype, "focus", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MaskedTextBox.prototype, "blur", void 0);
    MaskedTextBox = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], MaskedTextBox);
    return MaskedTextBox;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/numerictextbox/index.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/numerictextbox/index.js ***!
  \*************************************************************************/
/*! exports provided: NumericTextBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _numerictextbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./numerictextbox */ "./node_modules/@syncfusion/ej2-inputs/src/numerictextbox/numerictextbox.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NumericTextBox", function() { return _numerictextbox__WEBPACK_IMPORTED_MODULE_0__["NumericTextBox"]; });

/**
 * NumericTextBox modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/numerictextbox/numerictextbox.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/numerictextbox/numerictextbox.js ***!
  \**********************************************************************************/
/*! exports provided: NumericTextBox */
/***/ (function(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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _input_input__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../input/input */ "./node_modules/@syncfusion/ej2-inputs/src/input/input.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 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 = /** @class */ (function (_super) {
    __extends(NumericTextBox, _super);
    function NumericTextBox(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.numericOptions = options;
        return _this;
    }
    NumericTextBox.prototype.preRender = function () {
        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);
        }
        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.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('numerictextbox', localeText, this.locale);
        this.isValidState = true;
        this.inputStyle = null;
        this.inputName = null;
        this.cultureInfo = {};
        this.initCultureInfo();
        this.initCultureFunc();
        this.updateHTMLAttrToElement();
        this.checkAttributes(true);
        this.prevValue = this.value;
        if (this.formEle) {
            this.inputEleValue = this.value;
        }
        this.validateMinMax();
        this.validateStep();
        if (this.placeholder === null) {
            this.updatePlaceholder();
        }
    };
    /**
     * To Initialize the control rendering
     * @private
     */
    NumericTextBox.prototype.render = function () {
        if (this.element.tagName.toLowerCase() === 'input') {
            this.createWrapper();
            if (this.showSpinButton) {
                this.spinBtnCreation();
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.width)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.container, { 'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(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);
            this.wireEvents();
            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);
            }
        }
    };
    NumericTextBox.prototype.checkAttributes = function (isDynamic) {
        var attributes = ['value', 'min', 'max', 'step', 'disabled', 'readonly', 'style', 'name', 'placeholder'];
        for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
            var prop = attributes_1[_i];
            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;
                }
            }
        }
    };
    NumericTextBox.prototype.updatePlaceholder = function () {
        this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
    };
    NumericTextBox.prototype.initCultureFunc = function () {
        this.instance = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
    };
    NumericTextBox.prototype.initCultureInfo = function () {
        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 */
    NumericTextBox.prototype.createWrapper = function () {
        var inputObj = _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].createInput({
            element: this.element,
            floatLabelType: this.floatLabelType,
            properties: {
                readonly: this.readonly,
                placeholder: this.placeholder,
                cssClass: this.cssClass,
                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: 'hidden', 'validateHidden': 'true' } }));
        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]);
        if (this.inputStyle !== null) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.container, { 'style': this.inputStyle });
        }
    };
    NumericTextBox.prototype.updateHTMLAttrToElement = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var pro = _a[_i];
            if (wrapperAttributes.indexOf(pro) < 0) {
                this.element.setAttribute(pro, this.htmlAttributes[pro]);
            }
        }
    };
    NumericTextBox.prototype.updateHTMLAttrToWrapper = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var pro = _a[_i];
            if (wrapperAttributes.indexOf(pro) > -1) {
                if (pro === 'class') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.container], this.htmlAttributes[pro].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]);
                }
            }
        }
    };
    /* Spinner creation */
    NumericTextBox.prototype.spinBtnCreation = function () {
        this.spinDown = _input_input__WEBPACK_IMPORTED_MODULE_1__["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_input__WEBPACK_IMPORTED_MODULE_1__["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();
    };
    NumericTextBox.prototype.validateMinMax = function () {
        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() });
    };
    NumericTextBox.prototype.formattedValue = function (decimals, value) {
        return this.instance.getNumberFormat({
            maximumFractionDigits: decimals,
            minimumFractionDigits: decimals, useGrouping: false
        })(value);
    };
    NumericTextBox.prototype.validateStep = function () {
        if (this.decimals !== null) {
            this.setProperties({ step: this.instance.getNumberParser({ format: 'n' })(this.formattedValue(this.decimals, this.step)) }, true);
        }
    };
    NumericTextBox.prototype.action = function (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);
    };
    NumericTextBox.prototype.checkErrorClass = function () {
        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' });
    };
    NumericTextBox.prototype.bindClearEvent = function () {
        if (this.showClearButton) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler, this);
        }
    };
    NumericTextBox.prototype.resetHandler = function (e) {
        e.preventDefault();
        if (!(this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide'))) {
            this.clear(e);
        }
        this.isInteract = true;
        this.raiseChangeEvent(e);
    };
    NumericTextBox.prototype.clear = function (event) {
        this.setProperties({ value: null }, true);
        this.setElementValue('');
    };
    NumericTextBox.prototype.resetFormHandler = function () {
        if (this.element.tagName === 'EJS-NUMERICTEXTBOX') {
            this.updateValue(null);
        }
        else {
            this.updateValue(this.inputEleValue);
        }
    };
    NumericTextBox.prototype.setSpinButton = function () {
        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')
            });
        }
    };
    NumericTextBox.prototype.wireEvents = function () {
        _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);
            }
        }
    };
    NumericTextBox.prototype.wireSpinBtnEvents = function () {
        /* 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);
    };
    NumericTextBox.prototype.unwireEvents = function () {
        _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);
        }
    };
    NumericTextBox.prototype.unwireSpinBtnEvents = function () {
        /* 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);
    };
    NumericTextBox.prototype.changeHandler = function (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);
    };
    NumericTextBox.prototype.raiseChangeEvent = function (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.trigger('change', eventArgs);
        }
    };
    NumericTextBox.prototype.pasteHandler = function () {
        var _this = this;
        var beforeUpdate = this.element.value;
        setTimeout(function () {
            if (!_this.numericRegex().test(_this.element.value)) {
                _this.setElementValue(beforeUpdate);
            }
        });
    };
    NumericTextBox.prototype.preventHandler = function () {
        var _this = this;
        var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
        setTimeout(function () {
            if (_this.element.selectionStart > 0) {
                var currentPos = _this.element.selectionStart;
                var prevPos = _this.element.selectionStart - 1;
                var start = 0;
                var ignoreKeyCode = void 0;
                var valArray = _this.element.value.split('');
                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);
                ignoreKeyCode = decimalSeparator.charCodeAt(0);
                if (_this.element.value[prevPos] === ' ' && _this.element.selectionStart > 0 && !iOS) {
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.prevVal)) {
                        _this.element.value = _this.element.value.trim();
                    }
                    else if (prevPos !== 0) {
                        _this.element.value = _this.prevVal;
                    }
                    else if (prevPos === 0) {
                        _this.element.value = _this.element.value.trim();
                    }
                    _this.element.setSelectionRange(prevPos, prevPos);
                }
                else if (isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 1])) &&
                    _this.element.value[_this.element.selectionStart - 1].charCodeAt(0) !== 45) {
                    if ((valArray.indexOf(_this.element.value[_this.element.selectionStart - 1]) !==
                        valArray.lastIndexOf(_this.element.value[_this.element.selectionStart - 1]) &&
                        _this.element.value[_this.element.selectionStart - 1].charCodeAt(0) === ignoreKeyCode) ||
                        _this.element.value[_this.element.selectionStart - 1].charCodeAt(0) !== ignoreKeyCode) {
                        _this.element.value = _this.element.value.substring(0, prevPos) +
                            _this.element.value.substring(currentPos, _this.element.value.length);
                        _this.element.setSelectionRange(prevPos, prevPos);
                        if (isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 1])) && _this.element.selectionStart > 0
                            && _this.element.value.length) {
                            _this.preventHandler();
                        }
                    }
                }
                else if (isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 2])) && _this.element.selectionStart > 1 &&
                    _this.element.value[_this.element.selectionStart - 2].charCodeAt(0) !== 45) {
                    if ((valArray.indexOf(_this.element.value[_this.element.selectionStart - 2]) !==
                        valArray.lastIndexOf(_this.element.value[_this.element.selectionStart - 2]) &&
                        _this.element.value[_this.element.selectionStart - 2].charCodeAt(0) === ignoreKeyCode) ||
                        _this.element.value[_this.element.selectionStart - 2].charCodeAt(0) !== ignoreKeyCode) {
                        _this.element.setSelectionRange(prevPos, prevPos);
                        _this.nextEle = _this.element.value[_this.element.selectionStart];
                        _this.cursorPosChanged = true;
                        _this.preventHandler();
                    }
                }
                if (_this.cursorPosChanged === true && _this.element.value[_this.element.selectionStart] === _this.nextEle &&
                    isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 1]))) {
                    _this.element.setSelectionRange(_this.element.selectionStart + 1, _this.element.selectionStart + 1);
                    _this.cursorPosChanged = false;
                    _this.nextEle = null;
                }
                if (_this.element.value.trim() === '') {
                    _this.element.setSelectionRange(start, start);
                }
                if (_this.element.selectionStart > 0) {
                    if ((_this.element.value[_this.element.selectionStart - 1].charCodeAt(0) === 45) && _this.element.selectionStart > 1) {
                        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.prevVal)) {
                            _this.element.value = _this.element.value;
                        }
                        else {
                            _this.element.value = _this.prevVal;
                        }
                        _this.element.setSelectionRange(_this.element.selectionStart, _this.element.selectionStart);
                    }
                }
                _this.prevVal = _this.element.value;
            }
        });
    };
    NumericTextBox.prototype.keyUpHandler = function (event) {
        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);
        }
    };
    ;
    NumericTextBox.prototype.inputHandler = function (event) {
        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();
        }
    };
    ;
    NumericTextBox.prototype.keyDownHandler = function (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;
            }
        }
    };
    ;
    NumericTextBox.prototype.performAction = function (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;
    };
    ;
    NumericTextBox.prototype.correctRounding = function (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;
    };
    ;
    NumericTextBox.prototype.roundValue = function (result, precision) {
        precision = precision || 0;
        var divide = Math.pow(10, precision);
        return result *= divide, result = Math.round(result) / divide;
    };
    ;
    NumericTextBox.prototype.updateValue = function (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);
        this.raiseChangeEvent(event);
    };
    NumericTextBox.prototype.updateCurrency = function (prop, propVal) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, propVal, this.cultureInfo);
        this.updateValue(this.value);
    };
    NumericTextBox.prototype.changeValue = function (value) {
        if (!(value || value === 0)) {
            value = null;
            this.setProperties({ value: value }, true);
        }
        else {
            var numberOfDecimals = void 0;
            var decimalPart = value.toString().split('.')[1];
            numberOfDecimals = !decimalPart || !decimalPart.length ? 0 : decimalPart.length;
            if (this.decimals !== null) {
                numberOfDecimals = numberOfDecimals < this.decimals ? numberOfDecimals : this.decimals;
            }
            this.setProperties({ value: this.roundNumber(value, numberOfDecimals) }, true);
        }
        this.modifyText();
        if (!this.strictMode) {
            this.validateState();
        }
    };
    ;
    NumericTextBox.prototype.modifyText = function () {
        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();
        }
        else {
            this.setElementValue('');
            this.element.removeAttribute('aria-valuenow');
            this.hiddenInput.value = null;
        }
    };
    ;
    NumericTextBox.prototype.setElementValue = function (val, element) {
        _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setValue(val, (element ? element : this.element), this.floatLabelType, this.showClearButton);
    };
    NumericTextBox.prototype.validateState = function () {
        this.isValidState = true;
        if (this.value || this.value === 0) {
            this.isValidState = !(this.value > this.max || this.value < this.min);
        }
        this.checkErrorClass();
    };
    NumericTextBox.prototype.formatNumber = function () {
        var numberOfDecimals;
        var currentValue = this.value;
        var decimalPart = currentValue.toString().split('.')[1];
        numberOfDecimals = !decimalPart || !decimalPart.length ? 0 : decimalPart.length;
        if (this.decimals !== null) {
            numberOfDecimals = numberOfDecimals < this.decimals ? numberOfDecimals : this.decimals;
        }
        return this.instance.getNumberFormat({
            maximumFractionDigits: numberOfDecimals,
            minimumFractionDigits: numberOfDecimals, useGrouping: false
        })(this.value);
    };
    ;
    NumericTextBox.prototype.trimValue = function (value) {
        if (value > this.max) {
            return this.max;
        }
        if (value < this.min) {
            return this.min;
        }
        return value;
    };
    ;
    NumericTextBox.prototype.roundNumber = function (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));
    };
    ;
    NumericTextBox.prototype.cancelEvent = function (event) {
        event.preventDefault();
        return false;
    };
    NumericTextBox.prototype.keyPressHandler = function (event) {
        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;
        }
    };
    ;
    NumericTextBox.prototype.numericRegex = function () {
        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 + ')))?$');
    };
    ;
    NumericTextBox.prototype.mouseWheel = function (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);
    };
    NumericTextBox.prototype.focusHandler = function (event) {
        var _this = 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_1 = this.formatNumber();
            this.setElementValue(formatValue_1);
            if (!this.isPrevFocused) {
                var delay = (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos) ? 600 : 0;
                setTimeout(function () {
                    _this.element.setSelectionRange(0, formatValue_1.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);
        }
    };
    ;
    NumericTextBox.prototype.focusOutHandler = function (event) {
        var _this = this;
        this.blurEventArgs = { event: event, value: this.value, container: this.container };
        this.trigger('blur', this.blurEventArgs);
        if (this.isPrevFocused) {
            event.preventDefault();
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                var value_1 = this.element.value;
                this.element.focus();
                this.isPrevFocused = false;
                var ele_1 = this.element;
                setTimeout(function () {
                    _this.setElementValue(value_1, ele_1);
                }, 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);
        }
    };
    ;
    NumericTextBox.prototype.mouseDownOnSpinner = function (event) {
        var _this = 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 () { _this.isCalled = true; _this.action(action, event); }, 150);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mouseup', this.mouseUpClick, this);
    };
    NumericTextBox.prototype.touchMoveOnSpinner = function (event) {
        var target = document.elementFromPoint(event.clientX, event.clientY);
        if (!(target.classList.contains(SPINICON))) {
            clearInterval(this.timeOut);
        }
    };
    NumericTextBox.prototype.mouseUpOnSpinner = function (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);
        }
    };
    NumericTextBox.prototype.getElementData = function (event) {
        if ((event.which && event.which === 3) || (event.button && event.button === 2)
            || !this.enabled || this.readonly) {
            return false;
        }
        clearInterval(this.timeOut);
        return true;
    };
    NumericTextBox.prototype.floatLabelTypeUpdate = function () {
        _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].removeFloating(this.inputWrapper);
        var hiddenInput = this.hiddenInput;
        this.hiddenInput.remove();
        _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);
        this.container.insertBefore(hiddenInput, this.container.childNodes[1]);
    };
    NumericTextBox.prototype.mouseUpClick = function (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.
     */
    NumericTextBox.prototype.increment = function (step) {
        if (step === void 0) { step = 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.
     */
    NumericTextBox.prototype.decrement = function (step) {
        if (step === void 0) { step = 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}
     */
    NumericTextBox.prototype.destroy = function () {
        var _this = this;
        this.unwireEvents();
        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'];
        attrArray.forEach(function (value) {
            _this.element.removeAttribute(value);
        });
        this.element.classList.remove('e-input');
        this.container.insertAdjacentElement('afterend', this.element);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.container);
        _super.prototype.destroy.call(this);
    };
    /**
     * Returns the value of NumericTextBox with the format applied to the NumericTextBox.
     */
    NumericTextBox.prototype.getText = function () {
        return this.element.value;
    };
    /**
     * Sets the focus to widget for interaction.
     * @returns void
     */
    NumericTextBox.prototype.focusIn = function () {
        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
     */
    NumericTextBox.prototype.focusOut = function () {
        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}
     */
    NumericTextBox.prototype.getPersistData = function () {
        var keyEntity = ['value'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Calls internally if any of the property value is changed.
     * @private
     */
    NumericTextBox.prototype.onPropertyChanged = function (newProp, oldProp) {
        var elementVal;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'width':
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.container, { 'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.width) });
                    break;
                case 'cssClass':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setCssClass(newProp.cssClass, [this.container], oldProp.cssClass);
                    break;
                case 'enabled':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setEnabled(newProp.enabled, this.element);
                    break;
                case 'enableRtl':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setEnableRtl(newProp.enableRtl, [this.container]);
                    break;
                case 'readonly':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["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.checkAttributes(false);
                    break;
                case 'placeholder':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setPlaceholder(newProp.placeholder, this.element);
                    break;
                case 'step':
                    this.step = newProp.step;
                    this.validateStep();
                    break;
                case 'showSpinButton':
                    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);
                    }
                    break;
                case 'showClearButton':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setClearButton(newProp.showClearButton, this.element, this.inputWrapper, undefined, this.createElement);
                    this.bindClearEvent();
                    break;
                case 'floatLabelType':
                    this.floatLabelType = newProp.floatLabelType;
                    this.floatLabelTypeUpdate();
                    break;
                case 'value':
                    this.updateValue(newProp.value);
                    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_input__WEBPACK_IMPORTED_MODULE_1__["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);
            }
        }
    };
    /**
     * Gets the component name
     * @private
     */
    NumericTextBox.prototype.getModuleName = function () {
        return 'numerictextbox';
    };
    __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);
    return NumericTextBox;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/slider/index.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/slider/index.js ***!
  \*****************************************************************/
/*! exports provided: TicksData, LimitData, TooltipData, Slider */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _slider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slider */ "./node_modules/@syncfusion/ej2-inputs/src/slider/slider.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TicksData", function() { return _slider__WEBPACK_IMPORTED_MODULE_0__["TicksData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LimitData", function() { return _slider__WEBPACK_IMPORTED_MODULE_0__["LimitData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipData", function() { return _slider__WEBPACK_IMPORTED_MODULE_0__["TooltipData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _slider__WEBPACK_IMPORTED_MODULE_0__["Slider"]; });

/**
 * Slider modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/slider/slider.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/slider/slider.js ***!
  \******************************************************************/
/*! exports provided: TicksData, LimitData, TooltipData, Slider */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TicksData", function() { return TicksData; });
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};






/**
 * Configures the ticks data of the Slider.
 */
var TicksData = /** @class */ (function (_super) {
    __extends(TicksData, _super);
    function TicksData() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], TicksData.prototype, "placement", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], TicksData.prototype, "largeStep", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], TicksData.prototype, "smallStep", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TicksData.prototype, "showSmallTicks", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TicksData.prototype, "format", void 0);
    return TicksData;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * It illustrates the limit data in slider.
 */
var LimitData = /** @class */ (function (_super) {
    __extends(LimitData, _super);
    function LimitData() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], LimitData.prototype, "enabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LimitData.prototype, "minStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LimitData.prototype, "minEnd", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LimitData.prototype, "maxStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], LimitData.prototype, "maxEnd", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], LimitData.prototype, "startHandleFixed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], LimitData.prototype, "endHandleFixed", void 0);
    return LimitData;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * It illustrates the tooltip data in slider.
 */
var TooltipData = /** @class */ (function (_super) {
    __extends(TooltipData, _super);
    function TooltipData() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], TooltipData.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Before')
    ], TooltipData.prototype, "placement", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Focus')
    ], TooltipData.prototype, "showOn", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TooltipData.prototype, "isVisible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TooltipData.prototype, "format", void 0);
    return TooltipData;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

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',
    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 = /** @class */ (function (_super) {
    __extends(Slider, _super);
    function Slider(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.horDir = 'left';
        _this.verDir = 'bottom';
        _this.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)'
        };
        _this.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'
        };
        _this.scaleTransform = 'transform .4s cubic-bezier(.25, .8, .25, 1)';
        _this.customAriaText = null;
        _this.drag = true;
        return _this;
    }
    Slider.prototype.preRender = function () {
        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();
    };
    Slider.prototype.formChecker = function () {
        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;
        }
    };
    Slider.prototype.initCultureFunc = function () {
        this.internationalization = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
    };
    Slider.prototype.initCultureInfo = function () {
        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;
    };
    Slider.prototype.formatString = function (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 };
    };
    ;
    Slider.prototype.formatNumber = function (value) {
        var numberOfDecimals = this.numberOfDecimals(value);
        return this.internationalization.getNumberFormat({
            maximumFractionDigits: numberOfDecimals,
            minimumFractionDigits: numberOfDecimals, useGrouping: false
        })(value);
    };
    ;
    Slider.prototype.numberOfDecimals = function (value) {
        var decimalPart = value.toString().split('.')[1];
        var numberOfDecimals = !decimalPart || !decimalPart.length ? 0 : decimalPart.length;
        return numberOfDecimals;
    };
    Slider.prototype.makeRoundNumber = function (value, precision) {
        var decimals = precision || 0;
        return Number(value.toFixed(decimals));
    };
    ;
    Slider.prototype.fractionalToInteger = function (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
     */
    Slider.prototype.render = function () {
        this.initialize();
        this.initRender();
        this.wireEvents();
        this.setZindex();
    };
    Slider.prototype.initialize = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], classNames.root);
        this.setCSSClass();
    };
    Slider.prototype.setCSSClass = function (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(' '));
        }
    };
    Slider.prototype.setEnabled = function () {
        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();
        }
    };
    Slider.prototype.getTheme = function (container) {
        var theme = window.getComputedStyle(container, ':after').getPropertyValue('content');
        return theme.replace(/['"]+/g, '');
    };
    /**
     * Initialize the rendering
     * @private
     */
    Slider.prototype.initRender = function () {
        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.element.tabIndex = -1;
        this.getThemeInitialization();
        this.setHandler();
        this.createRangeBar();
        if (this.limits.enabled) {
            this.createLimitBar();
        }
        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 (!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]);
        }
    };
    Slider.prototype.getThemeInitialization = function () {
        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;
    };
    Slider.prototype.createRangeBar = function () {
        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);
                }
            }
        }
    };
    Slider.prototype.createLimitBar = function () {
        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);
        }
    };
    Slider.prototype.setOrientClass = function () {
        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');
            }
        }
    };
    Slider.prototype.setAriaAttributes = function (element) {
        var _this = 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 ? _this.firstHandle : _this.secondHandle;
                if (element) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
                        'aria-valuemin': range[0], 'aria-valuemax': range[1]
                    });
                }
            });
        }
    };
    Slider.prototype.createSecondHandle = function () {
        this.secondHandle = this.createElement('div', {
            attrs: {
                class: classNames.sliderHandle, 'role': 'slider', 'aria-labelledby': this.element.id + '_title', tabIndex: '0'
            }
        });
        this.secondHandle.classList.add(classNames.sliderSecondHandle);
        this.element.appendChild(this.secondHandle);
    };
    Slider.prototype.createFirstHandle = function () {
        this.firstHandle = this.createElement('div', {
            attrs: {
                class: classNames.sliderHandle, 'role': 'slider', 'aria-labelledby': this.element.id + '_title', 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);
        }
    };
    Slider.prototype.wireFirstHandleEvt = function (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);
        }
    };
    Slider.prototype.wireSecondHandleEvt = function (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);
        }
    };
    Slider.prototype.handleStart = function () {
        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);
                }
            }
        }
    };
    Slider.prototype.transitionEnd = function (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();
        }
    };
    Slider.prototype.handleFocusOut = function () {
        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);
            }
        }
    };
    Slider.prototype.handleFocus = function (e) {
        if (e.currentTarget === this.firstHandle) {
            this.firstHandle.classList.add(classNames.sliderHandleFocused);
        }
        else {
            this.secondHandle.classList.add(classNames.sliderHandleFocused);
        }
    };
    Slider.prototype.handleOver = function (e) {
        if (this.tooltip.isVisible && this.tooltip.showOn === 'Hover') {
            this.tooltipToggle(e.currentTarget);
        }
    };
    Slider.prototype.handleLeave = function (e) {
        if (this.tooltip.isVisible && this.tooltip.showOn === 'Hover' &&
            !e.currentTarget.classList.contains(classNames.sliderHandleFocused) &&
            !e.currentTarget.classList.contains(classNames.sliderTabHandle)) {
            this.closeTooltip();
        }
    };
    Slider.prototype.setHandler = function () {
        if (this.min > this.max) {
            this.min = this.max;
        }
        this.createFirstHandle();
        if (this.type === 'Range') {
            this.createSecondHandle();
        }
    };
    Slider.prototype.setEnableRTL = function () {
        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' });
                }
            }
        }
    };
    Slider.prototype.tooltipValue = function () {
        var _this = this;
        var text;
        var args = {
            value: this.value,
            text: ''
        };
        this.setTooltipContent();
        args.text = text = this.tooltipObj.content;
        this.trigger('tooltipChange', args, function (observedArgs) {
            _this.addTooltipClass(observedArgs.text);
            if (text !== observedArgs.text) {
                _this.customAriaText = observedArgs.text;
                _this.tooltipObj.content = observedArgs.text;
                _this.setAriaAttrValue(_this.firstHandle);
                if (_this.type === 'Range') {
                    _this.setAriaAttrValue(_this.secondHandle);
                }
            }
        });
    };
    Slider.prototype.setTooltipContent = function () {
        var content;
        content = this.formatContent(this.tooltipFormatInfo, false);
        this.tooltipObj.content = content;
    };
    Slider.prototype.formatContent = function (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;
        }
    };
    Slider.prototype.addTooltipClass = function (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;
                }
            }
        }
    };
    Slider.prototype.tooltipPlacement = function () {
        return this.orientation === 'Horizontal' ? (this.tooltip.placement === 'Before' ? 'TopCenter' : 'BottomCenter') :
            (this.tooltip.placement === 'Before' ? 'LeftCenter' : 'RightCenter');
    };
    Slider.prototype.tooltipBeforeOpen = function (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();
        }
    };
    Slider.prototype.tooltipCollision = function (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;
            }
        }
    };
    Slider.prototype.wireMaterialTooltipEvent = function (destroy) {
        if (this.isMaterialTooltip) {
            if (!destroy) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.tooltipElement, 'mousedown touchstart', this.sliderDown, this);
            }
            else {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.tooltipElement, 'mousedown touchstart', this.sliderDown);
            }
        }
    };
    Slider.prototype.tooltipPositionCalculation = function (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;
    };
    Slider.prototype.getTooltipTransformProperties = function (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(" + position + "px)" } :
                    { rotate: 'rotate(225deg)', translate: "translateY(" + -(position) + "px)" }) :
                (className === classNames.verticalTooltipBefore ? { rotate: 'rotate(-45deg)', translate: "translateX(" + position + "px)" } :
                    { rotate: 'rotate(-225deg)', translate: "translateX(" + (-position) + "px)" });
        }
        return transformProperties;
    };
    Slider.prototype.openMaterialTooltip = function () {
        var _this = 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 () { _this.tooltipElement.style.transition = _this.transition.handle; }, 2500);
            }
            else {
                setTimeout(function () { _this.tooltipElement.style.transition = 'none'; }, 2500);
            }
        }
    };
    Slider.prototype.closeMaterialTooltip = function () {
        var _this = 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';
            this.materialHandle.style.transform = 'scale(1)';
            this.tooltipElement.classList.remove(classNames.materialTooltipOpen);
            this.setTooltipTransform();
            this.tooltipTarget = undefined;
            setTimeout(function () { _this.tooltipElement.style.transition = 'none'; }, 2500);
        }
    };
    Slider.prototype.checkTooltipPosition = function (args) {
        if (this.tooltipCollidedPosition === undefined ||
            this.tooltipCollidedPosition !== args.collidedPosition) {
            if (this.isMaterialTooltip) {
                var tooltipClass = this.tooltipPositionCalculation(args.collidedPosition);
                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();
        }
    };
    Slider.prototype.setTooltipTransform = function () {
        var transformProperties = this.getTooltipTransformProperties(this.previousTooltipClass);
        if (this.tooltipElement.firstElementChild.innerText.length > 4) {
            this.tooltipElement.style.transform = transformProperties.translate + " scale(0.01)";
        }
        else {
            this.tooltipElement.style.transform = transformProperties.translate + " " + transformProperties.rotate + " scale(0.01)";
        }
    };
    Slider.prototype.renderTooltip = function () {
        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)
        });
        this.tooltipObj.appendTo(this.firstHandle);
        this.initializeTooltipProps();
    };
    Slider.prototype.initializeTooltipProps = function () {
        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);
            this.tooltipValue();
            this.tooltipObj.animation.close.effect = 'None';
            this.tooltipObj.open(this.firstHandle);
        }
    };
    Slider.prototype.tooltipBeforeClose = function () {
        this.tooltipElement = undefined;
        this.tooltipCollidedPosition = undefined;
    };
    Slider.prototype.setButtons = function () {
        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();
    };
    Slider.prototype.buttonTitle = function () {
        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 });
    };
    Slider.prototype.buttonFocusOut = function () {
        if (this.isMaterial) {
            this.getHandle().classList.remove('e-large-thumb-size');
        }
    };
    Slider.prototype.repeatButton = function (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());
        }
    };
    Slider.prototype.repeatHandlerMouse = function (args) {
        args.preventDefault();
        if (args.type === ('mousedown') || args.type === ('touchstart')) {
            this.buttonClick(args);
            this.repeatInterval = setInterval(this.repeatButton.bind(this), 180, args);
        }
    };
    Slider.prototype.materialChange = function () {
        if (!this.getHandle().classList.contains('e-large-thumb-size')) {
            this.getHandle().classList.add('e-large-thumb-size');
        }
    };
    Slider.prototype.repeatHandlerUp = function (e) {
        this.changeEvent('changed');
        this.closeTooltip();
        clearInterval(this.repeatInterval);
        this.getHandle().focus();
    };
    Slider.prototype.customTickCounter = function (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;
    };
    Slider.prototype.renderScale = function () {
        var orien = this.orientation === 'Vertical' ? 'v' : 'h';
        var spanText;
        this.noOfDecimals = this.numberOfDecimals(this.step);
        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);
        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);
                    islargeTick = ((startValue - min) % 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);
                }
            }
            else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues)) {
                this.formatTicksValue(li, start);
            }
            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.tickesAlignment(orien, tickWidth);
    };
    Slider.prototype.tickesAlignment = function (orien, tickWidth) {
        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 };
        this.trigger('renderedTicks', eventArgs);
        this.scaleAlignment();
    };
    Slider.prototype.createTick = function (li, start) {
        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);
        }
        else {
            span.innerHTML = start.toString();
        }
    };
    Slider.prototype.formatTicksValue = function (li, start, spanElement) {
        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) {
                spanElement.innerHTML = observedArgs.text.toString();
            }
        });
    };
    Slider.prototype.scaleAlignment = function () {
        this.tickValuePosition();
        var smallTick = 12;
        var largeTick = 20;
        var half = largeTick / 2;
        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);
        }
    };
    Slider.prototype.tickValuePosition = function () {
        var first = this.firstChild.getBoundingClientRect();
        var firstChild;
        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') {
                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 i = 0; i < other.length; i++) {
            var otherChild = other[i].getBoundingClientRect();
            if (this.orientation === 'Vertical') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(other[i], { top: (tickWidth - otherChild.height) / 2 + 'px' });
            }
            else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(other[i], { 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') {
                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);
                    this.firstChild.style.left = this.firstHandle.style.left;
                }
                else {
                    this.firstChild.classList.remove(classNames.sliderLastTick);
                    this.firstChild.style.right = this.firstHandle.style.right;
                    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 (this.orientation === 'Vertical') {
                this.firstChild.classList.remove(classNames.sliderLastTick);
            }
        }
    };
    Slider.prototype.setAriaAttrValue = function (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] }));
        }
    };
    Slider.prototype.handleValueUpdate = function () {
        var hVal;
        if (this.type === 'Range') {
            if (this.activeHandle === 1) {
                hVal = this.handleVal1;
            }
            else {
                hVal = this.handleVal2;
            }
        }
        else {
            hVal = this.handleVal1;
        }
        return hVal;
    };
    Slider.prototype.getLimitCorrectedValues = function (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;
    };
    Slider.prototype.focusSliderElement = function () {
        if (!this.isElementFocused) {
            this.element.focus();
            this.isElementFocused = true;
        }
    };
    Slider.prototype.buttonClick = function (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);
        }
    };
    Slider.prototype.tooltipToggle = function (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);
        }
    };
    Slider.prototype.buttonUp = function (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);
        }
    };
    Slider.prototype.setRangeBar = function () {
        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' });
            }
        }
    };
    Slider.prototype.checkValidValueAndPos = function (value) {
        value = this.checkHandleValue(value);
        value = this.checkHandlePosition(value);
        return value;
    };
    Slider.prototype.setLimitBarPositions = function (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';
            }
        }
    };
    Slider.prototype.setLimitBar = function () {
        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);
        }
    };
    Slider.prototype.getLimitValueAndPosition = function (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)];
    };
    Slider.prototype.setValue = function () {
        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.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();
            this.handleStart();
            this.value = this.handleVal1;
            this.setAriaAttrValue(this.firstHandle);
            this.changeEvent('changed');
        }
        else {
            this.validateRangeValue();
        }
        if (this.type !== 'Default') {
            this.setRangeBar();
        }
        if (this.limits.enabled) {
            this.setLimitBar();
        }
    };
    Slider.prototype.rangeValueUpdate = function () {
        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))];
        }
    };
    Slider.prototype.validateRangeValue = function () {
        this.rangeValueUpdate();
        this.setRangeValue();
    };
    Slider.prototype.modifyZindex = function () {
        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 = (this.zIndex + 4) + '';
        }
    };
    Slider.prototype.setHandlePosition = function () {
        var _this = 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 (_this.orientation === 'Horizontal') {
                _this.enableRtl ? (handle.style.right =
                    pos + "px") : (handle.style.left = pos + "px");
            }
            else {
                handle.style.bottom = pos + "px";
            }
        });
        this.changeEvent('change');
    };
    Slider.prototype.getHandle = function () {
        return (this.activeHandle === 1) ? this.firstHandle : this.secondHandle;
    };
    Slider.prototype.setRangeValue = function () {
        this.updateRangeValue();
        this.activeHandle = 1;
        this.setHandlePosition();
        this.activeHandle = 2;
        this.setHandlePosition();
        this.activeHandle = 1;
    };
    Slider.prototype.changeEvent = function (eventName) {
        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));
                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));
                this.setPreviousVal(eventName, this.value);
            }
            this.setAriaAttrValue(this.getHandle());
        }
        this.hiddenInput.value = this.value.toString();
    };
    Slider.prototype.changeEventArgs = function (eventName) {
        var eventArgs;
        if (this.tooltip.isVisible && this.tooltipObj) {
            this.tooltipValue();
            eventArgs = {
                value: this.value,
                previousValue: eventName === 'change' ? this.previousVal : this.previousChanged,
                action: eventName, text: this.tooltipObj.content
            };
        }
        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))
            };
        }
        return eventArgs;
    };
    Slider.prototype.setPreviousVal = function (eventName, value) {
        if (eventName === 'change') {
            this.previousVal = value;
        }
        else {
            this.previousChanged = value;
        }
    };
    Slider.prototype.updateRangeValue = function () {
        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_1 = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
            this.handleVal1 = values_1[0];
            this.handlePos1 = values_1[1];
            this.preHandlePos1 = this.handlePos1;
            this.activeHandle = 2;
            values_1 = this.getLimitValueAndPosition(this.handleVal2, this.limits.maxStart, this.limits.maxEnd);
            this.handleVal2 = values_1[0];
            this.handlePos2 = values_1[1];
            this.preHandlePos2 = this.handlePos2;
        }
    };
    Slider.prototype.checkHandlePosition = function (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;
    };
    Slider.prototype.checkHandleValue = function (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
     */
    Slider.prototype.reposition = function () {
        var _this = 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 =
                this.handlePos1 + "px" : this.firstHandle.style.left = this.handlePos1 + "px";
            if (this.isMaterialTooltip) {
                this.enableRtl ? this.materialHandle.style.right =
                    this.handlePos1 + "px" : this.materialHandle.style.left = 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 =
                    this.handlePos2 + "px" : this.secondHandle.style.left = 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 = this.handlePos1 + "px";
            if (this.isMaterialTooltip) {
                this.materialHandle.style.bottom = 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 = 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) {
            this.removeElement(this.ul);
            this.ul = undefined;
            this.renderScale();
        }
        this.handleStart();
        if (!this.tooltip.isVisible) {
            setTimeout(function () {
                _this.firstHandle.style.transition = _this.scaleTransform;
                if (_this.type === 'Range') {
                    _this.secondHandle.style.transition = _this.scaleTransform;
                }
            });
        }
        this.refreshTooltip(this.tooltipTarget);
    };
    Slider.prototype.changeHandleValue = function (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();
        }
    };
    Slider.prototype.tempStartEnd = function () {
        if (this.min > this.max) {
            return {
                start: this.max,
                end: this.min
            };
        }
        else {
            return {
                start: this.min,
                end: this.max
            };
        }
    };
    Slider.prototype.xyToPosition = function (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_1 = position.y - this.element.getBoundingClientRect().top;
            var num = this.element.offsetHeight / 100;
            this.val = 100 - (top_1 / 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;
    };
    Slider.prototype.stepValueCalculation = function (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;
    };
    Slider.prototype.add = function (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;
    };
    Slider.prototype.positionToValue = function (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);
    };
    Slider.prototype.sliderBarClick = function (evt) {
        evt.preventDefault();
        var pos;
        if (evt.type === 'mousedown' || evt.type === 'click') {
            pos = { x: evt.clientX, y: evt.clientY };
        }
        else if (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 value = this.getLimitValueAndPosition(handleVal, this.limits.minStart, this.limits.minEnd);
                    handleVal = value[0];
                    handlepos = value[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();
        if (this.type !== 'Default') {
            this.setRangeBar();
        }
    };
    Slider.prototype.sliderDown = function (event) {
        var _a, _b;
        event.preventDefault();
        this.focusSliderElement();
        if (this.type === 'Range' && this.drag && event.target === this.rangeBar) {
            var xPostion = void 0;
            var yPostion = void 0;
            if (event.type === 'mousedown') {
                _a = [event.clientX, event.clientY], xPostion = _a[0], yPostion = _a[1];
            }
            else if (event.type === 'touchstart') {
                _b = [event.changedTouches[0].clientX, event.changedTouches[0].clientY], xPostion = _b[0], yPostion = _b[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);
        }
        else {
            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);
        }
    };
    Slider.prototype.handleValueAdjust = function (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);
    };
    Slider.prototype.dragRangeBarMove = function (event) {
        var _a, _b;
        if (event.type !== 'touchmove') {
            event.preventDefault();
        }
        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') {
            _a = [event.clientX, event.clientY], xPostion = _a[0], yPostion = _a[1];
        }
        else {
            _b = [event.changedTouches[0].clientX, event.changedTouches[0].clientY], xPostion = _b[0], yPostion = _b[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();
        this.activeHandle = 2;
        this.setHandlePosition();
        this.tooltipToggle(this.rangeBar);
        this.setRangeBar();
    };
    Slider.prototype.sliderBarUp = function () {
        this.changeEvent('changed');
        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);
    };
    Slider.prototype.sliderBarMove = function (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 value = this.getLimitValueAndPosition(handleVal, this.limits.maxStart, this.limits.maxEnd);
                            handleVal = value[0];
                            handlepos = value[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();
        if (this.isMaterial && !this.tooltip.isVisible &&
            !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
            this.materialChange();
        }
        this.tooltipToggle(this.getHandle());
        if (this.type !== 'Default') {
            this.setRangeBar();
        }
    };
    Slider.prototype.dragRangeBarUp = function (event) {
        this.changeEvent('changed');
        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);
    };
    Slider.prototype.checkRepeatedValue = function (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;
    };
    Slider.prototype.refreshTooltip = function (target) {
        if (this.tooltip.isVisible && this.tooltipObj) {
            this.tooltipValue();
            if (target) {
                this.tooltipObj.refresh(target);
                this.tooltipTarget = target;
            }
        }
    };
    Slider.prototype.openTooltip = function (target) {
        if (this.tooltip.isVisible && this.tooltipObj && !this.isMaterialTooltip) {
            this.tooltipValue();
            this.tooltipObj.open(target);
            this.tooltipTarget = target;
        }
    };
    Slider.prototype.closeTooltip = function () {
        if (this.tooltip.isVisible && this.tooltipObj && this.tooltip.showOn !== 'Always' && !this.isMaterialTooltip) {
            this.tooltipValue();
            this.tooltipObj.close();
            this.tooltipTarget = undefined;
        }
    };
    Slider.prototype.keyDown = function (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;
        }
    };
    Slider.prototype.wireButtonEvt = function (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);
        }
    };
    Slider.prototype.wireEvents = function () {
        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, 'mousedown touchstart', this.sliderDown, 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);
            }
        }
    };
    Slider.prototype.unwireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mousedown touchstart', this.sliderDown);
        _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);
    };
    Slider.prototype.formResetHandler = function () {
        this.setProperties({ 'value': this.formResetValue }, true);
        this.setValue();
    };
    Slider.prototype.keyUp = function (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');
    };
    Slider.prototype.hover = function (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);
            }
        }
    };
    Slider.prototype.sliderFocusOut = function (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;
        }
    };
    Slider.prototype.removeElement = function (element) {
        if (element.parentNode) {
            element.parentNode.removeChild(element);
        }
    };
    Slider.prototype.changeSliderType = function (type) {
        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.updateConfig();
    };
    Slider.prototype.changeRtl = function () {
        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' });
        }
    };
    Slider.prototype.changeOrientation = function () {
        this.changeSliderType(this.type);
    };
    Slider.prototype.updateConfig = function () {
        this.setEnableRTL();
        this.setValue();
        if (this.tooltip.isVisible) {
            this.refreshTooltip(this.tooltipTarget);
        }
        if (this.ticks.placement !== 'None') {
            if (this.ul) {
                this.removeElement(this.ul);
                this.ul = undefined;
                this.renderScale();
            }
        }
        this.limitsPropertyChange();
    };
    Slider.prototype.limitsPropertyChange = function () {
        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
     */
    Slider.prototype.getPersistData = function () {
        var keyEntity = ['value'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Prepares the slider for safe removal from the DOM.
     * Detaches all event handlers, attributes, and classes to avoid memory leaks.
     * @method destroy
     * @return {void}
     */
    Slider.prototype.destroy = function () {
        _super.prototype.destroy.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');
        }
        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();
        }
        this.element.innerHTML = '';
    };
    /**
     * Calls internally if any of the property value is changed.
     * @private
     */
    // tslint:disable-next-line
    Slider.prototype.onPropertyChanged = function (newProp, oldProp) {
        var _this = this;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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();
                            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':
                    this.setMinMaxValue();
                    break;
                case 'tooltip':
                    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();
                    }
                    break;
                case 'type':
                    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);
                        this.setZindex();
                    }
                    break;
                case 'enableRtl':
                    if (oldProp.enableRtl !== newProp.enableRtl && this.orientation !== 'Vertical') {
                        this.rtl = oldProp.enableRtl;
                        this.changeRtl();
                    }
                    break;
                case 'limits':
                    this.limitsPropertyChange();
                    break;
                case 'orientation':
                    this.changeOrientation();
                    break;
                case 'ticks':
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.sliderContainer.querySelector('.' + classNames.scale))) {
                        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-/)) {
                                _this.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 (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;
                        }
                    }
                    break;
                case 'enabled':
                    this.setEnabled();
                    break;
                case 'readonly':
                    this.setReadOnly();
                    break;
                case 'customValues':
                    this.setValue();
                    this.reposition();
                    break;
            }
        }
    };
    Slider.prototype.setReadOnly = function () {
        if (this.readonly) {
            this.unwireEvents();
            this.sliderContainer.classList.add(classNames.readonly);
        }
        else {
            this.wireEvents();
            this.sliderContainer.classList.remove(classNames.readonly);
        }
    };
    Slider.prototype.setMinMaxValue = function () {
        var _this = this;
        this.setValue();
        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-/)) {
                        _this.sliderContainer.classList.remove(className);
                    }
                });
            }
        }
        if (this.ticks.placement !== 'None') {
            this.renderScale();
            this.setZindex();
        }
    };
    Slider.prototype.setZindex = function () {
        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) + '';
        }
    };
    Slider.prototype.setTooltip = function () {
        this.changeSliderType(this.type);
    };
    /**
     * Gets the component name
     * @private
     */
    Slider.prototype.getModuleName = function () {
        return 'slider';
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Slider.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Slider.prototype, "customValues", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], Slider.prototype, "step", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Slider.prototype, "min", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(100)
    ], Slider.prototype, "max", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Slider.prototype, "readonly", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Default')
    ], Slider.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, TicksData)
    ], Slider.prototype, "ticks", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, LimitData)
    ], Slider.prototype, "limits", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Slider.prototype, "enabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, TooltipData)
    ], Slider.prototype, "tooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Slider.prototype, "showButtons", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Slider.prototype, "enableAnimation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Horizontal')
    ], Slider.prototype, "orientation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Slider.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Slider.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Slider.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Slider.prototype, "changed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Slider.prototype, "renderingTicks", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Slider.prototype, "renderedTicks", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Slider.prototype, "tooltipChange", void 0);
    Slider = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Slider);
    return Slider;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/textbox/index.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/textbox/index.js ***!
  \******************************************************************/
/*! exports provided: TextBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _textbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./textbox */ "./node_modules/@syncfusion/ej2-inputs/src/textbox/textbox.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextBox", function() { return _textbox__WEBPACK_IMPORTED_MODULE_0__["TextBox"]; });

/**
 * Uploader modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/textbox/textbox.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/textbox/textbox.js ***!
  \********************************************************************/
/*! exports provided: TextBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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/index.js");
/* harmony import */ var _input_input__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../input/input */ "./node_modules/@syncfusion/ej2-inputs/src/input/input.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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-textbox';
var CONTROL = 'e-control';
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 = /** @class */ (function (_super) {
    __extends(TextBox, _super);
    function TextBox(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.previousValue = null;
        _this.isAngular = false;
        _this.isHiddenInput = false;
        _this.isForm = false;
        _this.inputPreviousValue = null;
        _this.textboxOptions = options;
        return _this;
    }
    /**
     * Calls internally if any of the property value is changed.
     * @private
     */
    TextBox.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'floatLabelType':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].removeFloating(this.textboxWrapper);
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].addFloating(this.respectiveElement, this.floatLabelType, this.placeholder);
                    break;
                case 'enabled':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, 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_input__WEBPACK_IMPORTED_MODULE_1__["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.preventChange === true) {
                        this.previousValue = this.value;
                        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 = this.element.attributes;
                    this.checkAttributes(attributes, false);
                    break;
                case 'readonly':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["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_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
                        this.bindClearEvent();
                    }
                    break;
                case 'enableRtl':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);
                    break;
                case 'placeholder':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setPlaceholder(this.placeholder, this.respectiveElement);
                    break;
                case 'cssClass':
                    _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setCssClass(newProp.cssClass, [this.textboxWrapper.container], 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_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setPlaceholder(this.placeholder, this.respectiveElement);
                    break;
            }
        }
    };
    /**
     * Gets the component name
     * @private
     */
    TextBox.prototype.getModuleName = function () {
        return 'textbox';
    };
    TextBox.prototype.isBlank = function (str) {
        return (!str || /^\s*$/.test(str));
    };
    TextBox.prototype.preRender = function () {
        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();
        var attributes = this.element.attributes;
        this.checkAttributes(attributes, true);
        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]);
                }
            }
        }
    };
    TextBox.prototype.checkAttributes = function (attrs, isDynamic) {
        for (var i = 0; i < attrs.length; i++) {
            var key = attrs[i].nodeName;
            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: attrs[i].nodeValue }, 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: attrs[i].nodeValue }, 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: attrs[i].nodeValue }, isDynamic);
                    }
                    break;
            }
        }
    };
    /**
     * To Initialize the control rendering
     * @private
     */
    TextBox.prototype.render = function () {
        this.respectiveElement = (this.isHiddenInput) ? this.textarea : this.element;
        this.textboxWrapper = _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].createInput({
            element: this.respectiveElement,
            floatLabelType: this.floatLabelType,
            properties: {
                enabled: this.enabled,
                enableRtl: this.enableRtl,
                cssClass: this.cssClass,
                readonly: this.readonly,
                placeholder: this.placeholder,
                showClearButton: this.showClearButton
            }
        });
        this.updateHTMLAttrToWrapper();
        if (this.isHiddenInput) {
            this.respectiveElement.parentNode.insertBefore(this.element, this.respectiveElement);
        }
        this.wireEvents();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            _input_input__WEBPACK_IMPORTED_MODULE_1__["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();
        }
        this.previousValue = this.value;
        this.inputPreviousValue = this.value;
    };
    TextBox.prototype.updateHTMLAttrToWrapper = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (containerAttr.indexOf(key) > -1) {
                if (key === 'class') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.textboxWrapper.container], this.htmlAttributes[key].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]);
                }
            }
        }
    };
    TextBox.prototype.updateHTMLAttrToElement = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (containerAttr.indexOf(key) < 0) {
                this.element.setAttribute(key, this.htmlAttributes[key]);
            }
        }
    };
    TextBox.prototype.setInitialValue = function () {
        if (!this.isAngular) {
            this.respectiveElement.setAttribute('value', this.initialValue);
        }
    };
    TextBox.prototype.wireEvents = function () {
        _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);
        }
        if (this.enabled) {
            this.bindClearEvent();
        }
    };
    TextBox.prototype.resetValue = function (value) {
        var prevOnChange = this.isProtectedOnChange;
        this.isProtectedOnChange = true;
        this.value = value;
        this.isProtectedOnChange = prevOnChange;
    };
    TextBox.prototype.resetForm = function () {
        if (this.isAngular) {
            this.resetValue('');
        }
        else {
            this.resetValue(this.initialValue);
        }
        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');
            }
        }
    };
    TextBox.prototype.focusHandler = function (args) {
        var eventArgs = {
            container: this.textboxWrapper.container,
            event: args,
            value: this.value
        };
        this.trigger('focus', eventArgs);
    };
    TextBox.prototype.focusOutHandler = function (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);
    };
    TextBox.prototype.inputHandler = function (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;
        }
        this.trigger('input', eventArgs);
        args.stopPropagation();
    };
    TextBox.prototype.changeHandler = function (args) {
        this.setProperties({ value: this.respectiveElement.value }, true);
        this.raiseChangeEvent(args, true);
        args.stopPropagation();
    };
    TextBox.prototype.raiseChangeEvent = function (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;
    };
    TextBox.prototype.bindClearEvent = function () {
        if (this.showClearButton && this.respectiveElement.tagName !== 'TEXTAREA') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
        }
    };
    TextBox.prototype.resetInputHandler = function (event) {
        event.preventDefault();
        if (!(this.textboxWrapper.clearButton.classList.contains(HIDE_CLEAR))) {
            var previousValue = this.value;
            _input_input__WEBPACK_IMPORTED_MODULE_1__["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);
        }
    };
    TextBox.prototype.unWireEvents = function () {
        _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}
     */
    TextBox.prototype.destroy = function () {
        this.unWireEvents();
        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.classList.remove('e-input');
        this.removeAttributes(['aria-placeholder', 'aria-disabled', 'aria-readonly', 'aria-labelledby']);
        this.textboxWrapper.container.insertAdjacentElement('afterend', this.respectiveElement);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.textboxWrapper.container);
        this.textboxWrapper = null;
        _super.prototype.destroy.call(this);
    };
    /**
     * Gets the properties to be maintained in the persisted state.
     * @return {string}
     */
    TextBox.prototype.getPersistData = function () {
        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}
     */
    TextBox.prototype.addAttributes = function (attributes) {
        for (var _i = 0, _a = Object.keys(attributes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (key === 'disabled') {
                this.setProperties({ enabled: false }, true);
                _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);
            }
            else if (key === 'readonly') {
                this.setProperties({ readonly: true }, true);
                _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setReadonly(this.readonly, this.respectiveElement);
            }
            else if (key === 'class') {
                this.respectiveElement.classList.add(attributes[key]);
            }
            else if (key === 'placeholder') {
                this.setProperties({ placeholder: attributes[key] }, true);
                _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setPlaceholder(this.placeholder, this.respectiveElement);
            }
            else if (key === 'rows' && this.respectiveElement.tagName === 'TEXTAREA') {
                this.respectiveElement.setAttribute(key, attributes[key]);
            }
            else {
                this.respectiveElement.setAttribute(key, attributes[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}
     */
    TextBox.prototype.removeAttributes = function (attributes) {
        for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
            var key = attributes_1[_i];
            if (key === 'disabled') {
                this.setProperties({ enabled: true }, true);
                _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);
            }
            else if (key === 'readonly') {
                this.setProperties({ readonly: false }, true);
                _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setReadonly(this.readonly, this.respectiveElement);
            }
            else if (key === 'placeholder') {
                this.setProperties({ placeholder: null }, true);
                _input_input__WEBPACK_IMPORTED_MODULE_1__["Input"].setPlaceholder(this.placeholder, this.respectiveElement);
            }
            else {
                this.respectiveElement.removeAttribute(key);
            }
        }
    };
    /**
     * Sets the focus to widget for interaction.
     * @returns void
     */
    TextBox.prototype.focusIn = function () {
        if (document.activeElement !== this.respectiveElement && this.enabled) {
            this.respectiveElement.focus();
            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
     */
    TextBox.prototype.focusOut = function () {
        if (document.activeElement === this.respectiveElement && this.enabled) {
            this.respectiveElement.blur();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.textboxWrapper.container], [TEXTBOX_FOCUS]);
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('text')
    ], TextBox.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TextBox.prototype, "readonly", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TextBox.prototype, "value", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')
    ], TextBox.prototype, "floatLabelType", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], TextBox.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TextBox.prototype, "placeholder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], TextBox.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TextBox.prototype, "multiline", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TextBox.prototype, "enabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TextBox.prototype, "showClearButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TextBox.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TextBox.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TextBox.prototype, "destroyed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TextBox.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TextBox.prototype, "blur", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TextBox.prototype, "focus", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TextBox.prototype, "input", void 0);
    TextBox = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], TextBox);
    return TextBox;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/uploader/index.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/uploader/index.js ***!
  \*******************************************************************/
/*! exports provided: FilesProp, ButtonsProps, AsyncSettings, Uploader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _uploader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uploader */ "./node_modules/@syncfusion/ej2-inputs/src/uploader/uploader.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilesProp", function() { return _uploader__WEBPACK_IMPORTED_MODULE_0__["FilesProp"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonsProps", function() { return _uploader__WEBPACK_IMPORTED_MODULE_0__["ButtonsProps"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSettings", function() { return _uploader__WEBPACK_IMPORTED_MODULE_0__["AsyncSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uploader", function() { return _uploader__WEBPACK_IMPORTED_MODULE_0__["Uploader"]; });

/**
 * Uploader modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-inputs/src/uploader/uploader.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-inputs/src/uploader/uploader.js ***!
  \**********************************************************************/
/*! exports provided: FilesProp, ButtonsProps, AsyncSettings, Uploader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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-uploader';
var CONTROL_WRAPPER = 'e-upload';
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 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 = ['title', 'style', 'class'];
var FilesProp = /** @class */ (function (_super) {
    __extends(FilesProp, _super);
    function FilesProp() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], FilesProp.prototype, "name", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], FilesProp.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], FilesProp.prototype, "type", void 0);
    return FilesProp;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var ButtonsProps = /** @class */ (function (_super) {
    __extends(ButtonsProps, _super);
    function ButtonsProps() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Browse...')
    ], ButtonsProps.prototype, "browse", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Upload')
    ], ButtonsProps.prototype, "upload", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Clear')
    ], ButtonsProps.prototype, "clear", void 0);
    return ButtonsProps;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var AsyncSettings = /** @class */ (function (_super) {
    __extends(AsyncSettings, _super);
    function AsyncSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AsyncSettings.prototype, "saveUrl", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], AsyncSettings.prototype, "removeUrl", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], AsyncSettings.prototype, "chunkSize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)
    ], AsyncSettings.prototype, "retryCount", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(500)
    ], AsyncSettings.prototype, "retryAfterDelay", void 0);
    return AsyncSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * 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 = /** @class */ (function (_super) {
    __extends(Uploader, _super);
    /**
     * Triggers when change the Uploader value.
     */
    function Uploader(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.initialAttr = { accept: null, multiple: false, disabled: false };
        _this.fileList = [];
        _this.filesData = [];
        _this.uploadedFilesData = [];
        _this.isForm = false;
        _this.allTypes = false;
        _this.pausedData = [];
        _this.uploadMetaData = [];
        _this.tabIndex = '0';
        _this.btnTabIndex = '0';
        _this.disableKeyboardNavigation = false;
        _this.count = -1;
        _this.actionCompleteCount = 0;
        _this.flag = true;
        _this.selectedFiles = [];
        _this.uploaderOptions = options;
        return _this;
    }
    /**
     * Calls internally if any of the property value is changed.
     * @private
     */
    Uploader.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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.setDropArea();
                    break;
                case 'htmlAttributes':
                    this.updateHTMLAttrToElement();
                    this.updateHTMLAttrToWrapper();
                    this.checkHTMLAttributes(false);
                    break;
                case 'files':
                    this.renderPreLoadFiles();
                    break;
                case 'directoryUpload':
                    this.updateDirectoryAttributes();
                    break;
                case 'minFileSize':
                case 'maxFileSize':
                case 'template':
                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;
            }
        }
    };
    Uploader.prototype.setLocalizedTexts = function () {
        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);
                this.uploadWrapper.querySelector('.' + DROP_AREA).innerHTML = this.localizedTexts('dropFilesHint');
            }
            this.updateFileList();
        }
    };
    Uploader.prototype.getKeyValue = function (val) {
        var keyValue;
        for (var _i = 0, _a = Object.keys(this.preLocaleObj); _i < _a.length; _i++) {
            var key = _a[_i];
            if (this.preLocaleObj[key] === val) {
                keyValue = key;
            }
        }
        return keyValue;
    };
    Uploader.prototype.updateFileList = function () {
        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'));
                }
            }
        }
    };
    Uploader.prototype.reRenderFileList = function () {
        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();
            }
        }
    };
    Uploader.prototype.preRender = function () {
        this.cloneElement = this.element.cloneNode(true);
        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'
        };
        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.updateHTMLAttrToElement();
        this.checkHTMLAttributes(true);
        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');
                }
            }
        }
        // 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;
    };
    Uploader.prototype.getPersistData = function () {
        return this.addOnPersist([]);
    };
    /**
     * Return the module name of the component.
     */
    Uploader.prototype.getModuleName = function () {
        return 'uploader';
    };
    Uploader.prototype.updateDirectoryAttributes = function () {
        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
     */
    Uploader.prototype.render = function () {
        this.renderBrowseButton();
        this.initializeUpload();
        this.updateHTMLAttrToWrapper();
        this.wireEvents();
        this.setMultipleSelection();
        this.setExtensions(this.allowedExtensions);
        this.setRTL();
        this.renderPreLoadFiles();
        this.setControlStatus();
        this.setCSSClass();
    };
    Uploader.prototype.renderBrowseButton = function () {
        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');
    };
    Uploader.prototype.renderActionButtons = function () {
        this.element.setAttribute('tabindex', '-1');
        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();
    };
    Uploader.prototype.wireActionButtonEvents = function () {
        _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);
    };
    Uploader.prototype.unwireActionButtonEvents = function () {
        _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);
    };
    Uploader.prototype.removeActionButtons = function () {
        if (this.actionButtons) {
            this.unwireActionButtonEvents();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.actionButtons);
            this.actionButtons = null;
        }
    };
    Uploader.prototype.renderButtonTemplates = function () {
        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 = void 0;
            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 = void 0;
            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);
            }
        }
    };
    Uploader.prototype.initializeUpload = function () {
        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);
        var fileDropArea = this.createElement('span', { className: DROP_AREA });
        fileDropArea.innerHTML = this.localizedTexts('dropFilesHint');
        this.dropAreaWrapper.appendChild(fileDropArea);
        this.uploadWrapper = this.createElement('div', { className: CONTROL_WRAPPER });
        this.dropAreaWrapper.parentElement.insertBefore(this.uploadWrapper, this.dropAreaWrapper);
        this.uploadWrapper.appendChild(this.dropAreaWrapper);
        this.setDropArea();
    };
    Uploader.prototype.renderPreLoadFiles = function () {
        if (this.files.length) {
            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]];
            }
            for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
                var data = files_1[_i];
                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);
            }
            this.createFileList(filesData);
            if (!this.autoUpload && this.listParent && !this.actionButtons && (!this.isForm || this.allowUpload()) && this.showFileList) {
                this.renderActionButtons();
            }
            this.checkActionButtonStatus();
        }
    };
    Uploader.prototype.checkActionButtonStatus = function () {
        if (this.actionButtons) {
            var length_1 = 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_1 > 0 && length_1 === this.uploadWrapper.querySelectorAll('li').length) {
                this.uploadButton.setAttribute('disabled', 'disabled');
            }
            else {
                this.uploadButton.removeAttribute('disabled');
            }
        }
    };
    Uploader.prototype.setDropArea = function () {
        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;
                    dropTextArea.textContent = this.localizedTexts('dropFilesHint');
                }
            }
            if (!enableDropText) {
                dropTextArea.textContent = '';
            }
        }
        else {
            this.dropZoneElement = this.uploadWrapper;
            dropTextArea.textContent = this.localizedTexts('dropFilesHint');
        }
        this.bindDropEvents();
    };
    Uploader.prototype.updateHTMLAttrToElement = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var pro = _a[_i];
            if (wrapperAttr.indexOf(pro) < 0) {
                this.element.setAttribute(pro, this.htmlAttributes[pro]);
            }
        }
    };
    Uploader.prototype.updateHTMLAttrToWrapper = function () {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
            var pro = _a[_i];
            if (wrapperAttr.indexOf(pro) > -1) {
                if (pro === 'class') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.uploadWrapper], this.htmlAttributes[pro].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]);
                }
            }
        }
    };
    Uploader.prototype.setMultipleSelection = function () {
        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');
        }
    };
    Uploader.prototype.checkAutoUpload = function (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();
    };
    Uploader.prototype.sequenceUpload = function (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.upload(this.filesData[this.count], isFileListCreated);
                if (this.filesData[this.count].statusCode === '0') {
                    this.sequenceUpload(fileData);
                }
            }
            else {
                --this.count;
            }
        }
    };
    Uploader.prototype.setCSSClass = function (oldCSSClass) {
        if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.uploadWrapper], this.cssClass.split(this.cssClass.indexOf(',') > -1 ? ',' : ' '));
        }
        if (oldCSSClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.uploadWrapper], oldCSSClass.split(' '));
        }
    };
    Uploader.prototype.wireEvents = function () {
        _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);
        }
    };
    Uploader.prototype.unWireEvents = function () {
        _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();
    };
    Uploader.prototype.resetForm = function () {
        this.clearAll();
    };
    Uploader.prototype.keyActionHandler = function (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;
        }
    };
    Uploader.prototype.getCurrentMetaData = function (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;
    };
    Uploader.prototype.removeFocus = function () {
        if (this.uploadWrapper && this.listParent && this.listParent.querySelector('.' + ICON_FOCUSED)) {
            document.activeElement.blur();
            this.listParent.querySelector('.' + ICON_FOCUSED).classList.remove(ICON_FOCUSED);
        }
    };
    Uploader.prototype.browseButtonClick = function () {
        this.element.click();
    };
    Uploader.prototype.uploadButtonClick = function () {
        if (this.sequentialUpload) {
            this.sequenceUpload(this.filesData);
        }
        else {
            this.upload(this.filesData);
        }
    };
    Uploader.prototype.clearButtonClick = function () {
        this.clearAll();
        /* istanbul ignore next */
        if (this.sequentialUpload) {
            this.count = -1;
        }
        this.actionCompleteCount = 0;
    };
    Uploader.prototype.bindDropEvents = function () {
        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);
        }
    };
    Uploader.prototype.unBindDropEvents = function () {
        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);
        }
    };
    Uploader.prototype.onDragLeave = function (e) {
        this.dropZoneElement.classList.remove(DRAG_HOVER);
    };
    Uploader.prototype.dragHover = function (e) {
        if (!this.enabled) {
            return;
        }
        this.dropZoneElement.classList.add(DRAG_HOVER);
        e.preventDefault();
        e.stopPropagation();
    };
    /* istanbul ignore next */
    Uploader.prototype.dropElement = function (e) {
        this.dropZoneElement.classList.remove(DRAG_HOVER);
        this.onSelectFiles(e);
        e.preventDefault();
        e.stopPropagation();
    };
    /* istanbul ignore next */
    Uploader.prototype.onPasteFile = function (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);
        }
    };
    Uploader.prototype.removeFiles = function (args) {
        if (!this.enabled) {
            return;
        }
        var selectedElement = args.target.parentElement;
        var index = this.fileList.indexOf(selectedElement);
        var liElement = this.fileList[index];
        var fileData = this.filesData[index];
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fileData)) {
            return;
        }
        if (args.target.classList.contains(ABORT_ICON)) {
            fileData.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 {
            this.remove(fileData, false, false, args);
        }
        this.element.value = '';
        this.checkActionButtonStatus();
    };
    Uploader.prototype.removeFilesData = function (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;
        }
        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.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;
            }
        }
    };
    Uploader.prototype.removeUploadedFile = function (file, eventArgs, removeDirectly, custom) {
        var _this = 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 (!removeDirectly) {
                _this.trigger('removing', eventArgs, function (eventArgs) {
                    if (!eventArgs.cancel) {
                        _this.removingEventCallback(eventArgs, formData, selectedFiles, file);
                    }
                });
            }
            else {
                _this.removingEventCallback(eventArgs, formData, selectedFiles, file);
            }
        };
        ajax.onLoad = function (e) { _this.removeCompleted(e, selectedFiles, custom); return {}; };
        /* istanbul ignore next */
        ajax.onError = function (e) { _this.removeFailed(e, selectedFiles, custom); return {}; };
        ajax.send(formData);
    };
    Uploader.prototype.removingEventCallback = function (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 = void 0;
            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 (eventArgs.postRawFile && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedFiles.rawFile) && selectedFiles.rawFile !== '') {
            formData.append(name, selectedFiles.rawFile);
        }
        else {
            formData.append(name, selectedFiles.name);
        }
        this.updateFormData(formData, eventArgs.customFormData);
    };
    /* istanbul ignore next */
    Uploader.prototype.updateFormData = function (formData, customData) {
        if (customData.length > 0 && customData[0]) {
            var _loop_1 = function (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++) {
                _loop_1(i);
            }
        }
    };
    Uploader.prototype.removeCompleted = function (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 });
    };
    Uploader.prototype.removeFailed = function (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) {
                var statusElement = rootElement.querySelector('.' + STATUS);
                rootElement.classList.remove(UPLOAD_SUCCESS);
                statusElement.classList.remove(UPLOAD_SUCCESS);
                rootElement.classList.add(UPLOAD_FAILED);
                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 */
    Uploader.prototype.getFilesFromFolder = function (event) {
        this.filesEntries = [];
        var items;
        items = this.multiple ? event.dataTransfer.items : [event.dataTransfer.items[0]];
        var validDirectoryUpload = this.checkDirectoryUpload(items);
        if (!validDirectoryUpload) {
            return;
        }
        var _loop_2 = function (i) {
            // tslint:disable-next-line
            var item = items[i].webkitGetAsEntry();
            if (item.isFile) {
                var files_2 = [];
                // tslint:disable-next-line
                (item).file(function (fileObj) {
                    var path = item.fullPath;
                    files_2.push({ 'path': path, 'file': fileObj });
                });
                this_1.renderSelectedFiles(event, files_2, true);
            }
            else if (item.isDirectory) {
                this_1.traverseFileTree(item, event);
            }
        };
        var this_1 = this;
        for (var i = 0; i < items.length; i++) {
            _loop_2(i);
        }
    };
    /* istanbul ignore next */
    Uploader.prototype.checkDirectoryUpload = function (items) {
        for (var i = 0; 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 */
    Uploader.prototype.traverseFileTree = function (item, event) {
        var _this = this;
        if (typeof (item) === 'boolean') {
            var files_3 = [];
            var _loop_3 = function (i) {
                this_2.filesEntries[i].file(function (fileObj) {
                    var path = _this.filesEntries[i].fullPath;
                    files_3.push({ 'path': path, 'file': fileObj });
                });
            };
            var this_2 = this;
            for (var i = 0; i < this.filesEntries.length; i++) {
                _loop_3(i);
            }
            this.renderSelectedFiles(event, files_3, true);
        }
        else if (item.isFile) {
            this.filesEntries.push(item);
        }
        else if (item.isDirectory) {
            // tslint:disable-next-line
            var directoryReader = item.createReader();
            // tslint:disable-next-line
            directoryReader.readEntries(function (entries) {
                for (var i = 0; i < entries.length; i++) {
                    _this.traverseFileTree(entries[i]);
                    // tslint:disable-next-line
                }
                ;
                _this.traverseFileTree(true);
                _this.filesEntries = [];
            });
        }
    };
    // tslint:enable
    Uploader.prototype.onSelectFiles = function (args) {
        if (!this.enabled) {
            return;
        }
        var targetFiles;
        /* istanbul ignore next */
        if (args.type === 'drop') {
            if (this.directoryUpload) {
                this.getFilesFromFolder(args);
            }
            else {
                var files = args.dataTransfer.files;
                targetFiles = this.multiple ? this.sortFileList(files) : [files[0]];
                this.renderSelectedFiles(args, targetFiles);
            }
        }
        else {
            targetFiles = [].slice.call(args.target.files);
            this.renderSelectedFiles(args, targetFiles);
        }
    };
    Uploader.prototype.renderSelectedFiles = function (args, 
    // tslint:disable-next-line
    targetFiles, directory, paste) {
        var _this = this;
        var eventArgs = {
            event: args,
            cancel: false,
            filesData: [],
            isModified: false,
            modifiedFilesData: [],
            progressInterval: '',
            isCanceled: false
        };
        /* 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];
            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'
            };
            /* 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';
                this.checkActionComplete(true);
            }
            fileData.push(fileDetails);
        }
        eventArgs.filesData = fileData;
        if (this.allowedExtensions.indexOf('*') > -1) {
            this.allTypes = true;
        }
        if (!this.allTypes) {
            fileData = this.checkExtension(fileData);
        }
        this.trigger('selected', eventArgs, function (eventArgs) {
            if (!eventArgs.cancel) {
                _this.selectedFiles = fileData;
                _this.btnTabIndex = _this.disableKeyboardNavigation ? '-1' : '0';
                if (_this.showFileList) {
                    if (eventArgs.isModified && eventArgs.modifiedFilesData.length > 0) {
                        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);
                        _this.filesData = _this.filesData.concat(fileData);
                        if (!_this.isForm || _this.allowUpload()) {
                            _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.autoUpload) {
                        _this.upload(_this.filesData, true);
                    }
                }
                _this.raiseActionComplete();
            }
        });
    };
    Uploader.prototype.allowUpload = function () {
        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;
    };
    Uploader.prototype.clearData = function (singleUpload) {
        if (!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;
        }
        if (this.browserName !== 'msie' && !singleUpload) {
            this.element.value = '';
        }
        this.fileList = [];
        this.filesData = [];
        this.removeActionButtons();
    };
    Uploader.prototype.updateSortedFileList = function (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');
            for (var _i = 0, removedList_1 = removedList; _i < removedList_1.length; _i++) {
                var item = removedList_1[_i];
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(item);
            }
            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);
        }
    };
    Uploader.prototype.isBlank = function (str) {
        return (!str || /^\s*$/.test(str));
    };
    Uploader.prototype.checkExtension = function (files) {
        var dropFiles = files;
        if (!this.isBlank(this.allowedExtensions)) {
            var allowedExtensions = [];
            var extensions = this.allowedExtensions.split(',');
            for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
                var extension = extensions_1[_i];
                allowedExtensions.push(extension.trim().toLocaleLowerCase());
            }
            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;
    };
    Uploader.prototype.validatedFileSize = function (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;
    };
    Uploader.prototype.isPreLoadFile = function (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;
    };
    Uploader.prototype.createCustomfileList = function (fileData) {
        this.createParentUL();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + 'Template', 'Template');
        for (var _i = 0, fileData_1 = fileData; _i < fileData_1.length; _i++) {
            var listItem = fileData_1[_i];
            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));
            var index = fileData.indexOf(listItem);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(fromElements, liElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'Template', 'Template');
            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);
        }
    };
    Uploader.prototype.createParentUL = function () {
        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);
        }
    };
    Uploader.prototype.createFileList = function (fileData) {
        this.createParentUL();
        if (this.template !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template)) {
            this.createCustomfileList(fileData);
        }
        else {
            for (var _i = 0, fileData_2 = fileData; _i < fileData_2.length; _i++) {
                var listItem = fileData_2[_i];
                var liElement = this.createElement('li', { className: FILE, attrs: { 'data-file-name': listItem.name } });
                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);
            }
        }
    };
    Uploader.prototype.getSlicedName = function (nameElement) {
        var text;
        text = nameElement.textContent;
        nameElement.dataset.tail = text.slice(text.length - 10);
    };
    Uploader.prototype.truncateName = function (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);
        }
    };
    Uploader.prototype.getFileType = function (name) {
        var extension;
        var index = name.lastIndexOf('.');
        if (index >= 0) {
            extension = name.substring(index + 1);
        }
        return extension ? extension : '';
    };
    Uploader.prototype.getFileNameOnly = function (name) {
        var type = this.getFileType(name);
        var names = name.split('.' + type);
        return type = names[0];
    };
    Uploader.prototype.setInitialAttributes = function () {
        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);
        }
    };
    Uploader.prototype.filterfileList = function (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;
    };
    Uploader.prototype.updateStatus = function (files, status, statusCode, updateLiStatus) {
        if (updateLiStatus === void 0) { updateLiStatus = true; }
        if (!(status === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(status)) && !(statusCode === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(statusCode))) {
            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;
    };
    Uploader.prototype.getLiElement = function (files) {
        var index;
        for (var i = 0; i < this.filesData.length; i++) {
            if (this.filesData[i].name === files.name) {
                index = i;
            }
        }
        return this.fileList[index];
    };
    Uploader.prototype.createProgressBar = function (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 */
    Uploader.prototype.updateProgressbar = function (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() + '%');
            }
        }
    };
    Uploader.prototype.changeProgressValue = function (li, progressValue) {
        li.querySelector('.' + PROGRESSBAR).setAttribute('style', 'width:' + progressValue);
        li.querySelector('.' + PROGRESSBAR_TEXT).textContent = progressValue;
    };
    Uploader.prototype.uploadInProgress = function (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 */
    Uploader.prototype.cancelUploadingFile = function (files, e, request, li) {
        var _this = 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_1 = _this.element.getAttribute('name');
                        formData.append(name_1, files.name);
                        formData.append('cancel-uploading', files.name);
                        var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](_this.asyncSettings.removeUrl, 'POST', true, null);
                        ajax.emitError = false;
                        ajax.onLoad = function (e) { _this.removecanceledFile(e, files); return {}; };
                        ajax.send(formData);
                    }
                }
            });
        }
    };
    Uploader.prototype.removecanceledFile = function (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);
    };
    Uploader.prototype.renderFailureState = function (e, file, liElement) {
        var _this = 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 } });
        liElement.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) { _this.reloadcanceledFile(e, file, liElement, false); }, false);
    };
    Uploader.prototype.reloadcanceledFile = function (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 */
    Uploader.prototype.uploadComplete = function (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);
        }
    };
    Uploader.prototype.getResponse = function (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;
    };
    Uploader.prototype.raiseSuccessEvent = function (e, file) {
        var _this = 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
        };
        this.trigger('success', args, function (args) {
            // tslint:disable-next-line
            _this.updateStatus(file, args.statusText, '2');
            _this.uploadedFilesData.push(file);
            _this.trigger('change', { file: _this.uploadedFilesData });
            _this.checkActionButtonStatus();
            if (_this.fileList.length > 0) {
                if ((!(_this.getLiElement(file)).classList.contains(RESTRICT_RETRY))) {
                    _this.uploadSequential();
                    _this.checkActionComplete(true);
                }
                else {
                    /* istanbul ignore next */
                    (_this.getLiElement(file)).classList.remove(RESTRICT_RETRY);
                }
            }
        });
    };
    Uploader.prototype.uploadFailed = function (e, file) {
        var _this = 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
            _this.updateStatus(file, args.statusText, '0');
            _this.checkActionButtonStatus();
            _this.uploadSequential();
            _this.checkActionComplete(true);
        });
    };
    Uploader.prototype.uploadSequential = function () {
        if (this.sequentialUpload) {
            if (this.autoUpload) {
                /* istanbul ignore next */
                this.checkAutoUpload(this.filesData);
            }
            else {
                this.uploadButtonClick();
            }
        }
    };
    Uploader.prototype.checkActionComplete = function (increment) {
        increment ? ++this.actionCompleteCount : --this.actionCompleteCount;
        this.raiseActionComplete();
    };
    Uploader.prototype.raiseActionComplete = function () {
        if ((this.filesData.length === this.actionCompleteCount) && this.flag) {
            this.flag = false;
            var eventArgs = {
                fileData: []
            };
            eventArgs.fileData = this.getSelectedFileStatus(this.selectedFiles);
            this.trigger('actionComplete', eventArgs);
        }
    };
    Uploader.prototype.getSelectedFileStatus = function (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;
    };
    Uploader.prototype.updateProgressBarClasses = function (li, className) {
        var progressBar = li.querySelector('.' + PROGRESSBAR);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(progressBar)) {
            progressBar.classList.add(className);
        }
    };
    Uploader.prototype.removeProgressbar = function (li, callType) {
        var _this = 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 () { _this.animateProgressBar(li, callType); }, 750);
        }
    };
    /* istanbul ignore next */
    Uploader.prototype.animateProgressBar = function (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));
        }
    };
    Uploader.prototype.setExtensions = function (extensions) {
        if (extensions !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(extensions)) {
            this.element.setAttribute('accept', extensions);
        }
        else {
            this.element.removeAttribute('accept');
        }
    };
    Uploader.prototype.templateComplier = function (uploadTemplate) {
        if (uploadTemplate) {
            var exception = void 0;
            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;
    };
    Uploader.prototype.setRTL = function () {
        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);
    };
    Uploader.prototype.localizedTexts = function (localeText) {
        this.l10n.setLocale(this.locale);
        return this.l10n.getConstant(localeText);
    };
    Uploader.prototype.setControlStatus = function () {
        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');
            }
        }
    };
    Uploader.prototype.checkHTMLAttributes = function (isDynamic) {
        var attributes = ['accept', 'multiple', 'disabled'];
        for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
            var prop = attributes_1[_i];
            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;
                        }
                }
            }
        }
    };
    Uploader.prototype.chunkUpload = function (file, custom) {
        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);
    };
    Uploader.prototype.sendRequest = function (file, metaData, custom) {
        var _this = this;
        var formData = new FormData();
        var blob = file.rawFile.slice(metaData.start, metaData.end);
        formData.append('chunkFile', 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) { _this.chunkUploadComplete(e, metaData, custom); return {}; };
        ajax.onUploadProgress = function (e) {
            _this.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;
            if (eventArgs.currentChunkIndex === 0) {
                // This event is currently not required but to avoid breaking changes for previous customer, we have included.
                _this.trigger('uploading', eventArgs, function (eventArgs) {
                    _this.uploadingEventCallback(formData, eventArgs, e, file);
                });
            }
            else {
                _this.trigger('chunkUploading', eventArgs, function (eventArgs) {
                    _this.uploadingEventCallback(formData, eventArgs, e, file);
                });
            }
        };
        /* istanbul ignore next */
        ajax.onError = function (e) { _this.chunkUploadFailed(e, metaData, custom); return {}; };
        ajax.send(formData);
        metaData.request = ajax;
    };
    Uploader.prototype.uploadingEventCallback = function (formData, eventArgs, e, file) {
        if (eventArgs.cancel) {
            this.eventCancelByArgs(e, eventArgs, file);
        }
        else {
            this.updateFormData(formData, eventArgs.customFormData);
        }
    };
    Uploader.prototype.eventCancelByArgs = function (e, eventArgs, file) {
        var _this = 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 } });
        liElement.insertBefore(this.pauseButton, liElement.querySelector('.' + REMOVE_ICON));
        this.pauseButton.setAttribute('title', this.localizedTexts('retry'));
        /* istanbul ignore next */
        this.pauseButton.addEventListener('click', function (e) { _this.reloadcanceledFile(e, file, liElement); }, false);
        this.checkActionButtonStatus();
    };
    Uploader.prototype.checkChunkUpload = function () {
        return (this.asyncSettings.chunkSize <= 0 || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.asyncSettings.chunkSize)) ? false : true;
    };
    Uploader.prototype.chunkUploadComplete = function (e, metaData, custom) {
        var _this = 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_1 = { event: e, fileData: metaData.file, cancel: false };
                this.trigger('canceling', eventArgs_1, 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'));
                        }
                        _this.sendNextRequest(metaData);
                    }
                    else {
                        metaData.request.emitError = false;
                        response.abort();
                        var formData = new FormData();
                        var name_2 = _this.element.getAttribute('name');
                        formData.append(name_2, 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"](_this.asyncSettings.removeUrl, 'POST', true, null);
                        ajax.emitError = false;
                        ajax.onLoad = function (e) { _this.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);
        }
    };
    Uploader.prototype.sendNextRequest = function (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);
    };
    Uploader.prototype.removeChunkFile = function (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'));
            }
        }
    };
    Uploader.prototype.pauseUpload = function (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);
    };
    Uploader.prototype.abortUpload = function (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);
    };
    Uploader.prototype.resumeUpload = function (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);
                }
            }
        }
    };
    Uploader.prototype.updateMetaData = function (metaData) {
        if (this.uploadMetaData.indexOf(metaData) === -1) {
            this.uploadMetaData.push(metaData);
        }
        else {
            this.uploadMetaData.splice(this.uploadMetaData.indexOf(metaData), 1);
            this.uploadMetaData.push(metaData);
        }
    };
    Uploader.prototype.removeChunkProgressBar = function (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);
            }
        }
    };
    Uploader.prototype.chunkUploadFailed = function (e, metaData, custom) {
        var _this = 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 < _this.asyncSettings.retryCount) {
                    setTimeout(function () { _this.retryRequest(liElement, metaData, custom); }, _this.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);
                        }
                        _this.updateProgressBarClasses(liElement, UPLOAD_FAILED);
                        _this.removeProgressbar(liElement, 'failure');
                        liElement.querySelector('.e-icons').classList.remove(UPLOAD_INPROGRESS);
                        var iconElement = liElement.querySelector('.' + ABORT_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', _this.localizedTexts('delete'));
                        }
                        else {
                            iconElement.classList.add(REMOVE_ICON);
                            iconElement.setAttribute('title', _this.localizedTexts('remove'));
                        }
                    }
                    metaData.retryCount = 0;
                    var file_1 = metaData.file;
                    var failureMessage = _this.localizedTexts('uploadFailedMessage');
                    var args = {
                        e: e, response: requestResponse,
                        operation: 'upload',
                        file: _this.updateStatus(file_1, failureMessage, '0', false),
                        statusText: failureMessage
                    };
                    _this.trigger('failure', args, function (args) {
                        // tslint:disable-next-line
                        _this.updateStatus(file_1, args.statusText, '0');
                        _this.uploadSequential();
                        _this.checkActionComplete(true);
                    });
                }
            }
        });
    };
    Uploader.prototype.retryRequest = function (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);
    };
    Uploader.prototype.checkPausePlayAction = function (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);
            }
        }
    };
    Uploader.prototype.retryUpload = function (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);
    };
    Uploader.prototype.chunkUploadInProgress = function (e, metaData, custom) {
        var _this = 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 target;
        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');
            }
            liElement.insertBefore(this.pauseButton, liElement.querySelector('.' + ABORT_ICON));
            this.pauseButton.setAttribute('title', this.localizedTexts('pause'));
            this.pauseButton.addEventListener('click', function (e) { _this.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
     */
    Uploader.prototype.bytesToSize = function (bytes) {
        var i = -1;
        var size;
        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 */
    Uploader.prototype.sortFileList = function (filesData) {
        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 index = 0;
        for (var _i = 0, sortedFileNames_1 = sortedFileNames; _i < sortedFileNames_1.length; _i++) {
            var name_3 = sortedFileNames_1[_i];
            for (var i = 0; i < files.length; i++) {
                if (name_3 === files[i].name) {
                    sortedFilesData.push(files[i]);
                }
            }
        }
        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}.
     */
    Uploader.prototype.destroy = function () {
        this.element.value = null;
        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 = ['aria-label', 'directory', 'webkitdirectory', 'tabindex'];
        for (var _i = 0, attributes_2 = attributes; _i < attributes_2.length; _i++) {
            var key = attributes_2[_i];
            this.element.removeAttribute(key);
        }
        this.uploadWrapper.parentElement.appendChild(this.element);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.uploadWrapper);
        this.uploadWrapper = null;
        _super.prototype.destroy.call(this);
    };
    /**
     * 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
     */
    Uploader.prototype.upload = function (files, custom) {
        var uploadFiles = this.validateFileType(files);
        this.uploadFiles(uploadFiles, custom);
    };
    Uploader.prototype.validateFileType = function (files) {
        var uploadFiles = [];
        if (files instanceof Array) {
            uploadFiles = files;
        }
        else {
            uploadFiles.push(files);
        }
        return uploadFiles;
    };
    Uploader.prototype.uploadFiles = function (files, custom) {
        var _this = this;
        var selectedFiles = [];
        if (this.asyncSettings.saveUrl === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.asyncSettings.saveUrl)) {
            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 chunkEnabled = this.checkChunkUpload();
        var _loop_4 = function (i) {
            var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](this_3.asyncSettings.saveUrl, 'POST', true, null);
            ajax.emitError = false;
            var eventArgs = {
                fileData: selectedFiles[i],
                customFormData: [],
                cancel: false
            };
            var formData = new FormData();
            ajax.beforeSend = function (e) {
                eventArgs.currentRequest = ajax.httpRequest;
                _this.trigger('uploading', eventArgs, function (eventArgs) {
                    if (eventArgs.cancel) {
                        _this.eventCancelByArgs(e, eventArgs, selectedFiles[i]);
                    }
                    _this.updateFormData(formData, eventArgs.customFormData);
                });
            };
            if (selectedFiles[i].statusCode === '1') {
                var name_4 = this_3.element.getAttribute('name');
                formData.append(name_4, selectedFiles[i].rawFile, selectedFiles[i].name);
                if (chunkEnabled && selectedFiles[i].size > this_3.asyncSettings.chunkSize) {
                    this_3.chunkUpload(selectedFiles[i], custom);
                }
                else {
                    ajax.onLoad = function (e) { _this.uploadComplete(e, selectedFiles[i], custom); return {}; };
                    ajax.onUploadProgress = function (e) {
                        _this.uploadInProgress(e, selectedFiles[i], custom, ajax);
                        return {};
                    };
                    /* istanbul ignore next */
                    ajax.onError = function (e) { _this.uploadFailed(e, selectedFiles[i]); return {}; };
                    ajax.send(formData);
                }
            }
        };
        var this_3 = this;
        for (var i = 0; i < selectedFiles.length; i++) {
            _loop_4(i);
        }
    };
    /**
     * 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.
     * @returns void
     */
    Uploader.prototype.remove = function (fileData, customTemplate, removeDirectly, args) {
        var _this = this;
        var eventArgs = {
            event: args,
            cancel: false,
            filesData: [],
            customFormData: [],
            postRawFile: true
        };
        var index;
        if (this.isForm && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.asyncSettings.removeUrl) || this.asyncSettings.removeUrl === '')) {
            eventArgs.filesData = this.getFilesData();
            this.trigger('removing', eventArgs, function (eventArgs) {
                if (!eventArgs.cancel) {
                    _this.clearAll();
                }
            });
        }
        else {
            var removeFiles = [];
            fileData = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fileData) ? fileData : this.filesData;
            if (fileData instanceof Array) {
                removeFiles = fileData;
            }
            else {
                removeFiles.push(fileData);
            }
            eventArgs.filesData = removeFiles;
            var removeUrl = this.asyncSettings.removeUrl;
            var validUrl = (removeUrl === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(removeUrl)) ? false : true;
            var _loop_5 = function (files) {
                index = this_4.filesData.indexOf(files);
                if ((files.statusCode === '2' || files.statusCode === '4') && validUrl) {
                    this_4.removeUploadedFile(files, eventArgs, removeDirectly, customTemplate);
                }
                else {
                    if (!removeDirectly) {
                        this_4.trigger('removing', eventArgs, function (eventArgs) {
                            if (!eventArgs.cancel) {
                                _this.removeFilesData(files, customTemplate);
                            }
                        });
                    }
                    else {
                        this_4.removeFilesData(files, customTemplate);
                    }
                }
                if (this_4.sequentialUpload) {
                    /* istanbul ignore next */
                    if (index <= this_4.actionCompleteCount) {
                        this_4.checkActionComplete(false);
                    }
                }
                else {
                    this_4.checkActionComplete(false);
                }
            };
            var this_4 = this;
            for (var _i = 0, removeFiles_1 = removeFiles; _i < removeFiles_1.length; _i++) {
                var files = removeFiles_1[_i];
                _loop_5(files);
            }
        }
    };
    /**
     * Clear all the file entries from list that can be uploaded files or added in upload queue.
     * @returns void
     */
    Uploader.prototype.clearAll = function () {
        var _this = this;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listParent)) {
            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) {
                _this.clearData();
                _this.actionCompleteCount = 0;
                _this.count = -1;
            }
        });
    };
    /**
     * Get the data of files which are shown in file list.
     * @returns FileInfo[]
     */
    Uploader.prototype.getFilesData = function () {
        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
     */
    Uploader.prototype.pause = function (fileData, custom) {
        var fileDataFiles = this.validateFileType(fileData);
        this.pauseUploading(fileDataFiles, custom);
    };
    Uploader.prototype.pauseUploading = function (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);
            }
        }
    };
    Uploader.prototype.getFiles = function (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
     */
    Uploader.prototype.resume = function (fileData, custom) {
        var fileDataFiles = this.validateFileType(fileData);
        this.resumeFiles(fileDataFiles, custom);
    };
    Uploader.prototype.resumeFiles = function (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
     */
    Uploader.prototype.retry = function (fileData, fromcanceledStage, custom) {
        var fileDataFiles = this.validateFileType(fileData);
        this.retryFailedFiles(fileDataFiles, fromcanceledStage, custom);
    };
    Uploader.prototype.retryFailedFiles = function (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
     */
    Uploader.prototype.cancel = function (fileData) {
        var cancelingFiles = this.validateFileType(fileData);
        this.cancelUpload(cancelingFiles);
    };
    Uploader.prototype.cancelUpload = function (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 i = 0; i < files.length; i++) {
                if (files[i].statusCode === '3') {
                    files[i].statusCode = '5';
                    files[i].status = this.localizedTexts('fileUploadCancel');
                    this.showHideUploadSpinner(files[i]);
                }
            }
        }
    };
    Uploader.prototype.showHideUploadSpinner = function (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);
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ saveUrl: '', removeUrl: '' }, AsyncSettings)
    ], Uploader.prototype, "asyncSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Uploader.prototype, "sequentialUpload", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})
    ], Uploader.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Uploader.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Uploader.prototype, "enabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Uploader.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Uploader.prototype, "multiple", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Uploader.prototype, "autoUpload", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, ButtonsProps)
    ], Uploader.prototype, "buttons", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Uploader.prototype, "allowedExtensions", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Uploader.prototype, "minFileSize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(30000000)
    ], Uploader.prototype, "maxFileSize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Uploader.prototype, "dropArea", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], FilesProp)
    ], Uploader.prototype, "files", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Uploader.prototype, "showFileList", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Uploader.prototype, "directoryUpload", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "actionComplete", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "rendering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "fileListRendering", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "selected", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "uploading", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "success", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "failure", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "removing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "clearing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "progress", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "chunkSuccess", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "chunkFailure", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "chunkUploading", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "canceling", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "pausing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Uploader.prototype, "resuming", void 0);
    Uploader = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Uploader);
    return Uploader;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-lists/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-lists/index.js ***!
  \*****************************************************/
/*! exports provided: classNames, FieldSettings, ListView, Virtualization, cssClass, ListBase, getFieldValues, Sortable, moveTo */
/***/ (function(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-lists/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "classNames", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["classNames"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FieldSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListView", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ListView"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Virtualization", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Virtualization"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cssClass", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["cssClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListBase", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ListBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFieldValues", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getFieldValues"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sortable", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Sortable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "moveTo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["moveTo"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-lists/src/common/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-lists/src/common/index.js ***!
  \****************************************************************/
/*! exports provided: cssClass, ListBase, getFieldValues */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _list_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list-base */ "./node_modules/@syncfusion/ej2-lists/src/common/list-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cssClass", function() { return _list_base__WEBPACK_IMPORTED_MODULE_0__["cssClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListBase", function() { return _list_base__WEBPACK_IMPORTED_MODULE_0__["ListBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFieldValues", function() { return _list_base__WEBPACK_IMPORTED_MODULE_0__["getFieldValues"]; });

/**
 * Listview Component
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-lists/src/common/list-base.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-lists/src/common/list-base.js ***!
  \********************************************************************/
/*! exports provided: cssClass, ListBase, getFieldValues */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.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'
};
/**
 * 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,
        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'
    };
    /**
     * 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;
        if (level) {
            ariaAttributes.level = level;
        }
        var child = [];
        var li;
        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) {
                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);
            }
            else {
                li = generateLI(createElement, curItem, fieldData, fields, curOpt.itemClass, options);
                li.classList.add(cssClass.level + '-' + ariaAttributes.level);
                li.setAttribute('aria-level', ariaAttributes.level.toString());
                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]);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([createElement('img', { className: cssClass.image, attrs: attr })], li.firstElementChild);
                }
                if (curOpt.showIcon && fieldData.hasOwnProperty(fields.iconCss) &&
                    !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[fields.iconCss]) && !curOpt.template) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([createElement('div', { className: cssClass.icon + ' ' + fieldData[fields.iconCss] })], li.firstElementChild);
                }
                if (innerEle.length) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])(innerEle, li.firstElementChild);
                }
                processSubChild(createElement, fieldData, fields, dataSource, curOpt, li, ariaAttributes.level);
            }
            if (curOpt.itemCreated && typeof curOpt.itemCreated === 'function') {
                var curData = {
                    dataSource: dataSource,
                    curData: dataSource[i],
                    text: fieldData[fields.text],
                    item: li,
                    options: curOpt,
                    fields: fields
                };
                curOpt.itemCreated(curData);
            }
            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, sortOrder) {
        if (sortOrder === void 0) { sortOrder = '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;
            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, query) {
        if (query === void 0) { query = 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 i_1 = 0; i_1 < childNodes.length; i_1++) {
                if (!(childNodes[Number(keys[i_1])]).hasChildNodes()) {
                    json[fields.text] = childNodes[Number(keys[i_1])].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 = {};
        var attr = element.attributes;
        for (var index = 0; index < attr.length; index++) {
            attributes[attr[index].nodeName] = attr[index].nodeValue;
        }
        return attributes;
    }
    /**
     * 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) {
        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;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(compiledString(curItem, null, null, currentID, !!curOpt.isStringTemplate), li);
                li.setAttribute('data-value', value);
                li.setAttribute('role', 'option');
            }
            if (curOpt.itemCreated && typeof curOpt.itemCreated === 'function') {
                var curData = {
                    dataSource: dataSource,
                    curData: curItem,
                    text: value,
                    item: li,
                    options: curOpt,
                    fields: curFields
                };
                curOpt.itemCreated(curData);
            }
            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;
        for (var _i = 0, headerItems_1 = headerItems; _i < headerItems_1.length; _i++) {
            var header = headerItems_1[_i];
            var headerData = {};
            headerData[category] = header.textContent;
            header.innerHTML = '';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(compiledString(headerData, null, null, curOpt.groupTemplateID, !!curOpt.isStringTemplate), header);
        }
        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 {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
                li.setAttribute('data-value', value);
            }
            li.setAttribute('role', 'option');
            if (dataSource && fieldData.hasOwnProperty(fields.htmlAttributes) && fieldData[fields.htmlAttributes]) {
                setAttribute(li, fieldData[fields.htmlAttributes]);
            }
            if (innerElements.length) {
                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));
            }
            else {
                li.appendChild(document.createTextNode(text));
            }
        }
        return li;
    }
    function getModuleClass(moduleName) {
        var moduleClass;
        return moduleClass = {
            li: "e-" + moduleName + "-item",
            ul: "e-" + moduleName + "-parent e-ul",
            group: "e-" + moduleName + "-group-item",
            icon: "e-" + moduleName + "-icon",
            text: "e-" + moduleName + "-text",
            check: "e-" + moduleName + "-check",
            checked: 'e-checked',
            selected: 'e-selected',
            expanded: 'e-expanded',
            textContent: 'e-text-content',
            hasChild: 'e-has-child',
            level: 'e-level',
            url: "e-" + moduleName + "-url",
            collapsible: 'e-icon-collapsible',
            disabled: 'e-disabled',
            image: "e-" + moduleName + "-img",
            iconWrapper: 'e-icon-wrapper'
        };
    }
    function anchorTag(createElement, dataSource, fields, text) {
        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 = createElement('a', { className: cssClass.text + ' ' + cssClass.url, innerHTML: text });
        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] || '';
            uID = fieldData[fields.id];
            grpLI = (item.hasOwnProperty('isHeader') && item.isHeader)
                ? true : false;
        }
        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());
        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, null, null, 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, null, null, 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));
            }
            else {
                innerDiv.appendChild(createElement('span', {
                    className: cssClass.text, innerHTML: text,
                    attrs: (ariaAttributes.itemText !== '' ? { role: ariaAttributes.itemText } : {})
                }));
            }
            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 _i = 0, _a = Object.keys(fields); _i < _a.length; _i++) {
            var field = _a[_i];
            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;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-lists/src/index.js":
/*!*********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-lists/src/index.js ***!
  \*********************************************************/
/*! exports provided: classNames, FieldSettings, ListView, Virtualization, cssClass, ListBase, getFieldValues, Sortable, moveTo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _list_view_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list-view/index */ "./node_modules/@syncfusion/ej2-lists/src/list-view/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "classNames", function() { return _list_view_index__WEBPACK_IMPORTED_MODULE_0__["classNames"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldSettings", function() { return _list_view_index__WEBPACK_IMPORTED_MODULE_0__["FieldSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListView", function() { return _list_view_index__WEBPACK_IMPORTED_MODULE_0__["ListView"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Virtualization", function() { return _list_view_index__WEBPACK_IMPORTED_MODULE_0__["Virtualization"]; });

/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common/index */ "./node_modules/@syncfusion/ej2-lists/src/common/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cssClass", function() { return _common_index__WEBPACK_IMPORTED_MODULE_1__["cssClass"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListBase", function() { return _common_index__WEBPACK_IMPORTED_MODULE_1__["ListBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFieldValues", function() { return _common_index__WEBPACK_IMPORTED_MODULE_1__["getFieldValues"]; });

/* harmony import */ var _sortable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sortable */ "./node_modules/@syncfusion/ej2-lists/src/sortable/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sortable", function() { return _sortable__WEBPACK_IMPORTED_MODULE_2__["Sortable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "moveTo", function() { return _sortable__WEBPACK_IMPORTED_MODULE_2__["moveTo"]; });

/**
 * List Components
 */





/***/ }),

/***/ "./node_modules/@syncfusion/ej2-lists/src/list-view/index.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-lists/src/list-view/index.js ***!
  \*******************************************************************/
/*! exports provided: classNames, FieldSettings, ListView, Virtualization */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _list_view__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list-view */ "./node_modules/@syncfusion/ej2-lists/src/list-view/list-view.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "classNames", function() { return _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldSettings", function() { return _list_view__WEBPACK_IMPORTED_MODULE_0__["FieldSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListView", function() { return _list_view__WEBPACK_IMPORTED_MODULE_0__["ListView"]; });

/* harmony import */ var _virtualization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./virtualization */ "./node_modules/@syncfusion/ej2-lists/src/list-view/virtualization.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Virtualization", function() { return _virtualization__WEBPACK_IMPORTED_MODULE_1__["Virtualization"]; });

/**
 * Listview Component
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-lists/src/list-view/list-view.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-lists/src/list-view/list-view.js ***!
  \***********************************************************************/
/*! exports provided: classNames, FieldSettings, ListView */
/***/ (function(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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _common_list_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/list-base */ "./node_modules/@syncfusion/ej2-lists/src/common/list-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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'
};
var LISTVIEW_TEMPLATE_PROPERTY = 'Template';
var LISTVIEW_GROUPTEMPLATE_PROPERTY = 'GroupTemplate';
var LISTVIEW_HEADERTEMPLATE_PROPERTY = 'HeaderTemplate';
var FieldSettings = /** @class */ (function (_super) {
    __extends(FieldSettings, _super);
    function FieldSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __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);
    return FieldSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Represents the EJ2 ListView control.
 * ```html
 * <div id="listview">
 * <ul>
 * <li>Favourite</li>
 * <li>Documents</li>
 * <li>Downloads</li>
 * </ul>
 * </div>
 * ```
 * ```typescript
 *   var lvObj = new ListView({});
 *   lvObj.appendTo("#listview");
 * ```
 */
var ListView = /** @class */ (function (_super) {
    __extends(ListView, _super);
    /**
     * Constructor for creating the widget
     */
    function ListView(options, element) {
        return _super.call(this, options, element) || this;
    }
    ListView.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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) {
                        this.virtualizationModule.reRenderUiVirtualization();
                    }
                    else {
                        this.reRender();
                    }
                    break;
                case 'headerTitle':
                    if (!this.curDSLevel.length) {
                        this.header(this.headerTitle, false);
                    }
                    break;
                case 'showHeader':
                    this.header(this.headerTitle, false);
                    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 (this.enableVirtualization) {
                        this.virtualizationModule.reRenderUiVirtualization();
                    }
                    else {
                        this.setCheckbox();
                    }
                    break;
                case 'dataSource':
                    if (this.enableVirtualization) {
                        this.virtualizationModule.reRenderUiVirtualization();
                    }
                    else {
                        this.reRender();
                    }
                    break;
                case 'sortOrder':
                case 'showIcon':
                    if (this.enableVirtualization) {
                        this.virtualizationModule.reRenderUiVirtualization();
                    }
                    else {
                        this.listBaseOption.showIcon = this.showIcon;
                        this.curViewDS = this.getSubDS();
                        this.resetCurrentList();
                    }
                    break;
                default:
                    break;
            }
        }
    };
    // Model Changes
    ListView.prototype.setHTMLAttribute = function () {
        if (Object.keys(this.htmlAttributes).length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, this.htmlAttributes);
        }
    };
    ListView.prototype.setCSSClass = function (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; }));
        }
    };
    ListView.prototype.setSize = function () {
        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;
    };
    ListView.prototype.setEnable = function () {
        this.enableElement(this.element, this.enable);
    };
    ListView.prototype.setEnableRTL = function () {
        if (this.enableRtl) {
            this.element.classList.add('e-rtl');
        }
        else {
            this.element.classList.remove('e-rtl');
        }
    };
    ListView.prototype.enableElement = function (element, isEnabled) {
        if (isEnabled) {
            element.classList.remove(classNames.disable);
        }
        else {
            element.classList.add(classNames.disable);
        }
    };
    //Suport Component Functions
    ListView.prototype.header = function (text, showBack) {
        if (this.headerEle === undefined && this.showHeader) {
            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({}, null, null, this.LISTVIEW_HEADERTEMPLATE_ID), headerTemplateEle);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([headerTemplateEle], this.headerEle);
                this.updateBlazorTemplates(false, 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);
                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
    ListView.prototype.switchView = function (fromView, toView, reverse) {
        var _this = this;
        if (fromView && toView) {
            var fPos_1 = fromView.style.position;
            var overflow_1 = (this.element.style.overflow !== 'hidden') ? this.element.style.overflow : '';
            fromView.style.position = 'absolute';
            fromView.classList.add('e-view');
            var anim = void 0;
            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 (model) {
                    fromView.style.display = 'none';
                    _this.element.style.overflow = overflow_1;
                    fromView.style.position = fPos_1;
                    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 () {
                    _this.trigger('actionComplete');
                }
            });
            this.curUL = toView;
        }
    };
    ListView.prototype.preRender = function () {
        this.listBaseOption = {
            template: this.template,
            headerTemplate: this.headerTemplate,
            groupTemplate: this.groupTemplate, expandCollapse: true, listClass: '',
            ariaAttributes: {
                itemRole: 'listitem', listRole: 'list', itemText: '',
                groupItemRole: 'group', wrapperRole: 'presentation'
            },
            fields: this.fields.properties, sortOrder: this.sortOrder, showIcon: this.showIcon,
            itemCreated: this.renderCheckbox.bind(this),
            templateID: "" + this.element.id + LISTVIEW_TEMPLATE_PROPERTY,
            groupTemplateID: "" + this.element.id + LISTVIEW_GROUPTEMPLATE_PROPERTY
        };
        this.initialization();
    };
    ListView.prototype.initialization = function () {
        this.curDSLevel = [];
        this.animateOptions = {};
        this.curViewDS = [];
        this.currentLiElements = [];
        this.isNestedList = false;
        this.selectedData = [];
        this.selectedId = [];
        this.LISTVIEW_TEMPLATE_ID = "" + this.element.id + LISTVIEW_TEMPLATE_PROPERTY;
        this.LISTVIEW_GROUPTEMPLATE_ID = "" + this.element.id + LISTVIEW_GROUPTEMPLATE_PROPERTY;
        this.LISTVIEW_HEADERTEMPLATE_ID = "" + this.element.id + LISTVIEW_HEADERTEMPLATE_PROPERTY;
        this.aniObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](this.animateOptions);
    };
    ListView.prototype.renderCheckbox = function (args) {
        if (args.item.classList.contains(classNames.hasChild)) {
            this.isNestedList = true;
        }
        if (this.showCheckBox && this.isValidLI(args.item)) {
            var checkboxElement = void 0;
            var fieldData = void 0;
            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_1 = 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 = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["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_1.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);
        }
    };
    ListView.prototype.checkInternally = function (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');
    };
    /**
     * It is used to check the checkbox of an item.
     * @param  {Fields | HTMLElement | Element} item - It accepts Fields or HTML list element as an argument.
     */
    ListView.prototype.checkItem = function (item) {
        this.toggleCheckBase(item, true);
    };
    ListView.prototype.toggleCheckBase = function (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);
        }
    };
    /**
     * It is used to uncheck the checkbox of an item.
     * @param  {Fields | HTMLElement | Element} item - It accepts Fields or HTML list element as an argument.
     */
    ListView.prototype.uncheckItem = function (item) {
        this.toggleCheckBase(item, false);
    };
    /**
     * It is used to check all the items in ListView.
     */
    ListView.prototype.checkAllItems = function () {
        this.toggleAllCheckBase(true);
    };
    /**
     * It is used to un-check all the items in ListView.
     */
    ListView.prototype.uncheckAllItems = function () {
        this.toggleAllCheckBase(false);
    };
    ListView.prototype.toggleAllCheckBase = function (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);
            }
        }
    };
    ListView.prototype.setCheckbox = function () {
        var _this = this;
        if (this.showCheckBox) {
            var liCollection = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.listItem));
            var args_1 = {
                item: undefined, curData: undefined, dataSource: undefined, fields: undefined,
                options: undefined, text: ''
            };
            liCollection.forEach(function (element) {
                args_1.item = element;
                args_1.curData = _this.getItemData(element);
                if (element.querySelector('.' + classNames.checkboxWrapper)) {
                    _this.removeElement(element.querySelector('.' + classNames.checkboxWrapper));
                }
                _this.renderCheckbox(args_1);
                if (args_1.item.classList.contains(classNames.selected)) {
                    _this.checkInternally(args_1, args_1.item.querySelector('.' + classNames.checkboxWrapper));
                }
            });
        }
        else {
            var liCollection = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.itemCheckList));
            liCollection.forEach(function (element) {
                element.classList.remove(classNames.selected);
                element.firstElementChild.classList.remove(classNames.checkbox);
                _this.removeElement(element.querySelector('.' + classNames.checkboxWrapper));
            });
            if (this.selectedItems) {
                this.selectedItems.item.classList.add(classNames.selected);
            }
        }
    };
    /**
     * It is used to refresh the UI list item height
     */
    ListView.prototype.refreshItemHeight = function () {
        this.virtualizationModule.refreshItemHeight();
    };
    ListView.prototype.clickHandler = function (e) {
        var target = e.target;
        var classList = target.classList;
        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);
            }
        }
    };
    ListView.prototype.removeElement = function (element) {
        return element && element.parentNode && element.parentNode.removeChild(element);
    };
    ListView.prototype.hoverHandler = function (e) {
        var curLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target.parentNode, '.' + classNames.listItem);
        this.setHoverLI(curLi);
    };
    ListView.prototype.leaveHandler = function (e) {
        this.removeHover();
    };
    ;
    ListView.prototype.homeKeyHandler = function (e, end) {
        if (Object.keys(this.dataSource).length && this.curUL) {
            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);
            }
        }
    };
    ListView.prototype.onArrowKeyDown = function (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 = _common_list_base__WEBPACK_IMPORTED_MODULE_3__["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 = _common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].getSiblingLI(this.curUL.querySelectorAll('.' + classNames.listItem), li, prev);
            this.setSelectLI(siblingLI, e);
        }
        return siblingLI;
    };
    ListView.prototype.arrowKeyHandler = function (e, prev) {
        var _this = 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 = void 0;
            var groupItemBounds = void 0;
            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 () {
                    _this.onArrowKeyDown(e, prev);
                    _this.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;
                }
            }
        }
    };
    ListView.prototype.enterKeyHandler = function (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);
            }
        }
    };
    ListView.prototype.spaceKeyHandler = function (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);
            }
        }
    };
    ListView.prototype.keyActionHandler = function (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;
        }
    };
    ListView.prototype.swipeActionHandler = function (e) {
        if (e.swipeDirection === 'Right') {
            if (this.showCheckBox && this.curDSLevel[this.curDSLevel.length - 1]) {
                this.uncheckAllItems();
            }
            this.back();
        }
    };
    ListView.prototype.focusout = function () {
        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);
                }
            }
        }
    };
    ListView.prototype.wireEvents = function () {
        _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) });
    };
    ListView.prototype.unWireEvents = function () {
        _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();
    };
    ListView.prototype.removeFocus = function () {
        var focusedLI = this.element.querySelectorAll('.' + classNames.focused);
        for (var _i = 0, focusedLI_1 = focusedLI; _i < focusedLI_1.length; _i++) {
            var ele = focusedLI_1[_i];
            ele.classList.remove(classNames.focused);
        }
    };
    ListView.prototype.removeHover = function () {
        var hoverLI = this.element.querySelector('.' + classNames.hover);
        if (hoverLI) {
            hoverLI.classList.remove(classNames.hover);
        }
    };
    ListView.prototype.removeSelect = function (li) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
            var selectedLI = this.element.querySelectorAll('.' + classNames.selected);
            for (var _i = 0, selectedLI_1 = selectedLI; _i < selectedLI_1.length; _i++) {
                var ele = selectedLI_1[_i];
                if (this.showCheckBox && ele.querySelector('.' + classNames.checked)) {
                    continue;
                }
                else {
                    ele.setAttribute('aria-selected', 'false');
                    ele.classList.remove(classNames.selected);
                }
            }
        }
        else {
            li.classList.remove(classNames.selected);
            li.setAttribute('aria-selected', 'false');
        }
    };
    ListView.prototype.isValidLI = function (li) {
        return (li && li.classList.contains(classNames.listItem)
            && !li.classList.contains(classNames.groupListItem)
            && !li.classList.contains(classNames.disable));
    };
    ListView.prototype.setCheckboxLI = function (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);
        }
    };
    ListView.prototype.selectEventData = function (li, e) {
        var data = this.getItemData(li);
        var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["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: Array.prototype.indexOf.call(this.curUL.children, li) });
        }
        return eventArgs;
    };
    ListView.prototype.setSelectedItemData = function (li) {
        var data = this.getItemData(li);
        var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["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
            };
        }
    };
    ListView.prototype.setSelectLI = function (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);
        }
    };
    ListView.prototype.setHoverLI = function (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
    ListView.prototype.getSubDS = function () {
        var levelKeys = this.curDSLevel;
        if (levelKeys.length) {
            var ds = this.localData;
            for (var _i = 0, levelKeys_1 = levelKeys; _i < levelKeys_1.length; _i++) {
                var key = levelKeys_1[_i];
                var field = {};
                field[this.fields.id] = key;
                this.curDSJSON = this.findItemFromDS(ds, field);
                var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["getFieldValues"])(this.curDSJSON, this.listBaseOption.fields);
                ds = this.curDSJSON ? fieldData[this.fields.child] : ds;
            }
            return ds;
        }
        return this.localData;
    };
    ListView.prototype.getItemData = function (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);
    };
    ListView.prototype.findItemFromDS = function (dataSource, fields, parent) {
        var _this = this;
        var resultJSON;
        if (dataSource && dataSource.length && fields) {
            dataSource.some(function (data) {
                var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["getFieldValues"])(data, _this.listBaseOption.fields);
                //(!(fid) || id === fid) && (!(ftext) || text === ftext) && (!!fid || !!ftext)
                if ((fields[_this.fields.id] || fields[_this.fields.text]) &&
                    (!fields[_this.fields.id] || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[_this.fields.id]) &&
                        fieldData[_this.fields.id].toString()) === fields[_this.fields.id].toString()) &&
                    (!fields[_this.fields.text] || fieldData[_this.fields.text] === fields[_this.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[_this.fields.id]) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[_this.fields.id])) {
                    var li = _this.element.querySelector('[data-uid="'
                        + fields[_this.fields.id] + '"]');
                    if (li && li.innerText.trim() === fieldData[_this.fields.text]) {
                        resultJSON = data;
                    }
                }
                else if (fieldData.hasOwnProperty(_this.fields.child) && fieldData[_this.fields.child].length) {
                    resultJSON = _this.findItemFromDS(fieldData[_this.fields.child], fields, parent);
                }
                return !!resultJSON;
            });
        }
        else {
            resultJSON = dataSource;
        }
        return resultJSON;
    };
    ListView.prototype.getQuery = function () {
        var columns = [];
        var query = (this.query ? this.query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]());
        if (!this.query) {
            for (var _i = 0, _a = Object.keys(this.fields.properties); _i < _a.length; _i++) {
                var column = _a[_i];
                if (column !== 'tableName' && !!(this.fields[column]) &&
                    this.fields[column] !==
                        _common_list_base__WEBPACK_IMPORTED_MODULE_3__["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;
    };
    ListView.prototype.setViewDataSource = function (dataSource) {
        if (dataSource === void 0) { dataSource = this.localData; }
        if (dataSource && this.fields.groupBy) {
            if (this.sortOrder !== 'None') {
                this.curViewDS = _common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].groupDataSource(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].getDataSource(dataSource, _common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].addSorting(this.sortOrder, this.fields.sortBy)), this.listBaseOption.fields, this.sortOrder);
            }
            else {
                this.curViewDS = _common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].groupDataSource(dataSource, this.listBaseOption.fields, this.sortOrder);
            }
        }
        else if (dataSource && this.sortOrder !== 'None') {
            this.curViewDS = _common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].getDataSource(dataSource, _common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].addSorting(this.sortOrder, this.fields.sortBy));
        }
        else {
            this.curViewDS = dataSource;
        }
    };
    ListView.prototype.isInAnimation = function () {
        return this.curUL.classList.contains('.e-animate');
    };
    ListView.prototype.setLocalData = function () {
        var _this = this;
        this.trigger('actionBegin');
        if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
            this.dataSource.executeQuery(this.getQuery()).then(function (e) {
                if (_this.isDestroyed) {
                    return;
                }
                _this.localData = e.result;
                _this.removeElement(_this.contentContainer);
                _this.renderList();
                _this.trigger('actionComplete', e);
            }).catch(function (e) {
                if (_this.isDestroyed) {
                    return;
                }
                _this.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: _common_list_base__WEBPACK_IMPORTED_MODULE_3__["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 });
        }
    };
    ListView.prototype.reRender = function () {
        this.resetBlazorTemplates();
        if (Object.keys(window).indexOf('ejsInterop') === -1) {
            this.element.innerHTML = '';
        }
        this.headerEle = this.ulElement = this.liCollection = undefined;
        this.setLocalData();
        this.header();
    };
    ListView.prototype.resetCurrentList = function () {
        this.resetBlazorTemplates();
        this.setViewDataSource(this.curViewDS);
        this.contentContainer.innerHTML = '';
        this.createList();
        this.renderIntoDom(this.curUL);
    };
    ListView.prototype.createList = function () {
        this.currentLiElements = [];
        this.isNestedList = false;
        this.ulElement = this.curUL = _common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].createList(this.createElement, this.curViewDS, this.listBaseOption);
        this.liCollection = this.curUL.querySelectorAll('.' + classNames.listItem);
        this.updateBlazorTemplates(true);
    };
    ListView.prototype.resetBlazorTemplates = function () {
        if (this.template) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.LISTVIEW_TEMPLATE_ID, LISTVIEW_TEMPLATE_PROPERTY);
        }
        if (this.groupTemplate) {
            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);
        }
    };
    ListView.prototype.updateBlazorTemplates = function (template, headerTemplate) {
        if (template === void 0) { template = false; }
        if (headerTemplate === void 0) { headerTemplate = false; }
        if (this.template && template && !this.enableVirtualization) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.LISTVIEW_TEMPLATE_ID, LISTVIEW_TEMPLATE_PROPERTY, this);
        }
        if (this.groupTemplate && template && !this.enableVirtualization) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.LISTVIEW_GROUPTEMPLATE_ID, LISTVIEW_GROUPTEMPLATE_PROPERTY, this);
        }
        if (this.headerTemplate && headerTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.LISTVIEW_HEADERTEMPLATE_ID, LISTVIEW_HEADERTEMPLATE_PROPERTY, this);
        }
    };
    ListView.prototype.renderSubList = function (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;
                this.resetBlazorTemplates();
                ele = _common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].createListFromJson(this.createElement, data, this.listBaseOption, this.curDSLevel.length);
                ele.setAttribute('pID', uID);
                ele.style.display = 'none';
                this.renderIntoDom(ele);
                this.updateBlazorTemplates(true);
            }
            this.switchView(ul, ele);
            this.liCollection = this.curUL.querySelectorAll('.' + classNames.listItem);
            if (this.selectedItems) {
                var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["getFieldValues"])(this.selectedItems.data, this.listBaseOption.fields);
                this.header((fieldData[this.listBaseOption.fields.text]), true);
            }
            this.selectedLI = undefined;
        }
    };
    ListView.prototype.renderIntoDom = function (ele) {
        this.contentContainer.appendChild(ele);
    };
    ListView.prototype.renderList = function (data) {
        this.setViewDataSource(data);
        if (this.enableVirtualization) {
            if (Object.keys(this.dataSource).length) {
                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);
        }
    };
    ListView.prototype.getElementUID = function (obj) {
        var fields = {};
        if (obj instanceof Element) {
            fields[this.fields.id] = obj.getAttribute('data-uid');
        }
        else {
            fields = obj;
        }
        return fields;
    };
    /**
     * It is used to Initialize the control rendering.
     */
    ListView.prototype.render = function () {
        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();
        this.rippleFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element, {
            selector: '.' + classNames.listItem
        });
    };
    /**
     * It is used to destroy the ListView component.
     */
    ListView.prototype.destroy = function () {
        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.rippleFn();
        this.element.removeAttribute('role');
        this.element.removeAttribute('tabindex');
        this.element.innerHTML = '';
        this.curUL = this.ulElement = this.liCollection = this.headerEle = undefined;
        _super.prototype.destroy.call(this);
    };
    /**
     * It helps to switch back from navigated sub list.
     */
    ListView.prototype.back = function () {
        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 {
            toUL = toUL.parentElement;
        }
        var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["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.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);
        this.header((this.curDSLevel.length ? text : this.headerTitle), (this.curDSLevel.length ? true : false));
    };
    /**
     * It is used to select the list item from the ListView.
     * @param  {Fields | HTMLElement | Element} obj - We can pass element Object or Fields as Object with ID and Text fields.
     */
    ListView.prototype.selectItem = function (obj) {
        if (this.enableVirtualization) {
            this.virtualizationModule.selectItem(obj);
        }
        else if (this.showCheckBox) {
            this.setCheckboxLI(this.getLiFromObjOrElement(obj));
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj) ? this.removeSelect() : this.setSelectLI(this.getLiFromObjOrElement(obj));
        }
    };
    ListView.prototype.getLiFromObjOrElement = function (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 = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["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 i = 0; i < curLi.length; i++) {
                            if (curLi[i].innerText.trim() === fieldData[this.fields.text]) {
                                li = curLi[i];
                            }
                        }
                    }
                }
            }
        }
        return li;
    };
    /**
     * It is used to select multiple list item from the ListView.
     * @param  {Fields[] | HTMLElement[] | Element[]} obj - We can pass array of elements or array of field Object with ID and Text fields.
     */
    ListView.prototype.selectMultipleItems = function (obj) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj)) {
            for (var i = 0; i < obj.length; i++) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj[i])) {
                    this.selectItem(obj[i]);
                }
            }
        }
    };
    ListView.prototype.getParentId = function () {
        var parentId = [];
        if (this.isNestedList) {
            for (var i = this.curDSLevel.length - 1; i >= 0; i--) {
                parentId.push(this.curDSLevel[i]);
            }
        }
        return parentId;
    };
    /**
     * It is used to get the currently [here](./api-selectedItem)
     *  item details from the list items.
     */
    ListView.prototype.getSelectedItems = function () {
        this.selectedId = [];
        var dataSource = this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ?
            this.localData : this.dataSource;
        if (this.enableVirtualization) {
            return this.virtualizationModule.getSelectedItems();
        }
        else if (this.showCheckBox) {
            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 = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["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') {
                return { item: liCollection, data: dataSource, text: liTextCollection };
            }
            if (this.isNestedList) {
                return { item: liCollection, data: dataParent, text: liTextCollection };
            }
            else {
                return { item: liCollection, data: liDataCollection, text: liTextCollection };
            }
        }
        else {
            var liElement = this.element.getElementsByClassName(classNames.selected)[0];
            var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["getFieldValues"])(this.getItemData(liElement), this.listBaseOption.fields);
            if (typeof dataSource[0] === 'string' || typeof dataSource[0] === 'number') {
                return (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) ? {
                    item: liElement, data: dataSource,
                    text: liElement.innerText.trim()
                } : undefined;
            }
            else {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
                    return undefined;
                }
                else {
                    this.selectedId.push(fieldData[this.listBaseOption.fields.id]);
                    return {
                        text: fieldData[this.listBaseOption.fields.text], item: liElement,
                        data: this.getItemData(liElement)
                    };
                }
            }
        }
    };
    /**
     * It is used to find out an item details from the current list.
     * @param  {Fields | HTMLElement | Element} obj - We can pass element Object or Fields as Object with ID and Text fields.
     */
    ListView.prototype.findItem = function (obj) {
        return this.getItemData(obj);
    };
    /**
     * A function that used to enable the disabled list items based on passed element.
     * @param  {Fields | HTMLElement | Element} obj - We can pass element Object or Fields as Object with ID and Text fields.
     */
    ListView.prototype.enableItem = function (obj) {
        this.setItemState(obj, true);
        if (this.enableVirtualization) {
            this.virtualizationModule.enableItem(obj);
        }
    };
    /**
     * It is used to disable the list items based on passed element.
     * @param  {Fields | HTMLElement | Element} obj - We can pass element Object or Fields as Object with ID and Text fields.
     */
    ListView.prototype.disableItem = function (obj) {
        this.setItemState(obj, false);
        if (this.enableVirtualization) {
            this.virtualizationModule.disableItem(obj);
        }
    };
    //A function that used to set state of the list item like enable, disable.
    ListView.prototype.setItemState = function (obj, isEnable) {
        var resultJSON = this.getItemData(obj);
        var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["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;
            }
        }
    };
    /**
     * It is used to show an list item from the ListView.
     * @param  {Fields | HTMLElement | Element} obj - We can pass element Object or Fields as Object with ID and Text fields.
     */
    ListView.prototype.showItem = function (obj) {
        this.showHideItem(obj, false, '');
        if (this.enableVirtualization) {
            this.virtualizationModule.showItem(obj);
        }
    };
    /**
     * It is used to hide an item from the ListView.
     * @param  {Fields | HTMLElement | Element} obj - We can pass element Object or Fields as Object with ID and Text fields.
     */
    ListView.prototype.hideItem = function (obj) {
        this.showHideItem(obj, true, 'none');
        if (this.enableVirtualization) {
            this.virtualizationModule.hideItem(obj);
        }
    };
    ListView.prototype.showHideItem = function (obj, isHide, display) {
        var resultJSON = this.getItemData(obj);
        var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["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];
            }
        }
    };
    /**
     * It adds new item to current ListView.
     * To add a new item in the list view, we need to pass ‘data’ as array or object and ‘fields’ as object.
     * For example fields: { text: 'Name', tooltip: 'Name', id:'id'}
     * @param  {{[key:string]:Object}[]} data - Array JSON Data that need to add.
     * @param  {Fields} fields - Fields as an Object with ID and Text fields.
     */
    ListView.prototype.addItem = function (data, fields) {
        var _this = this;
        if (fields === void 0) { fields = undefined; }
        if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"])) {
            if (data instanceof Array) {
                if (this.enableVirtualization) {
                    this.virtualizationModule.addItem(data, fields);
                }
                else {
                    var ds = this.findItemFromDS(this.dataSource, fields);
                    var fieldData = Object(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["getFieldValues"])(ds, this.listBaseOption.fields);
                    var child = fieldData[this.fields.child];
                    if (!child) {
                        child = [];
                    }
                    child = child.concat(data);
                    if (ds instanceof Array) {
                        this.resetBlazorTemplates();
                        data.forEach(function (dataSource) {
                            _this.dataSource.push(dataSource);
                            _this.setViewDataSource(_this.dataSource);
                            if (_this.ulElement) {
                                var index = _this.curViewDS.indexOf(dataSource);
                                _this.addListItem(dataSource, index);
                                var curViewDS = _this.curViewDS[index - 1];
                                if (curViewDS && curViewDS.isHeader && curViewDS.items.length === 1) {
                                    _this.addListItem(curViewDS, (index - 1));
                                }
                            }
                            else {
                                _this.reRender();
                            }
                        });
                        if (this.ulElement) {
                            this.updateBlazorTemplates(true);
                        }
                        this.liCollection = this.curUL.querySelectorAll('.' + classNames.listItem);
                    }
                    else {
                        ds[this.fields.child] = child;
                        this.reRender();
                    }
                }
            }
        }
    };
    ListView.prototype.addListItem = function (dataSource, index) {
        var target = this.getLiFromObjOrElement(this.curViewDS[index + 1]) ||
            this.getLiFromObjOrElement(this.curViewDS[index + 2]) || null;
        var li = _common_list_base__WEBPACK_IMPORTED_MODULE_3__["ListBase"].createListItemFromJson(this.createElement, [dataSource], this.listBaseOption);
        this.ulElement.insertBefore(li[0], target);
    };
    /**
     * A function that removes the item from data source based on passed element like fields: { text: 'Name', tooltip: 'Name', id:'id'}
     * @param  {Fields | HTMLElement | Element} obj - We can pass element Object or Fields as Object with ID and Text fields.
     */
    ListView.prototype.removeItem = function (obj) {
        if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"])) {
            if (this.enableVirtualization) {
                this.virtualizationModule.removeItem(obj);
            }
            else {
                this.resetBlazorTemplates();
                this.removeItemFromList(obj);
                this.updateBlazorTemplates(true);
            }
        }
    };
    ListView.prototype.removeItemFromList = function (obj) {
        var fields = obj instanceof Element ? this.getElementUID(obj) : obj;
        var dataSource;
        dataSource = this.findItemFromDS(this.dataSource, fields, true);
        if (dataSource) {
            var data = void 0;
            data = this.findItemFromDS(dataSource, fields);
            var index = this.curViewDS.indexOf(data);
            var li = this.getLiFromObjOrElement(obj);
            var groupLi = void 0;
            if (this.fields.groupBy && this.curViewDS[index - 1] &&
                this.curViewDS[index - 1].isHeader &&
                (this.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);
            }
            var dsIndex = dataSource.indexOf(data);
            dataSource.splice(dsIndex, 1);
            this.setViewDataSource(this.dataSource);
            this.liCollection = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.listItem));
        }
    };
    /**
     * A function that removes multiple item from list view based on given input.
     * @param  {Fields[] | HTMLElement[] | Element[]} obj - We can pass array of elements or array of field Object with ID and Text fields.
     */
    ListView.prototype.removeMultipleItems = function (obj) {
        if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"])) {
            if (obj.length) {
                this.resetBlazorTemplates();
                for (var i = 0; i < obj.length; i++) {
                    if (this.enableVirtualization) {
                        this.removeItem(obj[i]);
                    }
                    else {
                        this.removeItemFromList(obj[i]);
                    }
                }
                this.updateBlazorTemplates(true);
            }
        }
    };
    // Module Required function
    ListView.prototype.getModuleName = function () {
        return 'listview';
    };
    ListView.prototype.requiredModules = function () {
        var modules = [];
        if (this.enableVirtualization) {
            modules.push({ args: [this], member: 'virtualization' });
        }
        return modules;
    };
    /**
     * Get the properties to be maintained in the persisted state.
     */
    ListView.prototype.getPersistData = function () {
        return this.addOnPersist(['cssClass', 'enableRtl', 'htmlAttributes',
            'enable', 'fields', 'animation', 'headerTitle',
            'sortOrder', 'showIcon', 'height', 'width', 'showCheckBox', 'checkBoxPosition']);
    };
    __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"])(_common_list_base__WEBPACK_IMPORTED_MODULE_3__["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"])('')
    ], 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);
    return ListView;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-lists/src/list-view/virtualization.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-lists/src/list-view/virtualization.js ***!
  \****************************************************************************/
/*! exports provided: Virtualization */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Virtualization", function() { return Virtualization; });
/* harmony import */ var _list_view__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list-view */ "./node_modules/@syncfusion/ej2-lists/src/list-view/list-view.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_list_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/list-base */ "./node_modules/@syncfusion/ej2-lists/src/common/list-base.js");



var Virtualization = /** @class */ (function () {
    function Virtualization(instance) {
        this.listViewInstance = instance;
    }
    /**
     * For internal use only.
     * @private
     */
    Virtualization.prototype.isNgTemplate = function () {
        return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(this.listViewInstance.templateRef) && typeof this.listViewInstance.templateRef !== 'string'
            && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(this.listViewInstance.fields.groupBy);
    };
    /**
     * For internal use only.
     * @private
     */
    Virtualization.prototype.uiVirtualization = function () {
        var curViewDS = this.listViewInstance.curViewDS;
        var firstDs = curViewDS.slice(0, 1);
        this.listViewInstance.ulElement = this.listViewInstance.curUL = _common_list_base__WEBPACK_IMPORTED_MODULE_2__["ListBase"].createList(this.listViewInstance.createElement, firstDs, this.listViewInstance.listBaseOption);
        this.listViewInstance.contentContainer = this.listViewInstance.createElement('div', { className: _list_view__WEBPACK_IMPORTED_MODULE_0__["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;
        this.wireScrollEvent(false);
        var otherDs = curViewDS.slice(1, this.domItemCount);
        var listItems = _common_list_base__WEBPACK_IMPORTED_MODULE_2__["ListBase"].createListItemFromJson(this.listViewInstance.createElement, otherDs, this.listViewInstance.listBaseOption);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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;
        this.listDiff = 0;
        this.uiIndicesInitialization();
    };
    Virtualization.prototype.wireScrollEvent = function (destroy) {
        if (!destroy) {
            if (this.listViewInstance.isWindow) {
                this.onVirtualScroll = this.onVirtualUiScroll.bind(this);
                window.addEventListener('scroll', this.onVirtualScroll);
            }
            else {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].add(this.listViewInstance.element, 'scroll', this.onVirtualUiScroll, this);
            }
        }
        else {
            this.listViewInstance.isWindow ? window.removeEventListener('scroll', this.onVirtualScroll) :
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].remove(this.listViewInstance.element, 'scroll', this.onVirtualUiScroll);
        }
    };
    Virtualization.prototype.ValidateItemCount = function (dataSourceLength) {
        var itemCount = this.listViewInstance.isWindow ? Math.round((window.innerHeight / this.listItemHeight) * 3) :
            Math.round((this.listViewInstance.height / this.listItemHeight) * 1.5);
        if (itemCount > dataSourceLength) {
            itemCount = dataSourceLength;
        }
        return itemCount;
    };
    Virtualization.prototype.uiIndicesInitialization = function () {
        var _this = this;
        this.uiIndices = { 'activeIndices': [], 'disabledItemIndices': [], 'hiddenItemIndices': [] };
        this.listViewInstance.curViewDS.forEach(function (ds, index) {
            if (_this.listViewInstance.showCheckBox && ds[_this.listViewInstance.fields.isChecked]) {
                _this.uiIndices.activeIndices.push(index);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(ds[_this.listViewInstance.fields.enabled]) && !ds[_this.listViewInstance.fields.enabled]) {
                _this.uiIndices.disabledItemIndices.push(index);
            }
        });
        if (this.isNgTemplate()) {
            Array.prototype.forEach.call(this.listViewInstance.element.querySelectorAll('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listItem), function (item, index) {
                item.context = _this.listViewInstance.viewContainerRef._embeddedViews[index].context;
            });
        }
    };
    Virtualization.prototype.refreshItemHeight = function () {
        if (this.listViewInstance.curViewDS.length) {
            var curViewDS = this.listViewInstance.curViewDS;
            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';
        }
    };
    Virtualization.prototype.getscrollerHeight = function (startingHeight) {
        return this.listViewInstance.isWindow ? (((pageYOffset - startingHeight) <= 0) ? 0 :
            (pageYOffset - startingHeight)) : ((this.listViewInstance.element.scrollTop - startingHeight) <= 0) ? 0 :
            (this.listViewInstance.element.scrollTop - startingHeight);
    };
    Virtualization.prototype.onVirtualUiScroll = function () {
        var _a;
        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_1__["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;
        _a = scroll <= this.totalHeight ?
            [this.topElementHeight, this.bottomElementHeight] : [this.totalHeight, 0], this.topElementHeight = _a[0], this.bottomElementHeight = _a[1];
        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 listDiff = Math.round((this.listDiff - (this.topElementHeight / this.listItemHeight)));
                if (listDiff > (this.expectedDomItemCount + 5)) {
                    this.onLongScroll(listDiff, false);
                }
                else {
                    this.onNormalScroll(listDiff, false);
                }
            }
            this.listDiff = Math.round(this.topElementHeight / this.listItemHeight);
            if (typeof this.listViewInstance.onUIScrolled === 'function') {
                this.listViewInstance.onUIScrolled();
            }
        }
        this.scrollPosition = scroll;
    };
    Virtualization.prototype.onLongScroll = function (listDiff, isScrollingDown) {
        var _this = this;
        var index = isScrollingDown ? (this.uiFirstIndex + listDiff) : (this.uiFirstIndex - listDiff);
        Array.prototype.forEach.call(this.listViewInstance.ulElement.querySelectorAll('li'), function (element) {
            _this.updateUI(element, index);
            index++;
        });
        this.uiLastIndex = isScrollingDown ? (this.uiLastIndex + listDiff) : (this.uiLastIndex - listDiff);
        this.uiFirstIndex = isScrollingDown ? (this.uiFirstIndex + listDiff) : (this.uiFirstIndex - listDiff);
    };
    Virtualization.prototype.onNormalScroll = function (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 i = 0; i < listDiff; i++) {
                var index = --this.uiFirstIndex;
                var target = this.topElement.nextSibling;
                this.updateUI(this.bottomElement.previousElementSibling, index, target);
                this.uiLastIndex--;
            }
        }
    };
    Virtualization.prototype.updateUiContent = function (element, index) {
        var curViewDs = this.listViewInstance.curViewDS;
        if (typeof this.listViewInstance.dataSource[0] === 'string' ||
            typeof this.listViewInstance.dataSource[0] === 'number') {
            element.dataset.uid = _common_list_base__WEBPACK_IMPORTED_MODULE_2__["ListBase"].generateId();
            element.getElementsByClassName(_list_view__WEBPACK_IMPORTED_MODULE_0__["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() : _common_list_base__WEBPACK_IMPORTED_MODULE_2__["ListBase"].generateId();
            element.getElementsByClassName(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listItemText)[0].innerHTML =
                curViewDs[index][this.listViewInstance.fields.text].toString();
        }
        if (this.listViewInstance.showIcon) {
            if (element.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listIcon)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["detach"])(element.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listIcon));
            }
            if (this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]) {
                var textContent = element.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].textContent);
                var target = this.listViewInstance.createElement('div', {
                    className: _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listIcon + ' ' +
                        this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]
                });
                textContent.insertBefore(target, element.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listItemText));
            }
        }
        if (this.listViewInstance.showCheckBox && this.listViewInstance.fields.groupBy) {
            if (!this.checkListWrapper) {
                this.checkListWrapper = this.listViewInstance.curUL.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checkboxWrapper).cloneNode(true);
            }
            var textContent = element.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].textContent);
            if (this.listViewInstance.curViewDS[index].isHeader) {
                if (element.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checkboxWrapper)) {
                    element.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checklist);
                    textContent.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checkbox);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["detach"])(element.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checkboxWrapper));
                }
            }
            else {
                if (!element.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checkboxWrapper)) {
                    element.classList.add(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checklist);
                    textContent.classList.add(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checkbox);
                    textContent.insertBefore(this.checkListWrapper.cloneNode(true), element.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listItemText));
                }
            }
        }
    };
    Virtualization.prototype.changeElementAttributes = function (element, index) {
        element.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].disable);
        if (this.uiIndices.disabledItemIndices.length && this.uiIndices.disabledItemIndices.indexOf(index) !== -1) {
            element.classList.add(_list_view__WEBPACK_IMPORTED_MODULE_0__["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('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checkboxWrapper);
            element.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].selected);
            element.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].focused);
            if (checklistElement) {
                checklistElement.removeAttribute('aria-checked');
                checklistElement.firstElementChild.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checked);
            }
            if (this.uiIndices.activeIndices.length && this.uiIndices.activeIndices.indexOf(index) !== -1 &&
                !this.listViewInstance.curUL.querySelector(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].selected)) {
                element.classList.add(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].selected);
                checklistElement.firstElementChild.classList.add(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checked);
                checklistElement.setAttribute('aria-checked', 'true');
                if (this.activeIndex === index) {
                    element.classList.add(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].focused);
                }
            }
        }
        else {
            element.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].selected);
            element.removeAttribute('aria-selected');
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(this.activeIndex) && this.activeIndex === index &&
                !this.listViewInstance.curUL.querySelector(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].selected)) {
                element.classList.add(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].selected);
                element.setAttribute('aria-selected', 'true');
            }
        }
        if (this.listViewInstance.fields.groupBy) {
            if (this.listViewInstance.curViewDS[index].isHeader) {
                if (element.classList.contains(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listItem)) {
                    element.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listItem);
                    element.setAttribute('role', 'group');
                    element.classList.add(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].groupListItem);
                }
            }
            else {
                if (element.classList.contains(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].groupListItem)) {
                    element.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].groupListItem);
                    element.setAttribute('role', 'listitem');
                    element.classList.add(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].listItem);
                }
            }
        }
    };
    Virtualization.prototype.findDSAndIndexFromId = function (ds, fields) {
        var _this = this;
        var resultJSON = {};
        fields = this.listViewInstance.getElementUID(fields);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(fields)) {
            ds.some(function (data, index) {
                if ((fields[_this.listViewInstance.fields.id] &&
                    fields[_this.listViewInstance.fields.id].toString()
                        === (data[_this.listViewInstance.fields.id] && data[_this.listViewInstance.fields.id].toString())) || fields === data) {
                    resultJSON.index = index;
                    resultJSON.data = data;
                    return true;
                }
                else {
                    return false;
                }
            });
        }
        return resultJSON;
    };
    Virtualization.prototype.getSelectedItems = function () {
        var _this = this;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(this.activeIndex) || (this.listViewInstance.showCheckBox && this.uiIndices.activeIndices.length)) {
            var dataCollection_1 = [];
            var textCollection_1 = [];
            if (typeof this.listViewInstance.dataSource[0] === 'string' ||
                typeof this.listViewInstance.dataSource[0] === 'number') {
                var curViewDS_1 = this.listViewInstance.curViewDS;
                if (this.listViewInstance.showCheckBox) {
                    this.uiIndices.activeIndices.forEach(function (index) {
                        dataCollection_1.push(curViewDS_1[index]);
                    });
                    return {
                        text: dataCollection_1,
                        data: dataCollection_1,
                        index: this.uiIndices.activeIndices.map(function (index) {
                            return _this.listViewInstance.dataSource.indexOf(curViewDS_1[index]);
                        })
                    };
                }
                else {
                    return {
                        text: curViewDS_1[this.activeIndex],
                        data: curViewDS_1[this.activeIndex],
                        index: this.listViewInstance.dataSource.indexOf(curViewDS_1[this.activeIndex])
                    };
                }
            }
            else {
                var curViewDS_2 = this.listViewInstance.curViewDS;
                var text_1 = this.listViewInstance.fields.text;
                if (this.listViewInstance.showCheckBox) {
                    this.uiIndices.activeIndices.forEach(function (index) {
                        textCollection_1.push(curViewDS_2[index][text_1]);
                        dataCollection_1.push(curViewDS_2[index]);
                    });
                    return {
                        text: textCollection_1,
                        data: dataCollection_1,
                        index: this.uiIndices.activeIndices.map(function (index) {
                            return (_this.listViewInstance.dataSource).indexOf(curViewDS_2[index]);
                        })
                    };
                }
                else {
                    return {
                        text: curViewDS_2[this.activeIndex][this.listViewInstance.fields.text],
                        data: curViewDS_2[this.activeIndex],
                        index: this.listViewInstance.dataSource.indexOf(curViewDS_2[this.activeIndex])
                    };
                }
            }
        }
        else {
            return undefined;
        }
    };
    Virtualization.prototype.selectItem = function (obj) {
        var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
        if (Object.keys(resutJSON).length) {
            var isSelected = this.activeIndex === resutJSON.index;
            var isChecked = void 0;
            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('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].focused)) {
                    this.listViewInstance.curUL.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].focused).classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["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 = void 0;
                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_1__["isNullOrUndefined"])(obj) && !this.listViewInstance.showCheckBox) {
            this.listViewInstance.removeSelect();
            this.activeIndex = undefined;
        }
    };
    Virtualization.prototype.enableItem = function (obj) {
        var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
        if (Object.keys(resutJSON).length) {
            this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(resutJSON.index), 1);
        }
    };
    Virtualization.prototype.disableItem = function (obj) {
        var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
        if (Object.keys(resutJSON).length && this.uiIndices.disabledItemIndices.indexOf(resutJSON.index) === -1) {
            this.uiIndices.disabledItemIndices.push(resutJSON.index);
        }
    };
    Virtualization.prototype.showItem = function (obj) {
        var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
        if (Object.keys(resutJSON).length) {
            this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index), 1);
        }
    };
    Virtualization.prototype.hideItem = function (obj) {
        var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
        if (Object.keys(resutJSON).length && this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index) === -1) {
            this.uiIndices.hiddenItemIndices.push(resutJSON.index);
        }
    };
    Virtualization.prototype.removeItem = function (obj) {
        var dataSource;
        var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
        if (Object.keys(resutJSON).length) {
            dataSource = resutJSON.data;
            if (this.listViewInstance.curViewDS[resutJSON.index - 1] &&
                this.listViewInstance.curViewDS[resutJSON.index - 1].isHeader &&
                (this.listViewInstance.curViewDS[resutJSON.index - 1])
                    .items.length === 1) {
                this.removeUiItem(resutJSON.index - 1);
                this.removeUiItem(resutJSON.index - 1);
            }
            else {
                this.removeUiItem(resutJSON.index);
            }
        }
        var index = this.listViewInstance.dataSource.indexOf(dataSource);
        if (index !== -1) {
            this.listViewInstance.dataSource.splice(index, 1);
            this.listViewInstance.setViewDataSource(this.listViewInstance.dataSource);
        }
        // recollect all the list item into collection
        this.listViewInstance.liCollection =
            this.listViewInstance.curUL.querySelectorAll('li');
    };
    Virtualization.prototype.setCheckboxLI = function (li, e) {
        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(_list_view__WEBPACK_IMPORTED_MODULE_0__["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);
        }
    };
    Virtualization.prototype.setSelectLI = function (li, e) {
        this.activeIndex = Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll('li'), li) + this.uiFirstIndex;
    };
    Virtualization.prototype.checkedItem = function (checked) {
        var _this = this;
        if (checked) {
            this.uiIndices.activeIndices = [];
            this.activeIndex = undefined;
            this.listViewInstance.curViewDS.forEach(function (ds, index) {
                if (!ds.isHeader) {
                    _this.uiIndices.activeIndices.push(index);
                }
            });
        }
        else {
            this.activeIndex = undefined;
            this.uiIndices.activeIndices = [];
        }
    };
    Virtualization.prototype.addUiItem = function (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 = void 0;
            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);
    };
    Virtualization.prototype.removeUiItem = function (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_1__["detach"])(liItem);
                this.domItemCount--;
                this.uiLastIndex--;
                this.totalHeight = 0;
            }
            else {
                if (liItem.classList.contains(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].disable)) {
                    liItem.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["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(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].selected)) {
                    this.listViewInstance.removeSelect();
                    this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(index), 1);
                    var checklistElement = liItem.querySelector('.' + _list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checkboxWrapper);
                    checklistElement.removeAttribute('aria-checked');
                    checklistElement.firstElementChild.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].checked);
                    if (liItem.classList.contains(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].focused)) {
                        liItem.classList.remove(_list_view__WEBPACK_IMPORTED_MODULE_0__["classNames"].focused);
                        this.activeIndex = undefined;
                    }
                }
                else if (liItem.classList.contains(_list_view__WEBPACK_IMPORTED_MODULE_0__["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);
    };
    Virtualization.prototype.changeUiIndices = function (index, increment) {
        var _this = this;
        Object.keys(this.uiIndices).forEach(function (key) {
            _this.uiIndices[key] = _this.uiIndices[key].map(function (i) {
                if (i >= index) {
                    return increment ? ++i : --i;
                }
                else {
                    return i;
                }
            });
        });
    };
    Virtualization.prototype.addItem = function (data, fields) {
        var _this = this;
        data.forEach(function (dataSource) {
            // push the given data to main data array
            _this.listViewInstance.dataSource.push(dataSource);
            // recalculate all the group data or other datasource related things
            _this.listViewInstance.setViewDataSource(_this.listViewInstance.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(_this.listViewInstance.dataSource, fields);
                if (ds instanceof Array) {
                    if (_this.listViewInstance.ulElement) {
                        var index = _this.listViewInstance.curViewDS.indexOf(dataSource);
                        // inject new list item into DOM
                        _this.createAndInjectNewItem(dataSource, 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 index = _this.listViewInstance.curViewDS.indexOf(dataSource);
                // virtually new add list item based on the scollbar position
                _this.addUiItem(index);
                // check for group header item needs to be added
                var curViewDS = _this.listViewInstance.curViewDS[index - 1];
                if (curViewDS && curViewDS.isHeader && curViewDS.items.length === 1) {
                    _this.addUiItem(index - 1);
                }
            }
        });
    };
    Virtualization.prototype.createAndInjectNewItem = function (itemData, index) {
        // generate li item for given datasource
        var target;
        var li = _common_list_base__WEBPACK_IMPORTED_MODULE_2__["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();
    };
    Virtualization.prototype.createUIItem = function (args) {
        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>';
        template.innerHTML = this.listViewInstance.template || commonTemplate;
        var templateElements = template.getElementsByTagName('*');
        var groupTemplate = this.listViewInstance.createElement('div');
        if (this.listViewInstance.fields.groupBy) {
            groupTemplate.innerHTML = this.listViewInstance.groupTemplate || commonTemplate;
        }
        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 i = 0; i < groupTemplateElements.length; i++) {
            this.compileTemplate(groupTemplateElements[i], 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);
    };
    Virtualization.prototype.compileTemplate = function (element, item, isHeader) {
        this.textProperty(element, item, isHeader);
        this.classProperty(element, item, isHeader);
        this.attributeProperty(element, item, isHeader);
    };
    Virtualization.prototype.onChange = function (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_1__["isNullOrUndefined"])(newData.isHeader) && newData.isHeader && listElement.context.type === 'groupList') {
            var element = listElement.firstElementChild;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["detach"])(listElement.firstElementChild);
            listElement.insertBefore(listElement.context.template, null);
            listElement.context.template = element;
            listElement.context.type = 'flatList';
            groupTemplateNodes.forEach(function (node) { return node.onChange(newData); });
        }
        else if (!newData.isHeader && listElement.context.type === 'flatList') {
            var element = listElement.firstElementChild;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["detach"])(listElement.firstElementChild);
            listElement.insertBefore(listElement.context.template, null);
            listElement.context.template = element;
            listElement.context.type = 'groupList';
            flatTemplateNodes.forEach(function (node) { return node.onChange(newData); });
        }
        else if (!newData.isHeader) {
            flatTemplateNodes.forEach(function (node) { return node.onChange(newData); });
        }
        else {
            groupTemplateNodes.forEach(function (node) { return node.onChange(newData); });
        }
    };
    Virtualization.prototype.updateContextData = function (listElement, node, isHeader) {
        if (isHeader) {
            listElement.context.nodes.groupTemplateNodes.push(node);
        }
        else {
            listElement.context.nodes.flatTemplateNodes.push(node);
        }
    };
    Virtualization.prototype.classProperty = function (element, listElement, isHeader) {
        var _this = 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) {
            resultantOutput.forEach(function (classNameMatch) {
                var classFunction;
                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(_this.headerData);
                }
                else {
                    subNode.bindedvalue = classFunction(_this.templateData);
                }
                subNode.onChange = function (value) {
                    if (subNode.bindedvalue) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["removeClass"])([element], subNode.bindedvalue.split(' ').filter(function (css) { return css; }));
                    }
                    var newCss = classFunction(value);
                    if (newCss) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["addClass"])([element], (newCss).split(' ').filter(function (css) { return css; }));
                    }
                    subNode.bindedvalue = newCss;
                };
                classNameMatch[0].split(' ').forEach(function (className) {
                    element.classList.remove(className);
                });
                if (subNode.bindedvalue) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["addClass"])([element], subNode.bindedvalue.split(' ').filter(function (css) { return css; }));
                }
                _this.updateContextData(listElement, subNode, isHeader);
            });
        }
    };
    Virtualization.prototype.attributeProperty = function (element, listElement, isHeader) {
        var _this = 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);
        }
        attributeNames.forEach(function (attributeName) {
            var attrNameMatch = new RegExp('\\${([^}]*)}', 'g').exec(attributeName) || [];
            var attrValueMatch = new RegExp('\\${([^}]*)}', 'g').exec(element.getAttribute(attributeName))
                || [];
            var attributeNameFunction;
            var attributeValueFunction;
            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_1 = {};
                if (isHeader) {
                    subNode_1.bindedvalue = [attrNameMatch[1] === undefined ? undefined : attributeNameFunction(_this.headerData),
                        attrValueMatch[1] === undefined ? undefined : attributeValueFunction(_this.headerData)];
                }
                else {
                    subNode_1.bindedvalue = [attrNameMatch[1] === undefined ? undefined : attributeNameFunction(_this.templateData),
                        attrValueMatch[1] === undefined ? undefined : attributeValueFunction(_this.templateData)];
                }
                subNode_1.attrName = subNode_1.bindedvalue[0] === undefined ?
                    attributeName : subNode_1.bindedvalue[0];
                subNode_1.onChange = function (value) {
                    var bindedvalue = subNode_1.bindedvalue[1] === undefined ?
                        element.getAttribute(subNode_1.attrName) : attributeValueFunction(value);
                    element.removeAttribute(subNode_1.attrName);
                    subNode_1.attrName = subNode_1.bindedvalue[0] === undefined ? subNode_1.attrName : attributeNameFunction(value);
                    element.setAttribute(subNode_1.attrName, bindedvalue);
                    subNode_1.bindedvalue = [subNode_1.bindedvalue[0] === undefined ? undefined : attributeNameFunction(value),
                        subNode_1.bindedvalue[1] === undefined ? undefined : attributeValueFunction(value)];
                };
                var attributeValue = subNode_1.bindedvalue[1] === undefined ? element.getAttribute(attributeName) :
                    subNode_1.bindedvalue[1];
                element.removeAttribute(attributeName);
                element.setAttribute(subNode_1.attrName, attributeValue);
                _this.updateContextData(listElement, subNode_1, isHeader);
            }
        });
    };
    Virtualization.prototype.textProperty = function (element, listElement, isHeader) {
        var _this = 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) {
            resultantOutput.forEach(function (textPropertyMatch) {
                var subNode = {};
                var textFunction;
                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(_this.headerData);
                }
                else {
                    subNode.bindedvalue = textFunction(_this.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);
                _this.updateContextData(listElement, subNode, isHeader);
            });
        }
    };
    Virtualization.prototype.reRenderUiVirtualization = function () {
        this.wireScrollEvent(true);
        if (this.listViewInstance.contentContainer) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["detach"])(this.listViewInstance.contentContainer);
        }
        this.listViewInstance.preRender();
        this.listViewInstance.localData = this.listViewInstance.dataSource;
        // 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.renderList();
    };
    Virtualization.prototype.updateUI = function (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() : _common_list_base__WEBPACK_IMPORTED_MODULE_2__["ListBase"].generateId();
            onChange(curViewDS, element, this);
        }
        else {
            this.updateUiContent(element, index);
        }
        this.changeElementAttributes(element, index);
        if (targetElement) {
            this.listViewInstance.ulElement.insertBefore(element, targetElement);
        }
    };
    Virtualization.prototype.onNgChange = function (newData, listElement, virtualThis) {
        // compile given target element with template for new data
        var templateCompiler = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["compile"])(virtualThis.listViewInstance.template);
        var resultElement = templateCompiler(newData);
        while (listElement.lastChild) {
            listElement.removeChild(listElement.lastChild);
        }
        listElement.appendChild(resultElement[0]);
    };
    Virtualization.prototype.getModuleName = function () {
        return 'virtualization';
    };
    Virtualization.prototype.destroy = function () {
        this.wireScrollEvent(true);
    };
    return Virtualization;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-lists/src/sortable/index.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-lists/src/sortable/index.js ***!
  \******************************************************************/
/*! exports provided: Sortable, moveTo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _sortable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sortable */ "./node_modules/@syncfusion/ej2-lists/src/sortable/sortable.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sortable", function() { return _sortable__WEBPACK_IMPORTED_MODULE_0__["Sortable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "moveTo", function() { return _sortable__WEBPACK_IMPORTED_MODULE_0__["moveTo"]; });

/**
 * Sortable Module
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-lists/src/sortable/sortable.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-lists/src/sortable/sortable.js ***!
  \*********************************************************************/
/*! exports provided: Sortable, moveTo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};



/**
 * 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 = /** @class */ (function (_super) {
    __extends(Sortable, _super);
    function Sortable(element, options) {
        var _this = _super.call(this, options, element) || this;
        _this.getHelper = function (e) {
            var target = _this.getSortableElement(e.sender.target);
            if (!_this.isValidTarget(target, _this)) {
                return false;
            }
            var element;
            if (_this.helper) {
                element = _this.helper({ sender: target, element: e.element });
            }
            else {
                element = target.cloneNode(true);
                element.style.width = target.offsetWidth + "px";
                element.style.height = target.offsetHeight + "px";
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], ['e-sortableclone']);
            _this.element.appendChild(element);
            return element;
        };
        _this.onDrag = function (e) {
            _this.trigger('drag', { event: e.event, element: _this.element, target: e.target });
            var newInst = _this.getSortableInstance(e.target);
            var target = _this.getSortableElement(e.target, newInst);
            if (_this.isValidTarget(target, newInst) && _this.curTarget !== target &&
                (newInst.placeHolderElement ? newInst.placeHolderElement !== e.target : true)) {
                _this.curTarget = target;
                var oldIdx = _this.getIndex(newInst.placeHolderElement, newInst);
                oldIdx = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldIdx) ? _this.getIndex(_this.target) :
                    _this.getIndex(target, newInst) < oldIdx || !oldIdx ? oldIdx : oldIdx - 1;
                newInst.placeHolderElement = _this.getPlaceHolder(target, newInst);
                var newIdx = _this.getIndex(target, newInst);
                var idx = newInst.element !== _this.element ? newIdx : oldIdx < newIdx ? newIdx + 1 : newIdx;
                if (newInst.placeHolderElement) {
                    if (newInst.element !== _this.element && idx === newInst.element.childElementCount - 1) {
                        newInst.element.appendChild(newInst.placeHolderElement);
                    }
                    else {
                        newInst.element.insertBefore(newInst.placeHolderElement, newInst.element.children[idx]);
                    }
                    _this.refreshDisabled(oldIdx, newIdx, newInst);
                }
                else {
                    _this.updateItemClass(newInst);
                    newInst.element.insertBefore(_this.target, newInst.element.children[idx]);
                    _this.refreshDisabled(oldIdx, newIdx, newInst);
                    _this.curTarget = _this.target;
                    _this.trigger('drop', { event: e.event, element: newInst.element, previousIndex: oldIdx, currentIndex: newIdx,
                        target: e.target, helper: newInst.element.lastChild, droppedElement: _this.target, scope: _this.scope });
                }
            }
            newInst = _this.getSortableInstance(_this.curTarget);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) && e.target !== newInst.placeHolderElement) {
                if (_this.isPlaceHolderPresent(newInst)) {
                    _this.removePlaceHolder(newInst);
                }
            }
            else {
                var placeHolders = [].slice.call(document.getElementsByClassName('e-sortable-placeholder'));
                var inst_1;
                placeHolders.forEach(function (placeHolder) {
                    inst_1 = _this.getSortableInstance(placeHolder);
                    if (inst_1.element && inst_1 !== newInst) {
                        _this.removePlaceHolder(inst_1);
                    }
                });
            }
        };
        _this.onDragStart = function (e) {
            _this.target = _this.getSortableElement(e.target);
            _this.target.classList.add('e-grabbed');
            _this.curTarget = _this.target;
            _this.trigger('dragStart', { event: e.event, element: _this.element, target: _this.target });
        };
        _this.onDragStop = function (e) {
            var dropInst = _this.getSortableInstance(_this.curTarget);
            var prevIdx;
            if (_this.isPlaceHolderPresent(dropInst)) {
                prevIdx = _this.getIndex(_this.target);
                _this.updateItemClass(dropInst);
                dropInst.element.insertBefore(_this.target, dropInst.placeHolderElement);
                var curIdx = _this.getIndex(_this.target, dropInst);
                prevIdx = _this === dropInst && (prevIdx - curIdx) > 1 ? prevIdx - 1 : prevIdx;
                _this.trigger('drop', { event: e.event, element: dropInst.element, previousIndex: prevIdx, currentIndex: curIdx,
                    target: e.target, helper: e.helper, droppedElement: _this.target, scopeName: _this.scope });
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(dropInst.placeHolderElement);
            }
            dropInst = _this.getSortableInstance(e.target);
            if (dropInst.element === e.target && !dropInst.element.childElementCount) {
                prevIdx = _this.getIndex(_this.target);
                _this.updateItemClass(dropInst);
                dropInst.element.appendChild(_this.target);
                _this.trigger('drop', { event: e.event, element: dropInst.element, previousIndex: prevIdx, currentIndex: 0,
                    target: e.target, helper: e.helper, droppedElement: _this.target, scopeName: _this.scope });
            }
            _this.target.classList.remove('e-grabbed');
            _this.target = null;
            _this.curTarget = null;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(e.helper);
        };
        _this.bind();
        return _this;
    }
    Sortable_1 = Sortable;
    Sortable.prototype.bind = function () {
        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();
    };
    Sortable.prototype.initializeDraggable = function () {
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"](this.element, {
            helper: this.getHelper,
            dragStart: this.onDragStart,
            drag: this.onDrag,
            dragStop: this.onDragStop,
            dragTarget: "." + this.itemClass,
            enableTapHold: true,
            tapHoldThreshold: 200,
            queryPositionInfo: this.queryPositionInfo
        });
    };
    Sortable.prototype.getPlaceHolder = function (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;
    };
    Sortable.prototype.isValidTarget = function (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');
    };
    Sortable.prototype.removePlaceHolder = function (instance) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(instance.placeHolderElement);
        instance.placeHolderElement = null;
    };
    Sortable.prototype.updateItemClass = function (instance) {
        if (this !== instance) {
            this.target.classList.remove(this.itemClass);
            this.target.classList.add(instance.itemClass);
        }
    };
    Sortable.prototype.getSortableInstance = function (element) {
        element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(element, ".e-" + 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;
        }
    };
    Sortable.prototype.refreshDisabled = function (oldIdx, newIdx, instance) {
        if (instance === this) {
            var element = void 0;
            var increased = oldIdx < newIdx;
            var disabledIdx = void 0;
            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++;
                }
            }
        }
    };
    Sortable.prototype.getIndex = function (target, instance) {
        if (instance === void 0) { instance = this; }
        var idx;
        [].slice.call(instance.element.children).forEach(function (element, index) {
            if (element === target) {
                idx = index;
            }
        });
        return idx;
    };
    Sortable.prototype.getSortableElement = function (element, instance) {
        if (instance === void 0) { instance = this; }
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(element, "." + instance.itemClass);
    };
    Sortable.prototype.queryPositionInfo = function (value) {
        value.left = pageXOffset ? parseFloat(value.left) - pageXOffset + "px" : value.left;
        value.top = pageYOffset ? parseFloat(value.top) - pageYOffset + "px" : value.top;
        return value;
    };
    Sortable.prototype.isPlaceHolderPresent = function (instance) {
        return instance.placeHolderElement && !!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(instance.placeHolderElement, "#" + 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}
     */
    Sortable.prototype.moveTo = function (destination, targetIndexes, insertBefore) {
        moveTo(this.element, destination, targetIndexes, insertBefore);
    };
    /**
     * It is used to destroy the Sortable library.
     */
    Sortable.prototype.destroy = function () {
        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();
        _super.prototype.destroy.call(this);
    };
    Sortable.prototype.getModuleName = function () {
        return 'sortable';
    };
    Sortable.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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;
            }
        }
    };
    var Sortable_1;
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Sortable.prototype, "enableAnimation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sortable.prototype, "itemClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sortable.prototype, "scope", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Sortable.prototype, "helper", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Sortable.prototype, "placeHolder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sortable.prototype, "drag", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sortable.prototype, "dragStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sortable.prototype, "drop", void 0);
    Sortable = Sortable_1 = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Sortable);
    return Sortable;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));

/**
 * 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_1 = to.children[insertBefore];
        targetElements.forEach(function (target) {
            to.insertBefore(target, insertElement_1);
        });
    }
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/index.js":
/*!***********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/index.js ***!
  \***********************************************************/
/*! exports provided: MenuAnimationSettings, HScroll, VScroll, Item, Toolbar, AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion, ContextMenu, Menu, TabActionSettings, TabAnimationSettings, Header, TabItem, Tab, FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView, Sidebar */
/***/ (function(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-navigations/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MenuAnimationSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["MenuAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HScroll", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["HScroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VScroll", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["VScroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Item"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Toolbar", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Toolbar"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionActionSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AccordionActionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionAnimationSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AccordionAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionItem", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AccordionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Accordion", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Accordion"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContextMenu", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ContextMenu"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Menu", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Menu"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabActionSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TabActionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabAnimationSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TabAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Header", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Header"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabItem", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TabItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tab", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Tab"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldsSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FieldsSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ActionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NodeAnimationSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["NodeAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TreeView", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TreeView"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sidebar", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Sidebar"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/accordion/accordion.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/accordion/accordion.js ***!
  \*****************************************************************************/
/*! exports provided: AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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_ACRDN_ROOT = 'e-acrdn-root';
var CLS_ROOT = 'e-accordion';
var CLS_ITEM = '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 = '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 = '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';
var AccordionActionSettings = /** @class */ (function (_super) {
    __extends(AccordionActionSettings, _super);
    function AccordionActionSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SlideDown')
    ], AccordionActionSettings.prototype, "effect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(400)
    ], AccordionActionSettings.prototype, "duration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('linear')
    ], AccordionActionSettings.prototype, "easing", void 0);
    return AccordionActionSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var AccordionAnimationSettings = /** @class */ (function (_super) {
    __extends(AccordionAnimationSettings, _super);
    function AccordionAnimationSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ effect: 'SlideUp', duration: 400, easing: 'linear' }, AccordionActionSettings)
    ], AccordionAnimationSettings.prototype, "collapse", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ effect: 'SlideDown', duration: 400, easing: 'linear' }, AccordionActionSettings)
    ], AccordionAnimationSettings.prototype, "expand", void 0);
    return AccordionAnimationSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * An item object that is used to configure Accordion items.
 */
var AccordionItem = /** @class */ (function (_super) {
    __extends(AccordionItem, _super);
    function AccordionItem() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccordionItem.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccordionItem.prototype, "header", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccordionItem.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], AccordionItem.prototype, "iconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], AccordionItem.prototype, "expanded", void 0);
    return AccordionItem;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * 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 = /** @class */ (function (_super) {
    __extends(Accordion, _super);
    /**
     * 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 _this = _super.call(this, options, element) || this;
        /**
         * Contains the keyboard configuration of the Accordion.
         */
        _this.keyConfigs = {
            moveUp: 'uparrow',
            moveDown: 'downarrow',
            enter: 'enter',
            space: 'space',
            home: 'home',
            end: 'end',
        };
        return _this;
    }
    /**
     * Removes the control from the DOM and also removes all its related events.
     * @returns void
     */
    Accordion.prototype.destroy = function () {
        var _this = this;
        var ele = this.element;
        _super.prototype.destroy.call(this);
        this.unwireEvents();
        this.isDestroy = true;
        this.restoreContent(null);
        while (ele.firstChild) {
            ele.removeChild(ele.firstChild);
        }
        if (this.trgtEle) {
            while (this.ctrlTem.firstChild) {
                ele.appendChild(this.ctrlTem.firstChild);
            }
        }
        ele.classList.remove(CLS_ACRDN_ROOT);
        ele.removeAttribute('style');
        ['aria-disabled', 'aria-multiselectable', 'role', 'data-ripple'].forEach(function (attrb) {
            _this.element.removeAttribute(attrb);
        });
    };
    Accordion.prototype.preRender = function () {
        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);
        }
        if (!this.enablePersistence || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.expandedItems)) {
            this.expandedItems = [];
        }
    };
    Accordion.prototype.add = function (ele, val) {
        ele.classList.add(val);
    };
    Accordion.prototype.remove = function (ele, val) {
        ele.classList.remove(val);
    };
    /**
     * To initialize the control rendering
     * @private
     */
    Accordion.prototype.render = function () {
        this.initialize();
        this.renderControl();
        this.wireEvents();
    };
    Accordion.prototype.initialize = function () {
        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 (this.expandedItems.length > 0) {
            this.initExpand = this.expandedItems;
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, ariaAttr);
        if (this.expandMode === 'Single') {
            this.element.setAttribute('aria-multiselectable', 'false');
        }
    };
    Accordion.prototype.renderControl = function () {
        this.trgtEle = (this.element.children.length > 0) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div', this.element) : null;
        this.renderItems();
        this.initItemExpand();
    };
    Accordion.prototype.unwireEvents = function () {
        _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();
        }
    };
    Accordion.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.clickHandler, this);
        if (!this.isNested && !this.isDestroy) {
            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'
            });
        }
    };
    Accordion.prototype.focusIn = function (e) {
        e.target.parentElement.classList.add(CLS_ITEMFOCUS);
    };
    Accordion.prototype.focusOut = function (e) {
        e.target.parentElement.classList.remove(CLS_ITEMFOCUS);
    };
    Accordion.prototype.ctrlTemplate = function () {
        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 = [];
        [].slice.call(innerEles).forEach(function (el) {
            items.push({
                header: (el.childElementCount > 0 && el.children[0]) ? (el.children[0]).innerHTML : '',
                content: (el.childElementCount > 1 && el.children[1]) ? (el.children[1]).innerHTML : ''
            });
            el.parentNode.removeChild(el);
        });
        if (rootEle) {
            this.element.removeChild(rootEle);
        }
        this.setProperties({ items: items }, true);
    };
    Accordion.prototype.toggleIconGenerate = function () {
        var tglIcon = this.createElement('div', { className: CLS_TOOGLEICN });
        var hdrColIcon = this.createElement('span', { className: CLS_COLLAPSEICN });
        tglIcon.appendChild(hdrColIcon);
        return tglIcon;
    };
    Accordion.prototype.initItemExpand = function () {
        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]);
            }
        }
    };
    Accordion.prototype.renderItems = function () {
        var _this = this;
        var ele = this.element;
        var innerItem;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.initExpand)) {
            this.initExpand = [];
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.trgtEle)) {
            this.ctrlTemplate();
        }
        var items = this.items;
        if (ele && items.length > 0) {
            items.forEach(function (item, index) {
                innerItem = _this.renderInnerItem(item, index);
                ele.appendChild(innerItem);
                var blazorContain = Object.keys(window);
                if (item.header && blazorContain.indexOf('Blazor') > -1 && !_this.isStringTemplate
                    && item.header.indexOf('<div>Blazor') === 0) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(_this.element.id + index + '_header', 'HeaderTemplate', item);
                }
                if (innerItem.childElementCount > 0) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerItem.querySelector('.' + CLS_HEADER), 'focus', _this.focusIn, _this);
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerItem.querySelector('.' + CLS_HEADER), 'blur', _this.focusOut, _this);
                }
            });
        }
    };
    Accordion.prototype.clickHandler = function (e) {
        var _this = this;
        var trgt = e.target;
        var eventArgs = {};
        var index;
        var tglIcon;
        var acrdEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ROOT);
        if (acrdEle !== this.element) {
            return;
        }
        trgt.classList.add('e-target');
        var acrdnItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM);
        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);
        }
        else if (acrdnCtn) {
            acrdnCtnItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(acrdnCtn, '.' + CLS_ITEM);
        }
        var acrdActive = [];
        index = this.getIndexByItem(acrdnItem);
        if (acrdnCtnItem) {
            eventArgs.item = this.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)))) {
            acrdnItem.appendChild(this.contentRendering(index));
            var blazorContain = Object.keys(window);
            if (eventArgs.item.content && blazorContain.indexOf('Blazor') > -1 && !this.isStringTemplate
                && eventArgs.item.content.indexOf('<div>Blazor') === 0) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + index + '_content', 'ContentTemplate', eventArgs.item);
            }
            this.ariaAttrUpdate(acrdnItem);
        }
        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;
        var inlineEleAcrdn = acrdnCtn && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_ROOT, 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, acrdnCtn)) || !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ROOT) === 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 + ' [' + CLS_ANIMATE + ']'));
        if (acrdAniEle.length > 0) {
            for (var _i = 0, acrdAniEle_1 = acrdAniEle; _i < acrdAniEle_1.length; _i++) {
                var el = acrdAniEle_1[_i];
                acrdActive.push(el.parentElement);
            }
        }
        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_1 = 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_1)) {
                return;
            }
            sameHeader = (expandState === acrdnItem);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(acrdnCtn_1) && (!sameContentCheck || acrdnCtnItem.classList.contains(CLS_SLCTED))) {
                this.collapse(acrdnCtn_1);
            }
            else {
                if ((acrdActive.length > 0) && this.expandMode === 'Single' && !sameContentCheck) {
                    acrdActive.forEach(function (el) {
                        _this.collapse(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, el));
                        el.classList.remove(CLS_EXPANDSTATE);
                    });
                }
                this.expand(acrdnCtn_1);
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(expandState) && !sameHeader) {
                expandState.classList.remove(CLS_EXPANDSTATE);
            }
        }
    };
    Accordion.prototype.eleMoveFocus = function (action, root, trgt) {
        var clst;
        var clstItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM);
        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();
        }
    };
    Accordion.prototype.keyActionHandler = function (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) && !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;
        }
    };
    Accordion.prototype.headerEleGenerate = function () {
        var header = this.createElement('div', { className: CLS_HEADER, id: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('acrdn_header') });
        var ariaAttr = {
            'tabindex': '0', 'role': 'heading', 'aria-expanded': 'false', 'aria-selected': 'false',
            'aria-disabled': 'false', 'aria-level': this.items.length.toString()
        };
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(header, ariaAttr);
        return header;
    };
    Accordion.prototype.renderInnerItem = function (item, index) {
        var innerEle;
        innerEle = this.createElement('div', { className: CLS_ITEM });
        innerEle.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('acrdn_item');
        if (item.header && this.angularnativeCondiCheck(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) {
            innerEle.classList.add(item.cssClass);
        }
        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;
    };
    Accordion.prototype.angularnativeCondiCheck = function (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;
        }
    };
    Accordion.prototype.fetchElement = function (ele, value, index, isHeader) {
        var blazorContain = Object.keys(window);
        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' && blazorContain.indexOf('Blazor') > -1 && value.indexOf('<div>Blazor') !== 0) {
                ele.innerHTML = value;
            }
            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 = void 0;
            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 = value;
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(temString)) {
            if (this.templateEle.indexOf(value) === -1) {
                this.templateEle.push(value);
            }
        }
        return ele;
    };
    Accordion.prototype.ariaAttrUpdate = function (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);
    };
    Accordion.prototype.contentRendering = function (index) {
        var content = this.items[index].content;
        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 });
        itemcnt.appendChild(this.fetchElement(ctn, content, index, false));
        return itemcnt;
    };
    Accordion.prototype.expand = function (trgt) {
        var _this = this;
        var eventArgs;
        var trgtItemEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM);
        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)) {
            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: this.items[this.getIndexByItem(trgtItemEle)],
            index: this.getIndexByItem(trgtItemEle),
            content: trgtItemEle.querySelector('.' + CLS_CONTENT),
            isExpanded: true };
        var eff = animation.name;
        this.trigger('expanding', eventArgs, function (expandArgs) {
            if (!expandArgs.cancel) {
                icon.classList.add(CLS_TOGANIMATE);
                _this.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')) {
                    _this.expandProgress('begin', icon, trgt, trgtItemEle, expandArgs);
                    _this.expandProgress('end', icon, trgt, trgtItemEle, expandArgs);
                }
                else {
                    _this.expandAnimation(eff, icon, trgt, trgtItemEle, animation, expandArgs);
                }
            }
        });
    };
    Accordion.prototype.expandAnimation = function (ef, icn, trgt, trgtItemEle, animate, args) {
        var _this = this;
        var height;
        var trgtHgt;
        this.lastActiveItemId = trgtItemEle.id;
        if (ef === 'SlideDown') {
            animate.begin = function () {
                _this.expandProgress('begin', icn, trgt, trgtItemEle, args);
                trgt.style.position = 'absolute';
                height = trgtItemEle.offsetHeight;
                trgtHgt = trgt.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 = '';
                _this.expandProgress('end', icn, trgt, trgtItemEle, args);
            };
        }
        else {
            animate.begin = function () {
                _this.expandProgress('begin', icn, trgt, trgtItemEle, args);
            };
            animate.end = function () {
                _this.expandProgress('end', icn, trgt, trgtItemEle, args);
            };
        }
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animate).animate(trgt);
    };
    Accordion.prototype.expandProgress = function (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"])(trgt.previousElementSibling, { 'aria-selected': 'true', 'aria-expanded': 'true' });
            icon.classList.remove(CLS_TOGANIMATE);
            this.trigger('expanded', eventArgs);
        }
    };
    Accordion.prototype.expandedItemsPush = function (item) {
        var index = this.getIndexByItem(item);
        if (this.expandedItems.indexOf(index) === -1) {
            this.expandedItems.push(index);
        }
    };
    Accordion.prototype.getIndexByItem = function (item) {
        return [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).indexOf(item);
    };
    Accordion.prototype.expandedItemsPop = function (item) {
        var index = this.getIndexByItem(item);
        this.expandedItems.splice(this.expandedItems.indexOf(index), 1);
    };
    Accordion.prototype.collapse = function (trgt) {
        var _this = this;
        var eventArgs;
        var trgtItemEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM);
        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)) {
            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: this.items[this.getIndexByItem(trgtItemEle)],
            index: this.getIndexByItem(trgtItemEle),
            content: trgtItemEle.querySelector('.' + CLS_CONTENT),
            isExpanded: false };
        var eff = animation.name;
        this.trigger('expanding', eventArgs, function (expandArgs) {
            if (!expandArgs.cancel) {
                _this.expandedItemsPop(trgtItemEle);
                trgtItemEle.classList.add(CLS_EXPANDSTATE);
                icon.classList.add(CLS_TOGANIMATE);
                if ((animation.name === 'None')) {
                    _this.collapseProgress('begin', icon, trgt, trgtItemEle, expandArgs);
                    _this.collapseProgress('end', icon, trgt, trgtItemEle, expandArgs);
                }
                else {
                    _this.collapseAnimation(eff, trgt, trgtItemEle, icon, animation, expandArgs);
                }
            }
        });
    };
    Accordion.prototype.collapseAnimation = function (ef, trgt, trgtItEl, icn, animate, args) {
        var _this = 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';
                _this.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';
                _this.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 () {
                _this.collapseProgress('begin', icn, trgt, trgtItEl, args);
            };
            animate.end = function () {
                _this.collapseProgress('end', icn, trgt, trgtItEl, args);
            };
        }
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animate).animate(trgt);
    };
    Accordion.prototype.collapseProgress = function (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"])(trgt.previousElementSibling, { 'aria-selected': 'false', 'aria-expanded': 'false' });
            this.trigger('expanded', eventArgs);
        }
    };
    /**
     * Returns the current module name.
     * @returns string
     * @private
     */
    Accordion.prototype.getModuleName = function () {
        return 'accordion';
    };
    Accordion.prototype.itemAttribUpdate = function () {
        var itemEle = [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM));
        var itemLen = this.items.length;
        itemEle.forEach(function (ele) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, ele).setAttribute('aria-level', '' + itemLen);
        });
    };
    /**
     * Adds new item to the Accordion with the specified index of the Accordion.
     * @param  {AccordionItemModel} 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
     */
    Accordion.prototype.addItem = function (item, index) {
        var ele = this.element;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
            index = this.items.length;
        }
        if (ele.childElementCount >= index) {
            this.items.splice(index, 0, item);
            var innerItemEle = this.renderInnerItem(item, index);
            if (ele.childElementCount === index) {
                ele.appendChild(innerItemEle);
            }
            else {
                ele.insertBefore(innerItemEle, ele.querySelectorAll('.' + CLS_ITEM)[index]);
            }
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerItemEle.querySelector('.' + CLS_HEADER), 'focus', this.focusIn, this);
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerItemEle.querySelector('.' + CLS_HEADER), 'blur', this.focusOut, this);
            this.itemAttribUpdate();
        }
        this.expandedItems = [];
        this.expandedItemRefresh(ele);
        if (item.expanded) {
            this.expandItem(true, index);
        }
    };
    Accordion.prototype.expandedItemRefresh = function (ele) {
        var _this = this;
        [].slice.call(ele.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) {
            if (el.classList.contains(CLS_SLCTED)) {
                _this.expandedItemsPush(el);
            }
        });
    };
    /**
     * Dynamically removes item from Accordion.
     * @param  {number} index - Number value that determines which item should be removed.
     * @returns void.
     */
    Accordion.prototype.removeItem = function (index) {
        var ele = this.element.querySelectorAll('.' + CLS_ITEM)[index];
        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);
        this.items.splice(index, 1);
        this.itemAttribUpdate();
        this.expandedItems = [];
        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.
     */
    Accordion.prototype.select = function (index) {
        var ele = this.element.querySelectorAll('.' + CLS_ITEM)[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.
     */
    Accordion.prototype.hideItem = function (index, isHidden) {
        var ele = this.element.querySelectorAll('.' + CLS_ITEM)[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.
     */
    Accordion.prototype.enableItem = function (index, isEnable) {
        var ele = this.element.querySelectorAll('.' + CLS_ITEM)[index];
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
            return;
        }
        var eleHeader = ele.firstElementChild;
        if (isEnable) {
            this.remove(ele, CLS_DISABLE);
            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);
            eleHeader.setAttribute('aria-disabled', 'true');
            eleHeader.removeAttribute('tabindex');
        }
    };
    /**
     * 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.
     */
    Accordion.prototype.expandItem = function (isExpand, index) {
        var _this = this;
        var root = this.element;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
            if (this.expandMode === 'Single' && isExpand) {
                var ele = root.querySelectorAll('.' + CLS_ITEM)[root.childElementCount - 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(root.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) {
                    _this.itemExpand(isExpand, el, _this.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 ele = root.querySelectorAll('.' + CLS_ITEM)[index];
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele) || !ele.classList.contains(CLS_SLCT) || (ele.classList.contains(CLS_ACTIVE) && isExpand)) {
                return;
            }
            else {
                if (this.expandMode === 'Single') {
                    this.expandItem(false);
                }
                this.itemExpand(isExpand, ele, index);
            }
        }
    };
    Accordion.prototype.itemExpand = function (isExpand, ele, index) {
        var ctn = ele.children[1];
        if (ele.classList.contains(CLS_DISABLE)) {
            return;
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ctn) && isExpand) {
            ctn = this.contentRendering(index);
            ele.appendChild(ctn);
            var blazorContain = Object.keys(window);
            var item = this.items[index];
            if (item.content && blazorContain.indexOf('Blazor') > -1 && !this.isStringTemplate && item.content.indexOf('<div>Blazor') === 0) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + index + '_content', 'ContentTemplate', item);
            }
            this.ariaAttrUpdate(ele);
        }
        else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ctn)) {
            return;
        }
        isExpand ? this.expand(ctn) : this.collapse(ctn);
    };
    Accordion.prototype.destroyItems = function () {
        this.restoreContent(null);
        [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(el);
        });
    };
    Accordion.prototype.restoreContent = function (index) {
        var ctnElePos;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
            ctnElePos = this.element;
        }
        else {
            ctnElePos = this.element.querySelectorAll('.' + CLS_ITEM)[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';
            }
        });
    };
    Accordion.prototype.updateItem = function (item, index) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            var itemObj = this.items[index];
            this.items.splice(index, 1);
            this.restoreContent(index);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(item);
            this.addItem(itemObj, index);
        }
    };
    Accordion.prototype.getPersistData = function () {
        var keyEntity = ['expandedItems'];
        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
     */
    Accordion.prototype.onPropertyChanged = function (newProp, oldProp) {
        var acrdn = this.element;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'items':
                    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, 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 === '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 {
                        this.destroyItems();
                        this.renderItems();
                        this.initItemExpand();
                    }
                    break;
                case 'enableRtl':
                    newProp.enableRtl ? this.add(acrdn, CLS_RTL) : this.remove(acrdn, CLS_RTL);
                    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.expandedItems.length > 1) {
                            this.expandItem(false);
                        }
                    }
                    else {
                        this.element.setAttribute('aria-multiselectable', 'true');
                    }
                    break;
            }
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], AccordionItem)
    ], Accordion.prototype, "items", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')
    ], Accordion.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Accordion.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Multiple')
    ], Accordion.prototype, "expandMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, AccordionAnimationSettings)
    ], Accordion.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Accordion.prototype, "clicked", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Accordion.prototype, "expanding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Accordion.prototype, "expanded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Accordion.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Accordion.prototype, "destroyed", void 0);
    Accordion = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Accordion);
    return Accordion;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/accordion/index.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/accordion/index.js ***!
  \*************************************************************************/
/*! exports provided: AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _accordion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accordion */ "./node_modules/@syncfusion/ej2-navigations/src/accordion/accordion.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionActionSettings", function() { return _accordion__WEBPACK_IMPORTED_MODULE_0__["AccordionActionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionAnimationSettings", function() { return _accordion__WEBPACK_IMPORTED_MODULE_0__["AccordionAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionItem", function() { return _accordion__WEBPACK_IMPORTED_MODULE_0__["AccordionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Accordion", function() { return _accordion__WEBPACK_IMPORTED_MODULE_0__["Accordion"]; });

/**
 * Accordion all modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/common/h-scroll.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/common/h-scroll.js ***!
  \*************************************************************************/
/*! exports provided: HScroll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HScroll", function() { return HScroll; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 = /** @class */ (function (_super) {
    __extends(HScroll, _super);
    /**
     * 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) {
        return _super.call(this, options, element) || this;
    }
    /**
     * Initialize the event handler
     * @private
     */
    HScroll.prototype.preRender = function () {
        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
     */
    HScroll.prototype.render = function () {
        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);
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollStep) || this.scrollStep < 0) {
            this.scrollStep = this.scrollEle.offsetWidth;
            this.customStep = false;
        }
    };
    HScroll.prototype.initialize = function () {
        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);
        for (var _i = 0, innerEle_1 = innerEle; _i < innerEle_1.length; _i++) {
            var ele_1 = innerEle_1[_i];
            scrollEle.appendChild(ele_1);
        }
        scrollDiv.appendChild(scrollEle);
        ele.appendChild(scrollDiv);
        scrollDiv.style.overflowX = 'hidden';
        this.scrollEle = scrollDiv;
        this.scrollItems = scrollEle;
    };
    HScroll.prototype.getPersistData = function () {
        var keyEntity = ['scrollStep'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Returns the current module name.
     * @returns string
     * @private
     */
    HScroll.prototype.getModuleName = function () {
        return 'hScroll';
    };
    /**
     * Removes the control from the DOM and also removes all its related events.
     * @returns void
     */
    HScroll.prototype.destroy = function () {
        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);
        });
        for (var _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {
            var elem = _a[_i];
            ele.appendChild(elem);
        }
        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;
        _super.prototype.destroy.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.
     */
    HScroll.prototype.disable = function (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');
        });
    };
    HScroll.prototype.createOverlay = function (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]);
    };
    HScroll.prototype.createNavIcon = function (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);
        nav.setAttribute('tabindex', '0');
        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]);
    };
    HScroll.prototype.onKeyPress = function (e) {
        var _this = this;
        if (e.key === 'Enter') {
            var timeoutFun_1 = function () {
                _this.keyTimeout = true;
                _this.eleScrolling(10, e.target, true);
            };
            this.keyTimer = window.setTimeout(function () {
                timeoutFun_1();
            }, 100);
        }
    };
    HScroll.prototype.onKeyUp = function (e) {
        if (e.key !== 'Enter') {
            return;
        }
        if (this.keyTimeout) {
            this.keyTimeout = false;
        }
        else {
            e.target.click();
        }
        clearTimeout(this.keyTimer);
    };
    HScroll.prototype.eventBinding = function (ele) {
        var _this = this;
        [].slice.call(ele).forEach(function (el) {
            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](el, { tapHold: _this.tabHoldHandler.bind(_this), tapHoldThreshold: 500 });
            el.addEventListener('keydown', _this.onKeyPress.bind(_this));
            el.addEventListener('keyup', _this.onKeyUp.bind(_this));
            el.addEventListener('mouseup', _this.repeatScroll.bind(_this));
            el.addEventListener('touchend', _this.repeatScroll.bind(_this));
            el.addEventListener('contextmenu', function (e) {
                e.preventDefault();
            });
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(el, 'click', _this.clickEventHandler, _this);
        });
    };
    HScroll.prototype.repeatScroll = function () {
        clearInterval(this.timeout);
    };
    HScroll.prototype.tabHoldHandler = function (e) {
        var _this = this;
        var trgt = e.originalEvent.target;
        trgt = this.contains(trgt, CLS_HSCROLLNAV) ? trgt.firstElementChild : trgt;
        var scrollDis = 10;
        var timeoutFun = function () {
            _this.eleScrolling(scrollDis, trgt, true);
        };
        this.timeout = window.setInterval(function () {
            timeoutFun();
        }, 50);
    };
    HScroll.prototype.contains = function (ele, className) {
        return ele.classList.contains(className);
    };
    HScroll.prototype.eleScrolling = function (scrollDis, trgt, isContinuous) {
        var element = this.scrollEle;
        var rootEle = this.element;
        var classList = trgt.classList;
        if (classList.contains(CLS_HSCROLLNAV)) {
            classList = 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.contains(CLS_NAVRIGHTARROW)) {
                this.frameScrollRequest(scrollDis, 'add', isContinuous);
            }
            else {
                this.frameScrollRequest(scrollDis, '', isContinuous);
            }
        }
        else {
            if (classList.contains(CLS_NAVLEFTARROW)) {
                this.frameScrollRequest(scrollDis, 'add', isContinuous);
            }
            else {
                this.frameScrollRequest(scrollDis, '', isContinuous);
            }
        }
    };
    HScroll.prototype.clickEventHandler = function (e) {
        this.eleScrolling(this.scrollStep, e.target, false);
    };
    HScroll.prototype.swipeHandler = function (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 () {
            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.02;
                window.requestAnimationFrame(animate);
            }
        };
        animate();
    };
    HScroll.prototype.scrollUpdating = function (scrollVal, action) {
        if (action === 'add') {
            this.scrollEle.scrollLeft += scrollVal;
        }
        else {
            this.scrollEle.scrollLeft -= scrollVal;
        }
    };
    HScroll.prototype.frameScrollRequest = function (scrollVal, action, isContinuous) {
        var _this = 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 () {
            var scrollValue;
            var scrollStep;
            if (_this.contains(_this.element, CLS_RTL) && _this.browserCheck) {
                scrollValue = -scrollVal;
                scrollStep = -step;
            }
            else {
                scrollValue = scrollVal;
                scrollStep = step;
            }
            if (scrollValue < step) {
                window.cancelAnimationFrame(scrollStep);
            }
            else {
                _this.scrollUpdating(scrollStep, action);
                scrollVal -= scrollStep;
                window.requestAnimationFrame(animate);
            }
        };
        animate();
    };
    HScroll.prototype.touchHandler = function (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;
        }
    };
    HScroll.prototype.arrowDisabling = function (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();
    };
    HScroll.prototype.scrollHandler = function (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
     */
    HScroll.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'scrollStep':
                    break;
                case 'enableRtl':
                    newProp.enableRtl ? this.element.classList.add(CLS_RTL) : this.element.classList.remove(CLS_RTL);
                    break;
            }
        }
    };
    __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);
    return HScroll;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/common/index.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/common/index.js ***!
  \**********************************************************************/
/*! exports provided: MenuAnimationSettings, HScroll, VScroll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _h_scroll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./h-scroll */ "./node_modules/@syncfusion/ej2-navigations/src/common/h-scroll.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HScroll", function() { return _h_scroll__WEBPACK_IMPORTED_MODULE_0__["HScroll"]; });

/* harmony import */ var _v_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./v-scroll */ "./node_modules/@syncfusion/ej2-navigations/src/common/v-scroll.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VScroll", function() { return _v_scroll__WEBPACK_IMPORTED_MODULE_1__["VScroll"]; });

/* harmony import */ var _menu_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./menu-base */ "./node_modules/@syncfusion/ej2-navigations/src/common/menu-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MenuAnimationSettings", function() { return _menu_base__WEBPACK_IMPORTED_MODULE_2__["MenuAnimationSettings"]; });

/**
 * Navigation Common modules
 */





/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/common/menu-base.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/common/menu-base.js ***!
  \**************************************************************************/
/*! exports provided: FieldSettings, MenuItem, MenuAnimationSettings, MenuBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FieldSettings", function() { return FieldSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItem", function() { return MenuItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MenuAnimationSettings", function() { return MenuAnimationSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MenuBase", function() { return MenuBase; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-lists */ "./node_modules/@syncfusion/ej2-lists/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _common_h_scroll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/h-scroll */ "./node_modules/@syncfusion/ej2-navigations/src/common/h-scroll.js");
/* harmony import */ var _common_v_scroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/v-scroll */ "./node_modules/@syncfusion/ej2-navigations/src/common/v-scroll.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 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 = /** @class */ (function (_super) {
    __extends(FieldSettings, _super);
    function FieldSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('id')
    ], FieldSettings.prototype, "itemId", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('parentId')
    ], FieldSettings.prototype, "parentId", 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"])('iconCss')
    ], FieldSettings.prototype, "iconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('url')
    ], FieldSettings.prototype, "url", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('separator')
    ], FieldSettings.prototype, "separator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('items')
    ], FieldSettings.prototype, "children", void 0);
    return FieldSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Specifies menu items.
 */
var MenuItem = /** @class */ (function (_super) {
    __extends(MenuItem, _super);
    function MenuItem() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MenuItem.prototype, "iconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MenuItem.prototype, "id", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], MenuItem.prototype, "separator", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], MenuItem)
    ], MenuItem.prototype, "items", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MenuItem.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MenuItem.prototype, "url", void 0);
    return MenuItem;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Animation configuration settings.
 */
var MenuAnimationSettings = /** @class */ (function (_super) {
    __extends(MenuAnimationSettings, _super);
    function MenuAnimationSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SlideDown')
    ], MenuAnimationSettings.prototype, "effect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(400)
    ], MenuAnimationSettings.prototype, "duration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('ease')
    ], MenuAnimationSettings.prototype, "easing", void 0);
    return MenuAnimationSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * @private
 * Base class for Menu and ContextMenu components.
 */
var MenuBase = /** @class */ (function (_super) {
    __extends(MenuBase, _super);
    /**
     * Constructor for creating the widget.
     * @private
     */
    function MenuBase(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.navIdx = [];
        _this.animation = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({});
        _this.isTapHold = false;
        return _this;
    }
    /**
     * Initialized third party configuration settings.
     * @private
     */
    MenuBase.prototype.preRender = function () {
        if (!this.isMenu) {
            var ul = void 0;
            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 ul = this.createElement('ul');
            var wrapper = this.createElement('EJS-MENU', { className: 'e-' + this.getModuleName() + '-wrapper' });
            for (var idx = 0, len = ele.attributes.length; idx < len; idx++) {
                ul.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 = ul;
            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
     */
    MenuBase.prototype.render = function () {
        this.initialize();
        this.renderItems();
        this.wireEvents();
    };
    MenuBase.prototype.initialize = function () {
        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);
            }
        }
    };
    MenuBase.prototype.renderItems = function () {
        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);
            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');
        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);
    };
    MenuBase.prototype.wireEvents = function () {
        var wrapper = this.getWrapper();
        if (this.target) {
            var target = void 0;
            var targetElems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(this.target);
            for (var i = 0, len = targetElems.length; i < len; 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) {
                for (var _i = 0, _a = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["getScrollableParent"])(this.targetElement); _i < _a.length; _i++) {
                    var parent_1 = _a[_i];
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(parent_1, 'scroll', this.scrollHandler, this);
                }
            }
        }
        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 });
    };
    MenuBase.prototype.wireKeyboardEvent = function (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
        });
    };
    MenuBase.prototype.mouseDownHandler = function (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);
        }
    };
    MenuBase.prototype.keyBoardHandler = function (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;
        }
    };
    MenuBase.prototype.upDownKeyHandler = function (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();
    };
    MenuBase.prototype.isValidLI = function (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;
    };
    MenuBase.prototype.getUlByNavIdx = function (navIdxLen) {
        if (navIdxLen === void 0) { navIdxLen = 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];
        }
    };
    MenuBase.prototype.rightEnterKeyHandler = function (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 index = void 0;
            var item = this.getItem(navIdx);
            if (item.items.length) {
                this.navIdx.push(fliIdx);
                this.keyType = 'right';
                this.action = e.action;
                this.openMenu(fli, item, null, null, 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);
                }
            }
        }
    };
    MenuBase.prototype.leftEscKeyHandler = function (e) {
        if (this.navIdx.length) {
            this.keyType = 'left';
            this.closeMenu(this.navIdx.length, e);
        }
        else {
            if (e.action === ESCAPE) {
                this.closeMenu(null, e);
            }
        }
    };
    MenuBase.prototype.scrollHandler = function (e) {
        this.closeMenu(null, e);
    };
    MenuBase.prototype.touchHandler = function (e) {
        this.isTapHold = true;
        this.cmenuHandler(e.originalEvent);
    };
    MenuBase.prototype.cmenuHandler = function (e) {
        e.preventDefault();
        this.closeMenu(null, e);
        if (this.canOpen(e.target)) {
            if (e.changedTouches) {
                this.openMenu(null, null, e.changedTouches[0].pageY + 1, e.changedTouches[0].pageX + 1, e);
            }
            else {
                this.openMenu(null, null, e.pageY + 1, e.pageX + 1, e);
            }
        }
    };
    MenuBase.prototype.closeMenu = function (ulIndex, e) {
        var _this = this;
        if (ulIndex === void 0) { ulIndex = 0; }
        if (e === void 0) { e = null; }
        if (this.isMenuVisible()) {
            var sli = void 0;
            var ul_1;
            var item_1;
            var items_1;
            var beforeCloseArgs = void 0;
            var wrapper = this.getWrapper();
            var popups = this.getPopups();
            var isClose = false;
            var cnt = this.isMenu ? popups.length + 1 : wrapper.childElementCount;
            ul_1 = 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_1.classList.contains('e-menu')) {
                sli = this.getLIByClass(ul_1, SELECTED);
                if (sli) {
                    sli.classList.remove(SELECTED);
                }
                isClose = true;
            }
            if (!isClose) {
                item_1 = this.navIdx.length ? this.getItem(this.navIdx) : null;
                items_1 = item_1 ? item_1.items : this.items;
                beforeCloseArgs = { element: ul_1, parentItem: item_1, items: items_1, event: e, cancel: false };
                this.trigger('beforeClose', beforeCloseArgs, function (observedCloseArgs) {
                    var popupEle;
                    var closeArgs;
                    var popupObj;
                    if (!observedCloseArgs.cancel) {
                        if (_this.isMenu) {
                            popupEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(ul_1, '.' + POPUP);
                            if (_this.hamburgerMode) {
                                popupEle.parentElement.style.minHeight = '';
                            }
                            _this.unWireKeyboardEvent(popupEle);
                            _this.destroyScrollObj(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(popupEle.children[0], _common_v_scroll__WEBPACK_IMPORTED_MODULE_4__["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();
                            popupObj.destroy();
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(popupEle);
                        }
                        else {
                            _this.toggleAnimation(ul_1, false);
                        }
                        closeArgs = { element: ul_1, parentItem: item_1, items: items_1 };
                        _this.trigger('onClose', closeArgs);
                    }
                    _this.navIdx.pop();
                    if (!ulIndex && _this.navIdx.length) {
                        _this.closeMenu(null, e);
                    }
                    else if (!_this.isMenu && !ulIndex && _this.navIdx.length === 0 && !_this.isMenusClosed) {
                        _this.isMenusClosed = true;
                        _this.closeMenu(0, e);
                    }
                    else if (_this.isMenu && e && e.target &&
                        _this.navIdx.length !== 0 && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-menu-parent.e-control')) {
                        _this.closeMenu(0, e);
                    }
                    else {
                        if (_this.keyType === 'right' || _this.keyType === 'click') {
                            _this.afterCloseMenu(e);
                        }
                        else {
                            var cul = _this.getUlByNavIdx();
                            var sli_1 = _this.getLIByClass(cul, SELECTED);
                            if (sli_1) {
                                sli_1.setAttribute('aria-expanded', 'false');
                                sli_1.classList.remove(SELECTED);
                                sli_1.classList.add(FOCUSED);
                                sli_1.focus();
                            }
                        }
                    }
                    _this.removeStateWrapper();
                });
            }
        }
    };
    MenuBase.prototype.destroyScrollObj = function (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);
        }
    };
    MenuBase.prototype.getPopups = function () {
        var _this = this;
        var popups = [];
        [].slice.call(document.querySelectorAll('.' + POPUP)).forEach(function (elem) {
            if (_this.getIndex(elem.querySelector('.' + ITEM).id, true).length) {
                popups.push(elem);
            }
        });
        return popups;
    };
    MenuBase.prototype.isMenuVisible = function () {
        return (this.navIdx.length > 0 || (this.element.classList.contains('e-contextmenu') && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(this.element).valueOf()));
    };
    MenuBase.prototype.canOpen = function (target) {
        var canOpen = true;
        if (this.filter) {
            canOpen = false;
            var filter = this.filter.split(' ');
            for (var i = 0, len = filter.length; i < len; i++) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + filter[i])) {
                    canOpen = true;
                    break;
                }
            }
        }
        return canOpen;
    };
    MenuBase.prototype.openMenu = function (li, item, top, left, e, target) {
        if (top === void 0) { top = 0; }
        if (left === void 0) { left = 0; }
        if (e === void 0) { e = null; }
        if (target === void 0) { target = this.targetElement; }
        var eventArgs;
        var wrapper = this.getWrapper();
        this.lItem = li;
        var elemId = this.element.id !== '' ? this.element.id : 'menu';
        this.isMenusClosed = false;
        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 + '-' + 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');
        }
    };
    MenuBase.prototype.calculateIndentSize = function (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_1 = (parseInt(menuIconElemStyle.marginRight, 10) + menuIconElem.offsetWidth + liIndent);
            blankIconElem.forEach(function (element) { return element.style.textIndent = blankIconIndent_1 + 'px'; });
        }
    };
    MenuBase.prototype.generatePopup = function (popupWrapper, ul, li, isNestedOrVertical) {
        var _this = 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 () {
                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();
                _this.triggerOpen(ul);
            }
        });
        return popupObj;
    };
    MenuBase.prototype.createHeaderContainer = function (wrapper) {
        wrapper = wrapper || this.getWrapper();
        var spanElem = this.createElement('span', { className: 'e-' + this.getModuleName() + '-header' });
        var spanTitle = this.createElement('span', {
            className: 'e-' + this.getModuleName() + '-title', innerHTML: this.title
        });
        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);
    };
    MenuBase.prototype.openHamburgerMenu = function (e) {
        if (this.hamburgerMode) {
            var eventArgs = void 0;
            this.triggerBeforeOpen(null, this.element, null, e, 0, 0, 'hamburger');
        }
    };
    MenuBase.prototype.closeHamburgerMenu = function (e) {
        var _this = this;
        if (this.hamburgerMode) {
            var beforeCloseArgs = void 0;
            beforeCloseArgs = { element: this.element, parentItem: null, event: e, items: this.items, cancel: false };
            this.trigger('beforeClose', beforeCloseArgs, function (observedHamburgerCloseArgs) {
                if (!observedHamburgerCloseArgs.cancel) {
                    _this.closeMenu(null, e);
                    _this.element.classList.add('e-hide-menu');
                    _this.trigger('onClose', { element: _this.element, parentItem: null, items: _this.items });
                }
            });
        }
    };
    MenuBase.prototype.callFit = function (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 });
    };
    MenuBase.prototype.triggerBeforeOpen = function (li, ul, item, e, top, left, type) {
        var _this = 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: item, event: e, cancel: false, top: top, left: left
        };
        var menuType = type;
        this.trigger('beforeOpen', eventArgs, function (observedOpenArgs) {
            switch (menuType) {
                case 'menu':
                    if (!_this.hamburgerMode) {
                        _this.top = observedOpenArgs.top;
                        _this.left = observedOpenArgs.left;
                    }
                    _this.popupWrapper.style.display = 'block';
                    if (!_this.hamburgerMode) {
                        _this.popupWrapper.style.maxHeight = _this.popupWrapper.getBoundingClientRect().height + 'px';
                        _this.addScrolling(_this.popupWrapper, _this.uList, 'vscroll', _this.popupWrapper.offsetHeight, _this.uList.offsetHeight);
                        _this.checkScrollOffset(e);
                    }
                    var collide = void 0;
                    if (!_this.hamburgerMode && !_this.left && !_this.top) {
                        _this.popupObj.refreshPosition(_this.lItem, true);
                        _this.left = parseInt(_this.popupWrapper.style.left, 10);
                        _this.top = parseInt(_this.popupWrapper.style.top, 10);
                        if (_this.enableRtl) {
                            _this.left =
                                _this.isNestedOrVertical ? _this.left - _this.popupWrapper.offsetWidth - _this.lItem.parentElement.offsetWidth
                                    : _this.left - _this.popupWrapper.offsetWidth + _this.lItem.offsetWidth;
                        }
                        collide = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["isCollide"])(_this.popupWrapper, null, _this.left, _this.top);
                        if ((_this.isNestedOrVertical || _this.enableRtl) && (collide.indexOf('right') > -1
                            || collide.indexOf('left') > -1)) {
                            _this.popupObj.collision.X = 'none';
                            var offWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this.lItem, '.e-' + _this.getModuleName() + '-wrapper').offsetWidth;
                            _this.left =
                                _this.enableRtl ? Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["calculatePosition"])(_this.lItem, _this.isNestedOrVertical ? 'right' : 'left', 'top').left
                                    : _this.left - _this.popupWrapper.offsetWidth - offWidth;
                        }
                        collide = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["isCollide"])(_this.popupWrapper, null, _this.left, _this.top);
                        if (collide.indexOf('left') > -1 || collide.indexOf('right') > -1) {
                            _this.left = _this.callFit(_this.popupWrapper, true, false, _this.top, _this.left).left;
                        }
                        _this.popupWrapper.style.left = _this.left + 'px';
                    }
                    else {
                        _this.popupObj.collision = { X: 'none', Y: 'none' };
                    }
                    _this.popupWrapper.style.display = '';
                    break;
                case 'none':
                    _this.top = observedOpenArgs.top;
                    _this.left = observedOpenArgs.left;
                    break;
                case 'hamburger':
                    if (!observedOpenArgs.cancel) {
                        _this.element.classList.remove('e-hide-menu');
                        _this.triggerOpen(_this.element);
                    }
                    break;
            }
            if (menuType !== 'hamburger') {
                if (observedOpenArgs.cancel) {
                    if (_this.isMenu) {
                        _this.popupObj.destroy();
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(_this.popupWrapper);
                    }
                    _this.navIdx.pop();
                }
                else {
                    if (_this.isMenu) {
                        if (_this.hamburgerMode) {
                            _this.popupWrapper.style.top = _this.top + 'px';
                            _this.popupWrapper.style.left = 0 + 'px';
                            _this.toggleAnimation(_this.popupWrapper);
                        }
                        else {
                            _this.wireKeyboardEvent(_this.popupWrapper);
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(_this.popupWrapper, { selector: '.' + ITEM });
                            _this.popupWrapper.style.left = _this.left + 'px';
                            _this.popupWrapper.style.top = _this.top + 'px';
                            var animationOptions = _this.animationSettings.effect !== 'None' ? {
                                name: _this.animationSettings.effect, duration: _this.animationSettings.duration,
                                timingFunction: _this.animationSettings.easing
                            } : null;
                            _this.popupObj.show(animationOptions, _this.lItem);
                        }
                    }
                    else {
                        _this.setPosition(_this.lItem, _this.uList, _this.top, _this.left);
                        _this.toggleAnimation(_this.uList);
                    }
                }
            }
            if (_this.keyType === 'right') {
                var cul = _this.getUlByNavIdx();
                li.classList.remove(FOCUSED);
                if (_this.isMenu && _this.navIdx.length === 1) {
                    _this.removeLIStateByClass([SELECTED], [_this.getWrapper()]);
                }
                li.classList.add(SELECTED);
                if (_this.action === ENTER) {
                    var eventArgs_1 = { element: li, item: item, event: e };
                    _this.trigger('select', eventArgs_1);
                }
                li.focus();
                cul = _this.getUlByNavIdx();
                var index = _this.isValidLI(cul.children[0], 0, _this.action);
                cul.children[index].classList.add(FOCUSED);
                cul.children[index].focus();
            }
        });
    };
    MenuBase.prototype.checkScrollOffset = function (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 = void 0;
            var offsetRight = void 0;
            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);
            }
        }
    };
    MenuBase.prototype.addScrolling = function (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 = void 0;
            wrapper.style.overflow = 'hidden';
            if (scrollType === 'vscroll') {
                scrollObj = new _common_v_scroll__WEBPACK_IMPORTED_MODULE_4__["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 _common_h_scroll__WEBPACK_IMPORTED_MODULE_3__["HScroll"]({ enableRtl: this.enableRtl }, scrollEle);
                scrollObj.scrollStep = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-' + scrollType + '-bar', wrapper).offsetWidth;
            }
        }
    };
    MenuBase.prototype.setPosition = function (li, ul, top, left) {
        var px = 'px';
        this.toggleVisiblity(ul);
        if (ul === this.element || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(left) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(top))) {
            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 offset = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["calculatePosition"])(li, x, 'top');
                top = offset.top;
                left = offset.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) {
                    offset = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["calculatePosition"])(li, this.enableRtl ? 'right' : 'left', 'top');
                    left = offset.left;
                }
                if (this.enableRtl || xCollision) {
                    left = (this.enableRtl && xCollision) ? left : left - ul.offsetWidth;
                }
                if (collide.indexOf('bottom') > -1) {
                    offset = this.callFit(ul, false, true, top, left);
                    top = offset.top;
                }
            }
        }
        this.toggleVisiblity(ul, false);
        ul.style.top = top + px;
        ul.style.left = left + px;
    };
    MenuBase.prototype.toggleVisiblity = function (ul, isVisible) {
        if (isVisible === void 0) { isVisible = true; }
        ul.style.visibility = isVisible ? 'hidden' : '';
        ul.style.display = isVisible ? 'block' : 'none';
    };
    MenuBase.prototype.createItems = function (items) {
        var _this = this;
        var level = this.navIdx ? this.navIdx.length : 0;
        var showIcon = this.hasField(items, this.getField('iconCss', level));
        var id = 'id';
        var iconCss = 'iconCss';
        var listBaseOptions = {
            showIcon: showIcon,
            moduleName: 'menu',
            fields: this.getFields(level),
            template: this.template,
            itemCreating: function (args) {
                if (!args.curData[args.fields[id]]) {
                    args.curData[args.fields[id]] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('menuitem');
                }
                args.curData.htmlAttributes = {
                    role: 'menuitem',
                    tabindex: '-1'
                };
                if (_this.isMenu && !args.curData[_this.getField('separator', level)]) {
                    args.curData.htmlAttributes['aria-label'] = args.curData[args.fields.text];
                }
                if (args.curData[args.fields[iconCss]] === '') {
                    args.curData[args.fields[iconCss]] = null;
                }
            },
            itemCreated: function (args) {
                if (args.curData[_this.getField('separator', level)]) {
                    args.item.classList.add(SEPARATOR);
                    args.item.removeAttribute('role');
                }
                if (showIcon && !args.curData[args.fields.iconCss]
                    && !args.curData[_this.getField('separator', level)]) {
                    args.item.classList.add('e-blankicon');
                }
                if (args.curData[args.fields.child]
                    && args.curData[args.fields.child].length) {
                    var span = _this.createElement('span', { className: ICONS + ' ' + CARET });
                    args.item.appendChild(span);
                    args.item.setAttribute('aria-haspopup', 'true');
                    args.item.setAttribute('aria-expanded', 'false');
                    if (!_this.isMenu) {
                        args.item.removeAttribute('role');
                    }
                    args.item.classList.add('e-menu-caret-icon');
                }
                if (_this.isMenu && _this.template) {
                    args.item.setAttribute('id', args.curData[args.fields.id].toString());
                    args.item.removeAttribute('data-uid');
                }
                var eventArgs = { item: args.curData, element: args.item };
                _this.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;
    };
    MenuBase.prototype.moverHandler = function (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('-(.*)-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);
            }
        }
        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, SELECTED], [wrapper]);
                if (this.navIdx.length) {
                    this.isClosed = true;
                    this.closeMenu(null, e);
                }
            }
            else if (isDifferentElem) {
                if (this.navIdx.length) {
                    this.isClosed = true;
                    this.closeMenu(null, e);
                }
            }
            if (!this.isClosed) {
                this.removeStateWrapper();
            }
            this.isClosed = false;
        }
    };
    MenuBase.prototype.removeStateWrapper = function () {
        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]);
            }
        }
    };
    MenuBase.prototype.removeLIStateByClass = function (classList, element) {
        var li;
        var _loop_1 = function (i) {
            classList.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++) {
            _loop_1(i);
        }
    };
    MenuBase.prototype.getField = function (propName, level) {
        if (level === void 0) { level = 0; }
        var fieldName = this.fields[propName];
        return typeof fieldName === 'string' ? fieldName :
            (!fieldName[level] ? fieldName[fieldName.length - 1].toString()
                : fieldName[level].toString());
    };
    MenuBase.prototype.getFields = function (level) {
        if (level === void 0) { level = 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)
        };
    };
    MenuBase.prototype.hasField = function (items, field) {
        for (var i = 0, len = items.length; i < len; i++) {
            if (items[i][field]) {
                return true;
            }
        }
        return false;
    };
    MenuBase.prototype.menuHeaderClickHandler = function (e) {
        this.element.classList.contains('e-hide-menu') ? this.openHamburgerMenu(e) : this.closeHamburgerMenu(e);
    };
    MenuBase.prototype.clickHandler = function (e) {
        if (this.isTapHold) {
            this.isTapHold = false;
        }
        else {
            var wrapper = this.getWrapper();
            var trgt = e.target;
            var cli = this.cli = this.getLI(trgt);
            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 (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 = void 0;
                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 sli = this.getLIByClass(cul, SELECTED);
                                if (sli) {
                                    sli.classList.remove(SELECTED);
                                }
                                this.isClosed = true;
                                this.keyType = 'click';
                                this.closeMenu(culIdx + 1, e);
                            }
                        }
                        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' || trgt.parentElement !== wrapper) {
                        if (!cli || !cli.querySelector('.' + CARET)) {
                            this.closeMenu(null, e);
                        }
                    }
                }
            }
        }
    };
    MenuBase.prototype.afterCloseMenu = function (e) {
        if (this.showSubMenu) {
            var idx = this.navIdx.concat(this.cliIdx);
            var item = this.getItem(idx);
            if (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);
                }
                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);
                }
            }
        }
        this.keyType = '';
    };
    MenuBase.prototype.setLISelected = function (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);
    };
    MenuBase.prototype.getLIByClass = function (ul, classname) {
        for (var i = 0, len = ul.children.length; i < len; i++) {
            if (ul.children[i].classList.contains(classname)) {
                return ul.children[i];
            }
        }
        return null;
    };
    MenuBase.prototype.getItem = function (navIdx) {
        navIdx = navIdx.slice();
        var idx = navIdx.pop();
        var items = this.getItems(navIdx);
        return items[idx];
    };
    MenuBase.prototype.getItems = function (navIdx) {
        var items = this.items;
        for (var i = 0; i < navIdx.length; i++) {
            items = items[navIdx[i]][this.getField('children', i)];
        }
        return items;
    };
    MenuBase.prototype.getIdx = function (ul, li, skipHdr) {
        if (skipHdr === void 0) { skipHdr = true; }
        var idx = Array.prototype.indexOf.call(ul.children, li);
        if (skipHdr && ul.children[0].classList.contains(HEADER)) {
            idx--;
        }
        return idx;
    };
    MenuBase.prototype.getLI = function (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');
    };
    /**
     * Called internally if any of the property value changed
     * @private
     * @param {MenuBaseModel} newProp
     * @param {MenuBaseModel} oldProp
     * @returns void
     */
    MenuBase.prototype.onPropertyChanged = function (newProp, oldProp) {
        var _this = this;
        var wrapper = this.getWrapper();
        var _loop_2 = function (prop) {
            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_1.unWireEvents();
                    this_1.showItemOnClick = newProp.showItemOnClick;
                    this_1.wireEvents();
                    break;
                case 'enableScrolling':
                    if (newProp.enableScrolling) {
                        var ul_2;
                        this_1.element.classList.contains('e-vertical') ?
                            this_1.addScrolling(wrapper, this_1.element, 'vscroll', wrapper.offsetHeight, this_1.element.offsetHeight)
                            : this_1.addScrolling(wrapper, this_1.element, 'hscroll', wrapper.offsetWidth, this_1.element.offsetWidth);
                        this_1.getPopups().forEach(function (wrapper) {
                            ul_2 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-ul', wrapper);
                            _this.addScrolling(wrapper, ul_2, 'vscroll', wrapper.offsetHeight, ul_2.offsetHeight);
                        });
                    }
                    else {
                        var ul_3 = wrapper.children[0];
                        this_1.element.classList.contains('e-vertical') ? this_1.destroyScrollObj(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(ul_3, _common_v_scroll__WEBPACK_IMPORTED_MODULE_4__["VScroll"]), ul_3)
                            : this_1.destroyScrollObj(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(ul_3, _common_h_scroll__WEBPACK_IMPORTED_MODULE_3__["HScroll"]), ul_3);
                        wrapper.style.overflow = '';
                        wrapper.appendChild(this_1.element);
                        this_1.getPopups().forEach(function (wrapper) {
                            ul_3 = wrapper.children[0];
                            _this.destroyScrollObj(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(ul_3, _common_v_scroll__WEBPACK_IMPORTED_MODULE_4__["VScroll"]), ul_3);
                            wrapper.style.overflow = '';
                        });
                    }
                    break;
                case 'items':
                    var idx = void 0;
                    var navIdx = void 0;
                    var item = void 0;
                    if (!Object.keys(oldProp.items).length) {
                        var ul_4 = this_1.element;
                        ul_4.innerHTML = '';
                        var lis = [].slice.call(this_1.createItems(this_1.items).children);
                        lis.forEach(function (li) {
                            ul_4.appendChild(li);
                        });
                        for (var i = 1, count = wrapper.childElementCount; i < count; i++) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(wrapper.lastElementChild);
                        }
                        this_1.navIdx = [];
                    }
                    else {
                        var keys = Object.keys(newProp.items);
                        for (var i = 0; i < keys.length; i++) {
                            navIdx = this_1.getChangedItemIndex(newProp, [], Number(keys[i]));
                            if (navIdx.length <= this_1.getWrapper().children.length) {
                                idx = navIdx.pop();
                                item = this_1.getItems(navIdx);
                                this_1.insertAfter([item[idx]], item[idx].text);
                                this_1.removeItem(item, navIdx, idx);
                            }
                            navIdx.length = 0;
                        }
                    }
                    break;
            }
        };
        var this_1 = this;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            _loop_2(prop);
        }
    };
    MenuBase.prototype.getChangedItemIndex = function (newProp, index, idx) {
        index.push(idx);
        var key = Object.keys(newProp.items[idx]).pop();
        if (key === 'items') {
            var item = newProp.items[idx];
            this.getChangedItemIndex(item, index, Number(Object.keys(item.items).pop()));
        }
        else {
            if (key === 'isParentArray' && index.length > 1) {
                index.pop();
            }
        }
        return index;
    };
    MenuBase.prototype.removeItem = function (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
     */
    MenuBase.prototype.unWireEvents = function (targetSelctor) {
        if (targetSelctor === void 0) { targetSelctor = this.target; }
        var wrapper = this.getWrapper();
        if (targetSelctor) {
            var target = void 0;
            var touchModule = void 0;
            var targetElems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(targetSelctor);
            for (var i = 0, len = targetElems.length; i < len; 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) {
                for (var _i = 0, _a = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["getScrollableParent"])(this.targetElement); _i < _a.length; _i++) {
                    var parent_2 = _a[_i];
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(parent_2, 'scroll', this.scrollHandler);
                }
            }
        }
        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();
    };
    MenuBase.prototype.unWireKeyboardEvent = function (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();
        }
    };
    MenuBase.prototype.toggleAnimation = function (ul, isMenuOpen) {
        var _this = this;
        if (isMenuOpen === void 0) { isMenuOpen = 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 (options) {
                    if (_this.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 (options) {
                    if (_this.hamburgerMode) {
                        pElement.style.minHeight = (pUlHeight + options.element.offsetHeight) + 'px';
                    }
                },
                end: function (options) {
                    if (_this.hamburgerMode) {
                        options.element.style.position = '';
                        options.element.style.maxHeight = '';
                        pElement.style.minHeight = '';
                        options.element.style.top = 0 + 'px';
                        options.element.children[0].focus();
                        _this.triggerOpen(options.element.children[0]);
                    }
                    else {
                        _this.end(options.element, isMenuOpen);
                    }
                }
            });
        }
    };
    MenuBase.prototype.triggerOpen = function (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);
    };
    MenuBase.prototype.end = function (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 = void 0;
                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
     */
    MenuBase.prototype.getPersistData = function () {
        return '';
    };
    /**
     * Get wrapper element.
     * @returns Element
     * @private
     */
    MenuBase.prototype.getWrapper = function () {
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.e-' + this.getModuleName() + '-wrapper');
    };
    MenuBase.prototype.getIndex = function (data, isUniqueId, items, nIndex, isCallBack, level) {
        if (items === void 0) { items = this.items; }
        if (nIndex === void 0) { nIndex = []; }
        if (isCallBack === void 0) { isCallBack = false; }
        if (level === void 0) { level = 0; }
        var item;
        level = isCallBack ? level + 1 : 0;
        for (var i = 0, len = items.length; i < len; 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 !== len - 1) {
                        nIndex.pop();
                    }
                }
                else {
                    nIndex.unshift(i);
                    break;
                }
            }
            else {
                if (i === len - 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
     */
    MenuBase.prototype.enableItems = function (items, enable, isUniqueId) {
        if (enable === void 0) { enable = true; }
        var ul;
        var idx;
        var navIdx;
        var disabled = DISABLED;
        for (var i = 0; i < items.length; i++) {
            navIdx = this.getIndex(items[i], isUniqueId);
            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
     */
    MenuBase.prototype.showItems = function (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
     */
    MenuBase.prototype.hideItems = function (items, isUniqueId) {
        this.showHideItems(items, true, isUniqueId);
    };
    MenuBase.prototype.showHideItems = function (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
     */
    MenuBase.prototype.removeItems = function (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
     */
    MenuBase.prototype.insertAfter = function (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
     */
    MenuBase.prototype.insertBefore = function (items, text, isUniqueId) {
        this.insertItems(items, text, isUniqueId, false);
    };
    MenuBase.prototype.insertItems = function (items, text, isUniqueId, isAfter) {
        if (isAfter === void 0) { isAfter = 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]);
            }
        }
    };
    MenuBase.prototype.removeAttributes = function () {
        var _this = this;
        ['top', 'left', 'display', 'z-index'].forEach(function (key) {
            _this.element.style.removeProperty(key);
        });
        ['role', 'tabindex', 'class', 'style'].forEach(function (key) {
            if (key === 'class' && _this.element.classList.contains('e-menu-parent')) {
                _this.element.classList.remove('e-menu-parent');
            }
            if (['class', 'style'].indexOf(key) === -1 || !_this.element.getAttribute(key)) {
                _this.element.removeAttribute(key);
            }
            if (_this.isMenu && key === 'class' && _this.element.classList.contains('e-vertical')) {
                _this.element.classList.remove('e-vertical');
            }
        });
    };
    /**
     * Destroys the widget.
     * @returns void
     */
    MenuBase.prototype.destroy = function () {
        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);
                        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();
                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);
            }
            _super.prototype.destroy.call(this);
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MenuBase.prototype, "beforeItemRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MenuBase.prototype, "beforeOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MenuBase.prototype, "onOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MenuBase.prototype, "beforeClose", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MenuBase.prototype, "onClose", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MenuBase.prototype, "select", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], MenuBase.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MenuBase.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], MenuBase.prototype, "showItemOnClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MenuBase.prototype, "target", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], MenuBase.prototype, "filter", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], MenuBase.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], MenuBase.prototype, "enableScrolling", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, FieldSettings)
    ], MenuBase.prototype, "fields", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], MenuItem)
    ], MenuBase.prototype, "items", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, MenuAnimationSettings)
    ], MenuBase.prototype, "animationSettings", void 0);
    MenuBase = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], MenuBase);
    return MenuBase;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/common/v-scroll.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/common/v-scroll.js ***!
  \*************************************************************************/
/*! exports provided: VScroll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VScroll", function() { return VScroll; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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-vscroll';
var CLS_RTL = 'e-rtl';
var CLS_DISABLE = 'e-overlay';
var CLS_VSCROLLBAR = 'e-vscroll-bar';
var CLS_VSCROLLCON = 'e-vscroll-content';
var CLS_NAVARROW = '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 = 'e-scroll-device';
var CLS_OVERLAY = 'e-scroll-overlay';
var CLS_UPOVERLAY = 'e-scroll-up-overlay';
var CLS_DOWNOVERLAY = 'e-scroll-down-overlay';
var OVERLAY_MAXWID = 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 = /** @class */ (function (_super) {
    __extends(VScroll, _super);
    /**
     * 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) {
        return _super.call(this, options, element) || this;
    }
    /**
     * Initialize the event handler
     * @private
     */
    VScroll.prototype.preRender = function () {
        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);
        }
    };
    /**
     * To Initialize the vertical scroll rendering
     * @private
     */
    VScroll.prototype.render = function () {
        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);
            this.createOverlayElement(this.element);
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollStep) || this.scrollStep < 0) {
            this.scrollStep = this.scrollEle.offsetHeight;
            this.customStep = false;
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'wheel', this.wheelEventHandler, this);
    };
    VScroll.prototype.initialize = function () {
        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);
        for (var _i = 0, innerEle_1 = innerEle; _i < innerEle_1.length; _i++) {
            var ele_1 = innerEle_1[_i];
            scrollCnt.appendChild(ele_1);
        }
        scrollBar.appendChild(scrollCnt);
        ele.appendChild(scrollBar);
        scrollBar.style.overflowY = 'hidden';
        this.scrollEle = scrollBar;
        this.scrollItems = scrollCnt;
    };
    VScroll.prototype.getPersistData = function () {
        var keyEntity = ['scrollStep'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Returns the current module name.
     * @returns string
     * @private
     */
    VScroll.prototype.getModuleName = function () {
        return 'vScroll';
    };
    /**
     * Removes the control from the DOM and also removes all its related events.
     * @returns void
     */
    VScroll.prototype.destroy = function () {
        var el = this.element;
        el.style.display = '';
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [CLS_ROOT, CLS_DEVICE]);
        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, el);
        [].slice.call(overlays).forEach(function (ele) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ele);
        });
        for (var _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {
            var elem = _a[_i];
            el.appendChild(elem);
        }
        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;
        _super.prototype.destroy.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.
     */
    VScroll.prototype.disable = function (value) {
        var navEle = 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(navEle).forEach(function (el) {
            el.setAttribute('tabindex', !value ? '0' : '-1');
        });
    };
    VScroll.prototype.createOverlayElement = function (element) {
        var id = element.id.concat('_nav');
        var downOverlayEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: CLS_OVERLAY + ' ' + 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 + ' e-icons' });
        downEle.appendChild(navItem);
        var upEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: CLS_OVERLAY + ' ' + 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]);
    };
    VScroll.prototype.createNavIcon = function (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 + ' 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 });
        navElement.setAttribute('aria-disabled', 'true');
        var navUpItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { className: CLS_NAVUPARROW + ' ' + CLS_NAVARROW + ' 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]);
    };
    VScroll.prototype.onKeyPress = function (ev) {
        var _this = this;
        if (ev.key === 'Enter') {
            var timeoutFun_1 = function () {
                _this.keyTimeout = true;
                _this.eleScrolling(10, ev.target, true);
            };
            this.keyTimer = window.setTimeout(function () { timeoutFun_1(); }, 100);
        }
    };
    VScroll.prototype.onKeyUp = function (ev) {
        if (ev.key !== 'Enter') {
            return;
        }
        if (this.keyTimeout) {
            this.keyTimeout = false;
        }
        else {
            ev.target.click();
        }
        clearTimeout(this.keyTimer);
    };
    VScroll.prototype.eventBinding = function (element) {
        var _this = this;
        [].slice.call(element).forEach(function (ele) {
            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](ele, { tapHold: _this.tabHoldHandler.bind(_this), tapHoldThreshold: 500 });
            ele.addEventListener('keydown', _this.onKeyPress.bind(_this));
            ele.addEventListener('keyup', _this.onKeyUp.bind(_this));
            ele.addEventListener('mouseup', _this.repeatScroll.bind(_this));
            ele.addEventListener('touchend', _this.repeatScroll.bind(_this));
            ele.addEventListener('contextmenu', function (e) {
                e.preventDefault();
            });
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(ele, 'click', _this.clickEventHandler, _this);
        });
    };
    VScroll.prototype.repeatScroll = function () {
        clearInterval(this.timeout);
    };
    VScroll.prototype.tabHoldHandler = function (ev) {
        var _this = this;
        var trgt = ev.originalEvent.target;
        trgt = this.contains(trgt, CLS_VSCROLLNAV) ? trgt.firstElementChild : trgt;
        var scrollDistance = 10;
        var timeoutFun = function () {
            _this.eleScrolling(scrollDistance, trgt, true);
        };
        this.timeout = window.setInterval(function () { timeoutFun(); }, 50);
    };
    VScroll.prototype.contains = function (element, className) {
        return element.classList.contains(className);
    };
    VScroll.prototype.eleScrolling = function (scrollDis, trgt, isContinuous) {
        var rootElement = this.element;
        var classList = trgt.classList;
        if (classList.contains(CLS_VSCROLLNAV)) {
            classList = trgt.querySelector('.' + CLS_NAVARROW).classList;
        }
        if (classList.contains(CLS_NAVDOWNARROW)) {
            this.frameScrollRequest(scrollDis, 'add', isContinuous);
        }
        else if (classList.contains(CLS_NAVUPARROW)) {
            this.frameScrollRequest(scrollDis, '', isContinuous);
        }
    };
    VScroll.prototype.clickEventHandler = function (event) {
        this.eleScrolling(this.scrollStep, event.target, false);
    };
    VScroll.prototype.wheelEventHandler = function (e) {
        e.preventDefault();
        this.frameScrollRequest(this.scrollStep, (e.deltaY > 0 ? 'add' : ''), false);
    };
    VScroll.prototype.swipeHandler = function (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 () {
            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();
    };
    VScroll.prototype.scrollUpdating = function (scrollVal, action) {
        if (action === 'add') {
            this.scrollEle.scrollTop += scrollVal;
        }
        else {
            this.scrollEle.scrollTop -= scrollVal;
        }
    };
    VScroll.prototype.frameScrollRequest = function (scrollValue, action, isContinuous) {
        var _this = 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, this.element)).forEach(function (el) {
                scrollValue -= el.offsetHeight;
            });
        }
        var animate = function () {
            if (scrollValue < step) {
                window.cancelAnimationFrame(step);
            }
            else {
                _this.scrollUpdating(step, action);
                scrollValue -= step;
                window.requestAnimationFrame(animate);
            }
        };
        animate();
    };
    VScroll.prototype.touchHandler = function (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;
        }
    };
    VScroll.prototype.arrowDisabling = function (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);
            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);
            addDisableCls.setAttribute('aria-disabled', 'true');
            addDisableCls.removeAttribute('tabindex');
            removeDisableCls.classList.remove(CLS_DISABLE);
            removeDisableCls.setAttribute('aria-disabled', 'false');
            removeDisableCls.setAttribute('tabindex', '0');
        }
        this.repeatScroll();
    };
    VScroll.prototype.scrollEventHandler = function (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) {
                upOverlay.style.height = scrollTop + 'px';
            }
            else {
                upOverlay.style.height = '40px';
            }
            if ((target.scrollHeight - Math.ceil(height + scrollTop)) < OVERLAY_MAXWID) {
                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);
            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  {VScrollModel} newProp
     * @param  {VScrollModel} oldProp
     * @returns void
     * @private
     */
    VScroll.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'scrollStep':
                    break;
                case 'enableRtl':
                    newProp.enableRtl ? this.element.classList.add(CLS_RTL) : this.element.classList.remove(CLS_RTL);
                    break;
            }
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], VScroll.prototype, "scrollStep", void 0);
    VScroll = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], VScroll);
    return VScroll;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/context-menu/context-menu.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/context-menu/context-menu.js ***!
  \***********************************************************************************/
/*! exports provided: ContextMenu */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextMenu", function() { return ContextMenu; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _common_menu_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/menu-base */ "./node_modules/@syncfusion/ej2-navigations/src/common/menu-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <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 = /** @class */ (function (_super) {
    __extends(ContextMenu, _super);
    /**
     * Constructor for creating the widget.
     * @private
     */
    function ContextMenu(options, element) {
        return _super.call(this, options, element) || this;
    }
    /**
     * For internal use only - prerender processing.
     * @private
     */
    ContextMenu.prototype.preRender = function () {
        this.isMenu = false;
        this.element.id = this.element.id || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('ej2-contextmenu');
        _super.prototype.preRender.call(this);
    };
    ContextMenu.prototype.initialize = function () {
        _super.prototype.initialize.call(this);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, { 'role': 'menu', 'tabindex': '0' });
        this.element.style.zIndex = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["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
     */
    ContextMenu.prototype.open = function (top, left, target) {
        _super.prototype.openMenu.call(this, null, null, top, left, null, target);
    };
    /**
     * Closes the ContextMenu if it is opened.
     */
    ContextMenu.prototype.close = function () {
        _super.prototype.closeMenu.call(this);
    };
    /**
     * Called internally if any of the property value changed
     * @private
     * @param {ContextMenuModel} newProp
     * @param {ContextMenuModel} oldProp
     * @returns void
     */
    ContextMenu.prototype.onPropertyChanged = function (newProp, oldProp) {
        _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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
     */
    ContextMenu.prototype.getModuleName = function () {
        return 'contextmenu';
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], ContextMenu.prototype, "target", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], ContextMenu.prototype, "filter", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _common_menu_base__WEBPACK_IMPORTED_MODULE_2__["MenuItem"])
    ], ContextMenu.prototype, "items", void 0);
    ContextMenu = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], ContextMenu);
    return ContextMenu;
}(_common_menu_base__WEBPACK_IMPORTED_MODULE_2__["MenuBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/context-menu/index.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/context-menu/index.js ***!
  \****************************************************************************/
/*! exports provided: ContextMenu */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _context_menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context-menu */ "./node_modules/@syncfusion/ej2-navigations/src/context-menu/context-menu.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContextMenu", function() { return _context_menu__WEBPACK_IMPORTED_MODULE_0__["ContextMenu"]; });

/**
 * ContextMenu modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/index.js":
/*!***************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/index.js ***!
  \***************************************************************/
/*! exports provided: MenuAnimationSettings, HScroll, VScroll, Item, Toolbar, AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion, ContextMenu, Menu, TabActionSettings, TabAnimationSettings, Header, TabItem, Tab, FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView, Sidebar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/index */ "./node_modules/@syncfusion/ej2-navigations/src/common/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MenuAnimationSettings", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["MenuAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HScroll", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["HScroll"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VScroll", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["VScroll"]; });

/* harmony import */ var _toolbar_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toolbar/index */ "./node_modules/@syncfusion/ej2-navigations/src/toolbar/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return _toolbar_index__WEBPACK_IMPORTED_MODULE_1__["Item"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Toolbar", function() { return _toolbar_index__WEBPACK_IMPORTED_MODULE_1__["Toolbar"]; });

/* harmony import */ var _accordion_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./accordion/index */ "./node_modules/@syncfusion/ej2-navigations/src/accordion/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionActionSettings", function() { return _accordion_index__WEBPACK_IMPORTED_MODULE_2__["AccordionActionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionAnimationSettings", function() { return _accordion_index__WEBPACK_IMPORTED_MODULE_2__["AccordionAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionItem", function() { return _accordion_index__WEBPACK_IMPORTED_MODULE_2__["AccordionItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Accordion", function() { return _accordion_index__WEBPACK_IMPORTED_MODULE_2__["Accordion"]; });

/* harmony import */ var _context_menu_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./context-menu/index */ "./node_modules/@syncfusion/ej2-navigations/src/context-menu/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContextMenu", function() { return _context_menu_index__WEBPACK_IMPORTED_MODULE_3__["ContextMenu"]; });

/* harmony import */ var _menu_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./menu/index */ "./node_modules/@syncfusion/ej2-navigations/src/menu/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Menu", function() { return _menu_index__WEBPACK_IMPORTED_MODULE_4__["Menu"]; });

/* harmony import */ var _tab_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tab/index */ "./node_modules/@syncfusion/ej2-navigations/src/tab/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabActionSettings", function() { return _tab_index__WEBPACK_IMPORTED_MODULE_5__["TabActionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabAnimationSettings", function() { return _tab_index__WEBPACK_IMPORTED_MODULE_5__["TabAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Header", function() { return _tab_index__WEBPACK_IMPORTED_MODULE_5__["Header"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabItem", function() { return _tab_index__WEBPACK_IMPORTED_MODULE_5__["TabItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tab", function() { return _tab_index__WEBPACK_IMPORTED_MODULE_5__["Tab"]; });

/* harmony import */ var _treeview_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./treeview/index */ "./node_modules/@syncfusion/ej2-navigations/src/treeview/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldsSettings", function() { return _treeview_index__WEBPACK_IMPORTED_MODULE_6__["FieldsSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionSettings", function() { return _treeview_index__WEBPACK_IMPORTED_MODULE_6__["ActionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NodeAnimationSettings", function() { return _treeview_index__WEBPACK_IMPORTED_MODULE_6__["NodeAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TreeView", function() { return _treeview_index__WEBPACK_IMPORTED_MODULE_6__["TreeView"]; });

/* harmony import */ var _sidebar_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sidebar/index */ "./node_modules/@syncfusion/ej2-navigations/src/sidebar/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sidebar", function() { return _sidebar_index__WEBPACK_IMPORTED_MODULE_7__["Sidebar"]; });

/**
 * Navigation all modules
 */










/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/menu/index.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/menu/index.js ***!
  \********************************************************************/
/*! exports provided: Menu */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./menu */ "./node_modules/@syncfusion/ej2-navigations/src/menu/menu.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Menu", function() { return _menu__WEBPACK_IMPORTED_MODULE_0__["Menu"]; });

/**
 * Menu modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/menu/menu.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/menu/menu.js ***!
  \*******************************************************************/
/*! exports provided: Menu */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Menu", function() { return Menu; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_menu_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/menu-base */ "./node_modules/@syncfusion/ej2-navigations/src/common/menu-base.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <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 = /** @class */ (function (_super) {
    __extends(Menu, _super);
    /**
     * Constructor for creating the component.
     * @private
     */
    function Menu(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.tempItems = [];
        return _this;
    }
    /**
     * Get module name.
     * @returns string
     * @private
     */
    Menu.prototype.getModuleName = function () {
        return 'menu';
    };
    /**
     * For internal use only - prerender processing.
     * @private
     */
    Menu.prototype.preRender = function () {
        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);
        }
        _super.prototype.preRender.call(this);
    };
    Menu.prototype.initialize = function () {
        _super.prototype.initialize.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');
            }
        }
    };
    Menu.prototype.updateMenuItems = function (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
     */
    Menu.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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) {
                        _super.prototype.createHeaderContainer.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) {
                        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) {
                                    _super.prototype.createHeaderContainer.call(this);
                                }
                                this.element.previousElementSibling.classList.remove(VMENU);
                            }
                            else {
                                this.element.previousElementSibling.classList.add(VMENU);
                            }
                            this.element.classList.add('e-hide-menu');
                        }
                    }
                    break;
            }
        }
        _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
    };
    Menu.prototype.createMenuItems = function (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
     */
    Menu.prototype.open = function () {
        _super.prototype.openHamburgerMenu.call(this);
    };
    /**
     * Closes the Menu if it is opened in hamburger mode.
     */
    Menu.prototype.close = function () {
        _super.prototype.closeHamburgerMenu.call(this);
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Horizontal')
    ], Menu.prototype, "orientation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Menu.prototype, "target", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Menu.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Menu.prototype, "enableScrolling", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Menu.prototype, "hamburgerMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Menu')
    ], Menu.prototype, "title", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, _common_menu_base__WEBPACK_IMPORTED_MODULE_1__["FieldSettings"])
    ], Menu.prototype, "fields", void 0);
    Menu = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Menu);
    return Menu;
}(_common_menu_base__WEBPACK_IMPORTED_MODULE_1__["MenuBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/sidebar/index.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/sidebar/index.js ***!
  \***********************************************************************/
/*! exports provided: Sidebar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sidebar */ "./node_modules/@syncfusion/ej2-navigations/src/sidebar/sidebar.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sidebar", function() { return _sidebar__WEBPACK_IMPORTED_MODULE_0__["Sidebar"]; });

/**
 * Sidebar modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/sidebar/sidebar.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/sidebar/sidebar.js ***!
  \*************************************************************************/
/*! exports provided: Sidebar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 CONTROL = 'e-control';
var ROOT = '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 = '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 = /** @class */ (function (_super) {
    __extends(Sidebar, _super);
    function Sidebar(options, element) {
        return _super.call(this, options, element) || this;
    }
    Sidebar.prototype.preRender = function () {
        this.setWidth();
    };
    Sidebar.prototype.render = function () {
        this.initialize();
        this.wireEvents();
    };
    Sidebar.prototype.initialize = function () {
        this.setTarget();
        this.addClass();
        this.setZindex();
        if (this.enableDock) {
            this.setDock();
        }
        if (this.isOpen) {
            this.show();
        }
        else {
            this.setMediaQuery();
        }
        this.checkType(true);
        this.setType(this.type);
        this.setCloseOnDocumentClick();
        this.setEnableRTL();
    };
    Sidebar.prototype.setEnableRTL = function () {
        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));
    };
    Sidebar.prototype.setTarget = function () {
        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);
        }
    };
    Sidebar.prototype.setCloseOnDocumentClick = function () {
        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);
        }
    };
    Sidebar.prototype.setWidth = function () {
        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) });
        }
    };
    Sidebar.prototype.setDimension = function (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;
    };
    Sidebar.prototype.setZindex = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, { 'z-index': '' + this.zIndex });
    };
    Sidebar.prototype.addClass = function () {
        var classELement = document.querySelector('.e-main-content');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])((classELement ||
            this.element.nextElementSibling))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([classELement || this.element.nextElementSibling], [MAINCONTENTANIMATION]);
        }
        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);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], (this.position === 'Right') ? RIGHT : LEFT);
        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);
        }
        if (this.enableDock) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], DOCKER);
        }
        this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
        this.element.setAttribute('tabindex', this.tabIndex);
    };
    Sidebar.prototype.checkType = function (val) {
        if (!(this.type === 'Push' || this.type === 'Over' || this.type === 'Slide')) {
            this.type = 'Auto';
        }
        else {
            if (!this.element.classList.contains(CLOSE) && !val) {
                this.hide();
            }
        }
    };
    Sidebar.prototype.transitionEnd = function (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);
    };
    Sidebar.prototype.destroyBackDrop = function () {
        var sibling = document.querySelector('.e-main-content') ||
            this.element.nextElementSibling;
        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
     */
    Sidebar.prototype.hide = function (e) {
        var _this = this;
        var closeArguments = {
            model: this,
            element: this.element,
            cancel: false,
            isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
            event: (e || null)
        };
        this.trigger('close', closeArguments, function (observedcloseArgs) {
            if (!observedcloseArgs.cancel) {
                if (_this.element.classList.contains(CLOSE)) {
                    return;
                }
                if (_this.element.classList.contains(OPEN) && !_this.animate) {
                    _this.triggerChange();
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.element], CLOSE);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.element], OPEN);
                _this.enableDock ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this.element, { 'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this.dockSize) }) :
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this.element, { 'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this.width) });
                _this.setType(_this.type);
                var sibling = document.querySelector('.e-main-content') ||
                    _this.element.nextElementSibling;
                if (!_this.enableDock && sibling) {
                    sibling.style.transform = 'translateX(' + 0 + 'px)';
                    _this.position === 'Left' ? sibling.style.marginLeft = '0px' : sibling.style.marginRight = '0px';
                }
                _this.destroyBackDrop();
                _this.setAnimation();
                if (_this.type === 'Slide') {
                    document.body.classList.remove('e-sidebar-overflow');
                }
                _this.setProperties({ isOpen: false }, true);
                if (_this.enableDock) {
                    setTimeout(function () { return _this.setTimeOut(); }, 50);
                }
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(_this.element, 'transitionend', _this.transitionEnd, _this);
            }
        });
    };
    Sidebar.prototype.setTimeOut = function () {
        var sibling = document.querySelector('.e-main-content') ||
            this.element.nextElementSibling;
        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);
            }
        }
    };
    ;
    /**
     * Shows the Sidebar component, if it is in closed state.
     * @returns void
     */
    Sidebar.prototype.show = function (e) {
        var _this = this;
        var openArguments = {
            model: this,
            element: this.element,
            cancel: false,
            isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
            event: (e || null)
        };
        this.trigger('open', openArguments, function (observedopenArgs) {
            if (!observedopenArgs.cancel) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.element], VISIBILITY);
                if (_this.element.classList.contains(OPEN)) {
                    return;
                }
                if (_this.element.classList.contains(CLOSE) && !_this.animate) {
                    _this.triggerChange();
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.element], [OPEN, TRASITION]);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this.element, { 'transform': '' });
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.element], CLOSE);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this.element, { 'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this.width) });
                _this.setType(_this.type);
                _this.createBackDrop();
                _this.setAnimation();
                if (_this.type === 'Slide') {
                    document.body.classList.add('e-sidebar-overflow');
                }
                _this.setProperties({ isOpen: true }, true);
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(_this.element, 'transitionend', _this.transitionEnd, _this);
            }
        });
    };
    Sidebar.prototype.setAnimation = function () {
        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);
        }
    };
    Sidebar.prototype.triggerChange = function () {
        var changeArguments = { name: 'change', element: this.element };
        this.trigger('change', changeArguments);
    };
    Sidebar.prototype.setDock = function () {
        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) });
        }
    };
    Sidebar.prototype.createBackDrop = function () {
        if (this.target && this.showBackdrop) {
            var sibling = document.querySelector('.e-main-content') ||
                this.element.nextElementSibling;
            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);
        }
    };
    Sidebar.prototype.getPersistData = function () {
        return this.addOnPersist(['type', 'position', 'isOpen']);
    };
    /**
     * Returns the current module name.
     * @returns string
     * @private
     */
    Sidebar.prototype.getModuleName = function () {
        return 'sidebar';
    };
    /**
     * Shows or hides the Sidebar based on the current state.
     * @returns void
     */
    Sidebar.prototype.toggle = function (e) {
        this.element.classList.contains(OPEN) ? this.hide() : this.show();
    };
    Sidebar.prototype.getState = function () {
        return this.element.classList.contains(OPEN) ? true : false;
    };
    Sidebar.prototype.setMediaQuery = function () {
        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.show();
            }
            else if (this.getState()) {
                this.hide();
            }
        }
    };
    Sidebar.prototype.resize = function (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();
    };
    Sidebar.prototype.documentclickHandler = function (e) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + CONTROL + '' + '.' + ROOT)) {
            return;
        }
        this.hide(e);
    };
    Sidebar.prototype.enableGestureHandler = function (args) {
        if (this.position === 'Left' && args.swipeDirection === 'Right' &&
            (args.startX <= 20 && args.distanceX >= 50 && args.velocity >= 0.5)) {
            this.show();
        }
        else if (this.position === 'Left' && args.swipeDirection === 'Left') {
            this.hide();
        }
        else if (this.position === 'Right' && args.swipeDirection === 'Right') {
            this.hide();
        }
        else if (this.position === 'Right' && args.swipeDirection === 'Left'
            && (window.innerWidth - args.startX <= 20 && args.distanceX >= 50 && args.velocity >= 0.5)) {
            this.show();
        }
    };
    Sidebar.prototype.setEnableGestures = function () {
        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();
            }
        }
    };
    Sidebar.prototype.wireEvents = function () {
        this.setEnableGestures();
        window.addEventListener('resize', this.resize.bind(this));
    };
    Sidebar.prototype.unWireEvents = function () {
        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();
        }
    };
    Sidebar.prototype.onPropertyChanged = function (newProp, oldProp) {
        var sibling = document.querySelector('.e-main-content') ||
            this.element.nextElementSibling;
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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);
                    }
                    else {
                        _super.prototype.refresh.call(this);
                    }
                    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;
            }
        }
    };
    Sidebar.prototype.setType = function (type) {
        var elementWidth = this.element.getBoundingClientRect().width;
        this.setZindex();
        var sibling = document.querySelector('.e-main-content') ||
            this.element.nextElementSibling;
        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
     */
    Sidebar.prototype.destroy = function () {
        _super.prototype.destroy.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 = '';
        (!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.element.nextElementSibling;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(sibling)) {
            sibling.style.margin = '';
            sibling.style.transform = '';
        }
        this.unWireEvents();
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Sidebar.prototype, "dockSize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sidebar.prototype, "mediaQuery", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Sidebar.prototype, "enableDock", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('en-US')
    ], Sidebar.prototype, "locale", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Sidebar.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Sidebar.prototype, "enableGestures", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Sidebar.prototype, "isOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Sidebar.prototype, "enableRtl", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Sidebar.prototype, "animate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Sidebar.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Sidebar.prototype, "closeOnDocumentClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')
    ], Sidebar.prototype, "position", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Sidebar.prototype, "target", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Sidebar.prototype, "showBackdrop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], Sidebar.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Sidebar.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)
    ], Sidebar.prototype, "zIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sidebar.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sidebar.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sidebar.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sidebar.prototype, "change", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Sidebar.prototype, "destroyed", void 0);
    Sidebar = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Sidebar);
    return Sidebar;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/tab/index.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/tab/index.js ***!
  \*******************************************************************/
/*! exports provided: TabActionSettings, TabAnimationSettings, Header, TabItem, Tab */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _tab__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tab */ "./node_modules/@syncfusion/ej2-navigations/src/tab/tab.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabActionSettings", function() { return _tab__WEBPACK_IMPORTED_MODULE_0__["TabActionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabAnimationSettings", function() { return _tab__WEBPACK_IMPORTED_MODULE_0__["TabAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Header", function() { return _tab__WEBPACK_IMPORTED_MODULE_0__["Header"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabItem", function() { return _tab__WEBPACK_IMPORTED_MODULE_0__["TabItem"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tab", function() { return _tab__WEBPACK_IMPORTED_MODULE_0__["Tab"]; });

/**
 * Tab modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/tab/tab.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/tab/tab.js ***!
  \*****************************************************************/
/*! exports provided: TabActionSettings, TabAnimationSettings, Header, TabItem, Tab */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _toolbar_toolbar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toolbar/toolbar */ "./node_modules/@syncfusion/ej2-navigations/src/toolbar/toolbar.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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_TAB = 'e-tab';
var CLS_HEADER = 'e-tab-header';
var CLS_CONTENT = 'e-content';
var CLS_NEST = 'e-nested';
var CLS_ITEMS = 'e-items';
var CLS_ITEM = 'e-item';
var CLS_TEMPLATE = 'e-template';
var CLS_RTL = 'e-rtl';
var CLS_ACTIVE = 'e-active';
var CLS_DISABLE = 'e-disable';
var CLS_HIDDEN = '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 = 'e-overlay';
var CLS_HSCRCNT = 'e-hscroll-content';
var CLS_VSCRCNT = 'e-vscroll-content';
var CLS_HORIZONTAL = 'e-horizontal';
var CLS_VTAB = 'e-vertical-tab';
var CLS_VERTICAL = 'e-vertical';
var CLS_VLEFT = 'e-vertical-left';
var CLS_VRIGHT = 'e-vertical-right';
var TabActionSettings = /** @class */ (function (_super) {
    __extends(TabActionSettings, _super);
    function TabActionSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SlideLeftIn')
    ], TabActionSettings.prototype, "effect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(600)
    ], TabActionSettings.prototype, "duration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('ease')
    ], TabActionSettings.prototype, "easing", void 0);
    return TabActionSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

var TabAnimationSettings = /** @class */ (function (_super) {
    __extends(TabAnimationSettings, _super);
    function TabAnimationSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ effect: 'SlideLeftIn', duration: 600, easing: 'ease' }, TabActionSettings)
    ], TabAnimationSettings.prototype, "previous", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ effect: 'SlideRightIn', duration: 600, easing: 'ease' }, TabActionSettings)
    ], TabAnimationSettings.prototype, "next", void 0);
    return TabAnimationSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Objects used for configuring the Tab item header properties.
 */
var Header = /** @class */ (function (_super) {
    __extends(Header, _super);
    function Header() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Header.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Header.prototype, "iconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('left')
    ], Header.prototype, "iconPosition", void 0);
    return Header;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * An array of object that is used to configure the Tab.
 */
var TabItem = /** @class */ (function (_super) {
    __extends(TabItem, _super);
    function TabItem() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, Header)
    ], TabItem.prototype, "header", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], TabItem.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], TabItem.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TabItem.prototype, "disabled", void 0);
    return TabItem;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * 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 = /** @class */ (function (_super) {
    __extends(Tab, _super);
    /**
     * 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 _this = _super.call(this, options, element) || this;
        _this.show = {};
        _this.hide = {};
        _this.animateOptions = {};
        _this.animObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](_this.animateOptions);
        _this.maxHeight = 0;
        _this.title = 'Close';
        _this.lastIndex = 0;
        _this.isAdd = false;
        _this.isIconAlone = false;
        _this.resizeContext = _this.refreshActElePosition.bind(_this);
        /**
         * Contains the keyboard configuration of the Tab.
         */
        _this.keyConfigs = {
            tab: 'tab',
            home: 'home',
            end: 'end',
            enter: 'enter',
            space: 'space',
            delete: 'delete',
            moveLeft: 'leftarrow',
            moveRight: 'rightarrow',
            moveUp: 'uparrow',
            moveDown: 'downarrow'
        };
        return _this;
    }
    /**
     * Removes the component from the DOM and detaches all its related event handlers, attributes and classes.
     * @returns void
     */
    Tab.prototype.destroy = function () {
        var _this = 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) {
            _this.element.removeAttribute(val);
        });
        this.expTemplateContent();
        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, this.element);
            this.element.classList.remove(CLS_TEMPLATE);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cntEle)) {
                cntEle.innerHTML = this.cnt;
            }
        }
        _super.prototype.destroy.call(this);
        this.trigger('destroyed');
    };
    /**
     * Initialize component
     * @private
     */
    Tab.prototype.preRender = function () {
        var nested = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.' + CLS_CONTENT);
        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);
            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
     */
    Tab.prototype.render = function () {
        this.btnCls = this.createElement('span', { className: CLS_ICONS + ' ' + CLS_ICON_CLOSE, attrs: { title: this.title } });
        this.renderContainer();
        this.refreshTabTemplate();
        this.wireEvents();
        this.initRender = false;
    };
    Tab.prototype.renderContainer = function () {
        var ele = this.element;
        if (this.items.length > 0 && ele.children.length === 0) {
            ele.appendChild(this.createElement('div', { className: CLS_CONTENT }));
            this.setOrientation(this.headerPlacement, this.createElement('div', { className: CLS_HEADER }));
            this.isTemplate = false;
        }
        else if (this.element.children.length > 0) {
            this.isTemplate = true;
            ele.classList.add(CLS_TEMPLATE);
            var header = ele.querySelector('.' + CLS_HEADER);
            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, this.element)) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, this.element))) {
            this.renderHeader();
            this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER + ' .' + 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 = void 0;
                this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER + ' .' + CLS_TB_ITEMS, this.element);
                this.bdrLine = this.createElement('div', { className: CLS_INDICATOR + ' ' + CLS_HIDDEN + ' ' + 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);
        }
    };
    Tab.prototype.renderHeader = function () {
        var _this = this;
        var hdrPlace = this.headerPlacement;
        var tabItems = [];
        this.hdrEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, this.element);
        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)) {
                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);
                }
                this.hdrEle.appendChild(this.createElement('div', { className: CLS_ITEMS }));
                hdrItems.forEach(function (item, index) {
                    _this.lastIndex = index;
                    var attr = {
                        className: CLS_ITEM, id: CLS_ITEM + '_' + index,
                        attrs: { role: 'tab', 'aria-controls': CLS_CONTENT + '_' + index, 'aria-selected': 'false' }
                    };
                    var txt = _this.createElement('span', {
                        className: CLS_TEXT, innerHTML: item, attrs: { 'role': 'presentation' }
                    }).outerHTML;
                    var cont = _this.createElement('div', {
                        className: CLS_TEXT_WRAP, innerHTML: txt + _this.btnCls.outerHTML
                    }).outerHTML;
                    var wrap = _this.createElement('div', { className: CLS_WRAP, innerHTML: cont, attrs: { tabIndex: '-1' } });
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_ITEMS, _this.element).appendChild(_this.createElement('div', attr));
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, _this.element)[index].appendChild(wrap);
                });
            }
        }
        this.tbObj = new _toolbar_toolbar__WEBPACK_IMPORTED_MODULE_1__["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)
        });
        this.tbObj.isStringTemplate = true;
        this.tbObj.createElement = this.createElement;
        this.tbObj.appendTo(this.hdrEle);
        this.updateOrientationAttribute();
        this.setCloseButton(this.showCloseButton);
    };
    Tab.prototype.renderContent = function () {
        this.cntEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, 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;
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(contents.item(i), { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + i });
                    contents.item(i).id = CLS_CONTENT + '_' + i;
                }
            }
        }
    };
    Tab.prototype.reRenderItems = function () {
        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) });
        }
    };
    Tab.prototype.parseObject = function (items, index) {
        var _this = this;
        var tbCount = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element).length;
        var tItems = [];
        var txtWrapEle;
        var spliceArray = [];
        var i = 0;
        items.forEach(function (item, i) {
            var pos = (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.iconCss)) ? '' : item.header.iconCss;
            if (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.header.text;
            _this.lastIndex = ((tbCount === 0) ? i : ((_this.isReplace) ? (index + i) : (_this.lastIndex + 1)));
            var disabled = (item.disabled) ? ' ' + CLS_DISABLE + ' ' + CLS_OVERLAY : '';
            txtWrapEle = _this.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 {
                _this.headerTextCompile(txtWrapEle, txt, i);
            }
            var tEle;
            var icon = _this.createElement('span', {
                className: CLS_ICONS + ' ' + CLS_TAB_ICON + ' ' + CLS_ICON + '-' + pos + ' ' + css
            });
            var tCont = _this.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;
                _this.isIconAlone = false;
            }
            else {
                tEle = ((css === '') ? txtWrapEle : icon);
                if (tEle === icon) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(txtWrapEle);
                    tCont.appendChild(icon);
                    _this.isIconAlone = true;
                }
            }
            var wrapAttrs = (item.disabled) ? {} : { tabIndex: '-1' };
            tCont.appendChild(_this.btnCls.cloneNode(true));
            var wrap = _this.createElement('div', { className: CLS_WRAP, attrs: wrapAttrs });
            wrap.appendChild(tCont);
            if (_this.itemIndexArray === []) {
                _this.itemIndexArray.push(CLS_ITEM + '_' + _this.lastIndex);
            }
            else {
                _this.itemIndexArray.splice((index + i), 0, CLS_ITEM + '_' + _this.lastIndex);
            }
            var attrObj = {
                id: CLS_ITEM + '_' + _this.lastIndex, role: 'tab', 'aria-selected': 'false'
            };
            var tItem = { htmlAttributes: attrObj, template: wrap };
            tItem.cssClass = item.cssClass + ' ' + disabled + ' ' + ((css !== '') ? 'e-i' + pos : '') + ' ' + ((!txtEmpty) ? CLS_ICON : '');
            if (pos === 'top' || pos === 'bottom') {
                _this.element.classList.add('e-vertical-icon');
            }
            tItems.push(tItem);
            i++;
        });
        if (!this.isAdd) {
            spliceArray.forEach(function (spliceItemIndex) {
                _this.items.splice(spliceItemIndex, 1);
            });
        }
        (this.isIconAlone) ? this.element.classList.add(CLS_ICON_TAB) : this.element.classList.remove(CLS_ICON_TAB);
        return tItems;
    };
    Tab.prototype.refreshTabTemplate = function () {
        var blazorContain = Object.keys(window);
        for (var a = 0, length_1 = this.items.length; a < length_1; a++) {
            var item = this.items[a];
            if (item.content && blazorContain.indexOf('Blazor') > -1 && !this.isStringTemplate &&
                item.content.indexOf('<div>Blazor') === 0) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + a + '_content', 'Content');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + a + '_content', 'Content', item);
            }
        }
    };
    Tab.prototype.removeActiveClass = function (id) {
        var hdrActEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(':root .' + CLS_HEADER + ' .' + CLS_TB_ITEM + '.' + CLS_ACTIVE, this.element)[0];
        if (this.headerPlacement === 'Bottom') {
            hdrActEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(':root .' + CLS_HEADER + ' .' + CLS_TB_ITEM + '.' + CLS_ACTIVE, this.element.children[1])[0];
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(hdrActEle)) {
            hdrActEle.classList.remove(CLS_ACTIVE);
        }
    };
    Tab.prototype.checkPopupOverflow = function (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.cloneNode(true), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_POPUP, this.tbPop)[0]);
            ele.outerHTML = '';
        }
        return true;
    };
    Tab.prototype.popupHandler = function (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.cloneNode(true));
            this.actEleId = target.id;
            target.outerHTML = '';
            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;
    };
    Tab.prototype.updateOrientationAttribute = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, { 'aria-orientation': (this.isVertical() ? 'vertical' : 'horizontal') });
    };
    Tab.prototype.setCloseButton = function (val) {
        var trg = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, this.element);
        (val === true) ? trg.classList.add(CLS_CLOSE_SHOW) : trg.classList.remove(CLS_CLOSE_SHOW);
        this.tbObj.refreshOverflow();
        this.refreshActElePosition();
    };
    Tab.prototype.prevCtnAnimation = function (prev, current) {
        var animation;
        var checkRTL = this.enableRtl || this.element.classList.contains(CLS_RTL);
        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;
    };
    Tab.prototype.triggerPrevAnimation = function (oldCnt, prevIndex) {
        var _this = 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);
                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 && !_this.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);
        }
    };
    Tab.prototype.triggerAnimation = function (id, value) {
        var _this = this;
        var prevIndex = this.prevIndex;
        var itemCollection = [].slice.call(this.element.querySelector('.' + CLS_CONTENT).children);
        var oldCnt;
        itemCollection.forEach(function (item) {
            if (item.id === _this.prevActiveEle) {
                oldCnt = item;
            }
        });
        var prevEle = this.tbItem[prevIndex];
        var no = this.extIndex(this.tbItem[this.selectedItem].id);
        var newCnt = this.getTrgContent(this.cntEle, no);
        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);
        }
        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);
            }
            return;
        }
        var cnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, 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);
            _this.setActiveBorder();
        };
        animateObj.end = function () {
            cnt.classList.remove(CLS_PROGRESS);
            newCnt.classList.add(CLS_ACTIVE);
        };
        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);
        }
        else {
            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animateObj).animate(newCnt);
        }
    };
    Tab.prototype.keyPressed = function (trg) {
        var trgParent = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trg, '.' + CLS_HEADER + ' .' + 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) === false) {
                this.select(trgIndex);
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popEle)) {
                    this.popObj.hide(this.hide);
                }
            }
        }
    };
    Tab.prototype.getEleIndex = function (item) {
        return Array.prototype.indexOf.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_HEADER + ' .' + CLS_TB_ITEM, this.element), item);
    };
    Tab.prototype.extIndex = function (id) {
        return id.replace(CLS_ITEM + '_', '');
    };
    Tab.prototype.expTemplateContent = function () {
        var _this = this;
        this.templateEle.forEach(function (eleStr) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.element.querySelector(eleStr))) {
                document.body.appendChild(_this.element.querySelector(eleStr)).style.display = 'none';
            }
        });
    };
    Tab.prototype.templateCompile = function (ele, cnt, index) {
        var tempEle = this.createElement('div');
        this.compileElement(tempEle, cnt, 'content', index);
        if (tempEle.childNodes.length !== 0) {
            ele.appendChild(tempEle);
        }
    };
    Tab.prototype.compileElement = function (ele, val, prop, index) {
        var blazorContain = Object.keys(window);
        var templateFn;
        if (typeof val === 'string' && blazorContain.indexOf('Blazor') > -1 && val.indexOf('<div>Blazor') !== 0) {
            val = val.trim();
            ele.innerHTML = 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)) {
            var templateProps = void 0;
            if (ele.classList.contains(CLS_TEXT)) {
                templateProps = this.element.id + 'text';
            }
            else if (ele.classList.contains(CLS_CONTENT)) {
                templateProps = this.element.id + index + '_content';
            }
            templateFUN = templateFn({}, this, prop, templateProps, this.isStringTemplate);
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(templateFn) && templateFUN.length > 0) {
            [].slice.call(templateFUN).forEach(function (el) {
                ele.appendChild(el);
            });
        }
    };
    Tab.prototype.headerTextCompile = function (element, text, index) {
        this.compileElement(element, text, 'headerText', index);
    };
    Tab.prototype.getContent = function (ele, cnt, callType, index) {
        var eleStr;
        if (typeof cnt === 'string' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cnt.innerHTML)) {
            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());
            }
        }
    };
    Tab.prototype.getTrgContent = function (cntEle, no) {
        var ele;
        if (this.element.classList.contains(CLS_NEST)) {
            ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_NEST + '> .' + CLS_CONTENT + ' > #' + CLS_CONTENT + '_' + no, this.element);
        }
        else {
            ele = this.findEle(cntEle.children, CLS_CONTENT + '_' + no);
        }
        return ele;
    };
    Tab.prototype.findEle = function (items, key) {
        var ele;
        for (var i = 0; i < items.length; i++) {
            if (items[i].id === key) {
                ele = items[i];
                break;
            }
        }
        return ele;
    };
    Tab.prototype.isVertical = function () {
        var isVertical = (this.headerPlacement === 'Left' || this.headerPlacement === 'Right') ? true : false;
        this.scrCntClass = (isVertical) ? CLS_VSCRCNT : CLS_HSCRCNT;
        return isVertical;
    };
    Tab.prototype.addVerticalClass = function () {
        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, tbPos]);
            this.element.classList.add(CLS_VTAB);
        }
    };
    Tab.prototype.updatePopAnimationConfig = function () {
        this.show = { name: (this.isVertical() ? 'FadeIn' : 'SlideDown'), duration: 100 };
        this.hide = { name: (this.isVertical() ? 'FadeOut' : 'SlideUp'), duration: 100 };
    };
    Tab.prototype.changeOrientation = function (place) {
        this.setOrientation(place, this.hdrEle);
        var isVertical = this.hdrEle.classList.contains(CLS_VERTICAL) ? 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, CLS_VLEFT, CLS_VRIGHT]);
        if (isVertical !== this.isVertical()) {
            this.tbObj.setProperties({ height: (this.isVertical() ? '100%' : 'auto'), width: (this.isVertical() ? 'auto' : '100%') }, true);
            this.tbObj.changeOrientation();
            this.updatePopAnimationConfig();
        }
        this.addVerticalClass();
        this.updateOrientationAttribute();
        this.select(this.selectedItem);
    };
    Tab.prototype.setOrientation = function (place, ele) {
        if (place === 'Bottom' && Array.prototype.indexOf.call(this.element.children, ele) !== 1) {
            this.element.appendChild(ele);
        }
        else {
            this.element.insertBefore(ele, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, this.element));
        }
    };
    Tab.prototype.setCssClass = function (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]);
            }
        }
    };
    Tab.prototype.setContentHeight = function (val) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cntEle)) {
            return;
        }
        var hdrEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, this.element);
        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__["setStyleAttribute"])(this.element, { 'height': '100%' });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.cntEle, { 'height': 'auto' });
        }
        else if (this.heightAdjustMode === 'Auto') {
            var cnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_CONTENT + ' > .' + CLS_ITEM, this.element);
            if (this.isTemplate === true) {
                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, this.element);
                if (val === true) {
                    this.cntEle.appendChild(this.createElement('div', {
                        id: (CLS_CONTENT + '_' + 0), className: CLS_ITEM + ' ' + CLS_ACTIVE,
                        attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + 0 }
                    }));
                }
                var ele = this.cntEle.children.item(0);
                for (var i = 0; i < this.items.length; i++) {
                    this.getContent(ele, this.items[i].content, 'clone', i);
                    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);
            }
            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' });
        }
    };
    Tab.prototype.getHeight = function (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'));
    };
    Tab.prototype.setActiveBorder = function () {
        var trg;
        var bar;
        var scrollCnt;
        var trgHdrEle;
        if (this.headerPlacement === 'Bottom') {
            trgHdrEle = this.element.children[1];
            trg = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE, this.element.children[1]);
        }
        else {
            trgHdrEle = this.element.children[0];
            trg = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE, this.element);
        }
        if (trg === null) {
            return;
        }
        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);
        }
    };
    Tab.prototype.setActive = function (value) {
        this.tbItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_HEADER + ' .' + CLS_TB_ITEM, this.element);
        var trg = this.tbItem[value];
        if (value >= 0) {
            this.setProperties({ selectedItem: value }, true);
        }
        if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
            return;
        }
        if (trg.classList.contains(CLS_ACTIVE)) {
            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 + '_' + value });
        }
        var id = trg.id;
        this.removeActiveClass(id);
        trg.classList.add(CLS_ACTIVE);
        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 + '_' + 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, this.element).children.length > 0) {
                var trg_1 = this.findEle(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, this.element).children, CLS_CONTENT + '_' + no);
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trg_1)) {
                    trg_1.classList.add(CLS_ACTIVE);
                }
                this.triggerAnimation(id, this.enableAnimation);
            }
        }
        else {
            this.cntEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TAB + ' > .' + CLS_CONTENT, 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 + '_' + this.extIndex(id), className: CLS_ITEM + ' ' + CLS_ACTIVE,
                    attrs: { role: 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + this.extIndex(id) }
                }));
                var eleTrg = this.getTrgContent(this.cntEle, this.extIndex(id));
                var itemIndex = Array.prototype.indexOf.call(this.itemIndexArray, trg.id);
                this.getContent(eleTrg, this.items[itemIndex].content, 'render', itemIndex);
            }
            else {
                item.classList.add(CLS_ACTIVE);
            }
            this.triggerAnimation(id, this.enableAnimation);
        }
        this.setActiveBorder();
        var curActItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER + ' #' + id, this.element);
        this.refreshItemVisibility(curActItem);
        if (!this.initRender) {
            curActItem.firstChild.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 + '_' + this.selectingID, this.content),
            isSwiped: this.isSwipeed
        };
        if (!this.initRender || this.selectedItem !== 0) {
            this.trigger('selected', eventArg);
        }
    };
    Tab.prototype.setItems = function (items) {
        this.isReplace = true;
        this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER + ' .' + CLS_TB_ITEMS, this.element);
        this.tbObj.items = this.parseObject(items, 0);
        this.tbObj.dataBind();
        this.isReplace = false;
    };
    Tab.prototype.setRTL = function (value) {
        this.tbObj.enableRtl = value;
        this.tbObj.dataBind();
        this.setCssClass(this.element, CLS_RTL, value);
        this.refreshActiveBorder();
    };
    Tab.prototype.refreshActiveBorder = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.bdrLine)) {
            this.bdrLine.classList.add(CLS_HIDDEN);
        }
        this.setActiveBorder();
    };
    Tab.prototype.showPopup = function (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);
        }
    };
    Tab.prototype.wireEvents = function () {
        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'
        });
    };
    Tab.prototype.unWireEvents = function () {
        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);
        this.element.classList.remove(CLS_FOCUS);
    };
    Tab.prototype.clickHandler = function (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 (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trgParent) && trgIndex !== this.selectedItem) {
                this.select(trgIndex);
            }
        }
    };
    Tab.prototype.swipeHandler = function (e) {
        if (e.velocity < 3 && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.originalEvent.changedTouches)) {
            return;
        }
        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)) {
                    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)) {
                    this.select(i);
                    break;
                }
            }
        }
        this.isSwipeed = false;
    };
    Tab.prototype.spaceKeyDown = function (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);
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(clstHead)) {
                e.preventDefault();
            }
        }
    };
    Tab.prototype.keyHandler = function (e) {
        if (this.element.classList.contains(CLS_DISABLE)) {
            return;
        }
        this.element.classList.add(CLS_FOCUS);
        var trg = e.target;
        var actEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER + ' .' + CLS_ACTIVE, this.element);
        var tabItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM + ':not(.' + CLS_TB_POPUP + ')', this.element);
        this.popEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER + ' .' + CLS_TB_POP, this.element);
        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)) {
                    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) === 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.firstChild.focus();
                    }
                    this.removeTab(this.getEleIndex(trgParent));
                }
                this.setActiveBorder();
                break;
        }
    };
    Tab.prototype.refreshActElePosition = function () {
        var activeEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE, this.element);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeEle)) {
            this.select(this.getEleIndex(activeEle));
        }
        this.refreshActiveBorder();
    };
    Tab.prototype.refreshItemVisibility = function (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;
        }
    };
    Tab.prototype.hoverHandler = function (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'));
        }
    };
    Tab.prototype.evalOnPropertyChangeItems = function (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 + '_' + index, this.element);
                var cntItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT + ' #' + CLS_CONTENT + '_' + index, this.element);
                if (property === 'header') {
                    var icon = this.items[index].header.iconCss;
                    var textVal = 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);
                        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));
                }
            }
        }
        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, this.element);
                while (selectElement.firstElementChild) {
                    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.
     */
    Tab.prototype.enableTab = function (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, CLS_OVERLAY);
            tbItems.firstChild.setAttribute('tabindex', '-1');
        }
        else {
            tbItems.classList.add(CLS_DISABLE, CLS_OVERLAY);
            tbItems.firstChild.removeAttribute('tabindex');
            if (tbItems.classList.contains(CLS_ACTIVE)) {
                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.
     */
    Tab.prototype.addTab = function (items, index) {
        var _this = this;
        var addArgs = { addedItems: items, cancel: false };
        if (!this.isReplace) {
            this.trigger('adding', addArgs, function (tabAddingArgs) {
                if (!tabAddingArgs.cancel) {
                    _this.addingTabContent(items, index);
                }
            });
        }
        else {
            this.addingTabContent(items, index);
        }
    };
    Tab.prototype.addingTabContent = function (items, index) {
        var _this = this;
        var lastEleIndex = 0;
        this.hdrEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, 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);
            }
            this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER + ' .' + CLS_TB_ITEMS, this.element);
            this.isAdd = true;
            var tabItems = this.parseObject(items, index);
            this.isAdd = false;
            var i_1 = 0;
            var textValue_1;
            items.forEach(function (item, place) {
                textValue_1 = item.header.text;
                if (!((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(textValue_1) || (textValue_1.length === 0) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header.iconCss)))) {
                    _this.items.splice((index + i_1), 0, item);
                    i_1++;
                }
                if (_this.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 = _this.createElement('div', {
                        id: CLS_CONTENT + '_' + no, className: CLS_ITEM, attrs: { role: 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + no }
                    });
                    _this.cntEle.insertBefore(ele, _this.cntEle.children[(index + place)]);
                    var eleTrg = _this.getTrgContent(_this.cntEle, no.toString());
                    _this.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.
     */
    Tab.prototype.removeTab = function (index) {
        var _this = 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) {
                _this.tbObj.removeItems(index);
                _this.items.splice(index, 1);
                _this.itemIndexArray.splice(index, 1);
                _this.refreshActiveBorder();
                var cntTrg = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + CLS_CONTENT + '_' + _this.extIndex(trg.id), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, _this.element));
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cntTrg)) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(cntTrg);
                }
                _this.trigger('removed', tabRemovingArgs);
                if (trg.classList.contains(CLS_ACTIVE)) {
                    // 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 + ')', _this.element).length - 1) ? index - 1 : index;
                    _this.enableAnimation = false;
                    _this.selectedItem = index;
                    _this.select(index);
                }
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, _this.element).length === 0) {
                    _this.hdrEle.style.display = 'none';
                }
                _this.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.
     */
    Tab.prototype.hideTab = function (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);
        if (value === true) {
            item.classList.add(CLS_HIDDEN);
            items = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM + ':not(.' + CLS_HIDDEN + ')', this.tbItems);
            if (items.length !== 0 && item.classList.contains(CLS_ACTIVE)) {
                if (index !== 0) {
                    for (var i = index - 1; i >= 0; i--) {
                        if (!this.tbItem[i].classList.contains(CLS_HIDDEN)) {
                            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)) {
                                    this.select(k);
                                    break;
                                }
                            }
                        }
                    }
                }
                else {
                    for (var k = index + 1; k < this.tbItem.length; k++) {
                        if (!this.tbItem[k].classList.contains(CLS_HIDDEN)) {
                            this.select(k);
                            break;
                        }
                    }
                }
            }
            else if (items.length === 0) {
                this.element.classList.add(CLS_HIDDEN);
            }
        }
        else {
            this.element.classList.remove(CLS_HIDDEN);
            items = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM + ':not(.' + CLS_HIDDEN + ')', this.tbItems);
            if (items.length === 0) {
                this.select(index);
            }
            item.classList.remove(CLS_HIDDEN);
        }
        this.setActiveBorder();
        item.setAttribute('aria-hidden', '' + value);
    };
    /**
     * 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.
     */
    Tab.prototype.select = function (args) {
        var _this = this;
        this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER + ' .' + CLS_TB_ITEMS, this.element);
        this.tbItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_HEADER + ' .' + CLS_TB_ITEM, this.element);
        this.content = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, 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)) {
            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 + '_' + 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 + '_' + this.selectingID, this.content) : null,
            isSwiped: this.isSwipeed,
            cancel: false
        };
        if (!this.initRender || this.selectedItem !== 0) {
            this.trigger('selecting', eventArg, function (selectArgs) {
                if (!selectArgs.cancel) {
                    _this.selectingContent(args);
                }
            });
        }
        else {
            this.selectingContent(args);
        }
    };
    Tab.prototype.selectingContent = function (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)) {
                for (var i = args + 1; i < this.items.length; i++) {
                    if (this.items[i].disabled === false) {
                        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.
     */
    Tab.prototype.disable = function (value) {
        this.setCssClass(this.element, CLS_DISABLE, value);
        this.element.setAttribute('aria-disabled', '' + value);
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @returns string
     */
    Tab.prototype.getPersistData = function () {
        return this.addOnPersist(['selectedItem', 'actEleId']);
    };
    /**
     * Returns the current module name.
     * @returns string
     * @private
     */
    Tab.prototype.getModuleName = function () {
        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
     */
    Tab.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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) });
                    this.setContentHeight(false);
                    break;
                case 'cssClass':
                    this.setCssClass(this.element, newProp.cssClass, true);
                    break;
                case 'items':
                    this.evalOnPropertyChangeItems(newProp, oldProp);
                    break;
                case 'showCloseButton':
                    this.setCloseButton(newProp.showCloseButton);
                    break;
                case 'selectedItem':
                    this.selectedItem = oldProp.selectedItem;
                    this.select(newProp.selectedItem);
                    break;
                case 'headerPlacement':
                    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':
                    this.setContentHeight(false);
                    this.select(this.selectedItem);
                    break;
            }
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], TabItem)
    ], Tab.prototype, "items", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')
    ], Tab.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Tab.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Tab.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Tab.prototype, "selectedItem", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Top')
    ], Tab.prototype, "headerPlacement", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Content')
    ], Tab.prototype, "heightAdjustMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Scrollable')
    ], Tab.prototype, "overflowMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Tab.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Tab.prototype, "showCloseButton", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, TabAnimationSettings)
    ], Tab.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tab.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tab.prototype, "adding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tab.prototype, "added", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tab.prototype, "selecting", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tab.prototype, "selected", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tab.prototype, "removing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tab.prototype, "removed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tab.prototype, "destroyed", void 0);
    Tab = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Tab);
    return Tab;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/toolbar/index.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/toolbar/index.js ***!
  \***********************************************************************/
/*! exports provided: Item, Toolbar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _toolbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toolbar */ "./node_modules/@syncfusion/ej2-navigations/src/toolbar/toolbar.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return _toolbar__WEBPACK_IMPORTED_MODULE_0__["Item"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Toolbar", function() { return _toolbar__WEBPACK_IMPORTED_MODULE_0__["Toolbar"]; });

/**
 * Toolbar modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/toolbar/toolbar.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/toolbar/toolbar.js ***!
  \*************************************************************************/
/*! exports provided: Item, Toolbar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _common_h_scroll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/h-scroll */ "./node_modules/@syncfusion/ej2-navigations/src/common/h-scroll.js");
/* harmony import */ var _common_v_scroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/v-scroll */ "./node_modules/@syncfusion/ej2-navigations/src/common/v-scroll.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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_VERTICAL = 'e-vertical';
var CLS_ITEMS = 'e-toolbar-items';
var CLS_ITEM = 'e-toolbar-item';
var CLS_RTL = '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 = '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_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_ITEM = 'e-extended-item';
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 = /** @class */ (function (_super) {
    __extends(Item, _super);
    function Item() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __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"])('')
    ], Item.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Item.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Item.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Item.prototype, "showAlwaysInPopup", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Item.prototype, "prefixIcon", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Item.prototype, "suffixIcon", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], Item.prototype, "overflow", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Item.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Button')
    ], Item.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Both')
    ], Item.prototype, "showTextOn", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Item.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Item.prototype, "tooltipText", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')
    ], Item.prototype, "align", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Item.prototype, "click", void 0);
    return Item;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * 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 = /** @class */ (function (_super) {
    __extends(Toolbar, _super);
    /**
     * 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 _this = _super.call(this, options, element) || this;
        _this.resizeContext = _this.resize.bind(_this);
        /**
         * Contains the keyboard configuration of the Toolbar.
         */
        _this.keyConfigs = {
            moveLeft: 'leftarrow',
            moveRight: 'rightarrow',
            moveUp: 'uparrow',
            moveDown: 'downarrow',
            popupOpen: 'enter',
            popupClose: 'escape',
            tab: 'tab',
            home: 'home',
            end: 'end',
        };
        return _this;
    }
    /**
     * Removes the control from the DOM and also removes all its related events.
     * @returns void.
     */
    Toolbar.prototype.destroy = function () {
        var _this = this;
        var ele = this.element;
        _super.prototype.destroy.call(this);
        this.unwireEvents();
        this.tempId.forEach(function (ele) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.element.querySelector(ele))) {
                document.body.appendChild(_this.element.querySelector(ele)).style.display = 'none';
            }
        });
        while (ele.firstChild) {
            ele.removeChild(ele.firstChild);
        }
        if (this.trgtEle) {
            ele.appendChild(this.ctrlTem);
        }
        this.clearProperty();
        this.popObj = null;
        this.tbarAlign = null;
        this.remove(this.element, 'e-toolpop');
        ele.removeAttribute('style');
        ['aria-disabled', 'aria-orientation', 'aria-haspopup', 'role'].forEach(function (attrb) {
            _this.element.removeAttribute(attrb);
        });
    };
    /**
     * Initialize the event handler
     * @private
     */
    Toolbar.prototype.preRender = function () {
        var eventArgs = { enableCollision: true, 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);
        }
    };
    Toolbar.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.clickHandler, this);
        window.addEventListener('resize', this.resizeContext);
        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');
    };
    Toolbar.prototype.docKeyDown = function (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();
        }
    };
    Toolbar.prototype.unwireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.clickHandler);
        this.destroyScroll();
        this.keyModule.destroy();
        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(this.element, 'keydown', this.docKeyDown);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'click', this.docEvent);
    };
    Toolbar.prototype.clearProperty = function () {
        this.tbarEle = [];
        this.tbarAlgEle = { lefts: [], centers: [], rights: [] };
    };
    Toolbar.prototype.docEvent = function (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 });
        }
    };
    Toolbar.prototype.destroyScroll = function () {
        if (this.scrollModule) {
            if (this.tbarAlign) {
                this.add(this.scrollModule.element, CLS_TBARPOS);
            }
            this.scrollModule.destroy();
            this.scrollModule = null;
        }
    };
    Toolbar.prototype.destroyItems = function () {
        [].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();
    };
    Toolbar.prototype.destroyMode = function () {
        if (this.scrollModule) {
            this.remove(this.scrollModule.element, CLS_RTL);
            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);
        }
    };
    Toolbar.prototype.add = function (ele, val) {
        ele.classList.add(val);
    };
    Toolbar.prototype.remove = function (ele, val) {
        ele.classList.remove(val);
    };
    Toolbar.prototype.elementFocus = function (ele) {
        var fChild = ele.firstElementChild;
        if (fChild) {
            fChild.focus();
            this.activeEleSwitch(ele);
        }
        else {
            ele.focus();
        }
    };
    Toolbar.prototype.clstElement = function (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 + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');
        }
        else {
            clst = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM);
        }
        return clst;
    };
    Toolbar.prototype.keyHandling = function (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 = void 0;
                var nodes = void 0;
                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 ele_1 = clst.firstElementChild;
                    if (rootEle === trgt) {
                        if (this.activeEle) {
                            this.activeEle.focus();
                        }
                        else {
                            this.activeEleRemove(ele_1);
                            ele_1.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;
        }
    };
    Toolbar.prototype.keyActionHandler = function (e) {
        var trgt = e.target;
        if (trgt.tagName === 'INPUT' || trgt.tagName === 'TEXTAREA' || this.element.classList.contains(CLS_DISABLE)) {
            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.
     */
    Toolbar.prototype.disable = function (value) {
        var rootEle = this.element;
        value ? rootEle.classList.add(CLS_DISABLE) : rootEle.classList.remove(CLS_DISABLE);
        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');
        }
    };
    Toolbar.prototype.eleContains = function (el) {
        // tslint:disable-next-line:max-line-length
        return el.classList.contains(CLS_SEPARATOR) || el.classList.contains(CLS_DISABLE) || 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
    };
    Toolbar.prototype.eleFocus = function (closest, pos) {
        var sib = Object(closest)[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.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);
                    }
                }
            }
        }
    };
    Toolbar.prototype.clickHandler = function (e) {
        var _this = 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);
        }
        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)) && !popupNav.classList.contains(CLS_TBARNAV)) {
            return;
        }
        if (clst) {
            itemObj = this.items[this.tbarEle.indexOf(clst)];
        }
        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"])(_this.popObj) && isPopupElement && !clickedArgs.cancel && _this.overflowMode === 'Popup') {
                    _this.popObj.hide({ name: 'FadeOut', duration: 100 });
                }
            });
        }
    };
    ;
    Toolbar.prototype.popupClickHandler = function (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
     */
    Toolbar.prototype.render = function () {
        this.initialize();
        this.renderControl();
        this.separator();
        this.refreshToolbarTemplate();
        this.wireEvents();
    };
    Toolbar.prototype.initialize = function () {
        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);
    };
    Toolbar.prototype.renderControl = function () {
        this.trgtEle = (this.element.children.length > 0) ? this.element.querySelector('div') : null;
        this.tbarAlgEle = { lefts: [], centers: [], rights: [] };
        this.renderItems();
        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);
        }
    };
    /** @hidden */
    Toolbar.prototype.changeOrientation = function () {
        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();
    };
    Toolbar.prototype.initScroll = function (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 _common_v_scroll__WEBPACK_IMPORTED_MODULE_4__["VScroll"]({ scrollStep: this.scrollStep, enableRtl: this.enableRtl }, innerItems[0]);
            }
            else {
                this.scrollModule = new _common_h_scroll__WEBPACK_IMPORTED_MODULE_3__["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' });
        }
    };
    Toolbar.prototype.itemWidthCal = function (items) {
        var _this = 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 += _this.isVertical ? el.offsetHeight : el.offsetWidth;
                width += parseFloat(_this.isVertical ? style.marginTop : style.marginRight);
                width += parseFloat(_this.isVertical ? style.marginBottom : style.marginLeft);
            }
        });
        return width;
    };
    Toolbar.prototype.getScrollCntEle = function (innerItem) {
        var trgClass = (this.isVertical) ? '.e-vscroll-content' : '.e-hscroll-content';
        return innerItem.querySelector(trgClass);
    };
    Toolbar.prototype.checkOverflow = function (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.
     */
    Toolbar.prototype.refreshOverflow = function () {
        this.resize();
    };
    Toolbar.prototype.toolbarAlign = function (innerItems) {
        if (this.tbarAlign) {
            this.add(innerItems, CLS_TBARPOS);
            this.itemPositioning();
        }
    };
    Toolbar.prototype.renderOverflowMode = function () {
        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, 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.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.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.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.toolbarAlign(innerItems);
            }
        }
    };
    Toolbar.prototype.separator = function () {
        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);
                }
            }
        }
    };
    Toolbar.prototype.createPopupEle = function (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();
    };
    Toolbar.prototype.pushingPoppedEle = function (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;
            }
        }
    };
    Toolbar.prototype.createPopup = function () {
        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);
    };
    Toolbar.prototype.getElementOffsetY = function () {
        return (this.overflowMode === 'Extended' && window.getComputedStyle(this.element).getPropertyValue('box-sizing') === 'border-box' ?
            this.element.clientHeight : this.element.offsetHeight);
    };
    Toolbar.prototype.popupInit = function (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_1__["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: '' });
        }
    };
    Toolbar.prototype.tbarPopupHandler = function (isOpen) {
        if (this.overflowMode === 'Extended') {
            isOpen ? this.add(this.element, CLS_EXTENDEDPOPOPEN) : this.remove(this.element, CLS_EXTENDEDPOPOPEN);
        }
    };
    Toolbar.prototype.popupOpen = function (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_1__["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: '' });
        }
    };
    Toolbar.prototype.popupClose = function (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);
    };
    Toolbar.prototype.checkPriority = function (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 (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_1 = 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_1 + 'px' });
                }
                else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(inEle[i], { display: 'none', minWidth: eleWid_1 + '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_1 + 'px' });
                    }
                    else {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(inEle[i], { display: 'none', minWidth: eleWid_1 + '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);
        }
    };
    Toolbar.prototype.createPopupIcon = function (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');
        element.appendChild(nav);
    };
    Toolbar.prototype.tbarPriRef = function (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 (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]);
        }
    };
    Toolbar.prototype.popupRefresh = function (popupEle, destroy) {
        var _this = 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 += _this.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');
        }
    };
    Toolbar.prototype.ignoreEleFetch = function (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;
    };
    Toolbar.prototype.checkPopupRefresh = function (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;
    };
    Toolbar.prototype.popupEleWidth = function (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;
    };
    Toolbar.prototype.popupEleRefresh = function (width, popupEle, destroy) {
        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 _loop_1 = function (el) {
            if (el.classList.contains(CLS_POPPRI) && popPriority && !destroy) {
                return "continue";
            }
            var elWidth = this_1.popupEleWidth(el);
            if (el === this_1.tbarEle[0]) {
                elWidth += this_1.tbarEleMrgn;
            }
            el.style.position = '';
            if (elWidth < width || destroy) {
                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 = this_1.tbarEle.indexOf(el);
                if (this_1.tbarAlign) {
                    var pos = this_1.items[index].align;
                    index = this_1.tbarAlgEle[(pos + 's').toLowerCase()].indexOf(el);
                    eleSplice = this_1.tbarAlgEle[(pos + 's').toLowerCase()];
                    innerEle = this_1.element.querySelector('.' + CLS_ITEMS + ' .' + 'e-toolbar-' + pos.toLowerCase());
                }
                var sepBeforePri_1 = 0;
                if (this_1.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_1++;
                        }
                    });
                }
                ignoreCount = this_1.ignoreEleFetch(index, innerEle);
                if (el.classList.contains(CLS_TBAROVERFLOW)) {
                    this_1.tbarPriRef(innerEle, index, sepBeforePri_1, 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, this_1.popObj.element).length;
                    innerEle.insertBefore(el, innerEle.children[(index + ignoreCount) - priEleCnt]);
                    width -= el.offsetWidth;
                }
                el.style.height = '';
            }
            else {
                return "break";
            }
        };
        var this_1 = this;
        for (var _i = 0, _a = [].slice.call(popupEle.children); _i < _a.length; _i++) {
            var el = _a[_i];
            var state_1 = _loop_1(el);
            if (state_1 === "break")
                break;
        }
        checkOverflow = this.checkOverflow(this.element, this.element.getElementsByClassName(CLS_ITEMS)[0]);
        if (checkOverflow && !destroy) {
            this.renderOverflowMode();
        }
    };
    Toolbar.prototype.removePositioning = function () {
        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');
    };
    Toolbar.prototype.refreshPositioning = function () {
        var item = this.element.querySelector('.' + CLS_ITEMS);
        this.add(item, CLS_TBARPOS);
        this.itemPositioning();
    };
    Toolbar.prototype.itemPositioning = function () {
        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;
        }
    };
    Toolbar.prototype.tbarItemAlign = function (item, itemEle, pos) {
        var _this = 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_1 = alignDiv[0];
            [].slice.call(alignEle).forEach(function (el) {
                _this.tbarAlgEle.lefts.push(el);
                leftAlign_1.appendChild(el);
            });
            itemEle.appendChild(leftAlign_1);
            itemEle.appendChild(alignDiv[1]);
            itemEle.appendChild(alignDiv[2]);
            this.tbarAlign = true;
            this.add(itemEle, CLS_TBARPOS);
        }
    };
    Toolbar.prototype.ctrlTemplate = function () {
        var _this = 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') {
                _this.tbarEle.push(ele);
                ele.setAttribute('aria-disabled', 'false');
                _this.add(ele, CLS_ITEM);
            }
        });
    };
    Toolbar.prototype.renderItems = function () {
        var ele = this.element;
        var itemEleDom;
        var innerItem;
        var innerPos;
        var items = this.items;
        if (ele && ele.children.length > 0) {
            itemEleDom = ele.querySelector('.' + CLS_ITEMS);
        }
        if (this.trgtEle != null) {
            this.ctrlTemplate();
        }
        else if (ele && items.length > 0) {
            if (!itemEleDom) {
                itemEleDom = this.createElement('div', { className: CLS_ITEMS });
            }
            for (var i = 0; i < items.length; i++) {
                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);
                }
            }
            ele.appendChild(itemEleDom);
        }
    };
    Toolbar.prototype.setAttr = function (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  {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.
     */
    Toolbar.prototype.enableItems = function (items, isEnable) {
        var elements = items;
        var len = elements.length;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isEnable)) {
            isEnable = true;
        }
        var enable = function (isEnable, ele) {
            if (isEnable) {
                ele.classList.remove(CLS_DISABLE);
                ele.setAttribute('aria-disabled', 'false');
            }
            else {
                ele.classList.add(CLS_DISABLE);
                ele.setAttribute('aria-disabled', 'true');
            }
        };
        if (len && len > 1) {
            for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {
                var ele = _a[_i];
                enable(isEnable, ele);
            }
            isEnable ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(elements, CLS_DISABLE) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(elements, CLS_DISABLE);
        }
        else {
            var ele = void 0;
            ele = (len && len === 1) ? elements[0] : items;
            enable(isEnable, ele);
        }
    };
    /**
     * 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.
     */
    Toolbar.prototype.addItems = function (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;
            }
        });
        for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
            var item = items_1[_i];
            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;
            }
        }
        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.
     */
    Toolbar.prototype.removeItems = function (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) {
                for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {
                    var ele = _a[_i];
                    index = this.tbarEle.indexOf(ele);
                    this.removeItemByIndex(index, innerItems);
                    innerItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, this.element);
                }
            }
            else {
                var ele = (elements && elements.length && elements.length === 1) ? elements[0] : args;
                index = innerItems.indexOf(ele);
                this.removeItemByIndex(index, innerItems);
            }
        }
        this.resize();
    };
    Toolbar.prototype.removeItemByIndex = function (index, innerItems) {
        if (this.tbarEle[index] && innerItems[index]) {
            var eleIdx = this.tbarEle.indexOf(innerItems[index]);
            if (this.tbarAlign) {
                var indexAgn = void 0;
                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);
        }
    };
    Toolbar.prototype.templateRender = function (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 = void 0;
            var val = templateProp;
            val = (typeof (templateProp) === 'string') ? templateProp.trim() : templateProp;
            var e = void 0;
            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 = void 0;
            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 ele = this.createElement('input');
            item.id ? (ele.id = item.id) : (ele.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('tbr-ipt'));
            innerEle.appendChild(ele);
            eleObj.appendTo(ele);
        }
        this.add(innerEle, CLS_TEMPLATE);
        this.tbarEle.push(innerEle);
    };
    Toolbar.prototype.buttonRendering = function (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 = 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_2__["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;
    };
    Toolbar.prototype.renderSubComponent = function (item, index) {
        var innerEle;
        var dom;
        innerEle = this.createElement('div', { className: CLS_ITEM });
        innerEle.setAttribute('aria-disabled', 'false');
        if (!this.tbarEle) {
            this.tbarEle = [];
        }
        if (item.htmlAttributes) {
            this.setAttr(item.htmlAttributes, innerEle);
        }
        if (item.tooltipText) {
            var tempDom = this.createElement('div', { innerHTML: 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');
                    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++;
        }
        return innerEle;
    };
    Toolbar.prototype.refreshToolbarTemplate = function () {
        var blazorContain = Object.keys(window);
        for (var a = 0, length_1 = this.items.length; a < length_1; a++) {
            var item = this.items[a];
            if (item.template && blazorContain.indexOf('Blazor') > -1 && !this.isStringTemplate && item.template.indexOf('<div>Blazor') === 0) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + a + '_template', 'Template');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + a + '_template', 'Template', item);
            }
        }
    };
    Toolbar.prototype.itemClick = function (e) {
        this.activeEleSwitch(e.currentTarget);
    };
    Toolbar.prototype.activeEleSwitch = function (ele) {
        this.activeEleRemove(ele.firstElementChild);
        this.activeEle.focus();
    };
    Toolbar.prototype.activeEleRemove = function (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');
        }
    };
    Toolbar.prototype.getPersistData = function () {
        return this.addOnPersist([]);
    };
    /**
     * Returns the current module name.
     * @returns string
     * @private
     */
    Toolbar.prototype.getModuleName = function () {
        return 'toolbar';
    };
    Toolbar.prototype.itemsRerender = function (newProp) {
        this.items = this.tbarItemsCol;
        this.destroyMode();
        this.destroyItems();
        this.items = newProp;
        this.tbarItemsCol = this.items;
        this.renderItems();
        this.renderOverflowMode();
    };
    Toolbar.prototype.resize = function () {
        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();
            }
        }
        this.offsetWid = ele.offsetWidth;
        this.tbResize = false;
        this.separator();
    };
    Toolbar.prototype.extendedOpen = function () {
        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
     */
    Toolbar.prototype.onPropertyChanged = function (newProp, oldProp) {
        var tEle = this.element;
        this.extendedOpen();
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'items':
                    if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
                        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 oldProperty = Object(oldProp.items[index])[property];
                            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 {
                        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);
                    }
                    this.refreshOverflow();
                    break;
                case 'enableRtl':
                    newProp.enableRtl ? this.add(tEle, CLS_RTL) : this.remove(tEle, CLS_RTL);
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollModule)) {
                        newProp.enableRtl ? this.add(this.scrollModule.element, CLS_RTL) : this.remove(this.scrollModule.element, CLS_RTL);
                    }
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popObj)) {
                        newProp.enableRtl ? this.add(this.popObj.element, CLS_RTL) : this.remove(this.popObj.element, CLS_RTL);
                    }
                    if (this.tbarAlign) {
                        this.itemPositioning();
                    }
                    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.
     */
    Toolbar.prototype.hideItem = function (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_1 = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, this.element));
            ele = innerItems_1[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 innerItems_2 = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, this.element));
                    if (isElement) {
                        eleIndex = innerItems_2.indexOf(ele);
                    }
                    var nextEle = innerItems_2[++eleIndex];
                    while (nextEle) {
                        var skipEle = this.eleContains(nextEle);
                        if (!skipEle) {
                            nextEle.firstElementChild.removeAttribute('tabindex');
                            break;
                        }
                        nextEle = innerItems_2[++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();
        }
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], Item)
    ], Toolbar.prototype, "items", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Toolbar.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Toolbar.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Scrollable')
    ], Toolbar.prototype, "overflowMode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Toolbar.prototype, "clicked", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Toolbar.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Toolbar.prototype, "destroyed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Toolbar.prototype, "beforeCreate", void 0);
    Toolbar = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Toolbar);
    return Toolbar;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/treeview/index.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/treeview/index.js ***!
  \************************************************************************/
/*! exports provided: FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _treeview__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./treeview */ "./node_modules/@syncfusion/ej2-navigations/src/treeview/treeview.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldsSettings", function() { return _treeview__WEBPACK_IMPORTED_MODULE_0__["FieldsSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionSettings", function() { return _treeview__WEBPACK_IMPORTED_MODULE_0__["ActionSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NodeAnimationSettings", function() { return _treeview__WEBPACK_IMPORTED_MODULE_0__["NodeAnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TreeView", function() { return _treeview__WEBPACK_IMPORTED_MODULE_0__["TreeView"]; });

/**
 * TreeView modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-navigations/src/treeview/treeview.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-navigations/src/treeview/treeview.js ***!
  \***************************************************************************/
/*! exports provided: FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-data */ "./node_modules/@syncfusion/ej2-data/index.js");
/* harmony import */ var _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-lists */ "./node_modules/@syncfusion/ej2-lists/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @syncfusion/ej2-inputs */ "./node_modules/@syncfusion/ej2-inputs/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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-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 = '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 = 'e-selected';
var EXPANDED = 'e-expanded';
var NODECOLLAPSED = 'e-node-collapsed';
var DISABLE = 'e-disable';
var CONTENT = 'e-content';
var DOWNTAIL = 'e-downtail';
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 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 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 = /** @class */ (function (_super) {
    __extends(FieldsSettings, _super);
    function FieldsSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('child')
    ], FieldsSettings.prototype, "child", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], FieldsSettings.prototype, "dataSource", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('expanded')
    ], FieldsSettings.prototype, "expanded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('hasChildren')
    ], FieldsSettings.prototype, "hasChildren", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('htmlAttributes')
    ], FieldsSettings.prototype, "htmlAttributes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('iconCss')
    ], FieldsSettings.prototype, "iconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('id')
    ], FieldsSettings.prototype, "id", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('imageUrl')
    ], FieldsSettings.prototype, "imageUrl", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('isChecked')
    ], FieldsSettings.prototype, "isChecked", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('parentID')
    ], FieldsSettings.prototype, "parentID", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], FieldsSettings.prototype, "query", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('selected')
    ], FieldsSettings.prototype, "selected", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], FieldsSettings.prototype, "tableName", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('text')
    ], FieldsSettings.prototype, "text", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('tooltip')
    ], FieldsSettings.prototype, "tooltip", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('navigateUrl')
    ], FieldsSettings.prototype, "navigateUrl", void 0);
    return FieldsSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures animation settings for the TreeView component.
 */
var ActionSettings = /** @class */ (function (_super) {
    __extends(ActionSettings, _super);
    function ActionSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SlideDown')
    ], ActionSettings.prototype, "effect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(400)
    ], ActionSettings.prototype, "duration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('linear')
    ], ActionSettings.prototype, "easing", void 0);
    return ActionSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the animation settings for expanding and collapsing nodes in TreeView.
 */
var NodeAnimationSettings = /** @class */ (function (_super) {
    __extends(NodeAnimationSettings, _super);
    function NodeAnimationSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ effect: 'SlideUp', duration: 400, easing: 'linear' }, ActionSettings)
    ], NodeAnimationSettings.prototype, "collapse", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ effect: 'SlideDown', duration: 400, easing: 'linear' }, ActionSettings)
    ], NodeAnimationSettings.prototype, "expand", void 0);
    return NodeAnimationSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * 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 = /** @class */ (function (_super) {
    __extends(TreeView, _super);
    function TreeView(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.preventExpand = false;
        _this.checkedElement = [];
        _this.disableNode = [];
        _this.parentNodeCheck = [];
        _this.expandChildren = [];
        _this.mouseDownStatus = false;
        return _this;
    }
    TreeView_1 = TreeView;
    /**
     * Get component name.
     * @returns string
     * @private
     */
    TreeView.prototype.getModuleName = function () {
        return 'treeview';
    };
    /**
     * Initialize the event handler
     */
    TreeView.prototype.preRender = function () {
        var _this = this;
        this.checkActionNodes = [];
        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 (e) {
                _this.beforeNodeCreate(e);
            },
        };
        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
     */
    TreeView.prototype.getPersistData = function () {
        var keyEntity = ['selectedNodes', 'checkedNodes', 'expandedNodes'];
        return this.addOnPersist(keyEntity);
    };
    /**
     * To Initialize the control rendering
     * @private
     */
    TreeView.prototype.render = function () {
        this.initialRender = true;
        this.initialize();
        this.setDataBinding();
        this.setExpandOnType();
        this.setRipple();
        this.wireEditingEvents(this.allowEditing);
        this.setDragAndDrop(this.allowDragAndDrop);
        this.wireEvents();
        this.initialRender = false;
    };
    TreeView.prototype.initialize = function () {
        this.element.setAttribute('role', 'tree');
        this.element.setAttribute('tabindex', '0');
        this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
        this.isBlazorPlatform = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])();
        this.setCssClass(null, this.cssClass);
        this.setEnableRtl();
        this.setFullRow(this.fullRowSelect);
        this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
    };
    TreeView.prototype.setEnableRtl = function () {
        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);
    };
    TreeView.prototype.setRipple = function () {
        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);
    };
    TreeView.prototype.setFullRow = function (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);
    };
    TreeView.prototype.setMultiSelect = function (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');
        }
    };
    TreeView.prototype.templateComplier = function (template) {
        if (template) {
            var e = void 0;
            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;
    };
    TreeView.prototype.setDataBinding = function () {
        var _this = this;
        this.treeList.push('false');
        if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
            if (this.fields.dataSource.ready) {
                this.fields.dataSource.ready.then(function (e) {
                    if (_this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] && _this.fields.dataSource.dataSource.offline) {
                        _this.treeList.pop();
                        _this.treeData = e.result;
                        _this.isNumberTypeId = _this.getType();
                        _this.setRootData();
                        _this.renderItems(true);
                        if (_this.treeList.length === 0 && !_this.isLoaded) {
                            _this.finalize();
                        }
                    }
                });
            }
            else {
                this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function (e) {
                    _this.treeList.pop();
                    _this.treeData = e.result;
                    _this.isNumberTypeId = _this.getType();
                    _this.setRootData();
                    _this.renderItems(true);
                    if (_this.treeList.length === 0 && !_this.isLoaded) {
                        _this.finalize();
                    }
                });
            }
        }
        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();
        }
    };
    TreeView.prototype.getQuery = function (mapper, value) {
        if (value === void 0) { value = null; }
        var columns = [];
        var query;
        if (!mapper.query) {
            query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
            var prop = this.getActualProperties(mapper);
            for (var _i = 0, _a = Object.keys(prop); _i < _a.length; _i++) {
                var col = _a[_i];
                if (col !== 'dataSource' && col !== 'tableName' && col !== 'child' && !!mapper[col]
                    && 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_2__["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;
    };
    TreeView.prototype.getType = function () {
        return this.treeData[0] ? ((typeof Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.id, this.treeData[0]) === 'number') ? true : false) : false;
    };
    TreeView.prototype.setRootData = function () {
        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;
        }
    };
    TreeView.prototype.renderItems = function (isSorted) {
        this.listBaseOption.ariaAttributes.level = 1;
        this.ulElement = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].createList(this.createElement, isSorted ? this.rootData : this.getSortedData(this.rootData), this.listBaseOption);
        this.element.appendChild(this.ulElement);
        if (this.nodeTemplate && this.loadOnDemand && this.isBlazorPlatform && !this.isStringTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'nodeTemplate', 'NodeTemplate', this);
        }
        if (this.loadOnDemand === false) {
            var rootNodes = this.ulElement.querySelectorAll('.e-list-item');
            var i = 0;
            while (i < rootNodes.length) {
                this.renderChildNodes(rootNodes[i], true, null, true);
                i++;
            }
        }
        else {
            this.finalizeNode(this.element);
        }
        if (this.nodeTemplate && !this.loadOnDemand && this.isBlazorPlatform && !this.isStringTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'nodeTemplate', 'NodeTemplate', this);
        }
        this.parentNodeCheck = [];
        this.parentCheckData = [];
        this.updateCheckedStateFromDS();
        if (this.autoCheck && this.showCheckBox && !this.isLoaded) {
            this.updateParentCheckState();
        }
    };
    /**
     * Update the checkedNodes from datasource at initial rendering
     */
    TreeView.prototype.updateCheckedStateFromDS = function (id) {
        if (this.treeData && this.showCheckBox) {
            if (this.dataType === 1) {
                var mapper = this.fields;
                var resultData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["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_1 = resultData[i][this.fields.id];
                        var childData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](this.treeData).
                            executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().where(mapper.parentID, 'equal', id_1, 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 i = 0; i < this.checkedNodes.length; i++) {
                    var mapper_1 = this.fields;
                    var checkState = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](this.treeData).
                        executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().where(mapper_1.id, 'equal', this.checkedNodes[i], true));
                    if (checkState[0] && this.autoCheck) {
                        this.getCheckedNodeDetails(mapper_1, checkState);
                        this.checkIndeterminateState(checkState[0]);
                    }
                    var checkedData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](this.treeData).
                        executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().where(mapper_1.parentID, 'equal', this.checkedNodes[i], 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_1__["DataManager"] &&
                this.fields.dataSource.dataSource.offline) || (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] &&
                !this.loadOnDemand)) {
                for (var index = 0; index < this.treeData.length; index++) {
                    var fieldId = this.treeData[index][this.fields.id] ? this.treeData[index][this.fields.id].toString() : '';
                    if (this.treeData[index][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[index]);
                    if (childItems) {
                        this.updateChildCheckState(childItems, this.treeData[index]);
                    }
                }
            }
        }
    };
    /**
     * To check whether the list data has sub child and to change the parent check state accordingly
     */
    TreeView.prototype.getCheckedNodeDetails = function (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 len = 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_1__["DataManager"](this.treeData).
                executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["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
     */
    TreeView.prototype.updateParentCheckState = function () {
        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 parentData = this.getTreeData(node);
            var id = parentData[0][this.fields.id].toString();
            if (this.dataType === 1) {
                childCheckedElement = this.getChildNodes(this.treeData, id);
            }
            else {
                childCheckedElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), parentData[0]);
            }
            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
     */
    TreeView.prototype.checkIndeterminateState = function (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 len = 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
     */
    TreeView.prototype.updateChildCheckState = function (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 len = 0; len < this.parentCheckData.length; len++) {
                if ((treeData !== this.parentCheckData[len]) && (this.parentCheckData[len])) {
                    this.checkIndeterminateState(this.parentCheckData[len]);
                }
            }
        }
        this.parentCheckData = [];
    };
    TreeView.prototype.beforeNodeCreate = function (e) {
        if (this.showCheckBox) {
            var checkboxEle = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["createCheckBox"])(this.createElement, true, { cssClass: this.touchClass });
            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)) {
            e.item.setAttribute('aria-selected', 'false');
        }
        var fields = e.fields;
        this.addActionClass(e, fields.selected, SELECTED);
        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,
        };
        this.trigger('drawNode', eventArgs);
    };
    TreeView.prototype.frameMouseHandler = function (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);
    };
    TreeView.prototype.addActionClass = function (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);
        }
    };
    TreeView.prototype.getDataType = function (ds, mapper) {
        if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
            for (var i = 0; i < ds.length; i++) {
                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 i = 0, len = ds.length; i < len; i++) {
            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 2;
            }
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.parentID, ds[i])) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.hasChildren, ds[i]))) {
                return 1;
            }
        }
        return 1;
    };
    TreeView.prototype.getGroupedData = function (dataSource, groupBy) {
        var cusQuery = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().group(groupBy);
        var ds = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].getDataSource(dataSource, cusQuery);
        var grpItem = [];
        for (var j = 0; j < ds.length; j++) {
            var itemObj = ds[j].items;
            grpItem.push(itemObj);
        }
        return grpItem;
    };
    TreeView.prototype.getSortedData = function (list) {
        if (list && this.sortOrder !== 'None') {
            list = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].getDataSource(list, _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].addSorting(this.sortOrder, this.fields.text));
        }
        return list;
    };
    TreeView.prototype.finalizeNode = function (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, 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);
        }
        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 i = 0; i < eNodes.length; i++) {
                this.renderChildNodes(eNodes[i]);
            }
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(eNodes, EXPANDED);
        this.updateList();
        if (this.isLoaded) {
            this.updateCheckedProp();
        }
    };
    TreeView.prototype.updateCheckedProp = function () {
        if (this.showCheckBox) {
            var nodes = [].concat([], this.checkedNodes);
            this.setProperties({ checkedNodes: nodes }, true);
        }
    };
    TreeView.prototype.ensureIndeterminate = function () {
        if (this.autoCheck) {
            var liElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('li', this.element);
            var ulElement = void 0;
            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 i = 0; i < indeterminate.length; i++) {
                indeterminate[i].classList.remove(INDETERMINATE);
            }
        }
    };
    TreeView.prototype.ensureParentCheckState = function (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);
            }
        }
    };
    TreeView.prototype.ensureChildCheckState = function (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 = void 0;
            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 = void 0;
                for (var index = 0; index < checkBoxes.length; index++) {
                    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';
                        }
                    }
                    else {
                        var isNodeChecked = checkBoxes[index].getElementsByClassName(CHECKBOXFRAME)[0].classList.contains(CHECK);
                        var childId = childCheck[index].getAttribute('data-uid');
                        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();
            }
        }
    };
    TreeView.prototype.doCheckBoxAction = function (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 len = nodes.length; len >= 0; len--) {
                var liEle = void 0;
                if (nodes.length === 1) {
                    liEle = this.getElement(nodes[len - 1]);
                }
                else {
                    liEle = this.getElement(nodes[len]);
                }
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
                    var node = void 0;
                    node = nodes[len - nodes.length] ? nodes[len - nodes.length].toString() : nodes[len] ? nodes[len].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 index = 0; index < checkBoxes.length; index++) {
                    this.updateFieldChecked(checkBoxes[index], doCheck);
                    this.changeState(checkBoxes[index], doCheck ? 'check' : 'uncheck');
                }
            }
        }
        if (nodes) {
            for (var j = 0; j < nodes.length; j++) {
                var node = nodes[j] ? nodes[j].toString() : '';
                if (!doCheck) {
                    this.updateField(this.treeData, this.fields, node, 'isChecked', null);
                }
            }
        }
        if (this.autoCheck) {
            this.updateParentCheckState();
        }
    };
    TreeView.prototype.updateFieldChecked = function (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
     */
    TreeView.prototype.dynamicCheckState = function (node, doCheck) {
        if (this.dataType === 1) {
            var count = 0;
            var resultId = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["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_1 = resultId[0][this.fields.parentID] ? resultId[0][this.fields.parentID].toString() : null;
                var parentElement = this.element.querySelector('[data-uid="' + parent_1 + '"]');
                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_1);
                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_1__["DataManager"] &&
            this.fields.dataSource.dataSource.offline) || (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] &&
            !this.loadOnDemand)) {
            var id = void 0;
            var parentElement = void 0;
            var check = void 0;
            for (var i = 0; i < this.treeData.length; i++) {
                id = this.treeData[i][this.fields.id] ? this.treeData[i][this.fields.id].toString() : '';
                parentElement = this.element.querySelector('[data-uid="' + id + '"]');
                check = parentElement ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECK, parentElement) : null;
                if (this.checkedNodes.indexOf(id) === -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[i]);
                if (subChild) {
                    this.updateChildIndeterminate(subChild, id, node, doCheck, id);
                }
            }
        }
    };
    /**
     * updates the parent and child  check state while changing the checkedNodes via setmodel for listData
     */
    TreeView.prototype.updateIndeterminate = function (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
     */
    TreeView.prototype.updateChildIndeterminate = function (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);
            }
        }
    };
    TreeView.prototype.changeState = function (wrapper, state, e, isPrevent, isAdd, doCheck) {
        var ariaState;
        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);
            if (eventArgs.cancel) {
                return;
            }
        }
        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);
                eventArgs.data[0].checked = ariaState;
                this.trigger('nodeChecked', eventArgs);
                this.checkActionNodes = [];
            }
        }
    };
    TreeView.prototype.addCheck = function (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);
        }
    };
    TreeView.prototype.removeCheck = function (liEle) {
        var index = this.checkedNodes.indexOf(liEle.getAttribute('data-uid'));
        if (index > -1) {
            this.checkedNodes.splice(index, 1);
        }
    };
    TreeView.prototype.getCheckEvent = function (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 };
    };
    TreeView.prototype.finalize = function () {
        var firstUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, this.element);
        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();
    };
    TreeView.prototype.doExpandAction = function () {
        var eUids = this.expandedNodes;
        if (this.isInitalExpand && eUids.length > 0) {
            this.setProperties({ expandedNodes: [] }, true);
            if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
                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();
        }
    };
    TreeView.prototype.expandGivenNodes = function (arr) {
        var proxy = this;
        this.expandCallback(arr[this.index], function () {
            proxy.index++;
            if (proxy.index < arr.length) {
                proxy.expandGivenNodes(arr);
            }
            else {
                proxy.afterFinalized();
            }
        });
    };
    TreeView.prototype.expandCallback = function (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();
        }
    };
    TreeView.prototype.afterFinalized = function () {
        this.doSelectionAction();
        this.updateCheckedProp();
        this.isLoaded = true;
        this.isAnimate = true;
        this.isInitalExpand = false;
        var eventArgs = { data: this.treeData };
        this.trigger('dataBound', eventArgs);
    };
    TreeView.prototype.doSelectionAction = function () {
        var sNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + SELECTED, 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);
    };
    TreeView.prototype.selectGivenNodes = function (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;
            }
        }
    };
    TreeView.prototype.clickHandler = function (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 = target.classList;
            var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTITEM);
            if (!li) {
                return;
            }
            else {
                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.contains(EXPANDABLE)) {
                    this.expandAction(li, target, event);
                }
                else if (classList.contains(COLLAPSIBLE)) {
                    this.collapseNode(li, target, event);
                }
                else {
                    if (!classList.contains(PARENTITEM) && !classList.contains(LISTITEM)) {
                        this.toggleSelect(li, event.originalEvent, false);
                    }
                }
                this.triggerClickEvent(event.originalEvent, li);
            }
        }
    };
    TreeView.prototype.nodeCheckingEvent = function (wrapper, isCheck, e) {
        var currLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(wrapper, '.' + LISTITEM);
        this.checkActionNodes = [];
        var ariaState = !isCheck ? 'true' : 'false';
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ariaState)) {
            wrapper.setAttribute('aria-checked', ariaState);
        }
        var eventArgs = this.getCheckEvent(currLi, isCheck ? 'uncheck' : 'check', e);
        this.trigger('nodeChecking', eventArgs);
        return eventArgs;
    };
    TreeView.prototype.nodeCheckedEvent = function (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);
    };
    TreeView.prototype.triggerClickEvent = function (e, li) {
        var eventArgs = {
            event: e,
            node: li,
        };
        this.trigger('nodeClicked', eventArgs);
    };
    TreeView.prototype.expandNode = function (currLi, icon, loaded) {
        var _this = 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_1 = 0;
                var end_1 = 0;
                var proxy_1 = this;
                var ul_1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, currLi);
                var liEle_1 = currLi;
                this.setHeight(liEle_1, ul_1);
                var activeElement_1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTITEM + '.' + ACTIVE, currLi);
                if (this.isAnimate) {
                    this.aniObj.animate(ul_1, {
                        name: this.animation.expand.effect,
                        duration: this.animation.expand.duration,
                        timingFunction: this.animation.expand.easing,
                        begin: function (args) {
                            liEle_1.style.overflow = 'hidden';
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeElement_1) && activeElement_1 instanceof HTMLElement) {
                                activeElement_1.classList.add(ITEM_ANIMATION_ACTIVE);
                            }
                            start_1 = liEle_1.offsetHeight;
                            end_1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, currLi).offsetHeight;
                        },
                        progress: function (args) {
                            args.element.style.display = 'block';
                            proxy_1.animateHeight(args, start_1, end_1);
                        },
                        end: function (args) {
                            args.element.style.display = 'block';
                            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeElement_1) && activeElement_1 instanceof HTMLElement) {
                                activeElement_1.classList.remove(ITEM_ANIMATION_ACTIVE);
                            }
                            _this.expandedNode(liEle_1, ul_1, icon);
                        }
                    });
                }
                else {
                    this.expandedNode(liEle_1, ul_1, icon);
                }
            }
        }
        else {
            var ul = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, currLi);
            ul.style.display = 'none';
            if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] === true) {
                this.preventExpand = false;
            }
        }
        if (this.initialRender) {
            icon.classList.add('interaction');
        }
    };
    TreeView.prototype.expandedNode = function (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);
        if (this.isLoaded && this.expandArgs) {
            this.expandArgs = this.getExpandEvent(currLi, null);
            this.trigger('nodeExpanded', this.expandArgs);
        }
    };
    TreeView.prototype.addExpand = function (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);
        }
    };
    TreeView.prototype.collapseNode = function (currLi, icon, e) {
        var _this = 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);
            if (colArgs.cancel) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], PROCESS);
                return;
            }
        }
        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 (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 (args) {
                    proxy.animateHeight(args, start, end);
                },
                end: function (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);
                    }
                    _this.collapsedNode(liEle, ul, icon, colArgs);
                }
            });
        }
        else {
            this.collapsedNode(liEle, ul, icon, colArgs);
        }
    };
    TreeView.prototype.collapsedNode = function (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.removeExpand(liEle);
        if (this.isLoaded) {
            this.trigger('nodeCollapsed', colArgs);
        }
    };
    TreeView.prototype.removeExpand = function (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);
        }
    };
    TreeView.prototype.disableExpandAttr = function (liEle) {
        liEle.setAttribute('aria-expanded', 'false');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([liEle], NODECOLLAPSED);
    };
    TreeView.prototype.setHeight = function (currLi, ul) {
        ul.style.display = 'block';
        ul.style.visibility = 'hidden';
        currLi.style.height = currLi.offsetHeight + 'px';
        ul.style.display = 'none';
        ul.style.visibility = '';
    };
    TreeView.prototype.animateHeight = function (args, start, end) {
        var remaining = (args.duration - args.timeStamp) / args.duration;
        var currentHeight = (end - start) * remaining + start;
        args.element.parentElement.style.height = currentHeight + 'px';
    };
    TreeView.prototype.renderChildNodes = function (parentLi, expandChild, callback, loaded) {
        var _this = 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;
        if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
            var level = this.parents(parentLi, '.' + PARENTITEM).length;
            var mapper_2 = this.getChildFields(this.fields, level, 1);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper_2) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper_2.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_1__["DataManager"] && (this.fields.dataSource.dataSource.offline)) ||
                (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] && !this.loadOnDemand)) {
                this.treeList.pop();
                childItems = this.getChildNodes(this.treeData, parentLi.getAttribute('data-uid'));
                this.loadChild(childItems, mapper_2, eicon, parentLi, expandChild, callback, loaded);
            }
            else if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] && this.loadOnDemand) {
                mapper_2.dataSource.executeQuery(this.getQuery(mapper_2, parentLi.getAttribute('data-uid'))).then(function (e) {
                    _this.treeList.pop();
                    childItems = e.result;
                    _this.loadChild(childItems, mapper_2, eicon, parentLi, expandChild, callback, loaded);
                });
            }
        }
        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 {
                this.listBaseOption.ariaAttributes.level = parseFloat(parentLi.getAttribute('aria-level')) + 1;
                parentLi.appendChild(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["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) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + 'nodeTemplate', 'NodeTemplate');
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'nodeTemplate', 'NodeTemplate', this);
                }
                this.disableTreeNodes(childItems);
                this.renderSubChild(parentLi, expandChild, loaded);
            }
        }
    };
    TreeView.prototype.loadChild = function (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_1__["DataManager"] && !this.fields.dataSource.dataSource.offline) {
                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_2__["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();
        }
    };
    TreeView.prototype.disableTreeNodes = function (childItems) {
        var i = 0;
        while (i < childItems.length) {
            var id = childItems[i][this.fields.id].toString();
            if (this.disableNode !== undefined && this.disableNode.indexOf(id) !== -1) {
                this.doDisableAction([id]);
            }
            i++;
        }
    };
    /**
     * Sets the child Item in selectedState while rendering the child node
     */
    TreeView.prototype.setSelectionForChildNodes = function (nodes) {
        var i;
        for (i = 0; i < nodes.length; i++) {
            var id = nodes[i][this.fields.id].toString();
            if (this.selectedNodes !== undefined && this.selectedNodes.indexOf(id) !== -1) {
                this.doSelectionAction();
            }
        }
    };
    TreeView.prototype.ensureCheckNode = function (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;
    };
    TreeView.prototype.getFields = function (mapper, nodeLevel, dataLevel) {
        if (nodeLevel === dataLevel) {
            return mapper;
        }
        else {
            return this.getFields(this.getChildMapper(mapper), nodeLevel, dataLevel + 1);
        }
    };
    TreeView.prototype.getChildFields = function (mapper, nodeLevel, dataLevel) {
        var childData;
        if (nodeLevel === dataLevel) {
            return this.getChildMapper(mapper);
        }
        else {
            return this.getChildFields(this.getChildMapper(mapper), nodeLevel, dataLevel + 1);
        }
    };
    TreeView.prototype.getChildMapper = function (mapper) {
        return (typeof mapper.child === 'string' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper.child)) ? mapper : mapper.child;
    };
    TreeView.prototype.getChildNodes = function (obj, parentId, isRoot) {
        if (isRoot === void 0) { isRoot = 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;
    };
    TreeView.prototype.getChildGroup = function (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;
    };
    TreeView.prototype.renderSubChild = function (element, expandChild, loaded) {
        if (expandChild) {
            var cIcons = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + EXPANDABLE, element);
            for (var i = 0, len = cIcons.length; i < len; 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);
                }
            }
        }
    };
    TreeView.prototype.toggleSelect = function (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);
            }
        }
    };
    TreeView.prototype.isActive = function (li) {
        return li.classList.contains(ACTIVE) ? true : false;
    };
    TreeView.prototype.selectNode = function (li, e, multiSelect) {
        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);
            if (eventArgs.cancel) {
                return;
            }
        }
        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) {
            eventArgs.nodeData = this.getNodeData(li);
            this.trigger('nodeSelected', eventArgs);
        }
    };
    TreeView.prototype.unselectNode = function (li, e) {
        var eventArgs;
        if (this.isLoaded) {
            eventArgs = this.getSelectEvent(li, 'un-select', e);
            this.trigger('nodeSelecting', eventArgs);
            if (eventArgs.cancel) {
                return;
            }
        }
        this.removeSelect(li);
        this.setFocusElement(li);
        if (this.isLoaded) {
            eventArgs.nodeData = this.getNodeData(li);
            this.trigger('nodeSelected', eventArgs);
        }
    };
    TreeView.prototype.setFocusElement = function (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);
        }
    };
    TreeView.prototype.addSelect = function (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);
        }
    };
    TreeView.prototype.removeSelect = function (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);
        }
    };
    TreeView.prototype.removeSelectAll = function () {
        var selectedLI = this.element.querySelectorAll('.' + ACTIVE);
        for (var _i = 0, selectedLI_1 = selectedLI; _i < selectedLI_1.length; _i++) {
            var ele = selectedLI_1[_i];
            if (this.allowMultiSelection) {
                ele.setAttribute('aria-selected', 'false');
            }
            else {
                ele.removeAttribute('aria-selected');
            }
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(selectedLI, ACTIVE);
        this.setProperties({ selectedNodes: [] }, true);
    };
    TreeView.prototype.getSelectEvent = function (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 };
    };
    TreeView.prototype.setExpandOnType = function () {
        this.expandOnType = (this.expandOn === 'Auto') ? (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 'Click' : 'DblClick') : this.expandOn;
    };
    TreeView.prototype.expandHandler = function (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);
        }
    };
    TreeView.prototype.expandCollapseAction = function (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 = icon.classList;
            if (classList.contains(EXPANDABLE)) {
                this.expandAction(currLi, icon, e);
            }
            else {
                this.collapseNode(currLi, icon, e);
            }
        }
    };
    TreeView.prototype.expandAction = function (currLi, icon, e, expandChild, callback) {
        if (icon.classList.contains(PROCESS)) {
            return;
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], PROCESS);
        }
        if (this.isLoaded) {
            this.expandArgs = this.getExpandEvent(currLi, e);
            this.trigger('nodeExpanding', this.expandArgs);
            if (this.expandArgs.cancel) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], PROCESS);
                return;
            }
        }
        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 icon_1 = 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"])(icon_1)) {
                        this.expandAction(liEles[i], icon_1, null);
                    }
                    this.expandChildren.splice(this.expandChildren.indexOf(id), 1);
                }
            }
        }
    };
    TreeView.prototype.keyActionHandler = function (e) {
        var _this = 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 (_this.showCheckBox) {
                            _this.checkNode(e);
                        }
                        break;
                    case 'moveRight':
                        _this.openNode(_this.enableRtl ? false : true, e);
                        break;
                    case 'moveLeft':
                        _this.openNode(_this.enableRtl ? true : false, e);
                        break;
                    case 'shiftDown':
                        _this.shiftKeySelect(true, e);
                        break;
                    case 'moveDown':
                    case 'ctrlDown':
                    case 'csDown':
                        _this.navigateNode(true);
                        break;
                    case 'shiftUp':
                        _this.shiftKeySelect(false, e);
                        break;
                    case 'moveUp':
                    case 'ctrlUp':
                    case 'csUp':
                        _this.navigateNode(false);
                        break;
                    case 'home':
                    case 'shiftHome':
                    case 'ctrlHome':
                    case 'csHome':
                        _this.navigateRootNode(true);
                        break;
                    case 'end':
                    case 'shiftEnd':
                    case 'ctrlEnd':
                    case 'csEnd':
                        _this.navigateRootNode(false);
                        break;
                    case 'enter':
                    case 'ctrlEnter':
                    case 'shiftEnter':
                    case 'csEnter':
                        _this.toggleSelect(focusedNode, e);
                        break;
                    case 'f2':
                        if (_this.allowEditing && !focusedNode.classList.contains('e-disable')) {
                            _this.createTextbox(focusedNode, e);
                        }
                        break;
                    case 'ctrlA':
                        if (_this.allowMultiSelection) {
                            var sNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM + ':not(.' + ACTIVE + ')', _this.element);
                            _this.selectGivenNodes(sNodes);
                        }
                        break;
                }
            }
        });
    };
    TreeView.prototype.navigateToFocus = function (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 = this.isVisibleInViewport(focusNode);
        if (!isVisible) {
            focusNode.scrollIntoView(isUp);
        }
    };
    TreeView.prototype.isVisibleInViewport = function (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));
    };
    TreeView.prototype.getScrollParent = function (node) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(node)) {
            return null;
        }
        return (node.scrollHeight > node.clientHeight) ? node : this.getScrollParent(node.parentElement);
    };
    TreeView.prototype.shiftKeySelect = function (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);
        }
    };
    TreeView.prototype.checkNode = function (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')) {
            this.validateCheckNode(checkWrap, isChecked, focusedNode, e);
        }
    };
    TreeView.prototype.validateCheckNode = function (checkWrap, isCheck, li, e) {
        var eventArgs = this.nodeCheckingEvent(checkWrap, isCheck, e);
        if (eventArgs.cancel) {
            return;
        }
        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));
        }
        if (this.autoCheck) {
            this.ensureStateChange(li);
        }
        this.nodeCheckedEvent(checkWrap, isCheck, e);
    };
    /**
     * Update checkedNodes when UI interaction happens before the child node renders in DOM
     */
    TreeView.prototype.ensureStateChange = function (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_1__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["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_1__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().where(mapper.isChecked, 'equal', true, false));
                for (var i = 0; i < checkedData.length; i++) {
                    var id = checkedData[i][this.fields.id] ? checkedData[i][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 i = 0; i < this.treeData.length; i++) {
                    var checkedId = this.treeData[i][this.fields.id] ? this.treeData[i][this.fields.id].toString() : null;
                    if (this.checkedNodes.indexOf(checkedId) === -1) {
                        this.checkedNodes.push(checkedId);
                    }
                }
            }
        }
        else {
            var childItems = this.getChildNodes(this.treeData, parentIndex);
            if (childItems) {
                this.childStateChange(childItems, parentIndex, childElement, doCheck);
            }
        }
    };
    TreeView.prototype.getChildItems = function (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
     */
    TreeView.prototype.childStateChange = function (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 && childElement === null && !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(this.treeData, 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
    TreeView.prototype.allCheckNode = function (child, newCheck, checked, childCheck, validateCheck) {
        if (child) {
            for (var length_1 = 0; length_1 < child.length; length_1++) {
                var childId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.id, child[length_1]);
                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_1][this.fields.isChecked]) && newCheck.indexOf(childId.toString()) === -1)
                        || childCheck === 0 || checked === 2)) {
                        (child[length_1][this.fields.isChecked] !== false || checked === 2) ? newCheck.push(childId.toString())
                            : childCheck = null;
                        childCheck = (child[length_1][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_1]) === true ||
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), child[length_1])) {
                    var id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.id, child[length_1]);
                    var childId_1 = this.getChildNodes(this.treeData, id.toString());
                    if (childId_1) {
                        (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(validateCheck)) ? this.allCheckNode(childId_1, newCheck, checked, childCheck) :
                            this.allCheckNode(childId_1, newCheck, checked, childCheck, validateCheck);
                        childCheck = null;
                    }
                }
                childCheck = null;
            }
        }
    };
    TreeView.prototype.openNode = function (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);
                    }
                }
            }
        }
    };
    TreeView.prototype.navigateNode = function (isTowards) {
        var focusedNode = this.getFocusedNode();
        this.focusNextNode(focusedNode, isTowards);
    };
    TreeView.prototype.navigateRootNode = function (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);
        }
    };
    TreeView.prototype.getFocusedNode = function () {
        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;
    };
    TreeView.prototype.focusNextNode = function (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);
            }
        }
    };
    TreeView.prototype.getNextNode = function (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;
    };
    TreeView.prototype.getPrevNode = function (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;
    };
    TreeView.prototype.getRootNode = function () {
        var index = 0;
        var rootNode;
        do {
            rootNode = this.liList[index];
            index++;
        } while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(rootNode));
        return rootNode;
    };
    TreeView.prototype.getEndNode = function () {
        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;
    };
    TreeView.prototype.setFocus = function (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);
        }
    };
    TreeView.prototype.updateIdAttr = function (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');
    };
    TreeView.prototype.focusIn = function () {
        if (!this.mouseDownStatus) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.getFocusedNode()], HOVER);
        }
        this.mouseDownStatus = false;
    };
    TreeView.prototype.focusOut = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.getFocusedNode()], HOVER);
    };
    TreeView.prototype.onMouseOver = function (e) {
        var target = e.target;
        var classList = target.classList;
        var currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTITEM);
        if (!currentLi || classList.contains(PARENTITEM) || classList.contains(LISTITEM)) {
            this.removeHover();
            return;
        }
        else {
            if (currentLi && !currentLi.classList.contains('e-disable')) {
                this.setHover(currentLi);
            }
        }
    };
    TreeView.prototype.setHover = function (li) {
        if (!li.classList.contains(HOVER)) {
            this.removeHover();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], HOVER);
        }
    };
    ;
    TreeView.prototype.onMouseLeave = function (e) {
        this.removeHover();
    };
    TreeView.prototype.removeHover = function () {
        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);
        }
    };
    ;
    TreeView.prototype.getNodeData = function (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 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 };
        }
        return { id: '', text: '', parentID: '', selected: '', expanded: '', isChecked: '' };
    };
    TreeView.prototype.getText = function (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;
    };
    TreeView.prototype.getExpandEvent = function (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 };
    };
    TreeView.prototype.destroyTemplate = function (nodeTemplate) {
        this.clearTemplate(['nodeTemplate']);
    };
    TreeView.prototype.reRenderNodes = function () {
        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.isLoaded = false;
        this.setDataBinding();
    };
    TreeView.prototype.setCssClass = function (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(' '));
        }
    };
    TreeView.prototype.editingHandler = function (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);
        }
    };
    TreeView.prototype.createTextbox = function (liEle, e) {
        var _this = 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);
                _this.inputObj = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].createInput({
                    element: inpEle,
                    properties: {
                        enableRtl: _this.enableRtl,
                    }
                }, _this.createElement);
                _this.inputObj.container.setAttribute('style', style);
                inpEle.focus();
                var inputEle = inpEle;
                inputEle.setSelectionRange(0, inputEle.value.length);
                _this.wireInputEvents(inpEle);
            }
        });
    };
    TreeView.prototype.updateOldText = function (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);
    };
    TreeView.prototype.inputFocusOut = function (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);
        this.appendNewText(liEle, txtEle, newText, true);
    };
    TreeView.prototype.appendNewText = function (liEle, txtEle, newText, isInput) {
        var eventArgs = this.getEditEvent(liEle, newText, null);
        this.trigger('nodeEdited', eventArgs);
        newText = eventArgs.cancel ? eventArgs.oldText : eventArgs.newText;
        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.innerHTML = '';
            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);
        }
        else {
            txtEle.innerHTML = newText;
        }
        if (isInput) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([liEle], EDITING);
            txtEle.focus();
        }
        if (eventArgs.oldText !== newText) {
            this.triggerEvent();
        }
    };
    TreeView.prototype.getElement = function (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 ele;
        }
        else {
            return null;
        }
    };
    TreeView.prototype.getId = function (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 ele.getAttribute('data-uid');
        }
        else {
            return null;
        }
    };
    TreeView.prototype.getEditEvent = function (liEle, newText, inpEle) {
        var data = this.getNodeData(liEle);
        return { cancel: false, newText: newText, node: liEle, nodeData: data, oldText: this.oldText, innerHtml: inpEle };
    };
    TreeView.prototype.getNodeObject = function (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;
    };
    TreeView.prototype.getChildNodeObject = function (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_1__["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;
    };
    TreeView.prototype.setDragAndDrop = function (toBind) {
        if (toBind) {
            this.initializeDrag();
        }
        else {
            this.destroyDrag();
        }
    };
    TreeView.prototype.initializeDrag = function () {
        var _this = this;
        var virtualEle;
        var proxy = this;
        this.dragObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"](this.element, {
            enableTailMode: true,
            enableAutoScroll: true,
            dragTarget: '.' + TEXTWRAP,
            helper: function (e) {
                _this.dragTarget = e.sender.target;
                var dragRoot = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this.dragTarget, '.' + ROOT);
                var dragWrap = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this.dragTarget, '.' + TEXTWRAP);
                _this.dragLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this.dragTarget, '.' + LISTITEM);
                if (_this.fullRowSelect && !dragWrap && _this.dragTarget.classList.contains(FULLROW)) {
                    dragWrap = _this.dragTarget.nextElementSibling;
                }
                if (!_this.dragTarget || !e.element.isSameNode(dragRoot) || !dragWrap ||
                    _this.dragTarget.classList.contains(ROOT) || _this.dragTarget.classList.contains(PARENTITEM) ||
                    _this.dragTarget.classList.contains(LISTITEM) || _this.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 + ' ' + _this.cssClass + ' ' + (_this.enableRtl ? RTL : '');
                virtualEle = proxy.createElement('div', { className: cssClass });
                virtualEle.appendChild(cloneEle);
                var nLen = _this.selectedNodes.length;
                if (nLen > 1 && _this.allowMultiSelection && _this.dragLi.classList.contains(ACTIVE)) {
                    var cNode = proxy.createElement('span', { className: DROPCOUNT, innerHTML: '' + nLen });
                    virtualEle.appendChild(cNode);
                }
                document.body.appendChild(virtualEle);
                document.body.style.cursor = '';
                _this.dragData = _this.getNodeData(_this.dragLi);
                return virtualEle;
            },
            dragStart: function (e) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.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 = _this.getDragEvent(e.event, _this, null, e.target, null, virtualEle, level);
                if (eventArgs.draggedNode.classList.contains(EDITING)) {
                    eventArgs.cancel = true;
                }
                else {
                    _this.trigger('nodeDragStart', eventArgs);
                }
                if (eventArgs.cancel) {
                    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;
                }
                else {
                    _this.dragStartAction = true;
                }
            },
            drag: function (e) {
                _this.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 } });
                _this.dragAction(e, virtualEle);
            },
            dragStop: function (e) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.element], DRAGGING);
                _this.removeVirtualEle();
                var dropTarget = e.target;
                var preventTargetExpand = false;
                var dropRoot = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dropTarget, '.' + DROPPABLE));
                if (!dropTarget || !dropRoot) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(e.helper);
                    document.body.style.cursor = '';
                }
                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 = _this.getDragEvent(e.event, _this, dropTarget, dropTarget, null, e.helper, level);
                eventArgs.preventTargetExpand = preventTargetExpand;
                _this.trigger('nodeDragStop', eventArgs);
                _this.dragParent = eventArgs.draggedParentNode;
                _this.preventExpand = eventArgs.preventTargetExpand;
                if (eventArgs.cancel) {
                    if (e.helper.parentNode) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(e.helper);
                    }
                    document.body.style.cursor = '';
                }
                _this.dragStartAction = false;
            }
        });
        this.dropObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Droppable"](this.element, {
            out: function (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 (e) {
                document.body.style.cursor = '';
            },
            drop: function (e) {
                _this.dropAction(e);
            }
        });
    };
    TreeView.prototype.dragAction = function (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 = e.target.classList;
        if (this.fullRowSelect && !dropWrap && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(classList) && classList.contains(FULLROW)) {
            dropWrap = e.target.nextElementSibling;
        }
        if (dropRoot) {
            var dropLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + LISTITEM);
            if (!dropRoot.classList.contains(ROOT) || (dropWrap &&
                (!dropLi.isSameNode(this.dragLi) && !this.isDescendant(this.dragLi, dropLi)))) {
                if (dropLi && e && (e.event.offsetY < 7)) {
                    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 && (e.target.offsetHeight > 0 && e.event.offsetY > (e.target.offsetHeight - 10))) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], DROPNEXT);
                    var virEle = this.createElement('div', { className: SIBLING });
                    var index = this.fullRowSelect ? (2) : (1);
                    dropLi.insertBefore(virEle, dropLi.children[index]);
                }
                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);
        }
    };
    TreeView.prototype.dropAction = function (e) {
        var offsetY = e.event.offsetY;
        var dropTarget = e.target;
        var dragObj;
        var level;
        var drop = false;
        var dragInstance = e.dragData.draggable;
        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;
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(e.droppedElement);
            document.body.style.cursor = '';
            if (!dropLi || dropLi.isSameNode(dragLi) || this.isDescendant(dragLi, dropLi)) {
                if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["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 i = sNodes.length - 1; i >= 0; i--) {
                        if (dropLi.isSameNode(sNodes[i]) || this.isDescendant(sNodes[i], dropLi)) {
                            continue;
                        }
                        this.appendNode(dropTarget, sNodes[i], dropLi, e, dragObj, offsetY);
                    }
                }
                else {
                    for (var i = 0; i < sNodes.length; i++) {
                        if (dropLi.isSameNode(sNodes[i]) || this.isDescendant(sNodes[i], dropLi)) {
                            continue;
                        }
                        this.appendNode(dropTarget, sNodes[i], 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_1__["DataManager"] === false) {
            this.preventExpand = false;
        }
        this.trigger('nodeDropped', this.getDragEvent(e.event, dragObj, dropTarget, e.target, e.dragData.draggedElement, null, level, drop));
        this.triggerEvent();
    };
    TreeView.prototype.appendNode = function (dropTarget, dragLi, dropLi, e, dragObj, offsetY) {
        if (!dragLi.classList.contains('e-disable') && !dropLi.classList.contains('e-disable')) {
            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 {
                this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY);
            }
        }
    };
    TreeView.prototype.dropAsSiblingNode = function (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;
        }
        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();
        }
    };
    TreeView.prototype.dropAsChildNode = function (dragLi, dropLi, dragObj, index, e, pos) {
        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)) {
            dropParentUl.insertBefore(dragLi, dropLi);
            this.moveData(dragLi, dropLi, dropParentUl, true, dragObj);
        }
        else if (e && (e.target.offsetHeight > 0 && pos > (e.target.offsetHeight - 10))) {
            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();
        }
    };
    TreeView.prototype.moveData = function (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, len = childData.length; i < len; 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);
        }
    };
    TreeView.prototype.expandParent = function (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_2__["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_2__["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_2__["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_2__["ListBase"].generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);
            }
            var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, dropLi);
            if (icon) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], EXPANDABLE);
            }
            else {
                _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);
                icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, dropLi);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], EXPANDABLE);
            }
            dropUl = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].generateUL(this.createElement, [], null, this.listBaseOption);
            dropLi.appendChild(dropUl);
            this.addExpand(dropLi);
            this.trigger('nodeExpanded', this.getExpandEvent(dropLi, null));
        }
        return dropUl;
    };
    TreeView.prototype.updateElement = function (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', null);
            this.removeExpand(dragParentLi, true);
        }
    };
    TreeView.prototype.updateAriaLevel = function (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);
    };
    TreeView.prototype.updateChildAriaLevel = function (element, level) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            var cNodes = element.childNodes;
            for (var i = 0, len = cNodes.length; i < len; 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);
            }
        }
    };
    TreeView.prototype.renderVirtualEle = function (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]);
    };
    TreeView.prototype.removeVirtualEle = function () {
        var sibEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + SIBLING);
        if (sibEle) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(sibEle);
        }
    };
    TreeView.prototype.destroyDrag = function () {
        if (this.dragObj && this.dropObj) {
            this.dragObj.destroy();
            this.dropObj.destroy();
        }
    };
    TreeView.prototype.getDragEvent = function (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_2 = targetParent ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-list-parent', targetParent) : null;
                indexValue = (parent_2) ? parent_2.children.length : 0;
                if (!(this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && parent_2 === null && targetParent) {
                    var parent_3 = targetParent.hasAttribute('data-uid') ?
                        this.getChildNodes(this.fields.dataSource, targetParent.getAttribute('data-uid').toString()) : null;
                    indexValue = (parent_3) ? parent_3.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,
        };
    };
    TreeView.prototype.addFullRow = function (toAdd) {
        var len = this.liList.length;
        if (toAdd) {
            for (var i = 0; i < len; i++) {
                this.createFullRow(this.liList[i]);
            }
        }
        else {
            for (var i = 0; i < len; i++) {
                var rowDiv = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + FULLROW, this.liList[i]);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(rowDiv);
            }
        }
    };
    TreeView.prototype.createFullRow = function (item) {
        var rowDiv = this.createElement('div', { className: FULLROW });
        item.insertBefore(rowDiv, item.childNodes[0]);
    };
    TreeView.prototype.addMultiSelect = function (toAdd) {
        if (toAdd) {
            var liEles = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM + ':not([aria-selected="true"])', this.element);
            for (var _i = 0, liEles_1 = liEles; _i < liEles_1.length; _i++) {
                var ele = liEles_1[_i];
                ele.setAttribute('aria-selected', 'false');
            }
        }
        else {
            var liEles = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM + '[aria-selected="false"]', this.element);
            for (var _a = 0, liEles_2 = liEles; _a < liEles_2.length; _a++) {
                var ele = liEles_2[_a];
                ele.removeAttribute('aria-selected');
            }
        }
    };
    TreeView.prototype.collapseByLevel = function (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, len = cNodes.length; i < len; 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);
            }
        }
    };
    TreeView.prototype.collapseAllNodes = function (excludeHiddenNodes) {
        var cIcons = this.getVisibleNodes(excludeHiddenNodes, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + COLLAPSIBLE, this.element));
        for (var i = 0, len = cIcons.length; i < len; i++) {
            var icon = cIcons[i];
            var liEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(icon, '.' + LISTITEM);
            this.collapseNode(liEle, icon, null);
        }
    };
    TreeView.prototype.expandByLevel = function (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, len = eNodes.length; i < len; 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);
            }
        }
    };
    TreeView.prototype.expandAllNodes = function (excludeHiddenNodes) {
        var eIcons = this.getVisibleNodes(excludeHiddenNodes, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + EXPANDABLE, this.element));
        for (var i = 0, len = eIcons.length; i < len; i++) {
            var icon = eIcons[i];
            var liEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(icon, '.' + LISTITEM);
            this.expandAction(liEle, icon, null, true);
        }
    };
    TreeView.prototype.getVisibleNodes = function (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;
    };
    TreeView.prototype.removeNode = function (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);
    };
    TreeView.prototype.updateInstance = function () {
        this.updateList();
        this.updateSelectedNodes();
        this.updateExpandedNodes();
    };
    TreeView.prototype.updateList = function () {
        this.liList = Array.prototype.slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM, this.element));
    };
    TreeView.prototype.updateSelectedNodes = function () {
        this.setProperties({ selectedNodes: [] }, true);
        var sNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + ACTIVE, this.element);
        this.selectGivenNodes(sNodes);
    };
    TreeView.prototype.updateExpandedNodes = function () {
        this.setProperties({ expandedNodes: [] }, true);
        var eNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('[aria-expanded="true"]', this.element);
        for (var i = 0, len = eNodes.length; i < len; i++) {
            this.addExpand(eNodes[i]);
        }
    };
    TreeView.prototype.removeData = function (node) {
        if (this.dataType === 1) {
            var dm = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["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 id = this.getId(node);
            this.updateChildField(this.treeData, this.fields, id, null, null, true);
        }
    };
    TreeView.prototype.removeChildNodes = function (parentId) {
        var cNodes = this.getChildGroup(this.groupedData, parentId, false);
        var childData = [];
        if (cNodes) {
            for (var i = 0, len = cNodes.length; i < len; i++) {
                var dm = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["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;
    };
    TreeView.prototype.doGivenAction = function (nodes, selector, toExpand) {
        for (var i = 0, len = nodes.length; i < len; 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);
            }
        }
    };
    TreeView.prototype.addGivenNodes = function (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_2__["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);
        }
        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);
    };
    TreeView.prototype.updateMapper = function (level) {
        var mapper = (level === 1) ? this.fields : this.getChildFields(this.fields, level - 1, 1);
        this.updateListProp(mapper);
    };
    TreeView.prototype.updateListProp = function (mapper) {
        var prop = this.getActualProperties(mapper);
        this.listBaseOption.fields = prop;
        this.listBaseOption.fields.url = prop.hasOwnProperty('navigateUrl') ? prop.navigateUrl : 'navigateUrl';
    };
    TreeView.prototype.getDataPos = function (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_1__["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;
    };
    TreeView.prototype.addChildData = function (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, len = data.length; k < len; 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)) ||
                    (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] && 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]);
                    index = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index) ? childData.length : index;
                    for (var k = 0, len = data.length; k < len; k++) {
                        childData.splice(index, 0, data[k]);
                        index++;
                    }
                }
                else {
                    var key = (typeof mapper.child === 'string') ? mapper.child : 'child';
                    obj[i][key] = 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_1__["DataManager"] && !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;
    };
    TreeView.prototype.doDisableAction = function (nodes) {
        for (var i = 0, len = nodes.length; i < len; i++) {
            var liEle = this.getElement(nodes[i]);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
                var id = void 0;
                id = (nodes[i]) ? nodes[i].toString() : null;
                if (id && this.disableNode.indexOf(nodes[i].toString()) === -1) {
                    this.disableNode.push(nodes[i].toString());
                }
                continue;
            }
            liEle.setAttribute('aria-disabled', 'true');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([liEle], DISABLE);
        }
    };
    TreeView.prototype.doEnableAction = function (nodes) {
        for (var i = 0, len = nodes.length; i < len; i++) {
            var liEle = this.getElement(nodes[i]);
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
                var id = (nodes[i]) ? nodes[i].toString() : null;
                if (id && this.disableNode.indexOf(id) !== -1) {
                    this.disableNode.splice(this.disableNode.indexOf(id), 1);
                }
                continue;
            }
            liEle.removeAttribute('aria-disabled');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([liEle], DISABLE);
        }
    };
    TreeView.prototype.setTouchClass = function () {
        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;
    };
    TreeView.prototype.updatePersistProp = function () {
        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;
        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);
            }
        }
    };
    TreeView.prototype.removeField = function (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_1__["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);
            }
        }
    };
    TreeView.prototype.getMapperProp = function (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;
        }
    };
    TreeView.prototype.updateField = function (obj, mapper, id, key, value) {
        var childNodes;
        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_1__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["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);
        }
    };
    TreeView.prototype.updateChildField = function (obj, mapper, id, key, value, remove) {
        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) {
                    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);
                if (removedData !== 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', 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);
                if (removedData !== undefined) {
                    break;
                }
            }
        }
        return removedData;
    };
    TreeView.prototype.triggerEvent = function () {
        if (this.nodeTemplate && this.isBlazorPlatform && !this.isStringTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + 'nodeTemplate', 'NodeTemplate');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'nodeTemplate', 'NodeTemplate', this);
        }
        var eventArgs = { data: this.treeData };
        this.trigger('dataSourceChanged', eventArgs);
    };
    TreeView.prototype.wireInputEvents = function (inpEle) {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(inpEle, 'blur', this.inputFocusOut, this);
    };
    TreeView.prototype.wireEditingEvents = function (toBind) {
        if (toBind) {
            var proxy_2 = this;
            this.touchEditObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
                tap: function (e) {
                    if (e.tapCount === 2) {
                        e.originalEvent.preventDefault();
                        proxy_2.editingHandler(e.originalEvent);
                    }
                }
            });
        }
        else {
            if (this.touchEditObj) {
                this.touchEditObj.destroy();
            }
        }
    };
    TreeView.prototype.wireClickEvent = function (toBind) {
        if (toBind) {
            var proxy_3 = this;
            this.touchClickObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
                tap: function (e) {
                    e.originalEvent.preventDefault();
                    proxy_3.clickHandler(e);
                }
            });
        }
        else {
            if (this.touchClickObj) {
                this.touchClickObj.destroy();
            }
        }
    };
    TreeView.prototype.wireExpandOnEvent = function (toBind) {
        var _this = this;
        if (toBind) {
            var proxy_4 = this;
            this.touchExpandObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
                tap: function (e) {
                    if (_this.expandOnType === 'Click' || (_this.expandOnType === 'DblClick' && e.tapCount === 2)) {
                        proxy_4.expandHandler(e);
                    }
                }
            });
        }
        else {
            if (this.touchExpandObj) {
                this.touchExpandObj.destroy();
            }
        }
    };
    TreeView.prototype.mouseDownHandler = function (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);
        }
    };
    ;
    TreeView.prototype.preventContextMenu = function (e) {
        e.preventDefault();
    };
    TreeView.prototype.wireEvents = function () {
        _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',
        });
    };
    TreeView.prototype.unWireEvents = function () {
        _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);
        this.keyboardModule.destroy();
    };
    TreeView.prototype.parents = function (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;
    };
    TreeView.prototype.isDescendant = function (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;
    };
    TreeView.prototype.showSpinner = function (element) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], LOAD);
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_5__["createSpinner"])({
            target: element,
            width: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 16 : 14
        }, this.createElement);
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_5__["showSpinner"])(element);
    };
    TreeView.prototype.hideSpinner = function (element) {
        Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_5__["hideSpinner"])(element);
        element.innerHTML = '';
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element], LOAD);
    };
    TreeView.prototype.setCheckedNodes = function (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
     */
    TreeView.prototype.setValidCheckedNode = function (node) {
        if (this.dataType === 1) {
            var mapper = this.fields;
            var resultData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().where(mapper.id, 'equal', node, true));
            if (resultData[0]) {
                this.setChildCheckState(resultData, node, resultData[0]);
                if (this.autoCheck) {
                    var parent_4 = resultData[0][this.fields.parentID] ? resultData[0][this.fields.parentID].toString() : null;
                    var childNodes = this.getChildNodes(this.treeData, parent_4);
                    var count = 0;
                    for (var len = 0; len < childNodes.length; len++) {
                        var childId = childNodes[len][this.fields.id].toString();
                        if (this.checkedNodes.indexOf(childId) !== -1) {
                            count++;
                        }
                    }
                    if (count === childNodes.length && this.checkedNodes.indexOf(parent_4) === -1 && parent_4) {
                        this.checkedNodes.push(parent_4);
                    }
                }
            }
        }
        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)
     */
    TreeView.prototype.setChildCheckState = function (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 index = 0; index < childItems.length; index++) {
                var checkedChild = childItems[index][this.fields.id] ? childItems[index][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[index]);
                if (subChildItems) {
                    this.setChildCheckState(subChildItems, node, childItems[index]);
                }
                if (this.checkedNodes.indexOf(checkedChild) !== -1 && this.autoCheck) {
                    count++;
                }
                if (count === childItems.length && this.checkedNodes.indexOf(checkedParent) === -1 && this.autoCheck) {
                    this.checkedNodes.push(checkedParent);
                }
            }
        }
    };
    TreeView.prototype.setIndeterminate = function (nodes) {
        for (var i = 0; i < nodes.length; i++) {
            this.setValidCheckedNode(nodes[i]);
        }
    };
    /**
     * Called internally if any of the property value changed.
     * @param  {TreeView} newProp
     * @param  {TreeView} oldProp
     * @returns void
     * @private
     */
    TreeView.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'allowDragAndDrop':
                    this.setDragAndDrop(this.allowDragAndDrop);
                    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;
                    this.setProperties({ expandedNodes: [] }, true);
                    this.collapseAll();
                    this.isInitalExpand = true;
                    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.wireExpandOnEvent(true);
                    }
                    break;
                case 'fields':
                    this.isAnimate = false;
                    this.initialRender = true;
                    this.updateListProp(this.fields);
                    this.reRenderNodes();
                    this.initialRender = false;
                    this.isAnimate = true;
                    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) {
                            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;
            }
        }
    };
    /**
     * Removes the component from the DOM and detaches all its related event handlers. It also removes the attributes and classes.
     */
    TreeView.prototype.destroy = function () {
        this.element.removeAttribute('aria-activedescendant');
        this.element.removeAttribute('tabindex');
        this.unWireEvents();
        this.wireEditingEvents(false);
        this.rippleFn();
        this.rippleIconFn();
        this.setCssClass(this.cssClass, null);
        this.setDragAndDrop(false);
        this.setFullRow(false);
        this.element.innerHTML = '';
        _super.prototype.destroy.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.
     */
    TreeView.prototype.addNodes = function (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_1__["DataManager"]) {
            var dropUl_1;
            var icon = dropLi ? dropLi.querySelector('.' + ICON) : null;
            var proxy_5 = this;
            if (dropLi && icon && icon.classList.contains(EXPANDABLE) &&
                dropLi.querySelector('.' + PARENTITEM) === null) {
                proxy_5.renderChildNodes(dropLi, null, function () {
                    dropUl_1 = dropLi.querySelector('.' + PARENTITEM);
                    proxy_5.addGivenNodes(nodes, dropLi, index, true, dropUl_1);
                    proxy_5.triggerEvent();
                });
            }
            else {
                this.addGivenNodes(nodes, dropLi, index, true);
                this.triggerEvent();
            }
        }
        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_1__["DataManager"] === false) {
            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.
     */
    TreeView.prototype.beginEdit = function (node) {
        var ele = this.getElement(node);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
            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.
     */
    TreeView.prototype.checkAll = function (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.
     */
    TreeView.prototype.collapseAll = function (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.
     */
    TreeView.prototype.disableNodes = function (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.
     */
    TreeView.prototype.enableNodes = function (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.
     */
    TreeView.prototype.ensureVisible = function (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.
     */
    TreeView.prototype.expandAll = function (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.
     */
    TreeView.prototype.getAllCheckedNodes = function () {
        var checkNodes = this.checkedNodes;
        var newCheck = [];
        var i = 0;
        var id = this.fields.id;
        for (i; i < this.treeData.length; i++) {
            //Checks if isChecked is enabled while node is not loaded in DOM
            var checked = null;
            var childNode = null;
            var isLoaded = this.element.querySelector('[data-uid="' + this.treeData[i][id].toString() + '"]');
            if (isLoaded && isLoaded.querySelector('.e-list-item') === null) {
                //Checks if isChecked is enabled for parent
                if (this.getTreeData()[i][this.fields.isChecked] === true
                    && this.checkedElement.indexOf(this.getTreeData()[i][id].toString()) === -1) {
                    newCheck.push(this.treeData[i][id].toString());
                    checked = 2;
                }
                //Checks for child nodes with isChecked enabled
                if (checked !== 2) {
                    checked = 1;
                }
                childNode = this.getChildNodes(this.getTreeData(), this.getTreeData()[i][id].toString());
                (childNode !== null && this.autoCheck) ? this.allCheckNode(childNode, newCheck, checked) : childNode = null;
            }
        }
        i = 0;
        //Gets checked nodes based on UI interaction
        while (i < checkNodes.length) {
            if (newCheck.indexOf(checkNodes[i]) !== -1) {
                i++;
                continue;
            }
            newCheck.push(checkNodes[i]);
            //Gets all child which is not loaded while parent is checked
            var parentNode = this.element.querySelector('[data-uid="' + checkNodes[i] + '"]');
            if (parentNode && parentNode.querySelector('.e-list-item') === null) {
                var child = this.getChildNodes(this.treeData, checkNodes[i].toString());
                (child && this.autoCheck) ? this.allCheckNode(child, newCheck) : child = null;
            }
            i++;
        }
        return newCheck;
    };
    /**
     * 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.
     */
    TreeView.prototype.getNode = function (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.
     */
    TreeView.prototype.getTreeData = function (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.
     */
    TreeView.prototype.moveNodes = function (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_1__["DataManager"] === false) {
            this.preventExpand = 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.
     */
    TreeView.prototype.removeNodes = function (nodes) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nodes)) {
            for (var i = 0, len = nodes.length; i < len; 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();
        }
    };
    /**
     * 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.
     */
    TreeView.prototype.updateNode = function (target, newText) {
        var _this = 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) {
                _this.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.
     */
    TreeView.prototype.uncheckAll = function (nodes) {
        if (this.showCheckBox) {
            this.doCheckBoxAction(nodes, false);
        }
    };
    var TreeView_1;
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TreeView.prototype, "allowDragAndDrop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TreeView.prototype, "allowEditing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TreeView.prototype, "allowMultiSelection", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, NodeAnimationSettings)
    ], TreeView.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], TreeView.prototype, "checkedNodes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], TreeView.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TreeView.prototype, "enablePersistence", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], TreeView.prototype, "expandedNodes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], TreeView.prototype, "expandOn", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, FieldsSettings)
    ], TreeView.prototype, "fields", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TreeView.prototype, "fullRowSelect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TreeView.prototype, "loadOnDemand", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], TreeView.prototype, "nodeTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], TreeView.prototype, "selectedNodes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')
    ], TreeView.prototype, "sortOrder", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], TreeView.prototype, "showCheckBox", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], TreeView.prototype, "autoCheck", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "dataBound", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "dataSourceChanged", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "drawNode", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "destroyed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "keyPress", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeChecked", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeChecking", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeClicked", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeCollapsed", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeCollapsing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeDragging", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeDragStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeDragStop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeDropped", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeEdited", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeEditing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeExpanded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeExpanding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeSelected", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], TreeView.prototype, "nodeSelecting", void 0);
    TreeView = TreeView_1 = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], TreeView);
    return TreeView;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/index.js ***!
  \**********************************************************/
/*! exports provided: PdfAction, PdfUriAction, PdfActionLinkAnnotation, PdfAnnotation, PdfAnnotationCollection, PdfDocumentLinkAnnotation, PdfLinkAnnotation, PdfTextWebLink, PdfUriAnnotation, Dictionary, defaultToString, PdfCatalog, PdfDocument, PdfDocumentBase, PdfDocumentTemplate, PdfPageNumberField, PdfCompositeField, PdfPageCountField, PointF, SizeF, RectangleF, Rectangle, PdfCacheCollection, PdfCollection, PdfDestination, PdfDestinationMode, ProcedureSets, PdfHorizontalAlignment, PdfVerticalAlignment, PdfTextAlignment, TextRenderingMode, PdfLineJoin, PdfLineCap, PdfDashStyle, PdfFillMode, PdfColorSpace, PdfBlendMode, PdfGraphicsUnit, PdfGridImagePosition, PdfTextDirection, PdfColor, PdfGraphics, GetResourceEventHandler, PdfGraphicsState, PdfMargins, PdfPen, PdfResources, Guid, PdfTransformationMatrix, Matrix, PdfBrush, PdfSolidBrush, PdfTemplate, PdfLayoutElement, PdfTextElement, ElementLayouter, PdfLayoutFormat, PdfLayoutParams, PdfLayoutResult, TextLayouter, TextPageLayoutResult, PdfTextLayoutResult, PdfLayoutType, PdfLayoutBreakType, PdfFontStyle, PdfFontFamily, PdfFontType, PdfWordWrapType, PdfSubSuperScript, FontEncoding, TtfCmapFormat, TtfCmapEncoding, TtfPlatformID, TtfMicrosoftEncodingID, TtfMacintoshEncodingID, FontDescriptorFlags, TtfCompositeGlyphFlags, PdfFont, PdfFontMetrics, WidthTable, StandardWidthTable, PdfStandardFont, PdfStandardFontMetricsFactory, PdfStringFormat, PdfStringLayouter, PdfStringLayoutResult, LineInfo, LineType, StringTokenizer, PdfTrueTypeFont, RtlRenderer, ArabicShapeRenderer, ArabicShape, Bidi, RtlCharacters, ByteArray, ImageFormat, ImageDecoder, PdfBitmap, PdfImage, PdfTransparency, ObjectStatus, ObjectType, PdfCrossTable, RegisteredObject, DictionaryProperties, PdfMainObjectCollection, ObjectInfo, Operators, PdfStreamWriter, PdfWriter, PdfPageOrientation, PdfPageRotateAngle, PdfNumberStyle, PdfDockStyle, PdfAlignmentStyle, TemplateType, PageAddedEventArgs, PdfDocumentPageCollection, PdfPage, PdfPageBase, PdfPageLayer, PdfPageLayerCollection, PdfPageSettings, PdfPageSize, PdfPageTemplateElement, PdfSection, PageSettingsState, PdfSectionCollection, PdfSectionPageCollection, PdfSectionTemplate, PdfArray, PdfDictionary, SaveSectionCollectionEventHandler, SaveDescendantFontEventHandler, SaveFontDictionaryEventHandler, SaveAnnotationEventHandler, SaveSectionEventHandler, SaveTemplateEventHandler, PdfName, PdfNumber, PdfReference, PdfReferenceHolder, PdfStream, SaveCmapEventHandler, SaveFontProgramEventHandler, InternalEnum, PdfString, PdfGridStyleBase, PdfGridStyle, PdfGridCellStyle, PdfGridRowStyle, PdfHorizontalOverflowType, PdfBorders, PdfPaddings, PdfBorderOverlapStyle, PdfGridLayouter, PdfGridLayoutResult, PdfGridLayoutFormat, GridCellEventArgs, PdfGridBeginCellDrawEventArgs, PdfGridEndCellDrawEventArgs, PdfCancelEventArgs, BeginPageLayoutEventArgs, EndPageLayoutEventArgs, PdfGridBeginPageLayoutEventArgs, PdfGridEndPageLayoutEventArgs, RowLayoutResult, PdfGrid, PdfGridColumn, PdfGridColumnCollection, PdfGridRow, PdfGridRowCollection, PdfGridHeaderCollection, PdfGridCell, PdfGridCellCollection */
/***/ (function(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-pdf-export/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfAction", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfUriAction", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfUriAction"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfActionLinkAnnotation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfActionLinkAnnotation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfAnnotation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfAnnotation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfAnnotationCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfAnnotationCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentLinkAnnotation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDocumentLinkAnnotation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLinkAnnotation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfLinkAnnotation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextWebLink", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfTextWebLink"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfUriAnnotation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfUriAnnotation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dictionary", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultToString", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["defaultToString"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCatalog", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfCatalog"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocument", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDocument"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentBase", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDocumentBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentTemplate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDocumentTemplate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageNumberField", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageNumberField"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCompositeField", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfCompositeField"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageCountField", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageCountField"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PointF", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PointF"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SizeF", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SizeF"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RectangleF", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RectangleF"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rectangle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Rectangle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCacheCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfCacheCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDestination", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDestination"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDestinationMode", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDestinationMode"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProcedureSets", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ProcedureSets"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfHorizontalAlignment", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfHorizontalAlignment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfVerticalAlignment", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfVerticalAlignment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextAlignment", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextRenderingMode", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TextRenderingMode"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLineJoin", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfLineJoin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLineCap", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfLineCap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDashStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDashStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFillMode", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfFillMode"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfColorSpace", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfColorSpace"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBlendMode", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfBlendMode"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGraphicsUnit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGraphicsUnit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridImagePosition", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridImagePosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextDirection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfTextDirection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfColor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGraphics", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGraphics"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GetResourceEventHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["GetResourceEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGraphicsState", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGraphicsState"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfMargins", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfMargins"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPen", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPen"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfResources", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfResources"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Guid", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Guid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTransformationMatrix", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfTransformationMatrix"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Matrix", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Matrix"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBrush", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfBrush"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSolidBrush", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfSolidBrush"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTemplate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfTemplate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutElement", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfLayoutElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextElement", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfTextElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ElementLayouter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ElementLayouter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutFormat", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfLayoutFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutParams", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfLayoutParams"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutResult", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfLayoutResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextLayouter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TextLayouter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextPageLayoutResult", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TextPageLayoutResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextLayoutResult", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfTextLayoutResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfLayoutType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutBreakType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfLayoutBreakType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFontStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFontFamily", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFontType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfFontType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfWordWrapType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfWordWrapType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSubSuperScript", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfSubSuperScript"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FontEncoding", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FontEncoding"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfCmapFormat", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TtfCmapFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfCmapEncoding", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TtfCmapEncoding"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfPlatformID", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TtfPlatformID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfMicrosoftEncodingID", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TtfMicrosoftEncodingID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfMacintoshEncodingID", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TtfMacintoshEncodingID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FontDescriptorFlags", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["FontDescriptorFlags"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfCompositeGlyphFlags", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TtfCompositeGlyphFlags"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFont", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFontMetrics", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfFontMetrics"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WidthTable", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["WidthTable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StandardWidthTable", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["StandardWidthTable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStandardFont", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfStandardFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStandardFontMetricsFactory", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfStandardFontMetricsFactory"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStringFormat", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfStringFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStringLayouter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfStringLayouter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStringLayoutResult", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfStringLayoutResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineInfo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LineInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["LineType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringTokenizer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["StringTokenizer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTrueTypeFont", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfTrueTypeFont"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RtlRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RtlRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArabicShapeRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ArabicShapeRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArabicShape", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ArabicShape"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bidi", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Bidi"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RtlCharacters", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RtlCharacters"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ByteArray", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ByteArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageFormat", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ImageFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageDecoder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ImageDecoder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBitmap", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfBitmap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfImage", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfImage"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTransparency", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfTransparency"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectStatus", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ObjectStatus"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ObjectType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCrossTable", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfCrossTable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RegisteredObject", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RegisteredObject"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DictionaryProperties", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DictionaryProperties"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfMainObjectCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfMainObjectCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectInfo", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ObjectInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Operators", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Operators"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStreamWriter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfStreamWriter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfWriter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfWriter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageOrientation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageOrientation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageRotateAngle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageRotateAngle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfNumberStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfNumberStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDockStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfAlignmentStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TemplateType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageAddedEventArgs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PageAddedEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentPageCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDocumentPageCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPage", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPage"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageBase", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageLayer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageLayer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageLayerCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageLayerCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageSize", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageSize"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageTemplateElement", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPageTemplateElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfSection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageSettingsState", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PageSettingsState"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSectionCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfSectionCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSectionPageCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfSectionPageCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSectionTemplate", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfSectionTemplate"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfArray", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfArray"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDictionary", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveSectionCollectionEventHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SaveSectionCollectionEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveDescendantFontEventHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SaveDescendantFontEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveFontDictionaryEventHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SaveFontDictionaryEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveAnnotationEventHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SaveAnnotationEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveSectionEventHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SaveSectionEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveTemplateEventHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SaveTemplateEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfName", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfName"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfNumber", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfNumber"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfReference", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfReference"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfReferenceHolder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfReferenceHolder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStream", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfStream"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveCmapEventHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SaveCmapEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveFontProgramEventHandler", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SaveFontProgramEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternalEnum", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["InternalEnum"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfString", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfString"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridStyleBase", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridStyleBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridCellStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridCellStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridRowStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridRowStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfHorizontalOverflowType", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfHorizontalOverflowType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBorders", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfBorders"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPaddings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfPaddings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBorderOverlapStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfBorderOverlapStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridLayouter", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridLayouter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridLayoutResult", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridLayoutResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridLayoutFormat", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridLayoutFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCellEventArgs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["GridCellEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridBeginCellDrawEventArgs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridBeginCellDrawEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridEndCellDrawEventArgs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridEndCellDrawEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCancelEventArgs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfCancelEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BeginPageLayoutEventArgs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["BeginPageLayoutEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EndPageLayoutEventArgs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["EndPageLayoutEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridBeginPageLayoutEventArgs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridBeginPageLayoutEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridEndPageLayoutEventArgs", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridEndPageLayoutEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowLayoutResult", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["RowLayoutResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGrid", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridColumn", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridColumnCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridColumnCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridRow", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridRowCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridRowCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridHeaderCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridHeaderCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridCell", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridCellCollection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PdfGridCellCollection"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/action.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/action.js ***!
  \**************************************************************************************/
/*! exports provided: PdfAction */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfAction", function() { return PdfAction; });
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");




/**
 * `PdfAction` class represents base class for all action types.
 * @private
 */
var PdfAction = /** @class */ (function () {
    // Constructors
    /**
     * Initialize instance for `Action` class.
     * @private
     */
    function PdfAction() {
        /**
         * Specifies the Next `action` to perform.
         * @private
         */
        this.action = null;
        /**
         * Specifies the Internal variable to store `dictionary properties`.
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_3__["DictionaryProperties"]();
        // super(); -> Object()
        this.initialize();
    }
    Object.defineProperty(PdfAction.prototype, "next", {
        // Properties
        /**
         * Gets and Sets the `Next` action to perform.
         * @private
         */
        get: function () {
            return this.action;
        },
        set: function (value) {
            // if (this.action !== value) {
            this.action = value;
            this.dictionary.items.setValue(this.dictionaryProperties.next, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_1__["PdfReferenceHolder"](this.action));
            // }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAction.prototype, "dictionary", {
        /**
         * Gets and Sets the instance of PdfDictionary class for `Dictionary`.
         * @private
         */
        get: function () {
            if (typeof this.pdfDictionary === 'undefined') {
                this.pdfDictionary = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]();
            }
            return this.pdfDictionary;
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * `Initialize` the action type.
     * @private
     */
    PdfAction.prototype.initialize = function () {
        this.dictionary.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__["PdfName"](this.dictionaryProperties.action));
    };
    Object.defineProperty(PdfAction.prototype, "element", {
        // IPdfWrapper Members
        /**
         * Gets the `Element` as IPdfPrimitive class.
         * @private
         */
        get: function () {
            return this.dictionary;
        },
        enumerable: true,
        configurable: true
    });
    return PdfAction;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/uri-action.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/uri-action.js ***!
  \******************************************************************************************/
/*! exports provided: PdfUriAction */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfUriAction", function() { return PdfUriAction; });
/* harmony import */ var _action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./action */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/action.js");
/* harmony import */ var _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-string */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `PdfUriAction` class for initialize the uri related internals.
 * @private
 */
var PdfUriAction = /** @class */ (function (_super) {
    __extends(PdfUriAction, _super);
    function PdfUriAction(uri) {
        var _this = _super.call(this) || this;
        // Fields
        /**
         * Specifies the `uri` string.
         * @default ''.
         * @private
         */
        _this.uniformResourceIdentifier = '';
        return _this;
    }
    Object.defineProperty(PdfUriAction.prototype, "uri", {
        // Properties
        /**
         * Gets and Sets the value of `Uri`.
         * @private
         */
        get: function () {
            return this.uniformResourceIdentifier;
        },
        set: function (value) {
            this.uniformResourceIdentifier = value;
            this.dictionary.items.setValue(this.dictionaryProperties.uri, new _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_1__["PdfString"](this.uniformResourceIdentifier));
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * `Initialize` the internals.
     * @private
     */
    PdfUriAction.prototype.initialize = function () {
        _super.prototype.initialize.call(this);
        this.dictionary.items.setValue(this.dictionaryProperties.s, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__["PdfName"](this.dictionaryProperties.uri));
    };
    return PdfUriAction;
}(_action__WEBPACK_IMPORTED_MODULE_0__["PdfAction"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/action-link-annotation.js":
/*!**********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/action-link-annotation.js ***!
  \**********************************************************************************************************/
/*! exports provided: PdfActionLinkAnnotation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfActionLinkAnnotation", function() { return PdfActionLinkAnnotation; });
/* harmony import */ var _link_annotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./link-annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/link-annotation.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * Represents base class for `link annotations` with associated action.
 * @private
 */
var PdfActionLinkAnnotation = /** @class */ (function (_super) {
    __extends(PdfActionLinkAnnotation, _super);
    // Constructors
    /**
     * Specifies the constructor for `ActionLinkAnnotation`.
     * @private
     */
    function PdfActionLinkAnnotation(rectangle) {
        var _this = _super.call(this, rectangle) || this;
        // Fields
        /**
         * Internal variable to store annotation's `action`.
         * @default null
         * @private
         */
        _this.pdfAction = null;
        return _this;
    }
    //Public method
    /**
     * get and set the `action`.
     * @hidden
     */
    PdfActionLinkAnnotation.prototype.getSetAction = function (value) {
        if (typeof value === 'undefined') {
            return this.pdfAction;
        }
        else {
            this.pdfAction = value;
        }
    };
    return PdfActionLinkAnnotation;
}(_link_annotation__WEBPACK_IMPORTED_MODULE_0__["PdfLinkAnnotation"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation-collection.js":
/*!*********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation-collection.js ***!
  \*********************************************************************************************************/
/*! exports provided: PdfAnnotationCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfAnnotationCollection", function() { return PdfAnnotationCollection; });
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../graphics/fonts/string-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js");
/* harmony import */ var _graphics_enum__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../graphics/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");






/**
 * `PdfAnnotationCollection` class represents the collection of 'PdfAnnotation' objects.
 * @private
 */
var PdfAnnotationCollection = /** @class */ (function () {
    function PdfAnnotationCollection(page) {
        // Constants
        /**
         * `Error` constant message.
         * @private
         */
        this.alreadyExistsAnnotationError = 'This annotatation had been already added to page';
        /**
         * `Error` constant message.
         * @private
         */
        this.missingAnnotationException = 'Annotation is not contained in collection.';
        /**
         * Specifies the Internal variable to store fields of `PdfDictionaryProperties`.
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__["DictionaryProperties"]();
        /**
         * Array of the `annotations`.
         * @private
         */
        this.internalAnnotations = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_0__["PdfArray"]();
        /**
         * privte `list` for the annotations.
         * @private
         */
        this.lists = [];
        if (typeof page !== 'undefined') {
            this.page = page;
        }
    }
    Object.defineProperty(PdfAnnotationCollection.prototype, "annotations", {
        /**
         * Gets the `PdfAnnotation` object at the specified index. Read-Only.
         * @private
         */
        get: function () {
            return this.internalAnnotations;
        },
        set: function (value) {
            this.internalAnnotations = value;
        },
        enumerable: true,
        configurable: true
    });
    // Public methods
    /**
     * `Adds` a new annotation to the collection.
     * @private
     */
    PdfAnnotationCollection.prototype.add = function (annotation) {
        // this.SetPrint(annotation);
        this.doAdd(annotation);
    };
    /**
     * `Adds` a Annotation to collection.
     * @private
     */
    /* tslint:disable */
    PdfAnnotationCollection.prototype.doAdd = function (annotation) {
        if (typeof annotation.destination !== 'undefined') {
            var layout = new _graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_4__["PdfStringLayouter"]();
            var layoutResult = layout.layout(annotation.text, annotation.font, annotation.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["SizeF"]((annotation.bounds.width), 0), false, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["SizeF"](0, 0));
            var lastPosition = annotation.bounds.y;
            if (layoutResult.lines.length === 1) {
                var size = annotation.font.measureString(layoutResult.lines[0].text);
                annotation.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["PointF"](annotation.bounds.x, lastPosition), size);
                annotation.text = layoutResult.lines[0].text;
                //Draw Annotation Text.
                this.page.graphics.drawString(annotation.text, annotation.font, null, annotation.brush, annotation.bounds.x, annotation.bounds.y, annotation.bounds.width, annotation.bounds.height, null);
                //Add annotation to dictionary.
                annotation.setPage(this.page);
                this.setColor(annotation);
                this.internalAnnotations.add(new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_1__["PdfReferenceHolder"](annotation));
                this.lists.push(annotation);
            }
            else {
                for (var i = 0; i < layoutResult.lines.length; i++) {
                    var size = annotation.font.measureString(layoutResult.lines[i].text);
                    if (i === 0) {
                        annotation.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["RectangleF"](annotation.bounds.x, lastPosition, size.width, size.height);
                        annotation.text = layoutResult.lines[i].text;
                        //Draw Annotation Text.
                        this.page.graphics.drawString(annotation.text, annotation.font, null, annotation.brush, annotation.bounds.x, lastPosition, size.width, size.height, null);
                        //Add annotation to dictionary.
                        annotation.setPage(this.page);
                        this.setColor(annotation);
                        this.internalAnnotations.add(new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_1__["PdfReferenceHolder"](annotation));
                        this.lists.push(annotation);
                        //Update y for drawing next line of the text.
                        lastPosition += annotation.bounds.height;
                    }
                    else {
                        var annot = annotation.clone();
                        annot.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["PointF"](annotation.bounds.x, lastPosition), size);
                        annot.text = layoutResult.lines[i].text;
                        //Draw Annotation Text.
                        this.page.graphics.drawString(annot.text, annot.font, null, annot.brush, annot.bounds.x, annot.bounds.y, annot.bounds.width, annot.bounds.height, null);
                        //Add annotation to dictionary.
                        annot.setPage(this.page);
                        this.setColor(annot);
                        this.internalAnnotations.add(new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_1__["PdfReferenceHolder"](annot));
                        this.lists.push(annot);
                        //Update y for drawing next line of the text.
                        lastPosition += annot.bounds.height;
                    }
                }
            }
        }
        else {
            annotation.setPage(this.page);
            this.internalAnnotations.add(new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_1__["PdfReferenceHolder"](annotation));
            return this.lists.push(annotation);
        }
    };
    /* tslint:enable */
    /**
     * `Set a color of an annotation`.
     * @private
     */
    PdfAnnotationCollection.prototype.setColor = function (annotation) {
        var cs = _graphics_enum__WEBPACK_IMPORTED_MODULE_5__["PdfColorSpace"].Rgb;
        var colours = annotation.color.toArray(cs);
        annotation.dictionary.items.setValue(this.dictionaryProperties.c, colours);
    };
    Object.defineProperty(PdfAnnotationCollection.prototype, "element", {
        // IPdfWrapper Members
        /**
         * Gets the `Element` representing this object.
         * @private
         */
        get: function () {
            return this.internalAnnotations;
        },
        enumerable: true,
        configurable: true
    });
    return PdfAnnotationCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation.js ***!
  \**********************************************************************************************/
/*! exports provided: PdfAnnotation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfAnnotation", function() { return PdfAnnotation; });
/* harmony import */ var _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../graphics/pdf-color */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../primitives/pdf-string */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _graphics_brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../graphics/brushes/pdf-solid-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-solid-brush.js");
/* harmony import */ var _graphics_fonts_pdf_standard_font__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../graphics/fonts/pdf-standard-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font.js");
/* harmony import */ var _graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../graphics/fonts/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./../graphics/fonts/pdf-string-format */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js");
/* harmony import */ var _graphics_enum__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./../graphics/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");














/**
 * `PdfAnnotation` class represents the base class for annotation objects.
 * @private
 */
var PdfAnnotation = /** @class */ (function () {
    function PdfAnnotation(arg1) {
        // Fields
        /**
         * Specifies the Internal variable to store fields of `PdfDictionaryProperties`.
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_7__["DictionaryProperties"]();
        /**
         * `Color` of the annotation
         * @private
         */
        this.pdfColor = new _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_0__["PdfColor"](255, 255, 255);
        /**
         * `Bounds` of the annotation.
         * @private
         */
        this.rectangle = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](0, 0, 0, 0);
        /**
         * Parent `page` of the annotation.
         * @private
         */
        this.pdfPage = null;
        /**
         * `Brush of the text` of the annotation.
         * @default new PdfSolidBrush(new PdfColor(0, 0, 0))
         * @private
         */
        this.textBrush = new _graphics_brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_9__["PdfSolidBrush"](new _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_0__["PdfColor"](0, 0, 0));
        /**
         * `Font of the text` of the annotation.
         * @default new PdfStandardFont(PdfFontFamily.TimesRoman, 10)
         * @private
         */
        this.textFont = new _graphics_fonts_pdf_standard_font__WEBPACK_IMPORTED_MODULE_10__["PdfStandardFont"](_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_11__["PdfFontFamily"].TimesRoman, 10);
        /**
         * `StringFormat of the text` of the annotation.
         * @default new PdfStringFormat(PdfTextAlignment.Left)
         * @private
         */
        this.format = new _graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_12__["PdfStringFormat"](_graphics_enum__WEBPACK_IMPORTED_MODULE_13__["PdfTextAlignment"].Left);
        /**
         * `Text` of the annotation.
         * @private
         */
        this.content = '';
        /**
         * Internal variable to store `dictionary`.
         * @private
         */
        this.pdfDictionary = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__["PdfDictionary"]();
        /**
         * To specifying the `Inner color` with which to fill the annotation
         * @private
         */
        this.internalColor = new _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_0__["PdfColor"]();
        /**
         * `opacity or darkness` of the annotation.
         * @private
         * @default 1.0
         */
        this.darkness = 1.0;
        if (typeof arg1 === 'undefined') {
            this.initialize();
        }
        else {
            this.initialize();
            this.bounds = arg1;
        }
    }
    Object.defineProperty(PdfAnnotation.prototype, "color", {
        // Properties
        /**
         * `Color` of the annotation
         * @private
         */
        get: function () {
            return this.pdfColor;
        },
        set: function (value) {
            this.pdfColor = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAnnotation.prototype, "innerColor", {
        /**
         * To specifying the `Inner color` with which to fill the annotation
         * @private
         */
        get: function () {
            return this.internalColor;
        },
        set: function (value) {
            this.internalColor = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAnnotation.prototype, "bounds", {
        /**
         * `bounds` of the annotation.
         * @private
         */
        get: function () {
            return this.rectangle;
        },
        set: function (value) {
            this.rectangle = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAnnotation.prototype, "page", {
        /**
         * Parent `page` of the annotation.
         * @private
         */
        get: function () {
            return this.pdfPage;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAnnotation.prototype, "font", {
        /**
         * To specifying the `Font of the text` in the annotation.
         * @private
         */
        get: function () {
            return this.textFont;
        },
        set: function (value) {
            this.textFont = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAnnotation.prototype, "stringFormat", {
        /**
         * To specifying the `StringFormat of the text` in the annotation.
         * @private
         */
        get: function () {
            return this.format;
        },
        set: function (value) {
            this.format = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAnnotation.prototype, "brush", {
        /**
         * To specifying the `Brush of the text` in the annotation.
         * @private
         */
        get: function () {
            return this.textBrush;
        },
        set: function (value) {
            this.textBrush = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAnnotation.prototype, "text", {
        /**
         * `Text` of the annotation.
         * @private
         */
        get: function () {
            return this.content;
        },
        set: function (value) {
            this.content = value;
            this.dictionary.items.setValue(this.dictionaryProperties.contents, new _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_6__["PdfString"](this.content));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAnnotation.prototype, "dictionary", {
        /**
         * Internal variable to store `dictionary`.
         * @hidden
         */
        get: function () {
            return this.pdfDictionary;
        },
        set: function (value) {
            this.pdfDictionary = value;
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * `Initialize` the annotation event handler and specifies the type of the annotation.
     * @private
     */
    PdfAnnotation.prototype.initialize = function () {
        this.pdfDictionary.annotationBeginSave = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__["SaveAnnotationEventHandler"](this);
        this.pdfDictionary.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_8__["PdfName"](this.dictionaryProperties.annot));
    };
    /**
     * Sets related `page` of the annotation.
     * @private
     */
    PdfAnnotation.prototype.setPage = function (page) {
        this.pdfPage = page;
        this.pdfDictionary.items.setValue(this.dictionaryProperties.p, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_5__["PdfReferenceHolder"](this.pdfPage));
    };
    /**
     * Handles the `BeginSave` event of the Dictionary.
     * @private
     */
    PdfAnnotation.prototype.beginSave = function () {
        this.save();
    };
    /**
     * `Saves` an annotation.
     * @private
     */
    /* tslint:disable */
    PdfAnnotation.prototype.save = function () {
        var nativeRectangle = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](this.rectangle.x, this.rectangle.y, this.rectangle.width, this.rectangle.height);
        var section = this.pdfPage.section;
        var initialHeight = nativeRectangle.height;
        var tempLoacation = section.pointToNativePdf(this.page, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"](nativeRectangle.x, nativeRectangle.y));
        nativeRectangle.x = tempLoacation.x;
        nativeRectangle.width = tempLoacation.x + nativeRectangle.width;
        nativeRectangle.y = (tempLoacation.y - this.page.document.pageSettings.margins.top);
        nativeRectangle.height = nativeRectangle.y - initialHeight;
        this.pdfDictionary.items.setValue(this.dictionaryProperties.rect, _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_3__["PdfArray"].fromRectangle(nativeRectangle));
        this.dictionary.items.setValue(this.dictionaryProperties.ca, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](this.darkness));
    };
    Object.defineProperty(PdfAnnotation.prototype, "element", {
        /* tslint:enable */
        // IPdfWrapper Members
        /**
         * Gets the `element`.
         * @private
         */
        get: function () {
            return this.pdfDictionary;
        },
        enumerable: true,
        configurable: true
    });
    return PdfAnnotation;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/document-link-annotation.js":
/*!************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/document-link-annotation.js ***!
  \************************************************************************************************************/
/*! exports provided: PdfDocumentLinkAnnotation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentLinkAnnotation", function() { return PdfDocumentLinkAnnotation; });
/* harmony import */ var _link_annotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./link-annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/link-annotation.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

/**
 * `PdfDocumentLinkAnnotation` class represents an annotation object with holds link on another location within a document.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * // create new pages
 * let page1 : PdfPage = document.pages.add();
 * let page2 : PdfPage = document.pages.add();
 * // create a new rectangle
 * let bounds : RectangleF = new RectangleF({x : 10, y : 200}, {width : 300, height : 25});
 * //
 * // create a new document link annotation
 * let documentLinkAnnotation : PdfDocumentLinkAnnotation = new PdfDocumentLinkAnnotation(bounds);
 * // set the annotation text
 * documentLinkAnnotation.text = 'Document link annotation';
 * // set the destination
 * documentLinkAnnotation.destination = new PdfDestination(page2);
 * // set the documentlink annotation location
 * documentLinkAnnotation.destination.location = new PointF(10, 0);
 * // add this annotation to a new page
 * page1.annotations.add(documentLinkAnnotation);
 * //
 * // save the document to disk
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfDocumentLinkAnnotation = /** @class */ (function (_super) {
    __extends(PdfDocumentLinkAnnotation, _super);
    function PdfDocumentLinkAnnotation(rectangle, destination) {
        var _this = _super.call(this, rectangle) || this;
        // Fields
        /**
         * `Destination` of the annotation.
         * @default null
         * @private
         */
        _this.pdfDestination = null;
        if (typeof destination !== 'undefined') {
            _this.destination = destination;
        }
        return _this;
    }
    Object.defineProperty(PdfDocumentLinkAnnotation.prototype, "destination", {
        // Properties
        /**
         * Gets or sets the `destination` of the annotation.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * // create new pages
         * let page1 : PdfPage = document.pages.add();
         * let page2 : PdfPage = document.pages.add();
         * // create a new rectangle
         * let bounds : RectangleF = new RectangleF({x : 10, y : 200}, {width : 300, height : 25});
         * //
         * // create a new document link annotation
         * let documentLinkAnnotation : PdfDocumentLinkAnnotation = new PdfDocumentLinkAnnotation(bounds);
         * // set the annotation text
         * documentLinkAnnotation.text = 'Document link annotation';
         * // set the destination
         * documentLinkAnnotation.destination = new PdfDestination(page2);
         * // set the documentlink annotation location
         * documentLinkAnnotation.destination.location = new PointF(10, 0);
         * // add this annotation to a new page
         * page1.annotations.add(documentLinkAnnotation);
         * //
         * // save the document to disk
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         * @default null
         */
        get: function () {
            return this.pdfDestination;
        },
        set: function (value) {
            // if (this.pdfDestination !== value) {
            this.pdfDestination = value;
            // }
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * `Saves` annotation object.
     * @private
     */
    PdfDocumentLinkAnnotation.prototype.save = function () {
        _super.prototype.save.call(this);
        if (this.pdfDestination != null) {
            this.dictionary.items.setValue(this.dictionaryProperties.dest, this.pdfDestination.element);
        }
    };
    /**
     * `Clone` the document link annotation.
     * @private
     */
    PdfDocumentLinkAnnotation.prototype.clone = function () {
        var annot = new PdfDocumentLinkAnnotation(this.bounds, this.destination);
        annot.color = this.color;
        annot.brush = this.brush;
        annot.destination = this.destination;
        annot.font = this.font;
        return annot;
    };
    return PdfDocumentLinkAnnotation;
}(_link_annotation__WEBPACK_IMPORTED_MODULE_0__["PdfLinkAnnotation"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/link-annotation.js":
/*!***************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/link-annotation.js ***!
  \***************************************************************************************************/
/*! exports provided: PdfLinkAnnotation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfLinkAnnotation", function() { return PdfLinkAnnotation; });
/* harmony import */ var _annotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * `PdfLinkAnnotation` class represents the ink annotation class.
 * @private
 */
var PdfLinkAnnotation = /** @class */ (function (_super) {
    __extends(PdfLinkAnnotation, _super);
    function PdfLinkAnnotation(rectangle) {
        var _this = this;
        if (typeof rectangle === 'undefined') {
            _this = _super.call(this) || this;
        }
        else {
            _this = _super.call(this, rectangle) || this;
        }
        return _this;
    }
    // Implementation
    /**
     * `Initializes` annotation object.
     * @private
     */
    PdfLinkAnnotation.prototype.initialize = function () {
        _super.prototype.initialize.call(this);
        this.dictionary.items.setValue(this.dictionaryProperties.subtype, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_1__["PdfName"](this.dictionaryProperties.link));
    };
    return PdfLinkAnnotation;
}(_annotation__WEBPACK_IMPORTED_MODULE_0__["PdfAnnotation"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/pdf-text-web-link.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/pdf-text-web-link.js ***!
  \*****************************************************************************************************/
/*! exports provided: PdfTextWebLink */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTextWebLink", function() { return PdfTextWebLink; });
/* harmony import */ var _pages_pdf_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../pages/pdf-page */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _graphics_figures_text_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../graphics/figures/text-element */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/text-element.js");
/* harmony import */ var _uri_annotation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uri-annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/uri-annotation.js");
/* harmony import */ var _graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../graphics/fonts/string-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js");
/* harmony import */ var _graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../graphics/fonts/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _graphics_enum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../graphics/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();









/**
 * `PdfTextWebLink` class represents the class for text web link annotation.
 * ```typescript
 * // create a new PDF document.
 * let document : PdfDocument = new PdfDocument();
 * // add a page to the document.
 * let page1 : PdfPage = document.pages.add();
 * // create the font
 * let font : PdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
 * //
 * // create the Text Web Link
 * let textLink : PdfTextWebLink = new PdfTextWebLink();
 * // set the hyperlink
 * textLink.url = 'http://www.google.com';
 * // set the link text
 * textLink.text = 'Google';
 * // set the font
 * textLink.font = font;
 * // draw the hyperlink in PDF page
 * textLink.draw(page1, new PointF(10, 40));
 * //
 * // save the document.
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfTextWebLink = /** @class */ (function (_super) {
    __extends(PdfTextWebLink, _super);
    // Constructors
    /**
     * Initializes a new instance of the `PdfTextWebLink` class.
     * @private
     */
    function PdfTextWebLink() {
        var _this = _super.call(this) || this;
        // Fields
        /**
         * Internal variable to store `Url`.
         * @default ''
         * @private
         */
        _this.uniformResourceLocator = '';
        /**
         * Internal variable to store `Uri Annotation` object.
         * @default null
         * @private
         */
        _this.uriAnnotation = null;
        /**
         * Checks whether the drawTextWebLink method with `PointF` overload is called or not.
         * If it set as true, then the start position of each lines excluding firest line is changed as (0, Y).
         * @private
         * @hidden
         */
        _this.recalculateBounds = false;
        _this.defaultBorder = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_7__["PdfArray"]();
        for (var i = 0; i < 3; i++) {
            _this.defaultBorder.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_8__["PdfNumber"](0));
        }
        return _this;
    }
    Object.defineProperty(PdfTextWebLink.prototype, "url", {
        // Properties
        /**
         * Gets or sets the `Uri address`.
         * ```typescript
         * // create a new PDF document.
         * let document : PdfDocument = new PdfDocument();
         * // add a page to the document.
         * let page1 : PdfPage = document.pages.add();
         * // create the font
         * let font : PdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
         * // create the Text Web Link
         * let textLink : PdfTextWebLink = new PdfTextWebLink();
         * //
         * // set the hyperlink
         * textLink.url = 'http://www.google.com';
         * //
         * // set the link text
         * textLink.text = 'Google';
         * // set the font
         * textLink.font = font;
         * // draw the hyperlink in PDF page
         * textLink.draw(page1, new PointF(10, 40));
         * // save the document.
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            return this.uniformResourceLocator;
        },
        set: function (value) {
            if (value.length === 0) {
                throw new Error('ArgumentException : Url - string can not be empty');
            }
            this.uniformResourceLocator = value;
        },
        enumerable: true,
        configurable: true
    });
    PdfTextWebLink.prototype.draw = function (arg1, arg2) {
        if (arg1 instanceof _pages_pdf_page__WEBPACK_IMPORTED_MODULE_0__["PdfPage"]) {
            var layout = new _graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_4__["PdfStringLayouter"]();
            var previousFontStyle = this.font.style;
            if (arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"]) {
                this.recalculateBounds = true;
                this.font.style = _graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_5__["PdfFontStyle"].Underline;
                var layoutResult = layout.layout(this.value, this.font, this.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"]((arg1.graphics.clientSize.width - arg2.x), 0), true, arg1.graphics.clientSize);
                if (layoutResult.lines.length === 1) {
                    var textSize = this.font.measureString(this.value);
                    var rect = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](arg2, textSize);
                    rect = this.calculateBounds(rect, textSize.width, arg1.graphics.clientSize.width, arg2.x);
                    this.uriAnnotation = new _uri_annotation__WEBPACK_IMPORTED_MODULE_3__["PdfUriAnnotation"](rect, this.url);
                    this.uriAnnotation.dictionary.items.setValue('Border', this.defaultBorder);
                    arg1.annotations.add(this.uriAnnotation);
                    var result = this.drawText(arg1, arg2);
                    this.font.style = previousFontStyle;
                    return result;
                }
                else {
                    var result = this.drawMultipleLineWithPoint(layoutResult, arg1, arg2);
                    this.font.style = previousFontStyle;
                    return result;
                }
            }
            else {
                var layoutResult = layout.layout(this.value, this.font, this.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"](arg2.width, 0), false, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"](0, 0));
                this.font.style = _graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_5__["PdfFontStyle"].Underline;
                if (layoutResult.lines.length === 1) {
                    var textSize = this.font.measureString(this.value);
                    var rect = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"](arg2.x, arg2.y), textSize);
                    rect = this.calculateBounds(rect, textSize.width, arg2.width, arg2.x);
                    this.uriAnnotation = new _uri_annotation__WEBPACK_IMPORTED_MODULE_3__["PdfUriAnnotation"](rect, this.url);
                    this.uriAnnotation.dictionary.items.setValue('Border', this.defaultBorder);
                    arg1.annotations.add(this.uriAnnotation);
                    var returnValue = this.drawText(arg1, arg2);
                    this.font.style = previousFontStyle;
                    return returnValue;
                }
                else {
                    var returnValue = this.drawMultipleLineWithBounds(layoutResult, arg1, arg2);
                    this.font.style = previousFontStyle;
                    return returnValue;
                }
            }
        }
        else {
            var page = new _pages_pdf_page__WEBPACK_IMPORTED_MODULE_0__["PdfPage"]();
            page = arg1.page;
            return this.draw(page, arg2);
        }
    };
    /* tslint:enable */
    //Private methods
    /**
     * Helper method `Draw` a Multiple Line Text Web Link on the Graphics with the specified location.
     * @private
     */
    PdfTextWebLink.prototype.drawMultipleLineWithPoint = function (result, page, location) {
        var layoutResult;
        for (var i = 0; i < result.layoutLines.length; i++) {
            var size = this.font.measureString(result.lines[i].text);
            var bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](location, size);
            if (i !== 0) {
                bounds.x = 0;
            }
            this.text = result.lines[i].text;
            if (bounds.y + size.height > page.graphics.clientSize.height) {
                if (i !== 0) {
                    page = page.graphics.getNextPage();
                    bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](0, 0, page.graphics.clientSize.width, size.height);
                    location.y = 0;
                }
                else {
                    break;
                }
            }
            bounds = this.calculateBounds(bounds, size.width, page.graphics.clientSize.width, bounds.x);
            this.uriAnnotation = new _uri_annotation__WEBPACK_IMPORTED_MODULE_3__["PdfUriAnnotation"](bounds, this.url);
            this.uriAnnotation.dictionary.items.setValue('Border', this.defaultBorder);
            page.annotations.add(this.uriAnnotation);
            if (i !== 0) {
                layoutResult = this.drawText(page, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"](0, bounds.y));
            }
            else {
                layoutResult = this.drawText(page, bounds.x, bounds.y);
            }
            location.y += size.height;
        }
        return layoutResult;
    };
    /**
     * Helper method `Draw` a Multiple Line Text Web Link on the Graphics with the specified bounds.
     * @private
     */
    PdfTextWebLink.prototype.drawMultipleLineWithBounds = function (result, page, bounds) {
        var layoutResult;
        for (var i = 0; i < result.layoutLines.length; i++) {
            var size = this.font.measureString(result.lines[i].text);
            var internalBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"](bounds.x, bounds.y), size);
            internalBounds = this.calculateBounds(internalBounds, size.width, bounds.width, bounds.x);
            this.text = result.lines[i].text;
            if (bounds.y + size.height > page.graphics.clientSize.height) {
                if (i !== 0) {
                    page = page.graphics.getNextPage();
                    bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](bounds.x, 0, bounds.width, size.height);
                    internalBounds.y = 0;
                }
                else {
                    break;
                }
            }
            this.uriAnnotation = new _uri_annotation__WEBPACK_IMPORTED_MODULE_3__["PdfUriAnnotation"](internalBounds, this.url);
            this.uriAnnotation.dictionary.items.setValue('Border', this.defaultBorder);
            page.annotations.add(this.uriAnnotation);
            layoutResult = this.drawText(page, bounds);
            bounds.y += size.height;
        }
        return layoutResult;
    };
    /* tslint:disable */
    PdfTextWebLink.prototype.calculateBounds = function (currentBounds, lineWidth, maximumWidth, startPosition) {
        var shift = 0;
        if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfTextAlignment"].Center) {
            currentBounds.x = startPosition + (maximumWidth - lineWidth) / 2;
            currentBounds.width = lineWidth;
        }
        else if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfTextAlignment"].Right) {
            currentBounds.x = startPosition + (maximumWidth - lineWidth);
            currentBounds.width = lineWidth;
        }
        else if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfTextAlignment"].Justify) {
            currentBounds.x = startPosition;
            currentBounds.width = maximumWidth;
        }
        else {
            currentBounds.width = startPosition;
            currentBounds.width = lineWidth;
        }
        return currentBounds;
    };
    return PdfTextWebLink;
}(_graphics_figures_text_element__WEBPACK_IMPORTED_MODULE_2__["PdfTextElement"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/uri-annotation.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/uri-annotation.js ***!
  \**************************************************************************************************/
/*! exports provided: PdfUriAnnotation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfUriAnnotation", function() { return PdfUriAnnotation; });
/* harmony import */ var _action_link_annotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./action-link-annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/action-link-annotation.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _actions_uri_action__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../actions/uri-action */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/uri-action.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `PdfUriAnnotation` class represents the Uri annotation.
 * @private
 */
var PdfUriAnnotation = /** @class */ (function (_super) {
    __extends(PdfUriAnnotation, _super);
    function PdfUriAnnotation(rectangle, uri) {
        var _this = _super.call(this, rectangle) || this;
        if (typeof uri !== 'undefined') {
            _this.uri = uri;
        }
        return _this;
    }
    Object.defineProperty(PdfUriAnnotation.prototype, "uriAction", {
        /**
         * Get `action` of the annotation.
         * @private
         */
        get: function () {
            if (typeof this.pdfUriAction === 'undefined') {
                this.pdfUriAction = new _actions_uri_action__WEBPACK_IMPORTED_MODULE_2__["PdfUriAction"]();
            }
            return this.pdfUriAction;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfUriAnnotation.prototype, "uri", {
        // Properties
        /**
         * Gets or sets the `Uri` address.
         * @private
         */
        get: function () {
            return this.uriAction.uri;
        },
        set: function (value) {
            if (this.uriAction.uri !== value) {
                this.uriAction.uri = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfUriAnnotation.prototype, "action", {
        /**
         * Gets or sets the `action`.
         * @private
         */
        get: function () {
            return this.getSetAction();
        },
        set: function (value) {
            this.getSetAction(value);
            this.uriAction.next = value;
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * `Initializes` annotation object.
     * @private
     */
    PdfUriAnnotation.prototype.initialize = function () {
        _super.prototype.initialize.call(this);
        this.dictionary.items.setValue(this.dictionaryProperties.subtype, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_1__["PdfName"](this.dictionaryProperties.link));
        var tempPrimitive = this.uriAction.element;
        this.dictionary.items.setValue(this.dictionaryProperties.a, this.uriAction.element);
    };
    return PdfUriAnnotation;
}(_action_link_annotation__WEBPACK_IMPORTED_MODULE_0__["PdfActionLinkAnnotation"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js ***!
  \**********************************************************************************************/
/*! exports provided: Dictionary */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dictionary", function() { return Dictionary; });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/utils.js");
/**
 * Dictionary.ts class for EJ2-PDF
 * @private
 * @hidden
 */

/**
 * @private
 * @hidden
 */
var Dictionary = /** @class */ (function () {
    /**
     * @private
     * @hidden
     */
    function Dictionary(toStringFunction) {
        this.table = {};
        this.nElements = 0;
        this.toStr = toStringFunction || _utils__WEBPACK_IMPORTED_MODULE_0__["defaultToString"];
    }
    /**
     * @private
     * @hidden
     */
    Dictionary.prototype.getValue = function (key) {
        var pair = this.table['$' + this.toStr(key)];
        if (typeof pair === 'undefined') {
            return undefined;
        }
        return pair.value;
    };
    /**
     * @private
     * @hidden
     */
    Dictionary.prototype.setValue = function (key, value) {
        // if (typeof key === 'undefined' || typeof value === 'undefined') {
        //     return undefined;
        // }
        var ret;
        var k = '$' + this.toStr(key);
        var previousElement = this.table[k];
        // if (typeof previousElement === 'undefined') {
        this.nElements++;
        ret = undefined;
        // }
        this.table[k] = {
            key: key,
            value: value
        };
        return ret;
    };
    /**
     * @private
     * @hidden
     */
    Dictionary.prototype.remove = function (key) {
        var k = '$' + this.toStr(key);
        var previousElement = this.table[k];
        // if (typeof previousElement !== 'undefined') {
        delete this.table[k];
        this.nElements--;
        return previousElement.value;
        // }
        // return undefined;
    };
    /**
     * @private
     * @hidden
     */
    Dictionary.prototype.keys = function () {
        var keysArray = [];
        var namesOfKeys = Object.keys(this.table);
        for (var index1 = 0; index1 < namesOfKeys.length; index1++) {
            // if (Object.prototype.hasOwnProperty.call(this.table, namesOfKeys[index1])) {
            var pair1 = this.table[namesOfKeys[index1]];
            keysArray.push(pair1.key);
            // }
        }
        return keysArray;
    };
    /**
     * @private
     * @hidden
     */
    Dictionary.prototype.values = function () {
        var valuesArray = [];
        var namesOfValues = Object.keys(this.table);
        for (var index2 = 0; index2 < namesOfValues.length; index2++) {
            // if (Object.prototype.hasOwnProperty.call(this.table, namesOfValues[index2])) {
            var pair2 = this.table[namesOfValues[index2]];
            valuesArray.push(pair2.value);
            // }
        }
        return valuesArray;
    };
    /**
     * @private
     * @hidden
     */
    Dictionary.prototype.containsKey = function (key) {
        var retutnValue = true;
        if (typeof this.getValue(key) === 'undefined') {
            retutnValue = true;
        }
        else {
            retutnValue = false;
        }
        return !retutnValue;
    };
    /**
     * @private
     * @hidden
     */
    Dictionary.prototype.clear = function () {
        this.table = {};
        this.nElements = 0;
    };
    /**
     * @private
     * @hidden
     */
    Dictionary.prototype.size = function () {
        return this.nElements;
    };
    return Dictionary;
}()); // End of dictionary



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/object-object-pair/dictionary.js":
/*!*****************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/object-object-pair/dictionary.js ***!
  \*****************************************************************************************************************/
/*! exports provided: TemporaryDictionary */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemporaryDictionary", function() { return TemporaryDictionary; });
/**
 * Dictionary class
 * @private
 * @hidden
 */
var TemporaryDictionary = /** @class */ (function () {
    function TemporaryDictionary() {
        /**
         * @hidden
         * @private
         */
        this.mKeys = [];
        /**
         * @hidden
         * @private
         */
        this.mValues = [];
    }
    /**
     * @hidden
     * @private
     */
    TemporaryDictionary.prototype.size = function () {
        return this.mKeys.length;
    };
    /**
     * @hidden
     * @private
     */
    TemporaryDictionary.prototype.add = function (key, value) {
        if (key === undefined || key === null || value === undefined || value === null) {
            throw new ReferenceError('Provided key or value is not valid.');
        }
        var index = this.mKeys.indexOf(key);
        if (index < 0) {
            this.mKeys.push(key);
            this.mValues.push(value);
            return 1;
        }
        else {
            throw new RangeError('An item with the same key has already been added.');
        }
    };
    /**
     * @hidden
     * @private
     */
    TemporaryDictionary.prototype.keys = function () {
        return this.mKeys;
    };
    /**
     * @hidden
     * @private
     */
    TemporaryDictionary.prototype.values = function () {
        return this.mValues;
    };
    /**
     * @hidden
     * @private
     */
    TemporaryDictionary.prototype.getValue = function (key) {
        if (key === undefined || key === null) {
            throw new ReferenceError('Provided key is not valid.');
        }
        var index = this.mKeys.indexOf(key);
        if (index < 0) {
            throw new RangeError('No item with the specified key has been added.');
        }
        else {
            return this.mValues[index];
        }
    };
    /**
     * @hidden
     * @private
     */
    TemporaryDictionary.prototype.setValue = function (key, value) {
        if (key === undefined || key === null) {
            throw new ReferenceError('Provided key is not valid.');
        }
        var index = this.mKeys.indexOf(key);
        if (index < 0) {
            this.mKeys.push(key);
            this.mValues.push(value);
        }
        else {
            this.mValues[index] = value;
        }
    };
    /**
     * @hidden
     * @private
     */
    TemporaryDictionary.prototype.remove = function (key) {
        if (key === undefined || key === null) {
            throw new ReferenceError('Provided key is not valid.');
        }
        var index = this.mKeys.indexOf(key);
        if (index < 0) {
            throw new RangeError('No item with the specified key has been added.');
        }
        else {
            this.mKeys.splice(index, 1);
            this.mValues.splice(index, 1);
            return true;
        }
    };
    /**
     * @hidden
     * @private
     */
    TemporaryDictionary.prototype.containsKey = function (key) {
        if (key === undefined || key === null) {
            throw new ReferenceError('Provided key is not valid.');
        }
        var index = this.mKeys.indexOf(key);
        if (index < 0) {
            return false;
        }
        return true;
    };
    /**
     * @hidden
     * @private
     */
    TemporaryDictionary.prototype.clear = function () {
        this.mKeys = [];
        this.mValues = [];
    };
    return TemporaryDictionary;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/utils.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/utils.js ***!
  \*****************************************************************************************/
/*! exports provided: defaultToString */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultToString", function() { return defaultToString; });
/**
 * @private
 * @hidden
 */
function defaultToString(item) {
    // if (item === null) {
    //     return 'COLLECTION_NULL';
    // } else if (typeof item === 'undefined') {
    //     return 'COLLECTION_UNDEFINED';
    // } else if (Object.prototype.toString.call(item) === '[object String]') {
    if (Object.prototype.toString.call(item) === '[object String]') {
        return '$s' + item;
    }
    else {
        return '$o' + item.toString();
    }
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field-info-collection.js":
/*!*********************************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field-info-collection.js ***!
  \*********************************************************************************************************************************/
/*! exports provided: PdfAutomaticFieldInfoCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfAutomaticFieldInfoCollection", function() { return PdfAutomaticFieldInfoCollection; });
/**
 * Represent a `collection of automatic fields information`.
 * @private
 */
var PdfAutomaticFieldInfoCollection = /** @class */ (function () {
    /**
     * Initializes a new instance of the 'PdfPageNumberFieldInfoCollection' class.
     * @private
     */
    function PdfAutomaticFieldInfoCollection() {
        /**
         * Internal variable to store instance of `pageNumberFields` class.
         * @private
         */
        this.automaticFieldsInformation = [];
        //
    }
    Object.defineProperty(PdfAutomaticFieldInfoCollection.prototype, "automaticFields", {
        /**
         * Gets the `page number fields collection`.
         * @private
         */
        get: function () {
            return this.automaticFieldsInformation;
        },
        enumerable: true,
        configurable: true
    });
    // Public methods
    /// Adds the specified field info.
    /**
     * Add page number field into collection.
     * @private
     */
    PdfAutomaticFieldInfoCollection.prototype.add = function (fieldInfo) {
        return this.automaticFields.push(fieldInfo);
    };
    return PdfAutomaticFieldInfoCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field-info.js":
/*!**********************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field-info.js ***!
  \**********************************************************************************************************************/
/*! exports provided: PdfAutomaticFieldInfo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfAutomaticFieldInfo", function() { return PdfAutomaticFieldInfo; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _automatic_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./automatic-field */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field.js");
/**
 * PdfAutomaticFieldInfo.ts class for EJ2-PDF
 * @private
 */


/**
 * Represents information about the automatic field.
 * @private
 */
var PdfAutomaticFieldInfo = /** @class */ (function () {
    function PdfAutomaticFieldInfo(field, location, scaleX, scaleY) {
        // Fields
        /**
         * Internal variable to store location of the field.
         * @private
         */
        this.pageNumberFieldLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"]();
        /**
         * Internal variable to store field.
         * @private
         */
        this.pageNumberField = null;
        /**
         * Internal variable to store x scaling factor.
         * @private
         */
        this.scaleX = 1;
        /**
         * Internal variable to store y scaling factor.
         * @private
         */
        this.scaleY = 1;
        if (typeof location === 'undefined' && field instanceof PdfAutomaticFieldInfo) {
            this.pageNumberField = field.field;
            this.pageNumberFieldLocation = field.location;
            this.scaleX = field.scalingX;
            this.scaleY = field.scalingY;
        }
        else if (typeof scaleX === 'undefined' && location instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"] && field instanceof _automatic_field__WEBPACK_IMPORTED_MODULE_1__["PdfAutomaticField"]) {
            this.pageNumberField = field;
            this.pageNumberFieldLocation = location;
        }
        else {
            this.pageNumberField = field;
            this.pageNumberFieldLocation = location;
            this.scaleX = scaleX;
            this.scaleY = scaleY;
        }
    }
    Object.defineProperty(PdfAutomaticFieldInfo.prototype, "location", {
        /* tslint:enable */
        // Properties
        /**
         * Gets or sets the location.
         * @private
         */
        get: function () {
            return this.pageNumberFieldLocation;
        },
        set: function (value) {
            this.pageNumberFieldLocation = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAutomaticFieldInfo.prototype, "field", {
        /**
         * Gets or sets the field.
         * @private
         */
        get: function () {
            return this.pageNumberField;
        },
        set: function (value) {
            this.pageNumberField = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAutomaticFieldInfo.prototype, "scalingX", {
        /**
         * Gets or sets the scaling X factor.
         * @private
         */
        get: function () {
            return this.scaleX;
        },
        set: function (value) {
            this.scaleX = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAutomaticFieldInfo.prototype, "scalingY", {
        /**
         * Gets or sets the scaling Y factor.
         * @private
         */
        get: function () {
            return this.scaleY;
        },
        set: function (value) {
            this.scaleY = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfAutomaticFieldInfo;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field.js":
/*!*****************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field.js ***!
  \*****************************************************************************************************************/
/*! exports provided: PdfAutomaticField */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfAutomaticField", function() { return PdfAutomaticField; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _graphics_brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../graphics/brushes/pdf-solid-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-solid-brush.js");
/* harmony import */ var _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../graphics/pdf-color */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js");
/* harmony import */ var _pdf_document__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../pdf-document */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document.js");
/* harmony import */ var _graphics_figures_base_graphics_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../graphics/figures/base/graphics-element */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/graphics-element.js");
/* harmony import */ var _automatic_field_info__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./automatic-field-info */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field-info.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfAutomaticField.ts class for EJ2-PDF
 */






/**
 * Represents a fields which is calculated before the document saves.
 */
var PdfAutomaticField = /** @class */ (function (_super) {
    __extends(PdfAutomaticField, _super);
    // Constructors
    function PdfAutomaticField() {
        var _this = _super.call(this) || this;
        // Fields
        _this.internalBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["RectangleF"](0, 0, 0, 0);
        _this.internalTemplateSize = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](0, 0);
        return _this;
    }
    Object.defineProperty(PdfAutomaticField.prototype, "bounds", {
        // Properties
        get: function () {
            return this.internalBounds;
        },
        set: function (value) {
            this.internalBounds = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAutomaticField.prototype, "size", {
        get: function () {
            return new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](this.bounds.width, this.bounds.height);
        },
        set: function (value) {
            this.bounds.width = value.width;
            this.bounds.height = value.height;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAutomaticField.prototype, "location", {
        get: function () {
            return new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"](this.bounds.x, this.bounds.y);
        },
        set: function (value) {
            this.bounds.x = value.x;
            this.bounds.y = value.y;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAutomaticField.prototype, "font", {
        get: function () {
            return this.internalFont;
        },
        set: function (value) {
            this.internalFont = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAutomaticField.prototype, "brush", {
        get: function () {
            return this.internalBrush;
        },
        set: function (value) {
            this.internalBrush = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAutomaticField.prototype, "pen", {
        get: function () {
            return this.internalPen;
        },
        set: function (value) {
            this.internalPen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfAutomaticField.prototype, "stringFormat", {
        get: function () {
            return this.internalStringFormat;
        },
        set: function (value) {
            this.internalStringFormat = value;
        },
        enumerable: true,
        configurable: true
    });
    PdfAutomaticField.prototype.performDrawHelper = function (graphics, location, scalingX, scalingY) {
        if (this.bounds.height === 0 || this.bounds.width === 0) {
            var text = this.getValue(graphics);
            this.internalTemplateSize = this.getFont().measureString(text, this.size, this.stringFormat);
        }
    };
    PdfAutomaticField.prototype.draw = function (arg1, arg2, arg3) {
        if (typeof arg2 === 'undefined') {
            var location_1 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"](0, 0);
            this.draw(arg1, location_1);
        }
        else if (arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"]) {
            this.draw(arg1, arg2.x, arg2.y);
        }
        else {
            this.drawHelper(arg1, arg2, arg3);
            var info = new _automatic_field_info__WEBPACK_IMPORTED_MODULE_5__["PdfAutomaticFieldInfo"](this, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"](arg2, arg3));
            arg1.automaticFields.add(info);
        }
    };
    PdfAutomaticField.prototype.getSize = function () {
        if (this.bounds.height === 0 || this.bounds.width === 0) {
            return this.internalTemplateSize;
        }
        else {
            return this.size;
        }
    };
    PdfAutomaticField.prototype.drawInternal = function (graphics) {
        //
    };
    /* tslint:disable */
    PdfAutomaticField.prototype.getBrush = function () {
        return (typeof this.internalBrush === 'undefined' || this.internalBrush == null) ? new _graphics_brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_1__["PdfSolidBrush"](new _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_2__["PdfColor"](0, 0, 0)) : this.internalBrush;
    };
    PdfAutomaticField.prototype.getFont = function () {
        return (typeof this.internalFont === 'undefined' || this.internalFont == null) ? _pdf_document__WEBPACK_IMPORTED_MODULE_3__["PdfDocument"].defaultFont : this.internalFont;
    };
    /* tslint:enable */
    PdfAutomaticField.prototype.getPageFromGraphics = function (graphics) {
        if (typeof graphics.page !== 'undefined' && graphics.page !== null) {
            var page = graphics.page;
            return page;
        }
        else {
            var page = graphics.currentPage;
            return page;
        }
    };
    return PdfAutomaticField;
}(_graphics_figures_base_graphics_element__WEBPACK_IMPORTED_MODULE_4__["PdfGraphicsElement"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/composite-field.js":
/*!*****************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/composite-field.js ***!
  \*****************************************************************************************************************/
/*! exports provided: PdfCompositeField */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfCompositeField", function() { return PdfCompositeField; });
/* harmony import */ var _multiple_value_field__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multiple-value-field */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/multiple-value-field.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfCompositeField.ts class for EJ2-PDF
 */

/**
 * Represents class which can concatenate multiple automatic fields into single string.
 */
var PdfCompositeField = /** @class */ (function (_super) {
    __extends(PdfCompositeField, _super);
    // Constructor
    /**
     * Initialize a new instance of `PdfCompositeField` class.
     * @param font Font of the field.
     * @param brush Color of the field.
     * @param text Content of the field.
     * @param list List of the automatic fields in specific order based on the text content.
     */
    function PdfCompositeField(font, brush, text) {
        var list = [];
        for (var _i = 3; _i < arguments.length; _i++) {
            list[_i - 3] = arguments[_i];
        }
        var _this = _super.call(this) || this;
        // Fields
        /**
         * Stores the array of automatic fields.
         * @private
         */
        _this.internalAutomaticFields = null;
        /**
         * Stores the text value of the field.
         * @private
         */
        _this.internalText = '';
        _this.font = font;
        _this.brush = brush;
        _this.text = text;
        _this.automaticFields = list;
        return _this;
    }
    Object.defineProperty(PdfCompositeField.prototype, "text", {
        // Properties
        /**
         * Gets and sets the content of the field.
         * @public
         */
        get: function () {
            return this.internalText;
        },
        set: function (value) {
            this.internalText = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfCompositeField.prototype, "automaticFields", {
        /**
         * Gets and sets the list of the field to drawn.
         * @public
         */
        get: function () {
            return this.internalAutomaticFields;
        },
        set: function (value) {
            this.internalAutomaticFields = value;
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * Return the actual value generated from the list of automatic fields.
     * @public
     */
    PdfCompositeField.prototype.getValue = function (graphics) {
        var values = [];
        var text = this.text.toString();
        if (typeof this.automaticFields !== 'undefined' && this.automaticFields != null && this.automaticFields.length > 0) {
            for (var i = 0; i < this.automaticFields.length; i++) {
                var automaticField = this.automaticFields[i];
                text = text.replace('{' + i + '}', automaticField.getValue(graphics));
            }
        }
        return text;
    };
    return PdfCompositeField;
}(_multiple_value_field__WEBPACK_IMPORTED_MODULE_0__["PdfMultipleValueField"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/multiple-value-field.js":
/*!**********************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/multiple-value-field.js ***!
  \**********************************************************************************************************************/
/*! exports provided: PdfMultipleValueField */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfMultipleValueField", function() { return PdfMultipleValueField; });
/* harmony import */ var _automatic_field__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./automatic-field */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field.js");
/* harmony import */ var _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../collections/object-object-pair/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/object-object-pair/dictionary.js");
/* harmony import */ var _pdf_template_value_pair__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-template-value-pair */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-template-value-pair.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _graphics_figures_pdf_template__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../graphics/figures/pdf-template */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/pdf-template.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfAutomaticField.ts class for EJ2-PDF
 */





/**
 * Represents automatic field which has the same value within the `PdfGraphics`.
 */
var PdfMultipleValueField = /** @class */ (function (_super) {
    __extends(PdfMultipleValueField, _super);
    function PdfMultipleValueField() {
        var _this = _super.call(this) || this;
        //  Fields
        /**
         * Stores the instance of dictionary values of `graphics and template value pair`.
         * @private
         */
        _this.list = new _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_1__["TemporaryDictionary"]();
        return _this;
    }
    // Implementation
    /* tslint:disable */
    PdfMultipleValueField.prototype.performDraw = function (graphics, location, scalingX, scalingY) {
        _super.prototype.performDrawHelper.call(this, graphics, location, scalingX, scalingY);
        var value = this.getValue(graphics);
        var template = new _graphics_figures_pdf_template__WEBPACK_IMPORTED_MODULE_4__["PdfTemplate"](this.getSize());
        this.list.setValue(graphics, new _pdf_template_value_pair__WEBPACK_IMPORTED_MODULE_2__["PdfTemplateValuePair"](template, value));
        var g = template.graphics;
        var size = this.getSize();
        template.graphics.drawString(value, this.getFont(), this.pen, this.getBrush(), 0, 0, size.width, size.height, this.stringFormat);
        var drawLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["PointF"](location.x + this.location.x, location.y + this.location.y);
        graphics.drawPdfTemplate(template, drawLocation, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["SizeF"](template.width * scalingX, template.height * scalingY));
    };
    return PdfMultipleValueField;
}(_automatic_field__WEBPACK_IMPORTED_MODULE_0__["PdfAutomaticField"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/page-count-field.js":
/*!******************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/page-count-field.js ***!
  \******************************************************************************************************************/
/*! exports provided: PdfPageCountField */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageCountField", function() { return PdfPageCountField; });
/* harmony import */ var _single_value_field__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./single-value-field */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/single-value-field.js");
/* harmony import */ var _pages_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../pages/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js");
/* harmony import */ var _graphics_brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../graphics/brushes/pdf-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js");
/* harmony import */ var _pdf_numbers_convertor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pdf-numbers-convertor */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-numbers-convertor.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfPageCountField.ts class for EJ2-PDF
 */




/**
 * Represents total PDF document page count automatic field.
 */
var PdfPageCountField = /** @class */ (function (_super) {
    __extends(PdfPageCountField, _super);
    function PdfPageCountField(font, arg2) {
        var _this = _super.call(this) || this;
        // Fields
        /**
         * Stores the number style of the field.
         * @private
         */
        _this.internalNumberStyle = _pages_enum__WEBPACK_IMPORTED_MODULE_1__["PdfNumberStyle"].Numeric;
        if (typeof arg2 === 'undefined') {
            _this.font = font;
        }
        else if (arg2 instanceof _graphics_brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_2__["PdfBrush"]) {
            _this.font = font;
            _this.brush = arg2;
        }
        else {
            _this.font = font;
            _this.bounds = arg2;
        }
        return _this;
    }
    Object.defineProperty(PdfPageCountField.prototype, "numberStyle", {
        // Properties
        /**
         * Gets and sets the number style of the field.
         * @public
         */
        get: function () {
            return this.internalNumberStyle;
        },
        set: function (value) {
            this.internalNumberStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * Return the actual value of the content to drawn.
     * @public
     */
    PdfPageCountField.prototype.getValue = function (graphics) {
        var result = null;
        var page = this.getPageFromGraphics(graphics);
        var document = page.section.parent.document;
        var count = document.pages.count;
        result = _pdf_numbers_convertor__WEBPACK_IMPORTED_MODULE_3__["PdfNumbersConvertor"].convert(count, this.numberStyle);
        return result;
    };
    return PdfPageCountField;
}(_single_value_field__WEBPACK_IMPORTED_MODULE_0__["PdfSingleValueField"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-numbers-convertor.js":
/*!***********************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-numbers-convertor.js ***!
  \***********************************************************************************************************************/
/*! exports provided: PdfNumbersConvertor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfNumbersConvertor", function() { return PdfNumbersConvertor; });
/* harmony import */ var _pages_enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../pages/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js");
/**
 * PdfNumbersConvertor.ts class for EJ2-PDF
 * @private
 */

/**
 * `PdfNumbersConvertor` for convert page number into numbers, roman letters, etc.,
 * @private
 */
var PdfNumbersConvertor = /** @class */ (function () {
    function PdfNumbersConvertor() {
    }
    // Static methods
    /**
     * Convert string value from page number with correct format.
     * @private
     */
    PdfNumbersConvertor.convert = function (intArabic, numberStyle) {
        var result = '';
        switch (numberStyle) {
            case _pages_enum__WEBPACK_IMPORTED_MODULE_0__["PdfNumberStyle"].None:
                result = '';
                break;
            case _pages_enum__WEBPACK_IMPORTED_MODULE_0__["PdfNumberStyle"].Numeric:
                result = intArabic.toString();
                break;
            case _pages_enum__WEBPACK_IMPORTED_MODULE_0__["PdfNumberStyle"].LowerLatin:
                result = this.arabicToLetter(intArabic).toLowerCase();
                break;
            case _pages_enum__WEBPACK_IMPORTED_MODULE_0__["PdfNumberStyle"].LowerRoman:
                result = this.arabicToRoman(intArabic).toLowerCase();
                break;
            case _pages_enum__WEBPACK_IMPORTED_MODULE_0__["PdfNumberStyle"].UpperLatin:
                result = this.arabicToLetter(intArabic);
                break;
            case _pages_enum__WEBPACK_IMPORTED_MODULE_0__["PdfNumberStyle"].UpperRoman:
                result = this.arabicToRoman(intArabic);
                break;
        }
        return result;
    };
    /**
     * Converts `arabic to roman` letters.
     * @private
     */
    PdfNumbersConvertor.arabicToRoman = function (intArabic) {
        var retval = '';
        retval += this.generateNumber(intArabic, 1000, 'M');
        retval += this.generateNumber(intArabic, 900, 'CM');
        retval += this.generateNumber(intArabic, 500, 'D');
        retval += this.generateNumber(intArabic, 400, 'CD');
        retval += this.generateNumber(intArabic, 100, 'C');
        retval += this.generateNumber(intArabic, 90, 'XC');
        retval += this.generateNumber(intArabic, 50, 'L');
        retval += this.generateNumber(intArabic, 40, 'XL');
        retval += this.generateNumber(intArabic, 10, 'X');
        retval += this.generateNumber(intArabic, 9, 'IX');
        retval += this.generateNumber(intArabic, 5, 'V');
        retval += this.generateNumber(intArabic, 4, 'IV');
        retval += this.generateNumber(intArabic, 1, 'I');
        return retval.toString();
    };
    /**
     * Converts `arabic to normal letters`.
     * @private
     */
    PdfNumbersConvertor.arabicToLetter = function (arabic) {
        var stack = this.convertToLetter(arabic);
        var result = '';
        while (stack.length > 0) {
            var num = stack.pop();
            result = this.appendChar(result, num);
        }
        return result.toString();
    };
    /**
     * Generate a string value of an input number.
     * @private
     */
    PdfNumbersConvertor.generateNumber = function (value, magnitude, letter) {
        var numberstring = '';
        while (value >= magnitude) {
            value -= magnitude;
            numberstring += letter;
        }
        return numberstring.toString();
    };
    /**
     * Convert a input number into letters.
     * @private
     */
    PdfNumbersConvertor.convertToLetter = function (arabic) {
        if (arabic <= 0) {
            throw Error('ArgumentOutOfRangeException-arabic, Value can not be less 0');
        }
        var stack = [];
        while (arabic > this.letterLimit) {
            var remainder = arabic % this.letterLimit;
            if (remainder === 0.0) {
                arabic = arabic / this.letterLimit - 1;
                remainder = this.letterLimit;
            }
            else {
                arabic /= this.letterLimit;
            }
            stack.push(remainder);
        }
        stack.push(arabic);
        return stack;
    };
    /**
     * Convert number to actual string value.
     * @private
     */
    PdfNumbersConvertor.appendChar = function (builder, value) {
        var letter = String.fromCharCode(PdfNumbersConvertor.acsiiStartIndex + value);
        builder += letter;
        return builder;
    };
    // Fields
    /**
     * numbers of letters in english [readonly].
     * @default = 26.0
     * @private
     */
    PdfNumbersConvertor.letterLimit = 26.0;
    /**
     * Resturns `acsii start index` value.
     * @default 64
     * @private
     */
    PdfNumbersConvertor.acsiiStartIndex = (65 - 1);
    return PdfNumbersConvertor;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-page-number-field.js":
/*!***********************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-page-number-field.js ***!
  \***********************************************************************************************************************/
/*! exports provided: PdfPageNumberField */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageNumberField", function() { return PdfPageNumberField; });
/* harmony import */ var _graphics_brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../graphics/brushes/pdf-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js");
/* harmony import */ var _pages_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../pages/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js");
/* harmony import */ var _pdf_numbers_convertor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-numbers-convertor */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-numbers-convertor.js");
/* harmony import */ var _multiple_value_field__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./multiple-value-field */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/multiple-value-field.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




/**
 * Represents PDF document `page number field`.
 * @public
 */
var PdfPageNumberField = /** @class */ (function (_super) {
    __extends(PdfPageNumberField, _super);
    function PdfPageNumberField(font, arg2) {
        var _this = _super.call(this) || this;
        // Fields
        /**
         * Stores the number style of the page number field.
         * @private
         */
        _this.internalNumberStyle = _pages_enum__WEBPACK_IMPORTED_MODULE_1__["PdfNumberStyle"].Numeric;
        if (typeof arg2 === 'undefined') {
            _this.font = font;
        }
        else if (arg2 instanceof _graphics_brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_0__["PdfBrush"]) {
            _this.font = font;
            _this.brush = arg2;
        }
        else {
            _this.font = font;
            _this.bounds = arg2;
        }
        return _this;
    }
    Object.defineProperty(PdfPageNumberField.prototype, "numberStyle", {
        // Properties
        /**
         * Gets and sets the number style of the page number field.
         * @private
         */
        get: function () {
            return this.internalNumberStyle;
        },
        set: function (value) {
            this.internalNumberStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Return the `string` value of page number field.
     * @public
     */
    PdfPageNumberField.prototype.getValue = function (graphics) {
        var result = null;
        var page = this.getPageFromGraphics(graphics);
        result = this.internalGetValue(page);
        return result;
    };
    /**
     * Internal method to `get actual value of page number`.
     * @private
     */
    PdfPageNumberField.prototype.internalGetValue = function (page) {
        var document = page.document;
        var pageIndex = document.pages.indexOf(page) + 1;
        return _pdf_numbers_convertor__WEBPACK_IMPORTED_MODULE_2__["PdfNumbersConvertor"].convert(pageIndex, this.numberStyle);
    };
    return PdfPageNumberField;
}(_multiple_value_field__WEBPACK_IMPORTED_MODULE_3__["PdfMultipleValueField"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-template-value-pair.js":
/*!*************************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-template-value-pair.js ***!
  \*************************************************************************************************************************/
/*! exports provided: PdfTemplateValuePair */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTemplateValuePair", function() { return PdfTemplateValuePair; });
/**
 * Represent class to store information about `template and value pairs`.
 * @private
 */
var PdfTemplateValuePair = /** @class */ (function () {
    function PdfTemplateValuePair(template, value) {
        // Fields
        /**
         * Internal variable to store template.
         * @default null
         * @private
         */
        this.pdfTemplate = null;
        /**
         * Intenal variable to store value.
         * @private
         */
        this.content = '';
        if (typeof template === 'undefined') {
            //
        }
        else {
            this.template = template;
            this.value = value;
        }
    }
    Object.defineProperty(PdfTemplateValuePair.prototype, "template", {
        // Properties
        /**
         * Gets or sets the template.
         * @private
         */
        get: function () {
            return this.pdfTemplate;
        },
        set: function (value) {
            this.pdfTemplate = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTemplateValuePair.prototype, "value", {
        /**
         * Gets or sets the value.
         * @private
         */
        get: function () {
            return this.content;
        },
        set: function (value) {
            this.content = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfTemplateValuePair;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/single-value-field.js":
/*!********************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/single-value-field.js ***!
  \********************************************************************************************************************/
/*! exports provided: PdfSingleValueField */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfSingleValueField", function() { return PdfSingleValueField; });
/* harmony import */ var _automatic_field__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./automatic-field */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field.js");
/* harmony import */ var _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../collections/object-object-pair/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/object-object-pair/dictionary.js");
/* harmony import */ var _pdf_template_value_pair__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-template-value-pair */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-template-value-pair.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _graphics_figures_pdf_template__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../graphics/figures/pdf-template */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/pdf-template.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfSingleValueField.ts class for EJ2-PDF
 */





/**
 * Represents automatic field which has the same value in the whole document.
 */
var PdfSingleValueField = /** @class */ (function (_super) {
    __extends(PdfSingleValueField, _super);
    // Constructors
    function PdfSingleValueField() {
        var _this = _super.call(this) || this;
        // Fields
        /* tslint:disable */
        _this.list = new _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_1__["TemporaryDictionary"]();
        /* tslint:enable */
        _this.painterGraphics = [];
        return _this;
    }
    PdfSingleValueField.prototype.performDraw = function (graphics, location, scalingX, scalingY) {
        _super.prototype.performDrawHelper.call(this, graphics, location, scalingX, scalingY);
        var page = this.getPageFromGraphics(graphics);
        var document = page.document;
        var textValue = this.getValue(graphics);
        /* tslint:disable */
        if (this.list.containsKey(document)) {
            var pair = this.list.getValue(document);
            var drawLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["PointF"](location.x + this.location.x, location.y + this.location.y);
            graphics.drawPdfTemplate(pair.template, drawLocation, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["SizeF"](pair.template.width * scalingX, pair.template.height * scalingY));
            this.painterGraphics.push(graphics);
        }
        else {
            var size = this.getSize();
            var template = new _graphics_figures_pdf_template__WEBPACK_IMPORTED_MODULE_4__["PdfTemplate"](size);
            this.list.setValue(document, new _pdf_template_value_pair__WEBPACK_IMPORTED_MODULE_2__["PdfTemplateValuePair"](template, textValue));
            template.graphics.drawString(textValue, this.getFont(), this.pen, this.getBrush(), 0, 0, size.width, size.height, this.stringFormat);
            var drawLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["PointF"](location.x + this.location.x, location.y + this.location.y);
            graphics.drawPdfTemplate(template, drawLocation, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_3__["SizeF"](template.width * scalingX, template.height * scalingY));
            this.painterGraphics.push(graphics);
        }
        /* tslint:enable */
    };
    return PdfSingleValueField;
}(_automatic_field__WEBPACK_IMPORTED_MODULE_0__["PdfAutomaticField"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-catalog.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-catalog.js ***!
  \********************************************************************************************/
/*! exports provided: PdfCatalog */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfCatalog", function() { return PdfCatalog; });
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfCatalog.ts class for EJ2-PDF
 */




/**
 * `PdfCatalog` class represents internal catalog of the Pdf document.
 * @private
 */
var PdfCatalog = /** @class */ (function (_super) {
    __extends(PdfCatalog, _super);
    //constructor
    /**
     * Initializes a new instance of the `PdfCatalog` class.
     * @private
     */
    function PdfCatalog() {
        var _this = _super.call(this) || this;
        //fields
        /**
         * Internal variable to store collection of `sections`.
         * @default null
         * @private
         */
        _this.sections = null;
        /**
         * Internal variable for accessing fields from `DictionryProperties` class.
         * @private
         */
        _this.tempDictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_1__["DictionaryProperties"]();
        _this.items.setValue(new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_1__["DictionaryProperties"]().type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__["PdfName"]('Catalog'));
        return _this;
    }
    Object.defineProperty(PdfCatalog.prototype, "pages", {
        //Properties
        /**
         * Gets or sets the sections, which contain `pages`.
         * @private
         */
        get: function () {
            return this.sections;
        },
        set: function (value) {
            var dictionary = value.element;
            // if (this.sections !== value) {
            //     this.sections = value;
            //     this.Items.setValue(this.tempDictionaryProperties.pages, new PdfReferenceHolder(value));
            // }
            this.sections = value;
            this.items.setValue(this.tempDictionaryProperties.pages, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_3__["PdfReferenceHolder"](value));
        },
        enumerable: true,
        configurable: true
    });
    return PdfCatalog;
}(_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-base.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-base.js ***!
  \**************************************************************************************************/
/*! exports provided: PdfDocumentBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentBase", function() { return PdfDocumentBase; });
/* harmony import */ var _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-file-utils */ "./node_modules/@syncfusion/ej2-file-utils/index.js");
/* harmony import */ var _pdf_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pdf-document */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document.js");



/**
 * `PdfDocumentBase` class represent common properties of PdfDocument classes.
 * @private
 */
var PdfDocumentBase = /** @class */ (function () {
    function PdfDocumentBase(document) {
        /**
         * If the stream is copied,  then it specifies true.
         * @private
         */
        this.isStreamCopied = false;
        if (document instanceof _pdf_document__WEBPACK_IMPORTED_MODULE_1__["PdfDocument"]) {
            this.document = document;
        }
    }
    Object.defineProperty(PdfDocumentBase.prototype, "pdfObjects", {
        //Prpperties
        /**
         * Gets the `PDF objects` collection, which stores all objects and references to it..
         * @private
         */
        get: function () {
            return this.objects;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentBase.prototype, "crossTable", {
        /**
         * Gets the `cross-reference` table.
         * @private
         */
        get: function () {
            return this.pdfCrossTable;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentBase.prototype, "currentSavingObj", {
        /**
         * Gets or sets the current saving `object number`.
         * @private
         */
        get: function () {
            return this.currentSavingObject;
        },
        set: function (value) {
            this.currentSavingObject = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentBase.prototype, "catalog", {
        /**
         * Gets the PDF document `catalog`.
         * @private
         */
        get: function () {
            return this.pdfCatalog;
        },
        set: function (value) {
            this.pdfCatalog = value;
        },
        enumerable: true,
        configurable: true
    });
    //Public methods
    /**
     * Sets the `main object collection`.
     * @private
     */
    PdfDocumentBase.prototype.setMainObjectCollection = function (mainObjectCollection) {
        this.objects = mainObjectCollection;
    };
    /**
     * Sets the `cross table`.
     * @private
     */
    PdfDocumentBase.prototype.setCrossTable = function (cTable) {
        this.pdfCrossTable = cTable;
    };
    /**
     * Sets the `catalog`.
     * @private
     */
    PdfDocumentBase.prototype.setCatalog = function (catalog) {
        this.pdfCatalog = catalog;
    };
    PdfDocumentBase.prototype.save = function (filename) {
        var _this = this;
        var encoding = new _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_0__["Encoding"](true);
        var SW = new _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_0__["StreamWriter"](encoding);
        if (typeof filename === 'undefined') {
            var encoding_1 = new _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_0__["Encoding"](true);
            var SW_1 = new _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_0__["StreamWriter"](encoding_1);
            return new Promise(function (resolve, reject) {
                /* tslint:disable-next-line:no-any */
                var obj = {};
                obj.blobData = new Blob([_this.document.docSave(SW_1, true)], { type: 'application/pdf' });
                resolve(obj);
            });
        }
        else {
            this.document.docSave(SW, filename, true);
        }
    };
    /**
     * `Clone` of parent object - PdfDocument.
     * @private
     */
    PdfDocumentBase.prototype.clone = function () {
        return this.document;
    };
    return PdfDocumentBase;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-template.js":
/*!******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-template.js ***!
  \******************************************************************************************************/
/*! exports provided: PdfDocumentTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentTemplate", function() { return PdfDocumentTemplate; });
/* harmony import */ var _pages_enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../pages/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js");

// import { PdfStampCollection } from `./../Pages/PdfStampCollection`;
/**
 * `PdfDocumentTemplate` class encapsulates a page template for all the pages in the document.
 * @private
 */
var PdfDocumentTemplate = /** @class */ (function () {
    // Constructors
    /**
     * Initializes a new instance of the `PdfDocumentTemplate` class.
     * @public
     */
    function PdfDocumentTemplate() {
        //
    }
    Object.defineProperty(PdfDocumentTemplate.prototype, "left", {
        // private m_stamps : PdfStampCollection;
        // Properties
        /**
         * `Left` page template object.
         * @public
         */
        get: function () {
            return this.leftTemplate;
        },
        set: function (value) {
            this.leftTemplate = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Left);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "top", {
        /**
         * `Top` page template object.
         * @public
         */
        get: function () {
            return this.topTemplate;
        },
        set: function (value) {
            this.topTemplate = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Top);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "right", {
        /**
         * `Right` page template object.
         * @public
         */
        get: function () {
            return this.rightTemplate;
        },
        set: function (value) {
            this.rightTemplate = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Right);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "bottom", {
        /**
         * `Bottom` page template object.
         * @public
         */
        get: function () {
            return this.bottomTemplate;
        },
        set: function (value) {
            this.bottomTemplate = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Bottom);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "EvenLeft", {
        /**
         * `EvenLeft` page template object.
         * @public
         */
        get: function () {
            return this.evenLeft;
        },
        set: function (value) {
            this.evenLeft = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Left);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "EvenTop", {
        /**
         * `EvenTop` page template object.
         * @public
         */
        get: function () {
            return this.evenTop;
        },
        set: function (value) {
            this.evenTop = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Top);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "EvenRight", {
        /**
         * `EvenRight` page template object.
         * @public
         */
        get: function () {
            return this.evenRight;
        },
        set: function (value) {
            this.evenRight = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Right);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "EvenBottom", {
        /**
         * `EvenBottom` page template object.
         * @public
         */
        get: function () {
            return this.evenBottom;
        },
        set: function (value) {
            this.evenBottom = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Bottom);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "OddLeft", {
        /**
         * `OddLeft` page template object.
         * @public
         */
        get: function () {
            return this.oddLeft;
        },
        set: function (value) {
            this.oddLeft = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Left);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "OddTop", {
        /**
         * `OddTop` page template object.
         * @public
         */
        get: function () {
            return this.oddTop;
        },
        set: function (value) {
            this.oddTop = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Top);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "OddRight", {
        /**
         * `OddRight` page template object.
         * @public
         */
        get: function () {
            return this.oddRight;
        },
        set: function (value) {
            this.oddRight = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Right);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentTemplate.prototype, "OddBottom", {
        /**
         * `OddBottom` page template object.
         * @public
         */
        get: function () {
            return this.oddBottom;
        },
        set: function (value) {
            this.oddBottom = this.checkElement(value, _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Bottom);
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * Returns `left` template.
     * @public
     */
    PdfDocumentTemplate.prototype.getLeft = function (page) {
        if (page == null) {
            throw new Error('ArgumentNullException:page');
        }
        var template = null;
        // if (page.Document.Pages != null) {
        var even = this.isEven(page);
        if (even) {
            template = (this.EvenLeft != null) ? this.EvenLeft : this.left;
        }
        else {
            template = (this.OddLeft != null) ? this.OddLeft : this.left;
        }
        // }
        return template;
    };
    /**
     * Returns `top` template.
     * @public
     */
    PdfDocumentTemplate.prototype.getTop = function (page) {
        if (page == null) {
            throw new Error('ArgumentNullException:page');
        }
        var template = null;
        // if (page.Document.Pages != null) {
        var even = this.isEven(page);
        if (even) {
            template = (this.EvenTop != null) ? this.EvenTop : this.top;
        }
        else {
            template = (this.OddTop != null) ? this.OddTop : this.top;
        }
        // }
        return template;
    };
    /**
     * Returns `right` template.
     * @public
     */
    PdfDocumentTemplate.prototype.getRight = function (page) {
        if (page == null) {
            throw new Error('ArgumentNullException:page');
        }
        var template = null;
        // if (page.Document.Pages != null) {
        var even = this.isEven(page);
        if (even) {
            template = (this.EvenRight != null) ? this.EvenRight : this.right;
        }
        else {
            template = (this.OddRight != null) ? this.OddRight : this.right;
        }
        // }
        return template;
    };
    /**
     * Returns `bottom` template.
     * @public
     */
    PdfDocumentTemplate.prototype.getBottom = function (page) {
        if (page == null) {
            throw new Error('ArgumentNullException:page');
        }
        var template = null;
        // if (page.Document.Pages != null) {
        var even = this.isEven(page);
        if (even) {
            template = (this.EvenBottom != null) ? this.EvenBottom : this.bottom;
        }
        else {
            template = (this.OddBottom != null) ? this.OddBottom : this.bottom;
        }
        // }
        return template;
    };
    /**
     * Checks whether the page `is even`.
     * @private
     */
    PdfDocumentTemplate.prototype.isEven = function (page) {
        var pages = page.section.document.pages;
        var index = 0;
        if (pages.pageCollectionIndex.containsKey(page)) {
            index = pages.pageCollectionIndex.getValue(page) + 1;
        }
        else {
            index = pages.indexOf(page) + 1;
        }
        var even = ((index % 2) === 0);
        return even;
    };
    /**
     * Checks a `template element`.
     * @private
     */
    PdfDocumentTemplate.prototype.checkElement = function (templateElement, type) {
        if (templateElement != null) {
            if ((typeof templateElement.type !== 'undefined') && (templateElement.type !== _pages_enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None)) {
                throw new Error('NotSupportedException:Can not reassign the template element. Please, create new one.');
            }
            templateElement.type = type;
        }
        return templateElement;
    };
    return PdfDocumentTemplate;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document.js ***!
  \*********************************************************************************************/
/*! exports provided: PdfDocument */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDocument", function() { return PdfDocument; });
/* harmony import */ var _input_output_pdf_writer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../input-output/pdf-writer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-writer.js");
/* harmony import */ var _input_output_pdf_main_object_collection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../input-output/pdf-main-object-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-main-object-collection.js");
/* harmony import */ var _pdf_document_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-document-base */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-base.js");
/* harmony import */ var _input_output_pdf_cross_table__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../input-output/pdf-cross-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-cross-table.js");
/* harmony import */ var _pdf_catalog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pdf-catalog */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-catalog.js");
/* harmony import */ var _pages_pdf_page_settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../pages/pdf-page-settings */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-settings.js");
/* harmony import */ var _pages_pdf_section_collection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../pages/pdf-section-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-collection.js");
/* harmony import */ var _pages_pdf_document_page_collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../pages/pdf-document-page-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-document-page-collection.js");
/* harmony import */ var _general_pdf_cache_collection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../general/pdf-cache-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-cache-collection.js");
/* harmony import */ var _graphics_enum__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../graphics/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _pdf_document_template__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./pdf-document-template */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-template.js");
/* harmony import */ var _graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../graphics/fonts/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _graphics_fonts_pdf_standard_font__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./../graphics/fonts/pdf-standard-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();













/**
 * Represents a PDF document and can be used to create a new PDF document from the scratch.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * // add a new page to the document
 * let page1 : PdfPage = document.pages.add();
 * // set the font
 * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
 * // create black brush
 * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
 * // draw the text
 * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));
 * // save the document
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfDocument = /** @class */ (function (_super) {
    __extends(PdfDocument, _super);
    function PdfDocument(isMerging) {
        var _this = _super.call(this) || this;
        /**
         * Default `margin` value.
         * @default 40.0
         * @private
         */
        _this.defaultMargin = 40.0;
        /**
         * Internal variable to store instance of `StreamWriter` classes..
         * @default null
         * @private
         */
        _this.streamWriter = null;
        _this.document = _this;
        if (isMerging === true || isMerging === false || typeof isMerging !== 'undefined') {
            var objects = new _input_output_pdf_main_object_collection__WEBPACK_IMPORTED_MODULE_1__["PdfMainObjectCollection"]();
            _this.setMainObjectCollection(objects);
            var crossTable = new _input_output_pdf_cross_table__WEBPACK_IMPORTED_MODULE_3__["PdfCrossTable"]();
            crossTable.isMerging = isMerging;
            crossTable.document = _this;
            _this.setCrossTable(crossTable);
            var catalog = new _pdf_catalog__WEBPACK_IMPORTED_MODULE_4__["PdfCatalog"]();
            _this.setCatalog(catalog);
            objects.add(catalog);
            catalog.position = -1;
            _this.sectionCollection = new _pages_pdf_section_collection__WEBPACK_IMPORTED_MODULE_6__["PdfSectionCollection"](_this);
            _this.documentPageCollection = new _pages_pdf_document_page_collection__WEBPACK_IMPORTED_MODULE_7__["PdfDocumentPageCollection"](_this);
            catalog.pages = _this.sectionCollection;
        }
        else {
            PdfDocument.cacheCollection = new _general_pdf_cache_collection__WEBPACK_IMPORTED_MODULE_8__["PdfCacheCollection"]();
            _this.constructor(false);
        }
        return _this;
    }
    Object.defineProperty(PdfDocument, "defaultFont", {
        //Properties
        /**
         * Gets the `default font`. It is used for complex objects when font is not explicitly defined.
         * @private
         */
        get: function () {
            if (this.defaultStandardFont == null) {
                this.defaultStandardFont = new _graphics_fonts_pdf_standard_font__WEBPACK_IMPORTED_MODULE_12__["PdfStandardFont"](_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_11__["PdfFontFamily"].Helvetica, 8);
            }
            return this.defaultStandardFont;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocument.prototype, "sections", {
        /**
         * Gets the collection of the `sections` in the document.
         * @private
         */
        get: function () {
            return this.sectionCollection;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocument.prototype, "pageSettings", {
        /**
         * Gets the document's page setting.
         * @public
         */
        get: function () {
            if (this.settings == null) {
                this.settings = new _pages_pdf_page_settings__WEBPACK_IMPORTED_MODULE_5__["PdfPageSettings"](this.defaultMargin);
            }
            return this.settings;
        },
        /**
         * Sets the document's page setting.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         *
         * // sets the right margin of the page
         * document.pageSettings.margins.right = 0;
         * // set the page size.
         * document.pageSettings.size = new SizeF(500, 500);
         * // change the page orientation to landscape
         * document.pageSettings.orientation = PdfPageOrientation.Landscape;
         * // apply 90 degree rotation on the page
         * document.pageSettings.rotate = PdfPageRotateAngle.RotateAngle90;
         *
         * // add a pages to the document
         * let page1 : PdfPage = document.pages.add();
         * // set font
         * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
         * // set brush
         * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
         * // set the specified Point
         * let point : PointF = new PointF(page1.getClientSize().width - 200, page1.getClientSize().height - 200);
         * // draw the text
         * page1.graphics.drawString('Hello World', font, blackBrush, point);
         * // save the document
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        set: function (value) {
            this.settings = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocument.prototype, "pages", {
        /**
         * Represents the collection of pages in the PDF document.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * //
         * // get the collection of pages in the document
         * let pageCollection : PdfDocumentPageCollection  = document.pages;
         * //
         * // add pages
         * let page1 : PdfPage = pageCollection.add();
         * // save the document
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            return this.documentPageCollection;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocument, "cache", {
        /**
         * Gets collection of the `cached objects`.
         * @private
         */
        get: function () {
            if (typeof PdfDocument.cacheCollection === 'undefined' || PdfDocument.cacheCollection == null) {
                return new _general_pdf_cache_collection__WEBPACK_IMPORTED_MODULE_8__["PdfCacheCollection"]();
            }
            return PdfDocument.cacheCollection;
        },
        /**
         * Sets collection of the `cached objects`.
         * @private
         */
        set: function (value) {
            this.cacheCollection = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocument, "enableCache", {
        /**
         * Gets the value of enable cache.
         * @private
         */
        get: function () {
            return this.isCacheEnabled;
        },
        /**
         * Sets thie value of enable cache.
         * @private
         */
        set: function (value) {
            this.isCacheEnabled = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocument.prototype, "colorSpace", {
        /* tslint:disable */
        /**
         * Gets or sets the `color space` of the document. This property can be used to create PDF document in RGB, Gray scale or CMYK color spaces.
         * @private
         */
        get: function () {
            if ((this.pdfColorSpace === _graphics_enum__WEBPACK_IMPORTED_MODULE_9__["PdfColorSpace"].Rgb) || ((this.pdfColorSpace === _graphics_enum__WEBPACK_IMPORTED_MODULE_9__["PdfColorSpace"].Cmyk)
                || (this.pdfColorSpace === _graphics_enum__WEBPACK_IMPORTED_MODULE_9__["PdfColorSpace"].GrayScale))) {
                return this.pdfColorSpace;
            }
            else {
                return _graphics_enum__WEBPACK_IMPORTED_MODULE_9__["PdfColorSpace"].Rgb;
            }
        },
        set: function (value) {
            if ((value === _graphics_enum__WEBPACK_IMPORTED_MODULE_9__["PdfColorSpace"].Rgb) || ((value === _graphics_enum__WEBPACK_IMPORTED_MODULE_9__["PdfColorSpace"].Cmyk) ||
                (value === _graphics_enum__WEBPACK_IMPORTED_MODULE_9__["PdfColorSpace"].GrayScale))) {
                this.pdfColorSpace = value;
            }
            else {
                this.pdfColorSpace = _graphics_enum__WEBPACK_IMPORTED_MODULE_9__["PdfColorSpace"].Rgb;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocument.prototype, "template", {
        /* tslint:enable */
        /**
         * Gets or sets a `template` to all pages in the document.
         * @private
         */
        get: function () {
            if (this.pageTemplate == null) {
                this.pageTemplate = new _pdf_document_template__WEBPACK_IMPORTED_MODULE_10__["PdfDocumentTemplate"]();
            }
            return this.pageTemplate;
        },
        set: function (value) {
            this.pageTemplate = value;
        },
        enumerable: true,
        configurable: true
    });
    PdfDocument.prototype.docSave = function (stream, arg2, arg3) {
        this.checkPagesPresence();
        if (stream === null) {
            throw new Error('ArgumentNullException : stream');
        }
        this.streamWriter = stream;
        var writer = new _input_output_pdf_writer__WEBPACK_IMPORTED_MODULE_0__["PdfWriter"](stream);
        writer.document = this;
        if (typeof arg2 === 'boolean' && typeof arg3 === 'undefined') {
            return this.crossTable.save(writer);
        }
        else {
            this.crossTable.save(writer, arg2);
        }
    };
    /**
     * Checks the pages `presence`.
     * @private
     */
    PdfDocument.prototype.checkPagesPresence = function () {
        if (this.pages.count === 0) {
            this.pages.add();
        }
    };
    /**
     * disposes the current instance of `PdfDocument` class.
     * ```typescript
     * // create a new PDF document
     * let document : PdfDocument = new PdfDocument();
     * // add a new page to the document
     * let page1 : PdfPage = document.pages.add();
     * // set the font
     * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
     * // create black brush
     * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
     * // draw the text
     * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));
     * // save the document
     * document.save('output.pdf');
     * // destroy the document
     * document.destroy();
     * ```
     */
    PdfDocument.prototype.destroy = function () {
        this.catalog = undefined;
        this.colorSpace = undefined;
        this.currentSavingObj = undefined;
        this.documentPageCollection = undefined;
        this.isStreamCopied = undefined;
        this.pageSettings = undefined;
        this.pageTemplate = undefined;
        this.pdfColorSpace = undefined;
        this.sectionCollection = undefined;
        PdfDocument.cache.destroy();
        this.crossTable.pdfObjects.destroy();
        PdfDocument.cache = undefined;
        this.streamWriter.destroy();
    };
    /**
     * `Font` used in complex objects to draw strings and text when it is not defined explicitly.
     * @default null
     * @private
     */
    PdfDocument.defaultStandardFont = null;
    /**
     * Indicates whether enable cache or not
     * @default true
     * @private
     */
    PdfDocument.isCacheEnabled = true;
    return PdfDocument;
}(_pdf_document_base__WEBPACK_IMPORTED_MODULE_2__["PdfDocumentBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js ***!
  \*******************************************************************************************/
/*! exports provided: PointF, SizeF, RectangleF, Rectangle */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PointF", function() { return PointF; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SizeF", function() { return SizeF; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RectangleF", function() { return RectangleF; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rectangle", function() { return Rectangle; });
/**
 * Coordinates of Position for `PointF`.
 * @private
 */
var PointF = /** @class */ (function () {
    function PointF(x, y) {
        if (typeof x === 'undefined') {
            this.x = 0;
            this.y = 0;
        }
        else {
            if (x !== null) {
                this.x = x;
            }
            else {
                this.x = 0;
            }
            if (y !== null) {
                this.y = y;
            }
            else {
                this.y = 0;
            }
        }
    }
    return PointF;
}());

/**
 * Width and Height as `Size`.
 * @private
 */
var SizeF = /** @class */ (function () {
    function SizeF(width, height) {
        if (typeof height === 'undefined') {
            this.height = 0;
            this.width = 0;
        }
        else {
            if (height !== null) {
                this.height = height;
            }
            else {
                this.height = 0;
            }
            if (width !== null) {
                this.width = width;
            }
            else {
                this.width = 0;
            }
        }
    }
    return SizeF;
}());

/**
 * `RectangleF` with Position and size.
 * @private
 */
var RectangleF = /** @class */ (function () {
    function RectangleF(arg1, arg2, arg3, arg4) {
        if (typeof arg1 === typeof arg1 && typeof arg1 === 'undefined') {
            this.x = 0;
            this.y = 0;
            this.height = 0;
            this.width = 0;
        }
        else {
            if (arg1 instanceof PointF && arg2 instanceof SizeF && typeof arg3 === 'undefined') {
                var pointf = arg1;
                this.x = pointf.x;
                this.y = pointf.y;
                var sizef = arg2;
                this.height = sizef.height;
                this.width = sizef.width;
            }
            else {
                var x = arg1;
                var y = arg2;
                var width = arg3;
                var height = arg4;
                this.x = x;
                this.y = y;
                this.height = height;
                this.width = width;
            }
        }
    }
    return RectangleF;
}());

/**
 * `Rectangle` with left, right, top and bottom.
 * @private
 */
var Rectangle = /** @class */ (function () {
    /**
     * Instance of `RectangleF` class with X, Y, Width and Height.
     * @private
     */
    function Rectangle(left, top, right, bottom) {
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;
    }
    Object.defineProperty(Rectangle.prototype, "width", {
        /**
         * Gets a value of width
         */
        get: function () {
            return this.right - this.left;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Rectangle.prototype, "height", {
        /**
         * Gets a value of height
         */
        get: function () {
            return this.bottom - this.top;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Rectangle.prototype, "topLeft", {
        /**
         * Gets a value of Top and Left
         */
        get: function () {
            return new PointF(this.left, this.top);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Rectangle.prototype, "size", {
        /**
         * Gets a value of size
         */
        get: function () {
            return new SizeF(this.width, this.height);
        },
        enumerable: true,
        configurable: true
    });
    Rectangle.prototype.toString = function () {
        return this.topLeft + 'x' + this.size;
    };
    return Rectangle;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/enum.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/enum.js ***!
  \************************************************************************************/
/*! exports provided: PdfDestinationMode */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDestinationMode", function() { return PdfDestinationMode; });
/**
 * public Enum for `PdfDestinationMode`.
 * @private
 */
var PdfDestinationMode;
(function (PdfDestinationMode) {
    /**
     * Specifies the type of `Location`.
     * @private
     */
    PdfDestinationMode[PdfDestinationMode["Location"] = 0] = "Location";
    /**
     * Specifies the type of `FitToPage`.
     * @private
     */
    PdfDestinationMode[PdfDestinationMode["FitToPage"] = 1] = "FitToPage";
    /**
     * Specifies the type of `FitR`.
     * @private
     */
    PdfDestinationMode[PdfDestinationMode["FitR"] = 2] = "FitR";
})(PdfDestinationMode || (PdfDestinationMode = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-cache-collection.js":
/*!****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-cache-collection.js ***!
  \****************************************************************************************************/
/*! exports provided: PdfCacheCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfCacheCollection", function() { return PdfCacheCollection; });
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/**
 * PdfCacheCollection.ts class for EJ2-PDF
 */

/**
 * `Collection of the cached objects`.
 * @private
 */
var PdfCacheCollection = /** @class */ (function () {
    // Constructors
    /**
     * Initializes a new instance of the `PdfCacheCollection` class.
     * @private
     */
    function PdfCacheCollection() {
        this.referenceObjects = [];
        this.pdfFontCollection = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
    }
    // Public methods
    /**
     * `Searches` for the similar cached object. If is not found - adds the object to the cache.
     * @private
     */
    PdfCacheCollection.prototype.search = function (obj) {
        var result = null;
        var group = this.getGroup(obj);
        if (group == null) {
            group = this.createNewGroup();
        }
        else if (group.length > 0) {
            result = group[0];
        }
        group.push(obj);
        return result;
    };
    // Implementation
    /**
     * `Creates` a new group.
     * @private
     */
    PdfCacheCollection.prototype.createNewGroup = function () {
        var group = [];
        this.referenceObjects.push(group);
        return group;
    };
    /**
     * `Find and Return` a group.
     * @private
     */
    PdfCacheCollection.prototype.getGroup = function (result) {
        var group = null;
        if (result !== null) {
            var len = this.referenceObjects.length;
            for (var i = 0; i < len; i++) {
                if (this.referenceObjects.length > 0) {
                    var tGroup = this.referenceObjects[i];
                    if (tGroup.length > 0) {
                        var representative = tGroup[0];
                        if (result.equalsTo(representative)) {
                            group = tGroup;
                            break;
                        }
                    }
                    else {
                        this.removeGroup(tGroup);
                    }
                }
                len = this.referenceObjects.length;
            }
        }
        return group;
    };
    /**
     * Remove a group from the storage.
     */
    PdfCacheCollection.prototype.removeGroup = function (group) {
        if (group !== null) {
            var index = this.referenceObjects.indexOf(group);
            this.referenceObjects.slice(index, index + 1);
        }
    };
    PdfCacheCollection.prototype.destroy = function () {
        this.pdfFontCollection = undefined;
        this.referenceObjects = undefined;
    };
    return PdfCacheCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-collection.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-collection.js ***!
  \**********************************************************************************************/
/*! exports provided: PdfCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfCollection", function() { return PdfCollection; });
/**
 * PdfCollection.ts class for EJ2-PDF
 * The class used to handle the collection of PdF objects.
 */
var PdfCollection = /** @class */ (function () {
    // Constructors
    /**
     * Initializes a new instance of the `Collection` class.
     * @private
     */
    function PdfCollection() {
        //
    }
    Object.defineProperty(PdfCollection.prototype, "count", {
        // Properties
        /**
         * Gets the `Count` of stored objects.
         * @private
         */
        get: function () {
            if (typeof this.collection === 'undefined') {
                this.collection = [];
            }
            return this.collection.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfCollection.prototype, "list", {
        /**
         * Gets the `list` of stored objects.
         * @private
         */
        get: function () {
            if (typeof this.collection === 'undefined') {
                this.collection = [];
            }
            return this.collection;
        },
        enumerable: true,
        configurable: true
    });
    return PdfCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-destination.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-destination.js ***!
  \***********************************************************************************************/
/*! exports provided: PdfDestination */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDestination", function() { return PdfDestination; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _pages_enum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../pages/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js");
/* harmony import */ var _general_enum__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../general/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/enum.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");








/**
 * `PdfDestination` class represents an anchor in the document
 * where bookmarks or annotations can direct when clicked.
 */
var PdfDestination = /** @class */ (function () {
    function PdfDestination(arg1, arg2) {
        // Fields
        /**
         * Internal variable for accessing fields from `DictionryProperties` class.
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_7__["DictionaryProperties"]();
        /**
         * Type of the `destination`.
         * @private
         */
        this.destinationMode = _general_enum__WEBPACK_IMPORTED_MODULE_3__["PdfDestinationMode"].Location;
        /**
         * `Zoom` factor.
         * @private
         * @default 0
         */
        this.zoomFactor = 0;
        /**
         * `Location` of the destination.
         * @default new PointF() with 0 ,0 as co-ordinates
         * @private
         */
        this.destinationLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"](0, 0);
        /**
         * `Bounds` of the destination as RectangleF.
         * @default RectangleF.Empty
         * @private
         */
        this.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["RectangleF"]();
        /**
         * Pdf primitive representing `this` object.
         * @private
         */
        this.array = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_1__["PdfArray"]();
        if (typeof arg2 === 'undefined') {
            var angle = _pages_enum__WEBPACK_IMPORTED_MODULE_2__["PdfPageRotateAngle"].RotateAngle0;
            this.destinationLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"](0, this.destinationLocation.y);
            this.pdfPage = arg1;
        }
        else if (arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"]) {
            this.constructor(arg1);
            this.destinationLocation = arg2;
        }
        else {
            this.constructor(arg1);
            this.bounds = arg2;
        }
    }
    Object.defineProperty(PdfDestination.prototype, "zoom", {
        // Properties
        /**
         * Gets and Sets the `zoom` factor.
         * @private
         */
        get: function () {
            return this.zoomFactor;
        },
        set: function (value) {
            this.zoomFactor = value;
            this.initializePrimitive();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDestination.prototype, "page", {
        /**
         * Gets and Sets the `page` object.
         * @private
         */
        get: function () {
            return this.pdfPage;
        },
        set: function (value) {
            this.pdfPage = value;
            this.initializePrimitive();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDestination.prototype, "mode", {
        /**
         * Gets and Sets the destination `mode`.
         * @private
         */
        get: function () {
            return this.destinationMode;
        },
        set: function (value) {
            this.destinationMode = value;
            this.initializePrimitive();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDestination.prototype, "location", {
        /**
         * Gets and Sets the `location`.
         * @private
         */
        get: function () {
            return this.destinationLocation;
        },
        set: function (value) {
            this.destinationLocation = value;
            this.initializePrimitive();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Translates` co-ordinates to PDF co-ordinate system (lower/left).
     * @private
     */
    PdfDestination.prototype.pointToNativePdf = function (page, point) {
        var section = page.section;
        return section.pointToNativePdf(page, point);
    };
    /**
     * `In fills` array by correct values.
     * @private
     */
    PdfDestination.prototype.initializePrimitive = function () {
        this.array.clear();
        this.array.add(new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](this.pdfPage));
        switch (this.destinationMode) {
            case _general_enum__WEBPACK_IMPORTED_MODULE_3__["PdfDestinationMode"].Location:
                var simplePage = this.pdfPage;
                var point = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"]();
                point = this.pointToNativePdf(simplePage, this.destinationLocation);
                this.array.add(new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.xyz));
                this.array.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](point.x));
                this.array.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](point.y));
                this.array.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](this.zoomFactor));
                break;
            case _general_enum__WEBPACK_IMPORTED_MODULE_3__["PdfDestinationMode"].FitToPage:
                this.array.add(new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.fit));
                break;
        }
    };
    Object.defineProperty(PdfDestination.prototype, "element", {
        /**
         * Gets the `element` representing this object.
         * @private
         */
        get: function () {
            this.initializePrimitive();
            return this.array;
        },
        enumerable: true,
        configurable: true
    });
    return PdfDestination;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js ***!
  \**************************************************************************************************/
/*! exports provided: PdfBrush */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfBrush", function() { return PdfBrush; });
/**
 * `PdfBrush` class provides objects used to fill the interiors of graphical shapes such as rectangles,
 * ellipses, pies, polygons, and paths.
 * @private
 */
var PdfBrush = /** @class */ (function () {
    /**
     * Creates instanceof `PdfBrush` class.
     * @hidden
     * @private
     */
    function PdfBrush() {
        //
    }
    return PdfBrush;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-solid-brush.js":
/*!********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-solid-brush.js ***!
  \********************************************************************************************************/
/*! exports provided: PdfSolidBrush */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfSolidBrush", function() { return PdfSolidBrush; });
/* harmony import */ var _pdf_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../pdf-color */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _pdf_brush__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * Represents a brush that fills any object with a solid color.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * // add a pages to the document
 * let page1 : PdfPage = document.pages.add();
 * // set font
 * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
 * // set brush
 * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
 * // draw the text
 * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10));
 * // save the document
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfSolidBrush = /** @class */ (function (_super) {
    __extends(PdfSolidBrush, _super);
    //Constructors
    /**
     * Initializes a new instance of the `PdfSolidBrush` class.
     * ```typescript
     * // create a new PDF document
     * let document : PdfDocument = new PdfDocument();
     * // add a pages to the document
     * let page1 : PdfPage = document.pages.add();
     * // set font
     * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
     * // set brush
     * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
     * // draw the text
     * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10));
     * // save the document
     * document.save('output.pdf');
     * // destroy the document
     * document.destroy();
     * ```
     * @param color color of the brush
     */
    function PdfSolidBrush(color) {
        var _this = _super.call(this) || this;
        _this.pdfColor = color;
        return _this;
    }
    Object.defineProperty(PdfSolidBrush.prototype, "color", {
        //Properties
        /**
         * Gets or sets the `color` of the brush.
         * @private
         */
        get: function () {
            return this.pdfColor;
        },
        set: function (value) {
            this.pdfColor = value;
        },
        enumerable: true,
        configurable: true
    });
    //Implementation
    /**
     * `Monitors` the changes of the brush and modify PDF state respectively.
     * @private
     */
    PdfSolidBrush.prototype.monitorChanges = function (brush, streamWriter, getResources, saveChanges, currentColorSpace) {
        if (streamWriter == null) {
            throw new Error('ArgumentNullException:streamWriter');
        }
        var diff = false;
        if (brush == null) {
            diff = true;
            streamWriter.setColorAndSpace(this.pdfColor, currentColorSpace, false);
            return diff;
        }
        else {
            var sBrush = brush;
            diff = true;
            streamWriter.setColorAndSpace(this.pdfColor, currentColorSpace, false);
            return diff;
        }
    };
    /**
     * `Resets` the changes, which were made by the brush.
     * @private
     */
    PdfSolidBrush.prototype.resetChanges = function (streamWriter) {
        streamWriter.setColorAndSpace(new _pdf_color__WEBPACK_IMPORTED_MODULE_0__["PdfColor"](0, 0, 0), _enum__WEBPACK_IMPORTED_MODULE_1__["PdfColorSpace"].Rgb, false);
    };
    return PdfSolidBrush;
}(_pdf_brush__WEBPACK_IMPORTED_MODULE_2__["PdfBrush"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/constants.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/constants.js ***!
  \******************************************************************************************/
/*! exports provided: ProcedureSets */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProcedureSets", function() { return ProcedureSets; });
/**
 * `constants.ts` class for EJ2-PDF
 * @private
 */
var ProcedureSets = /** @class */ (function () {
    function ProcedureSets() {
        /**
         * Specifies the `PDF` procedure set.
         * @private
         */
        this.pdf = 'PDF';
        /**
         * Specifies the `Text` procedure set.
         * @private
         */
        this.text = 'Text';
        /**
         * Specifies the `ImageB` procedure set.
         * @private
         */
        this.imageB = 'ImageB';
        /**
         * Specifies the `ImageC` procedure set.
         * @private
         */
        this.imageC = 'ImageC';
        /**
         * Specifies the `ImageI` procedure set.
         * @private
         */
        this.imageI = 'ImageI';
    }
    return ProcedureSets;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js ***!
  \*************************************************************************************/
/*! exports provided: PdfHorizontalAlignment, PdfVerticalAlignment, PdfTextAlignment, TextRenderingMode, PdfLineJoin, PdfLineCap, PdfDashStyle, PdfFillMode, PdfColorSpace, PdfBlendMode, PdfGraphicsUnit, PdfGridImagePosition, PdfTextDirection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfHorizontalAlignment", function() { return PdfHorizontalAlignment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfVerticalAlignment", function() { return PdfVerticalAlignment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTextAlignment", function() { return PdfTextAlignment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextRenderingMode", function() { return TextRenderingMode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfLineJoin", function() { return PdfLineJoin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfLineCap", function() { return PdfLineCap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDashStyle", function() { return PdfDashStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfFillMode", function() { return PdfFillMode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfColorSpace", function() { return PdfColorSpace; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfBlendMode", function() { return PdfBlendMode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGraphicsUnit", function() { return PdfGraphicsUnit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridImagePosition", function() { return PdfGridImagePosition; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTextDirection", function() { return PdfTextDirection; });
/**
 * public Enum for `PdfHorizontalAlignment`.
 * @private
 */
var PdfHorizontalAlignment;
(function (PdfHorizontalAlignment) {
    /**
     * Specifies the type of `Left`.
     * @private
     */
    PdfHorizontalAlignment[PdfHorizontalAlignment["Left"] = 0] = "Left";
    /**
     * Specifies the type of `Center`.
     * @private
     */
    PdfHorizontalAlignment[PdfHorizontalAlignment["Center"] = 1] = "Center";
    /**
     * Specifies the type of `Right`.
     * @private
     */
    PdfHorizontalAlignment[PdfHorizontalAlignment["Right"] = 2] = "Right";
})(PdfHorizontalAlignment || (PdfHorizontalAlignment = {}));
/**
 * public Enum for `PdfVerticalAlignment`.
 * @private
 */
var PdfVerticalAlignment;
(function (PdfVerticalAlignment) {
    /**
     * Specifies the type of `Top`.
     * @private
     */
    PdfVerticalAlignment[PdfVerticalAlignment["Top"] = 0] = "Top";
    /**
     * Specifies the type of `Middle`.
     * @private
     */
    PdfVerticalAlignment[PdfVerticalAlignment["Middle"] = 1] = "Middle";
    /**
     * Specifies the type of `Bottom`.
     * @private
     */
    PdfVerticalAlignment[PdfVerticalAlignment["Bottom"] = 2] = "Bottom";
})(PdfVerticalAlignment || (PdfVerticalAlignment = {}));
/**
 * public Enum for `public`.
 * @private
 */
var PdfTextAlignment;
(function (PdfTextAlignment) {
    /**
     * Specifies the type of `Left`.
     * @private
     */
    PdfTextAlignment[PdfTextAlignment["Left"] = 0] = "Left";
    /**
     * Specifies the type of `Center`.
     * @private
     */
    PdfTextAlignment[PdfTextAlignment["Center"] = 1] = "Center";
    /**
     * Specifies the type of `Right`.
     * @private
     */
    PdfTextAlignment[PdfTextAlignment["Right"] = 2] = "Right";
    /**
     * Specifies the type of `Justify`.
     * @private
     */
    PdfTextAlignment[PdfTextAlignment["Justify"] = 3] = "Justify";
})(PdfTextAlignment || (PdfTextAlignment = {}));
/**
 * public Enum for `TextRenderingMode`.
 * @private
 */
var TextRenderingMode;
(function (TextRenderingMode) {
    /**
     * Specifies the type of `Fill`.
     * @private
     */
    TextRenderingMode[TextRenderingMode["Fill"] = 0] = "Fill";
    /**
     * Specifies the type of `Stroke`.
     * @private
     */
    TextRenderingMode[TextRenderingMode["Stroke"] = 1] = "Stroke";
    /**
     * Specifies the type of `FillStroke`.
     * @private
     */
    TextRenderingMode[TextRenderingMode["FillStroke"] = 2] = "FillStroke";
    /**
     * Specifies the type of `None`.
     * @private
     */
    TextRenderingMode[TextRenderingMode["None"] = 3] = "None";
    /**
     * Specifies the type of `ClipFlag`.
     * @private
     */
    TextRenderingMode[TextRenderingMode["ClipFlag"] = 4] = "ClipFlag";
    /**
     * Specifies the type of `ClipFill`.
     * @private
     */
    TextRenderingMode[TextRenderingMode["ClipFill"] = 4] = "ClipFill";
    /**
     * Specifies the type of `ClipStroke`.
     * @private
     */
    TextRenderingMode[TextRenderingMode["ClipStroke"] = 5] = "ClipStroke";
    /**
     * Specifies the type of `ClipFillStroke`.
     * @private
     */
    TextRenderingMode[TextRenderingMode["ClipFillStroke"] = 6] = "ClipFillStroke";
    /**
     * Specifies the type of `Clip`.
     * @private
     */
    TextRenderingMode[TextRenderingMode["Clip"] = 7] = "Clip";
})(TextRenderingMode || (TextRenderingMode = {}));
/**
 * public Enum for `PdfLineJoin`.
 * @private
 */
var PdfLineJoin;
(function (PdfLineJoin) {
    /**
     * Specifies the type of `Miter`.
     * @private
     */
    PdfLineJoin[PdfLineJoin["Miter"] = 0] = "Miter";
    /**
     * Specifies the type of `Round`.
     * @private
     */
    PdfLineJoin[PdfLineJoin["Round"] = 1] = "Round";
    /**
     * Specifies the type of `Bevel`.
     * @private
     */
    PdfLineJoin[PdfLineJoin["Bevel"] = 2] = "Bevel";
})(PdfLineJoin || (PdfLineJoin = {}));
/**
 * public Enum for `PdfLineCap`.
 * @private
 */
var PdfLineCap;
(function (PdfLineCap) {
    /**
     * Specifies the type of `Flat`.
     * @private
     */
    PdfLineCap[PdfLineCap["Flat"] = 0] = "Flat";
    /**
     * Specifies the type of `Round`.
     * @private
     */
    PdfLineCap[PdfLineCap["Round"] = 1] = "Round";
    /**
     * Specifies the type of `Square`.
     * @private
     */
    PdfLineCap[PdfLineCap["Square"] = 2] = "Square";
})(PdfLineCap || (PdfLineCap = {}));
/**
 * public Enum for `PdfDashStyle`.
 * @private
 */
var PdfDashStyle;
(function (PdfDashStyle) {
    /**
     * Specifies the type of `Solid`.
     * @private
     */
    PdfDashStyle[PdfDashStyle["Solid"] = 0] = "Solid";
    /**
     * Specifies the type of `Dash`.
     * @private
     */
    PdfDashStyle[PdfDashStyle["Dash"] = 1] = "Dash";
    /**
     * Specifies the type of `Dot`.
     * @private
     */
    PdfDashStyle[PdfDashStyle["Dot"] = 2] = "Dot";
    /**
     * Specifies the type of `DashDot`.
     * @private
     */
    PdfDashStyle[PdfDashStyle["DashDot"] = 3] = "DashDot";
    /**
     * Specifies the type of `DashDotDot`.
     * @private
     */
    PdfDashStyle[PdfDashStyle["DashDotDot"] = 4] = "DashDotDot";
    /**
     * Specifies the type of `Custom`.
     * @private
     */
    PdfDashStyle[PdfDashStyle["Custom"] = 5] = "Custom";
})(PdfDashStyle || (PdfDashStyle = {}));
/**
 * public Enum for `PdfFillMode`.
 * @private
 */
var PdfFillMode;
(function (PdfFillMode) {
    /**
     * Specifies the type of `Winding`.
     * @private
     */
    PdfFillMode[PdfFillMode["Winding"] = 0] = "Winding";
    /**
     * Specifies the type of `Alternate`.
     * @private
     */
    PdfFillMode[PdfFillMode["Alternate"] = 1] = "Alternate";
})(PdfFillMode || (PdfFillMode = {}));
/**
 * public Enum for `PdfColorSpace`.
 * @private
 */
var PdfColorSpace;
(function (PdfColorSpace) {
    /**
     * Specifies the type of `Rgb`.
     * @private
     */
    PdfColorSpace[PdfColorSpace["Rgb"] = 0] = "Rgb";
    /**
     * Specifies the type of `Cmyk`.
     * @private
     */
    PdfColorSpace[PdfColorSpace["Cmyk"] = 1] = "Cmyk";
    /**
     * Specifies the type of `GrayScale`.
     * @private
     */
    PdfColorSpace[PdfColorSpace["GrayScale"] = 2] = "GrayScale";
    /**
     * Specifies the type of `Indexed`.
     * @private
     */
    PdfColorSpace[PdfColorSpace["Indexed"] = 3] = "Indexed";
})(PdfColorSpace || (PdfColorSpace = {}));
/**
 * public Enum for `PdfBlendMode`.
 * @private
 */
var PdfBlendMode;
(function (PdfBlendMode) {
    /**
     * Specifies the type of `Normal`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Normal"] = 0] = "Normal";
    /**
     * Specifies the type of `Multiply`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Multiply"] = 1] = "Multiply";
    /**
     * Specifies the type of `Screen`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Screen"] = 2] = "Screen";
    /**
     * Specifies the type of `Overlay`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Overlay"] = 3] = "Overlay";
    /**
     * Specifies the type of `Darken`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Darken"] = 4] = "Darken";
    /**
     * Specifies the type of `Lighten`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Lighten"] = 5] = "Lighten";
    /**
     * Specifies the type of `ColorDodge`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["ColorDodge"] = 6] = "ColorDodge";
    /**
     * Specifies the type of `ColorBurn`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["ColorBurn"] = 7] = "ColorBurn";
    /**
     * Specifies the type of `HardLight`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["HardLight"] = 8] = "HardLight";
    /**
     * Specifies the type of `SoftLight`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["SoftLight"] = 9] = "SoftLight";
    /**
     * Specifies the type of `Difference`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Difference"] = 10] = "Difference";
    /**
     * Specifies the type of `Exclusion`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Exclusion"] = 11] = "Exclusion";
    /**
     * Specifies the type of `Hue`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Hue"] = 12] = "Hue";
    /**
     * Specifies the type of `Saturation`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Saturation"] = 13] = "Saturation";
    /**
     * Specifies the type of `Color`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Color"] = 14] = "Color";
    /**
     * Specifies the type of `Luminosity`.
     * @private
     */
    PdfBlendMode[PdfBlendMode["Luminosity"] = 15] = "Luminosity";
})(PdfBlendMode || (PdfBlendMode = {}));
/**
 * public Enum for `PdfGraphicsUnit`.
 * @private
 */
var PdfGraphicsUnit;
(function (PdfGraphicsUnit) {
    /**
     * Specifies the type of `Centimeter`.
     * @private
     */
    PdfGraphicsUnit[PdfGraphicsUnit["Centimeter"] = 0] = "Centimeter";
    /**
     * Specifies the type of `Pica`.
     * @private
     */
    PdfGraphicsUnit[PdfGraphicsUnit["Pica"] = 1] = "Pica";
    /**
     * Specifies the type of `Pixel`.
     * @private
     */
    PdfGraphicsUnit[PdfGraphicsUnit["Pixel"] = 2] = "Pixel";
    /**
     * Specifies the type of `Point`.
     * @private
     */
    PdfGraphicsUnit[PdfGraphicsUnit["Point"] = 3] = "Point";
    /**
     * Specifies the type of `Inch`.
     * @private
     */
    PdfGraphicsUnit[PdfGraphicsUnit["Inch"] = 4] = "Inch";
    /**
     * Specifies the type of `Document`.
     * @private
     */
    PdfGraphicsUnit[PdfGraphicsUnit["Document"] = 5] = "Document";
    /**
     * Specifies the type of `Millimeter`.
     * @private
     */
    PdfGraphicsUnit[PdfGraphicsUnit["Millimeter"] = 6] = "Millimeter";
})(PdfGraphicsUnit || (PdfGraphicsUnit = {}));
/**
 * public Enum for `PdfGridImagePosition`.
 * @private
 */
var PdfGridImagePosition;
(function (PdfGridImagePosition) {
    /**
     * Specifies the type of `Fit`.
     * @private
     */
    PdfGridImagePosition[PdfGridImagePosition["Fit"] = 0] = "Fit";
    /**
     * Specifies the type of `Center`.
     * @private
     */
    PdfGridImagePosition[PdfGridImagePosition["Center"] = 1] = "Center";
    /**
     * Specifies the type of `Stretch`.
     * @private
     */
    PdfGridImagePosition[PdfGridImagePosition["Stretch"] = 2] = "Stretch";
    /**
     * Specifies the type of `Tile`.
     * @private
     */
    PdfGridImagePosition[PdfGridImagePosition["Tile"] = 3] = "Tile";
})(PdfGridImagePosition || (PdfGridImagePosition = {}));
/**
 * public Enum for `the text rendering direction`.
 * @private
 */
var PdfTextDirection;
(function (PdfTextDirection) {
    /**
     * Specifies the type of `None`.
     * @private
     */
    PdfTextDirection[PdfTextDirection["None"] = 0] = "None";
    /**
     * Specifies the type of `LeftToRight`.
     * @private
     */
    PdfTextDirection[PdfTextDirection["LeftToRight"] = 1] = "LeftToRight";
    /**
     * Specifies the type of `RightToLeft`.
     * @private
     */
    PdfTextDirection[PdfTextDirection["RightToLeft"] = 2] = "RightToLeft";
})(PdfTextDirection || (PdfTextDirection = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js":
/*!**************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js ***!
  \**************************************************************************************************************/
/*! exports provided: ElementLayouter, PdfLayoutFormat, PdfLayoutParams, PdfLayoutResult */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementLayouter", function() { return ElementLayouter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutFormat", function() { return PdfLayoutFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutParams", function() { return PdfLayoutParams; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutResult", function() { return PdfLayoutResult; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/**
 * ElementLayouter.ts class for EJ2-PDF
 */

/**
 * Base class for `elements lay outing`.
 * @private
 */
var ElementLayouter = /** @class */ (function () {
    // Constructor
    /**
     * Initializes a new instance of the `ElementLayouter` class.
     * @private
     */
    function ElementLayouter(element) {
        this.layoutElement = element;
    }
    Object.defineProperty(ElementLayouter.prototype, "elements", {
        // Properties
        /**
         * Gets the `element`.
         * @private
         */
        get: function () {
            return this.layoutElement;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Gets the `element`.
     * @private
     */
    ElementLayouter.prototype.getElement = function () {
        return this.layoutElement;
    };
    // Implementation
    /**
     * `Layouts` the element.
     * @private
     */
    ElementLayouter.prototype.layout = function (param) {
        return this.layoutInternal(param);
    };
    ElementLayouter.prototype.Layouter = function (param) {
        return this.layoutInternal(param);
    };
    /**
     * Returns the `next page`.
     * @private
     */
    ElementLayouter.prototype.getNextPage = function (currentPage) {
        var section = currentPage.section;
        var nextPage = section.add();
        return nextPage;
    };
    return ElementLayouter;
}());

var PdfLayoutFormat = /** @class */ (function () {
    function PdfLayoutFormat(baseFormat) {
        if (typeof baseFormat === 'undefined') {
            //
        }
        else {
            this.break = baseFormat.break;
            this.layout = baseFormat.layout;
            this.paginateBounds = baseFormat.paginateBounds;
            this.boundsSet = baseFormat.usePaginateBounds;
        }
    }
    Object.defineProperty(PdfLayoutFormat.prototype, "layout", {
        // Properties
        /**
         * Gets or sets `layout` type of the element.
         * @private
         */
        get: function () {
            // if (typeof this.layoutType === 'undefined' || this.layoutType == null) {
            //      this.layoutType = PdfLayoutType.Paginate;
            // }
            return this.layoutType;
        },
        set: function (value) {
            this.layoutType = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfLayoutFormat.prototype, "break", {
        /**
         * Gets or sets `break` type of the element.
         * @private
         */
        get: function () {
            // if (typeof this.breakType === 'undefined' || this.boundsSet == null) {
            //      this.breakType = PdfLayoutBreakType.FitPage;
            // }
            return this.breakType;
        },
        set: function (value) {
            this.breakType = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfLayoutFormat.prototype, "paginateBounds", {
        /**
         * Gets or sets the `bounds` on the next page.
         * @private
         */
        get: function () {
            if (typeof this.layoutPaginateBounds === 'undefined' && this.layoutPaginateBounds == null) {
                this.layoutPaginateBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["RectangleF"](0, 0, 0, 0);
            }
            return this.layoutPaginateBounds;
        },
        set: function (value) {
            this.layoutPaginateBounds = value;
            this.boundsSet = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfLayoutFormat.prototype, "usePaginateBounds", {
        /**
         * Gets a value indicating whether [`use paginate bounds`].
         * @private
         */
        get: function () {
            // if (typeof this.boundsSet === 'undefined' || this.boundsSet == null) {
            //      this.boundsSet = false;
            // }
            return this.boundsSet;
        },
        enumerable: true,
        configurable: true
    });
    return PdfLayoutFormat;
}());

var PdfLayoutParams = /** @class */ (function () {
    function PdfLayoutParams() {
    }
    Object.defineProperty(PdfLayoutParams.prototype, "page", {
        // Properties
        /**
         * Gets or sets the layout `page` for the element.
         * @private
         */
        get: function () {
            return this.pdfPage;
        },
        set: function (value) {
            this.pdfPage = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfLayoutParams.prototype, "bounds", {
        /**
         * Gets or sets layout `bounds` for the element.
         * @private
         */
        get: function () {
            return new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["RectangleF"](this.layoutBounds.x, this.layoutBounds.y, this.layoutBounds.width, this.layoutBounds.height);
        },
        set: function (value) {
            this.layoutBounds = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfLayoutParams.prototype, "format", {
        /**
         * Gets or sets `layout settings` for the element.
         * @private
         */
        get: function () {
            return this.layoutFormat;
        },
        set: function (value) {
            this.layoutFormat = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfLayoutParams;
}());

var PdfLayoutResult = /** @class */ (function () {
    // Constructors
    /**
     * Initializes the new instance of `PdfLayoutResult` class.
     * @private
     */
    function PdfLayoutResult(page, bounds) {
        this.pdfPage = page;
        this.layoutBounds = bounds;
    }
    Object.defineProperty(PdfLayoutResult.prototype, "page", {
        // Properties
        /**
         * Gets the last `page` where the element was drawn.
         * @private
         */
        get: function () {
            return this.pdfPage;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfLayoutResult.prototype, "bounds", {
        /**
         * Gets the `bounds` of the element on the last page where it was drawn.
         * @private
         */
        get: function () {
            return this.layoutBounds;
        },
        enumerable: true,
        configurable: true
    });
    return PdfLayoutResult;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/graphics-element.js":
/*!**************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/graphics-element.js ***!
  \**************************************************************************************************************/
/*! exports provided: PdfGraphicsElement */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGraphicsElement", function() { return PdfGraphicsElement; });
/**
 * Represents a base class for all page graphics elements.
 */
var PdfGraphicsElement = /** @class */ (function () {
    // Constructors
    function PdfGraphicsElement() {
        //
    }
    /**
     * `Draws` the page number field.
     * @public
     */
    PdfGraphicsElement.prototype.drawHelper = function (graphics, x, y) {
        var bNeedSave = (x !== 0 || y !== 0);
        var gState = null;
        // Translate co-ordinates.
        if (bNeedSave) {
            // Save state.
            gState = graphics.save();
            graphics.translateTransform(x, y);
        }
        this.drawInternal(graphics);
        if (bNeedSave) {
            // Restore state.
            graphics.restore(gState);
        }
    };
    return PdfGraphicsElement;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/text-layouter.js":
/*!***********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/text-layouter.js ***!
  \***********************************************************************************************************/
/*! exports provided: TextLayouter, TextPageLayoutResult, PdfTextLayoutResult */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextLayouter", function() { return TextLayouter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextPageLayoutResult", function() { return TextPageLayoutResult; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTextLayoutResult", function() { return PdfTextLayoutResult; });
/* harmony import */ var _element_layouter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./element-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _fonts_string_layouter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../fonts/string-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js");
/* harmony import */ var _figures_enum__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../figures/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/enum.js");
/* harmony import */ var _pdf_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../pdf-color */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js");
/* harmony import */ var _annotations_pdf_text_web_link__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../../annotations/pdf-text-web-link */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/pdf-text-web-link.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * TextLayouter.ts class for EJ2-PDF
 */






/**
 * Class that `layouts the text`.
 * @private
 */
var TextLayouter = /** @class */ (function (_super) {
    __extends(TextLayouter, _super);
    // Constructors
    /**
     * Initializes a new instance of the `TextLayouter` class.
     * @private
     */
    function TextLayouter(element) {
        return _super.call(this, element) || this;
    }
    Object.defineProperty(TextLayouter.prototype, "element", {
        /**
         * Gets the layout `element`.
         * @private
         */
        get: function () {
            return _super.prototype.getElement.call(this);
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * `Layouts` the element.
     * @private
     */
    TextLayouter.prototype.layoutInternal = function (param) {
        /* tslint:disable */
        this.format = (this.element.stringFormat !== null && typeof this.element.stringFormat !== 'undefined') ? this.element.stringFormat : null;
        var currentPage = param.page;
        var currentBounds = param.bounds;
        var text = this.element.value;
        var result = null;
        var pageResult = new TextPageLayoutResult();
        pageResult.page = currentPage;
        pageResult.remainder = text;
        for (;;) {
            pageResult = this.layoutOnPage(text, currentPage, currentBounds, param);
            result = this.getLayoutResult(pageResult);
            break;
        }
        /* tslint:enable */
        return result;
    };
    /**
     * Raises `PageLayout` event if needed.
     * @private
     */
    TextLayouter.prototype.getLayoutResult = function (pageResult) {
        var result = new PdfTextLayoutResult(pageResult.page, pageResult.bounds, pageResult.remainder, pageResult.lastLineBounds);
        return result;
    };
    /* tslint:disable */
    /**
     * `Layouts` the text on the page.
     * @private
     */
    TextLayouter.prototype.layoutOnPage = function (text, currentPage, currentBounds, param) {
        var result = new TextPageLayoutResult();
        result.remainder = text;
        result.page = currentPage;
        currentBounds = this.checkCorrectBounds(currentPage, currentBounds);
        var layouter = new _fonts_string_layouter__WEBPACK_IMPORTED_MODULE_2__["PdfStringLayouter"]();
        var stringResult = layouter.layout(text, this.element.font, this.format, currentBounds, currentPage.getClientSize().height, false, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"](0, 0));
        var textFinished = (stringResult.remainder == null);
        var doesntFit = (param.format.break === _figures_enum__WEBPACK_IMPORTED_MODULE_3__["PdfLayoutBreakType"].FitElement);
        var canDraw = !(doesntFit || stringResult.empty);
        // Draw the text.
        var graphics = currentPage.graphics;
        var brush = this.element.getBrush();
        if (this.element instanceof _annotations_pdf_text_web_link__WEBPACK_IMPORTED_MODULE_5__["PdfTextWebLink"]) {
            brush.color = new _pdf_color__WEBPACK_IMPORTED_MODULE_4__["PdfColor"](0, 0, 255);
        }
        graphics.drawStringLayoutResult(stringResult, this.element.font, this.element.pen, brush, currentBounds, this.format);
        var lineInfo = stringResult.lines[stringResult.lineCount - 1];
        result.lastLineBounds = graphics.getLineBounds(stringResult.lineCount - 1, stringResult, this.element.font, currentBounds, this.format);
        result.bounds = this.getTextPageBounds(currentPage, currentBounds, stringResult);
        result.remainder = stringResult.remainder;
        result.end = (textFinished);
        return result;
    };
    /* tslint:enable */
    /**
     * `Corrects current bounds` on the page.
     * @private
     */
    TextLayouter.prototype.checkCorrectBounds = function (currentPage, currentBounds) {
        var pageSize = currentPage.graphics.clientSize;
        currentBounds.height = (currentBounds.height > 0) ? currentBounds.height : pageSize.height - currentBounds.y;
        return currentBounds;
    };
    /**
     * Returns a `rectangle` where the text was printed on the page.
     * @private
     */
    /* tslint:disable */
    TextLayouter.prototype.getTextPageBounds = function (currentPage, currentBounds, stringResult) {
        var textSize = stringResult.actualSize;
        var x = currentBounds.x;
        var y = currentBounds.y;
        var width = (currentBounds.width > 0) ? currentBounds.width : textSize.width;
        var height = textSize.height;
        var shiftedRect = currentPage.graphics.checkCorrectLayoutRectangle(textSize, currentBounds.x, currentBounds.y, this.format);
        // if (currentBounds.width <= 0) {
        x = shiftedRect.x;
        // }
        var verticalShift = currentPage.graphics.getTextVerticalAlignShift(textSize.height, currentBounds.height, this.format);
        y += verticalShift;
        var bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](x, y, width, height);
        return bounds;
    };
    return TextLayouter;
}(_element_layouter__WEBPACK_IMPORTED_MODULE_0__["ElementLayouter"]));

var TextPageLayoutResult = /** @class */ (function () {
    function TextPageLayoutResult() {
    }
    return TextPageLayoutResult;
}());

var PdfTextLayoutResult = /** @class */ (function (_super) {
    __extends(PdfTextLayoutResult, _super);
    // Constructors
    /**
     * Initializes the new instance of `PdfTextLayoutResult` class.
     * @private
     */
    function PdfTextLayoutResult(page, bounds, remainder, lastLineBounds) {
        var _this = _super.call(this, page, bounds) || this;
        _this.remainderText = remainder;
        _this.lastLineTextBounds = lastLineBounds;
        return _this;
    }
    Object.defineProperty(PdfTextLayoutResult.prototype, "remainder", {
        // Properties
        /**
         * Gets a value that contains the `text` that was not printed.
         * @private
         */
        get: function () {
            return this.remainderText;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTextLayoutResult.prototype, "lastLineBounds", {
        /**
         * Gets a value that indicates the `bounds` of the last line that was printed on the page.
         * @private
         */
        get: function () {
            return this.lastLineTextBounds;
        },
        enumerable: true,
        configurable: true
    });
    return PdfTextLayoutResult;
}(_element_layouter__WEBPACK_IMPORTED_MODULE_0__["PdfLayoutResult"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/enum.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/enum.js ***!
  \*********************************************************************************************/
/*! exports provided: PdfLayoutType, PdfLayoutBreakType */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutType", function() { return PdfLayoutType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutBreakType", function() { return PdfLayoutBreakType; });
/**
 * public Enum for `PdfLayoutType`.
 * @private
 */
var PdfLayoutType;
(function (PdfLayoutType) {
    /**
     * Specifies the type of `Paginate`.
     * @private
     */
    PdfLayoutType[PdfLayoutType["Paginate"] = 0] = "Paginate";
    /**
     * Specifies the type of `OnePage`.
     * @private
     */
    PdfLayoutType[PdfLayoutType["OnePage"] = 1] = "OnePage";
})(PdfLayoutType || (PdfLayoutType = {}));
/**
 * public Enum for `PdfLayoutBreakType`.
 * @private
 */
var PdfLayoutBreakType;
(function (PdfLayoutBreakType) {
    /**
     * Specifies the type of `FitPage`.
     * @private
     */
    PdfLayoutBreakType[PdfLayoutBreakType["FitPage"] = 0] = "FitPage";
    /**
     * Specifies the type of `FitElement`.
     * @private
     */
    PdfLayoutBreakType[PdfLayoutBreakType["FitElement"] = 1] = "FitElement";
    /**
     * Specifies the type of `FitColumnsToPage`.
     * @private
     */
    PdfLayoutBreakType[PdfLayoutBreakType["FitColumnsToPage"] = 2] = "FitColumnsToPage";
})(PdfLayoutBreakType || (PdfLayoutBreakType = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/layout-element.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/layout-element.js ***!
  \*******************************************************************************************************/
/*! exports provided: PdfLayoutElement */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutElement", function() { return PdfLayoutElement; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _base_element_layouter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base/element-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js");


/**
 * `PdfLayoutElement` class represents the base class for all elements that can be layout on the pages.
 * @private
 */
var PdfLayoutElement = /** @class */ (function () {
    function PdfLayoutElement() {
    }
    Object.defineProperty(PdfLayoutElement.prototype, "raiseBeginPageLayout", {
        // Property
        /**
         * Gets a value indicating whether the `start page layout event` should be raised.
         * @private
         */
        get: function () {
            return (typeof this.beginPageLayout !== 'undefined');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfLayoutElement.prototype, "raiseEndPageLayout", {
        /**
         * Gets a value indicating whether the `ending page layout event` should be raised.
         * @private
         */
        get: function () {
            return (typeof this.endPageLayout !== 'undefined');
        },
        enumerable: true,
        configurable: true
    });
    //Event Handlers
    PdfLayoutElement.prototype.onBeginPageLayout = function (args) {
        if (this.beginPageLayout) {
            this.beginPageLayout(this, args);
        }
    };
    PdfLayoutElement.prototype.onEndPageLayout = function (args) {
        if (this.endPageLayout) {
            this.endPageLayout(this, args);
        }
    };
    PdfLayoutElement.prototype.drawHelper = function (arg2, arg3, arg4, arg5) {
        if (arg3 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"] && typeof arg3.width === 'undefined' && typeof arg4 === 'undefined') {
            return this.drawHelper(arg2, arg3.x, arg3.y);
        }
        else if (typeof arg3 === 'number' && typeof arg4 === 'number' && typeof arg5 === 'undefined') {
            return this.drawHelper(arg2, arg3, arg4, null);
        }
        else if (arg3 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["RectangleF"] && typeof arg3.width !== 'undefined' && typeof arg4 === 'undefined') {
            return this.drawHelper(arg2, arg3, null);
        }
        else if (arg3 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"] && typeof arg3.width === 'undefined' && arg4 instanceof _base_element_layouter__WEBPACK_IMPORTED_MODULE_1__["PdfLayoutFormat"]) {
            return this.drawHelper(arg2, arg3.x, arg3.y, arg4);
        }
        else if (typeof arg3 === 'number' && typeof arg4 === 'number' && (arg5 instanceof _base_element_layouter__WEBPACK_IMPORTED_MODULE_1__["PdfLayoutFormat"] || arg5 == null)) {
            var width = (arg2.graphics.clientSize.width - arg3);
            var layoutRectangle = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["RectangleF"](arg3, arg4, width, 0);
            return this.drawHelper(arg2, layoutRectangle, arg5);
        }
        else if (arg3 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["RectangleF"] && typeof arg3.width !== 'undefined' && typeof arg4 === 'boolean') {
            this.bEmbedFonts = arg4;
            return this.drawHelper(arg2, arg3, null);
        }
        else {
            var param = new _base_element_layouter__WEBPACK_IMPORTED_MODULE_1__["PdfLayoutParams"]();
            var temparg3 = arg3;
            var temparg4 = arg4;
            param.page = arg2;
            param.bounds = temparg3;
            param.format = (temparg4 != null) ? temparg4 : new _base_element_layouter__WEBPACK_IMPORTED_MODULE_1__["PdfLayoutFormat"]();
            var result = this.layout(param);
            return result;
        }
    };
    return PdfLayoutElement;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/pdf-template.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/pdf-template.js ***!
  \*****************************************************************************************************/
/*! exports provided: PdfTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTemplate", function() { return PdfTemplate; });
/* harmony import */ var _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../primitives/pdf-stream */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _pdf_graphics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../pdf-graphics */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-graphics.js");
/* harmony import */ var _pdf_resources__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../pdf-resources */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-resources.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/**
 * PdfTemplate.ts class for EJ2-PDF
 */








/**
 * Represents `Pdf Template` object.
 * @private
 */
var PdfTemplate = /** @class */ (function () {
    function PdfTemplate(arg1, arg2) {
        /**
         * Initialize an instance for `DictionaryProperties` class.
         * @private
         * @hidden
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_1__["DictionaryProperties"]();
        /**
         * Checks whether the transformation 'is performed'.
         * @default true
         * @private
         */
        this.writeTransformation = true;
        if (typeof arg1 === 'undefined') {
            //
        }
        else if (arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_6__["SizeF"] && typeof arg2 === 'undefined') {
            this.content = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_0__["PdfStream"]();
            var tempSize = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_6__["SizeF"](arg1.width, arg1.height);
            this.setSize(tempSize);
            this.initialize();
        }
        else {
            this.content = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_0__["PdfStream"]();
            this.setSize(new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_6__["SizeF"](arg1, arg2));
            this.initialize();
        }
    }
    Object.defineProperty(PdfTemplate.prototype, "size", {
        //Properties
        /**
         * Gets the size of the 'PdfTemplate'.
         */
        get: function () {
            return this.templateSize;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTemplate.prototype, "width", {
        /**
         * Gets the width of the 'PdfTemplate'.
         */
        get: function () {
            return this.size.width;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTemplate.prototype, "height", {
        /**
         * Gets the height of the 'PdfTemplate'.
         */
        get: function () {
            return this.size.height;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTemplate.prototype, "graphics", {
        /**
         * Gets the `graphics` of the 'PdfTemplate'.
         */
        get: function () {
            if (this.pdfGraphics == null || typeof this.pdfGraphics === 'undefined') {
                var gr = new _pdf_graphics__WEBPACK_IMPORTED_MODULE_3__["GetResourceEventHandler"](this);
                var g = new _pdf_graphics__WEBPACK_IMPORTED_MODULE_3__["PdfGraphics"](this.size, gr, this.content);
                this.pdfGraphics = g;
                // if(this.writeTransformation) {
                // Transform co-ordinates to Top/Left.
                this.pdfGraphics.initializeCoordinates();
                // }
            }
            return this.pdfGraphics;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Gets the resources and modifies the template dictionary.
     * @private
     */
    PdfTemplate.prototype.getResources = function () {
        if (this.resources == null) {
            this.resources = new _pdf_resources__WEBPACK_IMPORTED_MODULE_4__["PdfResources"]();
            this.content.items.setValue(this.dictionaryProperties.resources, this.resources);
        }
        return this.resources;
    };
    // Public methods
    /**
     * `Initialize` the type and subtype of the template.
     * @private
     */
    PdfTemplate.prototype.initialize = function () {
        this.addType();
        this.addSubType();
    };
    /**
     * `Adds type key`.
     * @private
     */
    PdfTemplate.prototype.addType = function () {
        var value = new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.xObject);
        this.content.items.setValue(this.dictionaryProperties.type, value);
    };
    /**
     * `Adds SubType key`.
     * @private
     */
    PdfTemplate.prototype.addSubType = function () {
        var value = new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.form);
        this.content.items.setValue(this.dictionaryProperties.subtype, value);
    };
    PdfTemplate.prototype.reset = function (size) {
        if (typeof size === 'undefined') {
            if (this.resources != null) {
                this.resources = null;
                this.content.remove(this.dictionaryProperties.resources);
            }
            if (this.graphics != null) {
                this.graphics.reset(this.size);
            }
        }
        else {
            this.setSize(size);
            this.reset();
        }
    };
    /**
     * `Set the size` of the 'PdfTemplate'.
     * @private
     */
    PdfTemplate.prototype.setSize = function (size) {
        var rect = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_6__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_6__["PointF"](0, 0), size);
        var val = _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_2__["PdfArray"].fromRectangle(rect);
        this.content.items.setValue(this.dictionaryProperties.bBox, val);
        this.templateSize = size;
    };
    Object.defineProperty(PdfTemplate.prototype, "element", {
        // /**
        //  * Returns the value of current graphics.
        //  * @private
        //  */
        // public GetGraphics(g : PdfGraphics) : PdfGraphics {
        //     if (this.graphics == null || typeof this.graphics === 'undefined') {
        //         this.graphics = g;
        //         this.graphics.Size = this.Size;
        //         this.graphics.StreamWriter = new PdfStreamWriter(this.content)
        //         this.graphics.Initialize();
        //         if(this.writeTransformation) {
        //             this.graphics.InitializeCoordinates();
        //         }
        //     }
        //     return this.graphics;
        // }
        // IPdfWrapper Members
        /**
         * Gets the `content stream` of 'PdfTemplate' class.
         * @private
         */
        get: function () {
            return this.content;
        },
        enumerable: true,
        configurable: true
    });
    return PdfTemplate;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/text-element.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/text-element.js ***!
  \*****************************************************************************************************/
/*! exports provided: PdfTextElement */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTextElement", function() { return PdfTextElement; });
/* harmony import */ var _figures_layout_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../figures/layout-element */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/layout-element.js");
/* harmony import */ var _brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../brushes/pdf-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js");
/* harmony import */ var _fonts_pdf_font__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../fonts/pdf-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js");
/* harmony import */ var _fonts_pdf_standard_font__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../fonts/pdf-standard-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font.js");
/* harmony import */ var _pdf_pen__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../pdf-pen */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-pen.js");
/* harmony import */ var _figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../figures/base/element-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js");
/* harmony import */ var _base_text_layouter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./base/text-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/text-layouter.js");
/* harmony import */ var _brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../brushes/pdf-solid-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-solid-brush.js");
/* harmony import */ var _pdf_color__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../pdf-color */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _fonts_string_layouter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../fonts/string-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfTextElement.ts class for EJ2-PDF
 */













/**
 * `PdfTextElement` class represents the text area with the ability to span several pages
 * and inherited from the 'PdfLayoutElement' class.
 * @private
 */
var PdfTextElement = /** @class */ (function (_super) {
    __extends(PdfTextElement, _super);
    function PdfTextElement(arg1, arg2, arg3, arg4, arg5) {
        var _this = _super.call(this) || this;
        // Fields
        /**
         * `Text` data.
         * @private
         */
        _this.content = '';
        /**
         * `Value` of text data.
         * @private
         */
        _this.elementValue = '';
        /**
         * indicate whether the drawText with PointF overload is called or not.
         * @default false
         * @private
         */
        _this.hasPointOverload = false;
        /**
         * indicate whether the PdfGridCell value is `PdfTextElement`
         * @default false
         * @private
         */
        _this.isPdfTextElement = false;
        if (typeof arg1 === 'undefined') {
            //
        }
        else if (typeof arg1 === 'string' && typeof arg2 === 'undefined') {
            _this = _super.call(this) || this;
            _this.content = arg1;
            _this.elementValue = arg1;
        }
        else if (typeof arg1 === 'string' && arg2 instanceof _fonts_pdf_font__WEBPACK_IMPORTED_MODULE_2__["PdfFont"] && typeof arg3 === 'undefined') {
            _this = _super.call(this) || this;
            _this.content = arg1;
            _this.elementValue = arg1;
            _this.pdfFont = arg2;
        }
        else if (typeof arg1 === 'string' && arg2 instanceof _fonts_pdf_font__WEBPACK_IMPORTED_MODULE_2__["PdfFont"] && arg3 instanceof _pdf_pen__WEBPACK_IMPORTED_MODULE_4__["PdfPen"] && typeof arg4 === 'undefined') {
            _this = _super.call(this) || this;
            _this.content = arg1;
            _this.elementValue = arg1;
            _this.pdfFont = arg2;
            _this.pdfPen = arg3;
        }
        else if (typeof arg1 === 'string' && arg2 instanceof _fonts_pdf_font__WEBPACK_IMPORTED_MODULE_2__["PdfFont"] && arg3 instanceof _brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_1__["PdfBrush"] && typeof arg4 === 'undefined') {
            _this = _super.call(this) || this;
            _this.content = arg1;
            _this.elementValue = arg1;
            _this.pdfFont = arg2;
            _this.pdfBrush = arg3;
        }
        else {
            _this = _super.call(this) || this;
            _this.content = arg1;
            _this.elementValue = arg1;
            _this.pdfFont = arg2;
            _this.pdfPen = arg3;
            _this.pdfBrush = arg4;
            _this.format = arg5;
        }
        return _this;
    }
    Object.defineProperty(PdfTextElement.prototype, "text", {
        // Properties
        /**
         * Gets or sets a value indicating the `text` that should be printed.
         * ```typescript
         * // create a new PDF document.
         * let document : PdfDocument = new PdfDocument();
         * // add a page to the document.
         * let page1 : PdfPage = document.pages.add();
         * // create the font
         * let font : PdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
         * // create the Text Web Link
         * let textLink : PdfTextWebLink = new PdfTextWebLink();
         * // set the hyperlink
         * textLink.url = 'http://www.google.com';
         * //
         * // set the link text
         * textLink.text = 'Google';
         * //
         * // set the font
         * textLink.font = font;
         * // draw the hyperlink in PDF page
         * textLink.draw(page1, new PointF(10, 40));
         * // save the document.
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            return this.content;
        },
        set: function (value) {
            this.elementValue = value;
            this.content = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTextElement.prototype, "value", {
        //get value
        /**
         * Gets or sets a `value` indicating the text that should be printed.
         * @private
         */
        get: function () {
            return this.elementValue;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTextElement.prototype, "pen", {
        //get pen
        /**
         * Gets or sets a `PdfPen` that determines the color, width, and style of the text
         * @private
         */
        get: function () {
            return this.pdfPen;
        },
        //Set pen value
        set: function (value) {
            this.pdfPen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTextElement.prototype, "brush", {
        //get brush
        /**
         * Gets or sets the `PdfBrush` that will be used to draw the text with color and texture.
         * @private
         */
        get: function () {
            return this.pdfBrush;
        },
        //Set brush value
        set: function (value) {
            this.pdfBrush = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTextElement.prototype, "font", {
        //get font
        /**
         * Gets or sets a `PdfFont` that defines the text format.
         * ```typescript
         * // create a new PDF document.
         * let document : PdfDocument = new PdfDocument();
         * // add a page to the document.
         * let page1 : PdfPage = document.pages.add();
         * // create the font
         * let font : PdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
         * // create the Text Web Link
         * let textLink : PdfTextWebLink = new PdfTextWebLink();
         * // set the hyperlink
         * textLink.url = 'http://www.google.com';
         * // set the link text
         * textLink.text = 'Google';
         * //
         * // set the font
         * textLink.font = font;
         * //
         * // draw the hyperlink in PDF page
         * textLink.draw(page1, new PointF(10, 40));
         * // save the document.
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            return this.pdfFont;
        },
        set: function (value) {
            this.pdfFont = value;
            if (this.pdfFont instanceof _fonts_pdf_standard_font__WEBPACK_IMPORTED_MODULE_3__["PdfStandardFont"] && this.content != null) {
                this.elementValue = _fonts_pdf_standard_font__WEBPACK_IMPORTED_MODULE_3__["PdfStandardFont"].convert(this.content);
            }
            else {
                this.elementValue = this.content;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfTextElement.prototype, "stringFormat", {
        /**
         * Gets or sets the `PdfStringFormat` that will be used to set the string format
         * @private
         */
        get: function () {
            return this.format;
        },
        set: function (value) {
            this.format = value;
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * Gets a `brush` for drawing.
     * @private
     */
    PdfTextElement.prototype.getBrush = function () {
        return (this.pdfBrush == null || typeof this.pdfBrush === 'undefined') ? new _brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_7__["PdfSolidBrush"](new _pdf_color__WEBPACK_IMPORTED_MODULE_8__["PdfColor"](0, 0, 0)) : this.pdfBrush;
    };
    // /**
    //  * `Draws` an element on the Graphics.
    //  * @private
    //  */
    // public drawInternal(graphics : PdfGraphics) : void {
    //     graphics.drawString(this.elementValue, this.pdfFont, this.pdfPen, this.getBrush(), 0, 0, this.stringFormat);
    // }
    /**
     * `Layouts` the element.
     * @private
     */
    PdfTextElement.prototype.layout = function (param) {
        var layouter = new _base_text_layouter__WEBPACK_IMPORTED_MODULE_6__["TextLayouter"](this);
        var result = layouter.layout(param);
        return result;
    };
    PdfTextElement.prototype.drawText = function (arg2, arg3, arg4, arg5) {
        if (arg3 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["PointF"] && typeof arg3.width === 'undefined' && typeof arg4 === 'undefined') {
            this.hasPointOverload = true;
            return this.drawText(arg2, arg3.x, arg3.y);
        }
        else if (typeof arg3 === 'number' && typeof arg4 === 'number' && typeof arg5 === 'undefined') {
            this.hasPointOverload = true;
            return this.drawText(arg2, arg3, arg4, null);
        }
        else if (arg3 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"] && typeof arg3.width !== 'undefined' && typeof arg4 === 'undefined') {
            return this.drawText(arg2, arg3, null);
        }
        else if (arg3 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["PointF"] && typeof arg3.width === 'undefined' && arg4 instanceof _figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__["PdfLayoutFormat"]) {
            this.hasPointOverload = true;
            return this.drawText(arg2, arg3.x, arg3.y, arg4);
        }
        else if (typeof arg3 === 'number' && typeof arg4 === 'number' && (arg5 instanceof _figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__["PdfLayoutFormat"] || arg5 == null)) {
            this.hasPointOverload = true;
            var width = (arg2.graphics.clientSize.width - arg3);
            var layoutRectangle = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](arg3, arg4, width, 0);
            return this.drawText(arg2, layoutRectangle, arg5);
        }
        else if (arg3 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"] && typeof arg3.width !== 'undefined' && typeof arg4 === 'boolean') {
            return this.drawText(arg2, arg3, null);
        }
        else {
            var layout = new _fonts_string_layouter__WEBPACK_IMPORTED_MODULE_10__["PdfStringLayouter"]();
            if (this.hasPointOverload) {
                var stringLayoutResult = layout.layout(this.value, this.font, this.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["SizeF"]((arg2.graphics.clientSize.width - arg3.x), 0), true, arg2.graphics.clientSize);
                var layoutResult = void 0;
                var param = new _figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__["PdfLayoutParams"]();
                var temparg3 = arg3;
                var temparg4 = arg4;
                param.page = arg2;
                var previousPage = arg2;
                param.bounds = temparg3;
                param.format = (temparg4 != null) ? temparg4 : new _figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__["PdfLayoutFormat"]();
                if (stringLayoutResult.lines.length > 1) {
                    this.text = stringLayoutResult.layoutLines[0].text;
                    if (param.bounds.y <= param.page.graphics.clientSize.height) {
                        var previousPosition = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["PointF"](param.bounds.x, param.bounds.y);
                        layoutResult = this.layout(param);
                        var bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](0, layoutResult.bounds.y + stringLayoutResult.lineHeight, arg2.graphics.clientSize.width, stringLayoutResult.lineHeight);
                        var isPaginate = false;
                        for (var i = 1; i < stringLayoutResult.lines.length; i++) {
                            param.page = layoutResult.page;
                            param.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["PointF"](bounds.x, bounds.y), new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["SizeF"](bounds.width, bounds.height));
                            this.text = stringLayoutResult.layoutLines[i].text;
                            if (bounds.y + stringLayoutResult.lineHeight > layoutResult.page.graphics.clientSize.height) {
                                isPaginate = true;
                                param.page = param.page.graphics.getNextPage();
                                if (previousPosition.y > (layoutResult.page.graphics.clientSize.height - layoutResult.bounds.height)) {
                                    bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](0, layoutResult.bounds.height, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight);
                                }
                                else {
                                    bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](0, 0, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight);
                                }
                                param.bounds = bounds;
                            }
                            layoutResult = this.layout(param);
                            if (i !== (stringLayoutResult.lines.length - 1)) {
                                bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](0, layoutResult.bounds.y + stringLayoutResult.lineHeight, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight);
                            }
                            else {
                                var lineWidth = this.font.measureString(this.text, this.format).width;
                                layoutResult = this.calculateResultBounds(layoutResult, lineWidth, layoutResult.page.graphics.clientSize.width, 0);
                            }
                        }
                    }
                    return layoutResult;
                }
                else {
                    var lineSize = this.font.measureString(this.text, this.format);
                    if (param.bounds.y <= param.page.graphics.clientSize.height) {
                        layoutResult = this.layout(param);
                        layoutResult = this.calculateResultBounds(layoutResult, lineSize.width, layoutResult.page.graphics.clientSize.width, 0);
                    }
                    return layoutResult;
                }
            }
            else {
                var layoutResult = layout.layout(this.value, this.font, this.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["SizeF"](arg3.width, 0), false, arg2.graphics.clientSize);
                var result = void 0;
                var param = new _figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__["PdfLayoutParams"]();
                var temparg3 = arg3;
                var temparg4 = arg4;
                param.page = arg2;
                param.bounds = temparg3;
                param.format = (temparg4 != null) ? temparg4 : new _figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__["PdfLayoutFormat"]();
                if (layoutResult.lines.length > 1) {
                    this.text = layoutResult.layoutLines[0].text;
                    if (param.bounds.y <= param.page.graphics.clientSize.height) {
                        var previousPosition = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["PointF"](param.bounds.x, param.bounds.y);
                        result = this.layout(param);
                        var bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](temparg3.x, result.bounds.y + layoutResult.lineHeight, temparg3.width, layoutResult.lineHeight);
                        var isPaginate = false;
                        for (var i = 1; i < layoutResult.lines.length; i++) {
                            param.page = result.page;
                            param.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](bounds.x, bounds.y, bounds.width, bounds.height);
                            this.text = layoutResult.layoutLines[i].text;
                            if (bounds.y + layoutResult.lineHeight > result.page.graphics.clientSize.height) {
                                isPaginate = true;
                                param.page = param.page.graphics.getNextPage();
                                if (previousPosition.y > (result.page.graphics.clientSize.height - result.bounds.height)) {
                                    bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](temparg3.x, layoutResult.lineHeight, temparg3.width, layoutResult.lineHeight);
                                }
                                else {
                                    bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](temparg3.x, 0, temparg3.width, layoutResult.lineHeight);
                                }
                                param.bounds = bounds;
                            }
                            result = this.layout(param);
                            if (i !== (layoutResult.lines.length - 1)) {
                                bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_9__["RectangleF"](temparg3.x, result.bounds.y + layoutResult.lineHeight, temparg3.width, layoutResult.lineHeight);
                            }
                            else {
                                var lineWidth = this.font.measureString(this.text, this.format).width;
                                result = this.calculateResultBounds(result, lineWidth, temparg3.width, temparg3.x);
                            }
                        }
                    }
                    return result;
                }
                else {
                    var lineSize = this.font.measureString(this.text, this.format);
                    if (param.bounds.y <= param.page.graphics.clientSize.height) {
                        result = this.layout(param);
                        result = this.calculateResultBounds(result, lineSize.width, temparg3.width, temparg3.x);
                    }
                    return result;
                }
            }
        }
    };
    PdfTextElement.prototype.calculateResultBounds = function (result, lineWidth, maximumWidth, startPosition) {
        var shift = 0;
        if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === _enum__WEBPACK_IMPORTED_MODULE_11__["PdfTextAlignment"].Center) {
            result.bounds.x = startPosition + (maximumWidth - lineWidth) / 2;
            result.bounds.width = lineWidth;
        }
        else if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === _enum__WEBPACK_IMPORTED_MODULE_11__["PdfTextAlignment"].Right) {
            result.bounds.x = startPosition + (maximumWidth - lineWidth);
            result.bounds.width = lineWidth;
        }
        else if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === _enum__WEBPACK_IMPORTED_MODULE_11__["PdfTextAlignment"].Justify) {
            result.bounds.x = startPosition;
            result.bounds.width = maximumWidth;
        }
        else {
            result.bounds.width = startPosition;
            result.bounds.width = lineWidth;
        }
        return result;
    };
    return PdfTextElement;
}(_figures_layout_element__WEBPACK_IMPORTED_MODULE_0__["PdfLayoutElement"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js ***!
  \*******************************************************************************************/
/*! exports provided: PdfFontStyle, PdfFontFamily, PdfFontType, PdfWordWrapType, PdfSubSuperScript, FontEncoding, TtfCmapFormat, TtfCmapEncoding, TtfPlatformID, TtfMicrosoftEncodingID, TtfMacintoshEncodingID, FontDescriptorFlags, TtfCompositeGlyphFlags */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfFontStyle", function() { return PdfFontStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfFontFamily", function() { return PdfFontFamily; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfFontType", function() { return PdfFontType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfWordWrapType", function() { return PdfWordWrapType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfSubSuperScript", function() { return PdfSubSuperScript; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FontEncoding", function() { return FontEncoding; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfCmapFormat", function() { return TtfCmapFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfCmapEncoding", function() { return TtfCmapEncoding; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfPlatformID", function() { return TtfPlatformID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfMicrosoftEncodingID", function() { return TtfMicrosoftEncodingID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfMacintoshEncodingID", function() { return TtfMacintoshEncodingID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FontDescriptorFlags", function() { return FontDescriptorFlags; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfCompositeGlyphFlags", function() { return TtfCompositeGlyphFlags; });
/**
 * public Enum for `PdfFontStyle`.
 * @private
 */
var PdfFontStyle;
(function (PdfFontStyle) {
    /**
     * Specifies the type of `Regular`.
     * @private
     */
    PdfFontStyle[PdfFontStyle["Regular"] = 0] = "Regular";
    /**
     * Specifies the type of `Bold`.
     * @private
     */
    PdfFontStyle[PdfFontStyle["Bold"] = 1] = "Bold";
    /**
     * Specifies the type of `Italic`.
     * @private
     */
    PdfFontStyle[PdfFontStyle["Italic"] = 2] = "Italic";
    /**
     * Specifies the type of `Underline`.
     * @private
     */
    PdfFontStyle[PdfFontStyle["Underline"] = 4] = "Underline";
    /**
     * Specifies the type of `Strikeout`.
     * @private
     */
    PdfFontStyle[PdfFontStyle["Strikeout"] = 8] = "Strikeout";
})(PdfFontStyle || (PdfFontStyle = {}));
/**
 * Specifies the font family from the standard font.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * // add a new page to the document
 * let page1 : PdfPage = document.pages.add();
 * // create new standard font
 * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
 * // create black brush
 * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
 * // draw the text
 * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));
 * // save the document
 * document.save('output.pdf');
 * ```
 */
var PdfFontFamily;
(function (PdfFontFamily) {
    /**
     * Specifies the `Helvetica` font.
     */
    PdfFontFamily[PdfFontFamily["Helvetica"] = 0] = "Helvetica";
    /**
     * Specifies the `Courier` font.
     */
    PdfFontFamily[PdfFontFamily["Courier"] = 1] = "Courier";
    /**
     * Specifies the `TimesRoman` font.
     */
    PdfFontFamily[PdfFontFamily["TimesRoman"] = 2] = "TimesRoman";
    /**
     * Specifies the `Symbol` font.
     */
    PdfFontFamily[PdfFontFamily["Symbol"] = 3] = "Symbol";
    /**
     * Specifies the `ZapfDingbats` font.
     */
    PdfFontFamily[PdfFontFamily["ZapfDingbats"] = 4] = "ZapfDingbats";
})(PdfFontFamily || (PdfFontFamily = {}));
/**
 * public Enum for `PdfFontType`.
 * @private
 */
var PdfFontType;
(function (PdfFontType) {
    /**
     * Specifies the type of `Standard`.
     * @private
     */
    PdfFontType[PdfFontType["Standard"] = 0] = "Standard";
    /**
     * Specifies the type of `TrueType`.
     * @private
     */
    PdfFontType[PdfFontType["TrueType"] = 1] = "TrueType";
    /**
     * Specifies the type of `TrueTypeEmbedded`.
     * @private
     */
    PdfFontType[PdfFontType["TrueTypeEmbedded"] = 2] = "TrueTypeEmbedded";
})(PdfFontType || (PdfFontType = {}));
/**
 * public Enum for `PdfWordWrapType`.
 * @private
 */
var PdfWordWrapType;
(function (PdfWordWrapType) {
    /**
     * Specifies the type of `None`.
     * @private
     */
    PdfWordWrapType[PdfWordWrapType["None"] = 0] = "None";
    /**
     * Specifies the type of `Word`.
     * @private
     */
    PdfWordWrapType[PdfWordWrapType["Word"] = 1] = "Word";
    /**
     * Specifies the type of `WordOnly`.
     * @private
     */
    PdfWordWrapType[PdfWordWrapType["WordOnly"] = 2] = "WordOnly";
    /**
     * Specifies the type of `Character`.
     * @private
     */
    PdfWordWrapType[PdfWordWrapType["Character"] = 3] = "Character";
})(PdfWordWrapType || (PdfWordWrapType = {}));
/**
 * public Enum for `PdfSubSuperScript`.
 * @private
 */
var PdfSubSuperScript;
(function (PdfSubSuperScript) {
    /**
     * Specifies the type of `None`.
     * @private
     */
    PdfSubSuperScript[PdfSubSuperScript["None"] = 0] = "None";
    /**
     * Specifies the type of `SuperScript`.
     * @private
     */
    PdfSubSuperScript[PdfSubSuperScript["SuperScript"] = 1] = "SuperScript";
    /**
     * Specifies the type of `SubScript`.
     * @private
     */
    PdfSubSuperScript[PdfSubSuperScript["SubScript"] = 2] = "SubScript";
})(PdfSubSuperScript || (PdfSubSuperScript = {}));
/**
 * public Enum for `FontEncoding`.
 * @private
 */
var FontEncoding;
(function (FontEncoding) {
    /**
     * Specifies the type of `Unknown`.
     * @private
     */
    FontEncoding[FontEncoding["Unknown"] = 0] = "Unknown";
    /**
     * Specifies the type of `StandardEncoding`.
     * @private
     */
    FontEncoding[FontEncoding["StandardEncoding"] = 1] = "StandardEncoding";
    /**
     * Specifies the type of `MacRomanEncoding`.
     * @private
     */
    FontEncoding[FontEncoding["MacRomanEncoding"] = 2] = "MacRomanEncoding";
    /**
     * Specifies the type of `MacExpertEncoding`.
     * @private
     */
    FontEncoding[FontEncoding["MacExpertEncoding"] = 3] = "MacExpertEncoding";
    /**
     * Specifies the type of `WinAnsiEncoding`.
     * @private
     */
    FontEncoding[FontEncoding["WinAnsiEncoding"] = 4] = "WinAnsiEncoding";
    /**
     * Specifies the type of `PdfDocEncoding`.
     * @private
     */
    FontEncoding[FontEncoding["PdfDocEncoding"] = 5] = "PdfDocEncoding";
    /**
     * Specifies the type of `IdentityH`.
     * @private
     */
    FontEncoding[FontEncoding["IdentityH"] = 6] = "IdentityH";
})(FontEncoding || (FontEncoding = {}));
/**
 * public Enum for `TtfCmapFormat`.
 * @private
 */
var TtfCmapFormat;
(function (TtfCmapFormat) {
    /**
     * This is the Apple standard character to glyph index mapping table.
     * @private
     */
    TtfCmapFormat[TtfCmapFormat["Apple"] = 0] = "Apple";
    /**
     * This is the Microsoft standard character to glyph index mapping table.
     * @private
     */
    TtfCmapFormat[TtfCmapFormat["Microsoft"] = 4] = "Microsoft";
    /**
     * Format 6: Trimmed table mapping.
     * @private
     */
    TtfCmapFormat[TtfCmapFormat["Trimmed"] = 6] = "Trimmed";
})(TtfCmapFormat || (TtfCmapFormat = {}));
/**
 * Enumerator that implements CMAP encodings.
 * @private
 */
var TtfCmapEncoding;
(function (TtfCmapEncoding) {
    /**
     * Unknown encoding.
     * @private
     */
    TtfCmapEncoding[TtfCmapEncoding["Unknown"] = 0] = "Unknown";
    /**
     * When building a symbol font for Windows.
     * @private
     */
    TtfCmapEncoding[TtfCmapEncoding["Symbol"] = 1] = "Symbol";
    /**
     * When building a Unicode font for Windows.
     * @private
     */
    TtfCmapEncoding[TtfCmapEncoding["Unicode"] = 2] = "Unicode";
    /**
     * For font that will be used on a Macintosh.
     * @private
     */
    TtfCmapEncoding[TtfCmapEncoding["Macintosh"] = 3] = "Macintosh";
})(TtfCmapEncoding || (TtfCmapEncoding = {}));
/**
 * Ttf platform ID.
 * @private
 */
var TtfPlatformID;
(function (TtfPlatformID) {
    /**
     * Apple platform.
     * @private
     */
    TtfPlatformID[TtfPlatformID["AppleUnicode"] = 0] = "AppleUnicode";
    /**
     * Macintosh platform.
     * @private
     */
    TtfPlatformID[TtfPlatformID["Macintosh"] = 1] = "Macintosh";
    /**
     * Iso platform.
     * @private
     */
    TtfPlatformID[TtfPlatformID["Iso"] = 2] = "Iso";
    /**
     * Microsoft platform.
     * @private
     */
    TtfPlatformID[TtfPlatformID["Microsoft"] = 3] = "Microsoft";
})(TtfPlatformID || (TtfPlatformID = {}));
/**
 * Microsoft encoding ID.
 * @private
 */
var TtfMicrosoftEncodingID;
(function (TtfMicrosoftEncodingID) {
    /**
     * Undefined encoding.
     * @private
     */
    TtfMicrosoftEncodingID[TtfMicrosoftEncodingID["Undefined"] = 0] = "Undefined";
    /**
     * Unicode encoding.
     * @private
     */
    TtfMicrosoftEncodingID[TtfMicrosoftEncodingID["Unicode"] = 1] = "Unicode";
})(TtfMicrosoftEncodingID || (TtfMicrosoftEncodingID = {}));
/**
 * Macintosh encoding ID.
 * @private
 */
var TtfMacintoshEncodingID;
(function (TtfMacintoshEncodingID) {
    /**
     * Roman encoding.
     * @private
     */
    TtfMacintoshEncodingID[TtfMacintoshEncodingID["Roman"] = 0] = "Roman";
    /**
     * Japanese encoding.
     * @private
     */
    TtfMacintoshEncodingID[TtfMacintoshEncodingID["Japanese"] = 1] = "Japanese";
    /**
     * Chinese encoding.
     * @private
     */
    TtfMacintoshEncodingID[TtfMacintoshEncodingID["Chinese"] = 2] = "Chinese";
})(TtfMacintoshEncodingID || (TtfMacintoshEncodingID = {}));
/**
 * Enumerator that implements font descriptor flags.
 * @private
 */
var FontDescriptorFlags;
(function (FontDescriptorFlags) {
    /**
     * All glyphs have the same width (as opposed to proportional or variable-pitch fonts, which have different widths).
     * @private
     */
    FontDescriptorFlags[FontDescriptorFlags["FixedPitch"] = 1] = "FixedPitch";
    /**
     * Glyphs have serifs, which are short strokes drawn at an angle on the top and
     * bottom of glyph stems (as opposed to sans serif fonts, which do not).
     * @private
     */
    FontDescriptorFlags[FontDescriptorFlags["Serif"] = 2] = "Serif";
    /**
     * Font contains glyphs outside the Adobe standard Latin character set. The
     * flag and the nonsymbolic flag cannot both be set or both be clear.
     * @private
     */
    FontDescriptorFlags[FontDescriptorFlags["Symbolic"] = 4] = "Symbolic";
    /**
     * Glyphs resemble cursive handwriting.
     * @private
     */
    FontDescriptorFlags[FontDescriptorFlags["Script"] = 8] = "Script";
    /**
     * Font uses the Adobe standard Latin character set or a subset of it.
     * @private
     */
    FontDescriptorFlags[FontDescriptorFlags["Nonsymbolic"] = 32] = "Nonsymbolic";
    /**
     * Glyphs have dominant vertical strokes that are slanted.
     * @private
     */
    FontDescriptorFlags[FontDescriptorFlags["Italic"] = 64] = "Italic";
    /**
     * Bold font.
     * @private
     */
    FontDescriptorFlags[FontDescriptorFlags["ForceBold"] = 262144] = "ForceBold";
})(FontDescriptorFlags || (FontDescriptorFlags = {}));
/**
 * true type font composite glyph flags.
 * @private
 */
var TtfCompositeGlyphFlags;
(function (TtfCompositeGlyphFlags) {
    /**
     * The Arg1And2AreWords.
     * @private
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["Arg1And2AreWords"] = 1] = "Arg1And2AreWords";
    /**
     * The ArgsAreXyValues.
     * @private
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["ArgsAreXyValues"] = 2] = "ArgsAreXyValues";
    /**
     * The RoundXyToGrid.
     * @private
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["RoundXyToGrid"] = 4] = "RoundXyToGrid";
    /**
     * The WeHaveScale.
     * @private
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["WeHaveScale"] = 8] = "WeHaveScale";
    /**
     * The Reserved.
     * @private
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["Reserved"] = 16] = "Reserved";
    /**
     * The MoreComponents.
     * @private
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["MoreComponents"] = 32] = "MoreComponents";
    /**
     * The WeHaveAnXyScale.
     * @private
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["WeHaveAnXyScale"] = 64] = "WeHaveAnXyScale";
    /**
     * The WeHaveTwoByTwo
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["WeHaveTwoByTwo"] = 128] = "WeHaveTwoByTwo";
    /**
     * The WeHaveInstructions.
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["WeHaveInstructions"] = 256] = "WeHaveInstructions";
    /**
     * The UseMyMetrics.
     */
    TtfCompositeGlyphFlags[TtfCompositeGlyphFlags["UseMyMetrics"] = 512] = "UseMyMetrics";
})(TtfCompositeGlyphFlags || (TtfCompositeGlyphFlags = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font-metrics.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font-metrics.js ***!
  \*******************************************************************************************************/
/*! exports provided: PdfFontMetrics, WidthTable, StandardWidthTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfFontMetrics", function() { return PdfFontMetrics; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WidthTable", function() { return WidthTable; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardWidthTable", function() { return StandardWidthTable; });
/* harmony import */ var _pdf_font__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



/**
 * `Metrics` of the font.
 * @private
 */
var PdfFontMetrics = /** @class */ (function () {
    function PdfFontMetrics() {
        /**
         * `Line gap`.
         * @private
         */
        this.lineGap = 0;
    }
    //  Public methods
    /**
     * Returns `ascent` taking into consideration font`s size.
     * @private
     */
    PdfFontMetrics.prototype.getAscent = function (format) {
        var returnValue = this.ascent * _pdf_font__WEBPACK_IMPORTED_MODULE_0__["PdfFont"].charSizeMultiplier * this.getSize(format);
        return returnValue;
    };
    /**
     * Returns `descent` taking into consideration font`s size.
     * @private
     */
    PdfFontMetrics.prototype.getDescent = function (format) {
        var returnValue = this.descent * _pdf_font__WEBPACK_IMPORTED_MODULE_0__["PdfFont"].charSizeMultiplier * this.getSize(format);
        return returnValue;
    };
    /**
     * Returns `Line gap` taking into consideration font`s size.
     * @private
     */
    PdfFontMetrics.prototype.getLineGap = function (format) {
        var returnValue = this.lineGap * _pdf_font__WEBPACK_IMPORTED_MODULE_0__["PdfFont"].charSizeMultiplier * this.getSize(format);
        return returnValue;
    };
    /**
     * Returns `height` taking into consideration font`s size.
     * @private
     */
    PdfFontMetrics.prototype.getHeight = function (format) {
        var height;
        var clearTypeFonts = ['cambria', 'candara', 'constantia', 'corbel', 'cariadings'];
        var clearTypeFontCollection = [];
        for (var index = 0; index < clearTypeFonts.length; index++) {
            var font = clearTypeFonts[index];
            clearTypeFontCollection.push(font);
        }
        if (this.getDescent(format) < 0) {
            // if ((clearTypeFontCollection.indexOf(this.name.toLowerCase()) !== -1) && !this.isUnicodeFont) {
            //     height = (this.GetAscent(format) - this.GetDescent(format) - this.GetLineGap(format));
            // } else {
            height = (this.getAscent(format) - this.getDescent(format) + this.getLineGap(format));
            // }
        }
        else {
            height = (this.getAscent(format) + this.getDescent(format) + this.getLineGap(format));
        }
        return height;
    };
    /**
     * Calculates `size` of the font depending on the subscript/superscript value.
     * @private
     */
    PdfFontMetrics.prototype.getSize = function (format) {
        var size = this.size;
        if (format != null) {
            switch (format.subSuperScript) {
                case _enum__WEBPACK_IMPORTED_MODULE_1__["PdfSubSuperScript"].SubScript:
                    size /= this.subScriptSizeFactor;
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_1__["PdfSubSuperScript"].SuperScript:
                    size /= this.superscriptSizeFactor;
                    break;
            }
        }
        return size;
    };
    /**
     * `Clones` the metrics.
     * @private
     */
    PdfFontMetrics.prototype.clone = function () {
        var metrics = this;
        metrics.widthTable = WidthTable.clone();
        return metrics;
    };
    Object.defineProperty(PdfFontMetrics.prototype, "widthTable", {
        //  Properies
        /**
         * Gets or sets the `width table`.
         * @private
         */
        get: function () {
            return this.internalWidthTable;
        },
        set: function (value) {
            this.internalWidthTable = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfFontMetrics;
}());

var WidthTable = /** @class */ (function () {
    function WidthTable() {
    }
    /**
     * Static `clones` this instance of the WidthTable class.
     * @private
     */
    WidthTable.clone = function () {
        return null;
    };
    return WidthTable;
}());

var StandardWidthTable = /** @class */ (function (_super) {
    __extends(StandardWidthTable, _super);
    // Constructors
    /**
     * Initializes a new instance of the `StandardWidthTable` class.
     * @private
     */
    function StandardWidthTable(widths) {
        var _this = _super.call(this) || this;
        if (widths == null) {
            throw new Error('ArgumentNullException:widths');
        }
        _this.widths = widths;
        return _this;
    }
    //Properties
    /**
     * Gets the `32 bit number` at the specified index.
     * @private
     */
    StandardWidthTable.prototype.items = function (index) {
        if (index < 0 || index >= this.widths.length) {
            throw new Error('ArgumentOutOfRangeException:index, The character is not supported by the font.');
        }
        var result = this.widths[index];
        return result;
    };
    Object.defineProperty(StandardWidthTable.prototype, "length", {
        /**
         * Gets the `length` of the internal array.
         * @private
         */
        get: function () {
            return this.widths.length;
        },
        enumerable: true,
        configurable: true
    });
    //Overrides
    /**
     * `Clones` this instance of the WidthTable class.
     * @private
     */
    StandardWidthTable.prototype.clone = function () {
        var swt = this;
        swt.widths = this.widths;
        return swt;
    };
    /**
     * Converts width table to a `PDF array`.
     * @private
     */
    StandardWidthTable.prototype.toArray = function () {
        var arr = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_2__["PdfArray"](this.widths);
        return arr;
    };
    return StandardWidthTable;
}(WidthTable));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js ***!
  \***********************************************************************************************/
/*! exports provided: PdfFont */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfFont", function() { return PdfFont; });
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _pdf_string_format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-string-format */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js");
/* harmony import */ var _string_layouter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./string-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js");
/* harmony import */ var _string_tokenizer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./string-tokenizer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-tokenizer.js");
/**
 * PdfFont.ts class for EJ2-PDF
 */





/**
 * Defines a particular format for text, including font face, size, and style attributes.
 * @private
 */
var PdfFont = /** @class */ (function () {
    function PdfFont(size, style) {
        /**
         * `Style` of the font.
         * @private
         */
        this.fontStyle = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Regular;
        if (typeof size === 'number' && typeof style === 'undefined') {
            this.fontSize = size;
        }
        else {
            this.fontSize = size;
            this.setStyle(style);
        }
    }
    Object.defineProperty(PdfFont.prototype, "name", {
        //Properties
        /**
         * Gets the face name of this Font.
         * @private
         */
        get: function () {
            return this.metrics.name;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfFont.prototype, "size", {
        /**
         * Gets the size of this font.
         * @private
         */
        get: function () {
            return this.fontSize;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfFont.prototype, "height", {
        /**
         * Gets the height of the font in points.
         * @private
         */
        get: function () {
            return this.metrics.getHeight(null);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfFont.prototype, "style", {
        /**
         * Gets the style information for this font.
         * @private
         */
        get: function () {
            return this.fontStyle;
        },
        set: function (value) {
            this.fontStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfFont.prototype, "bold", {
        /**
         * Gets a value indicating whether this `PdfFont` is `bold`.
         * @private
         */
        get: function () {
            return ((this.style & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Bold) > 0);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfFont.prototype, "italic", {
        /**
         * Gets a value indicating whether this `PdfFont` has the `italic` style applied.
         * @private
         */
        get: function () {
            return ((this.style & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Italic) > 0);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfFont.prototype, "strikeout", {
        /**
         * Gets a value indicating whether this `PdfFont` is `strikeout`.
         * @private
         */
        get: function () {
            return ((this.style & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Strikeout) > 0);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfFont.prototype, "underline", {
        /**
         * Gets a value indicating whether this `PdfFont` is `underline`.
         * @private
         */
        get: function () {
            return ((this.style & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Underline) > 0);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfFont.prototype, "metrics", {
        /**
         * Gets or sets the `metrics` for this font.
         * @private
         */
        get: function () {
            return this.fontMetrics;
        },
        set: function (value) {
            this.fontMetrics = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfFont.prototype, "element", {
        // /**
        //  * Gets and Sets the font `internals`.
        //  * @private
        //  */
        // public get fontInternal() : IPdfPrimitive {
        //     return this.pdfFontInternals;
        // }
        // public set fontInternal(value : IPdfPrimitive) {
        //     this.pdfFontInternals = value;
        // }
        //IPdfWrapper Members
        /**
         * Gets the `element` representing the font.
         * @private
         */
        get: function () {
            return this.pdfFontInternals;
        },
        enumerable: true,
        configurable: true
    });
    PdfFont.prototype.measureString = function (text, arg2, arg3, arg4, arg5) {
        if (typeof text === 'string' && typeof arg2 === 'undefined') {
            return this.measureString(text, null);
        }
        else if (typeof text === 'string' && (arg2 instanceof _pdf_string_format__WEBPACK_IMPORTED_MODULE_2__["PdfStringFormat"] || arg2 == null) && typeof arg3 === 'undefined' && typeof arg4 === 'undefined') {
            var temparg2 = arg2;
            var charactersFitted = 0;
            var linesFilled = 0;
            return this.measureString(text, temparg2, charactersFitted, linesFilled);
        }
        else if (typeof text === 'string' && (arg2 instanceof _pdf_string_format__WEBPACK_IMPORTED_MODULE_2__["PdfStringFormat"] || arg2 == null) && typeof arg3 === 'number' && typeof arg4 === 'number') {
            var temparg2 = arg2;
            return this.measureString(text, 0, temparg2, arg3, arg4);
            // } else if (typeof text === 'string' && typeof arg2 === 'number' && typeof arg3 === 'undefined') {
            //     return this.measureString(text, arg2, null);
            // } else if (typeof text === 'string' && typeof arg2 === 'number' && (arg3 instanceof PdfStringFormat || arg3 == null) && typeof arg4 === 'undefined' && typeof arg5 === 'undefined') {
            //     let temparg3 : PdfStringFormat = arg3 as PdfStringFormat;
            //     let charactersFitted : number = 0;
            //     let linesFilled : number = 0;
            //     return this.measureString(text, arg2, temparg3, charactersFitted, linesFilled);
        }
        else if (typeof text === 'string' && typeof arg2 === 'number' && (arg3 instanceof _pdf_string_format__WEBPACK_IMPORTED_MODULE_2__["PdfStringFormat"] || arg3 == null) && typeof arg4 === 'number' && typeof arg5 === 'number') {
            var layoutArea = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"](arg2, 0);
            var temparg3 = arg3;
            return this.measureString(text, layoutArea, temparg3, arg4, arg5);
            // } else if (typeof text === 'string' && arg2 instanceof SizeF && typeof arg3 === 'undefined') {
            //     return this.measureString(text, arg2, null);
            // } else if (typeof text === 'string' && arg2 instanceof SizeF && (arg3 instanceof PdfStringFormat || arg3 == null) && typeof arg4 === 'undefined' && typeof arg5 === 'undefined') {
            //     let temparg3 : PdfStringFormat = arg3 as PdfStringFormat;
            //     let charactersFitted : number = 0;
            //     let linesFilled : number = 0;
            //     return this.measureString(text, arg2, temparg3, charactersFitted, linesFilled);
        }
        else {
            if (text == null) {
                throw Error("ArgumentNullException(\"text\")");
            }
            var temparg2 = arg2;
            var temparg3 = arg3;
            var layouter = new _string_layouter__WEBPACK_IMPORTED_MODULE_3__["PdfStringLayouter"]();
            var result = layouter.layout(text, this, temparg3, temparg2, false, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"](0, 0));
            // arg4 = (result.Remainder == null) ? text.length : text.length - result.Remainder.length;
            arg4 = text.length;
            arg5 = (result.empty) ? 0 : result.lines.length;
            return result.actualSize;
        }
    };
    /* tslint:enable */
    //IPdfCache Members
    /**
     * `Checks` whether the object is similar to another object.
     * @private
     */
    PdfFont.prototype.equalsTo = function (obj) {
        var result = this.equalsToFont(obj);
        return result;
    };
    /**
     * Returns `internals` of the object.
     * @private
     */
    PdfFont.prototype.getInternals = function () {
        return this.pdfFontInternals;
    };
    /**
     * Sets `internals` to the object.
     * @private
     */
    PdfFont.prototype.setInternals = function (internals) {
        if (internals == null) {
            throw new Error('ArgumentNullException:internals');
        }
        this.pdfFontInternals = internals;
    };
    /**
     * Sets the `style` of the font.
     * @private
     */
    PdfFont.prototype.setStyle = function (style) {
        this.fontStyle = style;
    };
    /**
     * Applies `settings` to the default line width.
     * @private
     */
    PdfFont.prototype.applyFormatSettings = function (line, format, width) {
        // if (line == null) {
        //     throw new Error(`ArgumentNullException:line`);
        // }
        var realWidth = width;
        if (format != null && width > 0) {
            // Space among characters is not default.
            if (format.characterSpacing !== 0) {
                realWidth += (line.length - 1) * format.characterSpacing;
            }
            // Space among words is not default.
            if (format.wordSpacing !== 0) {
                var symbols = _string_tokenizer__WEBPACK_IMPORTED_MODULE_4__["StringTokenizer"].spaces;
                var whitespacesCount = _string_tokenizer__WEBPACK_IMPORTED_MODULE_4__["StringTokenizer"].getCharsCount(line, symbols);
                realWidth += whitespacesCount * format.wordSpacing;
            }
        }
        return realWidth;
    };
    //Constants
    /**
     * `Multiplier` of the symbol width.
     * @default 0.001
     * @private
     */
    PdfFont.charSizeMultiplier = 0.001;
    /**
     * `Synchronization` object.
     * @private
     */
    PdfFont.syncObject = new Object();
    return PdfFont;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js":
/*!************************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js ***!
  \************************************************************************************************************************/
/*! exports provided: PdfStandardFontMetricsFactory */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfStandardFontMetricsFactory", function() { return PdfStandardFontMetricsFactory; });
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pdf-font-metrics */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font-metrics.js");
/**
 * PdfStandardFontMetricsFactory.ts class for EJ2-PDF
 */


/**
 * @private
 * `Factory of the standard fonts metrics`.
 */
var PdfStandardFontMetricsFactory = /** @class */ (function () {
    function PdfStandardFontMetricsFactory() {
    }
    /**
     * Returns `metrics` of the font.
     * @private
     */
    PdfStandardFontMetricsFactory.getMetrics = function (fontFamily, fontStyle, size) {
        var metrics = null;
        switch (fontFamily) {
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].Helvetica:
                metrics = this.getHelveticaMetrics(fontFamily, fontStyle, size);
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].Courier:
                metrics = this.getCourierMetrics(fontFamily, fontStyle, size);
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].TimesRoman:
                metrics = this.getTimesMetrics(fontFamily, fontStyle, size);
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].Symbol:
                metrics = this.getSymbolMetrics(fontFamily, fontStyle, size);
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].ZapfDingbats:
                metrics = this.getZapfDingbatsMetrics(fontFamily, fontStyle, size);
                break;
            default:
                metrics = this.getHelveticaMetrics(_enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].Helvetica, fontStyle, size);
                break;
        }
        metrics.name = fontFamily.toString();
        metrics.subScriptSizeFactor = this.subSuperScriptFactor;
        metrics.superscriptSizeFactor = this.subSuperScriptFactor;
        return metrics;
    };
    // Implementation
    /**
     * Creates `Helvetica font metrics`.
     * @private
     */
    PdfStandardFontMetricsFactory.getHelveticaMetrics = function (fontFamily, fontStyle, size) {
        var metrics = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["PdfFontMetrics"]();
        if ((fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Bold) > 0 && (fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Italic) > 0) {
            metrics.ascent = this.helveticaBoldItalicAscent;
            metrics.descent = this.helveticaBoldItalicDescent;
            metrics.postScriptName = this.helveticaBoldItalicName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.arialBoldWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        else if ((fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Bold) > 0) {
            metrics.ascent = this.helveticaBoldAscent;
            metrics.descent = this.helveticaBoldDescent;
            metrics.postScriptName = this.helveticaBoldName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.arialBoldWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        else if ((fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Italic) > 0) {
            metrics.ascent = this.helveticaItalicAscent;
            metrics.descent = this.helveticaItalicDescent;
            metrics.postScriptName = this.helveticaItalicName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.arialWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        else {
            metrics.ascent = this.helveticaAscent;
            metrics.descent = this.helveticaDescent;
            metrics.postScriptName = this.helveticaName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.arialWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        return metrics;
    };
    /**
     * Creates `Courier font metrics`.
     * @private
     */
    PdfStandardFontMetricsFactory.getCourierMetrics = function (fontFamily, fontStyle, size) {
        var metrics = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["PdfFontMetrics"]();
        if ((fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Bold) > 0 && (fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Italic) > 0) {
            metrics.ascent = this.courierBoldItalicAscent;
            metrics.descent = this.courierBoldItalicDescent;
            metrics.postScriptName = this.courierBoldItalicName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.fixedWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        else if ((fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Bold) > 0) {
            metrics.ascent = this.courierBoldAscent;
            metrics.descent = this.courierBoldDescent;
            metrics.postScriptName = this.courierBoldName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.fixedWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        else if ((fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Italic) > 0) {
            metrics.ascent = this.courierItalicAscent;
            metrics.descent = this.courierItalicDescent;
            metrics.postScriptName = this.courierItalicName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.fixedWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        else {
            metrics.ascent = this.courierAscent;
            metrics.descent = this.courierDescent;
            metrics.postScriptName = this.courierName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.fixedWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        return metrics;
    };
    /**
     * Creates `Times font metrics`.
     * @private
     */
    PdfStandardFontMetricsFactory.getTimesMetrics = function (fontFamily, fontStyle, size) {
        var metrics = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["PdfFontMetrics"]();
        if ((fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Bold) > 0 && (fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Italic) > 0) {
            metrics.ascent = this.timesBoldItalicAscent;
            metrics.descent = this.timesBoldItalicDescent;
            metrics.postScriptName = this.timesBoldItalicName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.timesRomanBoldItalicWidths);
            metrics.height = metrics.ascent - metrics.descent;
        }
        else if ((fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Bold) > 0) {
            metrics.ascent = this.timesBoldAscent;
            metrics.descent = this.timesBoldDescent;
            metrics.postScriptName = this.timesBoldName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.timesRomanBoldWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        else if ((fontStyle & _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Italic) > 0) {
            metrics.ascent = this.timesItalicAscent;
            metrics.descent = this.timesItalicDescent;
            metrics.postScriptName = this.timesItalicName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.timesRomanItalicWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        else {
            metrics.ascent = this.timesAscent;
            metrics.descent = this.timesDescent;
            metrics.postScriptName = this.timesName;
            metrics.size = size;
            metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.timesRomanWidth);
            metrics.height = metrics.ascent - metrics.descent;
        }
        return metrics;
    };
    /**
     * Creates `Symbol font metrics`.
     * @private
     */
    PdfStandardFontMetricsFactory.getSymbolMetrics = function (fontFamily, fontStyle, size) {
        var metrics = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["PdfFontMetrics"]();
        metrics.ascent = this.symbolAscent;
        metrics.descent = this.symbolDescent;
        metrics.postScriptName = this.symbolName;
        metrics.size = size;
        metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.symbolWidth);
        metrics.height = metrics.ascent - metrics.descent;
        return metrics;
    };
    /**
     * Creates `ZapfDingbats font metrics`.
     * @private
     */
    PdfStandardFontMetricsFactory.getZapfDingbatsMetrics = function (fontFamily, fontStyle, size) {
        var metrics = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["PdfFontMetrics"]();
        metrics.ascent = this.zapfDingbatsAscent;
        metrics.descent = this.zapfDingbatsDescent;
        metrics.postScriptName = this.zapfDingbatsName;
        metrics.size = size;
        metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_1__["StandardWidthTable"](this.zapfDingbatsWidth);
        metrics.height = metrics.ascent - metrics.descent;
        return metrics;
    };
    /**
     * `Multiplier` os subscript superscript.
     * @private
     */
    PdfStandardFontMetricsFactory.subSuperScriptFactor = 1.52;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaAscent = 931;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaDescent = -225;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaName = 'Helvetica';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaBoldAscent = 962;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaBoldDescent = -228;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaBoldName = 'Helvetica-Bold';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaItalicAscent = 931;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaItalicDescent = -225;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaItalicName = 'Helvetica-Oblique';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaBoldItalicAscent = 962;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaBoldItalicDescent = -228;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.helveticaBoldItalicName = 'Helvetica-BoldOblique';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.courierAscent = 805;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.courierDescent = -250;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.courierName = 'Courier';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.courierBoldAscent = 801;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.courierBoldDescent = -250;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.courierBoldName = 'Courier-Bold';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.courierItalicAscent = 805;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.courierItalicDescent = -250;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.courierItalicName = 'Courier-Oblique';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.courierBoldItalicAscent = 801;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.courierBoldItalicDescent = -250;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.courierBoldItalicName = 'Courier-BoldOblique';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.timesAscent = 898;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.timesDescent = -218;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.timesName = 'Times-Roman';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.timesBoldAscent = 935;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.timesBoldDescent = -218;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.timesBoldName = 'Times-Bold';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.timesItalicAscent = 883;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.timesItalicDescent = -217;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.timesItalicName = 'Times-Italic';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.timesBoldItalicAscent = 921;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.timesBoldItalicDescent = -218;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.timesBoldItalicName = 'Times-BoldItalic';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.symbolAscent = 1010;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.symbolDescent = -293;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.symbolName = 'Symbol';
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.zapfDingbatsAscent = 820;
    /**
     * `Ascender` value for the font.
     * @private
     */
    PdfStandardFontMetricsFactory.zapfDingbatsDescent = -143;
    /**
     * `Font type`.
     * @private
     */
    PdfStandardFontMetricsFactory.zapfDingbatsName = 'ZapfDingbats';
    /**
     * `Arial` widths table.
     * @private
     */
    PdfStandardFontMetricsFactory.arialWidth = [
        278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333,
        278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584,
        584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833,
        722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278,
        469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833,
        556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334,
        584, 0, 556, 0, 222, 556, 333, 1000, 556, 556, 333, 1000, 667, 333, 1000, 0,
        611, 0, 0, 222, 222, 333, 333, 350, 556, 1000, 333, 1000, 500, 333, 944, 0,
        500, 667, 0, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 0,
        737, 333, 400, 584, 333, 333, 333, 556, 537, 278, 333, 333, 365, 556, 834, 834,
        834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278,
        278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667,
        667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278,
        278, 278, 556, 556, 556, 556, 556, 556, 556, 584, 611, 556, 556, 556, 556, 500,
        556, 500
    ];
    /**
     * `Arial bold` widths table.
     * @private
     */
    PdfStandardFontMetricsFactory.arialBoldWidth = [
        278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333,
        278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584,
        584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833,
        722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333,
        584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889,
        611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389,
        584, 0, 556, 0, 278, 556, 500, 1000, 556, 556, 333, 1000, 667, 333, 1000, 0,
        611, 0, 0, 278, 278, 500, 500, 350, 556, 1000, 333, 1000, 556, 333, 944, 0,
        500, 667, 0, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 0,
        737, 333, 400, 584, 333, 333, 333, 611, 556, 278, 333, 333, 365, 556, 834, 834,
        834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278,
        278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667,
        667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278,
        278, 278, 611, 611, 611, 611, 611, 611, 611, 584, 611, 611, 611, 611, 611, 556,
        611, 556
    ];
    /**
     * `Fixed` widths table.
     * @private
     */
    PdfStandardFontMetricsFactory.fixedWidth = [
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
        600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600
    ];
    /**
     * `Times` widths table.
     * @private
     */
    PdfStandardFontMetricsFactory.timesRomanWidth = [
        250, 333, 408, 500, 500, 833, 778, 180, 333, 333, 500, 564, 250, 333,
        250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 564, 564,
        564, 444, 921, 722, 667, 667, 722, 611, 556, 722, 722, 333, 389, 722, 611, 889,
        722, 722, 556, 722, 667, 556, 611, 722, 722, 944, 722, 722, 611, 333, 278, 333,
        469, 500, 333, 444, 500, 444, 500, 444, 333, 500, 500, 278, 278, 500, 278, 778,
        500, 500, 500, 500, 333, 389, 278, 500, 500, 722, 500, 500, 444, 480, 200, 480,
        541, 0, 500, 0, 333, 500, 444, 1000, 500, 500, 333, 1000, 556, 333, 889, 0,
        611, 0, 0, 333, 333, 444, 444, 350, 500, 1000, 333, 980, 389, 333, 722, 0,
        444, 722, 0, 333, 500, 500, 500, 500, 200, 500, 333, 760, 276, 500, 564, 0,
        760, 333, 400, 564, 300, 300, 333, 500, 453, 250, 333, 300, 310, 500, 750, 750,
        750, 444, 722, 722, 722, 722, 722, 722, 889, 667, 611, 611, 611, 611, 333, 333,
        333, 333, 722, 722, 722, 722, 722, 722, 722, 564, 722, 722, 722, 722, 722, 722,
        556, 500, 444, 444, 444, 444, 444, 444, 667, 444, 444, 444, 444, 444, 278, 278,
        278, 278, 500, 500, 500, 500, 500, 500, 500, 564, 500, 500, 500, 500, 500, 500,
        500, 500
    ];
    /**
     * `Times bold` widths table.
     * @private
     */
    PdfStandardFontMetricsFactory.timesRomanBoldWidth = [
        250, 333, 555, 500, 500, 1000, 833, 278, 333, 333, 500, 570, 250, 333,
        250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570,
        570, 500, 930, 722, 667, 722, 722, 667, 611, 778, 778, 389, 500, 778, 667, 944,
        722, 778, 611, 778, 722, 556, 667, 722, 722, 1000, 722, 722, 667, 333, 278, 333,
        581, 500, 333, 500, 556, 444, 556, 444, 333, 500, 556, 278, 333, 556, 278, 833,
        556, 500, 556, 556, 444, 389, 333, 556, 500, 722, 500, 500, 444, 394, 220, 394,
        520, 0, 500, 0, 333, 500, 500, 1000, 500, 500, 333, 1000, 556, 333, 1000, 0,
        667, 0, 0, 333, 333, 500, 500, 350, 500, 1000, 333, 1000, 389, 333, 722, 0,
        444, 722, 0, 333, 500, 500, 500, 500, 220, 500, 333, 747, 300, 500, 570, 0,
        747, 333, 400, 570, 300, 300, 333, 556, 540, 250, 333, 300, 330, 500, 750, 750,
        750, 500, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 389, 389,
        389, 389, 722, 722, 778, 778, 778, 778, 778, 570, 778, 722, 722, 722, 722, 722,
        611, 556, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278,
        278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 500,
        556, 500
    ];
    /**
     * `Times italic` widths table.
     * @private
     */
    PdfStandardFontMetricsFactory.timesRomanItalicWidth = [
        250, 333, 420, 500, 500, 833, 778, 214, 333, 333, 500, 675, 250, 333,
        250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 675, 675,
        675, 500, 920, 611, 611, 667, 722, 611, 611, 722, 722, 333, 444, 667, 556, 833,
        667, 722, 611, 722, 611, 500, 556, 722, 611, 833, 611, 556, 556, 389, 278, 389,
        422, 500, 333, 500, 500, 444, 500, 444, 278, 500, 500, 278, 278, 444, 278, 722,
        500, 500, 500, 500, 389, 389, 278, 500, 444, 667, 444, 444, 389, 400, 275, 400,
        541, 0, 500, 0, 333, 500, 556, 889, 500, 500, 333, 1000, 500, 333, 944, 0,
        556, 0, 0, 333, 333, 556, 556, 350, 500, 889, 333, 980, 389, 333, 667, 0,
        389, 556, 0, 389, 500, 500, 500, 500, 275, 500, 333, 760, 276, 500, 675, 0,
        760, 333, 400, 675, 300, 300, 333, 500, 523, 250, 333, 300, 310, 500, 750, 750,
        750, 500, 611, 611, 611, 611, 611, 611, 889, 667, 611, 611, 611, 611, 333, 333,
        333, 333, 722, 667, 722, 722, 722, 722, 722, 675, 722, 722, 722, 722, 722, 556,
        611, 500, 500, 500, 500, 500, 500, 500, 667, 444, 444, 444, 444, 444, 278, 278,
        278, 278, 500, 500, 500, 500, 500, 500, 500, 675, 500, 500, 500, 500, 500, 444,
        500, 444
    ];
    /**
     * `Times bold italic` widths table.
     * @private
     */
    PdfStandardFontMetricsFactory.timesRomanBoldItalicWidths = [
        250, 389, 555, 500, 500, 833, 778, 278, 333, 333, 500, 570, 250, 333,
        250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570,
        570, 500, 832, 667, 667, 667, 722, 667, 667, 722, 778, 389, 500, 667, 611, 889,
        722, 722, 611, 722, 667, 556, 611, 722, 667, 889, 667, 611, 611, 333, 278, 333,
        570, 500, 333, 500, 500, 444, 500, 444, 333, 500, 556, 278, 278, 500, 278, 778,
        556, 500, 500, 500, 389, 389, 278, 556, 444, 667, 500, 444, 389, 348, 220, 348,
        570, 0, 500, 0, 333, 500, 500, 1000, 500, 500, 333, 1000, 556, 333, 944, 0,
        611, 0, 0, 333, 333, 500, 500, 350, 500, 1000, 333, 1000, 389, 333, 722, 0,
        389, 611, 0, 389, 500, 500, 500, 500, 220, 500, 333, 747, 266, 500, 606, 0,
        747, 333, 400, 570, 300, 300, 333, 576, 500, 250, 333, 300, 300, 500, 750, 750,
        750, 500, 667, 667, 667, 667, 667, 667, 944, 667, 667, 667, 667, 667, 389, 389,
        389, 389, 722, 722, 722, 722, 722, 722, 722, 570, 722, 722, 722, 722, 722, 611,
        611, 500, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278,
        278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 444,
        500, 444
    ];
    /**
     * `Symbol` widths table.
     * @private
     */
    PdfStandardFontMetricsFactory.symbolWidth = [
        250, 333, 713, 500, 549, 833, 778, 439, 333, 333, 500, 549, 250, 549,
        250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278,
        549, 549, 549, 444, 549, 722, 667, 722, 612, 611, 763, 603, 722, 333,
        631, 722, 686, 889, 722, 722, 768, 741, 556, 592, 611, 690, 439, 768,
        645, 795, 611, 333, 863, 333, 658, 500, 500, 631, 549, 549, 494, 439,
        521, 411, 603, 329, 603, 549, 549, 576, 521, 549, 549, 521, 549, 603,
        439, 576, 713, 686, 493, 686, 494, 480, 200, 480, 549, 750, 620, 247,
        549, 167, 713, 500, 753, 753, 753, 753, 1042, 987, 603, 987, 603, 400,
        549, 411, 549, 549, 713, 494, 460, 549, 549, 549, 549, 1000, 603, 1000,
        658, 823, 686, 795, 987, 768, 768, 823, 768, 768, 713, 713, 713, 713,
        713, 713, 713, 768, 713, 790, 790, 890, 823, 549, 250, 713, 603, 603,
        1042, 987, 603, 987, 603, 494, 329, 790, 790, 786, 713, 384, 384, 384,
        384, 384, 384, 494, 494, 494, 494, 329, 274, 686, 686, 686, 384, 384,
        384, 384, 384, 384, 494, 494, 494, -1
    ];
    /**
     * `Zip dingbats` widths table.
     * @private
     */
    PdfStandardFontMetricsFactory.zapfDingbatsWidth = [
        278, 974, 961, 974, 980, 719, 789, 790, 791, 690, 960, 939, 549, 855,
        911, 933, 911, 945, 974, 755, 846, 762, 761, 571, 677, 763, 760, 759,
        754, 494, 552, 537, 577, 692, 786, 788, 788, 790, 793, 794, 816, 823,
        789, 841, 823, 833, 816, 831, 923, 744, 723, 749, 790, 792, 695, 776,
        768, 792, 759, 707, 708, 682, 701, 826, 815, 789, 789, 707, 687, 696,
        689, 786, 787, 713, 791, 785, 791, 873, 761, 762, 762, 759, 759, 892,
        892, 788, 784, 438, 138, 277, 415, 392, 392, 668, 668, 390, 390, 317,
        317, 276, 276, 509, 509, 410, 410, 234, 234, 334, 334, 732, 544, 544,
        910, 667, 760, 760, 776, 595, 694, 626, 788, 788, 788, 788, 788, 788,
        788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
        788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
        788, 788, 788, 788, 788, 788, 894, 838, 1016, 458, 748, 924, 748, 918,
        927, 928, 928, 834, 873, 828, 924, 924, 917, 930, 931, 463, 883, 836,
        836, 867, 867, 696, 696, 874, 874, 760, 946, 771, 865, 771, 888, 967,
        888, 831, 873, 927, 970, 918
    ];
    return PdfStandardFontMetricsFactory;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font.js":
/*!********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font.js ***!
  \********************************************************************************************************/
/*! exports provided: PdfStandardFont */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfStandardFont", function() { return PdfStandardFont; });
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _pdf_font__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pdf-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js");
/* harmony import */ var _document_pdf_document__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../document/pdf-document */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document.js");
/* harmony import */ var _pdf_standard_font_metrics_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pdf-standard-font-metrics-factory */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







/**
 * Represents one of the 14 standard fonts.
 * It's used to create a standard PDF font to draw the text in to the PDF.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * // add a new page to the document
 * let page1 : PdfPage = document.pages.add();
 * //
 * // create new standard font
 * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
 * //
 * // create black brush
 * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
 * // draw the text
 * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));
 * // save the document
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfStandardFont = /** @class */ (function (_super) {
    __extends(PdfStandardFont, _super);
    function PdfStandardFont(fontFamilyPrototype, size, style) {
        var _this = _super.call(this, size, style) || this;
        /**
         * Gets `ascent` of the font.
         * @private
         */
        _this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_5__["DictionaryProperties"]();
        /**
         * Gets `encodings` for internal class use.
         * @hidden
         * @private
         */
        _this.encodings = ['Unknown', 'StandardEncoding', 'MacRomanEncoding', 'MacExpertEncoding',
            'WinAnsiEncoding', 'PDFDocEncoding', 'IdentityH'];
        if ((typeof fontFamilyPrototype === 'number') && (typeof style === 'undefined')) {
            _this.constructor(fontFamilyPrototype, size, _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Regular);
        }
        else if ((typeof fontFamilyPrototype === 'number') && (typeof style !== 'undefined')) {
            _this = _super.call(this, size, style) || this;
            _this.pdfFontFamily = fontFamilyPrototype;
            _this.checkStyle();
            _this.initializeInternals();
        }
        else if ((fontFamilyPrototype instanceof PdfStandardFont) && (typeof style === 'undefined')) {
            _this.constructor(fontFamilyPrototype.fontFamily, size, fontFamilyPrototype.style);
        }
        else if ((fontFamilyPrototype instanceof PdfStandardFont) && (typeof style !== 'undefined')) {
            _this.constructor(fontFamilyPrototype.fontFamily, size, style);
        }
        return _this;
    }
    Object.defineProperty(PdfStandardFont.prototype, "fontFamily", {
        //Properties
        /**
         * Gets the `FontFamily`.
         * @private
         */
        get: function () {
            return this.pdfFontFamily;
        },
        enumerable: true,
        configurable: true
    });
    //methods
    /**
     * Checks font `style` of the font.
     * @private
     */
    PdfStandardFont.prototype.checkStyle = function () {
        if (this.fontFamily === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].Symbol || this.fontFamily === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].ZapfDingbats) {
            var style = this.style;
            style &= ~(_enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Bold | _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Italic);
            this.setStyle(style);
        }
    };
    /**
     * Returns `width` of the line.
     * @public
     */
    PdfStandardFont.prototype.getLineWidth = function (line, format) {
        if (line == null) {
            throw new Error('ArgumentNullException:line');
        }
        var width = 0;
        var name = this.name;
        line = PdfStandardFont.convert(line);
        for (var i = 0, len = line.length; i < len; i++) {
            var ch = line[i];
            var charWidth = this.getCharWidthInternal(ch, format);
            width += charWidth;
        }
        var size = this.metrics.getSize(format);
        width *= (_pdf_font__WEBPACK_IMPORTED_MODULE_1__["PdfFont"].charSizeMultiplier * size);
        width = this.applyFormatSettings(line, format, width);
        return width;
    };
    /**
     * Checks whether fonts are `equals`.
     * @private
     */
    PdfStandardFont.prototype.equalsToFont = function (font) {
        var equal = false;
        var stFont = font;
        if (stFont != null) {
            var fontFamilyEqual = (this.fontFamily === stFont.fontFamily);
            var lineReducer = (~(_enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Underline | _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontStyle"].Strikeout));
            var styleEqual = (this.style & lineReducer) === (stFont.style & lineReducer);
            equal = (fontFamilyEqual && styleEqual);
        }
        return equal;
    };
    /**
     * `Initializes` font internals..
     * @private
     */
    PdfStandardFont.prototype.initializeInternals = function () {
        var equalFont = null;
        // if (PdfDocument.EnableCache) {
        equalFont = _document_pdf_document__WEBPACK_IMPORTED_MODULE_2__["PdfDocument"].cache.search(this);
        // }
        var internals = null;
        // if (equalFont == null) {
        // Create font metrics.
        var metrics = _pdf_standard_font_metrics_factory__WEBPACK_IMPORTED_MODULE_3__["PdfStandardFontMetricsFactory"].getMetrics(this.pdfFontFamily, this.style, this.size);
        this.metrics = metrics;
        internals = this.createInternals();
        this.setInternals(internals);
    };
    /**
     * `Creates` font`s dictionary.
     * @private
     */
    PdfStandardFont.prototype.createInternals = function () {
        var dictionary = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_4__["PdfDictionary"]();
        dictionary.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_6__["PdfName"](this.dictionaryProperties.font));
        dictionary.items.setValue(this.dictionaryProperties.subtype, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_6__["PdfName"](this.dictionaryProperties.type1));
        dictionary.items.setValue(this.dictionaryProperties.baseFont, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_6__["PdfName"](this.metrics.postScriptName));
        if (this.fontFamily !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].Symbol && this.fontFamily !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFontFamily"].ZapfDingbats) {
            var encoding = this.encodings[_enum__WEBPACK_IMPORTED_MODULE_0__["FontEncoding"].WinAnsiEncoding];
            dictionary.items.setValue(this.dictionaryProperties.encoding, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_6__["PdfName"](encoding));
        }
        return dictionary;
    };
    /**
     * Returns `width` of the char. This methods doesn`t takes into consideration font`s size.
     * @private
     */
    PdfStandardFont.prototype.getCharWidthInternal = function (charCode, format) {
        var width = 0;
        var code = 0;
        code = charCode.charCodeAt(0);
        if (this.name === '0' || this.name === '1' || this.name === '2' ||
            this.name === '3' || this.name === '4') {
            code = code - PdfStandardFont.charOffset;
        }
        code = (code >= 0 && code !== 128) ? code : 0;
        var metrics = this.metrics;
        var widthTable = metrics.widthTable;
        width = widthTable.items(code);
        return width;
    };
    /**
     * `Converts` the specified text.
     * @private
     */
    PdfStandardFont.convert = function (text) {
        return text;
    };
    //Constants
    /**
     * First character `position`.
     * @private
     */
    PdfStandardFont.charOffset = 32;
    return PdfStandardFont;
}(_pdf_font__WEBPACK_IMPORTED_MODULE_1__["PdfFont"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js":
/*!********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js ***!
  \********************************************************************************************************/
/*! exports provided: PdfStringFormat */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfStringFormat", function() { return PdfStringFormat; });
/* harmony import */ var _graphics_enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../graphics/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../graphics/fonts/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/**
 * PdfStringFormat.ts class for EJ2-PDF
 */


/**
 * `PdfStringFormat` class represents the text layout information on PDF.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * // add a pages to the document
 * let page1 : PdfPage = document.pages.add();
 * // set font
 * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
 * // set brush
 * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
 * //
 * // set the format for string
 * let stringFormat : PdfStringFormat = new PdfStringFormat();
 * // set the text alignment
 * stringFormat.alignment = PdfTextAlignment.Center;
 * // set the vertical alignment
 * stringFormat.lineAlignment = PdfVerticalAlignment.Middle;
 * //
 * // draw the text
 * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);
 * // save the document
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfStringFormat = /** @class */ (function () {
    function PdfStringFormat(arg1, arg2) {
        /**
         * The `scaling factor` of the text being drawn.
         * @private
         */
        this.scalingFactor = 100.0;
        /**
         * Indicates text `wrapping` type.
         * @private
         */
        this.wordWrapType = _graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_1__["PdfWordWrapType"].Word;
        if (typeof arg1 === 'undefined') {
            this.internalLineLimit = true;
            this.wordWrapType = _graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_1__["PdfWordWrapType"].Word;
        }
        else if (typeof arg1 === 'string') {
            this.constructor();
        }
        else {
            if (typeof arg2 === 'undefined') {
                this.constructor();
                this.textAlignment = arg1;
            }
            else {
                this.constructor(arg1);
                this.verticalAlignment = arg2;
            }
        }
    }
    Object.defineProperty(PdfStringFormat.prototype, "alignment", {
        //Properties
        /**
         * Gets or sets the `horizontal` text alignment
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * // add a pages to the document
         * let page1 : PdfPage = document.pages.add();
         * // set font
         * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
         * // set brush
         * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
         * //
         * // set the format for string
         * let stringFormat : PdfStringFormat = new PdfStringFormat();
         * // set the text alignment
         * stringFormat.alignment = PdfTextAlignment.Center;
         * //
         * // draw the text
         * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);
         * // save the document
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            return this.textAlignment;
        },
        set: function (value) {
            this.textAlignment = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "textDirection", {
        get: function () {
            return this.direction;
        },
        set: function (value) {
            this.direction = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "lineAlignment", {
        /**
         * Gets or sets the `vertical` text alignment.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * // add a pages to the document
         * let page1 : PdfPage = document.pages.add();
         * // set font
         * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
         * // set brush
         * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
         * //
         * // set the format for string
         * let stringFormat : PdfStringFormat = new PdfStringFormat();
         * // set the vertical alignment
         * stringFormat.lineAlignment = PdfVerticalAlignment.Middle;
         * //
         * // draw the text
         * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);
         * // save the document
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            if (typeof this.verticalAlignment === 'undefined' || this.verticalAlignment == null) {
                return _graphics_enum__WEBPACK_IMPORTED_MODULE_0__["PdfVerticalAlignment"].Top;
            }
            else {
                return this.verticalAlignment;
            }
        },
        set: function (value) {
            this.verticalAlignment = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "rightToLeft", {
        /**
         * Gets or sets the value that indicates text `direction` mode.
         * @private
         */
        get: function () {
            if (typeof this.isRightToLeft === 'undefined' || this.isRightToLeft == null) {
                return false;
            }
            else {
                return this.isRightToLeft;
            }
        },
        set: function (value) {
            this.isRightToLeft = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "characterSpacing", {
        /**
         * Gets or sets value that indicates a `size` among the characters in the text.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * // add a pages to the document
         * let page1 : PdfPage = document.pages.add();
         * // set font
         * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
         * // set brush
         * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
         * //
         * // set the format for string
         * let stringFormat : PdfStringFormat = new PdfStringFormat();
         * // set character spacing
         * stringFormat.characterSpacing = 10;
         * //
         * // draw the text
         * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);
         * // save the document
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            if (typeof this.internalCharacterSpacing === 'undefined' || this.internalCharacterSpacing == null) {
                return 0;
            }
            else {
                return this.internalCharacterSpacing;
            }
        },
        set: function (value) {
            this.internalCharacterSpacing = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "wordSpacing", {
        /**
         * Gets or sets value that indicates a `size` among the words in the text.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * // add a pages to the document
         * let page1 : PdfPage = document.pages.add();
         * // set font
         * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
         * // set brush
         * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
         * //
         * // set the format for string
         * let stringFormat : PdfStringFormat = new PdfStringFormat();
         * // set word spacing
         * stringFormat.wordSpacing = 10;
         * //
         * // draw the text
         * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);
         * // save the document
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            if (typeof this.internalWordSpacing === 'undefined' || this.internalWordSpacing == null) {
                return 0;
            }
            else {
                return this.internalWordSpacing;
            }
        },
        set: function (value) {
            this.internalWordSpacing = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "lineSpacing", {
        /**
         * Gets or sets value that indicates the `vertical distance` between the baselines of adjacent lines of text.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * // add a pages to the document
         * let page1 : PdfPage = document.pages.add();
         * // set font
         * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
         * // set brush
         * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
         * // set string
         * let text : string = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
         * incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitati';
         * // set rectangle bounds
         * let rectangle : RectangleF = new RectangleF({x : 0, y : 0}, {width : 300, height : 100})
         * //
         * // set the format for string
         * let stringFormat : PdfStringFormat = new PdfStringFormat();
         * // set line spacing
         * stringFormat.lineSpacing = 10;
         * //
         * // draw the text
         * page1.graphics.drawString(text, font, blackBrush, rectangle, stringFormat);
         * // save the document
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            if (typeof this.leading === 'undefined' || this.leading == null) {
                return 0;
            }
            else {
                return this.leading;
            }
        },
        set: function (value) {
            this.leading = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "clipPath", {
        /**
         * Gets or sets a value indicating whether the text is `clipped` or not.
         * @private
         */
        get: function () {
            if (typeof this.clip === 'undefined' || this.clip == null) {
                return false;
            }
            else {
                return this.clip;
            }
        },
        set: function (value) {
            this.clip = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "subSuperScript", {
        /**
         * Gets or sets value indicating whether the text is in `subscript or superscript` mode.
         * @private
         */
        get: function () {
            if (typeof this.pdfSubSuperScript === 'undefined' || this.pdfSubSuperScript == null) {
                return _graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_1__["PdfSubSuperScript"].None;
            }
            else {
                return this.pdfSubSuperScript;
            }
        },
        set: function (value) {
            this.pdfSubSuperScript = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "paragraphIndent", {
        /**
         * Gets or sets the `indent` of the first line in the paragraph.
         * @private
         */
        get: function () {
            if (typeof this.internalParagraphIndent === 'undefined' || this.internalParagraphIndent == null) {
                return 0;
            }
            else {
                return this.internalParagraphIndent;
            }
        },
        set: function (value) {
            this.internalParagraphIndent = value;
            this.firstLineIndent = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "lineLimit", {
        /**
         * Gets or sets a value indicating whether [`line limit`].
         * @private
         */
        get: function () {
            return this.internalLineLimit;
        },
        set: function (value) {
            this.internalLineLimit = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "measureTrailingSpaces", {
        /**
         * Gets or sets a value indicating whether [`measure trailing spaces`].
         * @private
         */
        get: function () {
            if (typeof this.trailingSpaces === 'undefined' || this.trailingSpaces == null) {
                return false;
            }
            else {
                return this.trailingSpaces;
            }
        },
        set: function (value) {
            this.trailingSpaces = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "noClip", {
        /**
         * Gets or sets a value indicating whether [`no clip`].
         * @private
         */
        get: function () {
            if (typeof this.isNoClip === 'undefined' || this.isNoClip == null) {
                return false;
            }
            else {
                return this.isNoClip;
            }
        },
        set: function (value) {
            this.isNoClip = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "wordWrap", {
        /**
         * Gets or sets value indicating type of the text `wrapping`.
         * @private
         */
        get: function () {
            // if (typeof this.wrapType === 'undefined' || this.wrapType == null) {
            //     return PdfWordWrapType.Word;
            // } else {
            return this.wordWrapType;
            // }
        },
        set: function (value) {
            this.wordWrapType = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "horizontalScalingFactor", {
        /**
         * Gets or sets the `scaling factor`.
         * @private
         */
        get: function () {
            // if (typeof this.scalingFactor === 'undefined' || this.scalingFactor == null) {
            //     return 100;
            // } else {
            return this.scalingFactor;
            // }
        },
        set: function (value) {
            if (value <= 0) {
                throw new Error('ArgumentOutOfRangeException:The scaling factor cant be less of equal to zero, ScalingFactor');
            }
            this.scalingFactor = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringFormat.prototype, "firstLineIndent", {
        /**
         * Gets or sets the `indent` of the first line in the text.
         * @private
         */
        get: function () {
            if (typeof this.initialLineIndent === 'undefined' || this.initialLineIndent == null) {
                return 0;
            }
            else {
                return this.initialLineIndent;
            }
        },
        set: function (value) {
            this.initialLineIndent = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Clones` the object.
     * @private
     */
    //IClonable implementation
    PdfStringFormat.prototype.clone = function () {
        var format = this;
        return format;
    };
    return PdfStringFormat;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-true-type-font.js":
/*!*********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-true-type-font.js ***!
  \*********************************************************************************************************/
/*! exports provided: PdfTrueTypeFont */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTrueTypeFont", function() { return PdfTrueTypeFont; });
/* harmony import */ var _unicode_true_type_font__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./unicode-true-type-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/unicode-true-type-font.js");
/* harmony import */ var _pdf_font__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pdf-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _document_pdf_document__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../document/pdf-document */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _rtl_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./rtl-renderer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl-renderer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfTrueTypeFont.ts class for EJ2-PDF
 */






//https://www.giftofspeed.com/base64-encoder/
var PdfTrueTypeFont = /** @class */ (function (_super) {
    __extends(PdfTrueTypeFont, _super);
    function PdfTrueTypeFont(base64String, size, style) {
        var _this = _super.call(this, size) || this;
        /**
         * Indicates whether the font is embedded or not.
         * @private
         */
        _this.isEmbedFont = false;
        /**
         * Indicates whether the font is unicoded or not.
         * @private
         */
        _this.isUnicode = true;
        if (style !== undefined) {
            _this.createFontInternal(base64String, style);
        }
        else {
            _this.createFontInternal(base64String, _enum__WEBPACK_IMPORTED_MODULE_2__["PdfFontStyle"].Regular);
        }
        return _this;
    }
    PdfTrueTypeFont.prototype.equalsToFont = function (font) {
        var result = false;
        //let result : boolean = this.fontInternal.equalsToFont(font);
        return result;
    };
    PdfTrueTypeFont.prototype.getLineWidth = function (line, format) {
        var width = 0;
        if (format !== null && format.textDirection !== _enum__WEBPACK_IMPORTED_MODULE_4__["PdfTextDirection"].None) {
            var returnValue = this.getUnicodeLineWidth(line, /*out*/ width, format);
            width = returnValue.width;
        }
        else {
            width = this.fontInternal.getLineWidth(line);
        }
        var size = this.metrics.getSize(format);
        width *= (_pdf_font__WEBPACK_IMPORTED_MODULE_1__["PdfFont"].charSizeMultiplier * size);
        width = this.applyFormatSettings(line, format, width);
        return width;
    };
    /**
     * Returns width of the char.
     */
    PdfTrueTypeFont.prototype.getCharWidth = function (charCode, format) {
        var codeWidth = this.fontInternal.getCharWidth(charCode);
        var size = this.metrics.getSize(format);
        codeWidth *= (0.001 * size);
        return codeWidth;
    };
    //Implementation
    PdfTrueTypeFont.prototype.createFontInternal = function (base64String, style) {
        this.fontInternal = new _unicode_true_type_font__WEBPACK_IMPORTED_MODULE_0__["UnicodeTrueTypeFont"](base64String, this.size);
        this.calculateStyle(style);
        this.initializeInternals();
    };
    PdfTrueTypeFont.prototype.calculateStyle = function (style) {
        var iStyle = this.fontInternal.ttfMetrics.macStyle;
        if ((style & _enum__WEBPACK_IMPORTED_MODULE_2__["PdfFontStyle"].Underline) !== 0) {
            iStyle |= _enum__WEBPACK_IMPORTED_MODULE_2__["PdfFontStyle"].Underline;
        }
        if ((style & _enum__WEBPACK_IMPORTED_MODULE_2__["PdfFontStyle"].Strikeout) !== 0) {
            iStyle |= _enum__WEBPACK_IMPORTED_MODULE_2__["PdfFontStyle"].Strikeout;
        }
        this.setStyle(iStyle);
    };
    PdfTrueTypeFont.prototype.initializeInternals = function () {
        var equalFont = null;
        if (_document_pdf_document__WEBPACK_IMPORTED_MODULE_3__["PdfDocument"].enableCache) {
            // Search for the similar fonts.
            equalFont = _document_pdf_document__WEBPACK_IMPORTED_MODULE_3__["PdfDocument"].cache.search(this);
        }
        var internals = null;
        // There is not equal font in the cache.
        if (equalFont !== null && equalFont !== undefined) {
            // Get the settings from the cached font.
            internals = equalFont.getInternals();
            var metrics = equalFont.metrics;
            metrics = metrics.clone();
            metrics.size = this.size;
            this.metrics = metrics;
            this.fontInternal = equalFont.fontInternal;
        }
        else {
            if (equalFont == null) {
                if (this.fontInternal instanceof _unicode_true_type_font__WEBPACK_IMPORTED_MODULE_0__["UnicodeTrueTypeFont"]) {
                    this.fontInternal.isEmbed = this.isEmbedFont;
                }
                this.fontInternal.createInternals();
                internals = this.fontInternal.getInternals();
                this.metrics = this.fontInternal.metrics;
            }
        }
        this.metrics.isUnicodeFont = true;
        this.setInternals(internals);
        //this.ttfReader = (this.fontInternal as UnicodeTrueTypeFont).ttfReader;
    };
    /**
     * Stores used symbols.
     */
    PdfTrueTypeFont.prototype.setSymbols = function (text) {
        var internalFont = this.fontInternal;
        if (internalFont != null) {
            internalFont.setSymbols(text);
        }
    };
    Object.defineProperty(PdfTrueTypeFont.prototype, "Unicode", {
        /**
         * Property
         *
         */
        get: function () {
            return this.isUnicode;
        },
        enumerable: true,
        configurable: true
    });
    // public get Font() : UnicodeTrueTypeFont {
    //     return this.fontInternal as UnicodeTrueTypeFont;
    // }
    PdfTrueTypeFont.prototype.getUnicodeLineWidth = function (line, /*out*/ width, format) {
        // if (line == null) {
        //     throw new Error('ArgumentNullException : line');
        // }
        width = 0;
        var glyphIndices = null;
        var rtlRender = new _rtl_renderer__WEBPACK_IMPORTED_MODULE_5__["RtlRenderer"]();
        /* tslint:disable-next-line:max-line-length */
        var result = rtlRender.getGlyphIndex(line, this, (format.textDirection === _enum__WEBPACK_IMPORTED_MODULE_4__["PdfTextDirection"].RightToLeft) ? true : false, /*out*/ glyphIndices, true);
        var resultGlyph = result.success;
        glyphIndices = result.glyphs;
        if (resultGlyph && glyphIndices !== null) {
            var ttfReader = this.fontInternal.ttfReader;
            for (var i = 0, len = glyphIndices.length; i < len; i++) {
                var glyphIndex = glyphIndices[i];
                var glyph = ttfReader.getGlyph(glyphIndex);
                if (glyph !== null && typeof glyph !== 'undefined') {
                    width += glyph.width;
                }
            }
        }
        return { success: resultGlyph, width: width };
    };
    return PdfTrueTypeFont;
}(_pdf_font__WEBPACK_IMPORTED_MODULE_1__["PdfFont"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl-renderer.js":
/*!***************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl-renderer.js ***!
  \***************************************************************************************************/
/*! exports provided: RtlRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RtlRenderer", function() { return RtlRenderer; });
/* harmony import */ var _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../primitives/pdf-string */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js");
/* harmony import */ var _rtl_rtl_text_shape__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rtl/rtl-text-shape */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-text-shape.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _rtl_rtl_bidirectional__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rtl/rtl-bidirectional */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-bidirectional.js");




/**
 * `Metrics` of the font.
 * @private
 */
var RtlRenderer = /** @class */ (function () {
    function RtlRenderer() {
        //region Constants
        /// Open bracket symbol.
        /// </summary>
        this.openBracket = '(';
        /// <summary>
        /// Close bracket symbol.
        /// </summary>
        this.closeBracket = ')';
        //#endregion
    }
    //#region Constructors
    /// <summary>
    /// Initializes a new instance of the <see cref="RtlRenderer"/> class.
    /// </summary>
    // public constructor() {
    // }
    //#region Public Methods
    /// <summary>
    /// Layouts text. Changes blocks position in the RTL text.
    /// Ligates the text if needed.
    /// </summary>
    /// <param name="line">Line of the text.</param>
    /// <param name="font">Font to be used for string printing.</param>
    /// <param name="rtl">Font alignment.</param>
    /// <param name="wordSpace">Indicates whether Word Spacing used or not.</param>
    /// <returns>Layout string.</returns>
    RtlRenderer.prototype.layout = function (line, font, rtl, wordSpace, format) {
        if (line == null) {
            throw new Error('ArgumentNullException : line');
        }
        if (font == null) {
            throw new Error('ArgumentNullException : font');
        }
        var result = [];
        if (font.Unicode) {
            result = this.customLayout(line, rtl, format, font, wordSpace);
        }
        else {
            result = [];
            result[0] = line;
        }
        return result;
    };
    /// <summary>
    /// Layouts a string and splits it by the words and using correct lay outing.
    /// </summary>
    /// <param name="line">Text line.</param>
    /// <param name="font">Font object.</param>
    /// <param name="rtl">Indicates whether RTL should be applied.</param>
    /// <param name="wordSpace">Indicates whether word spacing is used.</param>
    /// <returns>Array of words if converted, null otherwise.</returns>
    RtlRenderer.prototype.splitLayout = function (line, font, rtl, wordSpace, format) {
        if (line == null) {
            throw new Error('ArgumentNullException : line');
        }
        if (font == null) {
            throw new Error('ArgumentNullException : font');
        }
        var words = [];
        var system = false;
        if (!system || words == null) {
            words = this.customSplitLayout(line, font, rtl, wordSpace, format);
        }
        return words;
    };
    //#endregion
    //#region Implementation
    // private isEnglish( word : string) : boolean
    // {
    //     let c : string = (word.length > 0) ? word[0] : '';
    //     return (c >= '0' && c < 'ÿ');
    // }
    // private keepOrder( words : string, startIndex : number, count: number, result : string[], resultIndex : number) : void
    // {
    //     for (let i : number = 0, ri = resultIndex - count + 1; i < count; ++i, ++ri) {
    //         result[ri] = words[i + startIndex];
    //     }
    // }
    /// <summary>
    /// Uses system API to layout the text.
    /// </summary>
    /// <param name="line">Line of the text to be layouted.</param>
    /// <param name="font">Font which is used for text printing.</param>
    /// <param name="rtl">Indicates whether we use RTL or RTL lay outing of the text container.</param>
    /// <returns>Layout string.</returns>
    /* tslint:disable-next-line:max-line-length */
    RtlRenderer.prototype.getGlyphIndex = function (line, font, rtl, /*out*/ glyphs, custom) {
        var success = true;
        var fail = false;
        if (line == null) {
            throw new Error('ArgumentNullException : line');
        }
        if (font == null) {
            throw new Error('ArgumentNullException : font');
        }
        glyphs = null;
        if (line.length === 0) {
            return { success: fail, glyphs: glyphs };
        }
        var renderer = new _rtl_rtl_text_shape__WEBPACK_IMPORTED_MODULE_1__["ArabicShapeRenderer"]();
        var text = renderer.shape(line, 0);
        var internalFont = font.fontInternal;
        var ttfReader = internalFont.ttfReader;
        glyphs = new Uint16Array(text.length);
        var i = 0;
        for (var k = 0, len = text.length; k < len; k++) {
            var ch = text[k];
            var glyphInfo = ttfReader.getGlyph(ch);
            if (glyphInfo !== null && typeof glyphInfo !== 'undefined') {
                glyphs[i++] = (glyphInfo).index;
            }
        }
        return { success: success, glyphs: glyphs };
    };
    /* tslint:disable-next-line:max-line-length */
    RtlRenderer.prototype.customLayout = function (line, rtl, format, font, wordSpace) {
        if (wordSpace === null || typeof wordSpace === 'undefined') {
            if (line == null) {
                throw new Error('ArgumentNullException : line');
            }
            var result = null;
            //bidirectional order.
            if (format !== null && format.textDirection !== _enum__WEBPACK_IMPORTED_MODULE_2__["PdfTextDirection"].None) {
                var bidi = new _rtl_rtl_bidirectional__WEBPACK_IMPORTED_MODULE_3__["Bidi"]();
                result = bidi.getLogicalToVisualString(line, rtl);
            }
            return result;
        }
        else {
            if (line == null) {
                throw new Error('ArgumentNullException : line');
            }
            if (font == null) {
                throw new Error('ArgumentNullException : font');
            }
            var layouted = null;
            if (format !== null && format.textDirection !== _enum__WEBPACK_IMPORTED_MODULE_2__["PdfTextDirection"].None) {
                var renderer = new _rtl_rtl_text_shape__WEBPACK_IMPORTED_MODULE_1__["ArabicShapeRenderer"]();
                var txt = renderer.shape(line, 0);
                layouted = this.customLayout(txt, rtl, format);
            }
            // else {
            //     layouted = this.customLayout(line, rtl, format);
            // }
            // We have unicode font, but from the file.        
            var result = [];
            // Split the text by words if word spacing is not default.
            if (wordSpace) {
                var words = layouted.split('');
                var count = words.length;
                for (var i = 0; i < count; i++) {
                    words[i] = this.addChars(font, words[i]);
                }
                result = words;
            }
            else {
                result = [];
                result[0] = this.addChars(font, layouted);
            }
            return result;
        }
    };
    /// <summary>
    /// Add information about used glyphs to the font.
    /// </summary>
    /// <param name="font">Font used for text rendering.</param>
    /// <param name="glyphs">Array of used glyphs.</param>
    /// <returns>String in the form to be written to the file.</returns>
    RtlRenderer.prototype.addChars = function (font, glyphs) {
        var line = glyphs;
        if (font == null) {
            throw new Error('ArgumentNullException : font');
        }
        if (line == null) {
            throw new Error('ArgumentNullException : line');
        }
        var text = line;
        var internalFont = font.fontInternal;
        var ttfReader = internalFont.ttfReader;
        font.setSymbols(text);
        // Reconvert string according to unicode standard.
        text = ttfReader.convertString(text);
        var bytes = _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_0__["PdfString"].toUnicodeArray(text, false);
        text = _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_0__["PdfString"].byteToString(bytes);
        return text;
        // else {
        //     if (font == null) {
        //         throw new Error('ArgumentNullException : font');
        //     }
        //     if (glyphs == null) {
        //         throw new Error('ArgumentNullException : glyphs');
        //     }
        //     // Mark the chars as used.
        //     let text : string = '';
        //     font.setSymbols(glyphs);
        //     // Create string from the glyphs.
        //     
        //     let chars : string[] = [];
        //     for (let i : number = 0; i < glyphs.length; i++) {
        //         chars[i] = glyphs[i].toString();
        //     }
        //     for (let j : number = 0 ; j < chars.length; j++) {
        //         text = text + chars[j];
        //     }
        //     let bytes : number[] = PdfString.toUnicodeArray(text, false);
        //     text = PdfString.byteToString(bytes);
        //     return text;
        // }
    };
    /// <summary>
    /// Layouts a string and splits it by the words by using custom lay outing.
    /// </summary>
    /// <param name="line">Text line.</param>
    /// <param name="font">Font object.</param>
    /// <param name="rtl">Indicates whether RTL should be applied.</param>
    /// <param name="wordSpace">Indicates whether word spacing is used.</param>
    /// <returns>Array of words if converted, null otherwise.</returns>
    /* tslint:disable-next-line:max-line-length */
    RtlRenderer.prototype.customSplitLayout = function (line, font, rtl, wordSpace, format) {
        if (line == null) {
            throw new Error('ArgumentNullException : line');
        }
        if (font == null) {
            throw new Error('ArgumentNullException : font');
        }
        var reversedLine = this.customLayout(line, rtl, format);
        var words = reversedLine.split('');
        return words;
    };
    return RtlRenderer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-bidirectional.js":
/*!************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-bidirectional.js ***!
  \************************************************************************************************************/
/*! exports provided: Bidi, RtlCharacters */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bidi", function() { return Bidi; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RtlCharacters", function() { return RtlCharacters; });
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/**
 * Bidi.ts class for EJ2-PDF
 */

/**
 * `Metrics` of the font.
 * @private
 */
var Bidi = /** @class */ (function () {
    //#endregion
    //#region Constructor
    function Bidi() {
        //#region Fields
        this.indexes = [];
        this.indexLevels = [];
        this.mirroringShapeCharacters = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
        this.update();
    }
    //#endregion
    //#region implementation
    Bidi.prototype.doMirrorShaping = function (text) {
        var result = [];
        for (var i = 0; i < text.length; i++) {
            if (((this.indexLevels[i] & 1) === 1) && this.mirroringShapeCharacters.containsKey(text[i].charCodeAt(0))) {
                result[i] = String.fromCharCode(this.mirroringShapeCharacters.getValue(text[i].charCodeAt(0)));
            }
            else {
                result[i] = text[i].toString();
            }
        }
        var res = '';
        for (var j = 0; j < result.length; j++) {
            res = res + result[j];
        }
        return res;
    };
    Bidi.prototype.getLogicalToVisualString = function (inputText, isRtl) {
        var rtlCharacters = new RtlCharacters();
        this.indexLevels = rtlCharacters.getVisualOrder(inputText, isRtl);
        this.setDefaultIndexLevel();
        this.doOrder(0, this.indexLevels.length - 1);
        var text = this.doMirrorShaping(inputText);
        //let text : string = inputText;
        var resultBuilder = '';
        for (var i = 0; i < this.indexes.length; i++) {
            var index = this.indexes[i];
            resultBuilder += text[index];
        }
        return resultBuilder.toString();
    };
    Bidi.prototype.setDefaultIndexLevel = function () {
        for (var i = 0; i < this.indexLevels.length; i++) {
            this.indexes[i] = i;
        }
    };
    Bidi.prototype.doOrder = function (sIndex, eIndex) {
        var max = this.indexLevels[sIndex];
        var min = max;
        var odd = max;
        var even = max;
        for (var i = sIndex + 1; i <= eIndex; ++i) {
            var data = this.indexLevels[i];
            if (data > max) {
                max = data;
            }
            else if (data < min) {
                min = data;
            }
            odd &= data;
            even |= data;
        }
        if ((even & 1) === 0) {
            return;
        }
        if ((odd & 1) === 1) {
            this.reArrange(sIndex, eIndex + 1);
            return;
        }
        min |= 1;
        while (max >= min) {
            var pstart = sIndex;
            /*tslint:disable:no-constant-condition */
            while (true) {
                while (pstart <= eIndex) {
                    if (this.indexLevels[pstart] >= max) {
                        break;
                    }
                    pstart += 1;
                }
                if (pstart > eIndex) {
                    break;
                }
                var pend = pstart + 1;
                while (pend <= eIndex) {
                    if (this.indexLevels[pend] < max) {
                        break;
                    }
                    pend += 1;
                }
                this.reArrange(pstart, pend);
                pstart = pend + 1;
            }
            max -= 1;
        }
    };
    Bidi.prototype.reArrange = function (i, j) {
        var length = (i + j) / 2;
        --j;
        for (; i < length; ++i, --j) {
            var temp = this.indexes[i];
            this.indexes[i] = this.indexes[j];
            this.indexes[j] = temp;
        }
    };
    Bidi.prototype.update = function () {
        this.mirroringShapeCharacters.setValue(40, 41);
        this.mirroringShapeCharacters.setValue(41, 40);
        this.mirroringShapeCharacters.setValue(60, 62);
        this.mirroringShapeCharacters.setValue(62, 60);
        this.mirroringShapeCharacters.setValue(91, 93);
        this.mirroringShapeCharacters.setValue(93, 91);
        this.mirroringShapeCharacters.setValue(123, 125);
        this.mirroringShapeCharacters.setValue(125, 123);
        this.mirroringShapeCharacters.setValue(171, 187);
        this.mirroringShapeCharacters.setValue(187, 171);
        this.mirroringShapeCharacters.setValue(8249, 8250);
        this.mirroringShapeCharacters.setValue(8250, 8249);
        this.mirroringShapeCharacters.setValue(8261, 8262);
        this.mirroringShapeCharacters.setValue(8262, 8261);
        this.mirroringShapeCharacters.setValue(8317, 8318);
        this.mirroringShapeCharacters.setValue(8318, 8317);
        this.mirroringShapeCharacters.setValue(8333, 8334);
        this.mirroringShapeCharacters.setValue(8334, 8333);
        this.mirroringShapeCharacters.setValue(8712, 8715);
        this.mirroringShapeCharacters.setValue(8713, 8716);
        this.mirroringShapeCharacters.setValue(8714, 8717);
        this.mirroringShapeCharacters.setValue(8715, 8712);
        this.mirroringShapeCharacters.setValue(8716, 8713);
        this.mirroringShapeCharacters.setValue(8717, 8714);
        this.mirroringShapeCharacters.setValue(8725, 10741);
        this.mirroringShapeCharacters.setValue(8764, 8765);
        this.mirroringShapeCharacters.setValue(8765, 8764);
        this.mirroringShapeCharacters.setValue(8771, 8909);
        this.mirroringShapeCharacters.setValue(8786, 8787);
        this.mirroringShapeCharacters.setValue(8787, 8786);
        this.mirroringShapeCharacters.setValue(8788, 8789);
        this.mirroringShapeCharacters.setValue(8789, 8788);
        this.mirroringShapeCharacters.setValue(8804, 8805);
        this.mirroringShapeCharacters.setValue(8805, 8804);
        this.mirroringShapeCharacters.setValue(8806, 8807);
        this.mirroringShapeCharacters.setValue(8807, 8806);
        this.mirroringShapeCharacters.setValue(8808, 8809);
        this.mirroringShapeCharacters.setValue(8809, 8808);
        this.mirroringShapeCharacters.setValue(8810, 8811);
        this.mirroringShapeCharacters.setValue(8811, 8810);
        this.mirroringShapeCharacters.setValue(8814, 8815);
        this.mirroringShapeCharacters.setValue(8815, 8814);
        this.mirroringShapeCharacters.setValue(8816, 8817);
        this.mirroringShapeCharacters.setValue(8817, 8816);
        this.mirroringShapeCharacters.setValue(8818, 8819);
        this.mirroringShapeCharacters.setValue(8819, 8818);
        this.mirroringShapeCharacters.setValue(8820, 8821);
        this.mirroringShapeCharacters.setValue(8821, 8820);
        this.mirroringShapeCharacters.setValue(8822, 8823);
        this.mirroringShapeCharacters.setValue(8823, 8822);
        this.mirroringShapeCharacters.setValue(8824, 8825);
        this.mirroringShapeCharacters.setValue(8825, 8824);
        this.mirroringShapeCharacters.setValue(8826, 8827);
        this.mirroringShapeCharacters.setValue(8827, 8826);
        this.mirroringShapeCharacters.setValue(8828, 8829);
        this.mirroringShapeCharacters.setValue(8829, 8828);
        this.mirroringShapeCharacters.setValue(8830, 8831);
        this.mirroringShapeCharacters.setValue(8831, 8830);
        this.mirroringShapeCharacters.setValue(8832, 8833);
        this.mirroringShapeCharacters.setValue(8833, 8832);
        this.mirroringShapeCharacters.setValue(8834, 8835);
        this.mirroringShapeCharacters.setValue(8835, 8834);
        this.mirroringShapeCharacters.setValue(8836, 8837);
        this.mirroringShapeCharacters.setValue(8837, 8836);
        this.mirroringShapeCharacters.setValue(8838, 8839);
        this.mirroringShapeCharacters.setValue(8839, 8838);
        this.mirroringShapeCharacters.setValue(8840, 8841);
        this.mirroringShapeCharacters.setValue(8841, 8840);
        this.mirroringShapeCharacters.setValue(8842, 8843);
        this.mirroringShapeCharacters.setValue(8843, 8842);
        this.mirroringShapeCharacters.setValue(8847, 8848);
        this.mirroringShapeCharacters.setValue(8848, 8847);
        this.mirroringShapeCharacters.setValue(8849, 8850);
        this.mirroringShapeCharacters.setValue(8850, 8849);
        this.mirroringShapeCharacters.setValue(8856, 10680);
        this.mirroringShapeCharacters.setValue(8866, 8867);
        this.mirroringShapeCharacters.setValue(8867, 8866);
        this.mirroringShapeCharacters.setValue(8870, 10974);
        this.mirroringShapeCharacters.setValue(8872, 10980);
        this.mirroringShapeCharacters.setValue(8873, 10979);
        this.mirroringShapeCharacters.setValue(8875, 10981);
        this.mirroringShapeCharacters.setValue(8880, 8881);
        this.mirroringShapeCharacters.setValue(8881, 8880);
        this.mirroringShapeCharacters.setValue(8882, 8883);
        this.mirroringShapeCharacters.setValue(8883, 8882);
        this.mirroringShapeCharacters.setValue(8884, 8885);
        this.mirroringShapeCharacters.setValue(8885, 8884);
        /*tslint:disable:max-func-body-length */
        this.mirroringShapeCharacters.setValue(8886, 8887);
        this.mirroringShapeCharacters.setValue(8887, 8886);
        this.mirroringShapeCharacters.setValue(8905, 8906);
        this.mirroringShapeCharacters.setValue(8906, 8905);
        this.mirroringShapeCharacters.setValue(8907, 8908);
        this.mirroringShapeCharacters.setValue(8908, 8907);
        this.mirroringShapeCharacters.setValue(8909, 8771);
        this.mirroringShapeCharacters.setValue(8912, 8913);
        this.mirroringShapeCharacters.setValue(8913, 8912);
        this.mirroringShapeCharacters.setValue(8918, 8919);
        this.mirroringShapeCharacters.setValue(8919, 8918);
        this.mirroringShapeCharacters.setValue(8920, 8921);
        this.mirroringShapeCharacters.setValue(8921, 8920);
        this.mirroringShapeCharacters.setValue(8922, 8923);
        this.mirroringShapeCharacters.setValue(8923, 8922);
        this.mirroringShapeCharacters.setValue(8924, 8925);
        this.mirroringShapeCharacters.setValue(8925, 8924);
        this.mirroringShapeCharacters.setValue(8926, 8927);
        this.mirroringShapeCharacters.setValue(8927, 8926);
        this.mirroringShapeCharacters.setValue(8928, 8929);
        this.mirroringShapeCharacters.setValue(8929, 8928);
        this.mirroringShapeCharacters.setValue(8930, 8931);
        this.mirroringShapeCharacters.setValue(8931, 8930);
        this.mirroringShapeCharacters.setValue(8932, 8933);
        this.mirroringShapeCharacters.setValue(8933, 8932);
        this.mirroringShapeCharacters.setValue(8934, 8935);
        this.mirroringShapeCharacters.setValue(8935, 8934);
        this.mirroringShapeCharacters.setValue(8936, 8937);
        this.mirroringShapeCharacters.setValue(8937, 8936);
        this.mirroringShapeCharacters.setValue(8938, 8939);
        this.mirroringShapeCharacters.setValue(8939, 8938);
        this.mirroringShapeCharacters.setValue(8940, 8941);
        this.mirroringShapeCharacters.setValue(8941, 8940);
        this.mirroringShapeCharacters.setValue(8944, 8945);
        this.mirroringShapeCharacters.setValue(8945, 8944);
        this.mirroringShapeCharacters.setValue(8946, 8954);
        this.mirroringShapeCharacters.setValue(8947, 8955);
        this.mirroringShapeCharacters.setValue(8948, 8956);
        this.mirroringShapeCharacters.setValue(8950, 8957);
        this.mirroringShapeCharacters.setValue(8951, 8958);
        this.mirroringShapeCharacters.setValue(8954, 8946);
        this.mirroringShapeCharacters.setValue(8955, 8947);
        this.mirroringShapeCharacters.setValue(8956, 8948);
        this.mirroringShapeCharacters.setValue(8957, 8950);
        this.mirroringShapeCharacters.setValue(8958, 8951);
        this.mirroringShapeCharacters.setValue(8968, 8969);
        this.mirroringShapeCharacters.setValue(8969, 8968);
        this.mirroringShapeCharacters.setValue(8970, 8971);
        this.mirroringShapeCharacters.setValue(8971, 8970);
        this.mirroringShapeCharacters.setValue(9001, 9002);
        this.mirroringShapeCharacters.setValue(9002, 9001);
        this.mirroringShapeCharacters.setValue(10088, 10089);
        this.mirroringShapeCharacters.setValue(10089, 10088);
        this.mirroringShapeCharacters.setValue(10090, 10091);
        this.mirroringShapeCharacters.setValue(10091, 10090);
        this.mirroringShapeCharacters.setValue(10092, 10093);
        this.mirroringShapeCharacters.setValue(10093, 10092);
        this.mirroringShapeCharacters.setValue(10094, 10095);
        this.mirroringShapeCharacters.setValue(10095, 10094);
        this.mirroringShapeCharacters.setValue(10096, 10097);
        this.mirroringShapeCharacters.setValue(10097, 10096);
        this.mirroringShapeCharacters.setValue(10098, 10099);
        this.mirroringShapeCharacters.setValue(10099, 10098);
        this.mirroringShapeCharacters.setValue(10100, 10101);
        this.mirroringShapeCharacters.setValue(10101, 10100);
        this.mirroringShapeCharacters.setValue(10197, 10198);
        this.mirroringShapeCharacters.setValue(10198, 10197);
        this.mirroringShapeCharacters.setValue(10205, 10206);
        this.mirroringShapeCharacters.setValue(10206, 10205);
        this.mirroringShapeCharacters.setValue(10210, 10211);
        this.mirroringShapeCharacters.setValue(10211, 10210);
        this.mirroringShapeCharacters.setValue(10212, 10213);
        this.mirroringShapeCharacters.setValue(10213, 10212);
        this.mirroringShapeCharacters.setValue(10214, 10215);
        this.mirroringShapeCharacters.setValue(10215, 10214);
        this.mirroringShapeCharacters.setValue(10216, 10217);
        this.mirroringShapeCharacters.setValue(10217, 10216);
        this.mirroringShapeCharacters.setValue(10218, 10219);
        this.mirroringShapeCharacters.setValue(10219, 10218);
        this.mirroringShapeCharacters.setValue(10627, 10628);
        this.mirroringShapeCharacters.setValue(10628, 10627);
        this.mirroringShapeCharacters.setValue(10629, 10630);
        this.mirroringShapeCharacters.setValue(10630, 10629);
        this.mirroringShapeCharacters.setValue(10631, 10632);
        this.mirroringShapeCharacters.setValue(10632, 10631);
        this.mirroringShapeCharacters.setValue(10633, 10634);
        this.mirroringShapeCharacters.setValue(10634, 10633);
        this.mirroringShapeCharacters.setValue(10635, 10636);
        this.mirroringShapeCharacters.setValue(10636, 10635);
        this.mirroringShapeCharacters.setValue(10637, 10640);
        this.mirroringShapeCharacters.setValue(10638, 10639);
        this.mirroringShapeCharacters.setValue(10639, 10638);
        this.mirroringShapeCharacters.setValue(10640, 10637);
        this.mirroringShapeCharacters.setValue(10641, 10642);
        this.mirroringShapeCharacters.setValue(10642, 10641);
        this.mirroringShapeCharacters.setValue(10643, 10644);
        this.mirroringShapeCharacters.setValue(10644, 10643);
        this.mirroringShapeCharacters.setValue(10645, 10646);
        this.mirroringShapeCharacters.setValue(10646, 10645);
        this.mirroringShapeCharacters.setValue(10647, 10648);
        this.mirroringShapeCharacters.setValue(10648, 10647);
        this.mirroringShapeCharacters.setValue(10680, 8856);
        this.mirroringShapeCharacters.setValue(10688, 10689);
        this.mirroringShapeCharacters.setValue(10689, 10688);
        this.mirroringShapeCharacters.setValue(10692, 10693);
        this.mirroringShapeCharacters.setValue(10693, 10692);
        this.mirroringShapeCharacters.setValue(10703, 10704);
        this.mirroringShapeCharacters.setValue(10704, 10703);
        this.mirroringShapeCharacters.setValue(10705, 10706);
        this.mirroringShapeCharacters.setValue(10706, 10705);
        this.mirroringShapeCharacters.setValue(10708, 10709);
        this.mirroringShapeCharacters.setValue(10709, 10708);
        this.mirroringShapeCharacters.setValue(10712, 10713);
        this.mirroringShapeCharacters.setValue(10713, 10712);
        this.mirroringShapeCharacters.setValue(10714, 10715);
        this.mirroringShapeCharacters.setValue(10715, 10714);
        this.mirroringShapeCharacters.setValue(10741, 8725);
        this.mirroringShapeCharacters.setValue(10744, 10745);
        this.mirroringShapeCharacters.setValue(10745, 10744);
        this.mirroringShapeCharacters.setValue(10748, 10749);
        this.mirroringShapeCharacters.setValue(10749, 10748);
        this.mirroringShapeCharacters.setValue(10795, 10796);
        this.mirroringShapeCharacters.setValue(10796, 10795);
        this.mirroringShapeCharacters.setValue(10797, 10796);
        this.mirroringShapeCharacters.setValue(10798, 10797);
        this.mirroringShapeCharacters.setValue(10804, 10805);
        this.mirroringShapeCharacters.setValue(10805, 10804);
        this.mirroringShapeCharacters.setValue(10812, 10813);
        this.mirroringShapeCharacters.setValue(10813, 10812);
        this.mirroringShapeCharacters.setValue(10852, 10853);
        this.mirroringShapeCharacters.setValue(10853, 10852);
        this.mirroringShapeCharacters.setValue(10873, 10874);
        this.mirroringShapeCharacters.setValue(10874, 10873);
        this.mirroringShapeCharacters.setValue(10877, 10878);
        this.mirroringShapeCharacters.setValue(10878, 10877);
        this.mirroringShapeCharacters.setValue(10879, 10880);
        this.mirroringShapeCharacters.setValue(10880, 10879);
        this.mirroringShapeCharacters.setValue(10881, 10882);
        this.mirroringShapeCharacters.setValue(10882, 10881);
        this.mirroringShapeCharacters.setValue(10883, 10884);
        this.mirroringShapeCharacters.setValue(10884, 10883);
        this.mirroringShapeCharacters.setValue(10891, 10892);
        this.mirroringShapeCharacters.setValue(10892, 10891);
        this.mirroringShapeCharacters.setValue(10897, 10898);
        this.mirroringShapeCharacters.setValue(10898, 10897);
        this.mirroringShapeCharacters.setValue(10899, 10900);
        this.mirroringShapeCharacters.setValue(10900, 10899);
        this.mirroringShapeCharacters.setValue(10901, 10902);
        this.mirroringShapeCharacters.setValue(10902, 10901);
        this.mirroringShapeCharacters.setValue(10903, 10904);
        this.mirroringShapeCharacters.setValue(10904, 10903);
        this.mirroringShapeCharacters.setValue(10905, 10906);
        this.mirroringShapeCharacters.setValue(10906, 10905);
        this.mirroringShapeCharacters.setValue(10907, 10908);
        this.mirroringShapeCharacters.setValue(10908, 10907);
        this.mirroringShapeCharacters.setValue(10913, 10914);
        this.mirroringShapeCharacters.setValue(10914, 10913);
        this.mirroringShapeCharacters.setValue(10918, 10919);
        this.mirroringShapeCharacters.setValue(10919, 10918);
        this.mirroringShapeCharacters.setValue(10920, 10921);
        this.mirroringShapeCharacters.setValue(10921, 10920);
        this.mirroringShapeCharacters.setValue(10922, 10923);
        this.mirroringShapeCharacters.setValue(10923, 10922);
        this.mirroringShapeCharacters.setValue(10924, 10925);
        this.mirroringShapeCharacters.setValue(10925, 10924);
        this.mirroringShapeCharacters.setValue(10927, 10928);
        this.mirroringShapeCharacters.setValue(10928, 10927);
        this.mirroringShapeCharacters.setValue(10931, 10932);
        this.mirroringShapeCharacters.setValue(10932, 10931);
        this.mirroringShapeCharacters.setValue(10939, 10940);
        this.mirroringShapeCharacters.setValue(10940, 10939);
        this.mirroringShapeCharacters.setValue(10941, 10942);
        this.mirroringShapeCharacters.setValue(10942, 10941);
        this.mirroringShapeCharacters.setValue(10943, 10944);
        this.mirroringShapeCharacters.setValue(10944, 10943);
        this.mirroringShapeCharacters.setValue(10945, 10946);
        this.mirroringShapeCharacters.setValue(10946, 10945);
        this.mirroringShapeCharacters.setValue(10947, 10948);
        this.mirroringShapeCharacters.setValue(10948, 10947);
        this.mirroringShapeCharacters.setValue(10949, 10950);
        this.mirroringShapeCharacters.setValue(10950, 10949);
        this.mirroringShapeCharacters.setValue(10957, 10958);
        this.mirroringShapeCharacters.setValue(10958, 10957);
        this.mirroringShapeCharacters.setValue(10959, 10960);
        this.mirroringShapeCharacters.setValue(10960, 10959);
        this.mirroringShapeCharacters.setValue(10961, 10962);
        this.mirroringShapeCharacters.setValue(10962, 10961);
        this.mirroringShapeCharacters.setValue(10963, 10964);
        this.mirroringShapeCharacters.setValue(10964, 10963);
        this.mirroringShapeCharacters.setValue(10965, 10966);
        this.mirroringShapeCharacters.setValue(10966, 10965);
        this.mirroringShapeCharacters.setValue(10974, 8870);
        this.mirroringShapeCharacters.setValue(10979, 8873);
        this.mirroringShapeCharacters.setValue(10980, 8872);
        this.mirroringShapeCharacters.setValue(10981, 8875);
        this.mirroringShapeCharacters.setValue(10988, 10989);
        this.mirroringShapeCharacters.setValue(10989, 10988);
        this.mirroringShapeCharacters.setValue(10999, 11000);
        this.mirroringShapeCharacters.setValue(11000, 10999);
        this.mirroringShapeCharacters.setValue(11001, 11002);
        this.mirroringShapeCharacters.setValue(11002, 11001);
        this.mirroringShapeCharacters.setValue(12296, 12297);
        this.mirroringShapeCharacters.setValue(12297, 12296);
        this.mirroringShapeCharacters.setValue(12298, 12299);
        this.mirroringShapeCharacters.setValue(12299, 12298);
        this.mirroringShapeCharacters.setValue(12300, 12301);
        this.mirroringShapeCharacters.setValue(12301, 12300);
        this.mirroringShapeCharacters.setValue(12302, 12303);
        this.mirroringShapeCharacters.setValue(12303, 12302);
        this.mirroringShapeCharacters.setValue(12304, 12305);
        this.mirroringShapeCharacters.setValue(12305, 12304);
        this.mirroringShapeCharacters.setValue(12308, 12309);
        this.mirroringShapeCharacters.setValue(12309, 12308);
        this.mirroringShapeCharacters.setValue(12310, 12311);
        this.mirroringShapeCharacters.setValue(12311, 12310);
        this.mirroringShapeCharacters.setValue(12312, 12313);
        this.mirroringShapeCharacters.setValue(12313, 12312);
        this.mirroringShapeCharacters.setValue(12314, 12315);
        this.mirroringShapeCharacters.setValue(12315, 12314);
        this.mirroringShapeCharacters.setValue(65288, 65289);
        this.mirroringShapeCharacters.setValue(65289, 65288);
        this.mirroringShapeCharacters.setValue(65308, 65310);
        this.mirroringShapeCharacters.setValue(65310, 65308);
        this.mirroringShapeCharacters.setValue(65339, 65341);
        this.mirroringShapeCharacters.setValue(65341, 65339);
        this.mirroringShapeCharacters.setValue(65371, 65373);
        this.mirroringShapeCharacters.setValue(65373, 65371);
        this.mirroringShapeCharacters.setValue(65375, 65376);
        this.mirroringShapeCharacters.setValue(65376, 65375);
        this.mirroringShapeCharacters.setValue(65378, 65379);
        this.mirroringShapeCharacters.setValue(65379, 65378);
    };
    return Bidi;
}());

var RtlCharacters = /** @class */ (function () {
    //#endregion
    //#region constructors
    function RtlCharacters() {
        //#region fields
        /// <summary>
        /// Specifies the character types.
        /// </summary>
        this.types = [];
        /// <summary>
        /// Specifies the text order (RTL or LTR).
        /// </summary>
        this.textOrder = -1;
        /// <summary>
        /// Specifies the RTL character types.
        /// </summary>
        /* tslint:disable-next-line:prefer-array-literal */
        this.rtlCharacterTypes = new Array(65536);
        //#endregion
        //#region constants
        /// <summary>
        /// Left-to-Right (Non-European or non-Arabic digits).
        /// </summary>
        this.L = 0;
        /// <summary>
        /// Left-to-Right Embedding
        /// </summary>
        this.LRE = 1;
        /// <summary>
        /// Left-to-Right Override
        /// </summary>
        this.LRO = 2;
        /// <summary>
        /// Right-to-Left (Hebrew alphabet, and related punctuation).
        /// </summary>
        this.R = 3;
        /// <summary>
        /// Right-to-Left Arabic 
        /// </summary>
        this.AL = 4;
        /// <summary>
        /// Right-to-Left Embedding.
        /// </summary>
        this.RLE = 5;
        /// <summary>
        /// Right-to-Left Override
        /// </summary>
        this.RLO = 6;
        /// <summary>
        /// Pop Directional Format
        /// </summary>
        this.PDF = 7;
        /// <summary>
        /// European Number (European digits, Eastern Arabic-Indic digits).
        /// </summary>
        this.EN = 8;
        /// <summary>
        /// European Number Separator (Plus sign, Minus sign).
        /// </summary>
        this.ES = 9;
        /// <summary>
        /// European Number Terminator (Degree sign, currency symbols).
        /// </summary>
        this.ET = 10;
        /// <summary>
        /// Arabic Number (Arabic-Indic digits, Arabic decimal and thousands separators).
        /// </summary>
        this.AN = 11;
        /// <summary>
        /// Common Number Separator (Colon, Comma, Full Stop, No-Break Space.
        /// </summary>
        this.CS = 12;
        /// <summary>
        /// Nonspacing Mark (Characters with the General_Category values).
        /// </summary>
        this.NSM = 13;
        /// <summary>
        /// Boundary Neutral (Default ignorables, non-characters, and control characters, other than those explicitly given other types.)
        /// </summary>
        this.BN = 14;
        /// <summary>
        /// Paragraph Separator (Paragraph separator, appropriate Newline Functions, higher-level protocol paragraph determination).
        /// </summary>
        this.B = 15;
        /// <summary>
        /// 	Segment Separator (tab).
        /// </summary>
        this.S = 16;
        /// <summary>
        /// Whitespace (Space, Figure space, Line separator, Form feed, General Punctuation spaces).
        /// </summary>
        this.WS = 17;
        /// <summary>
        /// Other Neutrals (All other characters, including object replacement character).
        /// </summary>
        this.ON = 18;
        /// <summary>
        /// RTL character types.
        /// </summary>
        this.charTypes = [
            this.L, this.EN, this.BN, this.ES, this.ES, this.S, this.ET, this.ET, this.B, this.AN, this.AN, this.S, this.CS, this.CS,
            this.WS, this.NSM, this.NSM, this.B, this.BN, 27, this.BN, 28, 30, this.B, 31, 31, this.S, 32, 32, this.WS, 33, 34,
            this.ON, 35, 37, this.ET, 38, 42, this.ON, 43, 43, this.ET, 44, 44, this.CS, 45, 45, this.ET, 46, 46, this.CS,
            47, 47, this.CS, 48, 57, this.EN, 58, 58, this.CS, 59, 64, this.ON, 65, 90, this.L, 91, 96, this.ON, 97, 122, this.L,
            123, 126, this.ON, 127, 132, this.BN, 133, 133, this.B, 134, 159, this.BN, 160, 160, this.CS,
            161, 161, this.ON, 162, 165, this.ET, 166, 169, this.ON, 170, 170, this.L, 171, 175, this.ON,
            176, 177, this.ET, 178, 179, this.EN, 180, 180, this.ON, 181, 181, this.L, 182, 184, this.ON,
            185, 185, this.EN, 186, 186, this.L, 187, 191, this.ON, 192, 214, this.L, 215, 215, this.ON,
            216, 246, this.L, 247, 247, this.ON, 248, 696, this.L, 697, 698, this.ON, 699, 705, this.L,
            706, 719, this.ON, 720, 721, this.L, 722, 735, this.ON, 736, 740, this.L, 741, 749, this.ON,
            750, 750, this.L, 751, 767, this.ON, 768, 855, this.NSM, 856, 860, this.L, 861, 879, this.NSM,
            880, 883, this.L, 884, 885, this.ON, 886, 893, this.L, 894, 894, this.ON, 895, 899, this.L,
            900, 901, this.ON, 902, 902, this.L, 903, 903, this.ON, 904, 1013, this.L, 1014, 1014, this.ON,
            1015, 1154, this.L, 1155, 1158, this.NSM, 1159, 1159, this.L, 1160, 1161, this.NSM,
            1162, 1417, this.L, 1418, 1418, this.ON, 1419, 1424, this.L, 1425, 1441, this.NSM,
            1442, 1442, this.L, 1443, 1465, this.NSM, 1466, 1466, this.L, 1467, 1469, this.NSM,
            1470, 1470, this.R, 1471, 1471, this.NSM, 1472, 1472, this.R, 1473, 1474, this.NSM,
            1475, 1475, this.R, 1476, 1476, this.NSM, 1477, 1487, this.L, 1488, 1514, this.R,
            1515, 1519, this.L, 1520, 1524, this.R, 1525, 1535, this.L, 1536, 1539, this.AL,
            1540, 1547, this.L, 1548, 1548, this.CS, 1549, 1549, this.AL, 1550, 1551, this.ON,
            1552, 1557, this.NSM, 1558, 1562, this.L, 1563, 1563, this.AL, 1564, 1566, this.L,
            1567, 1567, this.AL, 1568, 1568, this.L, 1569, 1594, this.AL, 1595, 1599, this.L,
            1600, 1610, this.AL, 1611, 1624, this.NSM, 1625, 1631, this.L, 1632, 1641, this.AN,
            1642, 1642, this.ET, 1643, 1644, this.AN, 1645, 1647, this.AL, 1648, 1648, this.NSM,
            1649, 1749, this.AL, 1750, 1756, this.NSM, 1757, 1757, this.AL, 1758, 1764, this.NSM,
            1765, 1766, this.AL, 1767, 1768, this.NSM, 1769, 1769, this.ON, 1770, 1773, this.NSM,
            1774, 1775, this.AL, 1776, 1785, this.EN, 1786, 1805, this.AL, 1806, 1806, this.L,
            1807, 1807, this.BN, 1808, 1808, this.AL, 1809, 1809, this.NSM, 1810, 1839, this.AL,
            1840, 1866, this.NSM, 1867, 1868, this.L, 1869, 1871, this.AL, 1872, 1919, this.L,
            1920, 1957, this.AL, 1958, 1968, this.NSM, 1969, 1969, this.AL, 1970, 2304, this.L,
            2305, 2306, this.NSM, 2307, 2363, this.L, 2364, 2364, this.NSM, 2365, 2368, this.L,
            2369, 2376, this.NSM, 2377, 2380, this.L, 2381, 2381, this.NSM, 2382, 2384, this.L,
            2385, 2388, this.NSM, 2389, 2401, this.L, 2402, 2403, this.NSM, 2404, 2432, this.L,
            2433, 2433, this.NSM, 2434, 2491, this.L, 2492, 2492, this.NSM, 2493, 2496, this.L,
            2497, 2500, this.NSM, 2501, 2508, this.L, 2509, 2509, this.NSM, 2510, 2529, this.L,
            2530, 2531, this.NSM, 2532, 2545, this.L, 2546, 2547, this.ET, 2548, 2560, this.L,
            2561, 2562, this.NSM, 2563, 2619, this.L, 2620, 2620, this.NSM, 2621, 2624, this.L,
            2625, 2626, this.NSM, 2627, 2630, this.L, 2631, 2632, this.NSM, 2633, 2634, this.L,
            2635, 2637, this.NSM, 2638, 2671, this.L, 2672, 2673, this.NSM, 2674, 2688, this.L,
            2689, 2690, this.NSM, 2691, 2747, this.L, 2748, 2748, this.NSM, 2749, 2752, this.L,
            2753, 2757, this.NSM, 2758, 2758, this.L, 2759, 2760, this.NSM, 2761, 2764, this.L,
            2765, 2765, this.NSM, 2766, 2785, this.L, 2786, 2787, this.NSM, 2788, 2800, this.L,
            2801, 2801, this.ET, 2802, 2816, this.L, 2817, 2817, this.NSM, 2818, 2875, this.L,
            2876, 2876, this.NSM, 2877, 2878, this.L, 2879, 2879, this.NSM, 2880, 2880, this.L,
            2881, 2883, this.NSM, 2884, 2892, this.L, 2893, 2893, this.NSM, 2894, 2901, this.L,
            2902, 2902, this.NSM, 2903, 2945, this.L, 2946, 2946, this.NSM, 2947, 3007, this.L,
            3008, 3008, this.NSM, 3009, 3020, this.L, 3021, 3021, this.NSM, 3022, 3058, this.L,
            3059, 3064, this.ON, 3065, 3065, this.ET, 3066, 3066, this.ON, 3067, 3133, this.L,
            3134, 3136, this.NSM, 3137, 3141, this.L, 3142, 3144, this.NSM, 3145, 3145, this.L,
            3146, 3149, this.NSM, 3150, 3156, this.L, 3157, 3158, this.NSM, 3159, 3259, this.L,
            3260, 3260, this.NSM, 3261, 3275, this.L, 3276, 3277, this.NSM, 3278, 3392, this.L,
            3393, 3395, this.NSM, 3396, 3404, this.L, 3405, 3405, this.NSM, 3406, 3529, this.L,
            3530, 3530, this.NSM, 3531, 3537, this.L, 3538, 3540, this.NSM, 3541, 3541, this.L,
            3542, 3542, this.NSM, 3543, 3632, this.L, 3633, 3633, this.NSM, 3634, 3635, this.L,
            3636, 3642, this.NSM, 3643, 3646, this.L, 3647, 3647, this.ET, 3648, 3654, this.L,
            3655, 3662, this.NSM, 3663, 3760, this.L, 3761, 3761, this.NSM, 3762, 3763, this.L,
            3764, 3769, this.NSM, 3770, 3770, this.L, 3771, 3772, this.NSM, 3773, 3783, this.L,
            3784, 3789, this.NSM, 3790, 3863, this.L, 3864, 3865, this.NSM, 3866, 3892, this.L,
            3893, 3893, this.NSM, 3894, 3894, this.L, 3895, 3895, this.NSM, 3896, 3896, this.L,
            3897, 3897, this.NSM, 3898, 3901, this.ON, 3902, 3952, this.L, 3953, 3966, this.NSM,
            3967, 3967, this.L, 3968, 3972, this.NSM, 3973, 3973, this.L, 3974, 3975, this.NSM,
            3976, 3983, this.L, 3984, 3991, this.NSM, 3992, 3992, this.L, 3993, 4028, this.NSM,
            4029, 4037, this.L, 4038, 4038, this.NSM, 4039, 4140, this.L, 4141, 4144, this.NSM,
            4145, 4145, this.L, 4146, 4146, this.NSM, 4147, 4149, this.L, 4150, 4151, this.NSM,
            4152, 4152, this.L, 4153, 4153, this.NSM, 4154, 4183, this.L, 4184, 4185, this.NSM,
            4186, 5759, this.L, 5760, 5760, this.WS, 5761, 5786, this.L, 5787, 5788, this.ON,
            5789, 5905, this.L, 5906, 5908, this.NSM, 5909, 5937, this.L, 5938, 5940, this.NSM,
            5941, 5969, this.L, 5970, 5971, this.NSM, 5972, 6001, this.L, 6002, 6003, this.NSM,
            6004, 6070, this.L, 6071, 6077, this.NSM, 6078, 6085, this.L, 6086, 6086, this.NSM,
            6087, 6088, this.L, 6089, 6099, this.NSM, 6100, 6106, this.L, 6107, 6107, this.ET,
            6108, 6108, this.L, 6109, 6109, this.NSM, 6110, 6127, this.L, 6128, 6137, this.ON,
            6138, 6143, this.L, 6144, 6154, this.ON, 6155, 6157, this.NSM, 6158, 6158, this.WS,
            6159, 6312, this.L, 6313, 6313, this.NSM, 6314, 6431, this.L, 6432, 6434, this.NSM,
            6435, 6438, this.L, 6439, 6443, this.NSM, 6444, 6449, this.L, 6450, 6450, this.NSM,
            6451, 6456, this.L, 6457, 6459, this.NSM, 6460, 6463, this.L, 6464, 6464, this.ON,
            6465, 6467, this.L, 6468, 6469, this.ON, 6470, 6623, this.L, 6624, 6655, this.ON,
            6656, 8124, this.L, 8125, 8125, this.ON, 8126, 8126, this.L, 8127, 8129, this.ON,
            8130, 8140, this.L, 8141, 8143, this.ON, 8144, 8156, this.L, 8157, 8159, this.ON,
            8160, 8172, this.L, 8173, 8175, this.ON, 8176, 8188, this.L, 8189, 8190, this.ON,
            8191, 8191, this.L, 8192, 8202, this.WS, 8203, 8205, this.BN, 8206, 8206, this.L,
            8207, 8207, this.R, 8208, 8231, this.ON, 8232, 8232, this.WS, 8233, 8233, this.B,
            8234, 8234, this.LRE, 8235, 8235, this.RLE, 8236, 8236, this.PDF, 8237, 8237, this.LRO,
            8238, 8238, this.RLO, 8239, 8239, this.WS, 8240, 8244, this.ET, 8245, 8276, this.ON,
            8277, 8278, this.L, 8279, 8279, this.ON, 8280, 8286, this.L, 8287, 8287, this.WS,
            8288, 8291, this.BN, 8292, 8297, this.L, 8298, 8303, this.BN, 8304, 8304, this.EN,
            8305, 8307, this.L, 8308, 8313, this.EN, 8314, 8315, this.ET, 8316, 8318, this.ON,
            8319, 8319, this.L, 8320, 8329, this.EN, 8330, 8331, this.ET, 8332, 8334, this.ON,
            8335, 8351, this.L, 8352, 8369, this.ET, 8370, 8399, this.L, 8400, 8426, this.NSM,
            8427, 8447, this.L, 8448, 8449, this.ON, 8450, 8450, this.L, 8451, 8454, this.ON,
            8455, 8455, this.L, 8456, 8457, this.ON, 8458, 8467, this.L, 8468, 8468, this.ON,
            8469, 8469, this.L, 8470, 8472, this.ON, 8473, 8477, this.L, 8478, 8483, this.ON,
            8484, 8484, this.L, 8485, 8485, this.ON, 8486, 8486, this.L, 8487, 8487, this.ON,
            8488, 8488, this.L, 8489, 8489, this.ON, 8490, 8493, this.L, 8494, 8494, this.ET,
            8495, 8497, this.L, 8498, 8498, this.ON, 8499, 8505, this.L, 8506, 8507, this.ON,
            8508, 8511, this.L, 8512, 8516, this.ON, 8517, 8521, this.L, 8522, 8523, this.ON,
            8524, 8530, this.L, 8531, 8543, this.ON, 8544, 8591, this.L, 8592, 8721, this.ON,
            8722, 8723, this.ET, 8724, 9013, this.ON, 9014, 9082, this.L, 9083, 9108, this.ON,
            9109, 9109, this.L, 9110, 9168, this.ON, 9169, 9215, this.L, 9216, 9254, this.ON,
            9255, 9279, this.L, 9280, 9290, this.ON, 9291, 9311, this.L, 9312, 9371, this.EN,
            9372, 9449, this.L, 9450, 9450, this.EN, 9451, 9751, this.ON, 9752, 9752, this.L,
            9753, 9853, this.ON, 9854, 9855, this.L, 9856, 9873, this.ON, 9874, 9887, this.L,
            9888, 9889, this.ON, 9890, 9984, this.L, 9985, 9988, this.ON, 9989, 9989, this.L,
            9990, 9993, this.ON, 9994, 9995, this.L, 9996, 10023, this.ON, 10024, 10024, this.L,
            10025, 10059, this.ON, 10060, 10060, this.L, 10061, 10061, this.ON, 10062, 10062, this.L,
            10063, 10066, this.ON, 10067, 10069, this.L, 10070, 10070, this.ON, 10071, 10071, this.L,
            10072, 10078, this.ON, 10079, 10080, this.L, 10081, 10132, this.ON, 10133, 10135, this.L,
            10136, 10159, this.ON, 10160, 10160, this.L, 10161, 10174, this.ON, 10175, 10191, this.L,
            10192, 10219, this.ON, 10220, 10223, this.L, 10224, 11021, this.ON, 11022, 11903, this.L,
            11904, 11929, this.ON, 11930, 11930, this.L, 11931, 12019, this.ON, 12020, 12031, this.L,
            12032, 12245, this.ON, 12246, 12271, this.L, 12272, 12283, this.ON, 12284, 12287, this.L,
            12288, 12288, this.WS, 12289, 12292, this.ON, 12293, 12295, this.L, 12296, 12320, this.ON,
            12321, 12329, this.L, 12330, 12335, this.NSM, 12336, 12336, this.ON, 12337, 12341, this.L,
            12342, 12343, this.ON, 12344, 12348, this.L, 12349, 12351, this.ON, 12352, 12440, this.L,
            12441, 12442, this.NSM, 12443, 12444, this.ON, 12445, 12447, this.L, 12448, 12448, this.ON,
            12449, 12538, this.L, 12539, 12539, this.ON, 12540, 12828, this.L, 12829, 12830, this.ON,
            12831, 12879, this.L, 12880, 12895, this.ON, 12896, 12923, this.L, 12924, 12925, this.ON,
            12926, 12976, this.L, 12977, 12991, this.ON, 12992, 13003, this.L, 13004, 13007, this.ON,
            13008, 13174, this.L, 13175, 13178, this.ON, 13179, 13277, this.L, 13278, 13279, this.ON,
            13280, 13310, this.L, 13311, 13311, this.ON, 13312, 19903, this.L, 19904, 19967, this.ON,
            19968, 42127, this.L, 42128, 42182, this.ON, 42183, 64284, this.L, 64285, 64285, this.R,
            64286, 64286, this.NSM, 64287, 64296, this.R, 64297, 64297, this.ET, 64298, 64310, this.R,
            64311, 64311, this.L, 64312, 64316, this.R, 64317, 64317, this.L, 64318, 64318, this.R,
            64319, 64319, this.L, 64320, 64321, this.R, 64322, 64322, this.L, 64323, 64324, this.R,
            64325, 64325, this.L, 64326, 64335, this.R, 64336, 64433, this.AL, 64434, 64466, this.L,
            64467, 64829, this.AL, 64830, 64831, this.ON, 64832, 64847, this.L, 64848, 64911, this.AL,
            64912, 64913, this.L, 64914, 64967, this.AL, 64968, 65007, this.L, 65008, 65020, this.AL,
            65021, 65021, this.ON, 65022, 65023, this.L, 65024, 65039, this.NSM, 65040, 65055, this.L,
            65056, 65059, this.NSM, 65060, 65071, this.L, 65072, 65103, this.ON, 65104, 65104, this.CS,
            65105, 65105, this.ON, 65106, 65106, this.CS, 65107, 65107, this.L, 65108, 65108, this.ON,
            65109, 65109, this.CS, 65110, 65118, this.ON, 65119, 65119, this.ET, 65120, 65121, this.ON,
            65122, 65123, this.ET, 65124, 65126, this.ON, 65127, 65127, this.L, 65128, 65128, this.ON,
            65129, 65130, this.ET, 65131, 65131, this.ON, 65132, 65135, this.L, 65136, 65140, this.AL,
            65141, 65141, this.L, 65142, 65276, this.AL, 65277, 65278, this.L, 65279, 65279, this.BN,
            65280, 65280, this.L, 65281, 65282, this.ON, 65283, 65285, this.ET, 65286, 65290, this.ON,
            65291, 65291, this.ET, 65292, 65292, this.CS, 65293, 65293, this.ET, 65294, 65294, this.CS,
            65295, 65295, this.ES, 65296, 65305, this.EN, 65306, 65306, this.CS, 65307, 65312, this.ON,
            65313, 65338, this.L, 65339, 65344, this.ON, 65345, 65370, this.L, 65371, 65381, this.ON,
            65382, 65503, this.L, 65504, 65505, this.ET, 65506, 65508, this.ON, 65509, 65510, this.ET,
            65511, 65511, this.L, 65512, 65518, this.ON, 65519, 65528, this.L, 65529, 65531, this.BN,
            65532, 65533, this.ON, 65534, 65535, this.L
        ];
        for (var i = 0; i < this.charTypes.length; ++i) {
            var start = this.charTypes[i];
            var end = this.charTypes[++i];
            var b = this.charTypes[++i];
            while (start <= end) {
                this.rtlCharacterTypes[start++] = b;
            }
        }
    }
    //#endregion
    //#region implementation
    RtlCharacters.prototype.getVisualOrder = function (inputText, isRtl) {
        this.types = this.getCharacterCode(inputText);
        this.textOrder = isRtl ? this.LRE : this.L;
        this.doVisualOrder();
        var result = [];
        for (var i = 0; i < this.levels.length; i++) {
            result[i] = this.levels[i];
        }
        return result;
    };
    RtlCharacters.prototype.getCharacterCode = function (text) {
        var characterCodes = [];
        for (var i = 0; i < text.length; i++) {
            characterCodes[i] = this.rtlCharacterTypes[text[i].charCodeAt(0)];
        }
        return characterCodes;
    };
    RtlCharacters.prototype.setDefaultLevels = function () {
        for (var i = 0; i < this.length; i++) {
            this.levels[i] = this.textOrder;
        }
    };
    RtlCharacters.prototype.setLevels = function () {
        this.setDefaultLevels();
        for (var n = 0; n < this.length; ++n) {
            var level = this.levels[n];
            if ((level & 0x80) !== 0) {
                level &= 0x7f;
                this.result[n] = ((level & 0x1) === 0) ? this.L : this.R;
            }
            this.levels[n] = level;
        }
    };
    RtlCharacters.prototype.updateLevels = function (index, level, length) {
        if ((level & 1) === 0) {
            for (var i = index; i < length; ++i) {
                if (this.result[i] === this.R) {
                    this.levels[i] += 1;
                }
                else if (this.result[i] !== this.L) {
                    this.levels[i] += 2;
                }
            }
        }
        else {
            for (var i = index; i < length; ++i) {
                if (this.result[i] !== this.R) {
                    this.levels[i] += 1;
                }
            }
        }
    };
    RtlCharacters.prototype.doVisualOrder = function () {
        this.length = this.types.length;
        this.result = this.types;
        this.levels = [];
        this.setLevels();
        this.length = this.getEmbeddedCharactersLength();
        var preview = this.textOrder;
        var i = 0;
        while (i < this.length) {
            var level = this.levels[i];
            var preType = ((Math.max(preview, level) & 0x1) === 0) ? this.L : this.R;
            var length_1 = i + 1;
            while (length_1 < this.length && this.levels[length_1] === level) {
                ++length_1;
            }
            var success = length_1 < this.length ? this.levels[length_1] : this.textOrder;
            var type = ((Math.max(success, level) & 0x1) === 0) ? this.L : this.R;
            this.checkNSM(i, length_1, level, preType, type);
            this.updateLevels(i, level, length_1);
            preview = level;
            i = length_1;
        }
        this.checkEmbeddedCharacters(this.length);
    };
    RtlCharacters.prototype.getEmbeddedCharactersLength = function () {
        var index = 0;
        for (var i = 0; i < this.length; ++i) {
            if (!(this.types[i] === this.LRE || this.types[i] === this.RLE || this.types[i] === this.LRO ||
                this.types[i] === this.RLO || this.types[i] === this.PDF || this.types[i] === this.BN)) {
                this.result[index] = this.result[i];
                this.levels[index] = this.levels[i];
                index++;
            }
        }
        return index;
    };
    RtlCharacters.prototype.checkEmbeddedCharacters = function (length) {
        for (var i = this.types.length - 1; i >= 0; --i) {
            if (this.types[i] === this.LRE || this.types[i] === this.RLE || this.types[i] === this.LRO ||
                this.types[i] === this.RLO || this.types[i] === this.PDF || this.types[i] === this.BN) {
                this.result[i] = this.types[i];
                this.levels[i] = -1;
            }
            else {
                length -= 1;
                this.result[i] = this.result[length];
                this.levels[i] = this.levels[length];
            }
        }
        for (var i = 0; i < this.types.length; i++) {
            if (this.levels[i] === -1) {
                if (i === 0) {
                    this.levels[i] = this.textOrder;
                }
                else {
                    this.levels[i] = this.levels[i - 1];
                }
            }
        }
    };
    RtlCharacters.prototype.checkNSM = function (index, length, level, startType, endType) {
        var charType = startType;
        for (var i = index; i < length; ++i) {
            if (this.result[i] === this.NSM) {
                this.result[i] = charType;
            }
            else {
                charType = this.result[i];
            }
        }
        this.checkEuropeanDigits(index, length, level, startType, endType);
    };
    RtlCharacters.prototype.checkEuropeanDigits = function (index, length, level, startType, endType) {
        for (var i = index; i < length; ++i) {
            if (this.result[i] === this.EN) {
                for (var j = i - 1; j >= index; --j) {
                    if (this.result[j] === this.L || this.result[j] === this.R || this.result[j] === this.AL) {
                        if (this.result[j] === this.AL) {
                            this.result[i] = this.AN;
                        }
                        break;
                    }
                }
            }
        }
        this.checkArabicCharacters(index, length, level, startType, endType);
    };
    RtlCharacters.prototype.checkArabicCharacters = function (index, length, level, startType, endType) {
        for (var i = index; i < length; ++i) {
            if (this.result[i] === this.AL) {
                this.result[i] = this.R;
            }
        }
        this.checkEuropeanNumberSeparator(index, length, level, startType, endType);
    };
    RtlCharacters.prototype.checkEuropeanNumberSeparator = function (index, length, level, startType, endType) {
        for (var i = index + 1; i < length - 1; ++i) {
            if (this.result[i] === this.ES || this.result[i] === this.CS) {
                var preview = this.result[i - 1];
                var success = this.result[i + 1];
                if (preview === this.EN && success === this.EN) {
                    this.result[i] = this.EN;
                }
                else if (this.result[i] === this.CS && preview === this.AN && success === this.AN) {
                    this.result[i] = this.AN;
                }
            }
        }
        this.checkEuropeanNumberTerminator(index, length, level, startType, endType);
    };
    RtlCharacters.prototype.checkEuropeanNumberTerminator = function (index, length, level, startType, endType) {
        for (var i = index; i < length; ++i) {
            if (this.result[i] === this.ET) {
                var s = i;
                var b = [];
                b.push(this.ET);
                var l = this.getLength(s, length, b);
                var data = s === index ? startType : this.result[s - 1];
                if (data !== this.EN) {
                    data = (l === length) ? endType : this.result[l];
                }
                if (data === this.EN) {
                    for (var j = s; j < l; ++j) {
                        this.result[j] = this.EN;
                    }
                }
                i = l;
            }
        }
        this.checkOtherNeutrals(index, length, level, startType, endType);
    };
    RtlCharacters.prototype.checkOtherNeutrals = function (index, length, level, startType, endType) {
        for (var i = index; i < length; ++i) {
            if (this.result[i] === this.ES || this.result[i] === this.ET || this.result[i] === this.CS) {
                this.result[i] = this.ON;
            }
        }
        this.checkOtherCharacters(index, length, level, startType, endType);
    };
    RtlCharacters.prototype.checkOtherCharacters = function (index, length, level, startType, endType) {
        for (var i = index; i < length; ++i) {
            if (this.result[i] === this.EN) {
                var pst = startType;
                for (var j = i - 1; j >= index; --j) {
                    if (this.result[j] === this.L || this.result[j] === this.R) {
                        pst = this.result[j];
                        break;
                    }
                }
                if (pst === this.L) {
                    this.result[i] = this.L;
                }
            }
        }
        this.checkCommanCharacters(index, length, level, startType, endType);
    };
    RtlCharacters.prototype.getLength = function (index, length, validSet) {
        --index;
        while (++index < length) {
            var t = this.result[index];
            for (var i = 0; i < validSet.length; ++i) {
                if (t === validSet[i]) {
                    index = this.getLength(++index, length, validSet);
                }
            }
            return index;
        }
        return length;
    };
    RtlCharacters.prototype.checkCommanCharacters = function (index, length, level, startType, endType) {
        for (var i = index; i < length; ++i) {
            if (this.result[i] === this.WS || this.result[i] === this.ON || this.result[i] === this.B ||
                this.result[i] === this.S) {
                var s = i;
                var byte = [this.B, this.S, this.WS, this.ON];
                var l = this.getLength(s, length, byte);
                var lt = 0;
                var tt = 0;
                var rt = 0;
                if (s === index) {
                    lt = startType;
                }
                else {
                    lt = this.result[s - 1];
                    if (lt === this.AN) {
                        lt = this.R;
                    }
                    else if (lt === this.EN) {
                        lt = this.R;
                    }
                }
                if (l === length) {
                    tt = endType;
                }
                else {
                    tt = this.result[l];
                    if (tt === this.AN) {
                        tt = this.R;
                    }
                    else if (tt === this.EN) {
                        tt = this.R;
                    }
                }
                if (lt === tt) {
                    rt = lt;
                }
                else {
                    rt = ((level & 0x1) === 0) ? this.L : this.R;
                }
                for (var j = s; j < l; ++j) {
                    this.result[j] = rt;
                }
                i = l;
            }
        }
    };
    return RtlCharacters;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-text-shape.js":
/*!*********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-text-shape.js ***!
  \*********************************************************************************************************/
/*! exports provided: ArabicShapeRenderer, ArabicShape */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArabicShapeRenderer", function() { return ArabicShapeRenderer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArabicShape", function() { return ArabicShape; });
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/**
 * ArabicShapeRenderer.ts class for EJ2-PDF
 */

var ArabicShapeRenderer = /** @class */ (function () {
    //#endregion
    //#region Constructor
    function ArabicShapeRenderer() {
        //#region Constants
        this.arabicCharTable = [['\u0621', '\uFE80'], ['\u0622', '\uFE81', '\uFE82'],
            ['\u0623', '\uFE83', '\uFE84'],
            ['\u0624', '\uFE85', '\uFE86'],
            ['\u0625', '\uFE87', '\uFE88'],
            ['\u0626', '\uFE89', '\uFE8A', '\uFE8B', '\uFE8C'],
            ['\u0627', '\uFE8D', '\uFE8E'],
            ['\u0628', '\uFE8F', '\uFE90', '\uFE91', '\uFE92'],
            ['\u0629', '\uFE93', '\uFE94'],
            ['\u062A', '\uFE95', '\uFE96', '\uFE97', '\uFE98'],
            ['\u062B', '\uFE99', '\uFE9A', '\uFE9B', '\uFE9C'],
            ['\u062C', '\uFE9D', '\uFE9E', '\uFE9F', '\uFEA0'],
            ['\u062D', '\uFEA1', '\uFEA2', '\uFEA3', '\uFEA4'],
            ['\u062E', '\uFEA5', '\uFEA6', '\uFEA7', '\uFEA8'],
            ['\u062F', '\uFEA9', '\uFEAA'],
            ['\u0630', '\uFEAB', '\uFEAC'],
            ['\u0631', '\uFEAD', '\uFEAE'],
            ['\u0632', '\uFEAF', '\uFEB0'],
            ['\u0633', '\uFEB1', '\uFEB2', '\uFEB3', '\uFEB4'],
            ['\u0634', '\uFEB5', '\uFEB6', '\uFEB7', '\uFEB8'],
            ['\u0635', '\uFEB9', '\uFEBA', '\uFEBB', '\uFEBC'],
            ['\u0636', '\uFEBD', '\uFEBE', '\uFEBF', '\uFEC0'],
            ['\u0637', '\uFEC1', '\uFEC2', '\uFEC3', '\uFEC4'],
            ['\u0638', '\uFEC5', '\uFEC6', '\uFEC7', '\uFEC8'],
            ['\u0639', '\uFEC9', '\uFECA', '\uFECB', '\uFECC'],
            ['\u063A', '\uFECD', '\uFECE', '\uFECF', '\uFED0'],
            ['\u0640', '\u0640', '\u0640', '\u0640', '\u0640'],
            ['\u0641', '\uFED1', '\uFED2', '\uFED3', '\uFED4'],
            ['\u0642', '\uFED5', '\uFED6', '\uFED7', '\uFED8'],
            ['\u0643', '\uFED9', '\uFEDA', '\uFEDB', '\uFEDC'],
            ['\u0644', '\uFEDD', '\uFEDE', '\uFEDF', '\uFEE0'],
            ['\u0645', '\uFEE1', '\uFEE2', '\uFEE3', '\uFEE4'],
            ['\u0646', '\uFEE5', '\uFEE6', '\uFEE7', '\uFEE8'],
            ['\u0647', '\uFEE9', '\uFEEA', '\uFEEB', '\uFEEC'],
            ['\u0648', '\uFEED', '\uFEEE'],
            ['\u0649', '\uFEEF', '\uFEF0', '\uFBE8', '\uFBE9'],
            ['\u064A', '\uFEF1', '\uFEF2', '\uFEF3', '\uFEF4'],
            ['\u0671', '\uFB50', '\uFB51'],
            ['\u0679', '\uFB66', '\uFB67', '\uFB68', '\uFB69'],
            ['\u067A', '\uFB5E', '\uFB5F', '\uFB60', '\uFB61'],
            ['\u067B', '\uFB52', '\uFB53', '\uFB54', '\uFB55'],
            ['\u067E', '\uFB56', '\uFB57', '\uFB58', '\uFB59'],
            ['\u067F', '\uFB62', '\uFB63', '\uFB64', '\uFB65'],
            ['\u0680', '\uFB5A', '\uFB5B', '\uFB5C', '\uFB5D'],
            ['\u0683', '\uFB76', '\uFB77', '\uFB78', '\uFB79'],
            ['\u0684', '\uFB72', '\uFB73', '\uFB74', '\uFB75'],
            ['\u0686', '\uFB7A', '\uFB7B', '\uFB7C', '\uFB7D'],
            ['\u0687', '\uFB7E', '\uFB7F', '\uFB80', '\uFB81'],
            ['\u0688', '\uFB88', '\uFB89'],
            ['\u068C', '\uFB84', '\uFB85'],
            ['\u068D', '\uFB82', '\uFB83'],
            ['\u068E', '\uFB86', '\uFB87'],
            ['\u0691', '\uFB8C', '\uFB8D'],
            ['\u0698', '\uFB8A', '\uFB8B'],
            ['\u06A4', '\uFB6A', '\uFB6B', '\uFB6C', '\uFB6D'],
            ['\u06A6', '\uFB6E', '\uFB6F', '\uFB70', '\uFB71'],
            ['\u06A9', '\uFB8E', '\uFB8F', '\uFB90', '\uFB91'],
            ['\u06AD', '\uFBD3', '\uFBD4', '\uFBD5', '\uFBD6'],
            ['\u06AF', '\uFB92', '\uFB93', '\uFB94', '\uFB95'],
            ['\u06B1', '\uFB9A', '\uFB9B', '\uFB9C', '\uFB9D'],
            ['\u06B3', '\uFB96', '\uFB97', '\uFB98', '\uFB99'],
            ['\u06BA', '\uFB9E', '\uFB9F'],
            ['\u06BB', '\uFBA0', '\uFBA1', '\uFBA2', '\uFBA3'],
            ['\u06BE', '\uFBAA', '\uFBAB', '\uFBAC', '\uFBAD'],
            ['\u06C0', '\uFBA4', '\uFBA5'],
            ['\u06C1', '\uFBA6', '\uFBA7', '\uFBA8', '\uFBA9'],
            ['\u06C5', '\uFBE0', '\uFBE1'],
            ['\u06C6', '\uFBD9', '\uFBDA'],
            ['\u06C7', '\uFBD7', '\uFBD8'],
            ['\u06C8', '\uFBDB', '\uFBDC'],
            ['\u06C9', '\uFBE2', '\uFBE3'],
            ['\u06CB', '\uFBDE', '\uFBDF'],
            ['\u06CC', '\uFBFC', '\uFBFD', '\uFBFE', '\uFBFF'],
            ['\u06D0', '\uFBE4', '\uFBE5', '\uFBE6', '\uFBE7'],
            ['\u06D2', '\uFBAE', '\uFBAF'],
            ['\u06D3', '\uFBB0', '\uFBB1']
        ];
        this.alef = '\u0627';
        this.alefHamza = '\u0623';
        this.alefHamzaBelow = '\u0625';
        this.alefMadda = '\u0622';
        this.lam = '\u0644';
        this.hamza = '\u0621';
        this.zeroWidthJoiner = '\u200D';
        this.hamzaAbove = '\u0654';
        this.hamzaBelow = '\u0655';
        this.wawHamza = '\u0624';
        this.yehHamza = '\u0626';
        this.waw = '\u0648';
        this.alefMaksura = '\u0649';
        this.yeh = '\u064A';
        this.farsiYeh = '\u06CC';
        this.shadda = '\u0651';
        this.madda = '\u0653';
        this.lwa = '\uFEFB';
        this.lwawh = '\uFEF7';
        this.lwawhb = '\uFEF9';
        this.lwawm = '\uFEF5';
        this.bwhb = '\u06D3';
        this.fathatan = '\u064B';
        this.superScriptalef = '\u0670';
        this.vowel = 0x1;
        // #endregion
        //#region Fields
        this.arabicMapTable = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
        for (var i = 0; i < this.arabicCharTable.length; i++) {
            this.arabicMapTable.setValue(this.arabicCharTable[i][0], this.arabicCharTable[i]);
        }
    }
    //#endregion
    //#region implementation
    ArabicShapeRenderer.prototype.getCharacterShape = function (input, index) {
        if ((input >= this.hamza) && (input <= this.bwhb)) {
            var value = [];
            if (this.arabicMapTable.getValue(input)) {
                value = this.arabicMapTable.getValue(input);
                return value[index + 1];
            }
        }
        else if (input >= this.lwawm && input <= this.lwa) {
            return (input);
        }
        return input;
    };
    ArabicShapeRenderer.prototype.shape = function (text, level) {
        var builder = '';
        var str2 = '';
        for (var i = 0; i < text.length; i++) {
            var c = text[i];
            if (c >= '؀' && c <= 'ۿ') {
                //if(c>= 0x0600.toString() && c<= 0x06FF.toString()) {
                str2 = str2 + c;
            }
            else {
                if (str2.length > 0) {
                    var st = this.doShape(str2.toString(), 0);
                    builder = builder + st;
                    str2 = '';
                }
                builder = builder + c;
            }
        }
        if (str2.length > 0) {
            var st = this.doShape(str2.toString(), 0);
            builder = builder + st;
        }
        return builder.toString();
    };
    ArabicShapeRenderer.prototype.doShape = function (input, level) {
        var str = '';
        var ligature = 0;
        var len = 0;
        var i = 0;
        var next = '';
        var previous = new ArabicShape();
        var present = new ArabicShape();
        while (i < input.length) {
            next = input[i++];
            ligature = this.ligature(next, present);
            if (ligature === 0) {
                var shapeCount = this.getShapeCount(next);
                len = (shapeCount === 1) ? 0 : 2;
                if (previous.Shapes > 2) {
                    len += 1;
                }
                len = len % (present.Shapes);
                present.Value = this.getCharacterShape(present.Value, len);
                str = this.append(str, previous, level);
                previous = present;
                present = new ArabicShape();
                present.Value = next;
                present.Shapes = shapeCount;
                present.Ligature++;
            }
        }
        len = (previous.Shapes > 2) ? 1 : 0;
        len = len % (present.Shapes);
        present.Value = this.getCharacterShape(present.Value, len);
        str = this.append(str, previous, level);
        str = this.append(str, present, level);
        return str.toString();
    };
    ArabicShapeRenderer.prototype.append = function (builder, shape, level) {
        if (shape.Value !== '') {
            builder = builder + shape.Value;
            shape.Ligature -= 1;
            if (shape.Type !== '') {
                if ((level & this.vowel) === 0) {
                    builder = builder + shape.Type;
                    shape.Ligature -= 1;
                }
                else {
                    shape.Ligature -= 1;
                }
            }
            if (shape.vowel !== '') {
                if ((level & this.vowel) === 0) {
                    builder = builder + shape.vowel;
                    shape.Ligature -= 1;
                }
                else {
                    shape.Ligature -= 1;
                }
            }
        }
        return builder;
    };
    ArabicShapeRenderer.prototype.ligature = function (value, shape) {
        if (shape.Value !== '') {
            var result = 0;
            if ((value >= this.fathatan && value <= this.hamzaBelow) || value === this.superScriptalef) {
                result = 1;
                if ((shape.vowel !== '') && (value !== this.shadda)) {
                    result = 2;
                }
                if (value === this.shadda) {
                    if (shape.Type == null) {
                        shape.Type = this.shadda;
                    }
                    else {
                        return 0;
                    }
                }
                else if (value === this.hamzaBelow) {
                    if (shape.Value === this.alef) {
                        shape.Value = this.alefHamzaBelow;
                        result = 2;
                    }
                    else if (value === this.lwa) {
                        shape.Value = this.lwawhb;
                        result = 2;
                    }
                    else {
                        shape.Type = this.hamzaBelow;
                    }
                }
                else if (value === this.hamzaAbove) {
                    if (shape.Value === this.alef) {
                        shape.Value = this.alefHamza;
                        result = 2;
                    }
                    else if (shape.Value === this.lwa) {
                        shape.Value = this.lwawh;
                        result = 2;
                    }
                    else if (shape.Value === this.waw) {
                        shape.Value = this.wawHamza;
                        result = 2;
                    }
                    else if (shape.Value === this.yeh || shape.Value === this.alefMaksura || shape.Value === this.farsiYeh) {
                        shape.Value = this.yehHamza;
                        result = 2;
                    }
                    else {
                        shape.Type = this.hamzaAbove;
                    }
                }
                else if (value === this.madda) {
                    if (shape.Value === this.alef) {
                        shape.Value = this.alefMadda;
                        result = 2;
                    }
                }
                else {
                    shape.vowel = value;
                }
                if (result === 1) {
                    shape.Ligature++;
                }
                return result;
            }
            if (shape.vowel !== '') {
                return 0;
            }
            if (shape.Value === this.lam) {
                if (value === this.alef) {
                    shape.Value = this.lwa;
                    shape.Shapes = 2;
                    result = 3;
                }
                else if (value === this.alefHamza) {
                    shape.Value = this.lwawh;
                    shape.Shapes = 2;
                    result = 3;
                }
                else if (value === this.alefHamzaBelow) {
                    shape.Value = this.lwawhb;
                    shape.Shapes = 2;
                    result = 3;
                }
                else if (value === this.alefMadda) {
                    shape.Value = this.lwawm;
                    shape.Shapes = 2;
                    result = 3;
                }
            }
            // else if (shape.Value === '') {
            //     shape.Value = value;
            //     shape.Shapes = this.getShapeCount(value);
            //     result = 1;
            // }
            return result;
        }
        else {
            return 0;
        }
    };
    ArabicShapeRenderer.prototype.getShapeCount = function (shape) {
        if ((shape >= this.hamza) && (shape <= this.bwhb) && !((shape >= this.fathatan && shape <= this.hamzaBelow)
            || shape === this.superScriptalef)) {
            var c = [];
            if (this.arabicMapTable.getValue(shape)) {
                c = this.arabicMapTable.getValue(shape);
                return c.length - 1;
            }
        }
        else if (shape === this.zeroWidthJoiner) {
            return 4;
        }
        return 1;
    };
    return ArabicShapeRenderer;
}());

//#endregion
//#region Internals
var ArabicShape = /** @class */ (function () {
    function ArabicShape() {
        //#region Fields
        this.shapeValue = '';
        this.shapeType = '';
        this.shapeVowel = '';
        this.shapeLigature = 0;
        this.shapeShapes = 1;
        //#endregion
    }
    Object.defineProperty(ArabicShape.prototype, "Value", {
        //#endregion
        //#region Properties 
        /**
         * Gets or sets the values.
         * @private
         */
        get: function () {
            return this.shapeValue;
        },
        set: function (value) {
            this.shapeValue = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ArabicShape.prototype, "Type", {
        /**
         * Gets or sets the values.
         * @private
         */
        get: function () {
            return this.shapeType;
        },
        set: function (value) {
            this.shapeType = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ArabicShape.prototype, "vowel", {
        /**
         * Gets or sets the values.
         * @private
         */
        get: function () {
            return this.shapeVowel;
        },
        set: function (value) {
            this.shapeVowel = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ArabicShape.prototype, "Ligature", {
        /**
         * Gets or sets the values.
         * @private
         */
        get: function () {
            return this.shapeLigature;
        },
        set: function (value) {
            this.shapeLigature = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ArabicShape.prototype, "Shapes", {
        /**
         * Gets or sets the values.
         * @private
         */
        get: function () {
            return this.shapeShapes;
        },
        set: function (value) {
            this.shapeShapes = value;
        },
        enumerable: true,
        configurable: true
    });
    return ArabicShape;
}());

//#endregion


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js":
/*!******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js ***!
  \******************************************************************************************************/
/*! exports provided: PdfStringLayouter, PdfStringLayoutResult, LineInfo, LineType */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfStringLayouter", function() { return PdfStringLayouter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfStringLayoutResult", function() { return PdfStringLayoutResult; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineInfo", function() { return LineInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineType", function() { return LineType; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _string_tokenizer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./string-tokenizer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-tokenizer.js");



/**
 * Class `lay outing the text`.
 */
var PdfStringLayouter = /** @class */ (function () {
    // Constructors
    /**
     * Initializes a new instance of the `StringLayouter` class.
     * @private
     */
    function PdfStringLayouter() {
        /**
         * Checks whether the x co-ordinate is need to set as client size or not.
         * @hidden
         * @private
         */
        this.isOverloadWithPosition = false;
        //
    }
    PdfStringLayouter.prototype.layout = function (arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
        if (arg4 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["RectangleF"]) {
            this.initialize(arg1, arg2, arg3, arg4, arg5);
            this.isOverloadWithPosition = arg6;
            this.clientSize = arg7;
            var result = this.doLayout();
            this.clear();
            return result;
        }
        else {
            this.initialize(arg1, arg2, arg3, arg4);
            this.isOverloadWithPosition = arg5;
            this.clientSize = arg6;
            var result = this.doLayout();
            this.clear();
            return result;
        }
    };
    PdfStringLayouter.prototype.initialize = function (text, font, format, rectSize, pageHeight) {
        if (typeof pageHeight === 'number') {
            if (text == null) {
                throw new Error('ArgumentNullException:text');
            }
            if (font == null) {
                throw new Error('ArgumentNullException:font');
            }
            this.text = text;
            this.font = font;
            this.format = format;
            this.size = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](rectSize.width, rectSize.height);
            this.rectangle = rectSize;
            this.pageHeight = pageHeight;
            this.reader = new _string_tokenizer__WEBPACK_IMPORTED_MODULE_2__["StringTokenizer"](text);
        }
        else {
            this.initialize(text, font, format, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"](0, 0), rectSize), 0);
        }
    };
    /**
     * `Clear` all resources.
     * @private
     */
    PdfStringLayouter.prototype.clear = function () {
        this.font = null;
        this.format = null;
        this.reader.close();
        this.reader = null;
        this.text = null;
    };
    /**
     * `Layouts` the text.
     * @private
     */
    PdfStringLayouter.prototype.doLayout = function () {
        var result = new PdfStringLayoutResult();
        var lineResult = new PdfStringLayoutResult();
        var lines = [];
        var line = this.reader.peekLine();
        var lineIndent = this.getLineIndent(true);
        while (line != null) {
            lineResult = this.layoutLine(line, lineIndent);
            if (lineResult !== null || typeof lineResult !== 'undefined') {
                var numSymbolsInserted = 0;
                /* tslint:disable */
                var returnedValue = this.copyToResult(result, lineResult, lines, /*out*/ numSymbolsInserted);
                /* tslint:enable */
                var success = returnedValue.success;
                numSymbolsInserted = returnedValue.numInserted;
                if (!success) {
                    this.reader.read(numSymbolsInserted);
                    break;
                }
            }
            // if (lineResult.textRemainder != null && lineResult.textRemainder.length > 0 ) {
            //     break;
            // }
            this.reader.readLine();
            line = this.reader.peekLine();
            lineIndent = this.getLineIndent(false);
        }
        this.finalizeResult(result, lines);
        return result;
    };
    /**
     * Returns `line indent` for the line.
     * @private
     */
    PdfStringLayouter.prototype.getLineIndent = function (firstLine) {
        var lineIndent = 0;
        if (this.format != null) {
            lineIndent = (firstLine) ? this.format.firstLineIndent : this.format.paragraphIndent;
            lineIndent = (this.size.width > 0) ? Math.min(this.size.width, lineIndent) : lineIndent;
        }
        return lineIndent;
    };
    /**
     * Calculates `height` of the line.
     * @private
     */
    PdfStringLayouter.prototype.getLineHeight = function () {
        var height = this.font.height;
        if (this.format != null && this.format.lineSpacing !== 0) {
            height = this.format.lineSpacing + this.font.height;
        }
        return height;
    };
    /**
     * Calculates `width` of the line.
     * @private
     */
    PdfStringLayouter.prototype.getLineWidth = function (line) {
        var width = this.font.getLineWidth(line, this.format);
        return width;
    };
    // tslint:disable
    /**
     * `Layouts` line.
     * @private
     */
    PdfStringLayouter.prototype.layoutLine = function (line, lineIndent) {
        var lineResult = new PdfStringLayoutResult();
        lineResult.layoutLineHeight = this.getLineHeight();
        var lines = [];
        var maxWidth = this.size.width;
        var lineWidth = this.getLineWidth(line) + lineIndent;
        var lineType = LineType.FirstParagraphLine;
        var readWord = true;
        // line is in bounds.
        if (maxWidth <= 0 || Math.round(lineWidth) <= Math.round(maxWidth)) {
            this.addToLineResult(lineResult, lines, line, lineWidth, LineType.NewLineBreak | lineType);
        }
        else {
            var builder = '';
            var curLine = '';
            lineWidth = lineIndent;
            var curIndent = lineIndent;
            var reader = new _string_tokenizer__WEBPACK_IMPORTED_MODULE_2__["StringTokenizer"](line);
            var word = reader.peekWord();
            var isSingleWord = false;
            if (word.length !== reader.length) {
                if (word === ' ') {
                    curLine = curLine + word;
                    builder = builder + word;
                    reader.position += 1;
                    word = reader.peekWord();
                }
            }
            while (word != null) {
                curLine = curLine + word;
                var curLineWidth = this.getLineWidth(curLine.toString()) + curIndent /*)*/;
                if (curLine.toString() === ' ') {
                    curLine = '';
                    curLineWidth = 0;
                }
                if (curLineWidth > maxWidth) {
                    if (this.getWrapType() === _enum__WEBPACK_IMPORTED_MODULE_1__["PdfWordWrapType"].None) {
                        break;
                    }
                    if (curLine.length === word.length) {
                        //  Character wrap is disabled or one symbol is greater than bounds.
                        if (this.getWrapType() === _enum__WEBPACK_IMPORTED_MODULE_1__["PdfWordWrapType"].WordOnly) {
                            lineResult.textRemainder = line.substring(reader.position);
                            break;
                        }
                        else if (curLine.length === 1) {
                            builder = builder + word;
                            break;
                        }
                        else {
                            readWord = false;
                            curLine = '';
                            word = reader.peek().toString();
                            continue;
                        }
                    }
                    else {
                        if (this.getLineWidth(word.toString()) > maxWidth) {
                            this.format.wordWrap = _enum__WEBPACK_IMPORTED_MODULE_1__["PdfWordWrapType"].Character;
                        }
                        else {
                            if (typeof this.format !== 'undefined' && this.format !== null) {
                                this.format.wordWrap = _enum__WEBPACK_IMPORTED_MODULE_1__["PdfWordWrapType"].Word;
                            }
                        }
                        if (this.getWrapType() !== _enum__WEBPACK_IMPORTED_MODULE_1__["PdfWordWrapType"].Character || !readWord) {
                            var ln = builder.toString();
                            // if (ln.indexOf(' ') === -1) {
                            //     isSingleWord = true;
                            //     this.addToLineResult(lineResult, lines, curLine, lineWidth, LineType.LayoutBreak | lineType);
                            // } else {
                            //     this.addToLineResult(lineResult, lines, ln, lineWidth, LineType.LayoutBreak | lineType);
                            // }                          
                            if (ln !== ' ') {
                                this.addToLineResult(lineResult, lines, ln, lineWidth, LineType.LayoutBreak | lineType);
                            }
                            if (this.isOverloadWithPosition) {
                                maxWidth = this.clientSize.width;
                            }
                            curLine = '';
                            builder = '';
                            lineWidth = 0;
                            curIndent = 0;
                            curLineWidth = 0;
                            lineType = LineType.None;
                            // if (isSingleWord) {
                            //     reader.readWord();
                            //     readWord = false;
                            // }
                            word = (readWord) ? word : reader.peekWord();
                            //isSingleWord = false;
                            readWord = true;
                        }
                        else {
                            readWord = false;
                            curLine = '';
                            curLine = curLine + builder.toString();
                            word = reader.peek().toString();
                        }
                        continue;
                    }
                }
                /*tslint:disable:max-func-body-length */
                builder = builder + word;
                lineWidth = curLineWidth;
                if (readWord) {
                    reader.readWord();
                    word = reader.peekWord();
                    //isSingleWord = false;
                }
                else {
                    reader.read();
                    word = reader.peek().toString();
                }
            }
            if (builder.length > 0) {
                var ln = builder.toString();
                this.addToLineResult(lineResult, lines, ln, lineWidth, LineType.NewLineBreak | LineType.LastParagraphLine);
            }
            reader.close();
        }
        lineResult.layoutLines = [];
        for (var index = 0; index < lines.length; index++) {
            lineResult.layoutLines.push(lines[index]);
        }
        lines = [];
        return lineResult;
    };
    /**
     * `Adds` line to line result.
     * @private
     */
    PdfStringLayouter.prototype.addToLineResult = function (lineResult, lines, line, lineWidth, breakType) {
        var info = new LineInfo();
        info.text = line;
        info.width = lineWidth;
        info.lineType = breakType;
        lines.push(info);
        var size = lineResult.actualSize;
        size.height += this.getLineHeight();
        size.width = Math.max(size.width, lineWidth);
        lineResult.size = size;
    };
    /**
     * `Copies` layout result from line result to entire result. Checks whether we can proceed lay outing or not.
     * @private
     */
    PdfStringLayouter.prototype.copyToResult = function (result, lineResult, lines, 
    /*out*/ numInserted) {
        var success = true;
        var allowPartialLines = (this.format != null && !this.format.lineLimit);
        var height = result.actualSize.height;
        var maxHeight = this.size.height;
        if ((this.pageHeight > 0) && (maxHeight + this.rectangle.y > this.pageHeight)) {
            maxHeight = this.rectangle.y - this.pageHeight;
            maxHeight = Math.max(maxHeight, -maxHeight);
        }
        numInserted = 0;
        if (lineResult.lines != null) {
            for (var i = 0, len = lineResult.lines.length; i < len; i++) {
                var expHeight = height + lineResult.lineHeight;
                if (expHeight <= maxHeight || maxHeight <= 0 || allowPartialLines) {
                    var info = lineResult.lines[i];
                    numInserted += info.text.length;
                    info = this.trimLine(info, (lines.length === 0));
                    lines.push(info);
                    // Update width.
                    var size = result.actualSize;
                    size.width = Math.max(size.width, info.width);
                    result.size = size;
                    // The part of the line fits only and it's allowed to use partial lines.
                    // if (expHeight >= maxHeight && maxHeight > 0 && allowPartialLines)
                    // {
                    //     let shouldClip : boolean = (this.format == null || !this.format.noClip);
                    //     if (shouldClip)
                    //     {
                    //         let exceededHeight : number = expHeight - maxHeight;
                    //         let fitHeight : number  = /*Utils.Round(*/ lineResult.lineHeight - exceededHeight /*)*/;
                    //         height = /*Utils.Round(*/ height + fitHeight /*)*/;
                    //     }
                    //     else
                    //     {
                    //         height = expHeight;
                    //     }
                    //     success = false;
                    //     break;
                    // } else {
                    height = expHeight;
                    // }
                }
                else {
                    success = false;
                    break;
                }
            }
        }
        if (height != result.size.height) {
            var size1 = result.actualSize;
            size1.height = height;
            result.size = size1;
        }
        return { success: success, numInserted: numInserted };
    };
    /**
     * `Finalizes` final result.
     * @private
     */
    PdfStringLayouter.prototype.finalizeResult = function (result, lines) {
        result.layoutLines = [];
        for (var index = 0; index < lines.length; index++) {
            result.layoutLines.push(lines[index]);
        }
        result.layoutLineHeight = this.getLineHeight();
        if (!this.reader.end) {
            result.textRemainder = this.reader.readToEnd();
        }
        lines = [];
    };
    /**
     * `Trims` whitespaces at the line.
     * @private
     */
    PdfStringLayouter.prototype.trimLine = function (info, firstLine) {
        var line = info.text;
        var lineWidth = info.width;
        // Trim start whitespaces if the line is not a start of the paragraph only.
        var trimStartSpaces = ((info.lineType & LineType.FirstParagraphLine) === 0);
        var start = (this.format == null || !this.format.rightToLeft);
        var spaces = _string_tokenizer__WEBPACK_IMPORTED_MODULE_2__["StringTokenizer"].spaces;
        line = (start) ? line.trim() : line.trim();
        // Recalculate line width.
        if (line.length !== info.text.length) {
            lineWidth = this.getLineWidth(line);
            if ((info.lineType & LineType.FirstParagraphLine) > 0) {
                lineWidth += this.getLineIndent(firstLine);
            }
        }
        info.text = line;
        info.width = lineWidth;
        return info;
    };
    /**
     * Returns `wrap` type.
     * @private
     */
    PdfStringLayouter.prototype.getWrapType = function () {
        var wrapType = (this.format != null) ? this.format.wordWrap : _enum__WEBPACK_IMPORTED_MODULE_1__["PdfWordWrapType"].Word;
        return wrapType;
    };
    return PdfStringLayouter;
}());

//Internal declaration
var PdfStringLayoutResult = /** @class */ (function () {
    function PdfStringLayoutResult() {
    }
    Object.defineProperty(PdfStringLayoutResult.prototype, "remainder", {
        // Properties
        /**
         * Gets the `text` which is not lay outed.
         * @private
         */
        get: function () {
            return this.textRemainder;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringLayoutResult.prototype, "actualSize", {
        /**
         * Gets the actual layout text `bounds`.
         * @private
         */
        get: function () {
            if (typeof this.size === 'undefined') {
                this.size = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](0, 0);
            }
            return this.size;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringLayoutResult.prototype, "lines", {
        /**
         * Gets layout `lines` information.
         * @private
         */
        get: function () {
            return this.layoutLines;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringLayoutResult.prototype, "lineHeight", {
        /**
         * Gets the `height` of the line.
         * @private
         */
        get: function () {
            return this.layoutLineHeight;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringLayoutResult.prototype, "empty", {
        /**
         * Gets value that indicates whether any layout text [`empty`].
         * @private
         */
        get: function () {
            return (this.layoutLines == null || this.layoutLines.length === 0);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStringLayoutResult.prototype, "lineCount", {
        /**
         * Gets `number of` the layout lines.
         * @private
         */
        get: function () {
            var count = (!this.empty) ? this.layoutLines.length : 0;
            return count;
        },
        enumerable: true,
        configurable: true
    });
    return PdfStringLayoutResult;
}());

var LineInfo = /** @class */ (function () {
    function LineInfo() {
    }
    Object.defineProperty(LineInfo.prototype, "lineType", {
        //Properties
        /**
         * Gets the `type` of the line text.
         * @private
         */
        get: function () {
            return this.type;
        },
        set: function (value) {
            this.type = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LineInfo.prototype, "text", {
        /**
         * Gets the line `text`.
         * @private
         */
        get: function () {
            return this.content;
        },
        set: function (value) {
            this.content = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LineInfo.prototype, "width", {
        /**
         * Gets `width` of the line text.
         * @private
         */
        get: function () {
            return this.lineWidth;
        },
        set: function (value) {
            this.lineWidth = value;
        },
        enumerable: true,
        configurable: true
    });
    return LineInfo;
}());

/**
* Break type of the `line`.
* @private
*/
var LineType;
(function (LineType) {
    /**
     * Specifies the type of `None`.
     * @private
     */
    LineType[LineType["None"] = 0] = "None";
    /**
     * Specifies the type of `NewLineBreak`.
     * @private
     */
    LineType[LineType["NewLineBreak"] = 1] = "NewLineBreak";
    /**
     * Specifies the type of `LayoutBreak`.
     * @private
     */
    LineType[LineType["LayoutBreak"] = 2] = "LayoutBreak";
    /**
     * Specifies the type of `FirstParagraphLine`.
     * @private
     */
    LineType[LineType["FirstParagraphLine"] = 4] = "FirstParagraphLine";
    /**
     * Specifies the type of `LastParagraphLine`.
     * @private
     */
    LineType[LineType["LastParagraphLine"] = 8] = "LastParagraphLine";
})(LineType || (LineType = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-tokenizer.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-tokenizer.js ***!
  \*******************************************************************************************************/
/*! exports provided: StringTokenizer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringTokenizer", function() { return StringTokenizer; });
/**
 * StringTokenizer.ts class for EJ2-PDF
 * Utility class for working with strings.
 * @private
 */
var StringTokenizer = /** @class */ (function () {
    // Constructors
    /**
     * Initializes a new instance of the `StringTokenizer` class.
     * @private
     */
    function StringTokenizer(textValue) {
        /**
         * Current `position`.
         * @private
         */
        this.currentPosition = 0;
        if (textValue == null) {
            throw new Error('ArgumentNullException:text');
        }
        this.text = textValue;
    }
    Object.defineProperty(StringTokenizer.prototype, "length", {
        // Properties
        /**
         * Gets text `length`.
         * @private
         */
        get: function () {
            return this.text.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StringTokenizer.prototype, "end", {
        get: function () {
            return (this.currentPosition === this.text.length);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StringTokenizer.prototype, "position", {
        /**
         * Gets or sets the position.
         * @private
         */
        get: function () {
            return this.currentPosition;
        },
        set: function (value) {
            this.currentPosition = value;
        },
        enumerable: true,
        configurable: true
    });
    StringTokenizer.getCharsCount = function (text, symbols) {
        if (typeof symbols === 'string') {
            if (text == null) {
                throw new Error('ArgumentNullException:wholeText');
            }
            var numSymbols = 0;
            var curIndex = 0;
            for (;;) {
                curIndex = text.indexOf(symbols, curIndex);
                if (curIndex === -1) {
                    break;
                }
                else {
                    numSymbols++;
                    curIndex++;
                }
            }
            return numSymbols;
        }
        else {
            if (text == null) {
                throw new Error('ArgumentNullException:text');
            }
            if (symbols == null) {
                throw new Error('ArgumentNullException:symbols');
            }
            var count = 0;
            for (var i = 0, len = text.length; i < len; i++) {
                var ch = text[i];
                if (this.contains(symbols, ch)) {
                    count++;
                }
            }
            return count;
        }
    };
    /**
     * Reads line of the text.
     * @private
     */
    StringTokenizer.prototype.readLine = function () {
        var pos = this.currentPosition;
        while (pos < this.length) {
            var ch = this.text[pos];
            switch (ch) {
                case '\r':
                case '\n': {
                    var text = this.text.substring(this.currentPosition, pos - this.currentPosition);
                    this.currentPosition = pos + 1;
                    this.currentPosition++;
                    return text;
                }
            }
            pos++;
        }
        // The remaining text.
        if (pos > this.currentPosition) {
            var text2 = this.text.substring(this.currentPosition, pos - this.currentPosition);
            this.currentPosition = pos;
            return text2;
        }
        return null;
    };
    /**
     * Reads line of the text.
     * @private
     */
    StringTokenizer.prototype.peekLine = function () {
        var pos = this.currentPosition;
        var line = this.readLine();
        this.currentPosition = pos;
        return line;
    };
    /**
     * Reads a word from the text.
     * @private
     */
    StringTokenizer.prototype.readWord = function () {
        var pos = this.currentPosition;
        while (pos < this.length) {
            var ch = this.text[pos];
            switch (ch) {
                case '\r':
                case '\n':
                    var textValue = this.text.substr(this.currentPosition, pos - this.currentPosition);
                    this.currentPosition = pos + 1;
                    if (((ch === '\r') && (this.currentPosition < this.length)) && (this.text[this.currentPosition] === '\n')) {
                        this.currentPosition++;
                    }
                    return textValue;
                case ' ':
                case '\t': {
                    if (pos === this.currentPosition) {
                        pos++;
                    }
                    var text = this.text.substr(this.currentPosition, pos - this.currentPosition);
                    this.currentPosition = pos;
                    return text;
                }
            }
            pos++;
        }
        // The remaining text.
        if (pos > this.currentPosition) {
            var text2 = this.text.substr(this.currentPosition, pos - this.currentPosition);
            this.currentPosition = pos;
            return text2;
        }
        return null;
    };
    /**
     * Peeks a word from the text.
     * @private
     */
    StringTokenizer.prototype.peekWord = function () {
        var pos = this.currentPosition;
        var word = this.readWord();
        this.currentPosition = pos;
        return word;
    };
    StringTokenizer.prototype.read = function (count) {
        if (typeof count === 'undefined') {
            var ch = '0';
            if (!this.end) {
                ch = this.text[this.currentPosition];
                this.currentPosition++;
            }
            return ch;
        }
        else {
            var num = 0;
            var builder = '';
            while (!this.end && num < count) {
                var ch = this.read();
                builder = builder + ch;
                num++;
            }
            return builder;
        }
    };
    /**
     * Peeks char form the data.
     * @private
     */
    StringTokenizer.prototype.peek = function () {
        var ch = '0';
        if (!this.end) {
            ch = this.text[this.currentPosition];
        }
        return ch;
    };
    /**
     * Closes a reader.
     * @private
     */
    StringTokenizer.prototype.close = function () {
        this.text = null;
    };
    StringTokenizer.prototype.readToEnd = function () {
        var text;
        if (this.currentPosition === 0) {
            text = this.text;
        }
        else {
            text = this.text.substring(this.length, this.currentPosition);
        }
        this.currentPosition = this.length;
        return text;
    };
    //Implementation
    /**
     * Checks whether array contains a symbol.
     * @private
     */
    StringTokenizer.contains = function (array, symbol) {
        var contains = false;
        for (var i = 0; i < array.length; i++) {
            if (array[i] === symbol) {
                contains = true;
                break;
            }
        }
        return contains;
    };
    // Constants
    /**
     * `Whitespace` symbol.
     * @private
     */
    StringTokenizer.whiteSpace = ' ';
    /**
     * `tab` symbol.
     * @private
     */
    StringTokenizer.tab = '\t';
    /**
     * Array of `spaces`.
     * @private
     */
    StringTokenizer.spaces = [StringTokenizer.whiteSpace, StringTokenizer.tab];
    /**
     * `Pattern` for WhiteSpace.
     * @private
     */
    StringTokenizer.whiteSpacePattern = '^[ \t]+$';
    return StringTokenizer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-OS2-Table.js":
/*!****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-OS2-Table.js ***!
  \****************************************************************************************************/
/*! exports provided: TtfOS2Table */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfOS2Table", function() { return TtfOS2Table; });
/**
 * TtfOS2Table.ts class for EJ2-PDF
 * The OS/2 table consists of a set of metrics that are required by Windows and OS/2.
 */
var TtfOS2Table = /** @class */ (function () {
    function TtfOS2Table() {
    }
    return TtfOS2Table;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-apple-cmap-sub-table.js":
/*!***************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-apple-cmap-sub-table.js ***!
  \***************************************************************************************************************/
/*! exports provided: TtfAppleCmapSubTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfAppleCmapSubTable", function() { return TtfAppleCmapSubTable; });
/**
 * TtfAppleCmapSubTable.ts class for EJ2-PDF
 */
var TtfAppleCmapSubTable = /** @class */ (function () {
    function TtfAppleCmapSubTable() {
    }
    return TtfAppleCmapSubTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-cmap-sub-table.js":
/*!*********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-cmap-sub-table.js ***!
  \*********************************************************************************************************/
/*! exports provided: TtfCmapSubTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfCmapSubTable", function() { return TtfCmapSubTable; });
/**
 * TtfCmapSubTable.ts class for EJ2-PDF
 */
var TtfCmapSubTable = /** @class */ (function () {
    function TtfCmapSubTable() {
    }
    return TtfCmapSubTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-cmap-table.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-cmap-table.js ***!
  \*****************************************************************************************************/
/*! exports provided: TtfCmapTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfCmapTable", function() { return TtfCmapTable; });
/**
 * TtfCmapTable.ts class for EJ2-PDF
 */
var TtfCmapTable = /** @class */ (function () {
    function TtfCmapTable() {
    }
    return TtfCmapTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-glyph-header.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-glyph-header.js ***!
  \*******************************************************************************************************/
/*! exports provided: TtfGlyphHeader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfGlyphHeader", function() { return TtfGlyphHeader; });
/**
 * TtfLocaTable.ts class for EJ2-PDF
 */
var TtfGlyphHeader = /** @class */ (function () {
    function TtfGlyphHeader() {
    }
    return TtfGlyphHeader;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-glyph-info.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-glyph-info.js ***!
  \*****************************************************************************************************/
/*! exports provided: TtfGlyphInfo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfGlyphInfo", function() { return TtfGlyphInfo; });
/**
 * TtfGlyphInfo.ts class for EJ2-PDF
 */
var TtfGlyphInfo = /** @class */ (function () {
    function TtfGlyphInfo() {
    }
    Object.defineProperty(TtfGlyphInfo.prototype, "empty", {
        //Properties
        /**
         * Gets a value indicating whether this TtfGlyphInfo is empty.
         */
        get: function () {
            var empty = (this.index === this.width && this.width === this.charCode && this.charCode === 0);
            return empty;
        },
        enumerable: true,
        configurable: true
    });
    //IComparable implementation
    /**
     * Compares two WidthDescriptor objects.
     */
    TtfGlyphInfo.prototype.compareTo = function (obj) {
        var glyph = obj;
        return this.index - glyph.index;
    };
    return TtfGlyphInfo;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-head-table.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-head-table.js ***!
  \*****************************************************************************************************/
/*! exports provided: TtfHeadTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfHeadTable", function() { return TtfHeadTable; });
/**
 * TtfHeadTable.ts class for EJ2-PDF
 */
var TtfHeadTable = /** @class */ (function () {
    function TtfHeadTable() {
    }
    return TtfHeadTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-horizontal-header-table.js":
/*!******************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-horizontal-header-table.js ***!
  \******************************************************************************************************************/
/*! exports provided: TtfHorizontalHeaderTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfHorizontalHeaderTable", function() { return TtfHorizontalHeaderTable; });
/**
 * TtfHorizontalHeaderTable.ts class for EJ2-PDF
 */
var TtfHorizontalHeaderTable = /** @class */ (function () {
    function TtfHorizontalHeaderTable() {
    }
    return TtfHorizontalHeaderTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-loca-table.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-loca-table.js ***!
  \*****************************************************************************************************/
/*! exports provided: TtfLocaTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfLocaTable", function() { return TtfLocaTable; });
/**
 * TtfLocaTable.ts class for EJ2-PDF
 */
var TtfLocaTable = /** @class */ (function () {
    function TtfLocaTable() {
    }
    return TtfLocaTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-long-hor-metric.js":
/*!**********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-long-hor-metric.js ***!
  \**********************************************************************************************************/
/*! exports provided: TtfLongHorMetric */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfLongHorMetric", function() { return TtfLongHorMetric; });
/**
 * TtfLongHorMetric.ts class for EJ2-PDF
 */
var TtfLongHorMetric = /** @class */ (function () {
    function TtfLongHorMetric() {
    }
    return TtfLongHorMetric;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-metrics.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-metrics.js ***!
  \**************************************************************************************************/
/*! exports provided: TtfMetrics */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfMetrics", function() { return TtfMetrics; });
var TtfMetrics = /** @class */ (function () {
    function TtfMetrics() {
    }
    Object.defineProperty(TtfMetrics.prototype, "isItalic", {
        //Properties
        /**
         * Gets a value indicating whether this instance is italic.
         */
        get: function () {
            return ((this.macStyle & 2) !== 0);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TtfMetrics.prototype, "isBold", {
        /**
         * Gets a value indicating whether this instance is bold.
         */
        get: function () {
            return ((this.macStyle & 1) !== 0);
        },
        enumerable: true,
        configurable: true
    });
    return TtfMetrics;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.js":
/*!*******************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.js ***!
  \*******************************************************************************************************************/
/*! exports provided: TtfMicrosoftCmapSubTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfMicrosoftCmapSubTable", function() { return TtfMicrosoftCmapSubTable; });
/**
 * TtfMicrosoftCmapSubTable.ts class for EJ2-PDF
 */
var TtfMicrosoftCmapSubTable = /** @class */ (function () {
    function TtfMicrosoftCmapSubTable() {
    }
    return TtfMicrosoftCmapSubTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-name-record.js":
/*!******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-name-record.js ***!
  \******************************************************************************************************/
/*! exports provided: TtfNameRecord */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfNameRecord", function() { return TtfNameRecord; });
/**
 * TtfNameRecord.ts class for EJ2-PDF
 */
var TtfNameRecord = /** @class */ (function () {
    function TtfNameRecord() {
    }
    return TtfNameRecord;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-name-table.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-name-table.js ***!
  \*****************************************************************************************************/
/*! exports provided: TtfNameTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfNameTable", function() { return TtfNameTable; });
var TtfNameTable = /** @class */ (function () {
    function TtfNameTable() {
    }
    return TtfNameTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-post-table.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-post-table.js ***!
  \*****************************************************************************************************/
/*! exports provided: TtfPostTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfPostTable", function() { return TtfPostTable; });
/**
 * TtfPostTable.ts class for EJ2-PDF
 */
var TtfPostTable = /** @class */ (function () {
    function TtfPostTable() {
    }
    return TtfPostTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-reader.js":
/*!*************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-reader.js ***!
  \*************************************************************************************************/
/*! exports provided: TtfReader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfReader", function() { return TtfReader; });
/* harmony import */ var _ttf_table_info__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ttf-table-info */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-table-info.js");
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/* harmony import */ var _ttf_name_table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ttf-name-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-name-table.js");
/* harmony import */ var _ttf_name_record__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ttf-name-record */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-name-record.js");
/* harmony import */ var _ttf_head_table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ttf-head-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-head-table.js");
/* harmony import */ var _ttf_metrics__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ttf-metrics */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-metrics.js");
/* harmony import */ var _ttf_horizontal_header_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ttf-horizontal-header-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-horizontal-header-table.js");
/* harmony import */ var _ttf_OS2_Table__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ttf-OS2-Table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-OS2-Table.js");
/* harmony import */ var _ttf_post_table__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ttf-post-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-post-table.js");
/* harmony import */ var _ttf_long_hor_metric__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ttf-long-hor-metric */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-long-hor-metric.js");
/* harmony import */ var _ttf_cmap_sub_table__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ttf-cmap-sub-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-cmap-sub-table.js");
/* harmony import */ var _ttf_cmap_table__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ttf-cmap-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-cmap-table.js");
/* harmony import */ var _ttf_glyph_info__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ttf-glyph-info */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-glyph-info.js");
/* harmony import */ var _ttf_loca_table__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ttf-loca-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-loca-table.js");
/* harmony import */ var _ttf_apple_cmap_sub_table__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ttf-apple-cmap-sub-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-apple-cmap-sub-table.js");
/* harmony import */ var _ttf_microsoft_cmap_sub_table__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ttf-microsoft-cmap-sub-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.js");
/* harmony import */ var _ttf_trimmed_cmap_sub_table__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ttf-trimmed-cmap-sub-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.js");
/* harmony import */ var _ttf_glyph_header__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ttf-glyph-header */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-glyph-header.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _string_tokenizer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./string-tokenizer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-tokenizer.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _input_output_big_endian_writer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./../../input-output/big-endian-writer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/big-endian-writer.js");
/**
 * TtfReader.ts class for EJ2-PDF
 */























var TtfReader = /** @class */ (function () {
    //Constructors
    function TtfReader(fontData) {
        this.int32Size = 4;
        this.isTtcFont = false;
        this.isMacTtf = false;
        this.metricsName = '';
        this.isMacTTF = false;
        this.missedGlyphs = 0;
        this.tableNames = ['cvt ', 'fpgm', 'glyf', 'head', 'hhea', 'hmtx', 'loca', 'maxp', 'prep'];
        this.entrySelectors = [0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4];
        this.fontData = fontData;
        this.initialize();
    }
    Object.defineProperty(TtfReader.prototype, "macintosh", {
        //Properties
        /**
         * Gets glyphs for Macintosh or Symbol fonts (char - key, glyph - value).
         */
        get: function () {
            if (this.macintoshDictionary === null || this.macintoshDictionary === undefined) {
                this.macintoshDictionary = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__["Dictionary"]();
            }
            return this.macintoshDictionary;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TtfReader.prototype, "microsoft", {
        /**
         * Gets glyphs for Microsoft or Symbol fonts (char - key, glyph - value).
         */
        get: function () {
            if (this.microsoftDictionary === null || this.microsoftDictionary === undefined) {
                this.microsoftDictionary = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__["Dictionary"]();
            }
            return this.microsoftDictionary;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TtfReader.prototype, "macintoshGlyphs", {
        /**
         * Gets glyphs for Macintosh or Symbol fonts (glyph index - key, glyph - value).
         */
        get: function () {
            if (this.internalMacintoshGlyphs === null || this.internalMacintoshGlyphs === undefined) {
                this.internalMacintoshGlyphs = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__["Dictionary"]();
            }
            return this.internalMacintoshGlyphs;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TtfReader.prototype, "microsoftGlyphs", {
        /**
         * Gets glyphs for Microsoft Unicode fonts (glyph index - key, glyph - value).
         */
        get: function () {
            if (this.internalMicrosoftGlyphs === null || this.internalMicrosoftGlyphs === undefined) {
                this.internalMicrosoftGlyphs = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__["Dictionary"]();
            }
            return this.internalMicrosoftGlyphs;
        },
        enumerable: true,
        configurable: true
    });
    //Implementation
    TtfReader.prototype.initialize = function () {
        if (this.metrics === undefined) {
            this.metrics = new _ttf_metrics__WEBPACK_IMPORTED_MODULE_5__["TtfMetrics"]();
        }
        this.readFontDictionary();
        var nameTable = this.readNameTable();
        var headTable = this.readHeadTable();
        this.initializeFontName(nameTable);
        this.metrics.macStyle = headTable.macStyle;
    };
    TtfReader.prototype.readFontDictionary = function () {
        this.offset = 0;
        var version = this.checkPreambula();
        //this.offset += 4;
        var numTables = this.readInt16(this.offset);
        var searchRange = this.readInt16(this.offset);
        var entrySelector = this.readInt16(this.offset);
        var rangeShift = this.readInt16(this.offset);
        if (this.tableDirectory === undefined) {
            this.tableDirectory = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__["Dictionary"]();
        }
        for (var i = 0; i < numTables; ++i) {
            var table = new _ttf_table_info__WEBPACK_IMPORTED_MODULE_0__["TtfTableInfo"]();
            var tableKey = this.readString(this.int32Size);
            table.checksum = this.readInt32(this.offset);
            table.offset = this.readInt32(this.offset);
            table.length = this.readInt32(this.offset);
            this.tableDirectory.setValue(tableKey, table);
        }
        this.lowestPosition = this.offset;
        if (!this.isTtcFont) {
            this.fixOffsets();
        }
    };
    TtfReader.prototype.fixOffsets = function () {
        var minOffset = Number.MAX_VALUE;
        // Search for a smallest offset and compare it with the lowest position found.
        var tableKeys = this.tableDirectory.keys();
        for (var i = 0; i < tableKeys.length; i++) {
            var value = this.tableDirectory.getValue(tableKeys[i]);
            var offset = value.offset;
            if (minOffset > offset) {
                minOffset = offset;
                if (minOffset <= this.lowestPosition) {
                    break;
                }
            }
        }
        var shift = minOffset - this.lowestPosition;
        if (shift !== 0) {
            var table = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__["Dictionary"]();
            for (var i = 0; i < tableKeys.length; i++) {
                var value = this.tableDirectory.getValue(tableKeys[i]);
                value.offset -= shift;
                table.setValue(tableKeys[i], value);
            }
            this.tableDirectory = table;
        }
    };
    TtfReader.prototype.checkPreambula = function () {
        var version = this.readInt32(this.offset);
        this.isMacTtf = (version === 0x74727565) ? true : false;
        if (version !== 0x10000 && version !== 0x74727565 && version !== 0x4f54544f) {
            this.isTtcFont = true;
            this.offset = 0;
            var fontTag = this.readString(4);
            if (fontTag !== 'ttcf') {
                throw new Error('Can not read TTF font data');
            }
            //skip 4
            this.offset += 4;
            var ttcIdentificationNumber = this.readInt32(this.offset);
            if (ttcIdentificationNumber < 0) {
                throw new Error('Can not read TTF font data');
            }
            this.offset = this.readInt32(this.offset);
            version = this.readInt32(this.offset);
        }
        return version;
    };
    TtfReader.prototype.readNameTable = function () {
        var tableInfo = this.getTable('name');
        this.offset = tableInfo.offset;
        var table = new _ttf_name_table__WEBPACK_IMPORTED_MODULE_2__["TtfNameTable"]();
        table.formatSelector = this.readUInt16(this.offset);
        table.recordsCount = this.readUInt16(this.offset);
        table.offset = this.readUInt16(this.offset);
        table.nameRecords = [];
        var recordSize = 12;
        var position = this.offset;
        for (var i = 0; i < table.recordsCount; i++) {
            this.offset = position;
            var record = new _ttf_name_record__WEBPACK_IMPORTED_MODULE_3__["TtfNameRecord"]();
            record.platformID = this.readUInt16(this.offset);
            record.encodingID = this.readUInt16(this.offset);
            record.languageID = this.readUInt16(this.offset);
            record.nameID = this.readUInt16(this.offset);
            record.length = this.readUInt16(this.offset);
            record.offset = this.readUInt16(this.offset);
            this.offset = tableInfo.offset + table.offset + record.offset;
            var unicode = (record.platformID === 0 || record.platformID === 3);
            record.name = this.readString(record.length, unicode);
            table.nameRecords[i] = record;
            position += recordSize;
        }
        return table;
    };
    TtfReader.prototype.readHeadTable = function () {
        var tableInfo = this.getTable('head');
        this.offset = tableInfo.offset;
        var table = new _ttf_head_table__WEBPACK_IMPORTED_MODULE_4__["TtfHeadTable"]();
        table.version = this.readFixed(this.offset);
        table.fontRevision = this.readFixed(this.offset);
        table.checkSumAdjustment = this.readUInt32(this.offset);
        table.magicNumber = this.readUInt32(this.offset);
        table.flags = this.readUInt16(this.offset);
        table.unitsPerEm = this.readUInt16(this.offset);
        table.created = this.readInt64(this.offset);
        table.modified = this.readInt64(this.offset);
        table.xMin = this.readInt16(this.offset);
        table.yMin = this.readInt16(this.offset);
        table.xMax = this.readInt16(this.offset);
        table.yMax = this.readInt16(this.offset);
        table.macStyle = this.readUInt16(this.offset);
        table.lowestReadableSize = this.readUInt16(this.offset);
        table.fontDirectionHint = this.readInt16(this.offset);
        table.indexToLocalFormat = this.readInt16(this.offset);
        table.glyphDataFormat = this.readInt16(this.offset);
        return table;
    };
    TtfReader.prototype.readHorizontalHeaderTable = function () {
        var tableInfo = this.getTable('hhea');
        this.offset = tableInfo.offset;
        var table = new _ttf_horizontal_header_table__WEBPACK_IMPORTED_MODULE_6__["TtfHorizontalHeaderTable"]();
        table.version = this.readFixed(this.offset);
        table.ascender = this.readInt16(this.offset);
        table.descender = this.readInt16(this.offset);
        table.lineGap = this.readInt16(this.offset);
        table.advanceWidthMax = this.readUInt16(this.offset);
        table.minLeftSideBearing = this.readInt16(this.offset);
        table.minRightSideBearing = this.readInt16(this.offset);
        table.xMaxExtent = this.readInt16(this.offset);
        table.caretSlopeRise = this.readInt16(this.offset);
        table.caretSlopeRun = this.readInt16(this.offset);
        //skip 2 * 5
        this.offset += 10;
        table.metricDataFormat = this.readInt16(this.offset);
        table.numberOfHMetrics = this.readUInt16(this.offset);
        return table;
    };
    TtfReader.prototype.readOS2Table = function () {
        var tableInfo = this.getTable('OS/2');
        this.offset = tableInfo.offset;
        var table = new _ttf_OS2_Table__WEBPACK_IMPORTED_MODULE_7__["TtfOS2Table"]();
        table.version = this.readUInt16(this.offset);
        table.xAvgCharWidth = this.readInt16(this.offset);
        table.usWeightClass = this.readUInt16(this.offset);
        table.usWidthClass = this.readUInt16(this.offset);
        table.fsType = this.readInt16(this.offset);
        table.ySubscriptXSize = this.readInt16(this.offset);
        table.ySubscriptYSize = this.readInt16(this.offset);
        table.ySubscriptXOffset = this.readInt16(this.offset);
        table.ySubscriptYOffset = this.readInt16(this.offset);
        table.ySuperscriptXSize = this.readInt16(this.offset);
        table.ySuperscriptYSize = this.readInt16(this.offset);
        table.ySuperscriptXOffset = this.readInt16(this.offset);
        table.ySuperscriptYOffset = this.readInt16(this.offset);
        table.yStrikeoutSize = this.readInt16(this.offset);
        table.yStrikeoutPosition = this.readInt16(this.offset);
        table.sFamilyClass = this.readInt16(this.offset);
        table.panose = this.readBytes(10);
        table.ulUnicodeRange1 = this.readUInt32(this.offset);
        table.ulUnicodeRange2 = this.readUInt32(this.offset);
        table.ulUnicodeRange3 = this.readUInt32(this.offset);
        table.ulUnicodeRange4 = this.readUInt32(this.offset);
        table.vendorIdentifier = this.readBytes(4);
        table.fsSelection = this.readUInt16(this.offset);
        table.usFirstCharIndex = this.readUInt16(this.offset);
        table.usLastCharIndex = this.readUInt16(this.offset);
        table.sTypoAscender = this.readInt16(this.offset);
        table.sTypoDescender = this.readInt16(this.offset);
        table.sTypoLineGap = this.readInt16(this.offset);
        table.usWinAscent = this.readUInt16(this.offset);
        table.usWinDescent = this.readUInt16(this.offset);
        table.ulCodePageRange1 = this.readUInt32(this.offset);
        table.ulCodePageRange2 = this.readUInt32(this.offset);
        if (table.version > 1) {
            table.sxHeight = this.readInt16(this.offset);
            table.sCapHeight = this.readInt16(this.offset);
            table.usDefaultChar = this.readUInt16(this.offset);
            table.usBreakChar = this.readUInt16(this.offset);
            table.usMaxContext = this.readUInt16(this.offset);
        }
        else {
            table.sxHeight = 0;
            table.sCapHeight = 0;
            table.usDefaultChar = 0;
            table.usBreakChar = 0;
            table.usMaxContext = 0;
        }
        return table;
    };
    TtfReader.prototype.readPostTable = function () {
        var tableInfo = this.getTable('post');
        this.offset = tableInfo.offset;
        var table = new _ttf_post_table__WEBPACK_IMPORTED_MODULE_8__["TtfPostTable"]();
        table.formatType = this.readFixed(this.offset);
        table.italicAngle = this.readFixed(this.offset);
        table.underlinePosition = this.readInt16(this.offset);
        table.underlineThickness = this.readInt16(this.offset);
        table.isFixedPitch = this.readUInt32(this.offset);
        table.minType42 = this.readUInt32(this.offset);
        table.maxType42 = this.readUInt32(this.offset);
        table.minType1 = this.readUInt32(this.offset);
        table.maxType1 = this.readUInt32(this.offset);
        return table;
    };
    /**
     * Reads Width of the glyphs.
     */
    TtfReader.prototype.readWidthTable = function (glyphCount, unitsPerEm) {
        var tableInfo = this.getTable('hmtx');
        this.offset = tableInfo.offset;
        var width = [];
        for (var i = 0; i < glyphCount; i++) {
            var glyph = new _ttf_long_hor_metric__WEBPACK_IMPORTED_MODULE_9__["TtfLongHorMetric"]();
            glyph.advanceWidth = this.readUInt16(this.offset);
            glyph.lsb = this.readInt16(this.offset);
            var glyphWidth = glyph.advanceWidth * 1000 / unitsPerEm;
            width.push(Math.floor(glyphWidth));
        }
        return width;
    };
    /**
     * Reads the cmap table.
     */
    TtfReader.prototype.readCmapTable = function () {
        var tableInfo = this.getTable('cmap');
        this.offset = tableInfo.offset;
        var table = new _ttf_cmap_table__WEBPACK_IMPORTED_MODULE_11__["TtfCmapTable"]();
        table.version = this.readUInt16(this.offset);
        table.tablesCount = this.readUInt16(this.offset);
        var position = this.offset;
        var subTables = [];
        for (var i = 0; i < table.tablesCount; i++) {
            this.offset = position;
            var subTable = new _ttf_cmap_sub_table__WEBPACK_IMPORTED_MODULE_10__["TtfCmapSubTable"]();
            subTable.platformID = this.readUInt16(this.offset);
            subTable.encodingID = this.readUInt16(this.offset);
            subTable.offset = this.readUInt32(this.offset);
            position = this.offset;
            this.readCmapSubTable(subTable);
            subTables[i] = subTable;
        }
        return subTables;
    };
    /**
     * Reads the cmap sub table.
     */
    TtfReader.prototype.readCmapSubTable = function (subTable) {
        var tableInfo = this.getTable('cmap');
        this.offset = tableInfo.offset + subTable.offset;
        var format = this.readUInt16(this.offset);
        var encoding = this.getCmapEncoding(subTable.platformID, subTable.encodingID);
        var platform = (encoding === _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Macintosh) ? _enum__WEBPACK_IMPORTED_MODULE_20__["TtfPlatformID"].Macintosh : _enum__WEBPACK_IMPORTED_MODULE_20__["TtfPlatformID"].Microsoft;
        if (encoding !== _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Unknown) {
            switch (format) {
                case _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapFormat"].Apple:
                    this.readAppleCmapTable(subTable, encoding);
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapFormat"].Microsoft:
                    this.readMicrosoftCmapTable(subTable, encoding);
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapFormat"].Trimmed:
                    this.readTrimmedCmapTable(subTable, encoding);
                    break;
            }
        }
    };
    /**
     * Reads Symbol cmap table.
     */
    TtfReader.prototype.readAppleCmapTable = function (subTable, encoding) {
        var tableInfo = this.getTable('cmap');
        this.offset = tableInfo.offset + subTable.offset;
        var table = new _ttf_apple_cmap_sub_table__WEBPACK_IMPORTED_MODULE_14__["TtfAppleCmapSubTable"]();
        table.format = this.readUInt16(this.offset);
        table.length = this.readUInt16(this.offset);
        table.version = this.readUInt16(this.offset);
        if (this.maxMacIndex === null || this.maxMacIndex === undefined) {
            this.maxMacIndex = 0;
        }
        for (var i = 0; i < 256; ++i) {
            var glyphInfo = new _ttf_glyph_info__WEBPACK_IMPORTED_MODULE_12__["TtfGlyphInfo"]();
            glyphInfo.index = this.readByte(this.offset);
            glyphInfo.width = this.getWidth(glyphInfo.index);
            glyphInfo.charCode = i;
            this.macintosh.setValue(i, glyphInfo);
            this.addGlyph(glyphInfo, encoding);
            // NOTE: this code fixes char codes that extends 0x100. However, it might corrupt something.
            this.maxMacIndex = Math.max(i, this.maxMacIndex);
        }
    };
    /**
     * Reads Symbol cmap table.
     */
    TtfReader.prototype.readMicrosoftCmapTable = function (subTable, encoding) {
        var tableInfo = this.getTable('cmap');
        this.offset = tableInfo.offset + subTable.offset;
        var collection = (encoding === _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Unicode) ? this.microsoft : this.macintosh;
        var table = new _ttf_microsoft_cmap_sub_table__WEBPACK_IMPORTED_MODULE_15__["TtfMicrosoftCmapSubTable"]();
        table.format = this.readUInt16(this.offset);
        table.length = this.readUInt16(this.offset);
        table.version = this.readUInt16(this.offset);
        table.segCountX2 = this.readUInt16(this.offset);
        table.searchRange = this.readUInt16(this.offset);
        table.entrySelector = this.readUInt16(this.offset);
        table.rangeShift = this.readUInt16(this.offset);
        var segCount = table.segCountX2 / 2;
        table.endCount = this.readUshortArray(segCount);
        table.reservedPad = this.readUInt16(this.offset);
        table.startCount = this.readUshortArray(segCount);
        table.idDelta = this.readUshortArray(segCount);
        table.idRangeOffset = this.readUshortArray(segCount);
        var length = (table.length / 2 - 8) - (segCount * 4);
        table.glyphID = this.readUshortArray(length);
        // Process glyphIdArray array.
        var codeOffset = 0;
        var index = 0;
        for (var j = 0; j < segCount; j++) {
            for (var k = table.startCount[j]; k <= table.endCount[j] && k !== 65535; k++) {
                if (table.idRangeOffset[j] === 0) {
                    codeOffset = (k + table.idDelta[j]) & 65535;
                }
                else {
                    index = j + table.idRangeOffset[j] / 2 - segCount + k - table.startCount[j];
                    if (index >= table.glyphID.length) {
                        continue;
                    }
                    codeOffset = (table.glyphID[index] + table.idDelta[j]) & 65535;
                }
                var glyph = new _ttf_glyph_info__WEBPACK_IMPORTED_MODULE_12__["TtfGlyphInfo"]();
                glyph.index = codeOffset;
                glyph.width = this.getWidth(glyph.index);
                var id = (encoding === _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Symbol) ? ((k & 0xff00) === 0xf000 ? k & 0xff : k) : k;
                glyph.charCode = id;
                collection.setValue(id, glyph);
                this.addGlyph(glyph, encoding);
            }
        }
    };
    /**
     * Reads Trimed cmap table.
     */
    TtfReader.prototype.readTrimmedCmapTable = function (subTable, encoding) {
        var tableInfo = this.getTable('cmap');
        this.offset = tableInfo.offset + subTable.offset;
        var table = new _ttf_trimmed_cmap_sub_table__WEBPACK_IMPORTED_MODULE_16__["TtfTrimmedCmapSubTable"]();
        table.format = this.readUInt16(this.offset);
        table.length = this.readUInt16(this.offset);
        table.version = this.readUInt16(this.offset);
        table.firstCode = this.readUInt16(this.offset);
        table.entryCount = this.readUInt16(this.offset);
        for (var i = 0; i < table.entryCount; ++i) {
            var glyphInfo = new _ttf_glyph_info__WEBPACK_IMPORTED_MODULE_12__["TtfGlyphInfo"]();
            glyphInfo.index = this.readUInt16(this.offset);
            glyphInfo.width = this.getWidth(glyphInfo.index);
            glyphInfo.charCode = i + table.firstCode;
            this.macintosh.setValue(i, glyphInfo);
            this.addGlyph(glyphInfo, encoding);
            // NOTE: this code fixes char codes that extends 0x100. However, it might corrupt something.
            this.maxMacIndex = Math.max(i, this.maxMacIndex);
        }
    };
    TtfReader.prototype.initializeFontName = function (nameTable) {
        for (var i = 0; i < nameTable.recordsCount; i++) {
            var record = nameTable.nameRecords[i];
            if (record.nameID === 1) {
                //font family
                this.metrics.fontFamily = record.name;
            }
            else if (record.nameID === 6) {
                //post script name
                this.metrics.postScriptName = record.name;
            }
            /* tslint:disable */
            if (this.metrics.fontFamily !== null && this.metrics.fontFamily !== undefined && this.metrics.postScriptName !== null && this.metrics.postScriptName !== undefined) {
                break;
            }
            /* tslint:disable */
        }
    };
    TtfReader.prototype.getTable = function (name) {
        // if (name === null) {
        //     throw new Error('Argument Null Exception : name');
        // }
        var table = new _ttf_table_info__WEBPACK_IMPORTED_MODULE_0__["TtfTableInfo"]();
        var obj;
        if (this.tableDirectory.containsKey(name)) {
            obj = this.tableDirectory.getValue(name);
        }
        if (obj !== null && obj !== undefined) {
            table = obj;
        }
        return table;
    };
    /**
     * Returns width of the glyph.
     */
    TtfReader.prototype.getWidth = function (glyphCode) {
        glyphCode = (glyphCode < this.width.length) ? glyphCode : this.width.length - 1;
        return this.width[glyphCode];
    };
    /**
     * Gets CMAP encoding based on platform ID and encoding ID.
     */
    /* tslint:disable */
    TtfReader.prototype.getCmapEncoding = function (platformID, encodingID) {
        var format = _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Unknown;
        if (platformID == _enum__WEBPACK_IMPORTED_MODULE_20__["TtfPlatformID"].Microsoft && encodingID == _enum__WEBPACK_IMPORTED_MODULE_20__["TtfMicrosoftEncodingID"].Undefined) {
            // When building a symbol font for Windows,
            // the platform ID should be 3 and the encoding ID should be 0.
            format = _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Symbol;
        }
        else if (platformID == _enum__WEBPACK_IMPORTED_MODULE_20__["TtfPlatformID"].Microsoft && encodingID == _enum__WEBPACK_IMPORTED_MODULE_20__["TtfMicrosoftEncodingID"].Unicode) {
            // When building a Unicode font for Windows,
            // the platform ID should be 3 and the encoding ID should be 1.
            format = _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Unicode;
        }
        else if (platformID == _enum__WEBPACK_IMPORTED_MODULE_20__["TtfPlatformID"].Macintosh && encodingID == _enum__WEBPACK_IMPORTED_MODULE_20__["TtfMacintoshEncodingID"].Roman) {
            // When building a font that will be used on the Macintosh,
            // the platform ID should be 1 and the encoding ID should be 0.
            format = _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Macintosh;
        }
        return format;
    };
    /* tslint:enable */
    /**
     * Adds glyph to the collection.
     */
    TtfReader.prototype.addGlyph = function (glyph, encoding) {
        var collection = null;
        switch (encoding) {
            case _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Unicode:
                collection = this.microsoftGlyphs;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Macintosh:
            case _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Symbol:
                collection = this.macintoshGlyphs;
                break;
        }
        collection.setValue(glyph.index, glyph);
    };
    /**
     * Initializes metrics.
     */
    /* tslint:disable */
    TtfReader.prototype.initializeMetrics = function (nameTable, headTable, horizontalHeadTable, os2Table, postTable, cmapTables) {
        /* tslint:enable */
        // if (cmapTables === null) {
        //     throw new Error('ArgumentNullException : cmapTables');
        // }
        this.initializeFontName(nameTable);
        // Get font encoding.
        var bSymbol = false;
        for (var i = 0; i < cmapTables.length; i++) {
            var subTable = cmapTables[i];
            var encoding = this.getCmapEncoding(subTable.platformID, subTable.encodingID);
            if (encoding === _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCmapEncoding"].Symbol) {
                bSymbol = true;
                break;
            }
        }
        this.metrics.isSymbol = bSymbol;
        this.metrics.macStyle = headTable.macStyle;
        this.metrics.isFixedPitch = (postTable.isFixedPitch !== 0);
        this.metrics.italicAngle = postTable.italicAngle;
        var factor = 1000 / headTable.unitsPerEm;
        this.metrics.winAscent = os2Table.sTypoAscender * factor;
        this.metrics.macAscent = horizontalHeadTable.ascender * factor;
        //m_metrics.MacAscent = os2Table.UsWinAscent * factor;
        // NOTE: This is stange workaround. The value is good if os2Table.SCapHeight != 0, otherwise it should be properly computed.
        this.metrics.capHeight = (os2Table.sCapHeight !== 0) ? os2Table.sCapHeight : 0.7 * headTable.unitsPerEm * factor;
        this.metrics.winDescent = os2Table.sTypoDescender * factor;
        this.metrics.macDescent = horizontalHeadTable.descender * factor;
        //m_metrics.MacDescent = -os2Table.UsWinDescent * factor;
        this.metrics.leading = (os2Table.sTypoAscender - os2Table.sTypoDescender + os2Table.sTypoLineGap) * factor;
        this.metrics.lineGap = Math.ceil(horizontalHeadTable.lineGap * factor);
        var left = headTable.xMin * factor;
        var top = Math.ceil(this.metrics.macAscent + this.metrics.lineGap);
        var right = headTable.xMax * factor;
        var bottom = this.metrics.macDescent;
        this.metrics.fontBox = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_18__["Rectangle"](left, top, right, bottom);
        // NOTE: Strange!
        this.metrics.stemV = 80;
        this.metrics.widthTable = this.updateWidth();
        this.metrics.contains = this.tableDirectory.containsKey('CFF');
        this.metrics.subScriptSizeFactor = headTable.unitsPerEm / os2Table.ySubscriptYSize;
        this.metrics.superscriptSizeFactor = headTable.unitsPerEm / os2Table.ySuperscriptYSize;
    };
    /**
     * Updates chars structure which is used in the case of ansi encoding (256 bytes).
     */
    TtfReader.prototype.updateWidth = function () {
        var count = 256;
        var bytes = [];
        if (this.metrics.isSymbol) {
            for (var i = 0; i < count; i++) {
                var glyphInfo = this.getGlyph(String.fromCharCode(i));
                bytes[i] = (glyphInfo.empty) ? 0 : glyphInfo.width;
            }
        }
        else {
            var byteToProcess = [];
            var unknown = '?';
            var space = String.fromCharCode(32);
            for (var i = 0; i < count; i++) {
                byteToProcess[0] = i;
                var text = this.getString(byteToProcess, 0, byteToProcess.length);
                var ch = (text.length > 0) ? text[0] : unknown;
                var glyphInfo = this.getGlyph(ch);
                if (!glyphInfo.empty) {
                    bytes[i] = glyphInfo.width;
                }
                else {
                    glyphInfo = this.getGlyph(space);
                    bytes[i] = (glyphInfo.empty) ? 0 : glyphInfo.width;
                }
            }
        }
        return bytes;
    };
    /**
     * Returns default glyph.
     */
    TtfReader.prototype.getDefaultGlyph = function () {
        var glyph = this.getGlyph(_string_tokenizer__WEBPACK_IMPORTED_MODULE_19__["StringTokenizer"].whiteSpace);
        return glyph;
    };
    /**
     * Reads unicode string from byte array.
     */
    TtfReader.prototype.getString = function (byteToProcess, start, length) {
        var result = '';
        for (var index = 0; index < length; index++) {
            result += String.fromCharCode(byteToProcess[index + start]);
        }
        return result;
    };
    /**
     * Reads loca table.
     */
    TtfReader.prototype.readLocaTable = function (bShort) {
        var tableInfo = this.getTable('loca');
        this.offset = tableInfo.offset;
        var table = new _ttf_loca_table__WEBPACK_IMPORTED_MODULE_13__["TtfLocaTable"]();
        var buffer = null;
        if (bShort) {
            var len = tableInfo.length / 2;
            buffer = [];
            for (var i = 0; i < len; i++) {
                buffer[i] = this.readUInt16(this.offset) * 2;
            }
        }
        else {
            var len = tableInfo.length / 4;
            buffer = [];
            for (var i = 0; i < len; i++) {
                buffer[i] = this.readUInt32(this.offset);
            }
        }
        table.offsets = buffer;
        return table;
    };
    /**
     * Updates hash table of used glyphs.
     */
    TtfReader.prototype.updateGlyphChars = function (glyphChars, locaTable) {
        // if (glyphChars === null) {
        //     throw new Error('Argument Null Exception : glyphChars');
        // }
        // Add zero key.
        if (!glyphChars.containsKey(0)) {
            glyphChars.setValue(0, 0);
        }
        var clone = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__["Dictionary"]();
        var glyphCharKeys = glyphChars.keys();
        for (var i = 0; i < glyphCharKeys.length; i++) {
            clone.setValue(glyphCharKeys[i], glyphChars.getValue(glyphCharKeys[i]));
        }
        for (var i = 0; i < glyphCharKeys.length; i++) {
            var nextKey = glyphCharKeys[i];
            this.processCompositeGlyph(glyphChars, nextKey, locaTable);
        }
    };
    /**
     * Checks if glyph is composite or not.
     */
    TtfReader.prototype.processCompositeGlyph = function (glyphChars, glyph, locaTable) {
        // if (glyphChars === null) {
        //     throw new Error('Argument Null Exception : glyphChars');
        // }
        // Is in range.
        if (glyph < locaTable.offsets.length - 1) {
            var glyphOffset = locaTable.offsets[glyph];
            if (glyphOffset !== locaTable.offsets[glyph + 1]) {
                var tableInfo = this.getTable('glyf');
                this.offset = tableInfo.offset + glyphOffset;
                var glyphHeader = new _ttf_glyph_header__WEBPACK_IMPORTED_MODULE_17__["TtfGlyphHeader"]();
                glyphHeader.numberOfContours = this.readInt16(this.offset);
                glyphHeader.xMin = this.readInt16(this.offset);
                glyphHeader.yMin = this.readInt16(this.offset);
                glyphHeader.xMax = this.readInt16(this.offset);
                glyphHeader.yMax = this.readInt16(this.offset);
                // Glyph is composite.
                if (glyphHeader.numberOfContours < 0) {
                    var skipBytes = 0;
                    var entry = true;
                    while (entry) {
                        var flags = this.readUInt16(this.offset);
                        var glyphIndex = this.readUInt16(this.offset);
                        if (!glyphChars.containsKey(glyphIndex)) {
                            glyphChars.setValue(glyphIndex, 0);
                        }
                        if ((flags & _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCompositeGlyphFlags"].MoreComponents) === 0) {
                            break;
                        }
                        skipBytes = ((flags & _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCompositeGlyphFlags"].Arg1And2AreWords) !== 0) ? 4 : 2;
                        if ((flags & _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCompositeGlyphFlags"].WeHaveScale) !== 0) {
                            skipBytes += 2;
                        }
                        else if ((flags & _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCompositeGlyphFlags"].WeHaveAnXyScale) !== 0) {
                            skipBytes += 4;
                        }
                        else if ((flags & _enum__WEBPACK_IMPORTED_MODULE_20__["TtfCompositeGlyphFlags"].WeHaveTwoByTwo) !== 0) {
                            skipBytes += 2 * 4;
                        }
                        this.offset += skipBytes;
                    }
                }
            }
        }
    };
    /**
     * Creates new glyph tables based on chars that are used for output.
     */
    /* tslint:disable */
    TtfReader.prototype.generateGlyphTable = function (glyphChars, locaTable, newLocaTable, newGlyphTable) {
        /* tslint:enable */
        // if (glyphChars === null) {
        //     throw new Error('Argument Null Exception : glyphChars');
        // }
        newLocaTable = [];
        // Sorting used glyphs keys.
        var activeGlyphs = glyphChars.keys();
        activeGlyphs.sort(function (a, b) { return a - b; });
        var glyphSize = 0;
        for (var i = 0; i < activeGlyphs.length; i++) {
            var glyphIndex = activeGlyphs[i];
            if (locaTable.offsets.length > 0) {
                glyphSize += locaTable.offsets[glyphIndex + 1] - locaTable.offsets[glyphIndex];
            }
        }
        var glyphSizeAligned = this.align(glyphSize);
        newGlyphTable = [];
        for (var i = 0; i < glyphSizeAligned; i++) {
            newGlyphTable.push(0);
        }
        var nextGlyphOffset = 0;
        var nextGlyphIndex = 0;
        var table = this.getTable('glyf');
        // Creating NewLocaTable - that would hold offsets for filtered glyphs.
        for (var i = 0; i < locaTable.offsets.length; i++) {
            newLocaTable.push(nextGlyphOffset);
            if (nextGlyphIndex < activeGlyphs.length && activeGlyphs[nextGlyphIndex] === i) {
                ++nextGlyphIndex;
                newLocaTable[i] = nextGlyphOffset;
                var oldGlyphOffset = locaTable.offsets[i];
                var oldNextGlyphOffset = locaTable.offsets[i + 1] - oldGlyphOffset;
                if (oldNextGlyphOffset > 0) {
                    this.offset = table.offset + oldGlyphOffset;
                    var result = this.read(newGlyphTable, nextGlyphOffset, oldNextGlyphOffset);
                    newGlyphTable = result.buffer;
                    nextGlyphOffset += oldNextGlyphOffset;
                }
            }
        }
        return { glyphTableSize: glyphSize, newLocaTable: newLocaTable, newGlyphTable: newGlyphTable };
    };
    /**
     * Updates new Loca table.
     */
    /* tslint:disable */
    TtfReader.prototype.updateLocaTable = function (newLocaTable, bLocaIsShort, newLocaTableOut) {
        /* tslint:enable */
        if (newLocaTable === null) {
            throw new Error('Argument Null Exception : newLocaTable');
        }
        var size = (bLocaIsShort) ? newLocaTable.length * 2 : newLocaTable.length * 4;
        var count = this.align(size);
        //BigEndianWiter
        var writer = new _input_output_big_endian_writer__WEBPACK_IMPORTED_MODULE_21__["BigEndianWriter"](count);
        for (var i = 0; i < newLocaTable.length; i++) {
            var value = newLocaTable[i];
            if (bLocaIsShort) {
                value /= 2;
                writer.writeShort(value);
            }
            else {
                writer.writeInt(value);
            }
        }
        return { newLocaUpdated: writer.data, newLocaSize: size };
    };
    /**
     * Aligns number to be divisible on 4.
     */
    TtfReader.prototype.align = function (value) {
        return (value + 3) & (~3);
    };
    /**
     * Returns font program data.
     */
    /* tslint:disable */
    TtfReader.prototype.getFontProgram = function (newLocaTableOut, newGlyphTable, glyphTableSize, locaTableSize) {
        /* tslint:enable */
        if (newLocaTableOut === null) {
            throw new Error('Argument Null Exception : newLocaTableOut');
        }
        if (newGlyphTable === null) {
            throw new Error('Argument Null Exception : newGlyphTable');
        }
        var tableNames = this.tableNames;
        var result = this.getFontProgramLength(newLocaTableOut, newGlyphTable, 0);
        var fontProgramLength = result.fontProgramLength;
        var numTables = result.numTables;
        var writer = new _input_output_big_endian_writer__WEBPACK_IMPORTED_MODULE_21__["BigEndianWriter"](fontProgramLength);
        writer.writeInt(0x10000);
        writer.writeShort(numTables);
        var entrySelector = this.entrySelectors[numTables];
        writer.writeShort((1 << (entrySelector & 31)) * 16);
        writer.writeShort(entrySelector);
        writer.writeShort((numTables - (1 << (entrySelector & 31))) * 16);
        // Writing to destination buffer - checksums && sizes of used tables.
        this.writeCheckSums(writer, numTables, newLocaTableOut, newGlyphTable, glyphTableSize, locaTableSize);
        // // Writing to destination buffer - used glyphs.
        this.writeGlyphs(writer, newLocaTableOut, newGlyphTable);
        return writer.data;
    };
    /* tslint:disable */
    TtfReader.prototype.getFontProgramLength = function (newLocaTableOut, newGlyphTable, numTables) {
        /* tslint:enable */
        if (newLocaTableOut === null) {
            throw new Error('Argument Null Exception : newLocaTableOut');
        }
        if (newGlyphTable === null) {
            throw new Error('Argument Null Exception : newGlyphTable');
        }
        // glyf and loca are used by default;
        numTables = 2;
        var tableNames = this.tableNames;
        var fontProgramLength = 0;
        for (var i = 0; i < tableNames.length; i++) {
            var tableName = tableNames[i];
            if (tableName !== 'glyf' && tableName !== 'loca') {
                var table = this.getTable(tableName);
                if (!table.empty) {
                    ++numTables;
                    fontProgramLength += this.align(table.length);
                }
            }
        }
        fontProgramLength += newLocaTableOut.length;
        fontProgramLength += newGlyphTable.length;
        var usedTablesSize = numTables * 16 + (3 * 4);
        fontProgramLength += usedTablesSize;
        return { fontProgramLength: fontProgramLength, numTables: numTables };
    };
    /**
     * Writing to destination buffer - checksums and sizes of used tables.
     */
    /* tslint:disable */
    TtfReader.prototype.writeCheckSums = function (writer, numTables, newLocaTableOut, newGlyphTable, glyphTableSize, locaTableSize) {
        /* tslint:enable */
        if (writer === null) {
            throw new Error('Argument Null Exception : writer');
        }
        if (newLocaTableOut === null) {
            throw new Error('Argument Null Exception : newLocaTableOut');
        }
        if (newGlyphTable === null) {
            throw new Error('Argument Null Exception : newGlyphTable');
        }
        var tableNames = this.tableNames;
        var usedTablesSize = numTables * 16 + (3 * 4);
        var nextTableSize = 0;
        for (var i = 0; i < tableNames.length; i++) {
            var tableName = tableNames[i];
            var tableInfo = this.getTable(tableName);
            if (tableInfo.empty) {
                continue;
            }
            writer.writeString(tableName);
            if (tableName === 'glyf') {
                var checksum = this.calculateCheckSum(newGlyphTable);
                writer.writeInt(checksum);
                nextTableSize = glyphTableSize;
            }
            else if (tableName === 'loca') {
                var checksum = this.calculateCheckSum(newLocaTableOut);
                writer.writeInt(checksum);
                nextTableSize = locaTableSize;
            }
            else {
                writer.writeInt(tableInfo.checksum);
                nextTableSize = tableInfo.length;
            }
            writer.writeUInt(usedTablesSize);
            writer.writeUInt(nextTableSize);
            usedTablesSize += this.align(nextTableSize);
        }
    };
    /**
     * Gets checksum from source buffer.
     */
    TtfReader.prototype.calculateCheckSum = function (bytes) {
        if (bytes === null) {
            throw new Error('Argument Null Exception : bytes');
        }
        var pos = 0;
        var byte1 = 0;
        var byte2 = 0;
        var byte3 = 0;
        var byte4 = 0;
        for (var i = 0; i < (bytes.length + 1) / 4; i++) {
            byte4 += (bytes[pos++] & 255);
            byte3 += (bytes[pos++] & 255);
            byte2 += (bytes[pos++] & 255);
            byte1 += (bytes[pos++] & 255);
        }
        var result = byte1;
        result += (byte2 << 8);
        result += (byte3 << 16);
        result += (byte4 << 24);
        return result;
    };
    /**
     * Writing to destination buffer - used glyphs.
     */
    TtfReader.prototype.writeGlyphs = function (writer, newLocaTable, newGlyphTable) {
        if (writer === null) {
            throw new Error('Argument Null Exception : writer');
        }
        if (newLocaTable === null) {
            throw new Error('Argument Null Exception : newLocaTableOut');
        }
        if (newGlyphTable === null) {
            throw new Error('Argument Null Exception : newGlyphTable');
        }
        var tableNames = this.tableNames;
        for (var i = 0; i < tableNames.length; i++) {
            var tableName = tableNames[i];
            var tableInfo = this.getTable(tableName);
            if (tableInfo.empty) {
                continue;
            }
            if (tableName === 'glyf') {
                writer.writeBytes(newGlyphTable);
            }
            else if (tableName === 'loca') {
                writer.writeBytes(newLocaTable);
            }
            else {
                var count = this.align(tableInfo.length);
                var buff = [];
                for (var i_1 = 0; i_1 < count; i_1++) {
                    buff.push(0);
                }
                this.offset = tableInfo.offset;
                var result = this.read(buff, 0, tableInfo.length);
                writer.writeBytes(result.buffer);
            }
        }
    };
    //public methods
    /**
     * Sets position value of font data.
     */
    TtfReader.prototype.setOffset = function (offset) {
        this.offset = offset;
    };
    /**
     * Creates font Internals
     * @private
     */
    TtfReader.prototype.createInternals = function () {
        this.metrics = new _ttf_metrics__WEBPACK_IMPORTED_MODULE_5__["TtfMetrics"]();
        var nameTable = this.readNameTable();
        var headTable = this.readHeadTable();
        this.bIsLocaShort = (headTable.indexToLocalFormat === 0);
        var horizontalHeadTable = this.readHorizontalHeaderTable();
        var os2Table = this.readOS2Table();
        var postTable = this.readPostTable();
        this.width = this.readWidthTable(horizontalHeadTable.numberOfHMetrics, headTable.unitsPerEm);
        var subTables = this.readCmapTable();
        this.initializeMetrics(nameTable, headTable, horizontalHeadTable, os2Table, postTable, subTables);
    };
    TtfReader.prototype.getGlyph = function (charCode) {
        if (typeof charCode === 'number') {
            var obj1 = null;
            if (!this.metrics.isSymbol && this.microsoftGlyphs != null) {
                if (this.microsoftGlyphs.containsKey(charCode)) {
                    obj1 = this.microsoftGlyphs.getValue(charCode);
                }
            }
            else if (this.metrics.isSymbol && this.macintoshGlyphs != null) {
                if (this.macintoshGlyphs.containsKey(charCode)) {
                    obj1 = this.macintoshGlyphs.getValue(charCode);
                }
            }
            var glyph = (obj1 != null) ? obj1 : this.getDefaultGlyph();
            return glyph;
        }
        else {
            var obj = null;
            var code = charCode.charCodeAt(0);
            if (!this.metrics.isSymbol && this.microsoft !== null) {
                if (this.microsoft.containsKey(code)) {
                    obj = this.microsoft.getValue(code);
                    if (code !== _string_tokenizer__WEBPACK_IMPORTED_MODULE_19__["StringTokenizer"].whiteSpace.charCodeAt(0)) {
                        this.isFontPresent = true;
                    }
                }
                else if (code !== _string_tokenizer__WEBPACK_IMPORTED_MODULE_19__["StringTokenizer"].whiteSpace.charCodeAt(0)) {
                    this.isFontPresent = false;
                }
            }
            else if (this.metrics.isSymbol && this.macintosh !== null || this.isMacTTF) {
                // NOTE: this code fixes char codes that extends 0x100. However, it might corrupt something.
                if (this.maxMacIndex !== 0) {
                    code %= this.maxMacIndex + 1;
                }
                else {
                    code = ((code & 0xff00) === 0xf000 ? code & 0xff : code);
                }
                if (this.macintosh.containsKey(code)) {
                    obj = this.macintosh.getValue(code);
                    this.isFontPresent = true;
                }
            }
            // Fix for StackOverFlow exception in XPS to PDF converter
            if (charCode === _string_tokenizer__WEBPACK_IMPORTED_MODULE_19__["StringTokenizer"].whiteSpace && obj === null) {
                obj = new _ttf_glyph_info__WEBPACK_IMPORTED_MODULE_12__["TtfGlyphInfo"]();
            }
            var glyph = (obj !== null) ? obj : this.getDefaultGlyph();
            return glyph;
        }
    };
    /**
     * Gets hash table with chars indexed by glyph index.
     */
    TtfReader.prototype.getGlyphChars = function (chars) {
        if (chars === null || chars === undefined) {
            throw new Error('Argument Null Exception : chars');
        }
        var dictionary = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__["Dictionary"]();
        var charKeys = chars.keys();
        for (var i = 0; i < charKeys.length; i++) {
            var ch = charKeys[i];
            var glyph = this.getGlyph(ch);
            if (!glyph.empty) {
                dictionary.setValue(glyph.index, ch.charCodeAt(0));
            }
        }
        return dictionary;
    };
    /**
     * Gets all glyphs.
     */
    TtfReader.prototype.getAllGlyphs = function () {
        var allGlyphInfo = [];
        var info = new _ttf_glyph_info__WEBPACK_IMPORTED_MODULE_12__["TtfGlyphInfo"]();
        var index = 0;
        for (var i = 0; i < this.width.length; i++) {
            var width = this.width[i];
            info.index = index;
            info.width = width;
            allGlyphInfo.push(info);
            index++;
        }
        return allGlyphInfo;
    };
    /**
     * Reads a font's program.
     * @private
     */
    TtfReader.prototype.readFontProgram = function (chars) {
        var glyphChars = this.getGlyphChars(chars);
        var locaTable = this.readLocaTable(this.bIsLocaShort);
        if (glyphChars.size() < chars.size()) {
            this.missedGlyphs = chars.size() - glyphChars.size();
        }
        this.updateGlyphChars(glyphChars, locaTable);
        /* tslint:disable */
        var result1 = this.generateGlyphTable(glyphChars, locaTable, null, null);
        /* tslint:enable */
        var glyphTableSize = result1.glyphTableSize;
        var newLocaTable = result1.newLocaTable;
        var newGlyphTable = result1.newGlyphTable;
        var result2 = this.updateLocaTable(newLocaTable, this.bIsLocaShort, null);
        var newLocaSize = result2.newLocaSize;
        var newLocaUpdated = result2.newLocaUpdated;
        var fontProgram = this.getFontProgram(newLocaUpdated, newGlyphTable, glyphTableSize, newLocaSize);
        return fontProgram;
    };
    /**
     * Reconverts string to be in proper format saved into PDF file.
     */
    TtfReader.prototype.convertString = function (text) {
        if (text === null) {
            throw new Error('Argument Null Exception : text');
        }
        var glyph = '';
        var i = 0;
        for (var k = 0; k < text.length; k++) {
            var ch = text[k];
            var glyphInfo = this.getGlyph(ch);
            if (!glyphInfo.empty) {
                glyph += String.fromCharCode(glyphInfo.index);
                i++;
            }
        }
        return glyph;
    };
    /**
     * Gets char width.
     */
    TtfReader.prototype.getCharWidth = function (code) {
        var glyphInfo = this.getGlyph(code);
        glyphInfo = (!glyphInfo.empty) ? glyphInfo : this.getDefaultGlyph();
        var codeWidth = (!glyphInfo.empty) ? glyphInfo.width : 0;
        return codeWidth;
    };
    TtfReader.prototype.readString = function (length, isUnicode) {
        if (isUnicode === undefined) {
            return this.readString(length, false);
        }
        else {
            //let buffer : number[] = this.readBytes(length);
            var result = '';
            if (isUnicode) {
                for (var i = 0; i < length; i++) {
                    if (i % 2 !== 0) {
                        result += String.fromCharCode(this.fontData[this.offset]);
                    }
                    this.offset += 1;
                }
            }
            else {
                for (var i = 0; i < length; i++) {
                    result += String.fromCharCode(this.fontData[this.offset]);
                    this.offset += 1;
                }
            }
            return result;
        }
    };
    TtfReader.prototype.readFixed = function (offset) {
        var integer = this.readInt16(offset);
        var sFraction = this.readInt16(offset + 2);
        var fraction = sFraction / 16384;
        return integer + fraction;
    };
    TtfReader.prototype.readInt32 = function (offset) {
        var i1 = this.fontData[offset + 3];
        var i2 = this.fontData[offset + 2];
        var i3 = this.fontData[offset + 1];
        var i4 = this.fontData[offset];
        this.offset += 4;
        return i1 + (i2 << 8) + (i3 << 16) + (i4 << 24);
    };
    TtfReader.prototype.readUInt32 = function (offset) {
        var i1 = this.fontData[offset + 3];
        var i2 = this.fontData[offset + 2];
        var i3 = this.fontData[offset + 1];
        var i4 = this.fontData[offset];
        this.offset += 4;
        return (i1 | i2 << 8 | i3 << 16 | i4 << 24);
    };
    // private readInt16(offset : number) : number {
    //     let result : number = (this.fontData[offset] << 8) + this.fontData[offset + 1];
    //     this.offset += 2;
    //     return result;
    // }
    TtfReader.prototype.readInt16 = function (offset) {
        var result = (this.fontData[offset] << 8) + this.fontData[offset + 1];
        result = result & (1 << 15) ? result - 0x10000 : result;
        this.offset += 2;
        return result;
    };
    TtfReader.prototype.readInt64 = function (offset) {
        var low = this.readInt32(offset + 4);
        var n = this.readInt32(offset) * 4294967296.0 + low;
        if (low < 0) {
            n += 4294967296;
        }
        return n;
    };
    TtfReader.prototype.readUInt16 = function (offset) {
        var result = (this.fontData[offset] << 8) | this.fontData[offset + 1];
        this.offset += 2;
        return result;
    };
    /**
     * Reads ushort array.
     */
    TtfReader.prototype.readUshortArray = function (length) {
        var buffer = [];
        for (var i = 0; i < length; i++) {
            buffer[i] = this.readUInt16(this.offset);
        }
        return buffer;
    };
    TtfReader.prototype.readBytes = function (length) {
        var result = [];
        for (var i = 0; i < length; i++) {
            result.push(this.fontData[this.offset]);
            this.offset += 1;
        }
        return result;
    };
    TtfReader.prototype.readByte = function (offset) {
        var result = this.fontData[offset];
        this.offset += 1;
        return result;
    };
    /**
     * Reads bytes to array in BigEndian order.
     * @private
     */
    TtfReader.prototype.read = function (buffer, index, count) {
        if (buffer === null) {
            throw new Error('Argument Null Exception : buffer');
        }
        var written = 0;
        var read = 0;
        do {
            for (var i = 0; (i < count - written) && (this.offset + i < this.fontData.length); i++) {
                buffer[index + i] = this.fontData[this.offset + i];
            }
            read = count - written;
            this.offset += read;
            written += read;
        } while (written < count);
        return { buffer: buffer, written: written };
    };
    return TtfReader;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-table-info.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-table-info.js ***!
  \*****************************************************************************************************/
/*! exports provided: TtfTableInfo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfTableInfo", function() { return TtfTableInfo; });
/**
 * TtfTableInfo.ts class for EJ2-PDF
 */
var TtfTableInfo = /** @class */ (function () {
    function TtfTableInfo() {
    }
    Object.defineProperty(TtfTableInfo.prototype, "empty", {
        //Properties
        /**
         * Gets a value indicating whether this table is empty.
         * @private
         */
        get: function () {
            var empty = (this.offset === this.length && this.length === this.checksum && this.checksum === 0);
            return empty;
        },
        enumerable: true,
        configurable: true
    });
    return TtfTableInfo;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.js":
/*!*****************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.js ***!
  \*****************************************************************************************************************/
/*! exports provided: TtfTrimmedCmapSubTable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TtfTrimmedCmapSubTable", function() { return TtfTrimmedCmapSubTable; });
/**
 * TtfTrimmedCmapSubTable.ts class for EJ2-PDF
 */
var TtfTrimmedCmapSubTable = /** @class */ (function () {
    function TtfTrimmedCmapSubTable() {
    }
    return TtfTrimmedCmapSubTable;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/unicode-true-type-font.js":
/*!*************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/unicode-true-type-font.js ***!
  \*************************************************************************************************************/
/*! exports provided: UnicodeTrueTypeFont */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnicodeTrueTypeFont", function() { return UnicodeTrueTypeFont; });
/* harmony import */ var _graphics_images_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../graphics/images/index */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/index.js");
/* harmony import */ var _ttf_reader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ttf-reader */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-reader.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../primitives/pdf-stream */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../../primitives/pdf-string */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./pdf-font-metrics */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font-metrics.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./../../input-output/pdf-operators */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js");
/**
 * TrueTypeFont.ts class for EJ2-PDF
 */

















var UnicodeTrueTypeFont = /** @class */ (function () {
    /* tslint:enable */
    //Constructors
    /**
     * Initializes a new instance of the `PdfTrueTypeFont` class.
     * @private
     */
    function UnicodeTrueTypeFont(base64String, size) {
        // Fields
        this.nameString = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
        /**
         * Specifies the Internal variable to store fields of `PdfDictionaryProperties`.
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_10__["DictionaryProperties"]();
        /**
         * Indicates whether the font program is compressed or not.
         * @private
         */
        this.isCompress = false;
        /**
         * Indicates whether the font is embedded or not.
         */
        this.isEmbedFont = false;
        /**
         * Cmap table's start prefix.
         */
        /* tslint:disable */
        this.cmapPrefix = '/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap' + _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_14__["Operators"].newLine + '/CIDSystemInfo << /Registry (Adobe)/Ordering (UCS)/Supplement 0>> def\n/CMapName ' + '/Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange' + _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_14__["Operators"].newLine;
        /* tslint:enable */
        /**
         * Cmap table's start suffix.
         */
        this.cmapEndCodespaceRange = 'endcodespacerange' + _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_14__["Operators"].newLine;
        /**
         * Cmap's begin range marker.
         */
        this.cmapBeginRange = 'beginbfrange' + _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_14__["Operators"].newLine;
        /**
         * Cmap's end range marker.
         */
        this.cmapEndRange = 'endbfrange' + _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_14__["Operators"].newLine;
        /**
         * Cmap table's end
         */
        /* tslint:disable */
        this.cmapSuffix = 'endbfrange\nendcmap\nCMapName currentdict ' + '/CMap defineresource pop\nend end' + _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_14__["Operators"].newLine;
        if (base64String === null || base64String === undefined) {
            throw new Error('ArgumentNullException:base64String');
        }
        this.fontSize = size;
        this.fontString = base64String;
        this.Initialize();
    }
    //Implementation
    /**
     * Returns width of the char symbol.
     */
    UnicodeTrueTypeFont.prototype.getCharWidth = function (charCode) {
        var codeWidth = this.ttfReader.getCharWidth(charCode);
        return codeWidth;
    };
    /**
     * Returns width of the text line.
     */
    UnicodeTrueTypeFont.prototype.getLineWidth = function (line) {
        // if (line == null) {
        //     throw new Error('ArgumentNullException : line');
        // }
        var width = 0;
        for (var i = 0, len = line.length; i < len; i++) {
            var ch = line[i];
            var charWidth = this.getCharWidth(ch);
            width += charWidth;
        }
        return width;
    };
    /**
     * Initializes a new instance of the `PdfTrueTypeFont` class.
     * @private
     */
    UnicodeTrueTypeFont.prototype.Initialize = function () {
        var byteArray = new _graphics_images_index__WEBPACK_IMPORTED_MODULE_0__["ByteArray"](this.fontString.length);
        byteArray.writeFromBase64String(this.fontString);
        this.fontData = byteArray.internalBuffer;
        this.ttfReader = new _ttf_reader__WEBPACK_IMPORTED_MODULE_1__["TtfReader"](this.fontData);
        this.ttfMetrics = this.ttfReader.metrics;
    };
    UnicodeTrueTypeFont.prototype.createInternals = function () {
        this.fontDictionary = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__["PdfDictionary"]();
        this.fontProgram = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_3__["PdfStream"]();
        this.cmap = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_3__["PdfStream"]();
        this.descendantFont = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__["PdfDictionary"]();
        this.metrics = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_9__["PdfFontMetrics"]();
        this.ttfReader.createInternals();
        this.ttfMetrics = this.ttfReader.metrics;
        this.initializeMetrics();
        // Create all the dictionaries of the font.
        this.subsetName = this.getFontName();
        this.createDescendantFont();
        this.createCmap();
        this.createFontDictionary();
        this.createFontProgram();
    };
    UnicodeTrueTypeFont.prototype.getInternals = function () {
        return this.fontDictionary;
    };
    /**
     * Initializes metrics.
     */
    UnicodeTrueTypeFont.prototype.initializeMetrics = function () {
        var ttfMetrics = this.ttfReader.metrics;
        this.metrics.ascent = ttfMetrics.macAscent;
        this.metrics.descent = ttfMetrics.macDescent;
        this.metrics.height = ttfMetrics.macAscent - ttfMetrics.macDescent + ttfMetrics.lineGap;
        this.metrics.name = ttfMetrics.fontFamily;
        this.metrics.postScriptName = ttfMetrics.postScriptName;
        this.metrics.size = this.fontSize;
        this.metrics.widthTable = new _pdf_font_metrics__WEBPACK_IMPORTED_MODULE_9__["StandardWidthTable"](ttfMetrics.widthTable);
        this.metrics.lineGap = ttfMetrics.lineGap;
        this.metrics.subScriptSizeFactor = ttfMetrics.subScriptSizeFactor;
        this.metrics.superscriptSizeFactor = ttfMetrics.superscriptSizeFactor;
        this.metrics.isBold = ttfMetrics.isBold;
    };
    /**
     * Gets random string.
     */
    UnicodeTrueTypeFont.prototype.getFontName = function () {
        var builder = '';
        var name;
        // if (this.isEmbed === false) {
        for (var i = 0; i < 6; i++) {
            var index = Math.floor(Math.random() * (25 - 0 + 1)) + 0;
            builder += this.nameString[index];
        }
        builder += '+';
        // }
        builder += this.ttfReader.metrics.postScriptName;
        name = builder.toString();
        // if (name === '') {
        //     name = this.ttfReader.metrics.fontFamily;
        // }
        name = this.formatName(name);
        return name;
    };
    /**
     * Generates name of the font.
     */
    UnicodeTrueTypeFont.prototype.formatName = function (fontName) {
        // if (fontName === null) {
        //     throw new Error('ArgumentNullException : fontName');
        // }
        // if (fontName === '') {
        //     throw new Error('ArgumentOutOfRangeException : fontName, Parameter can not be empty');
        // }
        var ret = fontName.replace('(', '#28');
        ret = ret.replace(')', '#29');
        ret = ret.replace('[', '#5B');
        ret = ret.replace(']', '#5D');
        ret = ret.replace('<', '#3C');
        ret = ret.replace('>', '#3E');
        ret = ret.replace('{', '#7B');
        ret = ret.replace('}', '#7D');
        ret = ret.replace('/', '#2F');
        ret = ret.replace('%', '#25');
        return ret.replace(' ', '#20');
    };
    /**
     * Creates descendant font.
     */
    UnicodeTrueTypeFont.prototype.createDescendantFont = function () {
        // Set property used to clone Font every time
        this.descendantFont.isFont = true;
        this.descendantFont.descendantFontBeginSave = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__["SaveDescendantFontEventHandler"](this);
        this.descendantFont.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.font));
        this.descendantFont.items.setValue(this.dictionaryProperties.subtype, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.cIDFontType2));
        this.descendantFont.items.setValue(this.dictionaryProperties.baseFont, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.subsetName));
        this.descendantFont.items.setValue(this.dictionaryProperties.cIDToGIDMap, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.identity));
        this.descendantFont.items.setValue(this.dictionaryProperties.dw, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](1000));
        this.fontDescriptor = this.createFontDescriptor();
        this.descendantFont.items.setValue(this.dictionaryProperties.fontDescriptor, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_8__["PdfReferenceHolder"](this.fontDescriptor));
        var systemInfo = this.createSystemInfo();
        this.descendantFont.items.setValue(this.dictionaryProperties.cIDSystemInfo, systemInfo);
    };
    /**
     * Creates font descriptor.
     */
    UnicodeTrueTypeFont.prototype.createFontDescriptor = function () {
        var descriptor = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__["PdfDictionary"]();
        var metrics = this.ttfReader.metrics;
        // Set property used to clone Font every time
        descriptor.isFont = true;
        descriptor.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.fontDescriptor));
        descriptor.items.setValue(this.dictionaryProperties.fontName, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.subsetName));
        descriptor.items.setValue(this.dictionaryProperties.flags, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](this.getDescriptorFlags()));
        descriptor.items.setValue(this.dictionaryProperties.fontBBox, _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_4__["PdfArray"].fromRectangle(this.getBoundBox()));
        descriptor.items.setValue(this.dictionaryProperties.missingWidth, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](metrics.widthTable[32]));
        descriptor.items.setValue(this.dictionaryProperties.stemV, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](metrics.stemV));
        descriptor.items.setValue(this.dictionaryProperties.italicAngle, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](metrics.italicAngle));
        descriptor.items.setValue(this.dictionaryProperties.capHeight, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](metrics.capHeight));
        descriptor.items.setValue(this.dictionaryProperties.ascent, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](metrics.winAscent));
        descriptor.items.setValue(this.dictionaryProperties.descent, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](metrics.winDescent));
        descriptor.items.setValue(this.dictionaryProperties.leading, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](metrics.leading));
        descriptor.items.setValue(this.dictionaryProperties.avgWidth, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](metrics.widthTable[32]));
        descriptor.items.setValue(this.dictionaryProperties.fontFile2, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_8__["PdfReferenceHolder"](this.fontProgram));
        descriptor.items.setValue(this.dictionaryProperties.maxWidth, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](metrics.widthTable[32]));
        descriptor.items.setValue(this.dictionaryProperties.xHeight, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](0));
        descriptor.items.setValue(this.dictionaryProperties.stemH, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](0));
        return descriptor;
    };
    /**
     * Generates cmap.
     * @private
     */
    UnicodeTrueTypeFont.prototype.createCmap = function () {
        this.cmap.cmapBeginSave = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_3__["SaveCmapEventHandler"](this);
    };
    /**
     * Generates font dictionary.
     */
    UnicodeTrueTypeFont.prototype.createFontDictionary = function () {
        // Set property used to clone Font every time
        this.fontDictionary.isFont = true;
        this.fontDictionary.fontDictionaryBeginSave = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__["SaveFontDictionaryEventHandler"](this);
        this.fontDictionary.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.font));
        this.fontDictionary.items.setValue(this.dictionaryProperties.baseFont, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.subsetName));
        this.fontDictionary.items.setValue(this.dictionaryProperties.subtype, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.type0));
        this.fontDictionary.items.setValue(this.dictionaryProperties.encoding, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.identityH));
        var descFonts = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_4__["PdfArray"]();
        var reference = new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_8__["PdfReferenceHolder"](this.descendantFont);
        // Set property used to clone Font every time
        descFonts.isFont = true;
        descFonts.add(reference);
        this.fontDictionary.items.setValue(this.dictionaryProperties.descendantFonts, descFonts);
    };
    /**
     * Creates font program.
     */
    UnicodeTrueTypeFont.prototype.createFontProgram = function () {
        this.fontProgram.fontProgramBeginSave = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_3__["SaveFontProgramEventHandler"](this);
    };
    /**
     * Creates system info dictionary for CID font.
     * @private
     */
    UnicodeTrueTypeFont.prototype.createSystemInfo = function () {
        var systemInfo = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_2__["PdfDictionary"]();
        systemInfo.items.setValue(this.dictionaryProperties.registry, new _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_7__["PdfString"]('Adobe'));
        systemInfo.items.setValue(this.dictionaryProperties.ordering, new _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_7__["PdfString"](this.dictionaryProperties.identity));
        systemInfo.items.setValue(this.dictionaryProperties.supplement, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](0));
        return systemInfo;
    };
    /**
     * Runs before font Dictionary will be saved.
     */
    UnicodeTrueTypeFont.prototype.descendantFontBeginSave = function () {
        if (this.usedChars !== null && this.usedChars !== undefined && this.usedChars.size() > 0) {
            var width = this.getDescendantWidth();
            if (width !== null) {
                this.descendantFont.items.setValue(this.dictionaryProperties.w, width);
            }
        }
    };
    /**
     * Runs before font Dictionary will be saved.
     */
    UnicodeTrueTypeFont.prototype.cmapBeginSave = function () {
        this.generateCmap();
    };
    /**
     * Runs before font Dictionary will be saved.
     */
    /* tslint:disable */
    UnicodeTrueTypeFont.prototype.fontDictionaryBeginSave = function () {
        if (this.usedChars !== null && this.usedChars !== undefined && this.usedChars.size() > 0 && !this.fontDictionary.containsKey(this.dictionaryProperties.toUnicode)) {
            this.fontDictionary.items.setValue(this.dictionaryProperties.toUnicode, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_8__["PdfReferenceHolder"](this.cmap));
        }
    };
    /* tslint:enable */
    /**
     * Runs before font program stream save.
     */
    UnicodeTrueTypeFont.prototype.fontProgramBeginSave = function () {
        this.isCompress = true;
        this.generateFontProgram();
    };
    /**
     * Gets width description pad array for c i d font.
     */
    UnicodeTrueTypeFont.prototype.getDescendantWidth = function () {
        var array = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_4__["PdfArray"]();
        if (this.usedChars !== null && this.usedChars !== undefined && this.usedChars.size() > 0) {
            var glyphInfo = [];
            // if (!this.isEmbedFont) {
            var keys = this.usedChars.keys();
            for (var i = 0; i < keys.length; i++) {
                var chLen = keys[i];
                var glyph = this.ttfReader.getGlyph(chLen);
                if (glyph.empty) {
                    continue;
                }
                glyphInfo.push(glyph);
            }
            // } else {
            //     glyphInfo = this.ttfReader.getAllGlyphs();
            // }
            glyphInfo.sort(function (a, b) { return a.index - b.index; });
            var firstGlyphIndex = 0;
            var lastGlyphIndex = 0;
            var firstGlyphIndexWasSet = false;
            var widthDetails = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_4__["PdfArray"]();
            // if (!this.isEmbedFont) {
            for (var i = 0; i < glyphInfo.length; i++) {
                var glyph = glyphInfo[i];
                if (!firstGlyphIndexWasSet) {
                    firstGlyphIndexWasSet = true;
                    firstGlyphIndex = glyph.index;
                    lastGlyphIndex = glyph.index - 1;
                }
                if ((lastGlyphIndex + 1 !== glyph.index || (i + 1 === glyphInfo.length)) && glyphInfo.length > 1) {
                    // Add glyph index / width.
                    array.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](firstGlyphIndex));
                    if (i !== 0) {
                        array.add(widthDetails);
                    }
                    firstGlyphIndex = glyph.index;
                    widthDetails = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_4__["PdfArray"]();
                }
                widthDetails.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](glyph.width));
                if (i + 1 === glyphInfo.length) {
                    array.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_6__["PdfNumber"](firstGlyphIndex));
                    array.add(widthDetails);
                }
                lastGlyphIndex = glyph.index;
            }
            // } else {
            //     for (let i : number = 0; i < glyphInfo.length; i++) {
            //         let glyph : TtfGlyphInfo = glyphInfo[i];
            //         if (!firstGlyphIndexWasSet) {
            //             firstGlyphIndexWasSet = true;
            //             lastGlyphIndex = glyph.index - 1;
            //         }
            //         firstGlyphIndex = glyph.index;
            //         if ((lastGlyphIndex + 1 === glyph.index || (i + 1 === glyphInfo.length)) && glyphInfo.length > 1) {
            //             // Add glyph index / width.
            //             widthDetails.add(new PdfNumber(glyph.width));
            //             array.add(new PdfNumber(firstGlyphIndex));
            //             array.add(widthDetails);
            //             widthDetails = new PdfArray();
            //         }
            //         lastGlyphIndex = glyph.index;
            //     }
            // }
        }
        return array;
    };
    /**
     * Creates cmap.
     */
    UnicodeTrueTypeFont.prototype.generateCmap = function () {
        if (this.usedChars !== null && this.usedChars !== undefined && this.usedChars.size() > 0) {
            var glyphChars = this.ttfReader.getGlyphChars(this.usedChars);
            if (glyphChars.size() > 0) {
                var keys = glyphChars.keys().sort();
                // add first and last glyph indexes
                var first = keys[0];
                var last = keys[keys.length - 1];
                var middlePart = this.toHexString(first, false) + this.toHexString(last, false) + _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_14__["Operators"].newLine;
                var builder = '';
                builder += this.cmapPrefix;
                builder += middlePart;
                builder += this.cmapEndCodespaceRange;
                var nextRange = 0;
                for (var i = 0; i < keys.length; i++) {
                    if (nextRange === 0) {
                        if (i !== 0) {
                            builder += this.cmapEndRange;
                        }
                        nextRange = Math.min(100, keys.length - i);
                        builder += nextRange;
                        builder += _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_14__["Operators"].whiteSpace;
                        builder += this.cmapBeginRange;
                    }
                    nextRange -= 1;
                    var key = keys[i];
                    /* tslint:disable */
                    builder += this.toHexString(key, true) + this.toHexString(key, true) + this.toHexString(glyphChars.getValue(key), true) + '\n';
                    /* tslint:enable */
                }
                builder += this.cmapSuffix;
                this.cmap.clearStream();
                this.cmap.isFont = true;
                this.cmap.write(builder);
            }
        }
    };
    /**
     * Generates font program.
     */
    UnicodeTrueTypeFont.prototype.generateFontProgram = function () {
        var fontProgram = null;
        this.usedChars = (this.usedChars === null || this.usedChars === undefined) ? new _collections_dictionary__WEBPACK_IMPORTED_MODULE_11__["Dictionary"]() : this.usedChars;
        this.ttfReader.setOffset(0);
        fontProgram = this.ttfReader.readFontProgram(this.usedChars);
        this.fontProgram.clearStream();
        this.fontProgram.isFont = true;
        this.fontProgram.writeBytes(fontProgram);
    };
    /**
     * Calculates flags for the font descriptor.
     * @private
     */
    UnicodeTrueTypeFont.prototype.getDescriptorFlags = function () {
        var flags = 0;
        var metrics = this.ttfReader.metrics;
        if (metrics.isFixedPitch) {
            flags |= _enum__WEBPACK_IMPORTED_MODULE_12__["FontDescriptorFlags"].FixedPitch;
        }
        if (metrics.isSymbol) {
            flags |= _enum__WEBPACK_IMPORTED_MODULE_12__["FontDescriptorFlags"].Symbolic;
        }
        else {
            flags |= _enum__WEBPACK_IMPORTED_MODULE_12__["FontDescriptorFlags"].Nonsymbolic;
        }
        if (metrics.isItalic) {
            flags |= _enum__WEBPACK_IMPORTED_MODULE_12__["FontDescriptorFlags"].Italic;
        }
        if (metrics.isBold) {
            flags |= _enum__WEBPACK_IMPORTED_MODULE_12__["FontDescriptorFlags"].ForceBold;
        }
        return flags;
    };
    /**
     * Calculates BoundBox of the descriptor.
     * @private
     */
    UnicodeTrueTypeFont.prototype.getBoundBox = function () {
        var rect = this.ttfReader.metrics.fontBox;
        var width = Math.abs(rect.right - rect.left);
        var height = Math.abs(rect.top - rect.bottom);
        var rectangle = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_13__["RectangleF"](rect.left, rect.bottom, width, height);
        return rectangle;
    };
    /**
     * Converts integer of decimal system to hex integer.
     */
    UnicodeTrueTypeFont.prototype.toHexString = function (n, isCaseChange) {
        var s = n.toString(16);
        if (isCaseChange) {
            s = s.toUpperCase();
        }
        return '<0000'.substring(0, 5 - s.length) + s + '>';
    };
    /**
     * Stores used symbols.
     */
    UnicodeTrueTypeFont.prototype.setSymbols = function (text) {
        if (text === null) {
            throw new Error('Argument Null Exception : text');
        }
        if (this.usedChars === null || this.usedChars === undefined) {
            this.usedChars = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_11__["Dictionary"]();
        }
        for (var i = 0; i < text.length; i++) {
            var ch = text[i];
            this.usedChars.setValue(ch, String.fromCharCode(0));
        }
        // else {
        //     if (text === null) {
        //         throw new Error('Argument Null Exception : glyphs');
        //     }
        //     if (this.usedChars === null || this.usedChars === undefined) {
        //             this.usedChars = new Dictionary<string, string>();
        //     }
        //     for (let i : number = 0; i < text.length; i++) {
        //         let glyphIndex : number = text[i];
        //         let glyph : TtfGlyphInfo =  this.ttfReader.getGlyph(glyphIndex);
        //         if (!glyph == null) {
        //             let c : string = glyph.charCode.toLocaleString();
        //             this.usedChars.setValue(c, String.fromCharCode(0));
        //         }
        //     }
        // }
        if (this.isEmbedFont === false) {
            this.getDescendantWidth();
        }
    };
    return UnicodeTrueTypeFont;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/byte-array.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/byte-array.js ***!
  \**************************************************************************************************/
/*! exports provided: ByteArray */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ByteArray", function() { return ByteArray; });
/**
 * ByteArray class
 * Used to keep information about image stream as byte array.
 * @private
 */
var ByteArray = /** @class */ (function () {
    /**
     * Initialize the new instance for `byte-array` class
     * @hidden
     * @private
     */
    function ByteArray(length) {
        /**
         * Current stream `position`.
         * @default 0
         * @private
         */
        this.mPosition = 0;
        this.buffer = new Uint8Array(length);
        this.dataView = new DataView(this.buffer.buffer);
    }
    Object.defineProperty(ByteArray.prototype, "position", {
        /**
         * Gets and Sets a current `position` of byte array.
         * @hidden
         * @private
         */
        get: function () {
            return this.mPosition;
        },
        set: function (value) {
            this.mPosition = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Read` from current stream position.
     * @default 0
     * @hidden
     * @private
     */
    ByteArray.prototype.read = function (buffer, offset, count) {
        for (var index = offset; index < count; index++) {
            var position = this.position;
            buffer.buffer[index] = this.readByte(position);
            this.position++;
        }
    };
    /**
     * @hidden
     */
    ByteArray.prototype.getBuffer = function (index) {
        return this.buffer[index];
    };
    /**
     * @hidden
     */
    ByteArray.prototype.writeFromBase64String = function (base64) {
        var arr = this.encodedString(base64);
        this.buffer = arr;
    };
    /**
     * @hidden
     */
    ByteArray.prototype.encodedString = function (input) {
        var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
        var chr1;
        var chr2;
        var chr3;
        var enc1;
        var enc2;
        var enc3;
        var enc4;
        var i = 0;
        var resultIndex = 0;
        var dataUrlPrefix = 'data:';
        input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
        var totalLength = input.length * 3 / 4;
        if (input.charAt(input.length - 1) === keyStr.charAt(64)) {
            totalLength--;
        }
        var output = new Uint8Array(totalLength | 0);
        while (i < input.length) {
            enc1 = keyStr.indexOf(input.charAt(i++));
            enc2 = keyStr.indexOf(input.charAt(i++));
            enc3 = keyStr.indexOf(input.charAt(i++));
            enc4 = keyStr.indexOf(input.charAt(i++));
            chr1 = (enc1 << 2) | (enc2 >> 4);
            chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
            chr3 = ((enc3 & 3) << 6) | enc4;
            output[resultIndex++] = chr1;
            output[resultIndex++] = chr2;
            output[resultIndex++] = chr3;
        }
        return output;
    };
    /**
     * @hidden
     */
    ByteArray.prototype.readByte = function (offset) {
        return (this.buffer[offset]);
    };
    Object.defineProperty(ByteArray.prototype, "internalBuffer", {
        /**
         * @hidden
         */
        get: function () {
            return this.buffer;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ByteArray.prototype, "count", {
        /**
         * @hidden
         */
        get: function () {
            return this.buffer.byteLength;
        },
        enumerable: true,
        configurable: true
    });
    return ByteArray;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/image-decoder.js":
/*!*****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/image-decoder.js ***!
  \*****************************************************************************************************/
/*! exports provided: ImageFormat, ImageDecoder */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImageFormat", function() { return ImageFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImageDecoder", function() { return ImageDecoder; });
/* harmony import */ var _byte_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/byte-array.js");
/* harmony import */ var _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../primitives/pdf-stream */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _primitives_pdf_boolean__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../primitives/pdf-boolean */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-boolean.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/**
 * ImageDecoder class
 */







/**
 * Specifies the image `format`.
 * @private
 */
var ImageFormat;
(function (ImageFormat) {
    /**
     * Specifies the type of `Unknown`.
     * @hidden
     * @private
     */
    ImageFormat[ImageFormat["Unknown"] = 0] = "Unknown";
    /**
     * Specifies the type of `Bmp`.
     * @hidden
     * @private
     */
    ImageFormat[ImageFormat["Bmp"] = 1] = "Bmp";
    /**
     * Specifies the type of `Emf`.
     * @hidden
     * @private
     */
    ImageFormat[ImageFormat["Emf"] = 2] = "Emf";
    /**
     * Specifies the type of `Gif`.
     * @hidden
     * @private
     */
    ImageFormat[ImageFormat["Gif"] = 3] = "Gif";
    /**
     * Specifies the type of `Jpeg`.
     * @hidden
     * @private
     */
    ImageFormat[ImageFormat["Jpeg"] = 4] = "Jpeg";
    /**
     * Specifies the type of `Png`.
     * @hidden
     * @private
     */
    ImageFormat[ImageFormat["Png"] = 5] = "Png";
    /**
     * Specifies the type of `Wmf`.
     * @hidden
     * @private
     */
    ImageFormat[ImageFormat["Wmf"] = 6] = "Wmf";
    /**
     * Specifies the type of `Icon`.
     * @hidden
     * @private
     */
    ImageFormat[ImageFormat["Icon"] = 7] = "Icon";
})(ImageFormat || (ImageFormat = {}));
/**
 * `Decode the image stream`.
 * @private
 */
var ImageDecoder = /** @class */ (function () {
    /**
     * Initialize the new instance for `image-decoder` class.
     * @private
     */
    function ImageDecoder(stream) {
        /**
         * Specifies `format` of image.
         * @hidden
         * @private
         */
        this.mFormat = ImageFormat.Unknown;
        /**
         * `Bits per component`.
         * @default 8
         * @hidden
         * @private
         */
        this.mbitsPerComponent = 8;
        /**
         * Internal variable for accessing fields from `DictionryProperties` class.
         * @hidden
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__["DictionaryProperties"]();
        this.mStream = stream;
        this.initialize();
    }
    Object.defineProperty(ImageDecoder.prototype, "height", {
        /**
         * Gets the `height` of image.
         * @hidden
         * @private
         */
        get: function () {
            return this.mHeight;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ImageDecoder.prototype, "width", {
        /**
         * Gets the `width` of image.
         * @hidden
         * @private
         */
        get: function () {
            return this.mWidth;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ImageDecoder.prototype, "bitsPerComponent", {
        /**
         * Gets `bits per component`.
         * @hidden
         * @private
         */
        get: function () {
            return this.mbitsPerComponent;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ImageDecoder.prototype, "size", {
        /**
         * Gets the `size` of an image data.
         * @hidden
         * @private
         */
        get: function () {
            return this.mImageData.count;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ImageDecoder.prototype, "imageData", {
        /**
         * Gets the value of an `image data`.
         * @hidden
         * @private
         */
        get: function () {
            return this.mImageData;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ImageDecoder.prototype, "imageDataAsNumberArray", {
        /**
         * Gets the value of an `image data as number array`.
         * @hidden
         * @private
         */
        get: function () {
            return this.mImageData.internalBuffer.buffer;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Initialize` image data and image stream.
     * @hidden
     * @private
     */
    ImageDecoder.prototype.initialize = function () {
        if (this.mFormat === ImageFormat.Unknown && this.checkIfJpeg()) {
            this.mFormat = ImageFormat.Jpeg;
            this.parseJpegImage();
        }
        this.reset();
        this.mImageData = new _byte_array__WEBPACK_IMPORTED_MODULE_0__["ByteArray"](this.mStream.count);
        this.mStream.read(this.mImageData, 0, this.mImageData.count);
    };
    /**
     * `Reset` stream position into 0.
     * @hidden
     * @private
     */
    ImageDecoder.prototype.reset = function () {
        this.mStream.position = 0;
    };
    /**
     * `Parse` Jpeg image.
     * @hidden
     * @private
     */
    ImageDecoder.prototype.parseJpegImage = function () {
        this.reset();
        var imgData = new _byte_array__WEBPACK_IMPORTED_MODULE_0__["ByteArray"](this.mStream.count);
        this.mStream.read(imgData, 0, imgData.count);
        var i = 4;
        /* tslint:disable */
        if (String.fromCharCode(imgData.getBuffer(i + 2)) === 'J' && String.fromCharCode(imgData.getBuffer(i + 3)) === 'F' && String.fromCharCode(imgData.getBuffer(i + 4)) === 'I' && String.fromCharCode(imgData.getBuffer(i + 5)) === 'F' && imgData.getBuffer(i + 6) === 0) {
            var length_1 = imgData.getBuffer(i) * 256 + imgData.getBuffer(i + 1);
            while (i + length_1 < imgData.count) {
                i += length_1;
                if (imgData.getBuffer(i + 1) === 192) {
                    this.mHeight = imgData.getBuffer(i + 5) * 256 + imgData.getBuffer(i + 6);
                    this.mWidth = imgData.getBuffer(i + 7) * 256 + imgData.getBuffer(i + 8);
                    return;
                }
                else {
                    i += 2;
                    length_1 = imgData.getBuffer(i) * 256 + imgData.getBuffer(i + 1);
                }
            }
        }
        /* tslint:enable */
    };
    Object.defineProperty(ImageDecoder.prototype, "format", {
        /**
         * Gets the image `format`.
         * @private
         * @hidden
         */
        get: function () {
            return this.mFormat;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Checks if JPG`.
     * @private
     * @hidden
     */
    ImageDecoder.prototype.checkIfJpeg = function () {
        this.reset();
        for (var i = 0; i < ImageDecoder.mJpegHeader.length; i++) {
            if (ImageDecoder.mJpegHeader[i] !== this.mStream.readByte(i)) {
                return false;
            }
            this.mStream.position++;
        }
        return true;
    };
    /**
     * Return image `dictionary`.
     * @hidden
     * @private
     */
    ImageDecoder.prototype.getImageDictionary = function () {
        if (this.mFormat === ImageFormat.Jpeg) {
            var tempArrayBuffer = this.imageData.internalBuffer.length;
            this.imageStream = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_1__["PdfStream"]();
            this.imageStream.isImage = true;
            var tempString = '';
            var decodedString = '';
            for (var i = 0; i < this.imageDataAsNumberArray.byteLength; i++) {
                tempString += String.fromCharCode(null, this.mStream.readByte(i));
            }
            for (var i = 0; i < tempString.length; i++) {
                if (i % 2 !== 0) {
                    decodedString += tempString[i];
                }
            }
            this.imageStream.data = [decodedString];
            this.imageStream.compress = false;
            this.imageStream.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_3__["PdfName"](this.dictionaryProperties.xObject));
            this.imageStream.items.setValue(this.dictionaryProperties.subtype, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_3__["PdfName"](this.dictionaryProperties.image));
            this.imageStream.items.setValue(this.dictionaryProperties.width, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](this.width));
            this.imageStream.items.setValue(this.dictionaryProperties.height, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](this.height));
            this.imageStream.items.setValue(this.dictionaryProperties.bitsPerComponent, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](this.bitsPerComponent));
            this.imageStream.items.setValue(this.dictionaryProperties.filter, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_3__["PdfName"](this.dictionaryProperties.dctdecode));
            this.imageStream.items.setValue(this.dictionaryProperties.colorSpace, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_3__["PdfName"](this.getColorSpace()));
            this.imageStream.items.setValue(this.dictionaryProperties.decodeParms, this.getDecodeParams());
            return this.imageStream;
        }
        else {
            return this.imageStream;
        }
    };
    /**
     * Return `colorSpace` of an image.
     * @hidden
     * @private
     */
    ImageDecoder.prototype.getColorSpace = function () {
        return this.dictionaryProperties.deviceRgb;
    };
    /**
     * Return `decode parameters` of an image.
     * @hidden
     * @private
     */
    ImageDecoder.prototype.getDecodeParams = function () {
        var decodeParams = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_6__["PdfDictionary"]();
        decodeParams.items.setValue(this.dictionaryProperties.columns, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](this.width));
        decodeParams.items.setValue(this.dictionaryProperties.blackIs1, new _primitives_pdf_boolean__WEBPACK_IMPORTED_MODULE_5__["PdfBoolean"](true));
        decodeParams.items.setValue(this.dictionaryProperties.k, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](-1));
        decodeParams.items.setValue(this.dictionaryProperties.predictor, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](15));
        decodeParams.items.setValue(this.dictionaryProperties.bitsPerComponent, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](this.bitsPerComponent));
        return decodeParams;
    };
    /**
     * Number array for `png header`.
     * @hidden
     * @private
     */
    ImageDecoder.mPngHeader = [137, 80, 78, 71, 13, 10, 26, 10];
    /**
     * Number Array for `jpeg header`.
     * @hidden
     * @private
     */
    ImageDecoder.mJpegHeader = [255, 216];
    /**
     * Number array for `gif header`.
     * @hidden
     * @private
     */
    ImageDecoder.GIF_HEADER = 'G,I,F,8';
    /**
     * Number array for `bmp header.`
     * @hidden
     * @private
     */
    ImageDecoder.BMP_HEADER = 'B,M';
    return ImageDecoder;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/index.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/index.js ***!
  \*********************************************************************************************/
/*! exports provided: ByteArray, ImageFormat, ImageDecoder, PdfBitmap, PdfImage */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _byte_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/byte-array.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ByteArray", function() { return _byte_array__WEBPACK_IMPORTED_MODULE_0__["ByteArray"]; });

/* harmony import */ var _image_decoder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./image-decoder */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/image-decoder.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageFormat", function() { return _image_decoder__WEBPACK_IMPORTED_MODULE_1__["ImageFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageDecoder", function() { return _image_decoder__WEBPACK_IMPORTED_MODULE_1__["ImageDecoder"]; });

/* harmony import */ var _pdf_bitmap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-bitmap */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-bitmap.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBitmap", function() { return _pdf_bitmap__WEBPACK_IMPORTED_MODULE_2__["PdfBitmap"]; });

/* harmony import */ var _pdf_image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pdf-image */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-image.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfImage", function() { return _pdf_image__WEBPACK_IMPORTED_MODULE_3__["PdfImage"]; });

/**
 * Images classes
 * @hidden
 */






/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-bitmap.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-bitmap.js ***!
  \**************************************************************************************************/
/*! exports provided: PdfBitmap */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfBitmap", function() { return PdfBitmap; });
/* harmony import */ var _graphics_images_image_decoder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../graphics/images/image-decoder */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/image-decoder.js");
/* harmony import */ var _graphics_images_byte_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../graphics/images/byte-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/byte-array.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _pdf_image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pdf-image */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-image.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfBitmap.ts class for EJ2-PDF
 */




/**
 * The 'PdfBitmap' contains methods and properties to handle the Bitmap images.
 * ```typescript
 * // create a new PDF document.
 * let document : PdfDocument = new PdfDocument();
 * // add a page to the document.
 * let page1 : PdfPage = document.pages.add();
 * // base64 string of an image
 * let imageString : string = '/9j/3+2w7em7HzY/KiijFw … 1OEYRUYrQ45yc5OUtz/9k=';
 * // load the image from the base64 string of original image.
 * let image : PdfBitmap = new PdfBitmap(imageString);
 * // draw the image
 * page1.graphics.drawImage(image, new RectangleF({x : 10, y : 10}, {width : 200, height : 200}));
 * // save the document.
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfBitmap = /** @class */ (function (_super) {
    __extends(PdfBitmap, _super);
    /**
     * Create an instance for `PdfBitmap` class.
     * @param encodedString Base64 string of an image.
     * ```typescript
     * // create a new PDF document.
     * let document : PdfDocument = new PdfDocument();
     * // add a page to the document.
     * let page1 : PdfPage = document.pages.add();
     * // base64 string of an image
     * let imageString : string = '/9j/3+2w7em7HzY/KiijFw … 1OEYRUYrQ45yc5OUtz/9k=';
     * //
     * // load the image from the base64 string of original image.
     * let image : PdfBitmap = new PdfBitmap(imageString);
     * //
     * // draw the image
     * page1.graphics.drawImage(image, new RectangleF({x : 10, y : 10}, {width : 200, height : 200}));
     * // save the document.
     * document.save('output.pdf');
     * // destroy the document
     * document.destroy();
     * ```
     */
    function PdfBitmap(encodedString) {
        var _this = _super.call(this) || this;
        //Fields
        /**
         * Specifies the `status` of an image.
         * @default true.
         * @hidden
         * @private
         */
        _this.imageStatus = true;
        /**
         * Internal variable for accessing fields from `DictionryProperties` class.
         * @hidden
         * @private
         */
        _this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__["DictionaryProperties"]();
        _this.loadImage(encodedString);
        return _this;
    }
    /**
     * `Load image`.
     * @hidden
     * @private
     */
    PdfBitmap.prototype.loadImage = function (encodedString) {
        var task = this.initializeAsync(encodedString);
    };
    /**
     * `Initialize` image parameters.
     * @private
     */
    PdfBitmap.prototype.initializeAsync = function (encodedString) {
        var byteArray = new _graphics_images_byte_array__WEBPACK_IMPORTED_MODULE_1__["ByteArray"](encodedString.length);
        byteArray.writeFromBase64String(encodedString);
        this.decoder = new _graphics_images_image_decoder__WEBPACK_IMPORTED_MODULE_0__["ImageDecoder"](byteArray);
        this.height = this.decoder.height;
        this.width = this.decoder.width;
        // FrameCount = BitmapImageDecoder.FrameCount;
        this.bitsPerComponent = this.decoder.bitsPerComponent;
    };
    /**
     * `Saves` the image into stream.
     * @private
     */
    PdfBitmap.prototype.save = function () {
        this.imageStatus = true;
        this.imageStream = this.decoder.getImageDictionary();
    };
    return PdfBitmap;
}(_pdf_image__WEBPACK_IMPORTED_MODULE_3__["PdfImage"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-image.js":
/*!*************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-image.js ***!
  \*************************************************************************************************/
/*! exports provided: PdfImage */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfImage", function() { return PdfImage; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _unit_convertor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../unit-convertor */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/unit-convertor.js");



/**
 * `PdfImage` class represents the base class for images and provides functionality for the 'PdfBitmap' class.
 * @private
 */
var PdfImage = /** @class */ (function () {
    function PdfImage() {
    }
    Object.defineProperty(PdfImage.prototype, "width", {
        /**
         * Gets and Sets the `width` of an image.
         * @private
         */
        get: function () {
            return this.imageWidth;
        },
        set: function (value) {
            this.imageWidth = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfImage.prototype, "height", {
        /**
         * Gets and Sets the `height` of an image.
         * @private
         */
        get: function () {
            return this.imageHeight;
        },
        set: function (value) {
            this.imageHeight = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfImage.prototype, "size", {
        /**
         * Gets or sets the size of the image.
         * @private
         */
        set: function (value) {
            this.width = value.width;
            this.height = value.height;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfImage.prototype, "physicalDimension", {
        /**
         * Gets the `physical dimension` of an image.
         * @private
         */
        get: function () {
            this.imagePhysicalDimension = this.getPointSize(this.width, this.height, this.horizontalResolution, this.verticalResolution);
            return new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](this.width, this.height);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfImage.prototype, "element", {
        // /**
        //  * Gets the `image stream as string`.
        //  * @private
        //  */
        // public static fromString(string : string) : PdfImage {
        //     let image : PdfImage = new PdfBitmap(string);
        //     return image;
        // }
        /**
         * Gets the `element` image stream.
         * @private
         */
        get: function () {
            return this.imageStream;
        },
        enumerable: true,
        configurable: true
    });
    PdfImage.prototype.getPointSize = function (width, height, horizontalResolution, verticalResolution) {
        if (typeof horizontalResolution === 'undefined') {
            var dpiX = _unit_convertor__WEBPACK_IMPORTED_MODULE_2__["PdfUnitConverter"].horizontalResolution;
            var dpiY = _unit_convertor__WEBPACK_IMPORTED_MODULE_2__["PdfUnitConverter"].verticalResolution;
            var size = this.getPointSize(width, height, dpiX, dpiY);
            return size;
        }
        else {
            var ucX = new _unit_convertor__WEBPACK_IMPORTED_MODULE_2__["PdfUnitConverter"](horizontalResolution);
            var ucY = new _unit_convertor__WEBPACK_IMPORTED_MODULE_2__["PdfUnitConverter"](verticalResolution);
            var ptWidth = ucX.convertUnits(width, _enum__WEBPACK_IMPORTED_MODULE_1__["PdfGraphicsUnit"].Pixel, _enum__WEBPACK_IMPORTED_MODULE_1__["PdfGraphicsUnit"].Point);
            var ptHeight = ucY.convertUnits(height, _enum__WEBPACK_IMPORTED_MODULE_1__["PdfGraphicsUnit"].Pixel, _enum__WEBPACK_IMPORTED_MODULE_1__["PdfGraphicsUnit"].Point);
            var size = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](ptWidth, ptHeight);
            return size;
        }
    };
    return PdfImage;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js ***!
  \******************************************************************************************/
/*! exports provided: PdfColor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfColor", function() { return PdfColor; });
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../input-output/pdf-operators */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js");
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");





/**
 * Implements structures and routines working with `color`.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * // add a new page to the document
 * let page1 : PdfPage = document.pages.add();
 * // set the font
 * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
 * //
 * // set color
 * let brushColor : PdfColor = new PdfColor(0, 0, 0);
 * //
 * // create black brush
 * let blackBrush : PdfSolidBrush = new PdfSolidBrush(brushColor);
 * // draw the text
 * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));
 * // save the document
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 * @default black color
 */
var PdfColor = /** @class */ (function () {
    function PdfColor(color1, color2, color3, color4) {
        if (color1 instanceof PdfColor) {
            this.redColor = color1.r;
            this.greenColor = color1.g;
            this.blueColor = color1.b;
            this.grayColor = color1.gray;
            this.alpha = color1.alpha;
            this.filled = (this.alpha !== 0);
        }
        else if (typeof color1 === 'number' && typeof color2 === 'number' && typeof color3 === 'number' &&
            typeof color4 === 'undefined') {
            this.constructor(PdfColor.maxColourChannelValue, color1, color2, color3); //doubt-byte/float
        }
        else if (typeof color1 === 'number' && typeof color2 === 'number' && typeof color3 === 'number' && typeof color4 === 'number') {
            this.redColor = color2;
            this.cyanColor = 0;
            this.greenColor = color3;
            this.magentaColor = 0;
            this.blueColor = color4;
            this.yellowColor = 0;
            this.blackColor = 0;
            this.grayColor = 0;
            this.alpha = color1;
            this.filled = true;
            this.assignCMYK(color2, color3, color4);
        }
    }
    /**
     * `Calculate and assign` cyan, megenta, yellow colors from rgb values..
     * @private
     */
    PdfColor.prototype.assignCMYK = function (r, g, b) {
        var red = r / PdfColor.maxColourChannelValue;
        var green = g / PdfColor.maxColourChannelValue;
        var blue = b / PdfColor.maxColourChannelValue;
        var black = _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_3__["PdfNumber"].min(1 - red, 1 - green, 1 - blue);
        var cyan = (black === 1.0) ? 0 : (1 - red - black) / (1 - black);
        var magenta = (black === 1.0) ? 0 : (1 - green - black) / (1 - black);
        var yellow = (black === 1.0) ? 0 : (1 - blue - black) / (1 - black);
        this.blackColor = black;
        this.cyanColor = cyan;
        this.magentaColor = magenta;
        this.yellowColor = yellow;
    };
    Object.defineProperty(PdfColor.prototype, "r", {
        //Properties
        // public static get Empty():PdfColor
        // {
        //     return this.s_emptyColor
        // }
        /**
         * Gets or sets `Red` channel value.
         * @private
         */
        get: function () {
            return this.redColor;
        },
        set: function (value) {
            this.redColor = value;
            this.assignCMYK(this.redColor, this.greenColor, this.blueColor);
            this.filled = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfColor.prototype, "red", {
        /**
         * Gets the `Red` color
         * @private
         */
        get: function () {
            return (this.r / PdfColor.maxColourChannelValue);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfColor.prototype, "b", {
        /**
         * Gets or sets `Blue` channel value.
         * @private
         */
        get: function () {
            return this.blueColor;
        },
        set: function (value) {
            this.blueColor = value;
            this.assignCMYK(this.redColor, this.greenColor, this.blueColor);
            this.filled = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfColor.prototype, "blue", {
        /**
         * Gets the `blue` color.
         * @private
         */
        get: function () {
            return (this.b / PdfColor.maxColourChannelValue);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfColor.prototype, "g", {
        /**
         *  Gets or sets `Green` channel value.
         * @private
         */
        get: function () {
            return this.greenColor;
        },
        set: function (value) {
            this.greenColor = value;
            this.assignCMYK(this.redColor, this.greenColor, this.blueColor);
            this.filled = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfColor.prototype, "green", {
        /**
         * Gets the `Green` color.
         * @private
         */
        get: function () {
            return (this.g / PdfColor.maxColourChannelValue);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfColor.prototype, "gray", {
        /**
         * Gets or sets `Gray` channel value.
         * @private
         */
        get: function () {
            return ((((this.redColor + this.greenColor) + this.blueColor)) / (PdfColor.maxColourChannelValue * 3));
        },
        set: function (value) {
            if (value < 0) {
                this.grayColor = 0;
            }
            else if (value > 1) {
                this.grayColor = 1;
            }
            else {
                this.grayColor = value;
            }
            this.r = (this.grayColor * PdfColor.maxColourChannelValue);
            this.g = (this.grayColor * PdfColor.maxColourChannelValue);
            this.b = (this.grayColor * PdfColor.maxColourChannelValue);
            this.assignCMYK(this.redColor, this.greenColor, this.blueColor);
            this.filled = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfColor.prototype, "isEmpty", {
        /**
         * Gets whether the PDFColor `is Empty` or not.
         * @private
         */
        get: function () {
            return !this.filled;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfColor.prototype, "a", {
        /**
         * Gets or sets `Alpha` channel value.
         * @private
         */
        get: function () {
            return this.alpha;
        },
        set: function (value) {
            if (value < 0) {
                this.alpha = 0;
            }
            else {
                // if (this.alpha !== value) {
                this.alpha = value;
                // }
            }
            this.filled = true;
        },
        enumerable: true,
        configurable: true
    });
    //Public methods
    /**
     * Converts `PDFColor to PDF string` representation.
     * @private
     */
    PdfColor.prototype.toString = function (colorSpace, stroke) {
        if (this.isEmpty) {
            return '';
        }
        return this.rgbToString(stroke);
    };
    /**
     * Sets `RGB` color.
     * @private
     */
    PdfColor.prototype.rgbToString = function (ifStroking) {
        var r = this.r;
        var g = this.g;
        var b = this.b;
        var key = (r << 16) + (g << 8) + b;
        if (ifStroking) {
            key += 1 << 24;
        }
        var colour = '';
        var obj = null;
        if (PdfColor.rgbStrings.containsKey(key)) {
            obj = PdfColor.rgbStrings.getValue(key);
        }
        if (obj == null) {
            var red = r / PdfColor.maxColourChannelValue;
            var green = g / PdfColor.maxColourChannelValue;
            var blue = b / PdfColor.maxColourChannelValue;
            if (ifStroking) {
                colour = red.toString() + ' ' + green.toString() + ' ' + blue.toString() + ' RG';
            }
            else {
                colour = red.toString() + ' ' + green.toString() + ' ' + blue.toString() + ' rg';
            }
            PdfColor.rgbStrings.setValue(key, colour);
        }
        else {
            colour = obj.toString();
        }
        return colour + _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_1__["Operators"].newLine;
    };
    /**
     * Converts `colour to a PDF array`.
     * @private
     */
    PdfColor.prototype.toArray = function (colorSpace) {
        var array = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_4__["PdfArray"]();
        switch (colorSpace) {
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfColorSpace"].Rgb:
                array.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_3__["PdfNumber"](this.red));
                array.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_3__["PdfNumber"](this.green));
                array.add(new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_3__["PdfNumber"](this.blue));
                break;
            default:
                throw new Error('NotSupportedException : Unsupported colour space.');
        }
        return array;
    };
    //Fields
    /**
     * Holds `RGB colors` converted into strings.
     * @private
     */
    PdfColor.rgbStrings = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_2__["Dictionary"]();
    /**
     * Holds Gray scale colors converted into strings for `stroking`.
     * @private
     */
    PdfColor.grayStringsSroke = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_2__["Dictionary"]();
    /**
     * Holds Gray scale colors converted into strings for `filling`.
     * @private
     */
    PdfColor.grayStringsFill = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_2__["Dictionary"]();
    /**
     * `Max value` of color channel.
     * @private
     */
    PdfColor.maxColourChannelValue = 255.0;
    return PdfColor;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-graphics.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-graphics.js ***!
  \*********************************************************************************************/
/*! exports provided: PdfGraphics, GetResourceEventHandler, PdfGraphicsState */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGraphics", function() { return PdfGraphics; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetResourceEventHandler", function() { return GetResourceEventHandler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGraphicsState", function() { return PdfGraphicsState; });
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _fonts_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fonts/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony import */ var _input_output_pdf_stream_writer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../input-output/pdf-stream-writer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-stream-writer.js");
/* harmony import */ var _pdf_pen__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pdf-pen */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-pen.js");
/* harmony import */ var _brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./brushes/pdf-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js");
/* harmony import */ var _brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./brushes/pdf-solid-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-solid-brush.js");
/* harmony import */ var _fonts_pdf_font__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./fonts/pdf-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js");
/* harmony import */ var _pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pdf-transformation-matrix */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transformation-matrix.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./constants */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/constants.js");
/* harmony import */ var _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../primitives/pdf-string */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js");
/* harmony import */ var _fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./fonts/pdf-string-format */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js");
/* harmony import */ var _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./../collections/object-object-pair/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/object-object-pair/dictionary.js");
/* harmony import */ var _pdf_transparency__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./pdf-transparency */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transparency.js");
/* harmony import */ var _fonts_string_layouter__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./fonts/string-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _fonts_string_tokenizer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./fonts/string-tokenizer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-tokenizer.js");
/* harmony import */ var _document_automatic_fields_automatic_field_info_collection__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./../document/automatic-fields/automatic-field-info-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field-info-collection.js");
/* harmony import */ var _document_automatic_fields_automatic_field_info__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./../document/automatic-fields/automatic-field-info */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field-info.js");
/* harmony import */ var _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./../input-output/pdf-operators */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js");
/* harmony import */ var _fonts_unicode_true_type_font__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./fonts/unicode-true-type-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/unicode-true-type-font.js");
/* harmony import */ var _fonts_rtl_renderer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./fonts/rtl-renderer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl-renderer.js");
/**
 * PdfGraphics.ts class for EJ2-PDF
 */

























/**
 * `PdfGraphics` class represents a graphics context of the objects.
 * It's used for performing all the graphics operations.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * // add a new page to the document
 * let page1 : PdfPage = document.pages.add();
 * // set the font
 * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
 * // create black brush
 * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
 * //
 * //graphics of the page
 * let page1Graphics : PdfGraphics = page1.graphics;
 * // draw the text on the page1 graphics
 * page1Graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));
 * //
 * // save the document
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfGraphics = /** @class */ (function () {
    function PdfGraphics(arg1, arg2, arg3) {
        /**
         * Represents the `Current color space`.
         * @private
         */
        this.currentColorSpace = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfColorSpace"].Rgb;
        /**
         * Stores `previous rendering mode`.
         * @private
         */
        this.previousTextRenderingMode = _enum__WEBPACK_IMPORTED_MODULE_0__["TextRenderingMode"].Fill;
        /**
         * Previous `character spacing` value or 0.
         * @private
         */
        this.previousCharacterSpacing = 0.0;
        /**
         * Previous `word spacing` value or 0.
         * @private
         */
        this.previousWordSpacing = 0.0;
        /**
         * The `previously used text scaling` value.
         * @private
         */
        this.previousTextScaling = 100.0;
        /**
         * Instance of `ProcedureSets` class.
         * @private
         */
        this.procedureSets = new _constants__WEBPACK_IMPORTED_MODULE_9__["ProcedureSets"]();
        /**
         * To check wihether it is a `direct text rendering`.
         * @default true
         * @private
         */
        this.isNormalRender = true;
        /**
         * check whether to `use font size` to calculate the shift.
         * @default false
         * @private
         */
        this.isUseFontSize = false;
        /**
         * check whether the font is in `italic type`.
         * @default false
         * @private
         */
        this.isItalic = false;
        /**
         * Check whether it is an `emf Text Matrix`.
         * @default false
         * @private
         */
        this.isEmfTextScaled = false;
        /**
         * Check whether it is an `emf` call.
         * @default false
         * @private
         */
        this.isEmf = false;
        /**
         * Check whether it is an `emf plus` call.
         * @default false
         * @private
         */
        this.isEmfPlus = false;
        /**
         * Check whether it is in `base line format`.
         * @default true
         * @private
         */
        this.isBaselineFormat = true;
        /**
         * Emf Text `Scaling Factor`.
         * @private
         */
        this.emfScalingFactor = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["SizeF"](0, 0);
        /**
         * To check whether the `last color space` of document and garphics is saved.
         * @private
         */
        this.colorSpaceChanged = false;
        /**
         * Stores an instance of `DictionaryProperties`.
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_15__["DictionaryProperties"]();
        /**
         * Checks whether the x co-ordinate is need to set as client size or not.
         * @hidden
         * @private
         */
        this.isOverloadWithPosition = false;
        /**
         * Checks whether the x co-ordinate is need to set as client size or not.
         * @hidden
         * @private
         */
        this.isPointOverload = false;
        /**
         * Current colorspaces.
         * @hidden
         * @private
         */
        this.currentColorSpaces = ['RGB', 'CMYK', 'GrayScale', 'Indexed'];
        /**
         * Checks the current image `is optimized` or not.
         * @default false.
         * @private
         */
        this.isImageOptimized = false;
        /**
         * Stores the `graphics states`.
         * @private
         */
        this.graphicsState = [];
        /**
         * Indicates whether the object `had trasparency`.
         * @default false
         * @private
         */
        this.istransparencySet = false;
        /**
         * Stores the instance of `PdfAutomaticFieldInfoCollection` class .
         * @default null
         * @private
         */
        this.internalAutomaticFields = null;
        /**
         * Stores the index of the start line that should draw with in the next page.
         * @private
         */
        this.startCutIndex = -1;
        if (arg3 instanceof _input_output_pdf_stream_writer__WEBPACK_IMPORTED_MODULE_2__["PdfStreamWriter"]) {
            this.pdfStreamWriter = arg3;
            this.getResources = arg2;
            this.canvasSize = arg1;
            this.initialize();
        }
        else {
            this.constructor(arg1, arg2, new _input_output_pdf_stream_writer__WEBPACK_IMPORTED_MODULE_2__["PdfStreamWriter"](arg3));
        }
    }
    Object.defineProperty(PdfGraphics.prototype, "stringLayoutResult", {
        //  Properties
        /**
         * Returns the `result` after drawing string.
         * @private
         */
        get: function () {
            return this.pdfStringLayoutResult;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphics.prototype, "size", {
        /**
         * Gets the `size` of the canvas.
         * @private
         */
        get: function () {
            return this.canvasSize;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphics.prototype, "mediaBoxUpperRightBound", {
        /**
         * Gets and Sets the value of `MediaBox upper right bound`.
         * @private
         */
        get: function () {
            if (typeof this.internalMediaBoxUpperRightBound === 'undefined') {
                this.internalMediaBoxUpperRightBound = 0;
            }
            return this.internalMediaBoxUpperRightBound;
        },
        set: function (value) {
            this.internalMediaBoxUpperRightBound = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphics.prototype, "clientSize", {
        /**
         * Gets the `size` of the canvas reduced by margins and page templates.
         * @private
         */
        get: function () {
            return new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["SizeF"](this.clipBounds.width, this.clipBounds.height);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphics.prototype, "colorSpace", {
        /**
         * Gets or sets the current `color space` of the document
         * @private
         */
        get: function () {
            return this.currentColorSpace;
        },
        set: function (value) {
            this.currentColorSpace = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphics.prototype, "streamWriter", {
        /**
         * Gets the `stream writer`.
         * @private
         */
        get: function () {
            return this.pdfStreamWriter;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphics.prototype, "matrix", {
        /**
         * Gets the `transformation matrix` reflecting current transformation.
         * @private
         */
        get: function () {
            if (this.transformationMatrix == null) {
                this.transformationMatrix = new _pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_7__["PdfTransformationMatrix"]();
            }
            return this.transformationMatrix;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphics.prototype, "layer", {
        /**
         * Gets the `layer` for the graphics, if exists.
         * @private
         */
        get: function () {
            return this.pageLayer;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphics.prototype, "page", {
        /**
         * Gets the `page` for this graphics, if exists.
         * @private
         */
        get: function () {
            return this.pageLayer.page;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphics.prototype, "automaticFields", {
        get: function () {
            if (this.internalAutomaticFields == null || typeof this.internalAutomaticFields === 'undefined') {
                this.internalAutomaticFields = new _document_automatic_fields_automatic_field_info_collection__WEBPACK_IMPORTED_MODULE_17__["PdfAutomaticFieldInfoCollection"]();
            }
            return this.internalAutomaticFields;
        },
        enumerable: true,
        configurable: true
    });
    //Implementation
    /**
     * `Initializes` this instance.
     * @private
     */
    PdfGraphics.prototype.initialize = function () {
        this.bStateSaved = false;
        this.currentPen = null;
        this.currentBrush = null;
        this.currentFont = null;
        this.currentColorSpace = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfColorSpace"].Rgb;
        this.bCSInitialized = false;
        this.transformationMatrix = null;
        this.previousTextRenderingMode = (-1); //.Fill;
        this.previousCharacterSpacing = -1.0;
        this.previousWordSpacing = -1.0;
        this.previousTextScaling = -100.0;
        // this.m_trasparencies = null;
        this.currentStringFormat = null;
        this.clipBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["PointF"](0, 0), this.size);
        this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf);
    };
    PdfGraphics.prototype.drawPdfTemplate = function (template, location, size) {
        if (typeof size === 'undefined') {
            if (template == null) {
                throw Error('ArgumentNullException-template');
            }
            this.drawPdfTemplate(template, location, template.size);
        }
        else {
            // let crossTable : PdfCrossTable = null;
            // if (this.pageLayer != null) {
            //     crossTable = (this.page as PdfPage).section.parentDocument.crossTable;
            // }
            if (template == null) {
                throw Error('ArgumentNullException-template');
            }
            var scaleX = (template.width > 0) ? size.width / template.width : 1;
            var scaleY = (template.height > 0) ? size.height / template.height : 1;
            var bNeedScale = !(scaleX === 1 && scaleY === 1);
            // Save state.
            var state = this.save();
            // Take into consideration that rect location is bottom/left.
            var matrix = new _pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_7__["PdfTransformationMatrix"]();
            if (this.pageLayer != null) {
                this.getTranslateTransform(location.x, location.y + size.height, matrix);
            }
            if (bNeedScale) {
                this.getScaleTransform(scaleX, scaleY, matrix);
            }
            this.pdfStreamWriter.modifyCtm(matrix);
            // Output template.
            var resources = this.getResources.getResources();
            var name_1 = resources.getName(template);
            this.pdfStreamWriter.executeObject(name_1);
            // Restore state.
            this.restore(state);
            //Transfer automatic fields from template.
            var g = template.graphics;
            if (g != null) {
                for (var index = 0; index < g.automaticFields.automaticFields.length; index++) {
                    var fieldInfo = g.automaticFields.automaticFields[index];
                    var newLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["PointF"](fieldInfo.location.x + location.x, fieldInfo.location.y + location.y);
                    var scalingX = template.size.width == 0 ? 0 : size.width / template.size.width;
                    var scalingY = template.size.height == 0 ? 0 : size.height / template.size.height;
                    this.automaticFields.add(new _document_automatic_fields_automatic_field_info__WEBPACK_IMPORTED_MODULE_18__["PdfAutomaticFieldInfo"](fieldInfo.field, newLocation, scalingX, scalingY));
                    this.page.dictionary.modify();
                }
            }
            this.getResources.getResources().requireProcedureSet(this.procedureSets.imageB);
            this.getResources.getResources().requireProcedureSet(this.procedureSets.imageC);
            this.getResources.getResources().requireProcedureSet(this.procedureSets.imageI);
            this.getResources.getResources().requireProcedureSet(this.procedureSets.text);
        }
    };
    /* tslint:disable */
    /**
     * @public
     */
    PdfGraphics.prototype.drawString = function (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
        if (typeof arg1 === 'string' && arg2 instanceof _fonts_pdf_font__WEBPACK_IMPORTED_MODULE_6__["PdfFont"] && (arg3 instanceof _pdf_pen__WEBPACK_IMPORTED_MODULE_3__["PdfPen"] || arg3 === null) && (arg4 instanceof _brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_4__["PdfBrush"] || arg4 === null) && typeof arg5 === 'number' && typeof arg6 === 'number' && (arg7 instanceof _fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_11__["PdfStringFormat"] || arg7 === null) && typeof arg8 === 'undefined') {
            this.isOverloadWithPosition = true;
            this.drawString(arg1, arg2, arg3, arg4, arg5, arg6, (this.clientSize.width - arg5), 0, arg7);
        }
        else {
            var temparg3 = arg3;
            var temparg4 = arg4;
            var temparg5 = arg5;
            var temparg6 = arg6;
            var temparg7 = arg7;
            var temparg8 = arg8;
            var temparg9 = arg9;
            var layouter = new _fonts_string_layouter__WEBPACK_IMPORTED_MODULE_14__["PdfStringLayouter"]();
            var result = layouter.layout(arg1, arg2, temparg9, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["SizeF"](temparg7, temparg8), this.isOverloadWithPosition, this.clientSize);
            if (!result.empty) {
                var rect = this.checkCorrectLayoutRectangle(result.actualSize, temparg5, temparg6, temparg9);
                if (temparg7 <= 0) {
                    temparg5 = rect.x;
                    temparg7 = rect.width;
                }
                if (temparg8 <= 0) {
                    temparg6 = rect.y;
                    temparg8 = rect.height;
                }
                this.drawStringLayoutResult(result, arg2, temparg3, temparg4, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["RectangleF"](temparg5, temparg6, temparg7, temparg8), temparg9);
                this.isEmfTextScaled = false;
                this.emfScalingFactor = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["SizeF"](0, 0);
            }
            this.getResources.getResources().requireProcedureSet(this.procedureSets.text);
            this.isNormalRender = true;
            this.pdfStringLayoutResult = result;
            this.isUseFontSize = false;
        }
    }; /* tslint:enable */
    PdfGraphics.prototype.drawLine = function (arg1, arg2, arg3, arg4, arg5) {
        if (arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["PointF"]) {
            var temparg2 = arg2;
            var temparg3 = arg3;
            this.drawLine(arg1, temparg2.x, temparg2.y, temparg3.x, temparg3.y);
        }
        else {
            var temparg2 = arg2;
            var temparg3 = arg3;
            var temparg4 = arg4;
            var temparg5 = arg5;
            this.stateControl(arg1, null, null);
            var sw = this.streamWriter;
            sw.beginPath(temparg2, temparg3);
            sw.appendLineSegment(temparg4, temparg5);
            sw.strokePath();
            this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf);
        }
    };
    /* tslint:disable */
    PdfGraphics.prototype.drawRectangle = function (arg1, arg2, arg3, arg4, arg5, arg6) {
        if (arg1 instanceof _pdf_pen__WEBPACK_IMPORTED_MODULE_3__["PdfPen"] && typeof arg2 === 'number') {
            var temparg3 = arg3;
            this.drawRectangle(arg1, null, arg2, temparg3, arg4, arg5);
        }
        else if (arg1 instanceof _brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_4__["PdfBrush"] && typeof arg2 === 'number') {
            var temparg3 = arg3;
            this.drawRectangle(null, arg1, arg2, temparg3, arg4, arg5);
        }
        else {
            var temparg3 = arg3;
            var temparg4 = arg4;
            var temparg5 = arg5;
            var temparg6 = arg6;
            if (arg2 instanceof _brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_5__["PdfSolidBrush"] && arg2.color.isEmpty) {
                arg2 = null;
            }
            var temparg1 = arg1;
            var temparg2 = arg2;
            this.stateControl(temparg1, temparg2, null);
            this.streamWriter.appendRectangle(temparg3, temparg4, temparg5, temparg6);
            this.drawPath(temparg1, temparg2, false);
        }
    };
    PdfGraphics.prototype.drawPath = function (arg1, arg2, arg3, arg4) {
        if (typeof arg3 === 'boolean') {
            var temparg3 = arg3;
            this.drawPath(arg1, arg2, _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFillMode"].Winding, temparg3);
        }
        else {
            var temparg3 = arg3;
            var temparg4 = arg4;
            var isPen = arg1 != null;
            var isBrush = arg2 != null;
            var isEvenOdd = (temparg3 === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFillMode"].Alternate);
            if (isPen && isBrush) {
                this.streamWriter.fillStrokePath(isEvenOdd);
            }
            else if (!isPen && !isBrush) {
                this.streamWriter.endPath();
            }
            else if (isPen) {
                this.streamWriter.strokePath();
            }
            else {
                this.streamWriter.fillPath(isEvenOdd);
            }
        }
    };
    /* tslint:disable */
    PdfGraphics.prototype.drawImage = function (arg1, arg2, arg3, arg4, arg5) {
        if (typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'undefined') {
            var size = arg1.physicalDimension;
            this.drawImage(arg1, arg2, arg3, size.width, size.height);
        }
        else {
            var temparg2 = arg2;
            var temparg3 = arg3;
            var temparg4 = arg4;
            var temparg5 = arg5;
            arg1.save();
            var matrix = new _pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_7__["PdfTransformationMatrix"]();
            this.getTranslateTransform(temparg2, (temparg3 + temparg5), matrix);
            this.getScaleTransform(arg4, arg5, matrix);
            this.pdfStreamWriter.write('q');
            this.pdfStreamWriter.modifyCtm(matrix);
            // Output template.
            var resources = this.getResources.getResources();
            if (typeof this.pageLayer !== 'undefined' && this.page != null) {
                resources.document = this.page.document;
            }
            var name_2 = resources.getName(arg1);
            if (typeof this.pageLayer !== 'undefined') {
                this.page.setResources(resources);
            }
            this.pdfStreamWriter.executeObject(name_2);
            this.pdfStreamWriter.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_19__["Operators"].restoreState);
            this.pdfStreamWriter.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_19__["Operators"].newLine);
            var resource = this.getResources.getResources();
            resource.requireProcedureSet(this.procedureSets.imageB);
            resource.requireProcedureSet(this.procedureSets.imageC);
            resource.requireProcedureSet(this.procedureSets.imageI);
            resource.requireProcedureSet(this.procedureSets.text);
        }
    };
    //Implementation
    /* tslint:disable */
    /**
     * Returns `bounds` of the line info.
     * @private
     */
    PdfGraphics.prototype.getLineBounds = function (lineIndex, result, font, layoutRectangle, format) {
        var bounds;
        if (!result.empty && lineIndex < result.lineCount && lineIndex >= 0) {
            var line = result.lines[lineIndex];
            var vShift = this.getTextVerticalAlignShift(result.actualSize.height, layoutRectangle.height, format);
            var y = vShift + layoutRectangle.y + (result.lineHeight * lineIndex);
            var lineWidth = line.width;
            var hShift = this.getHorizontalAlignShift(lineWidth, layoutRectangle.width, format);
            var lineIndent = this.getLineIndent(line, format, layoutRectangle, (lineIndex === 0));
            hShift += (!this.rightToLeft(format)) ? lineIndent : 0;
            var x = layoutRectangle.x + hShift;
            /* tslint:disable */
            var width = (!this.shouldJustify(line, layoutRectangle.width, format)) ? lineWidth - lineIndent : layoutRectangle.width - lineIndent; /* tslint:enable */
            var height = result.lineHeight;
            bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["RectangleF"](x, y, width, height);
        }
        else {
            bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["RectangleF"](0, 0, 0, 0);
        }
        return bounds;
    };
    /**
     * Creates `lay outed rectangle` depending on the text settings.
     * @private
     */
    PdfGraphics.prototype.checkCorrectLayoutRectangle = function (textSize, x, y, format) {
        var layoutedRectangle = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["RectangleF"](x, y, textSize.width, textSize.width);
        if (format != null) {
            switch (format.alignment) {
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"].Center:
                    layoutedRectangle.x -= layoutedRectangle.width / 2;
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"].Right:
                    layoutedRectangle.x -= layoutedRectangle.width;
                    break;
            }
            switch (format.lineAlignment) {
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfVerticalAlignment"].Middle:
                    layoutedRectangle.y -= layoutedRectangle.height / 2;
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfVerticalAlignment"].Bottom:
                    layoutedRectangle.y -= layoutedRectangle.height;
                    break;
            }
        }
        return layoutedRectangle;
    };
    /**
     * Sets the `layer` for the graphics.
     * @private
     */
    PdfGraphics.prototype.setLayer = function (layer) {
        this.pageLayer = layer;
        var page = layer.page;
        if (page != null && typeof page !== 'undefined') {
            page.beginSave = this.pageSave;
        }
    };
    /**
     * Adding page number field before page saving.
     * @private
     */
    /* tslint:disable */
    PdfGraphics.prototype.pageSave = function (page) {
        if (page.graphics.automaticFields != null) {
            for (var i = 0; i < page.graphics.automaticFields.automaticFields.length; i++) {
                var fieldInfo = page.graphics.automaticFields.automaticFields[i];
                fieldInfo.field.performDraw(page.graphics, fieldInfo.location, fieldInfo.scalingX, fieldInfo.scalingY);
            }
        }
    };
    /**
     * `Draws a layout result`.
     * @private
     */
    PdfGraphics.prototype.drawStringLayoutResult = function (result, font, pen, brush, layoutRectangle, format) {
        if (!result.empty) {
            this.applyStringSettings(font, pen, brush, format, layoutRectangle);
            // Set text scaling
            var textScaling = (format != null) ? format.horizontalScalingFactor : 100.0;
            if (textScaling !== this.previousTextScaling && !this.isEmfTextScaled) {
                this.pdfStreamWriter.setTextScaling(textScaling);
                this.previousTextScaling = textScaling;
            }
            var height = (format == null || format.lineSpacing === 0) ? font.height : format.lineSpacing + font.height;
            var subScript = (format != null && format.subSuperScript === _fonts_enum__WEBPACK_IMPORTED_MODULE_1__["PdfSubSuperScript"].SubScript);
            var shift = 0;
            shift = (subScript) ? height - (font.height + font.metrics.getDescent(format)) : (height - font.metrics.getAscent(format));
            this.shift = shift;
            this.pdfStreamWriter.startNextLine(layoutRectangle.x, layoutRectangle.y - shift);
            this.pdfStreamWriter.setLeading(+height);
            var resultHeight = 0;
            var remainingString = '';
            for (var i = 0; i < result.lines.length; i++) {
                resultHeight += result.lineHeight;
                if ((layoutRectangle.y + resultHeight) > this.clientSize.height) {
                    this.startCutIndex = i;
                    break;
                }
            }
            for (var j = this.startCutIndex; (j < result.lines.length && j >= 0); j++) {
                remainingString += result.lines[j].text;
            }
            var bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["RectangleF"](layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height);
            this.drawLayoutResult(result, font, format, layoutRectangle);
            this.underlineStrikeoutText(pen, brush, result, font, bounds, format);
            this.isEmfPlus = false;
            this.isUseFontSize = false;
            if (this.startCutIndex !== -1) {
                var page = this.getNextPage();
                page.graphics.drawString(remainingString, font, pen, brush, layoutRectangle.x, 0, layoutRectangle.width, 0, format);
            }
        }
        else {
            throw new Error('ArgumentNullException:result');
        }
    };
    /**
     * Gets the `next page`.
     * @private
     */
    PdfGraphics.prototype.getNextPage = function () {
        var section = this.currentPage.section;
        var nextPage = null;
        var index = section.indexOf(this.currentPage);
        if (index === section.count - 1) {
            nextPage = section.add();
        }
        else {
            nextPage = section.getPages()[index + 1];
        }
        return nextPage;
    };
    PdfGraphics.prototype.setClip = function (rectangle, mode) {
        if (typeof mode === 'undefined') {
            this.setClip(rectangle, _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFillMode"].Winding);
        }
        else {
            this.pdfStreamWriter.appendRectangle(rectangle);
            this.pdfStreamWriter.clipPath((mode === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfFillMode"].Alternate));
        }
    };
    /**
     * Applies all the `text settings`.
     * @private
     */
    PdfGraphics.prototype.applyStringSettings = function (font, pen, brush, format, bounds) {
        var setLineWidth = false;
        var tm = this.getTextRenderingMode(pen, brush, format);
        this.stateControl(pen, brush, font, format);
        this.pdfStreamWriter.beginText();
        if ((tm) !== this.previousTextRenderingMode) {
            this.pdfStreamWriter.setTextRenderingMode(tm);
            this.previousTextRenderingMode = tm;
        }
        // Set character spacing.
        var cs = (format != null) ? format.characterSpacing : 0;
        if (cs !== this.previousCharacterSpacing && !this.isEmfTextScaled) {
            this.pdfStreamWriter.setCharacterSpacing(cs);
            this.previousCharacterSpacing = cs;
        }
        // Set word spacing.
        // NOTE: it works only if the space code is equal to 32 (0x20).
        var ws = (format != null) ? format.wordSpacing : 0;
        if (ws !== this.previousWordSpacing) {
            this.pdfStreamWriter.setWordSpacing(ws);
            this.previousWordSpacing = ws;
        }
    };
    /**
     * Calculates `shift value` if the text is vertically aligned.
     * @private
     */
    PdfGraphics.prototype.getTextVerticalAlignShift = function (textHeight, boundsHeight, format) {
        var shift = 0;
        if (boundsHeight >= 0 && format != null && format.lineAlignment !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfVerticalAlignment"].Top) {
            switch (format.lineAlignment) {
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfVerticalAlignment"].Middle:
                    shift = (boundsHeight - textHeight) / 2;
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfVerticalAlignment"].Bottom:
                    shift = boundsHeight - textHeight;
                    break;
            }
        }
        return shift;
    };
    /* tslint:disable */
    /**
     * `Draws layout result`.
     * @private
     */
    PdfGraphics.prototype.drawLayoutResult = function (result, font, format, layoutRectangle) {
        var vAlignShift = this.getTextVerticalAlignShift(result.actualSize.height, layoutRectangle.height, format);
        if (vAlignShift !== 0) {
            this.pdfStreamWriter.startNextLine(0, vAlignShift);
        }
        var ttfFont = font;
        var unicode = (ttfFont != null && ttfFont.isUnicode);
        var embed = (ttfFont != null && ttfFont.isEmbedFont);
        var lines = result.lines;
        for (var i = 0, len = lines.length; (i < len && i !== this.startCutIndex); i++) {
            var lineInfo = lines[i];
            var line = lineInfo.text;
            var lineWidth = lineInfo.width;
            var hAlignShift = this.getHorizontalAlignShift(lineWidth, layoutRectangle.width, format);
            var lineIndent = this.getLineIndent(lineInfo, format, layoutRectangle, (i === 0));
            hAlignShift += (!this.rightToLeft(format)) ? lineIndent : 0;
            if (hAlignShift !== 0 && !this.isEmfTextScaled) {
                this.pdfStreamWriter.startNextLine(hAlignShift, 0);
            }
            if (unicode) {
                this.drawUnicodeLine(lineInfo, layoutRectangle, font, format);
            }
            else {
                this.drawAsciiLine(lineInfo, layoutRectangle, font, format);
            }
            if (hAlignShift !== 0 && !this.isEmfTextScaled) {
                this.pdfStreamWriter.startNextLine(-hAlignShift, 0);
            }
            if (this.isOverloadWithPosition && lines.length > 1) {
                this.pdfStreamWriter.startNextLine(-(layoutRectangle.x), 0);
                layoutRectangle.x = 0;
                layoutRectangle.width = this.clientSize.width;
                this.isOverloadWithPosition = false;
                this.isPointOverload = true;
            }
        }
        this.getResources.getResources().requireProcedureSet(this.procedureSets.text);
        if (vAlignShift !== 0) {
            this.pdfStreamWriter.startNextLine(0, -(vAlignShift - result.lineHeight));
        }
        this.pdfStreamWriter.endText();
    };
    /**
     * `Draws Ascii line`.
     * @private
     */
    PdfGraphics.prototype.drawAsciiLine = function (lineInfo, layoutRectangle, font, format) {
        this.justifyLine(lineInfo, layoutRectangle.width, format);
        var value = '';
        if (lineInfo.text.indexOf('(') !== -1 || lineInfo.text.indexOf(')') !== -1) {
            for (var i = 0; i < lineInfo.text.length; i++) {
                if (lineInfo.text[i] === '(') {
                    value += '\\\(';
                }
                else if (lineInfo.text[i] === ')') {
                    value += '\\\)';
                }
                else {
                    value += lineInfo.text[i];
                }
            }
        }
        if (value === '') {
            value = lineInfo.text;
        }
        var line = '(' + value + ')';
        this.pdfStreamWriter.showNextLineText(new _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_10__["PdfString"](line));
    };
    /**
     * Draws unicode line.
     * @private
     */
    PdfGraphics.prototype.drawUnicodeLine = function (lineInfo, layoutRectangle, font, format) {
        var line = lineInfo.text;
        var lineWidth = lineInfo.width;
        var rtl = (format !== null && format.rightToLeft);
        var useWordSpace = (format !== null && (format.wordSpacing !== 0 || format.alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"].Justify));
        var ttfFont = font;
        var wordSpacing = this.justifyLine(lineInfo, layoutRectangle.width, format);
        var rtlRender = new _fonts_rtl_renderer__WEBPACK_IMPORTED_MODULE_21__["RtlRenderer"]();
        if (rtl || (format !== null && format.textDirection !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextDirection"].None)) {
            var blocks = null;
            var rightAlign = (format !== null && format.alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"].Right);
            if (format !== null && format.textDirection !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextDirection"].None) {
                /* tslint:disable-next-line:max-line-length */
                blocks = rtlRender.layout(line, ttfFont, (format.textDirection === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextDirection"].RightToLeft) ? true : false, useWordSpace, format);
            }
            else {
                blocks = rtlRender.layout(line, ttfFont, rightAlign, useWordSpace, format);
            }
            var words = null;
            if (blocks.length > 1) {
                if (format !== null && format.textDirection !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextDirection"].None) {
                    /* tslint:disable-next-line:max-line-length */
                    words = rtlRender.splitLayout(line, ttfFont, (format.textDirection === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextDirection"].RightToLeft) ? true : false, useWordSpace, format);
                }
                else {
                    words = rtlRender.splitLayout(line, ttfFont, rightAlign, useWordSpace, format);
                }
            }
            else {
                words = [line];
            }
            this.drawUnicodeBlocks(blocks, words, ttfFont, format, wordSpacing);
        }
        else {
            if (useWordSpace) {
                var result = this.breakUnicodeLine(line, ttfFont, null);
                var blocks = result.tokens;
                var words = result.words;
                this.drawUnicodeBlocks(blocks, words, ttfFont, format, wordSpacing);
            }
            else {
                var token = this.convertToUnicode(line, ttfFont);
                var value = this.getUnicodeString(token);
                this.streamWriter.showNextLineText(value);
            }
        }
    };
    /**
     * Draws array of unicode tokens.
     */
    /* tslint:disable */
    PdfGraphics.prototype.drawUnicodeBlocks = function (blocks, words, font, format, wordSpacing) {
        /* tslint:enable */
        if (blocks == null) {
            throw new Error('Argument Null Exception : blocks');
        }
        if (words == null) {
            throw new Error('Argument Null Exception : words');
        }
        if (font == null) {
            throw new Error('Argument Null Exception : font');
        }
        this.streamWriter.startNextLine();
        var x = 0;
        var xShift = 0;
        var firstLineIndent = 0;
        var paragraphIndent = 0;
        try {
            if (format !== null) {
                firstLineIndent = format.firstLineIndent;
                paragraphIndent = format.paragraphIndent;
                format.firstLineIndent = 0;
                format.paragraphIndent = 0;
            }
            var spaceWidth = font.getCharWidth(_fonts_string_tokenizer__WEBPACK_IMPORTED_MODULE_16__["StringTokenizer"].whiteSpace, format) + wordSpacing;
            var characterSpacing = (format != null) ? format.characterSpacing : 0;
            var wordSpace = (format !== null && wordSpacing === 0) ? format.wordSpacing : 0;
            spaceWidth += characterSpacing + wordSpace;
            for (var i = 0; i < blocks.length; i++) {
                var token = blocks[i];
                var word = words[i];
                var tokenWidth = 0;
                if (x !== 0) {
                    this.streamWriter.startNextLine(x, 0);
                }
                if (word.length > 0) {
                    tokenWidth += /*Utils.Round(*/ font.measureString(word, format).width /*)*/;
                    tokenWidth += characterSpacing;
                    var val = this.getUnicodeString(token);
                    this.streamWriter.showText(val);
                }
                if (i !== blocks.length - 1) {
                    x = tokenWidth + spaceWidth;
                    xShift += x;
                }
            }
            // Rolback current line position.
            if (xShift > 0) {
                this.streamWriter.startNextLine(-xShift, 0);
            }
        }
        finally {
            if (format !== null) {
                format.firstLineIndent = firstLineIndent;
                format.paragraphIndent = paragraphIndent;
            }
        }
    };
    /**
     * Breakes the unicode line to the words and converts symbols to glyphs.
     */
    PdfGraphics.prototype.breakUnicodeLine = function (line, ttfFont, words) {
        if (line === null) {
            throw new Error('Argument Null Exception : line');
        }
        words = line.split(null);
        var tokens = [];
        for (var i = 0; i < words.length; i++) {
            // Reconvert string according to unicode standard.
            var word = words[i];
            var token = this.convertToUnicode(word, ttfFont);
            tokens[i] = token;
        }
        return { tokens: tokens, words: words };
    };
    /**
     * Creates PdfString from the unicode text.
     */
    PdfGraphics.prototype.getUnicodeString = function (token) {
        if (token === null) {
            throw new Error('Argument Null Exception : token');
        }
        var val = new _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_10__["PdfString"](token);
        val.converted = true;
        val.encode = _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_10__["InternalEnum"].ForceEncoding.Ascii;
        return val;
    };
    /**
     * Converts to unicode format.
     */
    PdfGraphics.prototype.convertToUnicode = function (text, ttfFont) {
        var token = null;
        if (text == null) {
            throw new Error('Argument Null Exception : text');
        }
        if (ttfFont == null) {
            throw new Error('Argument Null Exception : ttfFont');
        }
        if (ttfFont.fontInternal instanceof _fonts_unicode_true_type_font__WEBPACK_IMPORTED_MODULE_20__["UnicodeTrueTypeFont"]) {
            var ttfReader = ttfFont.fontInternal.ttfReader;
            ttfFont.setSymbols(text);
            token = ttfReader.convertString(text);
            var bytes = _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_10__["PdfString"].toUnicodeArray(token, false);
            token = _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_10__["PdfString"].byteToString(bytes);
        }
        return token;
    };
    /**
     * `Justifies` the line if needed.
     * @private
     */
    PdfGraphics.prototype.justifyLine = function (lineInfo, boundsWidth, format) {
        var line = lineInfo.text;
        var lineWidth = lineInfo.width;
        var shouldJustify = this.shouldJustify(lineInfo, boundsWidth, format);
        var hasWordSpacing = (format != null && format.wordSpacing !== 0);
        var symbols = _fonts_string_tokenizer__WEBPACK_IMPORTED_MODULE_16__["StringTokenizer"].spaces;
        var whitespacesCount = _fonts_string_tokenizer__WEBPACK_IMPORTED_MODULE_16__["StringTokenizer"].getCharsCount(line, symbols);
        var wordSpace = 0;
        if (shouldJustify) {
            // Correct line width.
            if (hasWordSpacing) {
                lineWidth -= (whitespacesCount * format.wordSpacing);
            }
            var difference = boundsWidth - lineWidth;
            wordSpace = difference / whitespacesCount;
            this.pdfStreamWriter.setWordSpacing(wordSpace);
        }
        else {
            // If there is justifying, but the line shouldn't be justified, restore default word spacing.
            if (hasWordSpacing) {
                this.pdfStreamWriter.setWordSpacing(format.wordSpacing);
            }
            else {
                this.pdfStreamWriter.setWordSpacing(0);
            }
        }
        return wordSpace;
    };
    /**
     * `Reset` or reinitialize the current graphic value.
     * @private
     */
    PdfGraphics.prototype.reset = function (size) {
        this.canvasSize = size;
        this.streamWriter.clear();
        this.initialize();
        this.initializeCoordinates();
    };
    /**
     * Checks whether the line should be `justified`.
     * @private
     */
    PdfGraphics.prototype.shouldJustify = function (lineInfo, boundsWidth, format) {
        var line = lineInfo.text;
        var lineWidth = lineInfo.width;
        var justifyStyle = (format != null && format.alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"].Justify);
        var goodWidth = (boundsWidth >= 0 && lineWidth < boundsWidth);
        var symbols = _fonts_string_tokenizer__WEBPACK_IMPORTED_MODULE_16__["StringTokenizer"].spaces;
        var whitespacesCount = _fonts_string_tokenizer__WEBPACK_IMPORTED_MODULE_16__["StringTokenizer"].getCharsCount(line, symbols);
        var hasSpaces = (whitespacesCount > 0 && line[0] !== _fonts_string_tokenizer__WEBPACK_IMPORTED_MODULE_16__["StringTokenizer"].whiteSpace);
        var goodLineBreakStyle = ((lineInfo.lineType & _fonts_string_layouter__WEBPACK_IMPORTED_MODULE_14__["LineType"].LayoutBreak) > 0);
        /* tslint:disable */
        var shouldJustify = (justifyStyle && goodWidth && hasSpaces && (goodLineBreakStyle || format.alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"].Justify)); /* tslint:enable */
        return shouldJustify;
    };
    /* tslint:disable */
    /**
     * Emulates `Underline, Strikeout` of the text if needed.
     * @private
     */
    PdfGraphics.prototype.underlineStrikeoutText = function (pen, brush, result, font, layoutRectangle, format) {
        if (font.underline || font.strikeout) {
            // Calculate line width.
            var linePen = this.createUnderlineStikeoutPen(pen, brush, font, format);
            if (linePen != null) {
                // Approximate line positions.
                var vShift = this.getTextVerticalAlignShift(result.actualSize.height, layoutRectangle.height, format);
                var underlineYOffset = 0;
                underlineYOffset = layoutRectangle.y + vShift + font.metrics.getAscent(format) + 1.5 * linePen.width;
                var strikeoutYOffset = layoutRectangle.y + vShift + font.metrics.getHeight(format) / 2 + 1.5 * linePen.width;
                var lines = result.lines;
                // Run through the text and draw lines.
                for (var i = 0, len = result.lineCount; i < len; i++) {
                    var lineInfo = lines[i];
                    var line = lineInfo.text;
                    var lineWidth = lineInfo.width;
                    var hShift = this.getHorizontalAlignShift(lineWidth, layoutRectangle.width, format);
                    var lineIndent = this.getLineIndent(lineInfo, format, layoutRectangle, (i === 0));
                    hShift += (!this.rightToLeft(format)) ? lineIndent : 0;
                    var x1 = layoutRectangle.x + hShift;
                    /* tslint:disable */
                    var x2 = (!this.shouldJustify(lineInfo, layoutRectangle.width, format)) ? x1 + lineWidth - lineIndent : x1 + layoutRectangle.width - lineIndent;
                    /* tslint:enable */
                    if (font.underline) {
                        var y = underlineYOffset;
                        this.drawLine(linePen, x1, y, x2, y);
                        underlineYOffset += result.lineHeight;
                    }
                    if (font.strikeout) {
                        var y = strikeoutYOffset;
                        this.drawLine(linePen, x1, y, x2, y);
                        strikeoutYOffset += result.lineHeight;
                    }
                    if (this.isPointOverload && lines.length > 1) {
                        layoutRectangle.x = 0;
                        layoutRectangle.width = this.clientSize.width;
                    }
                }
                this.isPointOverload = false;
            }
        }
    };
    /**
     * `Creates a pen` for drawing lines in the text.
     * @private
     */
    PdfGraphics.prototype.createUnderlineStikeoutPen = function (pen, brush, font, format) {
        // Calculate line width.
        var lineWidth = font.metrics.getSize(format) / 20;
        var linePen = null;
        // Create a pen fo the lines.
        if (pen != null) {
            linePen = new _pdf_pen__WEBPACK_IMPORTED_MODULE_3__["PdfPen"](pen.color, lineWidth);
        }
        else if (brush != null) {
            linePen = new _pdf_pen__WEBPACK_IMPORTED_MODULE_3__["PdfPen"](brush, lineWidth);
        }
        return linePen;
    };
    /**
     * Return `text rendering mode`.
     * @private
     */
    PdfGraphics.prototype.getTextRenderingMode = function (pen, brush, format) {
        var tm = _enum__WEBPACK_IMPORTED_MODULE_0__["TextRenderingMode"].None;
        if (pen != null && brush != null) {
            tm = _enum__WEBPACK_IMPORTED_MODULE_0__["TextRenderingMode"].FillStroke;
        }
        else if (pen != null) {
            tm = _enum__WEBPACK_IMPORTED_MODULE_0__["TextRenderingMode"].Stroke;
        }
        else {
            tm = _enum__WEBPACK_IMPORTED_MODULE_0__["TextRenderingMode"].Fill;
        }
        if (format != null && format.clipPath) {
            tm |= _enum__WEBPACK_IMPORTED_MODULE_0__["TextRenderingMode"].ClipFlag;
        }
        return tm;
    };
    /**
     * Returns `line indent` for the line.
     * @private
     */
    PdfGraphics.prototype.getLineIndent = function (lineInfo, format, layoutBounds, firstLine) {
        var lineIndent = 0;
        var firstParagraphLine = ((lineInfo.lineType & _fonts_string_layouter__WEBPACK_IMPORTED_MODULE_14__["LineType"].FirstParagraphLine) > 0);
        if (format != null && firstParagraphLine) {
            lineIndent = (firstLine) ? format.firstLineIndent : format.paragraphIndent;
            lineIndent = (layoutBounds.width > 0) ? Math.min(layoutBounds.width, lineIndent) : lineIndent;
        }
        return lineIndent;
    };
    /**
     * Calculates shift value if the line is `horizontaly aligned`.
     * @private
     */
    PdfGraphics.prototype.getHorizontalAlignShift = function (lineWidth, boundsWidth, format) {
        var shift = 0;
        if (boundsWidth >= 0 && format != null && format.alignment !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"].Left) {
            switch (format.alignment) {
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"].Center:
                    shift = (boundsWidth - lineWidth) / 2;
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextAlignment"].Right:
                    shift = boundsWidth - lineWidth;
                    break;
            }
        }
        return shift;
    };
    /**
     * Gets or sets the value that indicates `text direction` mode.
     * @private
     */
    PdfGraphics.prototype.rightToLeft = function (format) {
        var rtl = (format != null && format.rightToLeft);
        if (format !== null && typeof format !== 'undefined') {
            if (format.textDirection !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfTextDirection"].None && typeof format.textDirection !== 'undefined') {
                rtl = true;
            }
        }
        return rtl;
    };
    PdfGraphics.prototype.stateControl = function (pen, brush, font, format) {
        if (typeof format === 'undefined') {
            this.stateControl(pen, brush, font, null);
        }
        else {
            var saveState = false;
            if (brush !== null) {
                var solidBrush = brush;
                if (typeof this.pageLayer !== 'undefined' && this.pageLayer != null) {
                    if (this.colorSpaceChanged === false) {
                        this.lastDocumentCS = this.pageLayer.page.document.colorSpace;
                        this.lastGraphicsCS = this.pageLayer.page.graphics.colorSpace;
                        this.colorSpace = this.pageLayer.page.document.colorSpace;
                        this.currentColorSpace = this.pageLayer.page.document.colorSpace;
                        this.colorSpaceChanged = true;
                    }
                }
                this.initCurrentColorSpace(this.currentColorSpace);
            }
            else if (pen != null) {
                var pdfPen = pen;
                if (typeof this.pageLayer !== 'undefined' && this.pageLayer != null) {
                    /* tslint:disable */
                    this.colorSpace = this.pageLayer.page.document.colorSpace;
                    this.currentColorSpace = this.pageLayer.page.document.colorSpace;
                }
                this.initCurrentColorSpace(this.currentColorSpace);
            }
            this.penControl(pen, saveState);
            this.brushControl(brush, saveState);
            this.fontControl(font, format, saveState);
        }
    };
    /**
     * Initializes the `current color space`.
     * @private
     */
    PdfGraphics.prototype.initCurrentColorSpace = function (colorspace) {
        var re = this.getResources.getResources();
        if (!this.bCSInitialized) {
            this.pdfStreamWriter.setColorSpace('Device' + this.currentColorSpaces[this.currentColorSpace], true);
            this.pdfStreamWriter.setColorSpace('Device' + this.currentColorSpaces[this.currentColorSpace], false);
            this.bCSInitialized = true;
        }
    };
    /**
     * Controls the `pen state`.
     * @private
     */
    PdfGraphics.prototype.penControl = function (pen, saveState) {
        if (pen != null) {
            this.currentPen = pen;
            this.colorSpace = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfColorSpace"].Rgb;
            /* tslint:disable */
            pen.monitorChanges(this.currentPen, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace, this.matrix.clone());
            /* tslint:enable */
            this.currentPen = pen.clone();
        }
    };
    /**
     * Controls the `brush state`.
     * @private
     */
    PdfGraphics.prototype.brushControl = function (brush, saveState) {
        if (brush != null) {
            this.currentBrush = brush;
            /* tslint:disable */
            brush.monitorChanges(this.currentBrush, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace);
            /* tslint:enable */
            this.currentBrush = brush;
            brush = null;
        }
    };
    /**
     * Saves the font and other `font settings`.
     * @private
     */
    PdfGraphics.prototype.fontControl = function (font, format, saveState) {
        if (font != null) {
            var curSubSuper = (format != null) ? format.subSuperScript : _fonts_enum__WEBPACK_IMPORTED_MODULE_1__["PdfSubSuperScript"].None;
            /* tslint:disable */
            var prevSubSuper = (this.currentStringFormat != null) ? this.currentStringFormat.subSuperScript : _fonts_enum__WEBPACK_IMPORTED_MODULE_1__["PdfSubSuperScript"].None; /* tslint:enable */
            if (saveState || font !== this.currentFont || curSubSuper !== prevSubSuper) {
                var resources = this.getResources.getResources();
                this.currentFont = font;
                this.currentStringFormat = format;
                var size = font.metrics.getSize(format);
                /* tslint:disable */
                this.isEmfTextScaled = false;
                var fontName = resources.getName(font);
                this.pdfStreamWriter.setFont(font, fontName, size);
            }
        }
    };
    PdfGraphics.prototype.setTransparency = function (arg1, arg2, arg3) {
        if (typeof arg2 === 'undefined') {
            this.istransparencySet = true;
            this.setTransparency(arg1, arg1, _enum__WEBPACK_IMPORTED_MODULE_0__["PdfBlendMode"].Normal);
        }
        else if (typeof arg2 === 'number' && typeof arg3 === 'undefined') {
            this.setTransparency(arg1, arg2, _enum__WEBPACK_IMPORTED_MODULE_0__["PdfBlendMode"].Normal);
        }
        else {
            if (this.trasparencies == null) {
                this.trasparencies = new _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_12__["TemporaryDictionary"]();
            }
            var transp = null;
            var td = new TransparencyData(arg1, arg2, arg3);
            if (this.trasparencies.containsKey(td)) {
                transp = this.trasparencies.getValue(td);
            }
            if (transp == null) {
                transp = new _pdf_transparency__WEBPACK_IMPORTED_MODULE_13__["PdfTransparency"](arg1, arg2, arg3);
                this.trasparencies.setValue(td, transp);
            }
            var resources = this.getResources.getResources();
            var name_3 = resources.getName(transp);
            var sw = this.streamWriter;
            sw.setGraphicsState(name_3);
        }
    };
    PdfGraphics.prototype.clipTranslateMargins = function (x, y, left, top, right, bottom) {
        if (x instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["RectangleF"] && typeof y === 'undefined') {
            this.clipBounds = x;
            this.pdfStreamWriter.writeComment('Clip margins.');
            this.pdfStreamWriter.appendRectangle(x);
            this.pdfStreamWriter.closePath();
            this.pdfStreamWriter.clipPath(false);
            this.pdfStreamWriter.writeComment('Translate co-ordinate system.');
            this.translateTransform(x.x, x.y);
        }
        else if (typeof x === 'number') {
            var clipArea = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_8__["RectangleF"](left, top, this.size.width - left - right, this.size.height - top - bottom);
            this.clipBounds = clipArea;
            this.pdfStreamWriter.writeComment("Clip margins.");
            this.pdfStreamWriter.appendRectangle(clipArea);
            this.pdfStreamWriter.closePath();
            this.pdfStreamWriter.clipPath(false);
            this.pdfStreamWriter.writeComment("Translate co-ordinate system.");
            this.translateTransform(x, y);
        }
    };
    /**
     * `Updates y` co-ordinate.
     * @private
     */
    PdfGraphics.prototype.updateY = function (y) {
        return -y;
    };
    /**
     * Used to `translate the transformation`.
     * ```typescript
     * // create a new PDF document
     * let document : PdfDocument = new PdfDocument();
     * // create a new page
     * let page1 : PdfPage = document.pages.add();
     * // set pen
     * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
     * //
     * // set translate transform
     * page1.graphics.translateTransform(100, 100);
     * //
     * // draw the rectangle after applying translate transform
     * page1.graphics.drawRectangle(pen, new RectangleF({x : 0, y : 0}, {width : 100, height : 50}));
     * // save the document.
     * document.save('output.pdf');
     * // destroy the document
     * document.destroy();
     * ```
     * @param offsetX The x-coordinate of the translation.
     * @param offsetY The y-coordinate of the translation.
     */
    PdfGraphics.prototype.translateTransform = function (offsetX, offsetY) {
        var matrix = new _pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_7__["PdfTransformationMatrix"]();
        this.getTranslateTransform(offsetX, offsetY, matrix);
        this.pdfStreamWriter.modifyCtm(matrix);
        this.matrix.multiply(matrix);
    };
    /**
     * `Translates` coordinates of the input matrix.
     * @private
     */
    PdfGraphics.prototype.getTranslateTransform = function (x, y, input) {
        input.translate(x, this.updateY(y));
        return input;
    };
    /* tslint:disable */
    /**
     * Applies the specified `scaling operation` to the transformation matrix of this Graphics by prepending it to the object's transformation matrix.
     * ```typescript
     * // create a new PDF document
     * let document : PdfDocument = new PdfDocument();
     * // create a new page
     * let page1 : PdfPage = document.pages.add();
     * // create pen
     * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
     * //
     * // apply scaling trasformation
     * page1.graphics.scaleTransform(1.5, 2);
     * //
     * // draw the rectangle after applying scaling transform
     * page1.graphics.drawRectangle(pen, new RectangleF({x : 100, y : 100}, {width : 100, height : 50}));
     * // save the document.
     * document.save('output.pdf');
     * // destroy the document
     * document.destroy();
     * ```
     * @param scaleX Scale factor in the x direction.
     * @param scaleY Scale factor in the y direction.
     */
    /* tslint:enable */
    PdfGraphics.prototype.scaleTransform = function (scaleX, scaleY) {
        var matrix = new _pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_7__["PdfTransformationMatrix"]();
        this.getScaleTransform(scaleX, scaleY, matrix);
        this.pdfStreamWriter.modifyCtm(matrix);
        this.matrix.multiply(matrix);
    };
    /**
     * `Scales` coordinates of the input matrix.
     * @private
     */
    PdfGraphics.prototype.getScaleTransform = function (x, y, input) {
        if (input == null) {
            input = new _pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_7__["PdfTransformationMatrix"]();
        }
        input.scale(x, y);
        return input;
    };
    /**
     * Applies the specified `rotation` to the transformation matrix of this Graphics.
     * ```typescript
     * // create a new PDF document
     * let document : PdfDocument = new PdfDocument();
     * // create a new page
     * let page1 : PdfPage = document.pages.add();
     * // create pen
     * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
     * //
     * // set RotateTransform with 25 degree of angle
     * page1.graphics.rotateTransform(25);
     * //
     * // draw the rectangle after RotateTransformation
     * page1.graphics.drawRectangle(pen, new RectangleF({x : 100, y : 100}, {width : 100, height : 50}));
     * // save the document.
     * document.save('output.pdf');
     * // destroy the document
     * document.destroy();
     * ```
     * @param angle Angle of rotation in degrees.
     */
    PdfGraphics.prototype.rotateTransform = function (angle) {
        var matrix = new _pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_7__["PdfTransformationMatrix"]();
        this.getRotateTransform(angle, matrix);
        this.pdfStreamWriter.modifyCtm(matrix);
        this.matrix.multiply(matrix);
    };
    /**
     * `Initializes coordinate system`.
     * @private
     */
    PdfGraphics.prototype.initializeCoordinates = function () {
        // Matrix equation: TM(T-1)=M', where T=[1 0 0 -1 0 h]
        this.pdfStreamWriter.writeComment('Change co-ordinate system to left/top.');
        // Translate co-ordinates only, don't flip.
        if (this.mediaBoxUpperRightBound !== -(this.size.height)) {
            if (this.cropBox == null) {
                if (this.mediaBoxUpperRightBound === this.size.height || this.mediaBoxUpperRightBound === 0) {
                    this.translateTransform(0, this.updateY(this.size.height));
                }
                else {
                    this.translateTransform(0, this.updateY(this.mediaBoxUpperRightBound));
                }
            }
        }
    };
    /**
     * `Rotates` coordinates of the input matrix.
     * @private
     */
    PdfGraphics.prototype.getRotateTransform = function (angle, input) {
        if (input == null || typeof input === 'undefined') {
            input = new _pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_7__["PdfTransformationMatrix"]();
        }
        input.rotate(this.updateY(angle));
        return input;
    };
    /**
     * `Saves` the current state of this Graphics and identifies the saved state with a GraphicsState.
     * ```typescript
     * // create a new PDF document
     * let document : PdfDocument = new PdfDocument();
     * // create a new page
     * let page1 : PdfPage = document.pages.add();
     * // create pen
     * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
     * //
     * // save the graphics state
     * let state1 : PdfGraphicsState = page1.graphics.save();
     * //
     * page1.graphics.scaleTransform(1.5, 2);
     * // draw the rectangle
     * page1.graphics.drawRectangle(pen, new RectangleF({x : 100, y : 100}, {width : 100, height : 50}));
     * // restore the graphics state
     * page1.graphics.restore(state1);
     * // save the document.
     * document.save('output.pdf');
     * // destroy the document
     * document.destroy();
     * ```
     */
    PdfGraphics.prototype.save = function () {
        var state = new PdfGraphicsState(this, this.matrix.clone());
        state.brush = this.currentBrush;
        state.pen = this.currentPen;
        state.font = this.currentFont;
        state.colorSpace = this.currentColorSpace;
        state.characterSpacing = this.previousCharacterSpacing;
        state.wordSpacing = this.previousWordSpacing;
        state.textScaling = this.previousTextScaling;
        state.textRenderingMode = this.previousTextRenderingMode;
        this.graphicsState.push(state);
        this.pdfStreamWriter.saveGraphicsState();
        return state;
    };
    PdfGraphics.prototype.restore = function (state) {
        if (typeof state === 'undefined') {
            if (this.graphicsState.length > 0) {
                this.doRestoreState();
            }
        }
        else {
            if (this.graphicsState.indexOf(state) !== -1) {
                for (;;) {
                    if (this.graphicsState.length === 0) {
                        break;
                    }
                    var popState = this.doRestoreState();
                    if (popState === state) {
                        break;
                    }
                }
            }
        }
    };
    /**
     * `Restores graphics state`.
     * @private
     */
    PdfGraphics.prototype.doRestoreState = function () {
        var state = this.graphicsState.pop();
        this.transformationMatrix = state.matrix;
        this.currentBrush = state.brush;
        this.currentPen = state.pen;
        this.currentFont = state.font;
        this.currentColorSpace = state.colorSpace;
        this.previousCharacterSpacing = state.characterSpacing;
        this.previousWordSpacing = state.wordSpacing;
        this.previousTextScaling = state.textScaling;
        this.previousTextRenderingMode = state.textRenderingMode;
        this.pdfStreamWriter.restoreGraphicsState();
        return state;
    };
    // Constants
    /**
     * Specifies the mask of `path type values`.
     * @private
     */
    PdfGraphics.pathTypesValuesMask = 0xf;
    /**
     * Checks whether the object is `transparencyObject`.
     * @hidden
     * @private
     */
    PdfGraphics.transparencyObject = false;
    return PdfGraphics;
}());

/**
 * `GetResourceEventHandler` class is alternate for event handlers and delegates.
 * @private
 * @hidden
 */
var GetResourceEventHandler = /** @class */ (function () {
    /**
     * Initialize instance of `GetResourceEventHandler` class.
     * Alternate for event handlers and delegates.
     * @private
     */
    function GetResourceEventHandler(sender) {
        this.sender = sender;
    }
    /**
     * Return the instance of `PdfResources` class.
     * @private
     */
    GetResourceEventHandler.prototype.getResources = function () {
        return this.sender.getResources();
    };
    return GetResourceEventHandler;
}());

var PdfGraphicsState = /** @class */ (function () {
    function PdfGraphicsState(graphics, matrix) {
        /**
         * Stores `previous rendering mode`.
         * @default TextRenderingMode.Fill
         * @private
         */
        this.internalTextRenderingMode = _enum__WEBPACK_IMPORTED_MODULE_0__["TextRenderingMode"].Fill;
        /**
         * `Previous character spacing` value or 0.
         * @default 0.0
         * @private
         */
        this.internalCharacterSpacing = 0.0;
        /**
         * `Previous word spacing` value or 0.
         * @default 0.0
         * @private
         */
        this.internalWordSpacing = 0.0;
        /**
         * The previously used `text scaling value`.
         * @default 100.0
         * @private
         */
        this.internalTextScaling = 100.0;
        /**
         * `Current color space`.
         * @default PdfColorSpace.Rgb
         * @private
         */
        this.pdfColorSpace = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfColorSpace"].Rgb;
        if (typeof graphics !== 'undefined') {
            this.pdfGraphics = graphics;
            this.transformationMatrix = matrix;
        }
    }
    Object.defineProperty(PdfGraphicsState.prototype, "graphics", {
        // Properties
        /**
         * Gets the parent `graphics object`.
         * @private
         */
        get: function () {
            return this.pdfGraphics;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphicsState.prototype, "matrix", {
        /**
         * Gets the `current matrix`.
         * @private
         */
        get: function () {
            return this.transformationMatrix;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphicsState.prototype, "characterSpacing", {
        /**
         * Gets or sets the `current character spacing`.
         * @private
         */
        get: function () {
            return this.internalCharacterSpacing;
        },
        set: function (value) {
            this.internalCharacterSpacing = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphicsState.prototype, "wordSpacing", {
        /**
         * Gets or sets the `word spacing` value.
         * @private
         */
        get: function () {
            return this.internalWordSpacing;
        },
        set: function (value) {
            this.internalWordSpacing = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphicsState.prototype, "textScaling", {
        /**
         * Gets or sets the `text scaling` value.
         * @private
         */
        get: function () {
            return this.internalTextScaling;
        },
        set: function (value) {
            this.internalTextScaling = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphicsState.prototype, "pen", {
        /**
         * Gets or sets the `current pen` object.
         * @private
         */
        get: function () {
            return this.pdfPen;
        },
        set: function (value) {
            this.pdfPen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphicsState.prototype, "brush", {
        /**
         * Gets or sets the `brush`.
         * @private
         */
        get: function () {
            return this.pdfBrush;
        },
        set: function (value) {
            this.pdfBrush = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphicsState.prototype, "font", {
        /**
         * Gets or sets the `current font` object.
         * @private
         */
        get: function () {
            return this.pdfFont;
        },
        set: function (value) {
            this.pdfFont = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphicsState.prototype, "colorSpace", {
        /**
         * Gets or sets the `current color space` value.
         * @private
         */
        get: function () {
            return this.pdfColorSpace;
        },
        set: function (value) {
            this.pdfColorSpace = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGraphicsState.prototype, "textRenderingMode", {
        /**
         * Gets or sets the `text rendering mode`.
         * @private
         */
        get: function () {
            return this.internalTextRenderingMode;
        },
        set: function (value) {
            this.internalTextRenderingMode = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfGraphicsState;
}());

var TransparencyData = /** @class */ (function () {
    // Constructors
    /**
     * Initializes a new instance of the `TransparencyData` class.
     * @private
     */
    function TransparencyData(alphaPen, alphaBrush, blendMode) {
        this.alphaPen = alphaPen;
        this.alphaBrush = alphaBrush;
        this.blendMode = blendMode;
    }
    return TransparencyData;
}());


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-margins.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-margins.js ***!
  \********************************************************************************************/
/*! exports provided: PdfMargins */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfMargins", function() { return PdfMargins; });
/**
 * PdfMargins.ts class for EJ2-PDF
 * A class representing PDF page margins.
 */
var PdfMargins = /** @class */ (function () {
    /**
     * Initializes a new instance of the `PdfMargins` class.
     * @private
     */
    function PdfMargins() {
        /**
         * Represents the `Default Page Margin` value.
         * @default 0.0
         * @private
         */
        this.pdfMargin = 40.0;
        this.setMargins(this.pdfMargin);
    }
    Object.defineProperty(PdfMargins.prototype, "left", {
        //Properties
        /**
         * Gets or sets the `left margin` size.
         * @private
         */
        get: function () {
            return this.leftMargin;
        },
        set: function (value) {
            this.leftMargin = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfMargins.prototype, "top", {
        /**
         * Gets or sets the `top margin` size.
         * @private
         */
        get: function () {
            return this.topMargin;
        },
        set: function (value) {
            this.topMargin = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfMargins.prototype, "right", {
        /**
         * Gets or sets the `right margin` size.
         * @private
         */
        get: function () {
            return this.rightMargin;
        },
        set: function (value) {
            this.rightMargin = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfMargins.prototype, "bottom", {
        /**
         * Gets or sets the `bottom margin` size.
         * @private
         */
        get: function () {
            return this.bottomMargin;
        },
        set: function (value) {
            this.bottomMargin = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfMargins.prototype, "all", {
        /**
         * Sets the `margins`.
         * @private
         */
        set: function (value) {
            this.setMargins(value);
        },
        enumerable: true,
        configurable: true
    });
    PdfMargins.prototype.setMargins = function (margin1, margin2, margin3, margin4) {
        if (typeof margin2 === 'undefined') {
            this.leftMargin = this.topMargin = this.rightMargin = this.bottomMargin = margin1;
        }
        else {
            if (typeof margin3 === 'undefined') {
                this.leftMargin = this.rightMargin = margin1;
                this.bottomMargin = this.topMargin = margin2;
            }
            else {
                this.leftMargin = margin1;
                this.topMargin = margin2;
                this.rightMargin = margin3;
                this.bottomMargin = margin4;
            }
        }
    };
    /**
     * `Clones` the object.
     * @private
     */
    PdfMargins.prototype.clone = function () {
        return this;
    };
    return PdfMargins;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-pen.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-pen.js ***!
  \****************************************************************************************/
/*! exports provided: PdfPen */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPen", function() { return PdfPen; });
/* harmony import */ var _pdf_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-color */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./brushes/pdf-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js");
/**
 * PdfPen.ts class for EJ2-PDF
 */



/**
 * `PdfPen` class defining settings for drawing operations, that determines the color,
 * width, and style of the drawing elements.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * // create a new page
 * let page1 : PdfPage = document.pages.add();
 * // set pen
 * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
 * // draw rectangle
 * page1.graphics.drawRectangle(pen, new RectangleF({x : 0, y : 0}, {width : 100, height : 50}));
 * // save the document.
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfPen = /** @class */ (function () {
    function PdfPen(arg1, arg2) {
        //Fields
        /**
         * Specifies the `color of the pen`.
         * @default new PdfColor()
         * @private
         */
        this.pdfColor = new _pdf_color__WEBPACK_IMPORTED_MODULE_0__["PdfColor"](0, 0, 0);
        /**
         * Specifies the `dash offset of the pen`.
         * @default 0
         * @private
         */
        this.dashOffsetValue = 0;
        /**
         * Specifies the `dash pattern of the pen`.
         * @default [0]
         * @private
         */
        this.penDashPattern = [0];
        /**
         * Specifies the `dash style of the pen`.
         * @default Solid
         * @private
         */
        this.pdfDashStyle = _enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Solid;
        /**
         * Specifies the `line cap of the pen`.
         * @default 0
         * @private
         */
        this.pdfLineCap = 0;
        /**
         * Specifies the `line join of the pen`.
         * @default 0
         * @private
         */
        this.pdfLineJoin = 0;
        /**
         * Specifies the `width of the pen`.
         * @default 1.0
         * @private
         */
        this.penWidth = 1.0;
        /**
         * Specifies the `mitter limit of the pen`.
         * @default 0.0
         * @private
         */
        this.internalMiterLimit = 0.0;
        /**
         * Stores the `colorspace` value.
         * @default Rgb
         * @private
         */
        this.colorSpace = _enum__WEBPACK_IMPORTED_MODULE_1__["PdfColorSpace"].Rgb;
        if (typeof arg2 === 'number') {
            this.constructor(arg1);
            this.width = arg2;
        }
        else if (typeof arg2 === 'undefined' && arg1 instanceof _brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_2__["PdfBrush"]) {
            this.setBrush(arg1);
        }
        else if (typeof arg2 === 'undefined' && arg1 instanceof _pdf_color__WEBPACK_IMPORTED_MODULE_0__["PdfColor"]) {
            this.color = arg1;
        }
    }
    Object.defineProperty(PdfPen.prototype, "color", {
        //Properties
        /**
         * Gets or sets the `color of the pen`.
         * @private
         */
        get: function () {
            return this.pdfColor;
        },
        set: function (value) {
            this.pdfColor = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPen.prototype, "dashOffset", {
        /**
         * Gets or sets the `dash offset of the pen`.
         * @private
         */
        get: function () {
            if (typeof this.dashOffsetValue === 'undefined' || this.dashOffsetValue == null) {
                return 0;
            }
            else {
                return this.dashOffsetValue;
            }
        },
        set: function (value) {
            this.dashOffsetValue = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPen.prototype, "dashPattern", {
        /**
         * Gets or sets the `dash pattern of the pen`.
         * @private
         */
        get: function () {
            return this.penDashPattern;
        },
        set: function (value) {
            this.penDashPattern = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPen.prototype, "dashStyle", {
        /**
         * Gets or sets the `dash style of the pen`.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * // create a new page
         * let page1 : PdfPage = document.pages.add();
         * // set pen
         * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
         * //
         * // set pen style
         * pen.dashStyle = PdfDashStyle.DashDot;
         * // get pen style
         * let style : PdfDashStyle = pen.dashStyle;
         * //
         * // draw rectangle
         * page1.graphics.drawRectangle(pen, new RectangleF({x : 0, y : 0}, {width : 100, height : 50}));
         * // save the document.
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            return this.pdfDashStyle;
        },
        set: function (value) {
            if (this.pdfDashStyle !== value) {
                this.pdfDashStyle = value;
                switch (this.pdfDashStyle) {
                    case _enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Custom:
                        break;
                    case _enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Dash:
                        this.penDashPattern = [3, 1];
                        break;
                    case _enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Dot:
                        this.penDashPattern = [1, 1];
                        break;
                    case _enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].DashDot:
                        this.penDashPattern = [3, 1, 1, 1];
                        break;
                    case _enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].DashDotDot:
                        this.penDashPattern = [3, 1, 1, 1, 1, 1];
                        break;
                    case _enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Solid:
                        break;
                    default:
                        this.pdfDashStyle = _enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Solid;
                        this.penDashPattern = [0];
                        break;
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPen.prototype, "lineCap", {
        /**
         * Gets or sets the `line cap of the pen`.
         * @private
         */
        get: function () {
            return this.pdfLineCap;
        },
        set: function (value) {
            this.pdfLineCap = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPen.prototype, "lineJoin", {
        /**
         * Gets or sets the `line join style of the pen`.
         * @private
         */
        get: function () {
            return this.pdfLineJoin;
        },
        set: function (value) {
            this.pdfLineJoin = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPen.prototype, "miterLimit", {
        /**
         * Gets or sets the `miter limit`.
         * @private
         */
        get: function () {
            return this.internalMiterLimit;
        },
        set: function (value) {
            this.internalMiterLimit = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPen.prototype, "width", {
        /**
         * Gets or sets the `width of the pen`.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * // create a new page
         * let page1 : PdfPage = document.pages.add();
         * // set pen
         * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
         * //
         * // set pen width
         * pen.width = 2;
         * //
         * // draw rectangle
         * page1.graphics.drawRectangle(pen, new RectangleF({x : 0, y : 0}, {width : 100, height : 50}));
         * // save the document.
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            return this.penWidth;
        },
        set: function (value) {
            this.penWidth = value;
        },
        enumerable: true,
        configurable: true
    });
    //Helper
    /**
     * `Clones` this instance of PdfPen class.
     * @private
     */
    PdfPen.prototype.clone = function () {
        var pen = this;
        return pen;
    };
    /**
     * `Sets the brush`.
     * @private
     */
    PdfPen.prototype.setBrush = function (brush) {
        var sBrush = brush;
        this.color = sBrush.color;
        this.pdfBrush = sBrush;
    };
    /**
     * `Monitors the changes`.
     * @private
     */
    PdfPen.prototype.monitorChanges = function (currentPen, streamWriter, getResources, saveState, currentColorSpace, matrix) {
        var diff = false;
        saveState = true;
        if (currentPen == null) {
            diff = true;
        }
        diff = this.dashControl(currentPen, saveState, streamWriter);
        streamWriter.setLineWidth(this.width);
        streamWriter.setLineJoin(this.lineJoin);
        streamWriter.setLineCap(this.lineCap);
        var miterLimit = this.miterLimit;
        if (miterLimit > 0) {
            streamWriter.setMiterLimit(miterLimit);
            diff = true;
        }
        var brush = this.pdfBrush;
        streamWriter.setColorAndSpace(this.color, currentColorSpace, true);
        diff = true;
        return diff;
    };
    /**
     * `Controls the dash style` and behaviour of each line.
     * @private
     */
    PdfPen.prototype.dashControl = function (pen, saveState, streamWriter) {
        saveState = true;
        var lineWidth = this.width;
        var pattern = this.getPattern();
        streamWriter.setLineDashPattern(pattern, this.dashOffset * lineWidth);
        return saveState;
    };
    /**
     * `Gets the pattern` of PdfPen.
     * @private
     */
    PdfPen.prototype.getPattern = function () {
        var pattern = this.dashPattern;
        for (var i = 0; i < pattern.length; ++i) {
            pattern[i] *= this.width;
        }
        return pattern;
    };
    return PdfPen;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-resources.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-resources.js ***!
  \**********************************************************************************************/
/*! exports provided: PdfResources, Guid */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfResources", function() { return PdfResources; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Guid", function() { return Guid; });
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../collections/object-object-pair/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/object-object-pair/dictionary.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _input_output_pdf_cross_table__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../input-output/pdf-cross-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-cross-table.js");
/* harmony import */ var _fonts_pdf_font__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./fonts/pdf-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js");
/* harmony import */ var _figures_pdf_template__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./figures/pdf-template */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/pdf-template.js");
/* harmony import */ var _brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./brushes/pdf-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js");
/* harmony import */ var _pdf_transparency__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./pdf-transparency */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transparency.js");
/* harmony import */ var _graphics_images_pdf_bitmap__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../graphics/images/pdf-bitmap */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-bitmap.js");
/* harmony import */ var _graphics_images_pdf_image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../graphics/images/pdf-image */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-image.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfResources.ts class for EJ2-PDF
 */












/**
 * `PdfResources` class used to set resource contents like font, image.
 * @private
 */
var PdfResources = /** @class */ (function (_super) {
    __extends(PdfResources, _super);
    function PdfResources(baseDictionary) {
        var _this = _super.call(this) || this;
        /**
         * Dictionary for the `properties names`.
         * @private
         */
        _this.properties = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]();
        if (baseDictionary instanceof _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]) {
            _this = _super.call(this, baseDictionary) || this;
        }
        return _this;
    }
    Object.defineProperty(PdfResources.prototype, "names", {
        //Properties
        /**
         * Gets the `font names`.
         * @private
         */
        get: function () {
            return this.getNames();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfResources.prototype, "document", {
        /**
         * Get or set the `page document`.
         * @private
         */
        get: function () {
            return this.pdfDocument;
        },
        set: function (value) {
            this.pdfDocument = value;
        },
        enumerable: true,
        configurable: true
    });
    //Public Methods
    /**
     * `Generates name` for the object and adds to the resource if the object is new.
     * @private
     */
    PdfResources.prototype.getName = function (obj) {
        var primitive = obj.element;
        var name = null;
        if (this.names.containsKey(primitive)) {
            name = this.names.getValue(primitive);
        }
        // Object is new.
        if (name == null) {
            var sName = this.generateName();
            name = new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__["PdfName"](sName);
            this.names.setValue(primitive, name);
            if (obj instanceof _fonts_pdf_font__WEBPACK_IMPORTED_MODULE_6__["PdfFont"]) {
                this.add(obj, name);
            }
            else if (obj instanceof _figures_pdf_template__WEBPACK_IMPORTED_MODULE_7__["PdfTemplate"]) {
                this.add(obj, name);
            }
            else if (obj instanceof _pdf_transparency__WEBPACK_IMPORTED_MODULE_9__["PdfTransparency"]) {
                this.add(obj, name);
            }
            else if (obj instanceof _graphics_images_pdf_image__WEBPACK_IMPORTED_MODULE_11__["PdfImage"] || obj instanceof _graphics_images_pdf_bitmap__WEBPACK_IMPORTED_MODULE_10__["PdfBitmap"]) {
                this.add(obj, name);
            }
        }
        return name;
    };
    /**
     * Gets `resource names` to font dictionaries.
     * @private
     */
    PdfResources.prototype.getNames = function () {
        if (this.pdfNames == null) {
            this.pdfNames = new _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_1__["TemporaryDictionary"]();
        }
        var fonts = this.items.getValue(this.dictionaryProperties.font);
        if (fonts != null) {
            var reference = fonts;
            var dictionary = fonts;
            dictionary = _input_output_pdf_cross_table__WEBPACK_IMPORTED_MODULE_5__["PdfCrossTable"].dereference(fonts);
        }
        return this.pdfNames;
    };
    /**
     * Add `RequireProcedureSet` into procset array.
     * @private
     */
    PdfResources.prototype.requireProcedureSet = function (procedureSetName) {
        if (procedureSetName == null) {
            throw new Error('ArgumentNullException:procedureSetName');
        }
        var procSets = this.items.getValue(this.dictionaryProperties.procset);
        if (procSets == null) {
            procSets = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_3__["PdfArray"]();
            this.items.setValue(this.dictionaryProperties.procset, procSets);
        }
        var name = new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__["PdfName"](procedureSetName);
        if (!procSets.contains(name)) {
            procSets.add(name);
        }
    };
    //Helper Methods
    /**
     * `Remove font` from array.
     * @private
     */
    PdfResources.prototype.removeFont = function (name) {
        var key = null;
        var keys = this.pdfNames.keys();
        for (var index = 0; index < this.pdfNames.size(); index++) {
            if (this.pdfNames.getValue(keys[index]) === new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__["PdfName"](name)) {
                key = keys[index];
                break;
            }
        }
        if (key != null) {
            this.pdfNames.remove(key);
        }
    };
    /**
     * Generates `Unique string name`.
     * @private
     */
    PdfResources.prototype.generateName = function () {
        var name = Guid.getNewGuidString();
        return name;
    };
    PdfResources.prototype.add = function (arg1, arg2) {
        if (arg1 instanceof _fonts_pdf_font__WEBPACK_IMPORTED_MODULE_6__["PdfFont"]) {
            var dictionary = null;
            var fonts = this.items.getValue(this.dictionaryProperties.font);
            if (fonts != null) {
                var reference = fonts;
                dictionary = fonts;
                dictionary = fonts;
            }
            else {
                dictionary = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]();
                this.items.setValue(this.dictionaryProperties.font, dictionary);
            }
            dictionary.items.setValue(arg2.value, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](arg1.element));
        }
        else if (arg1 instanceof _figures_pdf_template__WEBPACK_IMPORTED_MODULE_7__["PdfTemplate"]) {
            var xobjects = void 0;
            xobjects = this.items.getValue(this.dictionaryProperties.xObject);
            // Create fonts dictionary.
            if (xobjects == null) {
                xobjects = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]();
                this.items.setValue(this.dictionaryProperties.xObject, xobjects);
            }
            xobjects.items.setValue(arg2.value, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](arg1.element));
        }
        else if (arg1 instanceof _brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_8__["PdfBrush"]) {
            // let savable : IPdfPrimitive = (arg1 as IPdfWrapper).Element;
            // if (savable != null)
            // {
            //     let pattern : PdfDictionary = this.Items.getValue(this.dictionaryProperties.pattern) as PdfDictionary;
            //     // Create a new pattern dictionary.
            //     if (pattern == null) {
            //         pattern = new PdfDictionary();
            //         this.Items.setValue(this.dictionaryProperties.pattern, pattern);
            //     }
            //     pattern.Items.setValue(name, new PdfReferenceHolder(savable));
            // }
        }
        else if (arg1 instanceof _pdf_transparency__WEBPACK_IMPORTED_MODULE_9__["PdfTransparency"]) {
            var savable = arg1.element;
            var transDic = null;
            transDic = this.items.getValue(this.dictionaryProperties.extGState);
            // Create a new pattern dictionary.
            if (transDic == null) {
                transDic = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]();
                this.items.setValue(this.dictionaryProperties.extGState, transDic);
            }
            transDic.items.setValue(arg2.value, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](savable));
        }
        else {
            /* tslint:disable */
            var xobjects = this.Dictionary.items.getValue(this.dictionaryProperties.xObject);
            var parentXObjects = void 0;
            if (typeof this.pdfDocument !== 'undefined') {
                parentXObjects = this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.getValue(this.dictionaryProperties.xObject);
            }
            var values = this.Dictionary.items.values();
            var hasSameImageStream = false;
            var oldReference = void 0;
            if (typeof this.pdfDocument !== 'undefined' && (typeof parentXObjects === undefined || parentXObjects == null)) {
                parentXObjects = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]();
                this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.setValue(this.dictionaryProperties.xObject, parentXObjects);
            }
            else if (typeof this.pdfDocument !== 'undefined') {
                var values_1 = parentXObjects.items.values();
                for (var i = 0; i < values_1.length; i++) {
                    if (typeof values_1[i] !== 'undefined' && typeof values_1[i].element !== 'undefined') {
                        if (values_1[i].element.data[0] === arg1.element.data[0]) {
                            oldReference = values_1[i];
                            hasSameImageStream = true;
                        }
                    }
                }
            }
            if (xobjects == null) {
                xobjects = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]();
                this.Dictionary.items.setValue(this.dictionaryProperties.xObject, xobjects);
            }
            if (hasSameImageStream && typeof oldReference !== 'undefined') {
                xobjects.items.setValue(arg2.value, oldReference);
            }
            else {
                var reference = new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](arg1.element);
                xobjects.items.setValue(arg2.value, reference);
                if (typeof this.pdfDocument !== 'undefined') {
                    parentXObjects.items.setValue(arg2.value, reference);
                }
            }
            /* tslint:enable */
        }
    };
    return PdfResources;
}(_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]));

/**
 * Used to create new guid for resources.
 * @private
 */
var Guid = /** @class */ (function () {
    /**
     * Initialize an `instance of GUID` class.
     * @private
     */
    function Guid(stringValue) {
        this.stringValue = stringValue || Guid.getNewGuidString();
    }
    Object.defineProperty(Guid, "randomNumber", {
        /**
         * Generate `Random number` for GUID.
         * @private
         */
        get: function () {
            Guid.guid = Guid.guid + 1;
            Guid.guid = Guid.guid > 999999999999 ? 0 : Guid.guid;
            return Guid.guid;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Return the value of `GUID as string`.
     * @private
     */
    Guid.prototype.toString = function () {
        return this.stringValue;
    };
    /**
     * Generate `new GUID`.
     * @private
     */
    Guid.getNewGuidString = function () {
        var guid = 'abc7def4-ghi9-jkl2-m6n3-';
        var temproaryString = 'opqrstuvwxyz';
        var randomString = Guid.randomNumber.toString();
        randomString = guid + temproaryString.substr(0, (12 - randomString.length)) + randomString;
        return randomString;
    };
    /**
     * static field to store `endding value of current GUID`.
     * @private
     */
    Guid.guid = 0;
    return Guid;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transformation-matrix.js":
/*!**********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transformation-matrix.js ***!
  \**********************************************************************************************************/
/*! exports provided: PdfTransformationMatrix, Matrix */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTransformationMatrix", function() { return PdfTransformationMatrix; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Matrix", function() { return Matrix; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/**
 * PdfTransformationMatrix.ts class for EJ2-PDF
 */


/**
 * Class for representing Root `transformation matrix`.
 */
var PdfTransformationMatrix = /** @class */ (function () {
    function PdfTransformationMatrix(value) {
        /**
         * Value for `angle converting`.
         * @default 180.0 / Math.PI
         * @private
         */
        this.radDegFactor = 180.0 / Math.PI;
        if (typeof value === 'undefined') {
            this.transformationMatrix = new Matrix(1.00, 0.00, 0.00, 1.00, 0.00, 0.00);
        }
        else {
            this.transformationMatrix = new Matrix(1.00, 0.00, 0.00, -1.00, 0.00, 0.00);
        }
    }
    Object.defineProperty(PdfTransformationMatrix.prototype, "matrix", {
        // Properties
        /**
         * Gets or sets the `internal matrix object`.
         * @private
         */
        get: function () {
            return this.transformationMatrix;
        },
        set: function (value) {
            this.transformationMatrix = value;
        },
        enumerable: true,
        configurable: true
    });
    // Public methods
    /**
     * `Translates` coordinates by specified coordinates.
     * @private
     */
    PdfTransformationMatrix.prototype.translate = function (offsetX, offsetY) {
        this.transformationMatrix.translate(offsetX, offsetY);
    };
    /**
     * `Scales` coordinates by specified coordinates.
     * @private
     */
    PdfTransformationMatrix.prototype.scale = function (scaleX, scaleY) {
        this.transformationMatrix.elements[0] = scaleX;
        this.transformationMatrix.elements[3] = scaleY;
    };
    /**
     * `Rotates` coordinate system in counterclockwise direction.
     * @private
     */
    PdfTransformationMatrix.prototype.rotate = function (angle) {
        //Convert from degree to radian 
        angle = (angle * Math.PI) / 180;
        //Rotation 
        this.transformationMatrix.elements[0] = Math.cos(angle);
        this.transformationMatrix.elements[1] = Math.sin(angle);
        this.transformationMatrix.elements[2] = -Math.sin(angle);
        this.transformationMatrix.elements[3] = Math.cos(angle);
    };
    // Overrides
    /**
     * Gets `PDF representation`.
     * @private
     */
    PdfTransformationMatrix.prototype.toString = function () {
        var builder = '';
        var whitespace = ' ';
        for (var i = 0, len = this.transformationMatrix.elements.length; i < len; i++) {
            var temp = this.matrix.elements[i];
            builder += _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(this.transformationMatrix.elements[i]);
            builder += whitespace;
        }
        return builder;
    };
    // Implementation
    /**
     * `Multiplies` matrices (changes coordinate system.)
     * @private
     */
    PdfTransformationMatrix.prototype.multiply = function (matrix) {
        this.transformationMatrix.multiply(matrix.matrix);
    };
    /**
     * Converts `degrees to radians`.
     * @private
     */
    PdfTransformationMatrix.degreesToRadians = function (degreesX) {
        return this.degRadFactor * degreesX;
    };
    /**
     * Converts `radians to degrees`.
     * @private
     */
    PdfTransformationMatrix.prototype.radiansToDegrees = function (radians) {
        return this.radDegFactor * radians;
    };
    /**
     * `Clones` this instance of PdfTransformationMatrix.
     * @private
     */
    PdfTransformationMatrix.prototype.clone = function () {
        return this;
    };
    // Constants
    /**
     * Value for `angle converting`.
     * @default Math.PI / 180.0
     * @private
     */
    PdfTransformationMatrix.degRadFactor = Math.PI / 180.0;
    return PdfTransformationMatrix;
}());

var Matrix = /** @class */ (function () {
    function Matrix(arg1, arg2, arg3, arg4, arg5, arg6) {
        if (typeof arg1 === 'undefined') {
            this.metrixElements = [];
        }
        else if (typeof arg1 === 'number') {
            this.constructor();
            this.metrixElements.push(arg1);
            this.metrixElements.push(arg2);
            this.metrixElements.push(arg3);
            this.metrixElements.push(arg4);
            this.metrixElements.push(arg5);
            this.metrixElements.push(arg6);
        }
        else {
            this.metrixElements = arg1;
        }
    }
    Object.defineProperty(Matrix.prototype, "elements", {
        // Properties
        /**
         * Gets the `elements`.
         * @private
         */
        get: function () {
            return this.metrixElements;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Matrix.prototype, "offsetX", {
        /**
         * Gets the off set `X`.
         * @private
         */
        get: function () {
            return this.metrixElements[4];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Matrix.prototype, "offsetY", {
        /**
         * Gets the off set `Y`.
         * @private
         */
        get: function () {
            return this.metrixElements[5];
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * `Translates` coordinates by specified coordinates.
     * @private
     */
    Matrix.prototype.translate = function (offsetX, offsetY) {
        this.metrixElements[4] = offsetX;
        this.metrixElements[5] = offsetY;
    };
    /**
     * `Translates` the specified offset X.
     * @private
     */
    Matrix.prototype.transform = function (point) {
        var x = point.x;
        var y = point.y;
        var x2 = x * this.elements[0] + y * this.elements[2] + this.offsetX;
        var y2 = x * this.elements[1] + y * this.elements[3] + this.offsetY;
        return new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"](x2, y2);
    };
    /**
     * `Multiplies matrices` (changes coordinate system.)
     * @private
     */
    Matrix.prototype.multiply = function (matrix) {
        var tempMatrix = [];
        tempMatrix.push(this.elements[0] * matrix.elements[0] + this.elements[1] * matrix.elements[2]);
        tempMatrix[1] = (this.elements[0] * matrix.elements[1] + this.elements[1] * matrix.elements[3]);
        tempMatrix[2] = (this.elements[2] * matrix.elements[0] + this.elements[3] * matrix.elements[2]);
        tempMatrix[3] = (this.elements[2] * matrix.elements[1] + this.elements[3] * matrix.elements[3]);
        tempMatrix[4] = (this.offsetX * matrix.elements[0] + this.offsetY * matrix.elements[2] + matrix.offsetX);
        tempMatrix[5] = (this.offsetX * matrix.elements[1] + this.offsetY * matrix.elements[3] + matrix.offsetY);
        for (var i = 0; i < tempMatrix.length; i++) {
            this.elements[i] = tempMatrix[i];
        }
    };
    // IDisposable Members
    /**
     * `Dispose` this instance of PdfTransformationMatrix class.
     * @private
     */
    Matrix.prototype.dispose = function () {
        this.metrixElements = null;
    };
    // ICloneable Members
    /**
     * `Clones` this instance of PdfTransformationMatrix class.
     * @private
     */
    Matrix.prototype.clone = function () {
        var m = new Matrix(this.metrixElements);
        return m;
    };
    return Matrix;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transparency.js":
/*!*************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transparency.js ***!
  \*************************************************************************************************/
/*! exports provided: PdfTransparency */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfTransparency", function() { return PdfTransparency; });
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");




/**
 * Represents a simple `transparency`.
 * @private
 */
var PdfTransparency = /** @class */ (function () {
    // Properties
    // /**
    //  * Gets the `stroke` operation alpha value.
    //  * @private
    //  */
    // public get stroke() : number {
    //     let result : number = this.getNumber(this.dictionaryProperties.CA);
    //     return result;
    // }
    // /**
    //  * Gets the `fill` operation alpha value.
    //  * @private
    //  */
    // public get fill() : number {
    //     let result : number = this.getNumber(this.dictionaryProperties.ca);
    //     return result;
    // }
    // /**
    //  * Gets the `blend mode`.
    //  * @private
    //  */
    // public get mode() : PdfBlendMode {
    //     let result : string = this.getName(this.dictionaryProperties.ca);
    //     return PdfBlendMode.Normal;
    // }
    // Constructors
    /**
     * Initializes a new instance of the `Transparency` class.
     * @private
     */
    function PdfTransparency(stroke, fill, mode) {
        // Fields
        /**
         * Internal variable to store `dictionary`.
         * @default new PdfDictionary()
         * @private
         */
        this.dictionary = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]();
        /**
         * Internal variable for accessing fields from `DictionryProperties` class.
         * @default new DictionaryProperties()
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_3__["DictionaryProperties"]();
        this.dictionary.items.setValue(this.dictionaryProperties.CA, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"](stroke));
        this.dictionary.items.setValue(this.dictionaryProperties.ca, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"](fill));
        this.dictionary.items.setValue(this.dictionaryProperties.BM, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__["PdfName"](mode.toString()));
    }
    Object.defineProperty(PdfTransparency.prototype, "element", {
        // // Implementation
        // /**
        //  * Gets the `number value`.
        //  * @private
        //  */
        // private getNumber(keyName : string) : number {
        //     let result : number = 0.0;
        //     let numb : PdfNumber = this.dictionary.items.getValue(keyName) as PdfNumber;
        //     result = numb.intValue;
        //     return result;
        // }
        // /**
        //  * Gets the `name value`.
        //  * @private
        //  */
        // private getName(keyName : string) : string {
        //     let result : string = null;
        //     let name : PdfName = this.dictionary.items.getValue(keyName) as PdfName;
        //     result = name.value;
        //     return result;
        // }
        // IPdfWrapper Members
        /**
         * Gets the `element`.
         * @private
         */
        get: function () {
            return this.dictionary;
        },
        enumerable: true,
        configurable: true
    });
    return PdfTransparency;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/unit-convertor.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/unit-convertor.js ***!
  \***********************************************************************************************/
/*! exports provided: PdfUnitConverter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfUnitConverter", function() { return PdfUnitConverter; });
/**
 * Used to perform `convertion between pixels and points`.
 * @private
 */
var PdfUnitConverter = /** @class */ (function () {
    //constructors
    /**
     * Initializes a new instance of the `UnitConvertor` class with DPI value.
     * @private
     */
    function PdfUnitConverter(dpi) {
        this.updateProportionsHelper(dpi);
    }
    /**
     * `Converts` the value, from one graphics unit to another graphics unit.
     * @private
     */
    PdfUnitConverter.prototype.convertUnits = function (value, from, to) {
        return this.convertFromPixels(this.convertToPixels(value, from), to);
    };
    /**
     * Converts the value `to pixel` from specified graphics unit.
     * @private
     */
    PdfUnitConverter.prototype.convertToPixels = function (value, from) {
        var index = from;
        var result = (value * this.proportions[index]);
        return result;
    };
    /**
     * Converts value, to specified graphics unit `from Pixel`.
     * @private
     */
    PdfUnitConverter.prototype.convertFromPixels = function (value, to) {
        var index = to;
        var result = (value / this.proportions[index]);
        return result;
    };
    /**
     * `Update proportions` matrix according to Graphics settings.
     * @private
     */
    PdfUnitConverter.prototype.updateProportionsHelper = function (pixelPerInch) {
        this.proportions = [
            pixelPerInch / 2.54,
            pixelPerInch / 6.0,
            1,
            pixelPerInch / 72.0,
            pixelPerInch,
            pixelPerInch / 300.0,
            pixelPerInch / 25.4 // Millimeter
        ];
    };
    //Fields
    /**
     * Indicates default `horizontal resolution`.
     * @default 96
     * @private
     */
    PdfUnitConverter.horizontalResolution = 96;
    /**
     * Indicates default `vertical resolution`.
     * @default 96
     * @private
     */
    PdfUnitConverter.verticalResolution = 96;
    return PdfUnitConverter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/big-endian-writer.js":
/*!******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/big-endian-writer.js ***!
  \******************************************************************************************************/
/*! exports provided: BigEndianWriter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BigEndianWriter", function() { return BigEndianWriter; });
/**
 * Writes data in BigEndian order.
 */
var BigEndianWriter = /** @class */ (function () {
    //Constructors
    /**
     * Creates a new writer.
     */
    function BigEndianWriter(capacity) {
        //Constants
        /**
         * Size of Int32 type.
         */
        this.int32Size = 4;
        /**
         * Size of Int16 type.
         */
        this.int16Size = 2;
        /**
         * Size of long type.
         */
        this.int64Size = 8;
        this.bufferLength = capacity;
        this.buffer = [];
    }
    Object.defineProperty(BigEndianWriter.prototype, "data", {
        //Properties
        /**
         * Gets data written to the writer.
         */
        get: function () {
            if (this.buffer.length < this.bufferLength) {
                var length_1 = this.bufferLength - this.buffer.length;
                for (var i = 0; i < length_1; i++) {
                    this.buffer.push(0);
                }
            }
            return this.buffer;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BigEndianWriter.prototype, "position", {
        /// <summary>
        /// Gets position of the internal buffer.
        /// </summary>
        get: function () {
            if (this.internalPosition === undefined || this.internalPosition === null) {
                this.internalPosition = 0;
            }
            return this.internalPosition;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Writes short value.
     */
    BigEndianWriter.prototype.writeShort = function (value) {
        var bytes = [((value & 0x0000ff00) >> 8), value & 0x000000ff];
        this.flush(bytes);
    };
    /**
     * Writes int value.
     */
    BigEndianWriter.prototype.writeInt = function (value) {
        var i1 = (value & 0xff000000) >> 24;
        i1 = i1 < 0 ? 256 + i1 : i1;
        var i2 = (value & 0x00ff0000) >> 16;
        i2 = i2 < 0 ? 256 + i2 : i2;
        var i3 = (value & 0x0000ff00) >> 8;
        i3 = i3 < 0 ? 256 + i3 : i3;
        var i4 = value & 0x000000ff;
        i4 = i4 < 0 ? 256 + i4 : i4;
        var bytes = [(value & 0xff000000) >> 24, (value & 0x00ff0000) >> 16, (value & 0x0000ff00) >> 8, value & 0x000000ff];
        this.flush(bytes);
    };
    /**
     * Writes u int value.
     */
    BigEndianWriter.prototype.writeUInt = function (value) {
        var buff = [(value & 0xff000000) >> 24, (value & 0x00ff0000) >> 16, (value & 0x0000ff00) >> 8, value & 0x000000ff];
        this.flush(buff);
    };
    /**
     * Writes string value.
     */
    BigEndianWriter.prototype.writeString = function (value) {
        if (value == null) {
            throw new Error('Argument Null Exception : value');
        }
        var bytes = [];
        for (var i = 0; i < value.length; i++) {
            bytes.push(value.charCodeAt(i));
        }
        this.flush(bytes);
    };
    /**
     * Writes byte[] value.
     */
    BigEndianWriter.prototype.writeBytes = function (value) {
        this.flush(value);
    };
    // //Implementation
    BigEndianWriter.prototype.flush = function (buff) {
        if (buff === null) {
            throw new Error('Argument Null Exception : buff');
        }
        var result = [];
        for (var i = 0; i < this.position; i++) {
            result.push(this.buffer[i]);
        }
        for (var i = 0; i < buff.length; i++) {
            result.push(buff[i]);
        }
        for (var i = this.position; i < this.buffer.length; i++) {
            result.push(this.buffer[i]);
        }
        this.buffer = result;
        this.internalPosition += buff.length;
    };
    return BigEndianWriter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/cross-table.js":
/*!************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/cross-table.js ***!
  \************************************************************************************************/
/*! exports provided: ObjectType */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectType", function() { return ObjectType; });
/**
 * public Enum for `ObjectType`.
 * @private
 */
var ObjectType;
(function (ObjectType) {
    /**
     * Specifies the type of `Free`.
     * @private
     */
    ObjectType[ObjectType["Free"] = 0] = "Free";
    /**
     * Specifies the type of `Normal`.
     * @private
     */
    ObjectType[ObjectType["Normal"] = 1] = "Normal";
    /**
     * Specifies the type of `Packed`.
     * @private
     */
    ObjectType[ObjectType["Packed"] = 2] = "Packed";
})(ObjectType || (ObjectType = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/enum.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/enum.js ***!
  \*****************************************************************************************/
/*! exports provided: ObjectStatus */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectStatus", function() { return ObjectStatus; });
/**
 * public Enum for `CompositeFontType`.
 * @private
 */
var ObjectStatus;
(function (ObjectStatus) {
    /**
     * Specifies the type of `None`.
     * @private
     */
    ObjectStatus[ObjectStatus["None"] = 0] = "None";
    /**
     * Specifies the type of `Registered`.
     * @private
     */
    ObjectStatus[ObjectStatus["Registered"] = 1] = "Registered";
})(ObjectStatus || (ObjectStatus = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-cross-table.js":
/*!****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-cross-table.js ***!
  \****************************************************************************************************/
/*! exports provided: PdfCrossTable, RegisteredObject */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfCrossTable", function() { return PdfCrossTable; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RegisteredObject", function() { return RegisteredObject; });
/* harmony import */ var _input_output_enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../input-output/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/enum.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _pdf_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pdf-operators */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js");
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _cross_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cross-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/cross-table.js");
/* harmony import */ var _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../primitives/pdf-stream */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _document_pdf_catalog__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../document/pdf-catalog */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-catalog.js");










/**
 * `PdfCrossTable` is responsible for intermediate level parsing
 * and savingof a PDF document.
 * @private
 */
var PdfCrossTable = /** @class */ (function () {
    function PdfCrossTable() {
        /**
         * The modified `objects` that should be saved.
         * @private
         */
        this.objects = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_4__["Dictionary"]();
        /**
         * Holds `maximal generation number` or offset to object.
         * @default 0
         * @private
         */
        this.maxGenNumIndex = 0;
        /**
         * The `number of the objects`.
         * @default 0
         * @private
         */
        this.objectCount = 0;
        /**
         * Internal variable for accessing fields from `DictionryProperties` class.
         * @default new PdfDictionaryProperties()
         * @private
         */
        this.dictionaryProperties = new _pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__["DictionaryProperties"]();
    }
    Object.defineProperty(PdfCrossTable.prototype, "isMerging", {
        //Properties
        /**
         * Gets or sets if the document `is merged`.
         * @private
         */
        get: function () {
            return this.merging;
        },
        set: function (value) {
            this.merging = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfCrossTable.prototype, "trailer", {
        /**
         * Gets the `trailer`.
         * @private
         */
        get: function () {
            if (this.internalTrailer == null) {
                this.internalTrailer = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_7__["PdfStream"]();
            }
            return this.internalTrailer;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfCrossTable.prototype, "document", {
        /**
         * Gets or sets the main `PdfDocument` class instance.
         * @private
         */
        get: function () {
            return this.pdfDocument;
        },
        set: function (value) {
            this.pdfDocument = value;
            this.items = this.pdfDocument.pdfObjects;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfCrossTable.prototype, "pdfObjects", {
        /**
         * Gets the catched `PDF object` main collection.
         * @private
         */
        get: function () {
            return this.items;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfCrossTable.prototype, "objectCollection", {
        /**
         * Gets the `object collection`.
         * @private
         */
        get: function () {
            return this.pdfDocument.pdfObjects;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfCrossTable.prototype, "count", {
        /**
         * Gets or sets the `number of the objects` within the document.
         * @private
         */
        get: function () {
            return this.objectCount;
        },
        set: function (value) {
            this.objectCount = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfCrossTable.prototype, "nextObjNumber", {
        /**
         * Returns `next available object number`.
         * @private
         */
        get: function () {
            this.count = this.count + 1;
            return this.count;
        },
        enumerable: true,
        configurable: true
    });
    PdfCrossTable.prototype.save = function (writer, filename) {
        this.saveHead(writer);
        var state = false;
        this.mappedReferences = null;
        this.objects.clear();
        this.markTrailerReferences();
        this.saveObjects(writer);
        var saveCount = this.count;
        var xrefPos = writer.position;
        this.registerObject(0, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_5__["PdfReference"](0, -1), true);
        var prevXRef = 0;
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].xref);
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine);
        this.saveSections(writer);
        this.saveTrailer(writer, this.count, prevXRef);
        this.saveTheEndess(writer, xrefPos);
        this.count = saveCount;
        for (var i = 0; i < this.objectCollection.count; ++i) {
            var oi = this.objectCollection.items(i);
            oi.object.isSaving = false;
        }
        if (typeof filename === 'undefined') {
            return writer.stream.buffer;
        }
        else {
            writer.stream.save(filename);
        }
    };
    /**
     * `Saves the endess` of the file.
     * @private
     */
    PdfCrossTable.prototype.saveTheEndess = function (writer, xrefPos) {
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine + _pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].startxref + _pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine);
        writer.write(xrefPos.toString() + _pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine);
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].eof + _pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine);
    };
    /**
     * `Saves the new trailer` dictionary.
     * @private
     */
    PdfCrossTable.prototype.saveTrailer = function (writer, count, prevXRef) {
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].trailer + _pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine);
        // Save the dictionary.
        var trailer = this.trailer;
        trailer.items.setValue(this.dictionaryProperties.size, new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_8__["PdfNumber"](this.objectCount + 1));
        trailer = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_1__["PdfDictionary"](trailer); // Make it real dictionary.
        trailer.setEncrypt(false);
        trailer.save(writer);
    };
    /**
     * `Saves the xref section`.
     * @private
     */
    PdfCrossTable.prototype.saveSections = function (writer) {
        var objectNum = 0;
        var count = 0;
        do {
            count = this.prepareSubsection(objectNum);
            this.saveSubsection(writer, objectNum, count);
            objectNum += count;
        } while (count !== 0);
    };
    /**
     * `Saves a subsection`.
     * @private
     */
    PdfCrossTable.prototype.saveSubsection = function (writer, objectNum, count) {
        if (count <= 0 || objectNum >= this.count) {
            return;
        }
        var subsectionHead = '{0} {1}{2}';
        writer.write(objectNum + ' ' + (count + 1) + _pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine);
        for (var i = objectNum; i <= objectNum + count; ++i) {
            var obj = this.objects.getValue(i);
            var str = '';
            if (obj.type === _cross_table__WEBPACK_IMPORTED_MODULE_6__["ObjectType"].Free) {
                str = this.getItem(obj.offset, 65535, true);
            }
            else {
                str = this.getItem(obj.offset, obj.generation, false);
            }
            writer.write(str);
        }
    };
    /**
     * Generates string for `xref table item`.
     * @private
     */
    PdfCrossTable.prototype.getItem = function (offset, genNumber, isFree) {
        var returnString = '';
        var addOffsetLength = 10 - offset.toString().length;
        if (genNumber <= 0) {
            genNumber = 0;
        }
        var addGenNumberLength = (5 - genNumber.toString().length) <= 0 ? 0 : (5 - genNumber.toString().length);
        for (var index = 0; index < addOffsetLength; index++) {
            returnString = returnString + '0';
        }
        returnString = returnString + offset.toString() + ' ';
        for (var index = 0; index < addGenNumberLength; index++) {
            returnString = returnString + '0';
        }
        returnString = returnString + genNumber.toString() + ' ';
        returnString = returnString + ((isFree) ? _pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].f : _pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].n) + _pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine;
        return returnString;
    };
    /**
     * `Prepares a subsection` of the current section within the cross-reference table.
     * @private
     */
    PdfCrossTable.prototype.prepareSubsection = function (objectNum) {
        var count = 0;
        var i;
        var total = this.count;
        for (var k = 0; k < this.document.pdfObjects.count; k++) {
            var reference = this.document.pdfObjects.items(k).reference;
            var refString = reference.toString();
            var refArray = refString.split(' ');
        }
        if (objectNum >= total) {
            return count;
        }
        // search for first changed indirect object.
        for (i = objectNum; i < total; ++i) {
            break;
        }
        objectNum = i;
        // look up for all indirect objects in one subsection.
        for (; i < total; ++i) {
            ++count;
        }
        return count;
    };
    /**
     * `Marks the trailer references` being saved.
     * @private
     */
    PdfCrossTable.prototype.markTrailerReferences = function () {
        var tempArray;
        var keys = this.trailer.items.keys();
        var values = this.trailer.items.values();
    };
    /**
     * `Saves the head`.
     * @private
     */
    PdfCrossTable.prototype.saveHead = function (writer) {
        var version = this.generateFileVersion(writer.document);
        writer.write('%PDF-' + version);
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine);
    };
    /**
     * Generates the `version` of the file.
     * @private
     */
    PdfCrossTable.prototype.generateFileVersion = function (document) {
        var iVersion = 4;
        var version = '1.' + iVersion.toString();
        return version;
    };
    PdfCrossTable.prototype.getReference = function (obj, bNew) {
        if (typeof bNew === 'undefined') {
            var wasNew = false;
            return this.getReference(obj, wasNew);
        }
        else {
            //code splitted for reducing lines of code exceeds 100.
            return this.getSubReference(obj, bNew);
        }
    };
    /**
     * Retrieves the `reference` of the object given.
     * @private
     */
    PdfCrossTable.prototype.getSubReference = function (obj, bNew) {
        var isNew = false;
        var wasNew;
        var reference = null;
        // if (obj.IsSaving) {
        if (this.items.count > 0 && obj.objectCollectionIndex > 0 && this.items.count > obj.objectCollectionIndex - 1) {
            var tempObj = this.document.pdfObjects.getReference(obj, wasNew);
            reference = tempObj.reference;
            wasNew = tempObj.wasNew;
        }
        if (reference == null) {
            if (obj.status === _input_output_enum__WEBPACK_IMPORTED_MODULE_0__["ObjectStatus"].Registered) {
                wasNew = false;
            }
            else {
                wasNew = true;
            }
        }
        else {
            wasNew = false;
        }
        // need to add mapped reference code
        if (reference == null) {
            var objnumber = this.nextObjNumber;
            reference = new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_5__["PdfReference"](objnumber, 0);
            var found = void 0;
            if (wasNew) {
                this.document.pdfObjects.add(obj);
                this.document.pdfObjects.trySetReference(obj, reference, found);
                var tempIndex = this.document.pdfObjects.count - 1;
                var tempkey = this.document.pdfObjects.objectCollections[tempIndex].reference.objNumber;
                var tempvalue = this.document.pdfObjects.objectCollections[this.document.pdfObjects.count - 1];
                this.document.pdfObjects.mainObjectCollection.setValue(tempkey, tempvalue);
                obj.position = -1;
            }
            else {
                this.document.pdfObjects.trySetReference(obj, reference, found);
            }
            obj.objectCollectionIndex = reference.objNumber;
            obj.status = _input_output_enum__WEBPACK_IMPORTED_MODULE_0__["ObjectStatus"].None;
            isNew = true;
        }
        bNew = isNew || this.bForceNew;
        return reference;
    };
    /**
     * `Saves all objects` in the collection.
     * @private
     */
    PdfCrossTable.prototype.saveObjects = function (writer) {
        var objectCollection = this.objectCollection;
        for (var i = 0; i < objectCollection.count; ++i) {
            var oi = objectCollection.items(i);
            var obj = oi.object;
            obj.isSaving = true;
            this.saveIndirectObject(obj, writer);
        }
    };
    /**
     * `Saves indirect object`.
     * @private
     */
    PdfCrossTable.prototype.saveIndirectObject = function (obj, writer) {
        var reference = this.getReference(obj);
        if (obj instanceof _document_pdf_catalog__WEBPACK_IMPORTED_MODULE_9__["PdfCatalog"]) {
            this.trailer.items.setValue(this.dictionaryProperties.root, reference);
        }
        // NOTE :  This is needed for correct string objects encryption.
        this.pdfDocument.currentSavingObj = reference;
        var tempArchive = false;
        tempArchive = obj.getArchive();
        var allowedType = !((obj instanceof _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_7__["PdfStream"]) || !tempArchive || (obj instanceof _document_pdf_catalog__WEBPACK_IMPORTED_MODULE_9__["PdfCatalog"]));
        var sigFlag = false;
        this.registerObject(writer.position, reference);
        this.doSaveObject(obj, reference, writer);
    };
    /**
     * Performs `real saving` of the save object.
     * @private
     */
    PdfCrossTable.prototype.doSaveObject = function (obj, reference, writer) {
        var correctPosition = writer.length;
        writer.write(reference.objNumber.toString());
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].whiteSpace);
        writer.write(reference.genNumber.toString());
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].whiteSpace);
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].obj);
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine);
        obj.save(writer);
        var stream = writer.stream;
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].endObj);
        writer.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_3__["Operators"].newLine);
    };
    PdfCrossTable.prototype.registerObject = function (offset, reference, free) {
        if (typeof free === 'boolean') {
            // Register the object by its number.
            this.objects.setValue(reference.objNumber, new RegisteredObject(offset, reference, free));
            this.maxGenNumIndex = Math.max(this.maxGenNumIndex, reference.genNumber);
        }
        else if (typeof free === 'undefined') {
            // Register the object by its number.
            this.objects.setValue(reference.objNumber, new RegisteredObject(offset, reference));
            this.maxGenNumIndex = Math.max(this.maxGenNumIndex, reference.genNumber);
        }
    };
    /**
     * `Dereferences` the specified primitive object.
     * @private
     */
    PdfCrossTable.dereference = function (obj) {
        var rh = obj;
        if (rh != null) {
            obj = rh.object;
        }
        return obj;
    };
    return PdfCrossTable;
}());

var RegisteredObject = /** @class */ (function () {
    function RegisteredObject(offset, reference, free) {
        if (typeof free === 'undefined') {
            var tempOffset = offset;
            this.offsetNumber = tempOffset;
            var tempReference = reference;
            this.generation = tempReference.genNumber;
            this.object = tempReference.objNumber;
            this.type = _cross_table__WEBPACK_IMPORTED_MODULE_6__["ObjectType"].Normal;
        }
        else {
            var tempOffset = offset;
            var tempReference = reference;
            this.constructor(tempOffset, tempReference);
            var tempFree = free;
            this.type = _cross_table__WEBPACK_IMPORTED_MODULE_6__["ObjectType"].Free;
        }
    }
    Object.defineProperty(RegisteredObject.prototype, "objectNumber", {
        //Properties
        /**
         * Gets the `object number`.
         * @private
         */
        get: function () {
            return this.object;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RegisteredObject.prototype, "offset", {
        /**
         * Gets the `offset`.
         * @private
         */
        get: function () {
            var result;
            result = this.offsetNumber;
            return result;
        },
        enumerable: true,
        configurable: true
    });
    return RegisteredObject;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js":
/*!**************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js ***!
  \**************************************************************************************************************/
/*! exports provided: DictionaryProperties */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DictionaryProperties", function() { return DictionaryProperties; });
/**
 * dictionaryProperties.ts class for EJ2-PDF
 * PDF dictionary properties.
 * @private
 */
var DictionaryProperties = /** @class */ (function () {
    /**
     * Initialize an instance for `PdfDictionaryProperties` class.
     * @private
     */
    function DictionaryProperties() {
        /**
         * Specifies the value of `Pages`.
         * @private
         */
        this.pages = 'Pages';
        /**
         * Specifies the value of `Kids`.
         * @private
         */
        this.kids = 'Kids';
        /**
         * Specifies the value of `Count`.
         * @private
         */
        this.count = 'Count';
        /**
         * Specifies the value of `Resources`.
         * @private
         */
        this.resources = 'Resources';
        /**
         * Specifies the value of `Type`.
         * @private
         */
        this.type = 'Type';
        /**
         * Specifies the value of `Size`.
         * @private
         */
        this.size = 'Size';
        /**
         * Specifies the value of `MediaBox`.
         * @private
         */
        this.mediaBox = 'MediaBox';
        /**
         * Specifies the value of `Parent`.
         * @private
         */
        this.parent = 'Parent';
        /**
         * Specifies the value of `Root`.
         * @private
         */
        this.root = 'Root';
        /**
         * Specifies the value of `DecodeParms`.
         * @private
         */
        this.decodeParms = 'DecodeParms';
        /**
         * Specifies the value of `Filter`.
         * @private
         */
        this.filter = 'Filter';
        /**
         * Specifies the value of `Font`.
         * @private
         */
        this.font = 'Font';
        /**
         * Specifies the value of `Type1`.
         * @private
         */
        this.type1 = 'Type1';
        /**
         * Specifies the value of `BaseFont`.
         * @private
         */
        this.baseFont = 'BaseFont';
        /**
         * Specifies the value of `Encoding`.
         * @private
         */
        this.encoding = 'Encoding';
        /**
         * Specifies the value of `Subtype`.
         * @private
         */
        this.subtype = 'Subtype';
        /**
         * Specifies the value of `Contents`.
         * @private
         */
        this.contents = 'Contents';
        /**
         * Specifies the value of `ProcSet`.
         * @private
         */
        this.procset = 'ProcSet';
        /**
         * Specifies the value of `ColorSpace`.
         * @private
         */
        this.colorSpace = 'ColorSpace';
        /**
         * Specifies the value of `ExtGState`.
         * @private
         */
        this.extGState = 'ExtGState';
        /**
         * Specifies the value of `Pattern`.
         * @private
         */
        this.pattern = 'Pattern';
        /**
         * Specifies the value of `XObject`.
         * @private
         */
        this.xObject = 'XObject';
        /**
         * Specifies the value of `Length`.
         * @private
         */
        this.length = 'Length';
        /**
         * Specifies the value of `Width`.
         * @private
         */
        this.width = 'Width';
        /**
         * Specifies the value of `Height`.
         * @private
         */
        this.height = 'Height';
        /**
         * Specifies the value of `BitsPerComponent`.
         * @private
         */
        this.bitsPerComponent = 'BitsPerComponent';
        /**
         * Specifies the value of `Image`.
         * @private
         */
        this.image = 'Image';
        /**
         * Specifies the value of `dctdecode`.
         * @private
         */
        this.dctdecode = 'DCTDecode';
        /**
         * Specifies the value of `Columns`.
         * @private
         */
        this.columns = 'Columns';
        /**
         * Specifies the value of `BlackIs1`.
         * @private
         */
        this.blackIs1 = 'BlackIs1';
        /**
         * Specifies the value of `K`.
         * @private
         */
        this.k = 'K';
        /**
         * Specifies the value of `S`.
         * @private
         */
        this.s = 'S';
        /**
         * Specifies the value of `Predictor`.
         * @private
         */
        this.predictor = 'Predictor';
        /**
         * Specifies the value of `DeviceRGB`.
         * @private
         */
        this.deviceRgb = 'DeviceRGB';
        /**
         * Specifies the value of `Next`.
         * @private
         */
        this.next = 'Next';
        /**
         * Specifies the value of `Action`.
         * @private
         */
        this.action = 'Action';
        /**
         * Specifies the value of `Link`.
         * @private
         */
        this.link = 'Link';
        /**
         *
         * Specifies the value of `A`.
         * @private
         */
        this.a = 'A';
        /**
         * Specifies the value of `Annot`.
         * @private
         */
        this.annot = 'Annot';
        /**
         * Specifies the value of `P`.
         * @private
         */
        this.p = 'P';
        /**
         * Specifies the value of `C`.
         * @private
         */
        this.c = 'C';
        /**
         * Specifies the value of `Rect`.
         * @private
         */
        this.rect = 'Rect';
        /**
         * Specifies the value of `URI`.
         * @private
         */
        this.uri = 'URI';
        /**
         * Specifies the value of `Annots`.
         * @private
         */
        this.annots = 'Annots';
        /**
         * Specifies the value of `ca`.
         * @private
         */
        this.ca = 'ca';
        /**
         * Specifies the value of `CA`.
         * @private
         */
        this.CA = 'CA';
        /**
         * Specifies the value of `XYZ`.
         * @private
         */
        this.xyz = 'XYZ';
        /**
         * Specifies the value of `Fit`.
         * @private
         */
        this.fit = 'Fit';
        /**
         * Specifies the value of `Dest`.
         * @private
         */
        this.dest = 'Dest';
        /**
         * Specifies the value of `BM`.
         * @private
         */
        this.BM = 'BM';
        /**
         * Specifies the value of `flatedecode`.
         * @private
         */
        this.flatedecode = 'FlateDecode';
        /**
         * Specifies the value of `Rotate`.
         * @private
         */
        this.rotate = 'Rotate';
        /**
         * Specifies the value of 'bBox'.
         * @private
         */
        this.bBox = 'BBox';
        /**
         * Specifies the value of 'form'.
         * @private
         */
        this.form = 'Form';
        /**
         * Specifies the value of 'w'.
         * @private
         */
        this.w = 'W';
        /**
         * Specifies the value of 'cIDFontType2'.
         * @private
         */
        this.cIDFontType2 = 'CIDFontType2';
        /**
         * Specifies the value of 'cIDToGIDMap'.
         * @private
         */
        this.cIDToGIDMap = 'CIDToGIDMap';
        /**
         * Specifies the value of 'identity'.
         * @private
         */
        this.identity = 'Identity';
        /**
         * Specifies the value of 'dw'.
         * @private
         */
        this.dw = 'DW';
        /**
         * Specifies the value of 'fontDescriptor'.
         * @private
         */
        this.fontDescriptor = 'FontDescriptor';
        /**
         * Specifies the value of 'cIDSystemInfo'.
         * @private
         */
        this.cIDSystemInfo = 'CIDSystemInfo';
        /**
         * Specifies the value of 'fontName'.
         * @private
         */
        this.fontName = 'FontName';
        /**
         * Specifies the value of 'flags'.
         * @private
         */
        this.flags = 'Flags';
        /**
         * Specifies the value of 'fontBBox'.
         * @private
         */
        this.fontBBox = 'FontBBox';
        /**
         * Specifies the value of 'missingWidth'.
         * @private
         */
        this.missingWidth = 'MissingWidth';
        /**
         * Specifies the value of 'stemV'.
         * @private
         */
        this.stemV = 'StemV';
        /**
         * Specifies the value of 'italicAngle'.
         * @private
         */
        this.italicAngle = 'ItalicAngle';
        /**
         * Specifies the value of 'capHeight'.
         * @private
         */
        this.capHeight = 'CapHeight';
        /**
         * Specifies the value of 'ascent'.
         * @private
         */
        this.ascent = 'Ascent';
        /**
         * Specifies the value of 'descent'.
         * @private
         */
        this.descent = 'Descent';
        /**
         * Specifies the value of 'leading'.
         * @private
         */
        this.leading = 'Leading';
        /**
         * Specifies the value of 'avgWidth'.
         * @private
         */
        this.avgWidth = 'AvgWidth';
        /**
         * Specifies the value of 'fontFile2'.
         * @private
         */
        this.fontFile2 = 'FontFile2';
        /**
         * Specifies the value of 'maxWidth'.
         * @private
         */
        this.maxWidth = 'MaxWidth';
        /**
         * Specifies the value of 'xHeight'.
         * @private
         */
        this.xHeight = 'XHeight';
        /**
         * Specifies the value of 'stemH'.
         * @private
         */
        this.stemH = 'StemH';
        /**
         * Specifies the value of 'registry'.
         * @private
         */
        this.registry = 'Registry';
        /**
         * Specifies the value of 'ordering'.
         * @private
         */
        this.ordering = 'Ordering';
        /**
         * Specifies the value of 'supplement'.
         * @private
         */
        this.supplement = 'Supplement';
        /**
         * Specifies the value of 'type0'.
         * @private
         */
        this.type0 = 'Type0';
        /**
         * Specifies the value of 'identityH'.
         * @private
         */
        this.identityH = 'Identity-H';
        /**
         * Specifies the value of 'toUnicode'.
         * @private
         */
        this.toUnicode = 'ToUnicode';
        /**
         * Specifies the value of 'descendantFonts'.
         * @private
         */
        this.descendantFonts = 'DescendantFonts';
        //
    }
    return DictionaryProperties;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-main-object-collection.js":
/*!***************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-main-object-collection.js ***!
  \***************************************************************************************************************/
/*! exports provided: PdfMainObjectCollection, ObjectInfo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfMainObjectCollection", function() { return PdfMainObjectCollection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectInfo", function() { return ObjectInfo; });
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/enum.js");
/**
 * PdfMainObjectCollection.ts class for EJ2-PDF
 */


/**
 * The collection of all `objects` within a PDF document.
 * @private
 */
var PdfMainObjectCollection = /** @class */ (function () {
    function PdfMainObjectCollection() {
        //Fields
        /**
         * The collection of the `indirect objects`.
         * @default []
         * @private
         */
        this.objectCollections = [];
        /**
         * The collection of the `Indirect objects`.
         * @default new Dictionary<number, ObjectInfo>()
         * @private
         */
        this.mainObjectCollection = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
        /**
         * The collection of `primitive objects`.
         * @private
         */
        this.primitiveObjectCollection = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
    }
    Object.defineProperty(PdfMainObjectCollection.prototype, "count", {
        //Properties
        /**
         * Gets the `count`.
         * @private
         */
        get: function () {
            return this.objectCollections.length;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Gets the value of `ObjectInfo` from object collection.
     * @private
     */
    PdfMainObjectCollection.prototype.items = function (index) {
        return this.objectCollections[index];
    };
    Object.defineProperty(PdfMainObjectCollection.prototype, "outIsNew", {
        //Methods
        /**
         * Specifies the value of `IsNew`.
         * @private
         */
        get: function () {
            return this.isNew;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Adds` the specified element.
     * @private
     */
    PdfMainObjectCollection.prototype.add = function (element) {
        var objInfo = new ObjectInfo(element);
        this.objectCollections.push(objInfo);
        if (!this.primitiveObjectCollection.containsKey(element)) {
            this.primitiveObjectCollection.setValue(element, this.objectCollections.length - 1);
        }
        element.position = this.index = this.objectCollections.length - 1;
        element.status = _enum__WEBPACK_IMPORTED_MODULE_1__["ObjectStatus"].Registered;
    };
    /**
     * `Looks` through the collection for the object specified.
     * @private
     */
    PdfMainObjectCollection.prototype.lookFor = function (obj) {
        var index = -1;
        if (obj.position !== -1) {
            return obj.position;
        }
        if (this.primitiveObjectCollection.containsKey(obj) && this.count === this.primitiveObjectCollection.size()) {
            index = this.primitiveObjectCollection.getValue(obj);
        }
        else {
            for (var i = this.count - 1; i >= 0; i--) {
                var oi = this.objectCollections[i];
                if (oi.object === obj) {
                    index = i;
                    break;
                }
            }
        }
        return index;
    };
    /**
     * Gets the `reference of the object`.
     * @private
     */
    PdfMainObjectCollection.prototype.getReference = function (index, isNew) {
        this.index = this.lookFor(index);
        var reference;
        this.isNew = false;
        var oi = this.objectCollections[this.index];
        reference = oi.reference;
        var obj = { reference: reference, wasNew: isNew };
        return obj;
    };
    /**
     * Tries to set the `reference to the object`.
     * @private
     */
    PdfMainObjectCollection.prototype.trySetReference = function (obj, reference, found) {
        var result = true;
        found = true;
        this.index = this.lookFor(obj);
        var oi = this.objectCollections[this.index];
        oi.setReference(reference);
        return result;
    };
    PdfMainObjectCollection.prototype.destroy = function () {
        for (var _i = 0, _a = this.objectCollections; _i < _a.length; _i++) {
            var obj = _a[_i];
            if (obj !== undefined) {
                obj.pdfObject.position = -1;
                obj.pdfObject.isSaving = undefined;
                obj.pdfObject.objectCollectionIndex = undefined;
                obj.pdfObject.position = undefined;
            }
        }
        this.objectCollections = [];
        this.mainObjectCollection = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
        this.primitiveObjectCollection = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
    };
    return PdfMainObjectCollection;
}());

var ObjectInfo = /** @class */ (function () {
    function ObjectInfo(obj, reference) {
        this.pdfObject = obj;
        this.pdfReference = reference;
    }
    Object.defineProperty(ObjectInfo.prototype, "object", {
        //Properties
        /**
         * Gets the `object`.
         * @private
         */
        get: function () {
            return this.pdfObject;
        },
        set: function (value) {
            this.pdfObject = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ObjectInfo.prototype, "reference", {
        /**
         * Gets the `reference`.
         * @private
         */
        get: function () {
            return this.pdfReference;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Sets the `reference`.
     * @private
     */
    ObjectInfo.prototype.setReference = function (reference) {
        this.pdfReference = reference;
    };
    return ObjectInfo;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js":
/*!**************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js ***!
  \**************************************************************************************************/
/*! exports provided: Operators */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Operators", function() { return Operators; });
/**
 * PdfOperators.ts class for EJ2-PDF
 * Class of string PDF common operators.
 * @private
 */
var Operators = /** @class */ (function () {
    /**
     * Create an instance of `PdfOperator` class.
     * @private
     */
    function Operators() {
        /**
         * Specifies the value of `test`.
         * @private
         */
        this.forTest = 'test';
        this.forTest = Operators.obj;
    }
    /**
     * Specifies the value of `obj`.
     * @private
     */
    Operators.obj = 'obj';
    /**
     * Specifies the value of `endObj`.
     * @private
     */
    Operators.endObj = 'endobj';
    /**
     * Specifies the value of `R`.
     * @private
     */
    Operators.r = 'R';
    /**
     * Specifies the value of ` `.
     * @private
     */
    Operators.whiteSpace = ' ';
    /**
     * Specifies the value of `/`.
     * @private
     */
    Operators.slash = '/';
    /**
     * Specifies the value of `\r\n`.
     * @private
     */
    Operators.newLine = '\r\n';
    /**
     * Specifies the value of `stream`.
     * @private
     */
    Operators.stream = 'stream';
    /**
     * Specifies the value of `endStream`.
     * @private
     */
    Operators.endStream = 'endstream';
    /**
     * Specifies the value of `xref`.
     * @private
     */
    Operators.xref = 'xref';
    /**
     * Specifies the value of `f`.
     * @private
     */
    Operators.f = 'f';
    /**
     * Specifies the value of `n`.
     * @private
     */
    Operators.n = 'n';
    /**
     * Specifies the value of `trailer`.
     * @private
     */
    Operators.trailer = 'trailer';
    /**
     * Specifies the value of `startxref`.
     * @private
     */
    Operators.startxref = 'startxref';
    /**
     * Specifies the value of `eof`.
     * @private
     */
    Operators.eof = '%%EOF';
    /**
     * Specifies the value of `header`.
     * @private
     */
    Operators.header = '%PDF-1.5';
    /**
     * Specifies the value of `beginText`.
     * @private
     */
    Operators.beginText = 'BT';
    /**
     * Specifies the value of `endText`.
     * @private
     */
    Operators.endText = 'ET';
    /**
     * Specifies the value of `m`.
     * @private
     */
    Operators.beginPath = 'm';
    /**
     * Specifies the value of `l`.
     * @private
     */
    Operators.appendLineSegment = 'l';
    /**
     * Specifies the value of `S`.
     * @private
     */
    Operators.stroke = 'S';
    /**
     * Specifies the value of `f`.
     * @private
     */
    Operators.fill = 'f';
    /**
     * Specifies the value of `f*`.
     * @private
     */
    Operators.fillEvenOdd = 'f*';
    /**
     * Specifies the value of `B`.
     * @private
     */
    Operators.fillStroke = 'B';
    /**
     * Specifies the value of `B*`.
     * @private
     */
    Operators.fillStrokeEvenOdd = 'B*';
    /**
     * Specifies the value of `c`.
     * @private
     */
    Operators.appendbeziercurve = 'c';
    /**
     * Specifies the value of `re`.
     * @private
     */
    Operators.appendRectangle = 're';
    /**
     * Specifies the value of `q`.
     * @private
     */
    Operators.saveState = 'q';
    /**
     * Specifies the value of `Q`.
     * @private
     */
    Operators.restoreState = 'Q';
    /**
     * Specifies the value of `Do`.
     * @private
     */
    Operators.paintXObject = 'Do';
    /**
     * Specifies the value of `cm`.
     * @private
     */
    Operators.modifyCtm = 'cm';
    /**
     * Specifies the value of `Tm`.
     * @private
     */
    Operators.modifyTM = 'Tm';
    /**
     * Specifies the value of `w`.
     * @private
     */
    Operators.setLineWidth = 'w';
    /**
     * Specifies the value of `J`.
     * @private
     */
    Operators.setLineCapStyle = 'J';
    /**
     * Specifies the value of `j`.
     * @private
     */
    Operators.setLineJoinStyle = 'j';
    /**
     * Specifies the value of `d`.
     * @private
     */
    Operators.setDashPattern = 'd';
    /**
     * Specifies the value of `i`.
     * @private
     */
    Operators.setFlatnessTolerance = 'i';
    /**
     * Specifies the value of `h`.
     * @private
     */
    Operators.closePath = 'h';
    /**
     * Specifies the value of `s`.
     * @private
     */
    Operators.closeStrokePath = 's';
    /**
     * Specifies the value of `b`.
     * @private
     */
    Operators.closeFillStrokePath = 'b';
    /**
     * Specifies the value of `setCharacterSpace`.
     * @private
     */
    Operators.setCharacterSpace = 'Tc';
    /**
     * Specifies the value of `setWordSpace`.
     * @private
     */
    Operators.setWordSpace = 'Tw';
    /**
     * Specifies the value of `setHorizontalScaling`.
     * @private
     */
    Operators.setHorizontalScaling = 'Tz';
    /**
     * Specifies the value of `setTextLeading`.
     * @private
     */
    Operators.setTextLeading = 'TL';
    /**
     * Specifies the value of `setFont`.
     * @private
     */
    Operators.setFont = 'Tf';
    /**
     * Specifies the value of `setRenderingMode`.
     * @private
     */
    Operators.setRenderingMode = 'Tr';
    /**
     * Specifies the value of `setTextRise`.
     * @private
     */
    Operators.setTextRise = 'Ts';
    /**
     * Specifies the value of `setTextScaling`.
     * @private
     */
    Operators.setTextScaling = 'Tz';
    /**
     * Specifies the value of `setCoords`.
     * @private
     */
    Operators.setCoords = 'Td';
    /**
     * Specifies the value of `goToNextLine`.
     * @private
     */
    Operators.goToNextLine = 'T*';
    /**
     * Specifies the value of `setText`.
     * @private
     */
    Operators.setText = 'Tj';
    /**
     * Specifies the value of `setTextWithFormatting`.
     * @private
     */
    Operators.setTextWithFormatting = 'TJ';
    /**
     * Specifies the value of `setTextOnNewLine`.
     * @private
     */
    Operators.setTextOnNewLine = '\'';
    /**
     * Specifies the value of `selectcolorspaceforstroking`.
     * @private
     */
    Operators.selectcolorspaceforstroking = 'CS';
    /**
     * Specifies the value of `selectcolorspacefornonstroking`.
     * @private
     */
    Operators.selectcolorspacefornonstroking = 'cs';
    /**
     * Specifies the value of `setrbgcolorforstroking`.
     * @private
     */
    Operators.setrbgcolorforstroking = 'RG';
    /**
     * Specifies the value of `setrbgcolorfornonstroking`.
     * @private
     */
    Operators.setrbgcolorfornonstroking = 'rg';
    /**
     * Specifies the value of `K`.
     * @private
     */
    Operators.setcmykcolorforstroking = 'K';
    /**
     * Specifies the value of `k`.
     * @private
     */
    Operators.setcmykcolorfornonstroking = 'k';
    /**
     * Specifies the value of `G`.
     * @private
     */
    Operators.setgraycolorforstroking = 'G';
    /**
     * Specifies the value of `g`.
     * @private
     */
    Operators.setgraycolorfornonstroking = 'g';
    /**
     * Specifies the value of `W`.
     * @private
     */
    Operators.clipPath = 'W';
    /**
     * Specifies the value of `clipPathEvenOdd`.
     * @private
     */
    Operators.clipPathEvenOdd = 'W*';
    /**
     * Specifies the value of `n`.
     * @private
     */
    Operators.endPath = 'n';
    /**
     * Specifies the value of `setGraphicsState`.
     * @private
     */
    Operators.setGraphicsState = 'gs';
    /**
     * Specifies the value of `%`.
     * @private
     */
    Operators.comment = '%';
    /**
     * Specifies the value of `*`.
     * @private
     */
    Operators.evenOdd = '*';
    /**
     * Specifies the value of `M`.
     * @private
     */
    Operators.setMiterLimit = 'M';
    return Operators;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-stream-writer.js":
/*!******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-stream-writer.js ***!
  \******************************************************************************************************/
/*! exports provided: PdfStreamWriter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfStreamWriter", function() { return PdfStreamWriter; });
/* harmony import */ var _pdf_operators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-operators */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../primitives/pdf-string */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");





/**
 * Helper class to `write PDF graphic streams` easily.
 * @private
 */
var PdfStreamWriter = /** @class */ (function () {
    /**
     * Initialize an instance of `PdfStreamWriter` class.
     * @private
     */
    function PdfStreamWriter(stream) {
        if (stream == null) {
            throw new Error('ArgumentNullException:stream');
        }
        this.stream = stream;
    }
    //Implementation
    /**
     * `Clear` the stream.
     * @public
     */
    PdfStreamWriter.prototype.clear = function () {
        this.stream.clearStream();
    };
    PdfStreamWriter.prototype.setGraphicsState = function (dictionaryName) {
        if (dictionaryName instanceof _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_4__["PdfName"]) {
            this.stream.write(dictionaryName.toString());
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setGraphicsState);
        }
        else {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].slash);
            this.stream.write(dictionaryName);
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setGraphicsState);
        }
    };
    /**
     * `Executes the XObject`.
     * @private
     */
    PdfStreamWriter.prototype.executeObject = function (name) {
        this.stream.write(name.toString());
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].paintXObject);
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
    };
    /**
     * `Closes path object`.
     * @private
     */
    PdfStreamWriter.prototype.closePath = function () {
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].closePath);
    };
    /**
     * `Clips the path`.
     * @private
     */
    PdfStreamWriter.prototype.clipPath = function (useEvenOddRule) {
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].clipPath);
        if (useEvenOddRule) {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].evenOdd);
        }
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].endPath);
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
    };
    /**
     * `Closes, then fills and strokes the path`.
     * @private
     */
    PdfStreamWriter.prototype.closeFillStrokePath = function (useEvenOddRule) {
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].closeFillStrokePath);
        if (useEvenOddRule) {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].evenOdd);
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
        else {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
    };
    /**
     * `Fills and strokes path`.
     * @private
     */
    PdfStreamWriter.prototype.fillStrokePath = function (useEvenOddRule) {
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].fillStroke);
        if (useEvenOddRule) {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].evenOdd);
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
        else {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
    };
    /**
     * `Fills path`.
     * @private
     */
    PdfStreamWriter.prototype.fillPath = function (useEvenOddRule) {
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].fill);
        if (useEvenOddRule) {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].evenOdd);
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
        else {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
    };
    /**
     * `Ends the path`.
     * @private
     */
    PdfStreamWriter.prototype.endPath = function () {
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].n);
    };
    /**
     * `Closes and fills the path`.
     * @private
     */
    PdfStreamWriter.prototype.closeFillPath = function (useEvenOddRule) {
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].closePath);
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].fill);
        if (useEvenOddRule) {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].evenOdd);
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
        else {
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
    };
    /**
     * `Closes and strokes the path`.
     * @private
     */
    PdfStreamWriter.prototype.closeStrokePath = function () {
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].closeStrokePath);
    };
    /**
     * `Sets the text scaling`.
     * @private
     */
    PdfStreamWriter.prototype.setTextScaling = function (textScaling) {
        this.stream.write(_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(textScaling));
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setTextScaling);
    };
    /**
     * `Strokes path`.
     * @private
     */
    PdfStreamWriter.prototype.strokePath = function () {
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].stroke);
    };
    /**
     * `Restores` the graphics state.
     * @private
     */
    PdfStreamWriter.prototype.restoreGraphicsState = function () {
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].restoreState);
    };
    /**
     * `Saves` the graphics state.
     * @private
     */
    PdfStreamWriter.prototype.saveGraphicsState = function () {
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].saveState);
    };
    PdfStreamWriter.prototype.startNextLine = function (arg1, arg2) {
        if (typeof arg1 === 'undefined') {
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].goToNextLine);
        }
        else if (arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"]) {
            this.writePoint(arg1);
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setCoords);
        }
        else {
            this.writePoint(arg1, arg2);
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setCoords);
        }
    };
    /**
     * Shows the `text`.
     * @private
     */
    PdfStreamWriter.prototype.showText = function (text) {
        this.checkTextParam(text);
        this.writeText(text);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setText);
    };
    /**
     * Sets `text leading`.
     * @private
     */
    PdfStreamWriter.prototype.setLeading = function (leading) {
        this.stream.write(_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(leading));
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setTextLeading);
    };
    /**
     * `Begins the path`.
     * @private
     */
    PdfStreamWriter.prototype.beginPath = function (x, y) {
        this.writePoint(x, y);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].beginPath);
    };
    /**
     * `Begins text`.
     * @private
     */
    PdfStreamWriter.prototype.beginText = function () {
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].beginText);
    };
    /**
     * `Ends text`.
     * @private
     */
    PdfStreamWriter.prototype.endText = function () {
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].endText);
    };
    PdfStreamWriter.prototype.appendRectangle = function (arg1, arg2, arg3, arg4) {
        if (arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"]) {
            this.appendRectangle(arg1.x, arg1.y, arg1.width, arg1.height);
        }
        else {
            this.writePoint(arg1, arg2);
            this.writePoint(arg3, arg4);
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].appendRectangle);
        }
    };
    PdfStreamWriter.prototype.appendLineSegment = function (arg1, arg2) {
        if (arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"]) {
            this.appendLineSegment(arg1.x, arg1.y);
        }
        else {
            this.writePoint(arg1, arg2);
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].appendLineSegment);
        }
    };
    /**
     * Sets the `text rendering mode`.
     * @private
     */
    PdfStreamWriter.prototype.setTextRenderingMode = function (renderingMode) {
        this.stream.write(renderingMode.toString());
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setRenderingMode);
    };
    /**
     * Sets the `character spacing`.
     * @private
     */
    PdfStreamWriter.prototype.setCharacterSpacing = function (charSpacing) {
        this.stream.write(_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(charSpacing));
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setCharacterSpace);
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
    };
    /**
     * Sets the `word spacing`.
     * @private
     */
    PdfStreamWriter.prototype.setWordSpacing = function (wordSpacing) {
        this.stream.write(_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(wordSpacing));
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setWordSpace);
    };
    PdfStreamWriter.prototype.showNextLineText = function (arg1, arg2) {
        if (arg1 instanceof _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_3__["PdfString"]) {
            this.checkTextParam(arg1);
            this.writeText(arg1);
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setTextOnNewLine);
        }
        else {
            this.checkTextParam(arg1);
            this.writeText(arg1, arg2);
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setTextOnNewLine);
        }
    };
    PdfStreamWriter.prototype.setColorSpace = function (arg1, arg2) {
        if (arg1 instanceof _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_4__["PdfName"] && typeof arg2 === 'boolean') {
            var temparg1 = arg1;
            var temparg2 = arg2;
            // if (temparg1 == null) {
            //     throw new Error('ArgumentNullException:name');
            // }
            var op = (temparg2) ? _pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].selectcolorspaceforstroking : _pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].selectcolorspacefornonstroking;
            this.stream.write(temparg1.toString());
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
            this.stream.write(op);
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
        else {
            var temparg1 = arg1;
            var temparg2 = arg2;
            this.setColorSpace(new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_4__["PdfName"](temparg1), temparg2);
        }
    };
    /**
     * Modifies current `transformation matrix`.
     * @private
     */
    PdfStreamWriter.prototype.modifyCtm = function (matrix) {
        if (matrix == null) {
            throw new Error('ArgumentNullException:matrix');
        }
        this.stream.write(matrix.toString());
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].modifyCtm);
    };
    PdfStreamWriter.prototype.setFont = function (font, name, size) {
        if (typeof name === 'string') {
            this.setFont(font, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_4__["PdfName"](name), size);
        }
        else {
            if (font == null) {
                throw new Error('ArgumentNullException:font');
            }
            this.stream.write(name.toString());
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
            this.stream.write(_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(size));
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
            this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setFont);
        }
    };
    /**
     * `Writes the operator`.
     * @private
     */
    PdfStreamWriter.prototype.writeOperator = function (opcode) {
        this.stream.write(opcode);
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
    };
    PdfStreamWriter.prototype.checkTextParam = function (text) {
        if (text == null) {
            throw new Error('ArgumentNullException:text');
        }
        if (typeof text === 'string' && text === '') {
            throw new Error('ArgumentException:The text can not be an empty string, text');
        }
    };
    PdfStreamWriter.prototype.writeText = function (arg1, arg2) {
        if ((arg1 instanceof _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_3__["PdfString"]) && (typeof arg2 === 'undefined')) {
            this.stream.write(arg1.pdfEncode());
        }
        else {
            var start = void 0;
            var end = void 0;
            if (arg2) {
                start = _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_3__["PdfString"].hexStringMark[0];
                end = _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_3__["PdfString"].hexStringMark[1];
            }
            else {
                start = _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_3__["PdfString"].stringMark[0];
                end = _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_3__["PdfString"].stringMark[1];
            }
            this.stream.write(start);
            this.stream.write(arg1);
            this.stream.write(end);
        }
    };
    PdfStreamWriter.prototype.writePoint = function (arg1, arg2) {
        if ((arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"]) && (typeof arg2 === 'undefined')) {
            this.writePoint(arg1.x, arg1.y);
        }
        else {
            var temparg1 = arg1;
            this.stream.write(_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(temparg1));
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
            // NOTE: Change Y co-ordinate because we shifted co-ordinate system only.
            arg2 = this.updateY(arg2);
            this.stream.write(_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(arg2));
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        }
    };
    /**
     * `Updates y` co-ordinate.
     * @private
     */
    PdfStreamWriter.prototype.updateY = function (arg) {
        return -arg;
    };
    /**
     * `Writes string` to the file.
     * @private
     */
    PdfStreamWriter.prototype.write = function (string) {
        var builder = '';
        builder += string;
        builder += _pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine;
        this.writeOperator(builder);
    };
    /**
     * `Writes comment` to the file.
     * @private
     */
    PdfStreamWriter.prototype.writeComment = function (comment) {
        if (comment != null && comment.length > 0) {
            var builder = '';
            builder += _pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].comment;
            builder += _pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace;
            builder += comment;
            //builder.Append( Operators.NewLine );
            this.writeOperator(builder);
        }
        else {
            throw new Error('Invalid comment');
        }
    };
    /**
     * Sets the `color and space`.
     * @private
     */
    PdfStreamWriter.prototype.setColorAndSpace = function (color, colorSpace, forStroking) {
        if (!color.isEmpty) {
            // bool test = color is PdfExtendedColor;
            this.stream.write(color.toString(colorSpace, forStroking));
            this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
        }
    };
    // public setLineDashPattern(pattern : number[], patternOffset : number) : void
    // {
    //     let pat : PdfArray = new PdfArray(pattern);
    //     let off : PdfNumber = new PdfNumber(patternOffset);
    //     this.setLineDashPatternHelper(pat, off);
    // }
    // private setLineDashPatternHelper(pattern : PdfArray, patternOffset : PdfNumber) : void
    // {
    //     pattern.Save(this);
    //     this.m_stream.write(Operators.whiteSpace);
    //     patternOffset.Save(this);
    //     this.m_stream.write(Operators.whiteSpace);
    //     this.writeOperator(Operators.setDashPattern);
    // }
    /**
     * Sets the `line dash pattern`.
     * @private
     */
    PdfStreamWriter.prototype.setLineDashPattern = function (pattern, patternOffset) {
        // let pat : PdfArray = new PdfArray(pattern);
        // let off : PdfNumber = new PdfNumber(patternOffset);
        // this.setLineDashPatternHelper(pat, off);
        this.setLineDashPatternHelper(pattern, patternOffset);
    };
    /**
     * Sets the `line dash pattern`.
     * @private
     */
    PdfStreamWriter.prototype.setLineDashPatternHelper = function (pattern, patternOffset) {
        var tempPattern = '[';
        if (pattern.length > 1) {
            for (var index = 0; index < pattern.length; index++) {
                if (index === pattern.length - 1) {
                    tempPattern += pattern[index].toString();
                }
                else {
                    tempPattern += pattern[index].toString() + ' ';
                }
            }
        }
        tempPattern += '] ';
        tempPattern += patternOffset.toString();
        tempPattern += ' ' + _pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setDashPattern;
        this.stream.write(tempPattern);
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].newLine);
    };
    /**
     * Sets the `miter limit`.
     * @private
     */
    PdfStreamWriter.prototype.setMiterLimit = function (miterLimit) {
        this.stream.write(_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(miterLimit));
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setMiterLimit);
    };
    /**
     * Sets the `width of the line`.
     * @private
     */
    PdfStreamWriter.prototype.setLineWidth = function (width) {
        this.stream.write(_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"].floatToString(width));
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setLineWidth);
    };
    /**
     * Sets the `line cap`.
     * @private
     */
    PdfStreamWriter.prototype.setLineCap = function (lineCapStyle) {
        this.stream.write((lineCapStyle).toString());
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setLineCapStyle);
    };
    /**
     * Sets the `line join`.
     * @private
     */
    PdfStreamWriter.prototype.setLineJoin = function (lineJoinStyle) {
        this.stream.write((lineJoinStyle).toString());
        this.stream.write(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].whiteSpace);
        this.writeOperator(_pdf_operators__WEBPACK_IMPORTED_MODULE_0__["Operators"].setLineJoinStyle);
    };
    Object.defineProperty(PdfStreamWriter.prototype, "position", {
        //IPdfWriter members
        /**
         * Gets or sets the current `position` within the stream.
         * @private
         */
        get: function () {
            return this.stream.position;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStreamWriter.prototype, "length", {
        /**
         * Gets `stream length`.
         * @private
         */
        get: function () {
            var returnValue = 0;
            if (this.stream.data.length !== 0 && this.stream.data.length !== -1) {
                for (var index = 0; index < this.stream.data.length; index++) {
                    returnValue += this.stream.data[index].length;
                }
            }
            return returnValue;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStreamWriter.prototype, "document", {
        /**
         * Gets and Sets the `current document`.
         * @private
         */
        get: function () {
            return null;
        },
        enumerable: true,
        configurable: true
    });
    return PdfStreamWriter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-writer.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-writer.js ***!
  \***********************************************************************************************/
/*! exports provided: PdfWriter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfWriter", function() { return PdfWriter; });
/**
 * Used to `write a string` into output file.
 * @private
 */
var PdfWriter = /** @class */ (function () {
    /**
     * Initialize an instance of `PdfWriter` class.
     * @private
     */
    function PdfWriter(stream) {
        this.streamWriter = stream;
    }
    Object.defineProperty(PdfWriter.prototype, "document", {
        //properties
        /**
         * Gets and Sets the `document`.
         * @private
         */
        get: function () {
            return this.pdfDocument;
        },
        set: function (value) {
            this.pdfDocument = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfWriter.prototype, "position", {
        /**
         * Gets the `position`.
         * @private
         */
        get: function () {
            return this.streamWriter.buffer.size;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfWriter.prototype, "length", {
        /**
         * Gets  the `length` of the stream'.
         * @private
         */
        get: function () {
            return this.streamWriter.buffer.size;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfWriter.prototype, "stream", {
        /**
         * Gets the `stream`.
         * @private
         */
        get: function () {
            var result = this.streamWriter;
            return result;
        },
        enumerable: true,
        configurable: true
    });
    //public Methods
    /**
     * `Writes the specified data`.
     * @private
     */
    PdfWriter.prototype.write = function (overload) {
        var data = [];
        var tempOverload = overload;
        this.streamWriter.write(tempOverload);
    };
    return PdfWriter;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js ***!
  \**********************************************************************************/
/*! exports provided: PdfPageOrientation, PdfPageRotateAngle, PdfNumberStyle, PdfDockStyle, PdfAlignmentStyle, TemplateType */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageOrientation", function() { return PdfPageOrientation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageRotateAngle", function() { return PdfPageRotateAngle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfNumberStyle", function() { return PdfNumberStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDockStyle", function() { return PdfDockStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfAlignmentStyle", function() { return PdfAlignmentStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateType", function() { return TemplateType; });
/**
 * public Enum for `PdfPageOrientation`.
 * @private
 */
var PdfPageOrientation;
(function (PdfPageOrientation) {
    /**
     * Specifies the type of `Portrait`.
     * @private
     */
    PdfPageOrientation[PdfPageOrientation["Portrait"] = 0] = "Portrait";
    /**
     * Specifies the type of `Landscape`.
     * @private
     */
    PdfPageOrientation[PdfPageOrientation["Landscape"] = 1] = "Landscape";
})(PdfPageOrientation || (PdfPageOrientation = {}));
/**
 * public Enum for `PdfPageRotateAngle`.
 * @private
 */
var PdfPageRotateAngle;
(function (PdfPageRotateAngle) {
    /**
     * Specifies the type of `RotateAngle0`.
     * @private
     */
    PdfPageRotateAngle[PdfPageRotateAngle["RotateAngle0"] = 0] = "RotateAngle0";
    /**
     * Specifies the type of `RotateAngle90`.
     * @private
     */
    PdfPageRotateAngle[PdfPageRotateAngle["RotateAngle90"] = 1] = "RotateAngle90";
    /**
     * Specifies the type of `RotateAngle180`.
     * @private
     */
    PdfPageRotateAngle[PdfPageRotateAngle["RotateAngle180"] = 2] = "RotateAngle180";
    /**
     * Specifies the type of `RotateAngle270`.
     * @private
     */
    PdfPageRotateAngle[PdfPageRotateAngle["RotateAngle270"] = 3] = "RotateAngle270";
})(PdfPageRotateAngle || (PdfPageRotateAngle = {}));
/**
 * public Enum for `PdfNumberStyle`.
 * @private
 */
var PdfNumberStyle;
(function (PdfNumberStyle) {
    /**
     * Specifies the type of `None`.
     * @private
     */
    PdfNumberStyle[PdfNumberStyle["None"] = 0] = "None";
    /**
     * Specifies the type of `Numeric`.
     * @private
     */
    PdfNumberStyle[PdfNumberStyle["Numeric"] = 1] = "Numeric";
    /**
     * Specifies the type of `LowerLatin`.
     * @private
     */
    PdfNumberStyle[PdfNumberStyle["LowerLatin"] = 2] = "LowerLatin";
    /**
     * Specifies the type of `LowerRoman`.
     * @private
     */
    PdfNumberStyle[PdfNumberStyle["LowerRoman"] = 3] = "LowerRoman";
    /**
     * Specifies the type of `UpperLatin`.
     * @private
     */
    PdfNumberStyle[PdfNumberStyle["UpperLatin"] = 4] = "UpperLatin";
    /**
     * Specifies the type of `UpperRoman`.
     * @private
     */
    PdfNumberStyle[PdfNumberStyle["UpperRoman"] = 5] = "UpperRoman";
})(PdfNumberStyle || (PdfNumberStyle = {}));
/**
 * public Enum for `PdfDockStyle`.
 * @private
 */
var PdfDockStyle;
(function (PdfDockStyle) {
    /**
     * Specifies the type of `None`.
     * @private
     */
    PdfDockStyle[PdfDockStyle["None"] = 0] = "None";
    /**
     * Specifies the type of `Bottom`.
     * @private
     */
    PdfDockStyle[PdfDockStyle["Bottom"] = 1] = "Bottom";
    /**
     * Specifies the type of `Top`.
     * @private
     */
    PdfDockStyle[PdfDockStyle["Top"] = 2] = "Top";
    /**
     * Specifies the type of `Left`.
     * @private
     */
    PdfDockStyle[PdfDockStyle["Left"] = 3] = "Left";
    /**
     * Specifies the type of `Right`.
     * @private
     */
    PdfDockStyle[PdfDockStyle["Right"] = 4] = "Right";
    /**
     * Specifies the type of `Fill`.
     * @private
     */
    PdfDockStyle[PdfDockStyle["Fill"] = 5] = "Fill";
})(PdfDockStyle || (PdfDockStyle = {}));
/**
 * public Enum for `PdfAlignmentStyle`.
 * @private
 */
var PdfAlignmentStyle;
(function (PdfAlignmentStyle) {
    /**
     * Specifies the type of `None`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["None"] = 0] = "None";
    /**
     * Specifies the type of `TopLeft`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["TopLeft"] = 1] = "TopLeft";
    /**
     * Specifies the type of `TopCenter`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["TopCenter"] = 2] = "TopCenter";
    /**
     * Specifies the type of `TopRight`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["TopRight"] = 3] = "TopRight";
    /**
     * Specifies the type of `MiddleLeft`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["MiddleLeft"] = 4] = "MiddleLeft";
    /**
     * Specifies the type of `MiddleCenter`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["MiddleCenter"] = 5] = "MiddleCenter";
    /**
     * Specifies the type of `MiddleRight`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["MiddleRight"] = 6] = "MiddleRight";
    /**
     * Specifies the type of `BottomLeft`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["BottomLeft"] = 7] = "BottomLeft";
    /**
     * Specifies the type of `BottomCenter`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["BottomCenter"] = 8] = "BottomCenter";
    /**
     * Specifies the type of `BottomRight`.
     * @private
     */
    PdfAlignmentStyle[PdfAlignmentStyle["BottomRight"] = 9] = "BottomRight";
})(PdfAlignmentStyle || (PdfAlignmentStyle = {}));
/**
 * public Enum for `TemplateType`.
 * @private
 */
var TemplateType;
(function (TemplateType) {
    /**
     * Specifies the type of `None`.
     * @private
     */
    TemplateType[TemplateType["None"] = 0] = "None";
    /**
     * Specifies the type of `Top`.
     * @private
     */
    TemplateType[TemplateType["Top"] = 1] = "Top";
    /**
     * Specifies the type of `Bottom`.
     * @private
     */
    TemplateType[TemplateType["Bottom"] = 2] = "Bottom";
    /**
     * Specifies the type of `Left`.
     * @private
     */
    TemplateType[TemplateType["Left"] = 3] = "Left";
    /**
     * Specifies the type of `Right`.
     * @private
     */
    TemplateType[TemplateType["Right"] = 4] = "Right";
})(TemplateType || (TemplateType = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/page-added-event-arguments.js":
/*!********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/page-added-event-arguments.js ***!
  \********************************************************************************************************/
/*! exports provided: PageAddedEventArgs */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageAddedEventArgs", function() { return PageAddedEventArgs; });
/**
 * Provides data for `PageAddedEventHandler` event.
 * This event raises when adding the new PDF page to the PDF document.
 */
var PageAddedEventArgs = /** @class */ (function () {
    function PageAddedEventArgs(page) {
        if (typeof page !== 'undefined') {
            this.pdfPage = page;
        }
        else {
            this.pdfPage = null;
        }
    }
    Object.defineProperty(PageAddedEventArgs.prototype, "page", {
        /**
         * Gets the `newly added page`.
         * @private
         */
        get: function () {
            return this.pdfPage;
        },
        enumerable: true,
        configurable: true
    });
    return PageAddedEventArgs;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-document-page-collection.js":
/*!**********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-document-page-collection.js ***!
  \**********************************************************************************************************/
/*! exports provided: PdfDocumentPageCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentPageCollection", function() { return PdfDocumentPageCollection; });
/* harmony import */ var _pdf_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-page */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page.js");
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");


/**
 * Represents a virtual collection of all the pages in the document.
 * @private
 */
var PdfDocumentPageCollection = /** @class */ (function () {
    //constructor
    /**
     * Initializes a new instance of the `PdfPageCollection` class.
     * @private
     */
    function PdfDocumentPageCollection(document) {
        /**
         * It holds the page collection with the `index`.
         * @private
         */
        this.pdfPageCollectionIndex = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_1__["Dictionary"]();
        this.document = document;
    }
    Object.defineProperty(PdfDocumentPageCollection.prototype, "count", {
        //Property
        /**
         * Gets the total `number of the pages`.
         * @private
         */
        get: function () {
            return this.countPages();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDocumentPageCollection.prototype, "pageCollectionIndex", {
        /**
         * Gets a `page index` from the document.
         * @private
         */
        get: function () {
            return this.pdfPageCollectionIndex;
        },
        enumerable: true,
        configurable: true
    });
    PdfDocumentPageCollection.prototype.add = function (page) {
        if (typeof page === 'undefined') {
            var page_1 = new _pdf_page__WEBPACK_IMPORTED_MODULE_0__["PdfPage"]();
            this.add(page_1);
            return page_1;
        }
        else {
            var section = this.getLastSection();
            section.add(page);
        }
    };
    /**
     * Returns `last section` in the document.
     * @private
     */
    PdfDocumentPageCollection.prototype.getLastSection = function () {
        var sc = this.document.sections;
        if (sc.section.length === 0) {
            sc.add();
        }
        var section = sc.section[sc.section.length - 1];
        return section;
    };
    /**
     * Called when `new page has been added`.
     * @private
     */
    PdfDocumentPageCollection.prototype.onPageAdded = function (args) {
        // if (PageAdded !== null)
        // {
        //     PageAdded(this, args);
        // }
    };
    /**
     * Gets the `total number of pages`.
     * @private
     */
    PdfDocumentPageCollection.prototype.countPages = function () {
        var sc = this.document.sections;
        var count = 0;
        for (var index = 0; index < sc.section.length; index++) {
            count += sc.section[index].count;
        }
        return count;
    };
    /**
     * Gets the `page object` from page index.
     * @private
     */
    PdfDocumentPageCollection.prototype.getPageByIndex = function (index) {
        return this.getPage(index);
    };
    /**
     * Gets a page by its `index` in the document.
     * @private
     */
    PdfDocumentPageCollection.prototype.getPage = function (index) {
        if ((index < 0) || (index >= this.count)) {
            throw Error('ArgumentOutOfRangeException("index", "Value can not be less 0")');
        }
        var page = null;
        var sectionStartIndex = 0;
        var sectionCount = 0;
        var pageIndex = 0;
        var length = this.document.sections.count;
        for (var i = 0; i < length; i++) {
            var section = this.document.sections.section[i];
            sectionCount = section.count;
            pageIndex = index - sectionStartIndex;
            // We found a section containing the page.
            if ((index >= sectionStartIndex && pageIndex < sectionCount)) {
                page = section.getPages()[pageIndex];
                break;
            }
            sectionStartIndex += sectionCount;
        }
        return page;
    };
    /**
     * Gets the `index of` the page in the document.
     * @private
     */
    PdfDocumentPageCollection.prototype.indexOf = function (page) {
        var index = -1;
        if (page == null) {
            throw new Error('ArgumentNullException: page');
        }
        else {
            var numPages = 0;
            for (var i = 0, len = this.document.sections.count; i < len; i++) {
                var section = this.document.sections.pdfSectionCollection(i);
                index = section.indexOf(page);
                if (index >= 0) {
                    index += numPages;
                    break;
                }
                else {
                    index = -1;
                }
                numPages += section.count;
            }
        }
        return index;
    };
    /**
     * `Removes` the specified page.
     * @private
     */
    PdfDocumentPageCollection.prototype.remove = function (page) {
        if (page == null) {
            throw Error('ArgumentNullException("page")');
        }
        var section = null;
        var len;
        for (var i = 0, len_1 = this.document.sections.count; i < len_1; i++) {
            section = this.document.sections.pdfSectionCollection(i);
            if (section.pages.contains(page)) {
                section.pages.remove(page);
                break;
            }
        }
        return section;
    };
    return PdfDocumentPageCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-base.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-base.js ***!
  \*******************************************************************************************/
/*! exports provided: PdfPageBase */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageBase", function() { return PdfPageBase; });
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _pdf_page_layer_collection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pdf-page-layer-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer-collection.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _graphics_pdf_resources__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../graphics/pdf-resources */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-resources.js");




/**
 * The abstract base class for all pages,
 * `PdfPageBase` class provides methods and properties to create PDF pages and its elements.
 * @private
 */
var PdfPageBase = /** @class */ (function () {
    //constructors
    /**
     * Initializes a new instance of the `PdfPageBase` class.
     * @private
     */
    function PdfPageBase(dictionary) {
        /**
         * `Index` of the default layer.
         * @default -1.
         * @private
         */
        this.defLayerIndex = -1;
        /**
         * Local variable to store if page `updated`.
         * @default false.
         * @private
         */
        this.modified = false;
        /**
         * Instance of `DictionaryProperties` class.
         * @hidden
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_2__["DictionaryProperties"]();
        this.pageDictionary = dictionary;
    }
    Object.defineProperty(PdfPageBase.prototype, "section", {
        //Properties
        /**
         * Gets the `section` of a page.
         * @private
         */
        get: function () {
            // if (this.pdfSection === null) {
            //     throw new Error('PdfException : Page must be added to some section before using.');
            // }
            return this.pdfSection;
        },
        set: function (value) {
            this.pdfSection = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageBase.prototype, "dictionary", {
        /**
         * Gets the page `dictionary`.
         * @private
         */
        get: function () {
            return this.pageDictionary;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageBase.prototype, "element", {
        /**
         * Gets the wrapped `element`.
         * @private
         */
        get: function () {
            return this.pageDictionary;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageBase.prototype, "defaultLayer", {
        /**
         * Gets the `default layer` of the page (Read only).
         * @private
         */
        get: function () {
            var layer = this.layers;
            var index = this.defaultLayerIndex;
            var returnlayer = layer.items(index);
            return returnlayer;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageBase.prototype, "defaultLayerIndex", {
        /**
         * Gets or sets `index of the default layer`.
         * @private
         */
        get: function () {
            if (this.layerCollection.count === 0 || this.defLayerIndex === -1) {
                var layer = this.layerCollection.add();
                this.defLayerIndex = this.layerCollection.indexOf(layer);
            }
            return this.defLayerIndex;
        },
        /**
         * Gets or sets` index of the default layer`.
         * @private
         */
        set: function (value) {
            if (value < 0 || value > this.layers.count - 1) {
                throw new Error('ArgumentOutOfRangeException : value, Index can not be less 0 and greater Layers.Count - 1');
            }
            else {
                this.defLayerIndex = value;
                this.modified = true;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageBase.prototype, "layers", {
        /**
         * Gets the collection of the page's `layers` (Read only).
         * @private
         */
        get: function () {
            if (this.layerCollection == null || typeof this.layerCollection === 'undefined') {
                this.layerCollection = new _pdf_page_layer_collection__WEBPACK_IMPORTED_MODULE_1__["PdfPageLayerCollection"](this);
            }
            return this.layerCollection;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Return an instance of `PdfResources` class.
     * @private
     */
    PdfPageBase.prototype.getResources = function () {
        if (this.resources == null) {
            this.resources = new _graphics_pdf_resources__WEBPACK_IMPORTED_MODULE_3__["PdfResources"]();
            this.dictionary.items.setValue(this.dictionaryProperties.resources, this.resources);
        }
        return this.resources;
    };
    Object.defineProperty(PdfPageBase.prototype, "contents", {
        /**
         * Gets `array of page's content`.
         * @private
         */
        get: function () {
            var obj = this.pageDictionary.items.getValue(this.dictionaryProperties.contents);
            var contents = obj;
            var rh = obj;
            if (contents == null) {
                contents = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_0__["PdfArray"]();
                this.pageDictionary.items.setValue(this.dictionaryProperties.contents, contents);
            }
            return contents;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Sets the `resources`.
     * @private
     */
    PdfPageBase.prototype.setResources = function (res) {
        this.resources = res;
        this.dictionary.items.setValue(this.dictionaryProperties.resources, this.resources);
        this.modified = true;
    };
    return PdfPageBase;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer-collection.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer-collection.js ***!
  \*******************************************************************************************************/
/*! exports provided: PdfPageLayerCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageLayerCollection", function() { return PdfPageLayerCollection; });
/* harmony import */ var _pdf_page_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-page-base */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-base.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _pdf_page_layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-page-layer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer.js");
/* harmony import */ var _general_pdf_collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../general/pdf-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-collection.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../primitives/pdf-stream */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfPageLayerCollection.ts class for EJ2-PDF
 */






/**
 * The class provides methods and properties to handle the collections of `PdfPageLayer`.
 */
var PdfPageLayerCollection = /** @class */ (function (_super) {
    __extends(PdfPageLayerCollection, _super);
    function PdfPageLayerCollection(page) {
        var _this = _super.call(this) || this;
        /**
         * Stores the `number of first level layers` in the document.
         * @default 0
         * @private
         */
        _this.parentLayerCount = 0;
        /**
         * Indicates if `Sublayer` is present.
         * @default false
         * @private
         */
        _this.sublayer = false;
        /**
         * Stores the `optional content dictionary`.
         * @private
         */
        _this.optionalContent = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_1__["PdfDictionary"]();
        if (page instanceof _pdf_page_base__WEBPACK_IMPORTED_MODULE_0__["PdfPageBase"]) {
            // if (page == null) {
            //     throw new Error('ArgumentNullException:page');
            // }
            _this.page = page;
            var lPage = page;
            // if (lPage != null) {
            _this.parseLayers(lPage);
            // }
        }
        return _this;
    }
    PdfPageLayerCollection.prototype.items = function (index, value) {
        if (typeof index === 'number' && typeof value === 'undefined') {
            var obj = this.list[index];
            return obj;
        }
        else {
            if (value == null) {
                throw new Error('ArgumentNullException: layer');
            }
            if (value.page !== this.page) {
                throw new Error('ArgumentException: The layer belongs to another page');
            }
            // // Add/remove the layer.
            // let layer : PdfPageLayer = this.items(index);
            // if (layer != null) {
            //     this.RemoveLayer(layer);
            // }
            // this.List[index] = value;
            // this.InsertLayer(index, value);
        }
    };
    PdfPageLayerCollection.prototype.add = function (firstArgument, secondArgument) {
        if (typeof firstArgument === 'undefined') {
            var layer = new _pdf_page_layer__WEBPACK_IMPORTED_MODULE_2__["PdfPageLayer"](this.page);
            layer.name = '';
            this.add(layer);
            return layer;
        }
        else if (firstArgument instanceof _pdf_page_layer__WEBPACK_IMPORTED_MODULE_2__["PdfPageLayer"]) {
            // if (layer == null)
            //     throw new ArgumentNullException("layer");
            // if (layer.Page != m_page)
            //     throw new ArgumentException("The layer belongs to another page");
            var index = this.list.push(firstArgument);
            // Register layer.
            this.addLayer(index, firstArgument);
            return index;
        }
        else {
            return 0;
        }
    };
    /**
     * Registers `layer` at the page.
     * @private
     */
    PdfPageLayerCollection.prototype.addLayer = function (index, layer) {
        var reference = new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](layer);
        this.page.contents.add(reference);
    };
    // private RemoveLayer(layer : PdfPageLayer) : void {
    //     if (layer == null) {
    //         throw new Error('ArgumentNullException:layer');
    //     }
    //     let reference : PdfReferenceHolder = new PdfReferenceHolder(layer);
    //     if (this.page != null) {
    //         this.page.Contents.Remove(reference);
    //     }
    // }
    /**
     * Inserts `PdfPageLayer` into the collection at specified index.
     * @private
     */
    PdfPageLayerCollection.prototype.insert = function (index, layer) {
        // if (index < 0)
        //     throw new ArgumentOutOfRangeException("index", "Value can not be less 0");
        // if (layer == null)
        //     throw new ArgumentNullException("layer");
        // if (layer.Page != m_page)
        //     throw new ArgumentException("The layer belongs to another page");
        var list = [];
        var length = this.list.length;
        for (var i = index; i < length; i++) {
            list.push(this.list.pop());
        }
        this.list.push(layer);
        for (var i = 0; i < list.length; i++) {
            this.list.push(list[i]);
        }
        // Register layer.
        this.insertLayer(index, layer);
    };
    /**
     * Registers layer at the page.
     * @private
     */
    PdfPageLayerCollection.prototype.insertLayer = function (index, layer) {
        if (layer == null) {
            throw new Error('ArgumentNullException:layer');
        }
        var reference = new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](layer);
        this.page.contents.insert(index, reference);
    };
    // tslint:disable
    /**
     * `Parses the layers`.
     * @private
     */
    PdfPageLayerCollection.prototype.parseLayers = function (loadedPage) {
        // if (loadedPage == null) {
        //     throw new Error('ArgumentNullException:loadedPage');
        // }
        var contents = this.page.contents;
        var resource = this.page.getResources();
        var crossTable = null;
        var ocproperties = null;
        var propertie = null;
        var isLayerAdded = false;
        // if (loadedPage instanceof PdfPage) {
        crossTable = loadedPage.crossTable;
        // } else {
        //     crossTable = (loadedPage as PdfLoadedPage).CrossTable;
        //     Propertie = PdfCrossTable.Dereference(Resource[DictionaryProperties.Properties]) as PdfDictionary;
        //     ocproperties = PdfCrossTable.Dereference((loadedPage as PdfLoadedPage).
        //     Document.Catalog[DictionaryProperties.OCProperties]) as PdfDictionary;
        // }
        var saveStream = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_5__["PdfStream"]();
        var restoreStream = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_5__["PdfStream"]();
        var saveState = 'q';
        var newLine = '\n';
        var restoreState = 'Q';
        // for (let index : number = 0; index < contents.Items.length; index++) {
        //     let obj : IPdfPrimitive = contents[index];
        //     let stream : PdfStream = crossTable.GetObject(obj) as PdfStream;
        //     if (stream == null)
        //         throw new PdfDocumentException("Invalid contents array.");
        //     // if (stream.Compress)
        //     {
        //         if (!loadedPage.Imported)
        //             stream.Decompress();
        //     }
        //     byte[] contentId = stream.Data;
        //     string str = PdfString.ByteToString(contentId);
        //     if (!loadedPage.Imported && (contents.Count == 1) && ((stream.Data[stream.Data.Length - 2] ==
        //     RestoreState) || (stream.Data[stream.Data.Length - 1] == RestoreState)))
        //     {
        //         byte[] content = stream.Data;
        //         byte[] data = new byte[content.Length + 4];
        //         data[0] = SaveState;
        //         data[1] = NewLine;
        //         content.CopyTo(data, 2);
        //         data[data.Length - 2] = NewLine;
        //         data[data.Length - 1] = RestoreState;
        //         stream.Data = data;
        //     }
        //     if (ocproperties != null)
        //     {
        //         if (Propertie != null)
        //         {
        //             foreach (KeyValuePair<PdfName, IPdfPrimitive> prop in Propertie.Items)
        //             {
        //                 String Key = prop.Key.ToString();
        //                 PdfReferenceHolder refh = prop.Value as PdfReferenceHolder;
        //                 PdfDictionary Dict = null;
        //                 if (refh != null)
        //                 {
        //                     Dict = refh.Object as PdfDictionary;
        //                 }
        //                 else
        //                 {
        //                     Dict = prop.Value as PdfDictionary;
        //                 }
        //                 PdfDictionary m_usage = PdfCrossTable.Dereference(Dict[DictionaryProperties.Usage]) as PdfDictionary;
        //                 if (m_usage != null)
        //                 {
        //                     if (str.Contains(Key))
        //                     {
        //                         PdfPageLayer layer = new PdfPageLayer(loadedPage, stream);
        //                         PdfDictionary printoption = PdfCrossTable.Dereference(m_usage[DictionaryProperties.Print])
        //                         as PdfDictionary;
        //                         if (printoption != null)
        //                         {
        //                             layer.m_printOption = printoption;
        //                             foreach (KeyValuePair<PdfName, IPdfPrimitive> value in printoption.Items)
        //                             {
        //                                 if (value.Key.Value.Equals(DictionaryProperties.PrintState))
        //                                 {
        //                                     string printState = (value.Value as PdfName).Value;
        //                                     if (printState.Equals(DictionaryProperties.OCGON))
        //                                     {
        //                                         layer.PrintState = PdfPrintState.AlwaysPrint;
        //                                         break;
        //                                     }
        //                                     else
        //                                     {
        //                                         layer.PrintState = PdfPrintState.NeverPrint;
        //                                         break;
        //                                     }
        //                                 }
        //                             }
        //                         }
        //                         PdfString layerName = PdfCrossTable.Dereference(Dict[DictionaryProperties.Name]) as PdfString;
        //                         layer.Name = layerName.Value;
        //                         List.add(layer);
        //                         isLayerAdded = true;
        //                         if(!str.Contains("EMC"))
        //                         break;
        //                     }
        //                 }
        //                 else
        //                 {
        //                     if (str.Contains(Key))
        //                     {
        //                         PdfPageLayer layer = new PdfPageLayer(loadedPage, stream);
        //                         List.add(layer);
        //                         if(Dict.ContainsKey(DictionaryProperties.Name))
        //                         {
        //                         PdfString layerName = PdfCrossTable.Dereference(Dict[DictionaryProperties.Name]) as PdfString;
        //                         layer.Name = layerName.Value;
        //                         }
        //                         isLayerAdded = true;
        //                         break;
        //                     }
        //                 }
        //             }
        //         }
        //     }
        //     if (!isLayerAdded)
        //     {
        //         PdfPageLayer layer = new PdfPageLayer(loadedPage, stream);
        //         List.add(layer);
        //     }
        //     else
        //         isLayerAdded = false;
        // }
        var saveData = [];
        saveData.push(saveState);
        saveStream.data = saveData;
        contents.insert(0, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](saveStream));
        saveData = [];
        saveData.push(restoreState);
        restoreStream.data = saveData;
        contents.insert(contents.count, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](restoreStream));
    };
    /**
     * Returns `index of` the `PdfPageLayer` in the collection if exists, -1 otherwise.
     * @private
     */
    PdfPageLayerCollection.prototype.indexOf = function (layer) {
        if (layer == null) {
            throw new Error('ArgumentNullException: layer');
        }
        var index = this.list.indexOf(layer);
        return index;
    };
    return PdfPageLayerCollection;
}(_general_pdf_collection__WEBPACK_IMPORTED_MODULE_3__["PdfCollection"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer.js ***!
  \********************************************************************************************/
/*! exports provided: PdfPageLayer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageLayer", function() { return PdfPageLayer; });
/* harmony import */ var _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../primitives/pdf-stream */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js");
/* harmony import */ var _graphics_pdf_graphics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../graphics/pdf-graphics */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-graphics.js");
/* harmony import */ var _pdf_page_layer_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf-page-layer-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer-collection.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _graphics_enum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../graphics/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");





/**
 * The `PdfPageLayer` used to create layers in PDF document.
 * @private
 */
var PdfPageLayer = /** @class */ (function () {
    function PdfPageLayer(page, streamClipPageTemplates) {
        // private bSaved : boolean;
        /**
         * Local Variable to store the `color space` of the document.
         * @private
         */
        this.pdfColorSpace = _graphics_enum__WEBPACK_IMPORTED_MODULE_4__["PdfColorSpace"].Rgb;
        /**
         * Local Variable to set `visibility`.
         * @default true
         * @private
         */
        this.isVisible = true;
        /**
         * Indicates if `Sublayer` is present.
         * @default false
         * @private
         */
        this.sublayer = false;
        /**
         * Local variable to store `length` of the graphics.
         * @default 0
         * @private
         */
        this.contentLength = 0;
        /**
         * Instance for `PdfDictionaryProperties` Class.
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_3__["DictionaryProperties"]();
        if (typeof streamClipPageTemplates === 'undefined') {
            this.pdfPage = page;
            this.clipPageTemplates = true;
            this.content = new _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_0__["PdfStream"]();
        }
        else if (streamClipPageTemplates instanceof _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_0__["PdfStream"] || streamClipPageTemplates === null) {
            if (page == null) {
                throw new Error('ArgumentNullException:page');
            }
            if (streamClipPageTemplates == null) {
                throw new Error('ArgumentNullException:stream');
            }
            this.pdfPage = page;
            this.content = streamClipPageTemplates;
        }
        else {
            this.constructor(page);
            this.clipPageTemplates = streamClipPageTemplates;
        }
    }
    Object.defineProperty(PdfPageLayer.prototype, "colorSpace", {
        // Properties
        /**
         * Get or set the `color space`.
         * @private
         */
        get: function () {
            return this.pdfColorSpace;
        },
        set: function (value) {
            this.pdfColorSpace = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageLayer.prototype, "page", {
        /**
         * Gets parent `page` of the layer.
         * @private
         */
        get: function () {
            return this.pdfPage;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageLayer.prototype, "layerId", {
        /**
         * Gets and Sets the `id of the layer`.
         * @private
         */
        get: function () {
            return this.layerid;
        },
        set: function (value) {
            this.layerid = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageLayer.prototype, "name", {
        /**
         * Gets or sets the `name` of the layer.
         * @private
         */
        get: function () {
            return this.layerName;
        },
        set: function (value) {
            this.layerName = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageLayer.prototype, "visible", {
        /**
         * Gets or sets the `visibility` of the layer.
         * @private
         */
        get: function () {
            return this.isVisible;
        },
        set: function (value) {
            this.isVisible = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageLayer.prototype, "graphics", {
        /**
         * Gets `Graphics` context of the layer, used to draw various graphical content on layer.
         * @private
         */
        get: function () {
            if ((this.pdfGraphics == null)) {
                this.initializeGraphics(this.page);
            }
            return this.pdfGraphics;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageLayer.prototype, "layers", {
        /**
         * Gets the collection of `PdfPageLayer`, this collection handle by the class 'PdfPageLayerCollection'.
         * @private
         */
        get: function () {
            if (this.layer == null) {
                this.layer = new _pdf_page_layer_collection__WEBPACK_IMPORTED_MODULE_2__["PdfPageLayerCollection"](this.page);
                this.layer.sublayer = true;
                return this.layer;
            }
            else {
                return this.layer;
            }
        },
        enumerable: true,
        configurable: true
    });
    // Implementation
    /**
     * `Adds` a new PDF Page layer.
     * @private
     */
    PdfPageLayer.prototype.add = function () {
        var layer = new PdfPageLayer(this.pdfPage);
        layer.name = '';
        return layer;
    };
    /**
     * Returns a value indicating the `sign` of a single-precision floating-point number.
     * @private
     */
    PdfPageLayer.prototype.sign = function (number) {
        if (number === 0) {
            return 0;
        }
        else if (number > 0) {
            return 1;
        }
        else {
            return -1;
        }
    };
    /**
     * `Initializes Graphics context` of the layer.
     * @private
     */
    PdfPageLayer.prototype.initializeGraphics = function (page) {
        var oPage = page;
        var gr = new _graphics_pdf_graphics__WEBPACK_IMPORTED_MODULE_1__["GetResourceEventHandler"](this.page);
        var cropBox = null;
        this.pdfGraphics = new _graphics_pdf_graphics__WEBPACK_IMPORTED_MODULE_1__["PdfGraphics"](page.size, gr, this.content);
        this.pdfGraphics.mediaBoxUpperRightBound = 0;
        if (oPage != null) {
            var sc = oPage.section.parent;
            if (sc != null) {
                this.pdfGraphics.colorSpace = sc.document.colorSpace;
                this.colorSpace = sc.document.colorSpace;
            }
        }
        // Transform coordinates to the left/top and activate margins.
        var isSame = (this.sign(page.origin.y) === this.sign(page.origin.x));
        // if (page != null) {
        if (page.origin.x >= 0 && page.origin.y >= 0 || !(isSame)) {
            this.pdfGraphics.initializeCoordinates();
        }
        else {
            // this.m_graphics.InitializeCoordinates(page);
        }
        var clipRect = oPage.section.getActualBounds(oPage, true);
        var margins = oPage.section.pageSettings.margins;
        if (this.clipPageTemplates) {
            if (page.origin.x >= 0 && page.origin.y >= 0) {
                this.pdfGraphics.clipTranslateMargins(clipRect);
            }
        }
        else {
            this.graphics.clipTranslateMargins(clipRect.x, clipRect.y, margins.left, margins.top, margins.right, margins.bottom);
        }
        this.pdfGraphics.setLayer(this);
        // this.bSaved = false;
    };
    Object.defineProperty(PdfPageLayer.prototype, "element", {
        // IPdfWrapper Members
        /**
         * Gets the wrapped `element`.
         * @private
         */
        get: function () {
            return this.content;
        },
        enumerable: true,
        configurable: true
    });
    return PdfPageLayer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-settings.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-settings.js ***!
  \***********************************************************************************************/
/*! exports provided: PdfPageSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageSettings", function() { return PdfPageSettings; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _pdf_page_size__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pdf-page-size */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-size.js");
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js");
/* harmony import */ var _graphics_pdf_margins__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../graphics/pdf-margins */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-margins.js");
/**
 * PdfPageSettings.ts class for EJ2-PDF
 */




/**
 * The class provides various `setting` related with PDF pages.
 */
var PdfPageSettings = /** @class */ (function () {
    function PdfPageSettings(margins) {
        //Fields
        /**
         * The page `margins`.
         * @private
         */
        this.pageMargins = new _graphics_pdf_margins__WEBPACK_IMPORTED_MODULE_3__["PdfMargins"]();
        /**
         * The page `size`.
         * @default a4
         * @private
         */
        this.pageSize = _pdf_page_size__WEBPACK_IMPORTED_MODULE_1__["PdfPageSize"].a4;
        /**
         * The page `rotation angle`.
         * @default PdfPageRotateAngle.RotateAngle0
         * @private
         */
        this.rotateAngle = _enum__WEBPACK_IMPORTED_MODULE_2__["PdfPageRotateAngle"].RotateAngle0;
        /**
         * The page `orientation`.
         * @default PdfPageOrientation.Portrait
         * @private
         */
        this.pageOrientation = _enum__WEBPACK_IMPORTED_MODULE_2__["PdfPageOrientation"].Portrait;
        /**
         * The page `origin`.
         * @default 0,0
         * @private
         */
        this.pageOrigin = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["PointF"](0, 0);
        /**
         * Checks the Whether the `rotation` is applied or not.
         * @default false
         * @private
         */
        this.isRotation = false;
        if (typeof margins === 'number') {
            this.pageMargins.setMargins(margins);
        }
    }
    Object.defineProperty(PdfPageSettings.prototype, "size", {
        //Properties
        /**
         * Gets or sets the `size` of the page.
         * @private
         */
        get: function () {
            return this.pageSize;
        },
        set: function (value) {
            this.setSize(value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageSettings.prototype, "orientation", {
        /**
         * Gets or sets the page `orientation`.
         * @private
         */
        get: function () {
            return this.pageOrientation;
        },
        set: function (orientation) {
            if (this.pageOrientation !== orientation) {
                this.pageOrientation = orientation;
                this.updateSize(orientation);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageSettings.prototype, "margins", {
        /**
         * Gets or sets the `margins` of the page.
         * @private
         */
        get: function () {
            return this.pageMargins;
        },
        set: function (value) {
            this.pageMargins = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageSettings.prototype, "width", {
        /**
         * Gets or sets the `width` of the page.
         * @private
         */
        get: function () {
            return this.pageSize.width;
        },
        set: function (value) {
            this.pageSize.width = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageSettings.prototype, "height", {
        /**
         * Gets or sets the `height` of the page.
         * @private
         */
        get: function () {
            return this.pageSize.height;
        },
        set: function (value) {
            this.pageSize.height = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageSettings.prototype, "origin", {
        /**
         * Gets or sets the `origin` of the page.
         * @private
         */
        get: function () {
            return this.pageOrigin;
        },
        set: function (value) {
            this.pageOrigin = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageSettings.prototype, "rotate", {
        /**
         * Gets or sets the number of degrees by which the page should be `rotated` clockwise when displayed or printed.
         * @private
         */
        get: function () {
            return this.rotateAngle;
        },
        set: function (value) {
            this.rotateAngle = value;
            this.isRotation = true;
        },
        enumerable: true,
        configurable: true
    });
    //Methods
    /**
     * `Update page size` depending on orientation.
     * @private
     */
    PdfPageSettings.prototype.updateSize = function (orientation) {
        var min = Math.min(this.pageSize.width, this.pageSize.height);
        var max = Math.max(this.pageSize.width, this.pageSize.height);
        switch (orientation) {
            case _enum__WEBPACK_IMPORTED_MODULE_2__["PdfPageOrientation"].Portrait:
                this.pageSize = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](min, max);
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_2__["PdfPageOrientation"].Landscape:
                this.pageSize = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](max, min);
                break;
        }
    };
    /**
     * Creates a `clone` of the object.
     * @private
     */
    PdfPageSettings.prototype.clone = function () {
        var settings = this;
        settings.pageMargins = this.pageMargins.clone();
        // if (GetTransition() != null)
        // {
        //     settings.Transition = (PdfPageTransition)Transition.clone();
        // }
        return settings;
    };
    /**
     * Returns `size`, shrinked by the margins.
     * @private
     */
    PdfPageSettings.prototype.getActualSize = function () {
        var width = this.width - (this.margins.left + this.margins.right);
        var height = this.height - (this.margins.top + this.margins.bottom);
        var size = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](width, height);
        return size;
    };
    /**
     * Sets `size` to the page aaccording to the orientation.
     * @private
     */
    PdfPageSettings.prototype.setSize = function (size) {
        var min = Math.min(size.width, size.height);
        var max = Math.max(size.width, size.height);
        if (this.orientation === _enum__WEBPACK_IMPORTED_MODULE_2__["PdfPageOrientation"].Portrait) {
            this.pageSize = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](min, max);
        }
        else {
            this.pageSize = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](max, min);
        }
    };
    return PdfPageSettings;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-size.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-size.js ***!
  \*******************************************************************************************/
/*! exports provided: PdfPageSize */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageSize", function() { return PdfPageSize; });
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/**
 * PdfPageSize.ts class for EJ2-PDF
 */

/**
 * Represents information about various predefined `page sizes`.
 */
var PdfPageSize = /** @class */ (function () {
    //constructor
    /**
     * Initialize an instance for `PdfPageSize` class.
     * @private
     */
    function PdfPageSize() {
        // 
    }
    /**
     * Specifies the size of `letter`.
     * @private
     */
    PdfPageSize.letter = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](612, 792);
    /**
     * Specifies the size of `note`.
     * @private
     */
    PdfPageSize.note = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](540, 720);
    /**
     * Specifies the size of `legal`.
     * @private
     */
    PdfPageSize.legal = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](612, 1008);
    /**
     * Specifies the size of `a0`.
     * @private
     */
    PdfPageSize.a0 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](2380, 3368);
    /**
     * Specifies the size of `a1`.
     * @private
     */
    PdfPageSize.a1 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](1684, 2380);
    /**
     * Specifies the size of `a2`.
     * @private
     */
    PdfPageSize.a2 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](1190, 1684);
    /**
     * Specifies the size of `a3`.
     * @private
     */
    PdfPageSize.a3 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](842, 1190);
    /**
     * Specifies the size of `a4`.
     * @private
     */
    PdfPageSize.a4 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](595, 842);
    /**
     * Specifies the size of `a5`.
     * @private
     */
    PdfPageSize.a5 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](421, 595);
    /**
     * Specifies the size of `a6`.
     * @private
     */
    PdfPageSize.a6 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](297, 421);
    /**
     * Specifies the size of `a7`.
     * @private
     */
    PdfPageSize.a7 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](210, 297);
    /**
     * Specifies the size of `a8`.
     * @private
     */
    PdfPageSize.a8 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](148, 210);
    /**
     * Specifies the size of `a9`.
     * @private
     */
    PdfPageSize.a9 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](105, 148);
    /**
     * Specifies the size of `a10`.
     * @private
     */
    PdfPageSize.a10 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](74, 105);
    /**
     * Specifies the size of `b0`.
     * @private
     */
    PdfPageSize.b0 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](2836, 4008);
    /**
     * Specifies the size of `b1`.
     * @private
     */
    PdfPageSize.b1 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](2004, 2836);
    /**
     * Specifies the size of `b2`.
     * @private
     */
    PdfPageSize.b2 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](1418, 2004);
    /**
     * Specifies the size of `b3`.
     * @private
     */
    PdfPageSize.b3 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](1002, 1418);
    /**
     * Specifies the size of `b4`.
     * @private
     */
    PdfPageSize.b4 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](709, 1002);
    /**
     * Specifies the size of `b5`.
     * @private
     */
    PdfPageSize.b5 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](501, 709);
    /**
     * Specifies the size of `archE`.
     * @private
     */
    PdfPageSize.archE = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](2592, 3456);
    /**
     * Specifies the size of `archD`.
     * @private
     */
    PdfPageSize.archD = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](1728, 2592);
    /**
     * Specifies the size of `archC`.
     * @private
     */
    PdfPageSize.archC = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](1296, 1728);
    /**
     * Specifies the size of `archB`.
     * @private
     */
    PdfPageSize.archB = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](864, 1296);
    /**
     * Specifies the size of `archA`.
     * @private
     */
    PdfPageSize.archA = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](648, 864);
    /**
     * Specifies the size of `flsa`.
     * @private
     */
    PdfPageSize.flsa = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](612, 936);
    /**
     * Specifies the size of `halfLetter`.
     * @private
     */
    PdfPageSize.halfLetter = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](396, 612);
    /**
     * Specifies the size of `letter11x17`.
     * @private
     */
    PdfPageSize.letter11x17 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](792, 1224);
    /**
     * Specifies the size of `ledger`.
     * @private
     */
    PdfPageSize.ledger = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_0__["SizeF"](1224, 792);
    return PdfPageSize;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-template-element.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-template-element.js ***!
  \*******************************************************************************************************/
/*! exports provided: PdfPageTemplateElement */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPageTemplateElement", function() { return PdfPageTemplateElement; });
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _graphics_figures_pdf_template__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../graphics/figures/pdf-template */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/pdf-template.js");
/* harmony import */ var _pdf_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pdf-page */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page.js");
/**
 * PdfPageTemplateElement.ts class for EJ2-Pdf
 */





/**
 * Describes a `page template` object that can be used as header/footer, watermark or stamp.
 */
var PdfPageTemplateElement = /** @class */ (function () {
    /* tslint:disable */
    function PdfPageTemplateElement(arg1, arg2, arg3, arg4, arg5) {
        if (arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"] && typeof arg2 === 'undefined') {
            this.constructor(arg1.x, arg1.y, arg1.width, arg1.height);
        }
        else if (arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"] && arg2 instanceof _pdf_page__WEBPACK_IMPORTED_MODULE_3__["PdfPage"] && typeof arg3 === 'undefined') {
            this.constructor(arg1.x, arg1.y, arg1.width, arg1.height, arg2);
        }
        else if (arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"] && arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"] && typeof arg3 === 'undefined') {
            this.constructor(arg1.x, arg1.y, arg2.width, arg2.height);
        }
        else if (arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"] && arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"] && arg3 instanceof _pdf_page__WEBPACK_IMPORTED_MODULE_3__["PdfPage"] && typeof arg4 === 'undefined') {
            this.constructor(arg1.x, arg1.y, arg2.width, arg2.height, arg3);
        }
        else if (arg1 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"] && typeof arg2 === 'undefined') {
            this.constructor(arg1.width, arg1.height);
        }
        else if (typeof arg1 === 'number' && typeof arg2 === 'number' && typeof arg3 === 'undefined') {
            this.constructor(0, 0, arg1, arg2);
        }
        else if (typeof arg1 === 'number' && typeof arg2 === 'number' && arg3 instanceof _pdf_page__WEBPACK_IMPORTED_MODULE_3__["PdfPage"] && typeof arg4 === 'undefined') {
            this.constructor(0, 0, arg1, arg2, arg3);
        }
        else if (typeof arg1 === 'number' && typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'number' && typeof arg5 === 'undefined') {
            this.x = arg1;
            this.y = arg2;
            this.pdfTemplate = new _graphics_figures_pdf_template__WEBPACK_IMPORTED_MODULE_2__["PdfTemplate"](arg3, arg4);
        }
        else {
            this.x = arg1;
            this.y = arg2;
            this.pdfTemplate = new _graphics_figures_pdf_template__WEBPACK_IMPORTED_MODULE_2__["PdfTemplate"](arg3, arg4);
            // this.graphics.colorSpace = this.page.document.colorSpace;
        }
        /* tslint:enable */
    }
    Object.defineProperty(PdfPageTemplateElement.prototype, "dock", {
        // Properties
        /**
         * Gets or sets the `dock style` of the page template element.
         * @private
         */
        get: function () {
            return this.dockStyle;
        },
        set: function (value) {
            // if (this.dockStyle !== value && this.Type === TemplateType.None) {
            this.dockStyle = value;
            // Reset alignment.
            this.resetAlignment();
            // }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "alignment", {
        /**
         * Gets or sets `alignment` of the page template element.
         * @private
         */
        get: function () {
            return this.alignmentStyle;
        },
        set: function (value) {
            // if (this.alignmentStyle !== value) {
            this.setAlignment(value);
            // }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "foreground", {
        /**
         * Indicates whether the page template is located `in front of the page layers or behind of it`.
         * @private
         */
        get: function () {
            return this.isForeground;
        },
        set: function (value) {
            // if (this.foreground !== value) {
            this.isForeground = value;
            // }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "background", {
        /**
         * Indicates whether the page template is located `behind of the page layers or in front of it`.
         * @private
         */
        get: function () {
            return !this.isForeground;
        },
        set: function (value) {
            this.isForeground = !value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "location", {
        /**
         * Gets or sets `location` of the page template element.
         * @private
         */
        get: function () {
            return this.currentLocation;
        },
        set: function (value) {
            if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
                this.currentLocation = value;
            }
            else {
                //
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "x", {
        /**
         * Gets or sets `X` co-ordinate of the template element on the page.
         * @private
         */
        get: function () {
            var value = (typeof this.currentLocation !== 'undefined') ? this.currentLocation.x : 0;
            return value;
        },
        set: function (value) {
            if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
                this.currentLocation.x = value;
            }
            else {
                //
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "y", {
        /**
         * Gets or sets `Y` co-ordinate of the template element on the page.
         * @private
         */
        get: function () {
            var value = (typeof this.currentLocation !== 'undefined') ? this.currentLocation.y : 0;
            return value;
        },
        set: function (value) {
            if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
                this.currentLocation.y = value;
            }
            else {
                //
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "size", {
        /**
         * Gets or sets `size` of the page template element.
         * @private
         */
        get: function () {
            return this.template.size;
        },
        set: function (value) {
            if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
                this.template.reset(value);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "width", {
        /**
         * Gets or sets `width` of the page template element.
         * @private
         */
        get: function () {
            return this.template.width;
        },
        set: function (value) {
            if (this.template.width !== value && this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
                var size = this.template.size;
                size.width = value;
                this.template.reset(size);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "height", {
        /**
         * Gets or sets `height` of the page template element.
         * @private
         */
        get: function () {
            return this.template.height;
        },
        set: function (value) {
            if (this.template.height !== value && this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
                var size = this.template.size;
                size.height = value;
                this.template.reset(size);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "graphics", {
        /**
         * Gets `graphics` context of the page template element.
         * @private
         */
        get: function () {
            return this.template.graphics;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "template", {
        /**
         * Gets Pdf `template` object.
         * @private
         */
        get: function () {
            // if (typeof this.pdfTemplate === 'undefined' || this.pdfTemplate == null) {
            //     this.pdfTemplate = new PdfTemplate(this.size);
            // }
            return this.pdfTemplate;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "type", {
        /**
         * Gets or sets `type` of the usage of this page template.
         * @private
         */
        get: function () {
            return this.templateType;
        },
        set: function (value) {
            this.updateDocking(value);
            this.templateType = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPageTemplateElement.prototype, "bounds", {
        /**
         * Gets or sets `bounds` of the page template.
         * @public
         */
        get: function () {
            return new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"](this.x, this.y), this.size);
        },
        set: function (value) {
            if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
                this.location = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"](value.x, value.y);
                this.size = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"](value.width, value.height);
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Updates Dock` property if template is used as header/footer.
     * @private
     */
    PdfPageTemplateElement.prototype.updateDocking = function (type) {
        if (type !== _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
            switch (type) {
                case _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Top:
                    this.dock = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Top;
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Bottom:
                    this.dock = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Bottom;
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Left:
                    this.dock = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Left;
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Right:
                    this.dock = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Right;
                    break;
            }
            this.resetAlignment();
        }
    };
    /**
     * `Resets alignment` of the template.
     * @private
     */
    PdfPageTemplateElement.prototype.resetAlignment = function () {
        this.alignment = _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].None;
    };
    /**
     * `Sets alignment` of the template.
     * @private
     */
    PdfPageTemplateElement.prototype.setAlignment = function (alignment) {
        if (this.dock === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].None) {
            this.alignmentStyle = alignment;
        }
        else {
            // Template is docked and alignment has been changed.
            var canBeSet = false;
            switch (this.dock) {
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Left:
                    canBeSet = (alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopLeft || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].MiddleLeft ||
                        alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomLeft || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].None);
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Top:
                    canBeSet = (alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopLeft || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopCenter ||
                        alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopRight || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].None);
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Right:
                    canBeSet = (alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopRight || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].MiddleRight ||
                        alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomRight || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].None);
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Bottom:
                    canBeSet = (alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomLeft || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomCenter
                        || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomRight || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].None);
                    break;
                case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Fill:
                    canBeSet = (alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].MiddleCenter || alignment === _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].None);
                    break;
            }
            if (canBeSet) {
                this.alignmentStyle = alignment;
            }
        }
    };
    /**
     * Draws the template.
     * @private
     */
    PdfPageTemplateElement.prototype.draw = function (layer, document) {
        var page = layer.page;
        var bounds = this.calculateBounds(page, document);
        if (bounds.x === -0) {
            bounds.x = 0;
        }
        layer.graphics.drawPdfTemplate(this.template, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["PointF"](bounds.x, bounds.y), new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["SizeF"](bounds.width, bounds.height));
    };
    /**
     * Calculates bounds of the page template.
     * @private
     */
    PdfPageTemplateElement.prototype.calculateBounds = function (page, document) {
        var result = this.bounds;
        if (this.alignmentStyle !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].None) {
            result = this.getAlignmentBounds(page, document);
        }
        else if (this.dockStyle !== _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].None) {
            result = this.getDockBounds(page, document);
        }
        return result;
    };
    /**
     * Calculates bounds according to the alignment.
     * @private
     */
    PdfPageTemplateElement.prototype.getAlignmentBounds = function (page, document) {
        var result = this.bounds;
        if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
            result = this.getSimpleAlignmentBounds(page, document);
        }
        else {
            result = this.getTemplateAlignmentBounds(page, document);
        }
        return result;
    };
    /**
     * Calculates bounds according to the alignment.
     * @private
     */
    PdfPageTemplateElement.prototype.getSimpleAlignmentBounds = function (page, document) {
        var bounds = this.bounds;
        var pdfSection = page.section;
        var actualBounds = pdfSection.getActualBounds(document, page, false);
        var x = this.x;
        var y = this.y;
        switch (this.alignmentStyle) {
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopLeft:
                x = 0;
                y = 0;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopCenter:
                x = (actualBounds.width - this.width) / 2;
                y = 0;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopRight:
                x = actualBounds.width - this.width;
                y = 0;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].MiddleLeft:
                x = 0;
                y = (actualBounds.height - this.height) / 2;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].MiddleCenter:
                x = (actualBounds.width - this.width) / 2;
                y = (actualBounds.height - this.height) / 2;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].MiddleRight:
                x = actualBounds.width - this.width;
                y = (actualBounds.height - this.height) / 2;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomLeft:
                x = 0;
                y = actualBounds.height - this.height;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomCenter:
                x = (actualBounds.width - this.width) / 2;
                y = actualBounds.height - this.height;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomRight:
                x = actualBounds.width - this.width;
                y = actualBounds.height - this.height;
                break;
        }
        bounds.x = x;
        bounds.y = y;
        return bounds;
    };
    /**
     * Calculates bounds according to the alignment.
     * @private
     */
    PdfPageTemplateElement.prototype.getTemplateAlignmentBounds = function (page, document) {
        var result = this.bounds;
        var section = page.section;
        var actualBounds = section.getActualBounds(document, page, false);
        var x = this.x;
        var y = this.y;
        switch (this.alignmentStyle) {
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopLeft:
                if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Left) {
                    x = -actualBounds.x;
                    y = 0;
                }
                else if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Top) {
                    x = -actualBounds.x;
                    y = -actualBounds.y;
                }
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopCenter:
                x = (actualBounds.width - this.width) / 2;
                y = -actualBounds.y;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].TopRight:
                if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Right) {
                    x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
                    y = 0;
                }
                else if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Top) {
                    x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
                    y = -actualBounds.y;
                }
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].MiddleLeft:
                x = -actualBounds.x;
                y = (actualBounds.height - this.height) / 2;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].MiddleCenter:
                x = (actualBounds.width - this.width) / 2;
                y = (actualBounds.height - this.height) / 2;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].MiddleRight:
                x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
                y = (actualBounds.height - this.height) / 2;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomLeft:
                if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Left) {
                    x = -actualBounds.x;
                    y = actualBounds.height - this.height;
                }
                else if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Bottom) {
                    x = -actualBounds.x;
                    y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
                }
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomCenter:
                x = (actualBounds.width - this.width) / 2;
                y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfAlignmentStyle"].BottomRight:
                if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Right) {
                    x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
                    y = actualBounds.height - this.height;
                }
                else if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].Bottom) {
                    x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
                    y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
                }
                break;
        }
        result.x = x;
        result.y = y;
        return result;
    };
    /**
     * Calculates bounds according to the docking.
     * @private
     */
    PdfPageTemplateElement.prototype.getDockBounds = function (page, document) {
        var result = this.bounds;
        if (this.type === _enum__WEBPACK_IMPORTED_MODULE_0__["TemplateType"].None) {
            result = this.getSimpleDockBounds(page, document);
        }
        else {
            result = this.getTemplateDockBounds(page, document);
        }
        return result;
    };
    /**
     * Calculates bounds according to the docking.
     * @private
     */
    PdfPageTemplateElement.prototype.getSimpleDockBounds = function (page, document) {
        var result = this.bounds;
        var section = page.section;
        var actualBounds = section.getActualBounds(document, page, false);
        var x = this.x;
        var y = this.y;
        var width = this.width;
        var height = this.height;
        switch (this.dockStyle) {
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Left:
                x = 0;
                y = 0;
                width = this.width;
                height = actualBounds.height;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Top:
                x = 0;
                y = 0;
                width = actualBounds.width;
                height = this.height;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Right:
                x = actualBounds.width - this.width;
                y = 0;
                width = this.width;
                height = actualBounds.height;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Bottom:
                x = 0;
                y = actualBounds.height - this.height;
                width = actualBounds.width;
                height = this.height;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Fill:
                x = 0;
                x = 0;
                width = actualBounds.width;
                height = actualBounds.height;
                break;
        }
        result = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](x, y, width, height);
        return result;
    };
    /**
     * Calculates template bounds basing on docking if template is a page template.
     * @private
     */
    PdfPageTemplateElement.prototype.getTemplateDockBounds = function (page, document) {
        var result = this.bounds;
        var section = page.section;
        var actualBounds = section.getActualBounds(document, page, false);
        var actualSize = section.pageSettings.getActualSize();
        var x = this.x;
        var y = this.y;
        var width = this.width;
        var height = this.height;
        switch (this.dockStyle) {
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Left:
                x = -actualBounds.x;
                y = 0;
                width = this.width;
                height = actualBounds.height;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Top:
                x = -actualBounds.x;
                y = -actualBounds.y;
                width = actualSize.width;
                height = this.height;
                if (actualBounds.height < 0) {
                    y = -actualBounds.y + actualSize.height;
                }
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Right:
                x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
                y = 0;
                width = this.width;
                height = actualBounds.height;
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Bottom:
                x = -actualBounds.x;
                y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
                width = actualSize.width;
                height = this.height;
                if (actualBounds.height < 0) {
                    y -= actualSize.height;
                }
                break;
            case _enum__WEBPACK_IMPORTED_MODULE_0__["PdfDockStyle"].Fill:
                x = 0;
                x = 0;
                width = actualBounds.width;
                height = actualBounds.height;
                break;
        }
        result = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_1__["RectangleF"](x, y, width, height);
        return result;
    };
    return PdfPageTemplateElement;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page.js ***!
  \**************************************************************************************/
/*! exports provided: PdfPage */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPage", function() { return PdfPage; });
/* harmony import */ var _pdf_page_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-page-base */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-base.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _annotations_annotation_collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../annotations/annotation-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation-collection.js");
/* harmony import */ var _pdf_page_layer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pdf-page-layer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







/**
 * Provides methods and properties to create pages and its elements.
 * `PdfPage` class inherited from the `PdfPageBase` class.
 * ```typescript
 * // create a new PDF document
 * let document : PdfDocument = new PdfDocument();
 * //
 * // add a new page to the document
 * let page1 : PdfPage = document.pages.add();
 * //
 * // set the font
 * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
 * // create black brush
 * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
 * // draw the text
 * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));
 * // save the document
 * document.save('output.pdf');
 * // destroy the document
 * document.destroy();
 * ```
 */
var PdfPage = /** @class */ (function (_super) {
    __extends(PdfPage, _super);
    //constructors
    /**
     * Initialize the new instance for `PdfPage` class.
     * @private
     */
    function PdfPage() {
        var _this = _super.call(this, new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_1__["PdfDictionary"]()) || this;
        /**
         * Stores the instance of `PdfAnnotationCollection` class.
         * @hidden
         * @default null
         * @private
         */
        _this.annotationCollection = null;
        /**
         * Stores the instance of `PageBeginSave` event for Page Number Field.
         * @default null
         * @private
         */
        _this.beginSave = null;
        _this.initialize();
        return _this;
    }
    Object.defineProperty(PdfPage.prototype, "document", {
        //Properties
        /**
         * Gets current `document`.
         * @private
         */
        get: function () {
            if (this.section !== null && this.section.parent !== null) {
                return this.section.parent.document;
            }
            else {
                return null;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPage.prototype, "graphics", {
        /**
         * Get the current `graphics`.
         * ```typescript
         * // create a new PDF document
         * let document : PdfDocument = new PdfDocument();
         * // add a new page to the document
         * let page1 : PdfPage = document.pages.add();
         * //
         * // get graphics
         * let graphics : PdfGraphics = page1.graphics;
         * //
         * // set the font
         * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
         * // create black brush
         * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
         * // draw the text
         * graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));
         * // save the document
         * document.save('output.pdf');
         * // destroy the document
         * document.destroy();
         * ```
         */
        get: function () {
            var result = this.defaultLayer.graphics;
            result.currentPage = this;
            return result;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPage.prototype, "crossTable", {
        /**
         * Gets the `cross table`.
         * @private
         */
        get: function () {
            if (this.section === null) {
                throw new Error('PdfDocumentException : Page is not created');
            }
            return this.section.parent === null ? this.section.parentDocument.crossTable : this.section.parent.document.crossTable;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPage.prototype, "size", {
        /**
         * Gets the size of the PDF page- Read only.
         * @public
         */
        get: function () {
            return this.section.pageSettings.size;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPage.prototype, "origin", {
        /**
         * Gets the `origin` of the page.
         * @private
         */
        get: function () {
            return this.section.pageSettings.origin;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPage.prototype, "annotations", {
        /**
         * Gets a collection of the `annotations` of the page- Read only.
         * @private
         */
        get: function () {
            if (this.annotationCollection == null) {
                this.annotationCollection = new _annotations_annotation_collection__WEBPACK_IMPORTED_MODULE_5__["PdfAnnotationCollection"](this);
                // if (!this.Dictionary.ContainsKey(this.dictionaryProperties.annots)) {
                this.dictionary.items.setValue(this.dictionaryProperties.annots, this.annotationCollection.element);
                // }
                this.annotationCollection.annotations = this.dictionary.items.getValue(this.dictionaryProperties.annots);
            }
            return this.annotationCollection;
        },
        enumerable: true,
        configurable: true
    });
    //Implementation
    /**
     * `Initializes` a page.
     * @private
     */
    PdfPage.prototype.initialize = function () {
        this.dictionary.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_2__["PdfName"]('Page'));
        this.dictionary.pageBeginDrawTemplate = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_1__["SaveTemplateEventHandler"](this);
    };
    /**
     * Sets parent `section` to the page.
     * @private
     */
    PdfPage.prototype.setSection = function (section) {
        this.section = section;
        this.dictionary.items.setValue(this.dictionaryProperties.parent, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_3__["PdfReferenceHolder"](section));
    };
    /**
     * `Resets the progress`.
     * @private
     */
    PdfPage.prototype.resetProgress = function () {
        this.isProgressOn = false;
    };
    /**
     * Get the page size reduced by page margins and page template dimensions.
     * ```typescript
     * // create a new PDF document
     * let document : PdfDocument = new PdfDocument();
     * // add a pages to the document
     * let page1 : PdfPage = document.pages.add();
     * // create new standard font
     * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
     * // set brush
     * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
     * //
     * // set the specified point using `getClientSize` method
     * let point : PointF = new PointF(page1.getClientSize().width - 200, page1.getClientSize().height - 200);
     * // draw the text
     * page1.graphics.drawString('Hello World', font, blackBrush, point);
     * //
     * // save the document
     * document.save('output.pdf');
     * // destroy the document
     * document.destroy();
     * ```
     */
    PdfPage.prototype.getClientSize = function () {
        var returnValue = this.section.getActualBounds(this, true);
        return new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_4__["SizeF"](returnValue.width, returnValue.height);
    };
    /**
     * Helper method to retrive the instance of `PageBeginSave` event for header and footer elements.
     * @private
     */
    PdfPage.prototype.pageBeginSave = function () {
        var doc = this.document;
        if (typeof doc !== undefined && doc != null) {
            this.drawPageTemplates(doc);
        }
        if (this.beginSave != null && typeof this.beginSave !== 'undefined') {
            this.beginSave(this);
        }
    };
    /**
     * Helper method to draw template elements.
     * @private
     */
    PdfPage.prototype.drawPageTemplates = function (document) {
        // Draw Background templates.
        var hasBackTemplates = this.section.containsTemplates(document, this, false);
        if (hasBackTemplates) {
            var backLayer = new _pdf_page_layer__WEBPACK_IMPORTED_MODULE_6__["PdfPageLayer"](this, false);
            this.layers.insert(0, backLayer);
            this.section.drawTemplates(this, backLayer, document, false);
            if (backLayer.graphics !== null && typeof backLayer.graphics !== 'undefined') {
                for (var i = 0; i < backLayer.graphics.automaticFields.automaticFields.length; i++) {
                    var fieldInfo = backLayer.graphics.automaticFields.automaticFields[i];
                    fieldInfo.field.performDraw(backLayer.graphics, fieldInfo.location, fieldInfo.scalingX, fieldInfo.scalingY);
                }
            }
        }
        // Draw Foreground templates.
        var hasFrontTemplates = this.section.containsTemplates(document, this, true);
        if (hasFrontTemplates) {
            var frontLayer = new _pdf_page_layer__WEBPACK_IMPORTED_MODULE_6__["PdfPageLayer"](this, false);
            this.layers.add(frontLayer);
            this.section.drawTemplates(this, frontLayer, document, true);
        }
    };
    return PdfPage;
}(_pdf_page_base__WEBPACK_IMPORTED_MODULE_0__["PdfPageBase"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-collection.js":
/*!****************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-collection.js ***!
  \****************************************************************************************************/
/*! exports provided: PdfSectionCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfSectionCollection", function() { return PdfSectionCollection; });
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _pdf_section__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pdf-section */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");








/**
 * Represents the `collection of the sections`.
 * @private
 */
var PdfSectionCollection = /** @class */ (function () {
    //constructor
    /**
     * Initializes a new instance of the `PdfSectionCollection` class.
     * @private
     */
    function PdfSectionCollection(document) {
        /**
         * @hidden
         * @private
         */
        this.sections = [];
        /**
         * @hidden
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_7__["DictionaryProperties"]();
        // if (document === null) {
        //     throw new Error('ArgumentNullException : document');
        // }
        this.pdfDocument = document.clone();
        this.initialize();
    }
    Object.defineProperty(PdfSectionCollection.prototype, "section", {
        //Properties
        /**
         * Gets the `Section` collection.
         */
        get: function () {
            return this.sections;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSectionCollection.prototype, "document", {
        /**
         * Gets a parent `document`.
         * @private
         */
        get: function () {
            return this.pdfDocument;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSectionCollection.prototype, "count", {
        /**
         * Gets the `number of sections` in a document.
         * @private
         */
        get: function () {
            return this.sections.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSectionCollection.prototype, "element", {
        /**
         * Gets the wrapped `element`.
         * @private
         */
        get: function () {
            return this.pages;
        },
        enumerable: true,
        configurable: true
    });
    //Methods
    /**
     * `Initializes the object`.
     * @private
     */
    PdfSectionCollection.prototype.initialize = function () {
        this.sectionCount = new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_0__["PdfNumber"](0);
        this.sectionCollection = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_2__["PdfArray"]();
        this.pages = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_3__["PdfDictionary"]();
        this.pages.beginSave = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_3__["SaveSectionCollectionEventHandler"](this);
        this.pages.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_1__["PdfName"]('Pages'));
        this.pages.items.setValue(this.dictionaryProperties.kids, this.sectionCollection);
        this.pages.items.setValue(this.dictionaryProperties.count, this.sectionCount);
        this.pages.items.setValue(this.dictionaryProperties.resources, new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_3__["PdfDictionary"]());
        this.setPageSettings(this.pages, this.pdfDocument.pageSettings);
    };
    /**
     * Initializes a new instance of the `PdfSectionCollection` class.
     * @private
     */
    PdfSectionCollection.prototype.pdfSectionCollection = function (index) {
        if (index < 0 || index >= this.count) {
            throw new Error('IndexOutOfRangeException()');
        }
        return this.sections[index];
    };
    /**
     * In fills dictionary by the data from `Page settings`.
     * @private
     */
    PdfSectionCollection.prototype.setPageSettings = function (container, pageSettings) {
        // if (container === null) {
        //     throw new Error('ArgumentNullException : container');
        // }
        // if (pageSettings === null) {
        //     throw new Error('ArgumentNullException : pageSettings');
        // }
        var bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](), pageSettings.size);
        container.items.setValue(this.dictionaryProperties.mediaBox, _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_2__["PdfArray"].fromRectangle(bounds));
    };
    /**
     * `Adds` the specified section.
     * @private
     */
    PdfSectionCollection.prototype.add = function (section) {
        if (typeof section === 'undefined') {
            var section_1 = new _pdf_section__WEBPACK_IMPORTED_MODULE_6__["PdfSection"](this.pdfDocument);
            this.add(section_1);
            return section_1;
        }
        else {
            // if (section === null) {
            //     throw new Error('ArgumentNullException : section');
            // }
            var r = this.checkSection(section);
            this.sections.push(section);
            section.parent = this;
            this.sectionCollection.add(r);
            return this.sections.indexOf(section);
        }
    };
    /**
     * `Checks` if the section is within the collection.
     * @private
     */
    PdfSectionCollection.prototype.checkSection = function (section) {
        var r = new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_4__["PdfReferenceHolder"](section);
        var contains = this.sectionCollection.contains(r);
        // if (contains) {
        //     throw new Error('ArgumentException : The object can not be added twice to the collection,section');
        // }
        return r;
    };
    /**
     * Catches the Save event of the dictionary to `count the pages`.
     * @private
     */
    PdfSectionCollection.prototype.countPages = function () {
        var count = 0;
        this.sections.forEach(function (n) { return (count += n.count); });
        return count;
    };
    /**
     * Catches the Save event of the dictionary to `count the pages`.
     * @hidden
     * @private
     */
    PdfSectionCollection.prototype.beginSave = function () {
        this.sectionCount.intValue = this.countPages();
    };
    //Fields
    /**
     * Rotate factor for page `rotation`.
     * @default 90
     * @private
     */
    PdfSectionCollection.rotateFactor = 90;
    return PdfSectionCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-page-collection.js":
/*!*********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-page-collection.js ***!
  \*********************************************************************************************************/
/*! exports provided: PdfSectionPageCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfSectionPageCollection", function() { return PdfSectionPageCollection; });
/**
 * Represents the `collection of pages in a section`.
 * @private
 */
var PdfSectionPageCollection = /** @class */ (function () {
    // Constructors
    /**
     * Initializes a new instance of the `PdfSectionPageCollection` class.
     * @private
     */
    function PdfSectionPageCollection(section) {
        //  Fields
        /**
         * @hidden
         * @private
         */
        this.pdfSection = null;
        if (section == null) {
            throw Error('ArgumentNullException("section")');
        }
        this.section = section;
    }
    Object.defineProperty(PdfSectionPageCollection.prototype, "section", {
        // Properties
        /**
         * Gets the `PdfPage` at the specified index.
         * @private
         */
        get: function () {
            return this.pdfSection;
        },
        set: function (value) {
            this.pdfSection = value;
        },
        enumerable: true,
        configurable: true
    });
    // Public Methods
    /**
     * `Determines` whether the specified page is within the collection.
     * @private
     */
    PdfSectionPageCollection.prototype.contains = function (page) {
        return this.section.contains(page);
    };
    /**
     * `Removes` the specified page from collection.
     * @private
     */
    PdfSectionPageCollection.prototype.remove = function (page) {
        this.section.remove(page);
    };
    /**
     * `Adds` a new page from collection.
     * @private
     */
    PdfSectionPageCollection.prototype.add = function () {
        return this.section.add();
    };
    return PdfSectionPageCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-templates.js":
/*!***************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-templates.js ***!
  \***************************************************************************************************/
/*! exports provided: PdfSectionTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfSectionTemplate", function() { return PdfSectionTemplate; });
/* harmony import */ var _document_pdf_document_template__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../document/pdf-document-template */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-template.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfSectionTemplate.ts class for EJ2-PDF
 */

/**
 * Represents a `page template` for all the pages in the section.
 */
var PdfSectionTemplate = /** @class */ (function (_super) {
    __extends(PdfSectionTemplate, _super);
    // Constructors
    /**
     * `Creates a new object`.
     * @private
     */
    function PdfSectionTemplate() {
        var _this = _super.call(this) || this;
        _this.leftValue = _this.topValue = _this.rightValue = _this.bottomValue = _this.stampValue = true;
        return _this;
    }
    Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentLeftTemplate", {
        // Properties
        /**
         * Gets or sets value indicating whether parent `Left page template should be used or not`.
         * @private
         */
        get: function () {
            return this.leftValue;
        },
        set: function (value) {
            this.leftValue = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentTopTemplate", {
        /**
         * Gets or sets value indicating whether parent `Top page template should be used or not`.
         * @private
         */
        get: function () {
            return this.topValue;
        },
        set: function (value) {
            this.topValue = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentRightTemplate", {
        /**
         * Gets or sets value indicating whether parent `Right page template should be used or not`.
         * @private
         */
        get: function () {
            return this.rightValue;
        },
        set: function (value) {
            this.rightValue = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentBottomTemplate", {
        /**
         * Gets or sets value indicating whether parent `Bottom page template should be used or not`.
         * @private
         */
        get: function () {
            return this.bottomValue;
        },
        set: function (value) {
            this.bottomValue = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentStamps", {
        /**
         * Gets or sets value indicating whether the `stamp value` is true or not.
         * @private
         */
        get: function () {
            return this.stampValue;
        },
        set: function (value) {
            this.stampValue = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfSectionTemplate;
}(_document_pdf_document_template__WEBPACK_IMPORTED_MODULE_0__["PdfDocumentTemplate"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section.js ***!
  \*****************************************************************************************/
/*! exports provided: PdfSection, PageSettingsState */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfSection", function() { return PdfSection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageSettingsState", function() { return PageSettingsState; });
/* harmony import */ var _pdf_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-page */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page.js");
/* harmony import */ var _page_added_event_arguments__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./page-added-event-arguments */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/page-added-event-arguments.js");
/* harmony import */ var _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _pdf_section_collection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./pdf-section-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-collection.js");
/* harmony import */ var _pdf_section_page_collection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./pdf-section-page-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-page-collection.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _pdf_section_templates__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./pdf-section-templates */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-templates.js");













/**
 * Represents a `section` entity. A section it's a set of the pages with similar page settings.
 */
var PdfSection = /** @class */ (function () {
    function PdfSection(document, pageSettings) {
        //Fields
        //public PageAdded() : PageAddedEventArgs.PageAddedEventHandler = new PageAddedEventArgs.PageAddedEventHandler(Object,args)
        /**
         * @hidden
         * @private
         */
        this.pageAdded = new _page_added_event_arguments__WEBPACK_IMPORTED_MODULE_1__["PageAddedEventArgs"]();
        /**
         * @hidden
         * @private
         */
        this.pdfPages = [];
        /**
         * @hidden
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_7__["DictionaryProperties"]();
        if (typeof pageSettings === 'undefined') {
            this.constructor(document, document.pageSettings);
        }
        else {
            this.pdfDocument = document;
            this.settings = pageSettings.clone();
            this.initialSettings = this.settings.clone();
            this.initialize();
        }
    }
    Object.defineProperty(PdfSection.prototype, "parent", {
        //Property
        /**
         * Gets or sets the `parent`.
         * @private
         */
        get: function () {
            return this.sectionCollection;
        },
        set: function (value) {
            this.sectionCollection = value;
            this.section.items.setValue(this.dictionaryProperties.parent, new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_2__["PdfReferenceHolder"](value));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSection.prototype, "parentDocument", {
        /**
         * Gets the `parent document`.
         * @private
         */
        get: function () {
            return this.pdfDocument;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSection.prototype, "pageSettings", {
        /**
         * Gets or sets the `page settings` of the section.
         * @private
         */
        get: function () {
            return this.settings;
        },
        set: function (value) {
            if (value != null) {
                this.settings = value;
            }
            else {
                throw Error('Value can not be null.');
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSection.prototype, "element", {
        /**
         * Gets the wrapped `element`.
         * @private
         */
        get: function () {
            return this.section;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSection.prototype, "count", {
        /**
         * Gets the `count` of the pages in the section.
         * @private
         */
        get: function () {
            return this.pagesReferences.count;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSection.prototype, "template", {
        /**
         * Gets or sets a `template` for the pages in the section.
         * @private
         */
        get: function () {
            if (this.pageTemplate == null) {
                this.pageTemplate = new _pdf_section_templates__WEBPACK_IMPORTED_MODULE_11__["PdfSectionTemplate"]();
            }
            return this.pageTemplate;
        },
        set: function (value) {
            this.pageTemplate = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSection.prototype, "document", {
        /**
         * Gets the `document`.
         * @private
         */
        get: function () {
            return this.sectionCollection.document;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfSection.prototype, "pages", {
        /**
         * Gets the collection of `pages` in a section (Read only)
         * @private
         */
        get: function () {
            if (this.pagesCollection == null || typeof this.pagesCollection === 'undefined') {
                this.pagesCollection = new _pdf_section_page_collection__WEBPACK_IMPORTED_MODULE_9__["PdfSectionPageCollection"](this);
            }
            return this.pagesCollection;
        },
        enumerable: true,
        configurable: true
    });
    //methods
    /**
     * `Return the page collection` of current section.
     * @private
     */
    PdfSection.prototype.getPages = function () {
        return this.pdfPages;
    };
    /**
     * `Translates` point into native coordinates of the page.
     * @private
     */
    PdfSection.prototype.pointToNativePdf = function (page, point) {
        var bounds = this.getActualBounds(page, true);
        point.x += bounds.x;
        point.y = this.pageSettings.height - (point.y);
        return point;
    };
    /**
     * Sets the page setting of the current section.
     * @public
     * @param settings Instance of `PdfPageSettings`
     */
    PdfSection.prototype.setPageSettings = function (settings) {
        this.settings = settings;
        this.state.orientation = settings.orientation;
        this.state.rotate = settings.rotate;
        this.state.size = settings.size;
        this.state.origin = settings.origin;
    };
    /**
     * `Initializes` the object.
     * @private
     */
    PdfSection.prototype.initialize = function () {
        this.pagesReferences = new _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_3__["PdfArray"]();
        this.section = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_6__["PdfDictionary"]();
        this.state = new PageSettingsState(this.pdfDocument);
        this.section.sectionBeginSave = new _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_6__["SaveSectionEventHandler"](this, this.state);
        this.pageCount = new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](0);
        this.section.items.setValue(this.dictionaryProperties.count, this.pageCount);
        this.section.items.setValue(this.dictionaryProperties.type, new _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_5__["PdfName"](this.dictionaryProperties.pages));
        this.section.items.setValue(this.dictionaryProperties.kids, this.pagesReferences);
    };
    /**
     * Checks whether any template should be printed on this layer.
     * @private
     * @param document The parent document.
     * @param page The parent page.
     * @param foreground Layer z-order.
     * @returns True - if some content should be printed on the layer, False otherwise.
     */
    PdfSection.prototype.containsTemplates = function (document, page, foreground) {
        var documentHeaders = this.getDocumentTemplates(document, page, foreground);
        var sectionTemplates = this.getSectionTemplates(page, foreground);
        return (documentHeaders.length > 0 || sectionTemplates.length > 0);
    };
    /**
     * Returns array of the document templates.
     * @private
     * @param document The parent document.
     * @param page The parent page.
     * @param foreground If true - return foreground templates, if false - return background templates.
     * @returns Returns array of the document templates.
     */
    /* tslint:disable */
    PdfSection.prototype.getDocumentTemplates = function (document, page, foreground) {
        var templates = [];
        if (this.template.applyDocumentTopTemplate && document.template.getTop(page) != null) {
            if ((!(document.template.getTop(page).foreground || foreground)) || (document.template.getTop(page).foreground && foreground)) {
                templates.push(document.template.getTop(page));
            }
        }
        if (this.template.applyDocumentBottomTemplate && document.template.getBottom(page) != null) {
            if ((!(document.template.getBottom(page).foreground || foreground)) || (document.template.getBottom(page).foreground && foreground)) {
                templates.push(document.template.getBottom(page));
            }
        }
        if (this.template.applyDocumentLeftTemplate && document.template.getLeft(page) != null) {
            if ((!(document.template.getLeft(page).foreground || foreground)) || (document.template.getLeft(page).foreground && foreground)) {
                templates.push(document.template.getLeft(page));
            }
        }
        if (this.template.applyDocumentRightTemplate && document.template.getRight(page) != null) {
            if ((!(document.template.getRight(page).foreground || foreground)) || (document.template.getRight(page).foreground && foreground)) {
                templates.push(document.template.getRight(page));
            }
        }
        return templates;
    };
    /**
     * Returns array of the section templates.
     * @private
     * @param page The parent page.
     * @param foreground If true - return foreground templates, if false - return background templates.
     * @returns Returns array of the section templates.
     */
    /* tslint:disable */
    PdfSection.prototype.getSectionTemplates = function (page, foreground) {
        var templates = [];
        if (this.template.getTop(page) != null) {
            var pageTemplate = this.template.getTop(page);
            if ((!(pageTemplate.foreground || foreground)) || (pageTemplate.foreground && foreground)) {
                templates.push(pageTemplate);
            }
        }
        if (this.template.getBottom(page) != null) {
            var pageTemplate = this.template.getBottom(page);
            if ((!(pageTemplate.foreground || foreground)) || (pageTemplate.foreground && foreground)) {
                templates.push(pageTemplate);
            }
        }
        if (this.template.getLeft(page) != null) {
            var pageTemplate = this.template.getLeft(page);
            if ((!(pageTemplate.foreground || foreground)) || (pageTemplate.foreground && foreground)) {
                templates.push(pageTemplate);
            }
        }
        if (this.template.getRight(page) != null) {
            var pageTemplate = this.template.getRight(page);
            if ((!(pageTemplate.foreground || foreground)) || (pageTemplate.foreground && foreground)) {
                templates.push(pageTemplate);
            }
        }
        return templates;
    };
    /* tslint:enable */
    /**
     * `Adds` the specified page.
     * @private
     */
    PdfSection.prototype.add = function (page) {
        if (typeof page === 'undefined') {
            var page_1 = new _pdf_page__WEBPACK_IMPORTED_MODULE_0__["PdfPage"]();
            this.add(page_1);
            return page_1;
        }
        else {
            var r = this.checkPresence(page);
            this.pdfPages.push(page);
            this.pagesReferences.add(r);
            page.setSection(this);
            page.resetProgress();
            this.pageAddedMethod(page);
        }
    };
    /**
     * `Checks the presence`.
     * @private
     */
    PdfSection.prototype.checkPresence = function (page) {
        var rh = new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_2__["PdfReferenceHolder"](page);
        var contains = false;
        var sc = this.parent;
        for (var index = 0; index < sc.section.length; index++) {
            var section = sc.section[index];
            contains = contains || section.contains(page);
        }
        return rh;
    };
    /**
     * `Determines` whether the page in within the section.
     * @private
     */
    PdfSection.prototype.contains = function (page) {
        var index = this.indexOf(page);
        return (0 <= index);
    };
    /**
     * Get the `index of` the page.
     * @private
     */
    PdfSection.prototype.indexOf = function (page) {
        for (var index = 0; index < this.pdfPages.length; index++) {
            if (this.pdfPages[index] === page) {
                return this.pdfPages.indexOf(page);
            }
        }
        var r = new _primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_2__["PdfReferenceHolder"](page);
        return this.pagesReferences.indexOf(r);
    };
    /**
     * Call two event's methods.
     * @hidden
     * @private
     */
    PdfSection.prototype.pageAddedMethod = function (page) {
        //Create event's arguments
        var args = new _page_added_event_arguments__WEBPACK_IMPORTED_MODULE_1__["PageAddedEventArgs"](page);
        this.onPageAdded(args);
        var parent = this.parent;
        parent.document.pages.onPageAdded(args);
        this.pageCount.intValue = this.count;
    };
    /**
     * Called when the page has been added.
     * @hidden
     * @private
     */
    PdfSection.prototype.onPageAdded = function (args) {
        //
    };
    PdfSection.prototype.getActualBounds = function (arg1, arg2, arg3) {
        if (arg1 instanceof _pdf_page__WEBPACK_IMPORTED_MODULE_0__["PdfPage"] && typeof arg2 === 'boolean') {
            var result = void 0;
            var document_1 = this.parent.document;
            result = this.getActualBounds(document_1, arg1, arg2);
            return result;
        }
        else {
            arg1 = arg1;
            arg2 = arg2;
            arg3 = arg3;
            var bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_10__["RectangleF"](0, 0, 0, 0);
            bounds.height = (arg3) ? this.pageSettings.size.height : this.pageSettings.getActualSize().height;
            bounds.width = (arg3) ? this.pageSettings.size.width : this.pageSettings.getActualSize().width;
            var left = this.getLeftIndentWidth(arg1, arg2, arg3);
            var top_1 = this.getTopIndentHeight(arg1, arg2, arg3);
            var right = this.getRightIndentWidth(arg1, arg2, arg3);
            var bottom = this.getBottomIndentHeight(arg1, arg2, arg3);
            bounds.x += left;
            bounds.y += top_1;
            bounds.width -= (left + right);
            bounds.height -= (top_1 + bottom);
            return bounds;
        }
    };
    /**
     * Calculates width of the `left indent`.
     * @private
     */
    PdfSection.prototype.getLeftIndentWidth = function (document, page, includeMargins) {
        if (document == null) {
            throw new Error('ArgumentNullException:document');
        }
        if (page == null) {
            throw new Error('ArgumentNullException:page');
        }
        var value = (includeMargins) ? this.pageSettings.margins.left : 0;
        var templateWidth = (this.template.getLeft(page) != null) ? this.template.getLeft(page).width : 0;
        var docTemplateWidth = (document.template.getLeft(page) != null) ? document.template.getLeft(page).width : 0;
        value += (this.template.applyDocumentLeftTemplate) ? Math.max(templateWidth, docTemplateWidth) : templateWidth;
        return value;
    };
    /**
     * Calculates `Height` of the top indent.
     * @private
     */
    PdfSection.prototype.getTopIndentHeight = function (document, page, includeMargins) {
        if (document == null) {
            throw new Error('ArgumentNullException:document');
        }
        if (page == null) {
            throw new Error('ArgumentNullException:page');
        }
        var value = (includeMargins) ? this.pageSettings.margins.top : 0;
        var templateHeight = (this.template.getTop(page) != null) ? this.template.getTop(page).height : 0;
        var docTemplateHeight = (document.template.getTop(page) != null) ? document.template.getTop(page).height : 0;
        value += (this.template.applyDocumentTopTemplate) ? Math.max(templateHeight, docTemplateHeight) : templateHeight;
        return value;
    };
    /**
     * Calculates `width` of the right indent.
     * @private
     */
    PdfSection.prototype.getRightIndentWidth = function (document, page, includeMargins) {
        if (document == null) {
            throw new Error('ArgumentNullException:document');
        }
        if (page == null) {
            throw new Error('ArgumentNullException:page');
        }
        var value = (includeMargins) ? this.pageSettings.margins.right : 0;
        var templateWidth = (this.template.getRight(page) != null) ? this.template.getRight(page).width : 0;
        var docTemplateWidth = (document.template.getRight(page) != null) ? document.template.getRight(page).width : 0;
        value += (this.template.applyDocumentRightTemplate) ? Math.max(templateWidth, docTemplateWidth) : templateWidth;
        return value;
    };
    /**
     * Calculates `Height` of the bottom indent.
     * @private
     */
    PdfSection.prototype.getBottomIndentHeight = function (document, page, includeMargins) {
        if (document == null) {
            throw new Error('ArgumentNullException:document');
        }
        if (page == null) {
            throw new Error('ArgumentNullException:page');
        }
        var value = (includeMargins) ? this.pageSettings.margins.bottom : 0;
        var templateHeight = (this.template.getBottom(page) != null) ? this.template.getBottom(page).height : 0;
        var docTemplateHeight = (document.template.getBottom(page) != null) ? document.template.getBottom(page).height : 0;
        value += (this.template.applyDocumentBottomTemplate) ? Math.max(templateHeight, docTemplateHeight) : templateHeight;
        return value;
    };
    /**
     * `Removes` the page from the section.
     * @private
     */
    PdfSection.prototype.remove = function (page) {
        if (page == null) {
            throw Error('ArgumentNullException("page")');
        }
        var index = this.pdfPages.indexOf(page);
        this.pagesReferences.removeAt(index);
        var temproaryPages = [];
        for (var j = 0; j < index; j++) {
            temproaryPages.push(this.pdfPages[j]);
        }
        for (var j = index + 1; j < this.pdfPages.length; j++) {
            temproaryPages.push(this.pdfPages[j]);
        }
        this.pdfPages = temproaryPages;
    };
    /**
     * In fills dictionary by the data from `Page settings`.
     * @private
     */
    PdfSection.prototype.applyPageSettings = function (container, parentSettings, state) {
        var bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_10__["RectangleF"](state.origin, state.size);
        container.items.setValue(this.dictionaryProperties.mediaBox, _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_3__["PdfArray"].fromRectangle(bounds));
        var rotate = 0;
        rotate = _pdf_section_collection__WEBPACK_IMPORTED_MODULE_8__["PdfSectionCollection"].rotateFactor * state.rotate;
        var angle = new _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_4__["PdfNumber"](rotate);
        container.items.setValue(this.dictionaryProperties.rotate, angle);
    };
    /**
     * Catches the Save event of the dictionary.
     * @hidden
     * @private
     */
    PdfSection.prototype.beginSave = function (state, writer) {
        var doc = writer.document;
        this.applyPageSettings(this.section, doc.pageSettings, state);
    };
    /**
     * Draws page templates on the page.
     * @private
     */
    PdfSection.prototype.drawTemplates = function (page, layer, document, foreground) {
        var documentHeaders = this.getDocumentTemplates(document, page, foreground);
        var sectionHeaders = this.getSectionTemplates(page, foreground);
        this.drawTemplatesHelper(layer, document, documentHeaders);
        this.drawTemplatesHelper(layer, document, sectionHeaders);
    };
    /**
     * Draws page templates on the page.
     * @private
     */
    PdfSection.prototype.drawTemplatesHelper = function (layer, document, templates) {
        if (templates != null && templates.length > 0) {
            var len = templates.length;
            for (var i = 0; i < len; i++) {
                var template = templates[i];
                template.draw(layer, document);
            }
        }
    };
    return PdfSection;
}());

var PageSettingsState = /** @class */ (function () {
    //Public Constructor
    /**
     * New instance to store the `PageSettings`.
     * @private
     */
    function PageSettingsState(document) {
        this.pageOrientation = document.pageSettings.orientation;
        this.pageRotate = document.pageSettings.rotate;
        this.pageSize = document.pageSettings.size;
        this.pageOrigin = document.pageSettings.origin;
    }
    Object.defineProperty(PageSettingsState.prototype, "orientation", {
        //public Properties
        /**
         * @hidden
         * @private
         */
        get: function () {
            return this.pageOrientation;
        },
        set: function (value) {
            this.pageOrientation = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PageSettingsState.prototype, "rotate", {
        /**
         * @hidden
         * @private
         */
        get: function () {
            return this.pageRotate;
        },
        set: function (value) {
            this.pageRotate = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PageSettingsState.prototype, "size", {
        /**
         * @hidden
         * @private
         */
        get: function () {
            return this.pageSize;
        },
        set: function (value) {
            this.pageSize = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PageSettingsState.prototype, "origin", {
        /**
         * @hidden
         * @private
         */
        get: function () {
            return this.pageOrigin;
        },
        set: function (value) {
            this.pageOrigin = value;
        },
        enumerable: true,
        configurable: true
    });
    return PageSettingsState;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js ***!
  \********************************************************************************************/
/*! exports provided: PdfArray */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfArray", function() { return PdfArray; });
/* harmony import */ var _pdf_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../input-output/pdf-operators */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js");


/**
 * `PdfArray` class is used to perform array related primitive operations.
 * @private
 */
var PdfArray = /** @class */ (function () {
    function PdfArray(array) {
        //Fields
        /**
         * `startMark` - '['
         * @private
         */
        this.startMark = '[';
        /**
         * `endMark` - ']'.
         * @private
         */
        this.endMark = ']';
        /**
         * Internal variable to store the `position`.
         * @default -1
         * @private
         */
        this.position9 = -1;
        /**
         * Internal variable to hold `cloned object`.
         * @default null
         * @private
         */
        this.clonedObject9 = null;
        /**
         * Represents the Font dictionary.
         * @hidden
         * @private
         */
        this.isFont = false;
        if (typeof array === 'undefined') {
            this.internalElements = [];
        }
        else {
            if (typeof array !== 'undefined' && !(array instanceof PdfArray)) {
                var tempNumberArray = array;
                for (var index = 0; index < tempNumberArray.length; index++) {
                    var pdfNumber = new _pdf_number__WEBPACK_IMPORTED_MODULE_0__["PdfNumber"](tempNumberArray[index]);
                    this.add(pdfNumber);
                }
                // } else if (typeof array !== 'undefined' && (array instanceof PdfArray)) {
            }
            else {
                var tempArray = array;
                // if (tempArray.Elements.length > 0) {
                this.internalElements = [];
                for (var index = 0; index < tempArray.elements.length; index++) {
                    this.internalElements.push(tempArray.elements[index]);
                }
                // }
            }
        }
    }
    //property
    /**
     * Gets the `IPdfSavable` at the specified index.
     * @private
     */
    PdfArray.prototype.items = function (index) {
        // if (index < 0 || index >= this.Count) {
        //     throw new Error('ArgumentOutOfRangeException : index, The index can"t be less then zero or greater then Count.');
        // }
        return this.internalElements[index];
    };
    Object.defineProperty(PdfArray.prototype, "count", {
        /**
         * Gets the `count`.
         * @private
         */
        get: function () {
            return this.internalElements.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfArray.prototype, "status", {
        /**
         * Gets or sets the `Status` of the specified object.
         * @private
         */
        get: function () {
            return this.status9;
        },
        set: function (value) {
            this.status9 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfArray.prototype, "isSaving", {
        /**
         * Gets or sets a value indicating whether this document `is saving` or not.
         * @private
         */
        get: function () {
            return this.isSaving9;
        },
        set: function (value) {
            this.isSaving9 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfArray.prototype, "clonedObject", {
        /**
         * Returns `cloned object`.
         * @private
         */
        get: function () {
            return this.clonedObject9;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfArray.prototype, "position", {
        /**
         * Gets or sets the `position` of the object.
         * @private
         */
        get: function () {
            return this.position9;
        },
        set: function (value) {
            this.position9 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfArray.prototype, "objectCollectionIndex", {
        /**
         * Gets or sets the `index` value of the specified object.
         * @private
         */
        get: function () {
            return this.index9;
        },
        set: function (value) {
            this.index9 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfArray.prototype, "CrossTable", {
        /**
         * Returns `PdfCrossTable` associated with the object.
         * @private
         */
        get: function () {
            return this.pdfCrossTable;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfArray.prototype, "elements", {
        /**
         * Gets the `elements` of the Pdf Array.
         * @private
         */
        get: function () {
            return this.internalElements;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Adds` the specified element to the PDF array.
     * @private
     */
    PdfArray.prototype.add = function (element) {
        // if (element === null) {
        //     throw new Error('ArgumentNullException : obj');
        // }
        if (typeof this.internalElements === 'undefined') {
            this.internalElements = [];
        }
        this.internalElements.push(element);
        this.markedChange();
    };
    /**
     * `Marks` the object changed.
     * @private
     */
    PdfArray.prototype.markedChange = function () {
        this.bChanged = true;
    };
    /**
     * `Determines` whether the specified element is within the array.
     * @private
     */
    PdfArray.prototype.contains = function (element) {
        var returnValue = false;
        for (var index = 0; index < this.internalElements.length; index++) {
            var tempElement = this.internalElements[index];
            var inputElement = element;
            if (tempElement != null && typeof tempElement !== 'undefined' && inputElement != null && typeof inputElement !== 'undefined') {
                if (tempElement.value === inputElement.value) {
                    return true;
                }
            }
            // if (this.internalElements[index] === element) {
            //     returnValue = true;
            // }
        }
        return returnValue;
    };
    /**
     * Returns the `primitive object` of input index.
     * @private
     */
    PdfArray.prototype.getItems = function (index) {
        // if (index < 0 || index >= this.Count) {
        //     throw new Error('ArgumentOutOfRangeException : index , The index can"t be less then zero or greater then Count.');
        // }
        return this.internalElements[index];
    };
    /**
     * `Saves` the object using the specified writer.
     * @private
     */
    PdfArray.prototype.save = function (writer) {
        // if (writer === null) {
        //     throw new Error('ArgumentNullException : writer');
        // }
        writer.write(this.startMark);
        for (var i = 0, len = this.count; i < len; i++) {
            this.getItems(i).save(writer);
            if (i + 1 !== len) {
                writer.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_1__["Operators"].whiteSpace);
            }
        }
        writer.write(this.endMark);
    };
    /**
     * Creates a `copy of PdfArray`.
     * @private
     */
    PdfArray.prototype.clone = function (crossTable) {
        // if (this.clonedObject9 !== null && this.clonedObject9.CrossTable === crossTable) {
        //     return this.clonedObject9;
        // } else {
        this.clonedObject9 = null;
        // Else clone the object.
        var newArray = new PdfArray();
        for (var index = 0; index < this.internalElements.length; index++) {
            var obj = this.internalElements[index];
            newArray.add(obj.clone(crossTable));
        }
        newArray.pdfCrossTable = crossTable;
        this.clonedObject9 = newArray;
        return newArray;
    };
    /**
     * Creates filled PDF array `from the rectangle`.
     * @private
     */
    PdfArray.fromRectangle = function (bounds) {
        var values = [bounds.x, bounds.y, bounds.width, bounds.height];
        var array = new PdfArray(values);
        return array;
    };
    // /**
    //  * Creates the rectangle from filled PDF array.
    //  * @private
    //  */
    // public ToRectangle() : RectangleF {
    //     if (this.Count < 4) {
    //         throw Error('InvalidOperationException-Can not convert to rectangle.');
    //     }
    //     let x1 : number;
    //     let x2 : number;
    //     let y1 : number;
    //     let y2 : number;
    //     let num : PdfNumber = this.getItems(0) as PdfNumber;
    //     x1 = num.IntValue;
    //     num = this.getItems(1) as PdfNumber;
    //     y1 = num.IntValue;
    //     num = this.getItems(2) as PdfNumber;
    //     x2 = num.IntValue;
    //     num = this.getItems(3) as PdfNumber;
    //     y2 = num.IntValue;
    //     let x : number = Math.min(x1, x2);
    //     let y : number = Math.min(y1, y2);
    //     let width : number = Math.abs(x1 - x2);
    //     let height : number = Math.abs(y1 - y2);
    //     let rect : RectangleF = new RectangleF(new PointF(x, y), new SizeF(width, height));
    //     return rect;
    // }
    /**
     * `Inserts` the element into the array.
     * @private
     */
    PdfArray.prototype.insert = function (index, element) {
        if (index < this.internalElements.length && index > 0) {
            var tempElements = [];
            for (var i = 0; i < index; i++) {
                tempElements.push(this.internalElements[i]);
            }
            tempElements.push(element);
            for (var i = index; i < this.internalElements.length; i++) {
                tempElements.push(this.internalElements[i]);
            }
            this.internalElements = tempElements;
        }
        else {
            this.internalElements.push(element);
        }
        this.markChanged();
    };
    /**
     * `Checks whether array contains the element`.
     * @private
     */
    PdfArray.prototype.indexOf = function (element) {
        return this.internalElements.indexOf(element);
    };
    /**
     * `Removes` element from the array.
     * @private
     */
    PdfArray.prototype.remove = function (element) {
        // if (element === null) {
        //     throw new Error('ArgumentNullException : element');
        // }
        var index = this.internalElements.indexOf(element);
        // if (index >= 0 && index < this.internalElements.length) {
        this.internalElements[index] = null;
        // }
        this.markChanged();
    };
    /**
     * `Remove` the element from the array by its index.
     * @private
     */
    PdfArray.prototype.removeAt = function (index) {
        // this.internalElements.RemoveAt(index);
        if (this.internalElements.length > index) {
            var tempArray = [];
            for (var i = 0; i < index; i++) {
                tempArray.push(this.internalElements[i]);
            }
            for (var i = index + 1; i < this.internalElements.length; i++) {
                tempArray.push(this.internalElements[i]);
            }
            this.internalElements = tempArray;
        }
        this.markChanged();
    };
    /**
     * `Clear` the array.
     * @private
     */
    PdfArray.prototype.clear = function () {
        this.internalElements = [];
        this.markChanged();
    };
    /**
     * `Marks` the object changed.
     * @private
     */
    PdfArray.prototype.markChanged = function () {
        this.bChanged = true;
    };
    return PdfArray;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-boolean.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-boolean.js ***!
  \**********************************************************************************************/
/*! exports provided: PdfBoolean */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfBoolean", function() { return PdfBoolean; });
/**
 * `PdfBoolean` class is used to perform boolean related primitive operations.
 * @private
 */
var PdfBoolean = /** @class */ (function () {
    //constructor
    /**
     * Initializes a new instance of the `PdfBoolean` class.
     * @private
     */
    function PdfBoolean(value) {
        /**
         * Internal variable to store the `position`.
         * @default -1
         * @private
         */
        this.currentPosition = -1;
        this.value = value;
    }
    Object.defineProperty(PdfBoolean.prototype, "status", {
        //Properties
        /**
         * Gets or sets the `Status` of the specified object.
         * @private
         */
        get: function () {
            return this.objectStatus;
        },
        set: function (value) {
            this.objectStatus = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBoolean.prototype, "isSaving", {
        /**
         * Gets or sets a value indicating whether this document `is saving` or not.
         * @private
         */
        get: function () {
            return this.saving;
        },
        set: function (value) {
            this.saving = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBoolean.prototype, "objectCollectionIndex", {
        /**
         * Gets or sets the `index` value of the specified object.
         * @private
         */
        get: function () {
            return this.index;
        },
        set: function (value) {
            this.index = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBoolean.prototype, "position", {
        /**
         * Gets or sets the `position` of the object.
         * @private
         */
        get: function () {
            return this.currentPosition;
        },
        set: function (value) {
            this.currentPosition = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBoolean.prototype, "clonedObject", {
        /**
         * Returns `cloned object`.
         * @private
         */
        get: function () {
            var rValue = null;
            return rValue;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Saves` the object using the specified writer.
     * @private
     */
    PdfBoolean.prototype.save = function (writer) {
        writer.write(this.boolToStr(this.value));
    };
    /**
     * Creates a `copy of PdfBoolean`.
     * @private
     */
    PdfBoolean.prototype.clone = function (crossTable) {
        var newNumber = new PdfBoolean(this.value);
        return newNumber;
    };
    // Implementation
    /**
     * Converts `boolean to string` - 0/1 'true'/'false'.
     * @private
     */
    PdfBoolean.prototype.boolToStr = function (value) {
        return value ? 'true' : 'false';
    };
    return PdfBoolean;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js":
/*!*************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js ***!
  \*************************************************************************************************/
/*! exports provided: PdfDictionary, SaveSectionCollectionEventHandler, SaveDescendantFontEventHandler, SaveFontDictionaryEventHandler, SaveAnnotationEventHandler, SaveSectionEventHandler, SaveTemplateEventHandler */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfDictionary", function() { return PdfDictionary; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveSectionCollectionEventHandler", function() { return SaveSectionCollectionEventHandler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveDescendantFontEventHandler", function() { return SaveDescendantFontEventHandler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveFontDictionaryEventHandler", function() { return SaveFontDictionaryEventHandler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveAnnotationEventHandler", function() { return SaveAnnotationEventHandler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveSectionEventHandler", function() { return SaveSectionEventHandler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveTemplateEventHandler", function() { return SaveTemplateEventHandler; });
/* harmony import */ var _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/* harmony import */ var _pdf_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../input-output/pdf-operators */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js");
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");




/**
 * `PdfDictionary` class is used to perform primitive operations.
 * @private
 */
var PdfDictionary = /** @class */ (function () {
    function PdfDictionary(dictionary) {
        /**
         * Internal variable to store the `position`.
         * @default -1
         * @private
         */
        this.position7 = -1;
        /**
         * The `IPdfSavable` with the specified key.
         * @private
         */
        this.primitiveItems = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
        /**
         * `Start marker` for dictionary.
         * @private
         */
        this.prefix = '<<';
        /**
         * `End marker` for dictionary.
         * @private
         */
        this.suffix = '>>';
        /**
         * @hidden
         * @private
         */
        this.resources = [];
        /**
         * Internal variable to hold `cloned object`.
         * @default null
         * @private
         */
        this.object = null;
        /**
         * Flag for PDF file formar 1.5 is dictionary `archiving` needed.
         * @default true
         * @private
         */
        this.archive = true;
        /**
         * Represents the Font dictionary.
         * @hidden
         * @private
         */
        this.isFont = false;
        if (typeof dictionary === 'undefined') {
            this.primitiveItems = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
            this.encrypt = true;
            this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_3__["DictionaryProperties"]();
        }
        else {
            this.primitiveItems = new _collections_dictionary__WEBPACK_IMPORTED_MODULE_0__["Dictionary"]();
            var keys = dictionary.items.keys();
            var values = dictionary.items.values();
            for (var index = 0; index < dictionary.items.size(); index++) {
                this.primitiveItems.setValue(keys[index], values[index]);
            }
            this.status = dictionary.status;
            this.freezeChanges(this);
            this.encrypt = true;
            this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_3__["DictionaryProperties"]();
        }
    }
    Object.defineProperty(PdfDictionary.prototype, "items", {
        //Properties
        /**
         * Gets or sets the `IPdfSavable` with the specified key.
         * @private
         */
        get: function () {
            return this.primitiveItems;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDictionary.prototype, "status", {
        /**
         * Gets or sets the `Status` of the specified object.
         * @private
         */
        get: function () {
            return this.status7;
        },
        set: function (value) {
            this.status7 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDictionary.prototype, "isSaving", {
        /**
         * Gets or sets a value indicating whether this document `is saving` or not.
         * @private
         */
        get: function () {
            return this.isSaving7;
        },
        set: function (value) {
            this.isSaving7 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDictionary.prototype, "objectCollectionIndex", {
        /**
         * Gets or sets the `index` value of the specified object.
         * @private
         */
        get: function () {
            return this.index7;
        },
        set: function (value) {
            this.index7 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDictionary.prototype, "clonedObject", {
        /**
         * Returns `cloned object`.
         * @private
         */
        get: function () {
            return this.object;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDictionary.prototype, "position", {
        /**
         * Gets or sets the `position` of the object.
         * @private
         */
        get: function () {
            return this.position7;
        },
        set: function (value) {
            this.position7 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDictionary.prototype, "Count", {
        /**
         * Gets the `count`.
         * @private
         */
        get: function () {
            return this.primitiveItems.size();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfDictionary.prototype, "Dictionary", {
        /**
         * Collection of `items` in the object.
         * @private
         */
        get: function () {
            return this;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Get flag if need to `archive` dictionary.
     * @private
     */
    PdfDictionary.prototype.getArchive = function () {
        return this.archive;
    };
    /**
     * Set flag if need to `archive` dictionary.
     * @private
     */
    PdfDictionary.prototype.setArchive = function (value) {
        this.archive = value;
    };
    /**
     * Sets flag if `encryption` is needed.
     * @private
     */
    PdfDictionary.prototype.setEncrypt = function (value) {
        this.encrypt = value;
        this.modify();
    };
    /**
     * Gets flag if `encryption` is needed.
     * @private
     */
    PdfDictionary.prototype.getEncrypt = function () {
        return this.encrypt;
    };
    /**
     * `Freezes` the changes.
     * @private
     */
    PdfDictionary.prototype.freezeChanges = function (freezer) {
        this.bChanged = false;
    };
    /**
     * Creates a `copy of PdfDictionary`.
     * @private
     */
    PdfDictionary.prototype.clone = function (crossTable) {
        //Need to add more codings
        var newDict = new PdfDictionary();
        return newDict;
    };
    /**
     * `Mark` this instance modified.
     * @private
     */
    PdfDictionary.prototype.modify = function () {
        this.bChanged = true;
    };
    /**
     * `Removes` the specified key.
     * @private
     */
    PdfDictionary.prototype.remove = function (key) {
        if (typeof key !== 'string') {
            this.primitiveItems.remove(key.value);
            this.modify();
        }
        else {
            this.remove(new _pdf_name__WEBPACK_IMPORTED_MODULE_1__["PdfName"](key));
        }
    };
    /**
     * `Determines` whether the dictionary contains the key.
     * @private
     */
    PdfDictionary.prototype.containsKey = function (key) {
        var returnValue = false;
        returnValue = this.primitiveItems.containsKey(key.toString());
        return returnValue;
    };
    /**
     * Raises event `BeginSave`.
     * @private
     */
    PdfDictionary.prototype.onBeginSave = function () {
        this.beginSave.sender.beginSave();
    };
    /**
     * Raises event `Font Dictionary BeginSave`.
     * @private
     */
    PdfDictionary.prototype.onFontDictionaryBeginSave = function () {
        this.fontDictionaryBeginSave.sender.fontDictionaryBeginSave();
    };
    /**
     * Raises event `Descendant Font BeginSave`.
     * @private
     */
    PdfDictionary.prototype.onDescendantFontBeginSave = function () {
        this.descendantFontBeginSave.sender.descendantFontBeginSave();
    };
    /**
     * Raises event 'BeginSave'.
     * @private
     */
    PdfDictionary.prototype.onTemplateBeginSave = function () {
        this.pageBeginDrawTemplate.sender.pageBeginSave();
    };
    /**
     * Raises event `BeginSave`.
     * @private
     */
    PdfDictionary.prototype.onBeginAnnotationSave = function () {
        this.annotationBeginSave.sender.beginSave();
    };
    /**
     * Raises event `BeginSave`.
     * @private
     */
    PdfDictionary.prototype.onSectionBeginSave = function (writer) {
        var saveEvent = this.sectionBeginSave;
        saveEvent.sender.beginSave(saveEvent.state, writer);
    };
    PdfDictionary.prototype.save = function (writer, bRaiseEvent) {
        if (typeof bRaiseEvent === 'undefined') {
            this.save(writer, true);
        }
        else {
            writer.write(this.prefix);
            if (typeof this.beginSave !== 'undefined') {
                this.onBeginSave();
            }
            if (typeof this.descendantFontBeginSave !== 'undefined') {
                this.onDescendantFontBeginSave();
            }
            if (typeof this.fontDictionaryBeginSave !== 'undefined') {
                this.onFontDictionaryBeginSave();
            }
            if (typeof this.annotationBeginSave !== 'undefined') {
                this.onBeginAnnotationSave();
            }
            if (typeof this.sectionBeginSave !== 'undefined') {
                this.onSectionBeginSave(writer);
            }
            if (typeof this.pageBeginDrawTemplate !== 'undefined') {
                this.onTemplateBeginSave();
            }
            // }
            if (this.Count > 0) {
                this.saveItems(writer);
            }
            writer.write(this.suffix);
            writer.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_2__["Operators"].newLine);
        }
    };
    /**
     * `Save dictionary items`.
     * @private
     */
    PdfDictionary.prototype.saveItems = function (writer) {
        writer.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_2__["Operators"].newLine);
        var keys = this.primitiveItems.keys();
        var values = this.primitiveItems.values();
        for (var index = 0; index < keys.length; index++) {
            var key = keys[index];
            var name_1 = new _pdf_name__WEBPACK_IMPORTED_MODULE_1__["PdfName"](key);
            name_1.save(writer);
            writer.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_2__["Operators"].whiteSpace);
            var resources = values[index];
            resources.save(writer);
            writer.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_2__["Operators"].newLine);
        }
    };
    return PdfDictionary;
}());

var SaveSectionCollectionEventHandler = /** @class */ (function () {
    /**
     * New instance for `save section collection event handler` class.
     * @private
     */
    function SaveSectionCollectionEventHandler(sender) {
        this.sender = sender;
    }
    return SaveSectionCollectionEventHandler;
}());

var SaveDescendantFontEventHandler = /** @class */ (function () {
    /**
     * New instance for `save section collection event handler` class.
     * @private
     */
    function SaveDescendantFontEventHandler(sender) {
        this.sender = sender;
    }
    return SaveDescendantFontEventHandler;
}());

var SaveFontDictionaryEventHandler = /** @class */ (function () {
    /**
     * New instance for `save section collection event handler` class.
     * @private
     */
    function SaveFontDictionaryEventHandler(sender) {
        this.sender = sender;
    }
    return SaveFontDictionaryEventHandler;
}());

var SaveAnnotationEventHandler = /** @class */ (function () {
    /**
     * New instance for `save annotation event handler` class.
     * @private
     */
    function SaveAnnotationEventHandler(sender) {
        this.sender = sender;
    }
    return SaveAnnotationEventHandler;
}());

var SaveSectionEventHandler = /** @class */ (function () {
    // constructors
    /**
     * New instance for `save section event handler` class.
     * @private
     */
    function SaveSectionEventHandler(sender, state) {
        this.sender = sender;
        this.state = state;
    }
    return SaveSectionEventHandler;
}());

/**
 * SaveTemplateEventHandler class used to store information about template elements.
 * @private
 * @hidden
 */
var SaveTemplateEventHandler = /** @class */ (function () {
    /**
     * New instance for save section collection event handler class.
     * @public
     */
    function SaveTemplateEventHandler(sender) {
        this.sender = sender;
    }
    return SaveTemplateEventHandler;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js ***!
  \*******************************************************************************************/
/*! exports provided: PdfName */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfName", function() { return PdfName; });
/**
 * `PdfName` class is used to perform name (element names) related primitive operations.
 * @private
 */
var PdfName = /** @class */ (function () {
    function PdfName(value) {
        /**
         * `Start symbol` of the name object.
         * @default /
         * @private
         */
        this.stringStartMark = '/';
        /**
         * `Value` of the element.
         * @private
         */
        this.internalValue = '';
        /**
         * Indicates if the object is currently in `saving state or not`.
         * @default false
         * @private
         */
        this.isSaving6 = false;
        /**
         * Internal variable to store the `position`.
         * @default -1
         * @private
         */
        this.position6 = -1;
        this.internalValue = this.normalizeValue(value);
    }
    Object.defineProperty(PdfName.prototype, "status", {
        //property
        /**
         * Gets or sets the `Status` of the specified object.
         * @private
         */
        get: function () {
            return this.status6;
        },
        set: function (value) {
            this.status6 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfName.prototype, "isSaving", {
        /**
         * Gets or sets a value indicating whether this document `is saving` or not.
         * @private
         */
        get: function () {
            return this.isSaving6;
        },
        set: function (value) {
            this.isSaving6 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfName.prototype, "objectCollectionIndex", {
        /**
         * Gets or sets the `index` value of the specified object.
         * @private
         */
        get: function () {
            return this.index6;
        },
        set: function (value) {
            this.index6 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfName.prototype, "position", {
        /**
         * Gets or sets the `position` of the object.
         * @private
         */
        get: function () {
            return this.position6;
        },
        set: function (value) {
            this.position6 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfName.prototype, "clonedObject", {
        /**
         * Returns `cloned object`.
         * @private
         */
        get: function () {
            return null;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfName.prototype, "value", {
        /**
         * Gets or sets the `value` of the object.
         * @private
         */
        get: function () {
            return this.internalValue;
        },
        set: function (value) {
            // if (value !== this.value) {
            var val = value;
            if (value !== null && value.length > 0) {
                // val = (value.substring(0, 1) === this.stringStartMark) ? value.substring(1) : value;
                val = value;
                this.internalValue = this.normalizeValue(val);
            }
            else {
                this.internalValue = val;
            }
            // }
        },
        enumerable: true,
        configurable: true
    });
    //public methods
    /**
     * `Saves` the name using the specified writer.
     * @private
     */
    PdfName.prototype.save = function (writer) {
        // if (writer === null) {
        //     throw new Error('ArgumentNullException : writer');
        // }
        writer.write(this.toString());
    };
    /**
     * Gets `string` representation of the primitive.
     * @private
     */
    PdfName.prototype.toString = function () {
        return (this.stringStartMark + this.escapeString(this.value));
    };
    /**
     * Creates a `copy of PdfName`.
     * @private
     */
    PdfName.prototype.clone = function (crossTable) {
        var newName = new PdfName();
        newName.value = this.internalValue;
        return newName;
    };
    /**
     * Replace some characters with its `escape sequences`.
     * @private
     */
    PdfName.prototype.escapeString = function (stringValue) {
        // if (str === null) {
        //     throw new Error('ArgumentNullException : str');
        // }
        // if (str === '') {
        //     return str;
        // }
        var result = '';
        var len = 0;
        for (var i = 0, len_1 = stringValue.length; i < len_1; i++) {
            var ch = stringValue[i];
            var index = PdfName.delimiters.indexOf(ch);
            // switch (ch) {
            //     case '\r' :
            //         result = result + '\\r';
            //         break;
            //     case '\n' :
            //         result = result + '\n';
            //         break;
            //     case '(' :
            //     case ')' :
            //     case '\\' :
            //         //result.Append( '\\' ).Append( ch );
            //         result = result + ch;
            //         break;
            //     default :
            //         result = result + ch;
            //         break;
            // }
            result = result + ch;
        }
        return result;
    };
    //methiods
    /**
     * Replace a symbol with its code with the precedence of the `sharp sign`.
     * @private
     */
    PdfName.prototype.normalizeValue = function (value, c) {
        // if (typeof c === undefined) {
        //     let str : string = value;
        //     for (let i : number = 0; i < PdfName.replacements.length; i++) {
        //         str = this.normalizeValue(str, c);
        //     }
        //     return str;
        // } else {
        var strFormat = '#{0:X}';
        //return value.replace(c.toString(),String.format(strFormat,c));
        return value;
        // }
    };
    /**
     * PDF `special characters`.
     * @private
     */
    PdfName.delimiters = '()<>[]{}/%}';
    /**
     * The symbols that are not allowed in PDF names and `should be replaced`.
     * @private
     */
    PdfName.replacements = [' ', '\t', '\n', '\r'];
    return PdfName;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js ***!
  \*********************************************************************************************/
/*! exports provided: PdfNumber */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfNumber", function() { return PdfNumber; });
/**
 * `PdfNumber` class is used to perform number related primitive operations.
 * @private
 */
var PdfNumber = /** @class */ (function () {
    /**
     * Initializes a new instance of the `PdfNumber` class.
     * @private
     */
    function PdfNumber(value) {
        /**
         * Sotres the `position`.
         * @default -1
         * @private
         */
        this.position5 = -1;
        this.value = value;
    }
    Object.defineProperty(PdfNumber.prototype, "intValue", {
        /**
         * Gets or sets the `integer` value.
         * @private
         */
        get: function () {
            return this.value;
        },
        set: function (value) {
            this.value = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfNumber.prototype, "isInteger", {
        /**
         * Gets or sets a value indicating whether this instance `is integer`.
         * @private
         */
        get: function () {
            return this.integer;
        },
        set: function (value) {
            this.integer = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfNumber.prototype, "status", {
        /**
         * Gets or sets the `Status` of the specified object.
         * @private
         */
        get: function () {
            return this.status5;
        },
        set: function (value) {
            this.status5 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfNumber.prototype, "isSaving", {
        /**
         * Gets or sets a value indicating whether this document `is saving` or not.
         * @private
         */
        get: function () {
            return this.isSaving5;
        },
        set: function (value) {
            this.isSaving5 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfNumber.prototype, "objectCollectionIndex", {
        /**
         * Gets or sets the `index` value of the specified object.
         * @private
         */
        get: function () {
            return this.index5;
        },
        set: function (value) {
            this.index5 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfNumber.prototype, "position", {
        /**
         * Gets or sets the `position` of the object.
         * @private
         */
        get: function () {
            return this.position5;
        },
        set: function (value) {
            this.position5 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfNumber.prototype, "clonedObject", {
        /**
         * Returns `cloned object`.
         * @private
         */
        get: function () {
            var rValue = null;
            return rValue;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Saves the object`.
     * @private
     */
    PdfNumber.prototype.save = function (writer) {
        writer.write(this.intValue.toString()); //tostring(CultureInfo.InletiantCulture)
    };
    /**
     * Creates a `copy of PdfNumber`.
     * @private
     */
    PdfNumber.prototype.clone = function (crossTable) {
        var newNumber = new PdfNumber(this.value);
        return newNumber;
    };
    /**
     * Converts a `float value to a string` using Adobe PDF rules.
     * @private
     */
    PdfNumber.floatToString = function (number) {
        // let tempString1 : string = number.toString();
        // let tempString2 : string = tempString1.indexOf('.') != -1 ? tempString1.substring(0, tempString1.indexOf('.')) : tempString1;
        var returnString = number.toFixed(2);
        if (returnString === '0.00') {
            returnString = '.00';
        }
        // let prefixLength : number = (22 - tempString2.length) >= 0 ? (22 - tempString2.length) : 0;
        // for (let index : number = 0; index < prefixLength; index++) {
        //     returnString += '0';
        // }
        // returnString += tempString2 + '.00';
        // returnString += (tempString3.length > 6) ? tempString3.substring(0,6) : tempString3;
        // let suffixLength : number = (6 - tempString3.length) >= 0 ? (6 - tempString3.length) : 0;
        // for (let index : number = 0; index < suffixLength; index++) {
        //     returnString += '0';
        // }
        return returnString;
    };
    /**
     * Determines the `minimum of the three values`.
     * @private
     */
    PdfNumber.min = function (x, y, z) {
        var r = Math.min(x, y);
        return Math.min(z, r);
    };
    return PdfNumber;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js":
/*!************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js ***!
  \************************************************************************************************/
/*! exports provided: PdfReference, PdfReferenceHolder */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfReference", function() { return PdfReference; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfReferenceHolder", function() { return PdfReferenceHolder; });
/* harmony import */ var _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony import */ var _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../primitives/pdf-stream */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js");
/* harmony import */ var _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../primitives/pdf-string */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js");







/**
 * `PdfReference` class is used to perform reference related primitive operations.
 * @private
 */
var PdfReference = /** @class */ (function () {
    function PdfReference(objNumber, genNumber) {
        /**
         * Holds the `index` number of the object.
         * @default -1
         * @private
         */
        this.index3 = -1;
        /**
         * Internal variable to store the `position`.
         * @default -1
         * @private
         */
        this.position3 = -1;
        /**
         * Holds the `object number`.
         * @default 0
         * @private
         */
        this.objNumber = 0;
        /**
         * Holds the `generation number` of the object.
         * @default 0
         * @private
         */
        this.genNumber = 0;
        if (typeof objNumber === 'number' && typeof genNumber === 'number') {
            this.objNumber = objNumber;
            this.genNumber = genNumber;
            // } else if (typeof objNum === 'string' && typeof genNum === 'string') {
        }
        else {
            this.objNumber = Number(objNumber);
            this.genNumber = Number(genNumber);
        }
    }
    Object.defineProperty(PdfReference.prototype, "status", {
        //Property
        /**
         * Gets or sets the `Status` of the specified object.
         * @private
         */
        get: function () {
            return this.status3;
        },
        set: function (value) {
            this.status3 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReference.prototype, "isSaving", {
        /**
         * Gets or sets a value indicating whether this document `is saving` or not.
         * @private
         */
        get: function () {
            return this.isSaving3;
        },
        set: function (value) {
            this.isSaving3 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReference.prototype, "objectCollectionIndex", {
        /**
         * Gets or sets the `index` value of the specified object.
         * @private
         */
        get: function () {
            return this.index3;
        },
        set: function (value) {
            this.index3 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReference.prototype, "position", {
        /**
         * Gets or sets the `position` of the object.
         * @private
         */
        get: function () {
            return this.position3;
        },
        set: function (value) {
            this.position3 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReference.prototype, "clonedObject", {
        /**
         * Returns `cloned object`.
         * @private
         */
        get: function () {
            var returnObject3 = null;
            return returnObject3;
        },
        enumerable: true,
        configurable: true
    });
    //IPdfPrimitives methods
    /**
     * `Saves` the object.
     * @private
     */
    PdfReference.prototype.save = function (writer) {
        writer.write(this.toString());
    };
    /**
     * Returns a `string` representing the object.
     * @private
     */
    PdfReference.prototype.toString = function () {
        return this.objNumber.toString() + ' ' + this.genNumber.toString() + ' R';
    };
    /**
     * Creates a `deep copy` of the IPdfPrimitive object.
     * @private
     */
    PdfReference.prototype.clone = function (crossTable) {
        return null;
    };
    return PdfReference;
}());

/**
 * `PdfReferenceHolder` class is used to perform reference holder related primitive operations.
 * @private
 */
var PdfReferenceHolder = /** @class */ (function () {
    function PdfReferenceHolder(obj1, obj2) {
        /**
         * Holds the `index` number of the object.
         * @default -1
         * @private
         */
        this.index4 = -1;
        /**
         * Internal variable to store the `position`.
         * @default -1
         * @private
         */
        this.position4 = -1;
        /**
         * The `index` of the object within the object collection.
         * @default -1
         * @private
         */
        this.objectIndex = -1;
        /**
         * @hidden
         * @private
         */
        this.dictionaryProperties = new _input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_0__["DictionaryProperties"]();
        // if (typeof obj2 === 'undefined') {
        if (obj1 instanceof _primitives_pdf_array__WEBPACK_IMPORTED_MODULE_2__["PdfArray"]
            || obj1 instanceof _primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_5__["PdfDictionary"]
            || obj1 instanceof _primitives_pdf_name__WEBPACK_IMPORTED_MODULE_4__["PdfName"]
            || obj1 instanceof _primitives_pdf_number__WEBPACK_IMPORTED_MODULE_3__["PdfNumber"]
            || obj1 instanceof _primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_1__["PdfStream"]
            || obj1 instanceof PdfReference
            || obj1 instanceof _primitives_pdf_string__WEBPACK_IMPORTED_MODULE_6__["PdfString"]) {
            // if (obj1 === null) {
            //     throw new Error('ArgumentNullException : obj');
            // }
            this.primitiveObject = obj1;
            // } else if (obj1 instanceof PdfPageBase
            //             || obj1 instanceof PdfPage
            //             || obj1 instanceof PdfSection
            //             || obj1 instanceof PdfSectionCollection) {
        }
        else {
            var tempObj = obj1;
            this.constructor(tempObj.element);
        }
        // }
        // else {
        //     if (obj2 === null) {
        //         throw new Error('ArgumentNullException : crossTable');
        //     }
        //     if (obj1 === null) {
        //         throw new Error('ArgumentNullException : reference');
        //     }
        //     this.crossTable = obj2;
        //     let tempObj1 : PdfReference = <PdfReference>obj1;
        //     this.reference = tempObj1;
        // }
    }
    Object.defineProperty(PdfReferenceHolder.prototype, "status", {
        //Properties
        /**
         * Gets or sets the `Status` of the specified object.
         * @private
         */
        get: function () {
            return this.status4;
        },
        set: function (value) {
            this.status4 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReferenceHolder.prototype, "isSaving", {
        /**
         * Gets or sets a value indicating whether this document `is saving` or not.
         * @private
         */
        get: function () {
            return this.isSaving4;
        },
        set: function (value) {
            this.isSaving4 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReferenceHolder.prototype, "objectCollectionIndex", {
        /**
         * Gets or sets the `index` value of the specified object.
         * @private
         */
        get: function () {
            return this.index4;
        },
        set: function (value) {
            this.index4 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReferenceHolder.prototype, "position", {
        /**
         * Gets or sets the `position` of the object.
         * @private
         */
        get: function () {
            return this.position4;
        },
        set: function (value) {
            this.position4 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReferenceHolder.prototype, "clonedObject", {
        /**
         * Returns `cloned object`.
         * @private
         */
        get: function () {
            return null;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReferenceHolder.prototype, "object", {
        /**
         * Gets the `object` the reference is of.
         * @private
         */
        get: function () {
            // if ((this.reference != null) || (this.object == null)) {
            //     this.object = this.GetterObject();
            // }
            return this.primitiveObject;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReferenceHolder.prototype, "reference", {
        /**
         * Gets the `reference`.
         * @private
         */
        get: function () {
            return this.pdfReference;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReferenceHolder.prototype, "index", {
        /**
         * Gets the `index` of the object.
         * @private
         */
        get: function () {
            // let items : PdfMainObjectCollection = this.crossTable.PdfObjects;
            // this.objectIndex = items.GetObjectIndex(this.reference);
            // if (this.objectIndex < 0) {
            //     let obj : IPdfPrimitive = this.crossTable.GetObject(this.reference);
            //     this.objectIndex = items.Count - 1;
            // }
            return this.objectIndex;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfReferenceHolder.prototype, "element", {
        /**
         * Gets the `element`.
         * @private
         */
        get: function () {
            return this.primitiveObject;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Writes` a reference into a PDF document.
     * @private
     */
    PdfReferenceHolder.prototype.save = function (writer) {
        // if (writer == null) {
        //     throw new Error('ArgumentNullException : writer');
        // }
        var position = writer.position;
        var cTable = writer.document.crossTable;
        // if (cTable.Document instanceof PdfDocument) {
        this.object.isSaving = true;
        // }
        var reference = null;
        // if (writer.Document.FileStructure.IncrementalUpdate === true && writer.Document.isStreamCopied === true) {
        //     if (this.reference === null) {
        //         reference = cTable.GetReference(this.Object);
        //     } else {
        //         reference = this.reference;
        //     }
        // } else {
        //     reference = cTable.GetReference(this.Object);
        // }
        // if (!(writer.Document.FileStructure.IncrementalUpdate === true && writer.Document.isStreamCopied === true)) {
        reference = cTable.getReference(this.object);
        // }
        // if (writer.Position !== position) {
        //     writer.Position = position;
        // }
        reference.save(writer);
    };
    /**
     * Creates a `copy of PdfReferenceHolder`.
     * @private
     */
    PdfReferenceHolder.prototype.clone = function (crossTable) {
        var refHolder = null;
        var temp = null;
        var refNum = '';
        var reference = null;
        // Restricts addition of same object multiple time.
        /* if (this.Reference != null && this.crossTable != null && this.crossTable.PageCorrespondance.containsKey(this.Reference)) {
            refHolder = new PdfReferenceHolder(this.crossTable.PageCorrespondance.getValue(this.Reference) as PdfReference, crossTable);
            return refHolder;
        }
        if (Object instanceof PdfNumber) {
            return new PdfNumber((Object as PdfNumber).IntValue);
        }
        */
        // if (Object instanceof PdfDictionary) {
        //     // Meaning the referenced page is not available for import.
        //     let type : PdfName = new PdfName(this.dictionaryProperties.type);
        //     let dict : PdfDictionary = Object as PdfDictionary;
        //     if (dict.ContainsKey(type)) {
        //         let pageName : PdfName = dict.Items.getValue(type.Value) as PdfName;
        //         if (pageName !== null) {
        //             if (pageName.Value === 'Page') {
        //                 return new PdfNull();
        //             }
        //         }
        //     }
        // }
        /* if (Object instanceof PdfName) {
            return new PdfName ((Object as PdfName ).Value);
        }
        */
        // Resolves circular references.
        // if (crossTable.PrevReference !== null && (crossTable.PrevReference.indexOf(this.Reference) !== -1)) {
        //     let obj : IPdfPrimitive = this.crossTable.GetObject(this.Reference).ClonedObject;
        //     if (obj !== null) {
        //         reference = crossTable.GetReference(obj);
        //         return new PdfReferenceHolder(reference, crossTable);
        //     } else {
        //         return new PdfNull();
        //     }
        // }
        /*if (this.Reference !== null) {
            crossTable.PrevReference.push(this.Reference);
        }
        reference = crossTable.GetReference(temp);
        refHolder = new PdfReferenceHolder(reference, crossTable);
        return refHolder;
        */
        return null;
    };
    return PdfReferenceHolder;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js ***!
  \*********************************************************************************************/
/*! exports provided: PdfStream, SaveCmapEventHandler, SaveFontProgramEventHandler */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfStream", function() { return PdfStream; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveCmapEventHandler", function() { return SaveCmapEventHandler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveFontProgramEventHandler", function() { return SaveFontProgramEventHandler; });
/* harmony import */ var _pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony import */ var _pdf_number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony import */ var _input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../input-output/pdf-operators */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js");
/* harmony import */ var _pdf_name__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony import */ var _pdf_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony import */ var _pdf_reference__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony import */ var _syncfusion_ej2_compression__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @syncfusion/ej2-compression */ "./node_modules/@syncfusion/ej2-compression/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







/**
 * `PdfStream` class is used to perform stream related primitive operations.
 * @private
 */
var PdfStream = /** @class */ (function (_super) {
    __extends(PdfStream, _super);
    function PdfStream(dictionary, data) {
        var _this = _super.call(this, dictionary) || this;
        //Constants
        /**
         * @hidden
         * @private
         */
        _this.dicPrefix = 'stream';
        /**
         * @hidden
         * @private
         */
        _this.dicSuffix = 'endstream';
        /**
         * Internal variable to hold `cloned object`.
         * @private
         */
        _this.clonedObject2 = null;
        /**
         * @hidden
         * @private
         */
        _this.bCompress = true;
        /**
         * @hidden
         * @private
         */
        _this.isImageStream = false;
        /**
         * @hidden
         * @private
         */
        _this.isFontStream = false;
        if (typeof dictionary !== 'undefined' || typeof data !== 'undefined') {
            _this.dataStream2 = [];
            _this.dataStream2 = data;
            _this.bCompress2 = false;
        }
        else {
            _this.dataStream2 = [];
            _this.bCompress2 = true;
            //Pending
        }
        return _this;
    }
    Object.defineProperty(PdfStream.prototype, "internalStream", {
        /**
         * Gets the `internal` stream.
         * @private
         */
        get: function () {
            return this.dataStream2;
        },
        set: function (value) {
            this.dataStream2 = [];
            this.dataStream2 = value;
            this.modify();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStream.prototype, "isImage", {
        /**
         * Gets or sets 'is image' flag.
         * @private
         */
        get: function () {
            return this.isImageStream;
        },
        set: function (value) {
            this.isImageStream = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStream.prototype, "isFont", {
        /**
         * Gets or sets 'is font' flag.
         * @private
         */
        get: function () {
            return this.isFontStream;
        },
        set: function (value) {
            this.isFontStream = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStream.prototype, "compress", {
        /**
         * Gets or sets `compression` flag.
         * @private
         */
        get: function () {
            return this.bCompress;
        },
        set: function (value) {
            this.bCompress = value;
            this.modify();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfStream.prototype, "data", {
        /**
         * Gets or sets the `data`.
         * @private
         */
        get: function () {
            return this.dataStream2;
        },
        set: function (value) {
            this.dataStream2 = [];
            this.dataStream2 = value;
            this.modify();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * `Clear` the internal stream.
     * @private
     */
    PdfStream.prototype.clearStream = function () {
        this.internalStream = [];
        if (this.items.containsKey(this.dictionaryProperties.filter)) {
            this.remove(this.dictionaryProperties.filter);
        }
        this.bCompress = true;
        this.modify();
    };
    /**
     * `Writes` the specified string.
     * @private
     */
    PdfStream.prototype.write = function (text) {
        if (text == null) {
            throw new Error('ArgumentNullException:text');
        }
        if (text.length <= 0) {
            throw new Error('ArgumentException: Can not write an empty string, text');
        }
        this.dataStream2.push(text);
        this.modify();
    };
    /**
     * `Writes` the specified bytes.
     * @private
     */
    PdfStream.prototype.writeBytes = function (data) {
        if (data === null) {
            throw new Error('ArgumentNullException:data');
        }
        if (data.length <= 0) {
            throw new Error('ArgumentException: Can not write an empty bytes, data');
        }
        var text = '';
        for (var i = 0; i < data.length; i++) {
            text += String.fromCharCode(data[i]);
        }
        this.dataStream2.push(text);
        this.modify();
    };
    /**
     * Raises event `Cmap BeginSave`.
     * @private
     */
    PdfStream.prototype.onCmapBeginSave = function () {
        this.cmapBeginSave.sender.cmapBeginSave();
    };
    /**
     * Raises event `Font Program BeginSave`.
     * @private
     */
    PdfStream.prototype.onFontProgramBeginSave = function () {
        this.fontProgramBeginSave.sender.fontProgramBeginSave();
    };
    /**
     * `Compresses the content` if it's required.
     * @private
     */
    PdfStream.prototype.compressContent = function (data, writer) {
        if (this.bCompress) {
            var byteArray = [];
            for (var i = 0; i < data.length; i++) {
                byteArray.push(data.charCodeAt(i));
            }
            var dataArray = new Uint8Array(byteArray);
            var sw = new _syncfusion_ej2_compression__WEBPACK_IMPORTED_MODULE_6__["CompressedStreamWriter"]();
            // data = 'Hello World!!!';
            sw.write(dataArray, 0, dataArray.length);
            sw.close();
            data = sw.getCompressedString;
            this.addFilter(this.dictionaryProperties.flatedecode);
        }
        return data;
    };
    /**
     * `Adds a filter` to the filter array.
     * @private
     */
    PdfStream.prototype.addFilter = function (filterName) {
        var obj = this.items.getValue(this.dictionaryProperties.filter);
        if (obj instanceof _pdf_reference__WEBPACK_IMPORTED_MODULE_5__["PdfReferenceHolder"]) {
            var rh = obj;
            obj = rh.object;
        }
        var array = obj;
        var name = obj;
        if (name != null) {
            array = new _pdf_array__WEBPACK_IMPORTED_MODULE_4__["PdfArray"]();
            array.insert(0, name);
            this.items.setValue(this.dictionaryProperties.filter, array);
        }
        name = new _pdf_name__WEBPACK_IMPORTED_MODULE_3__["PdfName"](filterName);
        if (array == null) {
            this.items.setValue(this.dictionaryProperties.filter, name);
        }
        else {
            array.insert(0, name);
        }
    };
    /**
     * `Saves` the object using the specified writer.
     * @private
     */
    PdfStream.prototype.save = function (writer) {
        if (typeof this.cmapBeginSave !== 'undefined') {
            this.onCmapBeginSave();
        }
        if (typeof this.fontProgramBeginSave !== 'undefined') {
            this.onFontProgramBeginSave();
        }
        var data = '';
        for (var i = 0; i < this.data.length; i++) {
            data = data + this.data[i];
        }
        if (data.length > 1 && !this.isImage && !this.isFont) {
            data = 'q\r\n' + data + 'Q\r\n';
        }
        data = this.compressContent(data, writer);
        var length = data.length;
        this.items.setValue(this.dictionaryProperties.length, new _pdf_number__WEBPACK_IMPORTED_MODULE_1__["PdfNumber"](length));
        _super.prototype.save.call(this, writer, false);
        writer.write(this.dicPrefix);
        writer.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_2__["Operators"].newLine);
        if (data.length > 0) {
            writer.write(data);
        }
        writer.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_2__["Operators"].newLine);
        writer.write(this.dicSuffix);
        writer.write(_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_2__["Operators"].newLine);
    };
    /**
     * Converts `bytes to string`.
     * @private
     */
    PdfStream.bytesToString = function (byteArray) {
        var output = '';
        for (var i = 0; i < byteArray.length; i++) {
            output = output + String.fromCharCode(byteArray[i]);
        }
        return output;
    };
    return PdfStream;
}(_pdf_dictionary__WEBPACK_IMPORTED_MODULE_0__["PdfDictionary"]));

var SaveCmapEventHandler = /** @class */ (function () {
    /**
     * New instance for `save section collection event handler` class.
     * @private
     */
    function SaveCmapEventHandler(sender) {
        this.sender = sender;
    }
    return SaveCmapEventHandler;
}());

var SaveFontProgramEventHandler = /** @class */ (function () {
    /**
     * New instance for `save section collection event handler` class.
     * @private
     */
    function SaveFontProgramEventHandler(sender) {
        this.sender = sender;
    }
    return SaveFontProgramEventHandler;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js ***!
  \*********************************************************************************************/
/*! exports provided: InternalEnum, PdfString */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InternalEnum", function() { return InternalEnum; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfString", function() { return PdfString; });
/**
 * `PdfString` class is used to perform string related primitive operations.
 * @private
 */
var InternalEnum;
(function (InternalEnum) {
    //Internals
    /**
     * public Enum for `ForceEncoding`.
     * @private
     */
    var ForceEncoding;
    (function (ForceEncoding) {
        /**
         * Specifies the type of `None`.
         * @private
         */
        ForceEncoding[ForceEncoding["None"] = 0] = "None";
        /**
         * Specifies the type of `Ascii`.
         * @private
         */
        ForceEncoding[ForceEncoding["Ascii"] = 1] = "Ascii";
        /**
         * Specifies the type of `Unicode`.
         * @private
         */
        ForceEncoding[ForceEncoding["Unicode"] = 2] = "Unicode";
    })(ForceEncoding = InternalEnum.ForceEncoding || (InternalEnum.ForceEncoding = {}));
    /**
     * public Enum for `SourceType`.
     * @private
     */
    var SourceType;
    (function (SourceType) {
        /**
         * Specifies the type of `StringValue`.
         * @private
         */
        SourceType[SourceType["StringValue"] = 0] = "StringValue";
        /**
         * Specifies the type of `ByteBuffer`.
         * @private
         */
        SourceType[SourceType["ByteBuffer"] = 1] = "ByteBuffer";
    })(SourceType || (SourceType = {}));
})(InternalEnum || (InternalEnum = {}));
var PdfString = /** @class */ (function () {
    function PdfString(value) {
        /**
         * Value indicating whether the string was converted to hex.
         * @default false
         * @private
         */
        this.bHex = false;
        /**
         * Internal variable to store the `position`.
         * @default -1
         * @private
         */
        this.position1 = -1;
        /**
         * Internal variable to hold `cloned object`.
         * @default null
         * @private
         */
        this.clonedObject1 = null;
        /**
         * `Shows` if the data of the stream was decrypted.
         * @default false
         * @private
         */
        this.bDecrypted = false;
        /**
         * Shows if the data of the stream `was decrypted`.
         * @default false
         * @private
         */
        this.isParentDecrypted = false;
        /**
         * Gets a value indicating whether the object is `packed or not`.
         * @default false
         * @private
         */
        this.isPacked = false;
        /**
         * @hidden
         * @private
         */
        this.isFormField = false;
        /**
         * @hidden
         * @private
         */
        this.isColorSpace = false;
        /**
         * @hidden
         * @private
         */
        this.isHexString = true;
        if (typeof value === 'undefined') {
            this.bHex = false;
        }
        else {
            if (!(value.length > 0 && value[0] === '0xfeff')) {
                this.stringValue = value;
                this.data = [];
                for (var i = 0; i < value.length; ++i) {
                    this.data.push(value.charCodeAt(i));
                }
            }
        }
    }
    Object.defineProperty(PdfString.prototype, "hex", {
        //Property
        /**
         * Gets a value indicating whether string is in `hex`.
         * @private
         */
        get: function () {
            return this.bHex;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfString.prototype, "value", {
        /**
         * Gets or sets string `value` of the object.
         * @private
         */
        get: function () {
            return this.stringValue;
        },
        set: function (value) {
            this.stringValue = value;
            this.data = null;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfString.prototype, "status", {
        /**
         * Gets or sets the `Status` of the specified object.
         * @private
         */
        get: function () {
            return this.status1;
        },
        set: function (value) {
            this.status1 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfString.prototype, "isSaving", {
        /**
         * Gets or sets a value indicating whether this document `is saving` or not.
         * @private
         */
        get: function () {
            return this.isSaving1;
        },
        set: function (value) {
            this.isSaving1 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfString.prototype, "objectCollectionIndex", {
        /**
         * Gets or sets the `index` value of the specified object.
         * @private
         */
        get: function () {
            return this.index1;
        },
        set: function (value) {
            this.index1 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfString.prototype, "clonedObject", {
        /**
         * Returns `cloned object`.
         * @private
         */
        get: function () {
            return this.clonedObject1;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfString.prototype, "position", {
        /**
         * Gets or sets the `position` of the object.
         * @private
         */
        get: function () {
            return this.position1;
        },
        set: function (value) {
            this.position1 = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfString.prototype, "CrossTable", {
        /**
         * Returns `PdfCrossTable` associated with the object.
         * @private
         */
        get: function () {
            return this.crossTable;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfString.prototype, "converted", {
        /**
         * Gets a value indicating whether to check if the value has unicode characters.
         * @private
         */
        get: function () {
            return this.bConverted;
        },
        /**
         * sets a value indicating whether to check if the value has unicode characters.
         * @private
         */
        set: function (value) {
            this.bConverted = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfString.prototype, "encode", {
        /**
         * Gets value indicating whether we should convert data to Unicode.
         */
        get: function () {
            return this.bForceEncoding;
        },
        set: function (value) {
            this.bForceEncoding = value;
        },
        enumerable: true,
        configurable: true
    });
    //Methods
    /**
     * Converts `bytes to string using hex format` for representing string.
     * @private
     */
    PdfString.bytesToHex = function (bytes) {
        if (bytes == null) {
            return '';
        }
        var builder = '';
        return builder;
    };
    /**
     * `Saves` the object using the specified writer.
     * @private
     */
    PdfString.prototype.save = function (writer) {
        if (writer === null) {
            throw new Error('ArgumentNullException : writer');
        }
        if (this.encode !== undefined && this.encode === InternalEnum.ForceEncoding.Ascii) {
            writer.write(this.pdfEncode());
        }
        else {
            writer.write(PdfString.stringMark[0] + this.value + PdfString.stringMark[1]);
        }
    };
    PdfString.prototype.pdfEncode = function () {
        var result = '';
        if (this.encode !== undefined && this.encode === InternalEnum.ForceEncoding.Ascii) {
            var data = this.escapeSymbols(this.value);
            for (var i = 0; i < data.length; i++) {
                result += String.fromCharCode(data[i]);
            }
            result = PdfString.stringMark[0] + result + PdfString.stringMark[1];
        }
        else {
            result = this.value;
        }
        return result;
    };
    PdfString.prototype.escapeSymbols = function (value) {
        var data = [];
        for (var i = 0; i < value.length; i++) {
            var currentData = value.charCodeAt(i);
            switch (currentData) {
                case 40:
                case 41:
                    data.push(92);
                    data.push(currentData);
                    break;
                case 13:
                    data.push(92);
                    data.push(114);
                    break;
                case 92:
                    data.push(92);
                    data.push(currentData);
                    break;
                default:
                    data.push(currentData);
                    break;
            }
        }
        return data;
    };
    /**
     * Creates a `copy of PdfString`.
     * @private
     */
    PdfString.prototype.clone = function (crossTable) {
        if (this.clonedObject1 !== null && this.clonedObject1.CrossTable === crossTable) {
            return this.clonedObject1;
        }
        else {
            this.clonedObject1 = null;
        }
        var newString = new PdfString(this.stringValue);
        newString.bHex = this.bHex;
        newString.crossTable = crossTable;
        newString.isColorSpace = this.isColorSpace;
        this.clonedObject1 = newString;
        return newString;
    };
    /**
     * Converts string to array of unicode symbols.
     */
    PdfString.toUnicodeArray = function (value, bAddPrefix) {
        if (value == null) {
            throw new Error('Argument Null Exception : value');
        }
        var startIndex = 0;
        var output = [];
        for (var i = 0; i < value.length; i++) {
            var code = value.charCodeAt(i);
            output.push(code / 256 >>> 0);
            output.push(code & 0xff);
        }
        return output;
    };
    /**
     * Converts byte data to string.
     */
    PdfString.byteToString = function (data) {
        if (data == null) {
            throw new Error('Argument Null Exception : stream');
        }
        var result = '';
        for (var i = 0; i < data.length; ++i) {
            result += String.fromCharCode(data[i]);
        }
        return result;
    };
    //constants = ;
    /**
     * `General markers` for string.
     * @private
     */
    PdfString.stringMark = '()';
    /**
     * `Hex markers` for string.
     * @private
     */
    PdfString.hexStringMark = '<>';
    /**
     * Format of password data.
     * @private
     */
    PdfString.hexFormatPattern = '{0:X2}';
    return PdfString;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/layout/grid-layouter.js":
/*!*********************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/layout/grid-layouter.js ***!
  \*********************************************************************************************************************/
/*! exports provided: PdfGridLayouter, PdfGridLayoutResult, PdfGridLayoutFormat, GridCellEventArgs, PdfGridBeginCellDrawEventArgs, PdfGridEndCellDrawEventArgs, PdfCancelEventArgs, BeginPageLayoutEventArgs, EndPageLayoutEventArgs, PdfGridBeginPageLayoutEventArgs, PdfGridEndPageLayoutEventArgs, RowLayoutResult */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridLayouter", function() { return PdfGridLayouter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridLayoutResult", function() { return PdfGridLayoutResult; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridLayoutFormat", function() { return PdfGridLayoutFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridCellEventArgs", function() { return GridCellEventArgs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridBeginCellDrawEventArgs", function() { return PdfGridBeginCellDrawEventArgs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridEndCellDrawEventArgs", function() { return PdfGridEndCellDrawEventArgs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfCancelEventArgs", function() { return PdfCancelEventArgs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BeginPageLayoutEventArgs", function() { return BeginPageLayoutEventArgs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EndPageLayoutEventArgs", function() { return EndPageLayoutEventArgs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridBeginPageLayoutEventArgs", function() { return PdfGridBeginPageLayoutEventArgs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridEndPageLayoutEventArgs", function() { return PdfGridEndPageLayoutEventArgs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowLayoutResult", function() { return RowLayoutResult; });
/* harmony import */ var _pdf_grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pdf-grid */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid.js");
/* harmony import */ var _graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../../graphics/fonts/pdf-string-format */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _styles_pdf_borders__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles/pdf-borders */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/pdf-borders.js");
/* harmony import */ var _graphics_figures_enum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../../graphics/figures/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/enum.js");
/* harmony import */ var _graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../../graphics/figures/base/element-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js");
/* harmony import */ var _styles_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/style */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/style.js");
/* harmony import */ var _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../../../collections/object-object-pair/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/object-object-pair/dictionary.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();








/**
 * Class `lay outing the text`.
 *
 */
var PdfGridLayouter = /** @class */ (function (_super) {
    __extends(PdfGridLayouter, _super);
    //constructor
    /**
     * Initialize a new instance for `PdfGrid` class.
     * @private
     */
    function PdfGridLayouter(baseFormat) {
        var _this = _super.call(this, baseFormat) || this;
        /**
         * @hidden
         * @private
         */
        _this.gridInitialWidth = 0;
        /**
         * @hidden
         * @private
         */
        _this.gridSize = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](0, 0);
        _this.parentCellIndex = 0;
        _this.tempWidth = 0;
        _this.childheight = 0;
        /**
         * Check weather it is `child grid or not`.
         * @private
         */
        _this.isChildGrid = false;
        /**
         * @hidden
         * @private
         */
        _this.hasRowSpanSpan = false;
        /**
         * @hidden
         * @private
         */
        _this.isRearranged = false;
        /**
         * @hidden
         * @private
         */
        _this.pageBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"]();
        /**
         * @hidden
         * @private
         */
        _this.listOfNavigatePages = [];
        /**
         * @hidden
         * @private
         */
        _this.flag = true;
        /**
         * @hidden
         * @private
         */
        _this.columnRanges = [];
        /**
         * @hidden
         * @private
         */
        _this.currentLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](0, 0);
        /**
         * @hidden
         * @private
         */
        _this.breakRow = true;
        /**
         * Checks whether the x co-ordinate is need to set as client size or not.
         * @hidden
         * @private
         */
        _this.isOverloadWithPosition = false;
        return _this;
    }
    Object.defineProperty(PdfGridLayouter.prototype, "Grid", {
        //Properties
        get: function () {
            return this.elements;
        },
        enumerable: true,
        configurable: true
    });
    // Constructors
    /**
     * Initializes a new instance of the `StringLayouter` class.
     * @private
     */
    //Public methods
    /**
     * `Layouts` the text.
     * @private
     */
    /**
     * `Layouts` the specified graphics.
     * @private
     */
    /**
     * `Layouts` the specified graphics.
     * @private
     */
    /*public layout(graphics : PdfLayoutParams) : PdfLayoutResult
    public layout(graphics : PdfGraphics, bounds : RectangleF) : void
    public layout(graphics : PdfGraphics, bounds : PointF) : void
    public layout(graphics ?: PdfGraphics | PdfLayoutParams, bounds ?: PointF | RectangleF) : void | PdfLayoutResult  {
        if (graphics instanceof PdfGraphics) {
        if (bounds instanceof PointF) {
            if (bounds.x === 0) {
                bounds.x = PdfBorders.default.right.width / 2;
            }
            if (bounds.y === 0) {
                bounds.y = PdfBorders.default.top.width / 2;
            }
            let boundaries : RectangleF = new RectangleF(bounds, new SizeF(0, 0));
            this.layout(graphics, boundaries);
        } else {
            let width : number = graphics.clientSize.width;
            let parameter : PdfLayoutParams = new PdfLayoutParams();
            parameter.bounds = bounds;
            this.currentGraphics = graphics;
            if (graphics.layer != null) {
                let index : number = 0;
                if (this.currentGraphics.page instanceof PdfPage) {
                    index = (this.currentGraphics.page as PdfPage).section.indexOf(this.currentGraphics.page as PdfPage);
                } else {
                    index = (this.currentGraphics.page as PdfPageBase).defaultLayerIndex;
                }
            } else {
                this.layoutInternal(parameter);
            }
        }
    }
    }*/
    /**
     * Gets the `format`.
     * @private
     */
    PdfGridLayouter.prototype.getFormat = function (format) {
        var f = format;
        return f;
    };
    /**
     * `Layouts` the element.
     * @private
     */
    PdfGridLayouter.prototype.layoutInternal = function (param) {
        var format = this.getFormat(param.format);
        this.gridLayoutFormat = this.getFormat(param.format);
        this.currentPage = param.page;
        if (this.currentPage !== null) {
            var pageHeight = this.currentPage.getClientSize().height;
            var pageWidth = this.currentPage.getClientSize().width;
            //if (pageHeight > pageWidth) {
            this.currentPageBounds = this.currentPage.getClientSize();
            //}
        }
        else {
            throw Error('Can not set page as null');
            //this.currentPageBounds = this.currentGraphics.clientSize;
        }
        this.currentGraphics = this.currentPage.graphics;
        //this.currentGraphics = (this.currentPage != null ) ? this.currentPage.graphics : this.currentGraphics;
        // if (this.currentGraphics.layer !== null) {
        //     let index : number = 0;
        //     if (this.currentGraphics.page instanceof PdfPage) {
        //         index = (this.currentGraphics.page as PdfPage).section.indexOf(this.currentGraphics.page as PdfPage);
        //     } else {
        //         index = (this.currentGraphics.page as PdfPageBase).defaultLayerIndex;
        //     }
        //     this.listOfNavigatePages.push(index);
        // }
        var index = 0;
        index = this.currentGraphics.page.section.indexOf(this.currentGraphics.page);
        this.listOfNavigatePages.push(index);
        if (format != null && format.break === _graphics_figures_enum__WEBPACK_IMPORTED_MODULE_4__["PdfLayoutBreakType"].FitColumnsToPage) {
            this.currentBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](param.bounds.x, param.bounds.y), new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](this.Grid.columns.width, this.currentGraphics.clientSize.height));
        }
        else {
            this.currentBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](param.bounds.x, param.bounds.y), this.currentGraphics.clientSize);
        }
        //this.currentBounds = new RectangleF(new PointF(param.bounds.x, param.bounds.y), this.currentGraphics.clientSize);
        if (this.Grid.rows.count !== 0) {
            this.currentBounds.width = (param.bounds.width > 0) ? param.bounds.width :
                (this.currentBounds.width - this.Grid.rows.getRow(0).cells.getCell(0).style.borders.left.width / 2);
        }
        else if (this.Grid.headers.count !== 0) {
            // this.currentBounds.width = (param.bounds.width > 0) ? param.bounds.width : (this.currentBounds.width -
            //                                 this.Grid.headers.getHeader(0).cells.getCell(0).style.borders.left.width / 2);
            this.currentBounds.width = param.bounds.width;
        }
        else {
            throw Error('Please add row or header into grid');
        }
        this.startLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](param.bounds.x, param.bounds.y);
        // if (this.Grid.style.allowHorizontalOverflow && this.currentBounds.width > this.currentGraphics.clientSize.width) {
        //     this.currentBounds.width = this.currentGraphics.clientSize.width;
        //     this.currentBounds.width -= this.currentBounds.x;
        // }
        // if (this.Grid.isChildGrid) {
        //     this.childheight = param.bounds.height;
        // }
        // if (param.format !== null && param.format.usePaginateBounds) {
        //     if (param.format.paginateBounds.height > 0) {
        //         this.currentBounds.height = param.format.paginateBounds.height;
        //     }
        //} else 
        if (param.bounds.height > 0 && !this.Grid.isChildGrid) {
            this.currentBounds.height = param.bounds.height;
        }
        if (!this.Grid.isChildGrid) {
            this.hType = this.Grid.style.horizontalOverflowType;
        }
        if (!this.Grid.style.allowHorizontalOverflow) {
            this.columnRanges = [];
            this.Grid.measureColumnsWidth(this.currentBounds);
            this.columnRanges.push([0, this.Grid.columns.count - 1]);
        }
        else {
            this.Grid.measureColumnsWidth();
            this.determineColumnDrawRanges();
        }
        if (this.Grid.hasRowSpanSpan) {
            for (var i = 0; i < this.Grid.rows.count; i++) {
                var height = this.Grid.rows.getRow(i).height;
                if (!this.Grid.rows.getRow(i).isRowHeightSet) {
                    this.Grid.rows.getRow(i).isRowHeightSet = true;
                }
            }
        }
        var result = this.layoutOnPage(param);
        return result;
    };
    // /* tslint:enable */
    /**
     * `Determines the column draw ranges`.
     * @private
     */
    PdfGridLayouter.prototype.determineColumnDrawRanges = function () {
        var startColumn = 0;
        var endColumn = 0;
        var cellWidths = 0;
        var availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x;
        for (var i = 0; i < this.Grid.columns.count; i++) {
            cellWidths += this.Grid.columns.getColumn(i).width;
            if (cellWidths >= availableWidth) {
                var subWidths = 0;
                for (var j = startColumn; j <= i; j++) {
                    subWidths += this.Grid.columns.getColumn(j).width;
                    if (subWidths > availableWidth) {
                        break;
                    }
                    endColumn = j;
                }
                this.columnRanges.push([startColumn, endColumn]);
                startColumn = endColumn + 1;
                endColumn = startColumn;
                cellWidths = (endColumn <= i) ? this.Grid.columns.getColumn(i).width : 0;
            }
        }
        // if (startColumn !== this.columns.Count) {
        this.columnRanges.push([startColumn, this.Grid.columns.count - 1]);
        // }
    };
    /**
     * `Layouts the on page`.
     * @private
     */
    PdfGridLayouter.prototype.layoutOnPage = function (param) {
        /* tslint:disable */
        this.pageBounds.x = param.bounds.x;
        this.pageBounds.y = param.bounds.y;
        this.pageBounds.height = param.bounds.height;
        var format = this.getFormat(param.format);
        var endArgs = null;
        var result = null;
        var layoutedPages = new _collections_object_object_pair_dictionary__WEBPACK_IMPORTED_MODULE_7__["TemporaryDictionary"]();
        var startPage = param.page;
        var isParentCell = false;
        var cellBounds = [];
        for (var index = 0; index < this.columnRanges.length; index++) {
            var range = this.columnRanges[index];
            this.cellStartIndex = range[0];
            this.cellEndIndex = range[1];
            var returnObject = this.raiseBeforePageLayout(this.currentPage, this.currentBounds, this.currentRowIndex);
            this.currentBounds = returnObject.currentBounds;
            this.currentRowIndex = returnObject.currentRowIndex;
            // if (returnObject.returnValue) {
            //     result = new PdfGridLayoutResult(this.currentPage, this.currentBounds);
            //     break;
            // }
            //Draw Headers.
            var drawHeader = void 0;
            for (var i_1 = 0; i_1 < this.Grid.headers.count; i_1++) {
                var row = this.Grid.headers.getHeader(i_1);
                var headerHeight = this.currentBounds.y;
                // RowLayoutResult
                var headerResult = this.drawRow(row);
                // if (headerHeight === this.currentBounds.y) {
                //     drawHeader = true;
                //     if (PdfGrid.repeatRowIndex === -1) {
                //         PdfGrid.repeatRowIndex = this.rows.getRow.indexOf(row);
                //     }
                // } else {
                drawHeader = false;
                // }
            }
            var i = 0;
            var length_1 = this.Grid.rows.count;
            var repeatRow = void 0;
            var startingHeight = 0;
            var flag = true;
            //Here is to draw parent Grid and Cells
            cellBounds = [];
            //Draw row by row with the specified cell range.
            for (var j = 0; j < this.Grid.rows.count; j++) {
                var row = this.Grid.rows.getRow(j);
                i++;
                this.currentRowIndex = i - 1;
                var originalHeight = this.currentBounds.y;
                startPage = this.currentPage;
                PdfGridLayouter.repeatRowIndex = -1;
                if (flag && row.grid.isChildGrid) {
                    startingHeight = originalHeight;
                    flag = false;
                }
                var rowResult = null;
                ///rowResult = this.drawRow(row);
                /*if(!row.isrowFinish) {
                    if(!row.grid.isgridSplit){
                        rowResult = this.drawRow(row);
                        row.isrowFinish = true;
                        row.isrowDraw = true;
                    } else {
                        if(!row.isrowDraw){
                            rowResult = this.drawRow(row);
                            row.isrowFinish = true;
                            row.isrowDraw = true;
                            row.grid.isgridSplit = false;
                        } else {
                            rowResult =  null;
                            break;
                        }
                    }
                }
                else {
                    //row.isrowFinish = false;
                    //rowResult = this.drawRow(row);
                    rowResult = null;
                    break;
                    
                }             */
                if (this.Grid.splitChildRowIndex == -1) {
                    rowResult = this.drawRow(row);
                    row.isrowFinish = true;
                }
                else {
                    if (row.grid.ParentCell.row.grid.isGridSplit && this.Grid.splitChildRowIndex <= row.rowIndex) {
                        rowResult = this.drawRow(row);
                        row.isrowFinish = true;
                    }
                    else if (row.isrowFinish) {
                        continue;
                    }
                    else {
                        break;
                    }
                }
                //rowResult = this.drawRow(row);
                cellBounds.push(rowResult.bounds.width);
                /*if (row.isRowBreaksNextPage)
                    {
                        let x : number  = 0;
                        for (let l : number = 0; l < row.cells.count; l++)
                        {
                            let isNestedRowBreak : boolean = false;
                            if (row.height == row.cells.getCell(l).height)
                            {
                                let n : number;
                                let grid : PdfGrid = row.cells.getCell(l).value as PdfGrid;
                                for (let m : number = grid.rows.count; 0 < m; m--)
                                {
                                    if ((grid.rows.getRow(m - 1).rowBreakHeight > 0))
                                    {
                                        isNestedRowBreak = true;
                                        break;
                                    }
                                    if (grid.rows.getRow(m - 1).isRowBreaksNextPage)
                                    {
                                        row.rowBreakHeightValue = grid.rows.getRow(m - 1).rowBreakHeightValue;
                                        break;
                                    }
                                    row.rowBreakHeightValue += grid.rows.getRow(m - 1).height;
                                }
                            }
                            if (isNestedRowBreak)
                                break;
                        }
                        for (let j : number = 0; j < row.cells.count; j++)
                        {

                            if (row.height > row.cells.getCell(j).height)
                            {
                                row.cells.getCell(j).value = " ";
                                let rect : RectangleF ;
                                let page : PdfPage = this.getNextPage(this.currentPage);
                                let section : PdfSection = this.currentPage.section;
                                let index : number = section.indexOf(page);
                                for (let k : number = 0; k < (section.count - 1) - index; k++)
                                {
                                    rect = new RectangleF(x, 0, row.grid.columns.getColumn(j).width, page.getClientSize().height);
                                    PdfGridLayouter.repeatRowIndex = -1;
                                    row.cells.getCell(j).draw(page.graphics, rect, false);
                                    page = this.getNextPage(page);
                                }
                                rect = new RectangleF(x, 0, row.grid.columns.getColumn(j).width, row.rowBreakHeightValue);

                                row.cells.getCell(j).draw(page.graphics, rect, false);
                            }
                            x += row.grid.columns.getColumn(j).width;
                        }
                    }*/
                //if height remains same, it is understood that row is not drawn in the page
                if (originalHeight === this.currentBounds.y) {
                    repeatRow = true;
                    PdfGridLayouter.repeatRowIndex = this.Grid.rows.rowCollection.indexOf(row);
                }
                else {
                    repeatRow = false;
                    PdfGridLayouter.repeatRowIndex = -1;
                }
                while (!rowResult.isFinish && startPage != null) {
                    var tempResult = this.getLayoutResult();
                    /*if (startPage != this.currentPage)
                        {
                            if (row.grid.isChildGrid && row.grid.ParentCell != null)
                            {
                                let bounds : RectangleF= new RectangleF(new PointF(format.paginateBounds.x,format.paginateBounds.y), new SizeF(param.bounds.width, tempResult.bounds.height));
                                bounds.x += param.bounds.x;
                                if (row.grid.ParentCell.row.grid.style.cellPadding != null)
                                {
                                    bounds.y += row.grid.ParentCell.row.grid.style.cellPadding.top;
                                    if (bounds.height > this.currentPageBounds.height)
                                    {
                                        bounds.height = this.currentPageBounds.height - bounds.y;
                                        bounds.height -= (row.grid.ParentCell.row.grid.style.cellPadding.bottom);
                                    }
                                }
                                // Draw border for cells in the nested grid cell's row.
                                for (let c : number = 0; c < row.cells.count; c++)
                                {
                                    let cell : PdfGridCell = row.cells.getCell(c);
                                    let cellWidth :  number= 0;
                                    if (cell.columnSpan > 1)
                                    {
                                        for (; c < cell.columnSpan; c++)
                                            cellWidth += row.grid.columns.getColumn(c).width;
                                    }
                                    else
                                        cellWidth = Math.max(cell.width, row.grid.columns.getColumn(c).width);
                                    cell.drawCellBorders(this.currentGraphics, new RectangleF(new PointF(bounds.x,bounds.y), new SizeF(cellWidth, bounds.height)));
                                    bounds.x += cellWidth;
                                    c += (cell.columnSpan - 1);
                                }
                            }
                        }
                        */
                    endArgs = this.raisePageLayouted(tempResult);
                    if (endArgs.cancel || repeatRow)
                        break;
                    else if (this.Grid.allowRowBreakAcrossPages) {
                        //If there is no space in the current page, add new page and then draw the remaining row.
                        this.currentPage = this.getNextPageformat(format);
                        originalHeight = this.currentBounds.y;
                        var location_1 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](_styles_pdf_borders__WEBPACK_IMPORTED_MODULE_3__["PdfBorders"].default.right.width / 2, _styles_pdf_borders__WEBPACK_IMPORTED_MODULE_3__["PdfBorders"].default.top.width / 2);
                        // if (format.paginateBounds == new RectangleF(0,0,0,0) && this.startLocation == location)
                        // {
                        //     this.currentBounds.x += this.startLocation.x;
                        //     this.currentBounds.y += this.startLocation.y;
                        // }
                        if (this.Grid.isChildGrid && row.grid.ParentCell != null) {
                            if (this.Grid.ParentCell.row.grid.style.cellPadding != null) {
                                if (row.rowBreakHeight + this.Grid.ParentCell.row.grid.style.cellPadding.top < this.currentBounds.height) {
                                    this.currentBounds.y = this.Grid.ParentCell.row.grid.style.cellPadding.top;
                                }
                            }
                        }
                        if (row.grid.ParentCell != null) {
                            row.grid.ParentCell.row.isRowBreaksNextPage = true;
                            row.grid.ParentCell.row.rowBreakHeightValue = row.rowBreakHeight + this.Grid.ParentCell.row.grid.style.cellPadding.top + this.Grid.ParentCell.row.grid.style.cellPadding.bottom;
                            for (var i_2 = row.rowIndex + 1; i_2 < row.grid.rows.count; i_2++) {
                                row.grid.ParentCell.row.rowBreakHeightValue += row.grid.rows.getRow(i_2).height;
                            }
                            //row.rowBreakHeight = row.grid.ParentCell.row.rowBreakHeightValue;
                        }
                        /*if (row.noOfPageCount > 1)
                        {
                            let temp : number = row.rowBreakHeightValue;
                            for (let j : number = 1; j < row.noOfPageCount; j++)
                            {
                                row.rowBreakHeightValue = 0;
                                row.height = ((row.noOfPageCount - 1) * this.currentPage.getClientSize().height);
                                this.drawRow(row);
                                this.currentPage = this.getNextPageformat(format);
                                startPage = this.currentPage;
                            }
                            row.rowBreakHeightValue = temp;
                            row.noOfPageCount = 1;
                            rowResult = this.drawRow(row);
                        } else {
                            rowResult = this.drawRow(row);
                        }
                        /*if(row.grid.isChildGrid){
                            row.isrowFinish = false;
                            row.isrowDraw = false;
                            row.grid.isgridSplit = true;
                            row.grid.ParentCell.row.grid.isgridSplit = true;
                            //rowResult.isFinish = false;
                            break;
                        }*/
                        if (row.grid.isChildGrid) {
                            //row.grid.isgridSplit = true;
                            row.isrowFinish = false;
                            //row.grid.ParentCell.row.grid.isgridSplit = true;
                            row.grid.splitChildRowIndex = row.rowIndex;
                            row.grid.ParentCell.row.grid.splitChildRowIndex = row.grid.ParentCell.row.rowIndex;
                            if (row.grid.ParentCell.row.grid.isGridSplit) {
                                row.grid.ParentCell.row.noOfPageCount += 1;
                                row.grid.ParentCell.row.grid.isGridSplit = false;
                            }
                            break;
                        }
                        if (row.noOfPageCount < 1) {
                            if (row.grid.splitChildRowIndex != -1) {
                                row.grid.isGridSplit = true;
                            }
                            this.currentBounds.y = 0.50;
                            if (this.Grid.repeatHeader) {
                                for (var j_1 = 0; j_1 < this.Grid.headers.count; j_1++) {
                                    var headerRepeat = this.Grid.headers.getHeader(j_1);
                                    this.drawRow(headerRepeat);
                                }
                            }
                            rowResult = this.drawRow(row);
                            if (row.noOfPageCount >= 1) {
                                var temp = row.rowBreakHeightValue;
                                for (var j_2 = 0; j_2 < row.noOfPageCount; j_2++) {
                                    //this.currentPage.section.add();
                                    var tempResult1 = this.getLayoutResult();
                                    endArgs = this.raisePageLayouted(tempResult1);
                                    this.currentPage = this.getNextPageformat(format);
                                    originalHeight = this.currentBounds.y;
                                    //row.rowBreakHeightValue = 0;
                                    if (row.grid.splitChildRowIndex != -1) {
                                        row.grid.isGridSplit = true;
                                    }
                                    this.currentBounds.y = 0.5;
                                    if (this.Grid.repeatHeader) {
                                        for (var i_3 = 0; i_3 < this.Grid.headers.count; i_3++) {
                                            var header = this.Grid.headers.getHeader(i_3);
                                            this.drawRow(header);
                                        }
                                    }
                                    //row.height = ((row.noOfPageCount - 1) * this.currentPage.getClientSize().height);
                                    this.drawRow(row);
                                }
                                // row.rowBreakHeight = temp;
                                // row.noOfPageCount = 1;
                                // rowResult = this.drawRow(row);
                            }
                            row.grid.splitChildRowIndex = -1;
                            row.grid.isGridSplit = false;
                            rowResult.isFinish = true;
                            //row.NestedGridLayoutResult.bounds.height = row.rowBreakHeightValue;
                            //this.currentBounds.y = rowResult.bounds.y;
                            for (var i_4 = 0; i_4 < row.cells.count; i_4++) {
                                if (row.cells.getCell(i_4).value instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
                                    row.cells.getCell(i_4).value.splitChildRowIndex = -1;
                                }
                            }
                        }
                    }
                    // else if (!this.Grid.allowRowBreakAcrossPages && i < length)
                    // {
                    //     this.currentPage = this.getNextPageformat(format);
                    //     break;
                    // }
                    // else if (i >= length)
                    //     break;
                }
                if (!rowResult.isFinish && startPage !== null && format.layout !== _graphics_figures_enum__WEBPACK_IMPORTED_MODULE_4__["PdfLayoutType"].OnePage && repeatRow) {
                    // During pagination, cell position is maintained here.
                    this.startLocation.x = this.currentBounds.x;
                    var isAddNextPage = false;
                    this.currentPage = this.getNextPageformat(format);
                    /*if (!this.Grid.isSingleGrid)
                    {
                        for ( let j : number= 0; j < this.Grid.rows.count; j++)
                        {
                            let isWidthGreaterthanParent : boolean = false;
                            for (let k : number = 0; k < this.Grid.rows.getRow(j).cells.count; k++)
                            {
                                if (this.Grid.rows.getRow(j).cells.getCell(k).width > this.currentPageBounds.width)
                                    isWidthGreaterthanParent = true;
                            }
                            if (isWidthGreaterthanParent && this.Grid.rows.getRow(j).cells.getCell(this.rowBreakPageHeightCellIndex).pageCount > 0)
                            {
                                isAddNextPage = true;
                            }
                        }
                    }
                    if (!this.Grid.isRearranged && isAddNextPage)
                         {
                             let section : PdfSection = this.currentPage.section;
                             
                             //this.currentPage = section.add();
                         
                             this.currentGraphics = this.currentPage.graphics;
                             this.currentBounds = new RectangleF(new PointF(0,0), this.currentPage.getClientSize());
                          
                             let pageindex  : number = (this.currentGraphics.page as PdfPage).section.indexOf(this.currentGraphics.page as PdfPage);
                         }
                         else
                         {
                             this.currentPage = this.getNextPageformat(format);
                         }
                         if (format.paginateBounds.y == 0)
                             this.currentBounds.y = PdfBorders.default.top.width/2;
                         else
                         {
                             this.currentBounds.y = format == null ? 0 : format.paginateBounds.y;
                             
                         }
                         if (this.raiseBeforePageLayout(this.currentPage, this.currentBounds, this.currentRowIndex))
                             break;*/
                    if ((param.format !== null) && !param.format.usePaginateBounds && param.bounds !== null &&
                        param.bounds.height > 0 && !this.Grid.isChildGrid) {
                        this.currentBounds.height = param.bounds.height;
                    }
                    if ((param.format !== null) && !param.format.usePaginateBounds && param.bounds !== null &&
                        param.bounds.y > 0 && !this.Grid.isChildGrid) {
                        this.currentBounds.y = param.bounds.y;
                    }
                    this.startLocation.y = this.currentBounds.y;
                    if ((format.paginateBounds.x === format.paginateBounds.y) &&
                        (format.paginateBounds.y === format.paginateBounds.height) &&
                        (format.paginateBounds.height === format.paginateBounds.width) && (format.paginateBounds.width === 0)) {
                        this.currentBounds.x += this.startLocation.x;
                    }
                    if (this.currentBounds.x === _styles_pdf_borders__WEBPACK_IMPORTED_MODULE_3__["PdfBorders"].default.left.width / 2) {
                        this.currentBounds.y += this.startLocation.x;
                    }
                    if (this.Grid.repeatHeader) {
                        for (var i_5 = 0; i_5 < this.Grid.headers.count; i_5++) {
                            var header = this.Grid.headers.getHeader(i_5);
                            this.drawRow(header);
                        }
                    }
                    this.drawRow(row);
                    if (this.currentPage !== null && !layoutedPages.containsKey(this.currentPage)) {
                        layoutedPages.add(this.currentPage, range);
                    }
                }
                if (row.NestedGridLayoutResult != null) {
                    // Position for next row in the grid.
                    this.currentPage = row.NestedGridLayoutResult.page;
                    this.currentGraphics = this.currentPage.graphics; //If not, next row will not be drawn in the layouted page.
                    this.startLocation = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](row.NestedGridLayoutResult.bounds.x, row.NestedGridLayoutResult.bounds.y);
                    var recalHeight = this.ReCalculateHeight(row, row.NestedGridLayoutResult.bounds.height);
                    this.currentBounds.y = recalHeight;
                    //this.currentBounds.y = row.NestedGridLayoutResult.bounds.height;
                    if (startPage != this.currentPage) {
                        var secion = this.currentPage.section;
                        var startIndex = secion.indexOf(startPage) + 1;
                        var endIndex = secion.indexOf(this.currentPage);
                        for (var page = startIndex; page < endIndex + 1; page++) {
                            var pageGraphics = this.currentPage.graphics;
                            var location_2 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](format.paginateBounds.x, format.paginateBounds.y);
                            var height = page == endIndex ? (row.NestedGridLayoutResult.bounds.height - param.bounds.y) :
                                (this.currentBounds.height - location_2.y);
                            if (height <= pageGraphics.clientSize.height)
                                height += param.bounds.y;
                            // if (row.grid.isChildGrid && row.grid.ParentCell != null)
                            //     location.x += param.bounds.x;
                            location_2.y = format == null ? 0.5 : format.paginateBounds.y;
                            // Draw border for last paginated row containing nested grid.
                            for (var c = 0; c < row.cells.count; c++) {
                                var cell = row.cells.getCell(c);
                                var cellWidth = 0;
                                var totalwidth = 0;
                                if (cell.value instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
                                    for (var i_6 = 0; i_6 < cell.value.columns.count; i_6++) {
                                        totalwidth += cell.value.columns.getColumn(i_6).columnWidth;
                                    }
                                }
                                else {
                                    totalwidth = cell.width;
                                }
                                // if (cell.columnSpan > 1)
                                // {
                                //     for (; c < cell.columnSpan; c++)
                                //         cellWidth += row.grid.columns.getColumn(c).width;
                                // }
                                // else
                                cellWidth = Math.max(totalwidth, row.grid.columns.getColumn(c).width);
                                cell.drawCellBorders(pageGraphics, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](location_2, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](cellWidth, height)));
                                location_2.x += cellWidth;
                                c += (cell.columnSpan - 1);
                            }
                        }
                        // So, nested grid drawing is completed for the current row. Update page.
                        // Otherwise, the next nested grid of the parent will draw borders from start.
                        startPage = this.currentPage;
                    }
                }
            }
            var isPdfGrid = false;
            var maximumCellBoundsWidth = 0;
            if (cellBounds.length > 0) {
                maximumCellBoundsWidth = cellBounds[0];
            }
            var largeNavigatePage = [[1, 2]];
            for (var c = 0; c < this.Grid.rows.count; c++) {
                if (this.cellEndIndex != -1 && this.Grid.rows.getRow(c).cells.getCell(this.cellEndIndex).value instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
                    var grid = this.Grid.rows.getRow(c).cells.getCell(this.cellEndIndex).value;
                    this.rowLayoutBoundsWidth = grid.rowLayoutBoundsWidth;
                    isPdfGrid = true;
                    // if (largeNavigatePage[0][0] < grid.listOfNavigatePages.length)
                    // {
                    //     largeNavigatePage[0][0] = grid.listOfNavigatePages.length;
                    //     largeNavigatePage[0][1] = cellBounds[c];
                    // }
                    // else if ((largeNavigatePage[0][0] == grid.listOfNavigatePages.length) && (largeNavigatePage[0][1] < cellBounds[c]))
                    // {
                    //     largeNavigatePage[0][1] = cellBounds[c];
                    // }
                }
            }
            if (!isPdfGrid && cellBounds.length > 0) {
                for (var c = 0; c < i - 1; c++) {
                    if (maximumCellBoundsWidth < cellBounds[c]) {
                        maximumCellBoundsWidth = cellBounds[c];
                    }
                }
                this.rowLayoutBoundsWidth = maximumCellBoundsWidth;
            }
            else {
                this.rowLayoutBoundsWidth = largeNavigatePage[0][1];
            }
            if (this.columnRanges.indexOf(range) < this.columnRanges.length - 1
                && startPage != null && format.layout != _graphics_figures_enum__WEBPACK_IMPORTED_MODULE_4__["PdfLayoutType"].OnePage) {
                isParentCell = this.Grid.isChildGrid;
                if (largeNavigatePage[0][0] != 0) {
                    var section = this.currentPage.section;
                    var pageIndex = section.indexOf(this.currentPage);
                    this.currentGraphics = this.currentPage.graphics;
                    this.currentBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](0, 0), this.currentPage.getClientSize());
                    var pageindex = this.currentGraphics.page.section.indexOf(this.currentGraphics.page);
                }
                else {
                    this.currentPage = this.getNextPageformat(format);
                }
                // let locationGrid : PointF= new PointF(PdfBorders.default.right.width / 2, PdfBorders.default.top.width / 2);
                // if (format.paginateBounds == new RectangleF(0,0,0,0) && this.startLocation == locationGrid)
                // {
                //     this.currentBounds.x += this.startLocation.x;
                //     this.currentBounds.y += this.startLocation.y;
                // }
            }
            if (this.columnRanges.length - 1 !== index && this.columnRanges.length > 1 && format.layout !== _graphics_figures_enum__WEBPACK_IMPORTED_MODULE_4__["PdfLayoutType"].OnePage) {
                this.currentPage = this.getNextPageformat(format);
                if ((format.paginateBounds.x === format.paginateBounds.y) && (format.paginateBounds.y === format.paginateBounds.height)
                    && (format.paginateBounds.height === format.paginateBounds.width) && (format.paginateBounds.width === 0)) {
                    this.currentBounds.x += this.startLocation.x;
                    this.currentBounds.y += this.startLocation.y;
                    //this.currentBounds.height = this.pageBounds.height;
                }
            }
        }
        result = this.getLayoutResult();
        if (this.Grid.style.allowHorizontalOverflow && this.Grid.style.horizontalOverflowType == _styles_style__WEBPACK_IMPORTED_MODULE_6__["PdfHorizontalOverflowType"].NextPage) {
            this.reArrangePages(layoutedPages);
        }
        this.raisePageLayouted(result);
        return result;
    };
    /* tslint:enable */
    /**
     * Gets the `next page`.
     * @private
     */
    PdfGridLayouter.prototype.getNextPageformat = function (format) {
        var section = this.currentPage.section;
        var nextPage = null;
        var index = section.indexOf(this.currentPage);
        this.flag = false;
        if (index === section.count - 1) {
            nextPage = section.add();
        }
        else {
            nextPage = section.getPages()[index + 1];
        }
        this.currentGraphics = nextPage.graphics;
        var pageindex = this.currentGraphics.page.section.indexOf(this.currentGraphics.page);
        if (!(this.listOfNavigatePages.indexOf(pageindex) !== -1)) {
            this.listOfNavigatePages.push(pageindex);
        }
        this.currentBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](0, 0), nextPage.getClientSize());
        // if ((format.paginateBounds.x !== format.paginateBounds.y) && (format.paginateBounds.y !== format.paginateBounds.height)
        //     && (format.paginateBounds.height !== format.paginateBounds.width) && (format.paginateBounds.width !== 0)) {
        //     this.currentBounds.x = format.paginateBounds.x;
        //     this.currentBounds.y = format.paginateBounds.y;
        //     this.currentBounds.height = format.paginateBounds.height;
        // }
        return nextPage;
    };
    PdfGridLayouter.prototype.CheckIfDefaultFormat = function (format) {
        var defaultFormat = new _graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_1__["PdfStringFormat"]();
        return (format.alignment === defaultFormat.alignment && format.characterSpacing === defaultFormat.characterSpacing &&
            format.clipPath === defaultFormat.clipPath && format.firstLineIndent === defaultFormat.firstLineIndent &&
            format.horizontalScalingFactor === defaultFormat.horizontalScalingFactor &&
            format.lineAlignment === defaultFormat.lineAlignment
            && format.lineLimit === defaultFormat.lineLimit && format.lineSpacing === defaultFormat.lineSpacing &&
            format.measureTrailingSpaces === defaultFormat.measureTrailingSpaces && format.noClip === defaultFormat.noClip &&
            format.paragraphIndent === defaultFormat.paragraphIndent && format.rightToLeft === defaultFormat.rightToLeft &&
            format.subSuperScript === defaultFormat.subSuperScript && format.wordSpacing === defaultFormat.wordSpacing &&
            format.wordWrap === defaultFormat.wordWrap);
    };
    /**
     * `Raises BeforeCellDraw event`.
     * @private
     */
    PdfGridLayouter.prototype.RaiseBeforeCellDraw = function (graphics, rowIndex, cellIndex, bounds, value, style) {
        var args = null;
        if (this.Grid.raiseBeginCellDraw) {
            args = new PdfGridBeginCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, style);
            this.Grid.onBeginCellDraw(args);
            style = args.style;
        }
        return style;
    };
    /**
     * `Raises AfterCellDraw event`.
     * @private
     */
    PdfGridLayouter.prototype.raiseAfterCellDraw = function (graphics, rowIndex, cellIndex, bounds, value, cellstyle) {
        var args = null;
        if (this.Grid.raiseEndCellDraw) {
            args = new PdfGridEndCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, cellstyle);
            this.Grid.onEndCellDraw(args);
        }
    };
    PdfGridLayouter.prototype.reArrangePages = function (layoutedPages) {
        var document = this.currentPage.document;
        var pages = [];
        var keys = layoutedPages.keys();
        var values = layoutedPages.values();
        for (var i = 0; i < keys.length; i++) {
            var page = keys[i];
            page.section = null;
            pages.push(page);
            document.pages.remove(page);
        }
        /* tslint:disable */
        for (var i = 0; i < layoutedPages.size(); i++) {
            var count = 0;
            for (var j = i, count_1 = (layoutedPages.size() / this.columnRanges.length); j < layoutedPages.size(); j += count_1) {
                var page = pages[j];
                if (document.pages.indexOf(page) === -1) {
                    document.pages.add(page);
                }
            }
        }
        /* tslint:enable */
    };
    /**
     * Gets the `layout result`.
     * @private
     */
    PdfGridLayouter.prototype.getLayoutResult = function () {
        if (this.Grid.isChildGrid && this.Grid.allowRowBreakAcrossPages) {
            for (var i = 0; i < this.Grid.rows.count; i++) {
                var row = this.Grid.rows.getRow(i);
                if (row.rowBreakHeight > 0 && row.repeatFlag) {
                    this.startLocation.y = this.currentPage.origin.y;
                }
            }
        }
        var bounds;
        if (!this.isChanged) {
            bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](this.startLocation, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](this.currentBounds.width, this.currentBounds.y -
                this.startLocation.y));
        }
        // else {
        //     bounds = new RectangleF(this.currentLocation, new SizeF(this.currentBounds.width, this.currentBounds.y -
        //                              this.currentLocation.y));
        // }
        /* tslint:enable */
        return new PdfGridLayoutResult(this.currentPage, bounds);
    };
    /**
     * `Recalculate row height` for the split cell to be drawn.
     * @private
     */
    PdfGridLayouter.prototype.ReCalculateHeight = function (row, height) {
        var newHeight = 0.0;
        for (var i = this.cellStartIndex; i <= this.cellEndIndex; i++) {
            if (!(row.cells.getCell(i).remainingString === null || row.cells.getCell(i).remainingString === '' ||
                typeof row.cells.getCell(i).remainingString === 'undefined')) {
                newHeight = Math.max(newHeight, row.cells.getCell(i).measureHeight());
            }
        }
        return Math.max(height, newHeight);
    };
    /**
     * `Raises BeforePageLayout event`.
     * @private
     */
    PdfGridLayouter.prototype.raiseBeforePageLayout = function (currentPage, currentBounds, currentRow) {
        var cancel = false;
        if (this.Grid.raiseBeginPageLayout) {
            var args = new PdfGridBeginPageLayoutEventArgs(currentBounds, currentPage, currentRow);
            this.Grid.onBeginPageLayout(args);
            // if (currentBounds !== args.Bounds) {
            //     this.isChanged = true;
            //     this.currentLocation = new PointF(args.Bounds.x, args.Bounds.y);
            //     this.measureColumnsWidth(new RectangleF(new PointF(args.Bounds.x, args.Bounds.y) ,
            //                                                  new SizeF(args.Bounds.width + args.Bounds.x ,
            //                                                                 args.Bounds.height)));
            // }
            cancel = args.cancel;
            currentBounds = args.bounds;
            currentRow = args.startRowIndex;
        }
        return { returnValue: cancel, currentBounds: currentBounds, currentRowIndex: currentRow };
    };
    /**
     * `Raises PageLayout event` if needed.
     * @private
     */
    PdfGridLayouter.prototype.raisePageLayouted = function (result) {
        var args = new PdfGridEndPageLayoutEventArgs(result);
        if (this.Grid.raiseEndPageLayout) {
            this.Grid.onEndPageLayout(args);
        }
        return args;
    };
    PdfGridLayouter.prototype.drawRow = function (row, result, height) {
        if (typeof result === 'undefined') {
            //.. Check if required space available.
            //.....If the row conains spans which  falls through more than one page, then draw the row to next page.                        
            var result_1 = new RowLayoutResult();
            var rowHeightWithSpan = 0;
            var location_3 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](0, 0);
            var size = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](0, 0);
            var isHeader = false;
            if (row.rowSpanExists) {
                var maxSpan = 0;
                var currRowIndex = this.Grid.rows.rowCollection.indexOf(row);
                if (currRowIndex === -1) {
                    currRowIndex = this.Grid.headers.indexOf(row);
                    if (currRowIndex !== -1) {
                        isHeader = true;
                    }
                }
                for (var i = 0; i < row.cells.count; i++) {
                    var cell = row.cells.getCell(i);
                    maxSpan = Math.max(maxSpan, cell.rowSpan);
                }
                for (var i = currRowIndex; i < currRowIndex + maxSpan; i++) {
                    rowHeightWithSpan += (isHeader ? this.Grid.headers.getHeader(i).height : this.Grid.rows.getRow(i).height);
                }
                // let rowMaxHeight : number = rowHeightWithSpan;
                // for (let i : number = 0; i < row.cells.count; i++ ) {
                //     rowMaxHeight = rowMaxHeight > row.cells.getCell(i).height ? rowMaxHeight : row.cells.getCell(i).height;
                // }
                // let flag : boolean = true;
                // let nextRow : PdfGridRow = this.Grid.headers.getHeader(this.Grid.headers.indexOf(row) + 1);
                // for (let i : number = 0; i < nextRow.cells.count; i++ ) {
                //     if (nextRow.cells.getCell(i).value !== '' && nextRow.cells.getCell(i).value !== undefined) {
                //         flag = false;
                //         break;
                //     }
                // }
                // if ((rowMaxHeight > rowHeightWithSpan) && flag) {
                //     row.height += (rowMaxHeight - rowHeightWithSpan);
                // }                
            }
            var calculatedHeight = row.rowBreakHeight > 0.0 ? row.rowBreakHeight : row.height;
            if (this.Grid.isChildGrid && this.Grid.ParentCell != null) {
                //Split row only if row height exceeds page height and AllowRowBreakAcrossPages is true.
                // if (calculatedHeight + this.Grid.ParentCell.row.grid.style.cellPadding.bottom +
                //             this.Grid.ParentCell.row.grid.style.cellPadding.top > this.currentPageBounds.height) {
                //     if (this.Grid.allowRowBreakAcrossPages) {
                //         result.isFinish = true;
                //         if ( this.Grid.isChildGrid && row.rowBreakHeight > 0 ) {
                //             if (this.Grid.ParentCell.row.grid.style.cellPadding !== null) {
                //                 this.currentBounds.y += this.Grid.ParentCell.row.grid.style.cellPadding.top;
                //             }
                //             this.currentBounds.x = this.startLocation.x;
                //         }
                //         result.bounds = this.currentBounds ;
                //         this.drawRowWithBreak(result, row, calculatedHeight);
                //     } else {
                //         //If AllowRowBreakAcrossPages is not true, draw the row till it fits the page.                       
                //         if (this.Grid.ParentCell.row.grid.style.cellPadding != null) {
                //             this.currentBounds.y += this.Grid.ParentCell.row.grid.style.cellPadding.top;
                //             calculatedHeight = this.currentBounds.height - this.currentBounds.y -
                //                     this.Grid.ParentCell.row.grid.style.cellPadding.bottom;
                //         }
                //         result.isFinish = false;
                //         this.drawRow( row, result, calculatedHeight);
                //     }
                // } else
                if (this.currentBounds.y + this.Grid.ParentCell.row.grid.style.cellPadding.bottom + calculatedHeight >
                    this.currentPageBounds.height || this.currentBounds.y + this.Grid.ParentCell.row.grid.style.cellPadding.bottom
                    + calculatedHeight > this.currentBounds.height || this.currentBounds.y +
                    this.Grid.ParentCell.row.grid.style.cellPadding.bottom + rowHeightWithSpan > this.currentPageBounds.height) {
                    //If a row is repeated and still cannot fit in page, proceed draw.
                    if (this.Grid.ParentCell.row.grid.LayoutFormat.break === _graphics_figures_enum__WEBPACK_IMPORTED_MODULE_4__["PdfLayoutBreakType"].FitPage) {
                        PdfGridLayouter.repeatRowIndex = this.Grid.rows.rowCollection.indexOf(row);
                        this.Grid.splitChildRowIndex = this.Grid.rows.rowCollection.indexOf(row);
                    }
                    if (PdfGridLayouter.repeatRowIndex > -1 && PdfGridLayouter.repeatRowIndex === row.rowIndex) {
                        if (this.Grid.allowRowBreakAcrossPages) {
                            result_1.isFinish = true;
                            // if (this.Grid.isChildGrid && row.rowBreakHeightValue > 0) {
                            //     // if (this.Grid.ParentCell.row.grid.style.cellPadding != null) {
                            //     //     this.currentBounds.y += this.Grid.ParentCell.row.grid.style.cellPadding.top;
                            //     // }
                            //     this.currentBounds.x = this.startLocation.x;
                            // }
                            result_1.bounds = this.currentBounds;
                            this.drawRowWithBreak(result_1, row, calculatedHeight);
                            row.repeatFlag = true;
                            row.repeatRowNumber = PdfGridLayouter.repeatRowIndex;
                        }
                        // else {
                        //     result.isFinish = false;
                        //     row.repeatFlag = false;
                        //     this.drawRow( row, result, calculatedHeight);
                        // }
                    }
                    // else {
                    //     result.isFinish = false;
                    // }
                }
                else {
                    result_1.isFinish = true;
                    if (row.grid.ParentCell.row.rowBreakHeightValue > 0) {
                        row.repeatFlag = true;
                    }
                    else {
                        row.repeatFlag = false;
                        calculatedHeight = row.height;
                    }
                    if (this.Grid.isChildGrid && row.rowBreakHeight > 0) {
                        if (this.Grid.ParentCell.row.grid.style.cellPadding != null) {
                            calculatedHeight += this.Grid.ParentCell.row.grid.style.cellPadding.bottom;
                        }
                    }
                    this.drawRow(row, result_1, calculatedHeight);
                }
            }
            else {
                //Split row only if row height exceeds page height and AllowRowBreakAcrossPages is true.
                if (calculatedHeight > this.currentPageBounds.height) {
                    if (this.Grid.allowRowBreakAcrossPages) {
                        result_1.isFinish = true;
                        //result.bounds = this.currentBounds;
                        this.drawRowWithBreak(result_1, row, calculatedHeight);
                        row.isrowFinish = true;
                        row.repeatFlag = true;
                        if (row.grid.splitChildRowIndex !== -1) {
                            result_1.isFinish = false;
                        }
                    }
                    // else {
                    //     //If AllowRowBreakAcrossPages is not true, draw the row till it fits the page.
                    //     result.isFinish = false;
                    //     this.drawRow( row, result, calculatedHeight);
                    // }
                }
                else if (this.currentBounds.y + calculatedHeight > this.currentPageBounds.height ||
                    this.currentBounds.y + calculatedHeight > (this.currentBounds.height + this.startLocation.y) ||
                    this.currentBounds.y + rowHeightWithSpan > this.currentPageBounds.height) {
                    // If a row is repeated and still cannot fit in page, proceed draw.
                    if (this.Grid.LayoutFormat.break === _graphics_figures_enum__WEBPACK_IMPORTED_MODULE_4__["PdfLayoutBreakType"].FitPage) {
                        PdfGridLayouter.repeatRowIndex = this.Grid.rows.rowCollection.indexOf(row);
                    }
                    if (PdfGridLayouter.repeatRowIndex > -1 && PdfGridLayouter.repeatRowIndex === row.rowIndex) {
                        if (this.Grid.allowRowBreakAcrossPages) {
                            result_1.isFinish = true;
                            this.drawRowWithBreak(result_1, row, calculatedHeight);
                            row.repeatFlag = true;
                            row.repeatRowNumber = PdfGridLayouter.repeatRowIndex;
                            if (row.grid.splitChildRowIndex !== -1) {
                                result_1.isFinish = false;
                            }
                        }
                        // else {
                        //     result.isFinish = false;
                        //     this.drawRow(row, result, calculatedHeight);
                        // }
                    }
                    else {
                        result_1.isFinish = false;
                    }
                }
                else {
                    result_1.isFinish = true;
                    this.drawRow(row, result_1, calculatedHeight);
                    row.repeatFlag = false;
                }
            }
            return result_1;
        }
        else {
            var skipcell = false;
            var location_4 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](this.currentBounds.x, this.currentBounds.y);
            // if (row.grid.isChildGrid && row.grid.allowRowBreakAcrossPages && this.startLocation.x !== this.currentBounds.x && row.width <
            //                 this.currentPage.getClientSize().width) {
            //     location.x = this.startLocation.x;
            // }
            result.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](location_4, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](0, 0));
            height = this.ReCalculateHeight(row, height);
            for (var i = this.cellStartIndex; i <= this.cellEndIndex; i++) {
                var cancelSpans = ((i > this.cellEndIndex + 1) && (row.cells.getCell(i).columnSpan > 1));
                // let cancelSpans : boolean = false;
                if (!cancelSpans) {
                    for (var j = 1; j < row.cells.getCell(i).columnSpan; j++) {
                        row.cells.getCell(i + j).isCellMergeContinue = true;
                    }
                }
                var size = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](this.Grid.columns.getColumn(i).width, height);
                // if (size.width > this.currentGraphics.clientSize.width) {
                //     size.width = this.currentGraphics.clientSize.width;
                // }
                // if (this.Grid.isChildGrid && this.Grid.style.allowHorizontalOverflow) {
                //     if (size.width >= this.currentGraphics.clientSize.width) {
                //         size.width -= 2 * this.currentBounds.x;
                //     }
                // }
                /* tslint:disable */
                if (!this.CheckIfDefaultFormat(this.Grid.columns.getColumn(i).format) &&
                    this.CheckIfDefaultFormat(row.cells.getCell(i).stringFormat)) {
                    row.cells.getCell(i).stringFormat = this.Grid.columns.getColumn(i).format;
                }
                var cellstyle = row.cells.getCell(i).style;
                var tempValue = ((typeof row.cells.getCell(i).value === 'string' &&
                    row.cells.getCell(i).value !== null) ? row.cells.getCell(i).value : '');
                row.cells.getCell(i).style = this.RaiseBeforeCellDraw(this.currentGraphics, this.currentRowIndex, i, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](location_4, size), tempValue, cellstyle);
                //row.cells.getCell(i).style = cellstyle;
                if (!skipcell) {
                    if (row.cells.getCell(i).value instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
                        var grid = row.cells.getCell(i).value;
                        grid.parentCellIndex = i;
                    }
                    var stringResult = row.cells.getCell(i).draw(this.currentGraphics, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](location_4, size), cancelSpans);
                    if (row.grid.style.allowHorizontalOverflow && (row.cells.getCell(i).columnSpan > this.cellEndIndex ||
                        i + row.cells.getCell(i).columnSpan > this.cellEndIndex + 1) && this.cellEndIndex < row.cells.count - 1) {
                        row.rowOverflowIndex = this.cellEndIndex;
                    }
                    if (row.grid.style.allowHorizontalOverflow && (row.rowOverflowIndex > 0 && (row.cells.getCell(i).columnSpan >
                        this.cellEndIndex || i + row.cells.getCell(i).columnSpan > this.cellEndIndex + 1)) &&
                        row.cells.getCell(i).columnSpan - this.cellEndIndex + i - 1 > 0) {
                        row.cells.getCell(row.rowOverflowIndex + 1).value = stringResult !== null ? (stringResult.remainder !== undefined) ?
                            stringResult.remainder : '' : '';
                        row.cells.getCell(row.rowOverflowIndex + 1).stringFormat = row.cells.getCell(i).stringFormat;
                        row.cells.getCell(row.rowOverflowIndex + 1).style = row.cells.getCell(i).style;
                        row.cells.getCell(row.rowOverflowIndex + 1).columnSpan = row.cells.getCell(i).columnSpan - this.cellEndIndex + i - 1;
                    }
                }
                /* tslint:enable */
                tempValue = ((typeof row.cells.getCell(i).value === 'string' &&
                    row.cells.getCell(i).value !== null) ? row.cells.getCell(i).value : '');
                if (!cancelSpans) {
                    this.raiseAfterCellDraw(this.currentGraphics, this.currentRowIndex, i, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](location_4, size), tempValue, row.cells.getCell(i).style);
                }
                if (row.cells.getCell(i).value instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
                    var grid = row.cells.getCell(i).value;
                    if (this.Grid.columns.getColumn(i).width >= this.currentGraphics.clientSize.width) {
                        location_4.x = grid.rowLayoutBoundsWidth;
                        location_4.x += grid.style.cellSpacing;
                    }
                    else {
                        location_4.x += this.Grid.columns.getColumn(i).width;
                    }
                }
                else {
                    location_4.x += this.Grid.columns.getColumn(i).width;
                }
            }
            if (!row.rowMergeComplete || row.isRowHeightSet) {
                this.currentBounds.y += height;
            }
            result.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](result.bounds.x, result.bounds.y), new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](location_4.x, location_4.y));
        }
    };
    PdfGridLayouter.prototype.drawRowWithBreak = function (result, row, calculateHeight) {
        var location = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](this.currentBounds.x, this.currentBounds.y);
        if (row.grid.isChildGrid && row.grid.allowRowBreakAcrossPages && this.startLocation.x !== this.currentBounds.x) {
            location.x = this.startLocation.x;
        }
        result.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](location, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](0, 0));
        this.gridHeight = row.rowBreakHeight > 0 ? this.currentPageBounds.height : 0;
        // Calculate the remaining height.
        if (row.grid.style.cellPadding.top + this.currentBounds.y + row.grid.style.cellPadding.bottom < this.currentPageBounds.height) {
            row.rowBreakHeight = this.currentBounds.y + calculateHeight - this.currentPageBounds.height;
        }
        // else {
        //     row.rowBreakHeight = calculateHeight;
        //     result.isFinish = false;
        //     return;
        // }
        // No need to explicit break if the row height is equal to grid height.
        for (var i = 0; i < row.cells.count; i++) {
            var cell = row.cells.getCell(i);
            var cellHeight = cell.measureHeight();
            if (cellHeight === calculateHeight && cell.value instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
                row.rowBreakHeight = 0;
            }
            // else if (cellHeight === calculateHeight && (cell.value as PdfGrid) === null) {
            //     row.rowBreakHeight = this.currentBounds.y + calculateHeight - this.currentPageBounds.height;
            // }
        }
        for (var i = this.cellStartIndex; i <= this.cellEndIndex; i++) {
            var cancelSpans = ((row.cells.getCell(i).columnSpan + i > this.cellEndIndex + 1) &&
                (row.cells.getCell(i).columnSpan > 1));
            // if (!cancelSpans) {
            //     for (let k : number = 1; k < row.cells.getCell(i).columnSpan; k++) {
            //         row.cells.getCell(i + k).isCellMergeContinue = true;
            //     }
            //}
            var size = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](this.Grid.columns.getColumn(i).width, this.gridHeight > 0.0 ? this.gridHeight :
                this.currentPageBounds.height);
            // if (size.width === 0) {
            //     size = new SizeF(row.cells.getCell(i).width, size.height);
            // }
            // if (!this.CheckIfDefaultFormat(this.Grid.columns.getColumn(i).format) &&
            //         this.CheckIfDefaultFormat((row.cells.getCell(i).stringFormat))) {
            //     row.cells.getCell(i).stringFormat = this.Grid.columns.getColumn(i).format;
            // }
            var cellstyle1 = row.cells.getCell(i).style;
            row.cells.getCell(i).style = cellstyle1;
            var skipcell = false;
            var stringResult = null;
            if (!skipcell) {
                stringResult = row.cells.getCell(i).draw(this.currentGraphics, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](location, size), cancelSpans);
            }
            //If still row is to be drawn, set cell finished drawing cell as false and update the text to be drawn.
            if (row.rowBreakHeight > 0.0) {
                if (stringResult != null) {
                    row.cells.getCell(i).FinishedDrawingCell = false;
                    row.cells.getCell(i).remainingString = stringResult.remainder == null ? ' ' : stringResult.remainder;
                    if (row.grid.isChildGrid) {
                        row.rowBreakHeight = calculateHeight - stringResult.actualSize.height;
                    }
                }
            }
            result.isFinish = (!result.isFinish) ? result.isFinish : row.cells.getCell(i).FinishedDrawingCell;
            // let tempValue : string = ((typeof row.cells.getCell(i).value === 'string' &&
            //row.cells.getCell(i).value !== null) ? row.cells.getCell(i).value : '') as string;
            // if (!cancelSpans) {
            //     // this.raiseAfterCellDraw(this.currentGraphics, this.currentRowIndex, i,
            //     //           new RectangleF(location, size), tempValue, row.cells.getCell(i).style);            
            //     this.raiseAfterCellDraw(this.currentGraphics, this.currentRowIndex, i, new RectangleF(location, size),
            //                             (row.cells.getCell(i).value as string) ? row.cells.getCell(i).value.toString() : ' ',
            //                             row.cells.getCell(i).style);
            //     }                
            if (row.cells.getCell(i).value instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
                var grid = row.cells.getCell(i).value;
                this.rowBreakPageHeightCellIndex = i;
                // row.cells.getCell(i).pageCount = grid.listOfNavigatePages.length;
                // for (let j : number = 0;j<grid.listOfNavigatePages.length;j++){
                //     let pageIndex : number =grid.listOfNavigatePages.indexOf(j);
                //             this.Grid.listOfNavigatePages.push(pageIndex);
                //     }
                if (this.Grid.columns.getColumn(i).width >= this.currentGraphics.clientSize.width) {
                    location.x = this.rowLayoutBoundsWidth;
                    location.x += grid.style.cellSpacing;
                }
                else {
                    location.x += this.Grid.columns.getColumn(i).width;
                }
            }
            else {
                location.x += this.Grid.columns.getColumn(i).width;
            }
        }
        this.currentBounds.y += this.gridHeight > 0.0 ? this.gridHeight : calculateHeight;
        result.bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"](result.bounds.x, result.bounds.y), new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](location.x, location.y));
    };
    /**
     * @hidden
     * @private
     */
    PdfGridLayouter.repeatRowIndex = -1;
    return PdfGridLayouter;
}(_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__["ElementLayouter"]));

// recalculateBounds : boolean, clientSize : SizeF
//Implementation
/**
 * `Initializes` internal data.
 * @private
 */
//Internal declaration
var PdfGridLayoutResult = /** @class */ (function (_super) {
    __extends(PdfGridLayoutResult, _super);
    /**
     * Constructor
     * @private
     */
    function PdfGridLayoutResult(page, bounds) {
        return _super.call(this, page, bounds) || this;
    }
    return PdfGridLayoutResult;
}(_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__["PdfLayoutResult"]));

/**
 * `PdfGridLayoutFormat` class represents a flexible grid that consists of columns and rows.
 */
var PdfGridLayoutFormat = /** @class */ (function (_super) {
    __extends(PdfGridLayoutFormat, _super);
    /**
     * Initializes a new instance of the `PdfGridLayoutFormat` class.
     * @private
     */
    function PdfGridLayoutFormat(baseFormat) {
        var _this = this;
        if (typeof baseFormat === 'undefined') {
            _this = _super.call(this) || this;
        }
        else {
            _this = _super.call(this, baseFormat) || this;
        }
        return _this;
    }
    return PdfGridLayoutFormat;
}(_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_5__["PdfLayoutFormat"]));

var GridCellEventArgs = /** @class */ (function () {
    // Constructors
    /**
     * Initialize a new instance for `GridCellEventArgs` class.
     * @private
     */
    function GridCellEventArgs(graphics, rowIndex, cellIndex, bounds, value) {
        this.gridRowIndex = rowIndex;
        this.gridCellIndex = cellIndex;
        this.internalValue = value;
        this.gridBounds = bounds;
        this.pdfGraphics = graphics;
    }
    Object.defineProperty(GridCellEventArgs.prototype, "rowIndex", {
        // Properties
        /**
         * Gets the value of current `row index`.
         * @private
         */
        get: function () {
            return this.gridRowIndex;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(GridCellEventArgs.prototype, "cellIndex", {
        /**
         * Gets the value of current `cell index`.
         * @private
         */
        get: function () {
            return this.gridCellIndex;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(GridCellEventArgs.prototype, "value", {
        /**
         * Gets the actual `value` of current cell.
         * @private
         */
        get: function () {
            return this.internalValue;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(GridCellEventArgs.prototype, "bounds", {
        /**
         * Gets the `bounds` of current cell.
         * @private
         */
        get: function () {
            return this.gridBounds;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(GridCellEventArgs.prototype, "graphics", {
        /**
         * Gets the instance of `current graphics`.
         * @private
         */
        get: function () {
            return this.pdfGraphics;
        },
        enumerable: true,
        configurable: true
    });
    return GridCellEventArgs;
}());

var PdfGridBeginCellDrawEventArgs = /** @class */ (function (_super) {
    __extends(PdfGridBeginCellDrawEventArgs, _super);
    // Constructors
    /**
     * Initializes a new instance of the `StartCellLayoutEventArgs` class.
     * @private
     */
    function PdfGridBeginCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, style) {
        var _this = _super.call(this, graphics, rowIndex, cellIndex, bounds, value) || this;
        _this.style = style;
        return _this;
    }
    Object.defineProperty(PdfGridBeginCellDrawEventArgs.prototype, "skip", {
        // Properties
        /**
         * Gets or sets a value indicating whether the value of this cell should be `skipped`.
         * @private
         */
        get: function () {
            return this.bSkip;
        },
        set: function (value) {
            this.bSkip = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridBeginCellDrawEventArgs.prototype, "style", {
        /**
         * Gets or sets a `style` value of the cell.
         * @private
         */
        get: function () {
            return this.cellStyle;
        },
        set: function (value) {
            this.cellStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfGridBeginCellDrawEventArgs;
}(GridCellEventArgs));

var PdfGridEndCellDrawEventArgs = /** @class */ (function (_super) {
    __extends(PdfGridEndCellDrawEventArgs, _super);
    // Constructors
    /**
     * Initializes a new instance of the `PdfGridEndCellLayoutEventArgs` class.
     * @private
     */
    function PdfGridEndCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, style) {
        var _this = _super.call(this, graphics, rowIndex, cellIndex, bounds, value) || this;
        _this.cellStyle = style;
        return _this;
    }
    Object.defineProperty(PdfGridEndCellDrawEventArgs.prototype, "style", {
        // Propertise
        /**
         * Get the `PdfGridCellStyle`.
         * @private
         */
        get: function () {
            return this.cellStyle;
        },
        enumerable: true,
        configurable: true
    });
    return PdfGridEndCellDrawEventArgs;
}(GridCellEventArgs));

var PdfCancelEventArgs = /** @class */ (function () {
    function PdfCancelEventArgs() {
    }
    Object.defineProperty(PdfCancelEventArgs.prototype, "cancel", {
        // Properties
        /**
         * Gets and Sets the value of `cancel`.
         * @private
         */
        get: function () {
            return this.isCancel;
        },
        set: function (value) {
            this.isCancel = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfCancelEventArgs;
}());

var BeginPageLayoutEventArgs = /** @class */ (function (_super) {
    __extends(BeginPageLayoutEventArgs, _super);
    // Constructors
    /**
     * Initializes a new instance of the `BeginPageLayoutEventArgs` class with the specified rectangle and page.
     * @private
     */
    function BeginPageLayoutEventArgs(bounds, page) {
        var _this = _super.call(this) || this;
        _this.bounds = bounds;
        _this.pdfPage = page;
        return _this;
    }
    Object.defineProperty(BeginPageLayoutEventArgs.prototype, "bounds", {
        // Properties
        /**
         * Gets or sets value that indicates the lay outing `bounds` on the page.
         * @private
         */
        get: function () {
            return this.cellBounds;
        },
        set: function (value) {
            this.cellBounds = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BeginPageLayoutEventArgs.prototype, "page", {
        /**
         * Gets the `page` where the lay outing should start.
         * @private
         */
        get: function () {
            return this.pdfPage;
        },
        enumerable: true,
        configurable: true
    });
    return BeginPageLayoutEventArgs;
}(PdfCancelEventArgs));

/**
 * `EndPageLayoutEventArgs` class is alternate for end page layout events.
 */
var EndPageLayoutEventArgs = /** @class */ (function (_super) {
    __extends(EndPageLayoutEventArgs, _super);
    // Constructors
    /**
     * Initializes a new instance of the `EndPageLayoutEventArgs` class. with the specified 'PdfLayoutResult'.
     * @private
     */
    function EndPageLayoutEventArgs(result) {
        var _this = _super.call(this) || this;
        _this.layoutResult = result;
        return _this;
    }
    Object.defineProperty(EndPageLayoutEventArgs.prototype, "result", {
        // Properties
        /**
         * Gets the lay outing `result` of the page.
         * @private
         */
        get: function () {
            return this.layoutResult;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(EndPageLayoutEventArgs.prototype, "nextPage", {
        /**
         * Gets or sets a value indicating the `next page` where the element should be layout.
         * @private
         */
        get: function () {
            return this.nextPdfPage;
        },
        set: function (value) {
            this.nextPdfPage = value;
        },
        enumerable: true,
        configurable: true
    });
    return EndPageLayoutEventArgs;
}(PdfCancelEventArgs));

/**
 * `PdfGridBeginPageLayoutEventArgs` class is alternate for begin page layout events.
 */
var PdfGridBeginPageLayoutEventArgs = /** @class */ (function (_super) {
    __extends(PdfGridBeginPageLayoutEventArgs, _super);
    // Constructors
    /**
     * Initialize a new instance of `PdfGridBeginPageLayoutEventArgs` class.
     * @private
     */
    function PdfGridBeginPageLayoutEventArgs(bounds, page, startRow) {
        var _this = _super.call(this, bounds, page) || this;
        _this.startRow = startRow;
        return _this;
    }
    Object.defineProperty(PdfGridBeginPageLayoutEventArgs.prototype, "startRowIndex", {
        // Properties
        /**
         * Gets the `start row index`.
         * @private
         */
        get: function () {
            return this.startRow;
        },
        enumerable: true,
        configurable: true
    });
    return PdfGridBeginPageLayoutEventArgs;
}(BeginPageLayoutEventArgs));

/**
 * `PdfGridEndPageLayoutEventArgs` class is alternate for begin page layout events.
 */
var PdfGridEndPageLayoutEventArgs = /** @class */ (function (_super) {
    __extends(PdfGridEndPageLayoutEventArgs, _super);
    // Constructors
    /**
     * Initialize a new instance of `PdfGridEndPageLayoutEventArgs` class.
     * @private
     */
    function PdfGridEndPageLayoutEventArgs(result) {
        return _super.call(this, result) || this;
    }
    return PdfGridEndPageLayoutEventArgs;
}(EndPageLayoutEventArgs));

var RowLayoutResult = /** @class */ (function () {
    //Constructors
    /**
     * Initializes a new instance of the `RowLayoutResult` class.
     * @private
     */
    function RowLayoutResult() {
        this.layoutedBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](0, 0, 0, 0);
    }
    Object.defineProperty(RowLayoutResult.prototype, "isFinish", {
        /**
         * Gets or sets a value indicating whether this instance `is finish`.
         * @private
         */
        get: function () {
            return this.bIsFinished;
        },
        set: function (value) {
            this.bIsFinished = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RowLayoutResult.prototype, "bounds", {
        /**
         * Gets or sets the `bounds`.
         * @private
         */
        get: function () {
            return this.layoutedBounds;
        },
        set: function (value) {
            this.layoutedBounds = value;
        },
        enumerable: true,
        configurable: true
    });
    return RowLayoutResult;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-cell.js":
/*!**************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-cell.js ***!
  \**************************************************************************************************************/
/*! exports provided: PdfGridCell, PdfGridCellCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridCell", function() { return PdfGridCell; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridCellCollection", function() { return PdfGridCellCollection; });
/* harmony import */ var _pdf_grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-grid */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid.js");
/* harmony import */ var _styles_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./styles/style */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/style.js");
/* harmony import */ var _graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../graphics/fonts/string-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js");
/* harmony import */ var _document_pdf_document__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../document/pdf-document */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document.js");
/* harmony import */ var _graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../graphics/fonts/pdf-string-format */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _graphics_enum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../graphics/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _tables_light_tables_enum__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../tables/light-tables/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/tables/light-tables/enum.js");
/* harmony import */ var _graphics_brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../../graphics/brushes/pdf-solid-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-solid-brush.js");
/* harmony import */ var _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../../graphics/pdf-color */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js");
/* harmony import */ var _graphics_images_pdf_image__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../../graphics/images/pdf-image */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-image.js");
/* harmony import */ var _graphics_images_pdf_bitmap__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../../graphics/images/pdf-bitmap */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-bitmap.js");
/* harmony import */ var _annotations_pdf_text_web_link__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./../../annotations/pdf-text-web-link */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/pdf-text-web-link.js");
/* harmony import */ var _graphics_figures_enum__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./../../graphics/figures/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/enum.js");
/* harmony import */ var _structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./../../structured-elements/grid/layout/grid-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/layout/grid-layouter.js");
/* harmony import */ var _implementation_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../implementation/graphics/figures/base/element-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js");
















/**
 * `PdfGridCell` class represents the schema of a cell in a 'PdfGrid'.
 */
var PdfGridCell = /** @class */ (function () {
    function PdfGridCell(row) {
        /**
         * `Width` of the cell.
         * @default 0
         * @private
         */
        this.cellWidth = 0;
        /**
         * `Height` of the cell.
         * @default 0
         * @private
         */
        this.cellHeight = 0;
        /**
         * `tempval`to stores current width .
         * @default 0
         * @private
         */
        this.tempval = 0;
        this.fontSpilt = false;
        /**
         * Specifies weather the `cell is drawn`.
         * @default true
         * @private
         */
        this.finsh = true;
        /**
         * The `remaining height` of row span.
         * @default 0
         * @private
         */
        this.rowSpanRemainingHeight = 0;
        this.hasRowSpan = false;
        this.hasColSpan = false;
        /**
         * the 'isFinish' is set to page finish
         */
        this.isFinish = true;
        /**
         * The `present' to store the current cell.
         * @default false
         * @private
         */
        this.present = false;
        if (typeof row === 'undefined') {
            this.gridRowSpan = 1;
            this.colSpan = 1;
        }
        else {
            this.constructor();
            this.gridRow = row;
        }
    }
    Object.defineProperty(PdfGridCell.prototype, "isCellMergeContinue", {
        //Properties
        get: function () {
            return this.internalIsCellMergeContinue;
        },
        set: function (value) {
            this.internalIsCellMergeContinue = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "isRowMergeContinue", {
        get: function () {
            return this.internalIsRowMergeContinue;
        },
        set: function (value) {
            this.internalIsRowMergeContinue = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "isCellMergeStart", {
        get: function () {
            return this.internalIsCellMergeStart;
        },
        set: function (value) {
            this.internalIsCellMergeStart = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "isRowMergeStart", {
        get: function () {
            return this.internalIsRowMergeStart;
        },
        set: function (value) {
            this.internalIsRowMergeStart = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "remainingString", {
        /**
         * Gets or sets the `remaining string` after the row split between pages.
         * @private
         */
        get: function () {
            return this.remaining;
        },
        set: function (value) {
            this.remaining = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "FinishedDrawingCell", {
        /**
         * Gets or sets the `FinishedDrawingCell` .
         * @private
         */
        get: function () {
            return this.isFinish;
        },
        set: function (value) {
            this.isFinish = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "stringFormat", {
        /**
         * Gets or sets the `string format`.
         * @private
         */
        get: function () {
            if (this.format == null) {
                this.format = new _graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_4__["PdfStringFormat"]();
            }
            return this.format;
        },
        set: function (value) {
            this.format = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "row", {
        /**
         * Gets or sets the parent `row`.
         * @private
         */
        get: function () {
            return this.gridRow;
        },
        set: function (value) {
            this.gridRow = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "value", {
        /**
         * Gets or sets the `value` of the cell.
         * @private
         */
        get: function () {
            return this.objectValue;
        },
        set: function (value) {
            this.objectValue = value;
            if (this.objectValue instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
                this.row.grid.isSingleGrid = false;
                var grid = this.objectValue;
                grid.ParentCell = this;
                this.objectValue.isChildGrid = true;
                var rowCount = this.row.grid.rows.count;
                for (var i = 0; i < rowCount; i++) {
                    var row = this.row.grid.rows.getRow(i);
                    var colCount = row.cells.count;
                    for (var j = 0; j < colCount; j++) {
                        var cell = row.cells.getCell(j);
                        cell.parent = this;
                    }
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "rowSpan", {
        /**
         * Gets or sets a value that indicates the total number of rows that cell `spans` within a PdfGrid.
         * @private
         */
        get: function () {
            return this.gridRowSpan;
        },
        set: function (value) {
            if (value < 1) {
                throw new Error('ArgumentException : Invalid span specified, must be greater than or equal to 1');
            }
            else {
                this.gridRowSpan = value;
                this.row.rowSpanExists = true;
                this.row.grid.hasRowSpanSpan = true;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "style", {
        /**
         * Gets or sets the cell `style`.
         * @private
         */
        get: function () {
            if (this.cellStyle == null) {
                this.cellStyle = new _styles_style__WEBPACK_IMPORTED_MODULE_1__["PdfGridCellStyle"]();
            }
            return this.cellStyle;
        },
        set: function (value) {
            this.cellStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "height", {
        /**
         * Gets the `height` of the PdfGrid cell.[Read-Only].
         * @private
         */
        get: function () {
            if (this.cellHeight === 0) {
                this.cellHeight = this.measureHeight();
            }
            return this.cellHeight;
        },
        set: function (value) {
            this.cellHeight = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "columnSpan", {
        /**
         * Gets or sets a value that indicates the total number of columns that cell `spans` within a PdfGrid.
         * @private
         */
        get: function () {
            return this.colSpan;
        },
        set: function (value) {
            if (value < 1) {
                throw Error('Invalid span specified, must be greater than or equal to 1');
            }
            else {
                this.colSpan = value;
                this.row.columnSpanExists = true;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCell.prototype, "width", {
        /**
         * Gets the `width` of the PdfGrid cell.[Read-Only].
         * @private
         */
        get: function () {
            if (this.cellWidth === 0 || this.row.grid.isComplete) {
                this.cellWidth = this.measureWidth();
            }
            return Math.round(this.cellWidth);
        },
        set: function (value) {
            this.cellWidth = value;
        },
        enumerable: true,
        configurable: true
    });
    //Implementation
    /**
     * `Calculates the width`.
     * @private
     */
    PdfGridCell.prototype.measureWidth = function () {
        // .. Calculate the cell text width.
        // .....Add border widths, cell spacings and paddings to the width.
        var width = 0;
        var layouter = new _graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_2__["PdfStringLayouter"]();
        if (typeof this.objectValue === 'string') {
            /* tslint:disable */
            var slr = layouter.layout(this.objectValue, this.getTextFont(), this.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](Number.MAX_VALUE, Number.MAX_VALUE), false, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](0, 0));
            width += slr.actualSize.width;
            width += (this.style.borders.left.width + this.style.borders.right.width) * 2;
        }
        else if (this.objectValue instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
            width = this.objectValue.size.width;
            //width += this.objectValue.style.cellSpacing;
        }
        else if (this.objectValue instanceof _graphics_images_pdf_image__WEBPACK_IMPORTED_MODULE_10__["PdfImage"] || this.objectValue instanceof _graphics_images_pdf_bitmap__WEBPACK_IMPORTED_MODULE_11__["PdfBitmap"]) {
            width += this.objectValue.width;
        }
        else if (this.objectValue instanceof _annotations_pdf_text_web_link__WEBPACK_IMPORTED_MODULE_12__["PdfTextWebLink"]) {
            var webLink = this.objectValue;
            var result = layouter.layout(webLink.text, webLink.font, webLink.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](0, 0), false, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](0, 0));
            /* tslint:enable */
            width += result.actualSize.width;
            width += (this.style.borders.left.width + this.style.borders.right.width) * 2;
        }
        if (!(this.objectValue instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"])) {
            if (this.style.cellPadding != null) {
                width += (this.style.cellPadding.left + this.style.cellPadding.right);
            }
            else {
                width += (this.row.grid.style.cellPadding.left + this.row.grid.style.cellPadding.right);
            }
        }
        else {
            if (this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined') {
                if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {
                    width += this.style.cellPadding.left;
                }
                if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {
                    width += this.style.cellPadding.right;
                }
            }
            else {
                if (typeof this.row.grid.style.cellPadding.left !== 'undefined' && this.row.grid.style.cellPadding.hasLeftPad) {
                    width += this.row.grid.style.cellPadding.left;
                }
                if (typeof this.row.grid.style.cellPadding.right !== 'undefined' && this.row.grid.style.cellPadding.hasRightPad) {
                    width += this.row.grid.style.cellPadding.right;
                }
            }
        }
        width += this.row.grid.style.cellSpacing;
        return width;
    };
    /**
     * Draw the `cell background`.
     * @private
     */
    PdfGridCell.prototype.drawCellBackground = function (graphics, bounds) {
        var backgroundBrush = this.getBackgroundBrush();
        //graphics.isTemplateGraphics = true;
        if (backgroundBrush != null) {
            graphics.save();
            graphics.drawRectangle(backgroundBrush, bounds.x, bounds.y, bounds.width, bounds.height);
            graphics.restore();
        }
        if (this.style.backgroundImage != null) {
            var image = this.getBackgroundImage();
            graphics.drawImage(this.style.backgroundImage, bounds.x, bounds.y, bounds.width, bounds.height);
        }
    };
    /**
     * `Adjusts the text layout area`.
     * @private
     */
    /* tslint:disable */
    PdfGridCell.prototype.adjustContentLayoutArea = function (bounds) {
        //Add Padding value to its Cell Bounds
        var returnBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["RectangleF"](bounds.x, bounds.y, bounds.width, bounds.height);
        if (!(this.objectValue instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"])) {
            if (typeof this.style.cellPadding === 'undefined' || this.style.cellPadding == null) {
                returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
                returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
                returnBounds.width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
                returnBounds.height -= (this.gridRow.grid.style.cellPadding.bottom + this.gridRow.grid.style.cellPadding.top);
                returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
            }
            else {
                returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width;
                returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width;
                returnBounds.width -= (this.style.cellPadding.right + this.style.cellPadding.left);
                returnBounds.width -= (this.cellStyle.borders.left.width + this.cellStyle.borders.right.width);
                returnBounds.height -= (this.style.cellPadding.bottom + this.style.cellPadding.top);
                returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
                if (this.rowSpan === 1) {
                    returnBounds.width -= (this.style.borders.left.width);
                }
            }
        }
        else {
            if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
                if (typeof this.gridRow.grid.style.cellPadding.left !== 'undefined' && this.gridRow.grid.style.cellPadding.hasLeftPad) {
                    returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
                    returnBounds.width -= this.gridRow.grid.style.cellPadding.left;
                }
                if (typeof this.gridRow.grid.style.cellPadding.top !== 'undefined' && this.gridRow.grid.style.cellPadding.hasTopPad) {
                    returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
                    returnBounds.height -= this.gridRow.grid.style.cellPadding.top;
                }
                if (typeof this.gridRow.grid.style.cellPadding.right !== 'undefined' && this.gridRow.grid.style.cellPadding.hasRightPad) {
                    returnBounds.width -= this.gridRow.grid.style.cellPadding.right;
                }
                if (typeof this.gridRow.grid.style.cellPadding.bottom !== 'undefined' && this.gridRow.grid.style.cellPadding.hasBottomPad) {
                    returnBounds.height -= this.gridRow.grid.style.cellPadding.bottom;
                }
            }
            else {
                if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {
                    returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width;
                    returnBounds.width -= this.style.cellPadding.left;
                }
                if (typeof this.style.cellPadding.top !== 'undefined' && this.style.cellPadding.hasTopPad) {
                    returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width;
                    returnBounds.height -= this.style.cellPadding.top;
                }
                if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {
                    returnBounds.width -= this.style.cellPadding.right;
                }
                if (typeof this.style.cellPadding.bottom !== 'undefined' && this.style.cellPadding.hasBottomPad) {
                    returnBounds.height -= this.style.cellPadding.bottom;
                }
            }
            returnBounds.width -= (this.cellStyle.borders.left.width + this.cellStyle.borders.right.width);
            returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
        }
        return returnBounds;
    };
    /**
     * `Draws` the specified graphics.
     * @private
     */
    PdfGridCell.prototype.draw = function (graphics, bounds, cancelSubsequentSpans) {
        var isrowbreak = false;
        /*if (!this.row.grid.isSingleGrid)
        {
            //Check whether the Grid Span to Nextpage
            if ((this.remainingString != null) || (PdfGridLayouter.repeatRowIndex != -1))
            {
                this.DrawParentCells(graphics, bounds, true);
            }
            else if (this.row.grid.rows.count > 1)
            {
                for (let i : number  = 0; i < this.row.grid.rows.count; i++)
                {
                    if (this.row == this.row.grid.rows.getRow(i))
                    {
                        if (this.row.grid.rows.getRow(i).rowBreakHeight > 0)
                            isrowbreak = true;
                        if ((i > 0) && (isrowbreak))
                            this.DrawParentCells(graphics, bounds, false);
                    }
                }
            }
        } */
        var result = null;
        /*if (cancelSubsequentSpans)
        {
            //..Cancel all subsequent cell spans, if no space exists.
            let currentCellIndex : number = this.row.cells.indexOf(this);
            for (let i : number = currentCellIndex + 1; i <= currentCellIndex + this.colSpan; i++)
            {
                this.row.cells.getCell(i).isCellMergeContinue = false;
                this.row.cells.getCell(i).isRowMergeContinue = false;
            }
            this.colSpan = 1;
        }*/
        //..Skip cells which were already covered by spanmap.
        if (this.internalIsCellMergeContinue || this.internalIsRowMergeContinue) {
            if (this.internalIsCellMergeContinue && this.row.grid.style.allowHorizontalOverflow) {
                if ((this.row.rowOverflowIndex > 0 && (this.row.cells.indexOf(this) != this.row.rowOverflowIndex + 1)) || (this.row.rowOverflowIndex == 0 && this.internalIsCellMergeContinue)) {
                    return result;
                }
            }
            else {
                return result;
            }
        }
        //Adjust bounds with Row and Column Spacing
        bounds = this.adjustOuterLayoutArea(bounds, graphics);
        this.drawCellBackground(graphics, bounds);
        var textPen = this.getTextPen();
        var textBrush = this.getTextBrush();
        if (typeof textPen === 'undefined' && typeof textBrush === 'undefined') {
            textBrush = new _graphics_brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_8__["PdfSolidBrush"](new _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_9__["PdfColor"](0, 0, 0));
        }
        var font = this.getTextFont();
        var strFormat = this.getStringFormat();
        var innerLayoutArea = bounds;
        if (innerLayoutArea.height >= graphics.clientSize.height) {
            // If to break row to next page.
            if (this.row.grid.allowRowBreakAcrossPages) {
                innerLayoutArea.height -= innerLayoutArea.y;
                //bounds.height -= bounds.y;
                // if(this.row.grid.isChildGrid)
                // {
                //     innerLayoutArea.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
                // }
            }
            // if user choose to cut the row whose height is more than page height.
            // else
            // {
            //     innerLayoutArea.height = graphics.clientSize.height;
            //     bounds.height = graphics.clientSize.height;
            // }
        }
        innerLayoutArea = this.adjustContentLayoutArea(innerLayoutArea);
        if (typeof this.objectValue === 'string' || typeof this.remaining === 'string') {
            var temp = void 0;
            var layoutRectangle = void 0;
            if (innerLayoutArea.height < font.height)
                layoutRectangle = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["RectangleF"](innerLayoutArea.x, innerLayoutArea.y, innerLayoutArea.width, font.height);
            else
                layoutRectangle = innerLayoutArea;
            if (innerLayoutArea.height < font.height && this.row.grid.isChildGrid && this.row.grid.ParentCell != null) {
                var height = layoutRectangle.height - this.row.grid.ParentCell.row.grid.style.cellPadding.bottom - this.row.grid.style.cellPadding.bottom;
                if (this.row.grid.splitChildRowIndex != -1) {
                    this.fontSpilt = true;
                    this.row.rowFontSplit = true;
                }
                if (height > 0 && height < font.height)
                    layoutRectangle.height = height;
                // else if (height + this.row.grid.style.cellPadding.bottom > 0 && height + this.row.grid.style.cellPadding.bottom < font.height)
                //     layoutRectangle.height = height + this.row.grid.style.cellPadding.bottom;
                // else if (bounds.height < font.height)
                //     layoutRectangle.height = bounds.height;
                // else if (bounds.height - this.row.grid.ParentCell.row.grid.style.cellPadding.bottom < font.height)
                //     layoutRectangle.height = bounds.height - this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;                        
            }
            if (this.gridRow.grid.style.cellSpacing != 0) {
                layoutRectangle.width -= this.gridRow.grid.style.cellSpacing;
                bounds.width -= this.gridRow.grid.style.cellSpacing;
            }
            if (this.isFinish) {
                // if (this.row.grid.splitChildRowIndex != -1 && !this.row.grid.isChildGrid && typeof this.remaining === 'undefined'){
                //     this.remaining = '';
                //     graphics.drawString(this.remaining, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
                // } else {
                temp = this.remaining === '' ? this.remaining : this.objectValue;
                graphics.drawString(temp, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
                if (this.row.grid.splitChildRowIndex != -1 && !this.row.grid.isChildGrid && typeof this.remaining === 'undefined') {
                    this.remaining = '';
                    //graphics.drawString(this.remaining, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
                }
            }
            else {
                if (typeof this.remaining == 'undefined' || this.remaining === null) {
                    this.remaining = '';
                }
                if (this.row.repeatFlag) {
                    graphics.drawString(this.remaining, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
                }
                //  else {
                //     if(this.row.grid.ParentCell.row.repeatFlag) {
                //         graphics.drawString((this.remaining as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);                    
                //     } else {
                //         layoutRectangle.height = this.row.height;
                //         graphics.drawString((this.objectValue as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
                //         bounds.height = this.row.height;
                //     }
                //  }
                this.isFinish = true;
                //graphics.drawString((this.remaining as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
            }
            result = graphics.stringLayoutResult;
            // if(this.row.grid.isChildGrid && this.row.rowBreakHeight > 0 && result !=null) {
            //     bounds.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
            // }
        }
        else if (this.objectValue instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
            var childGrid = this.objectValue;
            childGrid.isChildGrid = true;
            childGrid.ParentCell = this;
            var layoutRect = void 0;
            layoutRect = innerLayoutArea;
            if (this.gridRow.grid.style.cellSpacing != 0) {
                bounds.width -= this.gridRow.grid.style.cellSpacing;
            }
            // layoutRect = bounds;
            // if (this.style.cellPadding != null){
            //     layoutRect = bounds;            
            // } else if((this.row.grid.style.cellPadding != null) && (childGrid.style.cellPadding.bottom === 0.5) && (childGrid.style.cellPadding.top === 0.5)
            //                               && (childGrid.style.cellPadding.left === 5.76) && (childGrid.style.cellPadding.right === 5.76)
            //                               && (this.gridRow.grid.style.cellSpacing === 0) && (childGrid.style.cellSpacing === 0)) {
            //     layoutRect = innerLayoutArea;
            // }
            // if(this.objectValue.style.cellPadding != null && typeof this.objectValue.style.cellPadding !== 'undefined'){
            //     layoutRect = bounds;
            // }           
            var layouter = new _structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_14__["PdfGridLayouter"](childGrid);
            var format = new _structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_14__["PdfGridLayoutFormat"]();
            if (this.row.grid.LayoutFormat != null)
                format = this.row.grid.LayoutFormat;
            else
                format.layout = _graphics_figures_enum__WEBPACK_IMPORTED_MODULE_13__["PdfLayoutType"].Paginate;
            var param = new _implementation_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_15__["PdfLayoutParams"]();
            if (graphics.layer != null) {
                // Define layout parameters.
                param.page = graphics.page;
                param.bounds = layoutRect;
                param.format = format;
                //Set the span 
                childGrid.setSpan();
                childGrid.checkSpan();
                // Draw the child grid.
                var childGridResult = layouter.Layouter(param);
                //let childGridResult : PdfLayoutResult = layouter.innerLayout(param);
                this.value = childGrid;
                if (this.row.grid.splitChildRowIndex !== -1) {
                    this.height = this.row.rowBreakHeightValue;
                }
                if (param.page != childGridResult.page) //&& (isWidthGreaterthanParent != true))
                 {
                    childGridResult.bounds.height = this.row.rowBreakHeightValue;
                    if (this.row.rowBreakHeight == 0)
                        this.row.NestedGridLayoutResult = childGridResult;
                    else
                        this.row.rowBreakHeight = this.row.rowBreakHeightValue;
                    //bounds.height = this.row.rowBreakHeight;
                    //After drawing paginated nested grid, the bounds of the parent grid in start page should be corrected for borders.
                    //bounds.height = graphics.clientSize.height - bounds.y;
                }
            }
        }
        else if (this.objectValue instanceof _graphics_images_pdf_image__WEBPACK_IMPORTED_MODULE_10__["PdfImage"] || this.objectValue instanceof _graphics_images_pdf_bitmap__WEBPACK_IMPORTED_MODULE_11__["PdfBitmap"]) {
            var imageBounds = void 0;
            if (this.objectValue.width <= innerLayoutArea.width) {
                imageBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["RectangleF"](innerLayoutArea.x, innerLayoutArea.y, this.objectValue.width, innerLayoutArea.height);
            }
            else {
                imageBounds = innerLayoutArea;
            }
            graphics.drawImage(this.objectValue, imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height);
        }
        else if (this.objectValue instanceof _annotations_pdf_text_web_link__WEBPACK_IMPORTED_MODULE_12__["PdfTextWebLink"]) {
            this.objectValue.draw(graphics.currentPage, innerLayoutArea);
        }
        else if (typeof this.objectValue === 'undefined') {
            this.objectValue = "";
            graphics.drawString(this.objectValue, font, textPen, textBrush, innerLayoutArea.x, innerLayoutArea.y, innerLayoutArea.width, innerLayoutArea.height, strFormat);
            if (this.style.cellPadding != null && this.style.cellPadding.bottom == 0 && this.style.cellPadding.left == 0 && this.style.cellPadding.right == 0 && this.style.cellPadding.top == 0) {
                bounds.width -= (this.style.borders.left.width + this.style.borders.right.width);
            }
            if (this.gridRow.grid.style.cellSpacing != 0) {
                bounds.width -= this.gridRow.grid.style.cellSpacing;
            }
        }
        if (this.style.borders != null) {
            if (!this.fontSpilt)
                this.drawCellBorders(graphics, bounds);
            else {
                if (this.row.grid.ParentCell.row.grid.splitChildRowIndex != -1) {
                    this.row.rowFontSplit = false;
                    this.drawCellBorders(graphics, bounds);
                }
            }
        }
        return result;
    };
    /* tslint:enable */
    /**
     * Draws the `cell border` constructed by drawing lines.
     * @private
     */
    PdfGridCell.prototype.drawCellBorders = function (graphics, bounds) {
        if (this.row.grid.style.borderOverlapStyle === _tables_light_tables_enum__WEBPACK_IMPORTED_MODULE_7__["PdfBorderOverlapStyle"].Inside) {
            bounds.x += this.style.borders.left.width;
            bounds.y += this.style.borders.top.width;
            bounds.width -= this.style.borders.right.width;
            bounds.height -= this.style.borders.bottom.width;
        }
        var p1 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](bounds.x, bounds.y + bounds.height);
        var p2 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](bounds.x, bounds.y);
        var pen = this.cellStyle.borders.left;
        if (this.cellStyle.borders.left.dashStyle === _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfDashStyle"].Solid) {
            pen.lineCap = _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfLineCap"].Square;
        }
        // SetTransparency(ref graphics, pen);
        graphics.drawLine(pen, p1, p2);
        p1 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](bounds.x + bounds.width, bounds.y);
        p2 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](bounds.x + bounds.width, bounds.y + bounds.height);
        pen = this.cellStyle.borders.right;
        if ((bounds.x + bounds.width) > (graphics.clientSize.width - (pen.width / 2))) {
            p1 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](graphics.clientSize.width - (pen.width / 2), bounds.y);
            p2 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](graphics.clientSize.width - (pen.width / 2), bounds.y + bounds.height);
        }
        if (this.cellStyle.borders.right.dashStyle === _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfDashStyle"].Solid) {
            pen.lineCap = _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfLineCap"].Square;
        }
        graphics.drawLine(pen, p1, p2);
        p1 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](bounds.x, bounds.y);
        p2 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](bounds.x + bounds.width, bounds.y);
        pen = this.cellStyle.borders.top;
        if (this.cellStyle.borders.top.dashStyle === _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfDashStyle"].Solid) {
            pen.lineCap = _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfLineCap"].Square;
        }
        graphics.drawLine(pen, p1, p2);
        p1 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](bounds.x + bounds.width, bounds.y + bounds.height);
        p2 = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["PointF"](bounds.x, bounds.y + bounds.height);
        pen = this.cellStyle.borders.bottom;
        // if ((bounds.y + bounds.height) > (graphics.clientSize.height - (pen.width / 2))) {
        //     p1 = new PointF((bounds.x + bounds.width), (graphics.clientSize.height - (pen.width / 2)));
        //     p2 = new PointF(bounds.x, (graphics.clientSize.height - (pen.width / 2)));
        // }
        if (this.cellStyle.borders.bottom.dashStyle === _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfDashStyle"].Solid) {
            pen.lineCap = _graphics_enum__WEBPACK_IMPORTED_MODULE_6__["PdfLineCap"].Square;
        }
        graphics.drawLine(pen, p1, p2);
    };
    // private setTransparency(graphics : PdfGraphics, pen : PdfPen) : void {
    //     let alpha : number = (pen.color.a / 255)as number;
    //     graphics.save();
    //     graphics.setTransparency(alpha);
    // }
    /**
     * `Adjusts the outer layout area`.
     * @private
     */
    /* tslint:disable */
    PdfGridCell.prototype.adjustOuterLayoutArea = function (bounds, g) {
        var isHeader = false;
        var cellSpacing = this.row.grid.style.cellSpacing;
        if (cellSpacing > 0) {
            bounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["RectangleF"](bounds.x + cellSpacing, bounds.y + cellSpacing, bounds.width - cellSpacing, bounds.height - cellSpacing);
        }
        var currentColIndex = this.row.cells.indexOf(this);
        if (this.columnSpan > 1 || (this.row.rowOverflowIndex > 0 && (currentColIndex == this.row.rowOverflowIndex + 1) && this.isCellMergeContinue)) {
            var span = this.columnSpan;
            if (span == 1 && this.isCellMergeContinue) {
                for (var j = currentColIndex + 1; j < this.row.grid.columns.count; j++) {
                    if (this.row.cells.getCell(j).isCellMergeContinue)
                        span++;
                    else
                        break;
                }
            }
            var totalWidth = 0;
            for (var i = currentColIndex; i < currentColIndex + span; i++) {
                if (this.row.grid.style.allowHorizontalOverflow) {
                    var width = void 0;
                    var compWidth = this.row.grid.size.width < g.clientSize.width ? this.row.grid.size.width : g.clientSize.width;
                    if (this.row.grid.size.width > g.clientSize.width) {
                        width = bounds.x + totalWidth + this.row.grid.columns.getColumn(i).width;
                    }
                    else {
                        width = totalWidth + this.row.grid.columns.getColumn(i).width;
                    }
                    if (width > compWidth) {
                        break;
                    }
                }
                totalWidth += this.row.grid.columns.getColumn(i).width;
            }
            totalWidth -= this.row.grid.style.cellSpacing;
            bounds.width = totalWidth;
        }
        if (this.rowSpan > 1 || this.row.rowSpanExists) {
            var span = this.rowSpan;
            var currentRowIndex = this.row.grid.rows.rowCollection.indexOf(this.row);
            if (currentRowIndex == -1) {
                currentRowIndex = this.row.grid.headers.indexOf(this.row);
                if (currentRowIndex != -1) {
                    isHeader = true;
                }
            }
            // if (span == 1 && this.isCellMergeContinue) {
            //         for (let j : number = currentRowIndex + 1; j < this.row.grid.rows.count; j++)
            //         {
            //             let flag : boolean = (isHeader ? this.row.grid.headers.getHeader(j).cells.getCell(currentColIndex).isCellMergeContinue : this.row.grid.rows.getRow(j).cells.getCell(currentColIndex).isCellMergeContinue);
            //             if (flag)
            //                 span++;
            //             else
            //                 break;
            //         }
            // }
            var totalHeight = 0;
            var max = 0;
            for (var i = currentRowIndex; i < currentRowIndex + span; i++) {
                totalHeight += (isHeader ? this.row.grid.headers.getHeader(i).height : this.row.grid.rows.getRow(i).height);
                var row = this.row.grid.rows.getRow(i);
                var rowIndex = this.row.grid.rows.rowCollection.indexOf(row);
                /*if (this.rowSpan > 1)
                    {
                        for (let k : number = 0; k < this.row.cells.count; k++) {
                            let cell : PdfGridCell = this.row.cells.getCell(k);
                            if(cell.rowSpan>1)
                            {
                                let tempHeight : number =0;
                                
                                for (let j :number = i; j < i +cell.rowSpan; j++)
                                {
                                    if (!this.row.grid.rows.getRow(j).isRowSpanRowHeightSet)
                                        this.row.grid.rows.getRow(j).isRowHeightSet = false;
                                    tempHeight += this.row.grid.rows.getRow(j).height;
                                    if (!this.row.grid.rows.getRow(j).isRowSpanRowHeightSet)
                                        this.row.grid.rows.getRow(j).isRowHeightSet = true;
                                }
                                //To check the Row spanned cell height is greater than the total spanned row height.
                                if(cell.height>tempHeight)
                                {
                                    if (max < (cell.height - tempHeight))
                                    {
                                        max = cell.height - tempHeight;
                                        if (this.rowSpanRemainingHeight != 0 && max > this.rowSpanRemainingHeight)
                                        {
                                            max += this.rowSpanRemainingHeight;
                                        }
                                        let index :number = row.cells.indexOf(cell);
                                        //set the m_rowspanRemainingHeight to last rowspanned row.
                                        this.row.grid.rows.getRow((rowIndex +cell.rowSpan) - 1).cells.getCell(index).rowSpanRemainingHeight = max;
                                        this.rowSpanRemainingHeight = this.row.grid.rows.getRow((rowIndex + cell.rowSpan) - 1).cells.getCell(index).rowSpanRemainingHeight;
                                    }
                                }
                            }
                        }
                    }
                    if (!this.row.grid.rows.getRow(i).isRowSpanRowHeightSet)
                    this.row.grid.rows.getRow(i).isRowHeightSet = true;*/
            }
            var cellIndex = this.row.cells.indexOf(this);
            totalHeight -= this.row.grid.style.cellSpacing;
            // if (this.row.cells.getCell(cellIndex).height > totalHeight && (!this.row.grid.rows.getRow((currentRowIndex + span) - 1).isRowHeightSet)) {
            //      this.row.grid.rows.getRow((currentRowIndex + span) - 1).cells.getCell(cellIndex).rowSpanRemainingHeight = this.row.cells.getCell(cellIndex).height - totalHeight;
            //      totalHeight = this.row.cells.getCell(cellIndex).height;
            //      bounds.height = totalHeight;
            // } else {
            bounds.height = totalHeight;
            //  }
            if (!this.row.rowMergeComplete) {
                bounds.height = totalHeight;
            }
        }
        return bounds;
    };
    /* tslint:enable */
    /**
     * Gets the `text font`.
     * @private
     */
    PdfGridCell.prototype.getTextFont = function () {
        if (typeof this.style.font !== 'undefined' && this.style.font != null) {
            return this.style.font;
        }
        else if (typeof this.row.style.font !== 'undefined' && this.row.style.font != null) {
            return this.row.style.font;
        }
        else if (typeof this.row.grid.style.font !== 'undefined' && this.row.grid.style.font != null) {
            return this.row.grid.style.font;
        }
        else {
            return _document_pdf_document__WEBPACK_IMPORTED_MODULE_3__["PdfDocument"].defaultFont;
        }
    };
    /**
     * Gets the `text brush`.
     * @private
     */
    PdfGridCell.prototype.getTextBrush = function () {
        if (typeof this.style.textBrush !== 'undefined' && this.style.textBrush != null) {
            return this.style.textBrush;
        }
        else if (typeof this.row.style.textBrush !== 'undefined' && this.row.style.textBrush != null) {
            return this.row.style.textBrush;
        }
        else {
            return this.row.grid.style.textBrush;
        }
    };
    /**
     * Gets the `text pen`.
     * @private
     */
    PdfGridCell.prototype.getTextPen = function () {
        if (typeof this.style.textPen !== 'undefined' && this.style.textPen != null) {
            return this.style.textPen;
        }
        else if (typeof this.row.style.textPen !== 'undefined' && this.row.style.textPen != null) {
            return this.row.style.textPen;
        }
        else {
            return this.row.grid.style.textPen;
        }
    };
    /**
     * Gets the `background brush`.
     * @private
     */
    PdfGridCell.prototype.getBackgroundBrush = function () {
        if (typeof this.style.backgroundBrush !== 'undefined' && this.style.backgroundBrush != null) {
            return this.style.backgroundBrush;
        }
        else if (typeof this.row.style.backgroundBrush !== 'undefined' && this.row.style.backgroundBrush != null) {
            return this.row.style.backgroundBrush;
        }
        else {
            return this.row.grid.style.backgroundBrush;
        }
    };
    /**
     * Gets the `background image`.
     * @private
     */
    PdfGridCell.prototype.getBackgroundImage = function () {
        if (typeof this.style.backgroundImage !== 'undefined' && this.style.backgroundImage != null) {
            return this.style.backgroundImage;
        }
        else if (typeof this.row.style.backgroundImage !== 'undefined' && this.row.style.backgroundImage != null) {
            return this.row.style.backgroundImage;
        }
        else {
            return this.row.grid.style.backgroundImage;
        }
    };
    /**
     * Gets the current `StringFormat`.
     * @private
     */
    PdfGridCell.prototype.getStringFormat = function () {
        if (typeof this.style.stringFormat !== 'undefined' && this.style.stringFormat != null) {
            return this.style.stringFormat;
        }
        else {
            return this.stringFormat;
        }
    };
    /**
     * Calculates the `height`.
     * @private
     */
    PdfGridCell.prototype.measureHeight = function () {
        // .. Calculate the cell text height.
        // .....Add border widths, cell spacings and paddings to the height.
        var width = this.calculateWidth();
        // //check whether the Current PdfGridCell has padding
        if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
            width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
            //width -= (this.style.borders.left.width + this.style.borders.right.width);
        }
        else {
            width -= (this.style.cellPadding.right + this.style.cellPadding.left);
            width -= (this.style.borders.left.width + this.style.borders.right.width);
        }
        var height = 0;
        var layouter = new _graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_2__["PdfStringLayouter"]();
        if (typeof this.objectValue === 'string' || typeof this.remaining === 'string') {
            var currentValue = this.objectValue;
            /* tslint:disable */
            if (!this.isFinish)
                currentValue = !(this.remaining === null || this.remaining === '' ||
                    typeof this.remaining === 'undefined') ? this.remaining : this.objectValue;
            var slr = null;
            var cellIndex = this.row.cells.indexOf(this);
            if (this.gridRow.grid.style.cellSpacing != 0) {
                width -= this.gridRow.grid.style.cellSpacing * 2;
            }
            if (!this.row.cells.getCell(cellIndex).hasColSpan && !this.row.cells.getCell(cellIndex).hasRowSpan) {
                if (this.gridRow.grid.isChildGrid) {
                    if (width < 0) {
                        this.tempval = width;
                        if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
                            this.tempval += (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
                        }
                        else {
                            this.tempval += (this.style.cellPadding.right + this.style.cellPadding.left);
                            this.tempval += (this.style.borders.left.width + this.style.borders.right.width);
                        }
                    }
                    else {
                        this.tempval = width;
                    }
                    slr = layouter.layout(currentValue, this.getTextFont(), this.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](this.tempval, 0), false, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](0, 0));
                    height += slr.actualSize.height;
                }
                else {
                    slr = layouter.layout(currentValue, this.getTextFont(), this.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](width, 0), false, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](0, 0));
                    height += slr.actualSize.height;
                }
            }
            /* tslint:enable */
            height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
        }
        else if (this.objectValue instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"]) {
            var cellIndex = this.row.cells.indexOf(this);
            var internalWidth = 0;
            if ((this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined')) {
                internalWidth = this.calculateWidth();
                if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {
                    internalWidth -= this.style.cellPadding.left;
                }
                if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {
                    internalWidth -= this.style.cellPadding.right;
                }
            }
            else if ((this.row.grid.style.cellPadding != null || typeof this.row.grid.style.cellPadding !== 'undefined')) {
                internalWidth = this.calculateWidth();
                if (typeof this.row.grid.style.cellPadding.left !== 'undefined' && this.row.grid.style.cellPadding.hasLeftPad) {
                    internalWidth -= this.row.grid.style.cellPadding.left;
                }
                if (typeof this.row.grid.style.cellPadding.right !== 'undefined' && this.row.grid.style.cellPadding.hasRightPad) {
                    internalWidth -= this.row.grid.style.cellPadding.right;
                }
            }
            else {
                internalWidth = this.calculateWidth();
            }
            this.objectValue.tempWidth = internalWidth;
            if (!this.row.cells.getCell(cellIndex).hasColSpan && !this.row.cells.getCell(cellIndex).hasRowSpan) {
                height = this.objectValue.size.height;
            }
            else {
                height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
            }
            if (this.gridRow.grid.style.cellSpacing !== 0) {
                width -= this.gridRow.grid.style.cellSpacing * 2;
                //height += (this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom);
            }
            if (this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined') {
                if (typeof this.row.grid.style.cellPadding.top !== 'undefined' && this.row.grid.style.cellPadding.hasTopPad) {
                    height += this.row.grid.style.cellPadding.top;
                }
                if (this.row.grid.style.cellPadding.hasBottomPad && typeof this.row.grid.style.cellPadding.bottom !== 'undefined') {
                    height += this.row.grid.style.cellPadding.bottom;
                }
            }
            height += this.objectValue.style.cellSpacing;
        }
        else if (this.objectValue instanceof _graphics_images_pdf_image__WEBPACK_IMPORTED_MODULE_10__["PdfImage"] || this.objectValue instanceof _graphics_images_pdf_bitmap__WEBPACK_IMPORTED_MODULE_11__["PdfBitmap"]) {
            height += this.objectValue.height;
        }
        else if (this.objectValue instanceof _annotations_pdf_text_web_link__WEBPACK_IMPORTED_MODULE_12__["PdfTextWebLink"]) {
            var webLink = this.objectValue;
            /* tslint:disable */
            var slr = layouter.layout(webLink.text, webLink.font, webLink.stringFormat, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](width, 0), false, new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_5__["SizeF"](0, 0));
            /* tslint:enable */
            height += slr.actualSize.height;
            height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
        }
        else if (typeof this.objectValue === 'undefined') {
            if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
                width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
            }
            else {
                width -= (this.style.cellPadding.right + this.style.cellPadding.left);
                width -= (this.style.borders.left.width + this.style.borders.right.width);
            }
            height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
        }
        //Add padding top and bottom value to height
        if (!(this.objectValue instanceof _pdf_grid__WEBPACK_IMPORTED_MODULE_0__["PdfGrid"])) {
            if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
                height += (this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom);
            }
            else {
                height += (this.style.cellPadding.top + this.style.cellPadding.bottom);
            }
        }
        else {
            if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
                if (typeof this.row.grid.style.cellPadding.top !== 'undefined' && this.row.grid.style.cellPadding.hasTopPad) {
                    height += this.row.grid.style.cellPadding.top;
                }
                if (typeof this.row.grid.style.cellPadding.bottom !== 'undefined' && this.row.grid.style.cellPadding.hasBottomPad) {
                    height += this.row.grid.style.cellPadding.bottom;
                }
            }
            else {
                if (typeof this.style.cellPadding.top !== 'undefined' && this.style.cellPadding.hasTopPad) {
                    height += this.style.cellPadding.top;
                }
                if (typeof this.style.cellPadding.bottom !== 'undefined' && this.style.cellPadding.hasBottomPad) {
                    height += this.style.cellPadding.bottom;
                }
            }
        }
        height += this.row.grid.style.cellSpacing;
        return height;
    };
    /**
     * return the calculated `width` of the cell.
     * @private
     */
    PdfGridCell.prototype.calculateWidth = function () {
        var cellIndex = this.row.cells.indexOf(this);
        var rowindex = this.row.grid.rows.rowCollection.indexOf(this.row);
        var columnSpan = this.columnSpan;
        var width = 0;
        if (columnSpan === 1) {
            for (var i = 0; i < columnSpan; i++) {
                width += this.row.grid.columns.getColumn(cellIndex + i).width;
            }
        }
        else if (columnSpan > 1) {
            for (var i = 0; i < columnSpan; i++) {
                width += this.row.grid.columns.getColumn(cellIndex + i).width;
                if ((i + 1) < columnSpan) {
                    this.row.cells.getCell(cellIndex + i + 1).hasColSpan = true;
                }
            }
        }
        if (this.parent != null && this.parent.row.width > 0) {
            if ((this.row.grid.isChildGrid) && this.parent != null && (this.row.width > this.parent.row.width)) {
                width = 0;
                for (var j = 0; j < this.parent.columnSpan; j++) {
                    width += this.parent.row.grid.columns.getColumn(j).width;
                }
                width = width / this.row.cells.count;
            }
        }
        return width;
    };
    return PdfGridCell;
}());

/**
 * `PdfGridCellCollection` class provides access to an ordered,
 * strongly typed collection of 'PdfGridCell' objects.
 * @private
 */
var PdfGridCellCollection = /** @class */ (function () {
    //Constructor
    /**
     * Initializes a new instance of the `PdfGridCellCollection` class with the row.
     * @private
     */
    function PdfGridCellCollection(row) {
        /**
         * @hidden
         * @private
         */
        this.cells = [];
        this.gridRow = row;
    }
    //Properties
    /**
     * Gets the current `cell`.
     * @private
     */
    PdfGridCellCollection.prototype.getCell = function (index) {
        if (index < 0 || index >= this.count) {
            throw new Error('IndexOutOfRangeException');
        }
        return this.cells[index];
    };
    Object.defineProperty(PdfGridCellCollection.prototype, "count", {
        /**
         * Gets the cells `count`.[Read-Only].
         * @private
         */
        get: function () {
            return this.cells.length;
        },
        enumerable: true,
        configurable: true
    });
    PdfGridCellCollection.prototype.add = function (cell) {
        if (typeof cell === 'undefined') {
            var tempcell = new PdfGridCell();
            this.add(tempcell);
            return cell;
        }
        else {
            cell.row = this.gridRow;
            this.cells.push(cell);
        }
    };
    /**
     * Returns the `index of` a particular cell in the collection.
     * @private
     */
    PdfGridCellCollection.prototype.indexOf = function (cell) {
        return this.cells.indexOf(cell);
    };
    return PdfGridCellCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-column.js":
/*!****************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-column.js ***!
  \****************************************************************************************************************/
/*! exports provided: PdfGridColumn, PdfGridColumnCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridColumn", function() { return PdfGridColumn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridColumnCollection", function() { return PdfGridColumnCollection; });
/* harmony import */ var _pdf_grid_cell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-grid-cell */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-cell.js");
/* harmony import */ var _graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../graphics/fonts/pdf-string-format */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js");


/**
 * `PdfGridColumn` class represents the schema of a column in a 'PdfGrid'.
 */
var PdfGridColumn = /** @class */ (function () {
    //Constructors
    /**
     * Initializes a new instance of the `PdfGridColumn` class with the parent grid.
     * @private
     */
    function PdfGridColumn(grid) {
        /**
         * The `width` of the column.
         * @default 0
         * @private
         */
        this.columnWidth = 0;
        this.grid = grid;
    }
    Object.defineProperty(PdfGridColumn.prototype, "width", {
        /**
         * Gets or sets the `width` of the 'PdfGridColumn'.
         * @private
         */
        get: function () {
            return this.columnWidth;
        },
        set: function (value) {
            this.isCustomWidth = true;
            this.columnWidth = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridColumn.prototype, "format", {
        /**
         * Gets or sets the information about the text `formatting`.
         * @private
         */
        get: function () {
            if (this.stringFormat == null) {
                this.stringFormat = new _graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_1__["PdfStringFormat"](); //GetDefaultFormat();
            }
            return this.stringFormat;
        },
        set: function (value) {
            this.stringFormat = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfGridColumn;
}());

/**
 * `PdfGridColumnCollection` class provides access to an ordered,
 * strongly typed collection of 'PdfGridColumn' objects.
 * @private
 */
var PdfGridColumnCollection = /** @class */ (function () {
    //properties
    //Constructors
    /**
     * Initializes a new instance of the `PdfGridColumnCollection` class with the parent grid.
     * @private
     */
    function PdfGridColumnCollection(grid) {
        /**
         * @hidden
         * @private
         */
        this.internalColumns = [];
        /**
         * @hidden
         * @private
         */
        this.columnWidth = 0;
        this.grid = grid;
        this.internalColumns = [];
    }
    //Iplementation
    /**
     * `Add` a new column to the 'PdfGrid'.
     * @private
     */
    PdfGridColumnCollection.prototype.add = function (count) {
        // public add(column : PdfGridColumn) : void
        // public add(arg : number|PdfGridColumn) : void {
        // if (typeof arg === 'number') {
        for (var i = 0; i < count; i++) {
            this.internalColumns.push(new PdfGridColumn(this.grid));
            for (var index = 0; index < this.grid.rows.count; index++) {
                var row = this.grid.rows.getRow(index);
                var cell = new _pdf_grid_cell__WEBPACK_IMPORTED_MODULE_0__["PdfGridCell"]();
                cell.value = '';
                row.cells.add(cell);
            }
        }
        // } else {
        //     let column : PdfGridColumn = new PdfGridColumn(this.grid);
        //     this.columns.push(column);
        //     return column;
        // }
    };
    Object.defineProperty(PdfGridColumnCollection.prototype, "count", {
        /**
         * Gets the `number of columns` in the 'PdfGrid'.[Read-Only].
         * @private
         */
        get: function () {
            return this.internalColumns.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridColumnCollection.prototype, "width", {
        /**
         * Gets the `widths`.
         * @private
         */
        get: function () {
            if (this.columnWidth === 0) {
                this.columnWidth = this.measureColumnsWidth();
            }
            if (this.grid.initialWidth !== 0 && this.columnWidth !== this.grid.initialWidth && !this.grid.style.allowHorizontalOverflow) {
                this.columnWidth = this.grid.initialWidth;
                this.grid.isPageWidth = true;
            }
            return this.columnWidth;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridColumnCollection.prototype, "columns", {
        /**
         * Gets the `array of PdfGridColumn`.[Read-Only]
         * @private
         */
        get: function () {
            return this.internalColumns;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Gets the `PdfGridColumn` from the specified index.[Read-Only]
     * @private
     */
    PdfGridColumnCollection.prototype.getColumn = function (index) {
        if (index >= 0 && index <= this.columns.length) {
            return this.columns[index];
        }
        else {
            throw Error('can not get the column from the index: ' + index);
        }
    };
    //Implementation
    /**
     * `Calculates the column widths`.
     * @private
     */
    PdfGridColumnCollection.prototype.measureColumnsWidth = function () {
        var totalWidth = 0;
        this.grid.measureColumnsWidth();
        for (var i = 0, count = this.internalColumns.length; i < count; i++) {
            totalWidth += this.internalColumns[i].width;
        }
        return totalWidth;
    };
    /**
     * Gets the `widths of the columns`.
     * @private
     */
    PdfGridColumnCollection.prototype.getDefaultWidths = function (totalWidth) {
        var widths = [];
        var summ = 0.0;
        var subFactor = this.count;
        for (var i = 0; i < this.count; i++) {
            if (this.grid.isPageWidth && totalWidth >= 0 && !this.internalColumns[i].isCustomWidth) {
                this.internalColumns[i].width = 0;
            }
            else {
                widths[i] = this.internalColumns[i].width;
                if (this.internalColumns[i].width > 0 && this.internalColumns[i].isCustomWidth) {
                    totalWidth -= this.internalColumns[i].width;
                    subFactor--;
                }
                else {
                    widths[i] = 0;
                }
            }
        }
        for (var i = 0; i < this.count; i++) {
            var width = totalWidth / subFactor;
            if (widths[i] <= 0) {
                widths[i] = width;
            }
        }
        return widths;
    };
    return PdfGridColumnCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-row.js":
/*!*************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-row.js ***!
  \*************************************************************************************************************/
/*! exports provided: PdfGridRow, PdfGridRowCollection, PdfGridHeaderCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridRow", function() { return PdfGridRow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridRowCollection", function() { return PdfGridRowCollection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridHeaderCollection", function() { return PdfGridHeaderCollection; });
/* harmony import */ var _pdf_grid_cell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-grid-cell */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-cell.js");
/* harmony import */ var _styles_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./styles/style */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/style.js");


/**
 * `PdfGridRow` class provides customization of the settings for the particular row.
 */
var PdfGridRow = /** @class */ (function () {
    //Constructor
    /**
     * Initializes a new instance of the `PdfGridRow` class with the parent grid.
     * @private
     */
    function PdfGridRow(grid) {
        /**
         * Stores the index of the overflowing row.
         * @private
         */
        this.gridRowOverflowIndex = 0;
        /**
         * The `height` of the row.
         * @private
         */
        this.rowHeight = 0;
        /**
         * The `width` of the row.
         * @private
         */
        this.rowWidth = 0;
        /**
         * The `isFinish` of the row.
         * @private
         */
        this.isrowFinish = false;
        /**
         * Check whether the Row span row height `is set explicitly`.
         * @default false
         * @public
         */
        this.isRowSpanRowHeightSet = false;
        /**
         * The `page count` of the row.
         * @public
         */
        this.noOfPageCount = 0;
        /**
         * Check whether the row height `is set explicitly`.
         * @default false
         * @private
         */
        this.isRowHeightSet = false;
        this.isPageBreakRowSpanApplied = false;
        /**
         * Check weather the row merge `is completed` or not.
         * @default true
         * @private
         */
        this.isRowMergeComplete = true;
        this.repeatFlag = false;
        this.rowFontSplit = false;
        this.pdfGrid = grid;
    }
    Object.defineProperty(PdfGridRow.prototype, "rowSpanExists", {
        //Properties
        /**
         * Gets or sets a value indicating [`row span exists`].
         * @private
         */
        get: function () {
            return this.bRowSpanExists;
        },
        set: function (value) {
            this.bRowSpanExists = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "cells", {
        /**
         * Gets the `cells` from the selected row.[Read-Only].
         * @private
         */
        get: function () {
            if (this.gridCells == null) {
                this.gridCells = new _pdf_grid_cell__WEBPACK_IMPORTED_MODULE_0__["PdfGridCellCollection"](this);
            }
            return this.gridCells;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "grid", {
        /**
         * Gets or sets the parent `grid`.
         * @private
         */
        get: function () {
            return this.pdfGrid;
        },
        set: function (value) {
            this.pdfGrid = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "style", {
        /**
         * Gets or sets the row `style`.
         * @private
         */
        get: function () {
            if (typeof this.rowStyle === 'undefined') {
                this.rowStyle = new _styles_style__WEBPACK_IMPORTED_MODULE_1__["PdfGridRowStyle"]();
                this.rowStyle.setParent(this);
            }
            return this.rowStyle;
        },
        set: function (value) {
            this.rowStyle = value;
            for (var i = 0; i < this.cells.count; i++) {
                this.cells.getCell(i).style.borders = value.border;
                if (typeof value.font !== 'undefined') {
                    this.cells.getCell(i).style.font = value.font;
                }
                if (typeof value.backgroundBrush !== 'undefined') {
                    this.cells.getCell(i).style.backgroundBrush = value.backgroundBrush;
                }
                if (typeof value.backgroundImage !== 'undefined') {
                    this.cells.getCell(i).style.backgroundImage = value.backgroundImage;
                }
                if (typeof value.textBrush !== 'undefined') {
                    this.cells.getCell(i).style.textBrush = value.textBrush;
                }
                if (typeof value.textPen !== 'undefined') {
                    this.cells.getCell(i).style.textPen = value.textPen;
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "rowBreakHeight", {
        /**
         * `Height` of the row yet to be drawn after split.
         * @private
         */
        get: function () {
            if (typeof this.gridRowBreakHeight === 'undefined') {
                this.gridRowBreakHeight = 0;
            }
            return this.gridRowBreakHeight;
        },
        set: function (value) {
            this.gridRowBreakHeight = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "rowOverflowIndex", {
        /**
         * `over flow index` of the row.
         * @private
         */
        get: function () {
            return this.gridRowOverflowIndex;
        },
        set: function (value) {
            this.gridRowOverflowIndex = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "height", {
        /**
         * Gets or sets the `height` of the row.
         * @private
         */
        get: function () {
            if (!this.isRowHeightSet) {
                this.rowHeight = this.measureHeight();
            }
            return this.rowHeight;
        },
        set: function (value) {
            this.rowHeight = value;
            this.isRowHeightSet = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "width", {
        /**
         * Gets or sets the `width` of the row.
         * @private
         */
        get: function () {
            if (this.rowWidth === 0 || typeof this.rowWidth === 'undefined') {
                this.rowWidth = this.measureWidth();
            }
            return this.rowWidth;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "NestedGridLayoutResult", {
        /**
         * Gets or sets the row `Nested grid Layout Result`.
         * @private
         */
        get: function () {
            return this.gridResult;
        },
        set: function (value) {
            this.gridResult = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "columnSpanExists", {
        /**
         * Gets or sets a value indicating [`column span exists`].
         * @private
         */
        get: function () {
            return this.bColumnSpanExists;
        },
        set: function (value) {
            this.bColumnSpanExists = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "rowMergeComplete", {
        /**
         * Check whether the Row `has row span or row merge continue`.
         * @private
         */
        get: function () {
            return this.isRowMergeComplete;
        },
        set: function (value) {
            this.isRowMergeComplete = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRow.prototype, "rowIndex", {
        /**
         * Returns `index` of the row.
         * @private
         */
        get: function () {
            return this.grid.rows.rowCollection.indexOf(this);
        },
        enumerable: true,
        configurable: true
    });
    //Implementation
    /**
     * `Calculates the height`.
     * @private
     */
    PdfGridRow.prototype.measureHeight = function () {
        var rowSpanRemainingHeight = 0;
        var rowHeight;
        var maxHeight = 0;
        if (this.cells.getCell(0).rowSpan > 1) {
            rowHeight = 0;
        }
        else {
            rowHeight = this.cells.getCell(0).height;
        }
        for (var i = 0; i < this.cells.count; i++) {
            var cell = this.cells.getCell(i);
            //get the maximum rowspan remaining height.
            if (cell.rowSpanRemainingHeight > rowSpanRemainingHeight) {
                rowSpanRemainingHeight = cell.rowSpanRemainingHeight;
            }
            //skip the cell if row spanned.
            // if (cell.isRowMergeContinue) {
            //     continue;
            // }
            // if (!cell.isRowMergeContinue) {
            //     this.rowMergeComplete = false;
            // }
            this.rowMergeComplete = false;
            if (cell.rowSpan > 1) {
                var cellIn = i;
                var rowin = this.grid.rows.rowCollection.indexOf(this);
                for (var j = 0; j < cell.rowSpan; j++) {
                    if ((j + 1) < cell.rowSpan) {
                        this.grid.rows.getRow(rowin + j + 1).cells.getCell(cellIn).hasRowSpan = true;
                    }
                }
                if (maxHeight < cell.height) {
                    maxHeight = cell.height;
                }
                continue;
            }
            rowHeight = Math.max(rowHeight, cell.height);
        }
        if (maxHeight > rowHeight) {
            rowHeight = maxHeight;
        }
        if (rowHeight === 0) {
            rowHeight = maxHeight;
        }
        else if (rowSpanRemainingHeight > 0) {
            rowHeight += rowSpanRemainingHeight;
        }
        return rowHeight;
    };
    PdfGridRow.prototype.measureWidth = function () {
        var rowWid = 0;
        for (var i = 0; i < this.grid.columns.count; i++) {
            var column = this.grid.columns.getColumn(i);
            rowWid += column.width;
        }
        return rowWid;
    };
    return PdfGridRow;
}());

/**
 * `PdfGridRowCollection` class provides access to an ordered, strongly typed collection of 'PdfGridRow' objects.
 * @private
 */
var PdfGridRowCollection = /** @class */ (function () {
    // Constructor
    /**
     * Initializes a new instance of the `PdfGridRowCollection` class with the parent grid.
     * @private
     */
    function PdfGridRowCollection(grid) {
        this.rows = [];
        this.grid = grid;
    }
    Object.defineProperty(PdfGridRowCollection.prototype, "count", {
        //Properties
        /**
         * Gets the number of header in the `PdfGrid`.[Read-Only].
         * @private
         */
        get: function () {
            return this.rows.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridRowCollection.prototype, "rowCollection", {
        //Implementation
        /**
         * Return the row collection of the `grid`.
         * @private
         */
        get: function () {
            return this.rows;
        },
        enumerable: true,
        configurable: true
    });
    PdfGridRowCollection.prototype.addRow = function (arg) {
        if (typeof arg === 'undefined') {
            var temprow = new PdfGridRow(this.grid);
            this.addRow(temprow);
            return temprow;
        }
        else {
            arg.style.setBackgroundBrush(this.grid.style.backgroundBrush);
            arg.style.setFont(this.grid.style.font);
            arg.style.setTextBrush(this.grid.style.textBrush);
            arg.style.setTextPen(this.grid.style.textPen);
            if (arg.cells.count === 0) {
                for (var i = 0; i < this.grid.columns.count; i++) {
                    arg.cells.add(new _pdf_grid_cell__WEBPACK_IMPORTED_MODULE_0__["PdfGridCell"]());
                }
            }
            this.rows.push(arg);
        }
    };
    /**
     * Return the row by index.
     * @private
     */
    PdfGridRowCollection.prototype.getRow = function (index) {
        return this.rows[index];
    };
    return PdfGridRowCollection;
}());

/**
 * `PdfGridHeaderCollection` class provides customization of the settings for the header.
 * @private
 */
var PdfGridHeaderCollection = /** @class */ (function () {
    //constructor
    /**
     * Initializes a new instance of the `PdfGridHeaderCollection` class with the parent grid.
     * @private
     */
    function PdfGridHeaderCollection(grid) {
        /**
         * The array to store the `rows` of the grid header.
         * @private
         */
        this.rows = [];
        this.grid = grid;
        this.rows = [];
    }
    //Properties
    /**
     * Gets a 'PdfGridRow' object that represents the `header` row in a 'PdfGridHeaderCollection' control.[Read-Only].
     * @private
     */
    PdfGridHeaderCollection.prototype.getHeader = function (index) {
        // if (index < 0 || index >= Count) {
        //     throw new IndexOutOfRangeException();
        // }
        return (this.rows[index]);
    };
    Object.defineProperty(PdfGridHeaderCollection.prototype, "count", {
        /**
         * Gets the `number of header` in the 'PdfGrid'.[Read-Only]
         * @private
         */
        get: function () {
            return this.rows.length;
        },
        enumerable: true,
        configurable: true
    });
    PdfGridHeaderCollection.prototype.add = function (arg) {
        if (typeof arg === 'number') {
            var row = void 0;
            for (var i = 0; i < arg; i++) {
                row = new PdfGridRow(this.grid);
                for (var j = 0; j < this.grid.columns.count; j++) {
                    row.cells.add(new _pdf_grid_cell__WEBPACK_IMPORTED_MODULE_0__["PdfGridCell"]());
                }
                this.rows.push(row);
            }
            return this.rows;
        }
        else {
            this.rows.push(arg);
        }
    };
    PdfGridHeaderCollection.prototype.indexOf = function (row) {
        return this.rows.indexOf(row);
    };
    return PdfGridHeaderCollection;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid.js":
/*!*********************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid.js ***!
  \*********************************************************************************************************/
/*! exports provided: PdfGrid */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGrid", function() { return PdfGrid; });
/* harmony import */ var _pdf_grid_column__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-grid-column */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-column.js");
/* harmony import */ var _pdf_grid_row__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pdf-grid-row */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-row.js");
/* harmony import */ var _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony import */ var _graphics_figures_layout_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../graphics/figures/layout-element */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/layout-element.js");
/* harmony import */ var _graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../graphics/figures/base/element-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js");
/* harmony import */ var _styles_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./styles/style */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/style.js");
/* harmony import */ var _structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../structured-elements/grid/layout/grid-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/layout/grid-layouter.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * PdfGrid.ts class for EJ2-PDF
 */







var PdfGrid = /** @class */ (function (_super) {
    __extends(PdfGrid, _super);
    //constructor
    /**
     * Initialize a new instance for `PdfGrid` class.
     * @private
     */
    function PdfGrid() {
        var _this = _super.call(this) || this;
        /**
         * @hidden
         * @private
         */
        _this.gridSize = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](0, 0);
        /**
         * Check the child grid is ' split or not'
         */
        _this.isGridSplit = false;
        /**
         * @hidden
         * @private
         */
        _this.isRearranged = false;
        /**
         * @hidden
         * @private
         */
        _this.pageBounds = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"]();
        /**
         * @hidden
         * @private
         */
        _this.listOfNavigatePages = [];
        /**
         * @hidden
         * @private
         */
        _this.parentCellIndex = 0;
        _this.tempWidth = 0;
        /**
         * @hidden
         * @private
         */
        _this.breakRow = true;
        _this.splitChildRowIndex = -1;
        /**
         * The event raised on `begin cell lay outing`.
         * @event
         * @private
         */
        //public beginPageLayout : Function;
        /**
         * The event raised on `end cell lay outing`.
         * @event
         * @private
         */
        //public endPageLayout : Function;
        _this.hasRowSpanSpan = false;
        _this.hasColumnSpan = false;
        _this.isSingleGrid = true;
        return _this;
    }
    Object.defineProperty(PdfGrid.prototype, "raiseBeginCellDraw", {
        //Properties
        /**
         * Gets a value indicating whether the `start cell layout event` should be raised.
         * @private
         */
        get: function () {
            return (typeof this.beginCellDraw !== 'undefined' && typeof this.beginCellDraw !== null);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "raiseEndCellDraw", {
        /**
         * Gets a value indicating whether the `end cell layout event` should be raised.
         * @private
         */
        get: function () {
            return (typeof this.endCellDraw !== 'undefined' && typeof this.endCellDraw !== null);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "repeatHeader", {
        /**
         * Gets or sets a value indicating whether to `repeat header`.
         * @private
         */
        get: function () {
            if (this.bRepeatHeader == null || typeof this.bRepeatHeader === 'undefined') {
                this.bRepeatHeader = false;
            }
            return this.bRepeatHeader;
        },
        set: function (value) {
            this.bRepeatHeader = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "allowRowBreakAcrossPages", {
        /**
         * Gets or sets a value indicating whether to split or cut rows that `overflow a page`.
         * @private
         */
        get: function () {
            return this.breakRow;
        },
        set: function (value) {
            this.breakRow = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "columns", {
        /**
         * Gets the `column` collection of the PdfGrid.[Read-Only]
         * @private
         */
        get: function () {
            if (this.gridColumns == null || typeof this.gridColumns === 'undefined') {
                this.gridColumns = new _pdf_grid_column__WEBPACK_IMPORTED_MODULE_0__["PdfGridColumnCollection"](this);
            }
            return this.gridColumns;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "rows", {
        /**
         * Gets the `row` collection from the PdfGrid.[Read-Only]
         * @private
         */
        get: function () {
            if (this.gridRows == null) {
                this.gridRows = new _pdf_grid_row__WEBPACK_IMPORTED_MODULE_1__["PdfGridRowCollection"](this);
            }
            return this.gridRows;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "headers", {
        /**
         * Gets the `headers` collection from the PdfGrid.[Read-Only]
         * @private
         */
        get: function () {
            if (this.gridHeaders == null || typeof this.gridHeaders === 'undefined') {
                this.gridHeaders = new _pdf_grid_row__WEBPACK_IMPORTED_MODULE_1__["PdfGridHeaderCollection"](this);
            }
            return this.gridHeaders;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "initialWidth", {
        /**
         * Indicating `initial width` of the page.
         * @private
         */
        get: function () {
            return this.gridInitialWidth;
        },
        set: function (value) {
            this.gridInitialWidth = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "style", {
        /**
         * Gets or sets the `grid style`.
         * @private
         */
        get: function () {
            if (this.gridStyle == null) {
                this.gridStyle = new _styles_style__WEBPACK_IMPORTED_MODULE_5__["PdfGridStyle"]();
            }
            return this.gridStyle;
        },
        set: function (value) {
            if (this.gridStyle == null) {
                this.gridStyle = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "isPageWidth", {
        /**
         * Gets a value indicating whether the grid column width is considered to be `page width`.
         * @private
         */
        get: function () {
            return this.ispageWidth;
        },
        set: function (value) {
            this.ispageWidth = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "isChildGrid", {
        /**
         * Gets or set if grid `is nested grid`.
         * @private
         */
        get: function () {
            return this.ischildGrid;
        },
        set: function (value) {
            this.ischildGrid = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "size", {
        /**
         * Gets or set if grid ' is split or not'
         * @public
         */
        // public get isGridSplit() : boolean {
        //     return this.isgridSplit;
        // }
        // public set isGridSplit(value : boolean) {
        //     this.isgridSplit = value;
        // }public get isGridSplit() : boolean {
        //     return this.isgridSplit;
        // }
        // public set isGridSplit(value : boolean) {
        //     this.isgridSplit = value;
        // }
        /**
         * Gets the `size`.
         * @private
         */
        get: function () {
            if ((this.gridSize.width === 0 || typeof this.gridSize.width === 'undefined') && this.gridSize.height === 0) {
                this.gridSize = this.measure();
            }
            return this.gridSize;
            // } else {
            //     return this.gridSize;
            // }
        },
        set: function (value) {
            this.gridSize = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "ParentCell", {
        get: function () {
            return this.parentCell;
        },
        set: function (value) {
            this.parentCell = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGrid.prototype, "LayoutFormat", {
        get: function () {
            return this.layoutFormat;
        },
        enumerable: true,
        configurable: true
    });
    PdfGrid.prototype.draw = function (arg1, arg2, arg3, arg4) {
        if (arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"] && typeof arg2.width === 'undefined' && typeof arg3 === 'undefined') {
            return this.drawHelper(arg1, arg2.x, arg2.y);
        }
        else if (typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'undefined') {
            return this.drawHelper(arg1, arg2, arg3, null);
        }
        else if (arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"] && typeof arg2.width !== 'undefined' && typeof arg3 === 'undefined') {
            return this.drawHelper(arg1, arg2, null);
        }
        else if (arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["PointF"] && typeof arg2.width === 'undefined' && arg3 instanceof _graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_4__["PdfLayoutFormat"]) {
            return this.drawHelper(arg1, arg2.x, arg2.y, arg3);
        }
        else if (typeof arg2 === 'number' && typeof arg3 === 'number' && (arg4 instanceof _graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_4__["PdfLayoutFormat"] || arg4 == null)) {
            var width = (arg1.graphics.clientSize.width - arg2);
            var layoutRectangle = new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"](arg2, arg3, width, 0);
            return this.drawHelper(arg1, layoutRectangle, arg4);
        }
        else if (arg2 instanceof _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["RectangleF"] && typeof arg2.width !== 'undefined' && typeof arg3 === 'boolean') {
            return this.drawHelper(arg1, arg2, null);
        }
        else {
            return this.drawHelper(arg1, arg2, arg3);
        }
    };
    /**
     * `measures` this instance.
     * @private
     */
    PdfGrid.prototype.measure = function () {
        var height = 0;
        var width = this.columns.width;
        for (var i = 0; i < this.headers.count; i++) {
            var row = this.headers.getHeader(i);
            height += row.height;
        }
        for (var i = 0; i < this.rows.count; i++) {
            var row = this.rows.getRow(i);
            height += row.height;
        }
        return new _drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_2__["SizeF"](width, height);
    };
    PdfGrid.prototype.onBeginCellDraw = function (args) {
        if (this.raiseBeginCellDraw) {
            this.beginCellDraw(this, args);
        }
    };
    PdfGrid.prototype.onEndCellDraw = function (args) {
        if (this.raiseEndCellDraw) {
            this.endCellDraw(this, args);
        }
    };
    /**
     * `Layouts` the specified graphics.
     * @private
     */
    PdfGrid.prototype.layout = function (param) {
        // if (this.rows.count !== 0) {
        //     if (this.rows.getRow(0).cells.getCell(0).style.borders.left.width !== 1) {
        //         let x : number = this.rows.getRow(0).cells.getCell(0).style.borders.left.width / 2;
        //         let y : number = this.rows.getRow(0).cells.getCell(0).style.borders.top.width / 2;
        //         if (param.bounds.x === PdfBorders.default.right.width / 2 && param.bounds.y === PdfBorders.default.right.width / 2) {
        //             let newBound : RectangleF = new RectangleF(x, y, this.gridSize.width, this.gridSize.height);
        //             param.bounds = newBound;
        //         }
        //     }
        // }
        this.setSpan();
        this.checkSpan();
        this.layoutFormat = param.format;
        this.gridLocation = param.bounds;
        var layouter = new _structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_6__["PdfGridLayouter"](this);
        var result = (layouter.Layouter(param));
        return result;
    };
    PdfGrid.prototype.setSpan = function () {
        var colSpan = 1;
        var rowSpan = 1;
        var currentCellIndex = 0;
        var currentRowIndex = 0;
        var maxSpan = 0;
        var rowCount = this.headers.count;
        for (var i = 0; i < rowCount; i++) {
            var row = this.headers.getHeader(i);
            maxSpan = 0;
            var colCount = row.cells.count;
            for (var j = 0; j < colCount; j++) {
                var cell = row.cells.getCell(j);
                maxSpan = Math.max(maxSpan, cell.rowSpan);
                //Skip setting span map for already coverted rows/columns.
                if (!cell.isCellMergeContinue && !cell.isRowMergeContinue && (cell.columnSpan > 1 || cell.rowSpan > 1)) {
                    if (cell.columnSpan + j > row.cells.count) {
                        throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());
                    }
                    if (cell.rowSpan + i > this.headers.count) {
                        throw new Error('Invalid span specified at Header ' + j.toString() + ' column ' + i.toString());
                    }
                    // if (this.rows.count !== 0 && cell.rowSpan + i > this.rows.count) {
                    //     throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());
                    // }
                    if (cell.columnSpan > 1 && cell.rowSpan > 1) {
                        colSpan = cell.columnSpan;
                        rowSpan = cell.rowSpan;
                        currentCellIndex = j;
                        currentRowIndex = i;
                        cell.isCellMergeStart = true;
                        cell.isRowMergeStart = true;
                        //Set Column merges for first row
                        while (colSpan > 1) {
                            currentCellIndex++;
                            row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
                            row.cells.getCell(currentCellIndex).isRowMergeContinue = true;
                            row.cells.getCell(currentCellIndex).rowSpan = rowSpan;
                            colSpan--;
                        }
                        currentCellIndex = j;
                        colSpan = cell.columnSpan;
                        //Set Row Merges and column merges foreach subsequent rows.
                        while (rowSpan > 1) {
                            currentRowIndex++;
                            this.headers.getHeader(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;
                            this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;
                            rowSpan--;
                            while (colSpan > 1) {
                                currentCellIndex++;
                                this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isCellMergeContinue = true;
                                this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;
                                colSpan--;
                            }
                            colSpan = cell.columnSpan;
                            currentCellIndex = j;
                        }
                    }
                    else if (cell.columnSpan > 1 && cell.rowSpan === 1) {
                        colSpan = cell.columnSpan;
                        currentCellIndex = j;
                        cell.isCellMergeStart = true;
                        //Set Column merges.
                        while (colSpan > 1) {
                            currentCellIndex++;
                            row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
                            colSpan--;
                        }
                    }
                    else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
                        rowSpan = cell.rowSpan;
                        currentRowIndex = i;
                        //Set row Merges.
                        while (rowSpan > 1) {
                            currentRowIndex++;
                            this.headers.getHeader(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;
                            rowSpan--;
                        }
                    }
                }
            }
            row.maximumRowSpan = maxSpan;
        }
    };
    PdfGrid.prototype.checkSpan = function () {
        var cellcolSpan;
        var cellrowSpan = 1;
        var cellmaxSpan = 0;
        var currentCellIndex;
        var currentRowIndex = 0;
        cellcolSpan = cellrowSpan = 1;
        currentCellIndex = currentRowIndex = 0;
        if (this.hasRowSpanSpan || this.hasColumnSpan) {
            var rowCount = this.rows.count;
            for (var i = 0; i < rowCount; i++) {
                var row = this.rows.getRow(i);
                cellmaxSpan = 0;
                var colCount = row.cells.count;
                for (var j = 0; j < colCount; j++) {
                    var cell = row.cells.getCell(j);
                    cellmaxSpan = Math.max(cellmaxSpan, cell.rowSpan);
                    //Skip setting span map for already coverted rows/columns.
                    if (!cell.isCellMergeContinue && !cell.isRowMergeContinue
                        && (cell.columnSpan > 1 || cell.rowSpan > 1)) {
                        if (cell.columnSpan + j > row.cells.count) {
                            throw new Error('Invalid span specified at row  ' + j.toString() + ' column ' + i.toString());
                        }
                        if (cell.rowSpan + i > this.rows.count) {
                            throw new Error('Invalid span specified at row  ' + j.toString() + ' column ' + i.toString());
                        }
                        if (cell.columnSpan > 1 && cell.rowSpan > 1) {
                            cellcolSpan = cell.columnSpan;
                            cellrowSpan = cell.rowSpan;
                            currentCellIndex = j;
                            currentRowIndex = i;
                            cell.isCellMergeStart = true;
                            cell.isRowMergeStart = true;
                            //Set Column merges for first row
                            while (cellcolSpan > 1) {
                                currentCellIndex++;
                                row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
                                row.cells.getCell(currentCellIndex).isRowMergeContinue = true;
                                cellcolSpan--;
                            }
                            currentCellIndex = j;
                            cellcolSpan = cell.columnSpan;
                            //Set Row Merges and column merges foreach subsequent rows.
                            while (cellrowSpan > 1) {
                                currentRowIndex++;
                                this.rows.getRow(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;
                                this.rows.getRow(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;
                                cellrowSpan--;
                                while (cellcolSpan > 1) {
                                    currentCellIndex++;
                                    this.rows.getRow(currentRowIndex).cells.getCell(currentCellIndex).isCellMergeContinue = true;
                                    this.rows.getRow(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;
                                    cellcolSpan--;
                                }
                                cellcolSpan = cell.columnSpan;
                                currentCellIndex = j;
                            }
                        }
                        else if (cell.columnSpan > 1 && cell.rowSpan === 1) {
                            cellcolSpan = cell.columnSpan;
                            currentCellIndex = j;
                            cell.isCellMergeStart = true;
                            //Set Column merges.
                            while (cellcolSpan > 1) {
                                currentCellIndex++;
                                row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
                                cellcolSpan--;
                            }
                        }
                        else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
                            cellrowSpan = cell.rowSpan;
                            currentRowIndex = i;
                            //Set row Merges.
                            while (cellrowSpan > 1) {
                                currentRowIndex++;
                                this.rows.getRow(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;
                                cellrowSpan--;
                            }
                        }
                    }
                }
                row.maximumRowSpan = cellmaxSpan;
            }
        }
    };
    PdfGrid.prototype.measureColumnsWidth = function (bounds) {
        if (typeof bounds !== 'undefined') {
            this.isPageWidth = false;
            var widths = this.columns.getDefaultWidths(bounds.width - bounds.x);
            //let tempWidth : number = this.columns.getColumn(0).width;
            for (var i = 0, count = this.columns.count; i < count; i++) {
                // if (this.columns.getColumn(i).width < 0)
                //     this.columns.getColumn(i).columnWidth = widths[i];
                // else if (this.columns.getColumn(i).width > 0 && !this.columns.getColumn(i).isCustomWidth && widths[i]>0 && this.isComplete)
                this.columns.getColumn(i).columnWidth = widths[i];
                this.tempWidth = widths[i];
            }
            if (this.ParentCell != null && this.style.allowHorizontalOverflow == false && this.ParentCell.row.grid.style.allowHorizontalOverflow == false) {
                var padding = 0;
                var columnWidth = 0;
                var columnCount = this.columns.count;
                var childGridColumnWidth = 0;
                if (this.ParentCell.style.cellPadding != null || typeof this.ParentCell.style.cellPadding !== 'undefined') {
                    if (typeof this.ParentCell.style.cellPadding.left != 'undefined' && this.ParentCell.style.cellPadding.hasLeftPad) {
                        padding += this.ParentCell.style.cellPadding.left;
                    }
                    if (typeof this.ParentCell.style.cellPadding.right != 'undefined' && this.ParentCell.style.cellPadding.hasRightPad) {
                        padding += this.ParentCell.style.cellPadding.right;
                    }
                }
                for (var i = 0; i < this.ParentCell.columnSpan; i++) {
                    columnWidth += this.ParentCell.row.grid.columns.getColumn(this.parentCellIndex + i).width;
                }
                for (var j = 0; j < this.columns.count; j++) {
                    if (this.gridColumns.getColumn(j).width > 0 && this.gridColumns.getColumn(j).isCustomWidth) {
                        columnWidth -= this.gridColumns.getColumn(j).width;
                        columnCount--;
                    }
                }
                if ((this.ParentCell.row.grid.style.cellPadding != null || typeof this.ParentCell.row.grid.style.cellPadding != 'undefined')) {
                    if (typeof this.ParentCell.row.grid.style.cellPadding.top != 'undefined' && this.ParentCell.row.grid.style.cellPadding.hasTopPad) {
                        padding += this.ParentCell.row.grid.style.cellPadding.top;
                    }
                    if (typeof this.ParentCell.row.grid.style.cellPadding.bottom != 'undefined' && this.ParentCell.row.grid.style.cellPadding.hasBottomPad) {
                        padding += this.ParentCell.row.grid.style.cellPadding.bottom;
                    }
                }
                if (this.ParentCell.row.grid.style.cellSpacing != 0) {
                    columnWidth -= this.ParentCell.row.grid.style.cellSpacing * 2;
                }
                if (columnWidth > padding) {
                    childGridColumnWidth = (columnWidth - padding) / columnCount;
                    this.tempWidth = childGridColumnWidth;
                    if (this.ParentCell != null) {
                        for (var j = 0; j < this.columns.count; j++) {
                            if (!this.columns.getColumn(j).isCustomWidth)
                                this.columns.getColumn(j).columnWidth = childGridColumnWidth;
                        }
                    }
                }
            }
            // if (this.ParentCell != null && this.ParentCell.row.width > 0)
            // {
            //     if (this.isChildGrid && this.gridSize.width > this.ParentCell.row.width)
            //     {
            //         widths = this.columns.getDefaultWidths(bounds.width);
            //         for (let i : number = 0; i < this.columns.count; i++)
            //         {
            //             this.columns.getColumn(i).width = widths[i];
            //         }
            //     }
            // }
        }
        else {
            var widths = [this.columns.count];
            for (var n = 0; n < this.columns.count; n++) {
                widths[n] = 0;
            }
            var cellWidth = 0;
            var cellWidths = 0;
            if ((typeof this.isChildGrid === 'undefined' && typeof this.gridLocation !== 'undefined') || (this.isChildGrid === null && typeof this.gridLocation !== 'undefined')) {
                this.initialWidth = this.gridLocation.width;
            }
            if (this.headers.count > 0) {
                var colCount_1 = this.headers.getHeader(0).cells.count;
                var rowCount = this.headers.count;
                for (var i = 0; i < colCount_1; i++) {
                    cellWidth = 0;
                    for (var j = 0; j < rowCount; j++) {
                        var rowWidth = Math.min(this.initialWidth, this.headers.getHeader(j).cells.getCell(i).width);
                        cellWidth = Math.max(cellWidth, rowWidth);
                    }
                    widths[i] = cellWidth;
                }
            }
            // else {
            //     let colCount : number = this.rows.getRow(0).cells.count;
            //     let rowCount : number = this.rows.count;
            //     for (let i : number = 0; i < colCount; i++) {
            //         cellWidth = 0;
            //         for (let j : number = 0; j < rowCount; j++) {
            //             let rowWidth : number = Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width);
            //             cellWidth = Math.max(cellWidth, rowWidth);
            //         }
            //         widths[i] = cellWidth;
            //     }
            // }
            cellWidth = 0;
            for (var i = 0, colCount_2 = this.columns.count; i < colCount_2; i++) {
                for (var j = 0, rowCount = this.rows.count; j < rowCount; j++) {
                    if ((this.rows.getRow(j).cells.getCell(i).columnSpan == 1 && !this.rows.getRow(j).cells.getCell(i).isCellMergeContinue) || this.rows.getRow(j).cells.getCell(i).value != null) {
                        if (this.rows.getRow(j).cells.getCell(i).value != null && !this.rows.getRow(j).grid.style.allowHorizontalOverflow) {
                            var value = this.rows.getRow(j).grid.style.cellPadding.right +
                                this.rows.getRow(j).grid.style.cellPadding.left
                                + this.rows.getRow(j).cells.getCell(i).style.borders.left.width / 2;
                            //  if (this.initialWidth != 0 )
                            //         (this.rows.getRow(j).cells.getCell(i).value as PdfGrid).initialWidth = this.initialWidth - value;
                        }
                        var rowWidth = 0;
                        rowWidth = this.initialWidth > 0.0 ? Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width) : this.rows.getRow(j).cells.getCell(i).width;
                        // let internalWidth : number = this.rows.getRow(j).cells.getCell(i).width;
                        // internalWidth += this.rows.getRow(j).cells.getCell(i).style.borders.left.width;
                        // internalWidth += this.rows.getRow(j).cells.getCell(i).style.borders.right.width;
                        // let internalHeight : number = this.rows.getRow(j).cells.getCell(i).height;
                        // internalHeight += (this.rows.getRow(j).cells.getCell(i).style.borders.top.width);
                        // internalHeight += (this.rows.getRow(j).cells.getCell(i).style.borders.bottom.width);
                        // let isCorrectWidth : boolean = (internalWidth + this.gridLocation.x) > this.currentGraphics.clientSize.width;
                        // let isCorrectHeight : boolean = (internalHeight + this.gridLocation.y) > this.currentGraphics.clientSize.height;
                        // if (isCorrectWidth || isCorrectHeight) {
                        //     throw Error('Image size exceeds client size of the page. Can not insert this image');
                        // }
                        // rowWidth = Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width);
                        cellWidth = Math.max(widths[i], Math.max(cellWidth, rowWidth));
                        cellWidth = Math.max(this.columns.getColumn(i).width, cellWidth);
                    }
                }
                if (this.rows.count != 0)
                    widths[i] = cellWidth;
                cellWidth = 0;
            }
            for (var i = 0, RowCount = this.rows.count; i < RowCount; i++) {
                for (var j = 0, ColCount = this.columns.count; j < ColCount; j++) {
                    if (this.rows.getRow(i).cells.getCell(j).columnSpan > 1) {
                        var total = widths[j];
                        for (var k = 1; k < this.rows.getRow(i).cells.getCell(j).columnSpan; k++) {
                            total += widths[j + k];
                        }
                        // if (this.rows.getRow(i).cells.getCell(j).width > total)
                        // {
                        //     let extendedWidth : number = this.rows.getRow(i).cells.getCell(j).width - total;
                        //     extendedWidth = extendedWidth / this.rows.getRow(i).cells.getCell(j).columnSpan;
                        //     for (let k : number = j; k < j + this.rows.getRow(i).cells.getCell(j).columnSpan; k++)
                        //         widths[k] += extendedWidth;
                        // }
                    }
                }
            }
            // if (this.isChildGrid && this.initialWidth != 0)
            // {
            //     widths = this.columns.getDefaultWidths(this.initialWidth);
            // }
            for (var i = 0, count = this.columns.count; i < count; i++) {
                if (this.columns.getColumn(i).width <= 0)
                    this.columns.getColumn(i).columnWidth = widths[i];
                else if (this.columns.getColumn(i).width > 0 && !this.columns.getColumn(i).isCustomWidth)
                    this.columns.getColumn(i).columnWidth = widths[i];
            }
            var padding = 0;
            var colWidth = 0;
            var colCount = this.columns.count;
            var childGridColWidth = 0;
            colWidth = this.tempWidth;
            for (var j = 0; j < this.columns.count; j++) {
                if (this.gridColumns.getColumn(j).width > 0 && this.gridColumns.getColumn(j).isCustomWidth) {
                    colWidth -= this.gridColumns.getColumn(j).width;
                    colCount--;
                }
            }
            // if (this.style.cellSpacing != 0){
            //     colWidth -= this.style.cellSpacing * 2;
            // }
            if (colWidth > 0) {
                if (this.ParentCell.row.grid.style.cellSpacing != 0) {
                    colWidth -= this.ParentCell.row.grid.style.cellSpacing * 2;
                }
            }
            if (colWidth > padding) {
                childGridColWidth = (colWidth) / colCount;
                if (this.ParentCell != null) {
                    for (var j = 0; j < this.columns.count; j++) {
                        if (!this.columns.getColumn(j).isCustomWidth)
                            this.columns.getColumn(j).columnWidth = childGridColWidth;
                    }
                }
            }
        }
    };
    return PdfGrid;
}(_graphics_figures_layout_element__WEBPACK_IMPORTED_MODULE_3__["PdfLayoutElement"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/pdf-borders.js":
/*!*******************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/pdf-borders.js ***!
  \*******************************************************************************************************************/
/*! exports provided: PdfBorders, PdfPaddings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfBorders", function() { return PdfBorders; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfPaddings", function() { return PdfPaddings; });
/* harmony import */ var _graphics_pdf_pen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../graphics/pdf-pen */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-pen.js");
/* harmony import */ var _graphics_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../../graphics/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony import */ var _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../../graphics/pdf-color */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js");
/**
 * PdfBorders.ts class for EJ2-PDF
 */



/**
 * `PdfBorders` class used represents the cell border of the PDF grid.
 */
var PdfBorders = /** @class */ (function () {
    // Constructor
    /**
     * Create a new instance for `PdfBorders` class.
     * @private
     */
    function PdfBorders() {
        var defaultBorderPenLeft = new _graphics_pdf_pen__WEBPACK_IMPORTED_MODULE_0__["PdfPen"](new _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_2__["PdfColor"](0, 0, 0));
        defaultBorderPenLeft.dashStyle = _graphics_enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Solid;
        var defaultBorderPenRight = new _graphics_pdf_pen__WEBPACK_IMPORTED_MODULE_0__["PdfPen"](new _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_2__["PdfColor"](0, 0, 0));
        defaultBorderPenRight.dashStyle = _graphics_enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Solid;
        var defaultBorderPenTop = new _graphics_pdf_pen__WEBPACK_IMPORTED_MODULE_0__["PdfPen"](new _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_2__["PdfColor"](0, 0, 0));
        defaultBorderPenTop.dashStyle = _graphics_enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Solid;
        var defaultBorderPenBottom = new _graphics_pdf_pen__WEBPACK_IMPORTED_MODULE_0__["PdfPen"](new _graphics_pdf_color__WEBPACK_IMPORTED_MODULE_2__["PdfColor"](0, 0, 0));
        defaultBorderPenBottom.dashStyle = _graphics_enum__WEBPACK_IMPORTED_MODULE_1__["PdfDashStyle"].Solid;
        this.leftPen = defaultBorderPenLeft;
        this.rightPen = defaultBorderPenRight;
        this.topPen = defaultBorderPenTop;
        this.bottomPen = defaultBorderPenBottom;
    }
    Object.defineProperty(PdfBorders.prototype, "left", {
        // Properties
        /**
         * Gets or sets the `Left`.
         * @private
         */
        get: function () {
            return this.leftPen;
        },
        set: function (value) {
            this.leftPen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBorders.prototype, "right", {
        /**
         * Gets or sets the `Right`.
         * @private
         */
        get: function () {
            return this.rightPen;
        },
        set: function (value) {
            this.rightPen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBorders.prototype, "top", {
        /**
         * Gets or sets the `Top`.
         * @private
         */
        get: function () {
            return this.topPen;
        },
        set: function (value) {
            this.topPen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBorders.prototype, "bottom", {
        /**
         * Gets or sets the `Bottom`.
         * @private
         */
        get: function () {
            return this.bottomPen;
        },
        set: function (value) {
            this.bottomPen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBorders.prototype, "all", {
        /**
         * sets the `All`.
         * @private
         */
        set: function (value) {
            this.leftPen = this.rightPen = this.topPen = this.bottomPen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBorders.prototype, "isAll", {
        /**
         * Gets a value indicating whether this instance `is all`.
         * @private
         */
        get: function () {
            return ((this.leftPen === this.rightPen) && (this.leftPen === this.topPen) && (this.leftPen === this.bottomPen));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfBorders, "default", {
        /**
         * Gets the `default`.
         * @private
         */
        get: function () {
            return new PdfBorders();
        },
        enumerable: true,
        configurable: true
    });
    return PdfBorders;
}());

var PdfPaddings = /** @class */ (function () {
    function PdfPaddings(left, right, top, bottom) {
        /**
         * The 'left' border padding set.
         * @private
         */
        this.hasLeftPad = false;
        /**
         * The 'right' border padding set.
         * @private
         */
        this.hasRightPad = false;
        /**
         * The 'top' border padding set.
         * @private
         */
        this.hasTopPad = false;
        /**
         * The 'bottom' border padding set.
         * @private
         */
        this.hasBottomPad = false;
        if (typeof left === 'undefined') {
            //5.76 and 0 are taken from ms-word default table margins.
            this.leftPad = this.rightPad = 5.76;
            //0.5 is set for top and bottom by default.
            this.bottomPad = this.topPad = 0.5;
        }
        else {
            this.leftPad = left;
            this.rightPad = right;
            this.topPad = top;
            this.bottomPad = bottom;
            this.hasLeftPad = true;
            this.hasRightPad = true;
            this.hasTopPad = true;
            this.hasBottomPad = true;
        }
    }
    Object.defineProperty(PdfPaddings.prototype, "left", {
        // Properties
        /**
         * Gets or sets the `left` value of the edge
         * @private
         */
        get: function () {
            return this.leftPad;
        },
        set: function (value) {
            this.leftPad = value;
            this.hasLeftPad = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPaddings.prototype, "right", {
        /**
         * Gets or sets the `right` value of the edge.
         * @private
         */
        get: function () {
            return this.rightPad;
        },
        set: function (value) {
            this.rightPad = value;
            this.hasRightPad = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPaddings.prototype, "top", {
        /**
         * Gets or sets the `top` value of the edge
         * @private
         */
        get: function () {
            return this.topPad;
        },
        set: function (value) {
            this.topPad = value;
            this.hasTopPad = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPaddings.prototype, "bottom", {
        /**
         * Gets or sets the `bottom` value of the edge.
         * @private
         */
        get: function () {
            return this.bottomPad;
        },
        set: function (value) {
            this.bottomPad = value;
            this.hasBottomPad = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfPaddings.prototype, "all", {
        /**
         * Sets value to all sides `left,right,top and bottom`.s
         * @private
         */
        set: function (value) {
            this.leftPad = this.rightPad = this.topPad = this.bottomPad = value;
            this.hasLeftPad = true;
            this.hasRightPad = true;
            this.hasTopPad = true;
            this.hasBottomPad = true;
        },
        enumerable: true,
        configurable: true
    });
    return PdfPaddings;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/style.js":
/*!*************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/style.js ***!
  \*************************************************************************************************************/
/*! exports provided: PdfGridStyleBase, PdfGridStyle, PdfGridCellStyle, PdfGridRowStyle, PdfHorizontalOverflowType */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridStyleBase", function() { return PdfGridStyleBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridStyle", function() { return PdfGridStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridCellStyle", function() { return PdfGridCellStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfGridRowStyle", function() { return PdfGridRowStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfHorizontalOverflowType", function() { return PdfHorizontalOverflowType; });
/* harmony import */ var _pdf_borders__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pdf-borders */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/pdf-borders.js");
/* harmony import */ var _tables_light_tables_enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../tables/light-tables/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/tables/light-tables/enum.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * Base class for the `grid style`,
 */
var PdfGridStyleBase = /** @class */ (function () {
    function PdfGridStyleBase() {
    }
    Object.defineProperty(PdfGridStyleBase.prototype, "backgroundBrush", {
        // Properties
        /**
         * Gets or sets the `background brush`.
         * @private
         */
        get: function () {
            return this.gridBackgroundBrush;
        },
        set: function (value) {
            this.gridBackgroundBrush = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridStyleBase.prototype, "textBrush", {
        /**
         * Gets or sets the `text brush`.
         * @private
         */
        get: function () {
            return this.gridTextBrush;
        },
        set: function (value) {
            this.gridTextBrush = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridStyleBase.prototype, "textPen", {
        /**
         * Gets or sets the `text pen`.
         * @private
         */
        get: function () {
            return this.gridTextPen;
        },
        set: function (value) {
            this.gridTextPen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridStyleBase.prototype, "font", {
        /**
         * Gets or sets the `font`.
         * @private
         */
        get: function () {
            return this.gridFont;
        },
        set: function (value) {
            this.gridFont = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridStyleBase.prototype, "backgroundImage", {
        /**
         * Gets or sets the `background Image`.
         * @private
         */
        get: function () {
            return this.gridBackgroundImage;
        },
        set: function (value) {
            this.gridBackgroundImage = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfGridStyleBase;
}());

/**
 * `PdfGridStyle` class provides customization of the appearance for the 'PdfGrid'.
 */
var PdfGridStyle = /** @class */ (function (_super) {
    __extends(PdfGridStyle, _super);
    //constructor
    /**
     * Initialize a new instance for `PdfGridStyle` class.
     * @private
     */
    function PdfGridStyle() {
        var _this = _super.call(this) || this;
        _this.gridBorderOverlapStyle = _tables_light_tables_enum__WEBPACK_IMPORTED_MODULE_1__["PdfBorderOverlapStyle"].Overlap;
        _this.bAllowHorizontalOverflow = false;
        _this.gridHorizontalOverflowType = PdfHorizontalOverflowType.LastPage;
        return _this;
    }
    Object.defineProperty(PdfGridStyle.prototype, "cellSpacing", {
        //Properties
        /**
         * Gets or sets the `cell spacing` of the 'PdfGrid'.
         * @private
         */
        get: function () {
            if (typeof this.gridCellSpacing === 'undefined') {
                this.gridCellSpacing = 0;
            }
            return this.gridCellSpacing;
        },
        set: function (value) {
            this.gridCellSpacing = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridStyle.prototype, "horizontalOverflowType", {
        /**
         * Gets or sets the type of the `horizontal overflow` of the 'PdfGrid'.
         * @private
         */
        get: function () {
            return this.gridHorizontalOverflowType;
        },
        set: function (value) {
            this.gridHorizontalOverflowType = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridStyle.prototype, "allowHorizontalOverflow", {
        /**
         * Gets or sets a value indicating whether to `allow horizontal overflow`.
         * @private
         */
        get: function () {
            return this.bAllowHorizontalOverflow;
        },
        set: function (value) {
            this.bAllowHorizontalOverflow = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridStyle.prototype, "cellPadding", {
        /**
         * Gets or sets the `cell padding`.
         * @private
         */
        get: function () {
            if (typeof this.gridCellPadding === 'undefined') {
                this.gridCellPadding = new _pdf_borders__WEBPACK_IMPORTED_MODULE_0__["PdfPaddings"]();
            }
            return this.gridCellPadding;
        },
        set: function (value) {
            if (typeof this.gridCellPadding === 'undefined') {
                this.gridCellPadding = new _pdf_borders__WEBPACK_IMPORTED_MODULE_0__["PdfPaddings"]();
                this.gridCellPadding = value;
            }
            else {
                this.gridCellPadding = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridStyle.prototype, "borderOverlapStyle", {
        /**
         * Gets or sets the `border overlap style` of the 'PdfGrid'.
         * @private
         */
        get: function () {
            return this.gridBorderOverlapStyle;
        },
        set: function (value) {
            this.gridBorderOverlapStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfGridStyle;
}(PdfGridStyleBase));

/**
 * `PdfGridCellStyle` class provides customization of the appearance for the 'PdfGridCell'.
 */
var PdfGridCellStyle = /** @class */ (function (_super) {
    __extends(PdfGridCellStyle, _super);
    /**
     * Initializes a new instance of the `PdfGridCellStyle` class.
     * @private
     */
    function PdfGridCellStyle() {
        var _this = _super.call(this) || this;
        /**
         * @hidden
         * @private
         */
        _this.gridCellBorders = _pdf_borders__WEBPACK_IMPORTED_MODULE_0__["PdfBorders"].default;
        return _this;
    }
    Object.defineProperty(PdfGridCellStyle.prototype, "stringFormat", {
        //Properties
        /**
         * Gets the `string format` of the 'PdfGridCell'.
         * @private
         */
        get: function () {
            return this.format;
        },
        set: function (value) {
            this.format = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCellStyle.prototype, "borders", {
        /**
         * Gets or sets the `border` of the 'PdfGridCell'.
         * @private
         */
        get: function () {
            return this.gridCellBorders;
        },
        set: function (value) {
            this.gridCellBorders = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PdfGridCellStyle.prototype, "cellPadding", {
        /**
         * Gets or sets the `cell padding`.
         * @private
         */
        get: function () {
            return this.gridCellPadding;
        },
        set: function (value) {
            if (this.gridCellPadding == null || typeof this.gridCellPadding === 'undefined') {
                this.gridCellPadding = new _pdf_borders__WEBPACK_IMPORTED_MODULE_0__["PdfPaddings"]();
            }
            this.gridCellPadding = value;
        },
        enumerable: true,
        configurable: true
    });
    return PdfGridCellStyle;
}(PdfGridStyleBase));

/**
 * `PdfGridRowStyle` class provides customization of the appearance for the `PdfGridRow`.
 */
var PdfGridRowStyle = /** @class */ (function () {
    // public setBackgroundImage(value : PdfImage) : void {
    //     this.gridRowBackgroundImage = value;
    //     if (typeof this.parent !== 'undefined') {
    //         for (let i : number = 0; i < this.parent.cells.count; i++) {
    //             this.parent.cells.getCell(i).style.backgroundImage = value;
    //         }
    //     }
    // }
    // Constructor
    /**
     * Initializes a new instance of the `PdfGridRowStyle` class.
     * @private
     */
    function PdfGridRowStyle() {
        //
    }
    Object.defineProperty(PdfGridRowStyle.prototype, "backgroundBrush", {
        // Properties
        /**
         * Gets or sets the `background brush`.
         * @private
         */
        get: function () {
            return this.gridRowBackgroundBrush;
        },
        enumerable: true,
        configurable: true
    });
    PdfGridRowStyle.prototype.setBackgroundBrush = function (value) {
        this.gridRowBackgroundBrush = value;
        if (typeof this.parent !== 'undefined') {
            for (var i = 0; i < this.parent.cells.count; i++) {
                this.parent.cells.getCell(i).style.backgroundBrush = value;
            }
        }
    };
    Object.defineProperty(PdfGridRowStyle.prototype, "textBrush", {
        /**
         * Gets or sets the `text brush`.
         * @private
         */
        get: function () {
            return this.gridRowTextBrush;
        },
        enumerable: true,
        configurable: true
    });
    PdfGridRowStyle.prototype.setTextBrush = function (value) {
        this.gridRowTextBrush = value;
        if (typeof this.parent !== 'undefined') {
            for (var i = 0; i < this.parent.cells.count; i++) {
                this.parent.cells.getCell(i).style.textBrush = value;
            }
        }
    };
    Object.defineProperty(PdfGridRowStyle.prototype, "textPen", {
        /**
         * Gets or sets the `text pen`.
         * @private
         */
        get: function () {
            return this.gridRowTextPen;
        },
        enumerable: true,
        configurable: true
    });
    PdfGridRowStyle.prototype.setTextPen = function (value) {
        this.gridRowTextPen = value;
        if (typeof this.parent !== 'undefined') {
            for (var i = 0; i < this.parent.cells.count; i++) {
                this.parent.cells.getCell(i).style.textPen = value;
            }
        }
    };
    Object.defineProperty(PdfGridRowStyle.prototype, "font", {
        /**
         * Gets or sets the `font`.
         * @private
         */
        get: function () {
            return this.gridRowFont;
        },
        enumerable: true,
        configurable: true
    });
    PdfGridRowStyle.prototype.setFont = function (value) {
        this.gridRowFont = value;
        if (typeof this.parent !== 'undefined') {
            for (var i = 0; i < this.parent.cells.count; i++) {
                this.parent.cells.getCell(i).style.font = value;
            }
        }
    };
    Object.defineProperty(PdfGridRowStyle.prototype, "border", {
        /**
         * Gets or sets the `border` of the current row.
         * @private
         */
        get: function () {
            if (typeof this.gridRowBorder === 'undefined') {
                this.setBorder(new _pdf_borders__WEBPACK_IMPORTED_MODULE_0__["PdfBorders"]());
            }
            return this.gridRowBorder;
        },
        enumerable: true,
        configurable: true
    });
    PdfGridRowStyle.prototype.setBorder = function (value) {
        this.gridRowBorder = value;
        if (typeof this.parent !== 'undefined') {
            for (var i = 0; i < this.parent.cells.count; i++) {
                this.parent.cells.getCell(i).style.borders = value;
            }
        }
    };
    /**
     * sets the `parent row` of the current object.
     * @private
     */
    PdfGridRowStyle.prototype.setParent = function (parent) {
        this.parent = parent;
    };
    Object.defineProperty(PdfGridRowStyle.prototype, "backgroundImage", {
        /**
         * Gets or sets the `backgroundImage` of the 'PdfGridCell'.
         * @private
         */
        get: function () {
            return this.gridRowBackgroundImage;
        },
        enumerable: true,
        configurable: true
    });
    return PdfGridRowStyle;
}());

/**
 * public Enum for `PdfHorizontalOverflowType`.
 * @private
 */
var PdfHorizontalOverflowType;
(function (PdfHorizontalOverflowType) {
    /**
     * Specifies the type of `NextPage`.
     * @private
     */
    PdfHorizontalOverflowType[PdfHorizontalOverflowType["NextPage"] = 0] = "NextPage";
    /**
     * Specifies the type of `LastPage`.
     * @private
     */
    PdfHorizontalOverflowType[PdfHorizontalOverflowType["LastPage"] = 1] = "LastPage";
})(PdfHorizontalOverflowType || (PdfHorizontalOverflowType = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/tables/light-tables/enum.js":
/*!********************************************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/tables/light-tables/enum.js ***!
  \********************************************************************************************************************/
/*! exports provided: PdfBorderOverlapStyle */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfBorderOverlapStyle", function() { return PdfBorderOverlapStyle; });
/**
 * public Enum for `PdfBorderOverlapStyle`.
 * @private
 */
var PdfBorderOverlapStyle;
(function (PdfBorderOverlapStyle) {
    /**
     * Specifies the type of `Overlap`.
     * @private
     */
    PdfBorderOverlapStyle[PdfBorderOverlapStyle["Overlap"] = 0] = "Overlap";
    /**
     * Specifies the type of `Inside`.
     * @private
     */
    PdfBorderOverlapStyle[PdfBorderOverlapStyle["Inside"] = 1] = "Inside";
})(PdfBorderOverlapStyle || (PdfBorderOverlapStyle = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-pdf-export/src/index.js":
/*!**************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-pdf-export/src/index.js ***!
  \**************************************************************/
/*! exports provided: PdfAction, PdfUriAction, PdfActionLinkAnnotation, PdfAnnotation, PdfAnnotationCollection, PdfDocumentLinkAnnotation, PdfLinkAnnotation, PdfTextWebLink, PdfUriAnnotation, Dictionary, defaultToString, PdfCatalog, PdfDocument, PdfDocumentBase, PdfDocumentTemplate, PdfPageNumberField, PdfCompositeField, PdfPageCountField, PointF, SizeF, RectangleF, Rectangle, PdfCacheCollection, PdfCollection, PdfDestination, PdfDestinationMode, ProcedureSets, PdfHorizontalAlignment, PdfVerticalAlignment, PdfTextAlignment, TextRenderingMode, PdfLineJoin, PdfLineCap, PdfDashStyle, PdfFillMode, PdfColorSpace, PdfBlendMode, PdfGraphicsUnit, PdfGridImagePosition, PdfTextDirection, PdfColor, PdfGraphics, GetResourceEventHandler, PdfGraphicsState, PdfMargins, PdfPen, PdfResources, Guid, PdfTransformationMatrix, Matrix, PdfBrush, PdfSolidBrush, PdfTemplate, PdfLayoutElement, PdfTextElement, ElementLayouter, PdfLayoutFormat, PdfLayoutParams, PdfLayoutResult, TextLayouter, TextPageLayoutResult, PdfTextLayoutResult, PdfLayoutType, PdfLayoutBreakType, PdfFontStyle, PdfFontFamily, PdfFontType, PdfWordWrapType, PdfSubSuperScript, FontEncoding, TtfCmapFormat, TtfCmapEncoding, TtfPlatformID, TtfMicrosoftEncodingID, TtfMacintoshEncodingID, FontDescriptorFlags, TtfCompositeGlyphFlags, PdfFont, PdfFontMetrics, WidthTable, StandardWidthTable, PdfStandardFont, PdfStandardFontMetricsFactory, PdfStringFormat, PdfStringLayouter, PdfStringLayoutResult, LineInfo, LineType, StringTokenizer, PdfTrueTypeFont, RtlRenderer, ArabicShapeRenderer, ArabicShape, Bidi, RtlCharacters, ByteArray, ImageFormat, ImageDecoder, PdfBitmap, PdfImage, PdfTransparency, ObjectStatus, ObjectType, PdfCrossTable, RegisteredObject, DictionaryProperties, PdfMainObjectCollection, ObjectInfo, Operators, PdfStreamWriter, PdfWriter, PdfPageOrientation, PdfPageRotateAngle, PdfNumberStyle, PdfDockStyle, PdfAlignmentStyle, TemplateType, PageAddedEventArgs, PdfDocumentPageCollection, PdfPage, PdfPageBase, PdfPageLayer, PdfPageLayerCollection, PdfPageSettings, PdfPageSize, PdfPageTemplateElement, PdfSection, PageSettingsState, PdfSectionCollection, PdfSectionPageCollection, PdfSectionTemplate, PdfArray, PdfDictionary, SaveSectionCollectionEventHandler, SaveDescendantFontEventHandler, SaveFontDictionaryEventHandler, SaveAnnotationEventHandler, SaveSectionEventHandler, SaveTemplateEventHandler, PdfName, PdfNumber, PdfReference, PdfReferenceHolder, PdfStream, SaveCmapEventHandler, SaveFontProgramEventHandler, InternalEnum, PdfString, PdfGridStyleBase, PdfGridStyle, PdfGridCellStyle, PdfGridRowStyle, PdfHorizontalOverflowType, PdfBorders, PdfPaddings, PdfBorderOverlapStyle, PdfGridLayouter, PdfGridLayoutResult, PdfGridLayoutFormat, GridCellEventArgs, PdfGridBeginCellDrawEventArgs, PdfGridEndCellDrawEventArgs, PdfCancelEventArgs, BeginPageLayoutEventArgs, EndPageLayoutEventArgs, PdfGridBeginPageLayoutEventArgs, PdfGridEndPageLayoutEventArgs, RowLayoutResult, PdfGrid, PdfGridColumn, PdfGridColumnCollection, PdfGridRow, PdfGridRowCollection, PdfGridHeaderCollection, PdfGridCell, PdfGridCellCollection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _implementation_actions_action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./implementation/actions/action */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/action.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfAction", function() { return _implementation_actions_action__WEBPACK_IMPORTED_MODULE_0__["PdfAction"]; });

/* harmony import */ var _implementation_actions_uri_action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./implementation/actions/uri-action */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/uri-action.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfUriAction", function() { return _implementation_actions_uri_action__WEBPACK_IMPORTED_MODULE_1__["PdfUriAction"]; });

/* harmony import */ var _implementation_annotations_action_link_annotation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./implementation/annotations/action-link-annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/action-link-annotation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfActionLinkAnnotation", function() { return _implementation_annotations_action_link_annotation__WEBPACK_IMPORTED_MODULE_2__["PdfActionLinkAnnotation"]; });

/* harmony import */ var _implementation_annotations_annotation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./implementation/annotations/annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfAnnotation", function() { return _implementation_annotations_annotation__WEBPACK_IMPORTED_MODULE_3__["PdfAnnotation"]; });

/* harmony import */ var _implementation_annotations_annotation_collection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./implementation/annotations/annotation-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation-collection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfAnnotationCollection", function() { return _implementation_annotations_annotation_collection__WEBPACK_IMPORTED_MODULE_4__["PdfAnnotationCollection"]; });

/* harmony import */ var _implementation_annotations_document_link_annotation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./implementation/annotations/document-link-annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/document-link-annotation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentLinkAnnotation", function() { return _implementation_annotations_document_link_annotation__WEBPACK_IMPORTED_MODULE_5__["PdfDocumentLinkAnnotation"]; });

/* harmony import */ var _implementation_annotations_link_annotation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./implementation/annotations/link-annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/link-annotation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLinkAnnotation", function() { return _implementation_annotations_link_annotation__WEBPACK_IMPORTED_MODULE_6__["PdfLinkAnnotation"]; });

/* harmony import */ var _implementation_annotations_pdf_text_web_link__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./implementation/annotations/pdf-text-web-link */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/pdf-text-web-link.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextWebLink", function() { return _implementation_annotations_pdf_text_web_link__WEBPACK_IMPORTED_MODULE_7__["PdfTextWebLink"]; });

/* harmony import */ var _implementation_annotations_uri_annotation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./implementation/annotations/uri-annotation */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/uri-annotation.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfUriAnnotation", function() { return _implementation_annotations_uri_annotation__WEBPACK_IMPORTED_MODULE_8__["PdfUriAnnotation"]; });

/* harmony import */ var _implementation_collections_dictionary__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./implementation/collections/dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dictionary", function() { return _implementation_collections_dictionary__WEBPACK_IMPORTED_MODULE_9__["Dictionary"]; });

/* harmony import */ var _implementation_collections_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./implementation/collections/utils */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/utils.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultToString", function() { return _implementation_collections_utils__WEBPACK_IMPORTED_MODULE_10__["defaultToString"]; });

/* harmony import */ var _implementation_document_pdf_catalog__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./implementation/document/pdf-catalog */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-catalog.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCatalog", function() { return _implementation_document_pdf_catalog__WEBPACK_IMPORTED_MODULE_11__["PdfCatalog"]; });

/* harmony import */ var _implementation_document_pdf_document__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./implementation/document/pdf-document */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocument", function() { return _implementation_document_pdf_document__WEBPACK_IMPORTED_MODULE_12__["PdfDocument"]; });

/* harmony import */ var _implementation_document_pdf_document_base__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./implementation/document/pdf-document-base */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentBase", function() { return _implementation_document_pdf_document_base__WEBPACK_IMPORTED_MODULE_13__["PdfDocumentBase"]; });

/* harmony import */ var _implementation_document_pdf_document_template__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./implementation/document/pdf-document-template */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-template.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentTemplate", function() { return _implementation_document_pdf_document_template__WEBPACK_IMPORTED_MODULE_14__["PdfDocumentTemplate"]; });

/* harmony import */ var _implementation_document_automatic_fields_pdf_page_number_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./implementation/document/automatic-fields/pdf-page-number-field */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-page-number-field.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageNumberField", function() { return _implementation_document_automatic_fields_pdf_page_number_field__WEBPACK_IMPORTED_MODULE_15__["PdfPageNumberField"]; });

/* harmony import */ var _implementation_document_automatic_fields_composite_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./implementation/document/automatic-fields/composite-field */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/composite-field.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCompositeField", function() { return _implementation_document_automatic_fields_composite_field__WEBPACK_IMPORTED_MODULE_16__["PdfCompositeField"]; });

/* harmony import */ var _implementation_document_automatic_fields_page_count_field__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./implementation/document/automatic-fields/page-count-field */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/page-count-field.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageCountField", function() { return _implementation_document_automatic_fields_page_count_field__WEBPACK_IMPORTED_MODULE_17__["PdfPageCountField"]; });

/* harmony import */ var _implementation_drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./implementation/drawing/pdf-drawing */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PointF", function() { return _implementation_drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_18__["PointF"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SizeF", function() { return _implementation_drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_18__["SizeF"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RectangleF", function() { return _implementation_drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_18__["RectangleF"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rectangle", function() { return _implementation_drawing_pdf_drawing__WEBPACK_IMPORTED_MODULE_18__["Rectangle"]; });

/* harmony import */ var _implementation_general_pdf_cache_collection__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./implementation/general/pdf-cache-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-cache-collection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCacheCollection", function() { return _implementation_general_pdf_cache_collection__WEBPACK_IMPORTED_MODULE_19__["PdfCacheCollection"]; });

/* harmony import */ var _implementation_general_pdf_collection__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./implementation/general/pdf-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-collection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCollection", function() { return _implementation_general_pdf_collection__WEBPACK_IMPORTED_MODULE_20__["PdfCollection"]; });

/* harmony import */ var _implementation_general_pdf_destination__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./implementation/general/pdf-destination */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-destination.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDestination", function() { return _implementation_general_pdf_destination__WEBPACK_IMPORTED_MODULE_21__["PdfDestination"]; });

/* harmony import */ var _implementation_general_enum__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./implementation/general/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/enum.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDestinationMode", function() { return _implementation_general_enum__WEBPACK_IMPORTED_MODULE_22__["PdfDestinationMode"]; });

/* harmony import */ var _implementation_graphics_constants__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./implementation/graphics/constants */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/constants.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProcedureSets", function() { return _implementation_graphics_constants__WEBPACK_IMPORTED_MODULE_23__["ProcedureSets"]; });

/* harmony import */ var _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./implementation/graphics/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfHorizontalAlignment", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfHorizontalAlignment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfVerticalAlignment", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfVerticalAlignment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextAlignment", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfTextAlignment"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextRenderingMode", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["TextRenderingMode"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLineJoin", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfLineJoin"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLineCap", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfLineCap"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDashStyle", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfDashStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFillMode", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfFillMode"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfColorSpace", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfColorSpace"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBlendMode", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfBlendMode"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGraphicsUnit", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfGraphicsUnit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridImagePosition", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfGridImagePosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextDirection", function() { return _implementation_graphics_enum__WEBPACK_IMPORTED_MODULE_24__["PdfTextDirection"]; });

/* harmony import */ var _implementation_graphics_pdf_color__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./implementation/graphics/pdf-color */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfColor", function() { return _implementation_graphics_pdf_color__WEBPACK_IMPORTED_MODULE_25__["PdfColor"]; });

/* harmony import */ var _implementation_graphics_pdf_graphics__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./implementation/graphics/pdf-graphics */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-graphics.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGraphics", function() { return _implementation_graphics_pdf_graphics__WEBPACK_IMPORTED_MODULE_26__["PdfGraphics"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GetResourceEventHandler", function() { return _implementation_graphics_pdf_graphics__WEBPACK_IMPORTED_MODULE_26__["GetResourceEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGraphicsState", function() { return _implementation_graphics_pdf_graphics__WEBPACK_IMPORTED_MODULE_26__["PdfGraphicsState"]; });

/* harmony import */ var _implementation_graphics_pdf_margins__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./implementation/graphics/pdf-margins */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-margins.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfMargins", function() { return _implementation_graphics_pdf_margins__WEBPACK_IMPORTED_MODULE_27__["PdfMargins"]; });

/* harmony import */ var _implementation_graphics_pdf_pen__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./implementation/graphics/pdf-pen */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-pen.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPen", function() { return _implementation_graphics_pdf_pen__WEBPACK_IMPORTED_MODULE_28__["PdfPen"]; });

/* harmony import */ var _implementation_graphics_pdf_resources__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./implementation/graphics/pdf-resources */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-resources.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfResources", function() { return _implementation_graphics_pdf_resources__WEBPACK_IMPORTED_MODULE_29__["PdfResources"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Guid", function() { return _implementation_graphics_pdf_resources__WEBPACK_IMPORTED_MODULE_29__["Guid"]; });

/* harmony import */ var _implementation_graphics_pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./implementation/graphics/pdf-transformation-matrix */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transformation-matrix.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTransformationMatrix", function() { return _implementation_graphics_pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_30__["PdfTransformationMatrix"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Matrix", function() { return _implementation_graphics_pdf_transformation_matrix__WEBPACK_IMPORTED_MODULE_30__["Matrix"]; });

/* harmony import */ var _implementation_graphics_brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./implementation/graphics/brushes/pdf-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBrush", function() { return _implementation_graphics_brushes_pdf_brush__WEBPACK_IMPORTED_MODULE_31__["PdfBrush"]; });

/* harmony import */ var _implementation_graphics_brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./implementation/graphics/brushes/pdf-solid-brush */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-solid-brush.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSolidBrush", function() { return _implementation_graphics_brushes_pdf_solid_brush__WEBPACK_IMPORTED_MODULE_32__["PdfSolidBrush"]; });

/* harmony import */ var _implementation_graphics_figures_pdf_template__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./implementation/graphics/figures/pdf-template */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/pdf-template.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTemplate", function() { return _implementation_graphics_figures_pdf_template__WEBPACK_IMPORTED_MODULE_33__["PdfTemplate"]; });

/* harmony import */ var _implementation_graphics_figures_layout_element__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./implementation/graphics/figures/layout-element */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/layout-element.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutElement", function() { return _implementation_graphics_figures_layout_element__WEBPACK_IMPORTED_MODULE_34__["PdfLayoutElement"]; });

/* harmony import */ var _implementation_graphics_figures_text_element__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./implementation/graphics/figures/text-element */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/text-element.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextElement", function() { return _implementation_graphics_figures_text_element__WEBPACK_IMPORTED_MODULE_35__["PdfTextElement"]; });

/* harmony import */ var _implementation_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./implementation/graphics/figures/base/element-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ElementLayouter", function() { return _implementation_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_36__["ElementLayouter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutFormat", function() { return _implementation_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_36__["PdfLayoutFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutParams", function() { return _implementation_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_36__["PdfLayoutParams"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutResult", function() { return _implementation_graphics_figures_base_element_layouter__WEBPACK_IMPORTED_MODULE_36__["PdfLayoutResult"]; });

/* harmony import */ var _implementation_graphics_figures_base_text_layouter__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./implementation/graphics/figures/base/text-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/text-layouter.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextLayouter", function() { return _implementation_graphics_figures_base_text_layouter__WEBPACK_IMPORTED_MODULE_37__["TextLayouter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextPageLayoutResult", function() { return _implementation_graphics_figures_base_text_layouter__WEBPACK_IMPORTED_MODULE_37__["TextPageLayoutResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTextLayoutResult", function() { return _implementation_graphics_figures_base_text_layouter__WEBPACK_IMPORTED_MODULE_37__["PdfTextLayoutResult"]; });

/* harmony import */ var _implementation_graphics_figures_enum__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./implementation/graphics/figures/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/enum.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutType", function() { return _implementation_graphics_figures_enum__WEBPACK_IMPORTED_MODULE_38__["PdfLayoutType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfLayoutBreakType", function() { return _implementation_graphics_figures_enum__WEBPACK_IMPORTED_MODULE_38__["PdfLayoutBreakType"]; });

/* harmony import */ var _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./implementation/graphics/fonts/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFontStyle", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["PdfFontStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFontFamily", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["PdfFontFamily"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFontType", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["PdfFontType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfWordWrapType", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["PdfWordWrapType"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSubSuperScript", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["PdfSubSuperScript"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FontEncoding", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["FontEncoding"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfCmapFormat", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["TtfCmapFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfCmapEncoding", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["TtfCmapEncoding"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfPlatformID", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["TtfPlatformID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfMicrosoftEncodingID", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["TtfMicrosoftEncodingID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfMacintoshEncodingID", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["TtfMacintoshEncodingID"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FontDescriptorFlags", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["FontDescriptorFlags"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TtfCompositeGlyphFlags", function() { return _implementation_graphics_fonts_enum__WEBPACK_IMPORTED_MODULE_39__["TtfCompositeGlyphFlags"]; });

/* harmony import */ var _implementation_graphics_fonts_pdf_font__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./implementation/graphics/fonts/pdf-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFont", function() { return _implementation_graphics_fonts_pdf_font__WEBPACK_IMPORTED_MODULE_40__["PdfFont"]; });

/* harmony import */ var _implementation_graphics_fonts_pdf_font_metrics__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./implementation/graphics/fonts/pdf-font-metrics */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font-metrics.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfFontMetrics", function() { return _implementation_graphics_fonts_pdf_font_metrics__WEBPACK_IMPORTED_MODULE_41__["PdfFontMetrics"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WidthTable", function() { return _implementation_graphics_fonts_pdf_font_metrics__WEBPACK_IMPORTED_MODULE_41__["WidthTable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StandardWidthTable", function() { return _implementation_graphics_fonts_pdf_font_metrics__WEBPACK_IMPORTED_MODULE_41__["StandardWidthTable"]; });

/* harmony import */ var _implementation_graphics_fonts_pdf_standard_font__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./implementation/graphics/fonts/pdf-standard-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStandardFont", function() { return _implementation_graphics_fonts_pdf_standard_font__WEBPACK_IMPORTED_MODULE_42__["PdfStandardFont"]; });

/* harmony import */ var _implementation_graphics_fonts_pdf_standard_font_metrics_factory__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./implementation/graphics/fonts/pdf-standard-font-metrics-factory */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStandardFontMetricsFactory", function() { return _implementation_graphics_fonts_pdf_standard_font_metrics_factory__WEBPACK_IMPORTED_MODULE_43__["PdfStandardFontMetricsFactory"]; });

/* harmony import */ var _implementation_graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./implementation/graphics/fonts/pdf-string-format */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStringFormat", function() { return _implementation_graphics_fonts_pdf_string_format__WEBPACK_IMPORTED_MODULE_44__["PdfStringFormat"]; });

/* harmony import */ var _implementation_graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./implementation/graphics/fonts/string-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStringLayouter", function() { return _implementation_graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_45__["PdfStringLayouter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStringLayoutResult", function() { return _implementation_graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_45__["PdfStringLayoutResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineInfo", function() { return _implementation_graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_45__["LineInfo"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineType", function() { return _implementation_graphics_fonts_string_layouter__WEBPACK_IMPORTED_MODULE_45__["LineType"]; });

/* harmony import */ var _implementation_graphics_fonts_string_tokenizer__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./implementation/graphics/fonts/string-tokenizer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-tokenizer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringTokenizer", function() { return _implementation_graphics_fonts_string_tokenizer__WEBPACK_IMPORTED_MODULE_46__["StringTokenizer"]; });

/* harmony import */ var _implementation_graphics_fonts_pdf_true_type_font__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./implementation/graphics/fonts/pdf-true-type-font */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-true-type-font.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTrueTypeFont", function() { return _implementation_graphics_fonts_pdf_true_type_font__WEBPACK_IMPORTED_MODULE_47__["PdfTrueTypeFont"]; });

/* harmony import */ var _implementation_graphics_fonts_rtl_renderer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./implementation/graphics/fonts/rtl-renderer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RtlRenderer", function() { return _implementation_graphics_fonts_rtl_renderer__WEBPACK_IMPORTED_MODULE_48__["RtlRenderer"]; });

/* harmony import */ var _implementation_graphics_fonts_rtl_rtl_text_shape__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./implementation/graphics/fonts/rtl/rtl-text-shape */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-text-shape.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArabicShapeRenderer", function() { return _implementation_graphics_fonts_rtl_rtl_text_shape__WEBPACK_IMPORTED_MODULE_49__["ArabicShapeRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArabicShape", function() { return _implementation_graphics_fonts_rtl_rtl_text_shape__WEBPACK_IMPORTED_MODULE_49__["ArabicShape"]; });

/* harmony import */ var _implementation_graphics_fonts_rtl_rtl_bidirectional__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./implementation/graphics/fonts/rtl/rtl-bidirectional */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-bidirectional.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bidi", function() { return _implementation_graphics_fonts_rtl_rtl_bidirectional__WEBPACK_IMPORTED_MODULE_50__["Bidi"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RtlCharacters", function() { return _implementation_graphics_fonts_rtl_rtl_bidirectional__WEBPACK_IMPORTED_MODULE_50__["RtlCharacters"]; });

/* harmony import */ var _implementation_graphics_images_byte_array__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./implementation/graphics/images/byte-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/byte-array.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ByteArray", function() { return _implementation_graphics_images_byte_array__WEBPACK_IMPORTED_MODULE_51__["ByteArray"]; });

/* harmony import */ var _implementation_graphics_images_image_decoder__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./implementation/graphics/images/image-decoder */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/image-decoder.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageFormat", function() { return _implementation_graphics_images_image_decoder__WEBPACK_IMPORTED_MODULE_52__["ImageFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageDecoder", function() { return _implementation_graphics_images_image_decoder__WEBPACK_IMPORTED_MODULE_52__["ImageDecoder"]; });

/* harmony import */ var _implementation_graphics_images_pdf_bitmap__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./implementation/graphics/images/pdf-bitmap */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-bitmap.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBitmap", function() { return _implementation_graphics_images_pdf_bitmap__WEBPACK_IMPORTED_MODULE_53__["PdfBitmap"]; });

/* harmony import */ var _implementation_graphics_images_pdf_image__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./implementation/graphics/images/pdf-image */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-image.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfImage", function() { return _implementation_graphics_images_pdf_image__WEBPACK_IMPORTED_MODULE_54__["PdfImage"]; });

/* harmony import */ var _implementation_graphics_pdf_transparency__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./implementation/graphics/pdf-transparency */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transparency.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfTransparency", function() { return _implementation_graphics_pdf_transparency__WEBPACK_IMPORTED_MODULE_55__["PdfTransparency"]; });

/* harmony import */ var _implementation_input_output_enum__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./implementation/input-output/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/enum.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectStatus", function() { return _implementation_input_output_enum__WEBPACK_IMPORTED_MODULE_56__["ObjectStatus"]; });

/* harmony import */ var _implementation_input_output_cross_table__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./implementation/input-output/cross-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/cross-table.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectType", function() { return _implementation_input_output_cross_table__WEBPACK_IMPORTED_MODULE_57__["ObjectType"]; });

/* harmony import */ var _implementation_input_output_pdf_cross_table__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./implementation/input-output/pdf-cross-table */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-cross-table.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCrossTable", function() { return _implementation_input_output_pdf_cross_table__WEBPACK_IMPORTED_MODULE_58__["PdfCrossTable"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RegisteredObject", function() { return _implementation_input_output_pdf_cross_table__WEBPACK_IMPORTED_MODULE_58__["RegisteredObject"]; });

/* harmony import */ var _implementation_input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./implementation/input-output/pdf-dictionary-properties */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DictionaryProperties", function() { return _implementation_input_output_pdf_dictionary_properties__WEBPACK_IMPORTED_MODULE_59__["DictionaryProperties"]; });

/* harmony import */ var _implementation_input_output_pdf_main_object_collection__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./implementation/input-output/pdf-main-object-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-main-object-collection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfMainObjectCollection", function() { return _implementation_input_output_pdf_main_object_collection__WEBPACK_IMPORTED_MODULE_60__["PdfMainObjectCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectInfo", function() { return _implementation_input_output_pdf_main_object_collection__WEBPACK_IMPORTED_MODULE_60__["ObjectInfo"]; });

/* harmony import */ var _implementation_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./implementation/input-output/pdf-operators */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Operators", function() { return _implementation_input_output_pdf_operators__WEBPACK_IMPORTED_MODULE_61__["Operators"]; });

/* harmony import */ var _implementation_input_output_pdf_stream_writer__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./implementation/input-output/pdf-stream-writer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-stream-writer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStreamWriter", function() { return _implementation_input_output_pdf_stream_writer__WEBPACK_IMPORTED_MODULE_62__["PdfStreamWriter"]; });

/* harmony import */ var _implementation_input_output_pdf_writer__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./implementation/input-output/pdf-writer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-writer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfWriter", function() { return _implementation_input_output_pdf_writer__WEBPACK_IMPORTED_MODULE_63__["PdfWriter"]; });

/* harmony import */ var _implementation_pages_enum__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./implementation/pages/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageOrientation", function() { return _implementation_pages_enum__WEBPACK_IMPORTED_MODULE_64__["PdfPageOrientation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageRotateAngle", function() { return _implementation_pages_enum__WEBPACK_IMPORTED_MODULE_64__["PdfPageRotateAngle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfNumberStyle", function() { return _implementation_pages_enum__WEBPACK_IMPORTED_MODULE_64__["PdfNumberStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDockStyle", function() { return _implementation_pages_enum__WEBPACK_IMPORTED_MODULE_64__["PdfDockStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfAlignmentStyle", function() { return _implementation_pages_enum__WEBPACK_IMPORTED_MODULE_64__["PdfAlignmentStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateType", function() { return _implementation_pages_enum__WEBPACK_IMPORTED_MODULE_64__["TemplateType"]; });

/* harmony import */ var _implementation_pages_page_added_event_arguments__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./implementation/pages/page-added-event-arguments */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/page-added-event-arguments.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageAddedEventArgs", function() { return _implementation_pages_page_added_event_arguments__WEBPACK_IMPORTED_MODULE_65__["PageAddedEventArgs"]; });

/* harmony import */ var _implementation_pages_pdf_document_page_collection__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./implementation/pages/pdf-document-page-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-document-page-collection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDocumentPageCollection", function() { return _implementation_pages_pdf_document_page_collection__WEBPACK_IMPORTED_MODULE_66__["PdfDocumentPageCollection"]; });

/* harmony import */ var _implementation_pages_pdf_page__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./implementation/pages/pdf-page */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPage", function() { return _implementation_pages_pdf_page__WEBPACK_IMPORTED_MODULE_67__["PdfPage"]; });

/* harmony import */ var _implementation_pages_pdf_page_base__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./implementation/pages/pdf-page-base */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-base.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageBase", function() { return _implementation_pages_pdf_page_base__WEBPACK_IMPORTED_MODULE_68__["PdfPageBase"]; });

/* harmony import */ var _implementation_pages_pdf_page_layer__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./implementation/pages/pdf-page-layer */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageLayer", function() { return _implementation_pages_pdf_page_layer__WEBPACK_IMPORTED_MODULE_69__["PdfPageLayer"]; });

/* harmony import */ var _implementation_pages_pdf_page_layer_collection__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./implementation/pages/pdf-page-layer-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer-collection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageLayerCollection", function() { return _implementation_pages_pdf_page_layer_collection__WEBPACK_IMPORTED_MODULE_70__["PdfPageLayerCollection"]; });

/* harmony import */ var _implementation_pages_pdf_page_settings__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./implementation/pages/pdf-page-settings */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-settings.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageSettings", function() { return _implementation_pages_pdf_page_settings__WEBPACK_IMPORTED_MODULE_71__["PdfPageSettings"]; });

/* harmony import */ var _implementation_pages_pdf_page_size__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./implementation/pages/pdf-page-size */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-size.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageSize", function() { return _implementation_pages_pdf_page_size__WEBPACK_IMPORTED_MODULE_72__["PdfPageSize"]; });

/* harmony import */ var _implementation_pages_pdf_page_template_element__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./implementation/pages/pdf-page-template-element */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-template-element.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPageTemplateElement", function() { return _implementation_pages_pdf_page_template_element__WEBPACK_IMPORTED_MODULE_73__["PdfPageTemplateElement"]; });

/* harmony import */ var _implementation_pages_pdf_section__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./implementation/pages/pdf-section */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSection", function() { return _implementation_pages_pdf_section__WEBPACK_IMPORTED_MODULE_74__["PdfSection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageSettingsState", function() { return _implementation_pages_pdf_section__WEBPACK_IMPORTED_MODULE_74__["PageSettingsState"]; });

/* harmony import */ var _implementation_pages_pdf_section_collection__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./implementation/pages/pdf-section-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-collection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSectionCollection", function() { return _implementation_pages_pdf_section_collection__WEBPACK_IMPORTED_MODULE_75__["PdfSectionCollection"]; });

/* harmony import */ var _implementation_pages_pdf_section_page_collection__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./implementation/pages/pdf-section-page-collection */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-page-collection.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSectionPageCollection", function() { return _implementation_pages_pdf_section_page_collection__WEBPACK_IMPORTED_MODULE_76__["PdfSectionPageCollection"]; });

/* harmony import */ var _implementation_pages_pdf_section_templates__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./implementation/pages/pdf-section-templates */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-templates.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfSectionTemplate", function() { return _implementation_pages_pdf_section_templates__WEBPACK_IMPORTED_MODULE_77__["PdfSectionTemplate"]; });

/* harmony import */ var _implementation_primitives_pdf_array__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./implementation/primitives/pdf-array */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfArray", function() { return _implementation_primitives_pdf_array__WEBPACK_IMPORTED_MODULE_78__["PdfArray"]; });

/* harmony import */ var _implementation_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./implementation/primitives/pdf-dictionary */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfDictionary", function() { return _implementation_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_79__["PdfDictionary"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveSectionCollectionEventHandler", function() { return _implementation_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_79__["SaveSectionCollectionEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveDescendantFontEventHandler", function() { return _implementation_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_79__["SaveDescendantFontEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveFontDictionaryEventHandler", function() { return _implementation_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_79__["SaveFontDictionaryEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveAnnotationEventHandler", function() { return _implementation_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_79__["SaveAnnotationEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveSectionEventHandler", function() { return _implementation_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_79__["SaveSectionEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveTemplateEventHandler", function() { return _implementation_primitives_pdf_dictionary__WEBPACK_IMPORTED_MODULE_79__["SaveTemplateEventHandler"]; });

/* harmony import */ var _implementation_primitives_pdf_name__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./implementation/primitives/pdf-name */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfName", function() { return _implementation_primitives_pdf_name__WEBPACK_IMPORTED_MODULE_80__["PdfName"]; });

/* harmony import */ var _implementation_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./implementation/primitives/pdf-number */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfNumber", function() { return _implementation_primitives_pdf_number__WEBPACK_IMPORTED_MODULE_81__["PdfNumber"]; });

/* harmony import */ var _implementation_primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./implementation/primitives/pdf-reference */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfReference", function() { return _implementation_primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_82__["PdfReference"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfReferenceHolder", function() { return _implementation_primitives_pdf_reference__WEBPACK_IMPORTED_MODULE_82__["PdfReferenceHolder"]; });

/* harmony import */ var _implementation_primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./implementation/primitives/pdf-stream */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfStream", function() { return _implementation_primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_83__["PdfStream"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveCmapEventHandler", function() { return _implementation_primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_83__["SaveCmapEventHandler"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SaveFontProgramEventHandler", function() { return _implementation_primitives_pdf_stream__WEBPACK_IMPORTED_MODULE_83__["SaveFontProgramEventHandler"]; });

/* harmony import */ var _implementation_primitives_pdf_string__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./implementation/primitives/pdf-string */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternalEnum", function() { return _implementation_primitives_pdf_string__WEBPACK_IMPORTED_MODULE_84__["InternalEnum"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfString", function() { return _implementation_primitives_pdf_string__WEBPACK_IMPORTED_MODULE_84__["PdfString"]; });

/* harmony import */ var _implementation_structured_elements_grid_styles_style__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./implementation/structured-elements/grid/styles/style */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/style.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridStyleBase", function() { return _implementation_structured_elements_grid_styles_style__WEBPACK_IMPORTED_MODULE_85__["PdfGridStyleBase"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridStyle", function() { return _implementation_structured_elements_grid_styles_style__WEBPACK_IMPORTED_MODULE_85__["PdfGridStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridCellStyle", function() { return _implementation_structured_elements_grid_styles_style__WEBPACK_IMPORTED_MODULE_85__["PdfGridCellStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridRowStyle", function() { return _implementation_structured_elements_grid_styles_style__WEBPACK_IMPORTED_MODULE_85__["PdfGridRowStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfHorizontalOverflowType", function() { return _implementation_structured_elements_grid_styles_style__WEBPACK_IMPORTED_MODULE_85__["PdfHorizontalOverflowType"]; });

/* harmony import */ var _implementation_structured_elements_grid_styles_pdf_borders__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./implementation/structured-elements/grid/styles/pdf-borders */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/pdf-borders.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBorders", function() { return _implementation_structured_elements_grid_styles_pdf_borders__WEBPACK_IMPORTED_MODULE_86__["PdfBorders"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfPaddings", function() { return _implementation_structured_elements_grid_styles_pdf_borders__WEBPACK_IMPORTED_MODULE_86__["PdfPaddings"]; });

/* harmony import */ var _implementation_structured_elements_tables_light_tables_enum__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./implementation/structured-elements/tables/light-tables/enum */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/tables/light-tables/enum.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfBorderOverlapStyle", function() { return _implementation_structured_elements_tables_light_tables_enum__WEBPACK_IMPORTED_MODULE_87__["PdfBorderOverlapStyle"]; });

/* harmony import */ var _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./implementation/structured-elements/grid/layout/grid-layouter */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/layout/grid-layouter.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridLayouter", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["PdfGridLayouter"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridLayoutResult", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["PdfGridLayoutResult"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridLayoutFormat", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["PdfGridLayoutFormat"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridCellEventArgs", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["GridCellEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridBeginCellDrawEventArgs", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["PdfGridBeginCellDrawEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridEndCellDrawEventArgs", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["PdfGridEndCellDrawEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfCancelEventArgs", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["PdfCancelEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BeginPageLayoutEventArgs", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["BeginPageLayoutEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EndPageLayoutEventArgs", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["EndPageLayoutEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridBeginPageLayoutEventArgs", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["PdfGridBeginPageLayoutEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridEndPageLayoutEventArgs", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["PdfGridEndPageLayoutEventArgs"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowLayoutResult", function() { return _implementation_structured_elements_grid_layout_grid_layouter__WEBPACK_IMPORTED_MODULE_88__["RowLayoutResult"]; });

/* harmony import */ var _implementation_structured_elements_grid_pdf_grid__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./implementation/structured-elements/grid/pdf-grid */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGrid", function() { return _implementation_structured_elements_grid_pdf_grid__WEBPACK_IMPORTED_MODULE_89__["PdfGrid"]; });

/* harmony import */ var _implementation_structured_elements_grid_pdf_grid_column__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./implementation/structured-elements/grid/pdf-grid-column */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-column.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridColumn", function() { return _implementation_structured_elements_grid_pdf_grid_column__WEBPACK_IMPORTED_MODULE_90__["PdfGridColumn"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridColumnCollection", function() { return _implementation_structured_elements_grid_pdf_grid_column__WEBPACK_IMPORTED_MODULE_90__["PdfGridColumnCollection"]; });

/* harmony import */ var _implementation_structured_elements_grid_pdf_grid_row__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./implementation/structured-elements/grid/pdf-grid-row */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-row.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridRow", function() { return _implementation_structured_elements_grid_pdf_grid_row__WEBPACK_IMPORTED_MODULE_91__["PdfGridRow"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridRowCollection", function() { return _implementation_structured_elements_grid_pdf_grid_row__WEBPACK_IMPORTED_MODULE_91__["PdfGridRowCollection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridHeaderCollection", function() { return _implementation_structured_elements_grid_pdf_grid_row__WEBPACK_IMPORTED_MODULE_91__["PdfGridHeaderCollection"]; });

/* harmony import */ var _implementation_structured_elements_grid_pdf_grid_cell__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./implementation/structured-elements/grid/pdf-grid-cell */ "./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-cell.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridCell", function() { return _implementation_structured_elements_grid_pdf_grid_cell__WEBPACK_IMPORTED_MODULE_92__["PdfGridCell"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PdfGridCellCollection", function() { return _implementation_structured_elements_grid_pdf_grid_cell__WEBPACK_IMPORTED_MODULE_92__["PdfGridCellCollection"]; });

/* empty/unused harmony star reexport *//**
 * Pdf all modules
 * @hidden
 */
































































































/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/index.js":
/*!******************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/index.js ***!
  \******************************************************/
/*! exports provided: PositionData, Popup, getScrollableParent, getZindexPartial, getMaxZindex, calculateRelativeBasedPosition, calculatePosition, fit, isCollide, flip, ButtonProps, AnimationSettings, Dialog, DialogUtility, Animation, Tooltip, createSpinner, showSpinner, hideSpinner, setSpinner */
/***/ (function(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-popups/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PositionData", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PositionData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popup", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Popup"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollableParent", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getScrollableParent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getZindexPartial", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getZindexPartial"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMaxZindex", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getMaxZindex"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateRelativeBasedPosition", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["calculateRelativeBasedPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculatePosition", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["calculatePosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fit", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["fit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isCollide", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["isCollide"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flip", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["flip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonProps", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ButtonProps"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dialog", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Dialog"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogUtility", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DialogUtility"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Animation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Tooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSpinner", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["createSpinner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showSpinner", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["showSpinner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hideSpinner", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["hideSpinner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setSpinner", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["setSpinner"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/common/collision.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/common/collision.js ***!
  \*********************************************************************/
/*! exports provided: fit, isCollide, flip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _position__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./position */ "./node_modules/@syncfusion/ej2-popups/src/common/position.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/**
 * Collision module.
 */


var parentDocument;
var targetContainer;
function fit(element, viewPortElement, axis, position) {
    if (viewPortElement === void 0) { viewPortElement = null; }
    if (axis === void 0) { axis = { X: false, Y: false }; }
    if (!axis.Y && !axis.X) {
        return { left: 0, top: 0 };
    }
    var elemData = element.getBoundingClientRect();
    targetContainer = viewPortElement;
    parentDocument = element.ownerDocument;
    if (!position) {
        position = Object(_position__WEBPACK_IMPORTED_MODULE_0__["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, viewPortElement, x, y) {
    if (viewPortElement === void 0) { viewPortElement = null; }
    var elemOffset = Object(_position__WEBPACK_IMPORTED_MODULE_0__["calculatePosition"])(element, 'left', 'top');
    if (x) {
        elemOffset.left = x;
    }
    if (y) {
        elemOffset.top = y;
    }
    var data = [];
    targetContainer = viewPortElement;
    parentDocument = 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 topData = '';
    var leftData = '';
    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, viewPortElement, axis, fixedParent) {
    if (viewPortElement === void 0) { viewPortElement = null; }
    if (axis === void 0) { axis = { X: true, Y: true }; }
    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 = 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 = Object(_position__WEBPACK_IMPORTED_MODULE_0__["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 = Object(_position__WEBPACK_IMPORTED_MODULE_0__["calculatePosition"])(target, pos.posX, pos.posY, fixedParent, elementRect);
    edge.TL = Object(_position__WEBPACK_IMPORTED_MODULE_0__["calculatePosition"])(target, 'left', 'top', fixedParent, elementRect);
    edge.TR = Object(_position__WEBPACK_IMPORTED_MODULE_0__["calculatePosition"])(target, 'right', 'top', fixedParent, elementRect);
    edge.BR = Object(_position__WEBPACK_IMPORTED_MODULE_0__["calculatePosition"])(target, 'left', 'bottom', fixedParent, elementRect);
    edge.BL = Object(_position__WEBPACK_IMPORTED_MODULE_0__["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()) < 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()) <= 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 = Object(_position__WEBPACK_IMPORTED_MODULE_0__["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()) <= 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 = Object(_position__WEBPACK_IMPORTED_MODULE_0__["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()) < 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() + getTargetContainerLeft() + getTargetContainerWidth());
    }
    return (getBodyScrollLeft() + getViewPortWidth());
}
function ContainerBottom() {
    if (targetContainer) {
        return (getBodyScrollTop() + getTargetContainerTop() + getTargetContainerHeight());
    }
    return (getBodyScrollTop() + getViewPortHeight());
}
function getBodyScrollTop() {
    // if(targetContainer)
    //     return targetContainer.scrollTop;
    return parentDocument.documentElement.scrollTop || parentDocument.body.scrollTop;
}
function getBodyScrollLeft() {
    // if(targetContainer)
    //     return targetContainer.scrollLeft;
    return parentDocument.documentElement.scrollLeft || parentDocument.body.scrollLeft;
}
function getViewPortHeight() {
    return window.innerHeight;
}
function getViewPortWidth() {
    var windowWidth = window.innerWidth;
    var offsetWidth = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(document.documentElement)) ? 0 : document.documentElement.offsetWidth;
    return windowWidth - (windowWidth - offsetWidth);
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/common/index.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/common/index.js ***!
  \*****************************************************************/
/*! exports provided: calculateRelativeBasedPosition, calculatePosition, fit, isCollide, flip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _position__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./position */ "./node_modules/@syncfusion/ej2-popups/src/common/position.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateRelativeBasedPosition", function() { return _position__WEBPACK_IMPORTED_MODULE_0__["calculateRelativeBasedPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculatePosition", function() { return _position__WEBPACK_IMPORTED_MODULE_0__["calculatePosition"]; });

/* harmony import */ var _collision__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collision */ "./node_modules/@syncfusion/ej2-popups/src/common/collision.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fit", function() { return _collision__WEBPACK_IMPORTED_MODULE_1__["fit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isCollide", function() { return _collision__WEBPACK_IMPORTED_MODULE_1__["isCollide"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flip", function() { return _collision__WEBPACK_IMPORTED_MODULE_1__["flip"]; });

/**
 * Popup Components
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/common/position.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/common/position.js ***!
  \********************************************************************/
/*! exports provided: calculateRelativeBasedPosition, calculatePosition */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.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);
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/common/resize.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/common/resize.js ***!
  \******************************************************************/
/*! exports provided: createResize, setMinHeight, removeResize */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createResize", function() { return createResize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMinHeight", function() { return setMinHeight; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeResize", function() { return removeResize; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/**
 * 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;
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;
    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;
}
function wireEvents() {
    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, this);
        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, this);
    }
}
/* 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)) {
        if (resizeStart(e) === 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)) {
        resizeEnd(e);
    }
    _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();
    originalMouseX = e.touches[0].pageX;
    originalMouseY = e.touches[0].pageY;
    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(resizeStart)) {
        if (resizeStart(e) === 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)) {
            resize(e);
        }
        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 currentpageY = (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)) {
        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_1 = (originalY - containerTop) + (pageY - originalMouseY);
            top_1 = top_1 > 0 ? top_1 : 1;
            targetElement.style.height = currentHeight + 'px';
            targetElement.style.top = top_1 + '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_1 = (originalX - containerLeft) + (pageX - originalMouseX);
            left_1 = (left_1 > 0) ? left_1 : 1;
            if (calculatedWidth !== previousWidth && setWidth) {
                targetElement.style.width = calculatedWidth + 'px';
            }
            if (setLeft) {
                targetElement.style.left = left_1 + 'px';
                if (left_1 === 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 pageX = (getEventType(e.type) === 'mouse') ? e.pageX : e.touches[0].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]);
    }
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/dialog/dialog.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/dialog/dialog.js ***!
  \******************************************************************/
/*! exports provided: ButtonProps, AnimationSettings, Dialog, DialogUtility */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _popup_popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../popup/popup */ "./node_modules/@syncfusion/ej2-popups/src/popup/popup.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _common_resize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/resize */ "./node_modules/@syncfusion/ej2-popups/src/common/resize.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 ButtonProps = /** @class */ (function (_super) {
    __extends(ButtonProps, _super);
    function ButtonProps() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], ButtonProps.prototype, "buttonModel", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Button')
    ], ButtonProps.prototype, "type", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], ButtonProps.prototype, "click", void 0);
    return ButtonProps;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the animation properties for both open and close the dialog.
 */
var AnimationSettings = /** @class */ (function (_super) {
    __extends(AnimationSettings, _super);
    function AnimationSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Fade')
    ], AnimationSettings.prototype, "effect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(400)
    ], AnimationSettings.prototype, "duration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], AnimationSettings.prototype, "delay", void 0);
    return AnimationSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

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_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';
/**
 * 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 = /** @class */ (function (_super) {
    __extends(Dialog, _super);
    /**
     * Constructor for creating the widget
     * @hidden
     */
    function Dialog(options, element) {
        return _super.call(this, options, element) || this;
    }
    /**
     * Initialize the control rendering
     * @private
     */
    Dialog.prototype.render = function () {
        this.initialize();
        this.initRender();
        this.wireEvents();
        if (this.width === '100%') {
            this.element.style.width = '';
        }
        if (this.enableResize) {
            this.setResize();
            if (this.animationSettings.effect === 'None') {
                this.getMinHeight();
            }
        }
    };
    /**
     * Initialize the event handler
     * @private
     */
    Dialog.prototype.preRender = function () {
        var _this = this;
        this.headerContent = null;
        this.allowMaxHeight = true;
        var classArray = [];
        for (var j = 0; j < this.element.classList.length; j++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.classList[j].match('e-control')) ||
                !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.classList[j].match(ROOT))) {
                classArray.push(this.element.classList[j]);
            }
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], classArray);
        this.clonedEle = this.element.cloneNode(true);
        this.closeIconClickEventHandler = function (event) {
            _this.hide(event);
        };
        this.dlgOverlayClickEventHandler = function (event) {
            _this.trigger('overlayClick', event);
            _this.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;
        }
    };
    ;
    Dialog.prototype.isNumberValue = function (value) {
        var isNumber = /^[-+]?\d*\.?\d+$/.test(value);
        return isNumber;
    };
    Dialog.prototype.checkPositionData = function () {
        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;
                }
            }
        }
    };
    Dialog.prototype.getEle = function (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 */
    Dialog.prototype.getMinHeight = function () {
        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);
        Object(_common_resize__WEBPACK_IMPORTED_MODULE_3__["setMinHeight"])(headerHeight + 30 + footerHeight);
    };
    Dialog.prototype.onResizeStart = function (args) {
        this.trigger('resizeStart', args);
        return args.cancel;
    };
    Dialog.prototype.onResizing = function (args) {
        this.trigger('resizing', args);
    };
    Dialog.prototype.onResizeComplete = function (args) {
        this.trigger('resizeStop', args);
    };
    Dialog.prototype.setResize = function () {
        if (this.enableResize) {
            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);
            }
            Object(_common_resize__WEBPACK_IMPORTED_MODULE_3__["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)
            });
        }
        else {
            Object(_common_resize__WEBPACK_IMPORTED_MODULE_3__["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 */
    Dialog.prototype.keyDown = function (event) {
        var _this = this;
        if (event.keyCode === 9) {
            if (this.isModal) {
                var buttonObj = void 0;
                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"])(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_1;
            var firstPrimary = this.buttons.some(function (data, index) {
                buttonIndex_1 = 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_1].click) === 'function') {
                setTimeout(function () {
                    _this.buttons[buttonIndex_1].click.call(_this, event);
                });
            }
        }
    };
    /**
     * Initialize the control rendering
     * @private
     */
    Dialog.prototype.initialize = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target)) {
            this.targetEle = ((typeof this.target) === 'string') ?
                document.querySelector(this.target) : this.target;
        }
        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);
        }
        this.setCSSClass();
        this.setMaxHeight();
    };
    /**
     * Initialize the rendering
     * @private
     */
    Dialog.prototype.initRender = function () {
        var _this = this;
        this.initialRender = true;
        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;
        }
        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.allowDragging && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.headerContent))) {
            this.setAllowDragging();
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, { 'aria-modal': (this.isModal ? 'true' : 'false') });
        if (this.isModal) {
            this.setIsModal();
        }
        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_popup__WEBPACK_IMPORTED_MODULE_1__["Popup"](this.element, {
            height: this.height,
            width: this.width,
            zIndex: this.zIndex,
            relateTo: this.target,
            actionOnScroll: 'none',
            open: function (event) {
                _this.focusContent();
                var eventArgs = {
                    container: _this.isModal ? _this.dlgContainer : _this.element,
                    element: _this.element,
                    target: _this.target
                };
                if (_this.enableResize) {
                    _this.getMinHeight();
                }
                _this.trigger('open', eventArgs);
            },
            close: function (event) {
                if (_this.isModal) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.dlgOverlay], 'e-fade');
                }
                _this.unBindEvent(_this.element);
                if (_this.isModal) {
                    _this.dlgContainer.style.display = 'none';
                }
                _this.trigger('close', _this.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"])(_this.storeActiveElement)) {
                    _this.storeActiveElement.focus();
                }
            }
        });
        this.positionChange();
        this.setEnableRTL();
        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;
    };
    Dialog.prototype.setOverlayZindex = function (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();
    };
    Dialog.prototype.positionChange = function () {
        if (this.isModal) {
            if (typeof (this.position.X) === 'number' && typeof (this.position.Y) === 'number') {
                this.setPopupPosition();
            }
            else if ((typeof this.position.X === 'string' && typeof this.position.Y === 'number') ||
                (typeof this.position.X === 'number' && typeof this.position.Y === 'string')) {
                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();
        }
    };
    Dialog.prototype.setPopupPosition = function () {
        this.popupObj.setProperties({
            position: {
                X: this.position.X, Y: this.position.Y
            }
        });
    };
    Dialog.prototype.setAllowDragging = function () {
        var _this = 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 (event) {
                _this.trigger('dragStart', event);
            },
            dragStop: function (event) {
                if (_this.isModal) {
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.position)) {
                        _this.dlgContainer.classList.remove('e-dlg-' + _this.position.X + '-' + _this.position.Y);
                    }
                    // Reset the dialog position after drag completion.
                    _this.element.style.position = 'relative';
                }
                _this.trigger('dragStop', event);
                _this.element.classList.remove(DLG_RESTRICT_LEFT_VALUE);
            },
            drag: function (event) {
                _this.trigger('drag', event);
            }
        });
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.targetEle)) {
            this.dragObj.dragArea = this.targetEle;
        }
    };
    Dialog.prototype.setButton = function () {
        this.buttonContent = [];
        this.btnObj = [];
        var primaryBtnFlag = true;
        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();
        for (var i = 0; i < this.buttons.length; i++) {
            this.btnObj[i] = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__["Button"](this.buttons[i].buttonModel);
            if (typeof (this.buttons[i].click) === 'function') {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.ftrTemplateContent.children[i], 'click', this.buttons[i].click, this);
            }
            this.btnObj[i].appendTo(this.ftrTemplateContent.children[i]);
            this.btnObj[i].element.classList.add('e-flat');
            this.primaryButtonEle = this.element.getElementsByClassName('e-primary')[0];
        }
    };
    Dialog.prototype.setContent = function () {
        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) {
            var blazorContain = Object.keys(window);
            if (typeof (this.content) === 'string' && blazorContain.indexOf('ejsInterop') === -1) {
                this.contentEle.innerHTML = 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') {
            this.setMaxHeight();
        }
    };
    Dialog.prototype.setTemplate = function (template, toElement) {
        var templateFn;
        var templateProps;
        var blazorContain = Object.keys(window);
        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)) {
            templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template.outerHTML);
            templateValue = template.outerHTML;
        }
        else {
            templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
            templateValue = template;
        }
        var fromElements = [];
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(templateFn)) {
            var isString = (blazorContain.indexOf('ejsInterop') !== -1 &&
                !this.isStringTemplate && (templateValue).indexOf('<div>Blazor') === 0) ?
                this.isStringTemplate : true;
            for (var _i = 0, _a = templateFn({}, null, null, templateProps, isString); _i < _a.length; _i++) {
                var item = _a[_i];
                fromElements.push(item);
            }
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([].slice.call(fromElements), toElement);
            if (blazorContain.indexOf('ejsInterop') !== -1 && !this.isStringTemplate && templateValue.indexOf('<div>Blazor') === 0) {
                this.blazorTemplate(templateProps);
            }
        }
    };
    Dialog.prototype.blazorTemplate = function (templateProps) {
        if (templateProps === this.element.id + 'header') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(templateProps, 'Header', this);
        }
        else if (templateProps === this.element.id + 'footerTemplate') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(templateProps, 'FooterTemplate', this);
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(templateProps, 'Content', this);
        }
    };
    Dialog.prototype.setMaxHeight = function () {
        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;
    };
    Dialog.prototype.setEnableRTL = function () {
        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'))) {
            Object(_common_resize__WEBPACK_IMPORTED_MODULE_3__["removeResize"])();
            this.setResize();
        }
    };
    Dialog.prototype.setTargetContent = function () {
        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();
                while (this.element.childNodes.length !== 0) {
                    this.innerContentElement.appendChild(this.element.childNodes[0]);
                }
            }
        }
    };
    Dialog.prototype.setHeader = function () {
        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]);
    };
    Dialog.prototype.setFooterTemplate = function () {
        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);
    };
    Dialog.prototype.createHeaderContent = function () {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.headerContent)) {
            this.headerContent = this.createElement('div', { className: DLG_HEADER_CONTENT });
        }
    };
    Dialog.prototype.renderCloseIcon = function () {
        this.closeIcon = this.createElement('button', { className: DLG_CLOSE_ICON_BTN, attrs: { type: 'button' } });
        this.closeIconBtnObj = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__["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);
    };
    Dialog.prototype.closeIconTitle = function () {
        this.l10n.setLocale(this.locale);
        var closeIconTitle = this.l10n.getConstant('close');
        this.closeIcon.setAttribute('title', closeIconTitle);
    };
    Dialog.prototype.setCSSClass = function (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(' '));
        }
    };
    Dialog.prototype.setIsModal = function () {
        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);
    };
    Dialog.prototype.getValidFocusNode = function (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;
    };
    Dialog.prototype.focusableElements = function (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;
    };
    Dialog.prototype.getAutoFocusNode = function (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__["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;
    };
    Dialog.prototype.disableElement = function (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;
    };
    Dialog.prototype.focusContent = function () {
        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);
    };
    Dialog.prototype.bindEvent = function (element) {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, 'keydown', this.keyDown, this);
    };
    Dialog.prototype.unBindEvent = function (element) {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(element, 'keydown', this.keyDown);
    };
    /**
     * Module required function
     * @private
     */
    Dialog.prototype.getModuleName = function () {
        return 'dialog';
    };
    /**
     * Called internally if any of the property value changed
     * @private
     */
    Dialog.prototype.onPropertyChanged = function (newProp, oldProp) {
        if (!this.element.classList.contains(ROOT)) {
            return;
        }
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'content':
                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.content) && this.content !== '') {
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.contentEle) && this.contentEle.getAttribute('role') !== 'dialog') {
                            this.contentEle.innerHTML = '';
                            typeof (this.content) === 'string' ?
                                this.contentEle.innerHTML = this.content : this.contentEle.appendChild(this.content);
                            this.setMaxHeight();
                        }
                        else {
                            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 {
                        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 {
                        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 {
                        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);
                    }
                    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)) {
                        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.popupObj.relateTo = 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;
            }
        }
    };
    Dialog.prototype.updateIsModal = function () {
        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], 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);
        }
    };
    Dialog.prototype.setzIndex = function (zIndexElement, setPopupZindex) {
        var prevOnChange = this.isProtectedOnChange;
        this.isProtectedOnChange = true;
        this.zIndex = Object(_popup_popup__WEBPACK_IMPORTED_MODULE_1__["getZindexPartial"])(zIndexElement);
        this.isProtectedOnChange = prevOnChange;
        if (setPopupZindex) {
            this.popupObj.zIndex = this.zIndex;
        }
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @private
     */
    Dialog.prototype.getPersistData = function () {
        return this.addOnPersist([]);
    };
    /**
     * To destroy the widget
     * @method destroy
     * @return {void}
     * @memberof dialog
     */
    Dialog.prototype.destroy = function () {
        if (this.element.classList.contains(ROOT)) {
            this.unWireEvents();
            _super.prototype.destroy.call(this);
            var classArray = [
                ROOT, RTL, MODAL_DLG
            ];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element, this.element], classArray);
            if (this.popupObj.element.classList.contains(POPUP_ROOT)) {
                this.popupObj.destroy();
            }
            /* istanbul ignore next */
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.btnObj)) {
                for (var i = void 0; i < this.btnObj.length; i++) {
                    this.btnObj[i].destroy();
                }
            }
            if (this.isModal) {
                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);
            }
            this.element.innerHTML = '';
            while (this.element.attributes.length > 0) {
                this.element.removeAttribute(this.element.attributes[0].name);
            }
            for (var k = 0; k < this.clonedEle.attributes.length; k++) {
                this.element.setAttribute(this.clonedEle.attributes[k].name, this.clonedEle.attributes[k].value);
            }
        }
    };
    /**
     * Binding event to the element while widget creation
     * @hidden
     */
    Dialog.prototype.wireEvents = function () {
        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
     */
    Dialog.prototype.unWireEvents = function () {
        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 (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons[0].buttonModel)) {
            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}
     */
    Dialog.prototype.refreshPosition = function () {
        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}
     */
    Dialog.prototype.show = function (isFullScreen) {
        var _this = 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_1 = {
                cancel: false,
                element: this.element,
                container: this.isModal ? this.dlgContainer : this.element,
                target: this.target,
                maxHeight: this.element.style.maxHeight
            };
            this.trigger('beforeOpen', eventArgs_1, function (beforeOpenArgs) {
                if (!beforeOpenArgs.cancel) {
                    if (_this.element.style.maxHeight !== eventArgs_1.maxHeight) {
                        _this.allowMaxHeight = false;
                        _this.element.style.maxHeight = eventArgs_1.maxHeight;
                    }
                    _this.storeActiveElement = document.activeElement;
                    _this.element.tabIndex = -1;
                    if (_this.isModal && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.dlgOverlay))) {
                        _this.dlgOverlay.style.display = 'block';
                        _this.dlgContainer.style.display = 'flex';
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.dlgOverlay], 'e-fade');
                        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.targetEle)) {
                            if (_this.targetEle === document.body) {
                                _this.dlgContainer.style.position = 'fixed';
                            }
                            else {
                                _this.dlgContainer.style.position = 'absolute';
                            }
                            _this.dlgOverlay.style.position = 'absolute';
                            _this.element.style.position = 'relative';
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.targetEle], SCROLL_DISABLED);
                        }
                        else {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([document.body], SCROLL_DISABLED);
                        }
                    }
                    var openAnimation = {
                        name: _this.animationSettings.effect + 'In',
                        duration: _this.animationSettings.duration,
                        delay: _this.animationSettings.delay
                    };
                    var zIndexElement = (_this.isModal) ? _this.element.parentElement : _this.element;
                    if (_this.calculatezIndex) {
                        _this.setzIndex(zIndexElement, true);
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this.element, { 'zIndex': _this.zIndex });
                        if (_this.isModal) {
                            _this.setOverlayZindex(_this.zIndex);
                        }
                    }
                    _this.animationSettings.effect === 'None' ? _this.popupObj.show() : _this.popupObj.show(openAnimation);
                    _this.dialogOpen = true;
                    var prevOnChange = _this.isProtectedOnChange;
                    _this.isProtectedOnChange = true;
                    _this.visible = true;
                    _this.isProtectedOnChange = prevOnChange;
                }
            });
        }
    };
    /**
     * Closes the dialog if it is in visible state.
     * @return {void}
     */
    Dialog.prototype.hide = function (event) {
        var _this = this;
        if (!this.element.classList.contains(ROOT)) {
            return;
        }
        var eventArgs = {
            cancel: false,
            isInteraction: event ? true : 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 (_this.isModal) {
                    !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.targetEle) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.targetEle], SCROLL_DISABLED) :
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], SCROLL_DISABLED);
                }
                var closeAnimation = {
                    name: _this.animationSettings.effect + 'Out',
                    duration: _this.animationSettings.duration,
                    delay: _this.animationSettings.delay
                };
                _this.animationSettings.effect === 'None' ? _this.popupObj.hide() : _this.popupObj.hide(closeAnimation);
                _this.dialogOpen = false;
                var prevOnChange = _this.isProtectedOnChange;
                _this.isProtectedOnChange = true;
                _this.visible = false;
                _this.isProtectedOnChange = prevOnChange;
            }
        });
    };
    /**
     * Specifies to view the Full screen Dialog.
     * @private
     */
    Dialog.prototype.fullScreen = function (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], 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], 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}
     */
    Dialog.prototype.getButtons = function (index) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
            return this.btnObj[index];
        }
        return this.btnObj;
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Dialog.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Dialog.prototype, "showCloseIcon", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Dialog.prototype, "isModal", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Dialog.prototype, "header", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Dialog.prototype, "visible", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Dialog.prototype, "enableResize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Dialog.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')
    ], Dialog.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Dialog.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)
    ], Dialog.prototype, "zIndex", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Dialog.prototype, "target", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Dialog.prototype, "footerTemplate", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Dialog.prototype, "allowDragging", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], ButtonProps)
    ], Dialog.prototype, "buttons", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Dialog.prototype, "closeOnEscape", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, AnimationSettings)
    ], Dialog.prototype, "animationSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ X: 'center', Y: 'center' }, _popup_popup__WEBPACK_IMPORTED_MODULE_1__["PositionData"])
    ], Dialog.prototype, "position", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "beforeOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "beforeClose", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "dragStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "dragStop", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "drag", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "overlayClick", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "resizeStart", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "resizing", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Dialog.prototype, "resizeStop", void 0);
    Dialog = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Dialog);
    return Dialog;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));

/**
 * 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 dialogComponent;
        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 () {
                    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 dialogComponent;
        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 () {
                    this.hide();
                }
            }, {
                buttonModel: { content: 'Cancel' },
                click: function () {
                    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 () {
                    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 () {
                this.hide();
            }
        };
        var cancelButtonModel = {
            buttonModel: { content: 'Cancel' },
            click: function () {
                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 = {}));


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/dialog/index.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/dialog/index.js ***!
  \*****************************************************************/
/*! exports provided: ButtonProps, AnimationSettings, Dialog, DialogUtility */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _dialog__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dialog */ "./node_modules/@syncfusion/ej2-popups/src/dialog/dialog.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonProps", function() { return _dialog__WEBPACK_IMPORTED_MODULE_0__["ButtonProps"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationSettings", function() { return _dialog__WEBPACK_IMPORTED_MODULE_0__["AnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dialog", function() { return _dialog__WEBPACK_IMPORTED_MODULE_0__["Dialog"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogUtility", function() { return _dialog__WEBPACK_IMPORTED_MODULE_0__["DialogUtility"]; });

/**
 * Dialog Component
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/index.js ***!
  \**********************************************************/
/*! exports provided: PositionData, Popup, getScrollableParent, getZindexPartial, getMaxZindex, calculateRelativeBasedPosition, calculatePosition, fit, isCollide, flip, ButtonProps, AnimationSettings, Dialog, DialogUtility, Animation, Tooltip, createSpinner, showSpinner, hideSpinner, setSpinner */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _popup_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./popup/index */ "./node_modules/@syncfusion/ej2-popups/src/popup/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PositionData", function() { return _popup_index__WEBPACK_IMPORTED_MODULE_0__["PositionData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popup", function() { return _popup_index__WEBPACK_IMPORTED_MODULE_0__["Popup"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollableParent", function() { return _popup_index__WEBPACK_IMPORTED_MODULE_0__["getScrollableParent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getZindexPartial", function() { return _popup_index__WEBPACK_IMPORTED_MODULE_0__["getZindexPartial"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMaxZindex", function() { return _popup_index__WEBPACK_IMPORTED_MODULE_0__["getMaxZindex"]; });

/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common/index */ "./node_modules/@syncfusion/ej2-popups/src/common/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateRelativeBasedPosition", function() { return _common_index__WEBPACK_IMPORTED_MODULE_1__["calculateRelativeBasedPosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculatePosition", function() { return _common_index__WEBPACK_IMPORTED_MODULE_1__["calculatePosition"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fit", function() { return _common_index__WEBPACK_IMPORTED_MODULE_1__["fit"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isCollide", function() { return _common_index__WEBPACK_IMPORTED_MODULE_1__["isCollide"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flip", function() { return _common_index__WEBPACK_IMPORTED_MODULE_1__["flip"]; });

/* harmony import */ var _dialog_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dialog/index */ "./node_modules/@syncfusion/ej2-popups/src/dialog/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonProps", function() { return _dialog_index__WEBPACK_IMPORTED_MODULE_2__["ButtonProps"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationSettings", function() { return _dialog_index__WEBPACK_IMPORTED_MODULE_2__["AnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dialog", function() { return _dialog_index__WEBPACK_IMPORTED_MODULE_2__["Dialog"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogUtility", function() { return _dialog_index__WEBPACK_IMPORTED_MODULE_2__["DialogUtility"]; });

/* harmony import */ var _tooltip_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tooltip/index */ "./node_modules/@syncfusion/ej2-popups/src/tooltip/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_3__["Animation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_3__["Tooltip"]; });

/* harmony import */ var _spinner_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./spinner/index */ "./node_modules/@syncfusion/ej2-popups/src/spinner/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSpinner", function() { return _spinner_index__WEBPACK_IMPORTED_MODULE_4__["createSpinner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showSpinner", function() { return _spinner_index__WEBPACK_IMPORTED_MODULE_4__["showSpinner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hideSpinner", function() { return _spinner_index__WEBPACK_IMPORTED_MODULE_4__["hideSpinner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setSpinner", function() { return _spinner_index__WEBPACK_IMPORTED_MODULE_4__["setSpinner"]; });

/**
 * Popup Components
 */







/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/popup/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/popup/index.js ***!
  \****************************************************************/
/*! exports provided: PositionData, Popup, getScrollableParent, getZindexPartial, getMaxZindex */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./popup */ "./node_modules/@syncfusion/ej2-popups/src/popup/popup.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PositionData", function() { return _popup__WEBPACK_IMPORTED_MODULE_0__["PositionData"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popup", function() { return _popup__WEBPACK_IMPORTED_MODULE_0__["Popup"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScrollableParent", function() { return _popup__WEBPACK_IMPORTED_MODULE_0__["getScrollableParent"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getZindexPartial", function() { return _popup__WEBPACK_IMPORTED_MODULE_0__["getZindexPartial"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMaxZindex", function() { return _popup__WEBPACK_IMPORTED_MODULE_0__["getMaxZindex"]; });

/**
 * Popup Components
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/popup/popup.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/popup/popup.js ***!
  \****************************************************************/
/*! exports provided: PositionData, Popup, getScrollableParent, getZindexPartial, getMaxZindex */
/***/ (function(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 import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _common_position__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/position */ "./node_modules/@syncfusion/ej2-popups/src/common/position.js");
/* harmony import */ var _common_collision__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/collision */ "./node_modules/@syncfusion/ej2-popups/src/common/collision.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 = /** @class */ (function (_super) {
    __extends(PositionData, _super);
    function PositionData() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __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);
    return PositionData;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

// 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 = /** @class */ (function (_super) {
    __extends(Popup, _super);
    function Popup(element, options) {
        return _super.call(this, options, element) || this;
    }
    /**
     * Called internally if any of the property value changed.
     * @private
     */
    Popup.prototype.onPropertyChanged = function (newProp, oldProp) {
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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
     */
    Popup.prototype.getModuleName = function () {
        return 'popup';
    };
    /**
     * gets the persisted state properties of the Component.
     */
    Popup.prototype.getPersistData = function () {
        return this.addOnPersist([]);
    };
    /**
     * To destroy the control.
     */
    Popup.prototype.destroy = function () {
        this.element.classList.remove(CLASSNAMES.ROOT, CLASSNAMES.RTL);
        this.unwireEvents();
        _super.prototype.destroy.call(this);
    };
    /**
     * To Initialize the control rendering
     * @private
     */
    Popup.prototype.render = function () {
        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();
        this.wireEvents();
    };
    Popup.prototype.wireEvents = function () {
        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();
        }
    };
    Popup.prototype.wireScrollEvents = function () {
        if (this.getRelateToElement()) {
            for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {
                var parent_1 = _a[_i];
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(parent_1, 'scroll', this.scrollRefresh, this);
            }
        }
    };
    Popup.prototype.unwireEvents = function () {
        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();
        }
    };
    Popup.prototype.unwireScrollEvents = function () {
        if (this.getRelateToElement()) {
            for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {
                var parent_2 = _a[_i];
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(parent_2, 'scroll', this.scrollRefresh);
            }
        }
    };
    Popup.prototype.getRelateToElement = function () {
        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;
    };
    Popup.prototype.scrollRefresh = function (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.
     */
    Popup.prototype.isElementOnViewport = function (relateToElement, scrollElement) {
        var scrollParents = this.getScrollableParent(relateToElement);
        for (var parent_3 = 0; parent_3 < scrollParents.length; parent_3++) {
            if (this.isElementVisible(relateToElement, scrollParents[parent_3])) {
                continue;
            }
            else {
                return false;
            }
        }
        return true;
    };
    Popup.prototype.isElementVisible = function (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_4 = scrollElement.getBoundingClientRect();
            return !(rect.bottom < parent_4.top) &&
                (!(rect.bottom > parent_4.bottom) &&
                    (!(rect.right > parent_4.right) &&
                        !(rect.left < parent_4.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 = Object(_common_position__WEBPACK_IMPORTED_MODULE_1__["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
     */
    Popup.prototype.preRender = function () {
        //There is no event handler
    };
    Popup.prototype.setEnableRtl = function () {
        this.reposition();
        this.enableRtl ? this.element.classList.add(CLASSNAMES.RTL) : this.element.classList.remove(CLASSNAMES.RTL);
    };
    Popup.prototype.setContent = function () {
        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);
            }
        }
    };
    Popup.prototype.orientationOnChange = function () {
        var _this = this;
        setTimeout(function () {
            _this.refreshPosition();
        }, 200);
    };
    /**
     * Based on the `relative` element and `offset` values, `Popup` element position will refreshed.
     */
    Popup.prototype.refreshPosition = function (target, collision) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target)) {
            this.checkFixedParent(target);
        }
        this.reposition();
        if (!collision) {
            this.checkCollision();
        }
    };
    Popup.prototype.reposition = function () {
        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 = void 0;
            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';
        }
    };
    Popup.prototype.checkGetBoundingClientRect = function (ele) {
        var eleRect;
        try {
            eleRect = ele.getBoundingClientRect();
            return eleRect;
        }
        catch (error) {
            return null;
        }
    };
    Popup.prototype.getAnchorPosition = function (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 = Object(_common_position__WEBPACK_IMPORTED_MODULE_1__["calculatePosition"])(anchorEle);
        }
        else {
            if ((ele.classList.contains('e-dlg-modal') && anchor.tagName !== 'BODY')) {
                ele = ele.parentElement;
            }
            anchorPos = Object(_common_position__WEBPACK_IMPORTED_MODULE_1__["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;
    };
    Popup.prototype.callFlip = function (param) {
        var relateToElement = this.getRelateToElement();
        Object(_common_collision__WEBPACK_IMPORTED_MODULE_2__["flip"])(this.element, relateToElement, this.offsetX, this.offsetY, this.position.X, this.position.Y, this.viewPortElement, param, this.fixedParent);
    };
    Popup.prototype.callFit = function (param) {
        if (Object(_common_collision__WEBPACK_IMPORTED_MODULE_2__["isCollide"])(this.element, this.viewPortElement).length !== 0) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.viewPortElement)) {
                var data = Object(_common_collision__WEBPACK_IMPORTED_MODULE_2__["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';
                    }
                }
            }
        }
    };
    Popup.prototype.checkCollision = function () {
        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.
     */
    Popup.prototype.show = function (animationOptions, relativeElement) {
        var _this = this;
        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 (!_this.isDestroyed) {
                    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);
                }
            };
            animationOptions.end = function () {
                if (!_this.isDestroyed) {
                    _this.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.
     */
    Popup.prototype.hide = function (animationOptions) {
        var _this = 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 (!_this.isDestroyed) {
                    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');
                }
            };
            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');
        }
    };
    /**
     * Gets scrollable parent elements for the given element.
     * @param { HTMLElement } element - Specify the element to get the scrollable parents of it.
     */
    Popup.prototype.getScrollableParent = function (element) {
        this.checkFixedParent(element);
        return getScrollableParent(element, this.fixedParent);
    };
    Popup.prototype.checkFixedParent = function (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;
            }
        }
    };
    __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);
    return Popup;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));

/**
 * 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 index = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('z-index');
            var position = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('position');
            if (index !== 'auto' && position !== 'static') {
                childrenZindex.push(index);
            }
        }
    }
    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 i = 0; i < childNodes.length; i++) {
            var index = document.defaultView.getComputedStyle(childNodes[i], null).getPropertyValue('z-index');
            var position = document.defaultView.getComputedStyle(childNodes[i], null).getPropertyValue('position');
            if (index !== 'auto' && position !== 'static') {
                siblingsZindex.push(index);
            }
        }
    }
    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(tagName) {
    if (tagName === void 0) { tagName = ['*']; }
    var maxZindex = [];
    for (var i = 0; i < tagName.length; i++) {
        var elements = document.getElementsByTagName(tagName[i]);
        for (var i_1 = 0; i_1 < elements.length; i_1++) {
            var index = document.defaultView.getComputedStyle(elements[i_1], null).getPropertyValue('z-index');
            var position = document.defaultView.getComputedStyle(elements[i_1], null).getPropertyValue('position');
            if (index !== 'auto' && position !== 'static') {
                maxZindex.push(index);
            }
        }
    }
    var currentZindexValue = Math.max.apply(Math, maxZindex) + 1;
    return currentZindexValue > 2147483647 ? 2147483647 : currentZindexValue;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/spinner/index.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/spinner/index.js ***!
  \******************************************************************/
/*! exports provided: createSpinner, showSpinner, hideSpinner, setSpinner */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _spinner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./spinner */ "./node_modules/@syncfusion/ej2-popups/src/spinner/spinner.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSpinner", function() { return _spinner__WEBPACK_IMPORTED_MODULE_0__["createSpinner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showSpinner", function() { return _spinner__WEBPACK_IMPORTED_MODULE_0__["showSpinner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hideSpinner", function() { return _spinner__WEBPACK_IMPORTED_MODULE_0__["hideSpinner"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setSpinner", function() { return _spinner__WEBPACK_IMPORTED_MODULE_0__["setSpinner"]; });

/**
 * spinner modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/spinner/spinner.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/spinner/spinner.js ***!
  \********************************************************************/
/*! exports provided: createSpinner, showSpinner, hideSpinner, setSpinner */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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/index.js");

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';
/**
 * Create a spinner for the specified target element.
 * ```
 * E.g : createSpinner({ target: targetElement, width: '34px', label: 'Loading..' });
 * ```
 * @param args
 * @private
 */
function createSpinner(args, internalCreateElement) {
    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 = container.classList.contains(CLS_SPINWRAP) ? container :
        container.querySelector('.' + CLS_SPINWRAP);
    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);
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/tooltip/index.js":
/*!******************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/tooltip/index.js ***!
  \******************************************************************/
/*! exports provided: Animation, Tooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tooltip */ "./node_modules/@syncfusion/ej2-popups/src/tooltip/tooltip.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_0__["Animation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_0__["Tooltip"]; });

/**
 * Tooltip modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-popups/src/tooltip/tooltip.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-popups/src/tooltip/tooltip.js ***!
  \********************************************************************/
/*! exports provided: Animation, Tooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return Animation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return Tooltip; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _popup_popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../popup/popup */ "./node_modules/@syncfusion/ej2-popups/src/popup/popup.js");
/* harmony import */ var _common_position__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/position */ "./node_modules/@syncfusion/ej2-popups/src/common/position.js");
/* harmony import */ var _common_collision__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/collision */ "./node_modules/@syncfusion/ej2-popups/src/common/collision.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 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 = 'e-tooltip';
var RTL = 'e-rtl';
var DEVICE = 'e-bigger';
var ICON = '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 = 'e-popup';
var POPUP_OPEN = 'e-popup-open';
var POPUP_CLOSE = 'e-popup-close';
var POPUP_LIB = 'e-lib';
var Animation = /** @class */ (function (_super) {
    __extends(Animation, _super);
    function Animation() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({ effect: 'FadeIn', duration: 150, delay: 0 })
    ], Animation.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({ effect: 'FadeOut', duration: 150, delay: 0 })
    ], Animation.prototype, "close", void 0);
    return Animation;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * 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 = /** @class */ (function (_super) {
    __extends(Tooltip, _super);
    /**
     * Constructor for creating the Tooltip Component
     */
    function Tooltip(options, element) {
        return _super.call(this, options, element) || this;
    }
    Tooltip.prototype.initialize = function () {
        this.formatPosition();
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], ROOT);
    };
    Tooltip.prototype.formatPosition = function () {
        var _a, _b;
        if (this.position.indexOf('Top') === 0 || this.position.indexOf('Bottom') === 0) {
            _a = this.position.split(/(?=[A-Z])/), this.tooltipPositionY = _a[0], this.tooltipPositionX = _a[1];
        }
        else {
            _b = this.position.split(/(?=[A-Z])/), this.tooltipPositionX = _b[0], this.tooltipPositionY = _b[1];
        }
    };
    Tooltip.prototype.renderArrow = function () {
        this.setTipClass(this.position);
        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);
    };
    Tooltip.prototype.setTipClass = function (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;
        }
    };
    Tooltip.prototype.renderPopup = function (target) {
        var elePos = this.mouseTrail ? { top: 0, left: 0 } : this.getTooltipPosition(target);
        this.tooltipEle.classList.remove(POPUP_LIB);
        this.popupObj = new _popup_popup__WEBPACK_IMPORTED_MODULE_1__["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)
        });
    };
    Tooltip.prototype.getTooltipPosition = function (target) {
        this.tooltipEle.style.display = 'none';
        var pos = Object(_common_position__WEBPACK_IMPORTED_MODULE_2__["calculatePosition"])(target, this.tooltipPositionX, this.tooltipPositionY);
        this.tooltipEle.style.display = '';
        var offsetPos = this.calculateTooltipOffset(this.position);
        var elePos = this.collisionFlipFit(target, pos.left + offsetPos.left, pos.top + offsetPos.top);
        return elePos;
    };
    Tooltip.prototype.reposition = function (target) {
        var elePos = this.getTooltipPosition(target);
        this.popupObj.position = { X: elePos.left, Y: elePos.top };
        this.popupObj.dataBind();
    };
    Tooltip.prototype.openPopupHandler = function () {
        if (this.needTemplateReposition()) {
            this.reposition(this.findTarget());
        }
        this.trigger('afterOpen', this.tooltipEventArgs);
    };
    Tooltip.prototype.closePopupHandler = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + 'content', 'Content');
        this.clear();
        this.trigger('afterClose', this.tooltipEventArgs);
    };
    Tooltip.prototype.calculateTooltipOffset = function (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;
    };
    Tooltip.prototype.updateTipPosition = function (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);
    };
    Tooltip.prototype.adjustArrow = function (target, position, tooltipPositionX, tooltipPositionY) {
        if (this.showTipPointer === false) {
            return;
        }
        this.updateTipPosition(position);
        var leftValue;
        var topValue;
        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;
        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';
            }
            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;
    };
    Tooltip.prototype.renderContent = function (target) {
        var tooltipContent = this.tooltipEle.querySelector('.' + CONTENT);
        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)) {
            tooltipContent.innerHTML = '';
            if (this.content instanceof HTMLElement) {
                tooltipContent.appendChild(this.content);
            }
            else if (typeof this.content === 'string' && this.content.indexOf('<div>Blazor') !== 0) {
                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);
                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');
            }
        }
    };
    Tooltip.prototype.renderCloseIcon = function () {
        if (!this.isSticky) {
            return;
        }
        var tipClose = this.createElement('div', { className: ICON + ' ' + 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);
    };
    Tooltip.prototype.addDescribedBy = function (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 });
    };
    Tooltip.prototype.removeDescribedBy = function (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');
        }
    };
    Tooltip.prototype.tapHoldHandler = function (evt) {
        clearTimeout(this.autoCloseTimer);
        this.targetHover(evt.originalEvent);
    };
    Tooltip.prototype.touchEndHandler = function (e) {
        var _this = this;
        if (this.isSticky) {
            return;
        }
        var close = function () {
            _this.close();
        };
        this.autoCloseTimer = setTimeout(close, TOUCHEND_HIDE_DELAY);
    };
    Tooltip.prototype.targetClick = function (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);
        }
    };
    Tooltip.prototype.targetHover = function (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]'));
        for (var _i = 0, targetList_1 = targetList; _i < targetList_1.length; _i++) {
            var target_1 = targetList_1[_i];
            this.restoreElement(target_1);
        }
        this.showTooltip(target, this.animation.open, e);
        this.wireMouseEvents(e, target);
    };
    Tooltip.prototype.showTooltip = function (target, showAnimation, e) {
        var _this = this;
        clearTimeout(this.showTimer);
        clearTimeout(this.hideTimer);
        this.tooltipEventArgs = e ? { type: e.type, cancel: false, target: target, event: e, element: this.tooltipEle } :
            { type: null, cancel: false, target: target, event: null, element: this.tooltipEle };
        this.trigger('beforeRender', this.tooltipEventArgs, function (beforeRenderArgs) {
            if (beforeRenderArgs.cancel) {
                _this.isHidden = true;
                _this.clear();
            }
            else {
                _this.isHidden = false;
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this.tooltipEle)) {
                    _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 + ' ' + 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;'
                    });
                    if (_this.cssClass) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.tooltipEle], _this.cssClass.split(' '));
                    }
                    if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.tooltipEle], DEVICE);
                    }
                    if (_this.width !== 'auto') {
                        _this.tooltipEle.style.maxWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this.width);
                    }
                    _this.tooltipEle.appendChild(_this.createElement('div', { className: CONTENT }));
                    document.body.appendChild(_this.tooltipEle);
                    _this.addDescribedBy(target, _this.ctrlId + '_content');
                    _this.renderContent(target);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.tooltipEle], POPUP_OPEN);
                    if (_this.showTipPointer) {
                        _this.renderArrow();
                    }
                    _this.renderCloseIcon();
                    _this.renderPopup(target);
                }
                else {
                    _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);
                }
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this.tooltipEle], POPUP_OPEN);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.tooltipEle], POPUP_CLOSE);
                _this.tooltipEventArgs = e ? { type: e.type, cancel: false, target: target, event: e, element: _this.tooltipEle } :
                    { type: null, cancel: false, target: target, event: null, element: _this.tooltipEle };
                var this$_1 = _this;
                if (_this.needTemplateReposition()) {
                    _this.tooltipEle.style.display = 'none';
                }
                _this.trigger('beforeOpen', _this.tooltipEventArgs, function (observedArgs) {
                    if (observedArgs.cancel) {
                        this$_1.isHidden = true;
                        this$_1.clear();
                        this$_1.restoreElement(target);
                    }
                    else {
                        var openAnimation_1 = {
                            name: showAnimation.effect,
                            duration: showAnimation.duration,
                            delay: showAnimation.delay,
                            timingFunction: 'easeOut'
                        };
                        if (showAnimation.effect === 'None') {
                            openAnimation_1 = undefined;
                        }
                        if (this$_1.openDelay > 0) {
                            var show = function () {
                                if (this$_1.popupObj) {
                                    this$_1.popupObj.show(openAnimation_1, target);
                                }
                            };
                            this$_1.showTimer = setTimeout(show, this$_1.openDelay);
                        }
                        else {
                            this$_1.popupObj.show(openAnimation_1, target);
                        }
                    }
                });
            }
        });
    };
    Tooltip.prototype.needTemplateReposition = function () {
        // 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'
            || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])();
    };
    Tooltip.prototype.checkCollision = function (target, x, y) {
        var elePos = {
            left: x, top: y, position: this.position,
            horizontal: this.tooltipPositionX, vertical: this.tooltipPositionY
        };
        var affectedPos = Object(_common_collision__WEBPACK_IMPORTED_MODULE_3__["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;
    };
    Tooltip.prototype.collisionFlipFit = function (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 = Object(_common_position__WEBPACK_IMPORTED_MODULE_2__["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 = Object(_common_collision__WEBPACK_IMPORTED_MODULE_3__["fit"])(this.tooltipEle, (this.target ? this.element : null), { X: true, Y: false }, eleOffset).left;
        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';
        }
        eleOffset.left = left;
        return eleOffset;
    };
    Tooltip.prototype.hideTooltip = function (hideAnimation, e, targetElement) {
        var _this = this;
        var target;
        if (e) {
            target = this.target ? (targetElement || e.target) : this.element;
            this.tooltipEventArgs = {
                type: e.type, cancel: false, target: target, event: e, element: this.tooltipEle
            };
        }
        else {
            target = document.querySelector('[data-tooltip-id= ' + this.ctrlId + '_content]');
            this.tooltipEventArgs = {
                type: null, cancel: false, target: target, event: null, element: this.tooltipEle
            };
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target)) {
            return;
        }
        this.trigger('beforeClose', this.tooltipEventArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
                _this.restoreElement(target);
                _this.isHidden = true;
                var closeAnimation_1 = {
                    name: hideAnimation.effect,
                    duration: hideAnimation.duration,
                    delay: hideAnimation.delay,
                    timingFunction: 'easeIn'
                };
                if (hideAnimation.effect === 'None') {
                    closeAnimation_1 = undefined;
                }
                if (_this.closeDelay > 0) {
                    var hide = function () {
                        if (_this.popupObj) {
                            _this.popupObj.hide(closeAnimation_1);
                        }
                    };
                    _this.hideTimer = setTimeout(hide, _this.closeDelay);
                }
                else {
                    _this.popupObj.hide(closeAnimation_1);
                }
            }
            else {
                _this.isHidden = false;
            }
        });
    };
    Tooltip.prototype.restoreElement = function (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);
    };
    Tooltip.prototype.clear = function () {
        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.tooltipEle) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.tooltipEle);
            }
            this.tooltipEle = null;
            this.popupObj = null;
        }
    };
    Tooltip.prototype.onMouseOut = function (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, "." + TOOLTIP_WRAP + "." + POPUP_LIB + "." + POPUP_ROOT);
            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);
            }
        }
        else {
            this.hideTooltip(this.animation.close, e);
        }
    };
    Tooltip.prototype.tooltipElementMouseOut = function (e) {
        this.hideTooltip(this.animation.close, e, this.findTarget());
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseleave', this.tooltipElementMouseOut);
    };
    Tooltip.prototype.onStickyClose = function (e) {
        this.close();
    };
    Tooltip.prototype.onMouseMove = function (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';
    };
    Tooltip.prototype.keyDown = function (event) {
        if (this.tooltipEle && event.keyCode === 27) {
            this.close();
        }
    };
    Tooltip.prototype.touchEnd = function (e) {
        if (this.tooltipEle && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + ROOT) === null) {
            this.close();
        }
    };
    Tooltip.prototype.scrollHandler = function (e) {
        if (this.tooltipEle) {
            this.close();
        }
    };
    /**
     * Core method that initializes the control rendering.
     * @private
     */
    Tooltip.prototype.render = function () {
        this.initialize();
        this.wireEvents(this.opensOn);
    };
    /**
     * Initializes the values of private members.
     * @private
     */
    Tooltip.prototype.preRender = function () {
        this.tipClass = TIP_BOTTOM;
        this.tooltipPositionX = 'Center';
        this.tooltipPositionY = 'Top';
        this.isHidden = true;
    };
    /**
     * Binding events to the Tooltip element.
     * @hidden
     */
    Tooltip.prototype.wireEvents = function (trigger) {
        var triggerList = this.getTriggerList(trigger);
        for (var _i = 0, triggerList_1 = triggerList; _i < triggerList_1.length; _i++) {
            var opensOn = triggerList_1[_i];
            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);
                }
            }
        }
        _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', this.scrollHandler, this);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'keydown', this.keyDown, this);
    };
    Tooltip.prototype.getTriggerList = function (trigger) {
        if (trigger === 'Auto') {
            trigger = (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) ? 'Hover' : 'Hover Focus';
        }
        return trigger.split(' ');
    };
    Tooltip.prototype.wireFocusEvents = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target)) {
            var targetList = [].slice.call(this.element.querySelectorAll(this.target));
            for (var _i = 0, targetList_2 = targetList; _i < targetList_2.length; _i++) {
                var target = targetList_2[_i];
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, 'focus', this.targetHover, this);
            }
        }
        else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focus', this.targetHover, this);
        }
    };
    Tooltip.prototype.wireMouseEvents = function (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') {
                    _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
     */
    Tooltip.prototype.unwireEvents = function (trigger) {
        var triggerList = this.getTriggerList(trigger);
        for (var _i = 0, triggerList_2 = triggerList; _i < triggerList_2.length; _i++) {
            var opensOn = triggerList_2[_i];
            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);
                }
            }
        }
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'touchend', this.touchEnd);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'scroll', this.scrollHandler);
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'keydown', this.keyDown);
    };
    Tooltip.prototype.unwireFocusEvents = function () {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target)) {
            var targetList = [].slice.call(this.element.querySelectorAll(this.target));
            for (var _i = 0, targetList_3 = targetList; _i < targetList_3.length; _i++) {
                var target = targetList_3[_i];
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'focus', this.targetHover);
            }
        }
        else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focus', this.targetHover);
        }
    };
    Tooltip.prototype.unwireMouseEvents = function (target) {
        if (!this.isSticky) {
            var triggerList = this.getTriggerList(this.opensOn);
            for (var _i = 0, triggerList_3 = triggerList; _i < triggerList_3.length; _i++) {
                var opensOn = triggerList_3[_i];
                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) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'mouseleave', this.onMouseOut);
                }
            }
        }
        if (this.mouseTrail) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'mousemove touchstart mouseenter', this.onMouseMove);
        }
    };
    Tooltip.prototype.findTarget = function () {
        var target = document.querySelector('[data-tooltip-id= ' + this.ctrlId + '_content]');
        return target;
    };
    /**
     * Core method to return the component name.
     * @private
     */
    Tooltip.prototype.getModuleName = function () {
        return 'tooltip';
    };
    /**
     * Returns the properties to be maintained in the persisted state.
     * @private
     */
    Tooltip.prototype.getPersistData = function () {
        return this.addOnPersist([]);
    };
    /**
     * Called internally, if any of the property value changed.
     * @private
     */
    Tooltip.prototype.onPropertyChanged = function (newProp, oldProp) {
        var targetElement = this.findTarget();
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'width':
                    if (this.tooltipEle && targetElement) {
                        this.tooltipEle.style.width = 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) {
                        this.renderContent();
                    }
                    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);
                        }
                        else {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.tooltipEle], RTL);
                        }
                    }
                    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.
     * @param animation Sets the specific animation, while showing the Tooltip on the screen.
     * @return {void}
     */
    Tooltip.prototype.open = function (element, animation) {
        if (animation === void 0) { animation = this.animation.open; }
        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.
     * @return {void}
     */
    Tooltip.prototype.close = function (animation) {
        if (animation === void 0) { 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}
     */
    Tooltip.prototype.refresh = function (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
     */
    Tooltip.prototype.destroy = function () {
        _super.prototype.destroy.call(this);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], ROOT);
        this.unwireEvents(this.opensOn);
        this.unwireMouseEvents(this.element);
        if (this.popupObj) {
            this.popupObj.destroy();
        }
        if (this.tooltipEle) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.tooltipEle);
        }
        this.tooltipEle = null;
        this.popupObj = null;
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Tooltip.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')
    ], Tooltip.prototype, "height", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Tooltip.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Tooltip.prototype, "target", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('TopCenter')
    ], Tooltip.prototype, "position", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Tooltip.prototype, "offsetX", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Tooltip.prototype, "offsetY", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Tooltip.prototype, "showTipPointer", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], Tooltip.prototype, "tipPointerPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')
    ], Tooltip.prototype, "opensOn", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Tooltip.prototype, "mouseTrail", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Tooltip.prototype, "isSticky", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, Animation)
    ], Tooltip.prototype, "animation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Tooltip.prototype, "openDelay", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Tooltip.prototype, "closeDelay", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()
    ], Tooltip.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "beforeRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "beforeOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "afterOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "beforeClose", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "afterClose", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "beforeCollision", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "destroyed", void 0);
    Tooltip = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Tooltip);
    return Tooltip;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/index.js":
/*!************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/index.js ***!
  \************************************************************/
/*! exports provided: getModel, Item, DropDownButton, SplitButton, createButtonGroup, SpinSettings, AnimationSettings, ProgressButton */
/***/ (function(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-splitbuttons/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getModel", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Item"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownButton", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["DropDownButton"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SplitButton", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SplitButton"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createButtonGroup", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["createButtonGroup"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SpinSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SpinSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationSettings", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressButton", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ProgressButton"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/button-group/button-group.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/button-group/button-group.js ***!
  \************************************************************************************/
/*! exports provided: createButtonGroup */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createButtonGroup", function() { return createButtonGroup; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");


/**
 * 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, options, createElement) {
    if (options === void 0) { options = {}; }
    var child;
    var btnElem;
    var nextChild;
    var btnModel;
    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(createElement)) {
        createElement = _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('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;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/button-group/index.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/button-group/index.js ***!
  \*****************************************************************************/
/*! exports provided: createButtonGroup */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _button_group__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button-group */ "./node_modules/@syncfusion/ej2-splitbuttons/src/button-group/button-group.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createButtonGroup", function() { return _button_group__WEBPACK_IMPORTED_MODULE_0__["createButtonGroup"]; });

/**
 * ButtonGroup modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/common/common.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/common/common.js ***!
  \************************************************************************/
/*! exports provided: getModel, Item */
/***/ (function(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__, "Item", function() { return Item; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {
        var prop = _a[_i];
        if ((model).indexOf(prop) < 0) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["deleteObject"])(obj, prop);
        }
    }
    return obj;
}
var Item = /** @class */ (function (_super) {
    __extends(Item, _super);
    function Item() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __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);
    return Item;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/common/index.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/common/index.js ***!
  \***********************************************************************/
/*! exports provided: getModel, Item */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ "./node_modules/@syncfusion/ej2-splitbuttons/src/common/common.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getModel", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["getModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["Item"]; });

/**
 * Common modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/drop-down-button.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/drop-down-button.js ***!
  \********************************************************************************************/
/*! exports provided: DropDownButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropDownButton", function() { return DropDownButton; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../common/common */ "./node_modules/@syncfusion/ej2-splitbuttons/src/common/common.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 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 = /** @class */ (function (_super) {
    __extends(DropDownButton, _super);
    /**
     * Constructor for creating the widget
     * @param  {DropDownButtonModel} options?
     * @param  {string|HTMLButtonElement} element?
     */
    function DropDownButton(options, element) {
        return _super.call(this, options, element) || this;
    }
    DropDownButton.prototype.preRender = function () {
        /** */
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @returns string
     */
    DropDownButton.prototype.getPersistData = function () {
        return this.addOnPersist([]);
    };
    /**
     * To open/close DropDownButton popup based on current state of the DropDownButton.
     * @returns void
     */
    DropDownButton.prototype.toggle = function () {
        this.canOpen() ? this.openPopUp() : this.closePopup();
    };
    /**
     * Initialize the Component rendering
     * @returns void
     * @private
     */
    DropDownButton.prototype.render = function () {
        this.initialize();
        if (!this.disabled) {
            this.wireEvents();
        }
    };
    DropDownButton.prototype.createPopup = function () {
        var _a;
        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, (_a = {},
            _a['aria-haspopup'] = this.items.length || this.target ? 'true' : 'false',
            _a['aria-expanded'] = 'false',
            _a['aria-owns'] = this.getPopUpElement().id,
            _a['type'] = 'button',
            _a));
        if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([div], this.cssClass.split(' '));
        }
    };
    DropDownButton.prototype.getTargetElement = function () {
        return typeof (this.target) === 'string' ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])(this.target) : this.target;
    };
    DropDownButton.prototype.createItems = function (items) {
        var showIcon = this.hasIcon(items, 'iconCss');
        var span;
        var item;
        var li;
        var eventArgs;
        var ul = this.createElement('ul', {
            attrs: { 'role': 'menu', 'tabindex': '0' }
        });
        for (var i = 0; i < items.length; i++) {
            item = items[i];
            li = this.createElement('li', {
                innerHTML: item.url ? '' : item.text,
                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.iconCss) {
                span = this.createElement('span', { className: classNames.ICON + ' ' + item.iconCss });
                li.insertBefore(span, li.childNodes[0]);
            }
            else {
                if (showIcon && !item.separator) {
                    li.classList.add('e-blank-icon');
                }
            }
            if (item.url) {
                li.appendChild(this.createAnchor(item));
            }
            eventArgs = { item: item, element: li };
            this.trigger('beforeItemRender', eventArgs);
            ul.appendChild(li);
        }
        return ul;
    };
    DropDownButton.prototype.hasIcon = function (items, field) {
        for (var i = 0, len = items.length; i < len; i++) {
            if (items[i][field]) {
                return true;
            }
        }
        return false;
    };
    DropDownButton.prototype.createAnchor = function (item) {
        return this.createElement('a', { className: 'e-menu-text e-menu-url', innerHTML: item.text, attrs: { 'href': item.url } });
    };
    DropDownButton.prototype.initialize = function () {
        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]);
    };
    DropDownButton.prototype.appendArrowSpan = function () {
        this.element.appendChild(this.createElement('span', {
            className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1
                ? 'bottom' : 'right') + ' e-caret'
        }));
    };
    DropDownButton.prototype.setActiveElem = function (elem) {
        this.activeElem = elem;
    };
    /**
     * Get component name.
     * @returns string
     * @private
     */
    DropDownButton.prototype.getModuleName = function () {
        return 'dropdown-btn';
    };
    DropDownButton.prototype.canOpen = function () {
        return this.getPopUpElement().classList.contains('e-popup-close');
    };
    /**
     * Destroys the widget.
     * @returns void
     */
    DropDownButton.prototype.destroy = function () {
        var _this = this;
        _super.prototype.destroy.call(this);
        if (this.getModuleName() === 'dropdown-btn') {
            var attrList = void 0;
            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) {
                _this.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();
            }
        }
    };
    DropDownButton.prototype.getPopUpElement = function () {
        return this.dropDown.element;
    };
    DropDownButton.prototype.getULElement = function () {
        return this.getPopUpElement().children[0];
    };
    DropDownButton.prototype.wireEvents = function () {
        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 });
    };
    DropDownButton.prototype.keyBoardHandler = function (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;
        }
    };
    DropDownButton.prototype.upDownKeyHandler = function (e) {
        if (this.target && (e.keyCode === 38 || e.keyCode === 40)) {
            return;
        }
        e.preventDefault();
        var ul = this.getULElement();
        var defaultIdx = e.keyCode === 40 ? 0 : ul.childElementCount - 1;
        var liIdx = defaultIdx;
        var li = null;
        this.removeCustomSelection();
        for (var i = 0, len = ul.children.length; i < len; i++) {
            if (ul.children[i].classList.contains(classNames.FOCUS)) {
                li = ul.children[i];
                liIdx = i;
                li.classList.remove(classNames.FOCUS);
                e.keyCode === 40 ? liIdx++ : liIdx--;
                if (liIdx === (e.keyCode === 40 ? ul.childElementCount : -1)) {
                    liIdx = defaultIdx;
                }
            }
        }
        li = ul.children[liIdx];
        liIdx = this.isValidLI(li, liIdx, e.keyCode);
        if (liIdx !== -1) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ul.children[liIdx]], classNames.FOCUS);
            ul.children[liIdx].focus();
        }
    };
    DropDownButton.prototype.removeCustomSelection = function () {
        var selectedLi = this.getULElement().querySelector('.e-selected');
        if (selectedLi) {
            selectedLi.classList.remove('e-selected');
        }
    };
    DropDownButton.prototype.isValidLI = function (li, index, keyCode, count) {
        if (count === void 0) { count = 0; }
        if (li.classList.contains(classNames.SEPARATOR) || li.classList.contains(classNames.DISABLED)) {
            if (index === (keyCode === 40 ? this.items.length - 1 : 0)) {
                index = keyCode === 40 ? 0 : this.items.length - 1;
            }
            else {
                keyCode === 40 ? index++ : index--;
            }
        }
        li = this.getULElement().children[index];
        if (li.classList.contains(classNames.SEPARATOR) || li.classList.contains(classNames.DISABLED)) {
            count++;
            if (count === this.items.length) {
                return index = -1;
            }
            index = this.isValidLI(li, index, keyCode, count);
        }
        return index;
    };
    DropDownButton.prototype.keyEventHandler = function (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);
        }
    };
    DropDownButton.prototype.getLI = function (elem) {
        return elem.tagName === 'LI' ? elem : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(elem, 'li');
    };
    DropDownButton.prototype.mousedownHandler = function (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);
        }
    };
    DropDownButton.prototype.clickHandler = function (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 = void 0;
                var liIdx = void 0;
                var item = void 0;
                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]);
                }
            }
        }
    };
    DropDownButton.prototype.openPopUp = function (e) {
        var _this = this;
        if (e === void 0) { e = null; }
        if (!this.target) {
            this.getPopUpElement().appendChild(this.createItems(this.items));
        }
        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 ul_1 = _this.getULElement();
                _this.dropDown.show(null, _this.element);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this.element], 'e-active');
                _this.element.setAttribute('aria-expanded', 'true');
                ul_1.focus();
                var openArgs = { element: ul_1, items: _this.items };
                _this.trigger('open', openArgs);
            }
        });
    };
    DropDownButton.prototype.closePopup = function (e, focusEle) {
        var _this = this;
        if (e === void 0) { e = null; }
        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 ul_2 = _this.getULElement();
                _this.removeCustomSelection();
                _this.dropDown.hide();
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(_this.activeElem, 'e-active');
                _this.element.setAttribute('aria-expanded', 'false');
                if (focusEle) {
                    focusEle.focus();
                }
                var closeArgs = { element: ul_2, items: _this.items };
                _this.trigger('close', closeArgs);
                if (!_this.target && ul_2) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ul_2);
                }
            }
        });
    };
    DropDownButton.prototype.unWireEvents = function () {
        _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
     */
    DropDownButton.prototype.onPropertyChanged = function (newProp, oldProp) {
        var btnModel = ['content', 'cssClass', 'iconCss', 'iconPosition', 'disabled', 'enableRtl'];
        this.button.setProperties(Object(_common_common__WEBPACK_IMPORTED_MODULE_3__["getModel"])(newProp, btnModel));
        this.dropDown.setProperties(Object(_common_common__WEBPACK_IMPORTED_MODULE_3__["getModel"])(newProp, ['enableRtl']));
        var popupElement = this.getPopUpElement();
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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':
                    this.dropDown.refresh();
                    if (popupElement.classList.contains('e-popup-open')) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(popupElement, ['e-popup-close'], ['e-popup-open']);
                    }
                    break;
            }
        }
    };
    /**
     * Sets the focus to DropDownButton
     * its native method
     * @public
     */
    DropDownButton.prototype.focusIn = function () {
        this.element.focus();
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], DropDownButton.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], DropDownButton.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], DropDownButton.prototype, "disabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], DropDownButton.prototype, "iconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')
    ], DropDownButton.prototype, "iconPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _common_common__WEBPACK_IMPORTED_MODULE_3__["Item"])
    ], DropDownButton.prototype, "items", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], DropDownButton.prototype, "target", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownButton.prototype, "beforeItemRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownButton.prototype, "beforeOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownButton.prototype, "beforeClose", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownButton.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownButton.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownButton.prototype, "select", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], DropDownButton.prototype, "created", void 0);
    DropDownButton = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], DropDownButton);
    return DropDownButton;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/index.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/index.js ***!
  \*********************************************************************************/
/*! exports provided: DropDownButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _drop_down_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drop-down-button */ "./node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/drop-down-button.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownButton", function() { return _drop_down_button__WEBPACK_IMPORTED_MODULE_0__["DropDownButton"]; });

/**
 * DropDownButton modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/index.js ***!
  \****************************************************************/
/*! exports provided: getModel, Item, DropDownButton, SplitButton, createButtonGroup, SpinSettings, AnimationSettings, ProgressButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/index */ "./node_modules/@syncfusion/ej2-splitbuttons/src/common/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getModel", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["getModel"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return _common_index__WEBPACK_IMPORTED_MODULE_0__["Item"]; });

/* harmony import */ var _drop_down_button_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./drop-down-button/index */ "./node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DropDownButton", function() { return _drop_down_button_index__WEBPACK_IMPORTED_MODULE_1__["DropDownButton"]; });

/* harmony import */ var _split_button_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./split-button/index */ "./node_modules/@syncfusion/ej2-splitbuttons/src/split-button/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SplitButton", function() { return _split_button_index__WEBPACK_IMPORTED_MODULE_2__["SplitButton"]; });

/* harmony import */ var _button_group_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./button-group/index */ "./node_modules/@syncfusion/ej2-splitbuttons/src/button-group/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createButtonGroup", function() { return _button_group_index__WEBPACK_IMPORTED_MODULE_3__["createButtonGroup"]; });

/* harmony import */ var _progress_button_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./progress-button/index */ "./node_modules/@syncfusion/ej2-splitbuttons/src/progress-button/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SpinSettings", function() { return _progress_button_index__WEBPACK_IMPORTED_MODULE_4__["SpinSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationSettings", function() { return _progress_button_index__WEBPACK_IMPORTED_MODULE_4__["AnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressButton", function() { return _progress_button_index__WEBPACK_IMPORTED_MODULE_4__["ProgressButton"]; });

/**
 * SplitButton all module
 */







/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/progress-button/index.js":
/*!********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/progress-button/index.js ***!
  \********************************************************************************/
/*! exports provided: SpinSettings, AnimationSettings, ProgressButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _progress_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./progress-button */ "./node_modules/@syncfusion/ej2-splitbuttons/src/progress-button/progress-button.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SpinSettings", function() { return _progress_button__WEBPACK_IMPORTED_MODULE_0__["SpinSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationSettings", function() { return _progress_button__WEBPACK_IMPORTED_MODULE_0__["AnimationSettings"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressButton", function() { return _progress_button__WEBPACK_IMPORTED_MODULE_0__["ProgressButton"]; });

/**
 * ProgressButton modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/progress-button/progress-button.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/progress-button/progress-button.js ***!
  \******************************************************************************************/
/*! exports provided: SpinSettings, AnimationSettings, ProgressButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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_buttons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @syncfusion/ej2-popups */ "./node_modules/@syncfusion/ej2-popups/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 HIDESPINNER = 'e-hide-spinner';
var PROGRESS = 'e-progress';
var PROGRESSACTIVE = 'e-progress-active';
var CONTENTCLS = 'e-btn-content';
var SpinSettings = /** @class */ (function (_super) {
    __extends(SpinSettings, _super);
    function SpinSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(null)
    ], SpinSettings.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(16)
    ], SpinSettings.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('Left')
    ], SpinSettings.prototype, "position", void 0);
    return SpinSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["ChildProperty"]));

var AnimationSettings = /** @class */ (function (_super) {
    __extends(AnimationSettings, _super);
    function AnimationSettings() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(400)
    ], AnimationSettings.prototype, "duration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('None')
    ], AnimationSettings.prototype, "effect", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('ease')
    ], AnimationSettings.prototype, "easing", void 0);
    return AnimationSettings;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["ChildProperty"]));

/**
 * 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 = /** @class */ (function (_super) {
    __extends(ProgressButton, _super);
    /**
     * Constructor for creating the widget
     * @param  {ProgressButtonModel} options?
     * @param  {string|HTMLButtonElement} element?
     */
    function ProgressButton(options, element) {
        var _this = _super.call(this, options, element) || this;
        _this.step = 1;
        return _this;
    }
    ProgressButton.prototype.preRender = function () {
        _super.prototype.preRender.call(this);
    };
    /**
     * Initialize the Component rendering
     * @returns void
     * @private
     */
    ProgressButton.prototype.render = function () {
        _super.prototype.render.call(this);
        this.init();
        this.wireEvents();
        this.setAria();
    };
    /**
     * Starts the button progress at the specified percent.
     * @param percent Starts the button progress at this percent.
     * @returns void
     */
    ProgressButton.prototype.start = function (percent) {
        this.isPaused = false;
        this.startProgress(percent ? percent : this.percent, this.progressTime);
    };
    /**
     * Stops the button progress.
     * @returns void
     */
    ProgressButton.prototype.stop = function () {
        this.isPaused = true;
        cancelAnimationFrame(this.timerId);
    };
    /**
     * Complete the button progress.
     * @returns void
     */
    ProgressButton.prototype.progressComplete = function () {
        this.isPaused = false;
        this.finishProgress();
    };
    /**
     * Get component name.
     * @returns string
     * @private
     */
    ProgressButton.prototype.getModuleName = function () {
        return 'progress-btn';
    };
    /**
     * Destroys the widget.
     * @returns void
     */
    ProgressButton.prototype.destroy = function () {
        var _this = this;
        var classList = [HIDESPINNER, PROGRESSACTIVE, 'e-round-corner', 'e-' + _super.prototype.getModuleName.call(this),
            'e-spin-' + this.spinSettings.position.toLowerCase()];
        var css;
        _super.prototype.destroy.call(this);
        this.unWireEvents();
        this.element.innerHTML = '';
        if (this.cssClass) {
            classList = classList.concat(this.cssClass.split(' '));
        }
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["removeClass"])([this.element], classList);
        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) {
            _this.element.removeAttribute(key);
        });
        if (this.disabled) {
            this.element.removeAttribute('disabled');
        }
    };
    ProgressButton.prototype.init = function () {
        this.element.classList.add('e-' + _super.prototype.getModuleName.call(this));
        this.setContent();
        this.createSpinner();
        if (this.enableProgress) {
            this.createProgress();
        }
    };
    ProgressButton.prototype.createSpinner = function () {
        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);
    };
    ProgressButton.prototype.getSpinner = function () {
        return this.element.getElementsByClassName('e-spinner')[0];
    };
    ProgressButton.prototype.getProgress = function () {
        return this.element.getElementsByClassName(PROGRESS)[0];
    };
    ProgressButton.prototype.setSpinPosition = function (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());
    };
    ProgressButton.prototype.createProgress = function () {
        this.element.appendChild(this.createElement('span', { className: PROGRESS }));
    };
    ProgressButton.prototype.setContent = function () {
        var cont = this.element.innerHTML;
        this.element.innerHTML = '';
        this.element.appendChild(this.createElement('span', { className: CONTENTCLS, innerHTML: cont }));
    };
    ProgressButton.prototype.clickHandler = function () {
        if (this.element.classList.contains(PROGRESSACTIVE)) {
            return;
        }
        this.startProgress();
    };
    ProgressButton.prototype.startProgress = function (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();
    };
    ProgressButton.prototype.startAnimate = function (timestamp, progressTime, prevTime, percent, prevPercent, step, prevProgressTime, isVertical) {
        var _this = this;
        try {
            var args = void 0;
            var timeDiff = timestamp - prevTime;
            var stepTime = this.duration * step / 100;
            var timeDiffBuffer_1 = timeDiff ? (timeDiff < stepTime ? timeDiff - stepTime : timeDiff % stepTime) : 0;
            this.progressTime = progressTime = progressTime + timeDiff - timeDiffBuffer_1;
            prevTime = timestamp - timeDiffBuffer_1;
            percent = percent + (timeDiff - timeDiffBuffer_1) / 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) {
                    _this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
                });
            }
            else if (percent === 100 || progressTime === this.duration) {
                this.trigger('end', args, function (observedArgs) {
                    _this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
                });
            }
            else {
                this.trigger('progress', args, function (observedArgs) {
                    _this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
                });
            }
        }
        catch (e) {
            cancelAnimationFrame(this.timerId);
            this.trigger('fail', e);
        }
    };
    ProgressButton.prototype.successCallback = function (args, perc, pPerc, prgTim, pPrgTim, timDif, pTim) {
        var _this = 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 (_this.enableProgress) {
                    _this.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
                }
                _this.element.setAttribute('aria-valuenow', percent.toString());
            });
            prevPercent = percent;
            prevProgressTime = progressTime;
        }
        if (!this.isPaused) {
            if (progressTime < this.duration && percent < 100) {
                this.interval = window.setTimeout(function () {
                    _this.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 () {
                    _this.progressTime = _this.percent = 0;
                    if (_this.enableProgress) {
                        _this.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
                    }
                    _this.element.setAttribute('aria-valuenow', '0');
                    _this.hideSpin();
                    // tslint:disable-next-line
                }, 100);
            }
        }
    };
    ProgressButton.prototype.startContAnimate = function () {
        var _this = this;
        var ele = this.element.getElementsByClassName(CONTENTCLS)[0];
        if (this.animationSettings.effect !== 'None') {
            (new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Animation"]({})).animate(ele, {
                duration: this.animationSettings.duration,
                name: 'Progress' + this.animationSettings.effect,
                timingFunction: this.animationSettings.easing,
                begin: function () {
                    if (_this.spinSettings.position === 'Center') {
                        _this.setSpinnerSize();
                    }
                },
                end: function () {
                    ele.classList.add('e-animate-end');
                }
            });
        }
        else if (this.spinSettings.position === 'Center') {
            this.setSpinnerSize();
        }
    };
    ProgressButton.prototype.finishProgress = function () {
        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 (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;
    };
    ProgressButton.prototype.setSpinnerSize = function () {
        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');
    };
    ProgressButton.prototype.hideSpin = function () {
        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';
        }
    };
    ProgressButton.prototype.setIconSpan = function () {
        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);
        }
    };
    ProgressButton.prototype.setAria = function () {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["attributes"])(this.element, {
            'aria-label': this.element.textContent + ' progress', 'aria-valuemin': '0', 'aria-valuemax': '100', 'aria-valuenow': '0'
        });
    };
    ProgressButton.prototype.wireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["EventHandler"].add(this.element, 'click', this.clickHandler, this);
    };
    ProgressButton.prototype.unWireEvents = function () {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["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
     */
    ProgressButton.prototype.onPropertyChanged = function (newProp, oldProp) {
        var ele = this.element;
        _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            switch (prop) {
                case 'content':
                    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_1__["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
     */
    ProgressButton.prototype.focusIn = function () {
        this.element.focus();
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(false)
    ], ProgressButton.prototype, "enableProgress", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(2000)
    ], ProgressButton.prototype, "duration", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('Left')
    ], ProgressButton.prototype, "iconPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('')
    ], ProgressButton.prototype, "iconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(false)
    ], ProgressButton.prototype, "disabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(false)
    ], ProgressButton.prototype, "isPrimary", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('')
    ], ProgressButton.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])('')
    ], ProgressButton.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Property"])(false)
    ], ProgressButton.prototype, "isToggle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Complex"])({}, SpinSettings)
    ], ProgressButton.prototype, "spinSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Complex"])({}, AnimationSettings)
    ], ProgressButton.prototype, "animationSettings", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ProgressButton.prototype, "created", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ProgressButton.prototype, "begin", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ProgressButton.prototype, "progress", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ProgressButton.prototype, "end", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["Event"])()
    ], ProgressButton.prototype, "fail", void 0);
    ProgressButton = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["NotifyPropertyChanges"]
    ], ProgressButton);
    return ProgressButton;
}(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_0__["Button"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/split-button/index.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/split-button/index.js ***!
  \*****************************************************************************/
/*! exports provided: SplitButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _split_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./split-button */ "./node_modules/@syncfusion/ej2-splitbuttons/src/split-button/split-button.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SplitButton", function() { return _split_button__WEBPACK_IMPORTED_MODULE_0__["SplitButton"]; });

/**
 * Split Button modules
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-splitbuttons/src/split-button/split-button.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-splitbuttons/src/split-button/split-button.js ***!
  \************************************************************************************/
/*! exports provided: SplitButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplitButton", function() { return SplitButton; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-buttons */ "./node_modules/@syncfusion/ej2-buttons/index.js");
/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../common/common */ "./node_modules/@syncfusion/ej2-splitbuttons/src/common/common.js");
/* harmony import */ var _drop_down_button_drop_down_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../drop-down-button/drop-down-button */ "./node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/drop-down-button.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};
/// <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 = /** @class */ (function (_super) {
    __extends(SplitButton, _super);
    /**
     * Constructor for creating the widget
     * @param  {SplitButtonModel} options?
     * @param  {string|HTMLButtonElement} element?
     */
    function SplitButton(options, element) {
        return _super.call(this, options, element) || this;
    }
    /**
     * Initialize Angular support.
     * @private
     */
    SplitButton.prototype.preRender = function () {
        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, len = ele.attributes.length; idx < len; 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());
        }
    };
    SplitButton.prototype.render = function () {
        this.initWrapper();
        this.createPrimaryButton();
        this.createSecondaryButton();
        this.setActiveElem([this.element, this.secondaryBtnObj.element]);
        this.setAria();
        this.wireEvents();
    };
    SplitButton.prototype.initWrapper = function () {
        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(' '));
        }
    };
    SplitButton.prototype.createPrimaryButton = function () {
        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);
    };
    SplitButton.prototype.createSecondaryButton = function () {
        var _this = this;
        var btnElem = this.createElement('button', {
            className: 'e-icon-btn',
            attrs: { 'tabindex': '-1' },
            id: this.element.id + '_dropdownbtn'
        });
        this.wrapper.appendChild(btnElem);
        var dropDownBtnModel = {
            cssClass: this.cssClass,
            disabled: this.disabled,
            enableRtl: this.enableRtl,
            items: this.items,
            target: this.target,
            beforeItemRender: function (args) {
                _this.trigger('beforeItemRender', args);
            },
            beforeOpen: function (args) {
                _this.trigger('beforeOpen', args, function (observedArgs) {
                    args = observedArgs;
                });
            },
            beforeClose: function (args) {
                _this.trigger('beforeClose', args, function (observedArgs) {
                    args = observedArgs;
                });
            },
            open: function (args) {
                _this.trigger('open', args);
            },
            close: function (args) {
                _this.trigger('close', args);
            },
            select: function (args) {
                _this.trigger('select', args);
            }
        };
        this.secondaryBtnObj = new _drop_down_button_drop_down_button__WEBPACK_IMPORTED_MODULE_3__["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');
    };
    SplitButton.prototype.setAria = function () {
        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
     */
    SplitButton.prototype.getModuleName = function () {
        return 'split-btn';
    };
    /**
     * To open/close SplitButton popup based on current state of the SplitButton.
     * @returns void
     */
    SplitButton.prototype.toggle = function () {
        this.secondaryBtnObj.toggle();
    };
    SplitButton.prototype.destroy = function () {
        var _this = this;
        var classList = [RTL];
        var element = document.getElementById(this.element.id);
        if (this.cssClass) {
            classList = classList.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);
                ['aria-label', 'aria-haspopup', 'aria-expanded',
                    'aria-owns', 'type'].forEach(function (key) {
                    _this.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();
        _super.prototype.destroy.call(this);
        if (!this.element.getAttribute('class')) {
            this.element.removeAttribute('class');
        }
    };
    SplitButton.prototype.wireEvents = function () {
        _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'
            }
        });
    };
    SplitButton.prototype.unWireEvents = function () {
        _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();
    };
    SplitButton.prototype.primaryBtnClickHandler = function () {
        this.trigger('click', { element: this.element });
    };
    SplitButton.prototype.btnKeyBoardHandler = function (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
     */
    SplitButton.prototype.onPropertyChanged = function (newProp, oldProp) {
        var model = ['content', 'iconCss', 'iconPosition', 'cssClass', 'disabled', 'enableRtl'];
        this.primaryBtnObj.setProperties(Object(_common_common__WEBPACK_IMPORTED_MODULE_2__["getModel"])(newProp, model));
        model = ['items', 'beforeOpen', 'beforeItemRender', 'select', 'open',
            'close', 'cssClass', 'disabled', 'enableRtl'];
        this.secondaryBtnObj.setProperties(Object(_common_common__WEBPACK_IMPORTED_MODULE_2__["getModel"])(newProp, model));
        for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
            var prop = _a[_i];
            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
     */
    SplitButton.prototype.focusIn = function () {
        this.element.focus();
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SplitButton.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SplitButton.prototype, "cssClass", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], SplitButton.prototype, "disabled", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SplitButton.prototype, "iconCss", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')
    ], SplitButton.prototype, "iconPosition", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], _common_common__WEBPACK_IMPORTED_MODULE_2__["Item"])
    ], SplitButton.prototype, "items", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], SplitButton.prototype, "target", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], SplitButton.prototype, "beforeItemRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], SplitButton.prototype, "beforeOpen", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], SplitButton.prototype, "beforeClose", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], SplitButton.prototype, "click", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], SplitButton.prototype, "close", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], SplitButton.prototype, "open", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], SplitButton.prototype, "select", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], SplitButton.prototype, "created", void 0);
    SplitButton = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], SplitButton);
    return SplitButton;
}(_drop_down_button_drop_down_button__WEBPACK_IMPORTED_MODULE_3__["DropDownButton"]));



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-svg-base/index.js":
/*!********************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-svg-base/index.js ***!
  \********************************************************/
/*! exports provided: TextStyle, TooltipBorder, AreaBounds, ToolLocation, Tooltip, getTooltipThemeColor, measureText, findDirection, Size, Rect, Side, CustomizeOption, TextOption, getElement, removeElement, drawSymbol, calculateShapes, PathOption, textElement, TooltipLocation, SvgRenderer, CanvasRenderer */
/***/ (function(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-svg-base/src/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextStyle", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipBorder", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TooltipBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AreaBounds", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["AreaBounds"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolLocation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["ToolLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Tooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTooltipThemeColor", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getTooltipThemeColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "measureText", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["measureText"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findDirection", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["findDirection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Size", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Size"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Rect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Side", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["Side"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomizeOption", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CustomizeOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextOption", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TextOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["getElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["removeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drawSymbol", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateShapes", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["calculateShapes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PathOption", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["PathOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textElement", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["textElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipLocation", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["TooltipLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["SvgRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CanvasRenderer", function() { return _src_index__WEBPACK_IMPORTED_MODULE_0__["CanvasRenderer"]; });

/**
 * index
 */



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-svg-base/src/index.js":
/*!************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-svg-base/src/index.js ***!
  \************************************************************/
/*! exports provided: TextStyle, TooltipBorder, AreaBounds, ToolLocation, Tooltip, getTooltipThemeColor, measureText, findDirection, Size, Rect, Side, CustomizeOption, TextOption, getElement, removeElement, drawSymbol, calculateShapes, PathOption, textElement, TooltipLocation, SvgRenderer, CanvasRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _tooltip_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tooltip/index */ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextStyle", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipBorder", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["TooltipBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AreaBounds", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["AreaBounds"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolLocation", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["ToolLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["Tooltip"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTooltipThemeColor", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["getTooltipThemeColor"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "measureText", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["measureText"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findDirection", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["findDirection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Size", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["Size"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["Rect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Side", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["Side"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomizeOption", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["CustomizeOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextOption", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["TextOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["getElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["removeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drawSymbol", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["drawSymbol"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateShapes", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["calculateShapes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PathOption", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["PathOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textElement", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["textElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipLocation", function() { return _tooltip_index__WEBPACK_IMPORTED_MODULE_0__["TooltipLocation"]; });

/* harmony import */ var _svg_render_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svg-render/index */ "./node_modules/@syncfusion/ej2-svg-base/src/svg-render/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgRenderer", function() { return _svg_render_index__WEBPACK_IMPORTED_MODULE_1__["SvgRenderer"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CanvasRenderer", function() { return _svg_render_index__WEBPACK_IMPORTED_MODULE_1__["CanvasRenderer"]; });

/**
 * Chart components exported.
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-svg-base/src/svg-render/canvas-renderer.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-svg-base/src/svg-render/canvas-renderer.js ***!
  \*********************************************************************************/
/*! exports provided: CanvasRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CanvasRenderer", function() { return CanvasRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/**
 * To import utils
 */

/**
 * @private
 */
var CanvasRenderer = /** @class */ (function () {
    /* End-Properties */
    function CanvasRenderer(rootID) {
        this.rootId = rootID;
    }
    // method to get the attributes value
    /* tslint:disable */
    CanvasRenderer.prototype.getOptionValue = function (options, key) {
        return options[key];
    };
    /* tslint:enable */
    /**
     * To create a Html5 canvas element
     * @param {BaseAttibutes} options - Options to create canvas
     * @return {HTMLCanvasElement}
     */
    CanvasRenderer.prototype.createCanvas = function (options) {
        var canvasObj = document.createElement('canvas');
        canvasObj.setAttribute('id', this.rootId + '_canvas');
        this.ctx = canvasObj.getContext('2d');
        this.canvasObj = canvasObj;
        this.setCanvasSize(options.width, options.height);
        return this.canvasObj;
    };
    /**
     * To set the width and height for the Html5 canvas element
     * @param {number} width - width of the canvas
     * @param {number} height - height of the canvas
     * @return {void}
     */
    CanvasRenderer.prototype.setCanvasSize = function (width, height) {
        var element = document.getElementById(this.rootId);
        var size = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element) ? element.getBoundingClientRect() : null;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.width)) {
            this.canvasObj.setAttribute('width', width ? width.toString() : size.width.toString());
        }
        else {
            this.canvasObj.setAttribute('width', this.width.toString());
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.height)) {
            this.canvasObj.setAttribute('height', height ? height.toString() : '450');
        }
        else {
            this.canvasObj.setAttribute('height', this.height.toString());
        }
    };
    // To set the values to the attributes
    CanvasRenderer.prototype.setAttributes = function (options) {
        this.ctx.lineWidth = this.getOptionValue(options, 'stroke-width');
        var dashArray = this.getOptionValue(options, 'stroke-dasharray');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dashArray)) {
            var dashArrayString = dashArray.split(',');
            this.ctx.setLineDash([parseInt(dashArrayString[0], 10), parseInt(dashArrayString[1], 10)]);
        }
        this.ctx.strokeStyle = this.getOptionValue(options, 'stroke');
    };
    /**
     * To draw a line
     * @param {LineAttributes} options - required options to draw a line on the canvas
     * @return {void}
     */
    CanvasRenderer.prototype.drawLine = function (options) {
        this.ctx.save();
        this.ctx.beginPath();
        this.ctx.lineWidth = this.getOptionValue(options, 'stroke-width');
        this.ctx.strokeStyle = options.stroke;
        this.ctx.moveTo(options.x1, options.y1);
        this.ctx.lineTo(options.x2, options.y2);
        this.ctx.stroke();
        this.ctx.restore();
    };
    /**
     * To draw a rectangle
     * @param {RectAttributes} options - required options to draw a rectangle on the canvas
     * @return {void}
     */
    CanvasRenderer.prototype.drawRectangle = function (options, canvasTranslate) {
        var canvasCtx = this.ctx;
        var cornerRadius = options.rx;
        this.ctx.save();
        this.ctx.beginPath();
        if (canvasTranslate) {
            this.ctx.translate(canvasTranslate[0], canvasTranslate[1]);
        }
        this.ctx.globalAlpha = this.getOptionValue(options, 'opacity');
        this.setAttributes(options);
        this.ctx.rect(options.x, options.y, options.width, options.height);
        if (cornerRadius !== null && cornerRadius >= 0) {
            this.drawCornerRadius(options);
        }
        else {
            if (options.fill === 'none') {
                options.fill = 'transparent';
            }
            this.ctx.fillStyle = options.fill;
            this.ctx.fillRect(options.x, options.y, options.width, options.height);
            this.ctx.stroke();
        }
        this.ctx.restore();
        this.ctx = canvasCtx;
        return (this.canvasObj);
    };
    // To draw the corner of a rectangle
    CanvasRenderer.prototype.drawCornerRadius = function (options) {
        var cornerRadius = options.rx;
        var x = options.x;
        var y = options.y;
        var width = options.width;
        var height = options.height;
        if (options.fill === 'none') {
            options.fill = 'transparent';
        }
        this.ctx.fillStyle = options.fill;
        if (width < 2 * cornerRadius) {
            cornerRadius = width / 2;
        }
        if (height < 2 * cornerRadius) {
            cornerRadius = height / 2;
        }
        this.ctx.beginPath();
        this.ctx.moveTo(x + width - cornerRadius, y);
        this.ctx.arcTo(x + width, y, x + width, y + height, cornerRadius);
        this.ctx.arcTo(x + width, y + height, x, y + height, cornerRadius);
        this.ctx.arcTo(x, y + height, x, y, cornerRadius);
        this.ctx.arcTo(x, y, x + width, y, cornerRadius);
        this.ctx.closePath();
        this.ctx.fill();
        this.ctx.stroke();
    };
    /**
     * To draw a path on the canvas
     * @param {PathAttributes} options - options needed to draw path
     * @param {Int32Array} canvasTranslate - Array of numbers to translate the canvas
     * @return {void}
     */
    CanvasRenderer.prototype.drawPath = function (options, canvasTranslate) {
        var path = options.d;
        var dataSplit = path.split(' ');
        var borderWidth = this.getOptionValue(options, 'stroke-width');
        var canvasCtx = this.ctx;
        var flag = true;
        this.ctx.save();
        this.ctx.beginPath();
        if (canvasTranslate) {
            this.ctx.translate(canvasTranslate[0], canvasTranslate[1]);
        }
        this.ctx.globalAlpha = options.opacity ? options.opacity : this.getOptionValue(options, 'fill-opacity');
        this.setAttributes(options);
        for (var i = 0; i < dataSplit.length; i = i + 3) {
            var x1 = parseFloat(dataSplit[i + 1]);
            var y1 = parseFloat(dataSplit[i + 2]);
            switch (dataSplit[i]) {
                case 'M':
                    if (!options.innerR && !options.cx) {
                        this.ctx.moveTo(x1, y1);
                    }
                    break;
                case 'L':
                    if (!options.innerR) {
                        this.ctx.lineTo(x1, y1);
                    }
                    break;
                case 'Q':
                    var q1 = parseFloat(dataSplit[i + 3]);
                    var q2 = parseFloat(dataSplit[i + 4]);
                    this.ctx.quadraticCurveTo(x1, y1, q1, q2);
                    i = i + 2;
                    break;
                case 'C':
                    var c1 = parseFloat(dataSplit[i + 3]);
                    var c2 = parseFloat(dataSplit[i + 4]);
                    var c3 = parseFloat(dataSplit[i + 5]);
                    var c4 = parseFloat(dataSplit[i + 6]);
                    this.ctx.bezierCurveTo(x1, y1, c1, c2, c3, c4);
                    i = i + 4;
                    break;
                case 'A':
                    if (!options.innerR) {
                        if (options.cx) {
                            this.ctx.arc(options.cx, options.cy, options.radius, 0, 2 * Math.PI, options.counterClockWise);
                        }
                        else {
                            this.ctx.moveTo(options.x, options.y);
                            this.ctx.arc(options.x, options.y, options.radius, options.start, options.end, options.counterClockWise);
                            this.ctx.lineTo(options.x, options.y);
                        }
                    }
                    else if (flag) {
                        this.ctx.arc(options.x, options.y, options.radius, options.start, options.end, options.counterClockWise);
                        this.ctx.arc(options.x, options.y, options.innerR, options.end, options.start, !options.counterClockWise);
                        flag = false;
                    }
                    i = i + 5;
                    break;
                case 'z':
                case 'Z':
                    this.ctx.closePath();
                    //since for loop is incremented by 3, to get next value after 'z' i is decremented for 2.
                    i = i - 2;
                    break;
            }
        }
        if (options.fill !== 'none' && options.fill !== undefined) {
            this.ctx.fillStyle = options.fill;
            this.ctx.fill();
        }
        if (borderWidth > 0) {
            this.ctx.stroke();
        }
        this.ctx.restore();
        this.ctx = canvasCtx;
        return this.canvasObj;
    };
    /**
     * To draw a text
     * @param {TextAttributes} options - options required to draw text
     * @param {string} label - Specifies the text which has to be drawn on the canvas
     * @return {void}
     */
    CanvasRenderer.prototype.createText = function (options, label, transX, transY) {
        var fontWeight = this.getOptionValue(options, 'font-weight');
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fontWeight) && fontWeight.toLowerCase() === 'regular') {
            fontWeight = 'normal';
        }
        var fontSize = this.getOptionValue(options, 'font-size');
        var fontFamily = this.getOptionValue(options, 'font-family');
        var fontStyle = this.getOptionValue(options, 'font-style').toLowerCase();
        var font = (fontStyle + ' ' + fontWeight + ' ' + fontSize + ' ' + fontFamily);
        var anchor = this.getOptionValue(options, 'text-anchor');
        var opacity = options.opacity !== undefined ? options.opacity : 1;
        if (anchor === 'middle') {
            anchor = 'center';
        }
        this.ctx.save();
        this.ctx.fillStyle = options.fill;
        this.ctx.font = font;
        this.ctx.textAlign = anchor;
        this.ctx.globalAlpha = opacity;
        if (options.baseline) {
            this.ctx.textBaseline = options.baseline;
        }
        var txtlngth = 0;
        this.ctx.translate(options.x + (txtlngth / 2) + (transX ? transX : 0), options.y + (transY ? transY : 0));
        this.ctx.rotate(options.labelRotation * Math.PI / 180);
        this.ctx.fillText(label, 0, 0);
        this.ctx.restore();
        return this.canvasObj;
    };
    /**
     * To draw circle on the canvas
     * @param {CircleAttributes} options - required options to draw the circle
     * @return {void}
     */
    CanvasRenderer.prototype.drawCircle = function (options, canvasTranslate) {
        var canvasCtx = this.ctx;
        this.ctx.save();
        this.ctx.beginPath();
        this.ctx.arc(options.cx, options.cy, options.r, 0, 2 * Math.PI);
        this.ctx.fillStyle = options.fill;
        this.ctx.globalAlpha = options.opacity;
        this.ctx.fill();
        if (canvasTranslate) {
            this.ctx.translate(canvasTranslate[0], canvasTranslate[1]);
        }
        this.setAttributes(options);
        this.ctx.stroke();
        this.ctx.restore();
        this.ctx = canvasCtx;
        return this.canvasObj;
    };
    /**
     * To draw polyline
     * @param {PolylineAttributes} options - options needed to draw polyline
     * @return {void}
     */
    CanvasRenderer.prototype.drawPolyline = function (options) {
        this.ctx.save();
        this.ctx.beginPath();
        var points = options.points.split(' ');
        for (var i = 0; i < points.length - 1; i++) {
            var point = points[i].split(',');
            var x = parseFloat(point[0]);
            var y = parseFloat(point[1]);
            if (i === 0) {
                this.ctx.moveTo(x, y);
            }
            else {
                this.ctx.lineTo(x, y);
            }
        }
        this.ctx.lineWidth = this.getOptionValue(options, 'stroke-width');
        this.ctx.strokeStyle = options.stroke;
        this.ctx.stroke();
        this.ctx.restore();
    };
    /**
     * To draw an ellipse on the canvas
     * @param {EllipseAttributes} options - options needed to draw ellipse
     * @return {void}
     */
    CanvasRenderer.prototype.drawEllipse = function (options, canvasTranslate) {
        var canvasCtx = this.ctx;
        var circumference = Math.max(options.rx, options.ry);
        var scaleX = options.rx / circumference;
        var scaleY = options.ry / circumference;
        this.ctx.save();
        this.ctx.beginPath();
        this.ctx.translate(options.cx, options.cy);
        if (canvasTranslate) {
            this.ctx.translate(canvasTranslate[0], canvasTranslate[1]);
        }
        this.ctx.save();
        this.ctx.scale(scaleX, scaleY);
        this.ctx.arc(0, 0, circumference, 0, 2 * Math.PI, false);
        this.ctx.fillStyle = options.fill;
        this.ctx.fill();
        this.ctx.restore();
        this.ctx.lineWidth = this.getOptionValue(options, 'stroke-width');
        this.ctx.strokeStyle = options.stroke;
        this.ctx.stroke();
        this.ctx.restore();
        this.ctx = canvasCtx;
    };
    /**
     * To draw an image
     * @param {ImageAttributes} options - options required to draw an image on the canvas
     * @return {void}
     */
    CanvasRenderer.prototype.drawImage = function (options) {
        this.ctx.save();
        var imageObj = new Image();
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(options.href)) {
            imageObj.src = options.href;
            this.ctx.drawImage(imageObj, options.x, options.y, options.width, options.height);
        }
        this.ctx.restore();
    };
    /**
     * To create a linear gradient
     * @param {string[]} colors - Specifies the colors required to create linear gradient
     * @return {string}
     */
    CanvasRenderer.prototype.createLinearGradient = function (colors) {
        var myGradient;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(colors[0].colorStop)) {
            myGradient = this.ctx.createLinearGradient(0, 0, 0, this.canvasObj.height);
        }
        var color = this.setGradientValues(colors, myGradient);
        return color;
    };
    /**
     * To create a radial gradient
     * @param {string[]} colors - Specifies the colors required to create linear gradient
     * @return {string}
     */
    CanvasRenderer.prototype.createRadialGradient = function (colors) {
        var myGradient;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(colors[0].colorStop)) {
            myGradient = this.ctx.createRadialGradient(0, 0, 0, 0, 0, this.canvasObj.height);
        }
        var colorName = this.setGradientValues(colors, myGradient);
        return colorName;
    };
    // To set the gradient values
    CanvasRenderer.prototype.setGradientValues = function (colors, myGradient) {
        var colorName;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(colors[0].colorStop)) {
            for (var i = 0; i <= colors.length - 1; i++) {
                var color = colors[i].color;
                var newColorStop = (colors[i].colorStop).slice(0, -1);
                var stopColor = parseInt(newColorStop, 10) / 100;
                myGradient.addColorStop(stopColor, color);
            }
            colorName = myGradient.toString();
        }
        else {
            colorName = colors[0].color.toString();
        }
        return colorName;
    };
    /**
     * To set the attributes to the element
     * @param {SVGCanvasAttributes} options - Attributes to set for the element
     * @param {HTMLElement} element - The element to which the attributes need to be set
     * @return {HTMLElement}
     */
    CanvasRenderer.prototype.setElementAttributes = function (options, element) {
        var keys = Object.keys(options);
        var values = Object.keys(options).map(function (key) { return options[key]; });
        for (var i = 0; i < keys.length; i++) {
            element.setAttribute(keys[i], values[i]);
        }
        return null;
    };
    /**
     * To update the values of the canvas element attributes
     * @param {SVGCanvasAttributes} options - Specifies the colors required to create gradient
     * @return {void}
     */
    CanvasRenderer.prototype.updateCanvasAttributes = function (options) {
        this.setElementAttributes(options, this.canvasObj);
        var ctx = this.ctx;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dataUrl)) {
            var img_1 = new Image;
            img_1.onload = function () {
                ctx.drawImage(img_1, 0, 0);
            };
            img_1.src = this.dataUrl;
        }
    };
    /**
     * This method clears the given rectangle region
     * @param options
     */
    CanvasRenderer.prototype.clearRect = function (rect) {
        this.ctx.restore();
        this.ctx.clearRect(rect.x, rect.y, rect.width, rect.height);
    };
    ;
    /**
     * For canvas rendering in chart
     * Dummy method for using canvas/svg render in the same variable name in chart control
     * @param {BaseAttibutes} options - Options needed to create group
     * @return {Element}
     */
    CanvasRenderer.prototype.createGroup = function (options) {
        return null;
    };
    /**
     * To render a clip path
     * Dummy method for using canvas/svg render in the same variable name in chart control
     * @param {BaseAttibutes} options - Options required to render a clip path
     * @return {Element}
     */
    CanvasRenderer.prototype.drawClipPath = function (options) {
        return null;
    };
    /**
     * Clip method to perform clip in canvas mode
     * @param options
     */
    CanvasRenderer.prototype.canvasClip = function (options) {
        this.ctx.save();
        this.ctx.fillStyle = 'transparent';
        this.ctx.rect(options.x, options.y, options.width, options.height);
        this.ctx.fill();
        this.ctx.clip();
    };
    /**
     * Tp restore the canvas
     * @param options
     */
    CanvasRenderer.prototype.canvasRestore = function () {
        this.ctx.restore();
    };
    /**
     * To draw a polygon
     * Dummy method for using canvas/svg render in the same variable name in chart control
     * @param {PolylineAttributes} options - Options needed to draw a polygon in SVG
     * @return {Element}
     */
    CanvasRenderer.prototype.drawPolygon = function (options) {
        return null;
    };
    /**
     * To create defs element in SVG
     * Dummy method for using canvas/svg render in the same variable name in chart control
     * @return {Element}
     */
    CanvasRenderer.prototype.createDefs = function () {
        return null;
    };
    /**
     * To create clip path in SVG
     * Dummy method for using canvas/svg render in the same variable name in chart control
     * @param {BaseAttibutes} options - Options needed to create clip path
     * @return {Element}
     */
    CanvasRenderer.prototype.createClipPath = function (options) {
        return null;
    };
    /**
     * To create a Html5 SVG element
     * Dummy method for using canvas/svg render in the same variable name in chart control
     * @param {SVGAttributes} options - Options to create SVG
     * @return {Element}
     */
    CanvasRenderer.prototype.createSvg = function (options) {
        return null;
    };
    return CanvasRenderer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-svg-base/src/svg-render/index.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-svg-base/src/svg-render/index.js ***!
  \***********************************************************************/
/*! exports provided: SvgRenderer, CanvasRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _svg_renderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./svg-renderer */ "./node_modules/@syncfusion/ej2-svg-base/src/svg-render/svg-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgRenderer", function() { return _svg_renderer__WEBPACK_IMPORTED_MODULE_0__["SvgRenderer"]; });

/* harmony import */ var _canvas_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./canvas-renderer */ "./node_modules/@syncfusion/ej2-svg-base/src/svg-render/canvas-renderer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CanvasRenderer", function() { return _canvas_renderer__WEBPACK_IMPORTED_MODULE_1__["CanvasRenderer"]; });

/**
 * Base modules
 */




/***/ }),

/***/ "./node_modules/@syncfusion/ej2-svg-base/src/svg-render/svg-renderer.js":
/*!******************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-svg-base/src/svg-render/svg-renderer.js ***!
  \******************************************************************************/
/*! exports provided: SvgRenderer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgRenderer", function() { return SvgRenderer; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/**
 * To import utils
 */

var SvgRenderer = /** @class */ (function () {
    /* End-Properties */
    function SvgRenderer(rootID) {
        //Internal Variables 
        this.svgLink = 'http://www.w3.org/2000/svg';
        this.rootId = rootID;
    }
    // method to get the attributes value
    /* tslint:disable */
    SvgRenderer.prototype.getOptionValue = function (options, key) {
        return options[key];
    }; /* tslint:enable */
    /**
     * To create a Html5 SVG element
     * @param {SVGAttributes} options - Options to create SVG
     * @return {Element}
     */
    SvgRenderer.prototype.createSvg = function (options) {
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(options.id)) {
            options.id = this.rootId + '_svg';
        }
        this.svgObj = document.getElementById(options.id);
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(document.getElementById(options.id))) {
            this.svgObj = document.createElementNS(this.svgLink, 'svg');
        }
        this.svgObj = this.setElementAttributes(options, this.svgObj);
        this.setSVGSize(options.width, options.height);
        return this.svgObj;
    };
    // method to set the height and width for the SVG element
    SvgRenderer.prototype.setSVGSize = function (width, height) {
        var element = document.getElementById(this.rootId);
        var size = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element) ? element.getBoundingClientRect() : null;
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.width) || this.width <= 0) {
            this.svgObj.setAttribute('width', width ? width.toString() : size.width.toString());
        }
        else {
            this.svgObj.setAttribute('width', this.width.toString());
        }
        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.height) || this.height <= 0) {
            this.svgObj.setAttribute('height', height ? height.toString() : '450');
        }
        else {
            this.svgObj.setAttribute('height', this.height.toString());
        }
    };
    /**
     * To draw a path
     * @param {PathAttributes} options - Options to draw a path in SVG
     * @param {Int32Array} canvasTranslate - Used as dummy variable for canvas rendering
     * @return {Element}
     */
    SvgRenderer.prototype.drawPath = function (options, canvasTranslate) {
        var path = document.getElementById(options.id);
        if (path === null) {
            path = document.createElementNS(this.svgLink, 'path');
        }
        path = this.setElementAttributes(options, path);
        return path;
    };
    /**
     * To draw a line
     * @param {LineAttributes} options - Options to draw a line in SVG
     * @return {Element}
     */
    SvgRenderer.prototype.drawLine = function (options) {
        var line = document.getElementById(options.id);
        if (line === null) {
            line = document.createElementNS(this.svgLink, 'line');
        }
        line = this.setElementAttributes(options, line);
        return line;
    };
    /**
     * To draw a rectangle
     * @param {BaseAttibutes} options - Required options to draw a rectangle in SVG
     * @return {Element}
     */
    SvgRenderer.prototype.drawRectangle = function (options, canvasTranslate) {
        var rectangle = document.getElementById(options.id);
        if (rectangle === null) {
            rectangle = document.createElementNS(this.svgLink, 'rect');
        }
        rectangle = this.setElementAttributes(options, rectangle);
        return rectangle;
    };
    /**
     * To draw a circle
     * @param {CircleAttributes} options - Required options to draw a circle in SVG
     * @return {Element}
     */
    SvgRenderer.prototype.drawCircle = function (options) {
        var circle = document.getElementById(options.id);
        if (circle === null) {
            circle = document.createElementNS(this.svgLink, 'circle');
        }
        circle = this.setElementAttributes(options, circle);
        return circle;
    };
    /**
     * To draw a polyline
     * @param {PolylineAttributes} options - Options required to draw a polyline
     * @return {Element}
     */
    SvgRenderer.prototype.drawPolyline = function (options) {
        var polyline = document.getElementById(options.id);
        if (polyline === null) {
            polyline = document.createElementNS(this.svgLink, 'polyline');
        }
        polyline = this.setElementAttributes(options, polyline);
        return polyline;
    };
    /**
     * To draw an ellipse
     * @param {EllipseAttributes} options - Options required to draw an ellipse
     * @return {Element}
     */
    SvgRenderer.prototype.drawEllipse = function (options) {
        var ellipse = document.getElementById(options.id);
        if (ellipse === null) {
            ellipse = document.createElementNS(this.svgLink, 'ellipse');
        }
        ellipse = this.setElementAttributes(options, ellipse);
        return ellipse;
    };
    /**
     * To draw a polygon
     * @param {PolylineAttributes} options - Options needed to draw a polygon in SVG
     * @return {Element}
     */
    SvgRenderer.prototype.drawPolygon = function (options) {
        var polygon = document.getElementById(options.id);
        if (polygon === null) {
            polygon = document.createElementNS(this.svgLink, 'polygon');
        }
        polygon = this.setElementAttributes(options, polygon);
        return polygon;
    };
    /**
     * To draw an image
     * @param {ImageAttributes} options - Required options to draw an image in SVG
     * @return {Element}
     */
    SvgRenderer.prototype.drawImage = function (options) {
        var img = document.createElementNS(this.svgLink, 'image');
        img.setAttributeNS(null, 'height', options.height.toString());
        img.setAttributeNS(null, 'width', options.width.toString());
        img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', options.href);
        img.setAttributeNS(null, 'x', options.x.toString());
        img.setAttributeNS(null, 'y', options.y.toString());
        img.setAttributeNS(null, 'id', options.id);
        img.setAttributeNS(null, 'visibility', options.visibility);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.getOptionValue(options, 'clip-path'))) {
            img.setAttributeNS(null, 'clip-path', this.getOptionValue(options, 'clip-path'));
        }
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(options.preserveAspectRatio)) {
            img.setAttributeNS(null, 'preserveAspectRatio', options.preserveAspectRatio);
        }
        return img;
    };
    /**
     * To draw a text
     * @param {TextAttributes} options - Options needed to draw a text in SVG
     * @return {Element}
     */
    SvgRenderer.prototype.createText = function (options, label, transX, transY) {
        var text = document.createElementNS(this.svgLink, 'text');
        text = this.setElementAttributes(options, text);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(label)) {
            text.textContent = label;
        }
        return text;
    };
    /**
     * To create a tSpan
     * @param {TextAttributes} options - Options to create tSpan
     * @param {string} label - The text content which is to be rendered in the tSpan
     * @return {Element}
     */
    SvgRenderer.prototype.createTSpan = function (options, label) {
        var tSpan = document.createElementNS(this.svgLink, 'tspan');
        tSpan = this.setElementAttributes(options, tSpan);
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(label)) {
            tSpan.textContent = label;
        }
        return tSpan;
    };
    /**
     * To create a title
     * @param {string} text - The text content which is to be rendered in the title
     * @return {Element}
     */
    SvgRenderer.prototype.createTitle = function (text) {
        var title = document.createElementNS(this.svgLink, 'title');
        title.textContent = text;
        return title;
    };
    /**
     * To create defs element in SVG
     * @return {Element}
     */
    SvgRenderer.prototype.createDefs = function () {
        var defs = document.createElementNS(this.svgLink, 'defs');
        return defs;
    };
    /**
     * To create clip path in SVG
     * @param {BaseAttibutes} options - Options needed to create clip path
     * @return {Element}
     */
    SvgRenderer.prototype.createClipPath = function (options) {
        var clipPath = document.createElementNS(this.svgLink, 'clipPath');
        clipPath = this.setElementAttributes(options, clipPath);
        return clipPath;
    };
    /**
     * To create foreign object in SVG
     * @param {BaseAttibutes} options - Options needed to create foreign object
     * @return {Element}
     */
    SvgRenderer.prototype.createForeignObject = function (options) {
        var foreignObject = document.createElementNS(this.svgLink, 'foreignObject');
        foreignObject = this.setElementAttributes(options, foreignObject);
        return foreignObject;
    };
    /**
     * To create group element in SVG
     * @param {BaseAttibutes} options - Options needed to create group
     * @return {Element}
     */
    SvgRenderer.prototype.createGroup = function (options) {
        var group = document.createElementNS(this.svgLink, 'g');
        group = this.setElementAttributes(options, group);
        return group;
    };
    /**
     * To create pattern in SVG
     * @param {PatternAttributes} options - Required options to create pattern in SVG
     * @param {string} type - Specifies the name of the pattern
     * @return {Element}
     */
    SvgRenderer.prototype.createPattern = function (options, element) {
        var pattern = document.createElementNS(this.svgLink, element);
        pattern = this.setElementAttributes(options, pattern);
        return pattern;
    };
    /**
     * To create radial gradient in SVG
     * @param {string[]} colors - Specifies the colors required to create radial gradient
     * @param {string[]} colorStop - Specifies the colorstop required to create radial gradient
     * @param {string} name - Specifies the name of the gradient
     * @param {RadialGradient} options - value for radial gradient
     * @return {string}
     */
    SvgRenderer.prototype.createRadialGradient = function (colors, name, options) {
        var colorName;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(colors[0].colorStop)) {
            var newOptions = {
                'id': this.rootId + '_' + name + 'radialGradient',
                'cx': options.cx + '%',
                'cy': options.cy + '%',
                'r': options.r + '%',
                'fx': options.fx + '%',
                'fy': options.fy + '%'
            };
            this.drawGradient('radialGradient', newOptions, colors);
            colorName = 'url(#' + this.rootId + '_' + name + 'radialGradient)';
        }
        else {
            colorName = colors[0].color.toString();
        }
        return colorName;
    };
    /**
     * To create linear gradient in SVG
     * @param {string[]} colors - Array of string specifies the values for color
     * @param {string[]} colors - Array of string specifies the values for colorStop
     * @param {string} name - Specifies the name of the gradient
     * @param {LinearGradient} options - Specifies the options for gradient
     * @return {string}
     */
    SvgRenderer.prototype.createLinearGradient = function (colors, name, options) {
        var colorName;
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(colors[0].colorStop)) {
            var newOptions = {
                'id': this.rootId + '_' + name + 'linearGradient',
                'x1': options.x1 + '%',
                'y1': options.y1 + '%',
                'x2': options.x2 + '%',
                'y2': options.y2 + '%'
            };
            this.drawGradient('linearGradient', newOptions, colors);
            colorName = 'url(#' + this.rootId + '_' + name + 'linearGradient)';
        }
        else {
            colorName = colors[0].color.toString();
        }
        return colorName;
    };
    /**
     * To render the gradient element in SVG
     * @param {string} gradientType - Specifies the type of the gradient
     * @param {RadialGradient | LinearGradient} options - Options required to render a gradient
     * @param {string[]} colors - Array of string specifies the values for color
     * @param {string[]} colorStop - Array of string specifies the values for colorStop
     * @return {Element}
     */
    SvgRenderer.prototype.drawGradient = function (gradientType, options, colors) {
        var defs = this.createDefs();
        var gradient = document.createElementNS(this.svgLink, gradientType);
        gradient = this.setElementAttributes(options, gradient);
        for (var i = 0; i < colors.length; i++) {
            var stop_1 = document.createElementNS(this.svgLink, 'stop');
            stop_1.setAttribute('offset', colors[i].colorStop);
            stop_1.setAttribute('stop-color', colors[i].color);
            stop_1.setAttribute('stop-opacity', '1');
            gradient.appendChild(stop_1);
        }
        defs.appendChild(gradient);
        return defs;
    };
    /**
     * To render a clip path
     * @param {BaseAttibutes} options - Options required to render a clip path
     * @return {Element}
     */
    SvgRenderer.prototype.drawClipPath = function (options) {
        var defs = this.createDefs();
        var clipPath = this.createClipPath({ 'id': options.id });
        options.id = options.id + '_Rect';
        var rect = this.drawRectangle(options);
        clipPath.appendChild(rect);
        defs.appendChild(clipPath);
        return defs;
    };
    /**
     * To create circular clip path in SVG
     * @param {CircleAttributes} options - Options required to create circular clip path
     * @return {Element}
     */
    SvgRenderer.prototype.drawCircularClipPath = function (options) {
        var defs = this.createDefs();
        var clipPath = this.createClipPath({ 'id': options.id });
        options.id = options.id + '_Circle';
        var circle = this.drawCircle(options);
        clipPath.appendChild(circle);
        defs.appendChild(clipPath);
        return defs;
    };
    /**
     * To set the attributes to the element
     * @param {SVGCanvasAttributes} options - Attributes to set for the element
     * @param {Element} element - The element to which the attributes need to be set
     * @return {Element}
     */
    SvgRenderer.prototype.setElementAttributes = function (options, element) {
        var keys = Object.keys(options);
        for (var i = 0; i < keys.length; i++) {
            element.setAttribute(keys[i], options[keys[i]]);
        }
        return element;
    };
    /**
     * To create a Html5 canvas element
     * Dummy method for using canvas/svg render in the same variable name in chart control
     * @param {BaseAttibutes} options - Options to create canvas
     * @return {HTMLCanvasElement}
     */
    SvgRenderer.prototype.createCanvas = function (options) {
        return null;
    };
    return SvgRenderer;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/helper.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-svg-base/src/tooltip/helper.js ***!
  \*********************************************************************/
/*! exports provided: measureText, findDirection, Size, Rect, Side, CustomizeOption, TextOption, getElement, removeElement, drawSymbol, calculateShapes, PathOption, textElement, TooltipLocation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "measureText", function() { return measureText; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findDirection", function() { return findDirection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Size", function() { return Size; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return Rect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Side", function() { return Side; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomizeOption", function() { return CustomizeOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextOption", function() { return TextOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return getElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return removeElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawSymbol", function() { return drawSymbol; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateShapes", function() { return calculateShapes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PathOption", function() { return PathOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textElement", function() { return textElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipLocation", function() { return TooltipLocation; });
/* harmony import */ var _svg_render_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../svg-render/index */ "./node_modules/@syncfusion/ej2-svg-base/src/svg-render/index.js");
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


/**
 * Function to measure the height and width of the text.
 * @param  {string} text
 * @param  {FontModel} font
 * @param  {string} id
 * @returns no
 * @private
 */
function measureText(text, font) {
    var breakText = text || ''; // For avoid NuLL value
    var htmlObject = document.getElementById('chartmeasuretext');
    if (htmlObject === null) {
        htmlObject = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["createElement"])('text', { id: 'chartmeasuretext' });
        document.body.appendChild(htmlObject);
    }
    if (typeof (text) === 'string' && (text.indexOf('<') > -1 || text.indexOf('>') > -1)) {
        var textArray = text.split(' ');
        for (var i = 0; i < textArray.length; i++) {
            if (textArray[i].indexOf('<br/>') === -1) {
                textArray[i] = textArray[i].replace(/[<>]/g, '&');
            }
        }
        text = textArray.join(' ');
    }
    htmlObject.innerHTML = (breakText.indexOf('<br>') > -1) ? breakText : text;
    htmlObject.style.position = 'fixed';
    htmlObject.style.fontSize = font.size;
    htmlObject.style.fontWeight = font.fontWeight;
    htmlObject.style.fontStyle = font.fontStyle;
    htmlObject.style.fontFamily = font.fontFamily;
    htmlObject.style.visibility = 'hidden';
    htmlObject.style.top = '-100';
    htmlObject.style.left = '0';
    htmlObject.style.whiteSpace = 'nowrap';
    // For bootstrap line height issue
    htmlObject.style.lineHeight = 'normal';
    return new Size(htmlObject.clientWidth, htmlObject.clientHeight);
}
/** @private */
function findDirection(rX, rY, rect, arrowLocation, arrowPadding, top, bottom, left, tipX, tipY, tipRadius) {
    var direction = '';
    var startX = rect.x;
    var startY = rect.y;
    var width = rect.x + rect.width;
    var height = rect.y + rect.height;
    tipRadius = tipRadius ? tipRadius : 0;
    if (top) {
        direction = direction.concat('M' + ' ' + (startX) + ' ' + (startY + rY) + ' Q ' + startX + ' '
            + startY + ' ' + (startX + rX) + ' ' + startY + ' ' +
            ' L' + ' ' + (width - rX) + ' ' + (startY) + ' Q ' + width + ' '
            + startY + ' ' + (width) + ' ' + (startY + rY));
        direction = direction.concat(' L' + ' ' + (width) + ' ' + (height - rY) + ' Q ' + width + ' '
            + (height) + ' ' + (width - rX) + ' ' + (height));
        if (arrowPadding !== 0) {
            direction = direction.concat(' L' + ' ' + (arrowLocation.x + arrowPadding / 2) + ' ' + (height));
            direction = direction.concat(' L' + ' ' + (tipX + tipRadius) + ' ' + (height + arrowPadding - tipRadius));
            direction += ' Q' + ' ' + (tipX) + ' ' + (height + arrowPadding) + ' ' + (tipX - tipRadius) +
                ' ' + (height + arrowPadding - tipRadius);
        }
        if ((arrowLocation.x - arrowPadding / 2) > startX) {
            direction = direction.concat(' L' + ' ' + (arrowLocation.x - arrowPadding / 2) + ' ' + height +
                ' L' + ' ' + (startX + rX) + ' ' + height + ' Q ' + startX + ' '
                + height + ' ' + (startX) + ' ' + (height - rY) + ' z');
        }
        else {
            if (arrowPadding === 0) {
                direction = direction.concat(' L' + ' ' + (startX + rX) + ' ' + height + ' Q ' + startX + ' '
                    + height + ' ' + (startX) + ' ' + (height - rY) + ' z');
            }
            else {
                direction = direction.concat(' L' + ' ' + (startX) + ' ' + (height + rY) + ' z');
            }
        }
    }
    else if (bottom) {
        direction = direction.concat('M' + ' ' + (startX) + ' ' + (startY + rY) + ' Q ' + startX + ' '
            + (startY) + ' ' + (startX + rX) + ' ' + (startY) + ' L' + ' ' + (arrowLocation.x - arrowPadding / 2) + ' ' + (startY));
        direction = direction.concat(' L' + ' ' + (tipX - tipRadius) + ' ' + (arrowLocation.y + tipRadius));
        direction += ' Q' + ' ' + (tipX) + ' ' + (arrowLocation.y) + ' ' + (tipX + tipRadius) + ' ' + (arrowLocation.y + tipRadius);
        direction = direction.concat(' L' + ' ' + (arrowLocation.x + arrowPadding / 2) + ' ' + (startY) + ' L' + ' '
            + (width - rX) + ' ' + (startY) + ' Q ' + (width) + ' ' + (startY) + ' ' + (width) + ' ' + (startY + rY));
        direction = direction.concat(' L' + ' ' + (width) + ' ' + (height - rY) + ' Q ' + (width) + ' '
            + (height) + ' ' + (width - rX) + ' ' + (height) +
            ' L' + ' ' + (startX + rX) + ' ' + (height) + ' Q ' + (startX) + ' '
            + (height) + ' ' + (startX) + ' ' + (height - rY) + ' z');
    }
    else if (left) {
        direction = direction.concat('M' + ' ' + (startX) + ' ' + (startY + rY) + ' Q ' + startX + ' '
            + (startY) + ' ' + (startX + rX) + ' ' + (startY));
        direction = direction.concat(' L' + ' ' + (width - rX) + ' ' + (startY) + ' Q ' + (width) + ' '
            + (startY) + ' ' + (width) + ' ' + (startY + rY) + ' L' + ' ' + (width) + ' ' + (arrowLocation.y - arrowPadding / 2));
        direction = direction.concat(' L' + ' ' + (width + arrowPadding - tipRadius) + ' ' + (tipY - tipRadius));
        direction += ' Q ' + (width + arrowPadding) + ' ' + (tipY) + ' ' + (width + arrowPadding - tipRadius) + ' ' + (tipY + tipRadius);
        direction = direction.concat(' L' + ' ' + (width) + ' ' + (arrowLocation.y + arrowPadding / 2) +
            ' L' + ' ' + (width) + ' ' + (height - rY) + ' Q ' + width + ' ' + (height) + ' ' + (width - rX) + ' ' + (height));
        direction = direction.concat(' L' + ' ' + (startX + rX) + ' ' + (height) + ' Q ' + startX + ' '
            + (height) + ' ' + (startX) + ' ' + (height - rY) + ' z');
    }
    else {
        direction = direction.concat('M' + ' ' + (startX + rX) + ' ' + (startY) + ' Q ' + (startX) + ' '
            + (startY) + ' ' + (startX) + ' ' + (startY + rY) + ' L' + ' ' + (startX) + ' ' + (arrowLocation.y - arrowPadding / 2));
        direction = direction.concat(' L' + ' ' + (startX - arrowPadding + tipRadius) + ' ' + (tipY - tipRadius));
        direction += ' Q ' + (startX - arrowPadding) + ' ' + (tipY) + ' ' + (startX - arrowPadding + tipRadius) + ' ' + (tipY + tipRadius);
        direction = direction.concat(' L' + ' ' + (startX) + ' ' + (arrowLocation.y + arrowPadding / 2) +
            ' L' + ' ' + (startX) + ' ' + (height - rY) + ' Q ' + startX + ' '
            + (height) + ' ' + (startX + rX) + ' ' + (height));
        direction = direction.concat(' L' + ' ' + (width - rX) + ' ' + (height) + ' Q ' + width + ' '
            + (height) + ' ' + (width) + ' ' + (height - rY) +
            ' L' + ' ' + (width) + ' ' + (startY + rY) + ' Q ' + width + ' '
            + (startY) + ' ' + (width - rX) + ' ' + (startY) + ' z');
    }
    return direction;
}
/** @private */
var Size = /** @class */ (function () {
    function Size(width, height) {
        this.width = width;
        this.height = height;
    }
    return Size;
}());

/** @private */
var Rect = /** @class */ (function () {
    function Rect(x, y, width, height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }
    return Rect;
}());

var Side = /** @class */ (function () {
    function Side(bottom, right) {
        this.isRight = right;
        this.isBottom = bottom;
    }
    return Side;
}());

/** @private */
var CustomizeOption = /** @class */ (function () {
    function CustomizeOption(id) {
        this.id = id;
    }
    return CustomizeOption;
}());

/** @private */
var TextOption = /** @class */ (function (_super) {
    __extends(TextOption, _super);
    function TextOption(id, x, y, anchor, text, transform, baseLine, labelRotation) {
        if (transform === void 0) { transform = ''; }
        var _this = _super.call(this, id) || this;
        _this.transform = '';
        _this.baseLine = 'auto';
        _this.labelRotation = 0;
        _this.x = x;
        _this.y = y;
        _this.anchor = anchor;
        _this.text = text;
        _this.transform = transform;
        _this.baseLine = baseLine;
        _this.labelRotation = labelRotation;
        return _this;
    }
    return TextOption;
}(CustomizeOption));

/** @private */
function getElement(id) {
    return document.getElementById(id);
}
/** @private */
function removeElement(id) {
    var element = getElement(id);
    if (element) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["remove"])(element);
    }
}
/** @private */
function drawSymbol(location, shape, size, url, options, label) {
    var functionName = 'Path';
    var renderer = new _svg_render_index__WEBPACK_IMPORTED_MODULE_0__["SvgRenderer"]('');
    var temp = calculateShapes(location, size, shape, options, url);
    var htmlObject = renderer['draw' + temp.functionName](temp.renderOption);
    htmlObject.setAttribute('aria-label', label);
    return htmlObject;
}
/** @private */
function calculateShapes(location, size, shape, options, url) {
    var path;
    var functionName = 'Path';
    var width = size.width;
    var height = size.height;
    var locX = location.x;
    var locY = location.y;
    var x = location.x + (-width / 2);
    var y = location.y + (-height / 2);
    switch (shape) {
        case 'Circle':
        case 'Bubble':
            functionName = 'Ellipse';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'rx': width / 2, 'ry': height / 2, 'cx': locX, 'cy': locY });
            break;
        case 'Cross':
            path = 'M' + ' ' + x + ' ' + locY + ' ' + 'L' + ' ' + (locX + (width / 2)) + ' ' + locY + ' ' +
                'M' + ' ' + locX + ' ' + (locY + (height / 2)) + ' ' + 'L' + ' ' + locX + ' ' +
                (locY + (-height / 2));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'd': path });
            break;
        case 'HorizontalLine':
            path = 'M' + ' ' + x + ' ' + locY + ' ' + 'L' + ' ' + (locX + (width / 2)) + ' ' + locY;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'd': path });
            break;
        case 'VerticalLine':
            path = 'M' + ' ' + locX + ' ' + (locY + (height / 2)) + ' ' + 'L' + ' ' + locX + ' ' + (locY + (-height / 2));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'd': path });
            break;
        case 'Diamond':
            path = 'M' + ' ' + x + ' ' + locY + ' ' +
                'L' + ' ' + locX + ' ' + (locY + (-height / 2)) + ' ' +
                'L' + ' ' + (locX + (width / 2)) + ' ' + locY + ' ' +
                'L' + ' ' + locX + ' ' + (locY + (height / 2)) + ' ' +
                'L' + ' ' + x + ' ' + locY + ' z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'd': path });
            break;
        case 'Rectangle':
            path = 'M' + ' ' + x + ' ' + (locY + (-height / 2)) + ' ' +
                'L' + ' ' + (locX + (width / 2)) + ' ' + (locY + (-height / 2)) + ' ' +
                'L' + ' ' + (locX + (width / 2)) + ' ' + (locY + (height / 2)) + ' ' +
                'L' + ' ' + x + ' ' + (locY + (height / 2)) + ' ' +
                'L' + ' ' + x + ' ' + (locY + (-height / 2)) + ' z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'd': path });
            break;
        case 'Triangle':
            path = 'M' + ' ' + x + ' ' + (locY + (height / 2)) + ' ' +
                'L' + ' ' + locX + ' ' + (locY + (-height / 2)) + ' ' +
                'L' + ' ' + (locX + (width / 2)) + ' ' + (locY + (height / 2)) + ' ' +
                'L' + ' ' + x + ' ' + (locY + (height / 2)) + ' z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'd': path });
            break;
        case 'InvertedTriangle':
            path = 'M' + ' ' + (locX + (width / 2)) + ' ' + (locY - (height / 2)) + ' ' +
                'L' + ' ' + locX + ' ' + (locY + (height / 2)) + ' ' +
                'L' + ' ' + (locX - (width / 2)) + ' ' + (locY - (height / 2)) + ' ' +
                'L' + ' ' + (locX + (width / 2)) + ' ' + (locY - (height / 2)) + ' z';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'd': path });
            break;
        case 'Pentagon':
            var eq = 72;
            var xValue = void 0;
            var yValue = void 0;
            for (var i = 0; i <= 5; i++) {
                xValue = (width / 2) * Math.cos((Math.PI / 180) * (i * eq));
                yValue = (height / 2) * Math.sin((Math.PI / 180) * (i * eq));
                if (i === 0) {
                    path = 'M' + ' ' + (locX + xValue) + ' ' + (locY + yValue) + ' ';
                }
                else {
                    path = path.concat('L' + ' ' + (locX + xValue) + ' ' + (locY + yValue) + ' ');
                }
            }
            path = path.concat('Z');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'd': path });
            break;
        case 'Image':
            functionName = 'Image';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["merge"])(options, { 'href': url, 'height': height, 'width': width, x: x, y: y });
            break;
    }
    return { renderOption: options, functionName: functionName };
}
/** @private */
var PathOption = /** @class */ (function (_super) {
    __extends(PathOption, _super);
    function PathOption(id, fill, width, color, opacity, dashArray, d) {
        var _this = _super.call(this, id) || this;
        _this.opacity = opacity;
        _this.fill = fill;
        _this.stroke = color;
        _this['stroke-width'] = width;
        _this['stroke-dasharray'] = dashArray;
        _this.d = d;
        return _this;
    }
    return PathOption;
}(CustomizeOption));

/** @private */
function textElement(options, font, color, parent) {
    var renderOptions = {};
    var htmlObject;
    var tspanElement;
    var renderer = new _svg_render_index__WEBPACK_IMPORTED_MODULE_0__["SvgRenderer"]('');
    var text;
    var height;
    renderOptions = {
        'id': options.id,
        'x': options.x,
        'y': options.y,
        'fill': color,
        'font-size': font.size,
        'font-style': font.fontStyle,
        'font-family': font.fontFamily,
        'font-weight': font.fontWeight,
        'text-anchor': options.anchor,
        'transform': options.transform,
        'opacity': font.opacity,
        'dominant-baseline': options.baseLine
    };
    text = typeof options.text === 'string' ? options.text : options.text[0];
    htmlObject = renderer.createText(renderOptions, text);
    parent.appendChild(htmlObject);
    return htmlObject;
}
var TooltipLocation = /** @class */ (function () {
    function TooltipLocation(x, y) {
        this.x = x;
        this.y = y;
    }
    return TooltipLocation;
}());



/***/ }),

/***/ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/index.js":
/*!********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-svg-base/src/tooltip/index.js ***!
  \********************************************************************/
/*! exports provided: TextStyle, TooltipBorder, AreaBounds, ToolLocation, Tooltip, getTooltipThemeColor, measureText, findDirection, Size, Rect, Side, CustomizeOption, TextOption, getElement, removeElement, drawSymbol, calculateShapes, PathOption, textElement, TooltipLocation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tooltip */ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/tooltip.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextStyle", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipBorder", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_0__["TooltipBorder"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AreaBounds", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_0__["AreaBounds"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ToolLocation", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_0__["ToolLocation"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_0__["Tooltip"]; });

/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interface */ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/interface.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTooltipThemeColor", function() { return _interface__WEBPACK_IMPORTED_MODULE_1__["getTooltipThemeColor"]; });

/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helper */ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/helper.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "measureText", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["measureText"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findDirection", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["findDirection"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Size", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["Size"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["Rect"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Side", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["Side"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomizeOption", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["CustomizeOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextOption", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["TextOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["getElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "removeElement", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["removeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drawSymbol", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["drawSymbol"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "calculateShapes", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["calculateShapes"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PathOption", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["PathOption"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textElement", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["textElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipLocation", function() { return _helper__WEBPACK_IMPORTED_MODULE_2__["TooltipLocation"]; });

/**
 * Chart component exported items
 */





/***/ }),

/***/ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/interface.js":
/*!************************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-svg-base/src/tooltip/interface.js ***!
  \************************************************************************/
/*! exports provided: getTooltipThemeColor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTooltipThemeColor", function() { return getTooltipThemeColor; });
/** @private */
function getTooltipThemeColor(theme) {
    var style;
    switch (theme) {
        case 'Highcontrast':
        case 'HighContrast':
            style = {
                tooltipFill: '#ffffff',
                tooltipBoldLabel: '#000000',
                tooltipLightLabel: '#000000',
                tooltipHeaderLine: '#969696'
            };
            break;
        case 'MaterialDark':
        case 'FabricDark':
        case 'BootstrapDark':
            style = {
                tooltipFill: '#F4F4F4',
                tooltipBoldLabel: '#282727',
                tooltipLightLabel: '#333232',
                tooltipHeaderLine: '#9A9A9A'
            };
            break;
        case 'Bootstrap4':
            style = {
                tooltipFill: 'rgba(0, 0, 0, 0.9)',
                tooltipBoldLabel: 'rgba(255, 255, 255)',
                tooltipLightLabel: 'rgba(255, 255, 255, 0.9)',
                tooltipHeaderLine: 'rgba(255, 255, 255, 0.2)'
            };
            break;
        default:
            style = {
                tooltipFill: 'rgba(0, 8, 22, 0.75)',
                tooltipBoldLabel: '#ffffff',
                tooltipLightLabel: '#dbdbdb',
                tooltipHeaderLine: '#ffffff'
            };
            break;
    }
    return style;
}


/***/ }),

/***/ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/tooltip.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@syncfusion/ej2-svg-base/src/tooltip/tooltip.js ***!
  \**********************************************************************/
/*! exports provided: TextStyle, TooltipBorder, AreaBounds, ToolLocation, Tooltip */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextStyle", function() { return TextStyle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipBorder", function() { return TooltipBorder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AreaBounds", function() { return AreaBounds; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToolLocation", function() { return ToolLocation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return Tooltip; });
/* harmony import */ var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @syncfusion/ej2-base */ "./node_modules/@syncfusion/ej2-base/index.js");
/* harmony import */ var _svg_render_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../svg-render/index */ "./node_modules/@syncfusion/ej2-svg-base/src/svg-render/index.js");
/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interface */ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/interface.js");
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helper */ "./node_modules/@syncfusion/ej2-svg-base/src/tooltip/helper.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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;
};







/**
 * Configures the fonts in charts.
 * @private
 */
var TextStyle = /** @class */ (function (_super) {
    __extends(TextStyle, _super);
    function TextStyle() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], TextStyle.prototype, "size", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], TextStyle.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Segoe UI')
    ], TextStyle.prototype, "fontFamily", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Normal')
    ], TextStyle.prototype, "fontWeight", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Normal')
    ], TextStyle.prototype, "fontStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], TextStyle.prototype, "opacity", void 0);
    return TextStyle;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the borders in the chart.
 * @private
 */
var TooltipBorder = /** @class */ (function (_super) {
    __extends(TooltipBorder, _super);
    function TooltipBorder() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], TooltipBorder.prototype, "color", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)
    ], TooltipBorder.prototype, "width", void 0);
    return TooltipBorder;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the borders in the chart.
 * @private
 */
var AreaBounds = /** @class */ (function (_super) {
    __extends(AreaBounds, _super);
    function AreaBounds() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], AreaBounds.prototype, "x", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], AreaBounds.prototype, "y", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], AreaBounds.prototype, "width", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], AreaBounds.prototype, "height", void 0);
    return AreaBounds;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Configures the borders in the chart.
 * @private
 */
var ToolLocation = /** @class */ (function (_super) {
    __extends(ToolLocation, _super);
    function ToolLocation() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], ToolLocation.prototype, "x", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], ToolLocation.prototype, "y", void 0);
    return ToolLocation;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]));

/**
 * Represents the Tooltip control.
 * ```html
 * <div id="tooltip"/>
 * <script>
 *   var tooltipObj = new Tooltip({ isResponsive : true });
 *   tooltipObj.appendTo("#tooltip");
 * </script>
 * ```
 * @private
 */
var Tooltip = /** @class */ (function (_super) {
    __extends(Tooltip, _super);
    /**
     * Constructor for creating the widget
     * @hidden
     */
    function Tooltip(options, element) {
        return _super.call(this, options, element) || this;
    }
    /**
     * Initialize the event handler.
     *  @private.
     */
    Tooltip.prototype.preRender = function () {
        this.initPrivateVariable();
        if (!this.isCanvas) {
            this.removeSVG();
        }
        this.createTooltipElement();
    };
    Tooltip.prototype.initPrivateVariable = function () {
        this.renderer = new _svg_render_index__WEBPACK_IMPORTED_MODULE_1__["SvgRenderer"](this.element.id);
        this.themeStyle = Object(_interface__WEBPACK_IMPORTED_MODULE_2__["getTooltipThemeColor"])(this.theme);
        this.formattedText = [];
        this.padding = 5;
        this.isFirst = true;
        this.markerPoint = [];
    };
    Tooltip.prototype.removeSVG = function () {
        var svgObject = document.getElementById(this.element.id + '_svg');
        var templateObject = document.getElementById(this.element.id + 'parent_template');
        if (svgObject && svgObject.parentNode) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(svgObject);
        }
        if (templateObject && templateObject.parentNode) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(templateObject);
        }
    };
    /**
     * To Initialize the control rendering.
     */
    Tooltip.prototype.render = function () {
        this.fadeOuted = false;
        if (!this.template) {
            this.renderText(this.isFirst);
            var argsData = {
                cancel: false, name: 'tooltipRender', tooltip: this
            };
            this.trigger('tooltipRender', argsData);
            var markerSide = this.renderTooltipElement(this.areaBounds, this.location);
            this.drawMarker(markerSide.isBottom, markerSide.isRight, this.markerSize);
        }
        else {
            this.updateTemplateFn();
            this.createTemplate(this.areaBounds, this.location);
        }
        this.trigger('loaded', { tooltip: this });
        var element = document.getElementById('chartmeasuretext');
        if (element) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element);
        }
    };
    Tooltip.prototype.createTooltipElement = function () {
        this.textElements = [];
        if (!this.template || this.shared) {
            // SVG element for tooltip
            var svgObject = this.renderer.createSvg({ id: this.element.id + '_svg' });
            this.element.appendChild(svgObject);
            // Group to hold text and path.
            var groupElement = document.getElementById(this.element.id + '_group');
            if (!groupElement) {
                groupElement = this.renderer.createGroup({ id: this.element.id + '_group' });
                groupElement.setAttribute('transform', 'translate(0,0)');
            }
            svgObject.appendChild(groupElement);
            var pathElement = this.renderer.drawPath({
                'id': this.element.id + '_path', 'stroke-width': this.theme === 'Bootstrap4' ? 0 : this.border.width,
                'fill': this.fill || this.themeStyle.tooltipFill, 'opacity': this.theme === 'Bootstrap4' ? 0.9 : this.opacity,
                'stroke': this.border.color
            });
            groupElement.appendChild(pathElement);
        }
    };
    Tooltip.prototype.drawMarker = function (isBottom, isRight, size) {
        if (this.shapes.length <= 0) {
            return null;
        }
        var shapeOption;
        var count = 0;
        var markerGroup = this.renderer.createGroup({ id: this.element.id + '_trackball_group' });
        var groupElement = Object(_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.element.id + '_group');
        var x = (this.marginX * 2) + (size / 2) + (isRight ? this.arrowPadding : 0);
        for (var _i = 0, _a = this.shapes; _i < _a.length; _i++) {
            var shape = _a[_i];
            shapeOption = new _helper__WEBPACK_IMPORTED_MODULE_3__["PathOption"](this.element.id + '_Trackball_' + count, this.palette[count], 1, '#cccccc', 1, null);
            if (this.markerPoint[count]) {
                markerGroup.appendChild(Object(_helper__WEBPACK_IMPORTED_MODULE_3__["drawSymbol"])(new _helper__WEBPACK_IMPORTED_MODULE_3__["TooltipLocation"](x, this.markerPoint[count] - this.padding + (isBottom ? this.arrowPadding : 0)), shape, new _helper__WEBPACK_IMPORTED_MODULE_3__["Size"](size, size), '', shapeOption, null));
            }
            count++;
        }
        groupElement.appendChild(markerGroup);
    };
    Tooltip.prototype.renderTooltipElement = function (areaBounds, location) {
        var tooltipDiv = Object(_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.element.id);
        var arrowLocation = new _helper__WEBPACK_IMPORTED_MODULE_3__["TooltipLocation"](0, 0);
        var tipLocation = new _helper__WEBPACK_IMPORTED_MODULE_3__["TooltipLocation"](0, 0);
        var textHeights;
        var svgObject = Object(_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.element.id + '_svg');
        var groupElement = Object(_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.element.id + '_group');
        var pathElement = Object(_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.element.id + '_path');
        var rect;
        var isTop = false;
        var isLeft = false;
        var isBottom = false;
        var x = 0;
        var y = 0;
        this.tipRadius = 1;
        if (this.header !== '') {
            this.elementSize.height += this.marginY;
        }
        if (this.content.length > 1) {
            rect = this.sharedTooltipLocation(areaBounds, this.location.x, this.location.y);
            isTop = true;
        }
        else {
            rect = this.tooltipLocation(areaBounds, location, arrowLocation, tipLocation);
            if (!this.inverted) {
                isTop = (rect.y < (location.y + this.clipBounds.y));
                isBottom = !isTop;
                y = (isTop ? 0 : this.arrowPadding);
            }
            else {
                isLeft = (rect.x < (location.x + this.clipBounds.x));
                x = (isLeft ? 0 : this.arrowPadding);
            }
        }
        if (this.header !== '') {
            var headerSize = Object(_helper__WEBPACK_IMPORTED_MODULE_3__["measureText"])(this.header, this.textStyle).height + (this.marginY * 2) +
                (isBottom ? this.arrowPadding : 0); //header padding;
            var xLength = (this.marginX * 3) + (!isLeft && !isTop && !isBottom ? this.arrowPadding : 0);
            var direction = 'M ' + xLength + ' ' + headerSize +
                'L ' + (rect.width + (!isLeft && !isTop && !isBottom ? this.arrowPadding : 0) - (this.marginX * 2)) +
                ' ' + headerSize;
            var pathElement_1 = this.renderer.drawPath({
                'id': this.element.id + '_header_path', 'stroke-width': 1,
                'fill': null, 'opacity': 0.8, 'stroke': this.themeStyle.tooltipHeaderLine, 'd': direction
            });
            groupElement.appendChild(pathElement_1);
        }
        var start = this.border.width / 2;
        var pointRect = new _helper__WEBPACK_IMPORTED_MODULE_3__["Rect"](start + x, start + y, rect.width - start, rect.height - start);
        groupElement.setAttribute('opacity', '1');
        if (this.enableAnimation && !this.shared && !this.isFirst) {
            this.animateTooltipDiv(tooltipDiv, rect);
        }
        else {
            this.updateDiv(tooltipDiv, rect.x, rect.y);
        }
        svgObject.setAttribute('height', (rect.height + this.border.width + (!((!this.inverted)) ? 0 : this.arrowPadding) + 5).toString());
        svgObject.setAttribute('width', (rect.width + this.border.width + (((!this.inverted)) ? 0 : this.arrowPadding) + 5).toString());
        svgObject.setAttribute('opacity', '1');
        pathElement.setAttribute('d', Object(_helper__WEBPACK_IMPORTED_MODULE_3__["findDirection"])(this.rx, this.ry, pointRect, arrowLocation, this.arrowPadding, isTop, isBottom, isLeft, tipLocation.x, tipLocation.y, this.tipRadius));
        if (this.enableShadow && this.theme !== 'Bootstrap4') {
            // To fix next chart initial tooltip opacity issue in tab control
            var shadowId = this.element.id + '_shadow';
            pathElement.setAttribute('filter', _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE ? '' : 'url(#' + shadowId + ')');
            var shadow = '<filter id="' + shadowId + '" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';
            shadow += '<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>';
            shadow += '</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';
            var defElement = this.renderer.createDefs();
            defElement.setAttribute('id', this.element.id + 'SVG_tooltip_definition');
            groupElement.appendChild(defElement);
            defElement.innerHTML = shadow;
        }
        pathElement.setAttribute('stroke', this.border.color);
        this.changeText(new _helper__WEBPACK_IMPORTED_MODULE_3__["TooltipLocation"](x, y), isBottom, !isLeft && !isTop && !isBottom, rect);
        return new _helper__WEBPACK_IMPORTED_MODULE_3__["Side"](isBottom, !isLeft && !isTop && !isBottom);
    };
    Tooltip.prototype.changeText = function (point, isBottom, isRight, rect) {
        var element = document.getElementById(this.element.id + '_text');
        if (isBottom) {
            element.setAttribute('transform', 'translate(0,' + this.arrowPadding + ')');
        }
        if (isRight) {
            element.setAttribute('transform', 'translate(' + this.arrowPadding + ' 0)');
        }
    };
    Tooltip.prototype.findFormattedText = function () {
        this.formattedText = [];
        if (this.header.replace(/<b>/g, '').replace(/<\/b>/g, '').trim() !== '') {
            this.formattedText = this.formattedText.concat(this.header);
        }
        this.formattedText = this.formattedText.concat(this.content);
    };
    Tooltip.prototype.renderText = function (isRender) {
        var height = 0;
        var width = 0; // Padding for text;
        var subWidth = 0;
        var size;
        var lines;
        var key = 'properties';
        var font = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, this.textStyle, null, true)[key];
        var groupElement = Object(_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.element.id + '_group');
        var tspanElement;
        var tspanStyle = '';
        var line;
        var tspanOption;
        this.findFormattedText();
        var headerContent = this.header.replace(/<b>/g, '').replace(/<\/b>/g, '').trim();
        var headerSpace = (headerContent !== '') ? this.marginY : 0;
        var isRow = true;
        var isColumn = true;
        this.markerPoint = [];
        var markerSize = (this.shapes.length > 0) ? 10 : 0;
        var markerPadding = (this.shapes.length > 0) ? 5 : 0;
        var spaceWidth = 4;
        var fontSize = '13px';
        var fontWeight = 'Normal';
        var labelColor = this.themeStyle.tooltipLightLabel;
        var dy = (22 / parseFloat(fontSize)) * (parseFloat(font.size));
        if (!isRender || this.isCanvas) {
            Object(_helper__WEBPACK_IMPORTED_MODULE_3__["removeElement"])(this.element.id + '_text');
            Object(_helper__WEBPACK_IMPORTED_MODULE_3__["removeElement"])(this.element.id + '_header_path');
            Object(_helper__WEBPACK_IMPORTED_MODULE_3__["removeElement"])(this.element.id + '_trackball_group');
            Object(_helper__WEBPACK_IMPORTED_MODULE_3__["removeElement"])(this.element.id + 'SVG_tooltip_definition');
        }
        var options = new _helper__WEBPACK_IMPORTED_MODULE_3__["TextOption"](this.element.id + '_text', this.marginX * 2, (this.marginY * 2 + this.padding * 2 + (this.marginY === 2 ? 3 : 0)), 'start', '');
        var parentElement = Object(_helper__WEBPACK_IMPORTED_MODULE_3__["textElement"])(options, font, null, groupElement);
        for (var k = 0, pointsLength = this.formattedText.length; k < pointsLength; k++) {
            var textCollection = this.formattedText[k].replace(/<(b|strong)>/g, '<b>')
                .replace(/<\/(b|strong)>/g, '</b>')
                .split(/<br.*?>/g);
            if (textCollection[0] === '') {
                continue;
            }
            size = Object(_helper__WEBPACK_IMPORTED_MODULE_3__["measureText"])(this.formattedText[k], font);
            if ((k !== 0) || (headerContent === '')) {
                this.markerPoint.push((headerContent !== '' ? (this.marginY) : 0) + options.y + height);
            }
            for (var i = 0, len = textCollection.length; i < len; i++) { // string value of unicode for LTR is \u200E
                lines = textCollection[i].replace(/<b>/g, '<br><b>').replace(/<\/b>/g, '</b><br>').replace(/:/g, '<br>\u200E:<br>')
                    .split('<br>');
                subWidth = 0;
                isColumn = true;
                height += dy;
                for (var k_1 = 0, len_1 = lines.length; k_1 < len_1; k_1++) {
                    line = lines[k_1];
                    if (!/\S/.test(line) && line !== '') {
                        line = ' '; //to trim multiple white spaces to single white space
                    }
                    if ((!isColumn && line === ' ') || (line.replace(/<b>/g, '').replace(/<\/b>/g, '').trim() !== '')) {
                        subWidth += line !== ' ' ? spaceWidth : 0;
                        if (isColumn && !isRow) {
                            tspanOption = { x: (this.marginX * 2) + (markerSize + markerPadding),
                                dy: dy + ((isColumn) ? headerSpace : 0), fill: '' };
                            headerSpace = null;
                        }
                        else {
                            if (isRow && isColumn) {
                                tspanOption = { x: (headerContent === '') ? ((this.marginX * 2) + (markerSize + markerPadding))
                                        : (this.marginX * 2) };
                            }
                            else {
                                tspanOption = {};
                            }
                        }
                        isColumn = false;
                        tspanElement = this.renderer.createTSpan(tspanOption, '');
                        parentElement.appendChild(tspanElement);
                        if (line.indexOf('<b>') > -1) {
                            fontWeight = 'bold';
                            labelColor = this.themeStyle.tooltipBoldLabel;
                            tspanStyle = 'font-weight:' + fontWeight;
                            font.fontWeight = fontWeight;
                            (tspanElement).setAttribute('fill', this.textStyle.color || labelColor);
                        }
                        else {
                            tspanStyle = fontWeight === 'bold' ? 'font-weight:' + fontWeight : '';
                            font.fontWeight = fontWeight;
                            (tspanElement).setAttribute('fill', this.textStyle.color || labelColor);
                        }
                        if (line.indexOf('</b>') > -1) {
                            fontWeight = 'Normal';
                            labelColor = this.themeStyle.tooltipLightLabel;
                        }
                        (tspanElement).textContent = line = line.replace(/<[a-zA-Z\/](.|\n)*?>/g, '');
                        subWidth += Object(_helper__WEBPACK_IMPORTED_MODULE_3__["measureText"])(line, font).width;
                        if (tspanStyle !== '') {
                            tspanElement.setAttribute('style', tspanStyle);
                        }
                        isRow = false;
                    }
                }
                subWidth -= spaceWidth;
                width = Math.max(width, subWidth);
            }
        }
        this.elementSize = new _helper__WEBPACK_IMPORTED_MODULE_3__["Size"](width + (width > 0 ? (2 * this.marginX) : 0), height);
        this.elementSize.width += (markerSize + markerPadding); // marker size + marker Spacing
        var element = (parentElement.childNodes[0]);
        if (headerContent !== '' && element) {
            font.fontWeight = 'bold';
            var width_1 = (this.elementSize.width + (2 * this.padding)) / 2 - Object(_helper__WEBPACK_IMPORTED_MODULE_3__["measureText"])(headerContent, font).width / 2;
            element.setAttribute('x', width_1.toString());
        }
    };
    Tooltip.prototype.createTemplate = function (areaBounds, location) {
        var argsData = { cancel: false, name: 'tooltipRender', tooltip: this };
        this.trigger('tooltipRender', argsData);
        var parent = document.getElementById(this.element.id);
        if (this.isCanvas) {
            this.removeSVG();
        }
        var firstElement = parent.firstElementChild;
        if (firstElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(firstElement);
        }
        if (!argsData.cancel) {
            var templateElement = this.templateFn(this.data);
            var elem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', { id: this.element.id + 'parent_template' });
            while (templateElement && templateElement.length > 0) {
                elem.appendChild(templateElement[0]);
            }
            parent.appendChild(elem);
            var element = this.isCanvas ? elem : this.element;
            var rect = element.getBoundingClientRect();
            this.padding = 0;
            this.elementSize = new _helper__WEBPACK_IMPORTED_MODULE_3__["Size"](rect.width, rect.height);
            var tooltipRect = this.tooltipLocation(areaBounds, location, new _helper__WEBPACK_IMPORTED_MODULE_3__["TooltipLocation"](0, 0), new _helper__WEBPACK_IMPORTED_MODULE_3__["TooltipLocation"](0, 0));
            if (this.enableAnimation && !this.shared && !this.isFirst) {
                this.animateTooltipDiv(this.element, tooltipRect);
            }
            else {
                this.updateDiv(element, tooltipRect.x, tooltipRect.y);
            }
        }
        else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.element.id + '_tooltip'));
        }
    };
    Tooltip.prototype.sharedTooltipLocation = function (bounds, x, y) {
        var width = this.elementSize.width + (2 * this.marginX);
        var height = this.elementSize.height + (2 * this.marginY);
        var tooltipRect = new _helper__WEBPACK_IMPORTED_MODULE_3__["Rect"](x + 2 * this.padding, y - height - this.padding, width, height);
        if (tooltipRect.y < bounds.y) {
            tooltipRect.y += (tooltipRect.height + 2 * this.padding);
        }
        if (tooltipRect.x + tooltipRect.width > bounds.x + bounds.width) {
            tooltipRect.x -= (tooltipRect.width + 4 * this.padding);
        }
        return tooltipRect;
    };
    Tooltip.prototype.tooltipLocation = function (bounds, symbolLocation, arrowLocation, tipLocation) {
        var location = new _helper__WEBPACK_IMPORTED_MODULE_3__["TooltipLocation"](symbolLocation.x, symbolLocation.y);
        var width = this.elementSize.width + (2 * this.marginX);
        var height = this.elementSize.height + (2 * this.marginY);
        var markerHeight = this.offset;
        var clipX = this.clipBounds.x;
        var clipY = this.clipBounds.y;
        var boundsX = bounds.x;
        var boundsY = bounds.y;
        if (!this.inverted) {
            location = new _helper__WEBPACK_IMPORTED_MODULE_3__["TooltipLocation"](location.x + clipX - this.elementSize.width / 2 - this.padding, location.y + clipY - this.elementSize.height - (2 * this.padding) - this.arrowPadding - markerHeight);
            arrowLocation.x = tipLocation.x = width / 2;
            if (location.y < boundsY || (this.isNegative)) {
                location.y = (symbolLocation.y < 0 ? 0 : symbolLocation.y) + clipY + markerHeight;
            }
            if (location.y + height + this.arrowPadding > boundsY + bounds.height) {
                location.y = (symbolLocation.y > bounds.height ? bounds.height : symbolLocation.y)
                    + clipY - this.elementSize.height - (2 * this.padding) - this.arrowPadding - markerHeight;
            }
            tipLocation.x = width / 2;
            if (location.x < boundsX) {
                arrowLocation.x -= (boundsX - location.x);
                tipLocation.x -= (boundsX - location.x);
                location.x = boundsX;
            }
            if (location.x + width > boundsX + bounds.width) {
                arrowLocation.x += ((location.x + width) - (boundsX + bounds.width));
                tipLocation.x += ((location.x + width) - (boundsX + bounds.width));
                location.x -= ((location.x + width) - (boundsX + bounds.width));
            }
            if (arrowLocation.x + this.arrowPadding / 2 > width - this.rx) {
                arrowLocation.x = width - this.rx - this.arrowPadding / 2;
                tipLocation.x = width;
                this.tipRadius = 0;
            }
            if (arrowLocation.x - this.arrowPadding / 2 < this.rx) {
                arrowLocation.x = this.rx + this.arrowPadding / 2;
                tipLocation.x = 0;
                this.tipRadius = 0;
            }
        }
        else {
            location = new _helper__WEBPACK_IMPORTED_MODULE_3__["TooltipLocation"](location.x + clipX + markerHeight, location.y + clipY - this.elementSize.height / 2 - (this.padding));
            arrowLocation.y = tipLocation.y = height / 2;
            if ((location.x + width + this.arrowPadding > boundsX + bounds.width) || (this.isNegative)) {
                location.x = (symbolLocation.x > bounds.width ? bounds.width : symbolLocation.x)
                    + clipX - markerHeight - (width + this.arrowPadding);
            }
            if (location.x < boundsX) {
                location.x = (symbolLocation.x < 0 ? 0 : symbolLocation.x) + clipX + markerHeight;
            }
            if (location.y <= boundsY) {
                arrowLocation.y -= (boundsY - location.y);
                tipLocation.y -= (boundsY - location.y);
                location.y = boundsY;
            }
            if (location.y + height >= boundsY + bounds.height) {
                arrowLocation.y += ((location.y + height) - (boundsY + bounds.height));
                tipLocation.y += ((location.y + height) - (boundsY + bounds.height));
                location.y -= ((location.y + height) - (boundsY + bounds.height));
            }
            if (arrowLocation.y + this.arrowPadding / 2 > height - this.ry) {
                arrowLocation.y = height - this.ry - this.arrowPadding / 2;
                tipLocation.y = height;
                this.tipRadius = 0;
            }
            if (arrowLocation.y - this.arrowPadding / 2 < this.ry) {
                arrowLocation.y = this.ry + this.arrowPadding / 2;
                tipLocation.y = 0;
                this.tipRadius = 0;
            }
        }
        return new _helper__WEBPACK_IMPORTED_MODULE_3__["Rect"](location.x, location.y, width, height);
    };
    Tooltip.prototype.animateTooltipDiv = function (tooltipDiv, rect) {
        var _this = this;
        var x = parseFloat(tooltipDiv.style.left);
        var y = parseFloat(tooltipDiv.style.top);
        var currenDiff;
        new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(tooltipDiv, {
            duration: 300,
            progress: function (args) {
                currenDiff = (args.timeStamp / args.duration);
                tooltipDiv.style.animation = null;
                tooltipDiv.style.left = (x + currenDiff * (rect.x - x)) + 'px';
                tooltipDiv.style.top = (y + currenDiff * (rect.y - y)) + 'px';
            },
            end: function (model) {
                _this.updateDiv(tooltipDiv, rect.x, rect.y);
                _this.trigger('animationComplete', { tooltip: _this });
            }
        });
    };
    Tooltip.prototype.updateDiv = function (tooltipDiv, x, y) {
        tooltipDiv.style.left = x + 'px';
        tooltipDiv.style.top = y + 'px';
    };
    Tooltip.prototype.updateTemplateFn = function () {
        if (this.template) {
            var e = void 0;
            try {
                if (document.querySelectorAll(this.template).length) {
                    this.templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(this.template).innerHTML.trim());
                }
            }
            catch (e) {
                this.templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.template);
            }
        }
    };
    /** @private */
    Tooltip.prototype.fadeOut = function () {
        var _this = this;
        var tooltipElement = (this.isCanvas && !this.template) ? Object(_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.element.id + '_svg') :
            Object(_helper__WEBPACK_IMPORTED_MODULE_3__["getElement"])(this.element.id);
        if (tooltipElement) {
            var tooltipGroup_1 = tooltipElement.firstChild;
            if (this.isCanvas && !this.template) {
                tooltipGroup_1 = document.getElementById(this.element.id + '_group') ? document.getElementById(this.element.id + '_group') :
                    tooltipGroup_1;
            }
            var opacity_1;
            if (tooltipGroup_1) {
                opacity_1 = parseFloat(tooltipGroup_1.getAttribute('opacity')) || 1;
            }
            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(tooltipGroup_1, {
                duration: 200,
                progress: function (args) {
                    //  tooltipGroup.removeAttribute('e-animate');
                    _this.progressAnimation(tooltipGroup_1, opacity_1, (args.timeStamp / args.duration));
                },
                end: function (model) {
                    _this.fadeOuted = true;
                    _this.endAnimation(tooltipGroup_1);
                }
            });
        }
    };
    Tooltip.prototype.progressAnimation = function (tooltipGroup, opacity, timeStamp) {
        tooltipGroup.style.animation = '';
        tooltipGroup.setAttribute('opacity', (opacity - timeStamp).toString());
    };
    /*
     * @hidden
     */
    Tooltip.prototype.endAnimation = function (tooltipGroup) {
        tooltipGroup.setAttribute('opacity', '0');
        if (this.template && !this.shared) {
            tooltipGroup.style.display = 'none';
        }
        this.trigger('animationComplete', { tooltip: this });
    };
    /**
     * Get the properties to be maintained in the persisted state.
     * @private
     */
    Tooltip.prototype.getPersistData = function () {
        var keyEntity = [];
        return this.addOnPersist(keyEntity);
    };
    /**
     * Get component name
     *  @private
     */
    Tooltip.prototype.getModuleName = function () {
        return 'tooltip';
    };
    /**
     * To destroy the accumulationcharts
     * @private
     */
    Tooltip.prototype.destroy = function () {
        _super.prototype.destroy.call(this);
        this.element.classList.remove('e-tooltip');
    };
    /**
     * Called internally if any of the property value changed.
     * @return {void}
     * @private
     */
    Tooltip.prototype.onPropertyChanged = function (newProp, oldProp) {
        this.isFirst = false;
        this.render();
    };
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Tooltip.prototype, "enable", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Tooltip.prototype, "shared", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Tooltip.prototype, "enableShadow", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Tooltip.prototype, "fill", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')
    ], Tooltip.prototype, "header", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0.75)
    ], Tooltip.prototype, "opacity", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ size: '13px', fontWeight: 'Normal', color: null, fontStyle: 'Normal', fontFamily: 'Segoe UI' }, TextStyle)
    ], Tooltip.prototype, "textStyle", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Tooltip.prototype, "template", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)
    ], Tooltip.prototype, "enableAnimation", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Tooltip.prototype, "inverted", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Tooltip.prototype, "isNegative", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ color: '#cccccc', width: 0.5 }, TooltipBorder)
    ], Tooltip.prototype, "border", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], Tooltip.prototype, "content", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)
    ], Tooltip.prototype, "markerSize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ x: 0, y: 0 }, ToolLocation)
    ], Tooltip.prototype, "clipBounds", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], Tooltip.prototype, "palette", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])
    ], Tooltip.prototype, "shapes", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ x: 0, y: 0 }, ToolLocation)
    ], Tooltip.prototype, "location", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)
    ], Tooltip.prototype, "offset", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], Tooltip.prototype, "rx", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2)
    ], Tooltip.prototype, "ry", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], Tooltip.prototype, "marginX", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(5)
    ], Tooltip.prototype, "marginY", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(12)
    ], Tooltip.prototype, "arrowPadding", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Tooltip.prototype, "data", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Material')
    ], Tooltip.prototype, "theme", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({ x: 0, y: 0, width: 0, height: 0 }, AreaBounds)
    ], Tooltip.prototype, "areaBounds", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)
    ], Tooltip.prototype, "availableSize", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)
    ], Tooltip.prototype, "isCanvas", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "tooltipRender", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "loaded", void 0);
    __decorate([
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()
    ], Tooltip.prototype, "animationComplete", void 0);
    Tooltip = __decorate([
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]
    ], Tooltip);
    return Tooltip;
}(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ }),

/***/ "./node_modules/ngx-bootstrap/component-loader/fesm5/ngx-bootstrap-component-loader.js":
/*!*********************************************************************************************!*\
  !*** ./node_modules/ngx-bootstrap/component-loader/fesm5/ngx-bootstrap-component-loader.js ***!
  \*********************************************************************************************/
/*! exports provided: BsComponentRef, ComponentLoader, ComponentLoaderFactory, ContentRef */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BsComponentRef", function() { return BsComponentRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentLoader", function() { return ComponentLoader; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentLoaderFactory", function() { return ComponentLoaderFactory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentRef", function() { return ContentRef; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ngx-bootstrap/utils */ "./node_modules/ngx-bootstrap/utils/fesm5/ngx-bootstrap-utils.js");
/* harmony import */ var ngx_bootstrap_positioning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ngx-bootstrap/positioning */ "./node_modules/ngx-bootstrap/positioning/fesm5/ngx-bootstrap-positioning.js");




/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T
 */
var  /**
 * @template T
 */
BsComponentRef = /** @class */ (function () {
    function BsComponentRef() {
    }
    return BsComponentRef;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @copyright Valor Software
 * @copyright Angular ng-bootstrap team
 */
var ContentRef = /** @class */ (function () {
    function ContentRef(
    /* tslint:disable-next-line: no-any */
    nodes, viewRef, 
    /* tslint:disable-next-line: no-any */
    componentRef) {
        this.nodes = nodes;
        this.viewRef = viewRef;
        this.componentRef = componentRef;
    }
    return ContentRef;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T
 */
var  /**
 * @template T
 */
ComponentLoader = /** @class */ (function () {
    /**
     * Do not use this directly, it should be instanced via
     * `ComponentLoadFactory.attach`
     * @internal
     */
    // tslint:disable-next-line
    function ComponentLoader(_viewContainerRef, _renderer, _elementRef, _injector, _componentFactoryResolver, _ngZone, _applicationRef, _posService) {
        this._viewContainerRef = _viewContainerRef;
        this._renderer = _renderer;
        this._elementRef = _elementRef;
        this._injector = _injector;
        this._componentFactoryResolver = _componentFactoryResolver;
        this._ngZone = _ngZone;
        this._applicationRef = _applicationRef;
        this._posService = _posService;
        this.onBeforeShow = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        /* tslint:disable-next-line: no-any*/
        this.onShown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        /* tslint:disable-next-line: no-any*/
        this.onBeforeHide = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.onHidden = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this._providers = [];
        this._isHiding = false;
        /**
         * A selector used if container element was not found
         */
        this.containerDefaultSelector = 'body';
        this._listenOpts = {};
        this._globalListener = Function.prototype;
    }
    Object.defineProperty(ComponentLoader.prototype, "isShown", {
        get: /**
         * @return {?}
         */
        function () {
            if (this._isHiding) {
                return false;
            }
            return !!this._componentRef;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} compType
     * @return {?}
     */
    ComponentLoader.prototype.attach = /**
     * @param {?} compType
     * @return {?}
     */
    function (compType) {
        this._componentFactory = this._componentFactoryResolver
            .resolveComponentFactory(compType);
        return this;
    };
    // todo: add behaviour: to target element, `body`, custom element
    // todo: add behaviour: to target element, `body`, custom element
    /**
     * @param {?=} container
     * @return {?}
     */
    ComponentLoader.prototype.to = 
    // todo: add behaviour: to target element, `body`, custom element
    /**
     * @param {?=} container
     * @return {?}
     */
    function (container) {
        this.container = container || this.container;
        return this;
    };
    /**
     * @param {?=} opts
     * @return {?}
     */
    ComponentLoader.prototype.position = /**
     * @param {?=} opts
     * @return {?}
     */
    function (opts) {
        this.attachment = opts.attachment || this.attachment;
        /* tslint:disable-next-line: no-unnecessary-type-assertion */
        this._elementRef = ((/** @type {?} */ (opts.target))) || this._elementRef;
        return this;
    };
    /**
     * @param {?} provider
     * @return {?}
     */
    ComponentLoader.prototype.provide = /**
     * @param {?} provider
     * @return {?}
     */
    function (provider) {
        this._providers.push(provider);
        return this;
    };
    // todo: appendChild to element or document.querySelector(this.container)
    // todo: appendChild to element or document.querySelector(this.container)
    /**
     * @param {?=} opts
     * @return {?}
     */
    ComponentLoader.prototype.show = 
    // todo: appendChild to element or document.querySelector(this.container)
    /**
     * @param {?=} opts
     * @return {?}
     */
    function (opts) {
        if (opts === void 0) { opts = {}; }
        this._subscribePositioning();
        this._innerComponent = null;
        if (!this._componentRef) {
            this.onBeforeShow.emit();
            this._contentRef = this._getContentRef(opts.content, opts.context, opts.initialState);
            /** @type {?} */
            var injector = _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"].create({
                providers: this._providers,
                parent: this._injector
            });
            this._componentRef = this._componentFactory.create(injector, this._contentRef.nodes);
            this._applicationRef.attachView(this._componentRef.hostView);
            // this._componentRef = this._viewContainerRef
            //   .createComponent(this._componentFactory, 0, injector, this._contentRef.nodes);
            this.instance = this._componentRef.instance;
            Object.assign(this._componentRef.instance, opts);
            if (this.container instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) {
                this.container.nativeElement.appendChild(this._componentRef.location.nativeElement);
            }
            if (typeof this.container === 'string' && typeof document !== 'undefined') {
                /** @type {?} */
                var selectedElement = document.querySelector(this.container) ||
                    document.querySelector(this.containerDefaultSelector);
                selectedElement.appendChild(this._componentRef.location.nativeElement);
            }
            if (!this.container &&
                this._elementRef &&
                this._elementRef.nativeElement.parentElement) {
                this._elementRef.nativeElement.parentElement.appendChild(this._componentRef.location.nativeElement);
            }
            // we need to manually invoke change detection since events registered
            // via
            // Renderer::listen() are not picked up by change detection with the
            // OnPush strategy
            if (this._contentRef.componentRef) {
                this._innerComponent = this._contentRef.componentRef.instance;
                this._contentRef.componentRef.changeDetectorRef.markForCheck();
                this._contentRef.componentRef.changeDetectorRef.detectChanges();
            }
            this._componentRef.changeDetectorRef.markForCheck();
            this._componentRef.changeDetectorRef.detectChanges();
            this.onShown.emit(this._componentRef.instance);
        }
        this._registerOutsideClick();
        return this._componentRef;
    };
    /**
     * @return {?}
     */
    ComponentLoader.prototype.hide = /**
     * @return {?}
     */
    function () {
        if (!this._componentRef) {
            return this;
        }
        this._posService.deletePositionElement(this._componentRef.location);
        this.onBeforeHide.emit(this._componentRef.instance);
        /** @type {?} */
        var componentEl = this._componentRef.location.nativeElement;
        componentEl.parentNode.removeChild(componentEl);
        if (this._contentRef.componentRef) {
            this._contentRef.componentRef.destroy();
        }
        this._componentRef.destroy();
        if (this._viewContainerRef && this._contentRef.viewRef) {
            this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef));
        }
        if (this._contentRef.viewRef) {
            this._contentRef.viewRef.destroy();
        }
        this._contentRef = null;
        this._componentRef = null;
        this._removeGlobalListener();
        this.onHidden.emit();
        return this;
    };
    /**
     * @return {?}
     */
    ComponentLoader.prototype.toggle = /**
     * @return {?}
     */
    function () {
        if (this.isShown) {
            this.hide();
            return;
        }
        this.show();
    };
    /**
     * @return {?}
     */
    ComponentLoader.prototype.dispose = /**
     * @return {?}
     */
    function () {
        if (this.isShown) {
            this.hide();
        }
        this._unsubscribePositioning();
        if (this._unregisterListenersFn) {
            this._unregisterListenersFn();
        }
    };
    /**
     * @param {?} listenOpts
     * @return {?}
     */
    ComponentLoader.prototype.listen = /**
     * @param {?} listenOpts
     * @return {?}
     */
    function (listenOpts) {
        var _this = this;
        this.triggers = listenOpts.triggers || this.triggers;
        this._listenOpts.outsideClick = listenOpts.outsideClick;
        this._listenOpts.outsideEsc = listenOpts.outsideEsc;
        listenOpts.target = listenOpts.target || this._elementRef.nativeElement;
        /** @type {?} */
        var hide = (this._listenOpts.hide = (/**
         * @return {?}
         */
        function () {
            return listenOpts.hide ? listenOpts.hide() : void _this.hide();
        }));
        /** @type {?} */
        var show = (this._listenOpts.show = (/**
         * @param {?} registerHide
         * @return {?}
         */
        function (registerHide) {
            listenOpts.show ? listenOpts.show(registerHide) : _this.show(registerHide);
            registerHide();
        }));
        /** @type {?} */
        var toggle = (/**
         * @param {?} registerHide
         * @return {?}
         */
        function (registerHide) {
            _this.isShown ? hide() : show(registerHide);
        });
        this._unregisterListenersFn = Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["listenToTriggersV2"])(this._renderer, {
            target: listenOpts.target,
            triggers: listenOpts.triggers,
            show: show,
            hide: hide,
            toggle: toggle
        });
        return this;
    };
    /**
     * @return {?}
     */
    ComponentLoader.prototype._removeGlobalListener = /**
     * @return {?}
     */
    function () {
        if (this._globalListener) {
            this._globalListener();
            this._globalListener = null;
        }
    };
    /**
     * @param {?} vRef
     * @param {?} template
     * @return {?}
     */
    ComponentLoader.prototype.attachInline = /**
     * @param {?} vRef
     * @param {?} template
     * @return {?}
     */
    function (vRef, 
    /* tslint:disable-next-line: no-any*/
    template) {
        this._inlineViewRef = vRef.createEmbeddedView(template);
        return this;
    };
    /**
     * @return {?}
     */
    ComponentLoader.prototype._registerOutsideClick = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (!this._componentRef || !this._componentRef.location) {
            return;
        }
        // why: should run after first event bubble
        if (this._listenOpts.outsideClick) {
            /** @type {?} */
            var target_1 = this._componentRef.location.nativeElement;
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this._globalListener = Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["registerOutsideClick"])(_this._renderer, {
                    targets: [target_1, _this._elementRef.nativeElement],
                    outsideClick: _this._listenOpts.outsideClick,
                    hide: (/**
                     * @return {?}
                     */
                    function () { return _this._listenOpts.hide(); })
                });
            }));
        }
        if (this._listenOpts.outsideEsc) {
            /** @type {?} */
            var target = this._componentRef.location.nativeElement;
            this._globalListener = Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["registerEscClick"])(this._renderer, {
                targets: [target, this._elementRef.nativeElement],
                outsideEsc: this._listenOpts.outsideEsc,
                hide: (/**
                 * @return {?}
                 */
                function () { return _this._listenOpts.hide(); })
            });
        }
    };
    /**
     * @return {?}
     */
    ComponentLoader.prototype.getInnerComponent = /**
     * @return {?}
     */
    function () {
        return this._innerComponent;
    };
    /**
     * @private
     * @return {?}
     */
    ComponentLoader.prototype._subscribePositioning = /**
     * @private
     * @return {?}
     */
    function () {
        var _this = this;
        if (this._zoneSubscription || !this.attachment) {
            return;
        }
        this.onShown.subscribe((/**
         * @return {?}
         */
        function () {
            _this._posService.position({
                element: _this._componentRef.location,
                target: _this._elementRef,
                attachment: _this.attachment,
                appendToBody: _this.container === 'body'
            });
        }));
        this._zoneSubscription = this._ngZone.onStable.subscribe((/**
         * @return {?}
         */
        function () {
            if (!_this._componentRef) {
                return;
            }
            _this._posService.calcPosition();
        }));
    };
    /**
     * @private
     * @return {?}
     */
    ComponentLoader.prototype._unsubscribePositioning = /**
     * @private
     * @return {?}
     */
    function () {
        if (!this._zoneSubscription) {
            return;
        }
        this._zoneSubscription.unsubscribe();
        this._zoneSubscription = null;
    };
    /**
     * @private
     * @param {?} content
     * @param {?=} context
     * @param {?=} initialState
     * @return {?}
     */
    ComponentLoader.prototype._getContentRef = /**
     * @private
     * @param {?} content
     * @param {?=} context
     * @param {?=} initialState
     * @return {?}
     */
    function (
    /* tslint:disable-next-line: no-any*/
    content, 
    /* tslint:disable-next-line: no-any*/
    context, 
    /* tslint:disable-next-line: no-any*/
    initialState) {
        if (!content) {
            return new ContentRef([]);
        }
        if (content instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]) {
            if (this._viewContainerRef) {
                /** @type {?} */
                var _viewRef = this._viewContainerRef
                    .createEmbeddedView(content, context);
                _viewRef.markForCheck();
                return new ContentRef([_viewRef.rootNodes], _viewRef);
            }
            /** @type {?} */
            var viewRef = content.createEmbeddedView({});
            this._applicationRef.attachView(viewRef);
            return new ContentRef([viewRef.rootNodes], viewRef);
        }
        if (typeof content === 'function') {
            /** @type {?} */
            var contentCmptFactory = this._componentFactoryResolver.resolveComponentFactory(content);
            /** @type {?} */
            var modalContentInjector = _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"].create({
                providers: this._providers,
                parent: this._injector
            });
            /** @type {?} */
            var componentRef = contentCmptFactory.create(modalContentInjector);
            Object.assign(componentRef.instance, initialState);
            this._applicationRef.attachView(componentRef.hostView);
            return new ContentRef([[componentRef.location.nativeElement]], componentRef.hostView, componentRef);
        }
        return new ContentRef([[this._renderer.createText("" + content)]]);
    };
    return ComponentLoader;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ComponentLoaderFactory = /** @class */ (function () {
    function ComponentLoaderFactory(_componentFactoryResolver, _ngZone, _injector, _posService, _applicationRef) {
        this._componentFactoryResolver = _componentFactoryResolver;
        this._ngZone = _ngZone;
        this._injector = _injector;
        this._posService = _posService;
        this._applicationRef = _applicationRef;
    }
    /**
     *
     * @param _elementRef
     * @param _viewContainerRef
     * @param _renderer
     */
    /**
     *
     * @template T
     * @param {?} _elementRef
     * @param {?} _viewContainerRef
     * @param {?} _renderer
     * @return {?}
     */
    ComponentLoaderFactory.prototype.createLoader = /**
     *
     * @template T
     * @param {?} _elementRef
     * @param {?} _viewContainerRef
     * @param {?} _renderer
     * @return {?}
     */
    function (_elementRef, _viewContainerRef, _renderer) {
        return new ComponentLoader(_viewContainerRef, _renderer, _elementRef, this._injector, this._componentFactoryResolver, this._ngZone, this._applicationRef, this._posService);
    };
    ComponentLoaderFactory.decorators = [
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
    ];
    /** @nocollapse */
    ComponentLoaderFactory.ctorParameters = function () { return [
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"] },
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"] },
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"] },
        { type: ngx_bootstrap_positioning__WEBPACK_IMPORTED_MODULE_2__["PositioningService"] },
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationRef"] }
    ]; };
    return ComponentLoaderFactory;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */


//# sourceMappingURL=ngx-bootstrap-component-loader.js.map


/***/ }),

/***/ "./node_modules/ngx-bootstrap/positioning/fesm5/ngx-bootstrap-positioning.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/ngx-bootstrap/positioning/fesm5/ngx-bootstrap-positioning.js ***!
  \***********************************************************************************/
/*! exports provided: Positioning, PositioningService, positionElements */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Positioning", function() { return Positioning; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PositioningService", function() { return PositioningService; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionElements", function() { return positionElements; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");





/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Get CSS computed property of the given element
 * @param {?} element
 * @param {?=} property
 * @return {?}
 */
function getStyleComputedProperty(element, property) {
    if (element.nodeType !== 1) {
        return [];
    }
    // NOTE: 1 DOM access here
    /** @type {?} */
    var window = element.ownerDocument.defaultView;
    /** @type {?} */
    var css = window.getComputedStyle(element, null);
    return property ? css[(/** @type {?} */ (property))] : css;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Returns the parentNode or the host of the element
 * @param {?} element
 * @return {?}
 */
function getParentNode(element) {
    if (element.nodeName === 'HTML') {
        return element;
    }
    return element.parentNode || element.host;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element
 * @return {?}
 */
function getScrollParent(element) {
    // Return body, `getScroll` will take care to get the correct `scrollTop` from it
    if (!element) {
        return document.body;
    }
    switch (element.nodeName) {
        case 'HTML':
        case 'BODY':
            return element.ownerDocument.body;
        case '#document':
            return element.body;
        default:
    }
    // Firefox want us to check `-x` and `-y` variations as well
    var _a = getStyleComputedProperty(element), overflow = _a.overflow, overflowX = _a.overflowX, overflowY = _a.overflowY;
    if (/(auto|scroll|overlay)/.test(String(overflow) + String(overflowY) + String(overflowX))) {
        return element;
    }
    return getScrollParent(getParentNode(element));
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var isIE11 = isBrowser && !!(((/** @type {?} */ (window))).MSInputMethodContext && ((/** @type {?} */ (document))).documentMode);
/** @type {?} */
var isIE10 = isBrowser && !!(((/** @type {?} */ (window))).MSInputMethodContext && /MSIE 10/.test(((/** @type {?} */ (navigator))).userAgent));
/**
 * @param {?=} version
 * @return {?}
 */
function isIE(version) {
    if (version === 11) {
        return isIE11;
    }
    if (version === 10) {
        return isIE10;
    }
    return isIE11 || isIE10;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element
 * @return {?}
 */
function getOffsetParent(element) {
    if (!element) {
        return document.documentElement;
    }
    /** @type {?} */
    var noOffsetParent = isIE(10) ? document.body : null;
    // NOTE: 1 DOM access here
    /** @type {?} */
    var offsetParent = element.offsetParent || null;
    // Skip hidden elements which don't have an offsetParent
    /** @type {?} */
    var sibling;
    while (offsetParent === noOffsetParent
        && element.nextElementSibling
        && sibling !== element.nextElementSibling) {
        sibling = element.nextElementSibling;
        offsetParent = sibling.offsetParent;
    }
    /** @type {?} */
    var nodeName = offsetParent && offsetParent.nodeName;
    if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
        return sibling ? sibling.ownerDocument.documentElement : document.documentElement;
    }
    // .offsetParent will return the closest TH, TD or TABLE in case
    if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&
        getStyleComputedProperty(offsetParent, 'position') === 'static') {
        return getOffsetParent(offsetParent);
    }
    return offsetParent;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element
 * @return {?}
 */
function isOffsetContainer(element) {
    var nodeName = element.nodeName;
    if (nodeName === 'BODY') {
        return false;
    }
    return (nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element);
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Finds the root node (document, shadowDOM root) of the given element
 * @param {?} node
 * @return {?}
 */
function getRoot(node) {
    if (node.parentNode !== null) {
        return getRoot(node.parentNode);
    }
    return node;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element1
 * @param {?} element2
 * @return {?}
 */
function findCommonOffsetParent(element1, element2) {
    // This check is needed to avoid errors in case one of the elements isn't defined for any reason
    if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
        return document.documentElement;
    }
    // Here we make sure to give as "start" the element that comes first in the DOM
    /* tslint:disable-next-line: no-bitwise */
    /** @type {?} */
    var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
    /** @type {?} */
    var start = order ? element1 : element2;
    /** @type {?} */
    var end = order ? element2 : element1;
    // Get common ancestor container
    /** @type {?} */
    var range = document.createRange();
    range.setStart(start, 0);
    range.setEnd(end, 0);
    var commonAncestorContainer = range.commonAncestorContainer;
    // Both nodes are inside #document
    if ((element1 !== commonAncestorContainer &&
        element2 !== commonAncestorContainer) ||
        start.contains(end)) {
        if (isOffsetContainer(commonAncestorContainer)) {
            return commonAncestorContainer;
        }
        return getOffsetParent(commonAncestorContainer);
    }
    // one of the nodes is inside shadowDOM, find which one
    /** @type {?} */
    var element1root = getRoot(element1);
    if (element1root.host) {
        return findCommonOffsetParent(element1root.host, element2);
    }
    else {
        return findCommonOffsetParent(element1, getRoot(element2).host);
    }
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Helper to detect borders of a given element
 */
/**
 * @param {?} styles
 * @param {?} axis
 * @return {?}
 */
function getBordersSize(styles, axis) {
    /** @type {?} */
    var sideA = axis === 'x' ? 'Left' : 'Top';
    /** @type {?} */
    var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
    return (parseFloat(styles[(/** @type {?} */ ("border" + sideA + "Width"))]) +
        parseFloat(styles[(/** @type {?} */ ("border" + sideB + "Width"))]));
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} axis
 * @param {?} body
 * @param {?} html
 * @param {?} computedStyle
 * @return {?}
 */
function getSize(axis, body, html, computedStyle) {
    return Math.max(((/** @type {?} */ (body)))["offset" + axis], ((/** @type {?} */ (body)))["scroll" + axis], ((/** @type {?} */ (html)))["client" + axis], ((/** @type {?} */ (html)))["offset" + axis], ((/** @type {?} */ (html)))["scroll" + axis], isIE(10)
        ? (parseInt(((/** @type {?} */ (html)))["offset" + axis], 10) +
            parseInt(computedStyle[(/** @type {?} */ ("margin" + (axis === 'Height' ? 'Top' : 'Left')))], 10) +
            parseInt(computedStyle[(/** @type {?} */ ("margin" + (axis === 'Height' ? 'Bottom' : 'Right')))], 10))
        : 0);
}
/**
 * @param {?} document
 * @return {?}
 */
function getWindowSizes(document) {
    /** @type {?} */
    var body = document.body;
    /** @type {?} */
    var html = document.documentElement;
    /** @type {?} */
    var computedStyle = isIE(10) && getComputedStyle(html);
    return {
        height: getSize('Height', body, html, computedStyle),
        width: getSize('Width', body, html, computedStyle)
    };
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Gets the scroll value of the given element in the given side (top and left)
 * @param {?} element
 * @param {?=} side
 * @return {?}
 */
function getScroll(element, side) {
    if (side === void 0) { side = 'top'; }
    /** @type {?} */
    var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
    /** @type {?} */
    var nodeName = element.nodeName;
    if (nodeName === 'BODY' || nodeName === 'HTML') {
        /** @type {?} */
        var html = element.ownerDocument.documentElement;
        /** @type {?} */
        var scrollingElement = element.ownerDocument.scrollingElement || html;
        return scrollingElement[upperSide];
    }
    return element[upperSide];
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} offsets
 * @return {?}
 */
function getClientRect(offsets) {
    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, offsets, { right: offsets.left + offsets.width, bottom: offsets.top + offsets.height });
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element
 * @return {?}
 */
function getBoundingClientRect(element) {
    /** @type {?} */
    var rect = {};
    // IE10 10 FIX: Please, don't ask, the element isn't
    // considered in DOM in some circumstances...
    // This isn't reproducible in IE10 compatibility mode of IE11
    try {
        if (isIE(10)) {
            rect = element.getBoundingClientRect();
            /** @type {?} */
            var scrollTop = getScroll(element, 'top');
            /** @type {?} */
            var scrollLeft = getScroll(element, 'left');
            rect.top += scrollTop;
            rect.left += scrollLeft;
            rect.bottom += scrollTop;
            rect.right += scrollLeft;
        }
        else {
            rect = element.getBoundingClientRect();
        }
    }
    catch (e) {
        return undefined;
    }
    /** @type {?} */
    var result = {
        left: rect.left,
        top: rect.top,
        width: rect.right - rect.left,
        height: rect.bottom - rect.top
    };
    // subtract scrollbar size from sizes
    /** @type {?} */
    var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
    /** @type {?} */
    var width = sizes.width || element.clientWidth || result.right - result.left;
    /** @type {?} */
    var height = sizes.height || element.clientHeight || result.bottom - result.top;
    /** @type {?} */
    var horizScrollbar = element.offsetWidth - width;
    /** @type {?} */
    var vertScrollbar = element.offsetHeight - height;
    // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
    // we make this check conditional for performance reasons
    if (horizScrollbar || vertScrollbar) {
        /** @type {?} */
        var styles = getStyleComputedProperty(element);
        horizScrollbar -= getBordersSize(styles, 'x');
        vertScrollbar -= getBordersSize(styles, 'y');
        result.width -= horizScrollbar;
        result.height -= vertScrollbar;
    }
    return getClientRect(result);
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} rect
 * @param {?} element
 * @param {?=} subtract
 * @return {?}
 */
function includeScroll(rect, element, subtract) {
    if (subtract === void 0) { subtract = false; }
    /** @type {?} */
    var scrollTop = getScroll(element, 'top');
    /** @type {?} */
    var scrollLeft = getScroll(element, 'left');
    /** @type {?} */
    var modifier = subtract ? -1 : 1;
    rect.top += scrollTop * modifier;
    rect.bottom += scrollTop * modifier;
    rect.left += scrollLeft * modifier;
    rect.right += scrollLeft * modifier;
    return rect;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} children
 * @param {?} parent
 * @param {?=} fixedPosition
 * @return {?}
 */
function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition) {
    if (fixedPosition === void 0) { fixedPosition = false; }
    /** @type {?} */
    var isIE10 = isIE(10);
    /** @type {?} */
    var isHTML = parent.nodeName === 'HTML';
    /** @type {?} */
    var childrenRect = getBoundingClientRect(children);
    /** @type {?} */
    var parentRect = getBoundingClientRect(parent);
    /** @type {?} */
    var scrollParent = getScrollParent(children);
    /** @type {?} */
    var styles = getStyleComputedProperty(parent);
    /** @type {?} */
    var borderTopWidth = parseFloat(styles.borderTopWidth);
    /** @type {?} */
    var borderLeftWidth = parseFloat(styles.borderLeftWidth);
    // In cases where the parent is fixed, we must ignore negative scroll in offset calc
    if (fixedPosition && isHTML) {
        parentRect.top = Math.max(parentRect.top, 0);
        parentRect.left = Math.max(parentRect.left, 0);
    }
    /** @type {?} */
    var offsets = getClientRect({
        top: childrenRect.top - parentRect.top - borderTopWidth,
        left: childrenRect.left - parentRect.left - borderLeftWidth,
        width: childrenRect.width,
        height: childrenRect.height
    });
    offsets.marginTop = 0;
    offsets.marginLeft = 0;
    // Subtract margins of documentElement in case it's being used as parent
    // we do this only on HTML because it's the only element that behaves
    // differently when margins are applied to it. The margins are included in
    // the box of the documentElement, in the other cases not.
    if (!isIE10 && isHTML) {
        /** @type {?} */
        var marginTop = parseFloat(styles.marginTop);
        /** @type {?} */
        var marginLeft = parseFloat(styles.marginLeft);
        offsets.top -= borderTopWidth - marginTop;
        offsets.bottom -= borderTopWidth - marginTop;
        offsets.left -= borderLeftWidth - marginLeft;
        offsets.right -= borderLeftWidth - marginLeft;
        // Attach marginTop and marginLeft because in some circumstances we may need them
        offsets.marginTop = marginTop;
        offsets.marginLeft = marginLeft;
    }
    if (isIE10 && !fixedPosition
        ? parent.contains(scrollParent)
        : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
        offsets = includeScroll(offsets, parent);
    }
    return offsets;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element
 * @param {?=} excludeScroll
 * @return {?}
 */
function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll) {
    if (excludeScroll === void 0) { excludeScroll = false; }
    /** @type {?} */
    var html = element.ownerDocument.documentElement;
    /** @type {?} */
    var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
    /** @type {?} */
    var width = Math.max(html.clientWidth, window.innerWidth || 0);
    /** @type {?} */
    var height = Math.max(html.clientHeight, window.innerHeight || 0);
    /** @type {?} */
    var scrollTop = !excludeScroll ? getScroll(html) : 0;
    /** @type {?} */
    var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
    /** @type {?} */
    var offset = {
        top: scrollTop - Number(relativeOffset.top) + Number(relativeOffset.marginTop),
        left: scrollLeft - Number(relativeOffset.left) + Number(relativeOffset.marginLeft),
        width: width,
        height: height
    };
    return getClientRect(offset);
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element
 * @return {?}
 */
function isFixed(element) {
    /** @type {?} */
    var nodeName = element.nodeName;
    if (nodeName === 'BODY' || nodeName === 'HTML') {
        return false;
    }
    if (getStyleComputedProperty(element, 'position') === 'fixed') {
        return true;
    }
    return isFixed(getParentNode(element));
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element
 * @return {?}
 */
function getFixedPositionOffsetParent(element) {
    // This check is needed to avoid errors in case one of the elements isn't defined for any reason
    if (!element || !element.parentElement || isIE()) {
        return document.documentElement;
    }
    /** @type {?} */
    var el = element.parentElement;
    while (el && getStyleComputedProperty(el, 'transform') === 'none') {
        el = el.parentElement;
    }
    return el || document.documentElement;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} target
 * @param {?} host
 * @param {?=} padding
 * @param {?=} boundariesElement
 * @param {?=} fixedPosition
 * @return {?}
 */
function getBoundaries(target, host, padding, boundariesElement, fixedPosition) {
    // NOTE: 1 DOM access here
    if (padding === void 0) { padding = 0; }
    if (fixedPosition === void 0) { fixedPosition = false; }
    // NOTE: 1 DOM access here
    /** @type {?} */
    var boundaries = { top: 0, left: 0 };
    /** @type {?} */
    var offsetParent = fixedPosition ? getFixedPositionOffsetParent(target) : findCommonOffsetParent(target, host);
    // Handle viewport case
    if (boundariesElement === 'viewport') {
        boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
    }
    else {
        // Handle other cases based on DOM element used as boundaries
        /** @type {?} */
        var boundariesNode = void 0;
        if (boundariesElement === 'scrollParent') {
            boundariesNode = getScrollParent(getParentNode(host));
            if (boundariesNode.nodeName === 'BODY') {
                boundariesNode = target.ownerDocument.documentElement;
            }
        }
        else if (boundariesElement === 'window') {
            boundariesNode = target.ownerDocument.documentElement;
        }
        else {
            boundariesNode = boundariesElement;
        }
        /** @type {?} */
        var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
        // In case of HTML, we need a different computation
        if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
            var _a = getWindowSizes(target.ownerDocument), height = _a.height, width = _a.width;
            boundaries.top += offsets.top - offsets.marginTop;
            boundaries.bottom = Number(height) + Number(offsets.top);
            boundaries.left += offsets.left - offsets.marginLeft;
            boundaries.right = Number(width) + Number(offsets.left);
        }
        else {
            // for all the other DOM elements, this one is good
            boundaries = offsets;
        }
    }
    // Add paddings
    boundaries.left += padding;
    boundaries.top += padding;
    boundaries.right -= padding;
    boundaries.bottom -= padding;
    return boundaries;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} __0
 * @return {?}
 */
function getArea(_a) {
    var width = _a.width, height = _a.height;
    return width * height;
}
/**
 * @param {?} placement
 * @param {?} refRect
 * @param {?} target
 * @param {?} host
 * @param {?=} allowedPositions
 * @param {?=} boundariesElement
 * @param {?=} padding
 * @return {?}
 */
function computeAutoPlacement(placement, refRect, target, host, allowedPositions, boundariesElement, padding) {
    if (allowedPositions === void 0) { allowedPositions = ['top', 'bottom', 'right', 'left']; }
    if (boundariesElement === void 0) { boundariesElement = 'viewport'; }
    if (padding === void 0) { padding = 0; }
    if (placement.indexOf('auto') === -1) {
        return placement;
    }
    /** @type {?} */
    var boundaries = getBoundaries(target, host, padding, boundariesElement);
    /** @type {?} */
    var rects = {
        top: {
            width: boundaries.width,
            height: refRect.top - boundaries.top
        },
        right: {
            width: boundaries.right - refRect.right,
            height: boundaries.height
        },
        bottom: {
            width: boundaries.width,
            height: boundaries.bottom - refRect.bottom
        },
        left: {
            width: refRect.left - boundaries.left,
            height: boundaries.height
        }
    };
    /** @type {?} */
    var sortedAreas = Object.keys(rects)
        .map((/**
     * @param {?} key
     * @return {?}
     */
    function (key) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ key: key }, rects[key], { area: getArea(rects[key]) })); }))
        .sort((/**
     * @param {?} a
     * @param {?} b
     * @return {?}
     */
    function (a, b) { return b.area - a.area; }));
    /** @type {?} */
    var filteredAreas = sortedAreas.filter((/**
     * @param {?} __0
     * @return {?}
     */
    function (_a) {
        var width = _a.width, height = _a.height;
        return width >= target.clientWidth
            && height >= target.clientHeight;
    }));
    filteredAreas = filteredAreas.filter((/**
     * @param {?} position
     * @return {?}
     */
    function (position) {
        return allowedPositions
            .some((/**
         * @param {?} allowedPosition
         * @return {?}
         */
        function (allowedPosition) {
            return allowedPosition === position.key;
        }));
    }));
    /** @type {?} */
    var computedPlacement = filteredAreas.length > 0
        ? filteredAreas[0].key
        : sortedAreas[0].key;
    /** @type {?} */
    var variation = placement.split(' ')[1];
    // for tooltip on auto position
    target.className = target.className.replace(/bs-tooltip-auto/g, "bs-tooltip-" + computedPlacement);
    return computedPlacement + (variation ? "-" + variation : '');
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} data
 * @return {?}
 */
function getOffsets(data) {
    return {
        width: data.offsets.target.width,
        height: data.offsets.target.height,
        left: Math.floor(data.offsets.target.left),
        top: Math.round(data.offsets.target.top),
        bottom: Math.round(data.offsets.target.bottom),
        right: Math.floor(data.offsets.target.right)
    };
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Get the opposite placement of the given one
 * @param {?} placement
 * @return {?}
 */
function getOppositePlacement(placement) {
    /** @type {?} */
    var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
    return placement.replace(/left|right|bottom|top/g, (/**
     * @param {?} matched
     * @return {?}
     */
    function (matched) { return ((/** @type {?} */ (hash)))[matched]; }));
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Get the opposite placement variation of the given one
 * @param {?} variation
 * @return {?}
 */
function getOppositeVariation(variation) {
    if (variation === 'right') {
        return 'left';
    }
    else if (variation === 'left') {
        return 'right';
    }
    return variation;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Get the outer sizes of the given element (offset size + margins)
 * @param {?} element
 * @return {?}
 */
function getOuterSizes(element) {
    /** @type {?} */
    var window = element.ownerDocument.defaultView;
    /** @type {?} */
    var styles = window.getComputedStyle(element);
    /** @type {?} */
    var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
    /** @type {?} */
    var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
    return {
        width: Number(element.offsetWidth) + y,
        height: Number(element.offsetHeight) + x
    };
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} target
 * @param {?} host
 * @param {?=} fixedPosition
 * @return {?}
 */
function getReferenceOffsets(target, host, fixedPosition) {
    if (fixedPosition === void 0) { fixedPosition = null; }
    /** @type {?} */
    var commonOffsetParent = fixedPosition
        ? getFixedPositionOffsetParent(target)
        : findCommonOffsetParent(target, host);
    return getOffsetRectRelativeToArbitraryNode(host, commonOffsetParent, fixedPosition);
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} target
 * @param {?} hostOffsets
 * @param {?} position
 * @return {?}
 */
function getTargetOffsets(target, hostOffsets, position) {
    /** @type {?} */
    var placement = position.split(' ')[0];
    // Get target node sizes
    /** @type {?} */
    var targetRect = getOuterSizes(target);
    // Add position, width and height to our offsets object
    /** @type {?} */
    var targetOffsets = {
        width: targetRect.width,
        height: targetRect.height
    };
    // depending by the target placement we have to compute its offsets slightly differently
    /** @type {?} */
    var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
    /** @type {?} */
    var mainSide = isHoriz ? 'top' : 'left';
    /** @type {?} */
    var secondarySide = isHoriz ? 'left' : 'top';
    /** @type {?} */
    var measurement = isHoriz ? 'height' : 'width';
    /** @type {?} */
    var secondaryMeasurement = !isHoriz ? 'height' : 'width';
    ((/** @type {?} */ (targetOffsets)))[mainSide] =
        hostOffsets[mainSide] +
            hostOffsets[measurement] / 2 -
            targetRect[measurement] / 2;
    ((/** @type {?} */ (targetOffsets)))[secondarySide] = placement === secondarySide
        ? hostOffsets[secondarySide] - targetRect[secondaryMeasurement]
        : ((/** @type {?} */ (hostOffsets)))[getOppositePlacement(secondarySide)];
    return targetOffsets;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Helper used to know if the given modifier is enabled.
 * @param {?} options
 * @param {?} modifierName
 * @return {?}
 */
function isModifierEnabled(options, modifierName) {
    return options
        && options.modifiers
        && options.modifiers[modifierName]
        && options.modifiers[modifierName].enabled;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Tells if a given input is a number
 * @param {?} n
 * @return {?}
 */
function isNumeric(n) {
    return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} data
 * @param {?=} renderer
 * @return {?}
 */
function updateContainerClass(data, renderer) {
    /** @type {?} */
    var target = data.instance.target;
    /** @type {?} */
    var containerClass = target.className;
    if (data.placementAuto) {
        containerClass = containerClass.replace(/bs-popover-auto/g, "bs-popover-" + data.placement);
        containerClass = containerClass.replace(/bs-tooltip-auto/g, "bs-tooltip-" + data.placement);
        containerClass = containerClass.replace(/\sauto/g, " " + data.placement);
        if (containerClass.indexOf('popover') !== -1 && containerClass.indexOf('popover-auto') === -1) {
            containerClass += ' popover-auto';
        }
        if (containerClass.indexOf('tooltip') !== -1 && containerClass.indexOf('tooltip-auto') === -1) {
            containerClass += ' tooltip-auto';
        }
    }
    containerClass = containerClass.replace(/left|right|top|bottom/g, "" + data.placement.split(' ')[0]);
    if (renderer) {
        renderer.setAttribute(target, 'class', containerClass);
        return;
    }
    target.className = containerClass;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element
 * @param {?} styles
 * @param {?=} renderer
 * @return {?}
 */
function setStyles(element, styles, renderer) {
    Object.keys(styles).forEach((/**
     * @param {?} prop
     * @return {?}
     */
    function (prop) {
        /** @type {?} */
        var unit = '';
        // add unit if the value is numeric and is one of the following
        if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 &&
            isNumeric(styles[prop])) {
            unit = 'px';
        }
        if (renderer) {
            renderer.setStyle(element, prop, "" + String(styles[prop]) + unit);
            return;
        }
        element.style[prop] = String(styles[prop]) + unit;
    }));
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} data
 * @return {?}
 */
function arrow(data) {
    var _a;
    /** @type {?} */
    var targetOffsets = data.offsets.target;
    // if arrowElement is a string, suppose it's a CSS selector
    /** @type {?} */
    var arrowElement = data.instance.target.querySelector('.arrow');
    // if arrowElement is not found, don't run the modifier
    if (!arrowElement) {
        return data;
    }
    /** @type {?} */
    var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
    /** @type {?} */
    var len = isVertical ? 'height' : 'width';
    /** @type {?} */
    var sideCapitalized = isVertical ? 'Top' : 'Left';
    /** @type {?} */
    var side = sideCapitalized.toLowerCase();
    /** @type {?} */
    var altSide = isVertical ? 'left' : 'top';
    /** @type {?} */
    var opSide = isVertical ? 'bottom' : 'right';
    /** @type {?} */
    var arrowElementSize = getOuterSizes(arrowElement)[len];
    // top/left side
    if (data.offsets.host[opSide] - arrowElementSize < ((/** @type {?} */ (targetOffsets)))[side]) {
        ((/** @type {?} */ (targetOffsets)))[side] -=
            ((/** @type {?} */ (targetOffsets)))[side] - (data.offsets.host[opSide] - arrowElementSize);
    }
    // bottom/right side
    if (Number(((/** @type {?} */ (data))).offsets.host[side]) + Number(arrowElementSize) > ((/** @type {?} */ (targetOffsets)))[opSide]) {
        ((/** @type {?} */ (targetOffsets)))[side] +=
            Number(((/** @type {?} */ (data))).offsets.host[side]) + Number(arrowElementSize) - Number(((/** @type {?} */ (targetOffsets)))[opSide]);
    }
    targetOffsets = getClientRect(targetOffsets);
    // compute center of the target
    /** @type {?} */
    var center = Number(((/** @type {?} */ (data))).offsets.host[side]) + Number(data.offsets.host[len] / 2 - arrowElementSize / 2);
    // Compute the sideValue using the updated target offsets
    // take target margin in account because we don't have this info available
    /** @type {?} */
    var css = getStyleComputedProperty(data.instance.target);
    /** @type {?} */
    var targetMarginSide = parseFloat(css["margin" + sideCapitalized]);
    /** @type {?} */
    var targetBorderSide = parseFloat(css["border" + sideCapitalized + "Width"]);
    /** @type {?} */
    var sideValue = center - ((/** @type {?} */ (targetOffsets)))[side] - targetMarginSide - targetBorderSide;
    // prevent arrowElement from being placed not contiguously to its target
    sideValue = Math.max(Math.min(targetOffsets[len] - arrowElementSize, sideValue), 0);
    data.offsets.arrow = (_a = {},
        _a[side] = Math.round(sideValue),
        _a[altSide] = '' // make sure to unset any eventual altSide value from the DOM node
    ,
        _a);
    data.instance.arrow = arrowElement;
    return data;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} data
 * @return {?}
 */
function flip(data) {
    data.offsets.target = getClientRect(data.offsets.target);
    if (!isModifierEnabled(data.options, 'flip')) {
        data.offsets.target = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, data.offsets.target, getTargetOffsets(data.instance.target, data.offsets.host, data.placement));
        return data;
    }
    /** @type {?} */
    var boundaries = getBoundaries(data.instance.target, data.instance.host, 0, // padding
    'viewport', false // positionFixed
    );
    /** @type {?} */
    var placement = data.placement.split(' ')[0];
    /** @type {?} */
    var variation = data.placement.split(' ')[1] || '';
    /** @type {?} */
    var offsetsHost = data.offsets.host;
    /** @type {?} */
    var target = data.instance.target;
    /** @type {?} */
    var host = data.instance.host;
    /** @type {?} */
    var adaptivePosition = computeAutoPlacement('auto', offsetsHost, target, host, data.options.allowedPositions);
    /** @type {?} */
    var flipOrder = [placement, adaptivePosition];
    /* tslint:disable-next-line: cyclomatic-complexity */
    flipOrder.forEach((/**
     * @param {?} step
     * @param {?} index
     * @return {?}
     */
    function (step, index) {
        if (placement !== step || flipOrder.length === index + 1) {
            return data;
        }
        placement = data.placement.split(' ')[0];
        // using floor because the host offsets may contain decimals we are not going to consider here
        /** @type {?} */
        var overlapsRef = (placement === 'left' &&
            Math.floor(data.offsets.target.right) > Math.floor(data.offsets.host.left)) ||
            (placement === 'right' &&
                Math.floor(data.offsets.target.left) < Math.floor(data.offsets.host.right)) ||
            (placement === 'top' &&
                Math.floor(data.offsets.target.bottom) > Math.floor(data.offsets.host.top)) ||
            (placement === 'bottom' &&
                Math.floor(data.offsets.target.top) < Math.floor(data.offsets.host.bottom));
        /** @type {?} */
        var overflowsLeft = Math.floor(data.offsets.target.left) < Math.floor(boundaries.left);
        /** @type {?} */
        var overflowsRight = Math.floor(data.offsets.target.right) > Math.floor(boundaries.right);
        /** @type {?} */
        var overflowsTop = Math.floor(data.offsets.target.top) < Math.floor(boundaries.top);
        /** @type {?} */
        var overflowsBottom = Math.floor(data.offsets.target.bottom) > Math.floor(boundaries.bottom);
        /** @type {?} */
        var overflowsBoundaries = (placement === 'left' && overflowsLeft) ||
            (placement === 'right' && overflowsRight) ||
            (placement === 'top' && overflowsTop) ||
            (placement === 'bottom' && overflowsBottom);
        // flip the variation if required
        /** @type {?} */
        var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
        /** @type {?} */
        var flippedVariation = ((isVertical && variation === 'left' && overflowsLeft) ||
            (isVertical && variation === 'right' && overflowsRight) ||
            (!isVertical && variation === 'left' && overflowsTop) ||
            (!isVertical && variation === 'right' && overflowsBottom));
        if (overlapsRef || overflowsBoundaries || flippedVariation) {
            if (overlapsRef || overflowsBoundaries) {
                placement = flipOrder[index + 1];
            }
            if (flippedVariation) {
                variation = getOppositeVariation(variation);
            }
            data.placement = placement + (variation ? " " + variation : '');
            data.offsets.target = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, data.offsets.target, getTargetOffsets(data.instance.target, data.offsets.host, data.placement));
        }
    }));
    return data;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} targetElement
 * @param {?} hostElement
 * @param {?} position
 * @param {?} options
 * @return {?}
 */
function initData(targetElement, hostElement, position, options) {
    /** @type {?} */
    var hostElPosition = getReferenceOffsets(targetElement, hostElement);
    if (!position.match(/^(auto)*\s*(left|right|top|bottom)*$/)
        && !position.match(/^(left|right|top|bottom)*\s*(start|end)*$/)) {
        /* tslint:disable-next-line: no-parameter-reassignment */
        position = 'auto';
    }
    /** @type {?} */
    var placementAuto = !!position.match(/auto/g);
    // support old placements 'auto left|right|top|bottom'
    /** @type {?} */
    var placement = position.match(/auto\s(left|right|top|bottom)/)
        ? position.split(' ')[1] || 'auto'
        : position;
    /** @type {?} */
    var targetOffset = getTargetOffsets(targetElement, hostElPosition, placement);
    placement = computeAutoPlacement(placement, hostElPosition, targetElement, hostElement, options ? options.allowedPositions : undefined);
    return {
        options: options,
        instance: {
            target: targetElement,
            host: hostElement,
            arrow: null
        },
        offsets: {
            target: targetOffset,
            host: hostElPosition,
            arrow: null
        },
        positionFixed: false,
        placement: placement,
        placementAuto: placementAuto
    };
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} data
 * @return {?}
 */
function preventOverflow(data) {
    if (!isModifierEnabled(data.options, 'preventOverflow')) {
        return data;
    }
    // NOTE: DOM access here
    // resets the targetOffsets's position so that the document size can be calculated excluding
    // the size of the targetOffsets element itself
    /** @type {?} */
    var transformProp = 'transform';
    /** @type {?} */
    var targetStyles = data.instance.target.style;
    // assignment to help minification
    var top = targetStyles.top, left = targetStyles.left, _a = transformProp, transform = targetStyles[_a];
    targetStyles.top = '';
    targetStyles.left = '';
    targetStyles[transformProp] = '';
    /** @type {?} */
    var boundaries = getBoundaries(data.instance.target, data.instance.host, 0, // padding
    'scrollParent', false // positionFixed
    );
    // NOTE: DOM access here
    // restores the original style properties after the offsets have been computed
    targetStyles.top = top;
    targetStyles.left = left;
    targetStyles[transformProp] = transform;
    /** @type {?} */
    var order = ['left', 'right', 'top', 'bottom'];
    /** @type {?} */
    var check = {
        primary: /**
         * @param {?} placement
         * @return {?}
         */
        function (placement) {
            var _a;
            /** @type {?} */
            var value = ((/** @type {?} */ (data))).offsets.target[placement];
            if (((/** @type {?} */ (data))).offsets.target[placement] < boundaries[placement] &&
                !false // options.escapeWithReference
            ) {
                value = Math.max(((/** @type {?} */ (data))).offsets.target[placement], boundaries[placement]);
            }
            return _a = {}, _a[placement] = value, _a;
        },
        secondary: /**
         * @param {?} placement
         * @return {?}
         */
        function (placement) {
            var _a;
            /** @type {?} */
            var mainSide = placement === 'right' ? 'left' : 'top';
            /** @type {?} */
            var value = data.offsets.target[mainSide];
            if (((/** @type {?} */ (data))).offsets.target[placement] > boundaries[placement] &&
                !false // escapeWithReference
            ) {
                value = Math.min(data.offsets.target[mainSide], boundaries[placement] -
                    (placement === 'right' ? data.offsets.target.width : data.offsets.target.height));
            }
            return _a = {}, _a[mainSide] = value, _a;
        }
    };
    /** @type {?} */
    var side;
    order.forEach((/**
     * @param {?} placement
     * @return {?}
     */
    function (placement) {
        side = ['left', 'top']
            .indexOf(placement) !== -1
            ? 'primary'
            : 'secondary';
        data.offsets.target = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, data.offsets.target, ((/** @type {?} */ (check)))[side](placement));
    }));
    return data;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} data
 * @return {?}
 */
function shift(data) {
    var _a, _b;
    /** @type {?} */
    var placement = data.placement;
    /** @type {?} */
    var basePlacement = placement.split(' ')[0];
    /** @type {?} */
    var shiftvariation = placement.split(' ')[1];
    if (shiftvariation) {
        var _c = data.offsets, host = _c.host, target = _c.target;
        /** @type {?} */
        var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
        /** @type {?} */
        var side = isVertical ? 'left' : 'top';
        /** @type {?} */
        var measurement = isVertical ? 'width' : 'height';
        /** @type {?} */
        var shiftOffsets = {
            start: (_a = {}, _a[side] = host[side], _a),
            end: (_b = {},
                _b[side] = host[side] + host[measurement] - target[measurement],
                _b)
        };
        data.offsets.target = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, target, ((/** @type {?} */ (shiftOffsets)))[shiftvariation]);
    }
    return data;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Positioning = /** @class */ (function () {
    function Positioning() {
    }
    /**
     * @param {?} hostElement
     * @param {?} targetElement
     * @param {?=} round
     * @return {?}
     */
    Positioning.prototype.position = /**
     * @param {?} hostElement
     * @param {?} targetElement
     * @param {?=} round
     * @return {?}
     */
    function (hostElement, targetElement, round) {
        if (round === void 0) { round = true; }
        return this.offset(hostElement, targetElement, false);
    };
    /**
     * @param {?} hostElement
     * @param {?} targetElement
     * @param {?=} round
     * @return {?}
     */
    Positioning.prototype.offset = /**
     * @param {?} hostElement
     * @param {?} targetElement
     * @param {?=} round
     * @return {?}
     */
    function (hostElement, targetElement, round) {
        if (round === void 0) { round = true; }
        return getReferenceOffsets(targetElement, hostElement);
    };
    /**
     * @param {?} hostElement
     * @param {?} targetElement
     * @param {?} position
     * @param {?=} appendToBody
     * @param {?=} options
     * @return {?}
     */
    Positioning.prototype.positionElements = /**
     * @param {?} hostElement
     * @param {?} targetElement
     * @param {?} position
     * @param {?=} appendToBody
     * @param {?=} options
     * @return {?}
     */
    function (hostElement, targetElement, position, appendToBody, options) {
        /** @type {?} */
        var chainOfModifiers = [flip, shift, preventOverflow, arrow];
        return chainOfModifiers.reduce((/**
         * @param {?} modifiedData
         * @param {?} modifier
         * @return {?}
         */
        function (modifiedData, modifier) { return modifier(modifiedData); }), initData(targetElement, hostElement, position, options));
    };
    return Positioning;
}());
/** @type {?} */
var positionService = new Positioning();
/**
 * @param {?} hostElement
 * @param {?} targetElement
 * @param {?} placement
 * @param {?=} appendToBody
 * @param {?=} options
 * @param {?=} renderer
 * @return {?}
 */
function positionElements(hostElement, targetElement, placement, appendToBody, options, renderer) {
    /** @type {?} */
    var data = positionService.positionElements(hostElement, targetElement, placement, appendToBody, options);
    /** @type {?} */
    var offsets = getOffsets(data);
    setStyles(targetElement, {
        'will-change': 'transform',
        top: '0px',
        left: '0px',
        transform: "translate3d(" + offsets.left + "px, " + offsets.top + "px, 0px)"
    }, renderer);
    if (data.instance.arrow) {
        setStyles(data.instance.arrow, data.offsets.arrow, renderer);
    }
    updateContainerClass(data, renderer);
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PositioningService = /** @class */ (function () {
    function PositioningService(rendererFactory, platformId) {
        var _this = this;
        this.update$$ = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
        this.positionElements = new Map();
        this.isDisabled = false;
        if (Object(_angular_common__WEBPACK_IMPORTED_MODULE_2__["isPlatformBrowser"])(platformId)) {
            this.triggerEvent$ = Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["merge"])(Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["fromEvent"])(window, 'scroll'), Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["fromEvent"])(window, 'resize'), 
            /* tslint:disable-next-line: deprecation */
            Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["of"])(0, rxjs__WEBPACK_IMPORTED_MODULE_3__["animationFrameScheduler"]), this.update$$);
            this.triggerEvent$.subscribe((/**
             * @return {?}
             */
            function () {
                if (_this.isDisabled) {
                    return;
                }
                _this.positionElements
                    /* tslint:disable-next-line: no-any */
                    .forEach((/**
                 * @param {?} positionElement
                 * @return {?}
                 */
                function (positionElement) {
                    positionElements(_getHtmlElement(positionElement.target), _getHtmlElement(positionElement.element), positionElement.attachment, positionElement.appendToBody, _this.options, rendererFactory.createRenderer(null, null));
                }));
            }));
        }
    }
    /**
     * @param {?} options
     * @return {?}
     */
    PositioningService.prototype.position = /**
     * @param {?} options
     * @return {?}
     */
    function (options) {
        this.addPositionElement(options);
    };
    Object.defineProperty(PositioningService.prototype, "event$", {
        get: /**
         * @return {?}
         */
        function () {
            return this.triggerEvent$;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    PositioningService.prototype.disable = /**
     * @return {?}
     */
    function () {
        this.isDisabled = true;
    };
    /**
     * @return {?}
     */
    PositioningService.prototype.enable = /**
     * @return {?}
     */
    function () {
        this.isDisabled = false;
    };
    /**
     * @param {?} options
     * @return {?}
     */
    PositioningService.prototype.addPositionElement = /**
     * @param {?} options
     * @return {?}
     */
    function (options) {
        this.positionElements.set(_getHtmlElement(options.element), options);
    };
    /**
     * @return {?}
     */
    PositioningService.prototype.calcPosition = /**
     * @return {?}
     */
    function () {
        this.update$$.next();
    };
    /**
     * @param {?} elRef
     * @return {?}
     */
    PositioningService.prototype.deletePositionElement = /**
     * @param {?} elRef
     * @return {?}
     */
    function (elRef) {
        this.positionElements.delete(_getHtmlElement(elRef));
    };
    /**
     * @param {?} options
     * @return {?}
     */
    PositioningService.prototype.setOptions = /**
     * @param {?} options
     * @return {?}
     */
    function (options) {
        this.options = options;
    };
    PositioningService.decorators = [
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
    ];
    /** @nocollapse */
    PositioningService.ctorParameters = function () { return [
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory2"] },
        { type: Number, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"],] }] }
    ]; };
    return PositioningService;
}());
/**
 * @param {?} element
 * @return {?}
 */
function _getHtmlElement(element) {
    // it means that we got a selector
    if (typeof element === 'string') {
        return document.querySelector(element);
    }
    if (element instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]) {
        return element.nativeElement;
    }
    return element;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */


//# sourceMappingURL=ngx-bootstrap-positioning.js.map


/***/ }),

/***/ "./node_modules/ngx-bootstrap/tooltip/fesm5/ngx-bootstrap-tooltip.js":
/*!***************************************************************************!*\
  !*** ./node_modules/ngx-bootstrap/tooltip/fesm5/ngx-bootstrap-tooltip.js ***!
  \***************************************************************************/
/*! exports provided: TooltipConfig, TooltipContainerComponent, TooltipDirective, TooltipModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipConfig", function() { return TooltipConfig; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipContainerComponent", function() { return TooltipContainerComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipDirective", function() { return TooltipDirective; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipModule", function() { return TooltipModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ngx-bootstrap/utils */ "./node_modules/ngx-bootstrap/utils/fesm5/ngx-bootstrap-utils.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var ngx_bootstrap_component_loader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-bootstrap/component-loader */ "./node_modules/ngx-bootstrap/component-loader/fesm5/ngx-bootstrap-component-loader.js");
/* harmony import */ var ngx_bootstrap_positioning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ngx-bootstrap/positioning */ "./node_modules/ngx-bootstrap/positioning/fesm5/ngx-bootstrap-positioning.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");








/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * Default values provider for tooltip
 */
var TooltipConfig = /** @class */ (function () {
    function TooltipConfig() {
        /**
         * sets disable adaptive position
         */
        this.adaptivePosition = true;
        /**
         * tooltip placement, supported positions: 'top', 'bottom', 'left', 'right'
         */
        this.placement = 'top';
        /**
         * array of event names which triggers tooltip opening
         */
        this.triggers = 'hover focus';
        /**
         * delay before showing the tooltip
         */
        this.delay = 0;
    }
    TooltipConfig.decorators = [
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
    ];
    return TooltipConfig;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TooltipContainerComponent = /** @class */ (function () {
    function TooltipContainerComponent(config) {
        Object.assign(this, config);
    }
    Object.defineProperty(TooltipContainerComponent.prototype, "isBs3", {
        get: /**
         * @return {?}
         */
        function () {
            return Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["isBs3"])();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    TooltipContainerComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this.classMap = { in: false, fade: false };
        this.classMap[this.placement] = true;
        this.classMap["tooltip-" + this.placement] = true;
        this.classMap.in = true;
        if (this.animation) {
            this.classMap.fade = true;
        }
        if (this.containerClass) {
            this.classMap[this.containerClass] = true;
        }
    };
    TooltipContainerComponent.decorators = [
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
                    selector: 'bs-tooltip-container',
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
                    // tslint:disable-next-line
                    host: {
                        '[class]': '"tooltip in tooltip-" + placement + " " + "bs-tooltip-" + placement + " " + placement + " " + containerClass',
                        '[class.show]': '!isBs3',
                        '[class.bs3]': 'isBs3',
                        '[attr.id]': 'this.id',
                        role: 'tooltip'
                    },
                    template: "\n    <div class=\"tooltip-arrow arrow\"></div>\n    <div class=\"tooltip-inner\"><ng-content></ng-content></div>\n    ",
                    styles: ["\n    :host.tooltip {\n      display: block;\n      pointer-events: none;\n    }\n    :host.bs3.tooltip.top>.arrow {\n      margin-left: -2px;\n    }\n    :host.bs3.tooltip.bottom {\n      margin-top: 0px;\n    }\n    :host.bs3.bs-tooltip-left, :host.bs3.bs-tooltip-right{\n      margin: 0px;\n    }\n    :host.bs3.bs-tooltip-right .arrow, :host.bs3.bs-tooltip-left .arrow {\n      margin: .3rem 0;\n    }\n  "]
                }] }
    ];
    /** @nocollapse */
    TooltipContainerComponent.ctorParameters = function () { return [
        { type: TooltipConfig }
    ]; };
    return TooltipContainerComponent;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var id = 0;
var TooltipDirective = /** @class */ (function () {
    function TooltipDirective(_viewContainerRef, cis, config, _elementRef, _renderer, _positionService) {
        this._elementRef = _elementRef;
        this._renderer = _renderer;
        this._positionService = _positionService;
        this.tooltipId = id++;
        /**
         * Fired when tooltip content changes
         */
        /* tslint:disable-next-line:no-any */
        this.tooltipChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        /**
         * Css class for tooltip container
         */
        this.containerClass = '';
        /**
         * @deprecated - removed, will be added to configuration
         */
        this.tooltipAnimation = true;
        /**
         * @deprecated
         */
        this.tooltipFadeDuration = 150;
        this.ariaDescribedby = "tooltip-" + this.tooltipId;
        /**
         * @deprecated
         */
        this.tooltipStateChanged = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this._tooltip = cis
            .createLoader(this._elementRef, _viewContainerRef, this._renderer)
            .provide({ provide: TooltipConfig, useValue: config });
        Object.assign(this, config);
        this.onShown = this._tooltip.onShown;
        this.onHidden = this._tooltip.onHidden;
    }
    Object.defineProperty(TooltipDirective.prototype, "isOpen", {
        /**
         * Returns whether or not the tooltip is currently being shown
         */
        get: /**
         * Returns whether or not the tooltip is currently being shown
         * @return {?}
         */
        function () {
            return this._tooltip.isShown;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value) {
                this.show();
            }
            else {
                this.hide();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TooltipDirective.prototype, "htmlContent", {
        /** @deprecated - please use `tooltip` instead */
        set: /**
         * @deprecated - please use `tooltip` instead
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipHtml was deprecated, please use `tooltip` instead');
            this.tooltip = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TooltipDirective.prototype, "_placement", {
        /** @deprecated - please use `placement` instead */
        set: /**
         * @deprecated - please use `placement` instead
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipPlacement was deprecated, please use `placement` instead');
            this.placement = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TooltipDirective.prototype, "_isOpen", {
        get: /**
         * @return {?}
         */
        function () {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipIsOpen was deprecated, please use `isOpen` instead');
            return this.isOpen;
        },
        /** @deprecated - please use `isOpen` instead */
        set: /**
         * @deprecated - please use `isOpen` instead
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipIsOpen was deprecated, please use `isOpen` instead');
            this.isOpen = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TooltipDirective.prototype, "_enable", {
        get: /**
         * @return {?}
         */
        function () {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipEnable was deprecated, please use `isDisabled` instead');
            return this.isDisabled;
        },
        /** @deprecated - please use `isDisabled` instead */
        set: /**
         * @deprecated - please use `isDisabled` instead
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipEnable was deprecated, please use `isDisabled` instead');
            this.isDisabled = !value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TooltipDirective.prototype, "_appendToBody", {
        get: /**
         * @return {?}
         */
        function () {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipAppendToBody was deprecated, please use `container="body"` instead');
            return this.container === 'body';
        },
        /** @deprecated - please use `container="body"` instead */
        set: /**
         * @deprecated - please use `container="body"` instead
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipAppendToBody was deprecated, please use `container="body"` instead');
            this.container = value ? 'body' : this.container;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TooltipDirective.prototype, "_popupClass", {
        /** @deprecated - will replaced with customClass */
        set: /**
         * @deprecated - will replaced with customClass
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipClass deprecated');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TooltipDirective.prototype, "_tooltipContext", {
        /** @deprecated - removed */
        set: /**
         * @deprecated - removed
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipContext deprecated');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TooltipDirective.prototype, "_tooltipPopupDelay", {
        /** @deprecated */
        set: /**
         * @deprecated
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipPopupDelay is deprecated, use `delay` instead');
            this.delay = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TooltipDirective.prototype, "_tooltipTrigger", {
        /** @deprecated -  please use `triggers` instead */
        get: /**
         * @deprecated -  please use `triggers` instead
         * @return {?}
         */
        function () {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipTrigger was deprecated, please use `triggers` instead');
            return this.triggers;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["warnOnce"])('tooltipTrigger was deprecated, please use `triggers` instead');
            this.triggers = (value || '').toString();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    TooltipDirective.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this._tooltip.listen({
            triggers: this.triggers,
            show: (/**
             * @return {?}
             */
            function () { return _this.show(); })
        });
        /* tslint:disable-next-line:no-any */
        this.tooltipChange.subscribe((/**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (!value) {
                _this._tooltip.hide();
            }
        }));
    };
    /**
     * Toggles an element’s tooltip. This is considered a “manual” triggering of
     * the tooltip.
     */
    /**
     * Toggles an element’s tooltip. This is considered a “manual” triggering of
     * the tooltip.
     * @return {?}
     */
    TooltipDirective.prototype.toggle = /**
     * Toggles an element’s tooltip. This is considered a “manual” triggering of
     * the tooltip.
     * @return {?}
     */
    function () {
        if (this.isOpen) {
            return this.hide();
        }
        this.show();
    };
    /**
     * Opens an element’s tooltip. This is considered a “manual” triggering of
     * the tooltip.
     */
    /**
     * Opens an element’s tooltip. This is considered a “manual” triggering of
     * the tooltip.
     * @return {?}
     */
    TooltipDirective.prototype.show = /**
     * Opens an element’s tooltip. This is considered a “manual” triggering of
     * the tooltip.
     * @return {?}
     */
    function () {
        var _this = this;
        this._positionService.setOptions({
            modifiers: {
                flip: {
                    enabled: this.adaptivePosition
                },
                preventOverflow: {
                    enabled: this.adaptivePosition
                }
            }
        });
        if (this.isOpen ||
            this.isDisabled ||
            this._delayTimeoutId ||
            !this.tooltip) {
            return;
        }
        /** @type {?} */
        var showTooltip = (/**
         * @return {?}
         */
        function () {
            if (_this._delayTimeoutId) {
                _this._delayTimeoutId = undefined;
            }
            _this._tooltip
                .attach(TooltipContainerComponent)
                .to(_this.container)
                .position({ attachment: _this.placement })
                .show({
                content: _this.tooltip,
                placement: _this.placement,
                containerClass: _this.containerClass,
                id: _this.ariaDescribedby
            });
        });
        /** @type {?} */
        var cancelDelayedTooltipShowing = (/**
         * @return {?}
         */
        function () {
            if (_this._tooltipCancelShowFn) {
                _this._tooltipCancelShowFn();
            }
        });
        if (this.delay) {
            /** @type {?} */
            var _timer_1 = Object(rxjs__WEBPACK_IMPORTED_MODULE_5__["timer"])(this.delay).subscribe((/**
             * @return {?}
             */
            function () {
                showTooltip();
                cancelDelayedTooltipShowing();
            }));
            if (this.triggers) {
                /** @type {?} */
                var triggers = Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["parseTriggers"])(this.triggers);
                this._tooltipCancelShowFn = this._renderer.listen(this._elementRef.nativeElement, triggers[0].close, (/**
                 * @return {?}
                 */
                function () {
                    _timer_1.unsubscribe();
                    cancelDelayedTooltipShowing();
                }));
            }
        }
        else {
            showTooltip();
        }
    };
    /**
     * Closes an element’s tooltip. This is considered a “manual” triggering of
     * the tooltip.
     */
    /**
     * Closes an element’s tooltip. This is considered a “manual” triggering of
     * the tooltip.
     * @return {?}
     */
    TooltipDirective.prototype.hide = /**
     * Closes an element’s tooltip. This is considered a “manual” triggering of
     * the tooltip.
     * @return {?}
     */
    function () {
        var _this = this;
        if (this._delayTimeoutId) {
            clearTimeout(this._delayTimeoutId);
            this._delayTimeoutId = undefined;
        }
        if (!this._tooltip.isShown) {
            return;
        }
        this._tooltip.instance.classMap.in = false;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this._tooltip.hide();
        }), this.tooltipFadeDuration);
    };
    /**
     * @return {?}
     */
    TooltipDirective.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this._tooltip.dispose();
    };
    TooltipDirective.decorators = [
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
                    selector: '[tooltip], [tooltipHtml]',
                    exportAs: 'bs-tooltip'
                },] }
    ];
    /** @nocollapse */
    TooltipDirective.ctorParameters = function () { return [
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] },
        { type: ngx_bootstrap_component_loader__WEBPACK_IMPORTED_MODULE_3__["ComponentLoaderFactory"] },
        { type: TooltipConfig },
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] },
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"] },
        { type: ngx_bootstrap_positioning__WEBPACK_IMPORTED_MODULE_4__["PositioningService"] }
    ]; };
    TooltipDirective.propDecorators = {
        adaptivePosition: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        tooltip: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        tooltipChange: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] }],
        placement: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        triggers: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        container: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        containerClass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        isOpen: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        isDisabled: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        delay: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        onShown: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] }],
        onHidden: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] }],
        htmlContent: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['tooltipHtml',] }],
        _placement: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['tooltipPlacement',] }],
        _isOpen: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['tooltipIsOpen',] }],
        _enable: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['tooltipEnable',] }],
        _appendToBody: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['tooltipAppendToBody',] }],
        tooltipAnimation: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        _popupClass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['tooltipClass',] }],
        _tooltipContext: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['tooltipContext',] }],
        _tooltipPopupDelay: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['tooltipPopupDelay',] }],
        tooltipFadeDuration: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
        _tooltipTrigger: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['tooltipTrigger',] }],
        ariaDescribedby: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"], args: ['attr.aria-describedby',] }],
        tooltipStateChanged: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] }]
    };
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__decorate"])([
        Object(ngx_bootstrap_utils__WEBPACK_IMPORTED_MODULE_1__["OnChange"])(),
        Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__metadata"])("design:type", Object)
    ], TooltipDirective.prototype, "tooltip", void 0);
    return TooltipDirective;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TooltipModule = /** @class */ (function () {
    function TooltipModule() {
    }
    /**
     * @return {?}
     */
    TooltipModule.forRoot = /**
     * @return {?}
     */
    function () {
        return {
            ngModule: TooltipModule,
            providers: [TooltipConfig, ngx_bootstrap_component_loader__WEBPACK_IMPORTED_MODULE_3__["ComponentLoaderFactory"], ngx_bootstrap_positioning__WEBPACK_IMPORTED_MODULE_4__["PositioningService"]]
        };
    };
    TooltipModule.decorators = [
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_6__["CommonModule"]],
                    declarations: [TooltipDirective, TooltipContainerComponent],
                    exports: [TooltipDirective],
                    entryComponents: [TooltipContainerComponent]
                },] }
    ];
    return TooltipModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */


//# sourceMappingURL=ngx-bootstrap-tooltip.js.map


/***/ }),

/***/ "./node_modules/ngx-bootstrap/utils/fesm5/ngx-bootstrap-utils.js":
/*!***********************************************************************!*\
  !*** ./node_modules/ngx-bootstrap/utils/fesm5/ngx-bootstrap-utils.js ***!
  \***********************************************************************/
/*! exports provided: LinkedList, OnChange, Trigger, Utils, document, isBs3, listenToTriggers, listenToTriggersV2, parseTriggers, registerEscClick, registerOutsideClick, setTheme, warnOnce, window */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinkedList", function() { return LinkedList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OnChange", function() { return OnChange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Trigger", function() { return Trigger; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Utils", function() { return Utils; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "document", function() { return document$1; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBs3", function() { return isBs3; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listenToTriggers", function() { return listenToTriggers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listenToTriggersV2", function() { return listenToTriggersV2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseTriggers", function() { return parseTriggers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerEscClick", function() { return registerEscClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerOutsideClick", function() { return registerOutsideClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTheme", function() { return setTheme; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "warnOnce", function() { return warnOnce; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return win; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");


/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @copyright Valor Software
 * @copyright Angular ng-bootstrap team
 */
var Trigger = /** @class */ (function () {
    function Trigger(open, close) {
        this.open = open;
        this.close = close || open;
    }
    /**
     * @return {?}
     */
    Trigger.prototype.isManual = /**
     * @return {?}
     */
    function () {
        return this.open === 'manual' || this.close === 'manual';
    };
    return Trigger;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var DEFAULT_ALIASES = {
    hover: ['mouseover', 'mouseout'],
    focus: ['focusin', 'focusout']
};
/* tslint:disable-next-line: no-any */
/**
 * @param {?} triggers
 * @param {?=} aliases
 * @return {?}
 */
function parseTriggers(triggers, aliases) {
    if (aliases === void 0) { aliases = DEFAULT_ALIASES; }
    /** @type {?} */
    var trimmedTriggers = (triggers || '').trim();
    if (trimmedTriggers.length === 0) {
        return [];
    }
    /** @type {?} */
    var parsedTriggers = trimmedTriggers
        .split(/\s+/)
        .map((/**
     * @param {?} trigger
     * @return {?}
     */
    function (trigger) { return trigger.split(':'); }))
        .map((/**
     * @param {?} triggerPair
     * @return {?}
     */
    function (triggerPair) {
        /** @type {?} */
        var alias = aliases[triggerPair[0]] || triggerPair;
        return new Trigger(alias[0], alias[1]);
    }));
    /** @type {?} */
    var manualTriggers = parsedTriggers.filter((/**
     * @param {?} triggerPair
     * @return {?}
     */
    function (triggerPair) {
        return triggerPair.isManual();
    }));
    if (manualTriggers.length > 1) {
        throw new Error('Triggers parse error: only one manual trigger is allowed');
    }
    if (manualTriggers.length === 1 && parsedTriggers.length > 1) {
        throw new Error('Triggers parse error: manual trigger can\'t be mixed with other triggers');
    }
    return parsedTriggers;
}
/**
 * @param {?} renderer
 * @param {?} target
 * @param {?} triggers
 * @param {?} showFn
 * @param {?} hideFn
 * @param {?} toggleFn
 * @return {?}
 */
function listenToTriggers(renderer, 
/* tslint:disable-next-line: no-any */
target, triggers, showFn, hideFn, toggleFn) {
    /** @type {?} */
    var parsedTriggers = parseTriggers(triggers);
    /* tslint:disable-next-line: no-any */
    /** @type {?} */
    var listeners = [];
    if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {
        return Function.prototype;
    }
    parsedTriggers.forEach((/**
     * @param {?} trigger
     * @return {?}
     */
    function (trigger) {
        if (trigger.open === trigger.close) {
            listeners.push(renderer.listen(target, trigger.open, toggleFn));
            return;
        }
        listeners.push(renderer.listen(target, trigger.open, showFn), renderer.listen(target, trigger.close, hideFn));
    }));
    return (/**
     * @return {?}
     */
    function () {
        listeners.forEach((/**
         * @param {?} unsubscribeFn
         * @return {?}
         */
        function (unsubscribeFn) { return unsubscribeFn(); }));
    });
}
/**
 * @param {?} renderer
 * @param {?} options
 * @return {?}
 */
function listenToTriggersV2(renderer, options) {
    /** @type {?} */
    var parsedTriggers = parseTriggers(options.triggers);
    /** @type {?} */
    var target = options.target;
    // do nothing
    if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {
        return Function.prototype;
    }
    // all listeners
    /* tslint:disable-next-line: no-any */
    /** @type {?} */
    var listeners = [];
    // lazy listeners registration
    /** @type {?} */
    var _registerHide = [];
    /** @type {?} */
    var registerHide = (/**
     * @return {?}
     */
    function () {
        // add hide listeners to unregister array
        _registerHide.forEach((/**
         * @param {?} fn
         * @return {?}
         */
        function (fn) { return listeners.push(fn()); }));
        // register hide events only once
        _registerHide.length = 0;
    });
    // register open\close\toggle listeners
    parsedTriggers.forEach((/**
     * @param {?} trigger
     * @return {?}
     */
    function (trigger) {
        /** @type {?} */
        var useToggle = trigger.open === trigger.close;
        /** @type {?} */
        var showFn = useToggle ? options.toggle : options.show;
        if (!useToggle) {
            _registerHide.push((/**
             * @return {?}
             */
            function () {
                return renderer.listen(target, trigger.close, options.hide);
            }));
        }
        listeners.push(renderer.listen(target, trigger.open, (/**
         * @return {?}
         */
        function () { return showFn(registerHide); })));
    }));
    return (/**
     * @return {?}
     */
    function () {
        listeners.forEach((/**
         * @param {?} unsubscribeFn
         * @return {?}
         */
        function (unsubscribeFn) { return unsubscribeFn(); }));
    });
}
/**
 * @param {?} renderer
 * @param {?} options
 * @return {?}
 */
function registerOutsideClick(renderer, options) {
    if (!options.outsideClick) {
        return Function.prototype;
    }
    /* tslint:disable-next-line: no-any */
    return renderer.listen('document', 'click', (/**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (options.target && options.target.contains(event.target)) {
            return undefined;
        }
        if (options.targets &&
            options.targets.some((/**
             * @param {?} target
             * @return {?}
             */
            function (target) { return target.contains(event.target); }))) {
            return undefined;
        }
        options.hide();
    }));
}
/**
 * @param {?} renderer
 * @param {?} options
 * @return {?}
 */
function registerEscClick(renderer, options) {
    if (!options.outsideEsc) {
        return Function.prototype;
    }
    return renderer.listen('document', 'keyup.esc', (/**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (options.target && options.target.contains(event.target)) {
            return undefined;
        }
        if (options.targets &&
            options.targets.some((/**
             * @param {?} target
             * @return {?}
             */
            function (target) { return target.contains(event.target); }))) {
            return undefined;
        }
        options.hide();
    }));
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,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
 */
/**
 * JS version of browser APIs. This library can only run in the browser.
 * @type {?}
 */
var win = (typeof window !== 'undefined' && window) || (/** @type {?} */ ({}));
/** @type {?} */
var document$1 = win.document;
/** @type {?} */
var location = win.location;
/** @type {?} */
var gc = win.gc ? (/**
 * @return {?}
 */
function () { return win.gc(); }) : (/**
 * @return {?}
 */
function () { return null; });
/** @type {?} */
var performance = win.performance ? win.performance : null;
/** @type {?} */
var Event = win.Event;
/** @type {?} */
var MouseEvent = win.MouseEvent;
/** @type {?} */
var KeyboardEvent = win.KeyboardEvent;
/** @type {?} */
var EventTarget = win.EventTarget;
/** @type {?} */
var History = win.History;
/** @type {?} */
var Location = win.Location;
/** @type {?} */
var EventListener = win.EventListener;

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var guessedVersion;
/**
 * @return {?}
 */
function _guessBsVersion() {
    if (typeof document === 'undefined') {
        return null;
    }
    /** @type {?} */
    var spanEl = document.createElement('span');
    spanEl.innerText = 'test bs version';
    document.body.appendChild(spanEl);
    spanEl.classList.add('d-none');
    /** @type {?} */
    var rect = spanEl.getBoundingClientRect();
    document.body.removeChild(spanEl);
    if (!rect) {
        return 'bs3';
    }
    return rect.top === 0 ? 'bs4' : 'bs3';
}
/**
 * @param {?} theme
 * @return {?}
 */
function setTheme(theme) {
    guessedVersion = theme;
}
// todo: in ngx-bootstrap, bs4 will became a default one
/**
 * @return {?}
 */
function isBs3() {
    if (typeof win === 'undefined') {
        return true;
    }
    if (typeof win.__theme === 'undefined') {
        if (guessedVersion) {
            return guessedVersion === 'bs3';
        }
        guessedVersion = _guessBsVersion();
        return guessedVersion === 'bs3';
    }
    return win.__theme !== 'bs4';
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T
 */
var  /**
 * @template T
 */
LinkedList = /** @class */ (function () {
    function LinkedList() {
        this.length = 0;
        this.asArray = [];
        // Array methods overriding END
    }
    /**
     * @param {?} position
     * @return {?}
     */
    LinkedList.prototype.get = /**
     * @param {?} position
     * @return {?}
     */
    function (position) {
        if (this.length === 0 || position < 0 || position >= this.length) {
            return void 0;
        }
        /** @type {?} */
        var current = this.head;
        for (var index = 0; index < position; index++) {
            current = current.next;
        }
        return current.value;
    };
    /**
     * @param {?} value
     * @param {?=} position
     * @return {?}
     */
    LinkedList.prototype.add = /**
     * @param {?} value
     * @param {?=} position
     * @return {?}
     */
    function (value, position) {
        if (position === void 0) { position = this.length; }
        if (position < 0 || position > this.length) {
            throw new Error('Position is out of the list');
        }
        /* tslint:disable-next-line: no-any*/
        /** @type {?} */
        var node = {
            value: value,
            next: undefined,
            previous: undefined
        };
        if (this.length === 0) {
            this.head = node;
            this.tail = node;
            this.current = node;
        }
        else {
            if (position === 0) {
                // first node
                node.next = this.head;
                this.head.previous = node;
                this.head = node;
            }
            else if (position === this.length) {
                // last node
                this.tail.next = node;
                node.previous = this.tail;
                this.tail = node;
            }
            else {
                // node in middle
                /** @type {?} */
                var currentPreviousNode = this.getNode(position - 1);
                /** @type {?} */
                var currentNextNode = currentPreviousNode.next;
                currentPreviousNode.next = node;
                currentNextNode.previous = node;
                node.previous = currentPreviousNode;
                node.next = currentNextNode;
            }
        }
        this.length++;
        this.createInternalArrayRepresentation();
    };
    /**
     * @param {?=} position
     * @return {?}
     */
    LinkedList.prototype.remove = /**
     * @param {?=} position
     * @return {?}
     */
    function (position) {
        if (position === void 0) { position = 0; }
        if (this.length === 0 || position < 0 || position >= this.length) {
            throw new Error('Position is out of the list');
        }
        if (position === 0) {
            // first node
            this.head = this.head.next;
            if (this.head) {
                // there is no second node
                this.head.previous = undefined;
            }
            else {
                // there is no second node
                this.tail = undefined;
            }
        }
        else if (position === this.length - 1) {
            // last node
            this.tail = this.tail.previous;
            this.tail.next = undefined;
        }
        else {
            // middle node
            /** @type {?} */
            var removedNode = this.getNode(position);
            removedNode.next.previous = removedNode.previous;
            removedNode.previous.next = removedNode.next;
        }
        this.length--;
        this.createInternalArrayRepresentation();
    };
    /**
     * @param {?} position
     * @param {?} value
     * @return {?}
     */
    LinkedList.prototype.set = /**
     * @param {?} position
     * @param {?} value
     * @return {?}
     */
    function (position, value) {
        if (this.length === 0 || position < 0 || position >= this.length) {
            throw new Error('Position is out of the list');
        }
        /** @type {?} */
        var node = this.getNode(position);
        node.value = value;
        this.createInternalArrayRepresentation();
    };
    /**
     * @return {?}
     */
    LinkedList.prototype.toArray = /**
     * @return {?}
     */
    function () {
        return this.asArray;
    };
    /* tslint:disable-next-line: no-any*/
    /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    LinkedList.prototype.findAll = /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        /** @type {?} */
        var current = this.head;
        /* tslint:disable-next-line: no-any*/
        /** @type {?} */
        var result = [];
        for (var index = 0; index < this.length; index++) {
            if (fn(current.value, index)) {
                result.push({ index: index, value: current.value });
            }
            current = current.next;
        }
        return result;
    };
    // Array methods overriding start
    // Array methods overriding start
    /**
     * @param {...?} args
     * @return {?}
     */
    LinkedList.prototype.push = 
    // Array methods overriding start
    /**
     * @param {...?} args
     * @return {?}
     */
    function () {
        var _this = this;
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        /* tslint:disable-next-line: no-any*/
        args.forEach((/**
         * @param {?} arg
         * @return {?}
         */
        function (arg) {
            _this.add(arg);
        }));
        return this.length;
    };
    /**
     * @return {?}
     */
    LinkedList.prototype.pop = /**
     * @return {?}
     */
    function () {
        if (this.length === 0) {
            return undefined;
        }
        /** @type {?} */
        var last = this.tail;
        this.remove(this.length - 1);
        return last.value;
    };
    /**
     * @param {...?} args
     * @return {?}
     */
    LinkedList.prototype.unshift = /**
     * @param {...?} args
     * @return {?}
     */
    function () {
        var _this = this;
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        args.reverse();
        /* tslint:disable-next-line: no-any*/
        args.forEach((/**
         * @param {?} arg
         * @return {?}
         */
        function (arg) {
            _this.add(arg, 0);
        }));
        return this.length;
    };
    /**
     * @return {?}
     */
    LinkedList.prototype.shift = /**
     * @return {?}
     */
    function () {
        if (this.length === 0) {
            return undefined;
        }
        /** @type {?} */
        var lastItem = this.head.value;
        this.remove();
        return lastItem;
    };
    /* tslint:disable-next-line: no-any*/
    /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    LinkedList.prototype.forEach = /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        /** @type {?} */
        var current = this.head;
        for (var index = 0; index < this.length; index++) {
            fn(current.value, index);
            current = current.next;
        }
    };
    /**
     * @param {?} value
     * @return {?}
     */
    LinkedList.prototype.indexOf = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        /** @type {?} */
        var current = this.head;
        /** @type {?} */
        var position = 0;
        for (var index = 0; index < this.length; index++) {
            if (current.value === value) {
                position = index;
                break;
            }
            current = current.next;
        }
        return position;
    };
    /* tslint:disable-next-line: no-any*/
    /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    LinkedList.prototype.some = /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        /** @type {?} */
        var current = this.head;
        /** @type {?} */
        var result = false;
        while (current && !result) {
            if (fn(current.value)) {
                result = true;
                break;
            }
            current = current.next;
        }
        return result;
    };
    /* tslint:disable-next-line: no-any*/
    /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    LinkedList.prototype.every = /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        /** @type {?} */
        var current = this.head;
        /** @type {?} */
        var result = true;
        while (current && result) {
            if (!fn(current.value)) {
                result = false;
            }
            current = current.next;
        }
        return result;
    };
    /**
     * @return {?}
     */
    LinkedList.prototype.toString = /**
     * @return {?}
     */
    function () {
        return '[Linked List]';
    };
    /* tslint:disable-next-line: no-any*/
    /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    LinkedList.prototype.find = /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        /** @type {?} */
        var current = this.head;
        /** @type {?} */
        var result;
        for (var index = 0; index < this.length; index++) {
            if (fn(current.value, index)) {
                result = current.value;
                break;
            }
            current = current.next;
        }
        return result;
    };
    /* tslint:disable-next-line: no-any*/
    /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    LinkedList.prototype.findIndex = /* tslint:disable-next-line: no-any*/
    /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        /** @type {?} */
        var current = this.head;
        /** @type {?} */
        var result;
        for (var index = 0; index < this.length; index++) {
            if (fn(current.value, index)) {
                result = index;
                break;
            }
            current = current.next;
        }
        return result;
    };
    /* tslint:disable-next-line: no-any*/
    /* tslint:disable-next-line: no-any*/
    /**
     * @protected
     * @param {?} position
     * @return {?}
     */
    LinkedList.prototype.getNode = /* tslint:disable-next-line: no-any*/
    /**
     * @protected
     * @param {?} position
     * @return {?}
     */
    function (position) {
        if (this.length === 0 || position < 0 || position >= this.length) {
            throw new Error('Position is out of the list');
        }
        /** @type {?} */
        var current = this.head;
        for (var index = 0; index < position; index++) {
            current = current.next;
        }
        return current;
    };
    /**
     * @protected
     * @return {?}
     */
    LinkedList.prototype.createInternalArrayRepresentation = /**
     * @protected
     * @return {?}
     */
    function () {
        /* tslint:disable-next-line: no-any*/
        /** @type {?} */
        var outArray = [];
        /** @type {?} */
        var current = this.head;
        while (current) {
            outArray.push(current.value);
            current = current.next;
        }
        this.asArray = outArray;
    };
    return LinkedList;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/*tslint:disable:no-invalid-this */
/* tslint:disable-next-line: no-any */
/**
 * @param {?=} defaultValue
 * @return {?}
 */
function OnChange(defaultValue) {
    /** @type {?} */
    var sufix = 'Change';
    /* tslint:disable-next-line: no-any */
    return (/**
     * @param {?} target
     * @param {?} propertyKey
     * @return {?}
     */
    function OnChangeHandler(target, propertyKey) {
        /** @type {?} */
        var _key = " __" + propertyKey + "Value";
        Object.defineProperty(target, propertyKey, {
            /* tslint:disable-next-line: no-any */
            get: /* tslint:disable-next-line: no-any */
            /**
             * @return {?}
             */
            function () {
                return this[_key];
            },
            /* tslint:disable-next-line: no-any */
            set: /* tslint:disable-next-line: no-any */
            /**
             * @param {?} value
             * @return {?}
             */
            function (value) {
                /** @type {?} */
                var prevValue = this[_key];
                this[_key] = value;
                if (prevValue !== value && this[propertyKey + sufix]) {
                    this[propertyKey + sufix].emit(value);
                }
            }
        });
    });
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Utils = /** @class */ (function () {
    function Utils() {
    }
    /* tslint:disable-next-line: no-any */
    /* tslint:disable-next-line: no-any */
    /**
     * @param {?} element
     * @return {?}
     */
    Utils.reflow = /* tslint:disable-next-line: no-any */
    /**
     * @param {?} element
     * @return {?}
     */
    function (element) {
        /* tslint:disable-next-line: no-any */
        ((/**
         * @param {?} bs
         * @return {?}
         */
        function (bs) { return bs; }))(element.offsetHeight);
    };
    // source: https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js
    /* tslint:disable-next-line: no-any */
    // source: https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js
    /* tslint:disable-next-line: no-any */
    /**
     * @param {?} elem
     * @return {?}
     */
    Utils.getStyles = 
    // source: https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js
    /* tslint:disable-next-line: no-any */
    /**
     * @param {?} elem
     * @return {?}
     */
    function (elem) {
        // Support: IE <=11 only, Firefox <=30 (#15098, #14150)
        // IE throws on elements created in popups
        // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
        /** @type {?} */
        var view = elem.ownerDocument.defaultView;
        if (!view || !view.opener) {
            view = win;
        }
        return view.getComputedStyle(elem);
    };
    return Utils;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var _messagesHash = {};
/** @type {?} */
var _hideMsg = typeof console === 'undefined' || !('warn' in console);
/**
 * @param {?} msg
 * @return {?}
 */
function warnOnce(msg) {
    if (!Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["isDevMode"])() || _hideMsg || msg in _messagesHash) {
        return;
    }
    _messagesHash[msg] = true;
    /*tslint:disable-next-line*/
    console.warn(msg);
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */


//# sourceMappingURL=ngx-bootstrap-utils.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/index.js":
/*!******************************************!*\
  !*** ./node_modules/rxjs/_esm5/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(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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/internal/config.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_50__["config"]; });

/** PURE_IMPORTS_START  PURE_IMPORTS_END */





















































//# sourceMappingURL=index.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/AsyncSubject.js":
/*!**********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/AsyncSubject.js ***!
  \**********************************************************/
/*! exports provided: AsyncSubject */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */



var AsyncSubject = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncSubject, _super);
    function AsyncSubject() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.value = null;
        _this.hasNext = false;
        _this.hasCompleted = false;
        return _this;
    }
    AsyncSubject.prototype._subscribe = function (subscriber) {
        if (this.hasError) {
            subscriber.error(this.thrownError);
            return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
        }
        else if (this.hasCompleted && this.hasNext) {
            subscriber.next(this.value);
            subscriber.complete();
            return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
        }
        return _super.prototype._subscribe.call(this, subscriber);
    };
    AsyncSubject.prototype.next = function (value) {
        if (!this.hasCompleted) {
            this.value = value;
            this.hasNext = true;
        }
    };
    AsyncSubject.prototype.error = function (error) {
        if (!this.hasCompleted) {
            _super.prototype.error.call(this, error);
        }
    };
    AsyncSubject.prototype.complete = function () {
        this.hasCompleted = true;
        if (this.hasNext) {
            _super.prototype.next.call(this, this.value);
        }
        _super.prototype.complete.call(this);
    };
    return AsyncSubject;
}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));

//# sourceMappingURL=AsyncSubject.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/BehaviorSubject.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/BehaviorSubject.js ***!
  \*************************************************************/
/*! exports provided: BehaviorSubject */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js");
/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */



var BehaviorSubject = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BehaviorSubject, _super);
    function BehaviorSubject(_value) {
        var _this = _super.call(this) || this;
        _this._value = _value;
        return _this;
    }
    Object.defineProperty(BehaviorSubject.prototype, "value", {
        get: function () {
            return this.getValue();
        },
        enumerable: true,
        configurable: true
    });
    BehaviorSubject.prototype._subscribe = function (subscriber) {
        var subscription = _super.prototype._subscribe.call(this, subscriber);
        if (subscription && !subscription.closed) {
            subscriber.next(this._value);
        }
        return subscription;
    };
    BehaviorSubject.prototype.getValue = function () {
        if (this.hasError) {
            throw this.thrownError;
        }
        else if (this.closed) {
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__["ObjectUnsubscribedError"]();
        }
        else {
            return this._value;
        }
    };
    BehaviorSubject.prototype.next = function (value) {
        _super.prototype.next.call(this, this._value = value);
    };
    return BehaviorSubject;
}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));

//# sourceMappingURL=BehaviorSubject.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/InnerSubscriber.js ***!
  \*************************************************************/
/*! exports provided: InnerSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


var InnerSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerSubscriber, _super);
    function InnerSubscriber(parent, outerValue, outerIndex) {
        var _this = _super.call(this) || this;
        _this.parent = parent;
        _this.outerValue = outerValue;
        _this.outerIndex = outerIndex;
        _this.index = 0;
        return _this;
    }
    InnerSubscriber.prototype._next = function (value) {
        this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
    };
    InnerSubscriber.prototype._error = function (error) {
        this.parent.notifyError(error, this);
        this.unsubscribe();
    };
    InnerSubscriber.prototype._complete = function () {
        this.parent.notifyComplete(this);
        this.unsubscribe();
    };
    return InnerSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));

//# sourceMappingURL=InnerSubscriber.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/Notification.js":
/*!**********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/Notification.js ***!
  \**********************************************************/
/*! exports provided: Notification */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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/_esm5/internal/observable/empty.js");
/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./observable/of */ "./node_modules/rxjs/_esm5/internal/observable/of.js");
/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./observable/throwError */ "./node_modules/rxjs/_esm5/internal/observable/throwError.js");
/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */



var Notification = /*@__PURE__*/ (function () {
    function Notification(kind, value, error) {
        this.kind = kind;
        this.value = value;
        this.error = error;
        this.hasValue = kind === 'N';
    }
    Notification.prototype.observe = function (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();
        }
    };
    Notification.prototype.do = function (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();
        }
    };
    Notification.prototype.accept = function (nextOrObserver, error, complete) {
        if (nextOrObserver && typeof nextOrObserver.next === 'function') {
            return this.observe(nextOrObserver);
        }
        else {
            return this.do(nextOrObserver, error, complete);
        }
    };
    Notification.prototype.toObservable = function () {
        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');
    };
    Notification.createNext = function (value) {
        if (typeof value !== 'undefined') {
            return new Notification('N', value);
        }
        return Notification.undefinedValueNotification;
    };
    Notification.createError = function (err) {
        return new Notification('E', undefined, err);
    };
    Notification.createComplete = function () {
        return Notification.completeNotification;
    };
    Notification.completeNotification = new Notification('C');
    Notification.undefinedValueNotification = new Notification('N', undefined);
    return Notification;
}());

//# sourceMappingURL=Notification.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/Observable.js":
/*!********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/Observable.js ***!
  \********************************************************/
/*! exports provided: Observable */
/***/ (function(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/_esm5/internal/util/canReportError.js");
/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/toSubscriber */ "./node_modules/rxjs/_esm5/internal/util/toSubscriber.js");
/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../internal/symbol/observable */ "./node_modules/rxjs/_esm5/internal/symbol/observable.js");
/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/pipe */ "./node_modules/rxjs/_esm5/internal/util/pipe.js");
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ "./node_modules/rxjs/_esm5/internal/config.js");
/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */





var Observable = /*@__PURE__*/ (function () {
    function Observable(subscribe) {
        this._isScalar = false;
        if (subscribe) {
            this._subscribe = subscribe;
        }
    }
    Observable.prototype.lift = function (operator) {
        var observable = new Observable();
        observable.source = this;
        observable.operator = operator;
        return observable;
    };
    Observable.prototype.subscribe = function (observerOrNext, error, complete) {
        var operator = this.operator;
        var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete);
        if (operator) {
            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;
    };
    Observable.prototype._trySubscribe = function (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);
            }
        }
    };
    Observable.prototype.forEach = function (next, promiseCtor) {
        var _this = this;
        promiseCtor = getPromiseCtor(promiseCtor);
        return new promiseCtor(function (resolve, reject) {
            var subscription;
            subscription = _this.subscribe(function (value) {
                try {
                    next(value);
                }
                catch (err) {
                    reject(err);
                    if (subscription) {
                        subscription.unsubscribe();
                    }
                }
            }, reject, resolve);
        });
    };
    Observable.prototype._subscribe = function (subscriber) {
        var source = this.source;
        return source && source.subscribe(subscriber);
    };
    Observable.prototype[_internal_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]] = function () {
        return this;
    };
    Observable.prototype.pipe = function () {
        var operations = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            operations[_i] = arguments[_i];
        }
        if (operations.length === 0) {
            return this;
        }
        return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
    };
    Observable.prototype.toPromise = function (promiseCtor) {
        var _this = this;
        promiseCtor = getPromiseCtor(promiseCtor);
        return new promiseCtor(function (resolve, reject) {
            var value;
            _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
        });
    };
    Observable.create = function (subscribe) {
        return new Observable(subscribe);
    };
    return Observable;
}());

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/_esm5/internal/Observer.js":
/*!******************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/Observer.js ***!
  \******************************************************/
/*! exports provided: empty */
/***/ (function(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/_esm5/internal/config.js");
/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/hostReportError */ "./node_modules/rxjs/_esm5/internal/util/hostReportError.js");
/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */


var empty = {
    closed: true,
    next: function (value) { },
    error: function (err) {
        if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) {
            throw err;
        }
        else {
            Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err);
        }
    },
    complete: function () { }
};
//# sourceMappingURL=Observer.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/OuterSubscriber.js ***!
  \*************************************************************/
/*! exports provided: OuterSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


var OuterSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OuterSubscriber, _super);
    function OuterSubscriber() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.destination.next(innerValue);
    };
    OuterSubscriber.prototype.notifyError = function (error, innerSub) {
        this.destination.error(error);
    };
    OuterSubscriber.prototype.notifyComplete = function (innerSub) {
        this.destination.complete();
    };
    return OuterSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));

//# sourceMappingURL=OuterSubscriber.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/ReplaySubject.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/ReplaySubject.js ***!
  \***********************************************************/
/*! exports provided: ReplaySubject */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scheduler/queue */ "./node_modules/rxjs/_esm5/internal/scheduler/queue.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./operators/observeOn */ "./node_modules/rxjs/_esm5/internal/operators/observeOn.js");
/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js");
/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SubjectSubscription */ "./node_modules/rxjs/_esm5/internal/SubjectSubscription.js");
/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */







var ReplaySubject = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ReplaySubject, _super);
    function ReplaySubject(bufferSize, windowTime, scheduler) {
        if (bufferSize === void 0) {
            bufferSize = Number.POSITIVE_INFINITY;
        }
        if (windowTime === void 0) {
            windowTime = Number.POSITIVE_INFINITY;
        }
        var _this = _super.call(this) || this;
        _this.scheduler = scheduler;
        _this._events = [];
        _this._infiniteTimeWindow = false;
        _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
        _this._windowTime = windowTime < 1 ? 1 : windowTime;
        if (windowTime === Number.POSITIVE_INFINITY) {
            _this._infiniteTimeWindow = true;
            _this.next = _this.nextInfiniteTimeWindow;
        }
        else {
            _this.next = _this.nextTimeWindow;
        }
        return _this;
    }
    ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
        var _events = this._events;
        _events.push(value);
        if (_events.length > this._bufferSize) {
            _events.shift();
        }
        _super.prototype.next.call(this, value);
    };
    ReplaySubject.prototype.nextTimeWindow = function (value) {
        this._events.push(new ReplayEvent(this._getNow(), value));
        this._trimBufferThenGetEvents();
        _super.prototype.next.call(this, value);
    };
    ReplaySubject.prototype._subscribe = function (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_5__["ObjectUnsubscribedError"]();
        }
        else if (this.isStopped || this.hasError) {
            subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
        }
        else {
            this.observers.push(subscriber);
            subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__["SubjectSubscription"](this, subscriber);
        }
        if (scheduler) {
            subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__["ObserveOnSubscriber"](subscriber, scheduler));
        }
        if (_infiniteTimeWindow) {
            for (var i = 0; i < len && !subscriber.closed; i++) {
                subscriber.next(_events[i]);
            }
        }
        else {
            for (var i = 0; i < len && !subscriber.closed; i++) {
                subscriber.next(_events[i].value);
            }
        }
        if (this.hasError) {
            subscriber.error(this.thrownError);
        }
        else if (this.isStopped) {
            subscriber.complete();
        }
        return subscription;
    };
    ReplaySubject.prototype._getNow = function () {
        return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__["queue"]).now();
    };
    ReplaySubject.prototype._trimBufferThenGetEvents = function () {
        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_1__["Subject"]));

var ReplayEvent = /*@__PURE__*/ (function () {
    function ReplayEvent(time, value) {
        this.time = time;
        this.value = value;
    }
    return ReplayEvent;
}());
//# sourceMappingURL=ReplaySubject.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/Scheduler.js":
/*!*******************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/Scheduler.js ***!
  \*******************************************************/
/*! exports provided: Scheduler */
/***/ (function(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, now) {
        if (now === void 0) {
            now = Scheduler.now;
        }
        this.SchedulerAction = SchedulerAction;
        this.now = now;
    }
    Scheduler.prototype.schedule = function (work, delay, state) {
        if (delay === void 0) {
            delay = 0;
        }
        return new this.SchedulerAction(this, work).schedule(state, delay);
    };
    Scheduler.now = function () { return Date.now(); };
    return Scheduler;
}());

//# sourceMappingURL=Scheduler.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/Subject.js":
/*!*****************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/Subject.js ***!
  \*****************************************************/
/*! exports provided: SubjectSubscriber, Subject, AnonymousSubject */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js");
/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SubjectSubscription */ "./node_modules/rxjs/_esm5/internal/SubjectSubscription.js");
/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js");
/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */







var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscriber, _super);
    function SubjectSubscriber(destination) {
        var _this = _super.call(this, destination) || this;
        _this.destination = destination;
        return _this;
    }
    return SubjectSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));

var Subject = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subject, _super);
    function Subject() {
        var _this = _super.call(this) || this;
        _this.observers = [];
        _this.closed = false;
        _this.isStopped = false;
        _this.hasError = false;
        _this.thrownError = null;
        return _this;
    }
    Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__["rxSubscriber"]] = function () {
        return new SubjectSubscriber(this);
    };
    Subject.prototype.lift = function (operator) {
        var subject = new AnonymousSubject(this, this);
        subject.operator = operator;
        return subject;
    };
    Subject.prototype.next = function (value) {
        if (this.closed) {
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
        }
        if (!this.isStopped) {
            var observers = this.observers;
            var len = observers.length;
            var copy = observers.slice();
            for (var i = 0; i < len; i++) {
                copy[i].next(value);
            }
        }
    };
    Subject.prototype.error = function (err) {
        if (this.closed) {
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["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;
    };
    Subject.prototype.complete = function () {
        if (this.closed) {
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["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;
    };
    Subject.prototype.unsubscribe = function () {
        this.isStopped = true;
        this.closed = true;
        this.observers = null;
    };
    Subject.prototype._trySubscribe = function (subscriber) {
        if (this.closed) {
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
        }
        else {
            return _super.prototype._trySubscribe.call(this, subscriber);
        }
    };
    Subject.prototype._subscribe = function (subscriber) {
        if (this.closed) {
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
        }
        else if (this.hasError) {
            subscriber.error(this.thrownError);
            return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
        }
        else if (this.isStopped) {
            subscriber.complete();
            return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
        }
        else {
            this.observers.push(subscriber);
            return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
        }
    };
    Subject.prototype.asObservable = function () {
        var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
        observable.source = this;
        return observable;
    };
    Subject.create = function (destination, source) {
        return new AnonymousSubject(destination, source);
    };
    return Subject;
}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));

var AnonymousSubject = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnonymousSubject, _super);
    function AnonymousSubject(destination, source) {
        var _this = _super.call(this) || this;
        _this.destination = destination;
        _this.source = source;
        return _this;
    }
    AnonymousSubject.prototype.next = function (value) {
        var destination = this.destination;
        if (destination && destination.next) {
            destination.next(value);
        }
    };
    AnonymousSubject.prototype.error = function (err) {
        var destination = this.destination;
        if (destination && destination.error) {
            this.destination.error(err);
        }
    };
    AnonymousSubject.prototype.complete = function () {
        var destination = this.destination;
        if (destination && destination.complete) {
            this.destination.complete();
        }
    };
    AnonymousSubject.prototype._subscribe = function (subscriber) {
        var source = this.source;
        if (source) {
            return this.source.subscribe(subscriber);
        }
        else {
            return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
        }
    };
    return AnonymousSubject;
}(Subject));

//# sourceMappingURL=Subject.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/SubjectSubscription.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/SubjectSubscription.js ***!
  \*****************************************************************/
/*! exports provided: SubjectSubscription */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */


var SubjectSubscription = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscription, _super);
    function SubjectSubscription(subject, subscriber) {
        var _this = _super.call(this) || this;
        _this.subject = subject;
        _this.subscriber = subscriber;
        _this.closed = false;
        return _this;
    }
    SubjectSubscription.prototype.unsubscribe = function () {
        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_1__["Subscription"]));

//# sourceMappingURL=SubjectSubscription.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/Subscriber.js":
/*!********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/Subscriber.js ***!
  \********************************************************/
/*! exports provided: Subscriber, SafeSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Observer */ "./node_modules/rxjs/_esm5/internal/Observer.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js");
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./config */ "./node_modules/rxjs/_esm5/internal/config.js");
/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util/hostReportError */ "./node_modules/rxjs/_esm5/internal/util/hostReportError.js");
/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */







var Subscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subscriber, _super);
    function Subscriber(destinationOrNext, error, complete) {
        var _this = _super.call(this) || this;
        _this.syncErrorValue = null;
        _this.syncErrorThrown = false;
        _this.syncErrorThrowable = false;
        _this.isStopped = false;
        _this._parentSubscription = null;
        switch (arguments.length) {
            case 0:
                _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
                break;
            case 1:
                if (!destinationOrNext) {
                    _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
                    break;
                }
                if (typeof destinationOrNext === 'object') {
                    if (destinationOrNext instanceof Subscriber) {
                        _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
                        _this.destination = destinationOrNext;
                        destinationOrNext.add(_this);
                    }
                    else {
                        _this.syncErrorThrowable = true;
                        _this.destination = new SafeSubscriber(_this, destinationOrNext);
                    }
                    break;
                }
            default:
                _this.syncErrorThrowable = true;
                _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
                break;
        }
        return _this;
    }
    Subscriber.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__["rxSubscriber"]] = function () { return this; };
    Subscriber.create = function (next, error, complete) {
        var subscriber = new Subscriber(next, error, complete);
        subscriber.syncErrorThrowable = false;
        return subscriber;
    };
    Subscriber.prototype.next = function (value) {
        if (!this.isStopped) {
            this._next(value);
        }
    };
    Subscriber.prototype.error = function (err) {
        if (!this.isStopped) {
            this.isStopped = true;
            this._error(err);
        }
    };
    Subscriber.prototype.complete = function () {
        if (!this.isStopped) {
            this.isStopped = true;
            this._complete();
        }
    };
    Subscriber.prototype.unsubscribe = function () {
        if (this.closed) {
            return;
        }
        this.isStopped = true;
        _super.prototype.unsubscribe.call(this);
    };
    Subscriber.prototype._next = function (value) {
        this.destination.next(value);
    };
    Subscriber.prototype._error = function (err) {
        this.destination.error(err);
        this.unsubscribe();
    };
    Subscriber.prototype._complete = function () {
        this.destination.complete();
        this.unsubscribe();
    };
    Subscriber.prototype._unsubscribeAndRecycle = function () {
        var _a = this, _parent = _a._parent, _parents = _a._parents;
        this._parent = null;
        this._parents = null;
        this.unsubscribe();
        this.closed = false;
        this.isStopped = false;
        this._parent = _parent;
        this._parents = _parents;
        this._parentSubscription = null;
        return this;
    };
    return Subscriber;
}(_Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"]));

var SafeSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SafeSubscriber, _super);
    function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
        var _this = _super.call(this) || this;
        _this._parentSubscriber = _parentSubscriber;
        var next;
        var context = _this;
        if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(observerOrNext)) {
            next = observerOrNext;
        }
        else if (observerOrNext) {
            next = observerOrNext.next;
            error = observerOrNext.error;
            complete = observerOrNext.complete;
            if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]) {
                context = Object.create(observerOrNext);
                if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(context.unsubscribe)) {
                    _this.add(context.unsubscribe.bind(context));
                }
                context.unsubscribe = _this.unsubscribe.bind(_this);
            }
        }
        _this._context = context;
        _this._next = next;
        _this._error = error;
        _this._complete = complete;
        return _this;
    }
    SafeSubscriber.prototype.next = function (value) {
        if (!this.isStopped && this._next) {
            var _parentSubscriber = this._parentSubscriber;
            if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
                this.__tryOrUnsub(this._next, value);
            }
            else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
                this.unsubscribe();
            }
        }
    };
    SafeSubscriber.prototype.error = function (err) {
        if (!this.isStopped) {
            var _parentSubscriber = this._parentSubscriber;
            var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_5__["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_6__["hostReportError"])(err);
            }
            else {
                if (useDeprecatedSynchronousErrorHandling) {
                    _parentSubscriber.syncErrorValue = err;
                    _parentSubscriber.syncErrorThrown = true;
                }
                else {
                    Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
                }
                this.unsubscribe();
            }
        }
    };
    SafeSubscriber.prototype.complete = function () {
        var _this = this;
        if (!this.isStopped) {
            var _parentSubscriber = this._parentSubscriber;
            if (this._complete) {
                var wrappedComplete = function () { return _this._complete.call(_this._context); };
                if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
                    this.__tryOrUnsub(wrappedComplete);
                    this.unsubscribe();
                }
                else {
                    this.__tryOrSetError(_parentSubscriber, wrappedComplete);
                    this.unsubscribe();
                }
            }
            else {
                this.unsubscribe();
            }
        }
    };
    SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
        try {
            fn.call(this._context, value);
        }
        catch (err) {
            this.unsubscribe();
            if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
                throw err;
            }
            else {
                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
            }
        }
    };
    SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
        if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
            throw new Error('bad call');
        }
        try {
            fn.call(this._context, value);
        }
        catch (err) {
            if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
                parent.syncErrorValue = err;
                parent.syncErrorThrown = true;
                return true;
            }
            else {
                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
                return true;
            }
        }
        return false;
    };
    SafeSubscriber.prototype._unsubscribe = function () {
        var _parentSubscriber = this._parentSubscriber;
        this._context = null;
        this._parentSubscriber = null;
        _parentSubscriber.unsubscribe();
    };
    return SafeSubscriber;
}(Subscriber));

//# sourceMappingURL=Subscriber.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/Subscription.js":
/*!**********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/Subscription.js ***!
  \**********************************************************/
/*! exports provided: Subscription */
/***/ (function(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/_esm5/internal/util/isArray.js");
/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/isObject */ "./node_modules/rxjs/_esm5/internal/util/isObject.js");
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/UnsubscriptionError */ "./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js");
/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */






var Subscription = /*@__PURE__*/ (function () {
    function Subscription(unsubscribe) {
        this.closed = false;
        this._parent = null;
        this._parents = null;
        this._subscriptions = null;
        if (unsubscribe) {
            this._unsubscribe = unsubscribe;
        }
    }
    Subscription.prototype.unsubscribe = function () {
        var hasErrors = false;
        var errors;
        if (this.closed) {
            return;
        }
        var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._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)) {
            var trial = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_3__["tryCatch"])(_unsubscribe).call(this);
            if (trial === _util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"]) {
                hasErrors = true;
                errors = errors || (_util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__["UnsubscriptionError"] ?
                    flattenUnsubscriptionErrors(_util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].e.errors) : [_util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].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)) {
                    var trial = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_3__["tryCatch"])(sub.unsubscribe).call(sub);
                    if (trial === _util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"]) {
                        hasErrors = true;
                        errors = errors || [];
                        var err = _util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].e;
                        if (err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__["UnsubscriptionError"]) {
                            errors = errors.concat(flattenUnsubscriptionErrors(err.errors));
                        }
                        else {
                            errors.push(err);
                        }
                    }
                }
            }
        }
        if (hasErrors) {
            throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__["UnsubscriptionError"](errors);
        }
    };
    Subscription.prototype.add = function (teardown) {
        if (!teardown || (teardown === Subscription.EMPTY)) {
            return Subscription.EMPTY;
        }
        if (teardown === this) {
            return this;
        }
        var subscription = teardown;
        switch (typeof teardown) {
            case 'function':
                subscription = new Subscription(teardown);
            case 'object':
                if (subscription.closed || typeof subscription.unsubscribe !== 'function') {
                    return subscription;
                }
                else if (this.closed) {
                    subscription.unsubscribe();
                    return subscription;
                }
                else if (typeof subscription._addParent !== 'function') {
                    var tmp = subscription;
                    subscription = new Subscription();
                    subscription._subscriptions = [tmp];
                }
                break;
            default:
                throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
        }
        var subscriptions = this._subscriptions || (this._subscriptions = []);
        subscriptions.push(subscription);
        subscription._addParent(this);
        return subscription;
    };
    Subscription.prototype.remove = function (subscription) {
        var subscriptions = this._subscriptions;
        if (subscriptions) {
            var subscriptionIndex = subscriptions.indexOf(subscription);
            if (subscriptionIndex !== -1) {
                subscriptions.splice(subscriptionIndex, 1);
            }
        }
    };
    Subscription.prototype._addParent = function (parent) {
        var _a = this, _parent = _a._parent, _parents = _a._parents;
        if (!_parent || _parent === parent) {
            this._parent = parent;
        }
        else if (!_parents) {
            this._parents = [parent];
        }
        else if (_parents.indexOf(parent) === -1) {
            _parents.push(parent);
        }
    };
    Subscription.EMPTY = (function (empty) {
        empty.closed = true;
        return empty;
    }(new Subscription()));
    return Subscription;
}());

function flattenUnsubscriptionErrors(errors) {
    return errors.reduce(function (errs, err) { return errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__["UnsubscriptionError"]) ? err.errors : err); }, []);
}
//# sourceMappingURL=Subscription.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/config.js":
/*!****************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/config.js ***!
  \****************************************************/
/*! exports provided: config */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
var _enable_super_gross_mode_that_will_cause_bad_things = false;
var config = {
    Promise: undefined,
    set useDeprecatedSynchronousErrorHandling(value) {
        if (value) {
            var error = /*@__PURE__*/ new Error();
            /*@__PURE__*/ 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) {
            /*@__PURE__*/ 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/_esm5/internal/observable/ConnectableObservable.js":
/*!******************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js ***!
  \******************************************************************************/
/*! exports provided: ConnectableObservable, connectableObservableDescriptor */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../operators/refCount */ "./node_modules/rxjs/_esm5/internal/operators/refCount.js");
/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */






var ConnectableObservable = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableObservable, _super);
    function ConnectableObservable(source, subjectFactory) {
        var _this = _super.call(this) || this;
        _this.source = source;
        _this.subjectFactory = subjectFactory;
        _this._refCount = 0;
        _this._isComplete = false;
        return _this;
    }
    ConnectableObservable.prototype._subscribe = function (subscriber) {
        return this.getSubject().subscribe(subscriber);
    };
    ConnectableObservable.prototype.getSubject = function () {
        var subject = this._subject;
        if (!subject || subject.isStopped) {
            this._subject = this.subjectFactory();
        }
        return this._subject;
    };
    ConnectableObservable.prototype.connect = function () {
        var connection = this._connection;
        if (!connection) {
            this._isComplete = false;
            connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"]();
            connection.add(this.source
                .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
            if (connection.closed) {
                this._connection = null;
                connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
            }
            else {
                this._connection = connection;
            }
        }
        return connection;
    };
    ConnectableObservable.prototype.refCount = function () {
        return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__["refCount"])()(this);
    };
    return ConnectableObservable;
}(_Observable__WEBPACK_IMPORTED_MODULE_2__["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 (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableSubscriber, _super);
    function ConnectableSubscriber(destination, connectable) {
        var _this = _super.call(this, destination) || this;
        _this.connectable = connectable;
        return _this;
    }
    ConnectableSubscriber.prototype._error = function (err) {
        this._unsubscribe();
        _super.prototype._error.call(this, err);
    };
    ConnectableSubscriber.prototype._complete = function () {
        this.connectable._isComplete = true;
        this._unsubscribe();
        _super.prototype._complete.call(this);
    };
    ConnectableSubscriber.prototype._unsubscribe = function () {
        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_1__["SubjectSubscriber"]));
var RefCountOperator = /*@__PURE__*/ (function () {
    function RefCountOperator(connectable) {
        this.connectable = connectable;
    }
    RefCountOperator.prototype.call = function (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 (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
    function RefCountSubscriber(destination, connectable) {
        var _this = _super.call(this, destination) || this;
        _this.connectable = connectable;
        return _this;
    }
    RefCountSubscriber.prototype._unsubscribe = function () {
        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_3__["Subscriber"]));
//# sourceMappingURL=ConnectableObservable.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js":
/*!******************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js ***!
  \******************************************************************************/
/*! exports provided: SubscribeOnObservable */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/asap */ "./node_modules/rxjs/_esm5/internal/scheduler/asap.js");
/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isNumeric */ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js");
/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */




var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscribeOnObservable, _super);
    function SubscribeOnObservable(source, delayTime, scheduler) {
        if (delayTime === void 0) {
            delayTime = 0;
        }
        if (scheduler === void 0) {
            scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
        }
        var _this = _super.call(this) || this;
        _this.source = source;
        _this.delayTime = delayTime;
        _this.scheduler = scheduler;
        if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(delayTime) || delayTime < 0) {
            _this.delayTime = 0;
        }
        if (!scheduler || typeof scheduler.schedule !== 'function') {
            _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
        }
        return _this;
    }
    SubscribeOnObservable.create = function (source, delay, scheduler) {
        if (delay === void 0) {
            delay = 0;
        }
        if (scheduler === void 0) {
            scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
        }
        return new SubscribeOnObservable(source, delay, scheduler);
    };
    SubscribeOnObservable.dispatch = function (arg) {
        var source = arg.source, subscriber = arg.subscriber;
        return this.add(source.subscribe(subscriber));
    };
    SubscribeOnObservable.prototype._subscribe = function (subscriber) {
        var delay = this.delayTime;
        var source = this.source;
        var scheduler = this.scheduler;
        return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
            source: source, subscriber: subscriber
        });
    };
    return SubscribeOnObservable;
}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));

//# sourceMappingURL=SubscribeOnObservable.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/bindCallback.js":
/*!*********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/bindCallback.js ***!
  \*********************************************************************/
/*! exports provided: bindCallback */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "./node_modules/rxjs/_esm5/internal/AsyncSubject.js");
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/canReportError */ "./node_modules/rxjs/_esm5/internal/util/canReportError.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */






function bindCallback(callbackFunc, resultSelector, scheduler) {
    if (resultSelector) {
        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) {
            scheduler = resultSelector;
        }
        else {
            return function () {
                var args = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                }
                return bindCallback(callbackFunc, scheduler).apply(void 0, args).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, args) : resultSelector(args); }));
            };
        }
    }
    return function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        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 () {
                        var innerArgs = [];
                        for (var _i = 0; _i < arguments.length; _i++) {
                            innerArgs[_i] = arguments[_i];
                        }
                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
                        subject.complete();
                    };
                    try {
                        callbackFunc.apply(context, args.concat([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 _this = 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 () {
            var innerArgs = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                innerArgs[_i] = arguments[_i];
            }
            var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
            _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
        };
        try {
            callbackFunc.apply(context, args.concat([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/_esm5/internal/observable/bindNodeCallback.js":
/*!*************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/bindNodeCallback.js ***!
  \*************************************************************************/
/*! exports provided: bindNodeCallback */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "./node_modules/rxjs/_esm5/internal/AsyncSubject.js");
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/canReportError */ "./node_modules/rxjs/_esm5/internal/util/canReportError.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */






function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
    if (resultSelector) {
        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
            scheduler = resultSelector;
        }
        else {
            return function () {
                var args = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                }
                return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).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, args) : resultSelector(args); }));
            };
        }
    }
    return function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        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 () {
                        var innerArgs = [];
                        for (var _i = 0; _i < arguments.length; _i++) {
                            innerArgs[_i] = arguments[_i];
                        }
                        var err = innerArgs.shift();
                        if (err) {
                            subject.error(err);
                            return;
                        }
                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
                        subject.complete();
                    };
                    try {
                        callbackFunc.apply(context, args.concat([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 _this = 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 () {
            var innerArgs = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                innerArgs[_i] = arguments[_i];
            }
            var err = innerArgs.shift();
            if (err) {
                _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
            }
            else {
                var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
                _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
            }
        };
        try {
            callbackFunc.apply(context, args.concat([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/_esm5/internal/observable/combineLatest.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/combineLatest.js ***!
  \**********************************************************************/
/*! exports provided: combineLatest, CombineLatestOperator, CombineLatestSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */






var NONE = {};
function combineLatest() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    var resultSelector = null;
    var scheduler = null;
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["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_2__["isArray"])(observables[0])) {
        observables = observables[0];
    }
    return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
}
var CombineLatestOperator = /*@__PURE__*/ (function () {
    function CombineLatestOperator(resultSelector) {
        this.resultSelector = resultSelector;
    }
    CombineLatestOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
    };
    return CombineLatestOperator;
}());

var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CombineLatestSubscriber, _super);
    function CombineLatestSubscriber(destination, resultSelector) {
        var _this = _super.call(this, destination) || this;
        _this.resultSelector = resultSelector;
        _this.active = 0;
        _this.values = [];
        _this.observables = [];
        return _this;
    }
    CombineLatestSubscriber.prototype._next = function (observable) {
        this.values.push(NONE);
        this.observables.push(observable);
    };
    CombineLatestSubscriber.prototype._complete = function () {
        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_4__["subscribeToResult"])(this, observable, observable, i));
            }
        }
    };
    CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
        if ((this.active -= 1) === 0) {
            this.destination.complete();
        }
    };
    CombineLatestSubscriber.prototype.notifyNext = function (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());
            }
        }
    };
    CombineLatestSubscriber.prototype._tryResultSelector = function (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_3__["OuterSubscriber"]));

//# sourceMappingURL=combineLatest.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/concat.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/concat.js ***!
  \***************************************************************/
/*! exports provided: concat */
/***/ (function(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 _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./of */ "./node_modules/rxjs/_esm5/internal/observable/of.js");
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/concatAll */ "./node_modules/rxjs/_esm5/internal/operators/concatAll.js");
/** PURE_IMPORTS_START _util_isScheduler,_of,_from,_operators_concatAll PURE_IMPORTS_END */




function concat() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    if (observables.length === 1 || (observables.length === 2 && Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(observables[1]))) {
        return Object(_from__WEBPACK_IMPORTED_MODULE_2__["from"])(observables[0]);
    }
    return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_3__["concatAll"])()(_of__WEBPACK_IMPORTED_MODULE_1__["of"].apply(void 0, observables));
}
//# sourceMappingURL=concat.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/defer.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/defer.js ***!
  \**************************************************************/
/*! exports provided: defer */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */



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/_esm5/internal/observable/empty.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/empty.js ***!
  \**************************************************************/
/*! exports provided: EMPTY, empty, emptyScheduled */
/***/ (function(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/_esm5/internal/Observable.js");
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */

var EMPTY = /*@__PURE__*/ 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/_esm5/internal/observable/forkJoin.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/forkJoin.js ***!
  \*****************************************************************/
/*! exports provided: forkJoin */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/** PURE_IMPORTS_START tslib,_Observable,_util_isArray,_empty,_util_subscribeToResult,_OuterSubscriber,_operators_map PURE_IMPORTS_END */







function forkJoin() {
    var sources = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        sources[_i] = arguments[_i];
    }
    var resultSelector;
    if (typeof sources[sources.length - 1] === 'function') {
        resultSelector = sources.pop();
    }
    if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(sources[0])) {
        sources = sources[0];
    }
    if (sources.length === 0) {
        return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
    }
    if (resultSelector) {
        return forkJoin(sources).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_6__["map"])(function (args) { return resultSelector.apply(void 0, args); }));
    }
    return new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (subscriber) {
        return new ForkJoinSubscriber(subscriber, sources);
    });
}
var ForkJoinSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ForkJoinSubscriber, _super);
    function ForkJoinSubscriber(destination, sources) {
        var _this = _super.call(this, destination) || this;
        _this.sources = sources;
        _this.completed = 0;
        _this.haveValues = 0;
        var len = sources.length;
        _this.values = new Array(len);
        for (var i = 0; i < len; i++) {
            var source = sources[i];
            var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(_this, source, null, i);
            if (innerSubscription) {
                _this.add(innerSubscription);
            }
        }
        return _this;
    }
    ForkJoinSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.values[outerIndex] = innerValue;
        if (!innerSub._hasValue) {
            innerSub._hasValue = true;
            this.haveValues++;
        }
    };
    ForkJoinSubscriber.prototype.notifyComplete = function (innerSub) {
        var _a = this, destination = _a.destination, haveValues = _a.haveValues, values = _a.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_5__["OuterSubscriber"]));
//# sourceMappingURL=forkJoin.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/from.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/from.js ***!
  \*************************************************************/
/*! exports provided: from */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isPromise */ "./node_modules/rxjs/_esm5/internal/util/isPromise.js");
/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArrayLike */ "./node_modules/rxjs/_esm5/internal/util/isArrayLike.js");
/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isInteropObservable */ "./node_modules/rxjs/_esm5/internal/util/isInteropObservable.js");
/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isIterable */ "./node_modules/rxjs/_esm5/internal/util/isIterable.js");
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
/* harmony import */ var _fromPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./fromPromise */ "./node_modules/rxjs/_esm5/internal/observable/fromPromise.js");
/* harmony import */ var _fromIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./fromIterable */ "./node_modules/rxjs/_esm5/internal/observable/fromIterable.js");
/* harmony import */ var _fromObservable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fromObservable */ "./node_modules/rxjs/_esm5/internal/observable/fromObservable.js");
/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../util/subscribeTo */ "./node_modules/rxjs/_esm5/internal/util/subscribeTo.js");
/** PURE_IMPORTS_START _Observable,_util_isPromise,_util_isArrayLike,_util_isInteropObservable,_util_isIterable,_fromArray,_fromPromise,_fromIterable,_fromObservable,_util_subscribeTo PURE_IMPORTS_END */










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/_esm5/internal/observable/fromArray.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromArray.js ***!
  \******************************************************************/
/*! exports provided: fromArray */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToArray */ "./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js");
/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToArray PURE_IMPORTS_END */



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/_esm5/internal/observable/fromEvent.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromEvent.js ***!
  \******************************************************************/
/*! exports provided: fromEvent */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */




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, 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_1 = sourceObj;
        sourceObj.addEventListener(eventName, handler, options);
        unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
    }
    else if (isJQueryStyleEventEmitter(sourceObj)) {
        var source_2 = sourceObj;
        sourceObj.on(eventName, handler);
        unsubscribe = function () { return source_2.off(eventName, handler); };
    }
    else if (isNodeStyleEventEmitter(sourceObj)) {
        var source_3 = sourceObj;
        sourceObj.addListener(eventName, handler);
        unsubscribe = function () { return source_3.removeListener(eventName, handler); };
    }
    else if (sourceObj && sourceObj.length) {
        for (var i = 0, len = sourceObj.length; i < len; i++) {
            setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
        }
    }
    else {
        throw new TypeError('Invalid event target');
    }
    subscriber.add(unsubscribe);
}
function isNodeStyleEventEmitter(sourceObj) {
    return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
}
function isJQueryStyleEventEmitter(sourceObj) {
    return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
}
function isEventTarget(sourceObj) {
    return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
}
//# sourceMappingURL=fromEvent.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js":
/*!*************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js ***!
  \*************************************************************************/
/*! exports provided: fromEventPattern */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */




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, args) : resultSelector(args); }));
    }
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
        var handler = function () {
            var e = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                e[_i] = arguments[_i];
            }
            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/_esm5/internal/observable/fromIterable.js":
/*!*********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromIterable.js ***!
  \*********************************************************************/
/*! exports provided: fromIterable */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/iterator */ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js");
/* harmony import */ var _util_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToIterable */ "./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js");
/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator,_util_subscribeToIterable PURE_IMPORTS_END */




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/_esm5/internal/observable/fromObservable.js":
/*!***********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromObservable.js ***!
  \***********************************************************************/
/*! exports provided: fromObservable */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/observable */ "./node_modules/rxjs/_esm5/internal/symbol/observable.js");
/* harmony import */ var _util_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToObservable */ "./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js");
/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable,_util_subscribeToObservable PURE_IMPORTS_END */




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 (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
                    error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
                    complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
                }));
            }));
            return sub;
        });
    }
}
//# sourceMappingURL=fromObservable.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/fromPromise.js":
/*!********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromPromise.js ***!
  \********************************************************************/
/*! exports provided: fromPromise */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _util_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToPromise */ "./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js");
/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToPromise PURE_IMPORTS_END */



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/_esm5/internal/observable/generate.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/generate.js ***!
  \*****************************************************************/
/*! exports provided: generate */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */



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 = void 0;
        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/_esm5/internal/observable/iif.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/iif.js ***!
  \************************************************************/
/*! exports provided: iif */
/***/ (function(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/_esm5/internal/observable/defer.js");
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */


function iif(condition, trueResult, falseResult) {
    if (trueResult === void 0) {
        trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
    }
    if (falseResult === void 0) {
        falseResult = _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/_esm5/internal/observable/interval.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/interval.js ***!
  \*****************************************************************/
/*! exports provided: interval */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js");
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */



function interval(period, scheduler) {
    if (period === void 0) {
        period = 0;
    }
    if (scheduler === void 0) {
        scheduler = _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/_esm5/internal/observable/merge.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/merge.js ***!
  \**************************************************************/
/*! exports provided: merge */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/mergeAll */ "./node_modules/rxjs/_esm5/internal/operators/mergeAll.js");
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */




function merge() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    var concurrent = Number.POSITIVE_INFINITY;
    var scheduler = null;
    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/_esm5/internal/observable/never.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/never.js ***!
  \**************************************************************/
/*! exports provided: NEVER, never */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/noop */ "./node_modules/rxjs/_esm5/internal/util/noop.js");
/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */


var NEVER = /*@__PURE__*/ 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/_esm5/internal/observable/of.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/of.js ***!
  \***********************************************************/
/*! exports provided: of */
/***/ (function(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/_esm5/internal/util/isScheduler.js");
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/* harmony import */ var _scalar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scalar */ "./node_modules/rxjs/_esm5/internal/observable/scalar.js");
/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_empty,_scalar PURE_IMPORTS_END */




function of() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    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/_esm5/internal/observable/onErrorResumeNext.js":
/*!**************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js ***!
  \**************************************************************************/
/*! exports provided: onErrorResumeNext */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */




function onErrorResumeNext() {
    var sources = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        sources[_i] = arguments[_i];
    }
    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, first);
    }
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
        var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
        return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
            next: function (value) { subscriber.next(value); },
            error: subNext,
            complete: subNext,
        });
    });
}
//# sourceMappingURL=onErrorResumeNext.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/pairs.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/pairs.js ***!
  \**************************************************************/
/*! exports provided: pairs, dispatch */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */


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/_esm5/internal/observable/race.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/race.js ***!
  \*************************************************************/
/*! exports provided: race, RaceOperator, RaceSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */





function race() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    if (observables.length === 1) {
        if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
            observables = observables[0];
        }
        else {
            return observables[0];
        }
    }
    return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__["fromArray"])(observables, undefined).lift(new RaceOperator());
}
var RaceOperator = /*@__PURE__*/ (function () {
    function RaceOperator() {
    }
    RaceOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new RaceSubscriber(subscriber));
    };
    return RaceOperator;
}());

var RaceSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RaceSubscriber, _super);
    function RaceSubscriber(destination) {
        var _this = _super.call(this, destination) || this;
        _this.hasFirst = false;
        _this.observables = [];
        _this.subscriptions = [];
        return _this;
    }
    RaceSubscriber.prototype._next = function (observable) {
        this.observables.push(observable);
    };
    RaceSubscriber.prototype._complete = function () {
        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_4__["subscribeToResult"])(this, observable, observable, i);
                if (this.subscriptions) {
                    this.subscriptions.push(subscription);
                }
                this.add(subscription);
            }
            this.observables = null;
        }
    };
    RaceSubscriber.prototype.notifyNext = function (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_3__["OuterSubscriber"]));

//# sourceMappingURL=race.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/range.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/range.js ***!
  \**************************************************************/
/*! exports provided: range, dispatch */
/***/ (function(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/_esm5/internal/Observable.js");
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */

function range(start, count, scheduler) {
    if (start === void 0) {
        start = 0;
    }
    if (count === void 0) {
        count = 0;
    }
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
        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/_esm5/internal/observable/scalar.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/scalar.js ***!
  \***************************************************************/
/*! exports provided: scalar */
/***/ (function(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/_esm5/internal/Observable.js");
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */

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/_esm5/internal/observable/throwError.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/throwError.js ***!
  \*******************************************************************/
/*! exports provided: throwError */
/***/ (function(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/_esm5/internal/Observable.js");
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */

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(_a) {
    var error = _a.error, subscriber = _a.subscriber;
    subscriber.error(error);
}
//# sourceMappingURL=throwError.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/observable/timer.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/timer.js ***!
  \**************************************************************/
/*! exports provided: timer */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */




function timer(dueTime, periodOrScheduler, scheduler) {
    if (dueTime === void 0) {
        dueTime = 0;
    }
    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/_esm5/internal/observable/using.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/using.js ***!
  \**************************************************************/
/*! exports provided: using */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */



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/_esm5/internal/observable/zip.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/observable/zip.js ***!
  \************************************************************/
/*! exports provided: zip, ZipOperator, ZipSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../internal/symbol/iterator */ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js");
/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */







function zip() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    var resultSelector = observables[observables.length - 1];
    if (typeof resultSelector === 'function') {
        observables.pop();
    }
    return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
}
var ZipOperator = /*@__PURE__*/ (function () {
    function ZipOperator(resultSelector) {
        this.resultSelector = resultSelector;
    }
    ZipOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
    };
    return ZipOperator;
}());

var ZipSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipSubscriber, _super);
    function ZipSubscriber(destination, resultSelector, values) {
        if (values === void 0) {
            values = Object.create(null);
        }
        var _this = _super.call(this, destination) || this;
        _this.iterators = [];
        _this.active = 0;
        _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
        _this.values = values;
        return _this;
    }
    ZipSubscriber.prototype._next = function (value) {
        var iterators = this.iterators;
        if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
            iterators.push(new StaticArrayIterator(value));
        }
        else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] === 'function') {
            iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]]()));
        }
        else {
            iterators.push(new ZipBufferIterator(this.destination, this, value));
        }
    };
    ZipSubscriber.prototype._complete = function () {
        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--;
            }
        }
    };
    ZipSubscriber.prototype.notifyInactive = function () {
        this.active--;
        if (this.active === 0) {
            this.destination.complete();
        }
    };
    ZipSubscriber.prototype.checkIterators = function () {
        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 i = 0; i < len; i++) {
            var iterator = iterators[i];
            var result = iterator.next();
            if (iterator.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();
        }
    };
    ZipSubscriber.prototype._tryresultSelector = function (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_3__["Subscriber"]));

var StaticIterator = /*@__PURE__*/ (function () {
    function StaticIterator(iterator) {
        this.iterator = iterator;
        this.nextResult = iterator.next();
    }
    StaticIterator.prototype.hasValue = function () {
        return true;
    };
    StaticIterator.prototype.next = function () {
        var result = this.nextResult;
        this.nextResult = this.iterator.next();
        return result;
    };
    StaticIterator.prototype.hasCompleted = function () {
        var nextResult = this.nextResult;
        return nextResult && nextResult.done;
    };
    return StaticIterator;
}());
var StaticArrayIterator = /*@__PURE__*/ (function () {
    function StaticArrayIterator(array) {
        this.array = array;
        this.index = 0;
        this.length = 0;
        this.length = array.length;
    }
    StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
        return this;
    };
    StaticArrayIterator.prototype.next = function (value) {
        var i = this.index++;
        var array = this.array;
        return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
    };
    StaticArrayIterator.prototype.hasValue = function () {
        return this.array.length > this.index;
    };
    StaticArrayIterator.prototype.hasCompleted = function () {
        return this.array.length === this.index;
    };
    return StaticArrayIterator;
}());
var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipBufferIterator, _super);
    function ZipBufferIterator(destination, parent, observable) {
        var _this = _super.call(this, destination) || this;
        _this.parent = parent;
        _this.observable = observable;
        _this.stillUnsubscribed = true;
        _this.buffer = [];
        _this.isComplete = false;
        return _this;
    }
    ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
        return this;
    };
    ZipBufferIterator.prototype.next = function () {
        var buffer = this.buffer;
        if (buffer.length === 0 && this.isComplete) {
            return { value: null, done: true };
        }
        else {
            return { value: buffer.shift(), done: false };
        }
    };
    ZipBufferIterator.prototype.hasValue = function () {
        return this.buffer.length > 0;
    };
    ZipBufferIterator.prototype.hasCompleted = function () {
        return this.buffer.length === 0 && this.isComplete;
    };
    ZipBufferIterator.prototype.notifyComplete = function () {
        if (this.buffer.length > 0) {
            this.isComplete = true;
            this.parent.notifyInactive();
        }
        else {
            this.destination.complete();
        }
    };
    ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.buffer.push(innerValue);
        this.parent.checkIterators();
    };
    ZipBufferIterator.prototype.subscribe = function (value, index) {
        return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, this.observable, this, index);
    };
    return ZipBufferIterator;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
//# sourceMappingURL=zip.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/audit.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/audit.js ***!
  \*************************************************************/
/*! exports provided: audit */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */





function audit(durationSelector) {
    return function auditOperatorFunction(source) {
        return source.lift(new AuditOperator(durationSelector));
    };
}
var AuditOperator = /*@__PURE__*/ (function () {
    function AuditOperator(durationSelector) {
        this.durationSelector = durationSelector;
    }
    AuditOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
    };
    return AuditOperator;
}());
var AuditSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AuditSubscriber, _super);
    function AuditSubscriber(destination, durationSelector) {
        var _this = _super.call(this, destination) || this;
        _this.durationSelector = durationSelector;
        _this.hasValue = false;
        return _this;
    }
    AuditSubscriber.prototype._next = function (value) {
        this.value = value;
        this.hasValue = true;
        if (!this.throttled) {
            var duration = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_1__["tryCatch"])(this.durationSelector)(value);
            if (duration === _util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"]) {
                this.destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"].e);
            }
            else {
                var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, duration);
                if (!innerSubscription || innerSubscription.closed) {
                    this.clearThrottle();
                }
                else {
                    this.add(this.throttled = innerSubscription);
                }
            }
        }
    };
    AuditSubscriber.prototype.clearThrottle = function () {
        var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
        if (throttled) {
            this.remove(throttled);
            this.throttled = null;
            throttled.unsubscribe();
        }
        if (hasValue) {
            this.value = null;
            this.hasValue = false;
            this.destination.next(value);
        }
    };
    AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
        this.clearThrottle();
    };
    AuditSubscriber.prototype.notifyComplete = function () {
        this.clearThrottle();
    };
    return AuditSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
//# sourceMappingURL=audit.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/auditTime.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/auditTime.js ***!
  \*****************************************************************/
/*! exports provided: auditTime */
/***/ (function(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/_esm5/internal/scheduler/async.js");
/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./audit */ "./node_modules/rxjs/_esm5/internal/operators/audit.js");
/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/timer */ "./node_modules/rxjs/_esm5/internal/observable/timer.js");
/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */



function auditTime(duration, scheduler) {
    if (scheduler === void 0) {
        scheduler = _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/_esm5/internal/operators/buffer.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/buffer.js ***!
  \**************************************************************/
/*! exports provided: buffer */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */



function buffer(closingNotifier) {
    return function bufferOperatorFunction(source) {
        return source.lift(new BufferOperator(closingNotifier));
    };
}
var BufferOperator = /*@__PURE__*/ (function () {
    function BufferOperator(closingNotifier) {
        this.closingNotifier = closingNotifier;
    }
    BufferOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
    };
    return BufferOperator;
}());
var BufferSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSubscriber, _super);
    function BufferSubscriber(destination, closingNotifier) {
        var _this = _super.call(this, destination) || this;
        _this.buffer = [];
        _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, closingNotifier));
        return _this;
    }
    BufferSubscriber.prototype._next = function (value) {
        this.buffer.push(value);
    };
    BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        var buffer = this.buffer;
        this.buffer = [];
        this.destination.next(buffer);
    };
    return BufferSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=buffer.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/bufferCount.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/bufferCount.js ***!
  \*******************************************************************/
/*! exports provided: bufferCount */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function bufferCount(bufferSize, startBufferEvery) {
    if (startBufferEvery === void 0) {
        startBufferEvery = null;
    }
    return function bufferCountOperatorFunction(source) {
        return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
    };
}
var BufferCountOperator = /*@__PURE__*/ (function () {
    function BufferCountOperator(bufferSize, startBufferEvery) {
        this.bufferSize = bufferSize;
        this.startBufferEvery = startBufferEvery;
        if (!startBufferEvery || bufferSize === startBufferEvery) {
            this.subscriberClass = BufferCountSubscriber;
        }
        else {
            this.subscriberClass = BufferSkipCountSubscriber;
        }
    }
    BufferCountOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
    };
    return BufferCountOperator;
}());
var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferCountSubscriber, _super);
    function BufferCountSubscriber(destination, bufferSize) {
        var _this = _super.call(this, destination) || this;
        _this.bufferSize = bufferSize;
        _this.buffer = [];
        return _this;
    }
    BufferCountSubscriber.prototype._next = function (value) {
        var buffer = this.buffer;
        buffer.push(value);
        if (buffer.length == this.bufferSize) {
            this.destination.next(buffer);
            this.buffer = [];
        }
    };
    BufferCountSubscriber.prototype._complete = function () {
        var buffer = this.buffer;
        if (buffer.length > 0) {
            this.destination.next(buffer);
        }
        _super.prototype._complete.call(this);
    };
    return BufferCountSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSkipCountSubscriber, _super);
    function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
        var _this = _super.call(this, destination) || this;
        _this.bufferSize = bufferSize;
        _this.startBufferEvery = startBufferEvery;
        _this.buffers = [];
        _this.count = 0;
        return _this;
    }
    BufferSkipCountSubscriber.prototype._next = function (value) {
        var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.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);
            }
        }
    };
    BufferSkipCountSubscriber.prototype._complete = function () {
        var _a = this, buffers = _a.buffers, destination = _a.destination;
        while (buffers.length > 0) {
            var buffer = buffers.shift();
            if (buffer.length > 0) {
                destination.next(buffer);
            }
        }
        _super.prototype._complete.call(this);
    };
    return BufferSkipCountSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=bufferCount.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/bufferTime.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/bufferTime.js ***!
  \******************************************************************/
/*! exports provided: bufferTime */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */




function bufferTime(bufferTimeSpan) {
    var length = arguments.length;
    var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["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) {
        this.bufferTimeSpan = bufferTimeSpan;
        this.bufferCreationInterval = bufferCreationInterval;
        this.maxBufferSize = maxBufferSize;
        this.scheduler = scheduler;
    }
    BufferTimeOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
    };
    return BufferTimeOperator;
}());
var Context = /*@__PURE__*/ (function () {
    function Context() {
        this.buffer = [];
    }
    return Context;
}());
var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferTimeSubscriber, _super);
    function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
        var _this = _super.call(this, destination) || this;
        _this.bufferTimeSpan = bufferTimeSpan;
        _this.bufferCreationInterval = bufferCreationInterval;
        _this.maxBufferSize = maxBufferSize;
        _this.scheduler = scheduler;
        _this.contexts = [];
        var context = _this.openContext();
        _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
        if (_this.timespanOnly) {
            var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
            _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
        }
        else {
            var closeState = { subscriber: _this, context: context };
            var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
            _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
            _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
        }
        return _this;
    }
    BufferTimeSubscriber.prototype._next = function (value) {
        var contexts = this.contexts;
        var len = contexts.length;
        var filledBufferContext;
        for (var i = 0; i < len; i++) {
            var context_1 = contexts[i];
            var buffer = context_1.buffer;
            buffer.push(value);
            if (buffer.length == this.maxBufferSize) {
                filledBufferContext = context_1;
            }
        }
        if (filledBufferContext) {
            this.onBufferFull(filledBufferContext);
        }
    };
    BufferTimeSubscriber.prototype._error = function (err) {
        this.contexts.length = 0;
        _super.prototype._error.call(this, err);
    };
    BufferTimeSubscriber.prototype._complete = function () {
        var _a = this, contexts = _a.contexts, destination = _a.destination;
        while (contexts.length > 0) {
            var context_2 = contexts.shift();
            destination.next(context_2.buffer);
        }
        _super.prototype._complete.call(this);
    };
    BufferTimeSubscriber.prototype._unsubscribe = function () {
        this.contexts = null;
    };
    BufferTimeSubscriber.prototype.onBufferFull = function (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));
        }
    };
    BufferTimeSubscriber.prototype.openContext = function () {
        var context = new Context();
        this.contexts.push(context);
        return context;
    };
    BufferTimeSubscriber.prototype.closeContext = function (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_2__["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/_esm5/internal/operators/bufferToggle.js":
/*!********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/bufferToggle.js ***!
  \********************************************************************/
/*! exports provided: bufferToggle */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */




function bufferToggle(openings, closingSelector) {
    return function bufferToggleOperatorFunction(source) {
        return source.lift(new BufferToggleOperator(openings, closingSelector));
    };
}
var BufferToggleOperator = /*@__PURE__*/ (function () {
    function BufferToggleOperator(openings, closingSelector) {
        this.openings = openings;
        this.closingSelector = closingSelector;
    }
    BufferToggleOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
    };
    return BufferToggleOperator;
}());
var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferToggleSubscriber, _super);
    function BufferToggleSubscriber(destination, openings, closingSelector) {
        var _this = _super.call(this, destination) || this;
        _this.openings = openings;
        _this.closingSelector = closingSelector;
        _this.contexts = [];
        _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, openings));
        return _this;
    }
    BufferToggleSubscriber.prototype._next = function (value) {
        var contexts = this.contexts;
        var len = contexts.length;
        for (var i = 0; i < len; i++) {
            contexts[i].buffer.push(value);
        }
    };
    BufferToggleSubscriber.prototype._error = function (err) {
        var contexts = this.contexts;
        while (contexts.length > 0) {
            var context_1 = contexts.shift();
            context_1.subscription.unsubscribe();
            context_1.buffer = null;
            context_1.subscription = null;
        }
        this.contexts = null;
        _super.prototype._error.call(this, err);
    };
    BufferToggleSubscriber.prototype._complete = function () {
        var contexts = this.contexts;
        while (contexts.length > 0) {
            var context_2 = contexts.shift();
            this.destination.next(context_2.buffer);
            context_2.subscription.unsubscribe();
            context_2.buffer = null;
            context_2.subscription = null;
        }
        this.contexts = null;
        _super.prototype._complete.call(this);
    };
    BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
    };
    BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
        this.closeBuffer(innerSub.context);
    };
    BufferToggleSubscriber.prototype.openBuffer = function (value) {
        try {
            var closingSelector = this.closingSelector;
            var closingNotifier = closingSelector.call(this, value);
            if (closingNotifier) {
                this.trySubscribe(closingNotifier);
            }
        }
        catch (err) {
            this._error(err);
        }
    };
    BufferToggleSubscriber.prototype.closeBuffer = function (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();
        }
    };
    BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
        var contexts = this.contexts;
        var buffer = [];
        var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
        var context = { buffer: buffer, subscription: subscription };
        contexts.push(context);
        var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["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_3__["OuterSubscriber"]));
//# sourceMappingURL=bufferToggle.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/bufferWhen.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/bufferWhen.js ***!
  \******************************************************************/
/*! exports provided: bufferWhen */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */






function bufferWhen(closingSelector) {
    return function (source) {
        return source.lift(new BufferWhenOperator(closingSelector));
    };
}
var BufferWhenOperator = /*@__PURE__*/ (function () {
    function BufferWhenOperator(closingSelector) {
        this.closingSelector = closingSelector;
    }
    BufferWhenOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
    };
    return BufferWhenOperator;
}());
var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferWhenSubscriber, _super);
    function BufferWhenSubscriber(destination, closingSelector) {
        var _this = _super.call(this, destination) || this;
        _this.closingSelector = closingSelector;
        _this.subscribing = false;
        _this.openBuffer();
        return _this;
    }
    BufferWhenSubscriber.prototype._next = function (value) {
        this.buffer.push(value);
    };
    BufferWhenSubscriber.prototype._complete = function () {
        var buffer = this.buffer;
        if (buffer) {
            this.destination.next(buffer);
        }
        _super.prototype._complete.call(this);
    };
    BufferWhenSubscriber.prototype._unsubscribe = function () {
        this.buffer = null;
        this.subscribing = false;
    };
    BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.openBuffer();
    };
    BufferWhenSubscriber.prototype.notifyComplete = function () {
        if (this.subscribing) {
            this.complete();
        }
        else {
            this.openBuffer();
        }
    };
    BufferWhenSubscriber.prototype.openBuffer = function () {
        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 = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.closingSelector)();
        if (closingNotifier === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
            this.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
        }
        else {
            closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
            this.closingSubscription = closingSubscription;
            this.add(closingSubscription);
            this.subscribing = true;
            closingSubscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, closingNotifier));
            this.subscribing = false;
        }
    };
    return BufferWhenSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
//# sourceMappingURL=bufferWhen.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/catchError.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/catchError.js ***!
  \******************************************************************/
/*! exports provided: catchError */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../InnerSubscriber */ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */




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) {
        this.selector = selector;
    }
    CatchOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
    };
    return CatchOperator;
}());
var CatchSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CatchSubscriber, _super);
    function CatchSubscriber(destination, selector, caught) {
        var _this = _super.call(this, destination) || this;
        _this.selector = selector;
        _this.caught = caught;
        return _this;
    }
    CatchSubscriber.prototype.error = function (err) {
        if (!this.isStopped) {
            var result = void 0;
            try {
                result = this.selector(err, this.caught);
            }
            catch (err2) {
                _super.prototype.error.call(this, err2);
                return;
            }
            this._unsubscribeAndRecycle();
            var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
            this.add(innerSubscriber);
            Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
        }
    };
    return CatchSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=catchError.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/combineAll.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/combineAll.js ***!
  \******************************************************************/
/*! exports provided: combineAll */
/***/ (function(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/_esm5/internal/observable/combineLatest.js");
/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */

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/_esm5/internal/operators/combineLatest.js":
/*!*********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/combineLatest.js ***!
  \*********************************************************************/
/*! exports provided: combineLatest */
/***/ (function(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/_esm5/internal/util/isArray.js");
/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/combineLatest */ "./node_modules/rxjs/_esm5/internal/observable/combineLatest.js");
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */



var none = {};
function combineLatest() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    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(observables)), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project)); };
}
//# sourceMappingURL=combineLatest.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/concat.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/concat.js ***!
  \**************************************************************/
/*! exports provided: concat */
/***/ (function(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/_esm5/internal/observable/concat.js");
/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */

function concat() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"].apply(void 0, [source].concat(observables))); };
}
//# sourceMappingURL=concat.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/concatAll.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/concatAll.js ***!
  \*****************************************************************/
/*! exports provided: concatAll */
/***/ (function(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/_esm5/internal/operators/mergeAll.js");
/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */

function concatAll() {
    return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
}
//# sourceMappingURL=concatAll.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/concatMap.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/concatMap.js ***!
  \*****************************************************************/
/*! exports provided: concatMap */
/***/ (function(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/_esm5/internal/operators/mergeMap.js");
/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */

function concatMap(project, resultSelector) {
    return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
}
//# sourceMappingURL=concatMap.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/concatMapTo.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/concatMapTo.js ***!
  \*******************************************************************/
/*! exports provided: concatMapTo */
/***/ (function(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/_esm5/internal/operators/concatMap.js");
/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */

function concatMapTo(innerObservable, resultSelector) {
    return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () { return innerObservable; }, resultSelector);
}
//# sourceMappingURL=concatMapTo.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/count.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/count.js ***!
  \*************************************************************/
/*! exports provided: count */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function count(predicate) {
    return function (source) { return source.lift(new CountOperator(predicate, source)); };
}
var CountOperator = /*@__PURE__*/ (function () {
    function CountOperator(predicate, source) {
        this.predicate = predicate;
        this.source = source;
    }
    CountOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
    };
    return CountOperator;
}());
var CountSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountSubscriber, _super);
    function CountSubscriber(destination, predicate, source) {
        var _this = _super.call(this, destination) || this;
        _this.predicate = predicate;
        _this.source = source;
        _this.count = 0;
        _this.index = 0;
        return _this;
    }
    CountSubscriber.prototype._next = function (value) {
        if (this.predicate) {
            this._tryPredicate(value);
        }
        else {
            this.count++;
        }
    };
    CountSubscriber.prototype._tryPredicate = function (value) {
        var result;
        try {
            result = this.predicate(value, this.index++, this.source);
        }
        catch (err) {
            this.destination.error(err);
            return;
        }
        if (result) {
            this.count++;
        }
    };
    CountSubscriber.prototype._complete = function () {
        this.destination.next(this.count);
        this.destination.complete();
    };
    return CountSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=count.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/debounce.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/debounce.js ***!
  \****************************************************************/
/*! exports provided: debounce */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */



function debounce(durationSelector) {
    return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
}
var DebounceOperator = /*@__PURE__*/ (function () {
    function DebounceOperator(durationSelector) {
        this.durationSelector = durationSelector;
    }
    DebounceOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
    };
    return DebounceOperator;
}());
var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceSubscriber, _super);
    function DebounceSubscriber(destination, durationSelector) {
        var _this = _super.call(this, destination) || this;
        _this.durationSelector = durationSelector;
        _this.hasValue = false;
        _this.durationSubscription = null;
        return _this;
    }
    DebounceSubscriber.prototype._next = function (value) {
        try {
            var result = this.durationSelector.call(this, value);
            if (result) {
                this._tryNext(value, result);
            }
        }
        catch (err) {
            this.destination.error(err);
        }
    };
    DebounceSubscriber.prototype._complete = function () {
        this.emitValue();
        this.destination.complete();
    };
    DebounceSubscriber.prototype._tryNext = function (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_2__["subscribeToResult"])(this, duration);
        if (subscription && !subscription.closed) {
            this.add(this.durationSubscription = subscription);
        }
    };
    DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.emitValue();
    };
    DebounceSubscriber.prototype.notifyComplete = function () {
        this.emitValue();
    };
    DebounceSubscriber.prototype.emitValue = function () {
        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;
            _super.prototype._next.call(this, value);
        }
    };
    return DebounceSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=debounce.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/debounceTime.js":
/*!********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/debounceTime.js ***!
  \********************************************************************/
/*! exports provided: debounceTime */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */



function debounceTime(dueTime, scheduler) {
    if (scheduler === void 0) {
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
    }
    return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
}
var DebounceTimeOperator = /*@__PURE__*/ (function () {
    function DebounceTimeOperator(dueTime, scheduler) {
        this.dueTime = dueTime;
        this.scheduler = scheduler;
    }
    DebounceTimeOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
    };
    return DebounceTimeOperator;
}());
var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceTimeSubscriber, _super);
    function DebounceTimeSubscriber(destination, dueTime, scheduler) {
        var _this = _super.call(this, destination) || this;
        _this.dueTime = dueTime;
        _this.scheduler = scheduler;
        _this.debouncedSubscription = null;
        _this.lastValue = null;
        _this.hasValue = false;
        return _this;
    }
    DebounceTimeSubscriber.prototype._next = function (value) {
        this.clearDebounce();
        this.lastValue = value;
        this.hasValue = true;
        this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
    };
    DebounceTimeSubscriber.prototype._complete = function () {
        this.debouncedNext();
        this.destination.complete();
    };
    DebounceTimeSubscriber.prototype.debouncedNext = function () {
        this.clearDebounce();
        if (this.hasValue) {
            var lastValue = this.lastValue;
            this.lastValue = null;
            this.hasValue = false;
            this.destination.next(lastValue);
        }
    };
    DebounceTimeSubscriber.prototype.clearDebounce = function () {
        var debouncedSubscription = this.debouncedSubscription;
        if (debouncedSubscription !== null) {
            this.remove(debouncedSubscription);
            debouncedSubscription.unsubscribe();
            this.debouncedSubscription = null;
        }
    };
    return DebounceTimeSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
function dispatchNext(subscriber) {
    subscriber.debouncedNext();
}
//# sourceMappingURL=debounceTime.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js ***!
  \**********************************************************************/
/*! exports provided: defaultIfEmpty */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function defaultIfEmpty(defaultValue) {
    if (defaultValue === void 0) {
        defaultValue = null;
    }
    return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
}
var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
    function DefaultIfEmptyOperator(defaultValue) {
        this.defaultValue = defaultValue;
    }
    DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
    };
    return DefaultIfEmptyOperator;
}());
var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DefaultIfEmptySubscriber, _super);
    function DefaultIfEmptySubscriber(destination, defaultValue) {
        var _this = _super.call(this, destination) || this;
        _this.defaultValue = defaultValue;
        _this.isEmpty = true;
        return _this;
    }
    DefaultIfEmptySubscriber.prototype._next = function (value) {
        this.isEmpty = false;
        this.destination.next(value);
    };
    DefaultIfEmptySubscriber.prototype._complete = function () {
        if (this.isEmpty) {
            this.destination.next(this.defaultValue);
        }
        this.destination.complete();
    };
    return DefaultIfEmptySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=defaultIfEmpty.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/delay.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/delay.js ***!
  \*************************************************************/
/*! exports provided: delay */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isDate */ "./node_modules/rxjs/_esm5/internal/util/isDate.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Notification */ "./node_modules/rxjs/_esm5/internal/Notification.js");
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */





function delay(delay, scheduler) {
    if (scheduler === void 0) {
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
    }
    var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["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) {
        this.delay = delay;
        this.scheduler = scheduler;
    }
    DelayOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
    };
    return DelayOperator;
}());
var DelaySubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelaySubscriber, _super);
    function DelaySubscriber(destination, delay, scheduler) {
        var _this = _super.call(this, destination) || this;
        _this.delay = delay;
        _this.scheduler = scheduler;
        _this.queue = [];
        _this.active = false;
        _this.errored = false;
        return _this;
    }
    DelaySubscriber.dispatch = function (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_1 = Math.max(0, queue[0].time - scheduler.now());
            this.schedule(state, delay_1);
        }
        else {
            this.unsubscribe();
            source.active = false;
        }
    };
    DelaySubscriber.prototype._schedule = function (scheduler) {
        this.active = true;
        var destination = this.destination;
        destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
            source: this, destination: this.destination, scheduler: scheduler
        }));
    };
    DelaySubscriber.prototype.scheduleNotification = function (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);
        }
    };
    DelaySubscriber.prototype._next = function (value) {
        this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createNext(value));
    };
    DelaySubscriber.prototype._error = function (err) {
        this.errored = true;
        this.queue = [];
        this.destination.error(err);
        this.unsubscribe();
    };
    DelaySubscriber.prototype._complete = function () {
        this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createComplete());
        this.unsubscribe();
    };
    return DelaySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
var DelayMessage = /*@__PURE__*/ (function () {
    function DelayMessage(time, notification) {
        this.time = time;
        this.notification = notification;
    }
    return DelayMessage;
}());
//# sourceMappingURL=delay.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/delayWhen.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/delayWhen.js ***!
  \*****************************************************************/
/*! exports provided: delayWhen */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */





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) {
        this.delayDurationSelector = delayDurationSelector;
    }
    DelayWhenOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
    };
    return DelayWhenOperator;
}());
var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelayWhenSubscriber, _super);
    function DelayWhenSubscriber(destination, delayDurationSelector) {
        var _this = _super.call(this, destination) || this;
        _this.delayDurationSelector = delayDurationSelector;
        _this.completed = false;
        _this.delayNotifierSubscriptions = [];
        _this.index = 0;
        return _this;
    }
    DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.destination.next(outerValue);
        this.removeSubscription(innerSub);
        this.tryComplete();
    };
    DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
        this._error(error);
    };
    DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
        var value = this.removeSubscription(innerSub);
        if (value) {
            this.destination.next(value);
        }
        this.tryComplete();
    };
    DelayWhenSubscriber.prototype._next = function (value) {
        var index = this.index++;
        try {
            var delayNotifier = this.delayDurationSelector(value, index);
            if (delayNotifier) {
                this.tryDelay(delayNotifier, value);
            }
        }
        catch (err) {
            this.destination.error(err);
        }
    };
    DelayWhenSubscriber.prototype._complete = function () {
        this.completed = true;
        this.tryComplete();
        this.unsubscribe();
    };
    DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
        subscription.unsubscribe();
        var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
        if (subscriptionIdx !== -1) {
            this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
        }
        return subscription.outerValue;
    };
    DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
        var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, delayNotifier, value);
        if (notifierSubscription && !notifierSubscription.closed) {
            var destination = this.destination;
            destination.add(notifierSubscription);
            this.delayNotifierSubscriptions.push(notifierSubscription);
        }
    };
    DelayWhenSubscriber.prototype.tryComplete = function () {
        if (this.completed && this.delayNotifierSubscriptions.length === 0) {
            this.destination.complete();
        }
    };
    return DelayWhenSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelayObservable, _super);
    function SubscriptionDelayObservable(source, subscriptionDelay) {
        var _this = _super.call(this) || this;
        _this.source = source;
        _this.subscriptionDelay = subscriptionDelay;
        return _this;
    }
    SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
        this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
    };
    return SubscriptionDelayObservable;
}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelaySubscriber, _super);
    function SubscriptionDelaySubscriber(parent, source) {
        var _this = _super.call(this) || this;
        _this.parent = parent;
        _this.source = source;
        _this.sourceSubscribed = false;
        return _this;
    }
    SubscriptionDelaySubscriber.prototype._next = function (unused) {
        this.subscribeToSource();
    };
    SubscriptionDelaySubscriber.prototype._error = function (err) {
        this.unsubscribe();
        this.parent.error(err);
    };
    SubscriptionDelaySubscriber.prototype._complete = function () {
        this.unsubscribe();
        this.subscribeToSource();
    };
    SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
        if (!this.sourceSubscribed) {
            this.sourceSubscribed = true;
            this.unsubscribe();
            this.source.subscribe(this.parent);
        }
    };
    return SubscriptionDelaySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=delayWhen.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/dematerialize.js":
/*!*********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/dematerialize.js ***!
  \*********************************************************************/
/*! exports provided: dematerialize */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function dematerialize() {
    return function dematerializeOperatorFunction(source) {
        return source.lift(new DeMaterializeOperator());
    };
}
var DeMaterializeOperator = /*@__PURE__*/ (function () {
    function DeMaterializeOperator() {
    }
    DeMaterializeOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new DeMaterializeSubscriber(subscriber));
    };
    return DeMaterializeOperator;
}());
var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DeMaterializeSubscriber, _super);
    function DeMaterializeSubscriber(destination) {
        return _super.call(this, destination) || this;
    }
    DeMaterializeSubscriber.prototype._next = function (value) {
        value.observe(this.destination);
    };
    return DeMaterializeSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=dematerialize.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/distinct.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/distinct.js ***!
  \****************************************************************/
/*! exports provided: distinct, DistinctSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */



function distinct(keySelector, flushes) {
    return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
}
var DistinctOperator = /*@__PURE__*/ (function () {
    function DistinctOperator(keySelector, flushes) {
        this.keySelector = keySelector;
        this.flushes = flushes;
    }
    DistinctOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
    };
    return DistinctOperator;
}());
var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctSubscriber, _super);
    function DistinctSubscriber(destination, keySelector, flushes) {
        var _this = _super.call(this, destination) || this;
        _this.keySelector = keySelector;
        _this.values = new Set();
        if (flushes) {
            _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, flushes));
        }
        return _this;
    }
    DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.values.clear();
    };
    DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
        this._error(error);
    };
    DistinctSubscriber.prototype._next = function (value) {
        if (this.keySelector) {
            this._useKeySelector(value);
        }
        else {
            this._finalizeNext(value, value);
        }
    };
    DistinctSubscriber.prototype._useKeySelector = function (value) {
        var key;
        var destination = this.destination;
        try {
            key = this.keySelector(value);
        }
        catch (err) {
            destination.error(err);
            return;
        }
        this._finalizeNext(key, value);
    };
    DistinctSubscriber.prototype._finalizeNext = function (key, value) {
        var values = this.values;
        if (!values.has(key)) {
            values.add(key);
            this.destination.next(value);
        }
    };
    return DistinctSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));

//# sourceMappingURL=distinct.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js":
/*!****************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js ***!
  \****************************************************************************/
/*! exports provided: distinctUntilChanged */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */




function distinctUntilChanged(compare, keySelector) {
    return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
}
var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
    function DistinctUntilChangedOperator(compare, keySelector) {
        this.compare = compare;
        this.keySelector = keySelector;
    }
    DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
    };
    return DistinctUntilChangedOperator;
}());
var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctUntilChangedSubscriber, _super);
    function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
        var _this = _super.call(this, destination) || this;
        _this.keySelector = keySelector;
        _this.hasKey = false;
        if (typeof compare === 'function') {
            _this.compare = compare;
        }
        return _this;
    }
    DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
        return x === y;
    };
    DistinctUntilChangedSubscriber.prototype._next = function (value) {
        var keySelector = this.keySelector;
        var key = value;
        if (keySelector) {
            key = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.keySelector)(value);
            if (key === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
                return this.destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
            }
        }
        var result = false;
        if (this.hasKey) {
            result = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.compare)(this.key, key);
            if (result === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
                return this.destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
            }
        }
        else {
            this.hasKey = true;
        }
        if (Boolean(result) === false) {
            this.key = key;
            this.destination.next(value);
        }
    };
    return DistinctUntilChangedSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=distinctUntilChanged.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js ***!
  \*******************************************************************************/
/*! exports provided: distinctUntilKeyChanged */
/***/ (function(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/_esm5/internal/operators/distinctUntilChanged.js");
/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */

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/_esm5/internal/operators/elementAt.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/elementAt.js ***!
  \*****************************************************************/
/*! exports provided: elementAt */
/***/ (function(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/_esm5/internal/util/ArgumentOutOfRangeError.js");
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "./node_modules/rxjs/_esm5/internal/operators/filter.js");
/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./throwIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js");
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js");
/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./take */ "./node_modules/rxjs/_esm5/internal/operators/take.js");
/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */





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/_esm5/internal/operators/endWith.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/endWith.js ***!
  \***************************************************************/
/*! exports provided: endWith */
/***/ (function(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/_esm5/internal/observable/fromArray.js");
/* harmony import */ var _observable_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/scalar */ "./node_modules/rxjs/_esm5/internal/observable/scalar.js");
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/concat */ "./node_modules/rxjs/_esm5/internal/observable/concat.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */





function endWith() {
    var array = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        array[_i] = arguments[_i];
    }
    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/_esm5/internal/operators/every.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/every.js ***!
  \*************************************************************/
/*! exports provided: every */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function every(predicate, thisArg) {
    return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
}
var EveryOperator = /*@__PURE__*/ (function () {
    function EveryOperator(predicate, thisArg, source) {
        this.predicate = predicate;
        this.thisArg = thisArg;
        this.source = source;
    }
    EveryOperator.prototype.call = function (observer, source) {
        return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
    };
    return EveryOperator;
}());
var EverySubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EverySubscriber, _super);
    function EverySubscriber(destination, predicate, thisArg, source) {
        var _this = _super.call(this, destination) || this;
        _this.predicate = predicate;
        _this.thisArg = thisArg;
        _this.source = source;
        _this.index = 0;
        _this.thisArg = thisArg || _this;
        return _this;
    }
    EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
        this.destination.next(everyValueMatch);
        this.destination.complete();
    };
    EverySubscriber.prototype._next = function (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);
        }
    };
    EverySubscriber.prototype._complete = function () {
        this.notifyComplete(true);
    };
    return EverySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=every.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/exhaust.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/exhaust.js ***!
  \***************************************************************/
/*! exports provided: exhaust */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */



function exhaust() {
    return function (source) { return source.lift(new SwitchFirstOperator()); };
}
var SwitchFirstOperator = /*@__PURE__*/ (function () {
    function SwitchFirstOperator() {
    }
    SwitchFirstOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new SwitchFirstSubscriber(subscriber));
    };
    return SwitchFirstOperator;
}());
var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchFirstSubscriber, _super);
    function SwitchFirstSubscriber(destination) {
        var _this = _super.call(this, destination) || this;
        _this.hasCompleted = false;
        _this.hasSubscription = false;
        return _this;
    }
    SwitchFirstSubscriber.prototype._next = function (value) {
        if (!this.hasSubscription) {
            this.hasSubscription = true;
            this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, value));
        }
    };
    SwitchFirstSubscriber.prototype._complete = function () {
        this.hasCompleted = true;
        if (!this.hasSubscription) {
            this.destination.complete();
        }
    };
    SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
        this.remove(innerSub);
        this.hasSubscription = false;
        if (this.hasCompleted) {
            this.destination.complete();
        }
    };
    return SwitchFirstSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=exhaust.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/exhaustMap.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/exhaustMap.js ***!
  \******************************************************************/
/*! exports provided: exhaustMap */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../InnerSubscriber */ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */






function exhaustMap(project, resultSelector) {
    if (resultSelector) {
        return function (source) { return source.pipe(exhaustMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
    }
    return function (source) {
        return source.lift(new ExhauseMapOperator(project));
    };
}
var ExhauseMapOperator = /*@__PURE__*/ (function () {
    function ExhauseMapOperator(project) {
        this.project = project;
    }
    ExhauseMapOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
    };
    return ExhauseMapOperator;
}());
var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExhaustMapSubscriber, _super);
    function ExhaustMapSubscriber(destination, project) {
        var _this = _super.call(this, destination) || this;
        _this.project = project;
        _this.hasSubscription = false;
        _this.hasCompleted = false;
        _this.index = 0;
        return _this;
    }
    ExhaustMapSubscriber.prototype._next = function (value) {
        if (!this.hasSubscription) {
            this.tryNext(value);
        }
    };
    ExhaustMapSubscriber.prototype.tryNext = function (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);
    };
    ExhaustMapSubscriber.prototype._innerSub = function (result, 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_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
    };
    ExhaustMapSubscriber.prototype._complete = function () {
        this.hasCompleted = true;
        if (!this.hasSubscription) {
            this.destination.complete();
        }
        this.unsubscribe();
    };
    ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.destination.next(innerValue);
    };
    ExhaustMapSubscriber.prototype.notifyError = function (err) {
        this.destination.error(err);
    };
    ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
        var destination = this.destination;
        destination.remove(innerSub);
        this.hasSubscription = false;
        if (this.hasCompleted) {
            this.destination.complete();
        }
    };
    return ExhaustMapSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=exhaustMap.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/expand.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/expand.js ***!
  \**************************************************************/
/*! exports provided: expand, ExpandOperator, ExpandSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */





function expand(project, concurrent, scheduler) {
    if (concurrent === void 0) {
        concurrent = Number.POSITIVE_INFINITY;
    }
    if (scheduler === void 0) {
        scheduler = 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) {
        this.project = project;
        this.concurrent = concurrent;
        this.scheduler = scheduler;
    }
    ExpandOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
    };
    return ExpandOperator;
}());

var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExpandSubscriber, _super);
    function ExpandSubscriber(destination, project, concurrent, scheduler) {
        var _this = _super.call(this, destination) || this;
        _this.project = project;
        _this.concurrent = concurrent;
        _this.scheduler = scheduler;
        _this.index = 0;
        _this.active = 0;
        _this.hasCompleted = false;
        if (concurrent < Number.POSITIVE_INFINITY) {
            _this.buffer = [];
        }
        return _this;
    }
    ExpandSubscriber.dispatch = function (arg) {
        var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
        subscriber.subscribeToProjection(result, value, index);
    };
    ExpandSubscriber.prototype._next = function (value) {
        var destination = this.destination;
        if (destination.closed) {
            this._complete();
            return;
        }
        var index = this.index++;
        if (this.active < this.concurrent) {
            destination.next(value);
            var result = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_1__["tryCatch"])(this.project)(value, index);
            if (result === _util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"]) {
                destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"].e);
            }
            else if (!this.scheduler) {
                this.subscribeToProjection(result, value, index);
            }
            else {
                var state = { subscriber: this, result: result, value: value, index: index };
                var destination_1 = this.destination;
                destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
            }
        }
        else {
            this.buffer.push(value);
        }
    };
    ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
        this.active++;
        var destination = this.destination;
        destination.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, result, value, index));
    };
    ExpandSubscriber.prototype._complete = function () {
        this.hasCompleted = true;
        if (this.hasCompleted && this.active === 0) {
            this.destination.complete();
        }
        this.unsubscribe();
    };
    ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this._next(innerValue);
    };
    ExpandSubscriber.prototype.notifyComplete = function (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();
        }
    };
    return ExpandSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));

//# sourceMappingURL=expand.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/filter.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/filter.js ***!
  \**************************************************************/
/*! exports provided: filter */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function filter(predicate, thisArg) {
    return function filterOperatorFunction(source) {
        return source.lift(new FilterOperator(predicate, thisArg));
    };
}
var FilterOperator = /*@__PURE__*/ (function () {
    function FilterOperator(predicate, thisArg) {
        this.predicate = predicate;
        this.thisArg = thisArg;
    }
    FilterOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
    };
    return FilterOperator;
}());
var FilterSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FilterSubscriber, _super);
    function FilterSubscriber(destination, predicate, thisArg) {
        var _this = _super.call(this, destination) || this;
        _this.predicate = predicate;
        _this.thisArg = thisArg;
        _this.count = 0;
        return _this;
    }
    FilterSubscriber.prototype._next = function (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_1__["Subscriber"]));
//# sourceMappingURL=filter.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/finalize.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/finalize.js ***!
  \****************************************************************/
/*! exports provided: finalize */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */



function finalize(callback) {
    return function (source) { return source.lift(new FinallyOperator(callback)); };
}
var FinallyOperator = /*@__PURE__*/ (function () {
    function FinallyOperator(callback) {
        this.callback = callback;
    }
    FinallyOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new FinallySubscriber(subscriber, this.callback));
    };
    return FinallyOperator;
}());
var FinallySubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FinallySubscriber, _super);
    function FinallySubscriber(destination, callback) {
        var _this = _super.call(this, destination) || this;
        _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"](callback));
        return _this;
    }
    return FinallySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=finalize.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/find.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/find.js ***!
  \************************************************************/
/*! exports provided: find, FindValueOperator, FindValueSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


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) {
        this.predicate = predicate;
        this.source = source;
        this.yieldIndex = yieldIndex;
        this.thisArg = thisArg;
    }
    FindValueOperator.prototype.call = function (observer, source) {
        return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
    };
    return FindValueOperator;
}());

var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FindValueSubscriber, _super);
    function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
        var _this = _super.call(this, destination) || this;
        _this.predicate = predicate;
        _this.source = source;
        _this.yieldIndex = yieldIndex;
        _this.thisArg = thisArg;
        _this.index = 0;
        return _this;
    }
    FindValueSubscriber.prototype.notifyComplete = function (value) {
        var destination = this.destination;
        destination.next(value);
        destination.complete();
        this.unsubscribe();
    };
    FindValueSubscriber.prototype._next = function (value) {
        var _a = this, predicate = _a.predicate, thisArg = _a.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);
        }
    };
    FindValueSubscriber.prototype._complete = function () {
        this.notifyComplete(this.yieldIndex ? -1 : undefined);
    };
    return FindValueSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));

//# sourceMappingURL=find.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/findIndex.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/findIndex.js ***!
  \*****************************************************************/
/*! exports provided: findIndex */
/***/ (function(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/_esm5/internal/operators/find.js");
/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */

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/_esm5/internal/operators/first.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/first.js ***!
  \*************************************************************/
/*! exports provided: first */
/***/ (function(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/_esm5/internal/util/EmptyError.js");
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "./node_modules/rxjs/_esm5/internal/operators/filter.js");
/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take */ "./node_modules/rxjs/_esm5/internal/operators/take.js");
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js");
/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./throwIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js");
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */






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/_esm5/internal/operators/groupBy.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/groupBy.js ***!
  \***************************************************************/
/*! exports provided: groupBy, GroupedObservable */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */





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) {
        this.keySelector = keySelector;
        this.elementSelector = elementSelector;
        this.durationSelector = durationSelector;
        this.subjectSelector = subjectSelector;
    }
    GroupByOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
    };
    return GroupByOperator;
}());
var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupBySubscriber, _super);
    function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
        var _this = _super.call(this, destination) || this;
        _this.keySelector = keySelector;
        _this.elementSelector = elementSelector;
        _this.durationSelector = durationSelector;
        _this.subjectSelector = subjectSelector;
        _this.groups = null;
        _this.attemptedToUnsubscribe = false;
        _this.count = 0;
        return _this;
    }
    GroupBySubscriber.prototype._next = function (value) {
        var key;
        try {
            key = this.keySelector(value);
        }
        catch (err) {
            this.error(err);
            return;
        }
        this._group(value, key);
    };
    GroupBySubscriber.prototype._group = function (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_4__["Subject"]());
            groups.set(key, group);
            var groupedObservable = new GroupedObservable(key, group, this);
            this.destination.next(groupedObservable);
            if (this.durationSelector) {
                var duration = void 0;
                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);
        }
    };
    GroupBySubscriber.prototype._error = function (err) {
        var groups = this.groups;
        if (groups) {
            groups.forEach(function (group, key) {
                group.error(err);
            });
            groups.clear();
        }
        this.destination.error(err);
    };
    GroupBySubscriber.prototype._complete = function () {
        var groups = this.groups;
        if (groups) {
            groups.forEach(function (group, key) {
                group.complete();
            });
            groups.clear();
        }
        this.destination.complete();
    };
    GroupBySubscriber.prototype.removeGroup = function (key) {
        this.groups.delete(key);
    };
    GroupBySubscriber.prototype.unsubscribe = function () {
        if (!this.closed) {
            this.attemptedToUnsubscribe = true;
            if (this.count === 0) {
                _super.prototype.unsubscribe.call(this);
            }
        }
    };
    return GroupBySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupDurationSubscriber, _super);
    function GroupDurationSubscriber(key, group, parent) {
        var _this = _super.call(this, group) || this;
        _this.key = key;
        _this.group = group;
        _this.parent = parent;
        return _this;
    }
    GroupDurationSubscriber.prototype._next = function (value) {
        this.complete();
    };
    GroupDurationSubscriber.prototype._unsubscribe = function () {
        var _a = this, parent = _a.parent, key = _a.key;
        this.key = this.parent = null;
        if (parent) {
            parent.removeGroup(key);
        }
    };
    return GroupDurationSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
var GroupedObservable = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupedObservable, _super);
    function GroupedObservable(key, groupSubject, refCountSubscription) {
        var _this = _super.call(this) || this;
        _this.key = key;
        _this.groupSubject = groupSubject;
        _this.refCountSubscription = refCountSubscription;
        return _this;
    }
    GroupedObservable.prototype._subscribe = function (subscriber) {
        var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
        var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
        if (refCountSubscription && !refCountSubscription.closed) {
            subscription.add(new InnerRefCountSubscription(refCountSubscription));
        }
        subscription.add(groupSubject.subscribe(subscriber));
        return subscription;
    };
    return GroupedObservable;
}(_Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]));

var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerRefCountSubscription, _super);
    function InnerRefCountSubscription(parent) {
        var _this = _super.call(this) || this;
        _this.parent = parent;
        parent.count++;
        return _this;
    }
    InnerRefCountSubscription.prototype.unsubscribe = function () {
        var parent = this.parent;
        if (!parent.closed && !this.closed) {
            _super.prototype.unsubscribe.call(this);
            parent.count -= 1;
            if (parent.count === 0 && parent.attemptedToUnsubscribe) {
                parent.unsubscribe();
            }
        }
    };
    return InnerRefCountSubscription;
}(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]));
//# sourceMappingURL=groupBy.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/ignoreElements.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/ignoreElements.js ***!
  \**********************************************************************/
/*! exports provided: ignoreElements */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function ignoreElements() {
    return function ignoreElementsOperatorFunction(source) {
        return source.lift(new IgnoreElementsOperator());
    };
}
var IgnoreElementsOperator = /*@__PURE__*/ (function () {
    function IgnoreElementsOperator() {
    }
    IgnoreElementsOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new IgnoreElementsSubscriber(subscriber));
    };
    return IgnoreElementsOperator;
}());
var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IgnoreElementsSubscriber, _super);
    function IgnoreElementsSubscriber() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    IgnoreElementsSubscriber.prototype._next = function (unused) {
    };
    return IgnoreElementsSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=ignoreElements.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/isEmpty.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/isEmpty.js ***!
  \***************************************************************/
/*! exports provided: isEmpty */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function isEmpty() {
    return function (source) { return source.lift(new IsEmptyOperator()); };
}
var IsEmptyOperator = /*@__PURE__*/ (function () {
    function IsEmptyOperator() {
    }
    IsEmptyOperator.prototype.call = function (observer, source) {
        return source.subscribe(new IsEmptySubscriber(observer));
    };
    return IsEmptyOperator;
}());
var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IsEmptySubscriber, _super);
    function IsEmptySubscriber(destination) {
        return _super.call(this, destination) || this;
    }
    IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
        var destination = this.destination;
        destination.next(isEmpty);
        destination.complete();
    };
    IsEmptySubscriber.prototype._next = function (value) {
        this.notifyComplete(false);
    };
    IsEmptySubscriber.prototype._complete = function () {
        this.notifyComplete(true);
    };
    return IsEmptySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=isEmpty.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/last.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/last.js ***!
  \************************************************************/
/*! exports provided: last */
/***/ (function(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/_esm5/internal/util/EmptyError.js");
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "./node_modules/rxjs/_esm5/internal/operators/filter.js");
/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast */ "./node_modules/rxjs/_esm5/internal/operators/takeLast.js");
/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./throwIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js");
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaultIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js");
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */






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/_esm5/internal/operators/map.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/map.js ***!
  \***********************************************************/
/*! exports provided: map, MapOperator */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


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) {
        this.project = project;
        this.thisArg = thisArg;
    }
    MapOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
    };
    return MapOperator;
}());

var MapSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapSubscriber, _super);
    function MapSubscriber(destination, project, thisArg) {
        var _this = _super.call(this, destination) || this;
        _this.project = project;
        _this.count = 0;
        _this.thisArg = thisArg || _this;
        return _this;
    }
    MapSubscriber.prototype._next = function (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_1__["Subscriber"]));
//# sourceMappingURL=map.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/mapTo.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/mapTo.js ***!
  \*************************************************************/
/*! exports provided: mapTo */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function mapTo(value) {
    return function (source) { return source.lift(new MapToOperator(value)); };
}
var MapToOperator = /*@__PURE__*/ (function () {
    function MapToOperator(value) {
        this.value = value;
    }
    MapToOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new MapToSubscriber(subscriber, this.value));
    };
    return MapToOperator;
}());
var MapToSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapToSubscriber, _super);
    function MapToSubscriber(destination, value) {
        var _this = _super.call(this, destination) || this;
        _this.value = value;
        return _this;
    }
    MapToSubscriber.prototype._next = function (x) {
        this.destination.next(this.value);
    };
    return MapToSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=mapTo.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/materialize.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/materialize.js ***!
  \*******************************************************************/
/*! exports provided: materialize */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Notification */ "./node_modules/rxjs/_esm5/internal/Notification.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */



function materialize() {
    return function materializeOperatorFunction(source) {
        return source.lift(new MaterializeOperator());
    };
}
var MaterializeOperator = /*@__PURE__*/ (function () {
    function MaterializeOperator() {
    }
    MaterializeOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new MaterializeSubscriber(subscriber));
    };
    return MaterializeOperator;
}());
var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MaterializeSubscriber, _super);
    function MaterializeSubscriber(destination) {
        return _super.call(this, destination) || this;
    }
    MaterializeSubscriber.prototype._next = function (value) {
        this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
    };
    MaterializeSubscriber.prototype._error = function (err) {
        var destination = this.destination;
        destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
        destination.complete();
    };
    MaterializeSubscriber.prototype._complete = function () {
        var destination = this.destination;
        destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
        destination.complete();
    };
    return MaterializeSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=materialize.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/max.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/max.js ***!
  \***********************************************************/
/*! exports provided: max */
/***/ (function(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/_esm5/internal/operators/reduce.js");
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */

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/_esm5/internal/operators/merge.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/merge.js ***!
  \*************************************************************/
/*! exports provided: merge */
/***/ (function(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/_esm5/internal/observable/merge.js");
/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */

function merge() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
}
//# sourceMappingURL=merge.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/mergeAll.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/mergeAll.js ***!
  \****************************************************************/
/*! exports provided: mergeAll */
/***/ (function(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/_esm5/internal/operators/mergeMap.js");
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */


function mergeAll(concurrent) {
    if (concurrent === void 0) {
        concurrent = 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/_esm5/internal/operators/mergeMap.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/mergeMap.js ***!
  \****************************************************************/
/*! exports provided: mergeMap, MergeMapOperator, MergeMapSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../InnerSubscriber */ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js");
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */






function mergeMap(project, resultSelector, concurrent) {
    if (concurrent === void 0) {
        concurrent = Number.POSITIVE_INFINITY;
    }
    if (typeof resultSelector === 'function') {
        return function (source) { return source.pipe(mergeMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["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, concurrent) {
        if (concurrent === void 0) {
            concurrent = Number.POSITIVE_INFINITY;
        }
        this.project = project;
        this.concurrent = concurrent;
    }
    MergeMapOperator.prototype.call = function (observer, source) {
        return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
    };
    return MergeMapOperator;
}());

var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeMapSubscriber, _super);
    function MergeMapSubscriber(destination, project, concurrent) {
        if (concurrent === void 0) {
            concurrent = Number.POSITIVE_INFINITY;
        }
        var _this = _super.call(this, destination) || this;
        _this.project = project;
        _this.concurrent = concurrent;
        _this.hasCompleted = false;
        _this.buffer = [];
        _this.active = 0;
        _this.index = 0;
        return _this;
    }
    MergeMapSubscriber.prototype._next = function (value) {
        if (this.active < this.concurrent) {
            this._tryNext(value);
        }
        else {
            this.buffer.push(value);
        }
    };
    MergeMapSubscriber.prototype._tryNext = function (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);
    };
    MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
        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_1__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
    };
    MergeMapSubscriber.prototype._complete = function () {
        this.hasCompleted = true;
        if (this.active === 0 && this.buffer.length === 0) {
            this.destination.complete();
        }
        this.unsubscribe();
    };
    MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.destination.next(innerValue);
    };
    MergeMapSubscriber.prototype.notifyComplete = function (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_2__["OuterSubscriber"]));

//# sourceMappingURL=mergeMap.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/mergeMapTo.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/mergeMapTo.js ***!
  \******************************************************************/
/*! exports provided: mergeMapTo */
/***/ (function(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/_esm5/internal/operators/mergeMap.js");
/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */

function mergeMapTo(innerObservable, resultSelector, concurrent) {
    if (concurrent === void 0) {
        concurrent = 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/_esm5/internal/operators/mergeScan.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/mergeScan.js ***!
  \*****************************************************************/
/*! exports provided: mergeScan, MergeScanOperator, MergeScanSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../InnerSubscriber */ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js");
/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber PURE_IMPORTS_END */






function mergeScan(accumulator, seed, concurrent) {
    if (concurrent === void 0) {
        concurrent = Number.POSITIVE_INFINITY;
    }
    return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
}
var MergeScanOperator = /*@__PURE__*/ (function () {
    function MergeScanOperator(accumulator, seed, concurrent) {
        this.accumulator = accumulator;
        this.seed = seed;
        this.concurrent = concurrent;
    }
    MergeScanOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
    };
    return MergeScanOperator;
}());

var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeScanSubscriber, _super);
    function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
        var _this = _super.call(this, destination) || this;
        _this.accumulator = accumulator;
        _this.acc = acc;
        _this.concurrent = concurrent;
        _this.hasValue = false;
        _this.hasCompleted = false;
        _this.buffer = [];
        _this.active = 0;
        _this.index = 0;
        return _this;
    }
    MergeScanSubscriber.prototype._next = function (value) {
        if (this.active < this.concurrent) {
            var index = this.index++;
            var ish = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_1__["tryCatch"])(this.accumulator)(this.acc, value);
            var destination = this.destination;
            if (ish === _util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"]) {
                destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"].e);
            }
            else {
                this.active++;
                this._innerSub(ish, value, index);
            }
        }
        else {
            this.buffer.push(value);
        }
    };
    MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
        var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_5__["InnerSubscriber"](this, undefined, undefined);
        var destination = this.destination;
        destination.add(innerSubscriber);
        Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
    };
    MergeScanSubscriber.prototype._complete = function () {
        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();
    };
    MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        var destination = this.destination;
        this.acc = innerValue;
        this.hasValue = true;
        destination.next(innerValue);
    };
    MergeScanSubscriber.prototype.notifyComplete = function (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_4__["OuterSubscriber"]));

//# sourceMappingURL=mergeScan.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/min.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/min.js ***!
  \***********************************************************/
/*! exports provided: min */
/***/ (function(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/_esm5/internal/operators/reduce.js");
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */

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/_esm5/internal/operators/multicast.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/multicast.js ***!
  \*****************************************************************/
/*! exports provided: multicast, MulticastOperator */
/***/ (function(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/_esm5/internal/observable/ConnectableObservable.js");
/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */

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) {
        this.subjectFactory = subjectFactory;
        this.selector = selector;
    }
    MulticastOperator.prototype.call = function (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/_esm5/internal/operators/observeOn.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/observeOn.js ***!
  \*****************************************************************/
/*! exports provided: observeOn, ObserveOnOperator, ObserveOnSubscriber, ObserveOnMessage */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Notification */ "./node_modules/rxjs/_esm5/internal/Notification.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */



function observeOn(scheduler, delay) {
    if (delay === void 0) {
        delay = 0;
    }
    return function observeOnOperatorFunction(source) {
        return source.lift(new ObserveOnOperator(scheduler, delay));
    };
}
var ObserveOnOperator = /*@__PURE__*/ (function () {
    function ObserveOnOperator(scheduler, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        this.scheduler = scheduler;
        this.delay = delay;
    }
    ObserveOnOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
    };
    return ObserveOnOperator;
}());

var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObserveOnSubscriber, _super);
    function ObserveOnSubscriber(destination, scheduler, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        var _this = _super.call(this, destination) || this;
        _this.scheduler = scheduler;
        _this.delay = delay;
        return _this;
    }
    ObserveOnSubscriber.dispatch = function (arg) {
        var notification = arg.notification, destination = arg.destination;
        notification.observe(destination);
        this.unsubscribe();
    };
    ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
        var destination = this.destination;
        destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
    };
    ObserveOnSubscriber.prototype._next = function (value) {
        this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
    };
    ObserveOnSubscriber.prototype._error = function (err) {
        this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
        this.unsubscribe();
    };
    ObserveOnSubscriber.prototype._complete = function () {
        this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
        this.unsubscribe();
    };
    return ObserveOnSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));

var ObserveOnMessage = /*@__PURE__*/ (function () {
    function ObserveOnMessage(notification, destination) {
        this.notification = notification;
        this.destination = destination;
    }
    return ObserveOnMessage;
}());

//# sourceMappingURL=observeOn.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/onErrorResumeNext.js":
/*!*************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/onErrorResumeNext.js ***!
  \*************************************************************************/
/*! exports provided: onErrorResumeNext, onErrorResumeNextStatic */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../InnerSubscriber */ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */






function onErrorResumeNext() {
    var nextSources = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        nextSources[_i] = arguments[_i];
    }
    if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
        nextSources = nextSources[0];
    }
    return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
}
function onErrorResumeNextStatic() {
    var nextSources = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        nextSources[_i] = arguments[_i];
    }
    var source = null;
    if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
        nextSources = nextSources[0];
    }
    source = nextSources.shift();
    return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
}
var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
    function OnErrorResumeNextOperator(nextSources) {
        this.nextSources = nextSources;
    }
    OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
    };
    return OnErrorResumeNextOperator;
}());
var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OnErrorResumeNextSubscriber, _super);
    function OnErrorResumeNextSubscriber(destination, nextSources) {
        var _this = _super.call(this, destination) || this;
        _this.destination = destination;
        _this.nextSources = nextSources;
        return _this;
    }
    OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
        this.subscribeToNextSource();
    };
    OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
        this.subscribeToNextSource();
    };
    OnErrorResumeNextSubscriber.prototype._error = function (err) {
        this.subscribeToNextSource();
        this.unsubscribe();
    };
    OnErrorResumeNextSubscriber.prototype._complete = function () {
        this.subscribeToNextSource();
        this.unsubscribe();
    };
    OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
        var next = this.nextSources.shift();
        if (next) {
            var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__["InnerSubscriber"](this, undefined, undefined);
            var destination = this.destination;
            destination.add(innerSubscriber);
            Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, next, undefined, undefined, innerSubscriber);
        }
        else {
            this.destination.complete();
        }
    };
    return OnErrorResumeNextSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
//# sourceMappingURL=onErrorResumeNext.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/pairwise.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/pairwise.js ***!
  \****************************************************************/
/*! exports provided: pairwise */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function pairwise() {
    return function (source) { return source.lift(new PairwiseOperator()); };
}
var PairwiseOperator = /*@__PURE__*/ (function () {
    function PairwiseOperator() {
    }
    PairwiseOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new PairwiseSubscriber(subscriber));
    };
    return PairwiseOperator;
}());
var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](PairwiseSubscriber, _super);
    function PairwiseSubscriber(destination) {
        var _this = _super.call(this, destination) || this;
        _this.hasPrev = false;
        return _this;
    }
    PairwiseSubscriber.prototype._next = function (value) {
        if (this.hasPrev) {
            this.destination.next([this.prev, value]);
        }
        else {
            this.hasPrev = true;
        }
        this.prev = value;
    };
    return PairwiseSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=pairwise.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/partition.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/partition.js ***!
  \*****************************************************************/
/*! exports provided: partition */
/***/ (function(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/_esm5/internal/util/not.js");
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "./node_modules/rxjs/_esm5/internal/operators/filter.js");
/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */


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/_esm5/internal/operators/pluck.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/pluck.js ***!
  \*************************************************************/
/*! exports provided: pluck */
/***/ (function(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/_esm5/internal/operators/map.js");
/** PURE_IMPORTS_START _map PURE_IMPORTS_END */

function pluck() {
    var properties = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        properties[_i] = arguments[_i];
    }
    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 (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/_esm5/internal/operators/publish.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/publish.js ***!
  \***************************************************************/
/*! exports provided: publish */
/***/ (function(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/_esm5/internal/Subject.js");
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */


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/_esm5/internal/operators/publishBehavior.js":
/*!***********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/publishBehavior.js ***!
  \***********************************************************************/
/*! exports provided: publishBehavior */
/***/ (function(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/_esm5/internal/BehaviorSubject.js");
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */


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/_esm5/internal/operators/publishLast.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/publishLast.js ***!
  \*******************************************************************/
/*! exports provided: publishLast */
/***/ (function(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/_esm5/internal/AsyncSubject.js");
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */


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/_esm5/internal/operators/publishReplay.js":
/*!*********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/publishReplay.js ***!
  \*********************************************************************/
/*! exports provided: publishReplay */
/***/ (function(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/_esm5/internal/ReplaySubject.js");
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */


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/_esm5/internal/operators/race.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/race.js ***!
  \************************************************************/
/*! exports provided: race */
/***/ (function(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/_esm5/internal/util/isArray.js");
/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/race */ "./node_modules/rxjs/_esm5/internal/observable/race.js");
/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */


function race() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    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(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"].apply(void 0, [source].concat(observables)));
    };
}
//# sourceMappingURL=race.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/reduce.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/reduce.js ***!
  \**************************************************************/
/*! exports provided: reduce */
/***/ (function(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/_esm5/internal/operators/scan.js");
/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./takeLast */ "./node_modules/rxjs/_esm5/internal/operators/takeLast.js");
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js");
/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/pipe */ "./node_modules/rxjs/_esm5/internal/util/pipe.js");
/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */




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/_esm5/internal/operators/refCount.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/refCount.js ***!
  \****************************************************************/
/*! exports provided: refCount */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function refCount() {
    return function refCountOperatorFunction(source) {
        return source.lift(new RefCountOperator(source));
    };
}
var RefCountOperator = /*@__PURE__*/ (function () {
    function RefCountOperator(connectable) {
        this.connectable = connectable;
    }
    RefCountOperator.prototype.call = function (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 (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
    function RefCountSubscriber(destination, connectable) {
        var _this = _super.call(this, destination) || this;
        _this.connectable = connectable;
        return _this;
    }
    RefCountSubscriber.prototype._unsubscribe = function () {
        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_1__["Subscriber"]));
//# sourceMappingURL=refCount.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/repeat.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/repeat.js ***!
  \**************************************************************/
/*! exports provided: repeat */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */



function repeat(count) {
    if (count === void 0) {
        count = -1;
    }
    return function (source) {
        if (count === 0) {
            return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["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) {
        this.count = count;
        this.source = source;
    }
    RepeatOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
    };
    return RepeatOperator;
}());
var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatSubscriber, _super);
    function RepeatSubscriber(destination, count, source) {
        var _this = _super.call(this, destination) || this;
        _this.count = count;
        _this.source = source;
        return _this;
    }
    RepeatSubscriber.prototype.complete = function () {
        if (!this.isStopped) {
            var _a = this, source = _a.source, count = _a.count;
            if (count === 0) {
                return _super.prototype.complete.call(this);
            }
            else if (count > -1) {
                this.count = count - 1;
            }
            source.subscribe(this._unsubscribeAndRecycle());
        }
    };
    return RepeatSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=repeat.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/repeatWhen.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/repeatWhen.js ***!
  \******************************************************************/
/*! exports provided: repeatWhen */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */






function repeatWhen(notifier) {
    return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
}
var RepeatWhenOperator = /*@__PURE__*/ (function () {
    function RepeatWhenOperator(notifier) {
        this.notifier = notifier;
    }
    RepeatWhenOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
    };
    return RepeatWhenOperator;
}());
var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatWhenSubscriber, _super);
    function RepeatWhenSubscriber(destination, notifier, source) {
        var _this = _super.call(this, destination) || this;
        _this.notifier = notifier;
        _this.source = source;
        _this.sourceIsBeingSubscribedTo = true;
        return _this;
    }
    RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.sourceIsBeingSubscribedTo = true;
        this.source.subscribe(this);
    };
    RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
        if (this.sourceIsBeingSubscribedTo === false) {
            return _super.prototype.complete.call(this);
        }
    };
    RepeatWhenSubscriber.prototype.complete = function () {
        this.sourceIsBeingSubscribedTo = false;
        if (!this.isStopped) {
            if (!this.retries) {
                this.subscribeToRetries();
            }
            if (!this.retriesSubscription || this.retriesSubscription.closed) {
                return _super.prototype.complete.call(this);
            }
            this._unsubscribeAndRecycle();
            this.notifications.next();
        }
    };
    RepeatWhenSubscriber.prototype._unsubscribe = function () {
        var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
        if (notifications) {
            notifications.unsubscribe();
            this.notifications = null;
        }
        if (retriesSubscription) {
            retriesSubscription.unsubscribe();
            this.retriesSubscription = null;
        }
        this.retries = null;
    };
    RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
        var _unsubscribe = this._unsubscribe;
        this._unsubscribe = null;
        _super.prototype._unsubscribeAndRecycle.call(this);
        this._unsubscribe = _unsubscribe;
        return this;
    };
    RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
        this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
        var retries = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.notifier)(this.notifications);
        if (retries === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
            return _super.prototype.complete.call(this);
        }
        this.retries = retries;
        this.retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, retries);
    };
    return RepeatWhenSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
//# sourceMappingURL=repeatWhen.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/retry.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/retry.js ***!
  \*************************************************************/
/*! exports provided: retry */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function retry(count) {
    if (count === void 0) {
        count = -1;
    }
    return function (source) { return source.lift(new RetryOperator(count, source)); };
}
var RetryOperator = /*@__PURE__*/ (function () {
    function RetryOperator(count, source) {
        this.count = count;
        this.source = source;
    }
    RetryOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
    };
    return RetryOperator;
}());
var RetrySubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetrySubscriber, _super);
    function RetrySubscriber(destination, count, source) {
        var _this = _super.call(this, destination) || this;
        _this.count = count;
        _this.source = source;
        return _this;
    }
    RetrySubscriber.prototype.error = function (err) {
        if (!this.isStopped) {
            var _a = this, source = _a.source, count = _a.count;
            if (count === 0) {
                return _super.prototype.error.call(this, err);
            }
            else if (count > -1) {
                this.count = count - 1;
            }
            source.subscribe(this._unsubscribeAndRecycle());
        }
    };
    return RetrySubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=retry.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/retryWhen.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/retryWhen.js ***!
  \*****************************************************************/
/*! exports provided: retryWhen */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */






function retryWhen(notifier) {
    return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
}
var RetryWhenOperator = /*@__PURE__*/ (function () {
    function RetryWhenOperator(notifier, source) {
        this.notifier = notifier;
        this.source = source;
    }
    RetryWhenOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
    };
    return RetryWhenOperator;
}());
var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetryWhenSubscriber, _super);
    function RetryWhenSubscriber(destination, notifier, source) {
        var _this = _super.call(this, destination) || this;
        _this.notifier = notifier;
        _this.source = source;
        return _this;
    }
    RetryWhenSubscriber.prototype.error = function (err) {
        if (!this.isStopped) {
            var errors = this.errors;
            var retries = this.retries;
            var retriesSubscription = this.retriesSubscription;
            if (!retries) {
                errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
                retries = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.notifier)(errors);
                if (retries === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
                    return _super.prototype.error.call(this, _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
                }
                retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, retries);
            }
            else {
                this.errors = null;
                this.retriesSubscription = null;
            }
            this._unsubscribeAndRecycle();
            this.errors = errors;
            this.retries = retries;
            this.retriesSubscription = retriesSubscription;
            errors.next(err);
        }
    };
    RetryWhenSubscriber.prototype._unsubscribe = function () {
        var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
        if (errors) {
            errors.unsubscribe();
            this.errors = null;
        }
        if (retriesSubscription) {
            retriesSubscription.unsubscribe();
            this.retriesSubscription = null;
        }
        this.retries = null;
    };
    RetryWhenSubscriber.prototype.notifyNext = function (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_4__["OuterSubscriber"]));
//# sourceMappingURL=retryWhen.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/sample.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/sample.js ***!
  \**************************************************************/
/*! exports provided: sample */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */



function sample(notifier) {
    return function (source) { return source.lift(new SampleOperator(notifier)); };
}
var SampleOperator = /*@__PURE__*/ (function () {
    function SampleOperator(notifier) {
        this.notifier = notifier;
    }
    SampleOperator.prototype.call = function (subscriber, source) {
        var sampleSubscriber = new SampleSubscriber(subscriber);
        var subscription = source.subscribe(sampleSubscriber);
        subscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(sampleSubscriber, this.notifier));
        return subscription;
    };
    return SampleOperator;
}());
var SampleSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleSubscriber, _super);
    function SampleSubscriber() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.hasValue = false;
        return _this;
    }
    SampleSubscriber.prototype._next = function (value) {
        this.value = value;
        this.hasValue = true;
    };
    SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.emitValue();
    };
    SampleSubscriber.prototype.notifyComplete = function () {
        this.emitValue();
    };
    SampleSubscriber.prototype.emitValue = function () {
        if (this.hasValue) {
            this.hasValue = false;
            this.destination.next(this.value);
        }
    };
    return SampleSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=sample.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/sampleTime.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/sampleTime.js ***!
  \******************************************************************/
/*! exports provided: sampleTime */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */



function sampleTime(period, scheduler) {
    if (scheduler === void 0) {
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
    }
    return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
}
var SampleTimeOperator = /*@__PURE__*/ (function () {
    function SampleTimeOperator(period, scheduler) {
        this.period = period;
        this.scheduler = scheduler;
    }
    SampleTimeOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
    };
    return SampleTimeOperator;
}());
var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleTimeSubscriber, _super);
    function SampleTimeSubscriber(destination, period, scheduler) {
        var _this = _super.call(this, destination) || this;
        _this.period = period;
        _this.scheduler = scheduler;
        _this.hasValue = false;
        _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
        return _this;
    }
    SampleTimeSubscriber.prototype._next = function (value) {
        this.lastValue = value;
        this.hasValue = true;
    };
    SampleTimeSubscriber.prototype.notifyNext = function () {
        if (this.hasValue) {
            this.hasValue = false;
            this.destination.next(this.lastValue);
        }
    };
    return SampleTimeSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
function dispatchNotification(state) {
    var subscriber = state.subscriber, period = state.period;
    subscriber.notifyNext();
    this.schedule(state, period);
}
//# sourceMappingURL=sampleTime.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/scan.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/scan.js ***!
  \************************************************************/
/*! exports provided: scan */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


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, hasSeed) {
        if (hasSeed === void 0) {
            hasSeed = false;
        }
        this.accumulator = accumulator;
        this.seed = seed;
        this.hasSeed = hasSeed;
    }
    ScanOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
    };
    return ScanOperator;
}());
var ScanSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ScanSubscriber, _super);
    function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
        var _this = _super.call(this, destination) || this;
        _this.accumulator = accumulator;
        _this._seed = _seed;
        _this.hasSeed = hasSeed;
        _this.index = 0;
        return _this;
    }
    Object.defineProperty(ScanSubscriber.prototype, "seed", {
        get: function () {
            return this._seed;
        },
        set: function (value) {
            this.hasSeed = true;
            this._seed = value;
        },
        enumerable: true,
        configurable: true
    });
    ScanSubscriber.prototype._next = function (value) {
        if (!this.hasSeed) {
            this.seed = value;
            this.destination.next(value);
        }
        else {
            return this._tryNext(value);
        }
    };
    ScanSubscriber.prototype._tryNext = function (value) {
        var index = this.index++;
        var result;
        try {
            result = this.accumulator(this.seed, value, index);
        }
        catch (err) {
            this.destination.error(err);
        }
        this.seed = result;
        this.destination.next(result);
    };
    return ScanSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=scan.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/sequenceEqual.js":
/*!*********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/sequenceEqual.js ***!
  \*********************************************************************/
/*! exports provided: sequenceEqual, SequenceEqualOperator, SequenceEqualSubscriber */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */




function sequenceEqual(compareTo, comparor) {
    return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparor)); };
}
var SequenceEqualOperator = /*@__PURE__*/ (function () {
    function SequenceEqualOperator(compareTo, comparor) {
        this.compareTo = compareTo;
        this.comparor = comparor;
    }
    SequenceEqualOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparor));
    };
    return SequenceEqualOperator;
}());

var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualSubscriber, _super);
    function SequenceEqualSubscriber(destination, compareTo, comparor) {
        var _this = _super.call(this, destination) || this;
        _this.compareTo = compareTo;
        _this.comparor = comparor;
        _this._a = [];
        _this._b = [];
        _this._oneComplete = false;
        _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
        return _this;
    }
    SequenceEqualSubscriber.prototype._next = function (value) {
        if (this._oneComplete && this._b.length === 0) {
            this.emit(false);
        }
        else {
            this._a.push(value);
            this.checkValues();
        }
    };
    SequenceEqualSubscriber.prototype._complete = function () {
        if (this._oneComplete) {
            this.emit(this._a.length === 0 && this._b.length === 0);
        }
        else {
            this._oneComplete = true;
        }
        this.unsubscribe();
    };
    SequenceEqualSubscriber.prototype.checkValues = function () {
        var _c = this, _a = _c._a, _b = _c._b, comparor = _c.comparor;
        while (_a.length > 0 && _b.length > 0) {
            var a = _a.shift();
            var b = _b.shift();
            var areEqual = false;
            if (comparor) {
                areEqual = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(comparor)(a, b);
                if (areEqual === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
                    this.destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
                }
            }
            else {
                areEqual = a === b;
            }
            if (!areEqual) {
                this.emit(false);
            }
        }
    };
    SequenceEqualSubscriber.prototype.emit = function (value) {
        var destination = this.destination;
        destination.next(value);
        destination.complete();
    };
    SequenceEqualSubscriber.prototype.nextB = function (value) {
        if (this._oneComplete && this._a.length === 0) {
            this.emit(false);
        }
        else {
            this._b.push(value);
            this.checkValues();
        }
    };
    SequenceEqualSubscriber.prototype.completeB = function () {
        if (this._oneComplete) {
            this.emit(this._a.length === 0 && this._b.length === 0);
        }
        else {
            this._oneComplete = true;
        }
    };
    return SequenceEqualSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));

var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualCompareToSubscriber, _super);
    function SequenceEqualCompareToSubscriber(destination, parent) {
        var _this = _super.call(this, destination) || this;
        _this.parent = parent;
        return _this;
    }
    SequenceEqualCompareToSubscriber.prototype._next = function (value) {
        this.parent.nextB(value);
    };
    SequenceEqualCompareToSubscriber.prototype._error = function (err) {
        this.parent.error(err);
        this.unsubscribe();
    };
    SequenceEqualCompareToSubscriber.prototype._complete = function () {
        this.parent.completeB();
        this.unsubscribe();
    };
    return SequenceEqualCompareToSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=sequenceEqual.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/share.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/share.js ***!
  \*************************************************************/
/*! exports provided: share */
/***/ (function(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/_esm5/internal/operators/multicast.js");
/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./refCount */ "./node_modules/rxjs/_esm5/internal/operators/refCount.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */



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/_esm5/internal/operators/shareReplay.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/shareReplay.js ***!
  \*******************************************************************/
/*! exports provided: shareReplay */
/***/ (function(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/_esm5/internal/ReplaySubject.js");
/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */

function shareReplay(bufferSize, windowTime, scheduler) {
    if (bufferSize === void 0) {
        bufferSize = Number.POSITIVE_INFINITY;
    }
    if (windowTime === void 0) {
        windowTime = Number.POSITIVE_INFINITY;
    }
    return function (source) { return source.lift(shareReplayOperator(bufferSize, windowTime, scheduler)); };
}
function shareReplayOperator(bufferSize, windowTime, 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 (value) { subject.next(value); },
                error: function (err) {
                    hasError = true;
                    subject.error(err);
                },
                complete: function () {
                    isComplete = true;
                    subject.complete();
                },
            });
        }
        var innerSub = subject.subscribe(this);
        return function () {
            refCount--;
            innerSub.unsubscribe();
            if (subscription && refCount === 0 && isComplete) {
                subscription.unsubscribe();
            }
        };
    };
}
//# sourceMappingURL=shareReplay.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/single.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/single.js ***!
  \**************************************************************/
/*! exports provided: single */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/EmptyError */ "./node_modules/rxjs/_esm5/internal/util/EmptyError.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */



function single(predicate) {
    return function (source) { return source.lift(new SingleOperator(predicate, source)); };
}
var SingleOperator = /*@__PURE__*/ (function () {
    function SingleOperator(predicate, source) {
        this.predicate = predicate;
        this.source = source;
    }
    SingleOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
    };
    return SingleOperator;
}());
var SingleSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SingleSubscriber, _super);
    function SingleSubscriber(destination, predicate, source) {
        var _this = _super.call(this, destination) || this;
        _this.predicate = predicate;
        _this.source = source;
        _this.seenValue = false;
        _this.index = 0;
        return _this;
    }
    SingleSubscriber.prototype.applySingleValue = function (value) {
        if (this.seenValue) {
            this.destination.error('Sequence contains more than one element');
        }
        else {
            this.seenValue = true;
            this.singleValue = value;
        }
    };
    SingleSubscriber.prototype._next = function (value) {
        var index = this.index++;
        if (this.predicate) {
            this.tryNext(value, index);
        }
        else {
            this.applySingleValue(value);
        }
    };
    SingleSubscriber.prototype.tryNext = function (value, index) {
        try {
            if (this.predicate(value, index, this.source)) {
                this.applySingleValue(value);
            }
        }
        catch (err) {
            this.destination.error(err);
        }
    };
    SingleSubscriber.prototype._complete = function () {
        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_2__["EmptyError"]);
        }
    };
    return SingleSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=single.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/skip.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/skip.js ***!
  \************************************************************/
/*! exports provided: skip */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function skip(count) {
    return function (source) { return source.lift(new SkipOperator(count)); };
}
var SkipOperator = /*@__PURE__*/ (function () {
    function SkipOperator(total) {
        this.total = total;
    }
    SkipOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new SkipSubscriber(subscriber, this.total));
    };
    return SkipOperator;
}());
var SkipSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipSubscriber, _super);
    function SkipSubscriber(destination, total) {
        var _this = _super.call(this, destination) || this;
        _this.total = total;
        _this.count = 0;
        return _this;
    }
    SkipSubscriber.prototype._next = function (x) {
        if (++this.count > this.total) {
            this.destination.next(x);
        }
    };
    return SkipSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=skip.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/skipLast.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/skipLast.js ***!
  \****************************************************************/
/*! exports provided: skipLast */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */



function skipLast(count) {
    return function (source) { return source.lift(new SkipLastOperator(count)); };
}
var SkipLastOperator = /*@__PURE__*/ (function () {
    function SkipLastOperator(_skipCount) {
        this._skipCount = _skipCount;
        if (this._skipCount < 0) {
            throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
        }
    }
    SkipLastOperator.prototype.call = function (subscriber, source) {
        if (this._skipCount === 0) {
            return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"](subscriber));
        }
        else {
            return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
        }
    };
    return SkipLastOperator;
}());
var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipLastSubscriber, _super);
    function SkipLastSubscriber(destination, _skipCount) {
        var _this = _super.call(this, destination) || this;
        _this._skipCount = _skipCount;
        _this._count = 0;
        _this._ring = new Array(_skipCount);
        return _this;
    }
    SkipLastSubscriber.prototype._next = function (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_1__["Subscriber"]));
//# sourceMappingURL=skipLast.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/skipUntil.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/skipUntil.js ***!
  \*****************************************************************/
/*! exports provided: skipUntil */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../InnerSubscriber */ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */




function skipUntil(notifier) {
    return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
}
var SkipUntilOperator = /*@__PURE__*/ (function () {
    function SkipUntilOperator(notifier) {
        this.notifier = notifier;
    }
    SkipUntilOperator.prototype.call = function (destination, source) {
        return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
    };
    return SkipUntilOperator;
}());
var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipUntilSubscriber, _super);
    function SkipUntilSubscriber(destination, notifier) {
        var _this = _super.call(this, destination) || this;
        _this.hasValue = false;
        var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](_this, undefined, undefined);
        _this.add(innerSubscriber);
        _this.innerSubscription = innerSubscriber;
        Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_this, notifier, undefined, undefined, innerSubscriber);
        return _this;
    }
    SkipUntilSubscriber.prototype._next = function (value) {
        if (this.hasValue) {
            _super.prototype._next.call(this, value);
        }
    };
    SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.hasValue = true;
        if (this.innerSubscription) {
            this.innerSubscription.unsubscribe();
        }
    };
    SkipUntilSubscriber.prototype.notifyComplete = function () {
    };
    return SkipUntilSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=skipUntil.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/skipWhile.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/skipWhile.js ***!
  \*****************************************************************/
/*! exports provided: skipWhile */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function skipWhile(predicate) {
    return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
}
var SkipWhileOperator = /*@__PURE__*/ (function () {
    function SkipWhileOperator(predicate) {
        this.predicate = predicate;
    }
    SkipWhileOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
    };
    return SkipWhileOperator;
}());
var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipWhileSubscriber, _super);
    function SkipWhileSubscriber(destination, predicate) {
        var _this = _super.call(this, destination) || this;
        _this.predicate = predicate;
        _this.skipping = true;
        _this.index = 0;
        return _this;
    }
    SkipWhileSubscriber.prototype._next = function (value) {
        var destination = this.destination;
        if (this.skipping) {
            this.tryCallPredicate(value);
        }
        if (!this.skipping) {
            destination.next(value);
        }
    };
    SkipWhileSubscriber.prototype.tryCallPredicate = function (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_1__["Subscriber"]));
//# sourceMappingURL=skipWhile.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/startWith.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/startWith.js ***!
  \*****************************************************************/
/*! exports provided: startWith */
/***/ (function(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/_esm5/internal/observable/fromArray.js");
/* harmony import */ var _observable_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/scalar */ "./node_modules/rxjs/_esm5/internal/observable/scalar.js");
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/concat */ "./node_modules/rxjs/_esm5/internal/observable/concat.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */





function startWith() {
    var array = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        array[_i] = arguments[_i];
    }
    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/_esm5/internal/operators/subscribeOn.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/subscribeOn.js ***!
  \*******************************************************************/
/*! exports provided: subscribeOn */
/***/ (function(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/_esm5/internal/observable/SubscribeOnObservable.js");
/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */

function subscribeOn(scheduler, delay) {
    if (delay === void 0) {
        delay = 0;
    }
    return function subscribeOnOperatorFunction(source) {
        return source.lift(new SubscribeOnOperator(scheduler, delay));
    };
}
var SubscribeOnOperator = /*@__PURE__*/ (function () {
    function SubscribeOnOperator(scheduler, delay) {
        this.scheduler = scheduler;
        this.delay = delay;
    }
    SubscribeOnOperator.prototype.call = function (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/_esm5/internal/operators/switchAll.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/switchAll.js ***!
  \*****************************************************************/
/*! exports provided: switchAll */
/***/ (function(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/_esm5/internal/operators/switchMap.js");
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */


function switchAll() {
    return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
}
//# sourceMappingURL=switchAll.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/switchMap.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/switchMap.js ***!
  \*****************************************************************/
/*! exports provided: switchMap */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../InnerSubscriber */ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */






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_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["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) {
        this.project = project;
    }
    SwitchMapOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
    };
    return SwitchMapOperator;
}());
var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchMapSubscriber, _super);
    function SwitchMapSubscriber(destination, project) {
        var _this = _super.call(this, destination) || this;
        _this.project = project;
        _this.index = 0;
        return _this;
    }
    SwitchMapSubscriber.prototype._next = function (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);
    };
    SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
        var innerSubscription = this.innerSubscription;
        if (innerSubscription) {
            innerSubscription.unsubscribe();
        }
        var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
        var destination = this.destination;
        destination.add(innerSubscriber);
        this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
    };
    SwitchMapSubscriber.prototype._complete = function () {
        var innerSubscription = this.innerSubscription;
        if (!innerSubscription || innerSubscription.closed) {
            _super.prototype._complete.call(this);
        }
        this.unsubscribe();
    };
    SwitchMapSubscriber.prototype._unsubscribe = function () {
        this.innerSubscription = null;
    };
    SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
        var destination = this.destination;
        destination.remove(innerSub);
        this.innerSubscription = null;
        if (this.isStopped) {
            _super.prototype._complete.call(this);
        }
    };
    SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.destination.next(innerValue);
    };
    return SwitchMapSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=switchMap.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js ***!
  \*******************************************************************/
/*! exports provided: switchMapTo */
/***/ (function(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/_esm5/internal/operators/switchMap.js");
/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */

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/_esm5/internal/operators/take.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/take.js ***!
  \************************************************************/
/*! exports provided: take */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js");
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */




function take(count) {
    return function (source) {
        if (count === 0) {
            return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
        }
        else {
            return source.lift(new TakeOperator(count));
        }
    };
}
var TakeOperator = /*@__PURE__*/ (function () {
    function TakeOperator(total) {
        this.total = total;
        if (this.total < 0) {
            throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
        }
    }
    TakeOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new TakeSubscriber(subscriber, this.total));
    };
    return TakeOperator;
}());
var TakeSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeSubscriber, _super);
    function TakeSubscriber(destination, total) {
        var _this = _super.call(this, destination) || this;
        _this.total = total;
        _this.count = 0;
        return _this;
    }
    TakeSubscriber.prototype._next = function (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_1__["Subscriber"]));
//# sourceMappingURL=take.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/takeLast.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/takeLast.js ***!
  \****************************************************************/
/*! exports provided: takeLast */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js");
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */




function takeLast(count) {
    return function takeLastOperatorFunction(source) {
        if (count === 0) {
            return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
        }
        else {
            return source.lift(new TakeLastOperator(count));
        }
    };
}
var TakeLastOperator = /*@__PURE__*/ (function () {
    function TakeLastOperator(total) {
        this.total = total;
        if (this.total < 0) {
            throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
        }
    }
    TakeLastOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
    };
    return TakeLastOperator;
}());
var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeLastSubscriber, _super);
    function TakeLastSubscriber(destination, total) {
        var _this = _super.call(this, destination) || this;
        _this.total = total;
        _this.ring = new Array();
        _this.count = 0;
        return _this;
    }
    TakeLastSubscriber.prototype._next = function (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;
        }
    };
    TakeLastSubscriber.prototype._complete = function () {
        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_1__["Subscriber"]));
//# sourceMappingURL=takeLast.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/takeUntil.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/takeUntil.js ***!
  \*****************************************************************/
/*! exports provided: takeUntil */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */



function takeUntil(notifier) {
    return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
}
var TakeUntilOperator = /*@__PURE__*/ (function () {
    function TakeUntilOperator(notifier) {
        this.notifier = notifier;
    }
    TakeUntilOperator.prototype.call = function (subscriber, source) {
        var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
        var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(takeUntilSubscriber, this.notifier);
        if (notifierSubscription && !takeUntilSubscriber.seenValue) {
            takeUntilSubscriber.add(notifierSubscription);
            return source.subscribe(takeUntilSubscriber);
        }
        return takeUntilSubscriber;
    };
    return TakeUntilOperator;
}());
var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeUntilSubscriber, _super);
    function TakeUntilSubscriber(destination) {
        var _this = _super.call(this, destination) || this;
        _this.seenValue = false;
        return _this;
    }
    TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.seenValue = true;
        this.complete();
    };
    TakeUntilSubscriber.prototype.notifyComplete = function () {
    };
    return TakeUntilSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=takeUntil.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/takeWhile.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/takeWhile.js ***!
  \*****************************************************************/
/*! exports provided: takeWhile */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */


function takeWhile(predicate) {
    return function (source) { return source.lift(new TakeWhileOperator(predicate)); };
}
var TakeWhileOperator = /*@__PURE__*/ (function () {
    function TakeWhileOperator(predicate) {
        this.predicate = predicate;
    }
    TakeWhileOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate));
    };
    return TakeWhileOperator;
}());
var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeWhileSubscriber, _super);
    function TakeWhileSubscriber(destination, predicate) {
        var _this = _super.call(this, destination) || this;
        _this.predicate = predicate;
        _this.index = 0;
        return _this;
    }
    TakeWhileSubscriber.prototype._next = function (value) {
        var destination = this.destination;
        var result;
        try {
            result = this.predicate(value, this.index++);
        }
        catch (err) {
            destination.error(err);
            return;
        }
        this.nextOrComplete(value, result);
    };
    TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
        var destination = this.destination;
        if (Boolean(predicateResult)) {
            destination.next(value);
        }
        else {
            destination.complete();
        }
    };
    return TakeWhileSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=takeWhile.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/tap.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/tap.js ***!
  \***********************************************************/
/*! exports provided: tap */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/noop */ "./node_modules/rxjs/_esm5/internal/util/noop.js");
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */




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) {
        this.nextOrObserver = nextOrObserver;
        this.error = error;
        this.complete = complete;
    }
    DoOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
    };
    return DoOperator;
}());
var TapSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TapSubscriber, _super);
    function TapSubscriber(destination, observerOrNext, error, complete) {
        var _this = _super.call(this, destination) || this;
        _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
        _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
        _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
        _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
        _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
        if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(observerOrNext)) {
            _this._context = _this;
            _this._tapNext = observerOrNext;
        }
        else if (observerOrNext) {
            _this._context = observerOrNext;
            _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
            _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
            _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
        }
        return _this;
    }
    TapSubscriber.prototype._next = function (value) {
        try {
            this._tapNext.call(this._context, value);
        }
        catch (err) {
            this.destination.error(err);
            return;
        }
        this.destination.next(value);
    };
    TapSubscriber.prototype._error = function (err) {
        try {
            this._tapError.call(this._context, err);
        }
        catch (err) {
            this.destination.error(err);
            return;
        }
        this.destination.error(err);
    };
    TapSubscriber.prototype._complete = function () {
        try {
            this._tapComplete.call(this._context);
        }
        catch (err) {
            this.destination.error(err);
            return;
        }
        return this.destination.complete();
    };
    return TapSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=tap.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/throttle.js":
/*!****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/throttle.js ***!
  \****************************************************************/
/*! exports provided: defaultThrottleConfig, throttle */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */



var defaultThrottleConfig = {
    leading: true,
    trailing: false
};
function throttle(durationSelector, config) {
    if (config === void 0) {
        config = defaultThrottleConfig;
    }
    return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
}
var ThrottleOperator = /*@__PURE__*/ (function () {
    function ThrottleOperator(durationSelector, leading, trailing) {
        this.durationSelector = durationSelector;
        this.leading = leading;
        this.trailing = trailing;
    }
    ThrottleOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
    };
    return ThrottleOperator;
}());
var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleSubscriber, _super);
    function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
        var _this = _super.call(this, destination) || this;
        _this.destination = destination;
        _this.durationSelector = durationSelector;
        _this._leading = _leading;
        _this._trailing = _trailing;
        _this._hasValue = false;
        return _this;
    }
    ThrottleSubscriber.prototype._next = function (value) {
        this._hasValue = true;
        this._sendValue = value;
        if (!this._throttled) {
            if (this._leading) {
                this.send();
            }
            else {
                this.throttle(value);
            }
        }
    };
    ThrottleSubscriber.prototype.send = function () {
        var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
        if (_hasValue) {
            this.destination.next(_sendValue);
            this.throttle(_sendValue);
        }
        this._hasValue = false;
        this._sendValue = null;
    };
    ThrottleSubscriber.prototype.throttle = function (value) {
        var duration = this.tryDurationSelector(value);
        if (duration) {
            this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration));
        }
    };
    ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
        try {
            return this.durationSelector(value);
        }
        catch (err) {
            this.destination.error(err);
            return null;
        }
    };
    ThrottleSubscriber.prototype.throttlingDone = function () {
        var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
        if (_throttled) {
            _throttled.unsubscribe();
        }
        this._throttled = null;
        if (_trailing) {
            this.send();
        }
    };
    ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.throttlingDone();
    };
    ThrottleSubscriber.prototype.notifyComplete = function () {
        this.throttlingDone();
    };
    return ThrottleSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
//# sourceMappingURL=throttle.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/throttleTime.js":
/*!********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/throttleTime.js ***!
  \********************************************************************/
/*! exports provided: throttleTime */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./throttle */ "./node_modules/rxjs/_esm5/internal/operators/throttle.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */




function throttleTime(duration, scheduler, config) {
    if (scheduler === void 0) {
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
    }
    if (config === void 0) {
        config = _throttle__WEBPACK_IMPORTED_MODULE_3__["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) {
        this.duration = duration;
        this.scheduler = scheduler;
        this.leading = leading;
        this.trailing = trailing;
    }
    ThrottleTimeOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
    };
    return ThrottleTimeOperator;
}());
var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleTimeSubscriber, _super);
    function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
        var _this = _super.call(this, destination) || this;
        _this.duration = duration;
        _this.scheduler = scheduler;
        _this.leading = leading;
        _this.trailing = trailing;
        _this._hasTrailingValue = false;
        _this._trailingValue = null;
        return _this;
    }
    ThrottleTimeSubscriber.prototype._next = function (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);
            }
        }
    };
    ThrottleTimeSubscriber.prototype._complete = function () {
        if (this._hasTrailingValue) {
            this.destination.next(this._trailingValue);
            this.destination.complete();
        }
        else {
            this.destination.complete();
        }
    };
    ThrottleTimeSubscriber.prototype.clearThrottle = function () {
        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_1__["Subscriber"]));
function dispatchNext(arg) {
    var subscriber = arg.subscriber;
    subscriber.clearThrottle();
}
//# sourceMappingURL=throttleTime.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js":
/*!********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js ***!
  \********************************************************************/
/*! exports provided: throwIfEmpty */
/***/ (function(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/_esm5/internal/operators/tap.js");
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/EmptyError */ "./node_modules/rxjs/_esm5/internal/util/EmptyError.js");
/** PURE_IMPORTS_START _tap,_util_EmptyError PURE_IMPORTS_END */


var throwIfEmpty = function (errorFactory) {
    if (errorFactory === void 0) {
        errorFactory = defaultErrorFactory;
    }
    return Object(_tap__WEBPACK_IMPORTED_MODULE_0__["tap"])({
        hasValue: false,
        next: function () { this.hasValue = true; },
        complete: function () {
            if (!this.hasValue) {
                throw errorFactory();
            }
        }
    });
};
function defaultErrorFactory() {
    return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
}
//# sourceMappingURL=throwIfEmpty.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/timeInterval.js":
/*!********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/timeInterval.js ***!
  \********************************************************************/
/*! exports provided: timeInterval, TimeInterval */
/***/ (function(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/_esm5/internal/scheduler/async.js");
/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scan */ "./node_modules/rxjs/_esm5/internal/operators/scan.js");
/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/defer */ "./node_modules/rxjs/_esm5/internal/observable/defer.js");
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */




function timeInterval(scheduler) {
    if (scheduler === void 0) {
        scheduler = _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 (_a, value) {
                var current = _a.current;
                return ({ value: value, current: scheduler.now(), last: current });
            }, { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_a) {
                var current = _a.current, last = _a.last, value = _a.value;
                return new TimeInterval(value, current - last);
            }));
        });
    };
}
var TimeInterval = /*@__PURE__*/ (function () {
    function TimeInterval(value, interval) {
        this.value = value;
        this.interval = interval;
    }
    return TimeInterval;
}());

//# sourceMappingURL=timeInterval.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/timeout.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/timeout.js ***!
  \***************************************************************/
/*! exports provided: timeout */
/***/ (function(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/_esm5/internal/scheduler/async.js");
/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/TimeoutError */ "./node_modules/rxjs/_esm5/internal/util/TimeoutError.js");
/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./timeoutWith */ "./node_modules/rxjs/_esm5/internal/operators/timeoutWith.js");
/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/throwError */ "./node_modules/rxjs/_esm5/internal/observable/throwError.js");
/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */




function timeout(due, scheduler) {
    if (scheduler === void 0) {
        scheduler = _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/_esm5/internal/operators/timeoutWith.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/timeoutWith.js ***!
  \*******************************************************************/
/*! exports provided: timeoutWith */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isDate */ "./node_modules/rxjs/_esm5/internal/util/isDate.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */





function timeoutWith(due, withObservable, scheduler) {
    if (scheduler === void 0) {
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
    }
    return function (source) {
        var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["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) {
        this.waitFor = waitFor;
        this.absoluteTimeout = absoluteTimeout;
        this.withObservable = withObservable;
        this.scheduler = scheduler;
    }
    TimeoutWithOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
    };
    return TimeoutWithOperator;
}());
var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutWithSubscriber, _super);
    function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
        var _this = _super.call(this, destination) || this;
        _this.absoluteTimeout = absoluteTimeout;
        _this.waitFor = waitFor;
        _this.withObservable = withObservable;
        _this.scheduler = scheduler;
        _this.action = null;
        _this.scheduleTimeout();
        return _this;
    }
    TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
        var withObservable = subscriber.withObservable;
        subscriber._unsubscribeAndRecycle();
        subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(subscriber, withObservable));
    };
    TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
        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));
        }
    };
    TimeoutWithSubscriber.prototype._next = function (value) {
        if (!this.absoluteTimeout) {
            this.scheduleTimeout();
        }
        _super.prototype._next.call(this, value);
    };
    TimeoutWithSubscriber.prototype._unsubscribe = function () {
        this.action = null;
        this.scheduler = null;
        this.withObservable = null;
    };
    return TimeoutWithSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
//# sourceMappingURL=timeoutWith.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/timestamp.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/timestamp.js ***!
  \*****************************************************************/
/*! exports provided: timestamp, Timestamp */
/***/ (function(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/_esm5/internal/scheduler/async.js");
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */


function timestamp(scheduler) {
    if (scheduler === void 0) {
        scheduler = _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 = /*@__PURE__*/ (function () {
    function Timestamp(value, timestamp) {
        this.value = value;
        this.timestamp = timestamp;
    }
    return Timestamp;
}());

//# sourceMappingURL=timestamp.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/toArray.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/toArray.js ***!
  \***************************************************************/
/*! exports provided: toArray */
/***/ (function(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/_esm5/internal/operators/reduce.js");
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */

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/_esm5/internal/operators/window.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/window.js ***!
  \**************************************************************/
/*! exports provided: window */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */




function window(windowBoundaries) {
    return function windowOperatorFunction(source) {
        return source.lift(new WindowOperator(windowBoundaries));
    };
}
var WindowOperator = /*@__PURE__*/ (function () {
    function WindowOperator(windowBoundaries) {
        this.windowBoundaries = windowBoundaries;
    }
    WindowOperator.prototype.call = function (subscriber, source) {
        var windowSubscriber = new WindowSubscriber(subscriber);
        var sourceSubscription = source.subscribe(windowSubscriber);
        if (!sourceSubscription.closed) {
            windowSubscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
        }
        return sourceSubscription;
    };
    return WindowOperator;
}());
var WindowSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
    function WindowSubscriber(destination) {
        var _this = _super.call(this, destination) || this;
        _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
        destination.next(_this.window);
        return _this;
    }
    WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.openWindow();
    };
    WindowSubscriber.prototype.notifyError = function (error, innerSub) {
        this._error(error);
    };
    WindowSubscriber.prototype.notifyComplete = function (innerSub) {
        this._complete();
    };
    WindowSubscriber.prototype._next = function (value) {
        this.window.next(value);
    };
    WindowSubscriber.prototype._error = function (err) {
        this.window.error(err);
        this.destination.error(err);
    };
    WindowSubscriber.prototype._complete = function () {
        this.window.complete();
        this.destination.complete();
    };
    WindowSubscriber.prototype._unsubscribe = function () {
        this.window = null;
    };
    WindowSubscriber.prototype.openWindow = function () {
        var prevWindow = this.window;
        if (prevWindow) {
            prevWindow.complete();
        }
        var destination = this.destination;
        var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
        destination.next(newWindow);
    };
    return WindowSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
//# sourceMappingURL=window.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/windowCount.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/windowCount.js ***!
  \*******************************************************************/
/*! exports provided: windowCount */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */



function windowCount(windowSize, startWindowEvery) {
    if (startWindowEvery === void 0) {
        startWindowEvery = 0;
    }
    return function windowCountOperatorFunction(source) {
        return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
    };
}
var WindowCountOperator = /*@__PURE__*/ (function () {
    function WindowCountOperator(windowSize, startWindowEvery) {
        this.windowSize = windowSize;
        this.startWindowEvery = startWindowEvery;
    }
    WindowCountOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
    };
    return WindowCountOperator;
}());
var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowCountSubscriber, _super);
    function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
        var _this = _super.call(this, destination) || this;
        _this.destination = destination;
        _this.windowSize = windowSize;
        _this.startWindowEvery = startWindowEvery;
        _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]()];
        _this.count = 0;
        destination.next(_this.windows[0]);
        return _this;
    }
    WindowCountSubscriber.prototype._next = function (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_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
            windows.push(window_1);
            destination.next(window_1);
        }
    };
    WindowCountSubscriber.prototype._error = function (err) {
        var windows = this.windows;
        if (windows) {
            while (windows.length > 0 && !this.closed) {
                windows.shift().error(err);
            }
        }
        this.destination.error(err);
    };
    WindowCountSubscriber.prototype._complete = function () {
        var windows = this.windows;
        if (windows) {
            while (windows.length > 0 && !this.closed) {
                windows.shift().complete();
            }
        }
        this.destination.complete();
    };
    WindowCountSubscriber.prototype._unsubscribe = function () {
        this.count = 0;
        this.windows = null;
    };
    return WindowCountSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
//# sourceMappingURL=windowCount.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/windowTime.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/windowTime.js ***!
  \******************************************************************/
/*! exports provided: windowTime */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isNumeric */ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js");
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */






function windowTime(windowTimeSpan) {
    var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
    var windowCreationInterval = null;
    var maxWindowSize = Number.POSITIVE_INFINITY;
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[3])) {
        scheduler = arguments[3];
    }
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[2])) {
        scheduler = arguments[2];
    }
    else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[2])) {
        maxWindowSize = arguments[2];
    }
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[1])) {
        scheduler = arguments[1];
    }
    else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["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) {
        this.windowTimeSpan = windowTimeSpan;
        this.windowCreationInterval = windowCreationInterval;
        this.maxWindowSize = maxWindowSize;
        this.scheduler = scheduler;
    }
    WindowTimeOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
    };
    return WindowTimeOperator;
}());
var CountedSubject = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountedSubject, _super);
    function CountedSubject() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._numberOfNextedValues = 0;
        return _this;
    }
    CountedSubject.prototype.next = function (value) {
        this._numberOfNextedValues++;
        _super.prototype.next.call(this, value);
    };
    Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
        get: function () {
            return this._numberOfNextedValues;
        },
        enumerable: true,
        configurable: true
    });
    return CountedSubject;
}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowTimeSubscriber, _super);
    function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
        var _this = _super.call(this, destination) || this;
        _this.destination = destination;
        _this.windowTimeSpan = windowTimeSpan;
        _this.windowCreationInterval = windowCreationInterval;
        _this.maxWindowSize = maxWindowSize;
        _this.scheduler = scheduler;
        _this.windows = [];
        var window = _this.openWindow();
        if (windowCreationInterval !== null && windowCreationInterval >= 0) {
            var closeState = { subscriber: _this, window: window, context: null };
            var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
            _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
            _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
        }
        else {
            var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
            _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
        }
        return _this;
    }
    WindowTimeSubscriber.prototype._next = function (value) {
        var windows = this.windows;
        var len = windows.length;
        for (var i = 0; i < len; i++) {
            var window_1 = windows[i];
            if (!window_1.closed) {
                window_1.next(value);
                if (window_1.numberOfNextedValues >= this.maxWindowSize) {
                    this.closeWindow(window_1);
                }
            }
        }
    };
    WindowTimeSubscriber.prototype._error = function (err) {
        var windows = this.windows;
        while (windows.length > 0) {
            windows.shift().error(err);
        }
        this.destination.error(err);
    };
    WindowTimeSubscriber.prototype._complete = function () {
        var windows = this.windows;
        while (windows.length > 0) {
            var window_2 = windows.shift();
            if (!window_2.closed) {
                window_2.complete();
            }
        }
        this.destination.complete();
    };
    WindowTimeSubscriber.prototype.openWindow = function () {
        var window = new CountedSubject();
        this.windows.push(window);
        var destination = this.destination;
        destination.next(window);
        return window;
    };
    WindowTimeSubscriber.prototype.closeWindow = function (window) {
        window.complete();
        var windows = this.windows;
        windows.splice(windows.indexOf(window), 1);
    };
    return WindowTimeSubscriber;
}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["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/_esm5/internal/operators/windowToggle.js":
/*!********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/windowToggle.js ***!
  \********************************************************************/
/*! exports provided: windowToggle */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */







function windowToggle(openings, closingSelector) {
    return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
}
var WindowToggleOperator = /*@__PURE__*/ (function () {
    function WindowToggleOperator(openings, closingSelector) {
        this.openings = openings;
        this.closingSelector = closingSelector;
    }
    WindowToggleOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
    };
    return WindowToggleOperator;
}());
var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowToggleSubscriber, _super);
    function WindowToggleSubscriber(destination, openings, closingSelector) {
        var _this = _super.call(this, destination) || this;
        _this.openings = openings;
        _this.closingSelector = closingSelector;
        _this.contexts = [];
        _this.add(_this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_6__["subscribeToResult"])(_this, openings, openings));
        return _this;
    }
    WindowToggleSubscriber.prototype._next = function (value) {
        var contexts = this.contexts;
        if (contexts) {
            var len = contexts.length;
            for (var i = 0; i < len; i++) {
                contexts[i].window.next(value);
            }
        }
    };
    WindowToggleSubscriber.prototype._error = function (err) {
        var contexts = this.contexts;
        this.contexts = null;
        if (contexts) {
            var len = contexts.length;
            var index = -1;
            while (++index < len) {
                var context_1 = contexts[index];
                context_1.window.error(err);
                context_1.subscription.unsubscribe();
            }
        }
        _super.prototype._error.call(this, err);
    };
    WindowToggleSubscriber.prototype._complete = function () {
        var contexts = this.contexts;
        this.contexts = null;
        if (contexts) {
            var len = contexts.length;
            var index = -1;
            while (++index < len) {
                var context_2 = contexts[index];
                context_2.window.complete();
                context_2.subscription.unsubscribe();
            }
        }
        _super.prototype._complete.call(this);
    };
    WindowToggleSubscriber.prototype._unsubscribe = function () {
        var contexts = this.contexts;
        this.contexts = null;
        if (contexts) {
            var len = contexts.length;
            var index = -1;
            while (++index < len) {
                var context_3 = contexts[index];
                context_3.window.unsubscribe();
                context_3.subscription.unsubscribe();
            }
        }
    };
    WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        if (outerValue === this.openings) {
            var closingSelector = this.closingSelector;
            var closingNotifier = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_3__["tryCatch"])(closingSelector)(innerValue);
            if (closingNotifier === _util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"]) {
                return this.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].e);
            }
            else {
                var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
                var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
                var context_4 = { window: window_1, subscription: subscription };
                this.contexts.push(context_4);
                var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_6__["subscribeToResult"])(this, closingNotifier, context_4);
                if (innerSubscription.closed) {
                    this.closeWindow(this.contexts.length - 1);
                }
                else {
                    innerSubscription.context = context_4;
                    subscription.add(innerSubscription);
                }
                this.destination.next(window_1);
            }
        }
        else {
            this.closeWindow(this.contexts.indexOf(outerValue));
        }
    };
    WindowToggleSubscriber.prototype.notifyError = function (err) {
        this.error(err);
    };
    WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
        if (inner !== this.openSubscription) {
            this.closeWindow(this.contexts.indexOf(inner.context));
        }
    };
    WindowToggleSubscriber.prototype.closeWindow = function (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_5__["OuterSubscriber"]));
//# sourceMappingURL=windowToggle.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/windowWhen.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/windowWhen.js ***!
  \******************************************************************/
/*! exports provided: windowWhen */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */






function windowWhen(closingSelector) {
    return function windowWhenOperatorFunction(source) {
        return source.lift(new WindowOperator(closingSelector));
    };
}
var WindowOperator = /*@__PURE__*/ (function () {
    function WindowOperator(closingSelector) {
        this.closingSelector = closingSelector;
    }
    WindowOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
    };
    return WindowOperator;
}());
var WindowSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
    function WindowSubscriber(destination, closingSelector) {
        var _this = _super.call(this, destination) || this;
        _this.destination = destination;
        _this.closingSelector = closingSelector;
        _this.openWindow();
        return _this;
    }
    WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
        this.openWindow(innerSub);
    };
    WindowSubscriber.prototype.notifyError = function (error, innerSub) {
        this._error(error);
    };
    WindowSubscriber.prototype.notifyComplete = function (innerSub) {
        this.openWindow(innerSub);
    };
    WindowSubscriber.prototype._next = function (value) {
        this.window.next(value);
    };
    WindowSubscriber.prototype._error = function (err) {
        this.window.error(err);
        this.destination.error(err);
        this.unsubscribeClosingNotification();
    };
    WindowSubscriber.prototype._complete = function () {
        this.window.complete();
        this.destination.complete();
        this.unsubscribeClosingNotification();
    };
    WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
        if (this.closingNotification) {
            this.closingNotification.unsubscribe();
        }
    };
    WindowSubscriber.prototype.openWindow = function (innerSub) {
        if (innerSub === void 0) {
            innerSub = 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_1__["Subject"]();
        this.destination.next(window);
        var closingNotifier = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.closingSelector)();
        if (closingNotifier === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
            var err = _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e;
            this.destination.error(err);
            this.window.error(err);
        }
        else {
            this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, closingNotifier));
        }
    };
    return WindowSubscriber;
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
//# sourceMappingURL=windowWhen.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js ***!
  \**********************************************************************/
/*! exports provided: withLatestFrom */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */



function withLatestFrom() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    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) {
        this.observables = observables;
        this.project = project;
    }
    WithLatestFromOperator.prototype.call = function (subscriber, source) {
        return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
    };
    return WithLatestFromOperator;
}());
var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WithLatestFromSubscriber, _super);
    function WithLatestFromSubscriber(destination, observables, project) {
        var _this = _super.call(this, destination) || this;
        _this.observables = observables;
        _this.project = project;
        _this.toRespond = [];
        var len = observables.length;
        _this.values = new Array(len);
        for (var i = 0; i < len; i++) {
            _this.toRespond.push(i);
        }
        for (var i = 0; i < len; i++) {
            var observable = observables[i];
            _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, observable, observable, i));
        }
        return _this;
    }
    WithLatestFromSubscriber.prototype.notifyNext = function (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);
            }
        }
    };
    WithLatestFromSubscriber.prototype.notifyComplete = function () {
    };
    WithLatestFromSubscriber.prototype._next = function (value) {
        if (this.toRespond.length === 0) {
            var args = [value].concat(this.values);
            if (this.project) {
                this._tryProject(args);
            }
            else {
                this.destination.next(args);
            }
        }
    };
    WithLatestFromSubscriber.prototype._tryProject = function (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_1__["OuterSubscriber"]));
//# sourceMappingURL=withLatestFrom.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/zip.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/zip.js ***!
  \***********************************************************/
/*! exports provided: zip */
/***/ (function(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/_esm5/internal/observable/zip.js");
/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */

function zip() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    return function zipOperatorFunction(source) {
        return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"].apply(void 0, [source].concat(observables)));
    };
}
//# sourceMappingURL=zip.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/operators/zipAll.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/operators/zipAll.js ***!
  \**************************************************************/
/*! exports provided: zipAll */
/***/ (function(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/_esm5/internal/observable/zip.js");
/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */

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/_esm5/internal/scheduler/Action.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/Action.js ***!
  \**************************************************************/
/*! exports provided: Action */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */


var Action = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Action, _super);
    function Action(scheduler, work) {
        return _super.call(this) || this;
    }
    Action.prototype.schedule = function (state, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        return this;
    };
    return Action;
}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));

//# sourceMappingURL=Action.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js":
/*!****************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js ***!
  \****************************************************************************/
/*! exports provided: AnimationFrameAction */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js");
/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */


var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameAction, _super);
    function AnimationFrameAction(scheduler, work) {
        var _this = _super.call(this, scheduler, work) || this;
        _this.scheduler = scheduler;
        _this.work = work;
        return _this;
    }
    AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        if (delay !== null && delay > 0) {
            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
        }
        scheduler.actions.push(this);
        return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
    };
    AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
            return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
        }
        if (scheduler.actions.length === 0) {
            cancelAnimationFrame(id);
            scheduler.scheduled = undefined;
        }
        return undefined;
    };
    return AnimationFrameAction;
}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));

//# sourceMappingURL=AnimationFrameAction.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js ***!
  \*******************************************************************************/
/*! exports provided: AnimationFrameScheduler */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */


var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameScheduler, _super);
    function AnimationFrameScheduler() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    AnimationFrameScheduler.prototype.flush = function (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_1__["AsyncScheduler"]));

//# sourceMappingURL=AnimationFrameScheduler.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js ***!
  \******************************************************************/
/*! exports provided: AsapAction */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/Immediate */ "./node_modules/rxjs/_esm5/internal/util/Immediate.js");
/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AsyncAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js");
/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */



var AsapAction = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapAction, _super);
    function AsapAction(scheduler, work) {
        var _this = _super.call(this, scheduler, work) || this;
        _this.scheduler = scheduler;
        _this.work = work;
        return _this;
    }
    AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        if (delay !== null && delay > 0) {
            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
        }
        scheduler.actions.push(this);
        return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
    };
    AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
            return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
        }
        if (scheduler.actions.length === 0) {
            _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].clearImmediate(id);
            scheduler.scheduled = undefined;
        }
        return undefined;
    };
    return AsapAction;
}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__["AsyncAction"]));

//# sourceMappingURL=AsapAction.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js":
/*!*********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js ***!
  \*********************************************************************/
/*! exports provided: AsapScheduler */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */


var AsapScheduler = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapScheduler, _super);
    function AsapScheduler() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    AsapScheduler.prototype.flush = function (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_1__["AsyncScheduler"]));

//# sourceMappingURL=AsapScheduler.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js ***!
  \*******************************************************************/
/*! exports provided: AsyncAction */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Action */ "./node_modules/rxjs/_esm5/internal/scheduler/Action.js");
/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */


var AsyncAction = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncAction, _super);
    function AsyncAction(scheduler, work) {
        var _this = _super.call(this, scheduler, work) || this;
        _this.scheduler = scheduler;
        _this.work = work;
        _this.pending = false;
        return _this;
    }
    AsyncAction.prototype.schedule = function (state, delay) {
        if (delay === void 0) {
            delay = 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;
    };
    AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        return setInterval(scheduler.flush.bind(scheduler, this), delay);
    };
    AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        if (delay !== null && this.delay === delay && this.pending === false) {
            return id;
        }
        clearInterval(id);
    };
    AsyncAction.prototype.execute = function (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);
        }
    };
    AsyncAction.prototype._execute = function (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;
        }
    };
    AsyncAction.prototype._unsubscribe = function () {
        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_1__["Action"]));

//# sourceMappingURL=AsyncAction.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js ***!
  \**********************************************************************/
/*! exports provided: AsyncScheduler */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Scheduler */ "./node_modules/rxjs/_esm5/internal/Scheduler.js");
/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */


var AsyncScheduler = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncScheduler, _super);
    function AsyncScheduler(SchedulerAction, now) {
        if (now === void 0) {
            now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"].now;
        }
        var _this = _super.call(this, SchedulerAction, function () {
            if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
                return AsyncScheduler.delegate.now();
            }
            else {
                return now();
            }
        }) || this;
        _this.actions = [];
        _this.active = false;
        _this.scheduled = undefined;
        return _this;
    }
    AsyncScheduler.prototype.schedule = function (work, delay, state) {
        if (delay === void 0) {
            delay = 0;
        }
        if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
            return AsyncScheduler.delegate.schedule(work, delay, state);
        }
        else {
            return _super.prototype.schedule.call(this, work, delay, state);
        }
    };
    AsyncScheduler.prototype.flush = function (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_1__["Scheduler"]));

//# sourceMappingURL=AsyncScheduler.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js ***!
  \*******************************************************************/
/*! exports provided: QueueAction */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js");
/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */


var QueueAction = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueAction, _super);
    function QueueAction(scheduler, work) {
        var _this = _super.call(this, scheduler, work) || this;
        _this.scheduler = scheduler;
        _this.work = work;
        return _this;
    }
    QueueAction.prototype.schedule = function (state, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        if (delay > 0) {
            return _super.prototype.schedule.call(this, state, delay);
        }
        this.delay = delay;
        this.state = state;
        this.scheduler.flush(this);
        return this;
    };
    QueueAction.prototype.execute = function (state, delay) {
        return (delay > 0 || this.closed) ?
            _super.prototype.execute.call(this, state, delay) :
            this._execute(state, delay);
    };
    QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
        }
        return scheduler.flush(this);
    };
    return QueueAction;
}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));

//# sourceMappingURL=QueueAction.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js ***!
  \**********************************************************************/
/*! exports provided: QueueScheduler */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */


var QueueScheduler = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueScheduler, _super);
    function QueueScheduler() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return QueueScheduler;
}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));

//# sourceMappingURL=QueueScheduler.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js":
/*!****************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js ***!
  \****************************************************************************/
/*! exports provided: VirtualTimeScheduler, VirtualAction */
/***/ (function(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 tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js");
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */



var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualTimeScheduler, _super);
    function VirtualTimeScheduler(SchedulerAction, maxFrames) {
        if (SchedulerAction === void 0) {
            SchedulerAction = VirtualAction;
        }
        if (maxFrames === void 0) {
            maxFrames = Number.POSITIVE_INFINITY;
        }
        var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
        _this.maxFrames = maxFrames;
        _this.frame = 0;
        _this.index = -1;
        return _this;
    }
    VirtualTimeScheduler.prototype.flush = function () {
        var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
        var error, action;
        while ((action = actions.shift()) && (this.frame = action.delay) <= maxFrames) {
            if (error = action.execute(action.state, action.delay)) {
                break;
            }
        }
        if (error) {
            while (action = actions.shift()) {
                action.unsubscribe();
            }
            throw error;
        }
    };
    VirtualTimeScheduler.frameTimeFactor = 10;
    return VirtualTimeScheduler;
}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__["AsyncScheduler"]));

var VirtualAction = /*@__PURE__*/ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualAction, _super);
    function VirtualAction(scheduler, work, index) {
        if (index === void 0) {
            index = scheduler.index += 1;
        }
        var _this = _super.call(this, scheduler, work) || this;
        _this.scheduler = scheduler;
        _this.work = work;
        _this.index = index;
        _this.active = true;
        _this.index = scheduler.index = index;
        return _this;
    }
    VirtualAction.prototype.schedule = function (state, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        if (!this.id) {
            return _super.prototype.schedule.call(this, state, delay);
        }
        this.active = false;
        var action = new VirtualAction(this.scheduler, this.work);
        this.add(action);
        return action.schedule(state, delay);
    };
    VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        this.delay = scheduler.frame + delay;
        var actions = scheduler.actions;
        actions.push(this);
        actions.sort(VirtualAction.sortActions);
        return true;
    };
    VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
        if (delay === void 0) {
            delay = 0;
        }
        return undefined;
    };
    VirtualAction.prototype._execute = function (state, delay) {
        if (this.active === true) {
            return _super.prototype._execute.call(this, state, delay);
        }
    };
    VirtualAction.sortActions = function (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_1__["AsyncAction"]));

//# sourceMappingURL=VirtualTimeScheduler.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js ***!
  \**********************************************************************/
/*! exports provided: animationFrame */
/***/ (function(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/_esm5/internal/scheduler/AnimationFrameAction.js");
/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AnimationFrameScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js");
/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */


var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
//# sourceMappingURL=animationFrame.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/asap.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/asap.js ***!
  \************************************************************/
/*! exports provided: asap */
/***/ (function(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/_esm5/internal/scheduler/AsapAction.js");
/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsapScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js");
/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */


var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
//# sourceMappingURL=asap.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/async.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/async.js ***!
  \*************************************************************/
/*! exports provided: async */
/***/ (function(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/_esm5/internal/scheduler/AsyncAction.js");
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */


var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
//# sourceMappingURL=async.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/scheduler/queue.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/queue.js ***!
  \*************************************************************/
/*! exports provided: queue */
/***/ (function(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/_esm5/internal/scheduler/QueueAction.js");
/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./QueueScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js");
/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */


var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
//# sourceMappingURL=queue.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/symbol/iterator.js ***!
  \*************************************************************/
/*! exports provided: getSymbolIterator, iterator, $$iterator */
/***/ (function(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; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function getSymbolIterator() {
    if (typeof Symbol !== 'function' || !Symbol.iterator) {
        return '@@iterator';
    }
    return Symbol.iterator;
}
var iterator = /*@__PURE__*/ getSymbolIterator();
var $$iterator = iterator;
//# sourceMappingURL=iterator.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/symbol/observable.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/symbol/observable.js ***!
  \***************************************************************/
/*! exports provided: observable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
var observable = typeof Symbol === 'function' && Symbol.observable || '@@observable';
//# sourceMappingURL=observable.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js ***!
  \*****************************************************************/
/*! exports provided: rxSubscriber, $$rxSubscriber */
/***/ (function(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; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
var rxSubscriber = typeof Symbol === 'function'
    ? /*@__PURE__*/ Symbol('rxSubscriber')
    : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();
var $$rxSubscriber = rxSubscriber;
//# sourceMappingURL=rxSubscriber.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js":
/*!**************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js ***!
  \**************************************************************************/
/*! exports provided: ArgumentOutOfRangeError */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function ArgumentOutOfRangeErrorImpl() {
    Error.call(this);
    this.message = 'argument out of range';
    this.name = 'ArgumentOutOfRangeError';
    return this;
}
ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
//# sourceMappingURL=ArgumentOutOfRangeError.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/EmptyError.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/EmptyError.js ***!
  \*************************************************************/
/*! exports provided: EmptyError */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function EmptyErrorImpl() {
    Error.call(this);
    this.message = 'no elements in sequence';
    this.name = 'EmptyError';
    return this;
}
EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
var EmptyError = EmptyErrorImpl;
//# sourceMappingURL=EmptyError.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/Immediate.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/Immediate.js ***!
  \************************************************************/
/*! exports provided: Immediate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
var nextHandle = 1;
var tasksByHandle = {};
function runIfPresent(handle) {
    var cb = tasksByHandle[handle];
    if (cb) {
        cb();
    }
}
var Immediate = {
    setImmediate: function (cb) {
        var handle = nextHandle++;
        tasksByHandle[handle] = cb;
        Promise.resolve().then(function () { return runIfPresent(handle); });
        return handle;
    },
    clearImmediate: function (handle) {
        delete tasksByHandle[handle];
    },
};
//# sourceMappingURL=Immediate.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js":
/*!**************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js ***!
  \**************************************************************************/
/*! exports provided: ObjectUnsubscribedError */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function ObjectUnsubscribedErrorImpl() {
    Error.call(this);
    this.message = 'object unsubscribed';
    this.name = 'ObjectUnsubscribedError';
    return this;
}
ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
//# sourceMappingURL=ObjectUnsubscribedError.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/TimeoutError.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/TimeoutError.js ***!
  \***************************************************************/
/*! exports provided: TimeoutError */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function TimeoutErrorImpl() {
    Error.call(this);
    this.message = 'Timeout has occurred';
    this.name = 'TimeoutError';
    return this;
}
TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
var TimeoutError = TimeoutErrorImpl;
//# sourceMappingURL=TimeoutError.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js ***!
  \**********************************************************************/
/*! exports provided: UnsubscriptionError */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function UnsubscriptionErrorImpl(errors) {
    Error.call(this);
    this.message = errors ?
        errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n  ') : '';
    this.name = 'UnsubscriptionError';
    this.errors = errors;
    return this;
}
UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
var UnsubscriptionError = UnsubscriptionErrorImpl;
//# sourceMappingURL=UnsubscriptionError.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/canReportError.js":
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/canReportError.js ***!
  \*****************************************************************/
/*! exports provided: canReportError */
/***/ (function(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/_esm5/internal/Subscriber.js");
/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */

function canReportError(observer) {
    while (observer) {
        var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
        if (closed_1 || 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/_esm5/internal/util/errorObject.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/errorObject.js ***!
  \**************************************************************/
/*! exports provided: errorObject */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "errorObject", function() { return errorObject; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
var errorObject = { e: {} };
//# sourceMappingURL=errorObject.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/hostReportError.js":
/*!******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/hostReportError.js ***!
  \******************************************************************/
/*! exports provided: hostReportError */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function hostReportError(err) {
    setTimeout(function () { throw err; });
}
//# sourceMappingURL=hostReportError.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/identity.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/identity.js ***!
  \***********************************************************/
/*! exports provided: identity */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function identity(x) {
    return x;
}
//# sourceMappingURL=identity.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isArray.js":
/*!**********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isArray.js ***!
  \**********************************************************/
/*! exports provided: isArray */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
//# sourceMappingURL=isArray.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isArrayLike.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isArrayLike.js ***!
  \**************************************************************/
/*! exports provided: isArrayLike */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
//# sourceMappingURL=isArrayLike.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isDate.js":
/*!*********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isDate.js ***!
  \*********************************************************/
/*! exports provided: isDate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function isDate(value) {
    return value instanceof Date && !isNaN(+value);
}
//# sourceMappingURL=isDate.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isFunction.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isFunction.js ***!
  \*************************************************************/
/*! exports provided: isFunction */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function isFunction(x) {
    return typeof x === 'function';
}
//# sourceMappingURL=isFunction.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isInteropObservable.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isInteropObservable.js ***!
  \**********************************************************************/
/*! exports provided: isInteropObservable */
/***/ (function(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/_esm5/internal/symbol/observable.js");
/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */

function isInteropObservable(input) {
    return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
}
//# sourceMappingURL=isInteropObservable.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isIterable.js":
/*!*************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isIterable.js ***!
  \*************************************************************/
/*! exports provided: isIterable */
/***/ (function(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/_esm5/internal/symbol/iterator.js");
/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */

function isIterable(input) {
    return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
}
//# sourceMappingURL=isIterable.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isNumeric.js ***!
  \************************************************************/
/*! exports provided: isNumeric */
/***/ (function(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/_esm5/internal/util/isArray.js");
/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */

function isNumeric(val) {
    return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0;
}
//# sourceMappingURL=isNumeric.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isObject.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isObject.js ***!
  \***********************************************************/
/*! exports provided: isObject */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function isObject(x) {
    return x != null && typeof x === 'object';
}
//# sourceMappingURL=isObject.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isObservable.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isObservable.js ***!
  \***************************************************************/
/*! exports provided: isObservable */
/***/ (function(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/_esm5/internal/Observable.js");
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */

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/_esm5/internal/util/isPromise.js":
/*!************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isPromise.js ***!
  \************************************************************/
/*! exports provided: isPromise */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function isPromise(value) {
    return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
}
//# sourceMappingURL=isPromise.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/isScheduler.js ***!
  \**************************************************************/
/*! exports provided: isScheduler */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function isScheduler(value) {
    return value && typeof value.schedule === 'function';
}
//# sourceMappingURL=isScheduler.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/noop.js":
/*!*******************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/noop.js ***!
  \*******************************************************/
/*! exports provided: noop */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
function noop() { }
//# sourceMappingURL=noop.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/not.js":
/*!******************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/not.js ***!
  \******************************************************/
/*! exports provided: not */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
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/_esm5/internal/util/pipe.js":
/*!*******************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/pipe.js ***!
  \*******************************************************/
/*! exports provided: pipe, pipeFromArray */
/***/ (function(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/_esm5/internal/util/noop.js");
/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */

function pipe() {
    var fns = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        fns[_i] = arguments[_i];
    }
    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/_esm5/internal/util/subscribeTo.js":
/*!**************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeTo.js ***!
  \**************************************************************/
/*! exports provided: subscribeTo */
/***/ (function(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/_esm5/internal/Observable.js");
/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeToArray */ "./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js");
/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./subscribeToPromise */ "./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js");
/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subscribeToIterable */ "./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js");
/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./subscribeToObservable */ "./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js");
/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isArrayLike */ "./node_modules/rxjs/_esm5/internal/util/isArrayLike.js");
/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isPromise */ "./node_modules/rxjs/_esm5/internal/util/isPromise.js");
/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./isObject */ "./node_modules/rxjs/_esm5/internal/util/isObject.js");
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../symbol/iterator */ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js");
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../symbol/observable */ "./node_modules/rxjs/_esm5/internal/symbol/observable.js");
/** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */










var subscribeTo = function (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' : "'" + result + "'";
        var msg = "You provided " + 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/_esm5/internal/util/subscribeToArray.js":
/*!*******************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js ***!
  \*******************************************************************/
/*! exports provided: subscribeToArray */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; });
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
var subscribeToArray = function (array) {
    return function (subscriber) {
        for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
            subscriber.next(array[i]);
        }
        if (!subscriber.closed) {
            subscriber.complete();
        }
    };
};
//# sourceMappingURL=subscribeToArray.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js":
/*!**********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js ***!
  \**********************************************************************/
/*! exports provided: subscribeToIterable */
/***/ (function(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/_esm5/internal/symbol/iterator.js");
/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */

var subscribeToIterable = function (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/_esm5/internal/util/subscribeToObservable.js":
/*!************************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js ***!
  \************************************************************************/
/*! exports provided: subscribeToObservable */
/***/ (function(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/_esm5/internal/symbol/observable.js");
/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */

var subscribeToObservable = function (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/_esm5/internal/util/subscribeToPromise.js":
/*!*********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js ***!
  \*********************************************************************/
/*! exports provided: subscribeToPromise */
/***/ (function(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/_esm5/internal/util/hostReportError.js");
/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */

var subscribeToPromise = function (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/_esm5/internal/util/subscribeToResult.js":
/*!********************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js ***!
  \********************************************************************/
/*! exports provided: subscribeToResult */
/***/ (function(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/_esm5/internal/InnerSubscriber.js");
/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeTo */ "./node_modules/rxjs/_esm5/internal/util/subscribeTo.js");
/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo PURE_IMPORTS_END */


function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {
    if (destination === void 0) {
        destination = 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/_esm5/internal/util/toSubscriber.js":
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/toSubscriber.js ***!
  \***************************************************************/
/*! exports provided: toSubscriber */
/***/ (function(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/_esm5/internal/Subscriber.js");
/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../symbol/rxSubscriber */ "./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js");
/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observer */ "./node_modules/rxjs/_esm5/internal/Observer.js");
/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */



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/_esm5/internal/util/tryCatch.js":
/*!***********************************************************!*\
  !*** ./node_modules/rxjs/_esm5/internal/util/tryCatch.js ***!
  \***********************************************************/
/*! exports provided: tryCatch */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tryCatch", function() { return tryCatch; });
/* harmony import */ var _errorObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
/** PURE_IMPORTS_START _errorObject PURE_IMPORTS_END */

var tryCatchTarget;
function tryCatcher() {
    try {
        return tryCatchTarget.apply(this, arguments);
    }
    catch (e) {
        _errorObject__WEBPACK_IMPORTED_MODULE_0__["errorObject"].e = e;
        return _errorObject__WEBPACK_IMPORTED_MODULE_0__["errorObject"];
    }
}
function tryCatch(fn) {
    tryCatchTarget = fn;
    return tryCatcher;
}
//# sourceMappingURL=tryCatch.js.map


/***/ }),

/***/ "./node_modules/rxjs/_esm5/operators/index.js":
/*!****************************************************!*\
  !*** ./node_modules/rxjs/_esm5/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(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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/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/_esm5/internal/operators/zipAll.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; });

/** PURE_IMPORTS_START  PURE_IMPORTS_END */








































































































//# sourceMappingURL=index.js.map


/***/ }),

/***/ "./node_modules/tslib/tslib.es6.js":
/*!*****************************************!*\
  !*** ./node_modules/tslib/tslib.es6.js ***!
  \*****************************************/
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */

var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return extendStatics(d, b);
};

function __extends(d, b) {
    extendStatics(d, b);
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}

var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    }
    return __assign.apply(this, arguments);
}

function __rest(s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
}

function __decorate(decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
}

function __param(paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
}

function __metadata(metadataKey, metadataValue) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}

function __awaiter(thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
}

function __generator(thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
}

function __exportStar(m, exports) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}

function __values(o) {
    var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
    if (m) return m.call(o);
    return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
}

function __read(o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
}

function __spread() {
    for (var ar = [], i = 0; i < arguments.length; i++)
        ar = ar.concat(__read(arguments[i]));
    return ar;
}

function __spreadArrays() {
    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
    for (var r = Array(s), k = 0, i = 0; i < il; i++)
        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
            r[k] = a[j];
    return r;
};

function __await(v) {
    return this instanceof __await ? (this.v = v, this) : new __await(v);
}

function __asyncGenerator(thisArg, _arguments, generator) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var g = generator.apply(thisArg, _arguments || []), i, q = [];
    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
    function fulfill(value) { resume("next", value); }
    function reject(value) { resume("throw", value); }
    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}

function __asyncDelegator(o) {
    var i, p;
    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}

function __asyncValues(o) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var m = o[Symbol.asyncIterator], i;
    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}

function __makeTemplateObject(cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};

function __importStar(mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result.default = mod;
    return result;
}

function __importDefault(mod) {
    return (mod && mod.__esModule) ? mod : { default: mod };
}


/***/ })

}]);
//# sourceMappingURL=vendor.js.map